Files
GDevelop/Extensions/Network/ErrorManager.h
T
Florian 3331b3a7c6 Added two expressions to get IP addresses.
Minor adaptation to minor changes in GDL.


git-svn-id: svn://localhost@407 8062f311-0dae-4547-b526-b8ab9ac864a5
2011-03-26 22:17:19 +00:00

49 lines
938 B
C++

#ifndef ERRORMANAGER_H
#define ERRORMANAGER_H
#include <string>
#include <iostream>
class GD_EXTENSION_API ErrorManager
{
public:
static ErrorManager *GetInstance()
{
if ( !_singleton )
{
_singleton = new ErrorManager;
}
return ( static_cast<ErrorManager*>( _singleton ) );
}
static void DestroySingleton()
{
if ( _singleton )
{
delete _singleton;
_singleton = 0;
}
}
void SetLastError(std::string error)
{
lastErrorString = error;
#if !defined(RELEASE)
std::cout << lastErrorString;
#endif
};
std::string GetLastError() const {return lastErrorString;};
private:
std::string lastErrorString;
ErrorManager() {};
~ErrorManager() {};
static ErrorManager *_singleton;
};
#endif // ERRORMANAGER_H