41 #ifndef OBJECTS_TAXON3_T3REQUEST_BASE_HPP
42 #define OBJECTS_TAXON3_T3REQUEST_BASE_HPP
52 #ifndef BEGIN_objects_SCOPE
53 # define BEGIN_objects_SCOPE BEGIN_SCOPE(objects)
54 # define END_objects_SCOPE END_SCOPE(objects)
104 virtual void Reset(
void);
107 virtual void ResetSelection(
void);
113 E_Choice Which(
void)
const;
119 void CheckSelected(E_Choice index)
const;
125 NCBI_NORETURN
void ThrowInvalidSelection(E_Choice index)
const;
133 static string SelectionName(E_Choice index);
166 bool IsTaxid(
void)
const;
172 TTaxid GetTaxid(
void)
const;
193 bool IsName(
void)
const;
199 const TName& GetName(
void)
const;
205 TName& SetName(
void);
220 bool IsOrg(
void)
const;
226 const TOrg& GetOrg(
void)
const;
246 bool IsJoin(
void)
const;
252 const TJoin& GetJoin(
void)
const;
258 TJoin& SetJoin(
void);
275 static const char*
const sm_SelectionNames[];
279 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_TAXON3_EXPORT
void CheckSelected(E_Choice index) const
Verify selection, throw exception if it differs from the expected.
void DoSelect(E_Choice index, CObjectMemoryPool *pool=0)
bool IsName(void) const
Check if variant Name is selected.
bool IsJoin(void) const
Check if variant Join is selected.
TTaxid GetTaxid(void) const
Get the variant data.
TName & SetName(void)
Select the variant.
bool IsOrg(void) const
Check if variant Org is selected.
void Select(E_Choice index, EResetVariant reset=eDoResetVariant)
Select the requested variant if needed.
const TName & GetName(void) const
Get the variant data.
CT3Request_Base & operator=(const CT3Request_Base &)
E_ChoiceStopper
Maximum+1 value of the choice variant enumerator.
NCBI_NS_NCBI::CUnionBuffer< NCBI_NS_STD::string > m_string
NCBI_NS_NCBI::CUnionBuffer< NCBI_NS_STD::string > m_string
bool IsTaxid(void) const
Check if variant Taxid is selected.
E_Choice Which(void) const
Which variant is currently selected.
DECLARE_INTERNAL_TYPE_INFO()
TTaxid & SetTaxid(void)
Select the variant.
NCBI_NS_NCBI::CSerialObject * m_object
void Select(E_Choice index, EResetVariant reset, CObjectMemoryPool *pool)
Select the requested variant if needed, allocating CObject variants from memory pool.
CT3Request_Base(const CT3Request_Base &)
virtual void ResetSelection(void)
Reset the selection (set it to e_not_set).
void ThrowInvalidSelection(E_Choice index) const
Throw 'InvalidSelection' exception.
@ e_not_set
No variant selected.
const GenericPointer< typename T::ValueType > T2 value