Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 4195 in orxonox.OLD for orxonox/branches/openAL/src/lib


Ignore:
Timestamp:
May 16, 2005, 1:39:12 PM (19 years ago)
Author:
bensch
Message:

orxonox/branches/openAL: added the SingletonClass for the SoundEngine

Location:
orxonox/branches/openAL/src/lib/sound
Files:
1 added
2 copied

Legend:

Unmodified
Added
Removed
  • orxonox/branches/openAL/src/lib/sound/sound_engine.cc

    r4187 r4195  
    1010
    1111   ### File Specific:
    12    main-programmer: ...
     12   main-programmer: Benjamin Grauer
    1313   co-programmer: ...
    1414*/
     
    1616//#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_WORLD_ENTITY
    1717
    18 #include "proto_singleton.h"
     18#include "sound_engine.h"
    1919
    2020using namespace std;
     
    2424   \brief standard constructor
    2525*/
    26 ProtoSingleton::ProtoSingleton ()
     26SoundEngine::SoundEngine ()
    2727{
    28    this->setClassName ("ProtoSingleton");
     28   this->setClassName ("SoundEngine");
    2929
    3030}
     
    3333   \brief the singleton reference to this class
    3434*/
    35 ProtoSingleton* ProtoSingleton::singletonRef = NULL;
     35SoundEngine* SoundEngine::singletonRef = NULL;
    3636
    3737/**
    3838   \returns a Pointer to this Class
    3939*/
    40 ProtoSingleton* ProtoSingleton::getInstance(void)
     40SoundEngine* SoundEngine::getInstance(void)
    4141{
    42   if (!ProtoSingleton::singletonRef)
    43     ProtoSingleton::singletonRef = new ProtoSingleton();
    44   return ProtoSingleton::singletonRef;
     42  if (!SoundEngine::singletonRef)
     43    SoundEngine::singletonRef = new SoundEngine();
     44  return SoundEngine::singletonRef;
    4545}
    4646
     
    4949
    5050*/
    51 ProtoSingleton::~ProtoSingleton ()
     51SoundEngine::~SoundEngine ()
    5252{
    53   ProtoSingleton::singletonRef = NULL;
     53  SoundEngine::singletonRef = NULL;
    5454
    5555}
  • orxonox/branches/openAL/src/lib/sound/sound_engine.h

    r4194 r4195  
    11/*!
    2     \file proto_singleton.h
    3     \brief Definition of the ... singleton Class
     2    \file sound_engine.h
     3    \brief Definition of the SoundEngine singleton Class
    44   
    55*/
    66
    7 #ifndef _PROTO_SINGLETON_H
    8 #define _PROTO_SINGLETON_H
     7#ifndef _SOUND_ENGINE_H
     8#define _SOUND_ENGINE_H
    99
    1010#include "base_object.h"
     
    1212// FORWARD DEFINITION
    1313
    14 //! A default singleton class.
    15 class ProtoSingleton : public BaseObject {
     14//! A Class that handles audio via the openAudioLibrary
     15class SoundEngine : public BaseObject {
    1616
    1717 public:
    18   static ProtoSingleton* getInstance(void);
    19   virtual ~ProtoSingleton(void);
     18  static SoundEngine* getInstance(void);
     19  virtual ~SoundEngine(void);
    2020
    2121 private:
    22   ProtoSingleton(void);
    23   static ProtoSingleton* singletonRef;
     22  SoundEngine(void);
     23  static SoundEngine* singletonRef;
    2424};
    2525
    26 #endif /* _PROTO_SINGLETON_H */
     26#endif /* _SOUND_ENGINE_H */
Note: See TracChangeset for help on using the changeset viewer.