OpenPolygon  1.0.0
OpenPolygon is a Rendering Engine
logmanager.h
1 /*
2  Copyright (C) 2014 - 2016 Mutzii
3 
4  This program is free software: you can redistribute it and/or modify
5  it under the terms of the GNU General Public License as published by
6  the Free Software Foundation, either version 3 of the License, or
7  (at your option) any later version.
8 
9  This program is distributed in the hope that it will be useful,
10  but WITHOUT ANY WARRANTY; without even the implied warranty of
11  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  GNU General Public License for more details.
13 
14  You should have received a copy of the GNU General Public License
15  along with this program. If not, see <http://www.gnu.org/licenses/>.
16 
17 */
18 #ifndef LOGMANAGER_H
19 #define LOGMANAGER_H
20 
21 #include "index.h"
22 
23 namespace Engine
24 {
29  class LogManager
30  {
31  public:
32 
33  //Log Level
34  enum Level
35  {
36  LOG_INFO ,
37  LOG_WARNING ,
38  LOG_ERROR ,
39  LOG_DEBUG ,
40  LOG_EXCEPTION
41  };
42 
43  private:
44 
45  static LogManager * ptrInstance;
46  LogManager( void );
47  LogManager( const LogManager& ) { }
48  LogManager & operator = ( const LogManager& );
49 
56  static void _level( stringstream &info , Level level );
57 
58  public:
59 
65  static LogManager * getSingletonPtr(void);
66 
73  static void log( Level level , stringstream & message ) throw( std::runtime_error );
74  static void log( Level level , const std::string & message ) throw( std::runtime_error );
75 
76  static void FrameBufferCheckStatus( const std::string & information );
77  static void getError( const std::string & information );
78  static void printArray( float * pointer , int size );
79  static void printPointer( void * pointer );
80  static void printToFile( const std::string & file_name , const std::string & message );
81 
82  };
83 
84 }
85 
86 #endif // LOGMANAGER_H
Definition: element.h:23
static void log(Level level, stringstream &message)
log
Definition: LogManager.cpp:167
static void getError(const std::string &information)
LogManager::getError.
Definition: LogManager.cpp:60
static LogManager * getSingletonPtr(void)
getSingletonPtr
Definition: LogManager.cpp:26
The LogManager class.
Definition: logmanager.h:29