Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/trunk/src/proto/proto_singleton.h @ 10454

Last change on this file since 10454 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
RevLine 
[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.
14class 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.