1
0

loader.h 1.2 KB

123456789101112131415161718192021222324252627282930313233343536
  1. //------------------------------------------------------------------------
  2. //
  3. // iTunes XML Library Reader
  4. // Copyright (C) 2003-2012 Nullsoft, Inc.
  5. //
  6. //------------------------------------------------------------------------
  7. #ifndef NULLSOFT_PLIST_LOADER_H
  8. #define NULLSOFT_PLIST_LOADER_H
  9. #include "types.h"
  10. #include "../xml/ifc_xmlreadercallback.h"
  11. #include <bfc/string/stringw.h>
  12. #include <bfc/stack.h>
  13. //------------------------------------------------------------------------
  14. class plistLoader : public ifc_xmlreadercallback, public plistKey {
  15. public:
  16. plistLoader();
  17. virtual ~plistLoader();
  18. virtual void xmlReaderOnStartElementCallback(const wchar_t *xmlpath, const wchar_t *xmltag, ifc_xmlreaderparams *params);
  19. virtual void xmlReaderOnEndElementCallback(const wchar_t *xmlpath, const wchar_t *xmltag);
  20. virtual void xmlReaderOnCharacterDataCallback(const wchar_t *xmlpath, const wchar_t *xmltag, const wchar_t *str);
  21. private:
  22. Stack<plistData *> m_context; // either a key or an array, this is where data gets inserted next
  23. Stack<plistKeyholder *> m_dict;
  24. StringW m_cdata;
  25. protected:
  26. RECVS_DISPATCH;
  27. };
  28. #endif
  29. //------------------------------------------------------------------------