#include <stdint.h>
#include "GTGList.h"
#include "GTGStack.h"
Go to the source code of this file.
|  | 
| #define | MAX_PROCESS   64 | 
|  | 
| #define | ContainerType_NIL   0 | 
|  | 
| #define | Container_NIL   0 | 
|  | 
| #define | StateType_NIL   0 | 
|  | 
| #define | State_NIL   0 | 
|  | 
| #define | EntityValue_NIL   0 | 
|  | 
| #define | EventType_NIL   0 | 
|  | 
| #define | LinkType_NIL   0 | 
|  | 
| #define | VariableType_NIL   0 | 
|  | 
| #define | Variable_NIL   0 | 
|  | 
| #define | init_OTF2_String(var) | 
|  | 
| #define | init_StateType(var) | 
|  | 
| #define | init_State(var) | 
|  | 
| #define | init_ContainerType(var) | 
|  | 
| #define | init_Container(var) | 
|  | 
| #define | init_EntityValue(var) | 
|  | 
| #define | init_EventType(var) | 
|  | 
| #define | init_LinkType(var) | 
|  | 
| #define | init_VariableType(var) | 
|  | 
| #define | init_Variable(var) | 
|  | 
| #define | alloc_struct(ptr, type, list_head) | 
|  | 
| #define | alloc_init_struct(type, ptr, list_head, _name_, _alias_) | 
|  | 
| #define | alloc_Variable(_ptr_, _id_, _parent_, _type_, _value_) | 
|  | 
| #define | alloc_State(_ptr_, _value_, _cont_, _stateType_) | 
|  | 
| #define | free_struct(_type_, _list_head_) | 
|  | 
      
        
          | #define alloc_init_struct | ( |  | type, | 
        
          |  |  |  | ptr, | 
        
          |  |  |  | list_head, | 
        
          |  |  |  | _name_, | 
        
          |  |  |  | _alias_ | 
        
          |  | ) |  |  | 
      
 
Value:
  (ptr)->name = (char *)malloc(sizeof(char)*(strlen(_name_)+1));        \
  strcpy((ptr)->name, _name_);                                          \
  (ptr)->alias = (char *)malloc(sizeof(char)*(strlen(_alias_)+1));      \
  strcpy((ptr)->alias, _alias_);                                        \
  }while(0)
#define alloc_struct(ptr, type, list_head)
Definition: GTGOTF2_Structs.h:236
 
 
 
      
        
          | #define alloc_State | ( |  | _ptr_, | 
        
          |  |  |  | _value_, | 
        
          |  |  |  | _cont_, | 
        
          |  |  |  | _stateType_ | 
        
          |  | ) |  |  | 
      
 
Value:do {                                                            \
    (_ptr_)->value = _value_;                                   \
    (_ptr_)->cont = _cont_;                                     \
    (_ptr_)->stateType = _stateType_;                           \
  }while(0)
#define init_State(var)
Definition: GTGOTF2_Structs.h:160
Definition: GTGOTF2_Structs.h:44
 
 
      
        
          | #define alloc_struct | ( |  | ptr, | 
        
          |  |  |  | type, | 
        
          |  |  |  | list_head | 
        
          |  | ) |  |  | 
      
 
Value:do {                                                                    \
    ptr = (type*) malloc(
sizeof(type));                         
\  } while(0)
#define GTG_LIST_INIT(ptr)
initialize a list. 
Definition: GTGList.h:16
#define gtg_list_entry(ptr, type, member)
get the structure corresponding to a list entry 
Definition: GTGList.h:39
struct gtg_list * prev
Definition: GTGList.h:5
static void gtg_list_add_tail(gtg_list_t lnew, gtg_list_t head)
Insert a new entry before the specified head (ie. at the tail of the list). 
Definition: GTGList.h:76
 
 
      
        
          | #define alloc_Variable | ( |  | _ptr_, | 
        
          |  |  |  | _id_, | 
        
          |  |  |  | _parent_, | 
        
          |  |  |  | _type_, | 
        
          |  |  |  | _value_ | 
        
          |  | ) |  |  | 
      
 
Value:do {                                                            \
    (_ptr_)->id = _id_;                                         \
    (_ptr_)->parent = _parent_;                                 \
    (_ptr_)->type = _type_;                                     \
    (_ptr_)->value = _value_;                                   \
  }while(0)
#define init_Variable(var)
Definition: GTGOTF2_Structs.h:226
Definition: GTGOTF2_Structs.h:117
 
 
      
        
          | #define ContainerType_NIL   0 | 
      
 
 
      
        
          | #define EntityValue_NIL   0 | 
      
 
 
      
        
          | #define free_struct | ( |  | _type_, | 
        
          |  |  |  | _list_head_ | 
        
          |  | ) |  |  | 
      
 
