- e_entity_types kind_;
- Type* father_;
- xbt_dict_t children_;
- xbt_dict_t values_; // valid for all types except variable and container
- Type(const char* typeNameBuff, const char* key, const char* color, e_entity_types kind, Type* father);
- ~Type();
- Type* getChild(const char* name);
- Type* getChildOrNull(const char* name);
-
- static Type* containerNew(const char* name, Type* father);
- static Type* eventNew(const char* name, Type* father);
- static Type* variableNew(const char* name, const char* color, Type* father);
- static Type* linkNew(const char* name, Type* father, Type* source, Type* dest);
- static Type* stateNew(const char* name, Type* father);
+ Type(std::string name, std::string alias, std::string color, Type* father);
+ virtual ~Type();
+
+ std::string getName() { return name_; }
+ const char* getCname() { return name_.c_str(); }
+ long long int getId() { return id_; }
+ bool isColored() { return not color_.empty(); }
+
+ Type* byName(std::string name);
+
+ ContainerType* getOrCreateContainerType(std::string name);
+ EventType* getOrCreateEventType(std::string name);
+ LinkType* getOrCreateLinkType(std::string name, Type* source, Type* dest);
+ StateType* getOrCreateStateType(std::string name);
+ VariableType* getOrCreateVariableType(std::string name, std::string color);
+
+ void logDefinition(e_event_type event_type);
+ void logDefinition(Type* source, Type* dest);
+
+ static ContainerType* createRootType();
+ static ContainerType* getRootType();