[Click] dynamic_cast ?
Harald Schiöberg
harald at net.t-labs.tu-berlin.de
Thu Nov 5 07:39:41 EST 2009
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
does anyone know whether this is safe to do in click ?
class Foo : public Element { ... }
class FooBar : public Foo { ... }
Foo::some_method() {
Element downstream;
downstream = output[0].element();
if ( dynamic_cast<Foo>(e) ) {
... e is a foo ...
} else {
.... e is not a foo ...
}
}
I currently have no linuxkernel installation, so I can't check for this
case, but I see potential breakage, since this requires a bit of
compiler magic.
- --
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
iD8DBQFK8seMy8wrZ9OvkU0RAhuhAJ0eYpMbgkXBKCOHpwThJhAIrz+AxwCfYWmn
/6Ym0puh/5mvuSVz6OwYvuc=
=2o3a
-----END PGP SIGNATURE-----
More information about the click
mailing list