X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=senf%2FUtils%2FTypeIdValue.hh;h=c473565e6941864d3ac2477ea2294caa5acc24dc;hb=9bc655e14d2d8c204ed835896cb51e42d49bd68f;hp=85eebf03df0ae7184dcc3b56282023d08cb6c242;hpb=601d1f509f5bb24df167a4dd5a20da67a0af9af8;p=senf.git diff --git a/senf/Utils/TypeIdValue.hh b/senf/Utils/TypeIdValue.hh index 85eebf0..c473565 100644 --- a/senf/Utils/TypeIdValue.hh +++ b/senf/Utils/TypeIdValue.hh @@ -54,8 +54,7 @@ namespace senf { // no conversion constructors TypeIdValue(); - TypeIdValue(TypeIdValue const & other); - TypeIdValue const & operator=(TypeIdValue const & other); + TypeIdValue(std::type_info const & v); ///@} /////////////////////////////////////////////////////////////////////////// @@ -64,35 +63,36 @@ namespace senf { bool operator<(TypeIdValue const & other) const; std::string name() const; + std::string prettyName() const; + std::type_info const & id() const; protected: private: - template TypeIdValue(Type *); - - struct Value { - virtual ~Value(); - virtual std::type_info const & id() = 0; - virtual Value * clone() = 0; - }; - - template - struct ValueImpl : public Value { - virtual std::type_info const & id(); - virtual Value * clone(); - }; - - boost::scoped_ptr value_; - - template friend TypeIdValue const typeIdValue(); + std::type_info const * p_; }; + /** + \related TypeIdValue + */ TypeIdValue const typeIdValue(); + /** + \related TypeIdValue + */ template TypeIdValue const typeIdValue(); + /** + \related TypeIdValue + */ + template + TypeIdValue const typeIdValue(Type const & ob); + + /** + \related TypeIdValue + */ std::ostream & operator<<(std::ostream & os, TypeIdValue const & v); }