41 #ifndef OBJECTS_GENOMECOLL_GC_REPLICON_BASE_HPP
42 #define OBJECTS_GENOMECOLL_GC_REPLICON_BASE_HPP
53 #ifndef BEGIN_objects_SCOPE
54 # define BEGIN_objects_SCOPE BEGIN_SCOPE(objects)
55 # define END_objects_SCOPE END_SCOPE(objects)
125 void ResetSelection(
void);
131 E_Choice Which(
void)
const;
137 void CheckSelected(E_Choice index)
const;
143 NCBI_NORETURN
void ThrowInvalidSelection(E_Choice index)
const;
151 static string SelectionName(E_Choice index);
170 typedef list< CRef< CGC_Sequence > >
TSet;
182 bool IsSingle(
void)
const;
188 const TSingle& GetSingle(
void)
const;
208 bool IsSet(
void)
const;
214 const TSet& GetSet(
void)
const;
232 static const char*
const sm_SelectionNames[];
235 NCBI_NS_NCBI::CUnionBuffer<TSet>
m_Set;
265 bool IsSetName(
void)
const;
272 bool CanGetName(
void)
const;
275 void ResetName(
void);
281 const TName& GetName(
void)
const;
294 TName& SetName(
void);
304 bool IsSetLocal_name(
void)
const;
311 bool CanGetLocal_name(
void)
const;
314 void ResetLocal_name(
void);
342 bool IsSetSequence(
void)
const;
349 bool CanGetSequence(
void)
const;
352 void ResetSequence(
void);
373 virtual void Reset(
void);
406 if ( m_choice != index )
407 ThrowInvalidSelection(index);
416 DoSelect(index, pool);
423 Select(index, reset, 0);
429 return m_choice == e_Single;
435 return m_choice == e_Set;
441 CheckSelected(e_Set);
483 m_Name = std::forward<CGC_Replicon_Base::TName>(
value);
the sequence(s) representing this molecule in the case of 2L and 2R - the molecule is represented by ...
Base class for all serializable objects.
SBlastSequence GetSequence(const objects::CSeq_loc &sl, EBlastEncoding encoding, objects::CScope *scope, objects::ENa_strand strand=objects::eNa_strand_plus, ESentinelType sentinel=eSentinels, std::string *warnings=NULL)
Retrieves a sequence using the object manager.
void ThrowUnassigned(TMemberIndex index) const
static string UnassignedString(void)
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_GENOME_COLLECTION_EXPORT
bool IsSet(void) const
Check if variant Set is selected.
bool CanGetLocal_name(void) const
Check if it is safe to call GetLocal_name method.
const TName & GetName(void) const
Get the Name member data.
const TLocal_name & GetLocal_name(void) const
Get the Local_name member data.
CRef< TSequence > m_Sequence
bool IsSingle(void) const
Check if variant Single is selected.
TSet & SetSet(void)
Select the variant.
CGC_Replicon_Base & operator=(const CGC_Replicon_Base &)
E_Choice Which(void) const
Which variant is currently selected.
void Select(E_Choice index, EResetVariant reset, CObjectMemoryPool *pool)
Select the requested variant if needed, allocating CObject variants from memory pool.
Tparent::CMemberIndex< E_memberIndex, 4 > TmemberIndex
DECLARE_INTERNAL_TYPE_INFO()
void ResetSequence(void)
Reset Sequence data member.
CGC_Replicon_Base(const CGC_Replicon_Base &)
NCBI_NS_NCBI::CUnionBuffer< TSet > m_Set
C_Sequence & operator=(const C_Sequence &)
bool CanGetSequence(void) const
Check if it is safe to call GetSequence method.
bool IsSetName(void) const
name for this molecule the official name, Check if a value has been assigned to Name data member.
const TSequence & GetSequence(void) const
Get the Sequence member data.
NCBI_NS_NCBI::CSerialObject * m_object
bool IsSetLocal_name(void) const
If the chromosome has a different name in this assembly.
C_Sequence(const C_Sequence &)
bool IsSetSequence(void) const
Check if a value has been assigned to Sequence data member.
void Select(E_Choice index, EResetVariant reset=eDoResetVariant)
Select the requested variant if needed.
list< CRef< CGC_Sequence > > TSet
const TSet & GetSet(void) const
Get the variant data.
void CheckSelected(E_Choice index) const
Verify selection, throw exception if it differs from the expected.
TSequence & SetSequence(void)
Assign a value to Sequence data member.
bool CanGetName(void) const
Check if it is safe to call GetName method.
E_ChoiceStopper
Maximum+1 value of the choice variant enumerator.
TName & SetName(void)
Assign a value to Name data member.
DECLARE_INTERNAL_TYPE_INFO()
TLocal_name & SetLocal_name(void)
Assign a value to Local_name data member.
const GenericPointer< typename T::ValueType > T2 value