summaryrefslogtreecommitdiff
path: root/project2/ut/testScriptNode.h
diff options
context:
space:
mode:
Diffstat (limited to 'project2/ut/testScriptNode.h')
-rw-r--r--project2/ut/testScriptNode.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/project2/ut/testScriptNode.h b/project2/ut/testScriptNode.h
new file mode 100644
index 0000000..d85f6db
--- /dev/null
+++ b/project2/ut/testScriptNode.h
@@ -0,0 +1,28 @@
+#ifndef TESTSCRIPTNODE_H
+#define TESTSCRIPTNODE_H
+
+#include <scripts.h>
+
+class TestScriptNode : public ScriptNode {
+ public:
+ typedef std::map<std::string, VariableType> Vars;
+
+ TestScriptNode(const Vars &);
+
+ bool componentNamespace() const;
+ std::string get_name() const;
+ ScriptNodePtr child(const Glib::ustring & name, bool required = true) const;
+ ScriptNodes children() const;
+ ScriptNodes childrenIn(const Glib::ustring & sub) const;
+ bool valueExists(const Glib::ustring & name) const;
+ bool applyValue(const Glib::ustring & name, VariableType & target, ExecContext *) const;
+ VariableImpl * variable(const boost::optional<Glib::ustring> & defaultSource = boost::optional<Glib::ustring>()) const;
+ VariableImpl * variable(const Glib::ustring & name) const;
+ void composeWithCallbacks(const LiteralCallback &, const NodeCallback &) const;
+
+ private:
+ Vars vars;
+};
+
+#endif
+