本文整理汇总了C++中Type::FunctionMemberAt方法的典型用法代码示例。如果您正苦于以下问题:C++ Type::FunctionMemberAt方法的具体用法?C++ Type::FunctionMemberAt怎么用?C++ Type::FunctionMemberAt使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Type
的用法示例。
在下文中一共展示了Type::FunctionMemberAt方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: main
int main ( int argc, char *argv[] ) {
std::cout << "\nReflex C++ Test...\n";
std::string className("MyClass");
std::cout << "\nAnalyzing class: " << className;
std::cout << "\n-----------------";
Type myType = Type::ByName ( className );
std::cout << "\nListing out all functions that contain Annotations... " << std::endl;
int numberOfMembers = myType.FunctionMemberSize ( INHERITEDMEMBERS_NO );
// FunctionMember_Begin
for ( int i=0; i < numberOfMembers; i++ ) {
Member member = myType.FunctionMemberAt ( i, INHERITEDMEMBERS_NO );
if ( member.IsStatic ( ) == true ) {
AnnotationList annotationList = member.Annotations();
if ( annotationList.AnnotationSize() > 0 ) {
if ( annotationList.HasAnnotation ( typeid(ExcelFunction) ) ) {
const ExcelFunction* func = annotationList.AnnotationWithType<ExcelFunction> ( );
std::cout << "\n";
std::cout << "\nfunc.name: " << func->getName();
std::cout << "\nfunc.help: " << func->getHelp ();
std::cout << "\nfunc.category: " << func->getCategory ();
std::cout << "\nfunc.argHelp: " << func->getArgHelp ();
/*
int result = 0;
std::vector<void *> parameters;
int age_parm = 33;
float mul_parm = 0.5;
parameters.push_back ( &age_parm );
parameters.push_back ( &mul_parm );
member.Invoke <int &> ( result, parameters );
std::cout << "\nResult of invoking: " << result;
std::cout << "\nPlus 7 = " << result + 7;
*/
}
}
}
}
return (0);
}