[xsd-users] How to know the member functions at run time
Boris Kolpackov
boris at codesynthesis.com
Mon Apr 3 09:30:04 EDT 2006
Hi Yongsheng,
Please keep xsd-users mailing list CC'ed when you reply. This way other
people who have a similar question in the future will be able to find
the answer by searching the archives.
Zhao, Yongsheng <yongsheng.zhao at nortelgov.com> writes:
> Thanks for your reply. In your case you assume you know there is a member
> function called priority() in the class. If I would like to traverse all the
> member functions of the class, but I don't know what the member functions
> are in prior, is there a way to do it dynamically? Thank you.
You could iterate over DOM elements and attributes. This will correspond
to member functions. However, if you don't know which member functions
to expect, you probably also don't know which types those member functions
return so I don't see how this can be useful to you. In other words, when
you have a DOM node for some element or attribute "foo", you can obtain
the pointer to corresponding tree node as xml_schema::type* but, since
you don't know anything about "foo", you most likely also don't know
anything about the actual type of the tree node.
Could you tell us a little bit about what you are trying to do. Perhaps
there is a better solution to your problem.
hth,
-boris
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 652 bytes
Desc: Digital signature
Url : http://codesynthesis.com/pipermail/xsd-users/attachments/20060403/210247a7/attachment.pgp
More information about the xsd-users
mailing list