Base class for all data models used in CAM-based applications. More...
#include <CAM_DataModel.h>

Signals | |
| void | rootChanged (const CAM_DataModel *) | 
| Emitted when the root data object is changed.  More... | |
Public Member Functions | |
| CAM_DataModel (CAM_Module *) | |
| Constructor.  More... | |
| virtual | ~CAM_DataModel () | 
| Destructor.  More... | |
| virtual void | initialize () | 
| Initialize data model.  More... | |
| CAM_DataObject * | root () const | 
| Get data model root object.  More... | |
| CAM_Module * | module () const | 
| Get module.  More... | |
| virtual bool | open (const QString &, CAM_Study *, QStringList) | 
| Load data model.  More... | |
| virtual bool | save (QStringList &) | 
| Save data model.  More... | |
| virtual bool | saveAs (const QString &, CAM_Study *, QStringList &) | 
| Save data to the new file.  More... | |
| virtual bool | close () | 
| Close data model.  More... | |
| virtual bool | create (CAM_Study *) | 
| Create empty data model.  More... | |
Protected Member Functions | |
| virtual void | setRoot (const CAM_DataObject *) | 
| Set data model root object.  More... | |
Private Slots | |
| void | onDestroyed (SUIT_DataObject *) | 
| Called when data object is destroyed.  More... | |
Private Attributes | |
| CAM_DataObject * | myRoot | 
| root data object  More... | |
| CAM_Module * | myModule | 
| module  More... | |
Represents data model of the CAM module. Provides necessary interface (default implementation is empty).
| CAM_DataModel::CAM_DataModel | ( | CAM_Module * | module | ) | 
Initialise data module by specified module.
      
  | 
  virtual | 
Does nothing.
      
  | 
  virtual | 
This method should be re-implemented in the successor classes. Default implementation returns true.
true if data model is closed successfully Reimplemented in LightApp_DataModel, and SALOME_PYQT_DataModelLight.
      
  | 
  virtual | 
This method should be re-implemented in the successor classes. Default implementation returns true.
true if data model is created successfully Reimplemented in SalomeApp_DataModel, and SALOME_PYQT_DataModelLight.
      
  | 
  virtual | 
This method should be re-implemented in the successor classes and can be used for creation of root data object. Default implementation does nothing.
| CAM_Module * CAM_DataModel::module | ( | ) | const | 
References myModule.
      
  | 
  privateslot | 
Nullifies the root object if it is detroyed to avoid crashes.
| obj | object being destroyed | 
References myRoot.
This method should be re-implemented in the successor classes. Default implementation returns true.
| name | study name | 
| study | study | 
| files | list of file names from which data should be loaded | 
true if data model is loaded successfully Reimplemented in SalomeApp_DataModel, LightApp_DataModel, and SALOME_PYQT_DataModelLight.
| CAM_DataObject * CAM_DataModel::root | ( | ) | const | 
      
  | 
  signal | 
| root | new root data object | 
      
  | 
  virtual | 
This method should be re-implemented in the successor classes. Default implementation returns true.
| files | list of file names to which data should be saved | 
true if data model is saved successfully Reimplemented in LightApp_DataModel, and SALOME_PYQT_DataModelLight.
This method should be re-implemented in the successor classes. Default implementation returns true.
| name | study name | 
| study | study | 
| files | resulting list of file names to which data is saved | 
true if data model is saved successfully Reimplemented in LightApp_DataModel, and SALOME_PYQT_DataModelLight.
      
  | 
  protectedvirtual | 
This method should be used to specify custom root object instance.
Root object can be created in several ways, depending on application or module needs:
If root object is changed, this method emits rootChanged() signal.
| newRoot | new root object | 
References SUIT_DataObject::connect(), SUIT_DataObject::disconnect(), myRoot, onDestroyed(), and rootChanged().
      
  | 
  private | 
      
  | 
  private |