SeaBreeze
Feature.h
Go to the documentation of this file.
1 /***************************************************/
39 #ifndef FEATURE_H
40 #define FEATURE_H
41 
42 #include "common/SeaBreeze.h"
43 #include "common/buses/Bus.h"
47 #include <vector>
48 
49 namespace seabreeze {
50 
51  class Feature {
52  public:
53  virtual ~Feature() = 0;
54 
55  /* Allow the object that represents a given feature to initialize
56  * itself by reading from the corresponding feature on the real
57  * device, and/or put the real device feature into a known state.
58  * This should return true if the feature is ready to be used, and false
59  * otherwise.
60  */
61  virtual bool initialize(const Protocol &protocol, const Bus &bus)
62  throw (FeatureException) = 0;
63 
64  virtual FeatureFamily getFeatureFamily() = 0;
65  };
66 
67  /* Default implementation for (otherwise) pure virtual destructor */
68  inline Feature::~Feature() {}
69 }
70 
71 #endif /* FEATURE_H */
Definition: Protocol.h:44
Definition: FeatureFamily.h:39
Definition: FeatureException.h:43
Definition: Feature.h:51
Definition: Bus.h:48
Encapsulates all SeaBreeze classes.
Definition: DeviceFactory.h:42