CppCMS
Public Member Functions | Static Public Member Functions
cppcms::views::pool Class Reference

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>

Inheritance diagram for cppcms::views::pool:
booster::noncopyable

List of all members.

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 poolinstance ()

Detailed Description

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


Member Function Documentation

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 ( )

Get all loaded views

This function is thread safe

static pool& cppcms::views::pool::instance ( ) [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.

Parameters:
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


The documentation for this class was generated from the following file: