41 #ifndef OBJECTS_SEQFEAT_DELTA_ITEM_BASE_HPP
42 #define OBJECTS_SEQFEAT_DELTA_ITEM_BASE_HPP
48 #ifndef BEGIN_objects_SCOPE
49 # define BEGIN_objects_SCOPE BEGIN_SCOPE(objects)
50 # define END_objects_SCOPE END_SCOPE(objects)
120 void ResetSelection(
void);
126 E_Choice Which(
void)
const;
132 void CheckSelected(E_Choice index)
const;
138 NCBI_NORETURN
void ThrowInvalidSelection(E_Choice index)
const;
146 static string SelectionName(E_Choice index);
177 bool IsLiteral(
void)
const;
183 const TLiteral& GetLiteral(
void)
const;
203 bool IsLoc(
void)
const;
228 bool IsThis(
void)
const;
243 static const char*
const sm_SelectionNames[];
253 eAction_ins_before = 3
285 bool IsSetSeq(
void)
const;
292 bool CanGetSeq(
void)
const;
301 const TSeq& GetSeq(
void)
const;
326 bool IsSetMultiplier(
void)
const;
333 bool CanGetMultiplier(
void)
const;
336 void ResetMultiplier(
void);
363 bool IsSetMultiplier_fuzz(
void)
const;
370 bool CanGetMultiplier_fuzz(
void)
const;
373 void ResetMultiplier_fuzz(
void);
400 bool IsSetAction(
void)
const;
407 bool CanGetAction(
void)
const;
410 void ResetAction(
void);
413 void SetDefaultAction(
void);
434 virtual void Reset(
void);
468 if ( m_choice != index )
469 ThrowInvalidSelection(index);
478 DoSelect(index, pool);
485 Select(index, reset, 0);
491 return m_choice == e_Literal;
497 return m_choice == e_Loc;
503 return m_choice == e_This;
515 return m_Seq.NotEmpty();
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
TAction GetAction(void) const
Get the Action member data.
NCBI_NS_NCBI::CSerialObject * m_object
bool CanGetMultiplier(void) const
Check if it is safe to call GetMultiplier method.
E_Choice Which(void) const
Which variant is currently selected.
const TMultiplier_fuzz & GetMultiplier_fuzz(void) const
Get the Multiplier_fuzz member data.
CDelta_item_Base(const CDelta_item_Base &)
void CheckSelected(E_Choice index) const
Verify selection, throw exception if it differs from the expected.
bool IsSetSeq(void) const
Check if a value has been assigned to Seq data member.
bool IsSetAction(void) const
Check if a value has been assigned to Action data member.
TAction & SetAction(void)
Assign a value to Action data member.
void Select(E_Choice index, EResetVariant reset=eDoResetVariant)
Select the requested variant if needed.
const TSeq & GetSeq(void) const
Get the Seq member data.
DECLARE_INTERNAL_TYPE_INFO()
void SetThis(void)
Select the variant.
void ResetAction(void)
Reset Action data member.
CDelta_item_Base & operator=(const CDelta_item_Base &)
E_ChoiceStopper
Maximum+1 value of the choice variant enumerator.
CInt_fuzz TMultiplier_fuzz
TMultiplier GetMultiplier(void) const
Get the Multiplier member data.
bool IsSetMultiplier_fuzz(void) const
Check if a value has been assigned to Multiplier_fuzz data member.
bool CanGetAction(void) const
Check if it is safe to call GetAction method.
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, 5 > TmemberIndex
bool IsLiteral(void) const
Check if variant Literal is selected.
TMultiplier & SetMultiplier(void)
Assign a value to Multiplier data member.
bool IsSetMultiplier(void) const
Multiplier allows representing a tandem, e.g.
void ResetMultiplier(void)
Reset Multiplier data member.
void SetDefaultAction(void)
Assign default value to Action data member.
bool CanGetMultiplier_fuzz(void) const
Check if it is safe to call GetMultiplier_fuzz method.
bool IsThis(void) const
Check if variant This is selected.
DECLARE_INTERNAL_TYPE_INFO()
bool IsLoc(void) const
Check if variant Loc is selected.
CRef< TMultiplier_fuzz > m_Multiplier_fuzz
bool CanGetSeq(void) const
Check if it is safe to call GetSeq method.
C_Seq & operator=(const C_Seq &)
@ eAction_morph
replace len(seq) positions starting with location.start with seq
int GetLoc(const string &acc, const string &pat, CSeq_loc &loc, CScope &scope)