SCIRun  5.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
NetworkDescriptionSerialization.h
Go to the documentation of this file.
1 /*
2  For more information, please see: http://software.sci.utah.edu
3 
4  The MIT License
5 
6  Copyright (c) 2012 Scientific Computing and Imaging Institute,
7  University of Utah.
8 
9  License for the specific language governing rights and limitations under
10  Permission is hereby granted, free of charge, to any person obtaining a
11  copy of this software and associated documentation files (the "Software"),
12  to deal in the Software without restriction, including without limitation
13  the rights to use, copy, modify, merge, publish, distribute, sublicense,
14  and/or sell copies of the Software, and to permit persons to whom the
15  Software is furnished to do so, subject to the following conditions:
16 
17  The above copyright notice and this permission notice shall be included
18  in all copies or substantial portions of the Software.
19 
20  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
21  OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
23  THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
24  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
25  FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
26  DEALINGS IN THE SOFTWARE.
27 */
28 
29 /// @todo Documentation Dataflow/Serialization/Network/NetworkDescriptionSerialization.h
30 
31 
32 #ifndef CORE_SERIALIZATION_NETWORK_NETWORK_DESCRIPTION_SERIALIZATION_H
33 #define CORE_SERIALIZATION_NETWORK_NETWORK_DESCRIPTION_SERIALIZATION_H
34 
38 #include <boost/serialization/vector.hpp>
39 #include <boost/serialization/map.hpp>
41 
42 namespace SCIRun {
43 namespace Dataflow {
44 namespace Networks {
45 
46  typedef std::vector<ConnectionDescriptionXML> ConnectionsXML;
47 
49  {
53  private:
55  template <class Archive>
56  void serialize(Archive& ar, const unsigned int version)
57  {
58  ar & BOOST_SERIALIZATION_NVP(module);
59  ar & BOOST_SERIALIZATION_NVP(state);
60  }
61  };
62 
63  typedef std::map<std::string, ModuleWithState> ModuleMapXML;
64 
66  {
67  public:
70  private:
71  friend class boost::serialization::access;
72  template <class Archive>
73  void serialize(Archive& ar, const unsigned int version)
74  {
75  ar & BOOST_SERIALIZATION_NVP(modules);
76  ar & BOOST_SERIALIZATION_NVP(connections);
77  }
78  };
79 
81  {
84  private:
85  friend class boost::serialization::access;
86  template <class Archive>
87  void serialize(Archive& ar, const unsigned int version)
88  {
89  ar & boost::serialization::make_nvp("networkInfo", network);
90  ar & boost::serialization::make_nvp("modulePositions", modulePositions.modulePositions);
91  }
92  };
93 
94 }}}
95 
96 #endif
ModuleLookupInfoXML module
Definition: NetworkDescriptionSerialization.h:50
friend class boost::serialization::access
Definition: NetworkDescriptionSerialization.h:54
Definition: NetworkDescriptionSerialization.h:48
#define SCISHARE
Definition: share.h:39
ModuleMapXML modules
Definition: NetworkDescriptionSerialization.h:68
ModuleWithState(const ModuleLookupInfoXML &m=ModuleLookupInfoXML(), const State::SimpleMapModuleStateXML &s=State::SimpleMapModuleStateXML())
Definition: NetworkDescriptionSerialization.h:52
Definition: ModulePositionGetter.h:43
std::map< std::string, ModuleWithState > ModuleMapXML
Definition: NetworkDescriptionSerialization.h:63
Definition: ModuleDescriptionSerialization.h:46
ModulePositions modulePositions
Definition: NetworkDescriptionSerialization.h:83
Definition: NetworkDescriptionSerialization.h:65
State::SimpleMapModuleStateXML state
Definition: NetworkDescriptionSerialization.h:51
NetworkXML network
Definition: NetworkDescriptionSerialization.h:82
Definition: StateSerialization.h:49
ConnectionsXML connections
Definition: NetworkDescriptionSerialization.h:69
std::vector< ConnectionDescriptionXML > ConnectionsXML
Definition: NetworkDescriptionSerialization.h:46
void serialize(Archive &ar, SCIRun::Dataflow::Networks::PortId &pid, const unsigned int version)
Definition: ModuleDescriptionSerialization.h:89
Definition: NetworkDescriptionSerialization.h:80