diff options
author | Marius Kintel <marius@kintel.net> | 2013-04-27 04:55:15 (GMT) |
---|---|---|
committer | Marius Kintel <marius@kintel.net> | 2013-04-27 04:55:15 (GMT) |
commit | 6b3daa748543f13cc7cf8eff1c9efeebd6dc3a14 (patch) | |
tree | 8869b03872b42ce1ffb1755958d05925f9f0bcb4 /src/module.h | |
parent | f0ee85e17d474ab9119f82ee6f802d4634743b12 (diff) | |
parent | 5f10c9f9c0a9805567ea8f9b560c6e0b50126119 (diff) |
Merge pull request #326 from openscad/issue217
Issue217
Diffstat (limited to 'src/module.h')
-rw-r--r-- | src/module.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/module.h b/src/module.h index cc82f81..1f9e303 100644 --- a/src/module.h +++ b/src/module.h @@ -10,7 +10,7 @@ class ModuleInstantiation { public: - ModuleInstantiation(const std::string &name = "") + ModuleInstantiation(const std::string &name = "") : ctx(NULL), tag_root(false), tag_highlight(false), tag_background(false), modname(name) { } virtual ~ModuleInstantiation(); @@ -19,6 +19,10 @@ public: class AbstractNode *evaluate(const class Context *ctx) const; std::vector<AbstractNode*> evaluateChildren(const Context *ctx = NULL) const; + void setPath(const std::string &path) { this->modpath = path; } + const std::string &path() const { return this->modpath; } + std::string getAbsolutePath(const std::string &filename) const; + const std::string &name() const { return this->modname; } bool isBackground() const { return this->tag_background; } bool isHighlight() const { return this->tag_highlight; } @@ -35,6 +39,7 @@ public: bool tag_background; protected: std::string modname; + std::string modpath; friend class Module; }; @@ -61,6 +66,7 @@ class Module : public AbstractModule public: Module() : is_handling_dependencies(false) { } virtual ~Module(); + virtual AbstractNode *evaluate(const Context *ctx, const ModuleInstantiation *inst) const; virtual std::string dump(const std::string &indent, const std::string &name) const; |