/// <summary>Compile all procedures that are used by the program and that /// can be compiled with a just-in-time compiler. /// The method returns true when all used procedures could be compiled by /// the just-in-time compiler. /// Procedures that could not be compiled are called normally by the /// HDevEngine interpreter. /// To check which procedure could not be compiled and what the reason is /// for that start HDevelop and check there the compilation states. /// </summary> public bool CompileUsedProcedures() { bool ret; HDevProcedure.HCkE(EngineAPI.CompileUsedProceduresForProcedure(this.procedure, out ret)); GC.KeepAlive((object)this); return(ret); }
/// <summary>Loads a local procedure</summary> public void LoadProcedure(HDevProgram program, string procedureName) { if (program.Handle == IntPtr.Zero) { HDevEngineException.ThrowGeneric("Uninitialized program while creating a local procedure call"); } HDevProcedure.HCkE(EngineAPI.LoadProcedure(this.procedure, program.Handle, procedureName)); GC.KeepAlive((object)this); this.UpdateProcedureInfo(); }
/// <summary>Returns all possible slots of the parameter docu</summary> public HTuple QueryParamInfo() { IntPtr tuple; HDevProcedure.HCkE(HalconAPI.CreateTuple(out tuple)); HDevProcedure.HCkE(EngineAPI.QueryParamInfo(this.procedure, tuple)); GC.KeepAlive((object)this); HTuple htuple = HalconAPI.LoadTuple(tuple); HDevProcedure.HCkE(HalconAPI.DestroyTuple(tuple)); return(htuple); }
/// <summary>Returns the info of the refered parameter docu slot</summary> public HTuple GetOutputCtrlParamInfo(int parIdx, string slot) { IntPtr tuple; HDevProcedure.HCkE(HalconAPI.CreateTuple(out tuple)); HDevProcedure.HCkE(EngineAPI.GetOutputCtrlParamInfo(this.procedure, parIdx, slot, tuple)); GC.KeepAlive((object)this); HTuple htuple = HalconAPI.LoadTuple(tuple); HDevProcedure.HCkE(HalconAPI.DestroyTuple(tuple)); return(htuple); }
/// <summary>Returns the names of all refered procedures</summary> public HTuple GetUsedProcedureNames() { IntPtr tuple; HDevProcedure.HCkE(HalconAPI.CreateTuple(out tuple)); HDevProcedure.HCkE(EngineAPI.GetUsedProcedureNamesForProcedure(this.procedure, tuple)); GC.KeepAlive((object)this); HTuple htuple = HalconAPI.LoadTuple(tuple); HDevProcedure.HCkE(HalconAPI.DestroyTuple(tuple)); return(htuple); }
/// <summary>Loads a local procedure</summary> public void LoadProcedure(string programName, string procedureName) { HDevProcedure.HCkE(EngineAPI.LoadProcedure(this.procedure, programName, procedureName)); GC.KeepAlive((object)this); this.UpdateProcedureInfo(); }
/// <summary>Creates an empty procedure instance</summary> public HDevProcedure() { HDevProcedure.HCkE(EngineAPI.CreateProcedure(out this.procedure)); GC.KeepAlive((object)this); }