41 #ifndef OBJECTS_CDD_CDD_ID_BASE_HPP
42 #define OBJECTS_CDD_CDD_ID_BASE_HPP
48 #ifndef BEGIN_objects_SCOPE
49 # define BEGIN_objects_SCOPE BEGIN_SCOPE(objects)
50 # define END_objects_SCOPE END_SCOPE(objects)
97 virtual void Reset(
void);
100 virtual void ResetSelection(
void);
106 E_Choice Which(
void)
const;
112 void CheckSelected(E_Choice index)
const;
118 NCBI_NORETURN
void ThrowInvalidSelection(E_Choice index)
const;
126 static string SelectionName(E_Choice index);
157 bool IsUid(
void)
const;
163 TUid GetUid(
void)
const;
184 bool IsGid(
void)
const;
190 const TGid& GetGid(
void)
const;
213 static const char*
const sm_SelectionNames[];
Base class for all serializable objects.
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
bool IsGid(void) const
Check if variant Gid is selected.
void Select(E_Choice index, EResetVariant reset, CObjectMemoryPool *pool)
Select the requested variant if needed, allocating CObject variants from memory pool.
void Select(E_Choice index, EResetVariant reset=eDoResetVariant)
Select the requested variant if needed.
TUid & SetUid(void)
Select the variant.
E_Choice Which(void) const
Which variant is currently selected.
virtual void ResetSelection(void)
Reset the selection (set it to e_not_set).
E_ChoiceStopper
Maximum+1 value of the choice variant enumerator.
CCdd_id_Base(const CCdd_id_Base &)
TUid GetUid(void) const
Get the variant data.
void CheckSelected(E_Choice index) const
Verify selection, throw exception if it differs from the expected.
NCBI_NS_NCBI::CSerialObject * m_object
CCdd_id_Base & operator=(const CCdd_id_Base &)
DECLARE_INTERNAL_TYPE_INFO()
bool IsUid(void) const
Check if variant Uid is selected.
void DoSelect(E_Choice index, CObjectMemoryPool *pool=0)
void ThrowInvalidSelection(E_Choice index) const
Throw 'InvalidSelection' exception.
@ e_Gid
holds accession/version pairs
@ e_not_set
No variant selected.
@ e_Uid
for synchronization with Entrez holds PSSM-Ids
const GenericPointer< typename T::ValueType > T2 value