#define UNUSED009 17
#define UNUSED005 18
static int pajePushStateId = 19;
-#define UNUSED001 20
+static int pajeDefineEventTypeWithColorId = 20;
static int pajeDefineVariableTypeWithColorId = 21;
static int pajeSetVariableId = 22;
static int pajeAddVariableId = 23;
%% Alias string \n\
%% EntityType string \n\
%% Name string \n\
+%% Color color \n\
+%%EndEventDef \n\
+%%EventDef PajeDefineEventType %d \n\
+%% Alias string \n\
+%% EntityType string \n\
+%% Name string \n\
%%EndEventDef \n\
%%EventDef PajeDefineLinkType %d \n\
%% Alias string \n\
%% EntityType string \n\
%% Container string \n\
%% Value string \n\
-%%EndEventDef\n", pajeDefineContainerTypeId, pajeDefineStateTypeId, pajeDefineEntityValueId, pajeDefineEventTypeId, pajeDefineLinkTypeId, pajeCreateContainerId, pajeDestroyContainerId, pajeSetStateId, pajePopStateId, pajeStartLinkId, pajeEndLinkId, pajePushStateId, pajeSetVariableId, pajeAddVariableId, pajeSubVariableId, pajeDefineVariableTypeId, pajeDefineVariableTypeWithColorId, pajeStartLinkWithVolumeId, pajeNewEventId);
+%%EndEventDef\n", pajeDefineContainerTypeId, pajeDefineStateTypeId, pajeDefineEntityValueId, pajeDefineEventTypeWithColorId, pajeDefineEventTypeId, pajeDefineLinkTypeId, pajeCreateContainerId, pajeDestroyContainerId, pajeSetStateId, pajePopStateId, pajeStartLinkId, pajeEndLinkId, pajePushStateId, pajeSetVariableId, pajeAddVariableId, pajeSubVariableId, pajeDefineVariableTypeId, pajeDefineVariableTypeWithColorId, pajeStartLinkWithVolumeId, pajeNewEventId);
}
/* internal to this file */
containerType, name);
}
+void pajeDefineEventTypeWithColor(const char *alias, const char *containerType,
+ const char *name, const char *color)
+{
+ fprintf(tracing_file, "%d %s %s %s %s\n", pajeDefineEventTypeWithColorId, alias,
+ containerType, name, color);
+}
+
void pajeDefineEventType(const char *alias, const char *containerType,
const char *name)
{
TYPE_LINK,
TYPE_CONTAINER,
TYPE_STATE,
+ TYPE_EVENT,
} e_entity_types;
typedef struct s_type *type_t;
const char *name);
void pajeDefineStateType(const char *alias, const char *containerType,
const char *name);
+void pajeDefineEventTypeWithColor(const char *alias, const char *containerType,
+ const char *name, const char *color);
void pajeDefineEventType(const char *alias, const char *containerType,
const char *name);
void pajeDefineLinkType(const char *alias, const char *containerType,
/* instr_routing.c */
container_t newContainer (const char *name, e_container_types kind, container_t father);
container_t getContainer (const char *name);
+type_t newContainerType (const char *typename, e_entity_types kind, type_t father);
+type_t newEventType (const char *typename, e_entity_types kind, const char *color, type_t father);
+type_t newVariableType (const char *typename, e_entity_types kind, const char *color, type_t father);
+type_t newLinkType (const char *typename, e_entity_types kind, type_t father, type_t source, type_t dest);
+type_t newStateType (const char *typename, e_entity_types kind, type_t father);
type_t getType (const char *name);
void destroyContainer (container_t container);
void instr_routing_define_callbacks (void);
return ret;
}
-static type_t newContainerType (const char *typename, e_entity_types kind, type_t father)
+type_t newContainerType (const char *typename, e_entity_types kind, type_t father)
{
type_t ret = newType (typename, kind, father);
// if (father) INFO4("ContainerType %s(%s), child of %s(%s)", ret->name, ret->id, father->name, father->id);
return ret;
}
-static type_t newVariableType (const char *typename, e_entity_types kind, const char *color, type_t father)
+type_t newEventType (const char *typename, e_entity_types kind, const char *color, type_t father)
+{
+ type_t ret = newType (typename, kind, father);
+// INFO4("EventType %s(%s), child of %s(%s)", ret->name, ret->id, father->name, father->id);
+ if (color){
+ pajeDefineEventTypeWithColor (ret->id, ret->father->id, ret->name, color);
+ }else{
+ pajeDefineEventType(ret->id, ret->father->id, ret->name);
+ }
+ return ret;
+}
+
+type_t newVariableType (const char *typename, e_entity_types kind, const char *color, type_t father)
{
type_t ret = newType (typename, kind, father);
// INFO4("VariableType %s(%s), child of %s(%s)", ret->name, ret->id, father->name, father->id);
return ret;
}
-static type_t newLinkType (const char *typename, e_entity_types kind, type_t father, type_t source, type_t dest)
+type_t newLinkType (const char *typename, e_entity_types kind, type_t father, type_t source, type_t dest)
{
type_t ret = newType (typename, kind, father);
// INFO8("LinkType %s(%s), child of %s(%s) %s(%s)->%s(%s)", ret->name, ret->id, father->name, father->id, source->name, source->id, dest->name, dest->id);
return ret;
}
-static type_t newStateType (const char *typename, e_entity_types kind, type_t father)
+type_t newStateType (const char *typename, e_entity_types kind, type_t father)
{
type_t ret = newType (typename, kind, father);
// INFO4("StateType %s(%s), child of %s(%s)", ret->name, ret->id, father->name, father->id);
return ret;
}
+static type_t getEventType (const char *typename, const char *color, type_t father)
+{
+ type_t ret = xbt_dict_get_or_null (father->children, typename);
+ if (ret == NULL){
+ ret = newEventType (typename, TYPE_EVENT, color, father);
+ }
+ return ret;
+}
+
static type_t getVariableType (const char *typename, const char *color, type_t father)
{
type_t ret = xbt_dict_get_or_null (father->children, typename);