|
Packit |
423ecb |
|
|
Packit |
423ecb |
<html>
|
|
Packit |
423ecb |
<head>
|
|
Packit |
423ecb |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
|
|
Packit |
423ecb |
<title>dict: string dictionary</title>
|
|
Packit |
423ecb |
<meta name="generator" content="Libxml2 devhelp stylesheet"/>
|
|
Packit |
423ecb |
<link rel="start" href="index.html" title="libxml2 Reference Manual"/>
|
|
Packit |
423ecb |
<link rel="up" href="general.html" title="API"/>
|
|
Packit |
423ecb |
<link rel="stylesheet" href="style.css" type="text/css"/>
|
|
Packit |
423ecb |
<link rel="chapter" href="general.html" title="API"/>
|
|
Packit |
423ecb |
</head>
|
|
Packit |
423ecb |
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
libxml2 Reference Manual
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
dict
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
dict - string dictionary
|
|
Packit |
423ecb |
dictionary of reusable strings, just used to avoid allocation and freeing operations.
|
|
Packit |
423ecb |
Author(s): Daniel Veillard
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
Synopsis
|
|
Packit |
423ecb |
typedef struct _xmlDict xmlDict;
|
|
Packit |
423ecb |
typedef xmlDict * xmlDictPtr;
|
|
Packit |
423ecb |
size_t xmlDictGetUsage (xmlDictPtr dict);
|
|
Packit |
423ecb |
int xmlDictReference (xmlDictPtr dict);
|
|
Packit |
423ecb |
void xmlDictCleanup (void);
|
|
Packit |
423ecb |
int xmlDictSize (xmlDictPtr dict);
|
|
Packit |
423ecb |
const xmlChar * xmlDictExists (xmlDictPtr dict, const xmlChar * name, int len);
|
|
Packit |
423ecb |
size_t xmlDictSetLimit (xmlDictPtr dict, size_t limit);
|
|
Packit |
423ecb |
int xmlDictOwns (xmlDictPtr dict, const xmlChar * str);
|
|
Packit |
423ecb |
const xmlChar * xmlDictQLookup (xmlDictPtr dict, const xmlChar * prefix, const xmlChar * name);
|
|
Packit |
423ecb |
int xmlInitializeDict (void);
|
|
Packit |
423ecb |
xmlDictPtr xmlDictCreateSub (xmlDictPtr sub);
|
|
Packit |
423ecb |
void xmlDictFree (xmlDictPtr dict);
|
|
Packit |
423ecb |
const xmlChar * xmlDictLookup (xmlDictPtr dict, const xmlChar * name, int len);
|
|
Packit |
423ecb |
xmlDictPtr xmlDictCreate (void);
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
Description
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
Details
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
The content of this structure is not made public by the API.
|
|
Packit |
423ecb |
} xmlDict;
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
Free the dictionary mutex. Do not call unless sure the library is not in use anymore !
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
Create a new dictionary
|
|
Packit |
423ecb |
<tt>Returns</tt>: | the newly created dictionary, or NULL if an error occurred. |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
Create a new dictionary, inheriting strings from the read-only dictionary @sub. On lookup, strings are first searched in the new dictionary, then in @sub, and if not found are created in the new dictionary.
|
|
Packit |
423ecb |
<tt>sub</tt>: | an existing dictionary | <tt>Returns</tt>: | the newly created dictionary, or NULL if an error occurred. |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
Check if the @name exists in the dictionary @dict.
|
|
Packit |
423ecb |
<tt>dict</tt>: | the dictionary | <tt>name</tt>: | the name of the userdata | <tt>len</tt>: | the length of the name, if -1 it is recomputed | <tt>Returns</tt>: | the internal copy of the name or NULL if not found. |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
Free the hash @dict and its contents. The userdata is deallocated with @f if provided.
|
|
Packit |
423ecb |
<tt>dict</tt>: | the dictionary |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
Get how much memory is used by a dictionary for strings Added in 2.9.0
|
|
Packit |
423ecb |
<tt>dict</tt>: | the dictionary | <tt>Returns</tt>: | the amount of strings allocated |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
Add the @name to the dictionary @dict if not present.
|
|
Packit |
423ecb |
<tt>dict</tt>: | the dictionary | <tt>name</tt>: | the name of the userdata | <tt>len</tt>: | the length of the name, if -1 it is recomputed | <tt>Returns</tt>: | the internal copy of the name or NULL in case of internal error |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
check if a string is owned by the disctionary
|
|
Packit |
423ecb |
<tt>dict</tt>: | the dictionary | <tt>str</tt>: | the string | <tt>Returns</tt>: | 1 if true, 0 if false and -1 in case of error -1 in case of error |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
Add the QName @prefix:@name to the hash @dict if not present.
|
|
Packit |
423ecb |
<tt>dict</tt>: | the dictionary | <tt>prefix</tt>: | the prefix | <tt>name</tt>: | the name | <tt>Returns</tt>: | the internal copy of the QName or NULL in case of internal error |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
Increment the reference counter of a dictionary
|
|
Packit |
423ecb |
<tt>dict</tt>: | the dictionary | <tt>Returns</tt>: | 0 in case of success and -1 in case of error |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
Set a size limit for the dictionary Added in 2.9.0
|
|
Packit |
423ecb |
<tt>dict</tt>: | the dictionary | <tt>limit</tt>: | the limit in bytes | <tt>Returns</tt>: | the previous limit of the dictionary or 0 |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
Query the number of elements installed in the hash @dict.
|
|
Packit |
423ecb |
<tt>dict</tt>: | the dictionary | <tt>Returns</tt>: | the number of elements in the dictionary or -1 in case of error |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
Do the dictionary mutex initialization. this function is deprecated
|
|
Packit |
423ecb |
<tt>Returns</tt>: | 0 if initialization was already done, and 1 if that call led to the initialization |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
</body>
|
|
Packit |
423ecb |
</html>
|