#include <DataModel.hxx>
Public Member Functions | |
DataModel () | |
~DataModel () | |
virtual DataObject * | newDataObject ()=0 |
bool | addDataObject (DataObject *dataObject) |
bool | removeDataObject (string nameId) |
bool | removeDataObject (DataObject *dataObject) |
DataObject * | getDataObject (string nameId) |
map< string, DataObject * > ::iterator | begin () |
map< string, DataObject * > ::iterator | end () |
Private Attributes | |
map< string, DataObject * > | _mapDataObjects |
DataModel::DataModel | ( | ) |
DataModel::~DataModel | ( | ) |
References _mapDataObjects.
bool DataModel::addDataObject | ( | DataObject * | dataObject | ) |
Function to add data object to the model
References _mapDataObjects, and DataObject::getNameId().
map< string, DataObject * >::iterator DataModel::begin | ( | ) |
References _mapDataObjects.
map< string, DataObject * >::iterator DataModel::end | ( | ) |
References _mapDataObjects.
DataObject * DataModel::getDataObject | ( | string | nameId | ) |
Function to retrieve a data object in the model
References _mapDataObjects.
|
pure virtual |
This function can be used to create a specific instance of DataObject. Note that this function is a pure virtual method and then no default behavior is done. In particular, the newly created object is not automatically added to the data model. This behavior should be implemented in a dedicated version of this class.
Implemented in MyDataModel.
bool DataModel::removeDataObject | ( | string | nameId | ) |
Functions to remove data object from the model
References _mapDataObjects.
bool DataModel::removeDataObject | ( | DataObject * | dataObject | ) |
References DataObject::getNameId(), and removeDataObject().
|
private |