- Added 'package list' field type

- Some refactoring of the other field types

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@790 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
twanvl
2007-12-26 23:37:45 +00:00
parent 7b340db04f
commit d493394519
32 changed files with 573 additions and 94 deletions
+2
View File
@@ -15,6 +15,7 @@
#include <data/field/symbol.hpp>
#include <data/field/color.hpp>
#include <data/field/information.hpp>
#include <data/field/package_choice.hpp>
#include <util/error.hpp>
DECLARE_TYPEOF_COLLECTION(StyleListener*);
@@ -80,6 +81,7 @@ intrusive_ptr<Field> read_new<Field>(Reader& reader) {
else if (type == _("symbol")) return new_intrusive<SymbolField>();
else if (type == _("color")) return new_intrusive<ColorField>();
else if (type == _("info")) return new_intrusive<InfoField>();
else if (type == _("package choice")) return new_intrusive<PackageChoiceField>();
else if (type.empty()) {
reader.warning(_ERROR_1_("expected key", _("type")));
throw ParseError(_ERROR_("aborting parsing"));