diff options
author | Josh Blum | 2013-06-01 23:12:21 -0700 |
---|---|---|
committer | Josh Blum | 2013-06-01 23:12:21 -0700 |
commit | ab1f7e5871d9323242e9b3d21e2f7811f1567c43 (patch) | |
tree | 3046176a463a3938a86563bdbf274467ff30974e /lib/element.cpp | |
parent | d15ca88acfbd71c5d4f8ab3dabe0f4fbde205985 (diff) | |
download | sandhi-ab1f7e5871d9323242e9b3d21e2f7811f1567c43.tar.gz sandhi-ab1f7e5871d9323242e9b3d21e2f7811f1567c43.tar.bz2 sandhi-ab1f7e5871d9323242e9b3d21e2f7811f1567c43.zip |
gras: mutex fixes for uid API calls
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( |