From ddebd494c692d2094060d11c971961bb3a548fb5 Mon Sep 17 00:00:00 2001 From: Dave Hickin Date: Tue, 28 Jul 2015 17:45:26 +0100 Subject: [PATCH] Remove deprecated PVStructure::get*Field Functions Remove the deprecated functions such as getIntField in PVStructure, whose usage has been replaced by that of the template getSubField function and which are now no longer called anywhere. --- src/factory/PVStructure.cpp | 95 ---------------------------- src/pv/pvData.h | 122 ------------------------------------ 2 files changed, 217 deletions(-) diff --git a/src/factory/PVStructure.cpp b/src/factory/PVStructure.cpp index a7996b7..b3cdc66 100644 --- a/src/factory/PVStructure.cpp +++ b/src/factory/PVStructure.cpp @@ -242,101 +242,6 @@ PVField* PVStructure::getSubFieldImpl(const char *name, bool throws) const } -PVBooleanPtr PVStructure::getBooleanField(string const &fieldName) -{ - return getSubField(fieldName); -} - -PVBytePtr PVStructure::getByteField(string const &fieldName) -{ - return getSubField(fieldName); -} - -PVShortPtr PVStructure::getShortField(string const &fieldName) -{ - return getSubField(fieldName); -} - -PVIntPtr PVStructure::getIntField(string const &fieldName) -{ - return getSubField(fieldName); -} - -PVLongPtr PVStructure::getLongField(string const &fieldName) -{ - return getSubField(fieldName); -} - -PVUBytePtr PVStructure::getUByteField(string const &fieldName) -{ - return getSubField(fieldName); -} - -PVUShortPtr PVStructure::getUShortField(string const &fieldName) -{ - return getSubField(fieldName); -} - -PVUIntPtr PVStructure::getUIntField(string const &fieldName) -{ - return getSubField(fieldName); -} - -PVULongPtr PVStructure::getULongField(string const &fieldName) -{ - return getSubField(fieldName); -} - -PVFloatPtr PVStructure::getFloatField(string const &fieldName) -{ - return getSubField(fieldName); -} - -PVDoublePtr PVStructure::getDoubleField(string const &fieldName) -{ - return getSubField(fieldName); -} - -PVStringPtr PVStructure::getStringField(string const &fieldName) -{ - return getSubField(fieldName); -} - -PVStructurePtr PVStructure::getStructureField(string const &fieldName) -{ - return getSubField(fieldName); -} - -PVUnionPtr PVStructure::getUnionField(string const &fieldName) -{ - return getSubField(fieldName); -} - -PVScalarArrayPtr PVStructure::getScalarArrayField( - string const &fieldName,ScalarType elementType) -{ - PVScalarArrayPtr arrayField = getSubField(fieldName); - if (arrayField.get() && - arrayField->getScalarArray()->getElementType()!=elementType) - { - return nullPVScalarArray; - } - return arrayField; -} - -PVStructureArrayPtr PVStructure::getStructureArrayField( - string const &fieldName) -{ - return getSubField(fieldName); -} - -PVUnionArrayPtr PVStructure::getUnionArrayField( - string const &fieldName) -{ - return getSubField(fieldName); -} - - void PVStructure::serialize(ByteBuffer *pbuffer, SerializableControl *pflusher) const { size_t fieldsSize = pvFields.size(); diff --git a/src/pv/pvData.h b/src/pv/pvData.h index 30f8ef7..51d667f 100644 --- a/src/pv/pvData.h +++ b/src/pv/pvData.h @@ -801,128 +801,6 @@ public: } } - /** - * Get a boolean field with the specified name. - * @deprecated No longer needed. Use template version of getSubField - * @param fieldName The name of the field to get. - * @return Pointer to the field of null if a field with that name and type does not exist. - */ - PVBooleanPtr getBooleanField(std::string const &fieldName) USAGE_DEPRECATED; - /** - * Get a byte field with the specified name. - * @deprecated No longer needed. Use template version of getSubField - * @param fieldName The name of the field to get. - * @return Pointer to the field of null if a field with that name and type does not exist. - */ - PVBytePtr getByteField(std::string const &fieldName) USAGE_DEPRECATED; - /** - * Get a short field with the specified name. - * @deprecated No longer needed. Use template version of getSubField - * @param fieldName The name of the field to get. - * @return Pointer to the field of null if a field with that name and type does not exist. - */ - PVShortPtr getShortField(std::string const &fieldName) USAGE_DEPRECATED; - /** - * Get a int field with the specified name. - * @deprecated No longer needed. Use template version of getSubField - * @param fieldName The name of the field to get. - * @return Pointer to the field of null if a field with that name and type does not exist. - */ - PVIntPtr getIntField(std::string const &fieldName) USAGE_DEPRECATED; - /** - * Get a long field with the specified name. - * @deprecated No longer needed. Use template version of getSubField - * @param fieldName The name of the field to get. - * @return Pointer to the field of null if a field with that name and type does not exist. - */ - PVLongPtr getLongField(std::string const &fieldName) USAGE_DEPRECATED; - /** - * Get an unsigned byte field with the specified name. - * @deprecated No longer needed. Use template version of getSubField - * @param fieldName The name of the field to get. - * @return Pointer to the field of null if a field with that name and type does not exist. - */ - PVUBytePtr getUByteField(std::string const &fieldName) USAGE_DEPRECATED; - /** - * Get an unsigned short field with the specified name. - * @deprecated No longer needed. Use template version of getSubField - * @param fieldName The name of the field to get. - * @return Pointer to the field of null if a field with that name and type does not exist. - */ - PVUShortPtr getUShortField(std::string const &fieldName) USAGE_DEPRECATED; - /** - * Get an unsigned int field with the specified name. - * @deprecated No longer needed. Use template version of getSubField - * @param fieldName The name of the field to get. - * @return Pointer to the field of null if a field with that name and type does not exist. - */ - PVUIntPtr getUIntField(std::string const &fieldName) USAGE_DEPRECATED; - /** - * Get an unsigned long field with the specified name. - * @deprecated No longer needed. Use template version of getSubField - * @param fieldName The name of the field to get. - * @return Pointer to the field of null if a field with that name and type does not exist. - */ - PVULongPtr getULongField(std::string const &fieldName) USAGE_DEPRECATED; - /** - * Get a float field with the specified name. - * @deprecated No longer needed. Use template version of getSubField - * @param fieldName The name of the field to get. - * @return Pointer to the field of null if a field with that name and type does not exist. - */ - PVFloatPtr getFloatField(std::string const &fieldName) USAGE_DEPRECATED; - /** - * Get a double field with the specified name. - * @deprecated No longer needed. Use template version of getSubField - * @param fieldName The name of the field to get. - * @return Pointer to the field of null if a field with that name and type does not exist. - */ - PVDoublePtr getDoubleField(std::string const &fieldName) USAGE_DEPRECATED; - /** - * Get a string field with the specified name. - * @deprecated No longer needed. Use template version of getSubField - * @param fieldName The name of the field to get. - * @return Pointer to the field of null if a field with that name and type does not exist. - */ - PVStringPtr getStringField(std::string const &fieldName) USAGE_DEPRECATED; - - /** - * Get a structure field with the specified name. - * @deprecated No longer needed. Use template version of getSubField - * @param fieldName The name of the field to get. - * @return Pointer to the field of null if a field with that name and type does not exist. - */ - PVStructurePtr getStructureField(std::string const &fieldName) USAGE_DEPRECATED; - /** - * Get a union field with the specified name. - * @deprecated No longer needed. Use template version of getSubField - * @param fieldName The name of the field to get. - * @return Pointer to the field of null if a field with that name and type does not exist. - */ - PVUnionPtr getUnionField(std::string const &fieldName) USAGE_DEPRECATED; - /** - * Get a scalarArray field with the specified name. - * @deprecated No longer needed. Use template version of getSubField - * @param fieldName The name of the field to get. - * @param elementType The element type. - * @return Pointer to the field of null if a field with that name and type does not exist. - */ - PVScalarArrayPtr getScalarArrayField( - std::string const &fieldName,ScalarType elementType) USAGE_DEPRECATED; - /** - * Get a structureArray field with the specified name. - * @deprecated No longer needed. Use template version of getSubField - * @param fieldName The name of the field to get. - * @return Pointer to the field of null if a field with that name and type does not exist. - */ - PVStructureArrayPtr getStructureArrayField(std::string const &fieldName) USAGE_DEPRECATED; - /** - * Get a unionArray field with the specified name. - * @deprecated No longer needed. Use template version of getSubField - * @param fieldName The name of the field to get. - * @return Pointer to the field of null if a field with that name and type does not exist. - */ - PVUnionArrayPtr getUnionArrayField(std::string const &fieldName) USAGE_DEPRECATED; /** * Serialize. * @param pbuffer The byte buffer.