GnuCash 2.4.99
Defines | Functions
qofutil.h File Reference

QOF utility functions. More...

#include <stddef.h>
#include "qof.h"
#include "qoflog.h"
#include "qofutil.h"
#include "qofbackend.h"
#include "qofclass.h"
#include "qofbook.h"
#include "qofinstance.h"

Go to the source code of this file.

Defines

#define QOF_MOD_UTIL   "qof.utilities"
#define stpcpy   g_stpcpy
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; }

Functions

void g_hash_table_foreach_sorted (GHashTable *hash_table, GHFunc func, gpointer user_data, GCompareFunc compare_func)
gboolean qof_utf8_substr_nocase (const gchar *haystack, const gchar *needle)
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 * ultostr (gulong val, gint base)
gboolean gnc_strisnum (const gchar *s)
gboolean qof_begin_edit (QofInstance *inst)
gboolean qof_commit_edit (QofInstance *inst)
gboolean qof_commit_edit_part2 (QofInstance *inst, void(*on_error)(QofInstance *, QofBackendError), void(*on_done)(QofInstance *), void(*on_free)(QofInstance *))
Convenience wrappers
void qof_init (void)
 Initialise the Query Object Framework.
void qof_close (void)
 Safely close down the Query Object Framework.

Detailed Description

QOF utility functions.

Author:
Copyright (C) 1997 Robin D. Clark <rclark@cs.hmc.edu>
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.

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines