source: src/base/command_list.hpp@ 48b662

Last change on this file since 48b662 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 command_list.hpp
3 * @author Julian Iseringhausen <isering@ins.uni-bonn.de>
4 * @date Tue Apr 5 20:28:02 2011
5 *
6 * @brief This class holds a list of commands. These commands
7 * can be executed by calling ExecuteList.
8 *
9 */
10
11#ifndef COMMAND_LIST_HPP_
12#define COMMAND_LIST_HPP_
13
14#include <list>
15#include <string>
16#include <vector>
17
18#include "base/defs.hpp"
19#include "base/object.hpp"
20
21namespace VMG
22{
23
24class Command;
25
26class CommandList : public Object
27{
28public:
29 typedef std::list< std::pair<std::string, std::vector<std::string> > >::iterator iterator;
30
31 Request ExecuteList(); ///< Execute all commands in this list.
32
33 void AddCommand(std::string command, std::string arguments = ""); ///< Add a command to the back of the list.
34 void DeleteCommand(const CommandList::iterator& iter); ///< Remove a command from the list.
35
36 void Print(); ///< Print all commands in list.
37
38 void Clear(); ///< Remove all commands from list.
39
40private:
41 std::list< std::pair<std::string, std::vector< std::string> > > commands;
42};
43
44}
45
46#endif /* COMMAND_LIST_HPP_ */
Note: See TracBrowser for help on using the repository browser.