[Gnucash-changes] Neil Williams's "QOF create: functionality added"
patch.
Derek Atkins
warlord at cvs.gnucash.org
Thu Aug 19 15:47:37 EDT 2004
Log Message:
-----------
Neil Williams's "QOF create: functionality added" patch.
QOF create: adding functions to be used with
qof_object_new_instance for new qof_book_merge objects, including
business objects.
Small documentation tweak to make QofEntity and QofParam
structures visible to doxygen.
Modified Files:
--------------
gnucash:
ChangeLog
gnucash/src/business/business-core:
gncBillTerm.c
gncBillTerm.h
gncCustomer.c
gncCustomer.h
gncEmployee.c
gncEmployee.h
gncEntry.c
gncInvoice.c
gncJob.c
gncTaxTable.c
gncTaxTable.h
gncVendor.c
gnucash/src/engine:
Account.c
Group.c
Transaction.c
gnc-pricedb.c
qofbook.h
qofid.h
Revision Data
-------------
Index: ChangeLog
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/ChangeLog,v
retrieving revision 1.1832
retrieving revision 1.1833
diff -LChangeLog -LChangeLog -u -r1.1832 -r1.1833
--- ChangeLog
+++ ChangeLog
@@ -1,3 +1,14 @@
+2004-18-19 Derek Atkins <derek at ihtfp.com>
+
+ Neil Williams's "QOF create: functionality added" patch:
+
+ QOF create: adding functions to be used with
+ qof_object_new_instance for new qof_book_merge objects, including
+ business objects.
+
+ Small documentation tweak to make QofEntity and QofParam
+ structures visible to doxygen.
+
2004-08-19 Derek Atkins <derek at ihtfp.com>
* configure.in: change the gtkhtml order to search for >= 1.1 before
Index: gncEmployee.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/business/business-core/gncEmployee.c,v
retrieving revision 1.44
retrieving revision 1.45
diff -Lsrc/business/business-core/gncEmployee.c -Lsrc/business/business-core/gncEmployee.c -u -r1.44 -r1.45
--- src/business/business-core/gncEmployee.c
+++ src/business/business-core/gncEmployee.c
@@ -403,7 +403,7 @@
interface_version: QOF_OBJECT_VERSION,
e_type: _GNC_MOD_NAME,
type_label: "Employee",
- create: NULL,
+ create: (gpointer)gncEmployeeCreate,
book_begin: NULL,
book_end: NULL,
is_dirty: qof_collection_is_dirty,
@@ -417,7 +417,14 @@
{
static QofParam params[] = {
{ EMPLOYEE_ID, QOF_TYPE_STRING, (QofAccessFunc)gncEmployeeGetID, (QofSetterFunc)gncEmployeeSetID },
- { EMPLOYEE_USERNAME, QOF_TYPE_STRING, (QofAccessFunc)gncEmployeeGetUsername, (QofSetterFunc)gncEmployeeSetUsername },
+ { EMPLOYEE_USERNAME, QOF_TYPE_STRING, (QofAccessFunc)gncEmployeeGetUsername,
+ (QofSetterFunc)gncEmployeeSetUsername },
+ { EMPLOYEE_LANGUAGE, QOF_TYPE_STRING, (QofAccessFunc)gncEmployeeGetLanguage,
+ (QofSetterFunc)gncEmployeeSetLanguage },
+ { EMPLOYEE_ACL, QOF_TYPE_STRING, (QofAccessFunc)gncEmployeeGetAcl, (QofSetterFunc)gncEmployeeSetAcl },
+ { EMPLOYEE_WORKDAY, QOF_TYPE_NUMERIC, (QofAccessFunc)gncEmployeeGetWorkday,
+ (QofSetterFunc)gncEmployeeSetWorkday },
+ { EMPLOYEE_RATE, QOF_TYPE_NUMERIC, (QofAccessFunc)gncEmployeeGetRate, (QofSetterFunc)gncEmployeeSetRate },
{ EMPLOYEE_ADDR, GNC_ADDRESS_MODULE_NAME, (QofAccessFunc)gncEmployeeGetAddr, NULL },
{ QOF_PARAM_ACTIVE, QOF_TYPE_BOOLEAN, (QofAccessFunc)gncEmployeeGetActive, (QofSetterFunc)gncEmployeeSetActive },
{ QOF_PARAM_BOOK, QOF_ID_BOOK, (QofAccessFunc)qof_instance_get_book, NULL },
Index: gncBillTerm.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/business/business-core/gncBillTerm.h,v
retrieving revision 1.13
retrieving revision 1.14
diff -Lsrc/business/business-core/gncBillTerm.h -Lsrc/business/business-core/gncBillTerm.h -u -r1.13 -r1.14
--- src/business/business-core/gncBillTerm.h
+++ src/business/business-core/gncBillTerm.h
@@ -44,6 +44,18 @@
#define GNC_IS_BILLTERM(obj) (QOF_CHECK_TYPE((obj), GNC_ID_BILLTERM))
#define GNC_BILLTERM(obj) (QOF_CHECK_CAST((obj), GNC_ID_BILLTERM, GncBillTerm))
+/** @name BillTerm parameter names */
+/** @{ */
+#define GNC_BILLTERM_NAME "name"
+#define GNC_BILLTERM_DESC "description"
+#define GNC_BILLTERM_DUEDAYS "number of days due"
+#define GNC_BILLTERM_DISCDAYS "number of discounted days"
+#define GNC_BILLTERM_CUTOFF "cut off"
+#define GNC_BILLTERM_TYPE "bill type"
+#define GNC_BILLTERM_DISCOUNT "amount of discount"
+#define GNC_BILLTERM_REFCOUNT "reference count"
+/** @} */
+
/**
* How to interpret the amount.
* You can interpret it as a VALUE or a PERCENT.
Index: gncCustomer.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/business/business-core/gncCustomer.h,v
retrieving revision 1.21
retrieving revision 1.22
diff -Lsrc/business/business-core/gncCustomer.h -Lsrc/business/business-core/gncCustomer.h -u -r1.21 -r1.22
--- src/business/business-core/gncCustomer.h
+++ src/business/business-core/gncCustomer.h
@@ -74,6 +74,11 @@
void gncCustomerAddJob (GncCustomer *customer, GncJob *job);
void gncCustomerRemoveJob (GncCustomer *customer, GncJob *job);
+
+/** added for QOF standardisation */
+void gncCustomerSetTaxIncluded_q (GncCustomer *customer, gint taxincl);
+gint gncCustomerGetTaxIncluded_q (GncCustomer *cust);
+
/** @} */
/** @name Get Functions */
@@ -111,11 +116,14 @@
gboolean gncCustomerIsDirty (GncCustomer *customer);
int gncCustomerCompare (GncCustomer *a, GncCustomer *b);
-#define CUSTOMER_ID "id"
-#define CUSTOMER_NAME "name"
-#define CUSTOMER_ADDR "addr"
+#define CUSTOMER_ID "id"
+#define CUSTOMER_NAME "name"
+#define CUSTOMER_ADDR "addr"
#define CUSTOMER_SHIPADDR "shipaddr"
-
+#define CUSTOMER_NOTES "notes"
+#define CUSTOMER_DISCOUNT "amount of discount"
+#define CUSTOMER_CREDIT "amount of credit"
+#define CUSTOMER_TT_OVER "tax table override"
/** @deprecated functions, should be removed */
#define gncCustomerGetGUID(x) qof_instance_get_guid(QOF_INSTANCE(x))
#define gncCustomerRetGUID(x) (x ? *(qof_instance_get_guid(QOF_INSTANCE(x))) : *(guid_null()))
Index: gncInvoice.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/business/business-core/gncInvoice.c,v
retrieving revision 1.91
retrieving revision 1.92
diff -Lsrc/business/business-core/gncInvoice.c -Lsrc/business/business-core/gncInvoice.c -u -r1.91 -r1.92
--- src/business/business-core/gncInvoice.c
+++ src/business/business-core/gncInvoice.c
@@ -1363,7 +1363,7 @@
interface_version: QOF_OBJECT_VERSION,
e_type: _GNC_MOD_NAME,
type_label: "Invoice",
- create: NULL,
+ create: (gpointer)gncInvoiceCreate,
book_begin: NULL,
book_end: NULL,
is_dirty: qof_collection_is_dirty,
Index: gncCustomer.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/business/business-core/gncCustomer.c,v
retrieving revision 1.60
retrieving revision 1.61
diff -Lsrc/business/business-core/gncCustomer.c -Lsrc/business/business-core/gncCustomer.c -u -r1.60 -r1.61
--- src/business/business-core/gncCustomer.c
+++ src/business/business-core/gncCustomer.c
@@ -73,7 +73,7 @@
gboolean active;
GList * jobs;
- /* The following fields aer unique to 'customer' */
+ /* The following fields are unique to 'customer' */
gnc_numeric credit;
gnc_numeric discount;
GncAddress * shipaddr;
@@ -270,6 +270,13 @@
gncCustomerCommitEdit (cust);
}
+void gncCustomerSetTaxIncluded_q (GncCustomer *cust, gint taxincl)
+{
+ GncTaxIncluded g = taxincl;
+ if(!g) return;
+ gncCustomerSetTaxIncluded(cust, g);
+}
+
void gncCustomerSetTaxIncluded (GncCustomer *cust, GncTaxIncluded taxincl)
{
if (!cust) return;
@@ -444,6 +451,11 @@
return cust->terms;
}
+gint gncCustomerGetTaxIncluded_q (GncCustomer *cust)
+{
+ return (GncTaxIncluded)gncCustomerGetTaxIncluded(cust);
+}
+
GncTaxIncluded gncCustomerGetTaxIncluded (GncCustomer *cust)
{
if (!cust) return GNC_TAXINCLUDED_USEGLOBAL;
@@ -536,7 +548,7 @@
interface_version: QOF_OBJECT_VERSION,
e_type: _GNC_MOD_NAME,
type_label: "Customer",
- create: NULL,
+ create: (gpointer)gncCustomerCreate,
book_begin: NULL,
book_end: NULL,
is_dirty: qof_collection_is_dirty,
@@ -551,8 +563,15 @@
static QofParam params[] = {
{ CUSTOMER_ID, QOF_TYPE_STRING, (QofAccessFunc)gncCustomerGetID, (QofSetterFunc)gncCustomerSetID },
{ CUSTOMER_NAME, QOF_TYPE_STRING, (QofAccessFunc)gncCustomerGetName, (QofSetterFunc)gncCustomerSetName },
+ { CUSTOMER_NOTES, QOF_TYPE_STRING, (QofAccessFunc)gncCustomerGetNotes, (QofSetterFunc)gncCustomerSetNotes },
+ { CUSTOMER_DISCOUNT, QOF_TYPE_NUMERIC, (QofAccessFunc)gncCustomerGetDiscount,
+ (QofSetterFunc)gncCustomerSetDiscount },
+ { CUSTOMER_CREDIT, QOF_TYPE_NUMERIC, (QofAccessFunc)gncCustomerGetCredit,
+ (QofSetterFunc)gncCustomerSetCredit },
{ CUSTOMER_ADDR, GNC_ADDRESS_MODULE_NAME, (QofAccessFunc)gncCustomerGetAddr, NULL },
{ CUSTOMER_SHIPADDR, GNC_ADDRESS_MODULE_NAME, (QofAccessFunc)gncCustomerGetShipAddr, NULL },
+ { CUSTOMER_TT_OVER, QOF_TYPE_BOOLEAN, (QofAccessFunc)gncCustomerGetTaxTableOverride,
+ (QofSetterFunc)gncCustomerSetTaxTableOverride },
{ QOF_PARAM_ACTIVE, QOF_TYPE_BOOLEAN, (QofAccessFunc)gncCustomerGetActive, (QofSetterFunc)gncCustomerSetActive },
{ QOF_PARAM_BOOK, QOF_ID_BOOK, (QofAccessFunc)qof_instance_get_book, NULL },
{ QOF_PARAM_GUID, QOF_TYPE_GUID, (QofAccessFunc)qof_instance_get_guid, NULL },
Index: gncEmployee.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/business/business-core/gncEmployee.h,v
retrieving revision 1.17
retrieving revision 1.18
diff -Lsrc/business/business-core/gncEmployee.h -Lsrc/business/business-core/gncEmployee.h -u -r1.17 -r1.18
--- src/business/business-core/gncEmployee.h
+++ src/business/business-core/gncEmployee.h
@@ -92,11 +92,13 @@
gboolean gncEmployeeIsDirty (GncEmployee *employee);
-
-
-#define EMPLOYEE_ID "id"
+#define EMPLOYEE_ID "id"
#define EMPLOYEE_USERNAME "username"
-#define EMPLOYEE_ADDR "addr"
+#define EMPLOYEE_ADDR "addr"
+#define EMPLOYEE_LANGUAGE "native language"
+#define EMPLOYEE_ACL "acl"
+#define EMPLOYEE_WORKDAY "workday"
+#define EMPLOYEE_RATE "rate"
/** deprecated routines */
#define gncEmployeeGetGUID(E) qof_entity_get_guid(QOF_ENTITY(E))
Index: gncVendor.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/business/business-core/gncVendor.c,v
retrieving revision 1.49
retrieving revision 1.50
diff -Lsrc/business/business-core/gncVendor.c -Lsrc/business/business-core/gncVendor.c -u -r1.49 -r1.50
--- src/business/business-core/gncVendor.c
+++ src/business/business-core/gncVendor.c
@@ -486,7 +486,7 @@
interface_version: QOF_OBJECT_VERSION,
e_type: _GNC_MOD_NAME,
type_label: "Vendor",
- create: NULL,
+ create: (gpointer)gncVendorCreate,
book_begin: NULL,
book_end: NULL,
is_dirty: qof_collection_is_dirty,
Index: gncJob.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/business/business-core/gncJob.c,v
retrieving revision 1.45
retrieving revision 1.46
diff -Lsrc/business/business-core/gncJob.c -Lsrc/business/business-core/gncJob.c -u -r1.45 -r1.46
--- src/business/business-core/gncJob.c
+++ src/business/business-core/gncJob.c
@@ -353,7 +353,7 @@
interface_version: QOF_OBJECT_VERSION,
e_type: _GNC_MOD_NAME,
type_label: "Job",
- create: NULL,
+ create: (gpointer)gncJobCreate,
book_begin: NULL,
book_end: NULL,
is_dirty: qof_collection_is_dirty,
Index: gncBillTerm.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/business/business-core/gncBillTerm.c,v
retrieving revision 1.39
retrieving revision 1.40
diff -Lsrc/business/business-core/gncBillTerm.c -Lsrc/business/business-core/gncBillTerm.c -u -r1.39 -r1.40
--- src/business/business-core/gncBillTerm.c
+++ src/business/business-core/gncBillTerm.c
@@ -691,6 +691,22 @@
gboolean gncBillTermRegister (void)
{
static QofParam params[] = {
+ { GNC_BILLTERM_NAME, QOF_TYPE_STRING, (QofAccessFunc)gncBillTermGetName,
+ (QofSetterFunc)gncBillTermSetName },
+ { GNC_BILLTERM_DESC, QOF_TYPE_STRING, (QofAccessFunc)gncBillTermGetDescription,
+ (QofSetterFunc)gncBillTermSetDescription },
+ { GNC_BILLTERM_TYPE, QOF_TYPE_INT32, (QofAccessFunc)gncBillTermGetType,
+ (QofSetterFunc)gncBillTermSetType },
+ { GNC_BILLTERM_DUEDAYS, QOF_TYPE_INT32, (QofAccessFunc)gncBillTermGetDueDays,
+ (QofSetterFunc)gncBillTermSetDueDays },
+ { GNC_BILLTERM_DISCDAYS, QOF_TYPE_INT32, (QofAccessFunc)gncBillTermGetDiscountDays,
+ (QofSetterFunc)gncBillTermSetDiscountDays },
+ { GNC_BILLTERM_DISCOUNT, QOF_TYPE_NUMERIC, (QofAccessFunc)gncBillTermGetDiscount,
+ (QofSetterFunc)gncBillTermSetDiscount },
+ { GNC_BILLTERM_CUTOFF, QOF_TYPE_INT32, (QofAccessFunc)gncBillTermGetCutoff,
+ (QofSetterFunc)gncBillTermSetCutoff },
+ { GNC_BILLTERM_REFCOUNT, QOF_TYPE_INT64, (QofAccessFunc)gncBillTermGetRefcount, NULL },
+ { QOF_PARAM_BOOK, QOF_ID_BOOK, (QofAccessFunc)qof_instance_get_book, NULL },
{ QOF_PARAM_BOOK, QOF_ID_BOOK, (QofAccessFunc)qof_instance_get_book, NULL },
{ QOF_PARAM_GUID, QOF_TYPE_GUID, (QofAccessFunc)qof_instance_get_guid, NULL },
{ NULL },
Index: gncEntry.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/business/business-core/gncEntry.c,v
retrieving revision 1.57
retrieving revision 1.58
diff -Lsrc/business/business-core/gncEntry.c -Lsrc/business/business-core/gncEntry.c -u -r1.57 -r1.58
--- src/business/business-core/gncEntry.c
+++ src/business/business-core/gncEntry.c
@@ -1169,7 +1169,7 @@
interface_version: QOF_OBJECT_VERSION,
e_type: _GNC_MOD_NAME,
type_label: "Order/Invoice/Bill Entry",
- create: NULL,
+ create: (gpointer)gncEntryCreate,
book_begin: NULL,
book_end: NULL,
is_dirty: qof_collection_is_dirty,
Index: gncTaxTable.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/business/business-core/gncTaxTable.c,v
retrieving revision 1.38
retrieving revision 1.39
diff -Lsrc/business/business-core/gncTaxTable.c -Lsrc/business/business-core/gncTaxTable.c -u -r1.38 -r1.39
--- src/business/business-core/gncTaxTable.c
+++ src/business/business-core/gncTaxTable.c
@@ -464,6 +464,12 @@
mod_table (entry->table);
}
}
+void gncTaxTableEntrySetType_q (GncTaxTableEntry *entry, gint type)
+{
+ GncAmountType q = type;
+ if(!q) return;
+ gncTaxTableEntrySetType(entry,q);
+}
void gncTaxTableEntrySetType (GncTaxTableEntry *entry, GncAmountType type)
{
@@ -663,6 +669,11 @@
return entry->account;
}
+gint gncTaxTableEntryGetType_q (GncTaxTableEntry *entry)
+{
+ return (GncAmountType)gncTaxTableEntryGetType(entry);
+}
+
GncAmountType gncTaxTableEntryGetType (GncTaxTableEntry *entry)
{
if (!entry) return 0;
@@ -799,7 +810,7 @@
interface_version: QOF_OBJECT_VERSION,
e_type: _GNC_MOD_NAME,
type_label: "Tax Table",
- create: NULL,
+ create: (gpointer)gncTaxTableCreate,
book_begin: _gncTaxTableCreate,
book_end: _gncTaxTableDestroy,
is_dirty: qof_collection_is_dirty,
@@ -812,6 +823,8 @@
gboolean gncTaxTableRegister (void)
{
static QofParam params[] = {
+ { GNC_TT_NAME, QOF_TYPE_STRING, (QofAccessFunc)gncTaxTableGetName, (QofSetterFunc)gncTaxTableSetName },
+ { GNC_TT_REFCOUNT, QOF_TYPE_INT64, (QofAccessFunc)gncTaxTableGetRefcount, NULL },
{ QOF_PARAM_BOOK, QOF_ID_BOOK, (QofAccessFunc)qof_instance_get_book, NULL },
{ QOF_PARAM_GUID, QOF_TYPE_GUID, (QofAccessFunc)qof_instance_get_guid, NULL },
{ NULL },
@@ -821,3 +834,7 @@
return qof_object_register (&gncTaxTableDesc);
}
+
+/* need a QOF tax table entry object */
+//gncTaxTableEntrySetType_q int32
+//gint gncTaxTableEntryGetType_q (GncTaxTableEntry *entry);
Index: gncTaxTable.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/business/business-core/gncTaxTable.h,v
retrieving revision 1.16
retrieving revision 1.17
diff -Lsrc/business/business-core/gncTaxTable.h -Lsrc/business/business-core/gncTaxTable.h -u -r1.16 -r1.17
--- src/business/business-core/gncTaxTable.h
+++ src/business/business-core/gncTaxTable.h
@@ -52,15 +52,15 @@
* You can interpret it as a VALUE or a PERCENT.
*/
typedef enum {
- GNC_AMT_TYPE_VALUE = 1,
- GNC_AMT_TYPE_PERCENT
+ GNC_AMT_TYPE_VALUE = 1, /**< tax is a number */
+ GNC_AMT_TYPE_PERCENT /**< tax is a percentage */
} GncAmountType;
/** How to interpret the TaxIncluded */
typedef enum {
- GNC_TAXINCLUDED_YES = 1,
- GNC_TAXINCLUDED_NO,
- GNC_TAXINCLUDED_USEGLOBAL,
+ GNC_TAXINCLUDED_YES = 1, /**< tax is included */
+ GNC_TAXINCLUDED_NO, /**< tax is not included */
+ GNC_TAXINCLUDED_USEGLOBAL, /**< use the global setting */
} GncTaxIncluded;
const char * gncAmountTypeToString (GncAmountType type);
@@ -91,6 +91,11 @@
void gncTaxTableChanged (GncTaxTable *table);
void gncTaxTableBeginEdit (GncTaxTable *table);
void gncTaxTableCommitEdit (GncTaxTable *table);
+
+/** added for later QOF standardisation */
+gint gncTaxTableEntryGetType_q (GncTaxTableEntry *entry);
+void gncTaxTableEntrySetType_q (GncTaxTableEntry *entry, gint type);
+
/** @} */
/** @name Get Functions */
@@ -147,6 +152,10 @@
/** Destroy a list of accountvalues */
void gncAccountValueDestroy (GList *list);
+/** QOF parameter definitions */
+#define GNC_TT_NAME "tax table name"
+#define GNC_TT_REFCOUNT "reference count"
+
/** @deprecated routine */
#define gncTaxTableGetGUID(x) qof_instance_get_guid(QOF_INSTANCE(x))
#define gncTaxTableRetGUID(x) (x ? *(qof_instance_get_guid(QOF_INSTANCE(x))) : *(guid_null()))
Index: qofid.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/engine/qofid.h,v
retrieving revision 1.12
retrieving revision 1.13
diff -Lsrc/engine/qofid.h -Lsrc/engine/qofid.h -u -r1.12 -r1.13
--- src/engine/qofid.h
+++ src/engine/qofid.h
@@ -69,7 +69,9 @@
#include <string.h>
#include "guid.h"
+/** QofIdType declaration */
typedef const char * QofIdType;
+/** QofIdTypeConst declaration */
typedef const char * QofIdTypeConst;
#define QOF_ID_NONE NULL
@@ -112,10 +114,25 @@
(obj); \
}))
-
+/** QofEntity declaration */
typedef struct QofEntity_s QofEntity;
+/** QofCollection declaration
+
+ at param e_type QofIdType
+ at param is_dirty gboolean
+ at param hash_of_entities GHashTable
+ at param data gpointer, place where object class can hang arbitrari data
+
+*/
typedef struct QofCollection_s QofCollection;
+/** QofEntity structure
+
+ at param e_type Entity type
+ at param guid GUID for the entity
+ at param collection Entity collection
+*/
+
struct QofEntity_s
{
QofIdType e_type;
@@ -171,4 +188,3 @@
#endif /* QOF_ID_H */
/** @} */
/** @} */
-
Index: Transaction.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/engine/Transaction.c,v
retrieving revision 1.316
retrieving revision 1.317
diff -Lsrc/engine/Transaction.c -Lsrc/engine/Transaction.c -u -r1.316 -r1.317
--- src/engine/Transaction.c
+++ src/engine/Transaction.c
@@ -3214,7 +3214,7 @@
interface_version: QOF_OBJECT_VERSION,
e_type: GNC_ID_SPLIT,
type_label: "Split",
- create: NULL,
+ create: (gpointer)xaccMallocSplit,
book_begin: NULL,
book_end: NULL,
is_dirty: NULL,
@@ -3265,13 +3265,13 @@
(QofAccessFunc)xaccSplitGetClearedBalance, NULL },
{ SPLIT_RECONCILED_BALANCE, QOF_TYPE_NUMERIC,
(QofAccessFunc)xaccSplitGetReconciledBalance, NULL },
- { SPLIT_MEMO, QOF_TYPE_STRING, (QofAccessFunc)xaccSplitGetMemo, NULL },
- { SPLIT_ACTION, QOF_TYPE_STRING, (QofAccessFunc)xaccSplitGetAction, NULL },
- { SPLIT_RECONCILE, QOF_TYPE_CHAR, (QofAccessFunc)xaccSplitGetReconcile, NULL },
- { SPLIT_AMOUNT, QOF_TYPE_NUMERIC, (QofAccessFunc)xaccSplitGetAmount, NULL },
+ { SPLIT_MEMO, QOF_TYPE_STRING, (QofAccessFunc)xaccSplitGetMemo, (QofSetterFunc)xaccSplitSetMemo },
+ { SPLIT_ACTION, QOF_TYPE_STRING, (QofAccessFunc)xaccSplitGetAction, (QofSetterFunc)xaccSplitSetAction },
+ { SPLIT_RECONCILE, QOF_TYPE_CHAR, (QofAccessFunc)xaccSplitGetReconcile, (QofSetterFunc)xaccSplitSetReconcile },
+ { SPLIT_AMOUNT, QOF_TYPE_NUMERIC, (QofAccessFunc)xaccSplitGetAmount, (QofSetterFunc)xaccSplitSetAmount },
{ SPLIT_SHARE_PRICE, QOF_TYPE_NUMERIC,
- (QofAccessFunc)xaccSplitGetSharePrice, NULL },
- { SPLIT_VALUE, QOF_TYPE_DEBCRED, (QofAccessFunc)xaccSplitGetValue, NULL },
+ (QofAccessFunc)xaccSplitGetSharePrice, (QofSetterFunc)xaccSplitSetSharePrice },
+ { SPLIT_VALUE, QOF_TYPE_DEBCRED, (QofAccessFunc)xaccSplitGetValue, (QofSetterFunc)xaccSplitSetValue },
{ SPLIT_TYPE, QOF_TYPE_STRING, (QofAccessFunc)xaccSplitGetType, NULL },
{ SPLIT_VOIDED_AMOUNT, QOF_TYPE_NUMERIC,
(QofAccessFunc)xaccSplitVoidFormerAmount, NULL },
@@ -3286,7 +3286,7 @@
{ SPLIT_ACCT_FULLNAME, SPLIT_ACCT_FULLNAME, no_op, NULL },
{ SPLIT_CORR_ACCT_NAME, SPLIT_CORR_ACCT_NAME, no_op, NULL },
{ SPLIT_CORR_ACCT_CODE, SPLIT_CORR_ACCT_CODE, no_op, NULL },
- { SPLIT_KVP, QOF_TYPE_KVP, (QofAccessFunc)xaccSplitGetSlots, NULL },
+ { SPLIT_KVP, QOF_TYPE_KVP, (QofAccessFunc)xaccSplitGetSlots, (QofSetterFunc)xaccSplitSetSlots_nc },
{ QOF_PARAM_BOOK, QOF_ID_BOOK, (QofAccessFunc)xaccSplitGetBook, NULL },
{ QOF_PARAM_GUID, QOF_TYPE_GUID, (QofAccessFunc)qof_entity_get_guid, NULL },
{ NULL },
@@ -3310,7 +3310,7 @@
interface_version: QOF_OBJECT_VERSION,
e_type: GNC_ID_TRANS,
type_label: "Transaction",
- create: NULL,
+ create: (gpointer)xaccMallocTransaction,
book_begin: NULL,
book_end: NULL,
is_dirty: NULL,
Index: Account.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/engine/Account.c,v
retrieving revision 1.276
retrieving revision 1.277
diff -Lsrc/engine/Account.c -Lsrc/engine/Account.c -u -r1.276 -r1.277
--- src/engine/Account.c
+++ src/engine/Account.c
@@ -2836,7 +2836,7 @@
interface_version: QOF_OBJECT_VERSION,
e_type: GNC_ID_ACCOUNT,
type_label: "Account",
- create: NULL,
+ create: (gpointer)xaccMallocAccount,
book_begin: NULL,
book_end: NULL,
is_dirty: NULL,
Index: Group.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/engine/Group.c,v
retrieving revision 1.134
retrieving revision 1.135
diff -Lsrc/engine/Group.c -Lsrc/engine/Group.c -u -r1.134 -r1.135
--- src/engine/Group.c
+++ src/engine/Group.c
@@ -1263,7 +1263,7 @@
interface_version: QOF_OBJECT_VERSION,
e_type: GNC_ID_GROUP,
type_label: "AccountGroup",
- create: NULL,
+ create: (gpointer)xaccMallocAccountGroup,
book_begin: group_book_begin,
book_end: group_book_end,
is_dirty: group_is_dirty,
Index: qofbook.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/engine/qofbook.h,v
retrieving revision 1.14
retrieving revision 1.15
diff -Lsrc/engine/qofbook.h -Lsrc/engine/qofbook.h -u -r1.14 -r1.15
--- src/engine/qofbook.h
+++ src/engine/qofbook.h
@@ -62,6 +62,7 @@
(c_type *) val; \
})
+/** \brief QofBook reference */
typedef struct _QofBook QofBook;
/** GList of QofBook */
Index: gnc-pricedb.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/engine/gnc-pricedb.c,v
retrieving revision 1.79
retrieving revision 1.80
diff -Lsrc/engine/gnc-pricedb.c -Lsrc/engine/gnc-pricedb.c -u -r1.79 -r1.80
--- src/engine/gnc-pricedb.c
+++ src/engine/gnc-pricedb.c
@@ -1957,7 +1957,7 @@
interface_version: QOF_OBJECT_VERSION,
e_type: GNC_ID_PRICE,
type_label: "Price",
- create: NULL,
+ create: (gpointer)gnc_price_create,
book_begin: pricedb_book_begin,
book_end: pricedb_book_end,
is_dirty: pricedb_is_dirty,
More information about the gnucash-changes
mailing list