SRGraphDynamicData Class

class SRGraphDynamicData

Manages the storage and manipulation of dynamic information in various formats
The dynamic data buffer is an array of SRGDataBuffer unions.

Defined in: SRGDat.h

Class Members

Public member functions

CHART_API virtual void Roll(double dValue=0.0,BOOL bDirection=FALSE)

Rolls dynamic data by shifting the memory blocks by one space

CHART_API virtual void SetCyclic(BOOL b=TRUE)

Enables cycling of the buffer indices

CHART_API virtual CScale GetHiLoData()

Interrogates the CScale object attached to a particular value

CHART_API virtual BOOL SetInputPointer(UINT index)

Positions the input pointer within the buffer

CHART_API virtual void ResetInputPointer()

Sets the input pointer to zero

CHART_API virtual BOOL CheckInPointer()

Check validity of input pointer and grow the buffer if necessary and allowed

CHART_API virtual UINT GetInputPointer()

Returns the current input pointer

CHART_API virtual BOOL SetOutputPointer(UINT index)

Positions the output pointer within the buffer

CHART_API virtual void ResetOutputPointer()

Resets the output pointer to zero

CHART_API virtual UINT GetOutputPointer()

Returns the current output pointer

CHART_API virtual BOOL GetHiLoFunction()

Determines whether the hi-lo gathering is enabled

CHART_API virtual void SetHiLoFunction(BOOL b=TRUE)

Enables or disables the hi-lo gathering feature

CHART_API virtual double GetValue(BOOL bLogData=FALSE)

Returns a value from the buffer -- the logarithmic value is available on request

CHART_API virtual CString& GetAnnotation(int code)

Return the annotation for the buffer -- commonly overridden to supply text dependent on current index

CHART_API virtual UINT GetBufferSize()

Interrogates the BufferSize member

CHART_API virtual UINT GetGrowSize()

Interrogates the GrowSize member

CHART_API virtual void SetGrowSize(UINT size)

Initializes the GrowSize member

CHART_API SRGraphDynamicData()

Constructor

CHART_API virtual ~SRGraphDynamicData()

Destructor

CHART_API virtual BOOL IsDynamic()

Returns TRUE because this is a dynamic data storage object

CHART_API virtual void SetBufferSize(UINT nSize)

Allocates or re-allocates a data buffer

CHART_API virtual void SetValue(_TCHAR value)

Places a char value into the buffer

CHART_API virtual void SetValue(int value)

Places an integer value into the buffer

CHART_API virtual void SetValue(double value)

Places a double precision floating point value into the buffer

CHART_API virtual UINT GetHighestValidIndex()

Returns the number of data items that have been initialized with SetValue()

CHART_API virtual void Serialize(CArchive &ar)

Manages storage and retrieval of this object

Protected data members

CScale* m_HiLoBuffer

Pointer to a block of CScale objects

BOOL m_bHiLo

Flag that signifies if hi-lo history gathering is required

int m_nDataType

Type of data (int,char or double) that this object stores

UINT m_nGrowSize

Size by which the buffer grows in case of overflow

BOOL m_bCyclic

TRUE if the buffer remains a fixed size and pointers recycle to the beginning

BOOL m_bReady

TRUE if this object has been properly initialized with a data buffer

UINT m_nBufferSize

Number of SRGDataBuffers in storage

UINT m_nOutIndex

Index of the output pointer

UINT m_nInIndex

Index of the input pointer

UINT m_nMaxValid

Number of initialized data items = highest initialized index+1

CString m_str

A handy string

SRGDataBuffer* m_pBuffer

Pointer to the stored data