41 #ifndef OBJECTS_SEQRES_SEQ_GRAPH_BASE_HPP
42 #define OBJECTS_SEQRES_SEQ_GRAPH_BASE_HPP
52 #ifndef BEGIN_objects_SCOPE
53 # define BEGIN_objects_SCOPE BEGIN_SCOPE(objects)
54 # define END_objects_SCOPE END_SCOPE(objects)
129 void ResetSelection(
void);
135 E_Choice Which(
void)
const;
141 void CheckSelected(E_Choice index)
const;
147 NCBI_NORETURN
void ThrowInvalidSelection(E_Choice index)
const;
155 static string SelectionName(E_Choice index);
187 bool IsReal(
void)
const;
193 const TReal& GetReal(
void)
const;
199 TReal& SetReal(
void);
213 bool IsInt(
void)
const;
219 const TInt& GetInt(
void)
const;
239 bool IsByte(
void)
const;
245 const TByte& GetByte(
void)
const;
251 TByte& SetByte(
void);
268 static const char*
const sm_SelectionNames[];
310 bool IsSetTitle(
void)
const;
317 bool CanGetTitle(
void)
const;
320 void ResetTitle(
void);
348 bool IsSetComment(
void)
const;
355 bool CanGetComment(
void)
const;
358 void ResetComment(
void);
364 const TComment& GetComment(
void)
const;
387 bool IsSetLoc(
void)
const;
394 bool CanGetLoc(
void)
const;
425 bool IsSetTitle_x(
void)
const;
432 bool CanGetTitle_x(
void)
const;
435 void ResetTitle_x(
void);
441 const TTitle_x& GetTitle_x(
void)
const;
463 bool IsSetTitle_y(
void)
const;
470 bool CanGetTitle_y(
void)
const;
473 void ResetTitle_y(
void);
479 const TTitle_y& GetTitle_y(
void)
const;
502 bool IsSetComp(
void)
const;
509 bool CanGetComp(
void)
const;
512 void ResetComp(
void);
518 TComp GetComp(
void)
const;
530 TComp& SetComp(
void);
540 bool IsSetA(
void)
const;
547 bool CanGetA(
void)
const;
578 bool IsSetB(
void)
const;
585 bool CanGetB(
void)
const;
616 bool IsSetNumval(
void)
const;
623 bool CanGetNumval(
void)
const;
626 void ResetNumval(
void);
653 bool IsSetGraph(
void)
const;
660 bool CanGetGraph(
void)
const;
663 void ResetGraph(
void);
669 const TGraph& GetGraph(
void)
const;
684 virtual void Reset(
void);
724 if ( m_choice != index )
725 ThrowInvalidSelection(index);
734 DoSelect(index, pool);
741 Select(index, reset, 0);
747 return m_choice == e_Real;
753 return m_choice == e_Int;
759 return m_choice == e_Byte;
859 return m_Loc.NotEmpty();
*** Sequence Graph ******************************** * * for values mapped by residue or range to sequ...
Base class for all serializable objects.
unsigned int TSeqPos
Type for sequence locations and lengths.
static char UnassignedByte(void)
void ThrowUnassigned(TMemberIndex index) const
static string UnassignedString(void)
NCBI_XOBJUTIL_EXPORT string GetTitle(const CBioseq_Handle &hnd, TGetTitleFlags flags=0)
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_SEQRES_EXPORT
bool CanGetComp(void) const
Check if it is safe to call GetComp method.
bool IsSetNumval(void) const
number of values in graph Check if a value has been assigned to Numval data member.
bool IsSetComp(void) const
compression (residues/value) Check if a value has been assigned to Comp data member.
bool CanGetTitle_y(void) const
Check if it is safe to call GetTitle_y method.
bool IsSetB(void) const
display = (a x value) + b Check if a value has been assigned to B data member.
bool IsSetLoc(void) const
region this applies to Check if a value has been assigned to Loc data member.
TTitle_y & SetTitle_y(void)
Assign a value to Title_y data member.
bool CanGetNumval(void) const
Check if it is safe to call GetNumval method.
bool CanGetComment(void) const
Check if it is safe to call GetComment method.
TLoc & SetLoc(void)
Assign a value to Loc data member.
bool IsSetComment(void) const
Check if a value has been assigned to Comment data member.
void ResetA(void)
Reset A data member.
bool CanGetA(void) const
Check if it is safe to call GetA method.
E_ChoiceStopper
Maximum+1 value of the choice variant enumerator.
bool IsSetA(void) const
for scaling values Check if a value has been assigned to A data member.
const TGraph & GetGraph(void) const
Get the Graph member data.
const TTitle & GetTitle(void) const
Get the Title member data.
bool CanGetTitle(void) const
Check if it is safe to call GetTitle method.
bool IsInt(void) const
Check if variant Int is selected.
bool CanGetTitle_x(void) const
Check if it is safe to call GetTitle_x method.
TB GetB(void) const
Get the B member data.
TTitle & SetTitle(void)
Assign a value to Title data member.
const TTitle_x & GetTitle_x(void) const
Get the Title_x member data.
void Select(E_Choice index, EResetVariant reset=eDoResetVariant)
Select the requested variant if needed.
bool CanGetLoc(void) const
Check if it is safe to call GetLoc method.
const TTitle_y & GetTitle_y(void) const
Get the Title_y member data.
void CheckSelected(E_Choice index) const
Verify selection, throw exception if it differs from the expected.
bool IsReal(void) const
Check if variant Real is selected.
TA & SetA(void)
Assign a value to A data member.
TTitle_x & SetTitle_x(void)
Assign a value to Title_x data member.
void ResetLoc(void)
Reset Loc data member.
C_Graph & operator=(const C_Graph &)
TComp & SetComp(void)
Assign a value to Comp data member.
TComment & SetComment(void)
Assign a value to Comment data member.
bool CanGetGraph(void) const
Check if it is safe to call GetGraph method.
bool IsByte(void) const
Check if variant Byte is selected.
E_Choice Which(void) const
Which variant is currently selected.
void Select(E_Choice index, EResetVariant reset, CObjectMemoryPool *pool)
Select the requested variant if needed, allocating CObject variants from memory pool.
DECLARE_INTERNAL_TYPE_INFO()
void ResetNumval(void)
Reset Numval data member.
TB & SetB(void)
Assign a value to B data member.
bool CanGetB(void) const
Check if it is safe to call GetB method.
void ResetComp(void)
Reset Comp data member.
TGraph & SetGraph(void)
Assign a value to Graph data member.
const TLoc & GetLoc(void) const
Get the Loc member data.
TNumval GetNumval(void) const
Get the Numval member data.
Tparent::CMemberIndex< E_memberIndex, 11 > TmemberIndex
TA GetA(void) const
Get the A member data.
bool IsSetTitle(void) const
Check if a value has been assigned to Title data member.
bool IsSetTitle_x(void) const
title for x-axis Check if a value has been assigned to Title_x data member.
bool IsSetGraph(void) const
Check if a value has been assigned to Graph data member.
const TComment & GetComment(void) const
Get the Comment member data.
CSeq_graph_Base(const CSeq_graph_Base &)
DECLARE_INTERNAL_TYPE_INFO()
TNumval & SetNumval(void)
Assign a value to Numval data member.
void ResetGraph(void)
Reset Graph data member.
void ResetB(void)
Reset B data member.
bool IsSetTitle_y(void) const
Check if a value has been assigned to Title_y data member.
TComp GetComp(void) const
Get the Comp member data.
CSeq_graph_Base & operator=(const CSeq_graph_Base &)
NCBI_NS_NCBI::CSerialObject * m_object
const GenericPointer< typename T::ValueType > T2 value
int GetLoc(const string &acc, const string &pat, CSeq_loc &loc, CScope &scope)
static void SetTitle(CRef< CSeq_entry > entry, string title)