diff options
Diffstat (limited to 'lib/element.cpp')
-rw-r--r-- | lib/element.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/element.cpp b/lib/element.cpp index 04a638b..c06d96d 100644 --- a/lib/element.cpp +++ b/lib/element.cpp @@ -33,7 +33,7 @@ Element::Element(const std::string &name) catch(const std::invalid_argument &ex) { extra = str(boost::format("%04x") % short(h++)); - uid = name+"#"+extra; + uid = name+" "+extra; } } if (not extra.empty()) (*this)->repr = name; @@ -74,6 +74,11 @@ bool Element::equals(const Element &rhs) return this->get() == rhs.get(); } +std::string Element::to_string(void) const +{ + return (*this)->repr; +} + void Element::adopt_element(const std::string &name, const Element &child) { if (child->parent) throw std::invalid_argument(str(boost::format( |