41 #ifndef OBJECTS_SEQSPLIT_ID2S_CHUNK_DATA_BASE_HPP
42 #define OBJECTS_SEQSPLIT_ID2S_CHUNK_DATA_BASE_HPP
52 #ifndef BEGIN_objects_SCOPE
53 # define BEGIN_objects_SCOPE BEGIN_SCOPE(objects)
54 # define END_objects_SCOPE END_SCOPE(objects)
128 void ResetSelection(
void);
134 E_Choice Which(
void)
const;
140 void CheckSelected(E_Choice index)
const;
146 NCBI_NORETURN
void ThrowInvalidSelection(E_Choice index)
const;
154 static string SelectionName(E_Choice index);
186 bool IsBioseq_set(
void)
const;
213 bool IsGi(
void)
const;
219 TGi GetGi(
void)
const;
240 bool IsSeq_id(
void)
const;
246 const TSeq_id& GetSeq_id(
void)
const;
269 static const char*
const sm_SelectionNames[];
282 typedef list< CRef< CID2S_Sequence_Piece > >
TSeq_map;
309 bool IsSetId(
void)
const;
316 bool CanGetId(
void)
const;
347 bool IsSetDescr(
void)
const;
354 bool CanGetDescr(
void)
const;
357 void ResetDescr(
void);
363 const TDescr& GetDescr(
void)
const;
385 bool IsSetAnnots(
void)
const;
392 bool CanGetAnnots(
void)
const;
395 void ResetAnnots(
void);
401 const TAnnots& GetAnnots(
void)
const;
417 bool IsSetAssembly(
void)
const;
424 bool CanGetAssembly(
void)
const;
427 void ResetAssembly(
void);
433 const TAssembly& GetAssembly(
void)
const;
449 bool IsSetSeq_map(
void)
const;
456 bool CanGetSeq_map(
void)
const;
459 void ResetSeq_map(
void);
465 const TSeq_map& GetSeq_map(
void)
const;
481 bool IsSetSeq_data(
void)
const;
488 bool CanGetSeq_data(
void)
const;
491 void ResetSeq_data(
void);
497 const TSeq_data& GetSeq_data(
void)
const;
513 bool IsSetBioseqs(
void)
const;
520 bool CanGetBioseqs(
void)
const;
523 void ResetBioseqs(
void);
529 const TBioseqs& GetBioseqs(
void)
const;
538 virtual void Reset(
void);
575 if ( m_choice != index )
576 ThrowInvalidSelection(index);
585 DoSelect(index, pool);
592 Select(index, reset, 0);
598 return m_choice == e_Bioseq_set;
604 CheckSelected(e_Bioseq_set);
619 m_Bioseq_set =
value;
625 return m_choice == e_Gi;
632 return reinterpret_cast<const TGi&
>(m_Gi);
639 return reinterpret_cast<TGi&
>(m_Gi);
646 reinterpret_cast<TGi&
>(m_Gi) =
value;
652 return m_choice == e_Seq_id;
658 return m_Id.NotEmpty();
@Seq_descr.hpp User-defined methods of the data storage class.
Base class for all serializable objects.
CStrictId< SStrictId_Gi, SStrictId_Gi::TId > TGi
void ThrowUnassigned(TMemberIndex index) const
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,...
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.
const TAssembly & GetAssembly(void) const
Get the Assembly member data.
void CheckSelected(E_Choice index) const
Verify selection, throw exception if it differs from the expected.
list< CRef< CID2S_Sequence_Piece > > TSeq_map
DECLARE_INTERNAL_TYPE_INFO()
list< CRef< CSeq_align > > TAssembly
bool IsSetBioseqs(void) const
Bioseq, for Bioseq-set Check if a value has been assigned to Bioseqs data member.
TGi & SetGi(void)
Select the variant.
TBioseq_set GetBioseq_set(void) const
Get the variant data.
TBioseqs & SetBioseqs(void)
Assign a value to Bioseqs data member.
bool CanGetAnnots(void) const
Check if it is safe to call GetAnnots method.
bool CanGetAssembly(void) const
Check if it is safe to call GetAssembly method.
E_Choice Which(void) const
Which variant is currently selected.
list< CRef< CSeq_align > > m_Assembly
bool IsSetSeq_map(void) const
sequence map, for Bioseq Check if a value has been assigned to Seq_map data member.
bool IsSetId(void) const
Check if a value has been assigned to Id data member.
E_ChoiceStopper
Maximum+1 value of the choice variant enumerator.
NCBI_NS_NCBI::CSerialObject * m_object
list< CRef< CID2S_Sequence_Piece > > m_Seq_data
TAnnots & SetAnnots(void)
Assign a value to Annots data member.
TId & SetId(void)
Assign a value to Id data member.
bool IsBioseq_set(void) const
Check if variant Bioseq_set is selected.
const TSeq_map & GetSeq_map(void) const
Get the Seq_map member data.
const TDescr & GetDescr(void) const
Get the Descr member data.
bool IsSetAssembly(void) const
assembly history Seq-align, for Bioseq Check if a value has been assigned to Assembly data member.
CID2S_Chunk_Data_Base & operator=(const CID2S_Chunk_Data_Base &)
bool CanGetSeq_data(void) const
Check if it is safe to call GetSeq_data method.
list< CRef< CID2S_Sequence_Piece > > m_Seq_map
const TAnnots & GetAnnots(void) const
Get the Annots member data.
TAssembly & SetAssembly(void)
Assign a value to Assembly data member.
void ResetId(void)
Reset Id data member.
DECLARE_INTERNAL_TYPE_INFO()
C_Id & operator=(const C_Id &)
const TSeq_data & GetSeq_data(void) const
Get the Seq_data member data.
bool IsSetAnnots(void) const
Seq-annot, for Bioseq and Bioseq-set Check if a value has been assigned to Annots data member.
list< CRef< CBioseq > > TBioseqs
bool IsSetSeq_data(void) const
sequence data, for Bioseq Check if a value has been assigned to Seq_data data member.
bool CanGetDescr(void) const
Check if it is safe to call GetDescr method.
bool IsGi(void) const
Check if variant Gi is selected.
bool IsSetDescr(void) const
Seq-descr, for Bioseq and Bioseq-set Check if a value has been assigned to Descr data member.
TSeq_map & SetSeq_map(void)
Assign a value to Seq_map data member.
bool CanGetBioseqs(void) const
Check if it is safe to call GetBioseqs method.
Tparent::CMemberIndex< E_memberIndex, 8 > TmemberIndex
TGi GetGi(void) const
Get the variant data.
const TBioseqs & GetBioseqs(void) const
Get the Bioseqs member data.
TBioseq_set & SetBioseq_set(void)
Select the variant.
bool CanGetId(void) const
Check if it is safe to call GetId method.
bool CanGetSeq_map(void) const
Check if it is safe to call GetSeq_map method.
list< CRef< CSeq_annot > > TAnnots
TSeq_data & SetSeq_data(void)
Assign a value to Seq_data data member.
list< CRef< CID2S_Sequence_Piece > > TSeq_data
list< CRef< CSeq_annot > > m_Annots
list< CRef< CBioseq > > m_Bioseqs
CID2S_Chunk_Data_Base(const CID2S_Chunk_Data_Base &)
void Select(E_Choice index, EResetVariant reset, CObjectMemoryPool *pool)
Select the requested variant if needed, allocating CObject variants from memory pool.
bool IsSeq_id(void) const
Check if variant Seq_id is selected.
void Select(E_Choice index, EResetVariant reset=eDoResetVariant)
Select the requested variant if needed.
const TId & GetId(void) const
Get the Id member data.
@ e_Bioseq_set
Bioseq-set id.
CBioseq_set_Info & GetBioseq_set(CTSE_Info &tse, const CBioObjectId &id)