41 #ifndef OBJECTS_MACRO_LOCATION_CHOICE_BASE_HPP
42 #define OBJECTS_MACRO_LOCATION_CHOICE_BASE_HPP
48 #ifndef BEGIN_objects_SCOPE
49 # define BEGIN_objects_SCOPE BEGIN_SCOPE(objects)
50 # define END_objects_SCOPE END_SCOPE(objects)
98 virtual void Reset(
void);
Base class for all serializable objects.
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
void ThrowInvalidSelection(E_Choice index) const
Throw 'InvalidSelection' exception.
virtual void ResetSelection(void)
Reset the selection (set it to e_not_set).
static string SelectionName(E_Choice index)
Retrieve selection name (for diagnostic purposes).
bool IsWhole_sequence(void) const
Check if variant Whole_sequence is selected.
virtual void Reset(void)
Reset the whole object.
void Select(E_Choice index, EResetVariant reset=eDoResetVariant)
Select the requested variant if needed.
CLocation_choice_Base & operator=(const CLocation_choice_Base &)
const TInterval & GetInterval(void) const
Get the variant data.
E_Choice Which(void) const
Which variant is currently selected.
TPoint GetPoint(void) const
Get the variant data.
void SetWhole_sequence(void)
Select the variant.
TInterval & SetInterval(void)
Select the variant.
void Select(E_Choice index, EResetVariant reset, CObjectMemoryPool *pool)
Select the requested variant if needed, allocating CObject variants from memory pool.
CLocation_interval TInterval
void CheckSelected(E_Choice index) const
Verify selection, throw exception if it differs from the expected.
TPoint & SetPoint(void)
Select the variant.
E_ChoiceStopper
Maximum+1 value of the choice variant enumerator.
CLocation_choice_Base(void)
void DoSelect(E_Choice index, CObjectMemoryPool *pool=0)
DECLARE_INTERNAL_TYPE_INFO()
bool IsPoint(void) const
Check if variant Point is selected.
NCBI_NS_NCBI::CSerialObject * m_object
CLocation_choice_Base(const CLocation_choice_Base &)
bool IsInterval(void) const
Check if variant Interval is selected.
static const char *const sm_SelectionNames[]
virtual ~CLocation_choice_Base(void)
@ e_not_set
No variant selected.
@ e_MaxChoice
== e_Point+1
const GenericPointer< typename T::ValueType > T2 value