diff --git a/pvDataApp/factory/Convert.cpp b/pvDataApp/factory/Convert.cpp index a6efd37..6d84581 100644 --- a/pvDataApp/factory/Convert.cpp +++ b/pvDataApp/factory/Convert.cpp @@ -22,14 +22,12 @@ using std::size_t; namespace epics { namespace pvData { -static PVDataCreatePtr pvDataCreate; -static String trueString("true"); -static String falseString("false"); -static String logicError("Logic error. Should never get here."); -static String illegalScalarType("Illegal ScalarType"); - -static ConvertPtr convert; +static void newLineImpl(StringBuilder buffer, int indentLevel) +{ + *buffer += "\n"; + for(int i=0; i T toScalar(PVScalarPtr const &pv) @@ -82,7 +80,7 @@ T toScalar(PVScalarPtr const &pv) case pvString: throw std::logic_error(String("string can not be converted to byte")); } - throw std::logic_error(logicError); + throw std::logic_error("Logic error. Should never get here."); } int8 Convert::toByte(PVScalarPtr const & pv) @@ -278,7 +276,7 @@ void fromScalar(PVScalarPtr const &pv,T from) return; } } - throw std::logic_error(logicError); + throw std::logic_error("Logic error. Should never get here."); } void Convert::fromByte(PVScalarPtr const &pv,int8 from) @@ -412,7 +410,14 @@ static std::vector split(String commaSeparatedList) { return valueList; } -Convert::Convert(){} +Convert::Convert() +: pvDataCreate(getPVDataCreate()), + trueString("true"), + falseString("false"), + illegalScalarType("Illegal ScalarType") +{} + + Convert::~Convert(){} @@ -1151,7 +1156,7 @@ String Convert::toString(PVScalarPtr const & pv) return value->get(); } } - throw std::logic_error(logicError); + throw std::logic_error("Logic error. Should never get here."); } size_t Convert::toByteArray(PVScalarArrayPtr const &pv, size_t offset, size_t length, @@ -1336,8 +1341,7 @@ size_t Convert::fromDoubleArray(PVScalarArrayPtr &pv, size_t offset, size_t leng void Convert::newLine(StringBuilder buffer, int indentLevel) { - *buffer += "\n"; - for(int i=0; iget(offset + i, 1, data) == 1) { BooleanArray dataArray = data.data; bool value = dataArray[data.offset]; - to[toOffset + i] = value ? trueString : falseString; + to[toOffset + i] = value ? "true" : "false"; } else { to[toOffset + i] = "bad pv"; } @@ -2710,7 +2714,7 @@ void convertStructure(StringBuilder buffer,PVStructure const *data,int indentLev if (fieldsData.size() != 0) { int length = data->getStructure()->getNumberFields(); for(int i=0; inewLine(buffer, indentLevel+1); + newLineImpl(buffer, indentLevel+1); PVFieldPtr fieldField = fieldsData[i]; fieldField->toString(buffer,indentLevel + 1); } @@ -2976,7 +2980,7 @@ void convertStructureArray(StringBuilder buffer, StructureArrayData data = StructureArrayData(); pvdata->get(0, length, data); for (size_t i = 0; i < length; i++) { - convert->newLine(buffer, indentLevel + 1); + newLineImpl(buffer, indentLevel + 1); PVStructurePtr pvStructure = data.data[i]; if (pvStructure.get() == 0) { *buffer += "null"; @@ -3314,12 +3318,12 @@ size_t copyNumericArray(PVScalarArray *from, size_t offset, PVScalarArray *to, s ConvertPtr Convert::getConvert() { + static ConvertPtr convert; static Mutex mutex; Lock xx(mutex); if(convert.get()==0) { convert = ConvertPtr(new Convert()); - pvDataCreate = getPVDataCreate(); } return convert; } diff --git a/pvDataApp/factory/FieldCreateFactory.cpp b/pvDataApp/factory/FieldCreateFactory.cpp index 58fc47c..976a091 100644 --- a/pvDataApp/factory/FieldCreateFactory.cpp +++ b/pvDataApp/factory/FieldCreateFactory.cpp @@ -74,7 +74,10 @@ void Scalar::toString(StringBuilder buffer,int indentLevel) const{ *buffer += getID(); } -static const String idScalarLUT[] = { + +String Scalar::getID() const +{ + static const String idScalarLUT[] = { "boolean", // pvBoolean "byte", // pvByte "short", // pvShort @@ -87,31 +90,33 @@ static const String idScalarLUT[] = { "float", // pvFloat "double", // pvDouble "string" // pvString -}; - -String Scalar::getID() const -{ + }; return idScalarLUT[scalarType]; } -static const int8 typeCodeLUT[] = { - 0x00, // pvBoolean - 0x20, // pvByte - 0x21, // pvShort - 0x22, // pvInt - 0x23, // pvLong - 0x28, // pvUByte - 0x29, // pvUShort - 0x2A, // pvUInt - 0x2B, // pvULong - 0x42, // pvFloat - 0x43, // pvDouble - 0x60 // pvString -}; +const int8 Scalar::getTypeCodeLUT() const +{ + static const int8 typeCodeLUT[] = { + 0x00, // pvBoolean + 0x20, // pvByte + 0x21, // pvShort + 0x22, // pvInt + 0x23, // pvLong + 0x28, // pvUByte + 0x29, // pvUShort + 0x2A, // pvUInt + 0x2B, // pvULong + 0x42, // pvFloat + 0x43, // pvDouble + 0x60 // pvString + }; + return typeCodeLUT[scalarType]; +} + void Scalar::serialize(ByteBuffer *buffer, SerializableControl *control) const { control->ensureBuffer(1); - buffer->putByte(typeCodeLUT[scalarType]); + buffer->putByte(getTypeCodeLUT()); } void Scalar::deserialize(ByteBuffer *buffer, DeserializableControl *control) { @@ -153,7 +158,28 @@ ScalarArray::ScalarArray(ScalarType elementType) ScalarArray::~ScalarArray() {} -static const String idScalarArrayLUT[] = { +const int8 ScalarArray::getTypeCodeLUT() const +{ + static const int8 typeCodeLUT[] = { + 0x00, // pvBoolean + 0x20, // pvByte + 0x21, // pvShort + 0x22, // pvInt + 0x23, // pvLong + 0x28, // pvUByte + 0x29, // pvUShort + 0x2A, // pvUInt + 0x2B, // pvULong + 0x42, // pvFloat + 0x43, // pvDouble + 0x60 // pvString + }; + return typeCodeLUT[elementType]; +} + +const String ScalarArray::getIDScalarArrayLUT() const +{ + static const String idScalarArrayLUT[] = { "boolean[]", // pvBoolean "byte[]", // pvByte "short[]", // pvShort @@ -166,11 +192,13 @@ static const String idScalarArrayLUT[] = { "float[]", // pvFloat "double[]", // pvDouble "string[]" // pvString -}; + }; + return idScalarArrayLUT[elementType]; +} String ScalarArray::getID() const { - return idScalarArrayLUT[elementType]; + return getIDScalarArrayLUT(); } void ScalarArray::toString(StringBuilder buffer,int indentLevel) const{ @@ -179,7 +207,7 @@ void ScalarArray::toString(StringBuilder buffer,int indentLevel) const{ void ScalarArray::serialize(ByteBuffer *buffer, SerializableControl *control) const { control->ensureBuffer(1); - buffer->putByte(0x10 | typeCodeLUT[elementType]); + buffer->putByte(0x10 | getTypeCodeLUT()); } void ScalarArray::deserialize(ByteBuffer *buffer, DeserializableControl *control) { @@ -398,51 +426,47 @@ StructureConstPtr FieldCreate::appendFields( } - - - -static const int integerLUT[] = -{ - pvByte, // 8-bits - pvShort, // 16-bits - pvInt, // 32-bits - pvLong, // 64-bits - -1, - -1, - -1, - -1, - pvUByte, // unsigned 8-bits - pvUShort, // unsigned 16-bits - pvUInt, // unsigned 32-bits - pvULong, // unsigned 64-bits - -1, - -1, - -1, - -1 -}; - -static const int floatLUT[] = -{ - -1, // reserved - -1, // 16-bits - pvFloat, // 32-bits - pvDouble, // 64-bits - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1 -}; - static int decodeScalar(int8 code) { + static const int integerLUT[] = + { + pvByte, // 8-bits + pvShort, // 16-bits + pvInt, // 32-bits + pvLong, // 64-bits + -1, + -1, + -1, + -1, + pvUByte, // unsigned 8-bits + pvUShort, // unsigned 16-bits + pvUInt, // unsigned 32-bits + pvULong, // unsigned 64-bits + -1, + -1, + -1, + -1 + }; + + static const int floatLUT[] = + { + -1, // reserved + -1, // 16-bits + pvFloat, // 32-bits + pvDouble, // 64-bits + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1 + }; // bits 7-5 switch (code >> 5) { diff --git a/pvDataApp/factory/PVAuxInfoImpl.cpp b/pvDataApp/factory/PVAuxInfoImpl.cpp index 00f7d59..e0885fc 100644 --- a/pvDataApp/factory/PVAuxInfoImpl.cpp +++ b/pvDataApp/factory/PVAuxInfoImpl.cpp @@ -19,8 +19,6 @@ namespace epics { namespace pvData { -static PVScalarPtr nullPVScalar; - PVAuxInfo::PVAuxInfo(PVField * pvField) : pvField(pvField), diff --git a/pvDataApp/factory/PVDataCreateFactory.cpp b/pvDataApp/factory/PVDataCreateFactory.cpp index cb24828..0cf7cb9 100644 --- a/pvDataApp/factory/PVDataCreateFactory.cpp +++ b/pvDataApp/factory/PVDataCreateFactory.cpp @@ -27,8 +27,6 @@ using std::min; namespace epics { namespace pvData { -static ConvertPtr convert = getConvert(); -static FieldCreatePtr fieldCreate = getFieldCreate(); /** Default storage for scalar values */ @@ -455,7 +453,9 @@ typedef DefaultPVArray BasePVStringArray; // Factory -PVDataCreate::PVDataCreate(){ } +PVDataCreate::PVDataCreate() +: fieldCreate(getFieldCreate()) +{ } PVFieldPtr PVDataCreate::createPVField(FieldConstPtr const & field) { @@ -509,7 +509,7 @@ PVFieldPtr PVDataCreate::createPVField(PVFieldPtr const & fieldToClone) StructureArrayConstPtr structureArray = from->getStructureArray(); PVStructureArrayPtr to = createPVStructureArray( structureArray); - convert->copyStructureArray(from, to); + getConvert()->copyStructureArray(from, to); return to; } } @@ -559,7 +559,7 @@ PVScalarPtr PVDataCreate::createPVScalar(PVScalarPtr const & scalarToClone) { ScalarType scalarType = scalarToClone->getScalar()->getScalarType(); PVScalarPtr pvScalar = createPVScalar(scalarType); - convert->copyScalar(scalarToClone, pvScalar); + getConvert()->copyScalar(scalarToClone, pvScalar); PVAuxInfoPtr from = scalarToClone->getPVAuxInfo(); PVAuxInfoPtr to = pvScalar->getPVAuxInfo(); PVAuxInfo::PVInfoMap & map = from->getInfoMap(); @@ -568,7 +568,7 @@ PVScalarPtr PVDataCreate::createPVScalar(PVScalarPtr const & scalarToClone) PVScalarPtr pvFrom = iter->second; ScalarConstPtr scalar = pvFrom->getScalar(); PVScalarPtr pvTo = to->createInfo(key,scalar->getScalarType()); - convert->copyScalar(pvFrom,pvTo); + getConvert()->copyScalar(pvFrom,pvTo); } return pvScalar; } @@ -618,7 +618,7 @@ PVScalarArrayPtr PVDataCreate::createPVScalarArray( { PVScalarArrayPtr pvArray = createPVScalarArray( arrayToClone->getScalarArray()->getElementType()); - convert->copyScalarArray(arrayToClone,0, pvArray,0,arrayToClone->getLength()); + getConvert()->copyScalarArray(arrayToClone,0, pvArray,0,arrayToClone->getLength()); PVAuxInfoPtr from = arrayToClone->getPVAuxInfo(); PVAuxInfoPtr to = pvArray->getPVAuxInfo(); PVAuxInfo::PVInfoMap & map = from->getInfoMap(); @@ -627,7 +627,7 @@ PVScalarArrayPtr PVDataCreate::createPVScalarArray( PVScalarPtr pvFrom = iter->second; ScalarConstPtr scalar = pvFrom->getScalar(); PVScalarPtr pvTo = to->createInfo(key,scalar->getScalarType()); - convert->copyScalar(pvFrom,pvTo); + getConvert()->copyScalar(pvFrom,pvTo); } return pvArray; } @@ -666,7 +666,7 @@ PVStructurePtr PVDataCreate::createPVStructure(PVStructurePtr const & structToCl } StructureConstPtr structure = structToClone->getStructure(); PVStructurePtr pvStructure(new PVStructure(structure)); - convert->copyStructure(structToClone,pvStructure); + getConvert()->copyStructure(structToClone,pvStructure); return pvStructure; } diff --git a/pvDataApp/factory/PVField.cpp b/pvDataApp/factory/PVField.cpp index 00b64c0..c3526f3 100644 --- a/pvDataApp/factory/PVField.cpp +++ b/pvDataApp/factory/PVField.cpp @@ -21,11 +21,10 @@ using std::size_t; namespace epics { namespace pvData { -static String notImplemented("not implemented"); - PVField::PVField(FieldConstPtr field) -: parent(NULL),field(field), +: notImplemented("not implemented"), + parent(NULL),field(field), fieldOffset(0), nextFieldOffset(0), immutable(false), convert(getConvert()) diff --git a/pvDataApp/factory/PVStructure.cpp b/pvDataApp/factory/PVStructure.cpp index 3cddd68..7e5b0a7 100644 --- a/pvDataApp/factory/PVStructure.cpp +++ b/pvDataApp/factory/PVStructure.cpp @@ -23,22 +23,22 @@ using std::size_t; namespace epics { namespace pvData { -static PVFieldPtr nullPVField; -static PVBooleanPtr nullPVBoolean; -static PVBytePtr nullPVByte; -static PVShortPtr nullPVShort; -static PVIntPtr nullPVInt; -static PVLongPtr nullPVLong; -static PVUBytePtr nullPVUByte; -static PVUShortPtr nullPVUShort; -static PVUIntPtr nullPVUInt; -static PVULongPtr nullPVULong; -static PVFloatPtr nullPVFloat; -static PVDoublePtr nullPVDouble; -static PVStringPtr nullPVString; -static PVStructurePtr nullPVStructure; -static PVStructureArrayPtr nullPVStructureArray; -static PVScalarArrayPtr nullPVScalarArray; +PVFieldPtr PVStructure::nullPVField; +PVBooleanPtr PVStructure::nullPVBoolean; +PVBytePtr PVStructure::nullPVByte; +PVShortPtr PVStructure::nullPVShort; +PVIntPtr PVStructure::nullPVInt; +PVLongPtr PVStructure::nullPVLong; +PVUBytePtr PVStructure::nullPVUByte; +PVUShortPtr PVStructure::nullPVUShort; +PVUIntPtr PVStructure::nullPVUInt; +PVULongPtr PVStructure::nullPVULong; +PVFloatPtr PVStructure::nullPVFloat; +PVDoublePtr PVStructure::nullPVDouble; +PVStringPtr PVStructure::nullPVString; +PVStructurePtr PVStructure::nullPVStructure; +PVStructureArrayPtr PVStructure::nullPVStructureArray; +PVScalarArrayPtr PVStructure::nullPVScalarArray; static PVFieldPtr findSubField( String const &fieldName, @@ -649,7 +649,7 @@ static PVFieldPtr findSubField( String const & fieldName, PVStructure const *pvStructure) { - if( fieldName.length()<1) return nullPVField; + if( fieldName.length()<1) return PVFieldPtr(); String::size_type index = fieldName.find('.'); String name = fieldName; String restOfName = String(); @@ -667,13 +667,13 @@ static PVFieldPtr findSubField( size_t result = pvField->getFieldName().compare(name); if(result==0) { if(restOfName.length()==0) return pvFields[i]; - if(pvField->getField()->getType()!=structure) return nullPVField; + if(pvField->getField()->getType()!=structure) return PVFieldPtr(); PVStructurePtr pvStructure = std::tr1::static_pointer_cast(pvField); return findSubField(restOfName,pvStructure.get()); } } - return nullPVField; + return PVFieldPtr(); } }} diff --git a/pvDataApp/factory/StandardPVField.cpp b/pvDataApp/factory/StandardPVField.cpp index b6f2367..c497c8e 100644 --- a/pvDataApp/factory/StandardPVField.cpp +++ b/pvDataApp/factory/StandardPVField.cpp @@ -20,14 +20,12 @@ namespace epics { namespace pvData { -static StandardFieldPtr standardField; -static FieldCreatePtr fieldCreate; -static PVDataCreatePtr pvDataCreate; - - -static String notImplemented("not implemented"); - -StandardPVField::StandardPVField(){} +StandardPVField::StandardPVField() +: standardField(getStandardField()), + fieldCreate(getFieldCreate()), + pvDataCreate(getPVDataCreate()), + notImplemented("not implemented") +{} StandardPVField::~StandardPVField(){} @@ -91,9 +89,6 @@ StandardPVFieldPtr StandardPVField::getStandardPVField() Lock xx(mutex); if(standardPVField.get()==NULL) { - standardField = getStandardField(); - fieldCreate = getFieldCreate(); - pvDataCreate = getPVDataCreate(); standardPVField= StandardPVFieldPtr(new StandardPVField()); } return standardPVField; diff --git a/pvDataApp/misc/event.cpp b/pvDataApp/misc/event.cpp index 49c2266..eac5dac 100644 --- a/pvDataApp/misc/event.cpp +++ b/pvDataApp/misc/event.cpp @@ -26,7 +26,6 @@ namespace epics { namespace pvData { -static String alreadyOn("already on list"); Event::~Event() { epicsEventDestroy(id); @@ -35,7 +34,8 @@ Event::~Event() { Event::Event(bool full) -: id(epicsEventCreate(full?epicsEventFull : epicsEventEmpty)) +: id(epicsEventCreate(full?epicsEventFull : epicsEventEmpty)), + alreadyOn("already on list") { } diff --git a/pvDataApp/misc/event.h b/pvDataApp/misc/event.h index 4581edb..a7f5bc1 100644 --- a/pvDataApp/misc/event.h +++ b/pvDataApp/misc/event.h @@ -31,6 +31,7 @@ public: bool tryWait (); /* false if empty */ private: epicsEventId id; + String alreadyOn; }; }} diff --git a/pvDataApp/property/pvAlarm.cpp b/pvDataApp/property/pvAlarm.cpp index 8f7f01c..bedd134 100644 --- a/pvDataApp/property/pvAlarm.cpp +++ b/pvDataApp/property/pvAlarm.cpp @@ -17,8 +17,8 @@ namespace epics { namespace pvData { using std::tr1::static_pointer_cast; -static String noAlarmFound("No alarm structure found"); -static String notAttached("Not attached to an alarm structure"); +String PVAlarm::noAlarmFound("No alarm structure found"); +String PVAlarm::notAttached("Not attached to an alarm structure"); bool PVAlarm::attach(PVFieldPtr const & pvField) { diff --git a/pvDataApp/property/pvAlarm.h b/pvDataApp/property/pvAlarm.h index 89b38d4..b9c5127 100644 --- a/pvDataApp/property/pvAlarm.h +++ b/pvDataApp/property/pvAlarm.h @@ -33,6 +33,8 @@ private: PVIntPtr pvSeverity; PVIntPtr pvStatus; PVStringPtr pvMessage; + static String noAlarmFound; + static String notAttached; }; }} diff --git a/pvDataApp/property/pvControl.cpp b/pvDataApp/property/pvControl.cpp index 86c7f87..333632c 100644 --- a/pvDataApp/property/pvControl.cpp +++ b/pvDataApp/property/pvControl.cpp @@ -17,8 +17,8 @@ namespace epics { namespace pvData { using std::tr1::static_pointer_cast; -static String noControlFound("No control structure found"); -static String notAttached("Not attached to an control structure"); +String PVControl::noControlFound("No control structure found"); +String PVControl::notAttached("Not attached to an control structure"); bool PVControl::attach(PVFieldPtr const & pvField) { diff --git a/pvDataApp/property/pvControl.h b/pvDataApp/property/pvControl.h index 9aa5033..9a0ba19 100644 --- a/pvDataApp/property/pvControl.h +++ b/pvDataApp/property/pvControl.h @@ -29,6 +29,8 @@ public: private: PVDoublePtr pvLow; PVDoublePtr pvHigh; + static String noControlFound; + static String notAttached; }; }} diff --git a/pvDataApp/property/pvDisplay.cpp b/pvDataApp/property/pvDisplay.cpp index 03c9413..c1cc2f0 100644 --- a/pvDataApp/property/pvDisplay.cpp +++ b/pvDataApp/property/pvDisplay.cpp @@ -17,8 +17,8 @@ namespace epics { namespace pvData { using std::tr1::static_pointer_cast; -static String noDisplayFound("No display structure found"); -static String notAttached("Not attached to an display structure"); +String PVDisplay::noDisplayFound("No display structure found"); +String PVDisplay::notAttached("Not attached to an display structure"); bool PVDisplay::attach(PVFieldPtr const & pvField) { diff --git a/pvDataApp/property/pvDisplay.h b/pvDataApp/property/pvDisplay.h index dbacb7f..5767e02 100644 --- a/pvDataApp/property/pvDisplay.h +++ b/pvDataApp/property/pvDisplay.h @@ -28,6 +28,8 @@ public: void get(Display &) const; bool set(Display const & display); private: + static String noDisplayFound; + static String notAttached; PVStringPtr pvDescription; PVStringPtr pvFormat; PVStringPtr pvUnits; diff --git a/pvDataApp/property/pvEnumerated.cpp b/pvDataApp/property/pvEnumerated.cpp index b950aa6..1923c99 100644 --- a/pvDataApp/property/pvEnumerated.cpp +++ b/pvDataApp/property/pvEnumerated.cpp @@ -17,8 +17,8 @@ namespace epics { namespace pvData { using std::tr1::static_pointer_cast; -static String notFound("No enumerated structure found"); -static String notAttached("Not attached to an enumerated structure"); +String PVEnumerated::notFound("No enumerated structure found"); +String PVEnumerated::notAttached("Not attached to an enumerated structure"); bool PVEnumerated::attach(PVFieldPtr const & pvField) { diff --git a/pvDataApp/property/pvEnumerated.h b/pvDataApp/property/pvEnumerated.h index ae55220..9cb9cb6 100644 --- a/pvDataApp/property/pvEnumerated.h +++ b/pvDataApp/property/pvEnumerated.h @@ -34,6 +34,8 @@ public: int32 getNumberChoices(); bool setChoices(StringArray & choices); private: + static String notFound; + static String notAttached; PVIntPtr pvIndex; PVStringArrayPtr pvChoices; }; diff --git a/pvDataApp/property/pvTimeStamp.cpp b/pvDataApp/property/pvTimeStamp.cpp index f14e835..174c060 100644 --- a/pvDataApp/property/pvTimeStamp.cpp +++ b/pvDataApp/property/pvTimeStamp.cpp @@ -17,8 +17,8 @@ namespace epics { namespace pvData { using std::tr1::static_pointer_cast; -static String noTimeStamp("No timeStamp structure found"); -static String notAttached("Not attached to a timeStamp structure"); +String PVTimeStamp::noTimeStamp("No timeStamp structure found"); +String PVTimeStamp::notAttached("Not attached to a timeStamp structure"); bool PVTimeStamp::attach(PVFieldPtr const & pvField) { diff --git a/pvDataApp/property/pvTimeStamp.h b/pvDataApp/property/pvTimeStamp.h index 343fa0e..5d6f73b 100644 --- a/pvDataApp/property/pvTimeStamp.h +++ b/pvDataApp/property/pvTimeStamp.h @@ -31,6 +31,8 @@ public: void get(TimeStamp &) const; bool set(TimeStamp const & timeStamp); private: + static String noTimeStamp; + static String notAttached; PVLongPtr pvSecs; PVIntPtr pvUserTag; PVIntPtr pvNano; diff --git a/pvDataApp/pv/convert.h b/pvDataApp/pv/convert.h index 795f578..266aab2 100644 --- a/pvDataApp/pv/convert.h +++ b/pvDataApp/pv/convert.h @@ -756,6 +756,10 @@ public: void newLine(StringBuilder buf, int indentLevel); private: Convert(); + PVDataCreatePtr pvDataCreate; + String trueString; + String falseString; + String illegalScalarType; }; extern ConvertPtr getConvert(); diff --git a/pvDataApp/pv/pvData.h b/pvDataApp/pv/pvData.h index d30617b..e9ff04f 100644 --- a/pvDataApp/pv/pvData.h +++ b/pvDataApp/pv/pvData.h @@ -131,6 +131,7 @@ public: */ void toString(StringBuilder buf,int indentLevel); private: + PVScalarPtr nullPVScalar; PVField * pvField; PVInfoMap pvInfos; friend class PVDataCreate; @@ -289,6 +290,7 @@ private: void message(String message,MessageType messageType,String fullFieldName); static void computeOffset(const PVField *pvField); static void computeOffset(const PVField *pvField,std::size_t offset); + String notImplemented; PVAuxInfoPtr pvAuxInfo; String fieldName; PVStructure *parent; @@ -814,6 +816,23 @@ public: */ PVStructure(StructureConstPtr const & structure,PVFieldPtrArray const & pvFields); private: + static PVFieldPtr nullPVField; + static PVBooleanPtr nullPVBoolean; + static PVBytePtr nullPVByte; + static PVShortPtr nullPVShort; + static PVIntPtr nullPVInt; + static PVLongPtr nullPVLong; + static PVUBytePtr nullPVUByte; + static PVUShortPtr nullPVUShort; + static PVUIntPtr nullPVUInt; + static PVULongPtr nullPVULong; + static PVFloatPtr nullPVFloat; + static PVDoublePtr nullPVDouble; + static PVStringPtr nullPVString; + static PVStructurePtr nullPVStructure; + static PVStructureArrayPtr nullPVStructureArray; + static PVScalarArrayPtr nullPVScalarArray; + PVFieldPtrArray pvFields; StructureConstPtr structurePtr; String extendsStructureName; @@ -1051,6 +1070,7 @@ public: PVStructurePtr createPVStructure(PVStructurePtr const & structToClone); private: PVDataCreate(); + FieldCreatePtr fieldCreate; }; /** diff --git a/pvDataApp/pv/pvIntrospect.h b/pvDataApp/pv/pvIntrospect.h index 450b599..e6d2ce9 100644 --- a/pvDataApp/pv/pvIntrospect.h +++ b/pvDataApp/pv/pvIntrospect.h @@ -283,6 +283,7 @@ public: protected: Scalar(ScalarType scalarType); private: + const int8 getTypeCodeLUT() const; ScalarType scalarType; friend class FieldCreate; }; @@ -329,6 +330,8 @@ protected: */ virtual ~ScalarArray(); private: + const int8 getTypeCodeLUT() const; + const String getIDScalarArrayLUT() const; ScalarType elementType; friend class FieldCreate; }; diff --git a/pvDataApp/pv/standardPVField.h b/pvDataApp/pv/standardPVField.h index 7faa028..3a32821 100644 --- a/pvDataApp/pv/standardPVField.h +++ b/pvDataApp/pv/standardPVField.h @@ -41,6 +41,10 @@ public: PVStructurePtr enumerated(StringArray const &choices, String const & properties); private: StandardPVField(); + StandardFieldPtr standardField; + FieldCreatePtr fieldCreate; + PVDataCreatePtr pvDataCreate; + String notImplemented; }; extern StandardPVFieldPtr getStandardPVField();