31 #ifndef QOF_INSTANCE_P_H 32 #define QOF_INSTANCE_P_H 37 #include "kvp-frame.hpp" 47 void qof_instance_set_collection (gconstpointer ptr, QofCollection *col);
49 void qof_instance_set_slots (
QofInstance *, KvpFrame *);
59 void qof_instance_set_dirty_flag (gconstpointer inst, gboolean flag);
62 void qof_instance_set_guid (gpointer inst,
const GncGUID *guid);
67 void qof_instance_copy_guid (gpointer to, gconstpointer from);
74 KvpFrame* qof_instance_get_slots (
const QofInstance *);
75 void qof_instance_set_editlevel(gpointer inst, gint level);
76 void qof_instance_increase_editlevel (gpointer ptr);
77 void qof_instance_decrease_editlevel (gpointer ptr);
78 void qof_instance_reset_editlevel (gpointer ptr);
85 void qof_instance_set_destroying (gpointer ptr, gboolean value);
96 gint32 qof_instance_get_version (gconstpointer inst);
100 void qof_instance_set_version (gpointer inst, gint32 value);
103 void qof_instance_copy_version (gpointer to, gconstpointer from);
106 guint32 qof_instance_get_version_check (gconstpointer inst);
108 void qof_instance_set_version_check (gpointer inst, guint32 value);
110 void qof_instance_copy_version_check (gpointer to, gconstpointer from);
111 void qof_instance_set_idata(gpointer inst, guint32 idata);
146 char* qof_instance_kvp_as_string (
const QofInstance *inst);
147 void qof_instance_kvp_add_guid (
const QofInstance *inst,
const char* path,
148 time64 time,
const char* key,
150 void qof_instance_kvp_remove_guid (
const QofInstance *inst,
const char *path,
151 const char* key,
const GncGUID *guid);
152 gboolean qof_instance_kvp_has_guid (
const QofInstance *inst,
const char *path,
153 const char* key,
const GncGUID *guid);
154 void qof_instance_kvp_merge_guids (
const QofInstance *target,
156 gboolean qof_instance_has_slot (
const QofInstance *inst,
const char *path);
157 void qof_instance_slot_delete (
const QofInstance *,
const char * path);
158 void qof_instance_slot_delete_if_empty (
const QofInstance *,
const char * path);
159 void qof_instance_foreach_slot (
const QofInstance *inst,
const char *head,
160 const char *category,
void(*proc)(
const char*,
161 const GValue*,
void*),
void* data);
165 void qof_instance_get_path_kvp (
QofInstance *, GValue *, std::vector<std::string>
const &);
167 void qof_instance_set_path_kvp (
QofInstance *, GValue
const *, std::vector<std::string>
const &);
169 template <
typename T> std::optional<T>
170 qof_instance_get_path_kvp (
QofInstance*,
const Path&);
172 template <
typename T>
void 173 qof_instance_set_path_kvp (
QofInstance*, std::optional<T>,
const Path&);
175 bool qof_instance_has_path_slot (
QofInstance const *, std::vector<std::string>
const &);
177 void qof_instance_slot_path_delete (
QofInstance const *, std::vector<std::string>
const &);
179 void qof_instance_slot_path_delete_if_empty (
QofInstance const *, std::vector<std::string>
const &);
182 std::vector <std::pair <std::string, KvpValue*>>
183 qof_instance_get_slots_prefix (
QofInstance const *, std::string
const & prefix);
189 template<
typename func_type,
typename data_type>
190 void qof_instance_foreach_slot_prefix(
QofInstance const * inst, std::string
const & path_prefix,
191 func_type
const & func, data_type & data)
193 inst->kvp_data->for_each_slot_prefix(path_prefix, func, data);
void qof_instance_set_kvp(QofInstance *, GValue const *value, unsigned count,...)
Sets a KVP slot to a value from a GValue.
Object instance holds common fields that most gnucash objects use.
void qof_instance_get_kvp(QofInstance *, GValue *value, unsigned count,...)
Retrieves the contents of a KVP slot into a provided GValue.
gint64 time64
Most systems that are currently maintained, including Microsoft Windows, BSD-derived Unixes and Linux...
gboolean qof_instance_has_kvp(QofInstance *inst)
Report whether a QofInstance has anything stored in KVP.
The type used to store guids in C.