X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=senf%2FPackets%2FPacketImpl.cci;fp=senf%2FPackets%2FPacketImpl.cci;h=63c330c0a977d72248395f5f3f2c58be278c2891;hb=20c3dbf64b3beed10655dceaee5791680fb25383;hp=8c863d1e1972645003375e5e34c809b6f86df11c;hpb=5c330db423b5bbfa1b376d55a83e44bbc299bdd8;p=senf.git diff --git a/senf/Packets/PacketImpl.cci b/senf/Packets/PacketImpl.cci index 8c863d1..63c330c 100644 --- a/senf/Packets/PacketImpl.cci +++ b/senf/Packets/PacketImpl.cci @@ -33,7 +33,7 @@ /////////////////////////////////////////////////////////////////////////// // senf::detail::AnnotationRegistry -prefix_ void senf::detail::AnnotationRegistry::dump(key_t key, std::ostream & os, +prefix_ void senf::detail::AnnotationRegistry::dump(key_type key, std::ostream & os, void * annotation) const { @@ -45,27 +45,41 @@ prefix_ void senf::detail::AnnotationRegistry::dump(key_t key, std::ostream & os } } -prefix_ std::string senf::detail::AnnotationRegistry::name(key_t key) +prefix_ std::string senf::detail::AnnotationRegistry::name(key_type key) const { Registry::const_iterator i (registry_.find(key)); return i == registry_.end() ? "" : i->second->v_name(); } -prefix_ bool senf::detail::AnnotationRegistry::isComplex(key_t key) +prefix_ bool senf::detail::AnnotationRegistry::isComplex(key_type key) const { Registry::const_iterator i (registry_.find(key)); return i != registry_.end() && i->second->v_isComplex(); } -prefix_ unsigned senf::detail::AnnotationRegistry::size(key_t key) +prefix_ unsigned senf::detail::AnnotationRegistry::size(key_type key) const { Registry::const_iterator i (registry_.find(key)); return i == registry_.end() ? 0 : i->second->v_size(); } +prefix_ senf::detail::AnnotationRegistry::iterator senf::detail::AnnotationRegistry::begin() + const +{ + return boost::make_transform_iterator(index_.begin(), + __gnu_cxx::select2nd()); +} + +prefix_ senf::detail::AnnotationRegistry::iterator senf::detail::AnnotationRegistry::end() + const +{ + return boost::make_transform_iterator(index_.end(), + __gnu_cxx::select2nd()); +} + prefix_ senf::detail::AnnotationRegistry::AnnotationRegistry() : simpleAnnotationCount_ (0), complexAnnotationCount_ (0) {} @@ -234,7 +248,7 @@ prefix_ void senf::detail::PacketImpl::release(refcount_t n) // Annotations -prefix_ void * senf::detail::PacketImpl::annotation(AnnotationRegistry::key_t key) +prefix_ void * senf::detail::PacketImpl::annotation(AnnotationRegistry::key_type key) { return key >= 0 ? & simpleAnnotations_[key] : complexAnnotation(key); }