CPPSERV


Home Projects Jobs Clientele Contact

cppserv


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Container <-> protocol dependancy



> Now, last issue with your
> HttpServletRequest::service(ServletRequest&, ServletResponse&).
> It uses dynamic_cast, which in turn means we'll have to use RTTI for
> whole servlet container, and all servlets. Not something I'm too happy
> about. If we could get around it somehow (while preserving this specific
> type check preferably), it would be nice.
>

We can always repleace the dynamic_cast with static_cast
If you want to have the type check and not use RTTI, you'll have to write
the code that RTTI would have generated by hand. This wouldn't rather give
better results. Of course when one is implementing ones own RTTI one can
choose which classes are under the custom RTTI.
All in all I'm for fully dropping RTTI (and not implementing similar
mechanism) or fully using it (like it is now) with dynamic_casts, typeid
etc.

Authoright © Total Knowledge: 2001-2008