This is Unofficial EPICS BASE Doxygen Site
pvPlugin.h
Go to the documentation of this file.
1 /* pvPlugin.h */
2 /*
3  * The License for this software can be found in the file LICENSE that is included with the distribution.
4  */
9 #ifndef PVPLUGIN_H
10 #define PVPLUGIN_H
11 
12 #include <string>
13 #include <map>
14 #include <pv/lock.h>
15 #include <pv/bitSet.h>
16 
17 #include <shareLib.h>
18 
19 namespace epics { namespace pvCopy{
20 
21 class PVPlugin;
22 class PVFilter;
23 class PVPluginRegistry;
24 
25 class PVCopy;
26 typedef std::tr1::shared_ptr<PVCopy> PVCopyPtr;
27 
28 typedef std::tr1::shared_ptr<PVPlugin> PVPluginPtr;
29 typedef std::tr1::shared_ptr<PVFilter> PVFilterPtr;
30 typedef std::map<std::string,PVPluginPtr> PVPluginMap;
31 
32 
45 public:
47  virtual ~PVPlugin() {}
56  virtual PVFilterPtr create(
57  const std::string & requestValue,
58  const PVCopyPtr & pvCopy,
59  const epics::pvData::PVFieldPtr & master) = 0;
60 };
61 
69 public:
71  virtual ~PVFilter() {}
79  virtual bool filter(const epics::pvData::PVFieldPtr & copy,const epics::pvData::BitSetPtr & bitSet,bool toCopy) = 0;
85  virtual std::string getName() = 0;
86 };
92 public:
98  static void registerPlugin(const std::string & name,const PVPluginPtr & pvPlugin);
104  static PVPluginPtr find(const std::string & name);
105 };
106 
107 }}
108 
109 #endif /* PVPLUGIN_H */
std::map< std::string, PVPluginPtr > PVPluginMap
Definition: pvPlugin.cpp:19
std::tr1::shared_ptr< PVPlugin > PVPluginPtr
Definition: pvPlugin.h:28
std::tr1::shared_ptr< PVFilter > PVFilterPtr
Definition: pvPlugin.h:29
std::tr1::shared_ptr< PVCopy > PVCopyPtr
Definition: pvPlugin.h:25
TODO only here because of the Lockable.
Definition: ntaggregate.cpp:16
Mark external symbols and entry points for shared libraries.
Support for subset of fields in a pvStructure.
void copy(PVValueArray< T > &pvFrom, size_t fromOffset, size_t fromStride, PVValueArray< T > &pvTo, size_t toOffset, size_t toStride, size_t count)
Copy a subarray from one scalar array to another.
#define POINTER_DEFINITIONS(clazz)
Definition: sharedPtr.h:198
A filter plugin that attaches to a field of a PVStrcture.
Definition: pvPlugin.h:44
#define epicsShareClass
Definition: shareLib.h:206
A registry for filter plugins for PVCopy.
Definition: pvPlugin.h:91
std::tr1::shared_ptr< PVField > PVFieldPtr
Definition: pvData.h:66
std::tr1::shared_ptr< BitSet > BitSetPtr
Definition: bitSet.h:26
A Filter that is called when a copy PVStructure is being updated.
Definition: pvPlugin.h:68