summaryrefslogtreecommitdiff
path: root/lib/element.cpp
diff options
context:
space:
mode:
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)