Daniel Veillard | 2fdbd32 | 2003-08-18 12:15:38 +0000 | [diff] [blame] | 1 | /* |
Daniel Veillard | be58697 | 2003-11-18 20:56:51 +0000 | [diff] [blame] | 2 | * Summary: string dictionnary |
| 3 | * Description: dictionary of reusable strings, just used to avoid allocation |
Daniel Veillard | 2fdbd32 | 2003-08-18 12:15:38 +0000 | [diff] [blame] | 4 | * and freeing operations. |
| 5 | * |
Daniel Veillard | be58697 | 2003-11-18 20:56:51 +0000 | [diff] [blame] | 6 | * Copy: See Copyright for the status of this software. |
Daniel Veillard | 2fdbd32 | 2003-08-18 12:15:38 +0000 | [diff] [blame] | 7 | * |
Daniel Veillard | be58697 | 2003-11-18 20:56:51 +0000 | [diff] [blame] | 8 | * Author: Daniel Veillard |
Daniel Veillard | 2fdbd32 | 2003-08-18 12:15:38 +0000 | [diff] [blame] | 9 | */ |
| 10 | |
| 11 | #ifndef __XML_DICT_H__ |
| 12 | #define __XML_DICT_H__ |
| 13 | |
Igor Zlatkovic | 76874e4 | 2003-08-25 09:05:12 +0000 | [diff] [blame] | 14 | #include <libxml/xmlversion.h> |
Daniel Veillard | 2fdbd32 | 2003-08-18 12:15:38 +0000 | [diff] [blame] | 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 | */ |
Igor Zlatkovic | 76874e4 | 2003-08-25 09:05:12 +0000 | [diff] [blame] | 30 | XMLPUBFUN xmlDictPtr XMLCALL |
| 31 | xmlDictCreate (void); |
Daniel Veillard | 4773df2 | 2004-01-23 13:15:13 +0000 | [diff] [blame] | 32 | XMLPUBFUN xmlDictPtr XMLCALL |
| 33 | xmlDictCreateSub(xmlDictPtr sub); |
Daniel Veillard | e96a2a4 | 2003-09-24 21:23:56 +0000 | [diff] [blame] | 34 | XMLPUBFUN int XMLCALL |
| 35 | xmlDictReference(xmlDictPtr dict); |
Igor Zlatkovic | 76874e4 | 2003-08-25 09:05:12 +0000 | [diff] [blame] | 36 | XMLPUBFUN void XMLCALL |
| 37 | xmlDictFree (xmlDictPtr dict); |
Daniel Veillard | 2fdbd32 | 2003-08-18 12:15:38 +0000 | [diff] [blame] | 38 | |
| 39 | /* |
| 40 | * Lookup of entry in the dictionnary. |
| 41 | */ |
Igor Zlatkovic | 76874e4 | 2003-08-25 09:05:12 +0000 | [diff] [blame] | 42 | XMLPUBFUN const xmlChar * XMLCALL |
| 43 | xmlDictLookup (xmlDictPtr dict, |
Daniel Veillard | 2fdbd32 | 2003-08-18 12:15:38 +0000 | [diff] [blame] | 44 | const xmlChar *name, |
| 45 | int len); |
Daniel Veillard | e72c508 | 2003-09-19 12:44:05 +0000 | [diff] [blame] | 46 | XMLPUBFUN const xmlChar * XMLCALL |
Daniel Veillard | 6bb3e86 | 2004-11-24 12:39:00 +0000 | [diff] [blame^] | 47 | xmlDictExists (xmlDictPtr dict, |
| 48 | const xmlChar *name, |
| 49 | int len); |
| 50 | XMLPUBFUN const xmlChar * XMLCALL |
Daniel Veillard | e72c508 | 2003-09-19 12:44:05 +0000 | [diff] [blame] | 51 | xmlDictQLookup (xmlDictPtr dict, |
| 52 | const xmlChar *prefix, |
| 53 | const xmlChar *name); |
Daniel Veillard | 81514ba | 2003-09-16 23:17:26 +0000 | [diff] [blame] | 54 | XMLPUBFUN int XMLCALL |
| 55 | xmlDictOwns (xmlDictPtr dict, |
| 56 | const xmlChar *str); |
Igor Zlatkovic | 76874e4 | 2003-08-25 09:05:12 +0000 | [diff] [blame] | 57 | XMLPUBFUN int XMLCALL |
| 58 | xmlDictSize (xmlDictPtr dict); |
Daniel Veillard | 2fdbd32 | 2003-08-18 12:15:38 +0000 | [diff] [blame] | 59 | #ifdef __cplusplus |
| 60 | } |
| 61 | #endif |
| 62 | #endif /* ! __XML_DICT_H__ */ |