bool Triggerconf::existsConfigAttribute	(string path)
{
	if (! checkItemCount (path, 4)) return false;

	STRING_LIST items = tokenize (path);
	return existsConfigAttribute (items [0], items [1], items [2], items [3]);
}
Triggerconf::STRING_LIST Triggerconf::getConfigAttributeNames (string path)
{
	if (! checkItemCount (path, 3)) return STRING_LIST ();
	
	STRING_LIST items = tokenize (path);
	return getConfigAttributeNames (items [0], items [1], items [2]);
}
bool Triggerconf::existsSubmodule (string path)
{
	if (! checkItemCount (path, 2)) return false;

	STRING_LIST items = tokenize (path);
	return existsSubmodule (items [0], items [1]);
}
bool Triggerconf::existsConfigElement (string path)
{
	if (! checkItemCount (path, 3)) return false;

	STRING_LIST items = tokenize (path);
	return existsConfigElement (items [0], items [1], items [2]);
}
void Triggerconf::deleteConfigAttribute (string path)
{
	if (! checkItemCount (path, 4)) return;

	STRING_LIST items = tokenize (path);
	deleteConfigAttribute (items [0], items [1], items [2], items [3]);
}
void Triggerconf::deleteConfigElement (string path)
{
	if (! checkItemCount (path, 3)) return;
	
	STRING_LIST items = tokenize (path);
	deleteConfigElement (items [0], items [1], items [2]); 
}
void Triggerconf::deleteSubmodule (string path)
{
	if (! checkItemCount (path, 2)) return;

	STRING_LIST items = tokenize (path);
	deleteSubmodule (items [0], items [1]);
}
void Triggerconf::setConfigAttributeValue (string path, string value)
{
	if (! checkItemCount (path, 4)) return;

	STRING_LIST items = tokenize (path);
	setConfigAttributeValue (items [0], items [1], items [2], items [3], value);
}
string Triggerconf::getConfigAttributeValue (string path)
{
	if (! checkItemCount (path, 4)) return "";
	
	STRING_LIST items = tokenize (path);
	return getConfigAttributeValue (items [0], items [1], items [2], items [3]);
}
Exemple #10
0
Triggerconf::ATTRIBUTE_MAP Triggerconf::getConfigItemAttributes (string path)
{
	if (! checkItemCount (path, 3)) return ATTRIBUTE_MAP ();

	STRING_LIST items = tokenize (path);
	return getConfigItemAttributes (items [0], items [1], items [2]);
}
Exemple #11
0
static void TestEnumListCount(void) {
    checkItemCount(UCURR_ALL);
    checkItemCount(UCURR_COMMON);
    checkItemCount(UCURR_UNCOMMON);
    checkItemCount(UCURR_DEPRECATED);
    checkItemCount(UCURR_NON_DEPRECATED);
    checkItemCount(UCURR_COMMON|UCURR_DEPRECATED);
    checkItemCount(UCURR_COMMON|UCURR_NON_DEPRECATED);
    checkItemCount(UCURR_UNCOMMON|UCURR_DEPRECATED);
    checkItemCount(UCURR_UNCOMMON|UCURR_NON_DEPRECATED);

    if (checkItemCount(UCURR_DEPRECATED|UCURR_NON_DEPRECATED) != 0) {
        log_err("Error: UCURR_DEPRECATED|UCURR_NON_DEPRECATED should return 0 items\n");
    }
    if (checkItemCount(UCURR_COMMON|UCURR_UNCOMMON) != 0) {
        log_err("Error: UCURR_DEPRECATED|UCURR_NON_DEPRECATED should return 0 items\n");
    }
}
Exemple #12
0
bool Triggerconf::checkItemCount (string path, unsigned int items)
{
	return checkItemCount (tokenize (path), items);
}