CppCMS
|
This is a simple polymorphic class that every content for templates rendering should be derided from it. It does not carry much information with exception of RTTI that allows type-safe casting of user provided content instances to target content class that is used by specific template. More...
#include <cppcms/base_content.h>
Classes | |
class | app_guard |
Special guard class that allows setting and resetting content's rendeding according to the specific scope. More... | |
Public Member Functions | |
base_content (base_content const &) | |
base_content const & | operator= (base_content const &) |
application & | app () |
void | app (application &app) |
void | reset_app () |
bool | has_app () |
This is a simple polymorphic class that every content for templates rendering should be derided from it. It does not carry much information with exception of RTTI that allows type-safe casting of user provided content instances to target content class that is used by specific template.
Get the application that renders current content, throw cppcms_error if the application was not set
Referenced by cppcms::base_content::app_guard::app_guard().
void cppcms::base_content::app | ( | application & | app | ) |
Set the application that renders current
Called automatically by application::render
bool cppcms::base_content::has_app | ( | ) |
Returns true of the application is assigned
Referenced by cppcms::base_content::app_guard::app_guard().
void cppcms::base_content::reset_app | ( | ) |
Resets the application