41 #ifndef OBJECTS_GENERAL_INT_FUZZ_BASE_HPP
42 #define OBJECTS_GENERAL_INT_FUZZ_BASE_HPP
52 #ifndef BEGIN_objects_SCOPE
53 # define BEGIN_objects_SCOPE BEGIN_SCOPE(objects)
54 # define END_objects_SCOPE END_SCOPE(objects)
127 bool IsSetMax(
void)
const;
134 bool CanGetMax(
void)
const;
143 TMax GetMax(
void)
const;
164 bool IsSetMin(
void)
const;
171 bool CanGetMin(
void)
const;
180 TMin GetMin(
void)
const;
238 virtual void Reset(
void);
241 virtual void ResetSelection(
void);
247 E_Choice Which(
void)
const;
253 void CheckSelected(E_Choice index)
const;
259 NCBI_NORETURN
void ThrowInvalidSelection(E_Choice index)
const;
267 static string SelectionName(E_Choice index);
301 bool IsP_m(
void)
const;
307 TP_m GetP_m(
void)
const;
328 bool IsRange(
void)
const;
334 const TRange& GetRange(
void)
const;
354 bool IsPct(
void)
const;
360 TPct GetPct(
void)
const;
381 bool IsLim(
void)
const;
387 TLim GetLim(
void)
const;
408 bool IsAlt(
void)
const;
414 const TAlt& GetAlt(
void)
const;
432 static const char*
const sm_SelectionNames[];
438 NCBI_NS_NCBI::CUnionBuffer<TAlt>
m_Alt;
468 m_set_State[0] &= ~0x3;
484 m_set_State[0] |= 0x3;
495 m_set_State[0] |= 0x1;
502 return ((m_set_State[0] & 0xc) != 0);
515 m_set_State[0] &= ~0xc;
531 m_set_State[0] |= 0xc;
542 m_set_State[0] |= 0x4;
**** Int-fuzz ********************************************** * * uncertainties in integer values
Base class for all serializable objects.
unsigned int TSeqPos
Type for sequence locations and lengths.
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_GENERAL_EXPORT
bool IsPct(void) const
Check if variant Pct is selected.
DECLARE_INTERNAL_TYPE_INFO()
TMin & SetMin(void)
Assign a value to Min data member.
bool IsP_m(void) const
Check if variant P_m is selected.
bool IsLim(void) const
Check if variant Lim is selected.
E_ChoiceStopper
Maximum+1 value of the choice variant enumerator.
void ResetMin(void)
Reset Min data member.
C_Range & operator=(const C_Range &)
void Select(E_Choice index, EResetVariant reset=eDoResetVariant)
Select the requested variant if needed.
CInt_fuzz_Base(const CInt_fuzz_Base &)
TAlt & SetAlt(void)
Select the variant.
TPct GetPct(void) const
Get the variant data.
DECLARE_INTERNAL_TYPE_INFO()
bool IsSetMax(void) const
Check if a value has been assigned to Max data member.
NCBI_NS_NCBI::CUnionBuffer< TAlt > m_Alt
void Select(E_Choice index, EResetVariant reset, CObjectMemoryPool *pool)
Select the requested variant if needed, allocating CObject variants from memory pool.
void CheckSelected(E_Choice index) const
Verify selection, throw exception if it differs from the expected.
TLim GetLim(void) const
Get the variant data.
TP_m & SetP_m(void)
Select the variant.
virtual void ResetSelection(void)
Reset the selection (set it to e_not_set).
TMax & SetMax(void)
Assign a value to Max data member.
TMin GetMin(void) const
Get the Min member data.
void DoSelect(E_Choice index, CObjectMemoryPool *pool=0)
Tparent::CMemberIndex< E_memberIndex, 3 > TmemberIndex
NCBI_NS_NCBI::CUnionBuffer< TAlt > m_Alt
E_Choice Which(void) const
Which variant is currently selected.
TLim & SetLim(void)
Select the variant.
NCBI_NS_NCBI::CSerialObject * m_object
const TAlt & GetAlt(void) const
Get the variant data.
bool IsRange(void) const
Check if variant Range is selected.
TPct & SetPct(void)
Select the variant.
TMax GetMax(void) const
Get the Max member data.
TP_m GetP_m(void) const
Get the variant data.
void ThrowInvalidSelection(E_Choice index) const
Throw 'InvalidSelection' exception.
void ResetMax(void)
Reset Max data member.
bool CanGetMax(void) const
Check if it is safe to call GetMax method.
CInt_fuzz_Base & operator=(const CInt_fuzz_Base &)
bool CanGetMin(void) const
Check if it is safe to call GetMin method.
bool IsSetMin(void) const
Check if a value has been assigned to Min data member.
bool IsAlt(void) const
Check if variant Alt is selected.
@ e_not_set
No variant selected.
@ e_Pct
% plus or minus (x10) 0-1000
@ e_Alt
set of alternatives for the integer
@ e_P_m
plus or minus fixed amount
const GenericPointer< typename T::ValueType > T2 value