8 #ifndef CPPCMS_APPLICATION_H
9 #define CPPCMS_APPLICATION_H
11 #include <cppcms/defs.h>
12 #include <booster/noncopyable.h>
13 #include <booster/hold_ptr.h>
14 #include <booster/atomic_counter.h>
15 #include <booster/intrusive_ptr.h>
16 #include <booster/shared_ptr.h>
34 class applications_pool;
37 class cache_interface;
38 class session_interface;
152 void render(std::string template_name,
base_content &content);
159 void render(std::string skin,std::string template_name,
base_content &content);
167 void render(std::string template_name,std::ostream &out,
base_content &content);
175 void render(std::string skin,std::string template_name,std::ostream &out,
base_content &content);
191 void add(
application &app,std::string
const ®ex,
int part);
203 void add(
application &app,std::string
const &name,std::string
const &url,std::string
const ®ex,
int part);
212 void add(
application &app,std::string
const &name,std::string
const &url);
224 void attach(
application *app,std::string
const ®ex,
int part);
231 void attach(
application *app,std::string
const &name,std::string
const &url);
240 void attach(
application *app,std::string
const &name,std::string
const &url,std::string
const ®ex,
int part);
278 bool is_asynchronous();
290 virtual void main(std::string url);
301 virtual void clear();
310 std::string
translate(
char const *message);
314 std::string
translate(
char const *context,
char const *single,
char const *plural,
int n);
318 std::string
translate(
char const *single,
char const *plural,
int n);
326 std::string url(std::string
const &key);
333 std::string url(std::string
const &key,
341 std::string url(std::string
const &key,
350 std::string url(std::string
const &key,
360 std::string url(std::string
const &key,
370 std::string url(std::string
const &key,
381 std::string url(std::string
const &key,
394 void pool_id(
int id);
406 friend void booster::intrusive_ptr_add_ref(
application *p);
407 friend void booster::intrusive_ptr_release(
application *p);
This class is central representation of json objects.
Definition: json.h:142
This class represent the central event loop of the CppCMS applications.
Definition: service.h:59
This class provides an access to an application for session management.
Definition: session_interface.h:69
basic_message< CharType > translate(CharType const *msg)
Translate a message, msg is not copied.
Definition: message.h:530
context is a central class that holds all specific connection related information. It encapsulates CGI request and response, cache, session and locale information
Definition: http_context.h:45
This is a simple polymorphic class that every content for templates rendering should be derided from ...
Definition: base_content.h:23
class for mapping URLs - the opposite of dispatch
Definition: url_mapper.h:149
this class represents all HTTP/CGI response related API, generation of output content and HTTP header...
Definition: http_response.h:31
application class is the base class for all user created applications.
Definition: application.h:81
This class is the major gateway of the application to CppCMS caching abilities. Any access too cache ...
Definition: cache_interface.h:137
basic_message< char > message
Definition: message.h:494
Application pool is the central class that holds user created applications.
Definition: applications_pool.h:41
This class is used to glue between member function of application class and urls. ...
Definition: url_dispatcher.h:45
A special proxy object for writing any object to a std::ostream.
Definition: filters.h:34
Atomic counter is a class that allows perform counting in thread safe way.
Definition: atomic_counter.h:33
This class makes impossible to copy any class derived from this one.
Definition: noncopyable.h:15
This class represents all information related to the HTTP/CGI request.
Definition: http_request.h:34