1 // Copyright (C) 2019-2020 CEA/DEN, EDF 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, or (at your option) any later version.
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/ or email : webmaster.salome@opencascade.com
20 #ifndef StudyData_Object_H
22 #include "StudyData.h"
24 #include <SALOMEconfig.h>
25 #include CORBA_SERVER_HEADER(GEOM_Gen)
27 #include <TopoDS_Shape.hxx>
30 class StudyData_EXPORT StudyData_Object
33 StudyData_Object(const std::string theFile);
38 std::string shapeStream() const;
39 std::string oldShapeStream() const;
41 // returns the stored shape
42 long long shape() const;
44 // updates the current shape if needed
45 void updateShape(const std::string theFile);
47 // returns the version number of the shape starting from 1
50 // sets the version number of the shape starting from 1
51 void setTick(const int theValue);
53 // sets the shape by the pointer to the TopoDS_Shape
54 void SetShapeByPointer(const long long theShape);
56 // returns the group shape related to the current selection in the group
57 long long groupShape(long long theMainShape, const std::list<long> theSelection);
60 std::string myStream, myOldStream; // the current and old stream of a shape
61 TopoDS_Shape myShape, myOldShape; // latest shape of this object and the old one
62 int myTick; // version index of the shape
65 #endif // !StudyData_Object_H