From 9eb66d70fb05825bd240615bdb10aabaeacab20a Mon Sep 17 00:00:00 2001 From: ilor <kailoran@gmail.com> Date: Wed, 20 Oct 2010 13:14:03 +0200 Subject: [PATCH] binary tag dumps --- libcorpus2/tag.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/libcorpus2/tag.cpp b/libcorpus2/tag.cpp index 7bc7d9b..c387505 100644 --- a/libcorpus2/tag.cpp +++ b/libcorpus2/tag.cpp @@ -8,6 +8,7 @@ #include <boost/functional/hash.hpp> #include <boost/pending/lowest_bit.hpp> +#include <bitset> namespace Corpus2 { @@ -37,9 +38,11 @@ std::string Tag::raw_dump() const { std::ostringstream ss; ss << "["; + std::bitset<sizeof(mask_t) * CHAR_BIT> binaryp(pos_); + std::bitset<sizeof(mask_t) * CHAR_BIT> binaryv(values_); //ss << static_cast<int>(tagset_id_); - ss << "#" << (void*)(pos_); - ss << ":" << (void*)(values_) ; + ss << "#" << binaryp; + ss << ":" << binaryv; ss << "]"; return ss.str(); } -- GitLab