/* Collection of code snippets by Arne Vajhøj */
/* (from articles on eksperten.dk / vajhoej.dk written sometime between 2004 and now) */
#ifndef CLASSIC_SINGLETON_H
#define CLASSIC_SINGLETON_H

#include <iostream>

using namespace std;

class ClassicSingleton
{
private:
    static ClassicSingleton* instance;
    int SomeState;
    ClassicSingleton() { SomeState = 123; }
    ClassicSingleton(const ClassicSingleton& original) { };
    ClassicSingleton& operator=(const ClassicSingleton& original) { return *this; };
public:
    static ClassicSingleton* Instance();
    void SomeMethod() { cout << SomeState << endl; }
};

#endif
