| Line | |
|---|
| 1 | /**
|
|---|
| 2 | * @file com_execute_full_cycle.cpp
|
|---|
| 3 | * @author Julian Iseringhausen <isering@ins.uni-bonn.de>
|
|---|
| 4 | * @date Mon Apr 18 12:35:13 2011
|
|---|
| 5 | *
|
|---|
| 6 | * @brief Executes a set of cycles once.
|
|---|
| 7 | *
|
|---|
| 8 | */
|
|---|
| 9 |
|
|---|
| 10 | #ifdef HAVE_CONFIG_H
|
|---|
| 11 | #include <config.h>
|
|---|
| 12 | #endif
|
|---|
| 13 |
|
|---|
| 14 | #include "base/command.hpp"
|
|---|
| 15 | #include "base/command_list.hpp"
|
|---|
| 16 |
|
|---|
| 17 | using namespace VMG;
|
|---|
| 18 |
|
|---|
| 19 | class VMGCommandExecuteFullCycle : public Command
|
|---|
| 20 | {
|
|---|
| 21 | public:
|
|---|
| 22 | Request Run(Command::argument_vector arguments)
|
|---|
| 23 | {
|
|---|
| 24 | MPE_EVENT_BEGIN()
|
|---|
| 25 |
|
|---|
| 26 | std::string str_init = arguments[0] + "_INIT";
|
|---|
| 27 | std::string str_loop = arguments[0] + "_LOOP";
|
|---|
| 28 | std::string str_finalize = arguments[0] + "_FINALIZE";
|
|---|
| 29 |
|
|---|
| 30 | VMG::Factory& factory = MG::GetFactory();
|
|---|
| 31 |
|
|---|
| 32 | factory.Get(str_init)->Cast<CommandList>()->ExecuteList();
|
|---|
| 33 | factory.Get(str_loop)->Cast<CommandList>()->ExecuteList();
|
|---|
| 34 | factory.Get(str_finalize)->Cast<CommandList>()->ExecuteList();
|
|---|
| 35 |
|
|---|
| 36 | MPE_EVENT_END()
|
|---|
| 37 |
|
|---|
| 38 | return Continue;
|
|---|
| 39 | }
|
|---|
| 40 |
|
|---|
| 41 | static const char* Name() {return "ExecuteFullCycle";}
|
|---|
| 42 | static int Arguments() {return 1;}
|
|---|
| 43 | };
|
|---|
| 44 |
|
|---|
| 45 | CREATE_INITIALIZER(VMGCommandExecuteFullCycle)
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.