Switch from Nz prefix to namespace Nz

What a huge commit


Former-commit-id: 38ac5eebf70adc1180f571f6006192d28fb99897
This commit is contained in:
Lynix
2015-09-25 19:20:05 +02:00
parent c214251ecf
commit df8da275c4
609 changed files with 68265 additions and 66534 deletions

View File

@@ -23,46 +23,49 @@
#define NazaraDebug(txt)
#endif
#define NazaraLog NzLog::Instance()
#define NazaraLog Nz::Log::Instance()
#define NazaraNotice(txt) NazaraLog->Write(txt)
class NzFile;
class NAZARA_CORE_API NzLog
namespace Nz
{
public:
void Enable(bool enable);
void EnableAppend(bool enable);
void EnableDateTime(bool enable);
class File;
NzString GetFile() const;
class NAZARA_CORE_API Log
{
public:
void Enable(bool enable);
void EnableAppend(bool enable);
void EnableDateTime(bool enable);
bool IsEnabled() const;
String GetFile() const;
void SetFile(const NzString& filePath);
bool IsEnabled() const;
void Write(const NzString& string);
void WriteError(nzErrorType type, const NzString& error);
void WriteError(nzErrorType type, const NzString& error, unsigned int line, const NzString& file, const NzString& func);
void SetFile(const String& filePath);
static NzLog* Instance();
void Write(const String& string);
void WriteError(ErrorType type, const String& error);
void WriteError(ErrorType type, const String& error, unsigned int line, const String& file, const String& func);
private:
NzLog();
NzLog(const NzLog&) = delete;
NzLog(NzLog&&) = delete;
~NzLog();
static Log* Instance();
NzLog& operator=(const NzLog&) = delete;
NzLog& operator=(NzLog&&) = delete;
private:
Log();
Log(const Log&) = delete;
Log(Log&&) = delete;
~Log();
NazaraMutexAttrib(m_mutex, mutable)
Log& operator=(const Log&) = delete;
Log& operator=(Log&&) = delete;
NzString m_filePath;
NzFile* m_file;
bool m_append;
bool m_enabled;
bool m_writeTime;
};
NazaraMutexAttrib(m_mutex, mutable)
String m_filePath;
File* m_file;
bool m_append;
bool m_enabled;
bool m_writeTime;
};
}
#endif // NAZARA_LOGGER_HPP