本文整理汇总了C++中RendererPtr::getClientObjID方法的典型用法代码示例。如果您正苦于以下问题:C++ RendererPtr::getClientObjID方法的具体用法?C++ RendererPtr::getClientObjID怎么用?C++ RendererPtr::getClientObjID使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类RendererPtr
的用法示例。
在下文中一共展示了RendererPtr::getClientObjID方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: attachRenderer
void Object::attachRenderer(const RendererPtr &pRend)
{
if (pRend->getClientObjID()!=qlib::invalid_uid) {
// Error !! object is already attached to another object!!
LOG_DPRINTLN("ERROR !! Renderer already attached");
LString msg = LString::format("Renderer already attached %s", pRend->getName().c_str());
MB_THROW(qlib::RuntimeException, msg);
return;
}
MB_DPRINTLN("attachRenderer clientObjID=%d", (int)pRend->getClientObjID());
if (!registerRendererImpl(pRend)) {
// Error !! cannot register renderer.
LOG_DPRINTLN("ERROR !! cannot register renderer");
LString msg = LString::format("Cannot register renderer %s", pRend->getName().c_str());
MB_THROW(qlib::RuntimeException, msg);
return;
}
// update stylesheet settings
pRend->reapplyStyle();
}
示例2: createRenderer
RendererPtr Object::createRenderer(const LString &type_name)
{
RendererFactory *pRF = RendererFactory::getInstance();
RendererPtr pRend = pRF->create(type_name);
if (!registerRendererImpl(pRend)) {
// error !! cannot register renderer.
LOG_DPRINTLN("ERROR !! cannot register renderer");
LString msg = LString::format("Cannot register renderer %s", type_name.c_str());
MB_THROW(qlib::RuntimeException, msg);
return RendererPtr();
}
MB_DPRINTLN("createRenderer clientObjID=%d OK", (int)pRend->getClientObjID());
return pRend;
}