V-Gears 0
Free Final Fantasy VII engine.
Logger.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2022 The V-Gears Team
3 *
4 * This file is part of V-Gears
5 *
6 * V-Gears is free software: you can redistribute it and/or modify it under
7 * terms of the GNU General Public License as published by the Free Software
8 * Foundation, version 3.0 (GPLv3) of the License.
9 *
10 * V-Gears is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 */
15
16#pragma once
17
18#include <OgreString.h>
19#include <OgreUTFString.h>
20
29Ogre::String HexToString(int value, unsigned short width, char fill);
30
38Ogre::String BoolToString(bool value);
39
46Ogre::String IntToString(int value);
47
54Ogre::String FloatToString(float value);
55
59class Logger{
60
61 public:
62
68 explicit Logger(const Ogre::String& log_file_name);
69
73 virtual ~Logger();
74
80 void Log(const Ogre::String& text);
81
87 void LogW(const Ogre::UTFString& text);
88
94 void Log(std::vector<unsigned char>& text);
95
96 private:
97
102};
103
109extern Logger *LOGGER;
Application logger utility.
Definition: Logger.h:59
void LogW(const Ogre::UTFString &text)
Logs a message.
Definition: Logger.cpp:54
void Log(const Ogre::String &text)
Logs a message.
Definition: Logger.cpp:50
Ogre::String log_file_
PAth to the log file.
Definition: Logger.h:101
virtual ~Logger()
Destructor.
Definition: Logger.cpp:48
Logger(const Ogre::String &log_file_name)
Constructor.
Definition: Logger.cpp:43
Ogre::String FloatToString(float value)
Converts a real value to a string.
Definition: Logger.cpp:39
Ogre::String IntToString(int value)
Converts an integer value to a string.
Definition: Logger.cpp:35
Ogre::String BoolToString(bool value)
Converts a boolean value to a string.
Definition: Logger.cpp:31
Ogre::String HexToString(int value, unsigned short width, char fill)
Converts an hexadecimal value to a string.
Definition: Logger.cpp:22
Logger * LOGGER
Application logger.
Definition: Logger.cpp:20
Ogre::String String
Definition: TypeDefine.h:37