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 
54 
57 void qof_instance_release (QofInstance * inst);
58 
61 
64 
67 
75 
82 gint qof_instance_version_cmp (QofInstance * left, QofInstance * right);
83 
86 
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 
127 
128 /* @} */
129 /* @} */
130 #endif /* QOF_INSTANCE_H */