From: Josef S. <js...@ya...> - 2006-09-14 17:56:36
|
Why do some functions need a Conn while others need an Element, e.g.: void ShellWrapper::setResponse( Conn* c, string value ) { static_cast< ShellWrapper* >( c->parent() )->response_ = value; } string ShellWrapper::getResponse( const Element* e ) { return static_cast< const ShellWrapper* >( e )->response_; } (oooh. and I suppose Conn* could be const in setResponse since we're not changing c, we're changing the Element) joe Software Engineer Linux/OSX C/C++/Java |