00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039 #ifndef ORO_EXECUTION_PORT_INTERFACE_HPP
00040 #define ORO_EXECUTION_PORT_INTERFACE_HPP
00041
00042 #include <string>
00043 #include "../internal/rtt-internal-fwd.hpp"
00044 #include "../ConnPolicy.hpp"
00045 #include "../internal/ConnID.hpp"
00046 #include "ChannelElementBase.hpp"
00047 #include "../types/rtt-types-fwd.hpp"
00048 #include "../rtt-fwd.hpp"
00049
00050 namespace RTT
00051 { namespace base {
00052
00057 class RTT_API PortInterface
00058 {
00059 std::string name;
00060 std::string mdesc;
00061 DataFlowInterface* iface;
00062 protected:
00063 PortInterface(const std::string& name);
00064
00065 public:
00066 virtual ~PortInterface() {}
00067
00071 virtual internal::ConnID* getPortID() const;
00072
00076 const std::string& getName() const { return name; }
00077
00084 bool setName(const std::string& name);
00085
00090 const std::string& getDescription() const { return mdesc; }
00091
00097 PortInterface& doc(const std::string& desc);
00098
00099
00101 virtual bool connected() const = 0;
00102
00104 virtual const types::TypeInfo* getTypeInfo() const = 0;
00105
00107 virtual void disconnect() = 0;
00108
00113 virtual bool disconnect(PortInterface* port) = 0;
00114
00115
00119 virtual internal::ConnFactory* getConnFactory();
00120
00124 virtual bool isLocal() const;
00125
00129 virtual int serverProtocol() const;
00130
00137 virtual PortInterface* clone() const = 0;
00138
00146 virtual PortInterface* antiClone() const = 0;
00147
00152 virtual Service* createPortObject();
00153
00160 virtual bool connectTo(PortInterface* other, ConnPolicy const& policy) = 0;
00161
00168 virtual bool connectTo(PortInterface* other) = 0;
00169
00178 virtual bool createStream(ConnPolicy const& policy) = 0;
00179
00184 virtual bool addConnection(internal::ConnID* cid, ChannelElementBase::shared_ptr channel_input, ConnPolicy const& policy = ConnPolicy() ) = 0;
00185
00191 virtual bool removeConnection(internal::ConnID* cid) = 0;
00192
00199 void setInterface(DataFlowInterface* iface);
00204 DataFlowInterface* getInterface() const;
00205
00215 virtual const internal::ConnectionManager* getManager() const = 0;
00216 };
00217
00218 }}
00219
00220 #endif