libalextractor  1.14.5
alextractor/alextractor.h
Go to the documentation of this file.
00001 
00010 #pragma once
00011 #ifndef _LIBALEXTRACTOR_ALEXTRACTOR_ALEXTRACTOR_H_
00012 #define _LIBALEXTRACTOR_ALEXTRACTOR_ALEXTRACTOR_H_
00013 
00014 # include <alcommon/almodule.h>
00015 # include <alextractor/config.h>
00016 
00017 # include <boost/scoped_ptr.hpp>
00018 
00019 namespace AL
00020 {
00021   class ALBroker;
00022   class ALExtractorPrivate;
00023 
00032   class ALEXTRACTOR_API ALExtractor: public ALModule
00033   {
00034   public:
00042     ALExtractor(boost::shared_ptr<ALBroker> pBroker,
00043                 const std::string& pName);
00044 
00046     virtual ~ALExtractor();
00047 
00055     virtual void subscribe(const std::string &pSubscribedName,
00056                            const int &pPeriod,
00057                            const float &pPrecision);
00058 
00066     void subscribe(const std::string &pSubscribedName);
00067 
00068 
00074     virtual void updatePeriod(const std::string &pSubscribedName,
00075                               const int &pPeriod);
00076 
00082     virtual void updatePrecision(const std::string &pSubscribedName,
00083                                  const float &pPrecision);
00084 
00090     virtual void unsubscribe(const std::string &pSubscribedName);
00091 
00097     virtual int getCurrentPeriod();
00098 
00104     virtual float getCurrentPrecision();
00105 
00111     virtual int getMyPeriod(const std::string &pSubscribedName);
00112 
00118     virtual float getMyPrecision(const std::string &pSubscribedName);
00119 
00125     ALValue getSubscribersInfo();
00126 
00131     virtual std::string httpGet();
00132 
00133   protected:
00134 
00143     virtual void xStartDetection(const int pPeriod,
00144                                  const float pPrecision) = 0;
00145 
00155     virtual void xUpdateParameters(const int pPeriod, const float pPrecision);
00156 
00162     virtual void xStopDetection() = 0;
00163 
00164 
00172     virtual int getDefaultPeriod();
00173 
00181     virtual float getDefaultPrecision();
00182 
00183 
00188     std::vector<std::string> getOutputNames(void);
00189 
00190   private:
00192     boost::scoped_ptr<ALExtractorPrivate> _private;
00196     void xUpdateParameters();
00197   };
00198 } // namespace AL
00199 
00200 #endif  // _LIBALEXTRACTOR_ALEXTRACTOR_ALEXTRACTOR_H_
00201 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Friends