having a file containing these statements:
public:
boost::shared_ptr<TBFControl::TbfCmdHandler> _tbfCmdHandlerPtr;
// will be private later...
boost::shared_ptr<TBFControl::TbfCmdHandler> getTBFCmdHandler()
{ return _tbfCmdHandlerPtr; }
I can use it this way:
boost::shared_ptr<TBFControl::TbfCmdHandler>myTbfCmdHandlerPtr(
this->getTBFInstallation()-> _tbfCmdHandlerPtr );
but not, like i want, this way:
boost::shared_ptr<TBFControl::TbfCmdHandler>myTbfCmdHandlerPtr(
this->getTBFInstallation()->getTBFCmdHandler() );
Using the getter function, the following error occurs:
'Housekeeping::TBFInstallation::getTBFCmdHandler' : cannot convert 'this' pointer from 'const Housekeeping::TBFInstallation' to 'Housekeeping::TBFInstallation &'
what is going wrong here?