class VariableType;
class Container {
+ static Container* root_container_;
+ static std::map<std::string, Container*> all_containers_;
+
long long int id_;
std::string name_; /* Unique name of this container */
+protected:
+ static void set_root(Container* root) { root_container_ = root; }
+
public:
- static xbt::signal<void(Container&)> on_creation;
- static xbt::signal<void(Container&)> on_destruction;
+ static xbt::signal<void(Container const&)> on_creation;
+ static xbt::signal<void(Container const&)> on_destruction;
explicit Container(const std::string& name, const std::string& type_name, Container* father);
Container(const Container&) = delete;
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);
- static Container* get_root();
+ static Container* get_root() { return root_container_; }
};
class NetZoneContainer : public Container {