CBMC
free_form_cmdline.cpp
Go to the documentation of this file.
1
/*******************************************************************\
2
3
Module: Unit test utilities
4
5
Author: Diffblue Limited.
6
7
\*******************************************************************/
8
9
#include "
free_form_cmdline.h
"
10
13
void
free_form_cmdlinet::create_flag
(
const
std::string &flag_name)
14
{
15
optiont
option;
16
option.
optstring
= flag_name;
17
options
.push_back(option);
18
}
19
22
void
free_form_cmdlinet::add_flag
(std::string flag)
23
{
24
create_flag
(flag);
25
set
(flag);
26
}
27
31
void
free_form_cmdlinet::add_option
(std::string flag, std::string value)
32
{
33
create_flag
(flag);
34
set
(flag, value);
35
}
cmdlinet::options
std::vector< optiont > options
Definition:
cmdline.h:193
cmdlinet::set
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
free_form_cmdlinet::create_flag
void create_flag(const std::string &flag_name)
Create a command line option that can be set.
Definition:
free_form_cmdline.cpp:13
free_form_cmdlinet::add_flag
void add_flag(std::string flag)
Equivalent to specifying –flag for the command line.
Definition:
free_form_cmdline.cpp:22
free_form_cmdlinet::add_option
void add_option(std::string flag, std::string value)
Equivalent to specifying –flag value.
Definition:
free_form_cmdline.cpp:31
free_form_cmdline.h
cmdlinet::optiont
Definition:
cmdline.h:165
cmdlinet::optiont::optstring
std::string optstring
Definition:
cmdline.h:170
unit
testing-utils
free_form_cmdline.cpp
Generated by
1.9.1