|
@@ -109,16 +109,30 @@ public:
|
|
|
_out_port_map.erase(port.index);
|
|
|
}
|
|
|
|
|
|
- bool exist_in_port(unsigned int port_index)
|
|
|
+ bool exist_in_port(unsigned int port_index) const
|
|
|
{
|
|
|
return _in_port_map.find(port_index) != _in_port_map.end();
|
|
|
}
|
|
|
|
|
|
- bool exist_out_port(unsigned int port_index)
|
|
|
+ bool exist_out_port(unsigned int port_index) const
|
|
|
{
|
|
|
return _out_port_map.find(port_index) != _out_port_map.end();
|
|
|
}
|
|
|
|
|
|
+ std::string get_in_port_name(unsigned int port_index) const
|
|
|
+ {
|
|
|
+ assert(exist_in_port(port_index));
|
|
|
+
|
|
|
+ return _in_port_map.find(port_index)->second;
|
|
|
+ }
|
|
|
+
|
|
|
+ std::string get_out_port_name(unsigned int port_index) const
|
|
|
+ {
|
|
|
+ assert(exist_out_port(port_index));
|
|
|
+
|
|
|
+ return _out_port_map.find(port_index)->second;
|
|
|
+ }
|
|
|
+
|
|
|
const std::string& get_name() const
|
|
|
{ return _name; }
|
|
|
|