> The code generated with rtti on is larger even when you do not use
> rtti. If I understnad correctly, it is because new methods are added
> silently to all classes (which brings us back to tags). While this
> code is useful for the inset hierarchy, it will be a simple waste of
> resource for all the other classes. I tried to get figures for Asger
> kernel, but it does not compile without rtti :)
I would much prefer to use dynamic_cast only.
However, I realize that we loose a lot of proprieraty compilers without
RTTI, so I provide the tag solution as well. Yes, the #ifdef stuff is
ugly. Maybe I can come up with some nicer solution, but as Lgb says,
the dynamic_cast serves a dual purpose: Inset identification, and
inset casting in a safe way. So, now I realize that the proper solution
is to implement dynamic_cast<> myself (if possible), and use the real
dynamic_cast<> for this when RTTI is enabled, and the tags when it's not.
Notice that the tags are also meant to be used for other purposes,
which is the reason they are strings, rather than enums.
Anyway, besides the RTTI stuff, did you get the editor working?
Other comments?
Greets,
Asger