summaryrefslogtreecommitdiff
path: root/lib/element.cpp
diff options
context:
space:
mode:
authorJosh Blum2013-02-18 21:17:01 -0600
committerJosh Blum2013-02-18 21:17:01 -0600
commit601f44ebd02635db22d750621b0615dc5b9233b8 (patch)
treed9c7da2c838c52a2cea57ef276ed36828d504dc4 /lib/element.cpp
parentf8cca035aacf1578b99f6ffa1bb99ffb052ac27c (diff)
downloadsandhi-601f44ebd02635db22d750621b0615dc5b9233b8.tar.gz
sandhi-601f44ebd02635db22d750621b0615dc5b9233b8.tar.bz2
sandhi-601f44ebd02635db22d750621b0615dc5b9233b8.zip
gras: another var for id string - ez to change later
Diffstat (limited to 'lib/element.cpp')
-rw-r--r--lib/element.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/element.cpp b/lib/element.cpp
index 27a5db0..faefee9 100644
--- a/lib/element.cpp
+++ b/lib/element.cpp
@@ -19,6 +19,7 @@ Element::Element(const std::string &name)
this->reset(new ElementImpl());
(*this)->name = name;
(*this)->unique_id = ++unique_id_pool;
+ (*this)->id = str(boost::format("%s(%d)") % this->name() % this->unique_id());
if (GENESIS) std::cerr << "New element: " << to_string() << std::endl;
@@ -57,7 +58,7 @@ std::string Element::name(void) const
std::string Element::to_string(void) const
{
- return str(boost::format("%s(%d)") % this->name() % this->unique_id());
+ return (*this)->id;
}
void Element::set_output_signature(const IOSignature &sig)