Last change
on this file since 9864 was
9718,
checked in by bensch, 18 years ago
|
more thoughts on Resources, and soon going to adapt… i think i've got a clue
|
File size:
651 bytes
|
Line | |
---|
1 | /*! |
---|
2 | * @file proto_singleton.h |
---|
3 | * @brief Definition of the ... singleton Class |
---|
4 | */ |
---|
5 | |
---|
6 | #ifndef _PROTO_SINGLETON_H |
---|
7 | #define _PROTO_SINGLETON_H |
---|
8 | |
---|
9 | #include "base_object.h" |
---|
10 | |
---|
11 | // FORWARD DECLARATION |
---|
12 | |
---|
13 | //! A default singleton class. |
---|
14 | class ProtoSingleton : public BaseObject { |
---|
15 | ObjectListDeclaration(ProtoSingleton); |
---|
16 | |
---|
17 | |
---|
18 | public: |
---|
19 | virtual ~ProtoSingleton(void); |
---|
20 | /** @returns a Pointer to the only object of this Class */ |
---|
21 | inline static ProtoSingleton* getInstance(void) { if (!singletonRef) singletonRef = new ProtoSingleton(); return singletonRef; }; |
---|
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.