#include "template.h"
#include "utils.h"
#include "datastructures.h"
#include <glib.h>
Go to the source code of this file.
| Enumerator |
|---|
| PROP_0 |
|
| PROP_BASE |
|
Definition at line 93 of file template.c.
| Enumerator |
|---|
| BASE_CHANGED |
|
| VARIABLE_CHANGED |
|
| TEMPLATE_CHANGED |
|
| LAST_SIGNAL |
|
Definition at line 99 of file template.c.
| bool girara_template_add_variable |
( |
GiraraTemplate * |
object, |
|
|
const char * |
name |
|
) |
| |
Register a variable.
- Parameters
-
| object | GiraraTemplate object |
| name | name of the variable |
- Returns
- true if the variable was added, false otherwise
Definition at line 365 of file template.c.
| char* girara_template_evaluate |
( |
GiraraTemplate * |
object | ) |
|
Replace all variables with their values in the template.
- Parameters
-
| object | GiraraTemplate object |
- Returns
- evaluated template, needes to be deallocated with g_free
Definition at line 441 of file template.c.
| const char* girara_template_get_base |
( |
GiraraTemplate * |
object | ) |
|
Get the base string of the template.
- Parameters
-
| object | GiraraTemplate object |
- Returns
- string that is used as template
Definition at line 294 of file template.c.
| GiraraTemplate* girara_template_new |
( |
const char * |
base | ) |
|
Create new template object.
- Parameters
-
| base | a string that is used as template |
- Returns
- a templot object
Definition at line 263 of file template.c.
| girara_list_t* girara_template_referenced_variables |
( |
GiraraTemplate * |
object | ) |
|
Get list of variable names referenced in the template.
- Parameters
-
| object | GiraraTemplate object |
- Returns
- list of variables names referenced in the template
Definition at line 356 of file template.c.
| void girara_template_set_base |
( |
GiraraTemplate * |
object, |
|
|
const char * |
base |
|
) |
| |
Set the base string of the template.
- Parameters
-
| object | GiraraTemplate object |
| base | a string that is used as template |
Definition at line 279 of file template.c.
| void girara_template_set_variable_value |
( |
GiraraTemplate * |
object, |
|
|
const char * |
name, |
|
|
const char * |
value |
|
) |
| |
Set value of a variable.
- Parameters
-
| object | GiraraTemplate object |
| name | name of the variable |
| value | value of the variable |
Definition at line 398 of file template.c.