Ejemplo n.º 1
0
    public static short[] get_vector(WordVector src, bool own)
    {
        IntPtr ptr = modshogunPINVOKE.WordVector_get_vector__SWIG_0(WordVector.getCPtr(src), own);

        if (modshogunPINVOKE.SWIGPendingException.Pending)
        {
            throw modshogunPINVOKE.SWIGPendingException.Retrieve();
        }
        int[] size = new int[1];
        Marshal.Copy(ptr, size, 0, 1);

        int len = size[0];

        short[] ret = new short[len];

        Marshal.Copy(new IntPtr(ptr.ToInt64() + Marshal.SizeOf(typeof(int))), ret, 0, len);
        return(ret);
    }
Ejemplo n.º 2
0
 public WordVector(WordVector orig) : this(modshogunPINVOKE.new_WordVector__SWIG_5(WordVector.getCPtr(orig)), true)
 {
     if (modshogunPINVOKE.SWIGPendingException.Pending)
     {
         throw modshogunPINVOKE.SWIGPendingException.Retrieve();
     }
 }