void CCharInfoExtractorFactory::registerInfoExtractor(NLMISC::CSmartPtr<ICharInfoExtractorBuilder> infoExtractor)
{
	// ensure that we don't have a name conflict with an existing info extractor
	for (uint32 i=0;i<_InfoExtractors.size();++i)
	{
		nlassert(infoExtractor->getName()!=_InfoExtractors[i]->getName());
	}

	// add the new info extractor
	_InfoExtractors.push_back(infoExtractor);
}
Esempio n. 2
0
void CCharScanScriptCommandRegistry::registerScriptCommand(NLMISC::CSmartPtr<ICharScanScriptCommand> scriptCommand)
{
	// ensure that we don't have a name conflict with an existing script command
	for (uint32 i=0;i<_ScriptCommands.size();++i)
	{
		nlassert(scriptCommand->getName()!=_ScriptCommands[i]->getName());
	}

	// add the new script command
	_ScriptCommands.push_back(scriptCommand);
}