#include <glib-object.h>
#include "macros.h"
#include "types.h"
Go to the source code of this file.
◆ GIRARA_IS_TEMPLATE
#define GIRARA_IS_TEMPLATE |
( |
| obj | ) |
|
Value:
#define GIRARA_TYPE_TEMPLATE
Definition at line 25 of file template.h.
◆ GIRARA_IS_TEMPLATE_CLASS
#define GIRARA_IS_TEMPLATE_CLASS |
( |
| obj | ) |
|
◆ GIRARA_TEMPLATE
#define GIRARA_TEMPLATE |
( |
| obj | ) |
|
◆ GIRARA_TEMPLATE_CLASS
#define GIRARA_TEMPLATE_CLASS |
( |
| obj | ) |
|
◆ GIRARA_TEMPLATE_GET_CLASS
#define GIRARA_TEMPLATE_GET_CLASS |
( |
| obj | ) |
|
◆ GIRARA_TYPE_TEMPLATE
◆ girara_template_add_variable()
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
◆ girara_template_evaluate()
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
◆ girara_template_get_base()
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
◆ girara_template_get_type()
GType girara_template_get_type |
( |
void | | ) |
|
Returns the type of the template.
- Returns
- the type
◆ girara_template_new()
GiraraTemplate * girara_template_new |
( |
const char * | base | ) |
|
Create new template object.
- Parameters
-
base | a string that is used as template |
- Returns
- a templot object
◆ girara_template_referenced_variables()
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
◆ girara_template_set_base()
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 |
◆ girara_template_set_variable_value()
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 |