39 #ifndef ORO_CORBA_DATASOURCE_PROXY_HPP 40 #define ORO_CORBA_DATASOURCE_PROXY_HPP 42 #include "../../internal/DataSource.hpp" 43 #include "../../Logger.hpp" 44 #include "../../base/ActionInterface.hpp" 85 DataSourceProxy( corba::CService_ptr s,
const std::string& name,
bool isproperty )
86 : mserv( corba::CService::_duplicate( s ) ), mname(name), misproperty(isproperty)
88 assert( !CORBA::is_nil(s) );
93 if ( misproperty && ! mserv->hasProperty( name.c_str()))
95 if ( !misproperty && ! mserv->hasAttribute( name.c_str()))
111 res = mserv->getProperty( mname.c_str() );
113 res = mserv->getAttribute( mname.c_str() );
123 return new DataSourceProxy<T>( corba::CService::_duplicate( mserv.in() ), mname, misproperty );
156 : mserv( corba::CService::_duplicate(serv) ), mname(name), misproperty(isproperty)
164 if ( misproperty && !mserv->hasProperty( name.c_str()) )
166 if ( !misproperty && ( !mserv->hasAttribute( name.c_str()) || !mserv->isAttributeAssignable( name.c_str()) ))
184 res = mserv->getProperty( mname.c_str() );
186 res = mserv->getAttribute( mname.c_str() );
198 CORBA::Any_var toset = ctp->
createAny(&vds);
200 mserv->setProperty( mname.c_str(), toset.in() );
202 mserv->setAttribute( mname.c_str(), toset.in() );
209 return storage->
set();
214 this->
set( storage->
value() );
virtual internal::AssignableDataSource< T > * copy(std::map< const base::DataSourceBase *, base::DataSourceBase * > &alreadyCloned) const
internal::DataSource< T >::result_t value() const
virtual internal::DataSource< T > * copy(std::map< const base::DataSourceBase *, base::DataSourceBase * > &alreadyCloned) const
internal::DataSource< T >::value_t last_value
corba::CService_var mserv
boost::call_traits< value_t >::reference reference_t
virtual void set(param_t t)=0
virtual CORBA::Any_ptr createAny(base::DataSourceBase::shared_ptr source) const =0
internal::AssignableDataSource< value_t >::shared_ptr storage
CorbaTypeTransporter * ctp
ValueDataSourceProxy(corba::CService_ptr serv, const std::string &name, bool isproperty)
corba::CService_var mserv
CorbaTypeTransporter * ctp
virtual internal::DataSource< T > * clone() const
DataSourceProxy(corba::CService_ptr s, const std::string &name, bool isproperty)
internal::AssignableDataSource< T >::const_reference_t rvalue() const
static std::string GetType()
virtual const_reference_t rvalue() const =0
static std::ostream & endl(std::ostream &__os)
internal::AssignableDataSource< T >::value_t value_t
virtual std::string getType() const
internal::AssignableDataSource< T >::const_reference_t rvalue() const
boost::intrusive_ptr< AssignableDataSource< T > > shared_ptr
#define ORO_CORBA_PROTOCOL_ID
virtual result_t value() const =0
DataSource< T >::value_t value_t
virtual bool updateFromAny(const CORBA::Any *blob, base::DataSourceBase::shared_ptr target) const =0
DataSource< T >::const_reference_t const_reference_t
Contains TaskContext, Activity, OperationCaller, Operation, Property, InputPort, OutputPort, Attribute.
virtual internal::AssignableDataSource< T > * clone() const
boost::call_traits< value_t >::param_type param_t
internal::DataSource< T >::result_t value() const