41 #ifndef OBJECTS_MACRO_QUANTITY_CONSTRAINT_BASE_HPP
42 #define OBJECTS_MACRO_QUANTITY_CONSTRAINT_BASE_HPP
48 #ifndef BEGIN_objects_SCOPE
49 # define BEGIN_objects_SCOPE BEGIN_SCOPE(objects)
50 # define END_objects_SCOPE END_SCOPE(objects)
94 virtual void Reset(
void);
CQuantity_constraint_Base –.
Base class for all serializable objects.
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
void CheckSelected(E_Choice index) const
Verify selection, throw exception if it differs from the expected.
static const char *const sm_SelectionNames[]
CQuantity_constraint_Base(const CQuantity_constraint_Base &)
TEquals GetEquals(void) const
Get the variant data.
bool IsLess_than(void) const
Check if variant Less_than is selected.
void ThrowInvalidSelection(E_Choice index) const
Throw 'InvalidSelection' exception.
virtual ~CQuantity_constraint_Base(void)
virtual void ResetSelection(void)
Reset the selection (set it to e_not_set).
E_ChoiceStopper
Maximum+1 value of the choice variant enumerator.
void Select(E_Choice index, EResetVariant reset, CObjectMemoryPool *pool)
Select the requested variant if needed, allocating CObject variants from memory pool.
TLess_than GetLess_than(void) const
Get the variant data.
CQuantity_constraint_Base(void)
TGreater_than m_Greater_than
CQuantity_constraint_Base & operator=(const CQuantity_constraint_Base &)
E_Choice Which(void) const
Which variant is currently selected.
TGreater_than m_Greater_than
bool IsEquals(void) const
Check if variant Equals is selected.
static string SelectionName(E_Choice index)
Retrieve selection name (for diagnostic purposes).
TLess_than & SetLess_than(void)
Select the variant.
TEquals & SetEquals(void)
Select the variant.
DECLARE_INTERNAL_TYPE_INFO()
virtual void Reset(void)
Reset the whole object.
void Select(E_Choice index, EResetVariant reset=eDoResetVariant)
Select the requested variant if needed.
TGreater_than GetGreater_than(void) const
Get the variant data.
void DoSelect(E_Choice index, CObjectMemoryPool *pool=0)
TGreater_than & SetGreater_than(void)
Select the variant.
bool IsGreater_than(void) const
Check if variant Greater_than is selected.
@ e_not_set
No variant selected.
@ e_MaxChoice
== e_Less_than+1
const GenericPointer< typename T::ValueType > T2 value