/*! * @file proto_singleton.h * @brief Definition of the ... singleton Class */ #ifndef _PROTO_SINGLETON_H #define _PROTO_SINGLETON_H #include "base_object.h" // FORWARD DECLARATION //! A default singleton class. class ProtoSingleton : public BaseObject { ObjectListDeclaration(ProtoSingleton); public: virtual ~ProtoSingleton(void); /** @returns a Pointer to the only object of this Class */ inline static ProtoSingleton* getInstance(void) { if (!singletonRef) singletonRef = new ProtoSingleton(); return singletonRef; }; private: ProtoSingleton(void); static ProtoSingleton* singletonRef; }; #endif /* _PROTO_SINGLETON_H */