Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/branches/playability/src/proto/proto_singleton.h @ 10133

Last change on this file since 10133 was 9869, checked in by bensch, 18 years ago

orxonox/trunk: merged the new_class_id branche back to the trunk.
merged with command:
svn merge https://svn.orxonox.net/orxonox/branches/new_class_id trunk -r9683:HEAD
no conflicts… puh..

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.
14class 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.