41 #ifndef OBJECTS_MACRO_ACTION_CHOICE_BASE_HPP
42 #define OBJECTS_MACRO_ACTION_CHOICE_BASE_HPP
48 #ifndef BEGIN_objects_SCOPE
49 # define BEGIN_objects_SCOPE BEGIN_SCOPE(objects)
50 # define END_objects_SCOPE END_SCOPE(objects)
110 virtual void Reset(
void);
CRemove_outside_action –.
Base class for all serializable objects.
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
bool IsSwap(void) const
Check if variant Swap is selected.
TParse & SetParse(void)
Select the variant.
TEdit & SetEdit(void)
Select the variant.
bool IsRemove_outside(void) const
Check if variant Remove_outside is selected.
void CheckSelected(E_Choice index) const
Verify selection, throw exception if it differs from the expected.
CAction_choice_Base & operator=(const CAction_choice_Base &)
bool IsCopy(void) const
Check if variant Copy is selected.
void Select(E_Choice index, EResetVariant reset=eDoResetVariant)
Select the requested variant if needed.
E_Choice Which(void) const
Which variant is currently selected.
const TConvert & GetConvert(void) const
Get the variant data.
bool IsEdit(void) const
Check if variant Edit is selected.
const TRemove & GetRemove(void) const
Get the variant data.
void Select(E_Choice index, EResetVariant reset, CObjectMemoryPool *pool)
Select the requested variant if needed, allocating CObject variants from memory pool.
static string SelectionName(E_Choice index)
Retrieve selection name (for diagnostic purposes).
virtual void ResetSelection(void)
Reset the selection (set it to e_not_set).
bool IsRemove(void) const
Check if variant Remove is selected.
virtual ~CAction_choice_Base(void)
TRemove & SetRemove(void)
Select the variant.
TApply & SetApply(void)
Select the variant.
bool IsConvert(void) const
Check if variant Convert is selected.
CAction_choice_Base(const CAction_choice_Base &)
virtual void Reset(void)
Reset the whole object.
E_ChoiceStopper
Maximum+1 value of the choice variant enumerator.
static const char *const sm_SelectionNames[]
DECLARE_INTERNAL_TYPE_INFO()
bool IsParse(void) const
Check if variant Parse is selected.
TConvert & SetConvert(void)
Select the variant.
NCBI_NS_NCBI::CSerialObject * m_object
const TParse & GetParse(void) const
Get the variant data.
TCopy & SetCopy(void)
Select the variant.
bool IsApply(void) const
Check if variant Apply is selected.
const TCopy & GetCopy(void) const
Get the variant data.
void ThrowInvalidSelection(E_Choice index) const
Throw 'InvalidSelection' exception.
TSwap & SetSwap(void)
Select the variant.
CAction_choice_Base(void)
const TRemove_outside & GetRemove_outside(void) const
Get the variant data.
const TEdit & GetEdit(void) const
Get the variant data.
TRemove_outside & SetRemove_outside(void)
Select the variant.
CRemove_outside_action TRemove_outside
void DoSelect(E_Choice index, CObjectMemoryPool *pool=0)
const TSwap & GetSwap(void) const
Get the variant data.
const TApply & GetApply(void) const
Get the variant data.
@ e_MaxChoice
== e_Remove_outside+1
@ e_not_set
No variant selected.
const GenericPointer< typename T::ValueType > T2 value