00001 00015 #pragma once 00016 00017 #include "TStd.h" 00018 #include "Utils.h" 00019 00020 #include <boost/lexical_cast.hpp> 00021 00022 namespace Nvidia { 00023 namespace Logging { 00024 00030 class Loggable 00031 { 00032 public: 00034 virtual std::tstring GetTypeName() const; 00035 00036 virtual std::tstring GetHumanReadableTypeName() const; 00037 00044 virtual std::tstring GetStringValue() const = 0; 00045 }; 00046 00047 inline std::tstring Loggable::GetTypeName() const 00048 { 00049 return boost::lexical_cast<std::tstring>(typeid(*this).name()); 00050 } 00051 00052 inline std::tstring Loggable::GetHumanReadableTypeName() const 00053 { 00054 return Utils::GenerateHumanReadableTypeName(GetTypeName()); 00055 00056 } 00057 00061 class SimpleLoggable : public Loggable 00062 { 00063 }; 00064 00065 } 00066 }