code_app/modules/base/HGInfo.cpp

35 lines
623 B
C++
Raw Permalink Normal View History

2022-05-03 10:25:52 +00:00
#include "HGInfo.h"
#include "HGInfoImpl.hpp"
#include "HGInc.h"
HGInfoImpl* g_infoImpl = NULL;
2022-05-03 10:25:52 +00:00
HGResult HGAPI HGBase_EnableInfo()
{
if (NULL == g_infoImpl)
return HGBASE_ERR_FAIL;
return g_infoImpl->Enable();
}
HGResult HGAPI HGBase_DisableInfo()
{
if (NULL == g_infoImpl)
return HGBASE_ERR_FAIL;
return g_infoImpl->Disable();
}
HGResult HGAPIV HGBase_WriteInfo(HGUInt type, const HGChar* format, ...)
{
if (NULL == g_infoImpl)
return HGBASE_ERR_FAIL;
char buf[1024] = { 0 };
va_list va;
va_start(va, format);
2022-07-19 03:48:38 +00:00
vsnprintf(buf, 1024, format, va);
2022-05-03 10:25:52 +00:00
va_end(va);
return g_infoImpl->Write(type, buf);
}