summaryrefslogtreecommitdiff
path: root/lib/element.cpp
diff options
context:
space:
mode:
authorJosh Blum2013-02-24 14:29:16 -0800
committerJosh Blum2013-02-24 14:29:16 -0800
commit883743bd59f40f9ce1e30bd196de78c2e7646294 (patch)
treef9b0cf4f0a1d3894643a681a54aa21fe55398243 /lib/element.cpp
parent6841702911d07a2bad86ecd3bfc243b6a688ad2a (diff)
parentdecd0f40714a71c6fb5c4f100e8f51c6ef238b26 (diff)
downloadsandhi-883743bd59f40f9ce1e30bd196de78c2e7646294.tar.gz
sandhi-883743bd59f40f9ce1e30bd196de78c2e7646294.tar.bz2
sandhi-883743bd59f40f9ce1e30bd196de78c2e7646294.zip
Merge branch 'stats'
Conflicts: grextras include/gras/top_block.hpp lib/block_handlers.cpp lib/block_task.cpp lib/element_impl.hpp tests/CMakeLists.txt
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 71e4e69..368dbea 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;
}
@@ -42,5 +43,5 @@ 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;
}