- Main Page
- Namespaces
- Classes
- Files

- File List
- File Members

# GenericSimpleLoggable.h

Go to the documentation of this file.

    00001
    00015 #pragma once
    00016
    00017 #include "Loggable.h"
    00018
    00019 #include "TStd.h"
    00020
    00021 #include <boost/lexical_cast.hpp>
    00022
    00023 namespace Nvidia {
    00024 namespace Logging {
    00025
    00031 template <typename T>
    00032 class GenericSimpleLoggable : public SimpleLoggable
    00033 {
    00034 protected:
    00036     T Value;
    00037 public:
    00039     GenericSimpleLoggable(T value) : Value(value) {}
    00040
    00042     virtual std::tstring GetStringValue() const
    00043     {
    00044         return boost::lexical_cast<std::tstring>(Value);
    00045     }
    00046
    00048     virtual std::tstring GetTypeName() const
    00049     {
    00050         return boost::lexical_cast<std::tstring>(typeid(Value).name());
    00051     }
    00052 };
    00053
    00054 }
    00055 }