Salome HOME
Copyright update 2021
[modules/shaper_study.git] / src / StudyData / StudyData_Object.h
index 99322f37c022a68919c23139d2a30e2b6355e4df..27f610574b3099b17265ac251d6da5eb52c80619 100644 (file)
@@ -1,7 +1,4 @@
-// Copyright (C) 2007-2019  CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+// Copyright (C) 2019-2021  CEA/DEN, EDF R&D
 //
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
 #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
 };