Salome HOME
Issue #18398(Tuleap): Restore visual properties change functionality
[modules/shaper.git] / src / Model / Model_Tools.h
index b1d79a50c199649d373719195203bbc22fb0c69f..b7ec96c12c73e2441027900c0c7256e941448f20 100644 (file)
 #include <TDF_Label.hxx>
 #include <TDF_RelocationTable.hxx>
 
+#include <memory>
+#include <set>
+
 /// A collection of methods useful for different parts of data model.
-namespace Model_Tools
+class Model_Tools
 {
+public:
   /// makes copy of label and all its sub-labels without copying the attributes;
   /// and feel the relocation table
-  void copyLabels(TDF_Label theSource, TDF_Label theDestination,
-                  Handle(TDF_RelocationTable) theRelocTable);
+  static void copyLabels(TDF_Label theSource, TDF_Label theDestination,
+                         Handle(TDF_RelocationTable) theRelocTable);
 
   /// makes copy of all attributes on the given label and all sub-labels
-  void copyAttrs(TDF_Label theSource, TDF_Label theDestination,
-                 Handle(TDF_RelocationTable) theRelocTable = Handle(TDF_RelocationTable)());
+  static void copyAttrs(TDF_Label theSource, TDF_Label theDestination,
+                        Handle(TDF_RelocationTable) theRelocTable = Handle(TDF_RelocationTable)());
+
+  /// makes copy of all attributes on the given label and all sub-labels,
+  /// but keep references to the Origin, coordinate axes and coordinate planes
+  static void copyAttrsAndKeepRefsToCoordinates(TDF_Label theSource, TDF_Label theDestination,
+      const std::set<TCollection_AsciiString>& theCoordinateLabels,
+      Handle(TDF_RelocationTable) theRelocTable);
+
+  /// collect labels of coordinate planes, axes, and origin
+  static void labelsOfCoordinates(
+      std::set<TCollection_AsciiString>& theCoordinateLabels,
+      Handle(TDF_RelocationTable) theRelocTable);
 };
 
 #endif