Files
SDLPongCPP/TrooperEngineDLL/TrooperEngine/UtilityEngine/cUtility.hpp
T

64 lines
1.4 KiB
C++

#ifndef _CUTILITY_HPP_
#define _CUTILITY_HPP_
/*** ANSI C Header Files ***/
#include <stdio.h> /// for __FUNCTION__
#ifndef __FUNCTION__
# define __FUNCTION__ __func__
#endif
#define __STRINGIFY__(x) #x
#define __TOSTRING__(x) __STRINGIFY__(x)
#define __AT__ __FILE__ ":" __TOSTRING__(__LINE__) ":(" __FUNCTION__ ")"
/*** DLL Header File ***/
#include "dllExport.h"
/*** Custom Header Files ***/
#include "cString.hpp"
using UtilityEngine::cString;
namespace UtilityEngine {
/* Singleton */
class EXPORT_FROM_MYDLL cUtility
{
public:
enum eTypeSDL : unsigned int
{
NONE = 0,
ALL = 0,
SDL,
TTF,
IMAGE,
MIXER,
GFX,
NET,
};
private:
cUtility();
~cUtility();
public:
/// Functions
static cUtility& Inst();
static void Delete();
/* prints out a message to stderror. */
void Message( const cString& msg, const cString& debugInfo = "", const eTypeSDL typeSDL = eTypeSDL::NONE ) const;
/* Prints out what Version of SDL2, SDL2_image, SDL2_mixer, SDL2_net, and SDL2_ttf based on what you pass it to stderror. */
void PrintVersion( const eTypeSDL typeSDL = eTypeSDL::ALL ) const;
private:
/// Functions
void VersionParser( const cString& runCompiled, const SDL_version& version, const cString& type ) const;
private:
/// Variables
static cUtility* sp_inst;/// = nullptr
};/// END CLASS DEFINITION cUtility
}/// END NAMESPACE DEFINITION UtilityEngine
#endif/// END IFNDEF _CUTILITY_HPP_