Scope
Object Hierarchy:
Description:
[ CCode ( ref_function = "tmpl_scope_ref" , type_id = "tmpl_scope_get_type ()" , unref_function = "tmpl_scope_unref" ) ]
[ Compact ]
public class Scope
[ Compact ]
public class Scope
Namespace: Template
Package: template-glib-1.0
Content:
Creation methods:
- public Scope ()
Creates a new scope to contain variables and custom expressions,
Methods:
- public unowned Symbol @get (string name)
If the symbol could not be found, it will be allocated.
- public Scope @ref ()
- public void @set (string name, Symbol? symbol)
If the symbol already exists, it will be overwritten.
- public string? dup_string (string name)
Gets a string if the symbol
name
is a string. - public string[] list_symbols (bool recursive)
Gets the names of all symbols within the scope.
- public Scope new_with_parent ()
Creates a new scope to contain variables and custom expressions, If this is set, the parent scope will be inherited.
- public unowned Symbol? peek (string name)
If the symbol could not be found, null is returned.
- public bool require (string namespace_, string? version)
Imports
namespace_
into this so it can be used by expressions. - public void set_boolean (string name, bool value)
Sets the value of the symbol named
name
to a gboolean value ofvalue
. - public void set_double (string name, double value)
Sets the value of the symbol named
name
to a gdouble value ofvalue
. - public void set_null (string name)
- public void set_object (string name, Object? value)
Sets the value of the symbol named
name
to the objectvalue
. - public void set_resolver (owned ScopeResolver resolver)
- public void set_string (string name, string? value)
Sets the value of the symbol named
name
to a string matchingvalue
. - public void set_strv (string name, string[]? value)
Sets the value of the symbol named
name
to the strvvalue
. - public void set_value (string name, Value? value)
Sets the contents of the symbol named
name
to the valuevalue
. - public void set_variant (string name, Variant? value)
Sets the value of the symbol named
name
to the variantvalue
. - public void take (string name, owned Symbol? symbol)
Sets the symbol named
name
tosymbol
inscope
. - public void unref ()