VPTissue Reference Manual
NodeAttributes.h
Go to the documentation of this file.
1 #ifndef NODE_ATTRIBUTES_H_INCLUDED
2 #define NODE_ATTRIBUTES_H_INCLUDED
3 /*
4  * Copyright 2011-2016 Universiteit Antwerpen
5  *
6  * Licensed under the EUPL, Version 1.1 or as soon they will be approved by
7  * the European Commission - subsequent versions of the EUPL (the "Licence");
8  * You may not use this work except in compliance with the Licence.
9  * You may obtain a copy of the Licence at: http://ec.europa.eu/idabc/eupl5
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the Licence is distributed on an "AS IS" basis,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the Licence for the specific language governing
15  * permissions and limitations under the Licence.
16  */
22 #include <boost/property_tree/ptree.hpp>
23 
24 namespace SimPT_Sim {
25 
30 {
31 public:
33  NodeAttributes() : m_fixed(false), m_sam(false) {}
34 
36  virtual ~NodeAttributes() {}
37 
39  bool IsFixed() const { return m_fixed; }
40 
42  bool IsSam() const { return m_sam; }
43 
45  virtual void ReadPtree(const boost::property_tree::ptree& node_pt);
46 
48  void SetFixed(bool b){ m_fixed = b; }
49 
51  void SetSam(bool b) { m_sam = b; }
52 
60  virtual boost::property_tree::ptree ToPtree() const;
61 
62 private:
63  bool m_fixed;
64  bool m_sam;
65 };
66 
67 }
68 
69 #endif // end_of_include_guard
virtual boost::property_tree::ptree ToPtree() const
Convert the node attributes to a ptree.
Namespace for the core simulator.
virtual void ReadPtree(const boost::property_tree::ptree &node_pt)
Read the given ptree into the attributes.
Attributes associated with a node.