41 #ifndef OBJECTS_GENERAL_DATE_BASE_HPP
42 #define OBJECTS_GENERAL_DATE_BASE_HPP
52 #ifndef BEGIN_objects_SCOPE
53 # define BEGIN_objects_SCOPE BEGIN_SCOPE(objects)
54 # define END_objects_SCOPE END_SCOPE(objects)
137 virtual void Reset(
void);
140 virtual void ResetSelection(
void);
146 E_Choice Which(
void)
const;
152 void CheckSelected(E_Choice index)
const;
158 NCBI_NORETURN
void ThrowInvalidSelection(E_Choice index)
const;
166 static string SelectionName(E_Choice index);
197 bool IsStr(
void)
const;
203 const TStr& GetStr(
void)
const;
224 bool IsStd(
void)
const;
230 const TStd& GetStd(
void)
const;
253 static const char*
const sm_SelectionNames[];
256 NCBI_NS_NCBI::CUnionBuffer<NCBI_NS_STD::string>
m_string;
StringStore is really a VisibleString.
Base class for all serializable objects.
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
#define NCBI_GENERAL_EXPORT
E_ChoiceStopper
Maximum+1 value of the choice variant enumerator.
NCBI_NS_NCBI::CUnionBuffer< NCBI_NS_STD::string > m_string
virtual void ResetSelection(void)
Reset the selection (set it to e_not_set).
bool IsStd(void) const
Check if variant Std is selected.
NCBI_NS_NCBI::CUnionBuffer< NCBI_NS_STD::string > m_string
void Select(E_Choice index, EResetVariant reset, CObjectMemoryPool *pool)
Select the requested variant if needed, allocating CObject variants from memory pool.
NCBI_NS_NCBI::CSerialObject * m_object
CDate_Base(const CDate_Base &)
const TStr & GetStr(void) const
Get the variant data.
CDate_Base & operator=(const CDate_Base &)
void DoSelect(E_Choice index, CObjectMemoryPool *pool=0)
void ThrowInvalidSelection(E_Choice index) const
Throw 'InvalidSelection' exception.
void CheckSelected(E_Choice index) const
Verify selection, throw exception if it differs from the expected.
E_Choice Which(void) const
Which variant is currently selected.
DECLARE_INTERNAL_TYPE_INFO()
TStr & SetStr(void)
Select the variant.
void Select(E_Choice index, EResetVariant reset=eDoResetVariant)
Select the requested variant if needed.
bool IsStr(void) const
Check if variant Str is selected.
@ e_not_set
No variant selected.
@ e_Str
for those unparsed dates
@ e_Std
use this if you can
const GenericPointer< typename T::ValueType > T2 value