00001 #ifndef ROSRTT_CONNECTION_BASE_H 00002 #define ROSRTT_CONNECTION_BASE_H 00003 00004 #include "hpcl_rtt/oro/channel_element_base.hpp" 00005 00006 namespace hpcl_rtt 00007 { 00008 class ConnectionBase; 00009 typedef boost::shared_ptr<ConnectionBase> ConnectionBasePtr; 00010 typedef std::vector<ConnectionBasePtr> V_ConnectionBase; 00011 00012 class ConnectionBase 00013 { 00014 public: 00015 typedef boost::intrusive_ptr<ConnectionBase> shared_ptr; 00016 00017 private: 00018 std::string topic_; 00019 ChannelElementBase::shared_ptr channel_element; 00020 00021 public: 00022 ConnectionBase(std::string topic) : topic_(topic) {} 00023 ~ConnectionBase() {}; 00024 00025 std::string getTopic() {return topic_;} 00026 00027 ChannelElementBase::shared_ptr getChannelElement() {return channel_element;} 00028 00029 bool addConnection(ChannelElementBase::shared_ptr channel) {channel_element = channel;}; 00030 }; 00031 00032 } 00033 #endif