fixed: version number propagates to included files

magic pack template now uses 'pack type' instead of 'pack item'

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@1331 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
twanvl
2009-01-10 02:43:15 +00:00
parent 30d3343a2c
commit c7c028b026
3 changed files with 32 additions and 28 deletions
+7 -7
View File
@@ -32,18 +32,18 @@ typedef shared_ptr<wxInputStream> InputStreamP;
* object that was just read.
*/
class Reader {
private:
/// Construct a reader that reads a file in a package
/** Used for "include file" keys.
* package can be nullptr
*/
Reader(Reader* parent, Packaged* package, const String& filename, bool ignore_invalid = false);
public:
/// Construct a reader that reads from the given input stream
/** filename is used only for error messages
*/
Reader(const InputStreamP& input, Packaged* package = nullptr, const String& filename = wxEmptyString, bool ignore_invalid = false);
/// Construct a reader that reads a file in a package
/** Used for "include file" keys.
* package can be nullptr
*/
Reader(Packaged* package, const String& filename, bool ignore_invalid = false);
~Reader() { showWarnings(); }
/// Tell the reflection code we are reading
@@ -182,7 +182,7 @@ class Reader {
template <typename T>
void unknownKey(T& v) {
if (key == _("include file")) {
Reader reader(package, value, ignore_invalid);
Reader reader(this, package, value, ignore_invalid);
reader.handle_greedy(v);
moveNext();
} else {