remove Convert pointer from PVField
Allow inline construction of Convert
This commit is contained in:
@@ -43,13 +43,6 @@ static std::vector<String> split(String commaSeparatedList) {
|
||||
}
|
||||
return valueList;
|
||||
}
|
||||
|
||||
Convert::Convert()
|
||||
{}
|
||||
|
||||
|
||||
|
||||
Convert::~Convert(){}
|
||||
|
||||
void Convert::getString(StringBuilder buf,PVField const *pvField,int indentLevel)
|
||||
{
|
||||
|
||||
@@ -26,8 +26,7 @@ PVField::PVField(FieldConstPtr field)
|
||||
: notImplemented("not implemented"),
|
||||
parent(NULL),field(field),
|
||||
fieldOffset(0), nextFieldOffset(0),
|
||||
immutable(false),
|
||||
convert(getConvert())
|
||||
immutable(false)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -175,7 +174,7 @@ void PVField::setParentAndName(PVStructure * xxx,String const & name)
|
||||
|
||||
bool PVField::equals(PVField &pv)
|
||||
{
|
||||
return convert->equals(*this,pv);
|
||||
return pv==*this;
|
||||
}
|
||||
|
||||
void PVField::toString(StringBuilder buf)
|
||||
@@ -185,7 +184,7 @@ void PVField::toString(StringBuilder buf)
|
||||
|
||||
void PVField::toString(StringBuilder buf,int indentLevel)
|
||||
{
|
||||
convert->getString(buf,this,indentLevel);
|
||||
Convert().getString(buf,this,indentLevel);
|
||||
if(pvAuxInfo.get()!=NULL) pvAuxInfo->toString(buf,indentLevel);
|
||||
}
|
||||
|
||||
|
||||
@@ -71,7 +71,6 @@ typedef std::tr1::shared_ptr<Convert> ConvertPtr;
|
||||
class Convert {
|
||||
public:
|
||||
static ConvertPtr getConvert();
|
||||
~Convert();
|
||||
/**
|
||||
* Get the full fieldName for the pvField.
|
||||
* @param builder The builder that will have the result.
|
||||
@@ -817,8 +816,6 @@ public:
|
||||
* @param indentLevel Indent level, Each level is four spaces.
|
||||
*/
|
||||
void newLine(StringBuilder buf, int indentLevel);
|
||||
private:
|
||||
Convert();
|
||||
};
|
||||
|
||||
static inline ConvertPtr getConvert() { return Convert::getConvert(); }
|
||||
|
||||
@@ -373,7 +373,6 @@ private:
|
||||
bool immutable;
|
||||
RequesterPtr requester;
|
||||
PostHandlerPtr postHandler;
|
||||
std::tr1::shared_ptr<class Convert> convert;
|
||||
friend class PVDataCreate;
|
||||
friend class PVStructure;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user