Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

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

Location:
orxonox/branches/openAL/src/lib/sound
Files:
1 added
1 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}
Note: See TracChangeset for help on using the changeset viewer.