public Boolean adapt(Function value) { return config.convertBodies || !value.hasModifier(ModifierType.Inline); } };
public Boolean adapt(Function value) { return config.convertBodies || !value.hasModifier(ModifierType.Inline); } };
void addCallingConventionAnnotation(Function originalFunction, ModifiableElement target) { Convention.Style cc = null; if (originalFunction.hasModifier(ModifierType.__stdcall)) { cc = Convention.Style.StdCall; } else if (originalFunction.hasModifier(ModifierType.__fastcall)) { cc = Convention.Style.FastCall; } else if (originalFunction.hasModifier(ModifierType.__thiscall)) { cc = Convention.Style.ThisCall; } else if (originalFunction.hasModifier(ModifierType.__pascal)) { cc = Convention.Style.Pascal; } if (cc != null) { target.addAnnotation(new Annotation(typeRef(Convention.class), enumRef(cc))); } }
void addCallingConventionAnnotation(Function originalFunction, ModifiableElement target) { Convention.Style cc = null; if (originalFunction.hasModifier(ModifierType.__stdcall)) { cc = Convention.Style.StdCall; } else if (originalFunction.hasModifier(ModifierType.__fastcall)) { cc = Convention.Style.FastCall; } else if (originalFunction.hasModifier(ModifierType.__thiscall)) { cc = Convention.Style.ThisCall; } else if (originalFunction.hasModifier(ModifierType.__pascal)) { cc = Convention.Style.Pascal; } if (cc != null) { target.addAnnotation(new Annotation(typeRef(Convention.class), enumRef(cc))); } }
@Override public Struct convertCallback(FunctionSignature functionSignature, Signatures signatures, Identifier callerLibraryName) { Struct decl = super.convertCallback(functionSignature, signatures, callerLibraryName); if (decl != null) { List<Modifier> mods = functionSignature.getFunction().getModifiers(); decl.setParents(Arrays.asList((SimpleTypeRef) typeRef( functionSignature.getFunction().hasModifier(ModifierType.__stdcall) ? StdCallLibrary.StdCallCallback.class : result.config.runtime.callbackClass))); } return decl; } static Map<Class<?>, Pair<List<Pair<Function, String>>, Set<String>>> cachedForcedMethodsAndTheirSignatures;
@Override public Struct convertCallback(FunctionSignature functionSignature, Signatures signatures, Identifier callerLibraryName) { Struct decl = super.convertCallback(functionSignature, signatures, callerLibraryName); if (decl != null) { List<Modifier> mods = functionSignature.getFunction().getModifiers(); decl.setParents(Arrays.asList((SimpleTypeRef) typeRef( functionSignature.getFunction().hasModifier(ModifierType.__stdcall) ? StdCallLibrary.StdCallCallback.class : result.config.runtime.callbackClass))); } return decl; } static Map<Class<?>, Pair<List<Pair<Function, String>>, Set<String>>> cachedForcedMethodsAndTheirSignatures;
Element parent = function.getParentElement(); MemberVisibility visibility = function.getVisibility(); boolean isPublic = visibility == MemberVisibility.Public || function.hasModifier(ModifierType.Public); boolean isPrivate = visibility == MemberVisibility.Private || function.hasModifier(ModifierType.Private); boolean isProtected = visibility == MemberVisibility.Protected || function.hasModifier(ModifierType.Protected); boolean isInStruct = parent instanceof Struct; if (isInStruct && result.config.skipPrivateMembers && (isPrivate || !isPublic && !isProtected)) { return; boolean isStatic = function.hasModifier(ModifierType.Static); boolean isConstructor = iConstructor != -1;
Element parent = function.getParentElement(); MemberVisibility visibility = function.getVisibility(); boolean isPublic = visibility == MemberVisibility.Public || function.hasModifier(ModifierType.Public); boolean isPrivate = visibility == MemberVisibility.Private || function.hasModifier(ModifierType.Private); boolean isProtected = visibility == MemberVisibility.Protected || function.hasModifier(ModifierType.Protected); boolean isInStruct = parent instanceof Struct; if (isInStruct && result.config.skipPrivateMembers && (isPrivate || !isPublic && !isProtected)) { return; boolean isStatic = function.hasModifier(ModifierType.Static); boolean isConstructor = iConstructor != -1;
result.declarationsConverter.convertFunction(f, null/*signatures*/, false, out, out, fullClassName, -1); if (f.hasModifier(ModifierType.Static)) { for (Declaration decl : decls) { if (!add(classStruct, decl, signatures, objSigs, clasSigs)) {
result.declarationsConverter.convertFunction(f, null/*signatures*/, false, out, out, fullClassName, -1); if (f.hasModifier(ModifierType.Static)) { for (Declaration decl : decls) { if (!add(classStruct, decl, signatures, objSigs, clasSigs)) {
List<Expression> args = new ArrayList<Expression>(); boolean isStatic = f.hasModifier(ModifierType.Static); int iArg = 0; for (Arg arg : new ArrayList<Arg>(method.getArgs())) {
List<Expression> args = new ArrayList<Expression>(); boolean isStatic = f.hasModifier(ModifierType.Static); int iArg = 0; for (Arg arg : new ArrayList<Arg>(method.getArgs())) {
Function f = (Function) d; boolean isVirtual = f.hasModifier(ModifierType.Virtual); boolean isConstructor = f.getName().equals(structName) && (f.getValueType() == null || f.getValueType().toString().equals("void")); if (isConstructor && f.getArgs().isEmpty()) {
Function f = (Function) d; boolean isVirtual = f.hasModifier(ModifierType.Virtual); boolean isConstructor = f.getName().equals(structName) && (f.getValueType() == null || f.getValueType().toString().equals("void")); if (isConstructor && f.getArgs().isEmpty()) {
if (functions != null) { for (Function function : functions) { if (function.hasModifier(ModifierType.__stdcall)) { stdcall = true; break;
if (functions != null) { for (Function function : functions) { if (function.hasModifier(ModifierType.__stdcall)) { stdcall = true; break;