Skip to content
Snippets Groups Projects

Serialization

Merged Jeremie Deray requested to merge serialization into master
1 unresolved thread
1 file
+ 27
13
Compare changes
  • Side-by-side
  • Inline
+ 27
13
@@ -67,19 +67,18 @@ class NodeBase
@@ -67,19 +67,18 @@ class NodeBase
public:
public:
NodeBase(const std::string& _class, const std::string& _type = "Undefined", const std::string& _name = "");
NodeBase(const std::string& _class, const std::string& _type = "Undefined", const std::string& _name = "");
virtual ~NodeBase();
virtual ~NodeBase() = default;
unsigned int nodeId() const;
unsigned int nodeId() const;
std::string getClass() const;
std::string getClass() const;
std::string getType() const {return node_type_;}
std::string getType() const;
std::string getName() const;
std::string getName() const;
void setType(const std::string& _name){node_type_ = _name;};
void setType(const std::string& _type);
void setName(const std::string& _name);
void setName(const std::string& _name);
virtual ProblemPtr getProblem(){return problem_ptr_.lock();}
virtual ProblemPtr getProblem() const;
void setProblem(ProblemPtr _prob_ptr) {problem_ptr_ = _prob_ptr;}
void setProblem(ProblemPtr _prob_ptr);
};
};
} // namespace wolf
} // namespace wolf
@@ -98,11 +97,6 @@ inline NodeBase::NodeBase(const std::string& _class, const std::string& _type, c
@@ -98,11 +97,6 @@ inline NodeBase::NodeBase(const std::string& _class, const std::string& _type, c
//
//
}
}
inline NodeBase::~NodeBase()
{
//
}
inline unsigned int NodeBase::nodeId() const
inline unsigned int NodeBase::nodeId() const
{
{
return node_id_;
return node_id_;
@@ -113,16 +107,36 @@ inline std::string NodeBase::getClass() const
@@ -113,16 +107,36 @@ inline std::string NodeBase::getClass() const
return node_class_;
return node_class_;
}
}
 
inline std::string NodeBase::getType() const
 
{
 
return node_type_;
 
}
 
inline std::string NodeBase::getName() const
inline std::string NodeBase::getName() const
{
{
return node_name_;
return node_name_;
}
}
 
inline void NodeBase::setType(const std::string& _type)
 
{
 
node_type_ = _type;
 
}
 
inline void NodeBase::setName(const std::string& _name)
inline void NodeBase::setName(const std::string& _name)
{
{
node_name_ = _name;
node_name_ = _name;
}
}
 
inline ProblemPtr NodeBase::getProblem() const
 
{
 
return problem_ptr_.lock();
 
}
 
 
inline void NodeBase::setProblem(ProblemPtr _prob_ptr)
 
{
 
problem_ptr_ = _prob_ptr;
 
}
 
} // namespace wolf
} // namespace wolf
#endif /* NODE_BASE_H_ */
#endif /* NODE_BASE_H_ */
Loading