87 #define QOF_ID_NONE NULL
88 #define QOF_ID_NULL "null"
90 #define QOF_ID_BOOK "Book"
91 #define QOF_ID_SESSION "Session"
94 #define QOF_ENTITY(object) ((QofEntity *)(object))
97 #define QSTRCMP(da,db) ({ \
100 if ((da) != (db)) { \
101 val = strcmp ((da), (db)); \
104 if ((!(da)) && (db)) { \
107 if ((da) && (!(db))) { \
114 #define QOF_CHECK_TYPE(obj,type) (((obj) != NULL) && \
115 (0 == QSTRCMP((type),(((QofEntity *)(obj))->e_type))))
119 #define QOF_CHECK_CAST(obj,e_type,c_type) ( \
120 QOF_CHECK_TYPE((obj),(e_type)) ? \
123 g_log (G_LOG_DOMAIN, G_LOG_LEVEL_CRITICAL, \
124 "Error: Bad QofEntity at %s:%d", __FILE__, __LINE__); \
gboolean qof_collection_add_entity(QofCollection *coll, QofEntity *ent)
Add an entity to a QOF_TYPE_COLLECT.
gint qof_collection_compare(QofCollection *target, QofCollection *merge)
Compare two secondary collections.
gboolean qof_collection_is_dirty(QofCollection *col)
globally unique ID User API
struct QofCollection_s QofCollection
QofCollection * qof_collection_from_glist(QofIdType type, GList *glist)
Create a secondary collection from a GList.
guint qof_collection_count(QofCollection *col)
QofEntity * qof_collection_lookup_entity(QofCollection *, const GUID *)
void qof_collection_foreach(QofCollection *, QofEntityForeachCB, gpointer user_data)
void qof_collection_set_data(QofCollection *col, gpointer user_data)
void qof_entity_release(QofEntity *)
QofIdType qof_collection_get_type(QofCollection *)
gpointer qof_collection_get_data(QofCollection *col)
const gchar * QofIdTypeConst
void qof_collection_destroy(QofCollection *col)
const GUID * qof_entity_get_guid(QofEntity *)
QofCollection * qof_collection_new(QofIdType type)
gboolean qof_collection_merge(QofCollection *target, QofCollection *merge)
Merge two QOF_TYPE_COLLECT of the same type.
void qof_entity_init(QofEntity *, QofIdType, QofCollection *)
const gchar * QofLogModule
void(* QofEntityForeachCB)(QofEntity *, gpointer user_data)