CBMC
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
free_form_cmdline.cpp
Go to the documentation of this file.
1/*******************************************************************\
2
3Module: Unit test utilities
4
5Author: Diffblue Limited.
6
7\*******************************************************************/
8
9#include "free_form_cmdline.h"
10
14{
15 optiont option;
16 option.optstring = flag_name;
17 options.push_back(option);
18}
19
22void free_form_cmdlinet::add_flag(std::string flag)
23{
24 create_flag(flag);
25 set(flag);
26}
27
31void free_form_cmdlinet::add_option(std::string flag, std::string value)
32{
33 create_flag(flag);
34 set(flag, value);
35}
ait supplies three of the four components needed: an abstract interpreter (in this case handling func...
Definition ai.h:562
std::vector< optiont > options
Definition cmdline.h:193
virtual void set(const std::string &option, bool value=true)
Set option option to value, or true if the value is omitted.
Definition cmdline.cpp:63
void create_flag(const std::string &flag_name)
Create a command line option that can be set.
void add_flag(std::string flag)
Equivalent to specifying –flag for the command line.
void add_option(std::string flag, std::string value)
Equivalent to specifying –flag value.
std::string optstring
Definition cmdline.h:170