Savarese Software Research Corporation
Renderer Class Reference

#include <service.h>

Inheritance diagram for Renderer:

List of all members.

Public Member Functions

 Renderer (caller_type &caller, const RendererInitializer &initializer) SSRC_DECL_THROW(LoadError
virtual ~Renderer ()
virtual void http_get (const request_ptr &request, response_ptr &response)
virtual void http_head (const request_ptr &request, response_ptr &response)
void process_fcgi_request (const fcgx_request_ptr &request)

Protected Types

typedef HTTPServlet
< FCGIRequest, FCGIResponse > 
super_fcgi
typedef ServiceProtocolProcessor super_service

Protected Member Functions

 WISP_IMPORT (protocol_traits, MessageReloadConfig)
virtual void transition (State state)
virtual utility::properties_ptr get_status ()
virtual void set_lua_state (Lua::lua_State *state)
void render_and_cache (const request_ptr &request, response_ptr &response, const bool flush=true)
path find_error_template (const path &error_template, const path &parent_path)
path find_error_template (const path &parent_path)
path find_error_template (const path &parent_path, int index)
void send_error (const HTTPStatusCode status, const request_ptr &request, response_ptr &response, const path &error_template)
void load_environment (const string &environment_name, const bool cache_template) SSRC_DECL_THROW(LuaCallError)
void uncache_template (const string &template_name) SSRC_DECL_THROW(LuaCallError)
void uncache_environment (const string &environment_name) SSRC_DECL_THROW(LuaCallError)
void clear_template_cache ()
path load_template_args (const path &template_path, const char *template_key, const bool cache_environment=false, const bool cache_template=true) SSRC_DECL_THROW(LoadError)
path load_template_args (const path &template_path, const bool cache_environment=false, const bool cache_template=true) SSRC_DECL_THROW(LoadError)
virtual void process_request (const MessageReloadConfig &msg, const MessageInfo &)

Protected Attributes

string _global_env_file
string _template_prefix
path _template_dir
boost::regex _get_path_pattern
Lua::lua_State * _lua_state
int _lua_render_ref
int _lua_load_environment_ref
int _lua_uncache_template_ref
int _lua_uncache_environment_ref
int _lua_clear_rendering_cache_ref
int _lua_init_global_environment_ref

Friends

class NS_SSRC_WISP_SERVICE::ServiceProtocolProcessor< packing_traits >

Detailed Description

Definition at line 71 of file renderer/service.h.


Member Typedef Documentation

typedef HTTPServlet<FCGIRequest, FCGIResponse> Renderer::super_fcgi [protected]

Definition at line 85 of file renderer/service.h.

typedef ServiceProtocolProcessor Renderer::super_service [protected]

Definition at line 86 of file renderer/service.h.


Constructor & Destructor Documentation

Renderer::Renderer ( caller_type &  caller,
const RendererInitializer initializer 
)
Renderer::~Renderer ( ) [virtual]

Definition at line 79 of file renderer/service.cc.

References _lua_state().


Member Function Documentation

void Renderer::clear_template_cache ( ) [protected]

Definition at line 112 of file renderer/service.cc.

References _lua_clear_rendering_cache_ref(), _lua_state(), and pcall().

path Renderer::find_error_template ( const path &  error_template,
const path &  parent_path 
) [protected]

Definition at line 308 of file renderer/service.cc.

References _template_dir(), and _template_prefix().

Referenced by find_error_template().

path Renderer::find_error_template ( const path &  parent_path) [inline, protected]

Definition at line 117 of file renderer/service.h.

References _lua_state, and find_error_template().

path Renderer::find_error_template ( const path &  parent_path,
int  index 
) [inline, protected]

Definition at line 121 of file renderer/service.h.

References _lua_state, and find_error_template().

Definition at line 102 of file renderer/service.cc.

References _lua_state(), and ServiceProtocolProcessor::get_status().

virtual void Renderer::http_get ( const request_ptr &  request,
response_ptr &  response 
) [inline, virtual]

Definition at line 185 of file renderer/service.h.

References render_and_cache().

virtual void Renderer::http_head ( const request_ptr &  request,
response_ptr &  response 
) [inline, virtual]

Definition at line 189 of file renderer/service.h.

References render_and_cache().

void Renderer::load_environment ( const string environment_name,
const bool  cache_template 
) [inline, protected]

Definition at line 130 of file renderer/service.h.

References _lua_load_environment_ref, _lua_state, and pcall_nopop().

path Renderer::load_template_args ( const path &  template_path,
const char *  template_key,
const bool  cache_environment = false,
const bool  cache_template = true 
) [protected]

Referenced by load_template_args().

path Renderer::load_template_args ( const path &  template_path,
const bool  cache_environment = false,
const bool  cache_template = true 
) [inline, protected]

Definition at line 162 of file renderer/service.h.

References load_template_args().

virtual void Renderer::process_request ( const MessageReloadConfig &  msg,
const MessageInfo &   
) [inline, protected, virtual]

Definition at line 172 of file renderer/service.h.

void Renderer::render_and_cache ( const request_ptr &  request,
response_ptr &  response,
const bool  flush = true 
) [protected]
void Renderer::send_error ( const HTTPStatusCode  status,
const request_ptr &  request,
response_ptr &  response,
const path &  error_template 
) [protected]
virtual void Renderer::set_lua_state ( Lua::lua_State *  state) [inline, protected, virtual]

Definition at line 107 of file renderer/service.h.

References _lua_state.

void Renderer::transition ( State  state) [protected, virtual]

Definition at line 87 of file renderer/service.cc.

void Renderer::uncache_environment ( const string environment_name) [inline, protected]

Definition at line 146 of file renderer/service.h.

References _lua_state, _lua_uncache_environment_ref, and pcall().

void Renderer::uncache_template ( const string template_name) [inline, protected]

Definition at line 139 of file renderer/service.h.

References _lua_state, _lua_uncache_template_ref, and pcall().

Renderer::WISP_IMPORT ( protocol_traits  ,
MessageReloadConfig   
) [protected]

Friends And Related Function Documentation

friend class NS_SSRC_WISP_SERVICE::ServiceProtocolProcessor< packing_traits > [friend]

Definition at line 75 of file renderer/service.h.


Member Data Documentation

boost::regex Renderer::_get_path_pattern [protected]

Definition at line 93 of file renderer/service.h.

Definition at line 90 of file renderer/service.h.

Definition at line 100 of file renderer/service.h.

Definition at line 101 of file renderer/service.h.

Definition at line 97 of file renderer/service.h.

Referenced by load_environment().

int Renderer::_lua_render_ref [protected]

Definition at line 96 of file renderer/service.h.

Definition at line 99 of file renderer/service.h.

Referenced by uncache_environment().

Definition at line 98 of file renderer/service.h.

Referenced by uncache_template().

path Renderer::_template_dir [protected]

Definition at line 92 of file renderer/service.h.

Definition at line 91 of file renderer/service.h.


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

Savarese Software Research Corporation
Copyright © 2006-2011 Savarese Software Research Corporation. All rights reserved.