CpgCompileContext

CpgCompileContext — The expression compile context

Synopsis

#define             CPG_COMPILE_CONTEXT_CONST           (obj)
struct              CpgCompileContext;
struct              CpgCompileContextClass;
CpgCompileContext * cpg_compile_context_new             (void);
void                cpg_compile_context_save            (CpgCompileContext *context);
void                cpg_compile_context_restore         (CpgCompileContext *context);
void                cpg_compile_context_prepend_object  (CpgCompileContext *context);
void                cpg_compile_context_append_object   (CpgCompileContext *context);
void                cpg_compile_context_prepend_function
                                                        (CpgCompileContext *context);
void                cpg_compile_context_append_function (CpgCompileContext *context);
const GSList *      cpg_compile_context_get_objects     (CpgCompileContext *context);
const GSList *      cpg_compile_context_get_functions   (CpgCompileContext *context);
                    CpgCompileContextPrivate;

Object Hierarchy

  GObject
   +----CpgCompileContext

Description

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.

Details

CPG_COMPILE_CONTEXT_CONST()

#define CPG_COMPILE_CONTEXT_CONST(obj)		(G_TYPE_CHECK_INSTANCE_CAST ((obj), CPG_TYPE_COMPILE_CONTEXT, CpgCompileContext const))


struct CpgCompileContext

struct CpgCompileContext;


struct CpgCompileContextClass

struct CpgCompileContextClass {
	GObjectClass parent_class;
};


cpg_compile_context_new ()

CpgCompileContext * cpg_compile_context_new             (void);

Create a new compile context.

Returns :

A CpgCompileContext

cpg_compile_context_save ()

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.

context :

A CpgCompileContext

cpg_compile_context_restore ()

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.

context :

A CpgCompileContext

cpg_compile_context_prepend_object ()

void                cpg_compile_context_prepend_object  (CpgCompileContext *context);

Prepend a context object to the list of context objects.

context :

A CpgCompileContext

cpg_compile_context_append_object ()

void                cpg_compile_context_append_object   (CpgCompileContext *context);

Append a context object to the list of context objects.

context :

A CpgCompileContext

cpg_compile_context_prepend_function ()

void                cpg_compile_context_prepend_function
                                                        (CpgCompileContext *context);

Prepend a context function to the list of context functions.

context :

A CpgCompileContext

cpg_compile_context_append_function ()

void                cpg_compile_context_append_function (CpgCompileContext *context);

Append a context function to the list of context functions.

context :

A CpgCompileContext

cpg_compile_context_get_objects ()

const 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.

context :

A CpgCompileContext

Returns :

A GSList of CpgObject. [element-type CpgObject][transfer none]

cpg_compile_context_get_functions ()

const 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.

context :

A CpgCompileContext

Returns :

A GSList of CpgFunction. [element-type CpgFunction][transfer none]

CpgCompileContextPrivate

typedef struct _CpgCompileContextPrivate CpgCompileContextPrivate;