This is Unofficial EPICS BASE Doxygen Site
destroyable.h
Go to the documentation of this file.
1 /* destroyable.h */
2 /*
3  * Copyright information and license terms for this software can be
4  * found in the file LICENSE that is included with the distribution
5  */
9 #ifndef DESTROYABLE_H
10 #define DESTROYABLE_H
11 
12 #include <compilerDependencies.h>
13 
14 #include <pv/sharedPtr.h>
15 
16 #include <shareLib.h>
17 
18 namespace epics { namespace pvAccess {
19 
20 
25  public:
30  virtual void destroy() = 0;
31 
32  protected:
33  virtual ~Destroyable() {}
34  public:
35 
47  class cleaner {
48  Destroyable::shared_pointer ptr;
49  public:
50  cleaner(const Destroyable::shared_pointer& ptr) :ptr(ptr) {}
52  Destroyable::shared_pointer P;
53  P.swap(ptr);
54  P->destroy();
55  }
56  };
57  };
58 
59 }}
60 namespace epics { namespace pvData {
61  typedef ::epics::pvAccess::Destroyable Destroyable EPICS_DEPRECATED;
62 }}
63 #endif /* DESTROYABLE_H */
const epics::pvData::int8 PVA_PROTOCOL_REVISION EPICS_DEPRECATED
Definition: pvaConstants.h:35
cleaner(const Destroyable::shared_pointer &ptr)
Definition: destroyable.h:50
TODO only here because of the Lockable.
Definition: ntaggregate.cpp:16
Mark external symbols and entry points for shared libraries.
#define POINTER_DEFINITIONS(clazz)
Definition: sharedPtr.h:198
#define epicsShareClass
Definition: shareLib.h:206
Instance declaring destroy method.
Definition: destroyable.h:24
Compiler specific declarations.