Ion
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
tracinghelper.h
Go to the documentation of this file.
1 
18 #ifndef ION_GFX_TRACINGHELPER_H_
19 #define ION_GFX_TRACINGHELPER_H_
20 
21 #include <string>
22 #include <unordered_map>
23 
24 namespace ion {
25 namespace gfx {
26 
29 class ION_API TracingHelper {
30  public:
33  TracingHelper();
34 
39  template <typename T> const std::string ToString(const char* arg_type, T arg);
40 
41  private:
43  std::unordered_map<int, std::string> constants_;
44 };
45 
46 #if !ION_PRODUCTION
47 template <> ION_API const std::string TracingHelper::ToString(
49  const char* arg_type, char* arg);
50 template <> ION_API const std::string TracingHelper::ToString(
51  const char* arg_type, char** arg);
52 template <> ION_API const std::string TracingHelper::ToString(
53  const char* arg_type, const char* arg);
54 template <> ION_API const std::string TracingHelper::ToString(
55  const char* arg_type, const char** arg);
56 template <> ION_API const std::string TracingHelper::ToString(
57  const char* arg_type, unsigned char arg);
58 template <> ION_API const std::string TracingHelper::ToString(
59  const char* arg_type, unsigned int arg);
60 #endif
61 
62 } // namespace gfx
63 } // namespace ion
64 
65 #endif // ION_GFX_TRACINGHELPER_H_
const std::string ToString(const char *arg_type, T arg)
This templated function is used to print each OpenGL function argument in a more readable way...
This internal class is used by the GraphicsManager to print argument values when tracing OpenGL calls...
Definition: tracinghelper.h:29