Copyright (C) 2000 Bill Gribble <grib@billgribble.com>
Copyright (C) 1997-2002,2004 Linas Vepstas <linas@linas.org>
Copyright 2006 Neil Williams <linux@codehelp.co.uk>
Definition in file qofutil.h.
#include <stddef.h>
#include "qof.h"
#include "qoflog.h"
#include "qofdate.h"
#include "qofutil.h"
#include "qofbackend-p.h"
#include "qofbook.h"
#include "qofinstance.h"
Go to the source code of this file.
typedef enum as string macros | |
| #define | ENUM_BODY(name, value) name value, |
| #define | AS_STRING_CASE(name, value) case name: { return #name; } |
| #define | FROM_STRING_CASE(name, value) |
| #define | DEFINE_ENUM(name, list) |
| #define | AS_STRING_DEC(name, list) const gchar* name##asString(name n); |
| #define | AS_STRING_FUNC(name, list) |
| #define | FROM_STRING_DEC(name, list) |
| #define | FROM_STRING_FUNC(name, list) |
enum as string with no typedef | |
| Similar but used when the enum is NOT a typedef Make sure you use the DEFINE_ENUM_NON_TYPEDEF macro. You can precede the FROM_STRING_FUNC_NON_TYPEDEF and AS_STRING_FUNC_NON_TYPEDEF macros with the keyword static if appropriate.
ENUM_BODY is used in both types. | |
| #define | DEFINE_ENUM_NON_TYPEDEF(name, list) |
| #define | FROM_STRING_DEC_NON_TYPEDEF(name, list) |
| #define | FROM_STRING_CASE_NON_TYPEDEF(name, value) if (strcmp(str, #name) == 0) { *type = name; } |
| #define | FROM_STRING_FUNC_NON_TYPEDEF(name, list) |
| #define | AS_STRING_DEC_NON_TYPEDEF(name, list) const gchar* name##asString(enum name n); |
| #define | AS_STRING_FUNC_NON_TYPEDEF(name, list) |
| #define | AS_STRING_CASE_NON_TYPEDEF(name, value) case name: { return #name; } |
Convenience wrappers | |
| void | qof_init (void) |
| Initialise the Query Object Framework. | |
| void | qof_close (void) |
| Safely close down the Query Object Framework. | |
Defines | |
| #define | QOF_SCANF_LLD "%qd" |
| #define | QOF_MOD_UTIL "qof-utilities" |
| #define | stpcpy g_stpcpy |
| #define | CACHE_INSERT(str) qof_util_string_cache_insert((gconstpointer)(str)) |
| #define | CACHE_REMOVE(str) qof_util_string_cache_remove((str)) |
| #define | CACHE_REPLACE(dst, src) |
| #define | QOF_CACHE_NEW(void) qof_util_string_cache_insert("") |
| #define | QOF_BEGIN_EDIT(inst) |
| #define | QOF_COMMIT_EDIT_PART1(inst) |
| #define | QOF_COMMIT_EDIT_PART2(inst, on_error, on_done, on_free) |
| Macro version of qof_commit_edit_part2. | |
Functions | |
| gint | safe_strcmp (const gchar *da, const gchar *db) |
| gint | safe_strcasecmp (const gchar *da, const gchar *db) |
| gint | null_strcmp (const gchar *da, const gchar *db) |
| gchar * | strncasestr (const guchar *str1, const guchar *str2, size_t len) |
| gchar * | strcasestr (const gchar *str1, const gchar *str2) |
| gchar * | ultostr (gulong val, gint base) |
| gboolean | qof_util_string_isnum (const guchar *s) |
| const gchar * | qof_util_whitespace_filter (const gchar *val) |
| gint | qof_util_bool_to_int (const gchar *val) |
| gchar * | qof_util_param_as_string (QofEntity *ent, QofParam *param) |
| Converts a parameter to a printable string. | |
| void | qof_util_string_cache_destroy (void) |
| void | qof_util_string_cache_remove (gconstpointer key) |
| gpointer | qof_util_string_cache_insert (gconstpointer key) |
| gboolean | qof_begin_edit (QofInstance *inst) |
| function version of QOF_BEGIN_EDIT | |
| gboolean | qof_commit_edit (QofInstance *inst) |
| function version of QOF_COMMIT_EDIT_PART1 | |
| gboolean | qof_commit_edit_part2 (QofInstance *inst, void(*on_error)(QofInstance *, QofBackendError), void(*on_done)(QofInstance *), void(*on_free)(QofInstance *)) |
1.4.6