void CConfigurableDomains::deleteDomain(CConfigurableDomain& configurableDomain)
{
    log_info("Deleting configurable domain \"%s\"", configurableDomain.getName().c_str() );

    removeChild(&configurableDomain);

    delete &configurableDomain;
}
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;
}