Example #1
0
void
ConfigScope::dump(
	StringBuffer &			buf,
	bool					wantExpandedUidNames,
	int						indentLevel) const
{
	int						i;
	int						len;
	StringVector			nameVec;
	ConfigItem *			item;
	
	//--------
	// First pass. Dump the variables
	//--------
	listLocalNames(Configuration::CFG_VARIABLES, nameVec);
	nameVec.sort();
	len = nameVec.length();
	for (i = 0; i < len; i++) {
		item = findItem(nameVec[i]);
		assert(item->type() & Configuration::CFG_VARIABLES);
		item->dump(buf, item->name(), wantExpandedUidNames, indentLevel);
	}

	//--------
	// Second pass. Dump the nested scopes
	//--------
	listLocalNames(Configuration::CFG_SCOPE, nameVec);
	nameVec.sort();
	len = nameVec.length();
	for (i = 0; i < len; i++) {
		item = findItem(nameVec[i]);
		assert(item->type() == Configuration::CFG_SCOPE);
		item->dump(buf, item->name(), wantExpandedUidNames, indentLevel);
	}
}