* Rename StandardOut -> Logger.

This commit is contained in:
iProgramInCpp
2023-08-28 11:01:12 +03:00
parent 5c1ea03747
commit 8fe86fccb5
11 changed files with 38 additions and 38 deletions

View File

@@ -1,50 +0,0 @@
#include <iostream>
#include <stdarg.h>
#include "StandardOut.hpp"
#include "Util.hpp"
StandardOut* StandardOut::m_singleton = nullptr;
StandardOut* const StandardOut::singleton()
{
return m_singleton;
}
StandardOut::StandardOut()
{
// Stick with the first output handle we get
if (!m_singleton)
m_singleton = this;
}
StandardOut::~StandardOut()
{
if (m_singleton == this)
m_singleton = nullptr;
}
void StandardOut::print(const char* const str)
{
std::cout << str << std::endl;
}
void StandardOut::print(std::string str)
{
print(str.c_str());
}
void StandardOut::vprintf(const char* const fmt, va_list argPtr)
{
print(Util::vformat(fmt, argPtr));
}
void StandardOut::printf(const char* const fmt, ...)
{
va_list argList;
va_start(argList, fmt);
vprintf(fmt, argList);
va_end(argList);
}