Damnit, and I thought it would work this time! I forgot one little detail about the RTTI functionality. I got it fixed, but I won't be able to access objects normally. Only way I could guerantee it was to allocate the object data itself dynamically and store in a special class made for accessing it. This is so far the only possible solution I could come up with. Oh man, that sucks! What's the point of having RTTI when you can't access objects the normal way you'd usually do without? Seriously, I'm angry about this. It effectively minimizes the previous awesomness about it. If I want to use RTTI in a productive way, I don't want to bother about a special syntax. I want it EXACTLY like the normal syntax. Of course is that possible when you choose to make everything RTTI - but's that NOT what I WANT!


That feels much better. However, my real problem is that if I use a base object for every class (and thus beeing able to access class member with no special function, "object.member") I'd need to make that for every object even if I don't want to always have RTTI for this class. My current version bases on a template wrapper that is derived from the class you wish to make an RTTI object of. The drawback of it is that you can't access the typeID cause depending on how big the original base class was, the typeID will have a different offset and will thus not be found. So you can only solve this by making a special object class that points to an allocated member. So you can always access the typeID with no different offset. But hey, I got an idea... I could implement sizeof() in a special variant and offset from the object address to it's typeID storage. That's a good solution I think! I only need to implement some more bits and maybe some other things, too. However, I think this could still work fine then. Yes, maybe not everything is lost. Atleast I hope so.

No comments: