[Cppcms-users] How to get attached applications?
Brought to you by:
artyom-beilis
From: sergey l. <ccp...@gm...> - 2012-10-20 08:25:42
|
Dear All! How can I get attached application (attached_app) from main application (main_app)? I need to call some functions (for example attached_app::check()) from attached application (attached_app) in main application (main_app) before redirect to another page or process further. For example my application consist of: int main() { ... service.applications_pool().mount(cppcms::applications_factory<main_app>()); ... } bool attached_app::check() { return true; } main_app::main_app(cppcms::service &service) : cppcms::application(service) { ... attach(new attached_app(service), "index", "{1}", "^(.*)$", 1); ... } main_app::main(std::string url) { /* There I need to call attached_app::check() first to check user session variables and url before redirect to another page or process further. */ } Thanks in advance! |