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 #include "CAM_DataObject.h"
21 #include "CAM_Module.h"
22 #include "CAM_DataModel.h"
24 /*!Constructor. Sets parent object.*/
25 CAM_DataObject::CAM_DataObject( SUIT_DataObject* parent )
26 : SUIT_DataObject( parent )
30 /*!Destructor.Do nothing*/
31 CAM_DataObject::~CAM_DataObject()
36 *\retval const CAM_Module pointer - module
38 CAM_Module* CAM_DataObject::module() const
42 CAM_DataModel* data = dataModel();
50 *Return 0 - if no parent obbject.
51 *\retval const CAM_DataModel pointer - data model
53 CAM_DataModel* CAM_DataObject::dataModel() const
55 CAM_DataObject* parentObj = dynamic_cast<CAM_DataObject*>( parent() );
60 return parentObj->dataModel();