41 #ifndef OBJECTS_PUB_PUB_BASE_HPP
42 #define OBJECTS_PUB_PUB_BASE_HPP
52 #ifndef BEGIN_objects_SCOPE
53 # define BEGIN_objects_SCOPE BEGIN_SCOPE(objects)
54 # define END_objects_SCOPE END_SCOPE(objects)
122 virtual void Reset(
void);
125 virtual void ResetSelection(
void);
131 E_Choice Which(
void)
const;
137 void CheckSelected(E_Choice index)
const;
143 NCBI_NORETURN
void ThrowInvalidSelection(E_Choice index)
const;
151 static string SelectionName(E_Choice index);
193 bool IsGen(
void)
const;
199 const TGen& GetGen(
void)
const;
219 bool IsSub(
void)
const;
225 const TSub& GetSub(
void)
const;
245 bool IsMedline(
void)
const;
251 const TMedline& GetMedline(
void)
const;
271 bool IsMuid(
void)
const;
277 TMuid GetMuid(
void)
const;
283 TMuid& SetMuid(
void);
298 bool IsArticle(
void)
const;
304 const TArticle& GetArticle(
void)
const;
330 const TJournal& GetJournal(
void)
const;
350 bool IsBook(
void)
const;
356 const TBook& GetBook(
void)
const;
362 TBook& SetBook(
void);
376 bool IsProc(
void)
const;
382 const TProc& GetProc(
void)
const;
388 TProc& SetProc(
void);
402 bool IsPatent(
void)
const;
408 const TPatent& GetPatent(
void)
const;
428 bool IsPat_id(
void)
const;
434 const TPat_id& GetPat_id(
void)
const;
454 bool IsMan(
void)
const;
460 const TMan& GetMan(
void)
const;
480 bool IsEquiv(
void)
const;
486 const TEquiv& GetEquiv(
void)
const;
506 bool IsPmid(
void)
const;
512 const TPmid& GetPmid(
void)
const;
518 TPmid& SetPmid(
void);
536 static const char*
const sm_SelectionNames[];
540 NCBI_NS_NCBI::CUnionBuffer<TPmid>
m_Pmid;
User-defined methods of the data storage class.
Base class for all serializable objects.
SStrictId_Entrez::TId TEntrezId
TEntrezId type for entrez ids which require the same strictness as TGi.
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
bool IsPmid(void) const
Check if variant Pmid is selected.
bool IsMedline(void) const
Check if variant Medline is selected.
TPmid & SetPmid(void)
Select the variant.
bool IsBook(void) const
Check if variant Book is selected.
void DoSelect(E_Choice index, CObjectMemoryPool *pool=0)
NCBI_NS_NCBI::CUnionBuffer< TPmid > m_Pmid
TMuid & SetMuid(void)
Select the variant.
const TPmid & GetPmid(void) const
Get the variant data.
void Select(E_Choice index, EResetVariant reset, CObjectMemoryPool *pool)
Select the requested variant if needed, allocating CObject variants from memory pool.
NCBI_NS_NCBI::TEntrezId TMuid
bool IsPat_id(void) const
Check if variant Pat_id is selected.
bool IsJournal(void) const
Check if variant Journal is selected.
DECLARE_INTERNAL_TYPE_INFO()
void CheckSelected(E_Choice index) const
Verify selection, throw exception if it differs from the expected.
CPub_Base(const CPub_Base &)
void Select(E_Choice index, EResetVariant reset=eDoResetVariant)
Select the requested variant if needed.
NCBI_NS_NCBI::CUnionBuffer< TPmid > m_Pmid
E_Choice Which(void) const
Which variant is currently selected.
bool IsEquiv(void) const
Check if variant Equiv is selected.
void ThrowInvalidSelection(E_Choice index) const
Throw 'InvalidSelection' exception.
bool IsProc(void) const
Check if variant Proc is selected.
NCBI_NS_NCBI::CSerialObject * m_object
bool IsSub(void) const
Check if variant Sub is selected.
virtual void ResetSelection(void)
Reset the selection (set it to e_not_set).
CPub_Base & operator=(const CPub_Base &)
TMuid GetMuid(void) const
Get the variant data.
bool IsPatent(void) const
Check if variant Patent is selected.
bool IsMuid(void) const
Check if variant Muid is selected.
bool IsArticle(void) const
Check if variant Article is selected.
bool IsGen(void) const
Check if variant Gen is selected.
E_ChoiceStopper
Maximum+1 value of the choice variant enumerator.
bool IsMan(void) const
Check if variant Man is selected.
@ e_Pat_id
identify a patent
@ e_Gen
general or generic unparsed
@ e_not_set
No variant selected.
@ e_Proc
proceedings of a meeting
@ e_Equiv
to cite a variety of ways
@ e_Man
manuscript, thesis, or letter
static bool IsJournal(const CPub &pub)