41 #ifndef OBJECTS_SEQTABLE_SEQTABLE_MULTI_DATA_BASE_HPP
42 #define OBJECTS_SEQTABLE_SEQTABLE_MULTI_DATA_BASE_HPP
53 #ifndef BEGIN_objects_SCOPE
54 # define BEGIN_objects_SCOPE BEGIN_SCOPE(objects)
55 # define END_objects_SCOPE END_SCOPE(objects)
125 virtual void Reset(
void);
128 virtual void ResetSelection(
void);
134 E_Choice Which(
void)
const;
140 void CheckSelected(E_Choice index)
const;
146 NCBI_NORETURN
void ThrowInvalidSelection(E_Choice index)
const;
154 static string SelectionName(E_Choice index);
175 typedef vector< vector< char >* >
TBytes;
179 typedef vector< CRef< CSeq_loc > >
TLoc;
180 typedef vector< CRef< CSeq_id > >
TId;
200 bool IsInt(
void)
const;
206 const TInt& GetInt(
void)
const;
221 bool IsReal(
void)
const;
227 const TReal& GetReal(
void)
const;
233 TReal& SetReal(
void);
242 bool IsString(
void)
const;
248 const TString& GetString(
void)
const;
263 bool IsBytes(
void)
const;
269 const TBytes& GetBytes(
void)
const;
284 bool IsCommon_string(
void)
const;
310 bool IsCommon_bytes(
void)
const;
336 bool IsBit(
void)
const;
342 const TBit& GetBit(
void)
const;
357 bool IsLoc(
void)
const;
378 bool IsId(
void)
const;
399 bool IsInterval(
void)
const;
405 const TInterval& GetInterval(
void)
const;
420 bool IsInt_delta(
void)
const;
446 bool IsInt_scaled(
void)
const;
472 bool IsReal_scaled(
void)
const;
498 bool IsBit_bvector(
void)
const;
524 bool IsInt1(
void)
const;
530 const TInt1& GetInt1(
void)
const;
536 TInt1& SetInt1(
void);
545 bool IsInt2(
void)
const;
551 const TInt2& GetInt2(
void)
const;
557 TInt2& SetInt2(
void);
566 bool IsInt8(
void)
const;
572 const TInt8& GetInt8(
void)
const;
578 TInt8& SetInt8(
void);
590 static const char*
const sm_SelectionNames[];
593 NCBI_NS_NCBI::CUnionBuffer<TInt>
m_Int;
594 NCBI_NS_NCBI::CUnionBuffer<TReal>
m_Real;
597 NCBI_NS_NCBI::CUnionBuffer<TBit>
m_Bit;
598 NCBI_NS_NCBI::CUnionBuffer<TLoc>
m_Loc;
599 NCBI_NS_NCBI::CUnionBuffer<TId>
m_Id;
601 NCBI_NS_NCBI::CUnionBuffer<TInt1>
m_Int1;
602 NCBI_NS_NCBI::CUnionBuffer<TInt2>
m_Int2;
603 NCBI_NS_NCBI::CUnionBuffer<TInt8>
m_Int8;
CSeqTable_multi_data_Base –.
Base class for all serializable objects.
const CSeq_id & GetId(const CSeq_loc &loc, CScope *scope)
If all CSeq_ids embedded in CSeq_loc refer to the same CBioseq, returns the first CSeq_id found,...
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
NCBI_NS_NCBI::CUnionBuffer< TInt > m_Int
bool IsBit(void) const
Check if variant Bit is selected.
CBVector_data TBit_bvector
TReal & SetReal(void)
Select the variant.
TLoc & SetLoc(void)
Select the variant.
bool IsId(void) const
Check if variant Id is selected.
E_ChoiceStopper
Maximum+1 value of the choice variant enumerator.
NCBI_NS_NCBI::CUnionBuffer< TReal > m_Real
CSeqTable_multi_data TInt_delta
NCBI_NS_NCBI::CUnionBuffer< TInt8 > m_Int8
void Select(E_Choice index, EResetVariant reset, CObjectMemoryPool *pool)
Select the requested variant if needed, allocating CObject variants from memory pool.
CScaled_int_multi_data TInt_scaled
NCBI_NS_NCBI::CSerialObject * m_object
TString & SetString(void)
Select the variant.
CCommonString_table TCommon_string
bool IsString(void) const
Check if variant String is selected.
const TInt2 & GetInt2(void) const
Get the variant data.
NCBI_NS_NCBI::CUnionBuffer< TId > m_Id
TId & SetId(void)
Select the variant.
const TInt1 & GetInt1(void) const
Get the variant data.
bool IsInt_delta(void) const
Check if variant Int_delta is selected.
const TInterval & GetInterval(void) const
Get the variant data.
NCBI_NS_NCBI::CUnionBuffer< TInt2 > m_Int2
const TBit & GetBit(void) const
Get the variant data.
bool IsInt1(void) const
Check if variant Int1 is selected.
void Select(E_Choice index, EResetVariant reset=eDoResetVariant)
Select the requested variant if needed.
NCBI_NS_NCBI::CUnionBuffer< TInt1 > m_Int1
NCBI_NS_NCBI::CUnionBuffer< TInt8 > m_Int8
bool IsBit_bvector(void) const
Check if variant Bit_bvector is selected.
TInt2 & SetInt2(void)
Select the variant.
DECLARE_INTERNAL_TYPE_INFO()
NCBI_NS_NCBI::CUnionBuffer< TBytes > m_Bytes
void CheckSelected(E_Choice index) const
Verify selection, throw exception if it differs from the expected.
bool IsReal(void) const
Check if variant Real is selected.
vector< CRef< CSeq_loc > > TLoc
NCBI_NS_NCBI::CUnionBuffer< TBytes > m_Bytes
NCBI_NS_NCBI::CUnionBuffer< TInt > m_Int
const TReal & GetReal(void) const
Get the variant data.
bool IsInt8(void) const
Check if variant Int8 is selected.
bool IsInt_scaled(void) const
Check if variant Int_scaled is selected.
NCBI_NS_NCBI::CUnionBuffer< TLoc > m_Loc
bool IsInt(void) const
Check if variant Int is selected.
NCBI_NS_NCBI::CUnionBuffer< TReal > m_Real
CSeqTable_multi_data_Base(const CSeqTable_multi_data_Base &)
bool IsBytes(void) const
Check if variant Bytes is selected.
const TLoc & GetLoc(void) const
Get the variant data.
TInt8 & SetInt8(void)
Select the variant.
vector< vector< char > * > TBytes
const TInt8 & GetInt8(void) const
Get the variant data.
virtual void ResetSelection(void)
Reset the selection (set it to e_not_set).
vector< CStringUTF8 > TString
bool IsReal_scaled(void) const
Check if variant Real_scaled is selected.
bool IsLoc(void) const
Check if variant Loc is selected.
NCBI_NS_NCBI::CUnionBuffer< TBit > m_Bit
TInt1 & SetInt1(void)
Select the variant.
NCBI_NS_NCBI::CUnionBuffer< TInt1 > m_Int1
CScaled_real_multi_data TReal_scaled
TInt & SetInt(void)
Select the variant.
NCBI_NS_NCBI::CUnionBuffer< TInterval > m_Interval
NCBI_NS_NCBI::CUnionBuffer< TLoc > m_Loc
NCBI_NS_NCBI::CUnionBuffer< TInt2 > m_Int2
bool IsCommon_bytes(void) const
Check if variant Common_bytes is selected.
vector< CRef< CSeq_id > > TId
const TInt & GetInt(void) const
Get the variant data.
TInterval & SetInterval(void)
Select the variant.
void DoSelect(E_Choice index, CObjectMemoryPool *pool=0)
TBit & SetBit(void)
Select the variant.
CCommonBytes_table TCommon_bytes
NCBI_NS_NCBI::CUnionBuffer< TString > m_String
const TBytes & GetBytes(void) const
Get the variant data.
const TString & GetString(void) const
Get the variant data.
bool IsInt2(void) const
Check if variant Int2 is selected.
bool IsInterval(void) const
Check if variant Interval is selected.
NCBI_NS_NCBI::CUnionBuffer< TInterval > m_Interval
void ThrowInvalidSelection(E_Choice index) const
Throw 'InvalidSelection' exception.
CSeqTable_multi_data_Base & operator=(const CSeqTable_multi_data_Base &)
vector< CRef< CSeq_interval > > TInterval
NCBI_NS_NCBI::CUnionBuffer< TString > m_String
E_Choice Which(void) const
Which variant is currently selected.
bool IsCommon_string(void) const
Check if variant Common_string is selected.
NCBI_NS_NCBI::CUnionBuffer< TBit > m_Bit
const TId & GetId(void) const
Get the variant data.
NCBI_NS_NCBI::CUnionBuffer< TId > m_Id
TBytes & SetBytes(void)
Select the variant.
@ e_Int8
a set of signed 8-byte integers
@ e_Int_scaled
scaled data (int/bit -> int)
@ e_Real
a set of reals, one per row
@ e_Int1
a set of signed 1-byte integers encoded as sequential octets
@ e_Loc
a set of locations, one per row
@ e_not_set
No variant selected.
@ e_Common_bytes
a set of byte arrays with small set of possible values
@ e_Int_delta
delta-encoded data (int/bit -> int)
@ e_Bytes
a set of byte arrays, one per row
@ e_String
a set of strings, one per row
@ e_Bit
a set of bits, one per row Most-significant bit in each octet comes first.
@ e_Int2
a set of signed 2-byte integers
@ e_Int
a set of 4-byte integers, one per row
@ e_Common_string
a set of string with small set of possible values
@ e_Real_scaled
scaled data (int/bit -> real)
@ e_Bit_bvector
a set of bit, represented as serialized bvector, see include/util/bitset/bm.h
int GetLoc(const string &acc, const string &pat, CSeq_loc &loc, CScope &scope)