public virtual void MakeInArgument(CodeTypeFactory codetypefactoryIn , string idlMethodName , ref int nInArgCounter , Udbus.Parsing.BuildContext context , ref CodeThrowExceptionStatement throwargInPrev , IDLMethodArgument idlMethodArg , Udbus.Parsing.IDLArgumentTypeNameBuilderBase nameBuilder , ref ParamCodeTypeHolderMarshalBase paramtypeHolder , ref CodeTypeReference typerefParam , out CodeConditionStatement condVarResult) { marshal.inward.ParamCodeTypeHolderMarshalIn paramtypeHolderIn = new marshal.inward.ParamCodeTypeHolderMarshalIn(codetypefactoryIn); Udbus.Parsing.CodeBuilderHelper.BuildCodeParamType(paramtypeHolderIn, nameBuilder, idlMethodArg.Type, context); paramtypeHolder = paramtypeHolderIn; /*typerefParamIter = */ typerefParam = paramtypeHolder.paramtype.CodeType; condVarResult = new CodeConditionStatement( // * if (this.result == 0) exprResultOk , new CodeStatement[] // True statements { // * this.result = builder.Marshal<arg_type>(<marshal_function>, <arg_name>); new CodeAssignStatement(fieldrefResult, paramtypeHolderIn.BuildWriteExpression(varrefBuilder, MarshalArgument(idlMethodName, idlMethodArg))) } , new CodeStatement[] // False statements { throwargInPrev } ); throwargInPrev = new CodeThrowExceptionStatement( new CodeMethodInvokeExpression(MarshalBuilderHelper.typerefexprArgumentInException, "Create", new CodePrimitiveExpression(nInArgCounter + 1), new CodePrimitiveExpression(idlMethodArg.Name), new CodeTypeOfExpression(typerefParam), fieldrefResult, new CodePrimitiveExpression(idlMethodName), fieldrefConnectionParameters ) ); ++nInArgCounter; }
public ArrayParamCodeTypeHolderMarshalIn(ParamCodeTypeHolderMarshalIn owner) : base(owner.CodeTypeFactory) { this.owner = owner; }
/// <summary> /// Set the reference type for the marshalling method. /// </summary> /// <param name="typeMethod">Type being marshalled</param> protected static void SetMethodType(ParamCodeTypeHolderMarshalIn owner, CodeTypeReference typeMethod) { if (owner.methodTypes != null) { // Runtime error. } owner.methodTypes = new CodeTypeReference[] { typeMethod }; }
protected static void SetExpressionBuilder(ParamCodeTypeHolderMarshalIn owner, IWriteExpressionBuilder exprbuilder) { owner.exprbuilder = exprbuilder; }
/// <summary> /// Remove reference type for the marshalling method. /// </summary> /// <param name="owner"></param> /// <param name="typeMethod"></param> protected static void ClearMethodType(ParamCodeTypeHolderMarshalIn owner) { owner.methodTypes = null; }
public ValueArrayParamCodeTypeHolderMarshalIn(ParamCodeTypeHolderMarshalIn owner) : base(owner) { }