public ATBaseUnsafe(Foundation.ATBaseUnsafe _0)
 {
     _Instance                     = Marshal.AllocHGlobal(sizeof(Foundation.ATBaseUnsafe._Internal));
     _ownsNativeInstance           = true;
     NativeToManagedMap[_Instance] = this;
     *((Foundation.ATBaseUnsafe._Internal *)_Instance) = *((Foundation.ATBaseUnsafe._Internal *)_0._Instance);
 }
        /// <summary>Copy an `ATBase` object</summary>
        /// <param name="destination">The destination storage to copy into</param>
        /// <param name="source">The source object to copy from</param>
        /// <returns>`true` if copying was successful. Will fail if either pointer is `NULL` or the type of the objects is not the same.</returns>
        public static bool ATBaseCopy(Foundation.ATBaseUnsafe destination, Foundation.ATBaseUnsafe source)
        {
            var _arg0 = ReferenceEquals(destination, null) ? IntPtr.Zero : destination._Instance;
            var _arg1 = ReferenceEquals(source, null) ? IntPtr.Zero : source._Instance;
            var _ret  = _Internal.ATBaseCopy(_arg0, _arg1);

            return(_ret);
        }
        /// <summary>Initialize a new object</summary>
        /// <param name="base">The object to initialize. Can be `NULL` so the result from `ATBaseNew` can be passed directly, in which case it will simply return `NULL`</param>
        /// <returns>The initialized object or `NULL` if initialization failed</returns>
        public static Foundation.ATBaseUnsafe ATBaseInit(Foundation.ATBaseUnsafe @base)
        {
            var _arg0 = ReferenceEquals(@base, null) ? IntPtr.Zero : @base._Instance;
            var _ret  = _Internal.ATBaseInit(_arg0);

            Foundation.ATBaseUnsafe _result0;
            if (_ret == IntPtr.Zero)
            {
                _result0 = null;
            }
            else if (Foundation.ATBaseUnsafe.NativeToManagedMap.ContainsKey(_ret))
            {
                _result0 = (Foundation.ATBaseUnsafe)Foundation.ATBaseUnsafe.NativeToManagedMap[_ret];
            }
            else
            {
                _result0 = Foundation.ATBaseUnsafe._CreateInstance(_ret);
            }
            return(_result0);
        }
Пример #4
0
        public static Foundation.ATBaseUnsafe ATBaseSubclassNew(Foundation.ATBaseUnsafe optionalStorage, Foundation.ATObjectType type)
        {
            var _arg0 = ReferenceEquals(optionalStorage, null) ? IntPtr.Zero : optionalStorage._Instance;
            var _ret  = _Internal.ATBaseSubclassNew(_arg0, type);

            Foundation.ATBaseUnsafe _result0;
            if (_ret == IntPtr.Zero)
            {
                _result0 = null;
            }
            else if (Foundation.ATBaseUnsafe.NativeToManagedMap.ContainsKey(_ret))
            {
                _result0 = (Foundation.ATBaseUnsafe)Foundation.ATBaseUnsafe.NativeToManagedMap[_ret];
            }
            else
            {
                _result0 = Foundation.ATBaseUnsafe._CreateInstance(_ret);
            }
            return(_result0);
        }