获取类的方法列表 [英] Get the list of methods of a class

查看:78
本文介绍了获取类的方法列表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有一种方法来创建指向C ++类的每个方法的指针的列表(例如数组)?

Is there a way to create a list (e.g. an array) of pointers to each method of a C++ class?

类似类型。

Something like Type.GetMethods() in the .NET framework, but using only standard C++.

推荐答案

没有这个是不可能的一般方式。 C ++没有与.Net拥有相同的元数据基础设施。

No this is not possible in a general way. C++ does not have the same metadata infrastructure that .Net posses.

您能否向我们提供您要使用此信息的情况?可能有一个更好的方法可以使用C ++

Could you provide us with a scenario where you want to use this information? There may be a better approach you can use with C++

这篇关于获取类的方法列表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