Gamgee
You miserable little maggot. I'll stove your head in!
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | List of all members
gamgee::VariantBuilderIndividualRegion Class Reference

Helper class for VariantBuilder to manage the fields belonging to the individual region of Variant records. More...

#include <variant_builder_individual_region.h>

Public Member Functions

 VariantBuilderIndividualRegion (const VariantHeader &header, const bool enable_validation)
 
 VariantBuilderIndividualRegion (VariantBuilderIndividualRegion &&other)=default
 
VariantBuilderIndividualRegionoperator= (VariantBuilderIndividualRegion &&other)=default
 
 VariantBuilderIndividualRegion (const VariantBuilderIndividualRegion &other)=delete
 
VariantBuilderIndividualRegionoperator= (const VariantBuilderIndividualRegion &other)=delete
 
 ~VariantBuilderIndividualRegion ()=default
 
void set_enable_validation (const bool enable_validation)
 
int32_t gt_index () const
 
uint32_t num_present_fields () const
 
bool modified () const
 
template<class FIELD_ID_TYPE , class BULK_FIELD_VALUES_TYPE >
void bulk_set_genotype_field (const FIELD_ID_TYPE &field_id, BULK_FIELD_VALUES_TYPE &&field_values)
 
template<class FIELD_ID_TYPE , class BULK_FIELD_VALUES_TYPE >
void bulk_set_integer_field (const FIELD_ID_TYPE &field_id, BULK_FIELD_VALUES_TYPE &&field_values)
 
template<class FIELD_ID_TYPE , class BULK_FIELD_VALUES_TYPE >
void bulk_set_float_field (const FIELD_ID_TYPE &field_id, BULK_FIELD_VALUES_TYPE &&field_values)
 
template<class FIELD_ID_TYPE , class BULK_FIELD_VALUES_TYPE >
void bulk_set_string_field (const FIELD_ID_TYPE &field_id, BULK_FIELD_VALUES_TYPE &&field_values)
 
template<class FIELD_ID_TYPE , class SAMPLE_ID_TYPE , class FIELD_VALUE_TYPE >
void set_genotype_field_by_sample (const FIELD_ID_TYPE &field_id, const SAMPLE_ID_TYPE &sample_id, const FIELD_VALUE_TYPE *field_values, const uint32_t num_field_values)
 
template<class FIELD_ID_TYPE , class SAMPLE_ID_TYPE , class FIELD_VALUE_TYPE >
void set_integer_field_by_sample (const FIELD_ID_TYPE &field_id, const SAMPLE_ID_TYPE &sample_id, const FIELD_VALUE_TYPE *field_values, const uint32_t num_field_values)
 
template<class FIELD_ID_TYPE , class SAMPLE_ID_TYPE , class FIELD_VALUE_TYPE >
void set_float_field_by_sample (const FIELD_ID_TYPE &field_id, const SAMPLE_ID_TYPE &sample_id, const FIELD_VALUE_TYPE *field_values, const uint32_t num_field_values)
 
template<class FIELD_ID_TYPE , class SAMPLE_ID_TYPE , class FIELD_VALUE_TYPE >
void set_string_field_by_sample (const FIELD_ID_TYPE &field_id, const SAMPLE_ID_TYPE &sample_id, const FIELD_VALUE_TYPE *field_values, const uint32_t num_field_values)
 
template<class FIELD_ID_TYPE >
void remove_individual_field (const FIELD_ID_TYPE &field_id)
 
uint32_t estimate_total_size () const
 Produce a slight overestimate of the total size of the encoded data for this individual region. More...
 
void encode_into (kstring_t *buffer) const
 Encode all individual fields into the provided byte buffer in the proper order and format for final insertion into a Variant object. More...
 
void clear ()
 Reset the individual region to a pristine state with no field data. More...
 

Detailed Description

Helper class for VariantBuilder to manage the fields belonging to the individual region of Variant records.

The individual region includes the various kinds of FORMAT fields. This class manages the validation and bookkeeping, but not the encoding and storage, of these fields. The storage/encoding for each field is handled by the lower-level VariantBuilderIndividualField class.

Constructor & Destructor Documentation

gamgee::VariantBuilderIndividualRegion::VariantBuilderIndividualRegion ( const VariantHeader header,
const bool  enable_validation 
)
explicit
gamgee::VariantBuilderIndividualRegion::VariantBuilderIndividualRegion ( VariantBuilderIndividualRegion &&  other)
default
gamgee::VariantBuilderIndividualRegion::VariantBuilderIndividualRegion ( const VariantBuilderIndividualRegion other)
delete
gamgee::VariantBuilderIndividualRegion::~VariantBuilderIndividualRegion ( )
default

