The SItemClass structure.
Protected Attributes
- SObjectClass _inherit
Inherit from SObjectClass.
- SItem *(*const item_as)(const SItem *self, const char *relation, s_erc *error)
ItemAs function pointer Find the item in the given relation that has the same shared content as the given item.
Parameters:
- self –
The item.
- relation –
The relation name.
- error –
Error code.
Return: The given item as it is represented in the named relation.
- s_bool (*const item_in)(const SItem *self, const char *relation, s_erc *error)
ItemIn function pointer Query if the given item is in the named relation.
Parameters:
- self –
The item.
- relation –
The relation.
- error –
Error code.
Return: - SItem *(*const item_next)(const SItem *self, s_erc *error)
ItemNext function pointer Get the item next to the given one in the current relation.
Parameters:
- self –
The item.
- error –
Error code.
Return: Pointer to the next item.
- SItem *(*const item_prev)(const SItem *self, s_erc *error)
ItemPrev function pointer Get the item previous to the given one in the current relation.
Parameters:
- self –
The item.
- error –
Error code.
Return: Pointer to the prev item.
- SItem *(*const item_append)(SItem *self, const SItem *toShare, s_erc *error)
ItemAppend function pointer Create a new item and append it after the given item self.
The new item will share it’s content with the given item toShare.
Parameters:
- self –
The given item.
- toShare –
The item with which the newly created item will share it’s content. If NULL then a new content will be created for the appended item.
- error –
Error code.
Return: Pointer to appended item.
- SItem *(*const item_prepend)(SItem *self, const SItem *toShare, s_erc *error)
ItemPrepend function pointer Create a new item and prepend it before the given item self.
The new item will share it’s content with the given item toShare.
Parameters:
- self –
The given item.
- toShare –
The item with which the newly created item will share it’s content. If NULL then a new content will be created for the prepended item.
- error –
Error code.
Return: Pointer to prepended item.
- SItem *(*const item_parent)(const SItem *self, s_erc *error)
ItemParent function pointer Returns the parent item of the given item.
Parameters:
- self –
The given item.
- error –
Error code.
Return: Pointer to the parent item of the given item.
- SItem *(*const item_daughter)(const SItem *self, s_erc *error)
ItemDaughter function pointer Retrieve the first daughter item of the given item.
Parameters:
- self –
The given item.
- error –
Error code.
Return: Pointer to the first daughter item of the given item.
- SItem *(*const nth_daughter)(const SItem *self, uint32 n, s_erc *error)
ItemNth function pointer Retrieve the nth daughter item of the given item.
Parameters:
- self –
The given item.
- n –
The index of the daughter item to return.
Parameters:
- error –
Error code.
Note: Indexing starts at 0.
Return: Pointer to the nth daughter item of the given item.
- SItem *(*const last_daughter)(const SItem *self, s_erc *error)
LastDaughter function pointer Retrieve the last daughter item of the given item.
Parameters:
- self –
The given item.
- error –
Error code.
Return: Pointer to the last daughter item of the given item.
- SItem *(*const add_daughter)(SItem *self, const SItem *toShare, s_erc *error)
AddDaughter function pointer Create a new item and add it as a daughter of the given item self.
The new item will share it’s content with the given item toShare.
Parameters:
- self –
The given item.
- toShare –
The item with which the newly created item will share it’s content. If NULL then a new content will be created for the daughter item.
- error –
Error code.
Return: Pointer to newly added daughter item.
- const char *(*const get_name)(const SItem *self, s_erc *error)
GetName function pointer Get the given item’s name.
Parameters:
- self –
The given item.
- error –
Error code.
Return: Pointer to the given item’s name.
- void(*const set_name)(SItem *self, const char *name, s_erc *error)
SetName function pointer Set the given item’s name.
Parameters:
- self –
The given item.
- name –
The name of the item.
- error –
Error code.
- s_bool (*const feat_present)(const SItem *self, const char *name, s_erc *error)
FeatPresent function pointer Query if named feature is present in the given item.
Parameters:
- self –
The given item.
- name –
The feature name.
- error –
Error code.
Return: - void(*const feat_delete)(SItem *self, const char *name, s_erc *error)
FeatDelete function pointer Delete the named feature from the given item.
Parameters:
- self –
The given item.
- name –
The feature name.
- error –
Error code.
- SList *(*const feat_keys)(const SItem *self, s_erc *error)
FeatKeys function pointer Get the keys of the features of the given item.
Parameters:
- self –
The given item.
- error –
Error code.
Return: Pointer to a SList containing the keys of the features of the item. The list objects (keys) are string objects and are accessed with SObjectGetString.
Note: Caller is responsible for the memory of the returned SList object.
- const SObject *(*const get_object)(const SItem *self, const char *name, s_erc *error)
GetObject function pointer Get the SObject object of the named feature of the given item.
Parameters:
- self –
The given item.
- name –
The feature name.
- error –
Error code.
Return: Pointer to the SObject object.
- sint32 (*const get_int)(const SItem *self, const char *name, s_erc *error)
GetInt function pointer Get the integer value of the named feature of the given item.
Parameters:
- self –
The given item.
- name –
The feature name.
- error –
Error code.
Return: Integer value of named feature.
- float(*const get_float)(const SItem *self, const char *name, s_erc *error)
GetFloat function pointer Get the float value of the named feature of the given item.
Parameters:
- self –
The given item.
- name –
The feature name.
- error –
Error code.
Return: Float value of named feature.
- const char *(*const get_string)(const SItem *self, const char *name, s_erc *error)
GetString function pointer Get the string value of the named feature of the given item.
Parameters:
- self –
The given item.
- name –
The feature name.
- error –
Error code.
Return: Pointer to the string.
- void(*const set_object)(SItem *self, const char *name, const SObject *object, s_erc *error)
SetObject function pointer Set the named feature to the given SObject object in the given item.
Parameters:
- self –
The given item.
- name –
The feature name.
- obejct –
The SObject.
- error –
Error code.
- void(*const set_int)(SItem *self, const char *name, sint32 i, s_erc *error)
SetInt function pointer Set the named feature to the given integer value.
Parameters:
- self –
The given item.
- name –
The feature name.
- i –
The integer value.
- error –
Error code.
- void(*const set_float)(SItem *self, const char *name, float f, s_erc *error)
SetFloat function pointer Set the named feature to the given float value.
Parameters:
- self –
The given item.
- name –
The feature name.
- f –
The float value.
- error –
Error code.
- void(*const set_string)(SItem *self, const char *name, const char *string, s_erc *error)
SetString function pointer Set the named feature to the given string value.
Parameters:
- self –
The given item.
- name –
The feature name
- string –
The string value.
- error –
Error code.
- const SRelation *(*const relation)(const SItem *self, s_erc *error)
Relation function pointer Get the relation of the given item.
Parameters:
- self –
The given item.
- error –
Error code.
Return: Pointer to the given item’s relation.
- const SUtterance *(*const utterance)(const SItem *self, s_erc *error)
Utterance function pointer Get the utterance of the given item.
Parameters:
- self –
The given item.
- error –
Error code.
Return: Pointer to the given item’s utterance.
- const SVoice *(*const voice)(const SItem *self, s_erc *error)
Voice function pointer Get the voice of the given item.
Parameters:
- self –
The given item.
- error –
Error code.
Return: Pointer to the given item’s voice.