GnuCash  4.8a-80-g9825132ea+
Data Structures | Macros | Typedefs | Functions

API for registering parameters on objects. More...

#include "qofid.h"

Go to the source code of this file.

Data Structures

struct  QofParam
 This structure is for each queryable parameter in an object. More...
 

Macros

#define QOF_MOD_CLASS   "qof.class"
 
Core types

Core data types for objects that can be used in parameters.

Note that QofIdTypes may also be used and will create a single reference between two known objects.

#define QOF_TYPE_STRING   "string"
 
#define QOF_TYPE_DATE   "date"
 
#define QOF_TYPE_NUMERIC   "numeric"
 
#define QOF_TYPE_DEBCRED   "debcred"
 
#define QOF_TYPE_GUID   "guid"
 
#define QOF_TYPE_INT32   "gint32"
 
#define QOF_TYPE_INT64   "gint64"
 
#define QOF_TYPE_DOUBLE   "double"
 
#define QOF_TYPE_BOOLEAN   "boolean"
 
#define QOF_TYPE_KVP   "kvp"
 
#define QOF_TYPE_CHAR   "character"
 
#define QOF_TYPE_COLLECT   "collection"
 secondary collections are used for one-to-many references between entities and are implemented using ::QofCollection. More...
 

Typedefs

typedef const char * QofType
 Type of Parameters (String, Date, Numeric, GncGUID, etc.)
 
typedef gpointer(* QofAccessFunc) (gpointer object, const QofParam *param)
 The QofAccessFunc defines an arbitrary function pointer for access functions. More...
 
typedef void(* QofSetterFunc) (gpointer, gpointer)
 The QofSetterFunc defines an function pointer for parameter setters. More...
 
typedef gint(* QofCompareFunc) (gpointer a, gpointer b, gint compare_options, QofParam *getter)
 
typedef int(* QofSortFunc) (gconstpointer, gconstpointer)
 This function is the default sort function for a particular object type.
 
typedef void(* QofClassForeachCB) (QofIdTypeConst, gpointer)
 Type definition for the class callback function. More...
 
typedef void(* QofParamForeachCB) (QofParam *, gpointer user_data)
 Type definition for the parameter callback function. More...
 

Functions

void qof_class_register (QofIdTypeConst obj_name, QofSortFunc default_sort_fcn, const QofParam *params)
 This function registers a new object class with the Qof subsystem. More...
 
gboolean qof_class_is_registered (QofIdTypeConst obj_name)
 An example: More...
 
QofType qof_class_get_parameter_type (QofIdTypeConst obj_name, const char *param_name)
 Return the core datatype of the specified object's parameter.
 
const QofParam * qof_class_get_parameter (QofIdTypeConst obj_name, const char *parameter)
 Return the registered Parameter Definition for the requested parameter.
 
QofAccessFunc qof_class_get_parameter_getter (QofIdTypeConst obj_name, const char *parameter)
 Return the object's parameter getter function.
 
QofSetterFunc qof_class_get_parameter_setter (QofIdTypeConst obj_name, const char *parameter)
 Return the object's parameter setter function.
 
void qof_class_foreach (QofClassForeachCB, gpointer user_data)
 Call the callback once for each object class that is registered with the system. More...
 
void qof_class_param_foreach (QofIdTypeConst obj_name, QofParamForeachCB, gpointer user_data)
 Call the callback once for each parameter on the indicated object class. More...
 
GList * qof_class_get_referenceList (QofIdTypeConst type)
 List of the parameters that could be references. More...
 

Detailed Description

API for registering parameters on objects.

Author
Copyright (C) 2002 Derek Atkins warlo.nosp@m.rd@M.nosp@m.IT.ED.nosp@m.U
Copyright (C) 2003 Linas Vepstas linas.nosp@m.@lin.nosp@m.as.or.nosp@m.g
Copyright (c) 2005 Neil Williams linux.nosp@m.@cod.nosp@m.ehelp.nosp@m..co..nosp@m.uk

Definition in file qofclass.h.