John Ralls
d3e62f41be
Remove the KVP C API.
...
All access to KVP is now implemented in C++11.
2015-07-03 17:15:24 -07:00
John Ralls
ff07762f61
Move the KVP_TYPE enum to kvp-value.hpp.
...
This had some extraordinary knock-on effects because C++11 treats enums
very differently from C, so any C code that directly accessed the enum
had to be converted to C++.
That included test-engine-stuff, and because it quite sensibly builds as
a ranlib archive instead of a shared library everything that uses it must
at least link as C++. Fortunately automake takes care of doing this when
the default extension for check_PROGRAMS is cpp, even if the source file
is C.
2015-07-03 17:15:21 -07:00
John Ralls
3590de1085
Convert tests to C++ and the KVP C++ API.
2015-07-03 17:14:32 -07:00
John Ralls
fd935d3b82
Convert libqof kvp calls to C++.
2015-07-03 17:13:14 -07:00
John Ralls
9e142124f4
Convert kvp-scm to C++ and to using the KVP C++ API.
...
The binding remains C to simplify interaction of these two functions with
SWIG and Scheme.
2015-07-03 17:13:14 -07:00
John Ralls
78b5b7cb5b
Convert gnc-slots-sql.cpp to use the Kvp C++ API.
...
Plus a few minor C++11 tweaks.
2015-07-03 17:13:14 -07:00
John Ralls
7c4e1f7f2a
Fix slash handling in keys.
...
In actual use '/' is a path delimiter indicating a child KvpFrame. The
previous implementation created keys for single frames with embedded '/'
characters.
Memory management issues in make_vector necessitated changing Path to a
std::vector<std::string>>.
2015-07-03 17:13:13 -07:00
John Ralls
0987184709
Add path-vector get/set functions to KvpFrameImpl.
...
Needed for Scheme access. The C functions used GList.
2015-07-03 17:13:13 -07:00
John Ralls
45a01b0f67
Change the KVP string storage type from char* to const char*.
...
Because we don't want to be able to get a pointer to the KvpValue and
change its contents without using KvpValue::set().
2015-07-03 17:13:13 -07:00
John Ralls
831a360122
XML Backend:Replace C KVP function calls with C++.
2015-07-03 17:13:13 -07:00
John Ralls
ab30b4c680
Remove #include "kvp_frame.h" from qof.h and add it where it's legitimately used.
2015-07-03 17:13:13 -07:00
John Ralls
c721bf9f48
Remove the unused backend-configuration member and virtual setter/getters.
...
Not used, and if it was it would be an inappropriate use of KVP.
2015-07-03 17:13:13 -07:00
John Ralls
3956ee0f01
Remove the rest of the KVP direct-query functions.
2015-07-03 17:13:13 -07:00
John Ralls
171669ec68
Change io-gncxml-v2.c to C++.
2015-07-03 17:13:13 -07:00
John Ralls
435aef03b7
Isolate direct KVP operations.
...
Into sixtp-dom-parser, sixtp-dom-generator, and gnc-slots-sql.
The XML V1 file io-gncxml-v1.c is not yet done.
2015-07-03 17:13:13 -07:00
John Ralls
13377f56d5
Cpp files in CMakelists.txt.
2015-07-03 17:13:13 -07:00
John Ralls
55e4d30a44
Pass QofInstance instead of KvpFrame to gnc_sql_slots_save.
2015-07-03 17:13:13 -07:00
John Ralls
8b53483562
Change gnc-slots-sql, sixtp-dom-generators, and sixtp-dom-parsers to C++.
...
So that they'll be able to use the C++ Kvp classes.
2015-07-03 17:13:12 -07:00
John Ralls
9b3f6078fc
Abstract options handling to QofBook.
...
Eliminates direct KVP access in app-utils, all of which centered around
options.
Beneficial side effect: With all option writes now handled by
qof_book_set_option(), the problem of options not being committed is
eliminated.
The options system is unnecessarily complex, with much back-and-forth
between C and Guile. It needs to be completely rewritten, but that's a
project for its own branch.
2015-07-03 17:13:12 -07:00
John Ralls
fa22188549
Remove gnc:kvp-option-dialog, make gnc_make_kvp_options static.
...
gnc:kvp-option-dialog is unused, was only external user of gnc_make_kvp_options.
2015-07-03 17:13:12 -07:00
John Ralls
cb9d8c93b7
Use gnc:company-info instead of directly accessing the KVP in reports.
2015-07-03 17:13:12 -07:00
John Ralls
095d1781f0
Remove a couple of distracting comments about KVP.
2015-07-03 17:13:12 -07:00
John Ralls
61ecdda845
Miscellaneous KVP cleanup.
...
Everything but the backends and app-utils.
2015-07-03 17:13:12 -07:00
John Ralls
a4c748e201
Miscellaneous KVP cleanup in Engine.
...
Doesn't include tests or Scheme support.
2015-07-03 17:13:12 -07:00
John Ralls
f631f6e6c5
Fix formatting, line too long.
2015-07-03 17:13:12 -07:00
John Ralls
68dedc1ba2
Reimplement gnc_template_register_get_debcred_entry.
...
So that it at least returns something reasonable. Note the comment, though.
2015-07-03 17:13:12 -07:00
John Ralls
43e93e5fb5
Modify gnc_imap... functions to use KVP indirectly, provide unit tests.
2015-07-03 17:13:12 -07:00
John Ralls
ccd74059a2
Implement qof_instance_for_each_slot().
...
Wraps kvp_frame_for_each_slot().
2015-07-03 17:13:12 -07:00
John Ralls
dcc9bfec36
Reimplement AQBanking template list in C++ and in libqof.
...
It requires direct manipulation of KVP, so it needs to be hidden away in
libqof.
2015-07-03 17:13:12 -07:00
John Ralls
b4e0240783
Make the instance const in qof_instance_get_kvp().
2015-07-03 17:13:12 -07:00
John Ralls
4f4711c564
Convert Scrub.c from using direct KVP to routing them through qof_instance.
2015-07-03 17:13:12 -07:00
John Ralls
232dd4c0dc
Provide qof_instance with functions to delete slots.
2015-07-03 17:13:11 -07:00
John Ralls
eb2d556086
Move initializing the GValue to the correct type to qof_instance_set_kvp.
...
And ensure that all returns are checked to be the expected type.
2015-07-03 17:13:11 -07:00
John Ralls
57ba97422d
Rename the hash-table functions so that they don't contain "kvp".
...
They don't have anything to do with KVP. What were they doing in kvp-utils
in the first place?
2015-07-03 17:13:11 -07:00
John Ralls
50bb5c162a
Remove "FIXME" comments about KvpFrame in SX-ttinfo.c.
...
SX splits and regular splits have different requirements for Kvp. A
regular split's Kvp contains information that applies to that one split
alone so it would be a mistake to propagate it into SX. Meanwhile the SX
split puts its formulas in Kvp, and we certainly don't want those going
into regular splits.
2015-07-03 17:13:11 -07:00
John Ralls
cadd1976df
Remove kvp-utils.
...
No longer required.
2015-07-03 17:13:11 -07:00
John Ralls
c941a52a9f
Copy GHash/KVP functions from kvp-util to the one place they're used.
2015-07-03 17:13:11 -07:00
John Ralls
c2d44b89fb
Replace Scrub2 direct KVP access with Split lot-guid accessors.
2015-07-03 17:13:11 -07:00
John Ralls
d86a0b2378
Replace the lot-split and peer_guid properties with accessor functions.
...
The properties weren't backwards compatible with existing books, nor
would they work in the multiple-peers case.
2015-07-03 17:13:11 -07:00
John Ralls
db5317f80f
Rewrite the gnc_kvp_bag functions in qofinstance.
...
They were over general and were used in only one place not in QOF.
2015-07-03 17:13:11 -07:00
John Ralls
1bd6afe384
Move KVP_TYPE_BOOLEAN to the end of the enum.
...
So that it doesn't change the numeric values of other entries, which
would introduce a database incompatibility.
2015-07-03 17:13:11 -07:00
John Ralls
ac29ad3cef
Remove direct query of KVP.
...
Wasn't actually used anywhere, and it's not something we want to
support.
2015-07-03 17:13:11 -07:00
John Ralls
45e41a07b1
Convert gnc-budget, gnc-lot, and gncJob to qof_instance_foo_kvp.
2015-07-03 17:13:11 -07:00
John Ralls
39c521512b
Provide qof_instance_has_kvp(); used for feature testing.
2015-07-03 17:13:11 -07:00
John Ralls
97b44a71ec
Convert all Split kV operations to use qof_instance_foo_kvp().
...
Except for clearing the KVP Frame, which we do by calling qof_instance_dispose().
2015-07-03 17:13:11 -07:00
John Ralls
97031fa62a
Correct the kvpvalue type for lot-split in test_xaccSplitOtherSplit.
2015-07-03 17:13:11 -07:00
John Ralls
eccdfd0aa3
Convert all Transaction KVP operations to use qof_instance_foo_kvp.
2015-07-03 17:13:11 -07:00
John Ralls
542557724c
Convert almost all Account KVP operations to use qof_instance_foo_kvp.
...
Can't do the import-matcher stuff, it's a bit too hard-wired to KVP.
2015-07-03 17:13:10 -07:00
John Ralls
31cfa0a9f0
Merge branch 'maint'
2015-06-30 12:42:36 -07:00
John Ralls
3d8b58a1be
Change gtkmacintegration-gtk2 include directory back to gtkmacintegration.
...
As of gtk-mac-integration-2.0.8.
2015-06-30 12:33:25 -07:00