source: src/commands/com_execute_full_cycle_loop.cpp@ d7de94

Last change on this file since d7de94 was dfed1c, checked in by Julian Iseringhausen <isering@…>, 14 years ago

Major vmg update.

git-svn-id: https://svn.version.fz-juelich.de/scafacos/trunk@1136 5161e1c8-67bf-11de-9fd5-51895aff932f

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