Advertisement
Guest User

Untitled

a guest
Mar 27th, 2017
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.79 KB | None | 0 0
  1. template<typename eT, typename wT, typename iT, typename tT>
  2. class Logger: public libs::task::Singleton<Logger<eT, wT, iT, tT> > {
  3. private: friend libs::task::Singleton<Logger<eT, wT, iT, tT> >;
  4. private: using libs::task::Singleton<Logger<eT, wT, iT, tT> >::Instance;
  5.  
  6. // =============================================================================
  7. // Section for Ctor / Dtor
  8. // =============================================================================
  9. private: Logger() {}
  10.  
  11. // =============================================================================
  12. // Section for Implement / Overridden
  13. // =============================================================================
  14.  
  15. // =============================================================================
  16. // Section for Other methods
  17. // =============================================================================
  18. public: template<typename logItemType> inline void error(logItemType item);
  19. public: template<typename logItemType> inline void warning(logItemType item);
  20. public: template<typename logItemType> inline void info(logItemType item);
  21. public: template<typename logItemType> inline void trace(logItemType item);
  22.  
  23. public: inline const eT& error() const;
  24. public: inline const wT& warning() const;
  25. public: inline const iT& info() const;
  26. public: inline const tT& trace() const;
  27.  
  28. // =============================================================================
  29. // Section for Member declaration
  30. // =============================================================================
  31. private: eT _error;
  32. private: wT _warning;
  33. private: iT _info;
  34. private: tT _trace;
  35. };
  36.  
  37. typedef Logger<MemoryContainer<2, const char*>,
  38.         MemoryContainer<4, const char*>,
  39.         MemoryContainer<10, const char*>,
  40.         MemoryContainer<10, const char*> >
  41. ConstStrLogger;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement