return DataModel::get()->getGraphicObjectProperty(_pstID, _iName, _pvData);
}
- static void getGraphicObjectIntProperty(char const* _pstID, int _iName, void **_pvData)
- {
- return DataModel::get()->getGraphicObjectIntProperty(_pstID, _iName, _pvData);
- }
-
static char const* createDataObject(char const* _pstID, int _iType)
{
return DataModel::get()->createDataObject(_pstID, _iType);
/** Returns a graphic object vector property */
void getGraphicObjectProperty(char const* _pstID, int _iName, void **_pvData);
- /**
- * Returns a graphic object integer property
- * Implemented in order to avoid returning the address of a
- * static local variable across too many function calls (see the getProperty
- * methods of the different Data classes when integer values are returned)
- * Probably redundant with getGraphicObjectProperty
- */
- void getGraphicObjectIntProperty(char const* _pstID, int _iName, void **_pvData);
-
/** Creates a data object */
char const* createDataObject(char const* _pstID, int _iType);
dataObject->getDataProperty(property, _pvData);
}
-void DataModel::getGraphicObjectIntProperty(char const* _pstID, int _iName, void **_pvData)
-{
- Data3D* dataObject = NULL;
- int property = 0;
-
- property = (*m_dataMap)[std::string(_pstID)]->getPropertyFromName(_iName);
-
- dataObject->getDataProperty(property, _pvData);
-}
-
char const* DataModel::createDataObject(char const* _pstID, int _iType)
{
Data3D* newObject = NULL;
* (getTypeFromName) in order to avoid strcmp calls.
*/
- switch (_iType) {
- case __GO_GRAYPLOT__ :
- newObject = new NgonGridData();
- break;
- case __GO_MATPLOT__ :
- newObject = new NgonGridMatplotData();
- break;
- case __GO_FAC3D__ :
- newObject = new NgonGeneralData();
- break;
- case __GO_PLOT3D__ :
- newObject = new NgonGridData();
- break;
- case __GO_POLYLINE__ :
- newObject = new NgonPolylineData();
- break;
- case __GO_FEC__ :
- newObject = new TriangleMeshFecData();
- break;
- default :
- return NULL;
+ switch (_iType)
+ {
+ case __GO_GRAYPLOT__ :
+ newObject = new NgonGridData();
+ break;
+ case __GO_MATPLOT__ :
+ newObject = new NgonGridMatplotData();
+ break;
+ case __GO_FAC3D__ :
+ newObject = new NgonGeneralData();
+ break;
+ case __GO_PLOT3D__ :
+ newObject = new NgonGridData();
+ break;
+ case __GO_POLYLINE__ :
+ newObject = new NgonPolylineData();
+ break;
+ case __GO_FEC__ :
+ newObject = new TriangleMeshFecData();
+ break;
+ default :
+ return NULL;
}
(*m_dataMap)[std::string(_pstID)] = newObject;