long long int id_ = new_paje_id();
std::string name_;
std::string color_;
- Type* father_;
+ Type* parent_;
std::map<std::string, std::unique_ptr<Type>, std::less<>> children_;
Container* issuer_ = nullptr;
static xbt::signal<void(Type const&, PajeEventType event_type)> on_creation;
Type(PajeEventType event_type, const std::string& name, const std::string& alias, const std::string& color,
- Type* father);
+ Type* parent);
virtual ~Type() = default;
long long int get_id() const { return id_; }
const std::string& get_name() const { return name_; }
const char* get_cname() const { return name_.c_str(); }
const std::string& get_color() const { return color_; }
- Type* get_father() const { return father_; }
+ Type* get_parent() const { return parent_; }
const std::map<std::string, std::unique_ptr<Type>, std::less<>>& get_children() const { return children_; }
bool is_colored() const { return not color_.empty(); }
class ContainerType : public Type {
public:
explicit ContainerType(const std::string& name) : Type(PajeEventType::DefineContainerType, name, name, "", nullptr){};
- ContainerType(const std::string& name, Type* father)
- : Type(PajeEventType::DefineContainerType, name, name, "", father){};
+ ContainerType(const std::string& name, Type* parent)
+ : Type(PajeEventType::DefineContainerType, name, name, "", parent){};
};
class VariableType : public Type {
std::vector<VariableEvent*> events_;
public:
- VariableType(const std::string& name, const std::string& color, Type* father)
- : Type(PajeEventType::DefineVariableType, name, name, color, father)
+ VariableType(const std::string& name, const std::string& color, Type* parent)
+ : Type(PajeEventType::DefineVariableType, name, name, color, parent)
{
}
void instr_event(double now, double delta, const char* resource, double value);
class ValueType : public Type {
public:
std::map<std::string, EntityValue, std::less<>> values_;
- ValueType(PajeEventType event_type, const std::string& name, const std::string& alias, Type* father)
- : Type(event_type, name, alias, "", father){};
- ValueType(PajeEventType event_type, const std::string& name, Type* father)
- : Type(event_type, name, name, "", father){};
+ ValueType(PajeEventType event_type, const std::string& name, const std::string& alias, Type* parent)
+ : Type(event_type, name, alias, "", parent){};
+ ValueType(PajeEventType event_type, const std::string& name, Type* parent)
+ : Type(event_type, name, name, "", parent){};
void add_entity_value(const std::string& name, const std::string& color);
void add_entity_value(const std::string& name);
EntityValue* get_entity_value(const std::string& name);
class LinkType : public ValueType {
public:
static xbt::signal<void(LinkType const&, Type const&, Type const&)> on_creation;
- LinkType(const std::string& name, const Type* source, const Type* dest, const std::string& alias, Type* father)
- : ValueType(PajeEventType::DefineLinkType, name, alias, father)
+ LinkType(const std::string& name, const Type* source, const Type* dest, const std::string& alias, Type* parent)
+ : ValueType(PajeEventType::DefineLinkType, name, alias, parent)
{
on_creation(*this, *source, *dest);
}
class EventType : public ValueType {
public:
- EventType(const std::string& name, Type* father) : ValueType(PajeEventType::DefineEventType, name, father) {}
+ EventType(const std::string& name, Type* parent) : ValueType(PajeEventType::DefineEventType, name, parent) {}
};
class StateType : public ValueType {
std::vector<StateEvent*> events_;
public:
- StateType(const std::string& name, Type* father) : ValueType(PajeEventType::DefineStateType, name, father) {}
+ StateType(const std::string& name, Type* parent) : ValueType(PajeEventType::DefineStateType, name, parent) {}
void set_event(const std::string& value_name);
void push_event(const std::string& value_name);
void push_event(const std::string& value_name, TIData* extra);