41 #ifndef OBJECTS_BIBLIO_CIT_ART_BASE_HPP
42 #define OBJECTS_BIBLIO_CIT_ART_BASE_HPP
48 #ifndef BEGIN_objects_SCOPE
49 # define BEGIN_objects_SCOPE BEGIN_SCOPE(objects)
50 # 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);
190 const TJournal& GetJournal(
void)
const;
210 bool IsBook(
void)
const;
216 const TBook& GetBook(
void)
const;
222 TBook& SetBook(
void);
236 bool IsProc(
void)
const;
242 const TProc& GetProc(
void)
const;
248 TProc& SetProc(
void);
265 static const char*
const sm_SelectionNames[];
296 bool IsSetTitle(
void)
const;
303 bool CanGetTitle(
void)
const;
306 void ResetTitle(
void);
334 bool IsSetAuthors(
void)
const;
341 bool CanGetAuthors(
void)
const;
344 void ResetAuthors(
void);
350 const TAuthors& GetAuthors(
void)
const;
371 bool IsSetFrom(
void)
const;
378 bool CanGetFrom(
void)
const;
381 void ResetFrom(
void);
387 const TFrom& GetFrom(
void)
const;
399 TFrom& SetFrom(
void);
409 bool IsSetIds(
void)
const;
416 bool CanGetIds(
void)
const;
440 virtual void Reset(
void);
474 if ( m_choice != index )
475 ThrowInvalidSelection(index);
484 DoSelect(index, pool);
491 Select(index, reset, 0);
497 return m_choice == e_Journal;
503 return m_choice == e_Book;
509 return m_choice == e_Proc;
587 return m_Ids.NotEmpty();
@Auth_list.hpp User-defined methods of the data storage class.
Citation Types article in journal or book.
Base class for all serializable objects.
void ThrowUnassigned(TMemberIndex index) const
NCBI_XOBJUTIL_EXPORT string GetTitle(const CBioseq_Handle &hnd, TGetTitleFlags flags=0)
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
bool IsProc(void) const
Check if variant Proc is selected.
TFrom & SetFrom(void)
Assign a value to From data member.
bool IsSetAuthors(void) const
authors (ANSI requires) Check if a value has been assigned to Authors data member.
DECLARE_INTERNAL_TYPE_INFO()
Tparent::CMemberIndex< E_memberIndex, 5 > TmemberIndex
const TFrom & GetFrom(void) const
Get the From member data.
void CheckSelected(E_Choice index) const
Verify selection, throw exception if it differs from the expected.
bool CanGetIds(void) const
Check if it is safe to call GetIds method.
bool IsSetTitle(void) const
title of paper (ANSI requires) Check if a value has been assigned to Title data member.
void Select(E_Choice index, EResetVariant reset=eDoResetVariant)
Select the requested variant if needed.
const TTitle & GetTitle(void) const
Get the Title member data.
void ResetFrom(void)
Reset From data member.
bool IsSetFrom(void) const
Check if a value has been assigned to From data member.
NCBI_NS_NCBI::CSerialObject * m_object
E_ChoiceStopper
Maximum+1 value of the choice variant enumerator.
E_Choice Which(void) const
Which variant is currently selected.
CCit_art_Base(const CCit_art_Base &)
DECLARE_INTERNAL_TYPE_INFO()
bool IsSetIds(void) const
lots of ids Check if a value has been assigned to Ids data member.
C_From & operator=(const C_From &)
bool IsBook(void) const
Check if variant Book is selected.
bool IsJournal(void) const
Check if variant Journal is selected.
CCit_art_Base & operator=(const CCit_art_Base &)
void Select(E_Choice index, EResetVariant reset, CObjectMemoryPool *pool)
Select the requested variant if needed, allocating CObject variants from memory pool.
const TIds & GetIds(void) const
Get the Ids member data.
CRef< TAuthors > m_Authors
bool CanGetAuthors(void) const
Check if it is safe to call GetAuthors method.
const TAuthors & GetAuthors(void) const
Get the Authors member data.
bool CanGetFrom(void) const
Check if it is safe to call GetFrom method.
bool CanGetTitle(void) const
Check if it is safe to call GetTitle method.
static bool IsJournal(const CPub &pub)
const GenericPointer< typename T::ValueType > T2 value
static bool GetIds(const T &d, set< string > &labels, const string name="", bool detect=false, bool found=false)
static void SetTitle(CRef< CSeq_entry > entry, string title)