Beispiel #1
0
        internal static int StoreObjectVector(HObjectVector inVector, IntPtr vectorHandle)
        {
            int dimension = inVector.Dimension;
            int length    = inVector.Length;

            if (dimension == 1)
            {
                for (int index = length - 1; index >= 0; --index)
                {
                    EngineAPI.HCkE(EngineAPI.SetObjectVectorObject(vectorHandle, index, inVector[index].O.Key));
                }
            }
            else
            {
                for (int index = length - 1; index >= 0; --index)
                {
                    IntPtr vectorHandle1;
                    EngineAPI.HCkE(EngineAPI.CreateObjectVector(inVector[index], out vectorHandle1));
                    EngineAPI.HCkE(EngineAPI.SetObjectVectorVector(vectorHandle, index, vectorHandle1));
                    EngineAPI.HCkE(EngineAPI.DestroyObjectVector(vectorHandle1));
                }
            }
            GC.KeepAlive((object)inVector);
            return(2);
        }
Beispiel #2
0
        /// <summary>Sets input control parameter for procedure call</summary>
        public void SetInputIconicParamVector(string name, HObjectVector vector)
        {
            IntPtr vectorHandle;

            HDevProcedureCall.HCkE(EngineAPI.CreateObjectVector(vector, out vectorHandle));
            HDevProcedureCall.HCkE(EngineAPI.SetInputIconicParamVector(this.call, name, vectorHandle));
            GC.KeepAlive((object)this);
            HDevProcedureCall.HCkE(EngineAPI.DestroyObjectVector(vectorHandle));
        }
Beispiel #3
0
        /// <summary>Sets the value of a global iconic variable</summary>
        public void SetGlobalIconicVarVector(string name, HObjectVector vector)
        {
            IntPtr vectorHandle;

            HDevEngine.HCkE(EngineAPI.CreateObjectVector(vector, out vectorHandle));
            HDevEngine.HCkE(EngineAPI.SetGlobalIconicVarVector(this.engine, name, vectorHandle));
            GC.KeepAlive((object)this);
            HDevEngine.HCkE(EngineAPI.DestroyObjectVector(vectorHandle));
        }
Beispiel #4
0
        internal static int CreateObjectVector(HObjectVector inVector, out IntPtr vectorHandle)
        {
            IntPtr vector_handle;

            EngineAPI.HCkE(EngineAPI.CreateObjectVector(inVector.Dimension, out vector_handle));
            EngineAPI.HCkE(EngineAPI.StoreObjectVector(inVector, vector_handle));
            GC.KeepAlive((object)inVector);
            vectorHandle = vector_handle;
            return(2);
        }