Classes | Defines | Functions | Variables

tuple_formatter.c File Reference

#include <glib.h>
#include <mowgli.h>
#include "config.h"
#include "tuple.h"
#include "tuple_formatter.h"
#include "audstrings.h"
#include "tuple_compiler.h"

Go to the source code of this file.

Classes

struct  TupleFormatterContext
struct  TupleFormatterExpression
struct  TupleFormatterFunction

Defines

#define TUPLE_USE_COMPILER
#define _TRACE(fmt,...)

Functions

gchar * tuple_formatter_process_construct (Tuple *tuple, const gchar *string)
gchar * tuple_formatter_process_expr (Tuple *tuple, const gchar *expression, const gchar *argument)
gchar * tuple_formatter_process_function (Tuple *tuple, const gchar *expression, const gchar *argument)
void tuple_formatter_register_expression (const gchar *keyword, gboolean(*func)(Tuple *tuple, const gchar *argument))
void tuple_formatter_register_function (const gchar *keyword, gchar *(*func)(Tuple *tuple, gchar **argument))
static gboolean tuple_formatter_expression_match (Tuple *tuple, const gchar *expression)
static gboolean tuple_formatter_expression_nonmatch (Tuple *tuple, const gchar *expression)
static gboolean tuple_formatter_expression_empty (Tuple *tuple, const gchar *expression)
static gboolean tuple_formatter_expression_exists (Tuple *tuple, const gchar *expression)
static gchar * tuple_formatter_function_version (Tuple *tuple, gchar **args)
gchar * tuple_formatter_process_string (const Tuple *tuple, const gchar *string)
gchar * tuple_formatter_make_title_string (const Tuple *tuple, const gchar *string)

Variables

static GStaticRWLock tuplec_rwlock = G_STATIC_RW_LOCK_INIT
static GList * tuple_formatter_expr_list = NULL
static GList * tuple_formatter_func_list = NULL

Define Documentation

#define _TRACE (   fmt,
  ... 
)

Definition at line 51 of file tuple_formatter.c.

Referenced by tuple_formatter_process_construct().

#define TUPLE_USE_COMPILER

Definition at line 34 of file tuple_formatter.c.


Function Documentation

static gboolean tuple_formatter_expression_empty ( Tuple tuple,
const gchar *  expression 
) [static]
static gboolean tuple_formatter_expression_exists ( Tuple tuple,
const gchar *  expression 
) [static]

Definition at line 506 of file tuple_formatter.c.

Referenced by tuple_formatter_process_string().

static gboolean tuple_formatter_expression_match ( Tuple tuple,
const gchar *  expression 
) [static]
static gboolean tuple_formatter_expression_nonmatch ( Tuple tuple,
const gchar *  expression 
) [static]

Definition at line 470 of file tuple_formatter.c.

Referenced by tuple_formatter_process_string().

static gchar* tuple_formatter_function_version ( Tuple tuple,
gchar **  args 
) [static]

Definition at line 513 of file tuple_formatter.c.

Referenced by tuple_formatter_process_string().

gchar* tuple_formatter_make_title_string ( const Tuple tuple,
const gchar *  string 
)

Definition at line 594 of file tuple_formatter.c.

Referenced by title_from_tuple().

gchar* tuple_formatter_process_construct ( Tuple tuple,
const gchar *  string 
)
gchar* tuple_formatter_process_expr ( Tuple tuple,
const gchar *  expression,
const gchar *  argument 
)

Definition at line 269 of file tuple_formatter.c.

Referenced by tuple_formatter_process_construct().

gchar* tuple_formatter_process_function ( Tuple tuple,
const gchar *  expression,
const gchar *  argument 
)

Definition at line 325 of file tuple_formatter.c.

Referenced by tuple_formatter_process_construct().

gchar* tuple_formatter_process_string ( const Tuple tuple,
const gchar *  string 
)

Definition at line 525 of file tuple_formatter.c.

Referenced by tuple_formatter_make_title_string().

void tuple_formatter_register_expression ( const gchar *  keyword,
gboolean(*)(Tuple *tuple, const gchar *argument)  func 
)

Definition at line 368 of file tuple_formatter.c.

Referenced by tuple_formatter_process_string().

void tuple_formatter_register_function ( const gchar *  keyword,
gchar *(*)(Tuple *tuple, gchar **argument)  func 
)

Definition at line 385 of file tuple_formatter.c.

Referenced by tuple_formatter_process_string().


Variable Documentation

GList* tuple_formatter_expr_list = NULL [static]
GList* tuple_formatter_func_list = NULL [static]
GStaticRWLock tuplec_rwlock = G_STATIC_RW_LOCK_INIT [static]

Definition at line 45 of file tuple_formatter.c.

Referenced by tuple_formatter_process_string().