mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-11 05:07:00 -04:00
Dependencies on stylesheet are marked, and updated when the stylesheet changes
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@1087 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
@@ -33,6 +33,10 @@ ScriptValueP make_iterator(const T& v) {
|
||||
template <typename T>
|
||||
void mark_dependency_member(const T& value, const String& name, const Dependency& dep) {}
|
||||
|
||||
/// Mark a dependency on an object, can be overloaded
|
||||
template <typename T>
|
||||
void mark_dependency_value(const T& value, const Dependency& dep) {}
|
||||
|
||||
/// Type name of an object, for error messages
|
||||
template <typename T> inline String type_name(const T&) {
|
||||
return _TYPE_("object");
|
||||
@@ -276,6 +280,9 @@ class ScriptObject : public ScriptValue {
|
||||
mark_dependency_member(*value, name, dep);
|
||||
return getMember(name);
|
||||
}
|
||||
virtual void dependencyThis(const Dependency& dep) {
|
||||
mark_dependency_value(*value, dep);
|
||||
}
|
||||
virtual ScriptValueP makeIterator(const ScriptValueP& thisP) const {
|
||||
ScriptValueP it = make_iterator(*value);
|
||||
if (it) return it;
|
||||
|
||||
Reference in New Issue
Block a user