- Type* type_; /* Type of this container */
- Container* father_;
- std::map<std::string, Container*> children_;
- sg_netpoint_t netpoint_ = nullptr;
-
- static Container* byNameOrNull(std::string name);
- static Container* byName(std::string name);
- std::string getName() { return name_; }
- const char* getCname() { return name_.c_str(); }
- long long int getId() { return id_; }
- void removeFromParent();
- void logCreation();
- void logDestruction();
-
- StateType* getState(std::string name);
- static Container* getRootContainer();
+
+ static Container* by_name_or_null(const std::string& name);
+ static Container* by_name(const std::string& name);
+ const std::string& get_name() const { return name_; }
+ const char* get_cname() const { return name_.c_str(); }
+ long long int get_id() const { return id_; }
+ void remove_from_parent();
+
+ Container* get_parent() const { return parent_; }
+ Type* get_type() const { return type_; }
+ StateType* get_state(const std::string& name);
+ LinkType* get_link(const std::string& name);
+ VariableType* get_variable(const std::string& name);
+ void create_child(const std::string& name, const std::string& type_name);
+ Container* get_child_by_name(const std::string& name) const { return children_.at(name); }
+ static Container* get_root() { return root_container_; }