예제 #1
0
        /// <summary>
        /// Creates new instance of SymbolicExpression.
        /// </summary>
        /// <param name="engine">The engine.</param>
        /// <param name="pointer">The pointer.</param>
        protected internal SymbolicExpression(REngine engine, IntPtr pointer)
            : base(IntPtr.Zero, true)
        {
            this.engine = engine;
            var sexprecType = engine.GetSEXPRECType();

            this.sexp = Convert.ChangeType(Marshal.PtrToStructure(pointer, sexprecType), sexprecType);
            SetHandle(pointer);
            Preserve();
        }
예제 #2
0
        internal object GetInternalStructure()
        {
            var sexprecType = engine.GetSEXPRECType();

            return(Convert.ChangeType(Marshal.PtrToStructure(handle, sexprecType), sexprecType));
        }