Note that the QofQuery functions that sort-of used them are ifdefed out
instead of deleted to serve as place-holders since we'll be bringing
back backend querying later.
Unfortunately a rather massive change. Gets rid of GncSqlColumnTypeHandler
and its hideous run-time registry by making the handler functions members
of GncSqlColumnTableEntry. GncSqlColumnTableEntry becomes an abstract super-
class with a templatized subclass GncSqlColumnTableEntryImpl whose template
parameter is the GncSqlObjectType that's also the GncSqlColumnTableEntryImpl's
m_col_type member. That member is a candidate for future removal as it's not
necessary. An explicit specialization is provided for each GncSqlObjectType and
that's a candidate for future code-shrinkage as there's still a fair amount
of duplication in spite of adding several helper template functions to absorb
most of the meat. The abstract GncSqlColumnTableEntry class is motivated by
the need to have an iterable container which in turn requires runtime
polymorphism. This can probably be replaced with a variadic-template
pseudo-container.
The two major benefits of this change are that it gets rid of one more set
of macro functions and provides vtable dispatch that has only one level
of indirection instead of the cumbersome string-hash-table-lookup to
find the handler followed by invoking the handler's function.
The two header files are removed because they exposed only the initialization
function which in turn only registered the respective GncSqlColumnTypeHandler.
The two lists were always used together so replace them with a single
vector of std::pair<std::string, std::string>; this also gets rid of the
intermediate GValue which was used to convert the returned value to a string.
operator<<() can do that for us more transparently.
Also template most of the add_value_to_vec functions.
day's date. Previous efforts didn't work on Windows and shouldn't have
elsewhere because gnc_localtime and gnc_mktime are inverse functions;
in particular gnc_mktime doesn't adjust the time based on the value
of tm_isdst, though some implementations of STDC mktime do.
Rather than being too clever about trying to find the DST offset this
implementation just uses 1 hour.
The Python includes files for Windows define HAVE_PUTENV to be
empty. GnuCash under MINGW (only) defines it to be 1. This causes
redefinition errors when building the Python bindings on Windows.
HAVE_PUTENV is not used in the GnuCash code base, so the best
solution seems to be to just get rid of it.