Beispiel #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;

            HDevProgram.HCkE(EngineAPI.CompileUsedProceduresForProgram(this.program, out ret));
            GC.KeepAlive((object)this);
            return(ret);
        }
Beispiel #2
0
        /// <summary>Returns the names of all local procedures</summary>
        public HTuple GetLocalProcedureNames()
        {
            IntPtr tuple;

            HDevProgram.HCkE(HalconAPI.CreateTuple(out tuple));
            HDevProgram.HCkE(EngineAPI.GetLocalProcedureNames(this.program, tuple));
            GC.KeepAlive((object)this);
            HTuple htuple = HalconAPI.LoadTuple(tuple);

            HDevProgram.HCkE(HalconAPI.DestroyTuple(tuple));
            return(htuple);
        }
Beispiel #3
0
 /// <summary>Loads an HDevelop script</summary>
 /// <remarks>
 ///   You can use this to exceute the program or local procedures.
 /// </remarks>
 /// <param name="fileName">Path and file name of the HDevelop script</param>
 public void LoadProgram(string fileName)
 {
     HDevProgram.HCkE(EngineAPI.LoadProgram(this.program, fileName));
     EngineAPI.GetProgramInfo(this.program, out this.name, out this.loaded, out this.varNamesIconic, out this.varNamesCtrl, out this.varDimsIconic, out this.varDimsCtrl);
     GC.KeepAlive((object)this);
 }
Beispiel #4
0
 /// <summary>Creates an empty program instance</summary>
 public HDevProgram()
 {
     HDevProgram.HCkE(EngineAPI.CreateProgram(out this.program));
     GC.KeepAlive((object)this);
 }