aboutsummaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorMax Horn2008-12-25 20:40:00 +0000
committerMax Horn2008-12-25 20:40:00 +0000
commitdf20d264fd300a26b15f46dfdfc2d9aa94810d5f (patch)
treed120a9d976d5863c60509f2119887238b431c0b5 /common
parentf4fc0a9176d7f0ecfe68989d60a9d5ee0a29a120 (diff)
downloadscummvm-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')
-rw-r--r--common/events.h1
-rw-r--r--common/xmlparser.cpp42
-rw-r--r--common/xmlparser.h41
3 files changed, 43 insertions, 41 deletions
diff --git a/common/events.h b/common/events.h
index c1655a17f3..0f0b0cf783 100644
--- a/common/events.h
+++ b/common/events.h
@@ -29,7 +29,6 @@
#include "common/keyboard.h"
#include "common/queue.h"
#include "common/rect.h"
-#include "common/system.h"
#include "common/noncopyable.h"
namespace Common {
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;
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.