41 #ifndef OBJECTS_SEQFEAT_TRNA_EXT_BASE_HPP
42 #define OBJECTS_SEQFEAT_TRNA_EXT_BASE_HPP
52 #ifndef BEGIN_objects_SCOPE
53 # define BEGIN_objects_SCOPE BEGIN_SCOPE(objects)
54 # 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);
184 bool IsIupacaa(
void)
const;
211 bool IsNcbieaa(
void)
const;
238 bool IsNcbi8aa(
void)
const;
265 bool IsNcbistdaa(
void)
const;
295 static const char*
const sm_SelectionNames[];
328 bool IsSetAa(
void)
const;
335 bool CanGetAa(
void)
const;
344 const TAa& GetAa(
void)
const;
366 bool IsSetCodon(
void)
const;
373 bool CanGetCodon(
void)
const;
376 void ResetCodon(
void);
382 const TCodon& GetCodon(
void)
const;
398 bool IsSetAnticodon(
void)
const;
405 bool CanGetAnticodon(
void)
const;
408 void ResetAnticodon(
void);
429 virtual void Reset(
void);
462 if ( m_choice != index )
463 ThrowInvalidSelection(index);
472 DoSelect(index, pool);
479 Select(index, reset, 0);
485 return m_choice == e_Iupacaa;
491 CheckSelected(e_Iupacaa);
512 return m_choice == e_Ncbieaa;
518 CheckSelected(e_Ncbieaa);
539 return m_choice == e_Ncbi8aa;
545 CheckSelected(e_Ncbi8aa);
566 return m_choice == e_Ncbistdaa;
572 CheckSelected(e_Ncbistdaa);
593 return m_Aa.NotEmpty();
Base class for all serializable objects.
void ThrowUnassigned(TMemberIndex index) const
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
bool IsNcbistdaa(void) const
Check if variant Ncbistdaa is selected.
const TAnticodon & GetAnticodon(void) const
Get the Anticodon member data.
TIupacaa & SetIupacaa(void)
Select the variant.
void CheckSelected(E_Choice index) const
Verify selection, throw exception if it differs from the expected.
TNcbi8aa GetNcbi8aa(void) const
Get the variant data.
const TAa & GetAa(void) const
Get the Aa member data.
TNcbistdaa GetNcbistdaa(void) const
Get the variant data.
const TCodon & GetCodon(void) const
Get the Codon member data.
bool IsSetAa(void) const
Check if a value has been assigned to Aa data member.
bool IsNcbi8aa(void) const
Check if variant Ncbi8aa is selected.
bool IsSetAnticodon(void) const
location of anticodon Check if a value has been assigned to Anticodon data member.
bool IsIupacaa(void) const
Check if variant Iupacaa is selected.
bool IsNcbieaa(void) const
Check if variant Ncbieaa is selected.
void Select(E_Choice index, EResetVariant reset, CObjectMemoryPool *pool)
Select the requested variant if needed, allocating CObject variants from memory pool.
TNcbieaa & SetNcbieaa(void)
Select the variant.
CTrna_ext_Base(const CTrna_ext_Base &)
TCodon & SetCodon(void)
Assign a value to Codon data member.
TNcbieaa GetNcbieaa(void) const
Get the variant data.
void Select(E_Choice index, EResetVariant reset=eDoResetVariant)
Select the requested variant if needed.
bool IsSetCodon(void) const
codon(s) as in Genetic-code Check if a value has been assigned to Codon data member.
TIupacaa GetIupacaa(void) const
Get the variant data.
CRef< TAnticodon > m_Anticodon
CTrna_ext_Base & operator=(const CTrna_ext_Base &)
bool CanGetAnticodon(void) const
Check if it is safe to call GetAnticodon method.
TNcbistdaa & SetNcbistdaa(void)
Select the variant.
E_ChoiceStopper
Maximum+1 value of the choice variant enumerator.
TNcbi8aa & SetNcbi8aa(void)
Select the variant.
Tparent::CMemberIndex< E_memberIndex, 4 > TmemberIndex
DECLARE_INTERNAL_TYPE_INFO()
bool CanGetAa(void) const
Check if it is safe to call GetAa method.
DECLARE_INTERNAL_TYPE_INFO()
E_Choice Which(void) const
Which variant is currently selected.
bool CanGetCodon(void) const
Check if it is safe to call GetCodon method.
C_Aa & operator=(const C_Aa &)