Geometrize  1.0
An application for geometrizing images into geometric primitives
command.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <map>
4 #include <string>
5 
6 namespace geometrize
7 {
8 
9 namespace script
10 {
11 
16 class Command
17 {
18 public:
19  Command(const std::string& command);
20  virtual ~Command() = default;
21 
22  std::string getCommand() const;
23  std::string getStringArg(const std::string& key) const;
24  std::string getStringArg(const std::string& key, const std::string& def) const;
25 
26  Command& setStringArg(const std::string& key, const std::string& value);
27 
28 private:
29  const std::string m_command;
30  std::map<std::string, std::string> m_stringArgs;
31 };
32 
33 }
34 
35 }
geometrize::script::Command
The Command class provides a convenient way for a script to tell an object about something For exampl...
Definition: command.h:17
geometrize::script::Command::setStringArg
Command & setStringArg(const std::string &key, const std::string &value)
Definition: command.cpp:32
command.h
geometrize::script::Command::~Command
virtual ~Command()=default
geometrize::script::Command::m_command
const std::string m_command
Definition: command.h:29
geometrize::script::Command::getStringArg
std::string getStringArg(const std::string &key) const
Definition: command.cpp:20
geometrize
Definition: commandlineparser.cpp:73
geometrize::script::Command::m_stringArgs
std::map< std::string, std::string > m_stringArgs
Definition: command.h:30
geometrize::script::Command::getCommand
std::string getCommand() const
Definition: command.cpp:15
geometrize::script::Command::Command
Command(const std::string &command)
Definition: command.cpp:11