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

#include <iostream>

using namespace std;

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

#endif
