1) implemented noDefaultMethods. See effective C++ Item 6. There it is called Uncopyable

2) implemented Lock. See effective C++ item 14.
     This is as easy to use as Java synchronize.
3) wrapper on top of std::string. All usage of string in pvData is one of:
      String - Just a std::string
     StringBuilder - Used where StringBuilder is used in Java
     StringConst - Just a "std::string const". This is used wherever String is used in Java
     StringConstArray - Just like a String[] in Java.
4) The reference counting (incReferenceCount and decReferenceCount) are now private. It is completely handled by the implenentaion.
    NO code that uses pvData needs even know about reference counting.
This commit is contained in:
Marty Kraimer
2010-09-27 08:33:10 -04:00
parent dd6ecf9bec
commit f6c9b0eea3
26 changed files with 377 additions and 522 deletions
+5 -6
View File
@@ -30,11 +30,10 @@ namespace epics { namespace pvData {
virtual void deserialize(ByteBuffer *pbuffer,DeserializableControl *pflusher);
virtual void serialize(ByteBuffer *pbuffer,
SerializableControl *pflusher, int offset, int count) const;
virtual void toString(StringPtr buf)const;
virtual void toString(StringPtr buf,int indentLevel)const;
virtual void toString(StringBuilder buf)const;
virtual void toString(StringBuilder buf,int indentLevel)const;
private:
BasePVDoubleArray(); // not implemented
DoubleArrayPtr doubleArray;
double *doubleArray;
};
BasePVDoubleArray::BasePVDoubleArray(PVStructure *parent,
@@ -88,12 +87,12 @@ namespace epics { namespace pvData {
throw std::logic_error(notImplemented);
}
void BasePVDoubleArray::toString(StringPtr buf)const
void BasePVDoubleArray::toString(StringBuilder buf)const
{
toString(buf,1);
}
void BasePVDoubleArray::toString(StringPtr buf,int indentLevel)const
void BasePVDoubleArray::toString(StringBuilder buf,int indentLevel)const
{
convert->getString(buf,this,indentLevel);
PVArray::toString(buf,indentLevel);