41 #ifndef OBJECTS_SEQFEAT_RNA_REF_BASE_HPP
42 #define OBJECTS_SEQFEAT_RNA_REF_BASE_HPP
52 #ifndef BEGIN_objects_SCOPE
53 # define BEGIN_objects_SCOPE BEGIN_SCOPE(objects)
54 # define END_objects_SCOPE END_SCOPE(objects)
147 void ResetSelection(
void);
153 E_Choice Which(
void)
const;
159 void CheckSelected(E_Choice index)
const;
165 NCBI_NORETURN
void ThrowInvalidSelection(E_Choice index)
const;
173 static string SelectionName(E_Choice index);
205 bool IsName(
void)
const;
211 const TName& GetName(
void)
const;
217 TName& SetName(
void);
232 bool IsTRNA(
void)
const;
238 const TTRNA& GetTRNA(
void)
const;
244 TTRNA& SetTRNA(
void);
258 bool IsGen(
void)
const;
264 const TGen& GetGen(
void)
const;
287 static const char*
const sm_SelectionNames[];
290 NCBI_NS_NCBI::CUnionBuffer<NCBI_NS_STD::string>
m_string;
318 bool IsSetType(
void)
const;
325 bool CanGetType(
void)
const;
328 void ResetType(
void);
334 TType GetType(
void)
const;
346 TType& SetType(
void);
355 bool IsSetPseudo(
void)
const;
362 bool CanGetPseudo(
void)
const;
365 void ResetPseudo(
void);
393 bool IsSetExt(
void)
const;
400 bool CanGetExt(
void)
const;
409 const TExt& GetExt(
void)
const;
424 virtual void Reset(
void);
457 if ( m_choice != index )
458 ThrowInvalidSelection(index);
467 DoSelect(index, pool);
474 Select(index, reset, 0);
480 return m_choice == e_Name;
486 CheckSelected(e_Name);
500 return m_choice == e_TRNA;
506 return m_choice == e_Gen;
606 return m_Ext.NotEmpty();
*** rnas *********************************************** * * various rnas * minimal RNA sequence
Base class for all serializable objects.
static char UnassignedByte(void)
void ThrowUnassigned(TMemberIndex index) const
#define ENUM_METHOD_NAME(EnumName)
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_SEQFEAT_EXPORT
CRNA_ref_Base(const CRNA_ref_Base &)
TName & SetName(void)
Select the variant.
C_Ext & operator=(const C_Ext &)
CRNA_ref_Base & operator=(const CRNA_ref_Base &)
TType GetType(void) const
Get the Type member data.
E_Choice Which(void) const
Which variant is currently selected.
bool IsTRNA(void) const
Check if variant TRNA is selected.
DECLARE_INTERNAL_TYPE_INFO()
Tparent::CMemberIndex< E_memberIndex, 4 > TmemberIndex
bool IsSetExt(void) const
generic fields for ncRNA, tmRNA, miscRNA Check if a value has been assigned to Ext data member.
void Select(E_Choice index, EResetVariant reset, CObjectMemoryPool *pool)
Select the requested variant if needed, allocating CObject variants from memory pool.
bool IsGen(void) const
Check if variant Gen is selected.
DECLARE_INTERNAL_TYPE_INFO()
TType & SetType(void)
Assign a value to Type data member.
void CheckSelected(E_Choice index) const
Verify selection, throw exception if it differs from the expected.
bool CanGetExt(void) const
Check if it is safe to call GetExt method.
void ResetType(void)
Reset Type data member.
TPseudo & SetPseudo(void)
Assign a value to Pseudo data member.
TPseudo GetPseudo(void) const
Get the Pseudo member data.
void Select(E_Choice index, EResetVariant reset=eDoResetVariant)
Select the requested variant if needed.
bool CanGetType(void) const
Check if it is safe to call GetType method.
bool IsSetType(void) const
Check if a value has been assigned to Type data member.
const TName & GetName(void) const
Get the variant data.
bool IsSetPseudo(void) const
Check if a value has been assigned to Pseudo data member.
void ResetPseudo(void)
Reset Pseudo data member.
NCBI_NS_NCBI::CUnionBuffer< NCBI_NS_STD::string > m_string
bool CanGetPseudo(void) const
Check if it is safe to call GetPseudo method.
const TExt & GetExt(void) const
Get the Ext member data.
E_ChoiceStopper
Maximum+1 value of the choice variant enumerator.
NCBI_NS_NCBI::CSerialObject * m_object
bool IsName(void) const
Check if variant Name is selected.
@ e_Name
for naming "other" type