10 #define IMPBASE_FLAG_H
12 #include <IMP/base/base_config.h>
13 #include "internal/Flag.h"
14 #include <boost/program_options.hpp>
19 IMPBASE_BEGIN_INTERNAL_NAMESPACE
20 extern IMPBASEEXPORT boost::program_options::options_description flags;
21 extern IMPBASEEXPORT boost::program_options::options_description advanced_flags;
22 IMPBASE_END_INTERNAL_NAMESPACE
25 IMPBASE_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);
Use this to add an advanced flag to the program.