예제 #1
0
//-----------------------------------------------------------------------------
void UIViewFactory::registerViewCreator (const IViewCreator& viewCreator)
{
	ViewCreatorRegistry& registry = getCreatorRegistry ();
#if DEBUG
	if (registry.find (viewCreator.getViewName ()) != registry.end ())
	{
		DebugPrint ("ViewCreateFunction for '%s' already registered\n", viewCreator.getViewName ());
	}
#endif
	registry.insert (std::make_pair (viewCreator.getViewName (), &viewCreator));
}
예제 #2
0
//-----------------------------------------------------------------------------
void UIViewFactory::registerViewCreator (const IViewCreator& viewCreator)
{
	ViewCreatorRegistry& registry = getCreatorRegistry ();
	registry.add (viewCreator.getViewName (), &viewCreator);
}