- 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();
-};
-
-class ContainerType : public Type {
-public:
- ContainerType(std::string name, Type* father);
-};
-
-class VariableType : public Type {
-public:
- VariableType(std::string name, std::string color, Type* father);
-};
-
-class ValueType : public Type {
-public:
- std::map<std::string, Value*> values_;
- ValueType(std::string name, std::string alias, Type* father) : Type(name, alias, "", father){};
- ValueType(std::string name, Type* father) : Type(name, name, "", father){};
- virtual ~ValueType();
- void addEntityValue(std::string name, std::string color);
- void addEntityValue(std::string name);
- Value* getEntityValue(std::string name);
-};
-
-class LinkType : public ValueType {
-public:
- LinkType(std::string name, std::string alias, Type* father);
-};
-
-class EventType : public ValueType {
-public:
- EventType(std::string name, Type* father);
-};
-
-class StateType : public ValueType {
-public:
- StateType(std::string name, Type* father);
-};
-
-class Value {
- std::string name_;
- std::string id_;
- std::string color_;
- Type* father_;
-
-public:
- explicit Value(std::string name, std::string color, Type* father);
- ~Value();
- const char* getCname() { return name_.c_str(); }
- const char* getId() { return id_.c_str(); }
- bool isColored() { return not color_.empty(); }