Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jun 7, 2015, 2:16:55 PM (9 years ago)
Author:
landauf
Message:

clean and explicit setup/shutdown of singletons that are used by statically initialized instances

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/core7/src/libraries/core/command/ConsoleCommandManager.h

    r10520 r10542  
    3737#include "core/CorePrereqs.h"
    3838
     39#include "util/Singleton.h"
     40
    3941namespace orxonox
    4042{
     
    4244     * A singleton that stores all existing ConsoleCommands.
    4345     */
    44     class _CoreExport ConsoleCommandManager
     46    class _CoreExport ConsoleCommandManager : public Singleton<ConsoleCommandManager>
    4547    {
     48        friend class Singleton<ConsoleCommandManager>;
     49
    4650        public:
    47             static ConsoleCommandManager& getInstance();
    48 
    4951            void registerCommand(ConsoleCommand* command);
    5052            void registerCommand(const std::string& group, const std::string& name, ConsoleCommand* command);
     
    7173            std::map<std::string, std::map<std::string, ConsoleCommand*> > commandMap_;
    7274            std::map<std::string, std::map<std::string, ConsoleCommand*> > commandMapLC_;
     75
     76            static ConsoleCommandManager* singletonPtr_s;
    7377    };
    7478}
Note: See TracChangeset for help on using the changeset viewer.