1 // Copyright (C) 2008 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
2 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
4 // This library is free software; you can redistribute it and/or
5 // modify it under the terms of the GNU Lesser General Public
6 // License as published by the Free Software Foundation; either
7 // version 2.1 of the License.
9 // This library is distributed in the hope that it will be useful
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 // Lesser General Public License for more details.
14 // You should have received a copy of the GNU Lesser General Public
15 // License along with this library; if not, write to the Free Software
16 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
20 // File : SMESH_NoteBook.hxx
21 // Author : Roman NIKOLAEV ()
24 #ifndef SMESH_NoteBook_HeaderFile
25 #define SMESH_NoteBook_HeaderFile
27 #include <TCollection_AsciiString.hxx>
28 #include <Resource_DataMapOfAsciiStringAsciiString.hxx>
35 typedef std::vector<TCollection_AsciiString> TState;
36 typedef std::vector<TState> TAllStates;
37 typedef TCollection_AsciiString _pyID;
43 ObjectStates(TCollection_AsciiString theType);
46 void AddState(const TState &theState);
48 TState GetCurrectState() const;
49 TAllStates GetAllStates() const;
50 void IncrementState();
51 TCollection_AsciiString GetObjectType() const;
56 TCollection_AsciiString _type;
61 class LayerDistributionStates : public ObjectStates
64 typedef std::map<TCollection_AsciiString,TCollection_AsciiString> TDistributionMap;
65 LayerDistributionStates();
66 ~LayerDistributionStates();
68 void AddDistribution(const TCollection_AsciiString& theDistribution);
69 bool HasDistribution(const TCollection_AsciiString& theDistribution) const;
71 bool SetDistributionType(const TCollection_AsciiString& theDistribution,
72 const TCollection_AsciiString& theType);
73 TCollection_AsciiString GetDistributionType(const TCollection_AsciiString& theDistribution) const;
77 TDistributionMap _distributions;
84 typedef std::map<TCollection_AsciiString,ObjectStates*> TVariablesMap;
85 typedef std::map<TCollection_AsciiString,TCollection_AsciiString> TMeshEditorMap;
88 void ReplaceVariables();
90 void AddCommand(const TCollection_AsciiString& theString);
91 TCollection_AsciiString GetResultScript() const;
95 void ProcessLayerDistribution();
99 TVariablesMap _objectMap;
100 std::vector<Handle(_pyCommand)> _commands;
101 TMeshEditorMap myMeshEditors;
104 #endif //SMESH_NoteBook_HeaderFile