epics-base / pvDataCPP

pvDataCPP is an EPICS V4 C++ module
https://epics-base.github.io/pvDataCPP/
Other
6 stars 16 forks source link

Deprecated PVStructure::get*Field methods trigger a warning #3

Closed mdavidsaver closed 9 years ago

mdavidsaver commented 9 years ago

Resurrect the USAGE_DEPRECATED macro and apply to the methods marked "@deprecated" with the exception of getScalarArrayField() which has no direct analog with getSubField<>().

Replace all usages in pvDataCPP w/ great big regexp.

sed -i -r -e 's!get(U?)(Byte|Short|Int|Long)Field!getSubField<PV\1\2>!g' -e 's!get(String|Float|Double|Structure|Union|StructureArray|UnionArray)Field!getSubField<PV\1>!g' files ...
mrkraimer commented 9 years ago

I do not understand this pull request. I do no see any code changes. It appears only to be a suggestion on how to make changes not actual changes. What am I missing?

dhickin commented 9 years ago

It says: "Showing 12 files with 93 additions and 82 deletions."

I see a whole lot of changes: Macro to be used for deprecated functions; used for the deprecated get_Field functions; calls of get_Field functions replaced by template.

These look good to me. I suggest the pull request is accepted.

There a few more of the old API in pvAccessCPP, pvaSrv and 1 in pvDatabaseCPP. These should be changed too.

The template functions have been around for a while and the old functions marked as deprecated in the doxygen for a similarly long time. I suggest we go a stage further and after the changes are made to the other modules we remove the deprecated functions.