本文整理汇总了C++中CConfigurableDomain类的典型用法代码示例。如果您正苦于以下问题:C++ CConfigurableDomain类的具体用法?C++ CConfigurableDomain怎么用?C++ CConfigurableDomain使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了CConfigurableDomain类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: findConfigurableDomain
// Configurable element - domain association
bool CConfigurableDomains::addConfigurableElementToDomain(const string& strDomain, CConfigurableElement* pConfigurableElement, const CParameterBlackboard* pMainBlackboard, string& strError)
{
// Find domain
CConfigurableDomain* pConfigurableDomain = findConfigurableDomain(strDomain, strError);
if (!pConfigurableDomain) {
return false;
}
// Delegate
return pConfigurableDomain->addConfigurableElement(pConfigurableElement, pMainBlackboard, strError);
}
示例2: getNbChildren
// Ensure validity on whole domains from main blackboard
void CConfigurableDomains::validate(const CParameterBlackboard *pMainBlackboard)
{
// Delegate to domains
size_t uiNbConfigurableDomains = getNbChildren();
for (size_t child = 0; child < uiNbConfigurableDomains; child++) {
CConfigurableDomain *pChildConfigurableDomain =
static_cast<CConfigurableDomain *>(getChild(child));
pChildConfigurableDomain->validate(pMainBlackboard);
}
}
示例3: findConfigurableDomain
bool CConfigurableDomains::renameDomain(const string &strName, const string &strNewName,
string &strError)
{
CConfigurableDomain *pConfigurableDomain = findConfigurableDomain(strName, strError);
if (!pConfigurableDomain) {
return false;
}
// Rename
return pConfigurableDomain->rename(strNewName, strError);
}
示例4: deleteDomain
void CConfigurableDomains::deleteDomain(CConfigurableDomain& configurableDomain)
{
log_info("Deleting configurable domain \"%s\"", configurableDomain.getName().c_str() );
removeChild(&configurableDomain);
delete &configurableDomain;
}
示例5: strDomainName
bool CConfigurableDomains::addDomain(CConfigurableDomain &domain, bool bOverwrite, string &strError)
{
string strErrorDrop;
string strDomainName(domain.getName());
CConfigurableDomain *pExistingDomain = findConfigurableDomain(strDomainName, strErrorDrop);
if (pExistingDomain) {
if (!bOverwrite) {
strError = "Can't add domain \"" + strDomainName +
"\" because it already exists and overwrite was not requested.";
return false;
}
deleteDomain(*pExistingDomain);
}
addChild(&domain);
return true;
}