Class ObjCPropertyAttribute

  • All Implemented Interfaces:
    java.lang.AutoCloseable, org.lwjgl.system.NativeResource, org.lwjgl.system.Pointer

    public class ObjCPropertyAttribute
    extends org.lwjgl.system.Struct
    implements org.lwjgl.system.NativeResource
    Defines a property attribute.

    Layout

    
     struct objc_property_attribute_t {
         char * name();
         char * value();
     }
    • Field Detail

      • SIZEOF

        The struct size in bytes.
      • ALIGNOF

        The struct alignment in bytes.
      • NAME, VALUE

        The struct member offsets.
    • Constructor Detail

      • ObjCPropertyAttribute

        public ObjCPropertyAttribute​(java.nio.ByteBuffer container)
        Creates a ObjCPropertyAttribute instance at the current position of the specified ByteBuffer container. Changes to the buffer's content will be visible to the struct instance and vice versa.

        The created instance holds a strong reference to the container object.

    • Method Detail

      • sizeof

        public int sizeof()
        Specified by:
        sizeof in class org.lwjgl.system.Struct
      • name, nameString

        public java.nio.ByteBuffer name()
        
        public java.lang.String nameString()
        
        the name of the attribute
      • value, valueString

        public java.nio.ByteBuffer value()
        
        public java.lang.String valueString()
        
        the value of the attribute (usually empty)
      • name

        public ObjCPropertyAttribute name​(java.nio.ByteBuffer value)
        Sets the address of the specified encoded string to the name() field.
      • value

        public ObjCPropertyAttribute value​(java.nio.ByteBuffer value)
        Sets the address of the specified encoded string to the value() field.
      • set

        public ObjCPropertyAttribute set​(java.nio.ByteBuffer name,
                                         java.nio.ByteBuffer value)
        Initializes this struct with the specified values.
      • malloc

        public static ObjCPropertyAttribute malloc()
        Returns a new ObjCPropertyAttribute instance allocated with memAlloc. The instance must be explicitly freed.
      • calloc

        public static ObjCPropertyAttribute calloc()
        Returns a new ObjCPropertyAttribute instance allocated with memCalloc. The instance must be explicitly freed.
      • create

        public static ObjCPropertyAttribute create()
        Returns a new ObjCPropertyAttribute instance allocated with BufferUtils.
      • create

        public static ObjCPropertyAttribute create​(long address)
        Returns a new ObjCPropertyAttribute instance for the specified memory address.
      • createSafe

        @Nullable
        public static ObjCPropertyAttribute createSafe​(long address)
        Like create, but returns null if address is NULL.
      • malloc

        public static ObjCPropertyAttribute malloc​(org.lwjgl.system.MemoryStack stack)
        Returns a new ObjCPropertyAttribute instance allocated on the specified MemoryStack.
        Parameters:
        stack - the stack from which to allocate
      • calloc

        public static ObjCPropertyAttribute calloc​(org.lwjgl.system.MemoryStack stack)
        Returns a new ObjCPropertyAttribute instance allocated on the specified MemoryStack and initializes all its bits to zero.
        Parameters:
        stack - the stack from which to allocate
      • malloc

        public static ObjCPropertyAttribute.Buffer malloc​(int capacity,
                                                          org.lwjgl.system.MemoryStack stack)
        Returns a new ObjCPropertyAttribute.Buffer instance allocated on the specified MemoryStack.
        Parameters:
        stack - the stack from which to allocate
        capacity - the buffer capacity
      • calloc

        public static ObjCPropertyAttribute.Buffer calloc​(int capacity,
                                                          org.lwjgl.system.MemoryStack stack)
        Returns a new ObjCPropertyAttribute.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.
        Parameters:
        stack - the stack from which to allocate
        capacity - the buffer capacity
      • nname

        public static java.nio.ByteBuffer nname​(long struct)
        Unsafe version of name().
      • nnameString

        public static java.lang.String nnameString​(long struct)
        Unsafe version of nameString().
      • nvalue

        public static java.nio.ByteBuffer nvalue​(long struct)
        Unsafe version of value().
      • nvalueString

        public static java.lang.String nvalueString​(long struct)
        Unsafe version of valueString().
      • nname

        public static void nname​(long struct,
                                 java.nio.ByteBuffer value)
        Unsafe version of name.
      • nvalue

        public static void nvalue​(long struct,
                                  java.nio.ByteBuffer value)
        Unsafe version of value.
      • validate

        public static void validate​(long struct)
        Validates pointer members that should not be NULL.
        Parameters:
        struct - the struct to validate