Re: [Cppcms-users] Post-attach/add hook in cppcms::application
Brought to you by:
artyom-beilis
|
From: Artyom B. <art...@ya...> - 2014-03-06 10:36:07
|
The factory is provided for the topmost application in hierarchy.
How it works.
You define an application A at mount point /foo/bar
The A has subapplications b & c, while c has sub applications d and e
Tree:
A
/\
b c
/\
d e
Now when the factory object is requested, the ENTIRE should usually be created and stored in the pool. i.e. pool may own several A's which are actually roots of multiple trees.
You can build a tree in a constructor or in a method that is called by the factory.
The idea is that once the application (tree) is created the URL dispatcher would know how to route the relevant requests.
Of course when you "add" or "attach" a child to a tree you can call any his members you want before or after add/attach
I hope it is clear now.
Artyom Beilis
--------------
CppCMS - C++ Web Framework: http://cppcms.com/
CppDB - C++ SQL Connectivity: http://cppcms.com/sql/cppdb/
--------------------------------------------
On Thu, 3/6/14, Joerg Sonnenberger <jo...@br...> wrote:
Subject: Re: [Cppcms-users] Post-attach/add hook in cppcms::application
To: cpp...@li...
Date: Thursday, March 6, 2014, 1:11 AM
On Tue, Mar 04, 2014 at 11:07:12PM
-0800, Artyom Beilis wrote:
> See, mount does not actually create any instance. When
you mount an
> application you provide a factory object.
But I am looking at cppcms::application::add and
cppcms::application::attach. Both take application
instances, not
factory classes.
Joerg
------------------------------------------------------------------------------
Subversion Kills Productivity. Get off Subversion & Make
the Move to Perforce.
With Perforce, you get hassle-free workflows. Merge that
actually works.
Faster operations. Version large binaries. Built-in
WAN optimization and the
freedom to use Git, Perforce or both. Make the move to
Perforce.
http://pubads.g.doubleclick.net/gampad/clk?id=122218951&iu=/4140/ostg.clktrk
_______________________________________________
Cppcms-users mailing list
Cpp...@li...
https://lists.sourceforge.net/lists/listinfo/cppcms-users
|