• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Summary: string dictionnary
3  * Description: dictionary of reusable strings, just used to avoid allocation
4  *         and freeing operations.
5  *
6  * Copy: See Copyright for the status of this software.
7  *
8  * Author: Daniel Veillard
9  */
10 
11 #ifndef __XML_DICT_H__
12 #define __XML_DICT_H__
13 
14 #include <libxml/xmlversion.h>
15 #include <libxml/tree.h>
16 
17 #ifdef __cplusplus
18 extern "C" {
19 #endif
20 
21 /*
22  * The dictionnary.
23  */
24 typedef struct _xmlDict xmlDict;
25 typedef xmlDict *xmlDictPtr;
26 
27 /*
28  * Constructor and destructor.
29  */
30 XMLPUBFUN xmlDictPtr XMLCALL
31 			xmlDictCreate	(void);
32 XMLPUBFUN xmlDictPtr XMLCALL
33 			xmlDictCreateSub(xmlDictPtr sub);
34 XMLPUBFUN int XMLCALL
35 			xmlDictReference(xmlDictPtr dict);
36 XMLPUBFUN void XMLCALL
37 			xmlDictFree	(xmlDictPtr dict);
38 
39 /*
40  * Lookup of entry in the dictionnary.
41  */
42 XMLPUBFUN const xmlChar * XMLCALL
43 			xmlDictLookup	(xmlDictPtr dict,
44 		                         const xmlChar *name,
45 		                         int len);
46 XMLPUBFUN const xmlChar * XMLCALL
47 			xmlDictExists	(xmlDictPtr dict,
48 		                         const xmlChar *name,
49 		                         int len);
50 XMLPUBFUN const xmlChar * XMLCALL
51 			xmlDictQLookup	(xmlDictPtr dict,
52 		                         const xmlChar *prefix,
53 		                         const xmlChar *name);
54 XMLPUBFUN int XMLCALL
55 			xmlDictOwns	(xmlDictPtr dict,
56 					 const xmlChar *str);
57 XMLPUBFUN int XMLCALL
58 			xmlDictSize	(xmlDictPtr dict);
59 
60 /*
61  * Cleanup function
62  */
63 XMLPUBFUN void XMLCALL
64                         xmlDictCleanup  (void);
65 
66 #ifdef __cplusplus
67 }
68 #endif
69 #endif /* ! __XML_DICT_H__ */
70