I do not want the "ZFraction" and "ZIrrational" to be a subclass of "ZInteger".
I want the "ZFraction" and "ZIrrational" to be a subclass of "Real". I have edited and corrected my original question.
We keep ZFraction , because we want to store say 1/3 instead of 0.3333333333.....
but many Irrational do not have fraction representations, they may be quadratic surds etc.
Actually, I want to develop a object oriented scripted framework for high speed " mathematical computation", as it needs to be very high speed hence i am not doing it in java. I want to do it ALL in C++ classes, but only the interfaces will be exposed to angelscript. The reason i chose angelscript has nothing to do with static typing or feature x or feature y . i chose angelscript because it lets me define "my own" types(ie, value types) which will exist on "stack", not on heap, this will give me less cost to speed performance compared to heap approach. This (custom-classes on stack) is not possible in almost any of the C like syntax based scripting languages for C++, it seems to be possible only in angelscript.
But on the above said url in my question , when i was preliminarily reading . It says that if i make them value types then i can not make object oriented heriarchies in them.my heirarchy (ZFraction and ZIrrational are subclasses of ZReal . There are other classes in this heirarchy as well ZComplex, ZNatural ) etc. All will be implemented as C++ classes as proper parent and child classes.
Now, you said in your reply that "It's currently not possible to do reference casts for value types, but that doesn't mean you can't register both ZInteger and ZFraction even if they are base and subclass in C++."
Now, from your reply i could not understand much, that by any workaround whether you are saying its possible: yes or no .
If i expose ZFraction and ZIrrational and ZReal (originally implemtned in C++) to angelscript as VALUE TYPE,
then are you saying that i can still expose child-parent relationship of ZFraction and ZReal to angelscript, even if they are value types, using some workaround? Any relevant url for this?
sorry for the trouble, but its extremely important for me.
Edited by randomguy12345, 06 September 2012 - 07:58 PM.
ha..ha.. Actually my bad. It was a typing mistake.