add virtual destructors

This commit is contained in:
Marty Kraimer
2011-08-24 15:44:29 -04:00
parent dfaacdf102
commit 33183d3dd1
3 changed files with 9 additions and 5 deletions

View File

@@ -22,6 +22,7 @@ namespace epics { namespace pvData {
class MonitorElement {
public:
POINTER_DEFINITIONS(MonitorElement);
virtual ~MonitorElement(){}
/**
* Get the PVStructure.
* @return The PVStructure.
@@ -47,6 +48,7 @@ namespace epics { namespace pvData {
class Monitor : public Destroyable, private NoDefaultMethods {
public:
POINTER_DEFINITIONS(Monitor);
virtual ~Monitor(){}
/**
* Start monitoring.
* @return completion status.
@@ -78,6 +80,7 @@ namespace epics { namespace pvData {
class MonitorRequester : public virtual Requester {
public:
POINTER_DEFINITIONS(MonitorRequester);
virtual ~MonitorRequester(){}
/**
* The client and server have both completed the createMonitor request.
* @param status Completion status.

View File

@@ -53,6 +53,7 @@ private:
class PostHandler {
public:
virtual ~PostHandler(){}
virtual void postPut() = 0;
};

View File

@@ -62,6 +62,7 @@ namespace ScalarTypeFunc {
class Field : public std::tr1::enable_shared_from_this<Field> {
public:
POINTER_DEFINITIONS(Field);
virtual ~Field();
String getFieldName() const{return m_fieldName;}
Type getType() const{return m_type;}
virtual void toString(StringBuilder buf) const{toString(buf,0);}
@@ -69,7 +70,6 @@ public:
void renameField(String newName);
protected:
Field(String fieldName,Type type);
virtual ~Field();
private:
String m_fieldName;
Type m_type;
@@ -88,6 +88,7 @@ private:
class Scalar : public Field{
public:
POINTER_DEFINITIONS(Scalar);
virtual ~Scalar();
typedef Scalar& reference;
typedef const Scalar& const_reference;
@@ -96,7 +97,6 @@ public:
virtual void toString(StringBuilder buf,int indentLevel) const;
protected:
Scalar(String fieldName,ScalarType scalarType);
virtual ~Scalar();
private:
ScalarType scalarType;
friend class FieldCreate;
@@ -105,6 +105,7 @@ private:
class ScalarArray : public Field{
public:
POINTER_DEFINITIONS(ScalarArray);
ScalarArray(String fieldName,ScalarType scalarType);
typedef ScalarArray& reference;
typedef const ScalarArray& const_reference;
@@ -112,7 +113,6 @@ public:
virtual void toString(StringBuilder buf) const{toString(buf,0);}
virtual void toString(StringBuilder buf,int indentLevel) const;
protected:
ScalarArray(String fieldName,ScalarType scalarType);
virtual ~ScalarArray();
private:
ScalarType elementType;
@@ -133,13 +133,14 @@ protected:
StructureArray(String fieldName,StructureConstPtr structure);
virtual ~StructureArray();
private:
StructureConstPtr pstructure;
StructureConstPtr pstructure;
friend class FieldCreate;
};
class Structure : public Field {
public:
POINTER_DEFINITIONS(Structure);
virtual ~Structure();
typedef Structure& reference;
typedef const Structure& const_reference;
@@ -154,7 +155,6 @@ public:
virtual void toString(StringBuilder buf,int indentLevel) const;
protected:
Structure(String fieldName, int numberFields,FieldConstPtrArray fields);
virtual ~Structure();
private:
int numberFields;
FieldConstPtrArray fields;