2 Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
6 * @file AthenaKernel/ClassName.icc
9 * @brief An interface for getting the name of a class as a string.
10 * Implementation file.
15 * @brief Return the name of class @c T as a string.
18std::string ClassName<T>::name()
20 return Athena::typeinfoName (typeid (T));
24// * @brief Specialization of @c ClassName for @c std::vector.
26// * This overrides the default implementation of @c ClassName
27// * to hide @c std::vector's second template parameter.
31// std::string ClassName<std::vector<T> >::name()
33// std::string out = "std::vector<";
34// out += ClassName<T>::name();
35// if (out[out.size()-1] == '>')
42// * @brief Specialization of @c ClassName for @c std::list.
44// * This overrides the default implementation of @c ClassName
45// * to hide @c std::list's second template parameter.
49// std::string ClassName<std::list<T> >::name()
51// std::string out = "std::list<";
52// out += ClassName<T>::name();
53// if (out[out.size()-1] == '>')
60// * @brief Specialization of @c ClassName for @c std::map.
62// * This overrides the default implementation of @c ClassName
63// * to hide @c std::map's 4th template parameter (and optionally the 3rd too)
66// template <class K, class V, class C>
67// std::string ClassName<std::map<K, V, C> >::name()
69// std::string out = "std::map<";
70// out += ClassName<K>::name()+ "," + ClassName<V>::name();
71// std::string comp = ClassName<C>::name();
72// if (comp.size() > 10 && comp.substr(0, 10) != "std::less<") {
73// out += ","+ClassName<C>::name();
75// if (out[out.size()-1] == '>')