/********************************************************************
created: 2013/03/04 23:07
Filename: Singleton.h
author: Julius
*********************************************************************/
#ifndef _SINGLETON_H__
#define _SINGLETON_H__
#include <iostream>
using namespace std;
class Singleton
{
public:
static Singleton& GetInstance()
{
static Singleton Instance;
return Instance;
}
public:
~Singleton()
{
cout<<"~Singleton";
}
private:
Singleton()
{
cout<<"Singleton"<<endl;
}
private:
Singleton( const Singleton& other );
Singleton& operator = ( const Singleton& other );
protected:
private:
};
#endif
created: 2013/03/04 23:07
Filename: Singleton.h
author: Julius
*********************************************************************/
#ifndef _SINGLETON_H__
#define _SINGLETON_H__
#include <iostream>
using namespace std;
class Singleton
{
public:
static Singleton& GetInstance()
{
static Singleton Instance;
return Instance;
}
public:
~Singleton()
{
cout<<"~Singleton";
}
private:
Singleton()
{
cout<<"Singleton"<<endl;
}
private:
Singleton( const Singleton& other );
Singleton& operator = ( const Singleton& other );
protected:
private:
};
#endif