[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    Re: DRAFT document on coding conventions in kde libraries
From:       "Andras Mantia" <amantia () kdewebdev ! org>
Date:       2006-03-06 11:19:20
Message-ID: 46537.80.86.125.193.1141643960.squirrel () mail ! kdewebdev ! org
[Download RAW message or body]

> On Monday 06 March 2006 10:44, Thiago Macieira wrote:
>> Allan Sandfeld Jensen wrote:
>> >It is unreliable across shared libaries. If you have a non-QObject
>> based
>> >heirachy you should implement your own type-system rather than rely on
>> >dynamic_cast.
>>
>> I'd rather people used dynamic_cast<> rather than write and rewrite
>> their
>> own system.
>>
>> They just have to be warned against the pitfalls that it may represent.
>> In
>> special: do not ever use dynamic_cast in a class that is not marked
>> _EXPORT.
>>
> I don't think that will help with dlopen'ed libraries or plugins.

Ok, I'm confused now. Certainly I never experienced such problems. A Kpart
id dlopened, right? If you load the katepart editor and want to use its
interfaces you do it by dynamic_cast-ing a lot. I never had problems. So
can you give a real example where dynamic_cast can fail?

Andras
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic