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 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 Description static int
ALIGNOF
The struct alignment in bytes.static int
NAME
The struct member offsets.static int
SIZEOF
The struct size in bytes.static int
VALUE
The struct member offsets.-
Fields inherited from interface org.lwjgl.system.Pointer
BITS32, BITS64, CLONG_SHIFT, CLONG_SIZE, POINTER_SHIFT, POINTER_SIZE
-
-
Constructor Summary
Constructors Constructor 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 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.static ObjCPropertyAttribute.Buffer
create(long address, int capacity)
Create aObjCPropertyAttribute.Buffer
instance at the specified memory.static ObjCPropertyAttribute
createSafe(long address)
static ObjCPropertyAttribute.Buffer
createSafe(long address, int capacity)
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.static java.nio.ByteBuffer
nname(long struct)
Unsafe version ofname()
.static void
nname(long struct, java.nio.ByteBuffer value)
Unsafe version ofname
.static java.lang.String
nnameString(long struct)
Unsafe version ofnameString()
.static java.nio.ByteBuffer
nvalue(long struct)
Unsafe version ofvalue()
.static void
nvalue(long struct, java.nio.ByteBuffer value)
Unsafe version ofvalue
.static java.lang.String
nvalueString(long struct)
Unsafe version ofvalueString()
.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)
Callsvalidate(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 interface org.lwjgl.system.NativeResource
close, free
-
Methods inherited from class org.lwjgl.system.Pointer.Default
address, equals, hashCode, toString
-
-
-
-
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.
-
createSafe
@Nullable public static ObjCPropertyAttribute createSafe(long address)
-
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
-
createSafe
@Nullable public static ObjCPropertyAttribute.Buffer createSafe(long address, int 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
-
nname
public static java.nio.ByteBuffer nname(long struct)
Unsafe version ofname()
.
-
nnameString
public static java.lang.String nnameString(long struct)
Unsafe version ofnameString()
.
-
nvalue
public static java.nio.ByteBuffer nvalue(long struct)
Unsafe version ofvalue()
.
-
nvalueString
public static java.lang.String nvalueString(long struct)
Unsafe version ofvalueString()
.
-
nname
public static void nname(long struct, java.nio.ByteBuffer value)
Unsafe version ofname
.
-
nvalue
public static void nvalue(long struct, java.nio.ByteBuffer value)
Unsafe version ofvalue
.
-
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)
Callsvalidate(long)
for each struct contained in the specified struct array.- Parameters:
array
- the struct array to validatecount
- the number of structs inarray
-
-