CppCMS
|
This is a singleton object that holds all views in the process. Any view is registered and unregistered via this object. More...
#include <cppcms/views_pool.h>
Public Member Functions | |
void | add (generator const &generator) |
void | remove (generator const &generator) |
void | render (std::string const &skin, std::string const &template_name, std::ostream &out, base_content &content) |
std::vector< std::string > | enumerate () |
Static Public Member Functions | |
static pool & | instance () |
Friends | |
class | view_lock |
This is a singleton object that holds all views in the process. Any view is registered and unregistered via this object.
It is usually not used directly
void cppcms::views::pool::add | ( | generator const & | generator | ) |
Add new skin to pool
This function is thread safe
std::vector<std::string> cppcms::views::pool::enumerate | ( | ) |
|
static |
Get the singleton instance of the views pool
void cppcms::views::pool::remove | ( | generator const & | generator | ) |
Remove the skin from pool
This function is thread safe
void cppcms::views::pool::render | ( | std::string const & | skin, |
std::string const & | template_name, | ||
std::ostream & | out, | ||
base_content & | content | ||
) |
Render Skin
This member function is used to render templates. Generally you should not use it directly, unless you have very good reasons.
skin | - the name of the skin that should be used |
template_name | - the name of template (class) that should be rendered. |
out | - the output stream into which the view should be rendered |
content | - the content that should be rendered using this view. |
This function is thread safe