本文整理汇总了C++中MetaObject::getID方法的典型用法代码示例。如果您正苦于以下问题:C++ MetaObject::getID方法的具体用法?C++ MetaObject::getID怎么用?C++ MetaObject::getID使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MetaObject
的用法示例。
在下文中一共展示了MetaObject::getID方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: runPy
PyObject*
Actionary::testCondition(iPAR* ipar, int which) {
char buf[MAXBUF];
char *argstr = new char[MAXBUF];
MetaObject *obj;
sprintf_s(argstr,MAXBUF,"%d",ipar->getAgent()->getID());
// strcpy_s(argstr, MAXBUF, singleQuote(ipar->getAgent()->getObjectName().c_str()));//Gets the agent from the instanced par
int num = ipar->par->getNumObjects();
//Finds all the objects the par requires to test it's condition
for (int i = 0; i < num; i++) {
strcat_s(argstr, MAXBUF, ", ");
obj=ipar->getObject(i);
if (obj != NULL)
sprintf_s(argstr,MAXBUF,"%s%d",argstr,obj->getID());
//strcat_s(argstr, MAXBUF, singleQuote(obj->getObjectName().c_str()));
else
sprintf_s(argstr,MAXBUF,"%s%d",argstr,-1);
//strcat_s(argstr, MAXBUF, singleQuote(" "));
}
//Actually tests the condition
sprintf_s(buf, MAXBUF,"%s_%d.%s(%s)\n", ipar->par->getActionName().c_str(),ipar->getID(),conditionNames[which], argstr);
//debug("%s\n",buf);
delete [] argstr;
return runPy(buf);
}