9 #ifndef IMPKERNEL_FLAG_H
10 #define IMPKERNEL_FLAG_H
12 #include <IMP/kernel_config.h>
13 #include "internal/Flag.h"
14 #include <boost/program_options.hpp>
19 IMPKERNEL_BEGIN_INTERNAL_NAMESPACE
20 extern IMPKERNELEXPORT boost::program_options::options_description flags;
21 extern IMPKERNELEXPORT boost::program_options::options_description advanced_flags;
22 IMPKERNEL_END_INTERNAL_NAMESPACE
25 IMPKERNEL_BEGIN_NAMESPACE
35 template <
class T,
bool ENABLED = true>
36 class Flag :
public internal::FlagImpl<T, ENABLED> {
38 Flag(std::string name, std::string description, T default_value = T())
39 : internal::FlagImpl<T, ENABLED>(internal::flags, name, description,
42 internal::FlagImpl<T, ENABLED>::operator=(o);
52 template <
class T,
bool ENABLED = true>
56 AdvancedFlag(std::string name, std::string description, T default_value = T())
57 : internal::FlagImpl<T, ENABLED>(internal::advanced_flags, name,
58 description, default_value) {}
60 internal::FlagImpl<T, ENABLED>::operator=(o);
65 IMPKERNEL_END_NAMESPACE
Use this to add an advanced flag to the program.