home
about
news
download
doc
source
systems
tests
bugs
contact
IMP Reference Guide
2.7.0
The Integrative Modeling Platform
IMP Manual
Reference Guide
Modules
Classes
Examples
doc
examples
kernel
flags.cpp
1
/** \example flags.cpp
2
Show simple usage of the command line flags support in IMP in a
3
C++ executable. Run with "--help" to see all available flags.
4
*/
5
#include <
IMP/flags.h
>
6
#include <
IMP/Flag.h
>
7
8
int
main(
int
argc,
char
*argv[]) {
9
IMP::Flag<std::string>
hello(
"hello"
,
"How to say hello."
,
10
"Hello world"
);
11
12
IMP::setup_from_argv
(argc, argv,
"Example on C++ use of flags."
);
13
14
std::cout << hello << std::endl;
15
16
return
0;
17
}
IMP::Flag
Definition:
Flag.h:36
Flag.h
Various general useful macros for IMP.
flags.h
Various general useful macros for IMP.
IMP::setup_from_argv
void setup_from_argv(int argc, char **argv, std::string description)
Parse the command line flags and return the positional arguments.