Package org.lwjgl.system.macosx
Class ObjCPropertyAttribute
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.system.macosx.ObjCPropertyAttribute
-
- All Implemented Interfaces:
- java.lang.AutoCloseable, NativeResource, Pointer
public class ObjCPropertyAttribute extends Struct implements NativeResource
Defines a property attribute.Member documentation
name
– the name of the attributevalue
– the value of the attribute (usually empty)
Layout
struct objc_property_attribute_t { char * name; char * value; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class and Description static class
ObjCPropertyAttribute.Buffer
An array ofObjCPropertyAttribute
structs.-
Nested classes/interfaces inherited from interface org.lwjgl.system.Pointer
Pointer.Default
-
-
Field Summary
Fields Modifier and Type Field and Description static int
SIZEOF
The struct size in bytes.-
Fields inherited from interface org.lwjgl.system.Pointer
POINTER_SHIFT, POINTER_SIZE
-
-
Constructor Summary
Constructors Constructor and Description ObjCPropertyAttribute(java.nio.ByteBuffer container)
Creates aObjCPropertyAttribute
instance at the current position of the specifiedByteBuffer
container.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description static ObjCPropertyAttribute
calloc()
Returns a newObjCPropertyAttribute
instance allocated withmemCalloc
.static ObjCPropertyAttribute.Buffer
calloc(int capacity)
Returns a newObjCPropertyAttribute.Buffer
instance allocated withmemCalloc
.static ObjCPropertyAttribute
callocStack()
Returns a newObjCPropertyAttribute
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static ObjCPropertyAttribute.Buffer
callocStack(int capacity)
Returns a newObjCPropertyAttribute.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static ObjCPropertyAttribute.Buffer
callocStack(int capacity, MemoryStack stack)
Returns a newObjCPropertyAttribute.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static ObjCPropertyAttribute
callocStack(MemoryStack stack)
Returns a newObjCPropertyAttribute
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static ObjCPropertyAttribute
create()
Returns a newObjCPropertyAttribute
instance allocated withBufferUtils
.static ObjCPropertyAttribute.Buffer
create(int capacity)
Returns a newObjCPropertyAttribute.Buffer
instance allocated withBufferUtils
.static ObjCPropertyAttribute
create(long address)
Returns a newObjCPropertyAttribute
instance for the specified memory address ornull
if the address isNULL
.static ObjCPropertyAttribute.Buffer
create(long address, int capacity)
Create aObjCPropertyAttribute.Buffer
instance at the specified memory.static ObjCPropertyAttribute
malloc()
Returns a newObjCPropertyAttribute
instance allocated withmemAlloc
.static ObjCPropertyAttribute.Buffer
malloc(int capacity)
Returns a newObjCPropertyAttribute.Buffer
instance allocated withmemAlloc
.static ObjCPropertyAttribute
mallocStack()
Returns a newObjCPropertyAttribute
instance allocated on the thread-localMemoryStack
.static ObjCPropertyAttribute.Buffer
mallocStack(int capacity)
Returns a newObjCPropertyAttribute.Buffer
instance allocated on the thread-localMemoryStack
.static ObjCPropertyAttribute.Buffer
mallocStack(int capacity, MemoryStack stack)
Returns a newObjCPropertyAttribute.Buffer
instance allocated on the specifiedMemoryStack
.static ObjCPropertyAttribute
mallocStack(MemoryStack stack)
Returns a newObjCPropertyAttribute
instance allocated on the specifiedMemoryStack
.java.nio.ByteBuffer
name()
Returns aByteBuffer
view of the null-terminated string pointed to by thename
field.ObjCPropertyAttribute
name(java.nio.ByteBuffer value)
Sets the address of the specified encoded string to thename
field.java.lang.String
nameString()
Decodes the null-terminated string pointed to by thename
field.ObjCPropertyAttribute
set(java.nio.ByteBuffer name, java.nio.ByteBuffer value)
Initializes this struct with the specified values.ObjCPropertyAttribute
set(ObjCPropertyAttribute src)
Copies the specified struct data to this struct.int
sizeof()
Returnssizeof(struct)
.static void
validate(long struct)
Validates pointer members that should not beNULL
.static void
validate(long array, int count)
CallsObjCPropertyAttribute.validate(long)
for each struct contained in the specified struct array.java.nio.ByteBuffer
value()
Returns aByteBuffer
view of the null-terminated string pointed to by thevalue
field.ObjCPropertyAttribute
value(java.nio.ByteBuffer value)
Sets the address of the specified encoded string to thevalue
field.java.lang.String
valueString()
Decodes the null-terminated string pointed to by thevalue
field.-
Methods inherited from class org.lwjgl.system.Pointer.Default
address, equals, hashCode, toString
-
Methods inherited from interface org.lwjgl.system.NativeResource
close, free
-
-
-
-
Constructor Detail
-
ObjCPropertyAttribute
public ObjCPropertyAttribute(java.nio.ByteBuffer container)
Creates aObjCPropertyAttribute
instance at the current position of the specifiedByteBuffer
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()
Description copied from class:Struct
Returnssizeof(struct)
.
-
name
public java.nio.ByteBuffer name()
Returns aByteBuffer
view of the null-terminated string pointed to by thename
field.
-
nameString
public java.lang.String nameString()
Decodes the null-terminated string pointed to by thename
field.
-
value
public java.nio.ByteBuffer value()
Returns aByteBuffer
view of the null-terminated string pointed to by thevalue
field.
-
valueString
public java.lang.String valueString()
Decodes the null-terminated string pointed to by thevalue
field.
-
name
public ObjCPropertyAttribute name(java.nio.ByteBuffer value)
Sets the address of the specified encoded string to thename
field.
-
value
public ObjCPropertyAttribute value(java.nio.ByteBuffer value)
Sets the address of the specified encoded string to thevalue
field.
-
set
public ObjCPropertyAttribute set(java.nio.ByteBuffer name, java.nio.ByteBuffer value)
Initializes this struct with the specified values.
-
set
public ObjCPropertyAttribute set(ObjCPropertyAttribute src)
Copies the specified struct data to this struct.- Parameters:
src
- the source struct- Returns:
- this struct
-
malloc
public static ObjCPropertyAttribute malloc()
Returns a newObjCPropertyAttribute
instance allocated withmemAlloc
. The instance must be explicitly freed.
-
calloc
public static ObjCPropertyAttribute calloc()
Returns a newObjCPropertyAttribute
instance allocated withmemCalloc
. The instance must be explicitly freed.
-
create
public static ObjCPropertyAttribute create()
Returns a newObjCPropertyAttribute
instance allocated withBufferUtils
.
-
create
public static ObjCPropertyAttribute create(long address)
Returns a newObjCPropertyAttribute
instance for the specified memory address ornull
if the address isNULL
.
-
malloc
public static ObjCPropertyAttribute.Buffer malloc(int capacity)
Returns a newObjCPropertyAttribute.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
public static ObjCPropertyAttribute.Buffer calloc(int capacity)
Returns a newObjCPropertyAttribute.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
public static ObjCPropertyAttribute.Buffer create(int capacity)
Returns a newObjCPropertyAttribute.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
public static ObjCPropertyAttribute.Buffer create(long address, int capacity)
Create aObjCPropertyAttribute.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
mallocStack
public static ObjCPropertyAttribute mallocStack()
Returns a newObjCPropertyAttribute
instance allocated on the thread-localMemoryStack
.
-
callocStack
public static ObjCPropertyAttribute callocStack()
Returns a newObjCPropertyAttribute
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.
-
mallocStack
public static ObjCPropertyAttribute mallocStack(MemoryStack stack)
Returns a newObjCPropertyAttribute
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
callocStack
public static ObjCPropertyAttribute callocStack(MemoryStack stack)
Returns a newObjCPropertyAttribute
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocate
-
mallocStack
public static ObjCPropertyAttribute.Buffer mallocStack(int capacity)
Returns a newObjCPropertyAttribute.Buffer
instance allocated on the thread-localMemoryStack
.- Parameters:
capacity
- the buffer capacity
-
callocStack
public static ObjCPropertyAttribute.Buffer callocStack(int capacity)
Returns a newObjCPropertyAttribute.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.- Parameters:
capacity
- the buffer capacity
-
mallocStack
public static ObjCPropertyAttribute.Buffer mallocStack(int capacity, MemoryStack stack)
Returns a newObjCPropertyAttribute.Buffer
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
callocStack
public static ObjCPropertyAttribute.Buffer callocStack(int capacity, MemoryStack stack)
Returns a newObjCPropertyAttribute.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
validate
public static void validate(long struct)
Validates pointer members that should not beNULL
.- Parameters:
struct
- the struct to validate
-
validate
public static void validate(long array, int count)
CallsObjCPropertyAttribute.validate(long)
for each struct contained in the specified struct array.- Parameters:
array
- the struct array to validatecount
- the number of structs inarray
-
-