mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-11 05:07:00 -04:00
Split script/functions.cpp into multiple files in new script/functions/ directory.
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@217 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
@@ -13,15 +13,15 @@
|
||||
|
||||
// ---------------------------------------------------------------------------- : GetDefaultMember
|
||||
|
||||
void GetDefaultMember::handle(const Char* v) { value = toScript(v); }
|
||||
template <> void GetDefaultMember::handle(const String& v) { value = toScript(v); }
|
||||
template <> void GetDefaultMember::handle(const FileName& v) { value = toScript(v); }
|
||||
template <> void GetDefaultMember::handle(const int& v) { value = toScript(v); }
|
||||
template <> void GetDefaultMember::handle(const unsigned int& v) { value = toScript((int)v); }
|
||||
template <> void GetDefaultMember::handle(const double& v) { value = toScript(v); }
|
||||
template <> void GetDefaultMember::handle(const bool& v) { value = toScript(v); }
|
||||
template <> void GetDefaultMember::handle(const Vector2D& v) { value = toScript(String::Format(_("(%.10lf,%.10lf)"), v.x, v.y)); }
|
||||
template <> void GetDefaultMember::handle(const Color& v) { value = toScript(v); }
|
||||
void GetDefaultMember::handle(const Char* v) { value = to_script(v); }
|
||||
template <> void GetDefaultMember::handle(const String& v) { value = to_script(v); }
|
||||
template <> void GetDefaultMember::handle(const FileName& v) { value = to_script(v); }
|
||||
template <> void GetDefaultMember::handle(const int& v) { value = to_script(v); }
|
||||
template <> void GetDefaultMember::handle(const unsigned int& v) { value = to_script((int)v); }
|
||||
template <> void GetDefaultMember::handle(const double& v) { value = to_script(v); }
|
||||
template <> void GetDefaultMember::handle(const bool& v) { value = to_script(v); }
|
||||
template <> void GetDefaultMember::handle(const Vector2D& v) { value = to_script(String::Format(_("(%.10lf,%.10lf)"), v.x, v.y)); }
|
||||
template <> void GetDefaultMember::handle(const Color& v) { value = to_script(v); }
|
||||
void GetDefaultMember::handle(const ScriptValueP& v) { value = v; }
|
||||
void GetDefaultMember::handle(const ScriptP& v) { value = v; }
|
||||
|
||||
|
||||
@@ -47,10 +47,10 @@ class GetDefaultMember {
|
||||
/// Handle a Defaultable: investigate children
|
||||
template <typename T> void handle(const Defaultable<T>&);
|
||||
template <typename T> void handle(const Scriptable<T>& );
|
||||
template <typename T> void handle(const vector<T>& c) { value = toScript(&c); }
|
||||
template <typename K, typename V> void handle(const map<K,V>& c) { value = toScript(&c); }
|
||||
template <typename K, typename V> void handle(const IndexMap<K,V>& c) { value = toScript(&c); }
|
||||
template <typename T> void handle(const shared_ptr<T>& p) { value = toScript(p); }
|
||||
template <typename T> void handle(const vector<T>& c) { value = to_script(&c); }
|
||||
template <typename K, typename V> void handle(const map<K,V>& c) { value = to_script(&c); }
|
||||
template <typename K, typename V> void handle(const IndexMap<K,V>& c) { value = to_script(&c); }
|
||||
template <typename T> void handle(const shared_ptr<T>& p) { value = to_script(p); }
|
||||
void handle(const ScriptValueP&);
|
||||
void handle(const ScriptP&);
|
||||
private:
|
||||
|
||||
Reference in New Issue
Block a user