diff options
author | Max Horn | 2008-12-25 20:40:00 +0000 |
---|---|---|
committer | Max Horn | 2008-12-25 20:40:00 +0000 |
commit | df20d264fd300a26b15f46dfdfc2d9aa94810d5f (patch) | |
tree | d120a9d976d5863c60509f2119887238b431c0b5 /common/xmlparser.h | |
parent | f4fc0a9176d7f0ecfe68989d60a9d5ee0a29a120 (diff) | |
download | scummvm-rg350-df20d264fd300a26b15f46dfdfc2d9aa94810d5f.tar.gz scummvm-rg350-df20d264fd300a26b15f46dfdfc2d9aa94810d5f.tar.bz2 scummvm-rg350-df20d264fd300a26b15f46dfdfc2d9aa94810d5f.zip |
Pushing down some header deps (on common/system.h, mostly)
svn-id: r35542
Diffstat (limited to 'common/xmlparser.h')
-rw-r--r-- | common/xmlparser.h | 41 |
1 files changed, 7 insertions, 34 deletions
diff --git a/common/xmlparser.h b/common/xmlparser.h index 435e7c7e0c..08f4565b11 100644 --- a/common/xmlparser.h +++ b/common/xmlparser.h @@ -27,11 +27,7 @@ #define XML_PARSER_H #include "common/scummsys.h" -#include "common/archive.h" -#include "common/system.h" #include "common/stream.h" -#include "common/file.h" -#include "common/fs.h" #include "common/hashmap.h" #include "common/hash-str.h" @@ -40,6 +36,8 @@ namespace Common { +class FSNode; + /* XMLParser.cpp/h -- Generic XML Parser ===================================== @@ -184,23 +182,9 @@ public: * * @param filename Name of the file to load. */ - bool loadFile(const Common::String &filename) { - _stream = SearchMan.openFile(filename); - if (!_stream) - return false; - - _fileName = filename; - return true; - } + bool loadFile(const Common::String &filename); - bool loadFile(const FSNode &node) { - _stream = node.openForReading(); - if (!_stream) - return false; - - _fileName = node.getName(); - return true; - } + bool loadFile(const FSNode &node); /** * Loads a memory buffer into the parser. @@ -213,22 +197,11 @@ public: * i.e. if it can be freed safely after it's * no longer needed by the parser. */ - bool loadBuffer(const byte *buffer, uint32 size, bool disposable = false) { - _stream = new MemoryReadStream(buffer, size, disposable); - _fileName = "Memory Stream"; - return true; - } + bool loadBuffer(const byte *buffer, uint32 size, bool disposable = false); - bool loadStream(Common::SeekableReadStream *stream) { - _stream = stream; - _fileName = "File Stream"; - return true; - } + bool loadStream(Common::SeekableReadStream *stream); - void close() { - delete _stream; - _stream = 0; - } + void close(); /** * The actual parsing function. |