source: src/commands/com_execute_full_cycle_loop.cpp@ 8e985b

Last change on this file since 8e985b was 48b662, checked in by Olaf Lenz <olenz@…>, 14 years ago

Moved files in scafacos_fcs one level up.

git-svn-id: https://svn.version.fz-juelich.de/scafacos/trunk@847 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 std::string str_init = arguments[0] + "_INIT";
26 std::string str_loop = arguments[0] + "_LOOP";
27 std::string str_finalize = arguments[0] + "_FINALIZE";
28
29 MG::GetFactory().GetObject(str_init)->Cast<CommandList>()->ExecuteList();
30
31 while (MG::GetFactory().GetObject(str_loop)->Cast<CommandList>()->ExecuteList() == Continue);
32
33 MG::GetFactory().GetObject(str_finalize)->Cast<CommandList>()->ExecuteList();
34
35 return Continue;
36 }
37
38 static const char* Name() {return "ExecuteFullCycleLoop";}
39 static int Arguments() {return 1;}
40};
41
42CREATE_INITIALIZER(VMGCommandExecuteFullCycleLoop);
Note: See TracBrowser for help on using the repository browser.