From: glitteringsounds on
Hello,

I need to know about good C++ Reflection API(Would be better if
Microsoft API is available) which enables me to determine the
types(classes,structs,enums,ints,float,doubles...)identification at
runtime, declaring them and finally to call methods on those types at
run time too.

Regards

Usman
From: Preben Friis on
"glitteringsounds" <muhammadusman.khalil(a)gmail.com> wrote in message
news:0c1c7c62-a05a-4a41-bbe8-b32887eb76a5(a)v12g2000prb.googlegroups.com...
> I need to know about good C++ Reflection API(Would be better if
> Microsoft API is available) which enables me to determine the
> types(classes,structs,enums,ints,float,doubles...)identification at
> runtime, declaring them and finally to call methods on those types at
> run time too.

It's called C# ...!

Reflection is not just an API that you can add to any programming language.
In compiled C++ programs all non-exported function names are removed by the
linker, and the parameter names are lost even before that. Functions might
even have been optimized away by the optimizer.

You might as well have requested object oriented assembler ;-)

/Preben Friis

From: John H. on
glitteringsounds wrote:
> I need to know about good C++ Reflection API(Would be better if
> Microsoft API is available) which enables me to determine the
> types(classes,structs,enums,ints,float,doubles...)identification at
> runtime, declaring them and finally to call methods on those types at
> run time too.

You probably are looking for more powerful meta tools than the
following, but in case you are not familiar, check out the C++
concepts of:
typeid
decltype
auto
dynamic_cast