QOF: qofinstance.h Source File

QOF 0.7.5

qofinstance.h
Go to the documentation of this file.
1 /********************************************************************\
2 * qofinstance.h -- fields common to all object instances *
3 * *
4 * This program is free software; you can redistribute it and/or *
5 * modify it under the terms of the GNU General Public License as *
6 * published by the Free Software Foundation; either version 2 of *
7 * the License, or (at your option) any later version. *
8 * *
9 * This program is distributed in the hope that it will be useful, *
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
12 * GNU General Public License for more details. *
13 * *
14 * You should have received a copy of the GNU General Public License*
15 * along with this program; if not, contact: *
16 * *
17 * Free Software Foundation Voice: +1-617-542-5942 *
18 * 51 Franklin Street, Fifth Floor Fax: +1-617-542-2652 *
19 * Boston, MA 02110-1301, USA gnu@gnu.org *
20 * *
21 \********************************************************************/
36 #ifndef QOF_INSTANCE_H
37 #define QOF_INSTANCE_H
38
39 #include "guid.h"
40 #include "qofbook.h"
41 #include "qofid.h"
42 #include "qoftime.h"
43 #include "kvpframe.h"
44
45 /* --- type macros --- */
46 /* cheesy, but will do for now, eventually should be more gtk-like, handle
47 * thunks, etc. */
48 #define QOF_INSTANCE(object) ((QofInstance *)(object))
49
50 typedef struct QofInstance_s QofInstance;
51
53 void qof_instance_init (QofInstance *, QofIdType, QofBook *);
54
57 void qof_instance_release (QofInstance * inst);
58
60 QofBook *qof_instance_get_book (QofInstance *);
61
63 const GUID *qof_instance_get_guid (QofInstance *);
64
66 KvpFrame *qof_instance_get_slots (QofInstance *);
67
74 QofTime *qof_instance_get_update_time (QofInstance * inst);
75
82 gint qof_instance_version_cmp (QofInstance * left, QofInstance * right);
83
85 gboolean qof_instance_is_dirty (QofInstance *);
86
91 void qof_instance_set_dirty (QofInstance * inst);
92
93 gboolean qof_instance_check_edit (QofInstance * inst);
94
95 gboolean qof_instance_do_free (QofInstance * inst);
96
97 void qof_instance_mark_free (QofInstance * inst);
98
99 QofInstance *qof_instance_create (QofIdType type, QofBook * book);
100
110 void qof_instance_gemini (QofInstance * to, QofInstance * from);
111
126 QofInstance *qof_instance_lookup_twin (QofInstance * src, QofBook * book);
127
128 /* @} */
129 /* @} */
130 #endif /* QOF_INSTANCE_H */
QofIdType
const gchar * QofIdType
Definition: qofid.h:81
QofInstance_s
Definition: qofinstance-p.h:35
KvpFrame
struct _KvpFrame KvpFrame
Definition: kvpframe.h:74
guid.h
globally unique ID User API
qof_instance_is_dirty
gboolean qof_instance_is_dirty(QofInstance *)
Definition: qofinstance.c:128
qofid.h
QOF entity type identification system.
qof_instance_get_book
QofBook * qof_instance_get_book(QofInstance *)
Definition: qofinstance.c:87
qof_instance_set_dirty
void qof_instance_set_dirty(QofInstance *inst)
Set the dirty flag.
Definition: qofinstance.c:146
kvpframe.h
A key-value frame system.
qof_instance_get_guid
const GUID * qof_instance_get_guid(QofInstance *)
Definition: qofinstance.c:79
qof_instance_get_slots
KvpFrame * qof_instance_get_slots(QofInstance *)
Definition: qofinstance.c:95
qof_instance_get_update_time
QofTime * qof_instance_get_update_time(QofInstance *inst)
Definition: qofinstance.c:103
qoftime.h
64bit UTC Time handling routines
_GUID
Definition: guid.h:53
qofbook.h
Encapsulate all the information about a dataset.
QofTime
struct QofTime64 QofTime
Use a 64-bit signed int QofTime.
Definition: qoftime.h:120
qof_instance_release
void qof_instance_release(QofInstance *inst)
Definition: qofinstance.c:69
_QofBook
Definition: qofbook-p.h:48
qof_instance_version_cmp
gint qof_instance_version_cmp(QofInstance *left, QofInstance *right)
Definition: qofinstance.c:116
qof_instance_init
void qof_instance_init(QofInstance *, QofIdType, QofBook *)
Definition: qofinstance.c:53
QofInstance_s::book
QofBook * book
Definition: qofinstance-p.h:41
qof_instance_gemini
void qof_instance_gemini(QofInstance *to, QofInstance *from)
Definition: qofinstance.c:212
qof_instance_lookup_twin
QofInstance * qof_instance_lookup_twin(QofInstance *src, QofBook *book)
Definition: qofinstance.c:234