1 // Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License.
8 // This library is distributed in the hope that it will be useful
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 // Lesser General Public License for more details.
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 // See http://www.salome-platform.org/
19 #ifndef CAM_ROOTOBJECT_H
20 #define CAM_ROOTOBJECT_H
22 #include "CAM_DataObject.h"
25 CAM_RootObject - class intended for optimized access to CAM_DataModel instance
26 from CAM_DataObject instances.
28 To take advantage of this class in a specific application,
29 custom data model root object class should be derived from both CAM_RootObject
30 and application-specific DataObject implementation using virtual inheritance.
32 class CAM_EXPORT CAM_RootObject : public virtual CAM_DataObject
35 CAM_RootObject( SUIT_DataObject* = 0 );
36 CAM_RootObject( CAM_DataModel*, SUIT_DataObject* = 0 );
37 virtual ~CAM_RootObject();
39 virtual QString name() const;
41 virtual CAM_DataModel* dataModel() const;
42 virtual void setDataModel( CAM_DataModel* );
45 CAM_DataModel* myDataModel;