IConfigurable.h
Go to the documentation of this file.
1 #ifndef WIRECELLIFACE_ICONFIGURABLE
2 #define WIRECELLIFACE_ICONFIGURABLE
3 
6 
7 namespace WireCell {
8 
9  /** Interface by which a class may be configured.
10  *
11  * Configuration is via a Boost property tree.
12  */
13  class IConfigurable : virtual public IComponent<IConfigurable> {
14  public:
15  virtual ~IConfigurable() ;
16 
17  /// Optional, override to return a hard-coded default configuration.
19  return WireCell::Configuration();
20  }
21 
22  /// Accept a configuration.
23  virtual void configure(const WireCell::Configuration& config) = 0;
24 
25  };
26 
27 }
28 #endif
virtual WireCell::Configuration default_configuration() const
Optional, override to return a hard-coded default configuration.
Definition: IConfigurable.h:18
static Config * config
Definition: config.cpp:1054
Definition: Main.h:22
virtual void configure(const WireCell::Configuration &config)=0
Accept a configuration.
Json::Value Configuration
Definition: Configuration.h:50