[Click] finding an element in the configuration using Router::find()
Hamid Farhadi
qq119512 at iii.u-tokyo.ac.jp
Mon Sep 23 08:46:08 EDT 2013
Hi
using Router::visit_upstream/downstream() in this config elementA can
find elementB:
elementA()->elementB();
But in this one it can not:
elementA();
elementB();
I mean consider some elements like ControlSocket, how can I find it from
another element, please?
Here is how I use Router::visit_upstream/downstream():
ElementCastTracker filter(router() , "elementB" );
Element* e = router()->visit_upstream( this , 0 , &filter );
elementB* b = (elementB*)filter[0]->cast( "elementB" );
If the solution is Router::find(), I could not find an example of how to
use it. when it returns an element, how should I cast it to use its members?
Any help is appreciated,
Hamid
More information about the click
mailing list