Switch from Nz prefix to namespace Nz
What a huge commit Former-commit-id: 38ac5eebf70adc1180f571f6006192d28fb99897
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user