DB Flags | |
Please note that the setter functions also take the flags from the module Paths (e.g. GWEN_PATH_FLAGS_PATHMUSTEXIST) into account. So you most likely need to specify them, too.
However, for your conveniance there is a default flag value which suffices in most cases (GWEN_DB_FLAGS_DEFAULT). | |
#define | GWEN_DB_FLAGS_ADD_GROUP_NEWLINES 0x00800000 |
#define | GWEN_DB_FLAGS_APPEND_FILE 0x08000000 |
#define | GWEN_DB_FLAGS_COMPACT |
#define | GWEN_DB_FLAGS_DEFAULT |
#define | GWEN_DB_FLAGS_DETAILED_GROUPS 0x00200000 |
#define | GWEN_DB_FLAGS_ESCAPE_CHARVALUES 0x10000000 |
#define | GWEN_DB_FLAGS_HTTP |
#define | GWEN_DB_FLAGS_INDEND 0x00400000 |
#define | GWEN_DB_FLAGS_INSERT 0x40000000 |
#define | GWEN_DB_FLAGS_LOCKFILE 0x20000000 |
#define | GWEN_DB_FLAGS_OMIT_TYPES 0x04000000 |
#define | GWEN_DB_FLAGS_OVERWRITE_GROUPS 0x00020000 |
#define | GWEN_DB_FLAGS_OVERWRITE_VARS 0x00010000 |
#define | GWEN_DB_FLAGS_QUOTE_VALUES 0x00080000 |
#define | GWEN_DB_FLAGS_QUOTE_VARNAMES 0x00040000 |
#define | GWEN_DB_FLAGS_STOP_ON_EMPTY_LINE 0x02000000 |
#define | GWEN_DB_FLAGS_UNESCAPE_CHARVALUES 0x10000000 |
#define | GWEN_DB_FLAGS_USE_COLON 0x01000000 |
#define | GWEN_DB_FLAGS_WRITE_SUBGROUPS 0x00100000 |
Node Flags | |
#define | GWEN_DB_NODE_FLAGS_DIRTY 0x00000001 |
#define | GWEN_DB_NODE_FLAGS_INHERIT_HASH_MECHANISM 0x00000004 |
#define | GWEN_DB_NODE_FLAGS_VOLATILE 0x00000002 |
Hash Mechanism | |
These functions allow for the implementation of hash mechanisms for DB groups. Those mechanisms can be applied to group nodes to speed up the lookup of subnodes to groups. | |
typedef int(* | GWEN_DB_HASH_ADDNODE_FN )(GWEN_DB_HASH_MECHANISM *hm, GWEN_DB_NODE *parent, GWEN_DB_NODE *node, int appendOrInsert, void *hashData) |
typedef int(* | GWEN_DB_HASH_FININODE_FN )(GWEN_DB_HASH_MECHANISM *hm, GWEN_DB_NODE *node, void **hashData) |
typedef GWEN_DB_NODE *(* | GWEN_DB_HASH_GETNODE_FN )(GWEN_DB_HASH_MECHANISM *hm, GWEN_DB_NODE *parent, const char *name, int idx, void *hashData) |
typedef int(* | GWEN_DB_HASH_INITNODE_FN )(GWEN_DB_HASH_MECHANISM *hm, GWEN_DB_NODE *node, void **hashData) |
typedef GWEN_DB_HASH_MECHANISM | GWEN_DB_HASH_MECHANISM |
typedef int(* | GWEN_DB_HASH_UNLINKNODE_FN )(GWEN_DB_HASH_MECHANISM *hm, GWEN_DB_NODE *parent, GWEN_DB_NODE *node, void *hashData) |
GWENHYWFAR_API int | GWEN_DB_Group_SetHashMechanism (GWEN_DB_NODE *node, GWEN_DB_HASH_MECHANISM *hm) |
GWENHYWFAR_API void | GWEN_DB_HashMechanism_Attach (GWEN_DB_HASH_MECHANISM *hm) |
GWENHYWFAR_API void | GWEN_DB_HashMechanism_free (GWEN_DB_HASH_MECHANISM *hm) |
GWENHYWFAR_API GWEN_DB_HASH_MECHANISM * | GWEN_DB_HashMechanism_new () |
GWENHYWFAR_API void | GWEN_DB_HashMechanism_SetAddNodeFn (GWEN_DB_HASH_MECHANISM *hm, GWEN_DB_HASH_ADDNODE_FN f) |
GWENHYWFAR_API void | GWEN_DB_HashMechanism_SetFiniNodeFn (GWEN_DB_HASH_MECHANISM *hm, GWEN_DB_HASH_FININODE_FN f) |
GWENHYWFAR_API void | GWEN_DB_HashMechanism_SetGetNodeFn (GWEN_DB_HASH_MECHANISM *hm, GWEN_DB_HASH_GETNODE_FN f) |
GWENHYWFAR_API void | GWEN_DB_HashMechanism_SetInitNodeFn (GWEN_DB_HASH_MECHANISM *hm, GWEN_DB_HASH_INITNODE_FN f) |
GWENHYWFAR_API void | GWEN_DB_HashMechanism_SetUnlinkNodeFn (GWEN_DB_HASH_MECHANISM *hm, GWEN_DB_HASH_UNLINKNODE_FN f) |
Iterating Through Groups | |
typedef void *(* | GWEN_DB_NODES_CB )(GWEN_DB_NODE *node, void *user_data) |
GWENHYWFAR_API GWEN_DB_NODE * | GWEN_DB_FindFirstGroup (GWEN_DB_NODE *n, const char *name) |
GWENHYWFAR_API GWEN_DB_NODE * | GWEN_DB_FindNextGroup (GWEN_DB_NODE *n, const char *name) |
GWENHYWFAR_API GWEN_DB_NODE * | GWEN_DB_GetFirstGroup (GWEN_DB_NODE *n) |
GWENHYWFAR_API GWEN_DB_NODE * | GWEN_DB_GetNextGroup (GWEN_DB_NODE *n) |
GWENHYWFAR_API unsigned int | GWEN_DB_Groups_Count (const GWEN_DB_NODE *node) |
GWENHYWFAR_API void * | GWEN_DB_Groups_Foreach (GWEN_DB_NODE *node, GWEN_DB_NODES_CB func, void *user_data) |
Variable Getter and Setter | |
These getter functions check for the existence of the given variable and return the value specified by an index. Under the following circumstances the also given default value will be returned:
The setter functions either replace an existing variable, create a missing variable, add a value or return an error if the variable does not exist (see description of the flags). All setter functions make deep copies of the given values, so you may free the params after calling the setter function. All getter functions return a const pointer to the variable's retrieved value. All setter functions return Zero if ok and Nonzero on error. This module knows about the following types (see GWEN_DB_VALUETYPE):
| |
GWENHYWFAR_API int | GWEN_DB_AddCharValue (GWEN_DB_NODE *n, const char *path, const char *val, int senseCase, int check) |
GWENHYWFAR_API const void * | GWEN_DB_GetBinValue (GWEN_DB_NODE *n, const char *path, int idx, const void *defVal, unsigned int defValSize, unsigned int *returnValueSize) |
GWENHYWFAR_API const char * | GWEN_DB_GetCharValue (GWEN_DB_NODE *n, const char *path, int idx, const char *defVal) |
GWENHYWFAR_API int | GWEN_DB_GetIntValue (GWEN_DB_NODE *n, const char *path, int idx, int defVal) |
GWENHYWFAR_API void * | GWEN_DB_GetPtrValue (GWEN_DB_NODE *n, const char *path, int idx, void *defVal) |
GWENHYWFAR_API int | GWEN_DB_RemoveCharValue (GWEN_DB_NODE *n, const char *path, const char *val, int senseCase) |
GWENHYWFAR_API int | GWEN_DB_SetBinValue (GWEN_DB_NODE *n, GWEN_TYPE_UINT32 flags, const char *path, const void *val, unsigned int valSize) |
GWENHYWFAR_API int | GWEN_DB_SetCharValue (GWEN_DB_NODE *n, GWEN_TYPE_UINT32 flags, const char *path, const char *val) |
GWENHYWFAR_API int | GWEN_DB_SetIntValue (GWEN_DB_NODE *n, GWEN_TYPE_UINT32 flags, const char *path, int val) |
GWENHYWFAR_API int | GWEN_DB_SetPtrValue (GWEN_DB_NODE *n, GWEN_TYPE_UINT32 flags, const char *path, void *val) |
Group Handling | |
GWENHYWFAR_API int | GWEN_DB_AddGroup (GWEN_DB_NODE *parent, GWEN_DB_NODE *node) |
GWENHYWFAR_API int | GWEN_DB_AddGroupChildren (GWEN_DB_NODE *n, GWEN_DB_NODE *nn) |
GWENHYWFAR_API int | GWEN_DB_ClearGroup (GWEN_DB_NODE *n, const char *path) |
GWENHYWFAR_API int | GWEN_DB_DeleteGroup (GWEN_DB_NODE *n, const char *path) |
GWENHYWFAR_API GWEN_DB_NODE * | GWEN_DB_GetGroup (GWEN_DB_NODE *n, GWEN_TYPE_UINT32 flags, const char *path) |
GWENHYWFAR_API GWEN_TYPE_UINT32 | GWEN_DB_GetNodeFlags (const GWEN_DB_NODE *n) |
GWENHYWFAR_API const char * | GWEN_DB_GroupName (GWEN_DB_NODE *n) |
GWENHYWFAR_API void | GWEN_DB_GroupRename (GWEN_DB_NODE *n, const char *newname) |
GWENHYWFAR_API int | GWEN_DB_InsertGroup (GWEN_DB_NODE *parent, GWEN_DB_NODE *node) |
GWENHYWFAR_API int | GWEN_DB_IsGroup (const GWEN_DB_NODE *n) |
void | GWEN_DB_ModifyBranchFlagsDown (GWEN_DB_NODE *n, GWEN_TYPE_UINT32 newflags, GWEN_TYPE_UINT32 mask) |
void | GWEN_DB_ModifyBranchFlagsUp (GWEN_DB_NODE *n, GWEN_TYPE_UINT32 newflags, GWEN_TYPE_UINT32 mask) |
GWENHYWFAR_API void | GWEN_DB_SetNodeFlags (GWEN_DB_NODE *n, GWEN_TYPE_UINT32 flags) |
GWENHYWFAR_API void | GWEN_DB_UnlinkGroup (GWEN_DB_NODE *n) |
Iterating Through Variables and variable handling | |
GWENHYWFAR_API int | GWEN_DB_DeleteVar (GWEN_DB_NODE *n, const char *path) |
GWENHYWFAR_API GWEN_DB_NODE * | GWEN_DB_FindFirstVar (GWEN_DB_NODE *n, const char *name) |
GWENHYWFAR_API GWEN_DB_NODE * | GWEN_DB_FindNextVar (GWEN_DB_NODE *n, const char *name) |
GWENHYWFAR_API GWEN_DB_NODE * | GWEN_DB_GetFirstVar (GWEN_DB_NODE *n) |
GWENHYWFAR_API GWEN_DB_NODE * | GWEN_DB_GetNextVar (GWEN_DB_NODE *n) |
GWENHYWFAR_API GWEN_DB_VALUETYPE | GWEN_DB_GetVariableType (GWEN_DB_NODE *n, const char *p) |
GWENHYWFAR_API int | GWEN_DB_IsVariable (const GWEN_DB_NODE *n) |
GWENHYWFAR_API int | GWEN_DB_ValueExists (GWEN_DB_NODE *n, const char *path, unsigned int idx) |
GWENHYWFAR_API int | GWEN_DB_VariableExists (GWEN_DB_NODE *n, const char *path) |
GWENHYWFAR_API const char * | GWEN_DB_VariableName (GWEN_DB_NODE *n) |
GWENHYWFAR_API void | GWEN_DB_VariableRename (GWEN_DB_NODE *n, const char *newname) |
GWENHYWFAR_API unsigned int | GWEN_DB_Variables_Count (const GWEN_DB_NODE *node) |
GWENHYWFAR_API void * | GWEN_DB_Variables_Foreach (GWEN_DB_NODE *node, GWEN_DB_NODES_CB func, void *user_data) |
Debugging | |
These functions are for debugging purposes only. You should NOT consider them part of the API. | |
GWENHYWFAR_API void | GWEN_DB_Dump (GWEN_DB_NODE *n, FILE *f, int insert) |
Iterating Through Values and value handling | |
GWENHYWFAR_API const void * | GWEN_DB_GetBinValueFromNode (const GWEN_DB_NODE *n, unsigned int *size) |
GWENHYWFAR_API const char * | GWEN_DB_GetCharValueFromNode (const GWEN_DB_NODE *n) |
GWENHYWFAR_API GWEN_DB_NODE * | GWEN_DB_GetFirstValue (GWEN_DB_NODE *n) |
GWENHYWFAR_API int | GWEN_DB_GetIntValueFromNode (const GWEN_DB_NODE *n) |
GWENHYWFAR_API GWEN_DB_NODE * | GWEN_DB_GetNextValue (GWEN_DB_NODE *n) |
GWENHYWFAR_API GWEN_DB_VALUETYPE | GWEN_DB_GetValueType (GWEN_DB_NODE *n) |
GWENHYWFAR_API GWEN_DB_VALUETYPE | GWEN_DB_GetValueTypeByPath (GWEN_DB_NODE *n, const char *p, unsigned int i) |
GWENHYWFAR_API int | GWEN_DB_IsValue (const GWEN_DB_NODE *n) |
GWENHYWFAR_API int | GWEN_DB_SetCharValueInNode (GWEN_DB_NODE *n, const char *s) |
GWENHYWFAR_API unsigned int | GWEN_DB_Values_Count (const GWEN_DB_NODE *node) |
GWENHYWFAR_API void * | GWEN_DB_Values_Foreach (GWEN_DB_NODE *node, GWEN_DB_NODES_CB func, void *user_data) |
Constructing, Destructing, Copying | |
GWENHYWFAR_API GWEN_DB_NODE * | GWEN_DB_Group_dup (const GWEN_DB_NODE *n) |
GWENHYWFAR_API void | GWEN_DB_Group_free (GWEN_DB_NODE *n) |
GWENHYWFAR_API GWEN_DB_NODE * | GWEN_DB_Group_new (const char *name) |
Reading and Writing From/To Streams | |
These functions read or write a DB from/to GWEN_BUFFEREDIO. This allows to use any source or target supported by GWEN_BUFFEREDIO for data storage (these are currently sockets, files and memory buffers). The flags determine how to read/write the data (e.g. if sub-groups are to be written etc). | |
GWENHYWFAR_API int | GWEN_DB_ReadFile (GWEN_DB_NODE *n, const char *fname, GWEN_TYPE_UINT32 dbflags) |
GWENHYWFAR_API int | GWEN_DB_ReadFileAs (GWEN_DB_NODE *n, const char *fname, const char *type, GWEN_DB_NODE *params, GWEN_TYPE_UINT32 dbflags) |
GWENHYWFAR_API int | GWEN_DB_ReadFromStream (GWEN_DB_NODE *n, GWEN_BUFFEREDIO *bio, GWEN_TYPE_UINT32 dbflags) |
GWENHYWFAR_API int | GWEN_DB_WriteFile (GWEN_DB_NODE *n, const char *fname, GWEN_TYPE_UINT32 dbflags) |
GWENHYWFAR_API int | GWEN_DB_WriteFileAs (GWEN_DB_NODE *n, const char *fname, const char *type, GWEN_DB_NODE *params, GWEN_TYPE_UINT32 dbflags) |
GWENHYWFAR_API int | GWEN_DB_WriteToStream (GWEN_DB_NODE *n, GWEN_BUFFEREDIO *bio, GWEN_TYPE_UINT32 dbflags) |
Defines | |
#define | GWEN_DB_LINE_MAXSIZE 1024 |
Typedefs | |
typedef GWEN_DB_NODE | GWEN_DB_NODE |
Enumerations | |
enum | GWEN_DB_VALUETYPE { GWEN_DB_VALUETYPE_UNKNOWN = 0, GWEN_DB_VALUETYPE_CHAR, GWEN_DB_VALUETYPE_INT, GWEN_DB_VALUETYPE_BIN, GWEN_DB_VALUETYPE_PTR } |
A GWEN_DB database consists of a tree of GWEN_DB_NODE entries. Such a GWEN_DB_NODE node can either be a group node, or a variable node, or a value node. Usually an application programmer will only get in touch with group nodes. The application programmer can iterate through the group nodes with GWEN_DB_GetGroup(), GWEN_DB_Groups_foreach(), and can retrieve variable values with GWEN_DB_GetIntValue(), GWEN_DB_GetCharValue() and so on.
The following graph shows the internal structure of a GWEN_DB:
Internal structure of a GWEN_DB
Each group has a name. Depending on the GWEN_DB_FLAGS given when reading a GWEN_DB from a file or creating it, it may very well be possible to have multiple groups with the same name as children of the same root node. Again: Child group nodes with the same name may very well exist. This also applies to variable nodes.
For the interested reader, we again explain the difference of the three kinds of nodes. Depending on either of these cases, you can
To retrieve or set the value of such a variable, the following "shortcut" functions for all three supported typed exist: GWEN_DB_GetIntValue(), GWEN_DB_GetCharValue(), GWEN_DB_GetBinValue(). These functions only accept a group and a "path" to the desired variable.
|
writes a newline to the stream after writing a group to improve the readability of the created file |
|
appends data to an existing file instead of overwriting it |
|
Value: (\ GWEN_DB_FLAGS_QUOTE_VALUES | \ GWEN_DB_FLAGS_WRITE_SUBGROUPS | \ GWEN_DB_FLAGS_ESCAPE_CHARVALUES | \ GWEN_DB_FLAGS_UNESCAPE_CHARVALUES\ ) |
|
Value: These are the default flags which you use in most cases |
|
adds some comments when writing to a stream |
|
Char values are escaped when writing them to a file. |
|
Value: These flags can be used to read a DB from a HTTP header. It uses a colon instead of the equation mark with variable definitions and stops when encountering an empty line. |
|
indents text according to the current path depth when writing to a stream to improve the readability of the created file |
|
When setting a value or getting a group insert newly created values/groups rather than appending them. |
|
locks a file before reading from or writing to it This is used by GWEN_DB_ReadFile and GWEN_DB_WriteFile |
|
normally the type of a variable is written to the stream, too. This flag changes this behaviour |
|
Overwrite existing groups when calling GWEN_DB_GetGroup() |
|
Overwrite existing values when assigning a new value to a variable |
|
quote values when writing them to a stream |
|
quote variable names when writing them to a stream |
|
stops reading from a stream at empty lines |
|
Char values are unescaped when reading them from a file (uses the same bit GWEN_DB_FLAGS_ESCAPE_CHARVALUES uses) |
|
uses a colon (":") instead of an equation mark when reading/writing variable definitions |
|
allows writing of subgroups when writing to a stream |
|
maximum size of a text line when reading/writing from/to streams |
|
is set then this node has been altered |
|
this is only valid for groups. It determines whether subgroups will inherit the hash mechanism set in the root node. |
|
variable is volatile (will not be written) |
|
|
|
|
|
|
|
|
|
|
|
|
|
This is the type used to store a DB. Its contents are explicitly NOT part of the API. A description of what can be done with this type can be found in db.h |
|
Callback function type for GWEN_DB_Groups_Foreach(), GWEN_DB_Variables_Foreach(), and GWEN_DB_Values_Foreach().
|
|
This specifies the type of a value stored in the DB. |
|
Adds the given char value to the given variable if it not already exists (depending on the arguments senseCase and check).
|
|
Adds the given group node as a new child of the given parent group node. The group name has no influence on what will happen in this function. In other words, if the parent group already has a child group with the same name as 'node', then after this function two child group nodes with the same name will exist.
|
|
This function adds all children of the second node as new children to the first given one.
|
|
Frees all children of the given node thereby clearing it.
|
|
Locates and removes the group of the given name.
|
|
Deletes the given variable by removing it and its values from the DB.
|
|
Dumps the content of the given DB to the given file (e.g. stderr).
|
|
Returns the first group node below the given one by name. If there is no matching group node then NULL is returned. This can either mean that this node does not have any children or the only children are variables instead of groups or their is no group of the given name.
|
|
Returns the first variable node below the given one by name. If there is no matching variable node then NULL is returned. This can either mean that this node does not have any children or the only children are groups/values instead of variables or their is no variable of the given name.
|
|
Returns the next group node following the given one, which has the same parent node, by name. If there is no matching group node then NULL is returned. This can either mean that the parent node does not have any further children, or that the other children are variables instead of groups or that there is no group with the given name.
|
|
Returns the next variable node following the given one, which has the same parent node, by name. If there is no matching variable node then NULL is returned. This can either mean that this node does not have any children or the only children are groups/values instead of variables or their is no variable of the given name.
|
|
Returns the variable's retrieved value. The size of the binary data is written into the int pointer argument returnValueSize.
|
|
|
|
Returns the variable's retrieved value.
|
|
Returns the value data of the given value node. If the given node is not a char-value node then 0 is returned. |
|
Returns the first group node below the given one. If there is no group node then NULL is returned. This can either mean that this node does not have any children or the only children are variables instead of groups.
|
|
Returns the first value below the given variable. If there is no value then NULL is returned.
|
|
Returns the first variable below the given group. If there is no variable then NULL is returned.
|
|
This function either creates a new group, returns an existing one or returns an error if there is no group but the caller wanted one (depending on the flags given).
|
|
Returns the variable's retrieved value.
|
|
|
|
Returns the next group node following the given one, which has the same parent node. This function works absolutely independently of the group nodes' names -- the returned node may or may not have the same name as the specified node. The only guarantee is that the returned node will be a group node. If there is no group node then NULL is returned. This can either mean that the parent node does not have any further children, or that the other children are variables instead of groups.
|
|
Returns the next value node following the given one, which has the same parent node. If there is no value node then NULL is returned. This can either mean that the parent node does not have any further children, or that the other children aren't values.
|
|
Returns the next variable node following the given one, which has the same parent node. This function works absolutely independently of the variable nodes' names -- the returned node may or may not have the same name as the specified node. The only guarantee is that the returned node will be a variable node. If there is no variable node then NULL is returned. This can either mean that the parent node does not have any further children, or that the other children are groups instead of variables.
|
|
Returns the node flags for the given db node. Please note that all modifications applied to a node will set the dirty flag in the node itself and all its parents. This allows to use this funcion here to check whether a DB has been modified.
|
|
Returns the variable's retrieved value.
|
|
Returns the type of the given value.
|
|
|
|
Returns the type of the first value of the given variable
|
|
Creates a deep copy of the given node. This copy will then be owned by the caller and MUST be freed after using it by calling GWEN_DB_Group_free().
|
|
Frees a DB group. I.e. this is the destructor. This is needed to avoid memory leaks.
|
|
Creates a new (empty) group with the given name. I.e. this is the constructor. When finished using this group, you should free it using GWEN_DB_Group_free() in order to avoid memory leaks.
|
|
Assigns a hash mechanism to a DB group. If the node flag GWEN_DB_NODE_FLAGS_INHERIT_HASH_MECHANISM is set on this node then this hash mechanism will be set to all nodes which become children to the given node as they are added (but only if the nodes to be added don't already have a hash mechanism of their own). You should set the hash mechanism to the root node and also set the flag described above to ensure that every group in every level uses this hash mechanism. The GWEN_DB takes care of calling the approppriate init, fini, attach and free functions of the hash mechanism. |
|
Returns the name of the given group. |
|
Renames the given group.
|
|
Returns the number of group nodes that are direct children of the given node. In other words, this is the number of group nodes that will be reached in the GWEN_DB_Groups_foreach() function. |
|
Iterates through all group nodes that are direct children of the given node, calling the callback function 'func' on each group node. Traversal will stop when 'func' returns a non-NULL value, and the routine will return with that value. Otherwise the routine will return NULL. If no nodes that are groups are found as children, then this function will simply do nothing.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Adds the given group node as the new first child of the given parent group node. The group name has no influence on what will happen in this function. In other words, if the parent group already has a child group with the same name as 'node', then after this function two child group nodes with the same name will exist.
|
|
Predicate: Returns nonzero (TRUE) or zero (FALSE) if the given NODE is a Group or not. Usually these group nodes are the only nodes that the application gets in touch with.
|
|
Predicate: Returns nonzero (TRUE) or zero (FALSE) if the given NODE is a Value or not. Usually the Application does not get in touch with such Nodes but only with nodes that are Groups.
|
|
Predicate: Returns nonzero (TRUE) or zero (FALSE) if the given NODE is a Variable or not. Usually the Application does not get in touch with such Nodes but only with nodes that are Groups.
|
|
Modifies the flags of the given node and all its children according to the parameters given.
|
|
Modifies the flags of the given node and all its parents according to the parameters given.
|
|
Read a DB from a file.
|
|
Imports a file into a DB using a GWEN_DBIO importer.
|
|
Read a DB from GWEN_BUFFEREDIO.
|
|
Removes the given char value from the given variable if it exists (depending on the arguments senseCase and check).
|
|
|
|
|
|
Replaces the current value data of the given node by the new string.
|
|
|
|
Modifies the node flags for the given db node
|
|
|
|
Unlinks a group (and thereby all its children) from its parent and brothers. This function DOES NOT free the group, it just unlinks it. You can then use it with e.g. GWEN_DB_AddGroup or other functions to relink it at any other position of even in other DBs.
|
|
Checks whether the given variable and value exists.
|
|
Returns the number of value nodes that are direct children of the given node. In other words, this is the number of value nodes that will be reached in the GWEN_DB_Values_foreach() function. |
|
Iterates through all value nodes that are direct children of the given node, calling the callback function 'func' on each value node. Traversal will stop when 'func' returns a non-NULL value, and the routine will return with that value. Otherwise the routine will return NULL. If no nodes that are values are found as children, then this function will simply do nothing.
|
|
Checks whether the given variable exists.
|
|
Returns the name of the variable specified by the given node.
|
|
|
|
Returns the number of variable nodes that are direct children of the given node. In other words, this is the number of variable nodes that will be reached in the GWEN_DB_Variables_Foreach() function. |
|
Iterates through all variable nodes that are direct children of the given node, calling the callback function 'func' on each variable node. Traversal will stop when 'func' returns a non-NULL value, and the routine will return with that value. Otherwise the routine will return NULL. If no nodes that are variables are found as children, then this function will simply do nothing.
|
|
Write a DB to a file.
|
|
Exports a DB to a file using a GWEN_DBIO exporter.
|
|
Write a DB to a GWEN_BUFFEREDIO.
|