93 #define QOF_ID_NONE NULL 94 #define QOF_ID_NULL "null" 96 #define QOF_ID_BOOK "Book" 97 #define QOF_ID_SESSION "Session" 99 #define QSTRCMP g_strcmp0 102 #define QOF_CHECK_TYPE(obj,type) (((obj) != NULL) && \ 103 (0 == QSTRCMP((type),(((QofInstance *)(obj))->e_type)))) 107 #define QOF_CHECK_CAST(obj,e_type,c_type) ( \ 108 QOF_CHECK_TYPE((obj),(e_type)) ? \ 111 g_log (G_LOG_DOMAIN, G_LOG_LEVEL_CRITICAL, \ 112 "Error: Bad QofInstance at %s:%d", __FILE__, __LINE__); \ 150 gpointer user_data, GCompareFunc sort_fn);
162 void qof_collection_set_data (QofCollection *col, gpointer user_data);
190 void qof_collection_remove_entity (
QofInstance *ent);
gboolean qof_collection_is_dirty(const QofCollection *col)
Return value of 'dirty' flag on collection.
QofInstance * qof_collection_lookup_entity(const QofCollection *, const GncGUID *)
Find the entity going only from its guid.
const gchar * QofIdTypeConst
QofIdTypeConst declaration.
void(* QofInstanceForeachCB)(QofInstance *, gpointer user_data)
Callback type for qof_collection_foreach.
globally unique ID User API
Object instance holds common fields that most gnucash objects use.
void qof_collection_foreach_sorted(const QofCollection *col, QofInstanceForeachCB cb_func, gpointer user_data, GCompareFunc sort_fn)
Call the callback for each entity in the collection.
gint qof_collection_compare(QofCollection *target, QofCollection *merge)
Compare two secondary collections.
const gchar * QofIdType
QofIdType declaration.
QofCollection * qof_collection_from_glist(QofIdType type, const GList *glist)
Create a secondary collection from a GList.
void qof_collection_destroy(QofCollection *col)
destroy the collection
QofIdType qof_collection_get_type(const QofCollection *)
return the type that the collection stores
gboolean qof_collection_add_entity(QofCollection *coll, QofInstance *ent)
Add an entity to a QOF_TYPE_COLLECT.
guint qof_collection_count(const QofCollection *col)
return the number of entities in the collection.
gpointer qof_collection_get_data(const QofCollection *col)
Store and retrieve arbitrary object-defined data.
The type used to store guids in C.
QofCollection * qof_collection_new(QofIdType type)
create a new collection of entities of type