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
+5 -7
View File
@@ -28,9 +28,7 @@ class Dependency;
// ----------------------------------------------------------------------------- : ScriptValue
//DECLARE_POINTER_TYPE(ScriptValue);
class ScriptValue;
typedef boost::intrusive_ptr<ScriptValue> ScriptValueP;
DECLARE_INTRUSIVE_POINTER_TYPE(ScriptValue);
enum ScriptType
{ SCRIPT_NIL
@@ -104,9 +102,9 @@ inline void intrusive_ptr_release(ScriptValue* p) {
}
}
extern ScriptValueP scriptNil; ///< The preallocated nil value
extern ScriptValueP scriptTrue; ///< The preallocated true value
extern ScriptValueP scriptFalse; ///< The preallocated false value
extern ScriptValueP script_nil; ///< The preallocated nil value
extern ScriptValueP script_true; ///< The preallocated true value
extern ScriptValueP script_false; ///< The preallocated false value
// ----------------------------------------------------------------------------- : Iterators
@@ -191,7 +189,7 @@ ScriptValueP toScript(int v);
ScriptValueP toScript(double v);
ScriptValueP toScript(const String& v);
ScriptValueP toScript(const Color& v);
inline ScriptValueP toScript(bool v) { return v ? scriptTrue : scriptFalse; }
inline ScriptValueP toScript(bool v) { return v ? script_true : script_false; }
template <typename T>
inline ScriptValueP toScript(const vector<T>* v) { return new_intrusive1<ScriptCollection<vector<T> > >(v); }
template <typename T>