Gamgee
You miserable little maggot. I'll stove your head in!
|
class to hold encoded byte arrays for individual data fields (cigar, bases, etc.) during building of a Sam More...
#include <sam_builder_data_field.h>
Public Member Functions | |
SamBuilderDataField () | |
initialize a SamBuilderDataField to an empty value More... | |
SamBuilderDataField (const void *copy_source, const uint32_t bytes_to_copy, const uint32_t num_elements) | |
initialize a SamBuilderDataField by copying data from a raw pointer (takes no ownership of copy_source) More... | |
SamBuilderDataField (std::unique_ptr< uint8_t[]> &&move_source, const uint32_t source_bytes, const uint32_t num_elements) | |
initialize a SamBuilderDataField by moving an existing unique_ptr into it and taking ownership (without copying the existing data) More... | |
SamBuilderDataField (SamBuilderDataField &&other) | |
initialize a SamBuilderDataField via move from an existing field More... | |
SamBuilderDataField & | operator= (SamBuilderDataField &&other) |
move an existing SamBuildDataField into this one More... | |
SamBuilderDataField (const SamBuilderDataField &other)=delete | |
SamBuilderDataField & | operator= (const SamBuilderDataField &other)=delete |
~SamBuilderDataField ()=default | |
const uint8_t * | raw_data_ptr () const |
gets a raw pointer to the data buffer More... | |
uint32_t | num_bytes () const |
number of bytes in the data buffer More... | |
uint32_t | num_elements () const |
number of elements (cigar operations, bases, etc.) in the data buffer More... | |
bool | empty () const |
does this field have any data? More... | |
void | update (const void *copy_source, const uint32_t bytes_to_copy, const uint32_t num_elements) |
update the field by copying data from a raw pointer (takes no ownership of copy_source) More... | |
void | update (std::unique_ptr< uint8_t[]> &&move_source, const uint32_t source_bytes, const uint32_t num_elements) |
update the field by moving an existing unique_ptr into it and taking ownership (without copying the existing data) More... | |
uint8_t * | copy_into (uint8_t *destination) const |
copy this field's byte array into an arbitrary location More... | |
class to hold encoded byte arrays for individual data fields (cigar, bases, etc.) during building of a Sam
Fields can be created/updated either by copying data from raw pointers, or by moving managed pointers into them without copying. Eg.,
auto field = SamBuilderDataField{raw_pointer, num_bytes, num_elements}; // does a copy auto field = SamBuilderDataField{move(unique_ptr), num_bytes, num_elements}; // no copy
After construction, a field's value can be altered via the update() functions
gamgee::SamBuilderDataField::SamBuilderDataField | ( | ) |
initialize a SamBuilderDataField to an empty value
|
explicit |
initialize a SamBuilderDataField by copying data from a raw pointer (takes no ownership of copy_source)
initialize a SamBuilderDataField by copying data from a raw pointer
|
explicit |
initialize a SamBuilderDataField by moving an existing unique_ptr into it and taking ownership (without copying the existing data)
initialize a SamBuilderDataField by moving an existing unique_ptr into it (without copying the existing data)
gamgee::SamBuilderDataField::SamBuilderDataField | ( | SamBuilderDataField && | other | ) |
initialize a SamBuilderDataField via move from an existing field
|
delete |
|
default |
uint8_t * gamgee::SamBuilderDataField::copy_into | ( | uint8_t * | destination | ) | const |
copy this field's byte array into an arbitrary location
|
inline |
does this field have any data?
|
inline |
number of bytes in the data buffer
|
inline |
number of elements (cigar operations, bases, etc.) in the data buffer
SamBuilderDataField & gamgee::SamBuilderDataField::operator= | ( | SamBuilderDataField && | other | ) |
move an existing SamBuildDataField into this one
|
delete |
|
inline |
gets a raw pointer to the data buffer
void gamgee::SamBuilderDataField::update | ( | const void * | copy_source, |
const uint32_t | bytes_to_copy, | ||
const uint32_t | num_elements | ||
) |
update the field by copying data from a raw pointer (takes no ownership of copy_source)
void gamgee::SamBuilderDataField::update | ( | std::unique_ptr< uint8_t[]> && | move_source, |
const uint32_t | source_bytes, | ||
const uint32_t | num_elements | ||
) |
update the field by moving an existing unique_ptr into it and taking ownership (without copying the existing data)