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);
53 template <
class T,
bool ENABLED = true>
57 AdvancedFlag(std::string name, std::string description, T default_value = T())
58 : internal::FlagImpl<T, ENABLED>(internal::advanced_flags, name,
59 description, default_value) {}
61 internal::FlagImpl<T, ENABLED>::operator=(o);