![]() |
![]() |
![]() |
cpg-network Reference Manual | ![]() |
---|---|---|---|---|
Top | Description |
#include <cpg-network/cpg-compile-context.h> CpgCompileContext; CpgCompileContext * cpg_compile_context_new (void); void cpg_compile_context_prepend_object (CpgCompileContext *context, CpgObject *object); void cpg_compile_context_save (CpgCompileContext *context); void cpg_compile_context_restore (CpgCompileContext *context); void cpg_compile_context_append_object (CpgCompileContext *context, CpgObject *object); void cpg_compile_context_set_functions (CpgCompileContext *context, GSList *functions); GSList * cpg_compile_context_get_objects (CpgCompileContext *context); GSList * cpg_compile_context_get_functions (CpgCompileContext *context);
The compile context provides information for compiling expressions such as the available user defined functions and the objects that can be used to lookup properties used in the expression.
CpgCompileContext * cpg_compile_context_new (void);
Create a new compile context.
Returns : |
A CpgCompileContext |
void cpg_compile_context_prepend_object (CpgCompileContext *context, CpgObject *object);
Prepend a context object to the list of context objects.
|
A CpgCompileContext |
|
A CpgObject |
void cpg_compile_context_save (CpgCompileContext *context);
Save the current state of the compile context. You can use this to alter the context and restore it to its previous state later. Calls to this function can be nested, but care should be taken to match each call with cpg_compile_context_restore.
|
A CpgCompileContext |
void cpg_compile_context_restore (CpgCompileContext *context);
Restore the previous state of the compile context. Each call to restore must be matched by a previous call to cpg_compile_context_save.
|
A CpgCompileContext |
void cpg_compile_context_append_object (CpgCompileContext *context, CpgObject *object);
Append a context object to the list of context objects.
|
A CpgCompileContext |
|
A CpgObject |
void cpg_compile_context_set_functions (CpgCompileContext *context, GSList *functions);
Set the list of user functions available in the compile context. This function makes a copy of the list but not of its members.
|
A CpgCompileContext |
|
A GSList of CpgFunction |
GSList * cpg_compile_context_get_objects (CpgCompileContext *context);
Get the list of objects to be considered as context for compiling expressions. This returns the internally used list which should not be modified or freed.
|
A CpgCompileContext |
Returns : |
A GSList of CpgObject |
GSList * cpg_compile_context_get_functions (CpgCompileContext *context);
Get the list of custom user functions. This returns the internally used list which should not be modified or freed.
|
A CpgCompileContext |
Returns : |
A GSList of CpgFunction |