- Timestamp:
- Apr 8, 2015, 11:15:11 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/core7/src/libraries/core/command/ConsoleCommandIncludes.h
r10348 r10352 223 223 #include "ConsoleCommandManager.h" 224 224 #include "util/VA_NARGS.h" 225 #include "core/module/StaticallyInitializedInstance.h" 225 226 226 227 … … 264 265 /// Internal macro 265 266 #define SetConsoleCommandGeneric(group, name, functor) \ 266 static orxonox::ConsoleCommand& BOOST_PP_CAT(__consolecommand_, __UNIQUE_NUMBER__) = (*new orxonox::ConsoleCommand(group, name, orxonox::createExecutor(functor))) 267 static orxonox::ConsoleCommand& BOOST_PP_CAT(__consolecommand_, __UNIQUE_NUMBER__) \ 268 = (new orxonox::SI_CC(new orxonox::ConsoleCommand(group, name, orxonox::createExecutor(functor))))->getCommand() 267 269 268 270 … … 299 301 /// Internal macro 300 302 #define DeclareConsoleCommandGeneric(group, name, functor) \ 301 static orxonox::ConsoleCommand& BOOST_PP_CAT(__consolecommand_, __UNIQUE_NUMBER__) = (*new orxonox::ConsoleCommand(group, name, orxonox::createExecutor(functor), false)) 303 static orxonox::ConsoleCommand& BOOST_PP_CAT(__consolecommand_, __UNIQUE_NUMBER__) \ 304 = (new orxonox::SI_CC(new orxonox::ConsoleCommand(group, name, orxonox::createExecutor(functor), false)))->getCommand() 302 305 303 306 304 307 namespace orxonox 305 308 { 309 class _CoreExport StaticallyInitializedConsoleCommand : public StaticallyInitializedInstance 310 { 311 public: 312 StaticallyInitializedConsoleCommand(ConsoleCommand* command) : command_(command) {} 313 314 virtual void load(); 315 316 inline ConsoleCommand& getCommand() 317 { return *this->command_; } 318 319 private: 320 ConsoleCommand* command_; 321 }; 322 323 typedef StaticallyInitializedConsoleCommand SI_CC; 324 306 325 /** 307 326 @brief Returns a manipulator for a command with the given name.
Note: See TracChangeset
for help on using the changeset viewer.