IMP logo
IMP Reference Guide  2.10.0
The Integrative Modeling Platform
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 }
Definition: Flag.h:36
Various general useful macros for IMP.
Various general useful macros for IMP.
void setup_from_argv(int argc, char **argv, std::string description)
Parse the command line flags and return the positional arguments.