diff --git a/src/pv/pvaClient.h b/src/pv/pvaClient.h index c70edf5..11e839a 100644 --- a/src/pv/pvaClient.h +++ b/src/pv/pvaClient.h @@ -223,7 +223,6 @@ class PvaClientGetCache; typedef std::tr1::shared_ptr PvaClientGetCachePtr; class PvaClientPutCache; typedef std::tr1::shared_ptr PvaClientPutCachePtr; -class ChannelRequesterImpl; /** * @brief An easy to use alternative to directly calling the Channel methods of pvAccess. @@ -288,12 +287,12 @@ public: * @return The interface. */ PvaClientFieldPtr createField(); - /** Create an PvaClientField for the specified subField. + /** Calls the next method with request = ""; * @param subField The syntax for subField is defined in package org.epics.pvdata.copy * @return The interface. */ PvaClientFieldPtr createField(std::string const & subField); - /** Calls the next method with request = ""; + /** Create an PvaClientField for the specified subField. * @return The interface. * @throw runtime_error if failure. */ @@ -886,7 +885,8 @@ private: * @author mrk */ class epicsShareClass PvaClientProcess : - public epics::pvAccess::ChannelProcessRequester + public epics::pvAccess::ChannelProcessRequester, + public std::tr1::enable_shared_from_this { public: POINTER_DEFINITIONS(PvaClientProcess); @@ -972,7 +972,8 @@ private: * @author mrk */ class epicsShareClass PvaClientGet : - public epics::pvAccess::ChannelGetRequester + public epics::pvAccess::ChannelGetRequester, + public std::tr1::enable_shared_from_this { public: POINTER_DEFINITIONS(PvaClientGet); @@ -1071,7 +1072,8 @@ private: * @author mrk */ class epicsShareClass PvaClientPut : - public epics::pvAccess::ChannelPutRequester + public epics::pvAccess::ChannelPutRequester, + public std::tr1::enable_shared_from_this { public: POINTER_DEFINITIONS(PvaClientPut); @@ -1182,7 +1184,8 @@ private : * @author mrk */ class epicsShareClass PvaClientPutGet : - public epics::pvAccess::ChannelPutGetRequester + public epics::pvAccess::ChannelPutGetRequester, + public std::tr1::enable_shared_from_this { public: POINTER_DEFINITIONS(PvaClientPutGet); diff --git a/src/pvaClientChannel.cpp b/src/pvaClientChannel.cpp index a08c332..ed6467a 100644 --- a/src/pvaClientChannel.cpp +++ b/src/pvaClientChannel.cpp @@ -290,7 +290,7 @@ void PvaClientChannel::issueConnect() if(!provider) { throw std::runtime_error(channelName + " provider " + providerName + " not registered"); } - ChannelRequester::shared_pointer channelRequester(ChannelRequester::shared_pointer(this)); + ChannelRequester::shared_pointer channelRequester(shared_from_this()); if(PvaClient::getDebug()) cout << "PvaClientChannel::issueConnect calling provider->createChannel\n"; channel = provider->createChannel(channelName,channelRequester,ChannelProvider::PRIORITY_DEFAULT); if(!channel) { diff --git a/src/pvaClientGet.cpp b/src/pvaClientGet.cpp index 0542704..a3515c2 100644 --- a/src/pvaClientGet.cpp +++ b/src/pvaClientGet.cpp @@ -151,7 +151,7 @@ void PvaClientGet::issueConnect() + " pvaClientGet already connected "; throw std::runtime_error(message); } - ChannelGetRequester::shared_pointer getRequester(ChannelGetRequester::shared_pointer(this)); + ChannelGetRequester::shared_pointer getRequester(shared_from_this()); connectState = connectActive; channelGet = channel->createChannelGet(getRequester,pvRequest); } diff --git a/src/pvaClientProcess.cpp b/src/pvaClientProcess.cpp index 3bffa15..cb46b3b 100644 --- a/src/pvaClientProcess.cpp +++ b/src/pvaClientProcess.cpp @@ -126,8 +126,7 @@ void PvaClientProcess::issueConnect() + " pvaClientProcess already connected "; throw std::runtime_error(message); } - ChannelProcessRequester::shared_pointer processRequester( - ChannelProcessRequester::shared_pointer(this)); + ChannelProcessRequester::shared_pointer processRequester(shared_from_this()); connectState = connectActive; channelProcess = channel->createChannelProcess(processRequester,pvRequest); } diff --git a/src/pvaClientPut.cpp b/src/pvaClientPut.cpp index b2c74c0..e8760f0 100644 --- a/src/pvaClientPut.cpp +++ b/src/pvaClientPut.cpp @@ -167,7 +167,7 @@ void PvaClientPut::issueConnect() + " pvaClientPut already connected "; throw std::runtime_error(message); } - ChannelPutRequester::shared_pointer putRequester(ChannelPutRequester::shared_pointer(this)); + ChannelPutRequester::shared_pointer putRequester(shared_from_this()); connectState = connectActive; channelPut = channel->createChannelPut(putRequester,pvRequest); } diff --git a/src/pvaClientPutGet.cpp b/src/pvaClientPutGet.cpp index fe11e7b..35a84b5 100644 --- a/src/pvaClientPutGet.cpp +++ b/src/pvaClientPutGet.cpp @@ -202,7 +202,7 @@ void PvaClientPutGet::issueConnect() + " pvaClientPutGet already connected "; throw std::runtime_error(message); } - ChannelPutGetRequester::shared_pointer putGetRequester(ChannelPutGetRequester::shared_pointer(this)); + ChannelPutGetRequester::shared_pointer putGetRequester(shared_from_this()); connectState = connectActive; channelPutGet = channel->createChannelPutGet(putGetRequester,pvRequest); }