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.cpp | |
| 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.cpp')
| -rw-r--r-- | common/xmlparser.cpp | 42 | 
1 files changed, 36 insertions, 6 deletions
diff --git a/common/xmlparser.cpp b/common/xmlparser.cpp index 516f4bfcdf..3e1a7dd451 100644 --- a/common/xmlparser.cpp +++ b/common/xmlparser.cpp @@ -23,16 +23,46 @@   *   */ -#include "common/util.h" -#include "common/system.h" -#include "common/events.h" -#include "common/hashmap.h" -#include "common/hash-str.h"  #include "common/xmlparser.h" +#include "common/util.h" +#include "common/archive.h"  namespace Common { -using namespace Graphics; +bool XMLParser::loadFile(const Common::String &filename) { +	_stream = SearchMan.openFile(filename); +	if (!_stream) +		return false; + +	_fileName = filename; +	return true; +} + +bool XMLParser::loadFile(const FSNode &node) { +	_stream = node.openForReading(); +	if (!_stream) +		return false; + +	_fileName = node.getName(); +	return true; +} + +bool XMLParser::loadBuffer(const byte *buffer, uint32 size, bool disposable) { +	_stream = new MemoryReadStream(buffer, size, disposable); +	_fileName = "Memory Stream"; +	return true; +} + +bool XMLParser::loadStream(Common::SeekableReadStream *stream) { +	_stream = stream; +	_fileName = "File Stream"; +	return true; +} + +void XMLParser::close() { +	delete _stream; +	_stream = 0; +}  bool XMLParser::parserError(const char *errorString, ...) {  	_state = kParserError;  | 
