/// <summary>Get a description for an object type</summary>
        /// <param name="type">The object type</param>
        /// <returns>A description of the type, or NULL if unknown type</returns>
        public static string ATGetDescriptionForType(Foundation.ATObjectType type)
        {
            var _ret = _Internal.ATGetDescriptionForType(type);

            if (_ret == IntPtr.Zero)
            {
                return(default(string));
            }
            var _retPtr = (byte *)_ret;
            int _length = 0;

            while (*(_retPtr++) != 0)
            {
                _length += sizeof(byte);
            }
            return(Text.Encoding.UTF8.GetString((byte *)_ret, _length));
        }
 internal static extern IntPtr ATGetDescriptionForType(Foundation.ATObjectType type);
        /// <summary>Create a new base array object, for use in subclasses.</summary>
        /// <param name="optionalStorage">Optionally, a pointer to a struct or memory where the object can be stored</param>
        /// <param name="type">The type of object we are creating</param>
        /// <returns>A new object subclassing `ATData` of the type and size specified.</returns>
        public static Foundation.ATBaseArrayUnsafe ATBaseArraySubclassNew(Foundation.ATBaseArrayUnsafe optionalStorage, Foundation.ATObjectType type)
        {
            var _arg0 = ReferenceEquals(optionalStorage, null) ? IntPtr.Zero : optionalStorage._Instance;
            var _ret  = _Internal.ATBaseArraySubclassNew(_arg0, type);

            Foundation.ATBaseArrayUnsafe _result0;
            if (_ret == IntPtr.Zero)
            {
                _result0 = null;
            }
            else if (Foundation.ATBaseArrayUnsafe.NativeToManagedMap.ContainsKey(_ret))
            {
                _result0 = (Foundation.ATBaseArrayUnsafe)Foundation.ATBaseArrayUnsafe.NativeToManagedMap[_ret];
            }
            else
            {
                _result0 = Foundation.ATBaseArrayUnsafe._CreateInstance(_ret);
            }
            return(_result0);
        }
 internal static extern IntPtr ATBaseArraySubclassNew(IntPtr optionalStorage, Foundation.ATObjectType type);
Example #5
0
        public static void ATBaseRegisterSubclass(Foundation.ATObjectType type, Foundation.ATObjectDefinition definition)
        {
            var _arg1 = ReferenceEquals(definition, null) ? IntPtr.Zero : definition._Instance;

            _Internal.ATBaseRegisterSubclass(type, _arg1);
        }
Example #6
0
 internal static extern void ATBaseRegisterSubclass(Foundation.ATObjectType type, IntPtr definition);