29 entity_set_reference_cb (
QofEntity * ent, gpointer user_data)
41 partial_book = (
QofBook *) user_data;
42 g_return_if_fail (partial_book || ent);
52 book_ref_list = g_list_next (book_ref_list);
59 type = ref->
param->param_type;
64 if ((reference) && (reference_setter))
68 reference_setter (ent, reference);
86 temp_col = ref->
param->param_getfcn (ent, ref->
param);
98 collect_setter (ent, temp_col);
113 choice_setter (ent, reference);
118 book_ref_list = g_list_next (book_ref_list);
123 set_each_type (
QofObject * obj, gpointer user_data)
140 ref_ent = (
QofEntity *) param->param_getfcn (ent, param);
146 reference->
type = ent->e_type;
153 reference->
param = param;
156 cm_string = g_strdup (cm_sa);
169 g_return_val_if_fail (param, NULL);
171 g_return_val_if_fail (0 !=
173 return create_reference (ent, param);
184 g_return_if_fail (partial);
gboolean qof_collection_add_entity(QofCollection *coll, QofEntity *ent)
Add an entity to a QOF_TYPE_COLLECT.
#define QOF_TYPE_COLLECT
secondary collections are used for one-to-many references between entities and are implemented using ...
QofCollection * qof_book_get_collection(QofBook *book, QofIdType entity_type)
void qof_object_foreach(QofIdTypeConst type_name, QofBook *book, QofEntityForeachCB cb, gpointer user_data)
gboolean string_to_guid(const gchar *string, GUID *guid)
gpointer qof_book_get_data(QofBook *book, const gchar *key)
#define GUID_ENCODING_LENGTH
struct QofCollection_s QofCollection
const QofParam * qof_class_get_parameter(QofIdTypeConst obj_name, const gchar *parameter)
gboolean qof_util_param_edit(QofInstance *inst, const QofParam *param)
Prepare to edit a parameter.
void qof_book_set_references(QofBook *book)
Read QofEntityReference data for this book and set values.
QofEntity * qof_collection_lookup_entity(QofCollection *col, const GUID *guid)
QofEntityReference * qof_entity_get_reference_from(QofEntity *ent, const QofParam *param)
Get a reference from this entity to another entity.
gchar * guid_to_string_buff(const GUID *guid, gchar *buff)
gboolean qof_util_param_commit(QofInstance *inst, const QofParam *param)
Commit this parameter change, with undo support.
QofIdType qof_collection_get_type(QofCollection *col)
void qof_collection_destroy(QofCollection *col)
const GUID * qof_entity_get_guid(QofEntity *ent)
Dealing with relationships between entities in partial books.
External references in a partial QofBook.
gboolean qof_object_is_choice(QofIdType type)
Does this object contain a choice parameter?
gint safe_strcmp(const gchar *da, const gchar *db)
#define QOF_TYPE_CHOICE
Identify an object as containing a choice.
void qof_object_foreach_type(QofForeachTypeCB cb, gpointer user_data)
#define PARTIAL_QOFBOOK
Flag indicating a partial QofBook.