Salome HOME
Implementation of Groups support by the SHAPER-STUDY module
[modules/shaper_study.git] / src / StudyData / StudyData_Object.h
index 99322f37c022a68919c23139d2a30e2b6355e4df..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;
 
+  // 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();
+  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:
-  std::string myStream; // the current stream of a shape
-  TopoDS_Shape myShape; // latest shape of this object
+  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
 };