41 #ifndef OBJECTS_GENESBYLOC_GBL_REPLY_BASE_HPP
42 #define OBJECTS_GENESBYLOC_GBL_REPLY_BASE_HPP
52 #ifndef BEGIN_objects_SCOPE
53 # define BEGIN_objects_SCOPE BEGIN_SCOPE(objects)
54 # define END_objects_SCOPE END_SCOPE(objects)
101 virtual void Reset(
void);
104 virtual void ResetSelection(
void);
110 E_Choice Which(
void)
const;
116 void CheckSelected(E_Choice index)
const;
122 NCBI_NORETURN
void ThrowInvalidSelection(E_Choice index)
const;
130 static string SelectionName(E_Choice index);
161 bool IsData(
void)
const;
167 const TData& GetData(
void)
const;
173 TData& SetData(
void);
187 bool IsError(
void)
const;
193 const TError& GetError(
void)
const;
217 static const char*
const sm_SelectionNames[];
220 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.
#define NCBI_GENESBYLOC_EXPORT
E_Choice Which(void) const
Which variant is currently selected.
E_ChoiceStopper
Maximum+1 value of the choice variant enumerator.
void ThrowInvalidSelection(E_Choice index) const
Throw 'InvalidSelection' exception.
virtual void ResetSelection(void)
Reset the selection (set it to e_not_set).
NCBI_NS_NCBI::CUnionBuffer< NCBI_NS_STD::string > m_string
NCBI_NS_NCBI::CUnionBuffer< NCBI_NS_STD::string > m_string
void Select(E_Choice index, EResetVariant reset, CObjectMemoryPool *pool)
Select the requested variant if needed, allocating CObject variants from memory pool.
void CheckSelected(E_Choice index) const
Verify selection, throw exception if it differs from the expected.
bool IsError(void) const
Check if variant Error is selected.
const TError & GetError(void) const
Get the variant data.
CGBL_Reply_Base(const CGBL_Reply_Base &)
CGBL_Reply_Base & operator=(const CGBL_Reply_Base &)
void DoSelect(E_Choice index, CObjectMemoryPool *pool=0)
DECLARE_INTERNAL_TYPE_INFO()
void Select(E_Choice index, EResetVariant reset=eDoResetVariant)
Select the requested variant if needed.
NCBI_NS_NCBI::CSerialObject * m_object
TError & SetError(void)
Select the variant.
bool IsData(void) const
Check if variant Data is selected.
@ e_not_set
No variant selected.