| 176 | */ |
| 177 | template <class TPortInfo = PortInfo> |
| 178 | TPortInfo* configInput(int portId, std::string name = "") { |
| 179 | assert(portId < (int) inputs.size() && portId < (int) inputInfos.size()); |
| 180 | if (inputInfos[portId]) |
| 181 | delete inputInfos[portId]; |
| 182 | |
| 183 | TPortInfo* info = new TPortInfo; |
| 184 | info->PortInfo::module = this; |
| 185 | info->PortInfo::type = Port::INPUT; |
| 186 | info->PortInfo::portId = portId; |
| 187 | info->PortInfo::name = name; |
| 188 | inputInfos[portId] = info; |
| 189 | return info; |
| 190 | } |
| 191 | |
| 192 | /** Helper for creating a PortInfo for an output port and setting its properties. |
| 193 | See PortInfo for documentation of arguments. |