41 #ifndef OBJECTS_BIBLIO_AUTH_LIST_BASE_HPP
42 #define OBJECTS_BIBLIO_AUTH_LIST_BASE_HPP
54 #ifndef BEGIN_objects_SCOPE
55 # define BEGIN_objects_SCOPE BEGIN_SCOPE(objects)
56 # define END_objects_SCOPE END_SCOPE(objects)
126 void ResetSelection(
void);
132 E_Choice Which(
void)
const;
138 void CheckSelected(E_Choice index)
const;
144 NCBI_NORETURN
void ThrowInvalidSelection(E_Choice index)
const;
152 static string SelectionName(E_Choice index);
170 typedef list< CRef< CAuthor > >
TStd;
171 typedef list< string >
TMl;
184 bool IsStd(
void)
const;
190 const TStd& GetStd(
void)
const;
205 bool IsMl(
void)
const;
211 const TMl& GetMl(
void)
const;
226 bool IsStr(
void)
const;
232 const TStr& GetStr(
void)
const;
250 static const char*
const sm_SelectionNames[];
253 NCBI_NS_NCBI::CUnionBuffer<TStd>
m_Std;
254 NCBI_NS_NCBI::CUnionBuffer<TMl>
m_Ml;
255 NCBI_NS_NCBI::CUnionBuffer<TStr>
m_Str;
281 bool IsSetNames(
void)
const;
288 bool CanGetNames(
void)
const;
291 void ResetNames(
void);
297 const TNames& GetNames(
void)
const;
319 bool IsSetAffil(
void)
const;
326 bool CanGetAffil(
void)
const;
329 void ResetAffil(
void);
335 const TAffil& GetAffil(
void)
const;
350 virtual void Reset(
void);
383 if ( m_choice != index )
384 ThrowInvalidSelection(index);
393 DoSelect(index, pool);
400 Select(index, reset, 0);
406 return m_choice == e_Std;
412 CheckSelected(e_Std);
426 return m_choice == e_Ml;
446 return m_choice == e_Str;
452 CheckSelected(e_Str);
@Affil.hpp User-defined methods of the data storage class.
Base class for all serializable objects.
void ThrowUnassigned(TMemberIndex index) const
uint32_t Uint4
4-byte (32-bit) unsigned integer
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
#define NCBI_BIBLIO_EXPORT
C_Names & operator=(const C_Names &)
bool CanGetAffil(void) const
Check if it is safe to call GetAffil method.
TStd & SetStd(void)
Select the variant.
TMl & SetMl(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.
bool IsSetAffil(void) const
author affiliation Check if a value has been assigned to Affil data member.
void * m_dummy_pointer_for_alignment
void Select(E_Choice index, EResetVariant reset=eDoResetVariant)
Select the requested variant if needed.
TNames & SetNames(void)
Assign a value to Names data member.
const TAffil & GetAffil(void) const
Get the Affil member data.
void ResetNames(void)
Reset Names data member.
Tparent::CMemberIndex< E_memberIndex, 3 > TmemberIndex
NCBI_NS_NCBI::CUnionBuffer< TStr > m_Str
CAuth_list_Base(const CAuth_list_Base &)
NCBI_NS_NCBI::CDelayBuffer m_delay_Names
list< CRef< CAuthor > > TStd
bool IsSetNames(void) const
Check if a value has been assigned to Names data member.
bool CanGetNames(void) const
Check if it is safe to call GetNames method.
E_ChoiceStopper
Maximum+1 value of the choice variant enumerator.
CAuth_list_Base & operator=(const CAuth_list_Base &)
const TStr & GetStr(void) const
Get the variant data.
bool IsStr(void) const
Check if variant Str is selected.
void CheckSelected(E_Choice index) const
Verify selection, throw exception if it differs from the expected.
const TNames & GetNames(void) const
Get the Names member data.
NCBI_NS_NCBI::CUnionBuffer< TMl > m_Ml
bool IsMl(void) const
Check if variant Ml is selected.
const TStd & GetStd(void) const
Get the variant data.
DECLARE_INTERNAL_TYPE_INFO()
const TMl & GetMl(void) const
Get the variant data.
NCBI_NS_NCBI::CUnionBuffer< TStd > m_Std
DECLARE_INTERNAL_TYPE_INFO()
E_Choice Which(void) const
Which variant is currently selected.
TStr & SetStr(void)
Select the variant.
bool IsStd(void) const
Check if variant Std is selected.
@ e_Ml
MEDLINE, semi-structured.