41 #ifndef OBJECTS_SEQFEAT_ORGNAME_BASE_HPP
42 #define OBJECTS_SEQFEAT_ORGNAME_BASE_HPP
53 #ifndef BEGIN_objects_SCOPE
54 # define BEGIN_objects_SCOPE BEGIN_SCOPE(objects)
55 # define END_objects_SCOPE END_SCOPE(objects)
128 void ResetSelection(
void);
134 E_Choice Which(
void)
const;
140 void CheckSelected(E_Choice index)
const;
146 NCBI_NORETURN
void ThrowInvalidSelection(E_Choice index)
const;
154 static string SelectionName(E_Choice index);
188 bool IsBinomial(
void)
const;
194 const TBinomial& GetBinomial(
void)
const;
214 bool IsVirus(
void)
const;
220 const TVirus& GetVirus(
void)
const;
241 bool IsHybrid(
void)
const;
247 const THybrid& GetHybrid(
void)
const;
267 bool IsNamedhybrid(
void)
const;
293 bool IsPartial(
void)
const;
299 const TPartial& GetPartial(
void)
const;
322 static const char*
const sm_SelectionNames[];
325 NCBI_NS_NCBI::CUnionBuffer<NCBI_NS_STD::string>
m_string;
332 typedef list< CRef< COrgMod > >
TMod;
363 bool IsSetName(
void)
const;
370 bool CanGetName(
void)
const;
373 void ResetName(
void);
379 const TName& GetName(
void)
const;
391 TName& SetName(
void);
401 bool IsSetAttrib(
void)
const;
408 bool CanGetAttrib(
void)
const;
411 void ResetAttrib(
void);
417 const TAttrib& GetAttrib(
void)
const;
439 bool IsSetMod(
void)
const;
446 bool CanGetMod(
void)
const;
455 const TMod& GetMod(
void)
const;
471 bool IsSetLineage(
void)
const;
478 bool CanGetLineage(
void)
const;
481 void ResetLineage(
void);
487 const TLineage& GetLineage(
void)
const;
510 bool IsSetGcode(
void)
const;
517 bool CanGetGcode(
void)
const;
520 void ResetGcode(
void);
548 bool IsSetMgcode(
void)
const;
555 bool CanGetMgcode(
void)
const;
558 void ResetMgcode(
void);
586 bool IsSetDiv(
void)
const;
593 bool CanGetDiv(
void)
const;
602 const TDiv& GetDiv(
void)
const;
625 bool IsSetPgcode(
void)
const;
632 bool CanGetPgcode(
void)
const;
635 void ResetPgcode(
void);
656 virtual void Reset(
void);
694 if ( m_choice != index )
695 ThrowInvalidSelection(index);
704 DoSelect(index, pool);
711 Select(index, reset, 0);
717 return m_choice == e_Binomial;
723 return m_choice == e_Virus;
729 CheckSelected(e_Virus);
743 return m_choice == e_Hybrid;
749 return m_choice == e_Namedhybrid;
755 return m_choice == e_Partial;
1023 m_Div = std::forward<COrgName_Base::TDiv>(
value);
@OrgMod.hpp User-defined methods of the data storage class.
Base class for all serializable objects.
static char UnassignedByte(void)
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_SEQFEAT_EXPORT
const TMod & GetMod(void) const
Get the Mod member data.
bool CanGetMod(void) const
Check if it is safe to call GetMod method.
TDiv & SetDiv(void)
Assign a value to Div data member.
void Select(E_Choice index, EResetVariant reset=eDoResetVariant)
Select the requested variant if needed.
bool CanGetName(void) const
Check if it is safe to call GetName method.
const TLineage & GetLineage(void) const
Get the Lineage member data.
bool IsSetPgcode(void) const
plastid genetic code Check if a value has been assigned to Pgcode data member.
bool CanGetDiv(void) const
Check if it is safe to call GetDiv method.
const TDiv & GetDiv(void) const
Get the Div member data.
void ResetMgcode(void)
Reset Mgcode data member.
const TVirus & GetVirus(void) const
Get the variant data.
TMgcode GetMgcode(void) const
Get the Mgcode member data.
list< CRef< COrgMod > > m_Mod
E_Choice Which(void) const
Which variant is currently selected.
TGcode GetGcode(void) const
Get the Gcode member data.
bool IsHybrid(void) const
Check if variant Hybrid is selected.
C_Name & operator=(const C_Name &)
bool IsNamedhybrid(void) const
Check if variant Namedhybrid is selected.
TVirus & SetVirus(void)
Select the variant.
TMgcode & SetMgcode(void)
Assign a value to Mgcode data member.
bool IsSetLineage(void) const
lineage with semicolon separators Check if a value has been assigned to Lineage data member.
DECLARE_INTERNAL_TYPE_INFO()
bool IsPartial(void) const
Check if variant Partial is selected.
COrgName_Base & operator=(const COrgName_Base &)
void CheckSelected(E_Choice index) const
Verify selection, throw exception if it differs from the expected.
TLineage & SetLineage(void)
Assign a value to Lineage data member.
const TName & GetName(void) const
Get the Name member data.
bool IsSetMgcode(void) const
mitochondrial genetic code Check if a value has been assigned to Mgcode data member.
bool CanGetMgcode(void) const
Check if it is safe to call GetMgcode method.
TPgcode & SetPgcode(void)
Assign a value to Pgcode data member.
void ResetGcode(void)
Reset Gcode data member.
COrgName_Base(const COrgName_Base &)
void ResetPgcode(void)
Reset Pgcode data member.
bool CanGetLineage(void) const
Check if it is safe to call GetLineage method.
bool IsSetDiv(void) const
GenBank division code Check if a value has been assigned to Div data member.
bool IsSetMod(void) const
Check if a value has been assigned to Mod data member.
list< CRef< COrgMod > > TMod
CBinomialOrgName TNamedhybrid
bool IsSetAttrib(void) const
attribution of name Check if a value has been assigned to Attrib data member.
NCBI_NS_NCBI::CUnionBuffer< NCBI_NS_STD::string > m_string
bool CanGetAttrib(void) const
Check if it is safe to call GetAttrib method.
bool IsSetGcode(void) const
genetic code (see CdRegion) Check if a value has been assigned to Gcode data member.
TMod & SetMod(void)
Assign a value to Mod data member.
bool CanGetGcode(void) const
Check if it is safe to call GetGcode method.
DECLARE_INTERNAL_TYPE_INFO()
TAttrib & SetAttrib(void)
Assign a value to Attrib data member.
bool CanGetPgcode(void) const
Check if it is safe to call GetPgcode method.
Tparent::CMemberIndex< E_memberIndex, 9 > TmemberIndex
void Select(E_Choice index, EResetVariant reset, CObjectMemoryPool *pool)
Select the requested variant if needed, allocating CObject variants from memory pool.
TPgcode GetPgcode(void) const
Get the Pgcode member data.
bool IsSetName(void) const
Check if a value has been assigned to Name data member.
NCBI_NS_NCBI::CSerialObject * m_object
const TAttrib & GetAttrib(void) const
Get the Attrib member data.
TGcode & SetGcode(void)
Assign a value to Gcode data member.
CBinomialOrgName TBinomial
E_ChoiceStopper
Maximum+1 value of the choice variant enumerator.
bool IsVirus(void) const
Check if variant Virus is selected.
bool IsBinomial(void) const
Check if variant Binomial is selected.
@ e_Hybrid
hybrid between organisms
@ e_Namedhybrid
some hybrids have genus x species name
@ e_Binomial
genus/species type name
@ e_Virus
virus names are different
const GenericPointer< typename T::ValueType > T2 value
void SetPartial(CSeq_loc &loc, CRef< CSeq_feat > feat, CSeq_loc::TStrand strand, bool partial_start, bool partial_stop)
void SetDiv(CRef< objects::CSeq_entry > entry, string div)
void SetGcode(CRef< objects::CSeq_entry > entry, objects::COrgName::TGcode gcode)
void SetLineage(CRef< objects::CSeq_entry > entry, string lineage)