Skip to content
Snippets Groups Projects
Commit 9a9188d8 authored by Jeremie Deray's avatar Jeremie Deray
Browse files

clean NodeBase func def

parent c6999729
No related branches found
No related tags found
1 merge request!141Serialization
...@@ -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_ */
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment