C
cutecutemouse
---------------------------This is my
task:--------------------------------------
There are hundred of similar classes and a large file(in processing)
with thousand of instances of these classes. I should export these
instances into a XML file (I use Tiny XML), however not total
instances, but these which belong to the selected classes and the
selected attributes(member variable and value). In advance, I will
have a configuration file (also XML format), to define which classes
and which attributes we need, that is a user-defined file.
The problem are:
1, How do I get the name of a class? Just like by Java the
method .getclass() or instanceof ?
2, Is it possible to have such as an iterator to traverse through
all the variables/functions, to only call the functions and to get
the values of variables we need by name?
Thank you very much for your reply, indeed.
task:--------------------------------------
There are hundred of similar classes and a large file(in processing)
with thousand of instances of these classes. I should export these
instances into a XML file (I use Tiny XML), however not total
instances, but these which belong to the selected classes and the
selected attributes(member variable and value). In advance, I will
have a configuration file (also XML format), to define which classes
and which attributes we need, that is a user-defined file.
The problem are:
1, How do I get the name of a class? Just like by Java the
method .getclass() or instanceof ?
2, Is it possible to have such as an iterator to traverse through
all the variables/functions, to only call the functions and to get
the values of variables we need by name?
Thank you very much for your reply, indeed.