41 #ifndef OBJECTS_TRACKMGR_TMGR_ASSEMBLYSPEC_BASE_HPP
42 #define OBJECTS_TRACKMGR_TMGR_ASSEMBLYSPEC_BASE_HPP
55 #ifndef BEGIN_objects_SCOPE
56 # define BEGIN_objects_SCOPE BEGIN_SCOPE(objects)
57 # define END_objects_SCOPE END_SCOPE(objects)
126 bool IsSetTax_id(
void)
const;
133 bool CanGetTax_id(
void)
const;
136 void ResetTax_id(
void);
163 bool IsSetName(
void)
const;
170 bool CanGetName(
void)
const;
173 void ResetName(
void);
179 const TName& GetName(
void)
const;
192 TName& SetName(
void);
222 virtual void Reset(
void);
225 virtual void ResetSelection(
void);
231 E_Choice Which(
void)
const;
237 void CheckSelected(E_Choice index)
const;
243 NCBI_NORETURN
void ThrowInvalidSelection(E_Choice index)
const;
251 static string SelectionName(E_Choice index);
282 bool IsName(
void)
const;
288 const TName& GetName(
void)
const;
294 TName& SetName(
void);
334 bool IsAll_assemblies(
void)
const;
337 void SetAll_assemblies(
void);
349 static const char*
const sm_SelectionNames[];
352 NCBI_NS_NCBI::CUnionBuffer<NCBI_NS_STD::string>
m_string;
375 return IsSetTax_id();
382 m_set_State[0] &= ~0x3;
388 if (!CanGetTax_id()) {
398 m_set_State[0] |= 0x3;
405 if (!IsSetTax_id()) {
409 m_set_State[0] |= 0x1;
416 return ((m_set_State[0] & 0xc) != 0);
438 m_set_State[0] |= 0xc;
444 m_Name = std::forward<CTMgr_AssemblySpec_Base::C_Name::TName>(
value);
445 m_set_State[0] |= 0xc;
456 m_set_State[0] |= 0x4;
Base class for all serializable objects.
CTMgr_AssemblySpec_Base –.
static char UnassignedByte(void)
void ThrowUnassigned(TMemberIndex index) const
static string UnassignedString(void)
uint32_t Uint4
4-byte (32-bit) unsigned integer
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
CTMgr_AssemblySpec_Base(const CTMgr_AssemblySpec_Base &)
C_Name & operator=(const C_Name &)
bool IsAccession(void) const
Check if variant Accession is selected.
Tparent::CMemberIndex< E_memberIndex, 3 > TmemberIndex
bool CanGetName(void) const
Check if it is safe to call GetName method.
const TName & GetName(void) const
Get the Name member data.
TName & SetName(void)
Assign a value to Name data member.
TTax_id & SetTax_id(void)
Assign a value to Tax_id data member.
void Select(E_Choice index, EResetVariant reset=eDoResetVariant)
Select the requested variant if needed.
virtual void ResetSelection(void)
Reset the selection (set it to e_not_set).
bool IsAll_assemblies(void) const
Check if variant All_assemblies is selected.
bool IsName(void) const
Check if variant Name is selected.
bool IsSetTax_id(void) const
Check if a value has been assigned to Tax_id data member.
void SetAll_assemblies(void)
Select the variant.
const TAccession & GetAccession(void) const
Get the variant data.
TAccession & SetAccession(void)
Select the variant.
void ResetTax_id(void)
Reset Tax_id data member.
void CheckSelected(E_Choice index) const
Verify selection, throw exception if it differs from the expected.
void Select(E_Choice index, EResetVariant reset, CObjectMemoryPool *pool)
Select the requested variant if needed, allocating CObject variants from memory pool.
NCBI_NS_NCBI::CUnionBuffer< NCBI_NS_STD::string > m_string
E_ChoiceStopper
Maximum+1 value of the choice variant enumerator.
NCBI_NS_NCBI::CSerialObject * m_object
E_Choice Which(void) const
Which variant is currently selected.
bool CanGetTax_id(void) const
Check if it is safe to call GetTax_id method.
void DoSelect(E_Choice index, CObjectMemoryPool *pool=0)
CTMgr_AssemblySpec_Base & operator=(const CTMgr_AssemblySpec_Base &)
DECLARE_INTERNAL_TYPE_INFO()
NCBI_NS_NCBI::CUnionBuffer< NCBI_NS_STD::string > m_string
bool IsSetName(void) const
Check if a value has been assigned to Name data member.
TTax_id GetTax_id(void) const
Get the Tax_id member data.
void ThrowInvalidSelection(E_Choice index) const
Throw 'InvalidSelection' exception.
DECLARE_INTERNAL_TYPE_INFO()
@ e_not_set
No variant selected.
const GenericPointer< typename T::ValueType > T2 value
const CConstRef< CSeq_id > GetAccession(const CSeq_id_Handle &id_handle)
Defines to provide correct exporting from DLLs in Windows.
#define NCBI_TRACKMGR_EXPORT