41 #ifndef OBJECTS_MMDB3_REGION_PNTRS_BASE_HPP
42 #define OBJECTS_MMDB3_REGION_PNTRS_BASE_HPP
53 #ifndef BEGIN_objects_SCOPE
54 # define BEGIN_objects_SCOPE BEGIN_SCOPE(objects)
55 # define END_objects_SCOPE END_SCOPE(objects)
125 void ResetSelection(
void);
131 E_Choice Which(
void)
const;
137 void CheckSelected(E_Choice index)
const;
143 NCBI_NORETURN
void ThrowInvalidSelection(E_Choice index)
const;
151 static string SelectionName(E_Choice index);
169 typedef list< CRef< CRegion_coordinates > >
TSite;
182 bool IsSite(
void)
const;
188 const TSite& GetSite(
void)
const;
194 TSite& SetSite(
void);
203 bool IsBoundary(
void)
const;
209 const TBoundary& GetBoundary(
void)
const;
227 static const char*
const sm_SelectionNames[];
230 NCBI_NS_NCBI::CUnionBuffer<TSite>
m_Site;
257 bool IsSetModel_id(
void)
const;
264 bool CanGetModel_id(
void)
const;
267 void ResetModel_id(
void);
273 const TModel_id& GetModel_id(
void)
const;
294 bool IsSetRegion(
void)
const;
301 bool CanGetRegion(
void)
const;
304 void ResetRegion(
void);
310 const TRegion& GetRegion(
void)
const;
325 virtual void Reset(
void);
357 if ( m_choice != index )
358 ThrowInvalidSelection(index);
367 DoSelect(index, pool);
374 Select(index, reset, 0);
380 return m_choice == e_Site;
386 CheckSelected(e_Site);
400 return m_choice == e_Boundary;
406 CheckSelected(e_Boundary);
User-defined methods of the data storage class.
Region motifs describe features defined by spatial location, such as the site specified by a coordina...
Base class for all serializable objects.
void ThrowUnassigned(TMemberIndex index) const
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.
#define NCBI_MMDB3_EXPORT
E_ChoiceStopper
Maximum+1 value of the choice variant enumerator.
bool IsBoundary(void) const
Check if variant Boundary is selected.
void ResetModel_id(void)
Reset Model_id data member.
NCBI_NS_NCBI::CUnionBuffer< TSite > m_Site
TSite & SetSite(void)
Select the variant.
DECLARE_INTERNAL_TYPE_INFO()
void ResetRegion(void)
Reset Region data member.
const TRegion & GetRegion(void) const
Get the Region member data.
NCBI_NS_NCBI::CUnionBuffer< TBoundary > m_Boundary
const TSite & GetSite(void) const
Get the variant data.
bool CanGetRegion(void) const
Check if it is safe to call GetRegion method.
bool CanGetModel_id(void) const
Check if it is safe to call GetModel_id method.
void Select(E_Choice index, EResetVariant reset, CObjectMemoryPool *pool)
Select the requested variant if needed, allocating CObject variants from memory pool.
TBoundary & SetBoundary(void)
Select the variant.
CRegion_pntrs_Base(const CRegion_pntrs_Base &)
const TModel_id & GetModel_id(void) const
Get the Model_id member data.
E_Choice Which(void) const
Which variant is currently selected.
void Select(E_Choice index, EResetVariant reset=eDoResetVariant)
Select the requested variant if needed.
DECLARE_INTERNAL_TYPE_INFO()
void * m_dummy_pointer_for_alignment
C_Region & operator=(const C_Region &)
bool IsSetRegion(void) const
Check if a value has been assigned to Region data member.
C_Region(const C_Region &)
TModel_id & SetModel_id(void)
Assign a value to Model_id data member.
bool IsSetModel_id(void) const
Check if a value has been assigned to Model_id data member.
Tparent::CMemberIndex< E_memberIndex, 3 > TmemberIndex
const TBoundary & GetBoundary(void) const
Get the variant data.
CRegion_pntrs_Base & operator=(const CRegion_pntrs_Base &)
void CheckSelected(E_Choice index) const
Verify selection, throw exception if it differs from the expected.
list< CRef< CRegion_coordinates > > TSite
bool IsSite(void) const
Check if variant Site is selected.
list< CRef< CRegion_boundary > > TBoundary
TRegion & SetRegion(void)
Assign a value to Region data member.
const GenericPointer< typename T::ValueType > T2 value