model.h File Reference

Contains the definition of the Model parsed in the model file. More...

#include <string.h>
#include "model-attribute.h"
#include "vector.h"
Include dependency graph for model.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  Model
 Contains the attributes and relations definitions found in the model file. More...
 

Typedefs

typedef struct Model Model
 Contains the attributes and relations definitions found in the model file.
 

Functions

void initModel (Model *mdl)
 Initialize the Model. More...
 
void freeModel (Model *mdl)
 Free the Model structure (created while parsing the config file) More...
 
int getEnumId (const char *str, Model *mdl, unsigned int index)
 Returns the identifier of the enumeration item whose name is given as a parameter. More...
 
int getTreeId (const char *str, Model *mdl, unsigned int index)
 Returns the identifier of the tree node or tree leaf whose name is given as a parameter. More...
 
char * getEnumStr (int id, Model *mdl, unsigned int index)
 Returns the name of the enumeration item whose identifier is given as a parameter. More...
 
char * getTreeStr (int id, Model *mdl, unsigned int index)
 Returns the name of the tree node or tree leaf whose identifier is given as a parameter. More...
 

Detailed Description

Contains the definition of the Model parsed in the model file.

Author
Bastien Philip (ebatsin)
Gaƫl Foppolo (gaelfoppolo)

Function Documentation

void freeModel ( Model mdl)

Free the Model structure (created while parsing the config file)

Parameters
mdlA pointer to the Model to be freed

Here is the call graph for this function:

int getEnumId ( const char *  str,
Model mdl,
unsigned int  index 
)

Returns the identifier of the enumeration item whose name is given as a parameter.

Parameters
strThe enumeration item's name of which the identifier is needed
mdlThe Model
indexThe index of the ModelAttribute in the Model
Returns
Returns the identifier if found, -1 otherwise

Here is the caller graph for this function:

char* getEnumStr ( int  id,
Model mdl,
unsigned int  index 
)

Returns the name of the enumeration item whose identifier is given as a parameter.

Parameters
idThe enumeration item's identifier of which the name is needed
mdlThe Model
indexThe index of the ModelAttribute in the model
Returns
Returns the name if found, NULL otherwise

Here is the caller graph for this function:

int getTreeId ( const char *  str,
Model mdl,
unsigned int  index 
)

Returns the identifier of the tree node or tree leaf whose name is given as a parameter.

Parameters
strThe node or leaf name of which the identifier is needed
mdlThe Model
indexThe index of the ModelAttribute in the Model
Returns
Returns the identifier if found, -1 otherwise

Here is the caller graph for this function:

char* getTreeStr ( int  id,
Model mdl,
unsigned int  index 
)

Returns the name of the tree node or tree leaf whose identifier is given as a parameter.

Parameters
idThe node or leaf identifier of which the name is needed
mdlThe Model
indexThe index of the ModelAttribute in the model
Returns
Returns the name if found, NULL otherwise

Here is the caller graph for this function:

void initModel ( Model mdl)

Initialize the Model.

Parameters
mdlA pointer to the Model to init