89 static void MemSet(
void* ptr,
TINT value,
TSIZE size ) { std::memset( ptr, value, size ); }
90 static void*
MemCopy(
void* dst,
const void* src,
TSIZE size ) {
return std::memcpy( dst, src, size ); }
91 static void MemClear(
void* ptr,
TSIZE size ) { std::memset( ptr, 0, size ); }
92 static TINT MemCompare(
const void* ptr1,
const void* ptr2,
TSIZE size ) {
return std::memcmp( ptr1, ptr2, size ); }
93 static void*
MemMove(
void* dst,
const void* src,
TSIZE size ) {
return std::memmove( dst, src, size ); }
96 static void Fill( T* a_pStart, T* a_pEnd,
const T& a_rcValue = T() )
98 for ( ; a_pStart != a_pEnd; a_pStart++ )
99 *a_pStart = a_rcValue;
106 static void Log(
const TCHAR* a_szFormat, ... );
126 return *ms_poStringPool;
131 return ms_oToshiParams;
135 static void Create();
136 static void CreateKernelInterface();
138 static void LogInitialise();
139 static void CreateTPStringPool();
140 static void DestroyTPStringPool();
144 inline static TMutex ms_oGlobalMutex;
145 inline static TOSHIParams ms_oToshiParams;
173#define CRC32POLY ( 0xEDB88320L )
174#define CRC32POST( crc ) ( ~( crc ) )
176#define crc32upd( crctab, crc, c ) \
177 ( ( crctab )[ ( (TINT)( crc ) ^ ( c ) ) & 0xff ] ^ ( ( crc ) >> 8 ) )
179#define CRC_TABSIZE ( 256 )
#define TOSHI_NAMESPACE_START
#define TARRAYSIZE(ARRAY)
#define TSTATICASSERT(...)
#define TOSHI_NAMESPACE_END
TSingleton(const TSingleton &)=delete
static TUtil * ms_pSingleton
static constexpr const TCHAR * LogTypeToString(LogType a_eType)
static void MemClear(void *ptr, TSIZE size)
static void TrimLog(const TCHAR *fileExtension, TSIZE trimTo)
static void * MemMove(void *dst, const void *src, TSIZE size)
static void * MemCopy(void *dst, const void *src, TSIZE size)
static void Log(const TCHAR *a_szFormat,...)
static const TOSHIParams & GetToshiParameters()
static void MemSet(void *ptr, TINT value, TSIZE size)
static const TCHAR * GetTime()
static TEmitter< TUtil, TUtil::LogEvent > & GetLogEmitter()
static TINT MemCompare(const void *ptr1, const void *ptr2, TSIZE size)
static void Fill(T *a_pStart, T *a_pEnd, const T &a_rcValue=T())
static TBOOL ToshiCreate(const TOSHIParams &a_rToshiParams)
static TPString8Pool * GetTPStringPool()
static void CRCInitialise()
static TLogFile * GetCurrentLogFile()
static TPString8Pool * SetTPStringPool(TPString8Pool *a_pStringPool)
static TMutex & GetGlobalMutex()
static TUINT32 CRC32(void *buffer, TUINT32 len)
static void LogConsole(const TCHAR *a_szFormat,...)
static TUINT32 s_aiCRC32LUT[(256)]
static void ToshiDestroy()
static constexpr const TCHAR * kTypeStrings[]
static void LogSet(TLogFile *a_logFile)
constexpr LogEvent(TLogFile *a_pFile, LogType a_eType, const TCHAR *a_szString)
const TCHAR * szCommandLine
const TCHAR * szLogAppDirName
const TCHAR * szLogAppName
const TCHAR * szLogFileName