00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011 #ifndef OH_HISTOGRAM_PROVIDER_H
00012 #define OH_HISTOGRAM_PROVIDER_H
00013
00014 #include <oh/OHCommandListener.h>
00015 #include <oh/core/Histogram.h>
00016 #include <oh/core/Graph.h>
00017 #include <oh/exceptions.h>
00018
00019 namespace oh
00020 {
00021 class ProviderManager;
00022 }
00023
00025
00067 class OHProvider : public ISCommandListener
00068 {
00069 friend class oh::ProviderManager;
00070
00071 public:
00072
00073 virtual ~OHProvider( );
00074
00075 protected:
00076
00078 OHProvider( const IPCPartition & p,
00079 const std::string & server,
00080 const std::string & name,
00081 OHCommandListener * lst = 0 ) throw ( daq::oh::RepositoryNotFound,
00082 daq::oh::ProviderAlreadyExist );
00083
00085 void
00086 publish( ISInfo & object, const std::string & name, bool keep_history = false ) const
00087 throw ( daq::oh::RepositoryNotFound,
00088 daq::oh::ObjectTypeMismatch );
00089
00090 private:
00091
00092 void command( const std::string & name, const std::string & cmd );
00093
00094 bool valid_;
00095 IPCPartition partition_;
00096 std::string server_;
00097 std::string name_;
00098 OHCommandListener * listener_;
00099 };
00100
00101 #endif // OH_HISTOGRAMPROVIDER_H