Salome HOME
CMake:
[modules/yacs.git] / src / yacsloader / LoadState.hxx
index 5fe4665e0b1a77962de928f464e422cfe3599d72..98b9075f25a140d8cc927e29ccaf10f13db688f6 100644 (file)
@@ -1,6 +1,26 @@
+// Copyright (C) 2006-2013  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
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
 #ifndef __LOADSTATE_HXX_
 #define __LOADSTATE_HXX_
 
+#include "YACSloaderExport.hxx"
 #include "xmlParserBase.hxx"
 
 #include "define.hxx"
@@ -13,11 +33,18 @@ namespace YACS
     class Proc;
     class Runtime;
 
+    //! Load state from a file into a Proc
+    /*!
+     * \param p: the Proc
+     * \param xmlStateFile: the file name
+     */
+    YACSLOADER_EXPORT void loadState(YACS::ENGINE::Proc *p,const std::string& xmlStateFile);
+
     /*! \brief class for parse an xml file, use a dedicated parser, to load a
      *  saved state of a SALOME execution.
      */
 
-    class stateLoader: public xmlReader
+    class YACSLOADER_EXPORT stateLoader: public xmlReader
     {
     public:
       stateLoader(xmlParserBase* parser,
@@ -44,7 +71,7 @@ namespace YACS
      *  defined in the xml file
      */
 
-    class stateParser: public xmlParserBase
+    class YACSLOADER_EXPORT stateParser: public xmlParserBase
     {
     public:
       static XMLReadState _state;
@@ -69,7 +96,7 @@ namespace YACS
       static std::map<std::string, YACS::StatesForNode> _nodeStates;
     };
 
-    class graphParser: public stateParser
+    class YACSLOADER_EXPORT graphParser: public stateParser
     {
     public:
       virtual void init(const xmlChar** p, xmlParserBase* father=0);
@@ -78,7 +105,7 @@ namespace YACS
     };
 
 
-    class nodeParser: public stateParser
+    class YACSLOADER_EXPORT nodeParser: public stateParser
     {
     public:
       virtual void init(const xmlChar** p, xmlParserBase* father=0);
@@ -88,7 +115,7 @@ namespace YACS
       std::string _nodeState;
     };
 
-    class attrParser: public stateParser
+    class YACSLOADER_EXPORT attrParser: public stateParser
     {
     public:
       virtual void init(const xmlChar** p, xmlParserBase* father=0);
@@ -99,7 +126,7 @@ namespace YACS
     };
 
 
-    class portParser: public stateParser
+    class YACSLOADER_EXPORT portParser: public stateParser
     {
     public:
       virtual void init(const xmlChar** p, xmlParserBase* father=0);
@@ -108,7 +135,7 @@ namespace YACS
       virtual void addData(std::string value);
     };
 
-    class valueParser: public stateParser
+    class YACSLOADER_EXPORT valueParser: public stateParser
     {
     public:
       virtual void init(const xmlChar** p, xmlParserBase* father=0);
@@ -117,7 +144,7 @@ namespace YACS
       virtual void addData(std::string value);
     };
 
-    class arrayParser: public stateParser
+    class YACSLOADER_EXPORT arrayParser: public stateParser
     {
     public:
       virtual void init(const xmlChar** p, xmlParserBase* father=0);
@@ -126,7 +153,7 @@ namespace YACS
       virtual void addData(std::string value);
     };
 
-    class dataParser: public stateParser
+    class YACSLOADER_EXPORT dataParser: public stateParser
     {
     public:
       virtual void init(const xmlChar** p, xmlParserBase* father=0);
@@ -136,7 +163,7 @@ namespace YACS
       std::list<std::string> _dataList;
     };
 
-    class simpleTypeParser: public stateParser
+    class YACSLOADER_EXPORT simpleTypeParser: public stateParser
     {
     public:
       virtual void init(const xmlChar** p, xmlParserBase* father=0);