Go to the documentation of this file.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 protected:
00062 DataFlowInterface* iface;
00063
00064 PortInterface(const std::string& name);
00065
00066 public:
00067 virtual ~PortInterface() {}
00068
00072 virtual internal::ConnID* getPortID() const;
00073
00077 const std::string& getName() const { return name; }
00078
00085 bool setName(const std::string& name);
00086
00091 const std::string& getDescription() const { return mdesc; }
00092
00098 PortInterface& doc(const std::string& desc);
00099
00100
00102 virtual bool connected() const = 0;
00103
00105 virtual const types::TypeInfo* getTypeInfo() const = 0;
00106
00108 virtual void disconnect() = 0;
00109
00114 virtual bool disconnect(PortInterface* port) = 0;
00115
00119 virtual bool isLocal() const;
00120
00124 virtual int serverProtocol() const;
00125
00132 virtual PortInterface* clone() const = 0;
00133
00141 virtual PortInterface* antiClone() const = 0;
00142
00147 virtual Service* createPortObject();
00148
00155 virtual bool connectTo(PortInterface* other, ConnPolicy const& policy) = 0;
00156
00163 virtual bool connectTo(PortInterface* other) = 0;
00164
00173 virtual bool createStream(ConnPolicy const& policy) = 0;
00174
00179 virtual bool addConnection(internal::ConnID* cid, ChannelElementBase::shared_ptr channel_input, ConnPolicy const& policy = ConnPolicy() ) = 0;
00180
00186 virtual bool removeConnection(internal::ConnID* cid) = 0;
00187
00194 void setInterface(DataFlowInterface* iface);
00199 DataFlowInterface* getInterface() const;
00200
00210 virtual const internal::ConnectionManager* getManager() const = 0;
00211 };
00212
00213 }}
00214
00215 #endif