Rev | Line | |
---|
[4838] | 1 | /*! |
---|
| 2 | * @file proto_singleton.h |
---|
| 3 | * @brief Definition of the ... singleton Class |
---|
[3655] | 4 | */ |
---|
| 5 | |
---|
| 6 | #ifndef _PROTO_SINGLETON_H |
---|
| 7 | #define _PROTO_SINGLETON_H |
---|
| 8 | |
---|
| 9 | #include "base_object.h" |
---|
| 10 | |
---|
[5405] | 11 | // FORWARD DECLARATION |
---|
[3655] | 12 | |
---|
| 13 | //! A default singleton class. |
---|
| 14 | class ProtoSingleton : public BaseObject { |
---|
[9869] | 15 | ObjectListDeclaration(ProtoSingleton); |
---|
[3655] | 16 | |
---|
[9869] | 17 | |
---|
[3655] | 18 | public: |
---|
| 19 | virtual ~ProtoSingleton(void); |
---|
[4838] | 20 | /** @returns a Pointer to the only object of this Class */ |
---|
[4519] | 21 | inline static ProtoSingleton* getInstance(void) { if (!singletonRef) singletonRef = new ProtoSingleton(); return singletonRef; }; |
---|
[3655] | 22 | |
---|
| 23 | private: |
---|
| 24 | ProtoSingleton(void); |
---|
| 25 | static ProtoSingleton* singletonRef; |
---|
| 26 | }; |
---|
| 27 | |
---|
| 28 | #endif /* _PROTO_SINGLETON_H */ |
---|
Note: See
TracBrowser
for help on using the repository browser.