41 #ifndef BUILD_SYSTEM_PROJECT_TREE_BUILDER_PLISTOBJECT_BASE_HPP
42 #define BUILD_SYSTEM_PROJECT_TREE_BUILDER_PLISTOBJECT_BASE_HPP
53 #ifndef BEGIN_objects_SCOPE
54 # define BEGIN_objects_SCOPE BEGIN_SCOPE(objects)
55 # define END_objects_SCOPE END_SCOPE(objects)
110 virtual void Reset(
void);
384 NCBI_NS_NCBI::CUnionBuffer<TData>
m_Data;
387 NCBI_NS_NCBI::CUnionBuffer<NCBI_NS_STD::string>
m_string;
Base class for all serializable objects.
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
TData & SetData(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.
NCBI_NS_NCBI::CUnionBuffer< TData > m_Data
TInteger & SetInteger(void)
Select the variant.
NCBI_NS_NCBI::CUnionBuffer< NCBI_NS_STD::string > m_string
void SetTrue(void)
Select the variant.
TReal GetReal(void) const
Get the variant data.
TDate & SetDate(void)
Select the variant.
CPlistObject_Base(const CPlistObject_Base &)
bool IsInteger(void) const
Check if variant Integer is selected.
bool IsArray(void) const
Check if variant Array is selected.
NCBI_NS_NCBI::CUnionBuffer< NCBI_NS_STD::string > m_string
static const char *const sm_SelectionNames[]
bool IsReal(void) const
Check if variant Real is selected.
TInteger GetInteger(void) const
Get the variant data.
bool IsString(void) const
Check if variant String is selected.
const TString & GetString(void) const
Get the variant data.
bool IsTrue(void) const
Check if variant True is selected.
bool IsDate(void) const
Check if variant Date is selected.
void CheckSelected(E_Choice index) const
Verify selection, throw exception if it differs from the expected.
virtual void Reset(void)
Reset the whole object.
bool IsDict(void) const
Check if variant Dict is selected.
TArray & SetArray(void)
Select the variant.
const TData & GetData(void) const
Get the variant data.
NCBI_NS_NCBI::CSerialObject * m_object
void ThrowInvalidSelection(E_Choice index) const
Throw 'InvalidSelection' exception.
E_Choice Which(void) const
Which variant is currently selected.
E_ChoiceStopper
Maximum+1 value of the choice variant enumerator.
DECLARE_INTERNAL_TYPE_INFO()
void DoSelect(E_Choice index, CObjectMemoryPool *pool=0)
virtual ~CPlistObject_Base(void)
TDict & SetDict(void)
Select the variant.
virtual void ResetSelection(void)
Reset the selection (set it to e_not_set).
NCBI_NS_NCBI::CUnionBuffer< TData > m_Data
const TDict & GetDict(void) const
Get the variant data.
void Select(E_Choice index, EResetVariant reset=eDoResetVariant)
Select the requested variant if needed.
void SetFalse(void)
Select the variant.
bool IsData(void) const
Check if variant Data is selected.
CPlistObject_Base & operator=(const CPlistObject_Base &)
bool IsFalse(void) const
Check if variant False is selected.
const TDate & GetDate(void) const
Get the variant data.
TString & SetString(void)
Select the variant.
const TArray & GetArray(void) const
Get the variant data.
static string SelectionName(E_Choice index)
Retrieve selection name (for diagnostic purposes).
TReal & SetReal(void)
Select the variant.
@ e_True
Boolean constant true.
@ e_Real
Contents should represent a floating point number matching ("+" | "-")? d+ ("."d*)?...
@ e_Date
Contents should conform to a subset of ISO 8601 (in particular, YYYY '-' MM '-' DD 'T' HH ':' MM ':' ...
@ e_not_set
No variant selected.
@ e_Integer
Contents should represent a (possibly signed) integer number in base 10.
@ e_False
Boolean constant false.
@ e_Data
Contents interpreted as Base-64 encoded.
@ e_MaxChoice
== e_False+1
const GenericPointer< typename T::ValueType > T2 value