Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
fix bugs due to subVariable method
[simgrid.git] / src / instr / instr_private.h
index fb51e5b..36615e6 100644 (file)
@@ -1,5 +1,4 @@
-/* Copyright (c) 2010-2015. The SimGrid Team.
- * All rights reserved.                                                     */
+/* Copyright (c) 2010-2017. The SimGrid Team. All rights reserved.          */
 
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
@@ -67,14 +66,20 @@ typedef struct s_type {
   xbt_dict_t values; //valid for all types except variable and container
 }s_type_t;
 
-typedef struct s_val *val_t;
-typedef struct s_val {
+//--------------------------------------------------
+class s_val;
+typedef s_val *val_t;
+
+class s_val {
+  public:
   char *id;
   char *name;
   char *color;
   type_t father;
-}s_val_t;
+};
+typedef s_val s_val_t;
 
+//--------------------------------------------------
 typedef enum {
   INSTR_HOST,
   INSTR_LINK,
@@ -86,26 +91,37 @@ typedef enum {
   INSTR_MSG_TASK
 } e_container_types;
 
-typedef struct s_container *container_t;
-typedef struct s_container {
-  sg_netcard_t netcard;
+//--------------------------------------------------
+class s_container;
+typedef s_container *container_t;
+
+class s_container {
+  public: 
+  sg_netpoint_t netpoint;
   char *name;     /* Unique name of this container */
   char *id;       /* Unique id of this container */
   type_t type;    /* Type of this container */
   int level;      /* Level in the hierarchy, root level is 0 */
   e_container_types kind; /* This container is of what kind */
-  struct s_container *father;
+  s_container *father;
   xbt_dict_t children;
-}s_container_t;
+};
+typedef s_container s_container_t;
+
+//--------------------------------------------------
+class paje_event;
+typedef paje_event *paje_event_t;
 
-typedef struct paje_event *paje_event_t;
-typedef struct paje_event {
+class paje_event {
+  public:
   double timestamp;
   e_event_type event_type;
   void (*print) (paje_event_t event);
   void (*free) (paje_event_t event);
   void *data;
-} s_paje_event_t;
+};
+typedef paje_event s_paje_event_t;
+//--------------------------------------------------
 
 typedef struct s_defineContainerType *defineContainerType_t;
 typedef struct s_defineContainerType {
@@ -163,24 +179,41 @@ typedef struct s_addVariable {
   double value;
 }s_addVariable_t;
 
-typedef struct s_subVariable *subVariable_t;
-typedef struct s_subVariable {
+//--------------------------------------------------
+class s_subVariable;
+
+typedef s_subVariable *subVariable_t;
+
+class s_subVariable {
+  public:
   container_t container;
   type_t type;
   double value;
-}s_subVariable_t;
+  //methods 
+  XBT_PUBLIC(void) new_pajeSubVariable (double timestamp, container_t container, type_t type, double value);
+};
+typedef s_subVariable s_subVariable_t;
+//--------------------------------------------------
 
-typedef struct s_setState *setState_t;
-typedef struct s_setState {
+class s_setState;
+
+typedef s_setState *setState_t;
+class s_setState {
+  public:
   container_t container;
   type_t type;
   val_t value;
   const char* filename;
   int linenumber;
-}s_setState_t;
+};
+
+typedef s_setState s_setState_t;
 
-typedef struct s_pushState *pushState_t;
-typedef struct s_pushState {
+class s_pushState;
+
+typedef s_pushState *pushState_t;
+class s_pushState {
+  public:
   container_t container;
   type_t type;
   val_t value;
@@ -188,7 +221,9 @@ typedef struct s_pushState {
   const char* filename;
   int linenumber;
   void* extra;
-}s_pushState_t;
+};
+
+typedef s_pushState s_pushState_t;
 
 typedef struct s_popState *popState_t;
 typedef struct s_popState {
@@ -222,12 +257,18 @@ typedef struct s_endLink {
   char *key;
 }s_endLink_t;
 
-typedef struct s_newEvent *newEvent_t;
-typedef struct s_newEvent {
+class s_newEvent;
+
+typedef s_newEvent *newEvent_t;
+
+class s_newEvent {
+  public:
   container_t container;
   type_t type;
   val_t value;
-}s_newEvent_t;
+};
+
+typedef s_newEvent s_newEvent_t;
 
 extern XBT_PRIVATE xbt_dict_t created_categories;
 extern XBT_PRIVATE xbt_dict_t declared_marks;
@@ -240,8 +281,6 @@ extern XBT_PRIVATE double TRACE_last_timestamp_to_dump;
 XBT_PRIVATE void TRACE_header(int basic, int size);
 
 /* from paje.c */
-XBT_PRIVATE void TRACE_init();
-XBT_PRIVATE void TRACE_finalize();
 XBT_PRIVATE void TRACE_paje_init();
 XBT_PRIVATE void TRACE_paje_start();
 XBT_PRIVATE void TRACE_paje_end();
@@ -252,11 +291,15 @@ XBT_PUBLIC(void) new_pajeDefineStateType(type_t type);
 XBT_PUBLIC(void) new_pajeDefineEventType(type_t type);
 XBT_PUBLIC(void) new_pajeDefineLinkType(type_t type, type_t source, type_t dest);
 XBT_PUBLIC(void) new_pajeDefineEntityValue (val_t type);
+
+// Container 
 XBT_PUBLIC(void) new_pajeCreateContainer (container_t container);
 XBT_PUBLIC(void) new_pajeDestroyContainer (container_t container);
+
 XBT_PUBLIC(void) new_pajeSetVariable (double timestamp, container_t container, type_t type, double value);
 XBT_PUBLIC(void) new_pajeAddVariable (double timestamp, container_t container, type_t type, double value);
-XBT_PUBLIC(void) new_pajeSubVariable (double timestamp, container_t container, type_t type, double value);
+
+
 XBT_PUBLIC(void) new_pajeSetState (double timestamp, container_t container, type_t type, val_t value);
 XBT_PUBLIC(void) new_pajePushState (double timestamp, container_t container, type_t type, val_t value);
 XBT_PUBLIC(void) new_pajePushStateWithExtra (double timestamp, container_t container, type_t type, val_t value,
@@ -457,8 +500,4 @@ typedef struct s_instr_extra_data {
 
 SG_END_DECL()
 
-#if HAVE_JEDULE
-#include "simgrid/jedule/jedule_sd_binding.h"
 #endif
-
-#endif /* INSTR_PRIVATE_H_ */