41 #ifndef OBJECTS_SEQALIGN_SEQ_ALIGN_BASE_HPP
42 #define OBJECTS_SEQALIGN_SEQ_ALIGN_BASE_HPP
53 #ifndef BEGIN_objects_SCOPE
54 # define BEGIN_objects_SCOPE BEGIN_SCOPE(objects)
55 # define END_objects_SCOPE END_SCOPE(objects)
150 void ResetSelection(
void);
156 E_Choice Which(
void)
const;
162 void CheckSelected(E_Choice index)
const;
168 NCBI_NORETURN
void ThrowInvalidSelection(E_Choice index)
const;
176 static string SelectionName(E_Choice index);
196 typedef list< CRef< CStd_seg > >
TStd;
212 bool IsDendiag(
void)
const;
218 const TDendiag& GetDendiag(
void)
const;
233 bool IsDenseg(
void)
const;
239 const TDenseg& GetDenseg(
void)
const;
259 bool IsStd(
void)
const;
265 const TStd& GetStd(
void)
const;
280 bool IsPacked(
void)
const;
286 const TPacked& GetPacked(
void)
const;
306 bool IsDisc(
void)
const;
312 const TDisc& GetDisc(
void)
const;
318 TDisc& SetDisc(
void);
332 bool IsSpliced(
void)
const;
338 const TSpliced& GetSpliced(
void)
const;
358 bool IsSparse(
void)
const;
364 const TSparse& GetSparse(
void)
const;
387 static const char*
const sm_SelectionNames[];
391 NCBI_NS_NCBI::CUnionBuffer<TStd>
m_Std;
401 typedef list< CRef< CObject_id > >
TId;
402 typedef list< CRef< CUser_object > >
TExt;
427 bool IsSetType(
void)
const;
434 bool CanGetType(
void)
const;
437 void ResetType(
void);
443 TType GetType(
void)
const;
455 TType& SetType(
void);
465 bool IsSetDim(
void)
const;
472 bool CanGetDim(
void)
const;
481 TDim GetDim(
void)
const;
503 bool IsSetScore(
void)
const;
510 bool CanGetScore(
void)
const;
513 void ResetScore(
void);
519 const TScore& GetScore(
void)
const;
534 bool IsSetSegs(
void)
const;
541 bool CanGetSegs(
void)
const;
544 void ResetSegs(
void);
550 const TSegs& GetSegs(
void)
const;
562 TSegs& SetSegs(
void);
573 bool IsSetBounds(
void)
const;
580 bool CanGetBounds(
void)
const;
583 void ResetBounds(
void);
589 const TBounds& GetBounds(
void)
const;
605 bool IsSetId(
void)
const;
612 bool CanGetId(
void)
const;
637 bool IsSetExt(
void)
const;
644 bool CanGetExt(
void)
const;
653 const TExt& GetExt(
void)
const;
662 virtual void Reset(
void);
677 list< CRef< CObject_id > >
m_Id;
699 if ( m_choice != index )
700 ThrowInvalidSelection(index);
709 DoSelect(index, pool);
716 Select(index, reset, 0);
722 return m_choice == e_Dendiag;
728 CheckSelected(e_Dendiag);
742 return m_choice == e_Denseg;
748 return m_choice == e_Std;
754 CheckSelected(e_Std);
768 return m_choice == e_Packed;
774 return m_choice == e_Disc;
780 return m_choice == e_Spliced;
786 return m_choice == e_Sparse;
Base class for all serializable objects.
static char UnassignedByte(void)
void ThrowUnassigned(TMemberIndex index) const
#define ENUM_METHOD_NAME(EnumName)
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.
#define NCBI_SEQALIGN_EXPORT
const TId & GetId(void) const
Get the Id member data.
TId & SetId(void)
Assign a value to Id data member.
TScore & SetScore(void)
Assign a value to Score data member.
TSegs & SetSegs(void)
Assign a value to Segs data member.
void Select(E_Choice index, EResetVariant reset=eDoResetVariant)
Select the requested variant if needed.
CSeq_align_Base & operator=(const CSeq_align_Base &)
NCBI_NS_NCBI::CUnionBuffer< TStd > m_Std
bool IsSetBounds(void) const
regions of sequence over which align was computed Check if a value has been assigned to Bounds data m...
E_Choice Which(void) const
Which variant is currently selected.
E_ChoiceStopper
Maximum+1 value of the choice variant enumerator.
TStd & SetStd(void)
Select the variant.
TType & SetType(void)
Assign a value to Type data member.
vector< CRef< CScore > > TScore
list< CRef< CStd_seg > > TStd
bool CanGetBounds(void) const
Check if it is safe to call GetBounds method.
bool IsSetId(void) const
alignment id Check if a value has been assigned to Id data member.
bool CanGetType(void) const
Check if it is safe to call GetType method.
bool IsSetExt(void) const
extra info Check if a value has been assigned to Ext data member.
void ResetSegs(void)
Reset Segs data member.
void ResetDim(void)
Reset Dim data member.
TDim GetDim(void) const
Get the Dim member data.
void CheckSelected(E_Choice index) const
Verify selection, throw exception if it differs from the expected.
list< CRef< CUser_object > > m_Ext
bool IsSetSegs(void) const
Check if a value has been assigned to Segs data member.
NCBI_NS_NCBI::CSerialObject * m_object
bool CanGetScore(void) const
Check if it is safe to call GetScore method.
vector< CRef< CScore > > m_Score
NCBI_NS_NCBI::CUnionBuffer< TDendiag > m_Dendiag
list< CRef< CObject_id > > TId
list< CRef< CUser_object > > TExt
bool IsPacked(void) const
Check if variant Packed is selected.
bool IsSparse(void) const
Check if variant Sparse is selected.
bool IsDendiag(void) const
Check if variant Dendiag is selected.
bool CanGetSegs(void) const
Check if it is safe to call GetSegs method.
list< CRef< CSeq_loc > > TBounds
bool IsSetType(void) const
Check if a value has been assigned to Type data member.
TExt & SetExt(void)
Assign a value to Ext data member.
TDendiag & SetDendiag(void)
Select the variant.
const TStd & GetStd(void) const
Get the variant data.
Tparent::CMemberIndex< E_memberIndex, 8 > TmemberIndex
DECLARE_INTERNAL_TYPE_INFO()
bool CanGetExt(void) const
Check if it is safe to call GetExt method.
bool CanGetDim(void) const
Check if it is safe to call GetDim method.
const TDendiag & GetDendiag(void) const
Get the variant data.
bool IsStd(void) const
Check if variant Std is selected.
void Select(E_Choice index, EResetVariant reset, CObjectMemoryPool *pool)
Select the requested variant if needed, allocating CObject variants from memory pool.
CSeq_align_Base(const CSeq_align_Base &)
bool IsDisc(void) const
Check if variant Disc is selected.
TType GetType(void) const
Get the Type member data.
TDim & SetDim(void)
Assign a value to Dim data member.
bool IsSetDim(void) const
dimensionality Check if a value has been assigned to Dim data member.
const TExt & GetExt(void) const
Get the Ext member data.
C_Segs & operator=(const C_Segs &)
bool IsSetScore(void) const
for whole alignment Check if a value has been assigned to Score data member.
bool IsSpliced(void) const
Check if variant Spliced is selected.
DECLARE_INTERNAL_TYPE_INFO()
const TScore & GetScore(void) const
Get the Score member data.
TBounds & SetBounds(void)
Assign a value to Bounds data member.
list< CRef< CDense_diag > > TDendiag
const TSegs & GetSegs(void) const
Get the Segs member data.
list< CRef< CSeq_loc > > m_Bounds
bool IsDenseg(void) const
Check if variant Denseg is selected.
const TBounds & GetBounds(void) const
Get the Bounds member data.
bool CanGetId(void) const
Check if it is safe to call GetId method.
void ResetType(void)
Reset Type data member.
list< CRef< CObject_id > > m_Id
const GenericPointer< typename T::ValueType > T2 value