41 #ifndef OBJECTS_SEQTABLE_SEQTABLE_SPARSE_INDEX_BASE_HPP
42 #define OBJECTS_SEQTABLE_SEQTABLE_SPARSE_INDEX_BASE_HPP
52 #ifndef BEGIN_objects_SCOPE
53 # define BEGIN_objects_SCOPE BEGIN_SCOPE(objects)
54 # define END_objects_SCOPE END_SCOPE(objects)
103 virtual void Reset(
void);
106 virtual void ResetSelection(
void);
112 E_Choice Which(
void)
const;
118 void CheckSelected(E_Choice index)
const;
124 NCBI_NORETURN
void ThrowInvalidSelection(E_Choice index)
const;
132 static string SelectionName(E_Choice index);
165 bool IsIndexes(
void)
const;
171 const TIndexes& GetIndexes(
void)
const;
186 bool IsBit_set(
void)
const;
192 const TBit_set& GetBit_set(
void)
const;
207 bool IsIndexes_delta(
void)
const;
228 bool IsBit_set_bvector(
void)
const;
257 static const char*
const sm_SelectionNames[];
CSeqTable_sparse_index_Base –.
Base class for all serializable objects.
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
virtual void ResetSelection(void)
Reset the selection (set it to e_not_set).
NCBI_NS_NCBI::CUnionBuffer< TIndexes_delta > m_Indexes_delta
void CheckSelected(E_Choice index) const
Verify selection, throw exception if it differs from the expected.
bool IsBit_set_bvector(void) const
Check if variant Bit_set_bvector is selected.
NCBI_NS_NCBI::CUnionBuffer< TIndexes > m_Indexes
vector< unsigned > TIndexes
E_Choice Which(void) const
Which variant is currently selected.
CSeqTable_sparse_index_Base(const CSeqTable_sparse_index_Base &)
const TIndexes & GetIndexes(void) const
Get the variant data.
E_ChoiceStopper
Maximum+1 value of the choice variant enumerator.
TBit_set & SetBit_set(void)
Select the variant.
NCBI_NS_NCBI::CUnionBuffer< TBit_set > m_Bit_set
TIndexes_delta & SetIndexes_delta(void)
Select the variant.
TIndexes & SetIndexes(void)
Select the variant.
void DoSelect(E_Choice index, CObjectMemoryPool *pool=0)
bool IsIndexes_delta(void) const
Check if variant Indexes_delta is selected.
vector< unsigned > TIndexes_delta
const TBit_set & GetBit_set(void) const
Get the variant data.
NCBI_NS_NCBI::CUnionBuffer< TIndexes > m_Indexes
NCBI_NS_NCBI::CUnionBuffer< TIndexes_delta > m_Indexes_delta
bool IsBit_set(void) const
Check if variant Bit_set is selected.
NCBI_NS_NCBI::CSerialObject * m_object
CSeqTable_sparse_index_Base & operator=(const CSeqTable_sparse_index_Base &)
const TIndexes_delta & GetIndexes_delta(void) const
Get the variant data.
NCBI_NS_NCBI::CUnionBuffer< TBit_set > m_Bit_set
void Select(E_Choice index, EResetVariant reset=eDoResetVariant)
Select the requested variant if needed.
void ThrowInvalidSelection(E_Choice index) const
Throw 'InvalidSelection' exception.
CBVector_data TBit_set_bvector
void Select(E_Choice index, EResetVariant reset, CObjectMemoryPool *pool)
Select the requested variant if needed, allocating CObject variants from memory pool.
DECLARE_INTERNAL_TYPE_INFO()
bool IsIndexes(void) const
Check if variant Indexes is selected.
@ e_Bit_set
Bitset of rows with values, set bit means the row has value. Most-significant bit in each octet comes...
@ e_Bit_set_bvector
Bitset of rows with values, as serialized bvector<>, see include/util/bitset/bm.h.
@ e_Indexes_delta
Indexes of rows with values, delta-encoded.
@ e_Indexes
Indexes of rows with values.
@ e_not_set
No variant selected.