def AddMissingArguments(self, database): ARG = idlnode.IDLArgument([('Type', ('ScopedName', 'object')), ('Id', 'arg')]) for interface in database.GetInterfaces(): for operation in interface.operations: call_with = (operation.ext_attrs.get('CallWith', '') + operation.ext_attrs.get('ConstructorCallWith', '')) if 'ScriptArguments' in call_with: operation.arguments.append(ARG)
def AddMissingArguments(self, database): ARG = idlnode.IDLArgument([('Type', ('ScopedName', 'object')), ('Id', 'arg')]) for interface in database.GetInterfaces(): for operation in interface.operations: if operation.ext_attrs.get( 'CallWith') == 'ScriptArguments|CallStack': operation.arguments.append(ARG)
def AddMissingArguments(self, database): ARG = idlnode.IDLArgument([('Type', ('ScopedName', 'object')), ('Id', 'arg')]) for interface in database.GetInterfaces(): for operation in interface.operations: call_with = operation.ext_attrs.get('CallWith', []) if not(isinstance(call_with, list)): call_with = [call_with] constructor_with = operation.ext_attrs.get('ConstructorCallWith', []) if not(isinstance(constructor_with, list)): constructor_with = [constructor_with] call_with = call_with + constructor_with if 'ScriptArguments' in call_with: operation.arguments.append(ARG)