41 #ifndef OBJECTS_SEQLOC_SEQ_LOC_BASE_HPP
42 #define OBJECTS_SEQLOC_SEQ_LOC_BASE_HPP
48 #ifndef BEGIN_objects_SCOPE
49 # define BEGIN_objects_SCOPE BEGIN_SCOPE(objects)
50 # define END_objects_SCOPE END_SCOPE(objects)
116 virtual void Reset(
void);
119 virtual void ResetSelection(
void);
125 E_Choice Which(
void)
const;
131 void CheckSelected(E_Choice index)
const;
137 NCBI_NORETURN
void ThrowInvalidSelection(E_Choice index)
const;
145 static string SelectionName(E_Choice index);
183 bool IsNull(
void)
const;
195 bool IsEmpty(
void)
const;
201 const TEmpty& GetEmpty(
void)
const;
221 bool IsWhole(
void)
const;
227 const TWhole& GetWhole(
void)
const;
247 bool IsInt(
void)
const;
253 const TInt& GetInt(
void)
const;
273 bool IsPacked_int(
void)
const;
299 bool IsPnt(
void)
const;
305 const TPnt& GetPnt(
void)
const;
325 bool IsPacked_pnt(
void)
const;
351 bool IsMix(
void)
const;
357 const TMix& GetMix(
void)
const;
377 bool IsEquiv(
void)
const;
383 const TEquiv& GetEquiv(
void)
const;
403 bool IsBond(
void)
const;
409 const TBond& GetBond(
void)
const;
415 TBond& SetBond(
void);
429 bool IsFeat(
void)
const;
435 const TFeat& GetFeat(
void)
const;
441 TFeat& SetFeat(
void);
458 static const char*
const sm_SelectionNames[];
*** Sequence locations ********************************** *
Base class for all serializable objects.
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
#define NCBI_SEQLOC_EXPORT
bool IsMix(void) const
Check if variant Mix is selected.
void Select(E_Choice index, EResetVariant reset=eDoResetVariant)
Select the requested variant if needed.
bool IsEmpty(void) const
Check if variant Empty is selected.
void SetNull(void)
Select the variant.
bool IsFeat(void) const
Check if variant Feat is selected.
virtual void ResetSelection(void)
Reset the selection (set it to e_not_set).
CPacked_seqpnt TPacked_pnt
bool IsPacked_pnt(void) const
Check if variant Packed_pnt is selected.
bool IsEquiv(void) const
Check if variant Equiv is selected.
DECLARE_INTERNAL_TYPE_INFO()
E_Choice Which(void) const
Which variant is currently selected.
NCBI_NS_NCBI::CSerialObject * m_object
CPacked_seqint TPacked_int
bool IsBond(void) const
Check if variant Bond is selected.
E_ChoiceStopper
Maximum+1 value of the choice variant enumerator.
CSeq_loc_Base(const CSeq_loc_Base &)
void DoSelect(E_Choice index, CObjectMemoryPool *pool=0)
CSeq_loc_Base & operator=(const CSeq_loc_Base &)
bool IsPacked_int(void) const
Check if variant Packed_int is selected.
void Select(E_Choice index, EResetVariant reset, CObjectMemoryPool *pool)
Select the requested variant if needed, allocating CObject variants from memory pool.
bool IsWhole(void) const
Check if variant Whole is selected.
bool IsInt(void) const
Check if variant Int is selected.
void ThrowInvalidSelection(E_Choice index) const
Throw 'InvalidSelection' exception.
bool IsNull(void) const
Check if variant Null is selected.
bool IsPnt(void) const
Check if variant Pnt is selected.
void CheckSelected(E_Choice index) const
Verify selection, throw exception if it differs from the expected.
@ e_not_set
No variant selected.
@ e_Equiv
equivalent sets of locations
@ e_Empty
to NULL one Seq-id in a collection
@ e_Feat
indirect, through a Seq-feat
const GenericPointer< typename T::ValueType > T2 value