<?php //начало шаблона(файла)
$this->headLink()->appendStylesheet('/css/reset_style.css');
$this->headLink()->appendStylesheet('/css/style.css');
$this->headScript()->appendFile('/js/jquery.js');
?>
<html>
<head>
<?php echo $this->headTitle(); ?>
<?php echo $this->headMeta(); ?>
<?php echo $this->magicHeadLink(); ?>
<?php echo $this->magicHeadScript(); ?>
template<class T>
RequestHandlers::Base* createInstance()
{
return new T();
}
QMap<unsigned int, RequestHandlers::Base*(*)()> handlers;
handlers[1] = createInstance<RequestHandlers::Info>;
handlers[2] = createInstance<RequestHandlers::List>;
RequestHandlers::Base* handler = handlers[2]();
handler->processing(new Request);
QMap<unsigned int, RequestHandlers::Base*(*)()> handlers;
handlers[1] = (RequestHandlers::Base*(*)())createInstance<RequestHandlers::Info>;
handlers[2] = (RequestHandlers::Base*(*)())createInstance<RequestHandlers::List>;
RequestHandlers::Base* handler = handlers[2]();
handler->processing(new Request);