41 #ifndef OBJECTS_SEQALIGN_SCORE_BASE_HPP
42 #define OBJECTS_SEQALIGN_SCORE_BASE_HPP
48 #ifndef BEGIN_objects_SCOPE
49 # define BEGIN_objects_SCOPE BEGIN_SCOPE(objects)
50 # define END_objects_SCOPE END_SCOPE(objects)
118 void ResetSelection(
void);
124 E_Choice Which(
void)
const;
130 void CheckSelected(E_Choice index)
const;
136 NCBI_NORETURN
void ThrowInvalidSelection(E_Choice index)
const;
144 static string SelectionName(E_Choice index);
175 bool IsReal(
void)
const;
181 TReal GetReal(
void)
const;
187 TReal& SetReal(
void);
202 bool IsInt(
void)
const;
208 TInt GetInt(
void)
const;
232 static const char*
const sm_SelectionNames[];
261 bool IsSetId(
void)
const;
268 bool CanGetId(
void)
const;
298 bool IsSetValue(
void)
const;
305 bool CanGetValue(
void)
const;
308 void ResetValue(
void);
314 const TValue& GetValue(
void)
const;
323 virtual void Reset(
void);
357 if ( m_choice != index )
358 ThrowInvalidSelection(index);
367 DoSelect(index, pool);
374 Select(index, reset, 0);
380 return m_choice == e_Real;
386 CheckSelected(e_Real);
407 return m_choice == e_Int;
413 CheckSelected(e_Int);
434 return m_Id.NotEmpty();
use of Score is discouraged for external ASN.1 specifications
Base class for all serializable objects.
void ThrowUnassigned(TMemberIndex index) const
const CSeq_id & GetId(const CSeq_loc &loc, CScope *scope)
If all CSeq_ids embedded in CSeq_loc refer to the same CBioseq, returns the first CSeq_id found,...
virtual void DoNotDeleteThisObject(void)
Mark this object as not allocated in heap – do not delete this object.
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_SEQALIGN_EXPORT
void Select(E_Choice index, EResetVariant reset=eDoResetVariant)
Select the requested variant if needed.
bool IsSetId(void) const
Check if a value has been assigned to Id data member.
void CheckSelected(E_Choice index) const
Verify selection, throw exception if it differs from the expected.
DECLARE_INTERNAL_TYPE_INFO()
E_Choice Which(void) const
Which variant is currently selected.
TInt & SetInt(void)
Select the variant.
C_Value & operator=(const C_Value &)
TValue & SetValue(void)
Assign a value to Value data member.
bool IsReal(void) const
Check if variant Real is selected.
E_ChoiceStopper
Maximum+1 value of the choice variant enumerator.
TReal & SetReal(void)
Select the variant.
bool CanGetValue(void) const
Check if it is safe to call GetValue method.
CScore_Base & operator=(const CScore_Base &)
void Select(E_Choice index, EResetVariant reset, CObjectMemoryPool *pool)
Select the requested variant if needed, allocating CObject variants from memory pool.
CScore_Base(const CScore_Base &)
TInt GetInt(void) const
Get the variant data.
bool IsInt(void) const
Check if variant Int is selected.
DECLARE_INTERNAL_TYPE_INFO()
const TValue & GetValue(void) const
Get the Value member data.
bool CanGetId(void) const
Check if it is safe to call GetId method.
bool IsSetValue(void) const
Check if a value has been assigned to Value data member.
Tparent::CMemberIndex< E_memberIndex, 3 > TmemberIndex
TReal GetReal(void) const
Get the variant data.
const TId & GetId(void) const
Get the Id member data.