Value:do{\
    free(ptr->name.name);\
    free(ptr->alias);\
    free(ptr);\
  }\
  }while(0)
static void gtg_list_del(gtg_list_t entry)
delete an entry from its list and reinitialize it. 
Definition: GTGList.h:99
#define gtg_list_for_each_entry_safe(pos, n, head, member)
iterate over list of given type safe against removal of list entry 
Definition: GTGList.h:157
 
 
      
        
          | #define init_Container | ( |  | var | ) |  | 
      
 
Value:
    (var).ctType = NULL;                        \
    (var).parent = NULL;                        \
    (var).ev_writer = NULL;                     
\  }while(0)
#define GTG_LIST_INIT(ptr)
initialize a list. 
Definition: GTGList.h:16
#define init_OTF2_String(var)
Definition: GTGOTF2_Structs.h:144
#define Container_NIL
Definition: GTGOTF2_Structs.h:135
#define GTG_STACK_INIT(ptr)
Definition: GTGStack.h:9
 
 
 
      
        
          | #define init_ContainerType | ( |  | var | ) |  | 
      
 
Value:
  }while(0)
#define GTG_LIST_INIT(ptr)
initialize a list. 
Definition: GTGList.h:16
#define init_OTF2_String(var)
Definition: GTGOTF2_Structs.h:144
#define ContainerType_NIL
Definition: GTGOTF2_Structs.h:134
 
 
 
      
        
          | #define init_EntityValue | ( |  | var | ) |  | 
      
 
Value:
    (var).groupId = 0;                          \
  }while(0)
#define GTG_LIST_INIT(ptr)
initialize a list. 
Definition: GTGList.h:16
#define init_OTF2_String(var)
Definition: GTGOTF2_Structs.h:144
#define EntityValue_NIL
Definition: GTGOTF2_Structs.h:138
 
 
 
      
        
          | #define init_EventType | ( |  | var | ) |  | 
      
 
Value:
    (var).contType = NULL;                      \
  }while(0)
#define GTG_LIST_INIT(ptr)
initialize a list. 
Definition: GTGList.h:16
#define init_OTF2_String(var)
Definition: GTGOTF2_Structs.h:144
#define EventType_NIL
Definition: GTGOTF2_Structs.h:139
 
 
 
      
        
          | #define init_LinkType | ( |  | var | ) |  | 
      
 
Value:
    (var).contType = NULL;                      \
    (var).srcType  = NULL;                      \
    (var).destType = NULL;                      \
  }while(0)
#define GTG_LIST_INIT(ptr)
initialize a list. 
Definition: GTGList.h:16
#define init_OTF2_String(var)
Definition: GTGOTF2_Structs.h:144
#define LinkType_NIL
Definition: GTGOTF2_Structs.h:140
 
 
 
      
        
          | #define init_OTF2_String | ( |  | var | ) |  | 
      
 
Value:do {                                            \
    (var).id   = -1;                            \
    (var).name = NULL;                          \
  } while(0)
 
 
      
        
          | #define init_State | ( |  | var | ) |  | 
      
 
Value:do {                                            \
    (var).cont      = NULL;                     \
    (var).stateType = NULL;                     
\  }while(0)
#define GTG_STACK_INIT(ptr)
Definition: GTGStack.h:9
#define EntityValue_NIL
Definition: GTGOTF2_Structs.h:138
 
 
      
        
          | #define init_StateType | ( |  | var | ) |  | 
      
 
Value:
    (var).groupId = 0;                    \
  }while(0)
#define GTG_LIST_INIT(ptr)
initialize a list. 
Definition: GTGList.h:16
#define init_OTF2_String(var)
Definition: GTGOTF2_Structs.h:144
#define StateType_NIL
Definition: GTGOTF2_Structs.h:136
 
 
 
      
        
          | #define init_Variable | ( |  | var | ) |  | 
      
 
Value:do {                                            \
    (var).parent = NULL;                \
    (var).type   = NULL;                \
    (var).value  = 0;                           \
  }while(0)
#define GTG_LIST_INIT(ptr)
initialize a list. 
Definition: GTGList.h:16
#define Variable_NIL
Definition: GTGOTF2_Structs.h:142
 
 
      
        
          | #define init_VariableType | ( |  | var | ) |  | 
      
 
Value:
    (var).contType = NULL;                      \
  }while(0)
#define GTG_LIST_INIT(ptr)
initialize a list. 
Definition: GTGList.h:16
#define init_OTF2_String(var)
Definition: GTGOTF2_Structs.h:144
#define VariableType_NIL
Definition: GTGOTF2_Structs.h:141
 
 
 
      
        
          | #define VariableType_NIL   0 |