41 #ifndef OBJECTS_SEQSPLIT_ID2S_SEQ_LOC_BASE_HPP
42 #define OBJECTS_SEQSPLIT_ID2S_SEQ_LOC_BASE_HPP
52 #ifndef BEGIN_objects_SCOPE
53 # define BEGIN_objects_SCOPE BEGIN_SCOPE(objects)
54 # define END_objects_SCOPE END_SCOPE(objects)
120 virtual void Reset(
void);
123 virtual void ResetSelection(
void);
129 E_Choice Which(
void)
const;
135 void CheckSelected(E_Choice index)
const;
141 NCBI_NORETURN
void ThrowInvalidSelection(E_Choice index)
const;
149 static string SelectionName(E_Choice index);
186 bool IsWhole_gi(
void)
const;
213 bool IsWhole_seq_id(
void)
const;
239 bool IsWhole_gi_range(
void)
const;
265 bool IsGi_interval(
void)
const;
291 bool IsSeq_id_interval(
void)
const;
317 bool IsGi_ints(
void)
const;
323 const TGi_ints& GetGi_ints(
void)
const;
343 bool IsSeq_id_ints(
void)
const;
369 bool IsLoc_set(
void)
const;
375 const TLoc_set& GetLoc_set(
void)
const;
393 static const char*
const sm_SelectionNames[];
ID2S-Seq-loc is used to represent unordered and unstranded set of intervals on set of sequences.
Base class for all serializable objects.
CStrictId< SStrictId_Gi, SStrictId_Gi::TId > TGi
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
bool IsSeq_id_ints(void) const
Check if variant Seq_id_ints is selected.
virtual void ResetSelection(void)
Reset the selection (set it to e_not_set).
bool IsWhole_seq_id(void) const
Check if variant Whole_seq_id is selected.
void Select(E_Choice index, EResetVariant reset=eDoResetVariant)
Select the requested variant if needed.
const TLoc_set & GetLoc_set(void) const
Get the variant data.
TLoc_set & SetLoc_set(void)
Select the variant.
void ThrowInvalidSelection(E_Choice index) const
Throw 'InvalidSelection' exception.
bool IsGi_ints(void) const
Check if variant Gi_ints is selected.
TWhole_gi GetWhole_gi(void) const
Get the variant data.
list< CRef< CID2S_Seq_loc > > TLoc_set
void CheckSelected(E_Choice index) const
Verify selection, throw exception if it differs from the expected.
NCBI_NS_NCBI::TGi TWhole_gi
void Select(E_Choice index, EResetVariant reset, CObjectMemoryPool *pool)
Select the requested variant if needed, allocating CObject variants from memory pool.
CID2S_Seq_id_Interval TSeq_id_interval
CID2S_Gi_Interval TGi_interval
void DoSelect(E_Choice index, CObjectMemoryPool *pool=0)
CID2S_Seq_loc_Base & operator=(const CID2S_Seq_loc_Base &)
NCBI_NS_NCBI::CUnionBuffer< TLoc_set > m_Loc_set
bool IsWhole_gi(void) const
Check if variant Whole_gi is selected.
bool IsLoc_set(void) const
Check if variant Loc_set is selected.
NCBI_NS_NCBI::CSerialObject * m_object
NCBI_NS_NCBI::CUnionBuffer< TLoc_set > m_Loc_set
CID2S_Seq_id_Ints TSeq_id_ints
DECLARE_INTERNAL_TYPE_INFO()
E_ChoiceStopper
Maximum+1 value of the choice variant enumerator.
TWhole_gi & SetWhole_gi(void)
Select the variant.
bool IsWhole_gi_range(void) const
Check if variant Whole_gi_range is selected.
bool IsSeq_id_interval(void) const
Check if variant Seq_id_interval is selected.
CID2S_Gi_Range TWhole_gi_range
CID2S_Seq_loc_Base(const CID2S_Seq_loc_Base &)
bool IsGi_interval(void) const
Check if variant Gi_interval is selected.
E_Choice Which(void) const
Which variant is currently selected.
@ e_Whole_gi
whole sequence by gi
@ e_Loc_set
combination of locations
@ e_Seq_id_ints
set of intervals on the same id
@ e_Whole_seq_id
whole sequence by Seq-id
@ e_Seq_id_interval
interval on sequence by Seq-id
@ e_Gi_ints
set of intervals on the same gi
@ e_Whole_gi_range
set of whole sequences by gis
@ e_Gi_interval
interval on sequence by gi
@ e_not_set
No variant selected.
const GenericPointer< typename T::ValueType > T2 value