dmIStorageMap Class Reference

Implement methods for storing and retrieving numerical data. More...

#include <CCI_StorageMap.h>

Inherits dmINotify.

List of all members.

Public Member Functions

dm_real * GetCol (CONST char_t *name, dm_uint size)
 Return a pointer to a storage array.
bool Clear ()
 Clear all data (including headers).
bool Remove (CONST char_t *name)
 Remove specified column.
bool GetRow (cci_object *propertylist, dm_uint key, dm_uint row, CONST char_t *fmt=NULL)
 Return row values in a dmIPropertyList object.
bool SetRow (cci_object *propertylist, dm_uint key, dm_uint row)
 Set row values from a dmIPropertyList object.
bool GetCols (cci_object *stringlist)
 Return the list of column names.
bool AddRow (dm_uint count)
 Add count rows to all lists.
bool DeleteRow (dm_uint row)
 Delete rows index from all lists.
bool SetModified ()
 Send 'Modified' notification.
bool Export (cci_object *stringlist, const char_t *uri)
 Export data to file.
dm_real GetValue (const char_t *column, dm_uint row, dm_real dflt)
 Get value from column column at row.
bool SetValue (const char_t *column, dm_uint row, dm_real value)
 Set value from column column at row.
bool ResizeCol (const char_t *column, dm_uint newsize)
 Resize the column column to newsize.
bool SetCols (cci_object *stringlist, dm_uint minsize)
 Create columns.
bool ClearCol (const char_t *column)
 Set column size to zero.
bool PushValue (const char_t *column, dm_real value)
 Add a value to the column column.
bool Copy (cci_object *from, const char_t *srccol, const char_t *dstcol, dm_uint start, dm_uint end)
 Copy a range of data from a column to another.
bool Reserve (const char_t *column, dm_uint capacity)
 Create a zero sized column with a preallocated storage capacity.


Detailed Description

Implement methods for storing and retrieving numerical data.

The StorageMap interface expose methods for storing/retrieving list of numerical data by name.


Member Function Documentation

bool dmIStorageMap::ClearCol const char_t *  column  )  [inline]
 

Set column size to zero.

This method is a shortcut for ResizeCol(column,0);

dm_real* dmIStorageMap::GetCol CONST char_t *  name,
dm_uint  size
[inline]
 

Return a pointer to a storage array.

Parameters:
name name of the column or NULL
size number of data, if the column does not exists and size is non zero then the column is created
If the method succeed, it returns a pointer to the start of the column. Note that the first value (index 0) contains the size of the array.

bool dmIStorageMap::GetRow cci_object *  propertylist,
dm_uint  key,
dm_uint  row,
CONST char_t *  fmt = NULL
[inline]
 

Return row values in a dmIPropertyList object.

Parameters:
propertylist instance of a dmIPropertyList object
key the associated key
row row index
fmt printf like format for the stored values
The values will be stored as properties in the previously open section or sequence of the propertylist object.

bool dmIStorageMap::Remove CONST char_t *  name  )  [inline]
 

Remove specified column.

Parameters:
name name of the column or NULL

bool dmIStorageMap::ResizeCol const char_t *  column,
dm_uint  newsize
[inline]
 

Resize the column column to newsize.

Note:
The column will be created if it does not exists.

bool dmIStorageMap::SetCols cci_object *  stringlist,
dm_uint  minsize
[inline]
 

Create columns.

Parameters:
stringlist A list of columns to be created
minsize Minimum size of the specified columns.

bool dmIStorageMap::SetRow cci_object *  propertylist,
dm_uint  key,
dm_uint  row
[inline]
 

Set row values from a dmIPropertyList object.

Parameters:
propertylist instance of a dmIPropertyList object
key the associated key
row row index
The values will be inserted at row from the corresponding properties previously open section or sequence of the propertylist object.


Generated on Tue May 9 12:34:57 2006 for Daim Library Module Set by  doxygen 1.4.6-NO