|
drogon
C++14/17-based HTTP application framework
|
The templating engine class. More...
#include <drogon/DrTemplateBase.h>


Public Member Functions | |
| virtual std::string | genText (const DrTemplateData &data=DrTemplateData())=0 |
| Generate the text string. | |
| Public Member Functions inherited from drogon::DrObjectBase | |
| virtual const std::string & | className () const |
| Get the class name. | |
| virtual bool | isClass (const std::string &class_name) const |
| Return true if the class name is 'class_name'. | |
Static Public Member Functions | |
| static std::shared_ptr< DrTemplateBase > | newTemplate (const std::string &templateName) |
| Create an object of the implementation class. | |
The templating engine class.
This class can generate a text string from the template file and template data. For more details on the template file, see the wiki site (the 'View' section)
|
pure virtual |
Generate the text string.
| data | represents data rendered in the string in a format according to the template file. |
Implemented in drogon::NotFound.
|
static |
Create an object of the implementation class.
| templateName | represents the name of the template file. A template file is a description file with a special format. Its extension is usually .csp. The user should preprocess the template file with the drogon_ctl tool to create c++ source files. |