41 #ifndef OBJECTS_SEQ_ANNOTDESC_BASE_HPP
42 #define OBJECTS_SEQ_ANNOTDESC_BASE_HPP
52 #ifndef BEGIN_objects_SCOPE
53 # define BEGIN_objects_SCOPE BEGIN_SCOPE(objects)
54 # define END_objects_SCOPE END_SCOPE(objects)
114 virtual void Reset(
void);
117 virtual void ResetSelection(
void);
123 E_Choice Which(
void)
const;
129 void CheckSelected(E_Choice index)
const;
135 NCBI_NORETURN
void ThrowInvalidSelection(E_Choice index)
const;
143 static string SelectionName(E_Choice index);
182 bool IsName(
void)
const;
188 const TName& GetName(
void)
const;
194 TName& SetName(
void);
209 bool IsTitle(
void)
const;
236 bool IsComment(
void)
const;
242 const TComment& GetComment(
void)
const;
263 bool IsPub(
void)
const;
269 const TPub& GetPub(
void)
const;
289 bool IsUser(
void)
const;
295 const TUser& GetUser(
void)
const;
301 TUser& SetUser(
void);
315 bool IsCreate_date(
void)
const;
341 bool IsUpdate_date(
void)
const;
367 bool IsSrc(
void)
const;
373 const TSrc& GetSrc(
void)
const;
393 bool IsAlign(
void)
const;
399 const TAlign& GetAlign(
void)
const;
419 bool IsRegion(
void)
const;
425 const TRegion& GetRegion(
void)
const;
448 static const char*
const sm_SelectionNames[];
451 NCBI_NS_NCBI::CUnionBuffer<NCBI_NS_STD::string>
m_string;
@Pubdesc.hpp User-defined methods of the data storage class.
Base class for all serializable objects.
NCBI_XOBJUTIL_EXPORT string GetTitle(const CBioseq_Handle &hnd, TGetTitleFlags flags=0)
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
TTitle & SetTitle(void)
Select the variant.
bool IsCreate_date(void) const
Check if variant Create_date is selected.
void CheckSelected(E_Choice index) const
Verify selection, throw exception if it differs from the expected.
E_ChoiceStopper
Maximum+1 value of the choice variant enumerator.
void ThrowInvalidSelection(E_Choice index) const
Throw 'InvalidSelection' exception.
void Select(E_Choice index, EResetVariant reset, CObjectMemoryPool *pool)
Select the requested variant if needed, allocating CObject variants from memory pool.
TName & SetName(void)
Select the variant.
E_Choice Which(void) const
Which variant is currently selected.
TComment & SetComment(void)
Select the variant.
bool IsComment(void) const
Check if variant Comment is selected.
bool IsRegion(void) const
Check if variant Region is selected.
void Select(E_Choice index, EResetVariant reset=eDoResetVariant)
Select the requested variant if needed.
DECLARE_INTERNAL_TYPE_INFO()
bool IsUpdate_date(void) const
Check if variant Update_date is selected.
void DoSelect(E_Choice index, CObjectMemoryPool *pool=0)
virtual void ResetSelection(void)
Reset the selection (set it to e_not_set).
bool IsUser(void) const
Check if variant User is selected.
const TTitle & GetTitle(void) const
Get the variant data.
bool IsSrc(void) const
Check if variant Src is selected.
NCBI_NS_NCBI::CUnionBuffer< NCBI_NS_STD::string > m_string
CAnnotdesc_Base(const CAnnotdesc_Base &)
CAnnotdesc_Base & operator=(const CAnnotdesc_Base &)
const TComment & GetComment(void) const
Get the variant data.
bool IsTitle(void) const
Check if variant Title is selected.
const TName & GetName(void) const
Get the variant data.
bool IsPub(void) const
Check if variant Pub is selected.
NCBI_NS_NCBI::CUnionBuffer< NCBI_NS_STD::string > m_string
bool IsAlign(void) const
Check if variant Align is selected.
bool IsName(void) const
Check if variant Name is selected.
NCBI_NS_NCBI::CSerialObject * m_object
@ e_Comment
a more extensive comment
@ e_Pub
a reference to the publication
@ e_Align
definition of the SeqAligns
@ e_Region
all contents cover this region
@ e_Update_date
date of last update
@ e_Create_date
date entry first created/released
@ e_Name
a short name for this collection
@ e_Title
a title for this collection
@ e_User
user defined object
@ e_Src
source sequence from which annot came
@ e_not_set
No variant selected.
const GenericPointer< typename T::ValueType > T2 value
static void SetTitle(CRef< CSeq_entry > entry, string title)