CppCMS
|
The class that represents a single skin and generates its views. More...
#include <cppcms/views_pool.h>
Public Types | |
typedef std::auto_ptr< base_view > | view_factory_type(std::ostream &, base_content *c) |
The callback that creates a single view. | |
Public Member Functions | |
template<typename View , typename Content > | |
void | add_view (std::string const &view_name, bool safe=true) |
void | add_factory (std::string const &name, view_factory_type *factory) |
std::string | name () const |
void | name (std::string const &n) |
std::auto_ptr< base_view > | create (std::string const &view_name, std::ostream &output, base_content *content) const |
std::vector< std::string > | enumerate () const |
The class that represents a single skin and generates its views.
Usually used by templates compiler
void cppcms::views::generator::add_factory | ( | std::string const & | name, |
view_factory_type * | factory | ||
) |
Add a view that uses a callback
|
inline |
Add a single view of type View that uses content of type Content Using name view_name.
If safe is true that dynamic cast is used to ensure that content has proper type otherwise static cast.
Usually used by templates generator
std::auto_ptr<base_view> cppcms::views::generator::create | ( | std::string const & | view_name, |
std::ostream & | output, | ||
base_content * | content | ||
) | const |
Create a view by its name that writes that data to outout using a content content.
std::vector<std::string> cppcms::views::generator::enumerate | ( | ) | const |
Enumerate view names
std::string cppcms::views::generator::name | ( | ) | const |
Get skin name
void cppcms::views::generator::name | ( | std::string const & | n | ) |
Set skin name