finding an element in the configuration using Router::find()
Hamid Farhadi <[email protected]> Mon, 23 Sep 2013 21:46:08 +0900
| Newsgroups | gmane.network.routing.click |
|---|---|
| Message-ID | <[email protected]> |
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