41 #ifndef OBJECTS_SEQ_SEQ_ANNOT_BASE_HPP
42 #define OBJECTS_SEQ_SEQ_ANNOT_BASE_HPP
53 #ifndef BEGIN_objects_SCOPE
54 # define BEGIN_objects_SCOPE BEGIN_SCOPE(objects)
55 # define END_objects_SCOPE END_SCOPE(objects)
149 void ResetSelection(
void);
155 E_Choice Which(
void)
const;
161 void CheckSelected(E_Choice index)
const;
167 NCBI_NORETURN
void ThrowInvalidSelection(E_Choice index)
const;
175 static string SelectionName(E_Choice index);
194 typedef list< CRef< CSeq_align > >
TAlign;
195 typedef list< CRef< CSeq_graph > >
TGraph;
196 typedef list< CRef< CSeq_id > >
TIds;
197 typedef list< CRef< CSeq_loc > >
TLocs;
210 bool IsFtable(
void)
const;
216 const TFtable& GetFtable(
void)
const;
231 bool IsAlign(
void)
const;
237 const TAlign& GetAlign(
void)
const;
252 bool IsGraph(
void)
const;
258 const TGraph& GetGraph(
void)
const;
273 bool IsIds(
void)
const;
294 bool IsLocs(
void)
const;
300 const TLocs& GetLocs(
void)
const;
306 TLocs& SetLocs(
void);
315 bool IsSeq_table(
void)
const;
344 static const char*
const sm_SelectionNames[];
350 NCBI_NS_NCBI::CUnionBuffer<TIds>
m_Ids;
351 NCBI_NS_NCBI::CUnionBuffer<TLocs>
m_Locs;
356 typedef list< CRef< CAnnot_id > >
TId;
383 bool IsSetId(
void)
const;
390 bool CanGetId(
void)
const;
414 bool IsSetDb(
void)
const;
421 bool CanGetDb(
void)
const;
430 TDb GetDb(
void)
const;
452 bool IsSetName(
void)
const;
459 bool CanGetName(
void)
const;
462 void ResetName(
void);
468 const TName& GetName(
void)
const;
481 TName& SetName(
void);
491 bool IsSetDesc(
void)
const;
498 bool CanGetDesc(
void)
const;
501 void ResetDesc(
void);
507 const TDesc& GetDesc(
void)
const;
519 TDesc& SetDesc(
void);
528 bool IsSetData(
void)
const;
535 bool CanGetData(
void)
const;
538 void ResetData(
void);
544 const TData& GetData(
void)
const;
556 TData& SetData(
void);
559 virtual void Reset(
void);
569 list< CRef< CAnnot_id > >
m_Id;
594 if ( m_choice != index )
595 ThrowInvalidSelection(index);
604 DoSelect(index, pool);
611 Select(index, reset, 0);
617 return m_choice == e_Ftable;
623 CheckSelected(e_Ftable);
637 return m_choice == e_Align;
643 CheckSelected(e_Align);
657 return m_choice == e_Graph;
663 CheckSelected(e_Graph);
677 return m_choice == e_Ids;
683 CheckSelected(e_Ids);
697 return m_choice == e_Locs;
703 CheckSelected(e_Locs);
717 return m_choice == e_Seq_table;
823 m_Name = std::forward<CSeq_annot_Base::TName>(
value);
namespace ncbi::objects::
Base class for all serializable objects.
static char UnassignedByte(void)
void ThrowUnassigned(TMemberIndex index) const
#define ENUM_METHOD_NAME(EnumName)
static string UnassignedString(void)
const CSeq_id & GetId(const CSeq_loc &loc, CScope *scope)
If all CSeq_ids embedded in CSeq_loc refer to the same CBioseq, returns the first CSeq_id found,...
bool NotEmpty(void) const THROWS_NONE
Check if CRef is not empty – pointing to an object and has a non-null value.
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.
TAlign & SetAlign(void)
Select the variant.
list< CRef< CAnnot_id > > m_Id
TName & SetName(void)
Assign a value to Name data member.
bool IsAlign(void) const
Check if variant Align is selected.
void Select(E_Choice index, EResetVariant reset=eDoResetVariant)
Select the requested variant if needed.
E_ChoiceStopper
Maximum+1 value of the choice variant enumerator.
bool CanGetId(void) const
Check if it is safe to call GetId method.
list< CRef< CSeq_id > > TIds
const TGraph & GetGraph(void) const
Get the variant data.
const TLocs & GetLocs(void) const
Get the variant data.
list< CRef< CSeq_graph > > TGraph
void ResetDb(void)
Reset Db data member.
TFtable & SetFtable(void)
Select the variant.
const TName & GetName(void) const
Get the Name member data.
list< CRef< CAnnot_id > > TId
bool IsSetName(void) const
source if "other" above Check if a value has been assigned to Name data member.
DECLARE_INTERNAL_TYPE_INFO()
Tparent::CMemberIndex< E_memberIndex, 6 > TmemberIndex
bool IsSetData(void) const
Check if a value has been assigned to Data data member.
list< CRef< CSeq_align > > TAlign
void ResetData(void)
Reset Data data member.
const TIds & GetIds(void) const
Get the variant data.
TDb & SetDb(void)
Assign a value to Db data member.
bool IsSetDb(void) const
Check if a value has been assigned to Db data member.
const TDesc & GetDesc(void) const
Get the Desc member data.
bool CanGetDesc(void) const
Check if it is safe to call GetDesc method.
bool IsSetDesc(void) const
used only for stand alone Seq-annots Check if a value has been assigned to Desc data member.
NCBI_NS_NCBI::CUnionBuffer< TAlign > m_Align
const TAlign & GetAlign(void) const
Get the variant data.
DECLARE_INTERNAL_TYPE_INFO()
bool IsSetId(void) const
Check if a value has been assigned to Id data member.
TDb GetDb(void) const
Get the Db member data.
bool IsGraph(void) const
Check if variant Graph is selected.
TGraph & SetGraph(void)
Select the variant.
const TId & GetId(void) const
Get the Id member data.
list< CRef< CSeq_loc > > TLocs
const TFtable & GetFtable(void) const
Get the variant data.
NCBI_NS_NCBI::CUnionBuffer< TGraph > m_Graph
list< CRef< CSeq_feat > > TFtable
bool IsFtable(void) const
Check if variant Ftable is selected.
const TData & GetData(void) const
Get the Data member data.
TLocs & SetLocs(void)
Select the variant.
NCBI_NS_NCBI::CUnionBuffer< TIds > m_Ids
TData & SetData(void)
Assign a value to Data data member.
NCBI_NS_NCBI::CUnionBuffer< TLocs > m_Locs
void Select(E_Choice index, EResetVariant reset, CObjectMemoryPool *pool)
Select the requested variant if needed, allocating CObject variants from memory pool.
bool CanGetDb(void) const
Check if it is safe to call GetDb method.
TId & SetId(void)
Assign a value to Id data member.
C_Data & operator=(const C_Data &)
bool IsSeq_table(void) const
Check if variant Seq_table is selected.
TIds & SetIds(void)
Select the variant.
void CheckSelected(E_Choice index) const
Verify selection, throw exception if it differs from the expected.
bool IsIds(void) const
Check if variant Ids is selected.
bool CanGetName(void) const
Check if it is safe to call GetName method.
bool CanGetData(void) const
Check if it is safe to call GetData method.
E_Choice Which(void) const
Which variant is currently selected.
NCBI_NS_NCBI::CUnionBuffer< TFtable > m_Ftable
CSeq_annot_Base(const CSeq_annot_Base &)
NCBI_NS_NCBI::CSerialObject * m_object
bool IsLocs(void) const
Check if variant Locs is selected.
CSeq_annot_Base & operator=(const CSeq_annot_Base &)
@ e_Ids
used for communication between tools
@ e_Locs
used for communication between tools
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)