dictionary of reusable strings, just used to avoid allocation and freeing operations. Table of ContentsStructure xmlDict struct _xmlDict
The content of this structure is not made public by the API.
Typedef xmlDict * xmlDictPtr
void xmlDictCleanup (void)
@@ -18,16 +18,19 @@ The content of this structure is not made public by th
xmlDictPtr xmlDictCreateSub (xmlDictPtr sub)
const xmlChar * xmlDictExists (xmlDictPtr dict, const xmlChar * name, int len)
void xmlDictFree (xmlDictPtr dict)
+size_t xmlDictGetUsage (xmlDictPtr dict)
const xmlChar * xmlDictLookup (xmlDictPtr dict, const xmlChar * name, int len)
int xmlDictOwns (xmlDictPtr dict, const xmlChar * str)
const xmlChar * xmlDictQLookup (xmlDictPtr dict, const xmlChar * prefix, const xmlChar * name)
int xmlDictReference (xmlDictPtr dict)
+size_t xmlDictSetLimit (xmlDictPtr dict, size_t limit)
int xmlDictSize (xmlDictPtr dict)
+int xmlInitializeDict (void)
Description
Structure xmlDict struct _xmlDict {
The content of this structure is not made public by the API.
} Function: xmlDictCleanupvoid xmlDictCleanup (void)
- Free the dictionary mutex.
+Free the dictionary mutex. Do not call unless sure the library is not in use anymore !
Function: xmlDictCreatexmlDictPtr xmlDictCreate (void)
Create a new dictionary
Returns: | the newly created dictionnary, or NULL if an error occured. |
Function: xmlDictCreateSubxmlDictPtr xmlDictCreateSub (xmlDictPtr sub)
@@ -36,7 +39,9 @@ The content of this structure is not made public by th
Check if the @name exists in the dictionnary @dict.
dict: | the dictionnary | name: | the name of the userdata | len: | the length of the name, if -1 it is recomputed | Returns: | the internal copy of the name or NULL if not found. |
Function: xmlDictFreevoid xmlDictFree (xmlDictPtr dict)
Free the hash @dict and its contents. The userdata is deallocated with @f if provided.
-Function: xmlDictLookupconst xmlChar * xmlDictLookup (xmlDictPtr dict, const xmlChar * name, int len)
+Function: xmlDictGetUsagesize_t xmlDictGetUsage (xmlDictPtr dict)
+ Get how much memory is used by a dictionary for strings Added in 2.9.0
+dict: | the dictionnary | Returns: | the amount of strings allocated |
Function: xmlDictLookupconst xmlChar * xmlDictLookup (xmlDictPtr dict, const xmlChar * name, int len)
Add the @name to the dictionnary @dict if not present.
dict: | the dictionnary | name: | the name of the userdata | len: | the length of the name, if -1 it is recomputed | Returns: | the internal copy of the name or NULL in case of internal error |
Function: xmlDictOwnsint xmlDictOwns (xmlDictPtr dict, const xmlChar * str)
check if a string is owned by the disctionary
@@ -44,6 +49,10 @@ The content of this structure is not made public by th
Add the QName @prefix:@name to the hash @dict if not present.
dict: | the dictionnary | prefix: | the prefix | name: | the name | Returns: | the internal copy of the QName or NULL in case of internal error |
Function: xmlDictReferenceint xmlDictReference (xmlDictPtr dict)
Increment the reference counter of a dictionary
-dict: | the dictionnary | Returns: | 0 in case of success and -1 in case of error |
Function: xmlDictSizeint xmlDictSize (xmlDictPtr dict)
+dict: | the dictionnary | Returns: | 0 in case of success and -1 in case of error |
Function: xmlDictSetLimitsize_t xmlDictSetLimit (xmlDictPtr dict, size_t limit)
+ Set a size limit for the dictionary Added in 2.9.0
+dict: | the dictionnary | limit: | the limit in bytes | Returns: | the previous limit of the dictionary or 0 |
Function: xmlDictSizeint xmlDictSize (xmlDictPtr dict)
Query the number of elements installed in the hash @dict.
-dict: | the dictionnary | Returns: | the number of elements in the dictionnary or -1 in case of error |
Daniel Veillard |