Example #1
0
        /// <summary>
        /// オブジェクトをファイルストレージに書き込む.
        /// </summary>
        /// <param name="fs">ファイルストレージ.</param>
        /// <param name="name">書き込まれるオブジェクトの名前.親の構造体がシーケンスの場合は,nullにしなければならない.</param>
        /// <param name="ptr">オブジェクトへの参照.</param>
        /// <param name="attributes">オブジェクトの属性.これは特定の型に対して固有である.</param>
#else
        /// <summary>
        /// Writes user object
        /// </summary>
        /// <param name="fs">File storage. </param>
        /// <param name="name">Name, of the written object. Should be null if and only if the parent structure is a sequence. </param>
        /// <param name="ptr">Pointer to the object. </param>
        /// <param name="attributes">The attributes of the object. They are specific for each particular type.</param>
#endif
        public static void Write(CvFileStorage fs, string name, CvArr ptr, CvAttrList attributes)
        {
            if (fs == null)
            {
                throw new ArgumentNullException("fs");
            }
            if (ptr == null)
            {
                throw new ArgumentNullException("ptr");
            }
            NativeMethods.cvWrite(fs.CvPtr, name, ptr.CvPtr, attributes);
        }
Example #2
0
 public static extern void cvSave([MarshalAs(UnmanagedType.LPStr)] string filename, IntPtr struct_ptr,
      [MarshalAs(UnmanagedType.LPStr)] string name, [MarshalAs(UnmanagedType.LPStr)] string comment, CvAttrList attributes);
Example #3
0
 public static extern void cvWrite(IntPtr fs, [MarshalAs(UnmanagedType.LPStr)] string name, IntPtr ptr, CvAttrList attributes);
Example #4
0
        /// <summary>
        /// オブジェクトをファイルストレージに書き込む.
        /// </summary>
        /// <param name="name">書き込まれるオブジェクトの名前.親の構造体がシーケンスの場合は,nullにしなければならない.</param>
        /// <param name="arr">オブジェクトへの参照.</param>
        /// <param name="attributes">オブジェクトの属性.これは特定の型に対して固有である.</param>
#else
        /// <summary>
        /// Writes user object
        /// </summary>
        /// <param name="name">Name, of the written object. Should be null if and only if the parent structure is a sequence. </param>
        /// <param name="arr">Pointer to the object. </param>
        /// <param name="attributes">The attributes of the object. They are specific for each particular type.</param>
#endif
        public void Write(string name, CvArr arr, CvAttrList attributes)
        {
            Cv.Write(this, name, arr, attributes);
        }