Fixed conversion from Values to other types: Values now report being of the contained type.

Added toImage function to ScriptValue.

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@1083 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
twanvl
2008-08-07 16:26:33 +00:00
parent 40719b7831
commit b5bdaedde2
8 changed files with 34 additions and 290 deletions
+3
View File
@@ -14,6 +14,7 @@
class Context;
class Dependency;
class ScriptClosure;
DECLARE_POINTER_TYPE(GeneratedImage);
// ----------------------------------------------------------------------------- : ScriptValue
@@ -74,6 +75,8 @@ class ScriptValue : public IntrusivePtrBaseWithDelete {
/** This is sometimes necessary, because wxString has an int constructor,
* which confuses gcc. */
inline String toString() const { return *this; }
/// Convert this value to an image
virtual GeneratedImageP toImage(const ScriptValueP& thisP) const;
/// Get a member variable from this value
virtual ScriptValueP getMember(const String& name) const;