Esempio n. 1
0
        /// <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);
        }
Esempio n. 2
0
 /// <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();
 }
Esempio n. 3
0
        /// <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);
        }
Esempio n. 4
0
        /// <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);
        }
Esempio n. 5
0
        /// <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);
        }
Esempio n. 6
0
 /// <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();
 }
Esempio n. 7
0
 /// <summary>Creates an empty procedure instance</summary>
 public HDevProcedure()
 {
     HDevProcedure.HCkE(EngineAPI.CreateProcedure(out this.procedure));
     GC.KeepAlive((object)this);
 }
Esempio n. 8
0
 /// <summary>Creates a procedure call for the specified procedure</summary>
 public HDevProcedureCall(HDevProcedure procedure)
 {
     HDevProcedureCall.HCkE(EngineAPI.CreateProcedureCall(procedure.Handle, out this.call));
     GC.KeepAlive((object)this);
     this.procedure = procedure;
 }