1 #ifndef gamgee__sam_builder_data_field__guard
2 #define gamgee__sam_builder_data_field__guard
23 explicit SamBuilderDataField(std::unique_ptr<uint8_t[]>&& move_source,
const uint32_t source_bytes,
const uint32_t num_elements);
35 bool empty()
const {
return m_num_bytes == 0; }
37 void update(
const void* copy_source,
const uint32_t bytes_to_copy,
const uint32_t num_elements);
38 void update(std::unique_ptr<uint8_t[]>&& move_source,
const uint32_t source_bytes,
const uint32_t num_elements);
39 uint8_t*
copy_into(uint8_t* destination)
const;
42 std::unique_ptr<uint8_t[]> m_data;
44 uint32_t m_num_elements;
class to hold encoded byte arrays for individual data fields (cigar, bases, etc.) during building of ...
Definition: sam_builder_data_field.h:19
SamBuilderDataField & operator=(SamBuilderDataField &&other)
move an existing SamBuildDataField into this one
Definition: sam_builder_data_field.cpp:54
SamBuilderDataField()
initialize a SamBuilderDataField to an empty value
Definition: sam_builder_data_field.cpp:12
bool empty() const
does this field have any data?
Definition: sam_builder_data_field.h:35
uint32_t num_elements() const
number of elements (cigar operations, bases, etc.) in the data buffer
Definition: sam_builder_data_field.h:34
Definition: exceptions.h:9
~SamBuilderDataField()=default
uint32_t num_bytes() const
number of bytes in the data buffer
Definition: sam_builder_data_field.h:33
uint8_t * copy_into(uint8_t *destination) const
copy this field's byte array into an arbitrary location
Definition: sam_builder_data_field.cpp:92
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) ...
Definition: sam_builder_data_field.cpp:69
const uint8_t * raw_data_ptr() const
gets a raw pointer to the data buffer
Definition: sam_builder_data_field.h:32