// Custom includes
#include <ext/functional>
+#include <limits>
#include <boost/intrusive_ptr.hpp>
#include <boost/iterator/transform_iterator.hpp>
#include <senf/Utils/TypeIdValue.hh>
virtual ~PacketRegistryImplBase();
static void dump(std::ostream & os);
+ static void clear();
protected:
typedef std::map<std::string, PacketRegistryImplBase*> RegistryMap;
static RegistryMap & registries();
private:
- virtual void v_dump(std::ostream & os) = 0;
+ virtual bool v_empty() const = 0;
+ virtual void v_dump(std::ostream & os) const = 0;
+ virtual void v_clear() = 0;
};
/** \brief Internal: Singleton class implementing the packet registry.
protected:
private:
- virtual void v_dump(std::ostream & os);
+ virtual bool v_empty() const;
+ virtual void v_dump(std::ostream & os) const;
+ virtual void v_clear();
PacketMap registry_;
ReversePacketMap reverseRegistry_;
};
+ template <class KeyType, bool is_integral=std::numeric_limits<KeyType>::is_integer>
+ struct DumpKey
+ {
+ static void dump(KeyType const & v, std::ostream & os);
+ };
+
+ template <class KeyType>
+ struct DumpKey<KeyType, true>
+ {
+ static void dump(KeyType const & v, std::ostream & os);
+ };
+
}}
///////////////////////////////ih.e////////////////////////////////////////