49 CigarOp(
const char type =
'\0',
const uint32_t& length = 0)
68 RefData(
const std::string& name = std::string(),
const int32_t& length = 0)
98 BamRegion(
const int& leftID = -1,
const int& leftPos = -1,
const int& rightID = -1,
99 const int& rightPos = -1)
101 , LeftPosition(leftPos)
102 , RightRefID(rightID)
103 , RightPosition(rightPos)
118 return (LeftRefID >= 0 && LeftPosition >= 0);
124 return (!isLeftBoundSpecified() && !isRightBoundSpecified());
130 return (RightRefID >= 0 && RightPosition >= 1);
148 std::ifstream f(filename.c_str(), std::ifstream::in);
157 x = ((x & 0xFF00) >> 8) | ((x & 0x00FF) << 8);
175 x = ((x & 0xFF000000) >> 24) | ((x & 0x00FF0000) >> 8) | ((x & 0x0000FF00) << 8) |
176 ((x & 0x000000FF) << 24);
194 x = ((x & 0xFF00000000000000ull) >> 56) | ((x & 0x00FF000000000000ull) >> 40) |
195 ((x & 0x0000FF0000000000ull) >> 24) | ((x & 0x000000FF00000000ull) >> 8) |
196 ((x & 0x00000000FF000000ull) << 8) | ((x & 0x0000000000FF0000ull) << 24) |
197 ((x & 0x000000000000FF00ull) << 40) | ((x & 0x00000000000000FFull) << 56);
216 std::memcpy(&value, data,
sizeof(uint16_t));
218 std::memcpy(data, &value,
sizeof(uint16_t));
227 std::memcpy(&value, data,
sizeof(uint32_t));
229 std::memcpy(data, &value,
sizeof(uint32_t));
238 std::memcpy(&value, data,
sizeof(uint64_t));
240 std::memcpy(data, &value,
sizeof(uint64_t));
249 const uint16_t one = 0x0001;
250 return ((*(
char*)&one) == 0);
261 buffer[0] = (char)value;
262 buffer[1] = (char)(value >> 8);
263 buffer[2] = (char)(value >> 16);
264 buffer[3] = (char)(value >> 24);
275 buffer[0] = (char)value;
276 buffer[1] = (char)(value >> 8);
288 std::memcpy(&result, buffer,
sizeof(
double));
301 std::memcpy(&result, buffer,
sizeof(
float));
314 std::memcpy(&result, buffer,
sizeof(
signed int));
327 std::memcpy(&result, buffer,
sizeof(
signed short));
340 std::memcpy(&result, buffer,
sizeof(
unsigned int));
352 unsigned short result;
353 std::memcpy(&result, buffer,
sizeof(
unsigned short));
355#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
357#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
360#error "Unsupported hardware"
372struct API_NO_EXPORT RaiiBuffer
377 const std::size_t NumBytes;
380 RaiiBuffer(
const std::size_t n)
381 : Buffer(new char[n]())
393 std::memset(Buffer, 0, NumBytes);