#include <FrameworkView.h>
Public Member Functions | |
virtual | ~FrameworkView ()=default |
virtual std::string | render (const std::map< std::string, std::string > &context={}) const =0 |
Render the view body. | |
virtual std::string | getContentType () const =0 |
Return the MIME content type for this view. | |
virtual void | applyHeaders (HttpResponse &response) const |
Optional hook to set response headers (e.g., Content-Disposition). | |
virtual std::string | render (const nlohmann::json &context) const |
Optional JSON context hook (used by JsonView or convenience). | |
Definition at line 21 of file FrameworkView.h.
|
virtualdefault |
|
inlinevirtual |
Definition at line 38 of file FrameworkView.h.
Referenced by HttpResponse::send().
|
pure virtual |
Implemented in FileView, HtmlTemplateView, JsonView, and StaticView.
Referenced by HttpResponse::send().
|
inlinevirtual |
Definition at line 43 of file FrameworkView.h.
References render().
|
pure virtual |
Optional context (used by templates).
Implemented in StaticView, FileView, HtmlTemplateView, and JsonView.
Referenced by render(), and HttpResponse::send().