[Click] Names of elementclass instances in the elementclass

Harald Schiöberg harald at net.t-labs.tu-berlin.de
Mon Apr 12 05:28:36 EDT 2010


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Cliff Frey wrote:
> I believe that the config, exactly as you pasted it, will work just
> fine.  Specifically, if in MyElement::configure(), you use cp_va_kparse with
>   cpElementCast, 0, "MyOtherElement", &_other_elt_ptr,
> 
> then I believe that you will see exactly the effect that you want.  

Thanks a lot: works...
I missed cpElementCast and used cpString + router->find() , which
obviously does not do the job.

	Harald


When
> searching for the element named e2, it will start in the current scope
> (the elementclass instantiation) and search upwards until it finds a match.
> 
> Cliff
> 
> 2010/4/7 Harald Schiöberg <harald at net.t-labs.tu-berlin.de
> <mailto:harald at net.t-labs.tu-berlin.de>>
> 
> Hello,
> 
> Is there a clean way to express this within a click config:
> 
> elementclass MyClass {
>        MyElement(OTHER_ELEMENT e2)
>        e2 :: MyOtherElement()
> }
> 
> This should read something like :
>        MyElement(OTHER_ELEMENT $CLASS_INSTANCE_NAME/e2)
> 
> is there something along these lines ?
> 
> thanks,

_______________________________________________
click mailing list
click at amsterdam.lcs.mit.edu <mailto:click at amsterdam.lcs.mit.edu>
https://amsterdam.lcs.mit.edu/mailman/listinfo/click




- --
Harald Schiöberg
Technische Universität Berlin | T-Laboratories | FG INET
www: http://www.net.t-labs.tu-berlin.de
Phone: +49-(0)30-8353-58476 | Fax: +49-(0)391 534 783 47
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFLwufDy8wrZ9OvkU0RAilOAJ9qSZnS1RIPYlQ8Ui3GIsq/jPqIVQCfU8eY
Uw62XsgKaJpH8/f0UglqA+0=
=YNiR
-----END PGP SIGNATURE-----



More information about the click mailing list