SRGraphDataList Class

class SRGraphDataList: public CObList

Holds a linked list of  SRGraphData objects
This class is the top level data store for the  SRGraph class. The m_strAnnotation member of this class effectively names the graph.

Defined in: SRGDat.h

Example

For example:

SRGraphDataList <nl>
 m_strAnnotation (01),("January 1996") <nl>
SRGraphData <nl>
 m_Value 50,000 <nl>
 m_Annotation (01),("Capital expenditure") <nl>
SRGraphData <nl>
 m_Value 17,000 <nl>
 m_Annotation (01),("Wages") <nl>
SRGraphData <nl>
 m_Value 77,000 <nl>
 m_Annotation (01),("Gross Income") <nl>
SRGraphData <nl>
 m_Value 10,000 <nl>
 m_Annotation (01),("Profit") <nl>

Class Members

Public data members

SRGraphStyle  m_Style

Style information which may globally affect the styles of the whole list

SRGraphAnnotationList  m_strAnnotationList

Annotations for this data list

Member functions

virtual int  GetDataCount()

Returns the data item count

virtual SRGraphData *  NewIndex()

Creates a new data object and adds it to the list

virtual POSITION  SetIndex(SRGraphData *pData,int nIndex=-1)

Places a (already created) SRGraphData or derived object into the list

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

Rolls a data set forwards or backwards

virtual SRGraphAnnotationList *  GetAnnotationList()

Returns a pointer to the annotation list

virtual SRGraphStyle *  GetStyle()

Returns a pointer to this object's style member

virtual void  SetDynamic(BOOL b=TRUE)

Sets or resets the dynamic chart flag

 SRGraphDataList()

Default constructor

SRGraphDataList(LPCTSTR text,int code=01)

Constructor with annotation initialization

virtual  ~SRGraphDataList()

Destructor -- cleans up stored objects

virtual CString&  GetAnnotation(int code=1)

Retrieves annotations for this list -- used to fetch group headers

virtual void  Serialize(CArchive &ampar)

Handles storage and retrieval of the data

void  SetAnnotation(int code, LPCTSTR text)

Overload 1. Sets text in an annotation

void  SetAnnotation(LPCTSTR text, BOOL clear=FALSE, int code=1)

Overload 2. Sets text in an annotation

virtual SRGraphData *  GetIndex(int index,BOOL GrowList=TRUE)

Returns the requested SRGraphData object, possibly making the list grow if it is too short

virtual void  InvalidateIndexPosition()

Marks the position of the last index accessed as invalid

inline virtual BOOL  IsDynamic()

Interrogates the m_bDynamic member

void  Dump(CDumpContext &) const

Dumps the contents of this object to a CDumpContext

Protected data members

UINT  m_LastIndex

Last index for the speed-up code

POSITION  m_LastPos

Last position for the speed-up code

BOOL  m_bDynamic

Set TRUE when this list holds a single dynamic data object instead of a list of individual non-dynamic objects