41 #ifndef OBJECTS_BIBLIO_TITLE_BASE_HPP
42 #define OBJECTS_BIBLIO_TITLE_BASE_HPP
53 #ifndef BEGIN_objects_SCOPE
54 # define BEGIN_objects_SCOPE BEGIN_SCOPE(objects)
55 # define END_objects_SCOPE END_SCOPE(objects)
131 void ResetSelection(
void);
137 E_Choice Which(
void)
const;
143 void CheckSelected(E_Choice index)
const;
149 NCBI_NORETURN
void ThrowInvalidSelection(E_Choice index)
const;
157 static string SelectionName(E_Choice index);
196 bool IsName(
void)
const;
202 const TName& GetName(
void)
const;
208 TName& SetName(
void);
223 bool IsTsub(
void)
const;
229 const TTsub& GetTsub(
void)
const;
235 TTsub& SetTsub(
void);
250 bool IsTrans(
void)
const;
256 const TTrans& GetTrans(
void)
const;
277 bool IsJta(
void)
const;
283 const TJta& GetJta(
void)
const;
304 bool IsIso_jta(
void)
const;
310 const TIso_jta& GetIso_jta(
void)
const;
331 bool IsMl_jta(
void)
const;
337 const TMl_jta& GetMl_jta(
void)
const;
358 bool IsCoden(
void)
const;
364 const TCoden& GetCoden(
void)
const;
385 bool IsIssn(
void)
const;
391 const TIssn& GetIssn(
void)
const;
397 TIssn& SetIssn(
void);
412 bool IsAbr(
void)
const;
418 const TAbr& GetAbr(
void)
const;
439 bool IsIsbn(
void)
const;
445 const TIsbn& GetIsbn(
void)
const;
451 TIsbn& SetIsbn(
void);
469 static const char*
const sm_SelectionNames[];
472 NCBI_NS_NCBI::CUnionBuffer<NCBI_NS_STD::string>
m_string;
489 bool IsSet(
void)
const;
496 bool CanGet(
void)
const;
514 operator const Tdata& (void)
const;
516 operator Tdata& (void);
548 if ( m_choice != index )
549 ThrowInvalidSelection(index);
558 DoSelect(index, pool);
565 Select(index, reset, 0);
571 return m_choice == e_Name;
577 CheckSelected(e_Name);
591 return m_choice == e_Tsub;
597 CheckSelected(e_Tsub);
611 return m_choice == e_Trans;
617 CheckSelected(e_Trans);
631 return m_choice == e_Jta;
637 CheckSelected(e_Jta);
651 return m_choice == e_Iso_jta;
657 CheckSelected(e_Iso_jta);
671 return m_choice == e_Ml_jta;
677 CheckSelected(e_Ml_jta);
691 return m_choice == e_Coden;
697 CheckSelected(e_Coden);
711 return m_choice == e_Issn;
717 CheckSelected(e_Issn);
731 return m_choice == e_Abr;
737 CheckSelected(e_Abr);
751 return m_choice == e_Isbn;
757 CheckSelected(e_Isbn);
Base class for all serializable objects.
Title Group Valid for = A = Analytic (Cit-art) J = Journals (Cit-jour) B = Book (Cit-book) Valid for:
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_E & operator=(const C_E &)
TIsbn & SetIsbn(void)
Select the variant.
DECLARE_INTERNAL_TYPE_INFO()
TTsub & SetTsub(void)
Select the variant.
TJta & SetJta(void)
Select the variant.
list< CRef< C_E > > m_data
bool IsName(void) const
Check if variant Name is selected.
TMl_jta & SetMl_jta(void)
Select the variant.
bool CanGet(void) const
Check if it is safe to call Get method.
const TMl_jta & GetMl_jta(void) const
Get the variant data.
TTrans & SetTrans(void)
Select the variant.
const TIssn & GetIssn(void) const
Get the variant data.
void Select(E_Choice index, EResetVariant reset=eDoResetVariant)
Select the requested variant if needed.
TIssn & SetIssn(void)
Select the variant.
TIso_jta & SetIso_jta(void)
Select the variant.
NCBI_NS_NCBI::CUnionBuffer< NCBI_NS_STD::string > m_string
E_Choice Which(void) const
Which variant is currently selected.
bool IsCoden(void) const
Check if variant Coden is selected.
void Select(E_Choice index, EResetVariant reset, CObjectMemoryPool *pool)
Select the requested variant if needed, allocating CObject variants from memory pool.
list< CRef< C_E > > Tdata
const TCoden & GetCoden(void) const
Get the variant data.
const TName & GetName(void) const
Get the variant data.
const TIso_jta & GetIso_jta(void) const
Get the variant data.
TName & SetName(void)
Select the variant.
CTitle_Base & operator=(const CTitle_Base &)
const TJta & GetJta(void) const
Get the variant data.
TAbr & SetAbr(void)
Select the variant.
TCoden & SetCoden(void)
Select the variant.
const TAbr & GetAbr(void) const
Get the variant data.
bool IsAbr(void) const
Check if variant Abr is selected.
void CheckSelected(E_Choice index) const
Verify selection, throw exception if it differs from the expected.
bool IsJta(void) const
Check if variant Jta is selected.
void * m_dummy_pointer_for_alignment
const TIsbn & GetIsbn(void) const
Get the variant data.
bool IsIssn(void) const
Check if variant Issn is selected.
bool IsSet(void) const
Check if a value has been assigned to data member.
bool IsTrans(void) const
Check if variant Trans is selected.
const TTsub & GetTsub(void) const
Get the variant data.
bool IsIso_jta(void) const
Check if variant Iso_jta is selected.
bool IsMl_jta(void) const
Check if variant Ml_jta is selected.
E_ChoiceStopper
Maximum+1 value of the choice variant enumerator.
bool IsIsbn(void) const
Check if variant Isbn is selected.
const TTrans & GetTrans(void) const
Get the variant data.
const Tdata & Get(void) const
Get the member data.
bool IsTsub(void) const
Check if variant Tsub is selected.
DECLARE_INTERNAL_TYPE_INFO()
CTitle_Base(const CTitle_Base &)
Tdata & Set(void)
Assign a value to data member.
@ e_Ml_jta
specifically MEDLINE jta J
@ e_Trans
Title, Translated AJB.
@ e_Abr
Title, Abbreviated B.
@ e_Jta
Title, Abbreviated J.
@ e_Tsub
Title, Subordinate A B.
@ e_Iso_jta
specifically ISO jta J
@ e_Name
Title, Anal,Coll,Mono AJB.
const TYPE & Get(const CNamedParameterList *param)