[Click] dynamic_cast ?
Harald Schiöberg
harald at net.t-labs.tu-berlin.de
Fri Nov 6 10:11:09 EST 2009
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Eddie Kohler wrote:
> Hi Harald,
>
> Click already provides a cast() method on Element that should do what
> you want.
Thanks a lot, apparently I'm to blind to see the obvious.
yet (completly off-topic) this segfaults:
int
MultiFlowDispatcher::initialize(ErrorHandler * errh ) {
int i;
for (i=0; i<=1; i++){
if ( input(i).element()->cast("MultiFlowDispatcher") ){
and the debugger tells me that the input has no element
(gdb) p input(0)
$1 = (const Element::Port &) @0x826d324: {_e = 0x0, _port = -1}
are the neighbors not known at initialization time?
Is there anything better than this really ugly thing:
MultiFlowDispatcher::push( ) {
if (!_neighbor_config)
do_neighbor_config()
}
- --
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
iD8DBQFK9DyNy8wrZ9OvkU0RAsl+AJ4+8Y5EP/j8ZlOt7dG78svoqE+uZgCfbmBu
6CCRyQO7iXU0u1R39ce5nx0=
=D1SM
-----END PGP SIGNATURE-----
More information about the click
mailing list