Salome HOME
Implementation of Groups support by the SHAPER-STUDY module
[modules/shaper_study.git] / src / StudyData / StudyData_Object.h
index 22bc293213e7a3176f507d472a3116942b6d93fe..757db4688abf93bda2a0aca0581fb19d063e085b 100644 (file)
 #include CORBA_SERVER_HEADER(GEOM_Gen)
 
 #include <TopoDS_Shape.hxx>
+#include <list>
 
 class StudyData_EXPORT StudyData_Object
 {
 public:
   StudyData_Object(const std::string theFile);
+  StudyData_Object();
 
-  GEOM::shape_type type() const;
+  int type() const;
 
-  SALOMEDS::TMPFile* shapeStream() const;
+  std::string shapeStream() const;
+  std::string oldShapeStream() const;
 
-  CORBA::LongLong shape() const;
+  // returns the stored shape
+  long long shape() const;
+
+  // updates the current shape if needed
+  void updateShape(const std::string theFile);
+
+  // returns the version number of the shape starting from 1
+  int getTick() const;
+
+  // sets the version number of the shape starting from 1
+  void setTick(const int theValue);
+
+  // sets the shape by the pointer to the TopoDS_Shape
+  void SetShapeByPointer(const long long theShape);
+
+  // returns the group shape related to the current selection in the group
+  long long groupShape(long long theMainShape, const std::list<long> theSelection);
 
 private:
-  TopoDS_Shape myShape;
+  std::string myStream, myOldStream; // the current and old stream of a shape
+  TopoDS_Shape myShape, myOldShape; // latest shape of this object and the old one
+  int myTick; // version index of the shape
 };
 
 #endif // !StudyData_Object_H