GnuCash
5.6-150-g038405b370+
|
An address is a helper object used by the GncOwner object (and its actual implementations GncCustomer, ::GncVendor and ::GncEmployee). More...
Files | |
file | gncAddress.h |
an Address object | |
Data Structures | |
struct | GncAddress |
Macros | |
#define | GNC_ADDRESS_MODULE_NAME "gncAddress" |
#define | GNC_ID_ADDRESS GNC_ADDRESS_MODULE_NAME |
#define | GNC_TYPE_ADDRESS (gnc_address_get_type ()) |
#define | GNC_ADDRESS(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GNC_TYPE_ADDRESS, GncAddress)) |
#define | GNC_ADDRESS_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GNC_TYPE_ADDRESS, GncAddressClass)) |
#define | GNC_IS_ADDRESS(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GNC_TYPE_ADDRESS)) |
#define | GNC_IS_ADDRESS_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GNC_TYPE_ADDRESS)) |
#define | GNC_ADDRESS_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GNC_TYPE_ADDRESS, GncAddressClass)) |
#define | ADDRESS_NAME "name" |
#define | ADDRESS_ONE "number" |
#define | ADDRESS_TWO "street" |
#define | ADDRESS_THREE "locality" |
#define | ADDRESS_FOUR "city" |
#define | ADDRESS_PHONE "phone" |
#define | ADDRESS_FAX "fax" |
#define | ADDRESS_EMAIL "email" |
#define | ADDRESS_OWNER "owner" |
Functions | |
GType | gnc_address_get_type (void) |
gboolean | gncAddressIsDirty (const GncAddress *addr) |
int | gncAddressCompare (const GncAddress *a, const GncAddress *b) |
compare two addresses More... | |
gboolean | gncAddressEqual (const GncAddress *a, const GncAddress *b) |
Deeply compare two addresses. More... | |
Create/Destroy functions | |
GncAddress * | gncAddressCreate (QofBook *book, QofInstance *parent) |
void | gncAddressDestroy (GncAddress *addr) |
void | gncAddressBeginEdit (GncAddress *addr) |
void | gncAddressCommitEdit (GncAddress *addr) |
Set functions | |
void | gncAddressSetName (GncAddress *addr, const char *name) |
void | gncAddressSetAddr1 (GncAddress *addr, const char *addr1) |
void | gncAddressSetAddr2 (GncAddress *addr, const char *addr2) |
void | gncAddressSetAddr3 (GncAddress *addr, const char *addr3) |
void | gncAddressSetAddr4 (GncAddress *addr, const char *addr4) |
void | gncAddressSetPhone (GncAddress *addr, const char *phone) |
void | gncAddressSetFax (GncAddress *addr, const char *fax) |
void | gncAddressSetEmail (GncAddress *addr, const char *email) |
void | gncAddressClearDirty (GncAddress *address) |
Get Functions | |
const char * | gncAddressGetName (const GncAddress *addr) |
const char * | gncAddressGetAddr1 (const GncAddress *addr) |
const char * | gncAddressGetAddr2 (const GncAddress *addr) |
const char * | gncAddressGetAddr3 (const GncAddress *addr) |
const char * | gncAddressGetAddr4 (const GncAddress *addr) |
const char * | gncAddressGetPhone (const GncAddress *addr) |
const char * | gncAddressGetFax (const GncAddress *addr) |
const char * | gncAddressGetEmail (const GncAddress *addr) |
An address is a helper object used by the GncOwner object (and its actual implementations GncCustomer, ::GncVendor and ::GncEmployee).
An address stores the physical address, phone, fax and email properties of a GncOwner. The owner's name itself is stored in GncOwner.
QOF needs to handle all objects generically and to tie the address to an owner, QOF must be able to find each - as entities.
This allows QOF to follow the hierarchy of objects without having to call any application-specific routines.
To achieve this, new GncAddress routines have been added. An address is now created with a NULL parent and the parent set explicitly using the QOF object declaration. Whilst this adds functionality, it is important that a valid GncOwner entity is always set as a parent. This is an API issue - QOF will always set the parent provided that a suitable entity is passed to the qofAddressSetOwner routine. It is up to you to pass a suitable entity.
int gncAddressCompare | ( | const GncAddress * | a, |
const GncAddress * | b | ||
) |
compare two addresses
Definition at line 567 of file gncAddress.c.
gboolean gncAddressEqual | ( | const GncAddress * | a, |
const GncAddress * | b | ||
) |
Deeply compare two addresses.
Definition at line 577 of file gncAddress.c.