如何将模块连接到门
How to get the module connected to a gate?
在模块内部,我可以得到一个调用该方法的cGate
指针:
const cGate* cModule::gate ( const char * gatename, int index = -1)
但是一旦获得了cGate
指针,我就看不到将(输出中)连接到门的关联模块的方法。我在cChannel
课上也没有看到它。有办法吗?
检查cGate::getPathStartGate()
和cGate::getPathEndGate()
方法。根据连接的方向,它们将为您提供端点门(它甚至会跨越模块边界跟踪连接,直到它在连接链的另一端找到一个简单的模块)。(cGate::getNextGate()
和cGate::getPreviousGate()
只给出链上的下一个/上一个门)
从另一端获得cGate
对象后,可以使用cGate::getOwnerModule()
获取模块
相关文章:
- 尝试导入pybind-opencv模块时出现libgtk错误
- 当套接字连接断开时检测C/C++Unix
- 无法在windows上使用mingw将sqlite3与c连接
- 为什么当我解模块化时,这个C++代代码"效率较低"?
- 到连接组件算法的问题(递归)
- 如果C++对象的类在另一个boost模块中声明,如何使用boost将指向该对象的指针返回到python
- QTcpSocket在不阻塞GUI的情况下重新连接到服务器
- 无法在C++中建立与MySQL数据库的连接
- PC中的程序和PHONE中的本机描述应用程序之间的数据连接
- 在Qt Creator中,如何在连接到正在运行的进程后查看控制台输出
- 内联如何影响模块接口中的成员函数
- C++返回 Numpy 数组的 Python 扩展模块
- 连接 dockerized 模型和 dockerized 数据库时出现"无法 SQLConnect"错误
- 当我尝试加载内核模块时,如何修复C++中的这个 malloc() 错误?
- 使用 bfs 解决连接组件问题时得到错误的答案
- 使用"const char*"和"char*"参数连接两个第三方模块
- 如何连接模块
- 在BTooth模块连接时上传Arduino程序 avrdude: stk500_getsync(): 不同步: resp
- 将两个传感器dht11和dht22连接到同一个节点模块esp-12e
- 通过OMNeT++中的无线信道连接两个UDP模块