GnuCash c935c2f+
Loading...
Searching...
No Matches
Data Fields

This is the QofObject Class descriptor. More...

#include <qofobject.h>

Data Fields

gint interface_version
 
QofIdType e_type
 
const char * type_label
 
gpointer(* create )(QofBook *)
 Create a new instance of this object type.
 
void(* book_begin )(QofBook *)
 book_begin is called from within the Book routines to create module-specific hooks in a book whenever a book is created.
 
void(* book_end )(QofBook *)
 book_end is called when the book is being closed, to clean up (and free memory).
 
gboolean(* is_dirty )(const QofCollection *)
 Determine if there are any dirty items in this book.
 
void(* mark_clean )(QofCollection *)
 Mark this object's book clean (for after a load)
 
void(* foreach )(const QofCollection *, QofInstanceForeachCB, gpointer)
 Traverse over all of the items in the collection, calling the callback on each item.
 
const char *(* printable )(gpointer instance)
 Given a particular item of this type, return a printable string.
 
int(* version_cmp )(gpointer instance_left, gpointer instance_right)
 Given a pair of items of this type, this routine returns value indicating which item is 'newer'.
 

Detailed Description

This is the QofObject Class descriptor.

Definition at line 76 of file qofobject.h.

Field Documentation

◆ book_begin

void(* QofObject::book_begin) (QofBook *)

book_begin is called from within the Book routines to create module-specific hooks in a book whenever a book is created.

Definition at line 91 of file qofobject.h.

◆ book_end

void(* QofObject::book_end) (QofBook *)

book_end is called when the book is being closed, to clean up (and free memory).

Definition at line 96 of file qofobject.h.

◆ create

gpointer(* QofObject::create) (QofBook *)

Create a new instance of this object type.

This routine might be NULL if the object type doesn't provide a way of creating new instances.

Definition at line 86 of file qofobject.h.

◆ e_type

QofIdType QofObject::e_type

Definition at line 79 of file qofobject.h.

◆ foreach

void(* QofObject::foreach) (const QofCollection *, QofInstanceForeachCB, gpointer)

Traverse over all of the items in the collection, calling the callback on each item.

The third argument can be any arbitrary caller-supplied data, and is passed to the callback. Although (*foreach) may be NULL, almost all objects should provide this routine, as without it, little of interest can be done.

Definition at line 111 of file qofobject.h.

◆ interface_version

gint QofObject::interface_version

Definition at line 78 of file qofobject.h.

◆ is_dirty

gboolean(* QofObject::is_dirty) (const QofCollection *)

Determine if there are any dirty items in this book.

Definition at line 99 of file qofobject.h.

◆ mark_clean

void(* QofObject::mark_clean) (QofCollection *)

Mark this object's book clean (for after a load)

Definition at line 102 of file qofobject.h.

◆ printable

const char *(* QofObject::printable) (gpointer instance)

Given a particular item of this type, return a printable string.

Definition at line 115 of file qofobject.h.

◆ type_label

const char* QofObject::type_label

Definition at line 80 of file qofobject.h.

◆ version_cmp

int(* QofObject::version_cmp) (gpointer instance_left, gpointer instance_right)

Given a pair of items of this type, this routine returns value indicating which item is 'newer'.

This routine is used by storage backends to determine if the local or the remote copy of a particular item is the latest, 'uptodate' version. Tis routine should return an integer less than, equal to, or greater than zero if 'instance_left' is found to be, respectively, earlier than, equal to or later than than 'instance_right'.

Definition at line 125 of file qofobject.h.


The documentation for this struct was generated from the following file: