38 #ifndef ORO_SHARED_CONNECTION_HPP 39 #define ORO_SHARED_CONNECTION_HPP 42 #include "../base/ChannelElement.hpp" 43 #include "../ConnPolicy.hpp" 59 SharedConnID(boost::intrusive_ptr< SharedConnectionBase > connection)
60 : connection(connection) {}
61 virtual ConnID* clone()
const;
62 virtual bool isSameID(
ConnID const&
id)
const;
63 template <
typename T> boost::intrusive_ptr< SharedConnection<T> >
getConnection()
const 75 typedef boost::intrusive_ptr< SharedConnectionBase >
shared_ptr;
89 return dynamic_cast<SharedConnection<T> *
>(e);
95 template <
typename T> SharedConnection<T> *
narrow()
97 return dynamic_cast<SharedConnection<T> *
>(
this);
101 virtual const std::string &getName()
const;
103 virtual const ConnPolicy *getConnPolicy()
const;
112 typedef boost::shared_ptr<SharedConnectionRepository>
shared_ptr;
115 typedef std::map<key_t, SharedConnectionBase*>
Map;
122 static shared_ptr Instance();
127 bool has(
const key_t &key)
const;
134 template <
typename T>
137 typedef boost::intrusive_ptr< SharedConnection<T> >
shared_ptr;
150 , mstorage_initialized(false)
168 if (!this->signal()) {
182 return mstorage->
read(sample, copy_old_data);
206 if (!mstorage_initialized) {
208 mstorage_initialized =
true;
219 template <
typename T>
222 typedef boost::intrusive_ptr< SharedRemoteConnection<T> >
shared_ptr;
boost::call_traits< T >::param_type param_t
boost::intrusive_ptr< ChannelElement< T > > shared_ptr
boost::intrusive_ptr< SharedConnectionBase > shared_ptr
virtual FlowStatus read(reference_t sample, bool copy_old_data=true)
bool mstorage_initialized
boost::intrusive_ptr< SharedConnection< T > > getConnection() const
virtual ~SharedConnection()
static SharedConnection< T > * narrow(ChannelElementBase *e)
std::map< key_t, SharedConnectionBase * > Map
virtual WriteStatus write(param_t sample)
boost::intrusive_ptr< SharedConnectionBase > connection
virtual value_t data_sample()
virtual WriteStatus data_sample(param_t sample, bool reset=true)
SharedRemoteConnection(const ConnPolicy &policy)
SharedConnection< T > * narrow()
base::ChannelElement< T >::param_t param_t
virtual FlowStatus read(reference_t sample, bool copy_old_data=true)
An object oriented wrapper around a shared mutex (multiple readers allowed, but only one writer with ...
base::ChannelElement< T >::shared_ptr mstorage
boost::call_traits< T >::reference reference_t
boost::intrusive_ptr< SharedRemoteConnection< T > > shared_ptr
base::ChannelElement< T >::reference_t reference_t
RTT::os::SharedMutex mutex
boost::intrusive_ptr< SharedConnection< T > > shared_ptr
virtual ~SharedRemoteConnection()
SharedConnID(boost::intrusive_ptr< SharedConnectionBase > connection)
boost::shared_ptr< SharedConnectionRepository > shared_ptr
virtual WriteStatus data_sample(param_t sample, bool reset=true)
SharedConnectionRepository()
SharedConnection(typename base::ChannelElement< T > *storage, const ConnPolicy &policy)
virtual WriteStatus write(param_t sample)
Contains TaskContext, Activity, OperationCaller, Operation, Property, InputPort, OutputPort, Attribute.
base::ChannelElement< T >::value_t value_t
std::ostream & operator<<(std::ostream &, const RTT::internal::SharedConnID &)