Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Actions/ActionRegistry.cpp

    rcf1a07 re73a8a2  
    99#include "Actions/Action.hpp"
    1010
     11#include "Patterns/Singleton_impl.hpp"
     12
    1113#include <string>
    1214#include <cassert>
     
    1416
    1517using namespace std;
    16 
    17 ActionRegistry *ActionRegistry::theInstance=0;
    1818
    1919ActionRegistry::ActionRegistry()
     
    4343}
    4444
    45 // singleton stuff
    46 ActionRegistry* ActionRegistry::getRegistry(){
    47   if(!theInstance){
    48     theInstance = new ActionRegistry();
    49   }
    50   return theInstance;
    51 }
    52 
    53 void ActionRegistry::purgeRegistry(){
    54   if(theInstance){
    55     delete theInstance;
    56     theInstance = 0;
    57   }
    58 }
     45CONSTRUCT_SINGLETON(ActionRegistry)
Note: See TracChangeset for help on using the changeset viewer.