IMP
2.3.0
The Integrative Modeling Platform
IMP Mainpage
Modules
Applications
Related Pages
Groups
Classes
Files
Examples
Indexes
File List
File Members
flags.cpp
1
/** \example base/flags.cpp
2
Show simple usage of the command line flags support in IMP.base in a
3
C++ executable. Run with "--help" to see all available flags.
4
*/
5
#include <
IMP/base/flags.h
>
6
#include <
IMP/base/Flag.h
>
7
8
int
main(
int
argc,
char
*argv[]) {
9
IMP::base::Flag<std::string>
hello(
"hello"
,
"How to say hello."
,
10
"Hello world"
);
11
12
IMP::base::setup_from_argv
(argc, argv,
"Example on C++ use of flags."
);
13
14
std::cout << hello << std::endl;
15
16
return
0;
17
}
IMP::base::Flag
Definition:
Flag.h:36
Flag.h
Various general useful macros for IMP.
flags.h
Various general useful macros for IMP.
IMP::base::setup_from_argv
void setup_from_argv(int argc, char **argv, std::string description)
Parse the command line flags and return the positional arguments.