You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

80 regels
1.8 KiB

  1. /*
  2. * Summary: string dictionary
  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. #ifndef __XML_DICT_H__
  11. #define __XML_DICT_H__
  12. #include <stddef.h>
  13. #include <libxml/xmlversion.h>
  14. #ifdef __cplusplus
  15. extern "C" {
  16. #endif
  17. /*
  18. * The dictionary.
  19. */
  20. typedef struct _xmlDict xmlDict;
  21. typedef xmlDict *xmlDictPtr;
  22. /*
  23. * Initializer
  24. */
  25. XMLPUBFUN int XMLCALL xmlInitializeDict(void);
  26. /*
  27. * Constructor and destructor.
  28. */
  29. XMLPUBFUN xmlDictPtr XMLCALL
  30. xmlDictCreate (void);
  31. XMLPUBFUN size_t XMLCALL
  32. xmlDictSetLimit (xmlDictPtr dict,
  33. size_t limit);
  34. XMLPUBFUN size_t XMLCALL
  35. xmlDictGetUsage (xmlDictPtr dict);
  36. XMLPUBFUN xmlDictPtr XMLCALL
  37. xmlDictCreateSub(xmlDictPtr sub);
  38. XMLPUBFUN int XMLCALL
  39. xmlDictReference(xmlDictPtr dict);
  40. XMLPUBFUN void XMLCALL
  41. xmlDictFree (xmlDictPtr dict);
  42. /*
  43. * Lookup of entry in the dictionary.
  44. */
  45. XMLPUBFUN const xmlChar * XMLCALL
  46. xmlDictLookup (xmlDictPtr dict,
  47. const xmlChar *name,
  48. int len);
  49. XMLPUBFUN const xmlChar * XMLCALL
  50. xmlDictExists (xmlDictPtr dict,
  51. const xmlChar *name,
  52. int len);
  53. XMLPUBFUN const xmlChar * XMLCALL
  54. xmlDictQLookup (xmlDictPtr dict,
  55. const xmlChar *prefix,
  56. const xmlChar *name);
  57. XMLPUBFUN int XMLCALL
  58. xmlDictOwns (xmlDictPtr dict,
  59. const xmlChar *str);
  60. XMLPUBFUN int XMLCALL
  61. xmlDictSize (xmlDictPtr dict);
  62. /*
  63. * Cleanup function
  64. */
  65. XMLPUBFUN void XMLCALL
  66. xmlDictCleanup (void);
  67. #ifdef __cplusplus
  68. }
  69. #endif
  70. #endif /* ! __XML_DICT_H__ */