本文整理汇总了C++中jccl::ConfigElementPtr::getFullName方法的典型用法代码示例。如果您正苦于以下问题:C++ ConfigElementPtr::getFullName方法的具体用法?C++ ConfigElementPtr::getFullName怎么用?C++ ConfigElementPtr::getFullName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类jccl::ConfigElementPtr
的用法示例。
在下文中一共展示了ConfigElementPtr::getFullName方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: configureProxy
/**
* Check if the device factory or proxy factory can handle the element.
*/
bool InputManager::configureProxy(jccl::ConfigElementPtr element)
{
std::string proxy_name = element->getFullName();
vpr::DebugOutputGuard dbg_output(gadgetDBG_INPUT_MGR, vprDBG_STATE_LVL,
std::string("gadget::InputManager::configureProxy: Named: ") + proxy_name + std::string("\n"),
std::string("done configuring proxy\n"));
Proxy* new_proxy;
// Tell the factory to load the proxy
// NOTE: The config for the proxy registers it with the input manager
new_proxy = ProxyFactory::instance()->loadProxy(element);
// Check for success
if(NULL == new_proxy)
{
vprDEBUG(vprDBG_ERROR,vprDBG_CRITICAL_LVL)
<< clrOutNORM(clrRED,"ERROR:")
<< " gadget::InputManager::configureProxy: Proxy construction failed:"
<< proxy_name << std::endl << vprDEBUG_FLUSH;
return false;
}
vprASSERT(proxy_name == new_proxy->getName());
// -- Add to proxy table
if(false == addProxy(new_proxy))
{
return false;
}
return true;
}
示例2: configureDevice
/**
* Check if the device factory or proxy factory can handle the element.
*/
bool InputManager::configureDevice(jccl::ConfigElementPtr element)
{
bool ret_val;
std::string dev_name = element->getFullName();
vpr::DebugOutputGuard dbg_output(gadgetDBG_INPUT_MGR, vprDBG_STATE_LVL,
std::string("InputManager::configureDevice: device[") + dev_name + std::string("]\n"),
std::string("done configuring device\n"));
Input* new_device;
new_device = DeviceFactory::instance()->loadDevice(element);
if ((new_device != NULL) && (new_device->startSampling()))
{
addDevice(new_device);
ret_val = true;
vprDEBUG(gadgetDBG_INPUT_MGR,vprDBG_STATE_LVL)
<< " Successfully added device: " << dev_name << std::endl
<< vprDEBUG_FLUSH;
}
else
{
vprDEBUG(vprDBG_ERROR,vprDBG_CRITICAL_LVL) << clrOutNORM(clrRED,"ERROR:")
<< "New device " << clrSetBOLD(clrCYAN) << dev_name << clrRESET
<< " failed to start. Deleting instance" << std::endl
<< vprDEBUG_FLUSH;
if ( NULL != new_device )
{
delete new_device;
}
ret_val = false;
}
return ret_val;
}
示例3: config
bool Proxy::config(jccl::ConfigElementPtr element)
{
mName = element->getFullName();
return true;
}
示例4: removeDevice
/**
* Removes the device associated with the given element.
*/
bool InputManager::removeDevice(jccl::ConfigElementPtr element)
{
return removeDevice(element->getFullName());
}
示例5: removeProxy
bool InputManager::removeProxy(jccl::ConfigElementPtr element)
{
std::string proxy_name;
proxy_name = element->getFullName();
return removeProxy(proxy_name);
}