Member Function Documentation

template<class FIELD_ID_TYPE , class BULK_FIELD_VALUES_TYPE >
void gamgee::VariantBuilderIndividualRegion::bulk_set_float_field ( const FIELD_ID_TYPE &  field_id,
BULK_FIELD_VALUES_TYPE &&  field_values 
)
inline
template<class FIELD_ID_TYPE , class BULK_FIELD_VALUES_TYPE >
void gamgee::VariantBuilderIndividualRegion::bulk_set_genotype_field ( const FIELD_ID_TYPE &  field_id,
BULK_FIELD_VALUES_TYPE &&  field_values 
)
inline
template<class FIELD_ID_TYPE , class BULK_FIELD_VALUES_TYPE >
void gamgee::VariantBuilderIndividualRegion::bulk_set_integer_field ( const FIELD_ID_TYPE &  field_id,
BULK_FIELD_VALUES_TYPE &&  field_values 
)
inline
template<class FIELD_ID_TYPE , class BULK_FIELD_VALUES_TYPE >
void gamgee::VariantBuilderIndividualRegion::bulk_set_string_field ( const FIELD_ID_TYPE &  field_id,
BULK_FIELD_VALUES_TYPE &&  field_values 
)
inline
void gamgee::VariantBuilderIndividualRegion::clear ( )

Reset the individual region to a pristine state with no field data.

void gamgee::VariantBuilderIndividualRegion::encode_into ( kstring_t buffer) const

Encode all individual fields into the provided byte buffer in the proper order and format for final insertion into a Variant object.

uint32_t gamgee::VariantBuilderIndividualRegion::estimate_total_size ( ) const

Produce a slight overestimate of the total size of the encoded data for this individual region.

int32_t gamgee::VariantBuilderIndividualRegion::gt_index ( ) const
inline
bool gamgee::VariantBuilderIndividualRegion::modified ( ) const
inline
uint32_t gamgee::VariantBuilderIndividualRegion::num_present_fields ( ) const
inline
VariantBuilderIndividualRegion& gamgee::VariantBuilderIndividualRegion::operator= ( VariantBuilderIndividualRegion &&  other)
default
VariantBuilderIndividualRegion& gamgee::VariantBuilderIndividualRegion::operator= ( const VariantBuilderIndividualRegion other)
delete
template<class FIELD_ID_TYPE >
void gamgee::VariantBuilderIndividualRegion::remove_individual_field ( const FIELD_ID_TYPE &  field_id)
inline
void gamgee::VariantBuilderIndividualRegion::set_enable_validation ( const bool  enable_validation)
inline
template<class FIELD_ID_TYPE , class SAMPLE_ID_TYPE , class FIELD_VALUE_TYPE >
void gamgee::VariantBuilderIndividualRegion::set_float_field_by_sample ( const FIELD_ID_TYPE &  field_id,
const SAMPLE_ID_TYPE &  sample_id,
const FIELD_VALUE_TYPE *  field_values,
const uint32_t  num_field_values 
)
inline
template<class FIELD_ID_TYPE , class SAMPLE_ID_TYPE , class FIELD_VALUE_TYPE >
void gamgee::VariantBuilderIndividualRegion::set_genotype_field_by_sample ( const FIELD_ID_TYPE &  field_id,
const SAMPLE_ID_TYPE &  sample_id,
const FIELD_VALUE_TYPE *  field_values,
const uint32_t  num_field_values 
)
inline
template<class FIELD_ID_TYPE , class SAMPLE_ID_TYPE , class FIELD_VALUE_TYPE >
void gamgee::VariantBuilderIndividualRegion::set_integer_field_by_sample ( const FIELD_ID_TYPE &  field_id,
const SAMPLE_ID_TYPE &  sample_id,
const FIELD_VALUE_TYPE *  field_values,
const uint32_t  num_field_values 
)
inline
template<class FIELD_ID_TYPE , class SAMPLE_ID_TYPE , class FIELD_VALUE_TYPE >
void gamgee::VariantBuilderIndividualRegion::set_string_field_by_sample ( const FIELD_ID_TYPE &  field_id,
const SAMPLE_ID_TYPE &  sample_id,
const FIELD_VALUE_TYPE *  field_values,
const uint32_t  num_field_values 
)
inline

The documentation for this class was generated from the following files: