41 #ifndef OBJECTS_MACRO_PARSE_SRC_BASE_HPP
42 #define OBJECTS_MACRO_PARSE_SRC_BASE_HPP
52 #ifndef BEGIN_objects_SCOPE
53 # define BEGIN_objects_SCOPE BEGIN_SCOPE(objects)
54 # define END_objects_SCOPE END_SCOPE(objects)
109 virtual void Reset(
void);
203 bool IsOrg(
void)
const;
321 NCBI_NS_NCBI::CUnionBuffer<NCBI_NS_STD::string>
m_string;
Base class for all serializable objects.
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
virtual void Reset(void)
Reset the whole object.
void ThrowInvalidSelection(E_Choice index) const
Throw 'InvalidSelection' exception.
void SetComment(void)
Select the variant.
static const char *const sm_SelectionNames[]
NCBI_NS_NCBI::CUnionBuffer< NCBI_NS_STD::string > m_string
void SetFlatfile(void)
Select the variant.
NCBI_NS_NCBI::CSerialObject * m_object
bool IsStructured_comment(void) const
Check if variant Structured_comment is selected.
void SetLocal_id(void)
Select the variant.
NCBI_NS_NCBI::CUnionBuffer< NCBI_NS_STD::string > m_string
virtual void ResetSelection(void)
Reset the selection (set it to e_not_set).
bool IsGeneral_id(void) const
Check if variant General_id is selected.
TStructured_comment & SetStructured_comment(void)
Select the variant.
bool IsFlatfile(void) const
Check if variant Flatfile is selected.
bool IsComment(void) const
Check if variant Comment is selected.
TOrg & SetOrg(void)
Select the variant.
void SetBankit_comment(void)
Select the variant.
bool IsOrg(void) const
Check if variant Org is selected.
void Select(E_Choice index, EResetVariant reset, CObjectMemoryPool *pool)
Select the requested variant if needed, allocating CObject variants from memory pool.
static string SelectionName(E_Choice index)
Retrieve selection name (for diagnostic purposes).
void CheckSelected(E_Choice index) const
Verify selection, throw exception if it differs from the expected.
DECLARE_INTERNAL_TYPE_INFO()
void SetFile_id(void)
Select the variant.
void DoSelect(E_Choice index, CObjectMemoryPool *pool=0)
CParse_src_general_id TGeneral_id
virtual ~CParse_src_Base(void)
const TStructured_comment & GetStructured_comment(void) const
Get the variant data.
const TGeneral_id & GetGeneral_id(void) const
Get the variant data.
void Select(E_Choice index, EResetVariant reset=eDoResetVariant)
Select the requested variant if needed.
const TOrg & GetOrg(void) const
Get the variant data.
bool IsDefline(void) const
Check if variant Defline is selected.
void SetDefline(void)
Select the variant.
string TStructured_comment
E_ChoiceStopper
Maximum+1 value of the choice variant enumerator.
CParse_src_Base & operator=(const CParse_src_Base &)
bool IsLocal_id(void) const
Check if variant Local_id is selected.
TGeneral_id & SetGeneral_id(void)
Select the variant.
E_Choice Which(void) const
Which variant is currently selected.
bool IsFile_id(void) const
Check if variant File_id is selected.
bool IsBankit_comment(void) const
Check if variant Bankit_comment is selected.
CParse_src_Base(const CParse_src_Base &)
@ e_not_set
No variant selected.
@ e_MaxChoice
== e_General_id+1
const GenericPointer< typename T::ValueType > T2 value