CpgEmbeddedString

CpgEmbeddedString

Synopsis

#define             CPG_EMBEDDED_STRING_CONST           (obj)
enum                CpgEmbeddedStringNodeType;
struct              CpgEmbeddedString;
struct              CpgEmbeddedStringClass;
CpgEmbeddedString * cpg_embedded_string_new             (void);
CpgEmbeddedString * cpg_embedded_string_new_from_string (gchar const *s);
CpgEmbeddedString * cpg_embedded_string_new_from_double (gdouble s);
CpgEmbeddedString * cpg_embedded_string_new_from_integer
                                                        (gint s);
CpgEmbeddedString * cpg_embedded_string_push            (CpgEmbeddedString *s,
                                                         CpgEmbeddedStringNodeType type,
                                                         gint depth);
CpgEmbeddedString * cpg_embedded_string_pop             (CpgEmbeddedString *s);
CpgEmbeddedString * cpg_embedded_string_push_brace      (CpgEmbeddedString *s);
CpgEmbeddedString * cpg_embedded_string_pop_brace       (CpgEmbeddedString *s);
gint                cpg_embedded_string_brace_level     (CpgEmbeddedString *s);
CpgEmbeddedString * cpg_embedded_string_add_string      (CpgEmbeddedString *s,
                                                         CpgEmbeddedString *other);
CpgEmbeddedString * cpg_embedded_string_add_text        (CpgEmbeddedString *s,
                                                         gchar const *text);
CpgEmbeddedString * cpg_embedded_string_prepend_text    (CpgEmbeddedString *s,
                                                         gchar const *text);
gchar const       * cpg_embedded_string_expand          (CpgEmbeddedString *s,
                                                         CpgEmbeddedContext *ctx,
                                                         GError **error);
GSList *            cpg_embedded_string_expand_multiple (CpgEmbeddedString *s,
                                                         CpgEmbeddedContext *ctx,
                                                         GError **error);
void                cpg_embedded_string_clear_cache     (CpgEmbeddedString *s);
gchar *             cpg_embedded_string_collapse        (gchar const * const *s);
                    CpgEmbeddedStringPrivate;

Object Hierarchy

  GEnum
   +----CpgEmbeddedStringNodeType
  GObject
   +----CpgEmbeddedString

Implemented Interfaces

CpgEmbeddedString implements CpgStatement.

Description

Details

CPG_EMBEDDED_STRING_CONST()

#define CPG_EMBEDDED_STRING_CONST(obj)		(G_TYPE_CHECK_INSTANCE_CAST ((obj), CPG_TYPE_EMBEDDED_STRING, CpgEmbeddedString const))


enum CpgEmbeddedStringNodeType

typedef enum
{
	CPG_EMBEDDED_STRING_NODE_TEXT,
	CPG_EMBEDDED_STRING_NODE_EQUATION,
	CPG_EMBEDDED_STRING_NODE_INDIRECTION,
	CPG_EMBEDDED_STRING_NODE_REDUCE,
	CPG_EMBEDDED_STRING_NODE_MAP,
	CPG_EMBEDDED_STRING_NODE_CONDITION
} CpgEmbeddedStringNodeType;


struct CpgEmbeddedString

struct CpgEmbeddedString;


struct CpgEmbeddedStringClass

struct CpgEmbeddedStringClass {
	GObjectClass parent_class;
};


cpg_embedded_string_new ()

CpgEmbeddedString * cpg_embedded_string_new             (void);


cpg_embedded_string_new_from_string ()

CpgEmbeddedString * cpg_embedded_string_new_from_string (gchar const *s);


cpg_embedded_string_new_from_double ()

CpgEmbeddedString * cpg_embedded_string_new_from_double (gdouble s);


cpg_embedded_string_new_from_integer ()

CpgEmbeddedString * cpg_embedded_string_new_from_integer
                                                        (gint s);


cpg_embedded_string_push ()

CpgEmbeddedString * cpg_embedded_string_push            (CpgEmbeddedString *s,
                                                         CpgEmbeddedStringNodeType type,
                                                         gint depth);

Push a context type into the embedded string.

s :

A CpgEmbeddedString

type :

A CpgEmbeddedStringNodeType

depth :

The depth of the embedded string

Returns :

The CpgEmbeddedString (s). [transfer none]

cpg_embedded_string_pop ()

CpgEmbeddedString * cpg_embedded_string_pop             (CpgEmbeddedString *s);

Pop an embedded context.

s :

A CpgEmbeddedString

Returns :

The CpgEmbeddedString (s). [transfer none]

cpg_embedded_string_push_brace ()

CpgEmbeddedString * cpg_embedded_string_push_brace      (CpgEmbeddedString *s);


cpg_embedded_string_pop_brace ()

CpgEmbeddedString * cpg_embedded_string_pop_brace       (CpgEmbeddedString *s);


cpg_embedded_string_brace_level ()

gint                cpg_embedded_string_brace_level     (CpgEmbeddedString *s);


cpg_embedded_string_add_string ()

CpgEmbeddedString * cpg_embedded_string_add_string      (CpgEmbeddedString *s,
                                                         CpgEmbeddedString *other);


cpg_embedded_string_add_text ()

CpgEmbeddedString * cpg_embedded_string_add_text        (CpgEmbeddedString *s,
                                                         gchar const *text);

Adds a text node to the embedded string.

s :

A CpgEmbeddedString

text :

The text to add

Returns :

A CpgEmbeddedString. [transfer none]

cpg_embedded_string_prepend_text ()

CpgEmbeddedString * cpg_embedded_string_prepend_text    (CpgEmbeddedString *s,
                                                         gchar const *text);

Prepends a text node to the embedded string.

s :

A CpgEmbeddedString

text :

The text to add

Returns :

A CpgEmbeddedString. [transfer none]

cpg_embedded_string_expand ()

gchar const       * cpg_embedded_string_expand          (CpgEmbeddedString *s,
                                                         CpgEmbeddedContext *ctx,
                                                         GError **error);


cpg_embedded_string_expand_multiple ()

GSList *            cpg_embedded_string_expand_multiple (CpgEmbeddedString *s,
                                                         CpgEmbeddedContext *ctx,
                                                         GError **error);

Expand string with braces syntax.

s :

A CpgEmbeddedString

ctx :

A CpgEmbeddedContext

Returns :

A GSList of CpgExpansion. [element-type CpgExpansion][transfer full]

cpg_embedded_string_clear_cache ()

void                cpg_embedded_string_clear_cache     (CpgEmbeddedString *s);


cpg_embedded_string_collapse ()

gchar *             cpg_embedded_string_collapse        (gchar const * const *s);


CpgEmbeddedStringPrivate

typedef struct _CpgEmbeddedStringPrivate CpgEmbeddedStringPrivate;