Added Alignment, Defaultable and Scriptable types, needed some reflection tweaks for the last two.

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@17 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
twanvl
2006-10-12 14:07:34 +00:00
parent 156d1f6632
commit b389685fc8
23 changed files with 311 additions and 90 deletions
+11 -6
View File
@@ -9,6 +9,7 @@
#include <util/io/get_member.hpp>
#include <util/vector2d.hpp>
#include <script/value.hpp>
#include <script/script.hpp>
// ----------------------------------------------------------------------------- : GetMember
@@ -16,12 +17,16 @@ GetMember::GetMember(const String& name)
: targetName(name)
{}
void GetMember::store(const String& v) { value = toScript(v); }
void GetMember::store(const int v) { value = toScript(v); }
void GetMember::store(const unsigned int v) { value = toScript((int)v); }
void GetMember::store(const double v) { value = toScript(v); }
void GetMember::store(const bool v) { value = toScript(v); }
template <> void GetMember::store(const String& v) { value = toScript(v); }
//template <> void GetMember::store(const Char* const& v) { value = toScript(v); }
template <> void GetMember::store(const int& v) { value = toScript(v); }
template <> void GetMember::store(const unsigned int& v) { value = toScript((int)v); }
template <> void GetMember::store(const double& v) { value = toScript(v); }
template <> void GetMember::store(const bool& v) { value = toScript(v); }
void GetMember::store(const Vector2D& v) {
template <> void GetMember::store(const ScriptValueP& v) { value = v; }
template <> void GetMember::store(const ScriptP& v) { value = v; }
template <> void GetMember::store(const Vector2D& v) {
value = toScript(String::Format(_("(%.10lf,%.10lf)"), v.x, v.y));
}