Camel.SExp

g Camel.SExp Camel.SExp GObject.Object GObject.Object GObject.Object->Camel.SExp

Subclasses:

None

Methods

Inherited:

GObject.Object (37)

Structs:

GObject.ObjectClass (5)

class

encode_bool (string, v_bool)

class

encode_string (string, v_string)

class

new ()

class

to_sql_sexp (sexp)

add_variable (scope, name, value)

error ()

evaluate_occur_times (start, end)

input_file (fd)

input_text (text, len)

parse ()

remove_symbol (scope, name)

result_free (result)

resultv_free (argv)

set_scope (scope)

Virtual Methods

Inherited:

GObject.Object (7)

Properties

None

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Name

Type

Access

Description

parent

GObject.Object

r

Class Details

class Camel.SExp(**kwargs)
Bases:

GObject.Object

Abstract:

No

Structure:

Camel.SExpClass

New in version 3.4.

classmethod encode_bool(string, v_bool)
Parameters:

Encode a bool into an s-expression string. Bools are encoded using #t #f syntax.

New in version 3.4.

classmethod encode_string(string, v_string)
Parameters:

Add a c string v_string to the s-expression stored in the gstring s. Quotes are added, and special characters are escaped appropriately.

New in version 3.4.

classmethod new()
Returns:

a new Camel.SExp

Return type:

Camel.SExp

New in version 3.4.

classmethod to_sql_sexp(sexp)
Parameters:

sexp (str) – a search expression to convert

Returns:

a newly allocated string, an SQL ‘WHERE’ Camel.part statement, or None, when could not convert it. Free it with GLib.free(), when done with it.

Return type:

str or None

Converts a search expression to an SQL ‘WHERE’ Camel.part statement, without the ‘WHERE’ keyword.

New in version 2.26.

add_variable(scope, name, value)
Parameters:

Adds a variable named name to the given scope, set to the given value.

New in version 3.4.

error()
Returns:

Set error string on the self, or None, when none is set

Return type:

str or None

New in version 3.4.

evaluate_occur_times(start, end)
Parameters:
  • start (int) –

  • end (int) –

Return type:

bool

input_file(fd)
Parameters:

fd (int) – a file descriptor

Prepares to scan a file.

New in version 3.4.

input_text(text, len)
Parameters:
  • text (str) – a text buffer to scan

  • len (int) – the length of the text buffer

Prepares to scan a text buffer.

New in version 3.4.

parse()
Return type:

int

New in version 3.4.

remove_symbol(scope, name)
Parameters:
  • scope (int) – a scope

  • name (str) – a symbol name

Revoes a symbol from a scope.

New in version 3.4.

result_free(result)
Parameters:

result (Camel.SExpResult or None) – a Camel.SExpResult to free

Frees the result and its internal data. Does nothing, when the result is None.

New in version 3.4.

resultv_free(argv)
Parameters:

argv ([Camel.SExpResult]) – an array of Camel.SExpResult to free

Frees an array of results.

New in version 3.4.

set_scope(scope)
Parameters:

scope (int) – a scope to set

Returns:

the previous scope id

Return type:

int

sets the current scope for the scanner.

New in version 3.4.