CppCMS
Classes | Public Member Functions | List of all members
cppcms::base_content Class Reference

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 &)
 
applicationapp ()
 
void app (application &app)
 
void reset_app ()
 
bool has_app ()
 

Detailed Description

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.

Member Function Documentation

application& cppcms::base_content::app ( )

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


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