The data structures of the data storage system can be manipulated using standard MFC methods. SRGDataManager::m_data is a CPtrList, the groups (SRGraphDataList) are CObLists, and the data (SRGraphData) are CObjects. The SRGraphDataList destructor automatically deletes all of its SRGraphData objects. Therefore, the code to delete group group would look something like this.
int nLastGroup=0; POSITION p=m_Graph.GetDataList()->GetHeadPosition(); while(nLastGroup<group) { m_Graph.GetDataList()->GetNext(p); nLastGroup++; } SRGraphDataList* pList=(SRGraphDataList *)m_Graph.GetDataList()-> GetAt(p); m_Graph.GetDataList()->RemoveAt(p); delete pList; InvalidateGroupPosition(); |
In order to speed up access to items in the data list, SRGraph and SRGraphDataList store the positions of the group and index that were most recently accessed. When the data lists are manipulated directly, these saved positions may become invalid. Call SRGraph::InvalidateGroupPosition() or SRGraphDataList::InvalidateIndexPosition() to ensure that these potentially invalid values are not used later.
Copyright © Rogue Wave Software, Inc. All Rights Reserved.
The Rogue Wave name and logo, and Stingray, are registered trademarks of Rogue Wave Software. All other trademarks are the property of their respective owners.
Provide feedback to Rogue Wave about its documentation.