[Click] confused about HandlerCall::call_write context

Eddie Kohler kohler at cs.ucla.edu
Sat Dec 9 22:12:34 EST 2006


Hi Peter, sorry for delay;

The "context" element defines the compound-element context for any element 
name lookups.  You are right that it's safe to pass the current element in to 
call_write's "context" slot; in fact that's the right thing to do.

Eddie


Peter De Cleyn wrote:
> Hi all,
> 
> I was trying to reuse some older code (click 1.4.3) with the current CVS
> branch and fell over a change in the HandlerCall::call_write functions. I
> used it to call handlers of elements of which I knew the name, but did not
> had a pointer to. In the old days, you had to supply a Router object at
> which the handlers were registered.
> 
> static int call_write(const String& hdesc_with_value, Router*, ErrorHandler*
> = 0);
> 
> Now instead, an element is expected wich in the header files is called
> 'context'.
> 
> static int HandlerCall::call_write(const String&, Element*, ErrorHandler*)
> 
> Could anyone (Eddy?) give me a clue about this context element? Can I just
> pass a pointer to the element which is calling the call_write function and
> expect the same behaviour?
> 
> thanks
> 
> Peter
> _______________________________________________
> click mailing list
> click at amsterdam.lcs.mit.edu
> https://amsterdam.lcs.mit.edu/mailman/listinfo/click


More information about the click mailing list