[Click] Passing a element declaration to an elementclass as parameter

Cliff Frey cliff at meraki.com
Tue Jun 19 10:28:22 EDT 2012


Not directly possible.

The closest that you can do is either using some other macro language (i.e.
the c preprocessor), or making a 2-input, 2-output elementclass, where you
do

my_eltclass [1] -> CONFIG_STUFF_GOES_HERE -> [1] my_eltclass;

Cliff

On Tue, Jun 19, 2012 at 6:56 AM, <thomas_mailinglist at gmx.de> wrote:

> Hello,
>
> let's have a look on the following example:
>
> ####################
> b :: Tee(1);
>
> elementclass foo {
>        $param1 |
>
>        input[0] -> $param1 -> [0]output;
> }
>
> Idle() -> a::foo(b) -> Discard;
> ####################
>
> Is a construction like this possible in click? I want to declare an
> instance of the element Tee which is passed to an elementclass as
> configuration parameter and that can be used inside this elementclass.
> If I use an element with no inputs and outputs instead of Tee, it is
> possible to pass this declared name to other elementclasses. But which
> possibilities do I have with an element including inputs and outputs?
>
> Thanks,
>
> Thomas
>
> --
> Empfehlen Sie GMX DSL Ihren Freunden und Bekannten und wir
> belohnen Sie mit bis zu 50,- Euro! https://freundschaftswerbung.gmx.de
> _______________________________________________
> click mailing list
> click at amsterdam.lcs.mit.edu
> https://amsterdam.lcs.mit.edu/mailman/listinfo/click
>


More information about the click mailing list