本文整理汇总了C++中MemberInfo::isConstructor方法的典型用法代码示例。如果您正苦于以下问题:C++ MemberInfo::isConstructor方法的具体用法?C++ MemberInfo::isConstructor怎么用?C++ MemberInfo::isConstructor使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MemberInfo
的用法示例。
在下文中一共展示了MemberInfo::isConstructor方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: isNativeMemberPure
bool Type::isNativeMemberPure(bool ignoreStaticMembers)
{
//if (!attr.isNative)
// return false;
for (UTsize i = 0; i < members.size(); i++)
{
MemberInfo *memberInfo = members.at(i);
if (ignoreStaticMembers && memberInfo->isStatic())
{
continue;
}
if (memberInfo->isConstructor())
{
ConstructorInfo *cinfo = (ConstructorInfo *)memberInfo;
if (cinfo->defaultConstructor)
{
continue;
}
}
if (memberInfo->isConstructor() || memberInfo->isMethod())
{
if (!((MethodBase *)memberInfo)->isNative())
{
return false;
}
}
if (memberInfo->isProperty())
{
PropertyInfo *pinfo = (PropertyInfo *)memberInfo;
if (pinfo->getGetMethod() && !pinfo->getGetMethod()->isNative())
{
return false;
}
if (pinfo->getSetMethod() && !pinfo->getSetMethod()->isNative())
{
return false;
}
}
if (memberInfo->isField())
{
if (!memberInfo->getOrdinal())
{
return false;
}
}
}
if (baseType)
{
return baseType->isNativeMemberPure();
}
return true;
}
示例2: findMembers
void Type::findMembers(const MemberTypes& memberTypes,
utArray<MemberInfo *>& membersOut, bool includeBases, bool includePropertyGetterSetters)
{
if (!includeBases)
{
membersOut.clear();
}
for (size_t i = 0; i < members.size(); i++)
{
MemberInfo *m = members.at((int)i);
if (m->isConstructor() && memberTypes.constructor)
{
membersOut.push_back(m);
}
if (m->isMethod() && memberTypes.method)
{
membersOut.push_back(m);
}
if (m->isField() && memberTypes.field)
{
membersOut.push_back(m);
}
if (m->isProperty() && memberTypes.property)
{
membersOut.push_back(m);
if (includePropertyGetterSetters)
{
PropertyInfo *p = (PropertyInfo *)m;
if (p->getter && (p->getter->getDeclaringType() == p->getDeclaringType()))
{
membersOut.push_back(p->getter);
}
if (p->setter && (p->setter->getDeclaringType() == p->getDeclaringType()))
{
membersOut.push_back(p->setter);
}
}
}
}
if (baseType && includeBases)
{
baseType->findMembers(memberTypes, membersOut, true, includePropertyGetterSetters);
}
}
示例3: return
ConstructorInfo *Type::getConstructor()
{
for (UTsize i = 0; i < members.size(); i++)
{
MemberInfo *m = members.at(i);
if (m->isConstructor())
{
return (ConstructorInfo *)m;
}
}
return NULL;
}