| 195 | */ |
| 196 | template <class TPortInfo = PortInfo> |
| 197 | TPortInfo* configOutput(int portId, std::string name = "") { |
| 198 | assert(portId < (int) outputs.size() && portId < (int) outputInfos.size()); |
| 199 | if (outputInfos[portId]) |
| 200 | delete outputInfos[portId]; |
| 201 | |
| 202 | TPortInfo* info = new TPortInfo; |
| 203 | info->PortInfo::module = this; |
| 204 | info->PortInfo::type = Port::OUTPUT; |
| 205 | info->PortInfo::portId = portId; |
| 206 | info->PortInfo::name = name; |
| 207 | outputInfos[portId] = info; |
| 208 | return info; |
| 209 | } |
| 210 | |
| 211 | /** Helper for creating a LightInfo and setting its properties. |
| 212 | For multi-colored lights, use the first lightId. |