SRGraphDynamicData Class
class SRGraphDynamicData
Manages the storage and manipulation of dynamic information in various formatsThe dynamic data buffer is an array of SRGDataBuffer unions.
Defined in: SRGDat.h
Class Members
Public member functions
virtual void Roll(double dValue=0.0,BOOL bDirection=FALSE)
Rolls dynamic data by shifting the memory blocks by one space
virtual void SetCyclic(BOOL b=TRUE)
Enables cycling of the buffer indices
virtual CScale GetHiLoData()
Interrogates the CScale object attached to a particular value
virtual BOOL SetInputPointer(UINT index)
Positions the input pointer within the buffer
virtual void ResetInputPointer()
Sets the input pointer to zero
virtual BOOL CheckInPointer()
Check validity of input pointer and grow the buffer if necessary and allowed
virtual UINT GetInputPointer()
Returns the current input pointer
virtual BOOL SetOutputPointer(UINT index)
Positions the output pointer within the buffer
virtual void ResetOutputPointer()
Resets the output pointer to zero
virtual UINT GetOutputPointer()
Returns the current output pointer
virtual BOOL GetHiLoFunction()
Determines whether the hi-lo gathering is enabled
virtual void SetHiLoFunction(BOOL b=TRUE)
Enables or disables the hi-lo gathering feature
virtual double GetValue(BOOL bLogData=FALSE)
Returns a value from the buffer -- the logarithmic value is available on request
virtual CString& GetAnnotation(int code)
Return the annotation for the buffer -- commonly overridden to supply text dependent on current index
virtual UINT GetBufferSize()
Interrogates the BufferSize member
virtual UINT GetGrowSize()
Interrogates the GrowSize member
virtual void SetGrowSize(UINT size)
Initializes the GrowSize member
Constructor
virtual ~SRGraphDynamicData()
Destructor
virtual BOOL IsDynamic()
Returns TRUE because this is a dynamic data storage object
virtual void SetBufferSize(UINT nSize)
Allocates or re-allocates a data buffer
virtual void SetValue(_TCHAR value)
Places a char value into the buffer
virtual void SetValue(int value)
Places an integer value into the buffer
virtual void SetValue(double value)
Places a double precision floating point value into the buffer
virtual UINT GetHighestValidIndex()
Returns the number of data items that have been initialized with SetValue()
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