IMP
2.3.1
The Integrative Modeling Platform
IMP Mainpage
Modules
Applications
Related Pages
Groups
Classes
Files
Examples
Indexes
File List
File Members
IMP
Modules
Applications
All IMP Applications
Argument Index
Class Examples
Factory Index
Function Examples
Design example
Developer Guide
Installation
Introduction
Publications
ChangeLog
Tools
Dependencies
PMI changelog
Deprecated List
Groups
Classes
Files
File List
File Members
Examples
Indexes
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.