Page 1 of 1

userland irrVariant useful?

Posted: Mon Mar 16, 2009 8:18 pm
by Nox
hi,

i have a created a patch which should make the Attributesystem more maintainable. To archive this i created a Variant class. My question is:

Do you think that a user-land irrVariant will make some thinks easier?

Some advantages:
-the IAttributes.h+.cpp could be made templated and this will increase maintainability and decrease the filesize combined with a apichange extremely
-a Variant could be used for every GUIElement which enables the user to select something. Inplace of a ID a userpointer could be stored but the Variant wont be as fast as a directly stored userpointer/IReferenceCounted (may be we could add directly stored userpointers anyway ;) )

So may be give me some feedback if i should elaborate that class or if i should go ahead to another topic.

Posted: Wed Mar 18, 2009 3:28 am
by grafikrobot
How is it better / worse / different than Boost Variant and Boost Any?

Posted: Wed Mar 18, 2009 7:04 pm
by Nox
I guess it will never get close to the comfort of a boost solution but boost is neither part of irrlicht nor used by irrlicht. Primarily a userland Variant combined with a api change relating to the Attributesystem could make the Interface quite simpler (may be). Moreover it could be used for the GUI as allready mentioned.