Package org.lwjgl.odbc
Class SQL_YEAR_MONTH_STRUCT
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.odbc.SQL_YEAR_MONTH_STRUCT
-
- All Implemented Interfaces:
java.lang.AutoCloseable
,org.lwjgl.system.NativeResource
,org.lwjgl.system.Pointer
public class SQL_YEAR_MONTH_STRUCT extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResource
Layout
struct SQL_YEAR_MONTH_STRUCT { SQLUINTEGER year; SQLUINTEGER month; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SQL_YEAR_MONTH_STRUCT.Buffer
An array ofSQL_YEAR_MONTH_STRUCT
structs.
-
Constructor Summary
Constructors Constructor Description SQL_YEAR_MONTH_STRUCT(java.nio.ByteBuffer container)
Creates aSQL_YEAR_MONTH_STRUCT
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 SQL_YEAR_MONTH_STRUCT
calloc()
Returns a newSQL_YEAR_MONTH_STRUCT
instance allocated withmemCalloc
.static SQL_YEAR_MONTH_STRUCT.Buffer
calloc(int capacity)
Returns a newSQL_YEAR_MONTH_STRUCT.Buffer
instance allocated withmemCalloc
.static SQL_YEAR_MONTH_STRUCT
callocStack()
Returns a newSQL_YEAR_MONTH_STRUCT
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static SQL_YEAR_MONTH_STRUCT.Buffer
callocStack(int capacity)
Returns a newSQL_YEAR_MONTH_STRUCT.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static SQL_YEAR_MONTH_STRUCT.Buffer
callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newSQL_YEAR_MONTH_STRUCT.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static SQL_YEAR_MONTH_STRUCT
callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newSQL_YEAR_MONTH_STRUCT
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static SQL_YEAR_MONTH_STRUCT
create()
Returns a newSQL_YEAR_MONTH_STRUCT
instance allocated withBufferUtils
.static SQL_YEAR_MONTH_STRUCT.Buffer
create(int capacity)
Returns a newSQL_YEAR_MONTH_STRUCT.Buffer
instance allocated withBufferUtils
.static SQL_YEAR_MONTH_STRUCT
create(long address)
Returns a newSQL_YEAR_MONTH_STRUCT
instance for the specified memory address.static SQL_YEAR_MONTH_STRUCT.Buffer
create(long address, int capacity)
Create aSQL_YEAR_MONTH_STRUCT.Buffer
instance at the specified memory.static SQL_YEAR_MONTH_STRUCT
createSafe(long address)
static SQL_YEAR_MONTH_STRUCT.Buffer
createSafe(long address, int capacity)
static SQL_YEAR_MONTH_STRUCT
malloc()
Returns a newSQL_YEAR_MONTH_STRUCT
instance allocated withmemAlloc
.static SQL_YEAR_MONTH_STRUCT.Buffer
malloc(int capacity)
Returns a newSQL_YEAR_MONTH_STRUCT.Buffer
instance allocated withmemAlloc
.static SQL_YEAR_MONTH_STRUCT
mallocStack()
Returns a newSQL_YEAR_MONTH_STRUCT
instance allocated on the thread-localMemoryStack
.static SQL_YEAR_MONTH_STRUCT.Buffer
mallocStack(int capacity)
Returns a newSQL_YEAR_MONTH_STRUCT.Buffer
instance allocated on the thread-localMemoryStack
.static SQL_YEAR_MONTH_STRUCT.Buffer
mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newSQL_YEAR_MONTH_STRUCT.Buffer
instance allocated on the specifiedMemoryStack
.static SQL_YEAR_MONTH_STRUCT
mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newSQL_YEAR_MONTH_STRUCT
instance allocated on the specifiedMemoryStack
.int
month()
Returns the value of themonth
field.SQL_YEAR_MONTH_STRUCT
month(int value)
Sets the specified value to themonth
field.static int
nmonth(long struct)
Unsafe version ofmonth()
.static void
nmonth(long struct, int value)
Unsafe version ofmonth
.static int
nyear(long struct)
Unsafe version ofyear()
.static void
nyear(long struct, int value)
Unsafe version ofyear
.SQL_YEAR_MONTH_STRUCT
set(int year, int month)
Initializes this struct with the specified values.SQL_YEAR_MONTH_STRUCT
set(SQL_YEAR_MONTH_STRUCT src)
Copies the specified struct data to this struct.int
sizeof()
int
year()
Returns the value of theyear
field.SQL_YEAR_MONTH_STRUCT
year(int value)
Sets the specified value to theyear
field.
-
-
-
Constructor Detail
-
SQL_YEAR_MONTH_STRUCT
public SQL_YEAR_MONTH_STRUCT(java.nio.ByteBuffer container)
Creates aSQL_YEAR_MONTH_STRUCT
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()
- Specified by:
sizeof
in classorg.lwjgl.system.Struct
-
year
public int year()
Returns the value of theyear
field.
-
month
public int month()
Returns the value of themonth
field.
-
year
public SQL_YEAR_MONTH_STRUCT year(int value)
Sets the specified value to theyear
field.
-
month
public SQL_YEAR_MONTH_STRUCT month(int value)
Sets the specified value to themonth
field.
-
set
public SQL_YEAR_MONTH_STRUCT set(int year, int month)
Initializes this struct with the specified values.
-
set
public SQL_YEAR_MONTH_STRUCT set(SQL_YEAR_MONTH_STRUCT src)
Copies the specified struct data to this struct.- Parameters:
src
- the source struct- Returns:
- this struct
-
malloc
public static SQL_YEAR_MONTH_STRUCT malloc()
Returns a newSQL_YEAR_MONTH_STRUCT
instance allocated withmemAlloc
. The instance must be explicitly freed.
-
calloc
public static SQL_YEAR_MONTH_STRUCT calloc()
Returns a newSQL_YEAR_MONTH_STRUCT
instance allocated withmemCalloc
. The instance must be explicitly freed.
-
create
public static SQL_YEAR_MONTH_STRUCT create()
Returns a newSQL_YEAR_MONTH_STRUCT
instance allocated withBufferUtils
.
-
create
public static SQL_YEAR_MONTH_STRUCT create(long address)
Returns a newSQL_YEAR_MONTH_STRUCT
instance for the specified memory address.
-
createSafe
@Nullable public static SQL_YEAR_MONTH_STRUCT createSafe(long address)
-
malloc
public static SQL_YEAR_MONTH_STRUCT.Buffer malloc(int capacity)
Returns a newSQL_YEAR_MONTH_STRUCT.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
public static SQL_YEAR_MONTH_STRUCT.Buffer calloc(int capacity)
Returns a newSQL_YEAR_MONTH_STRUCT.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
public static SQL_YEAR_MONTH_STRUCT.Buffer create(int capacity)
Returns a newSQL_YEAR_MONTH_STRUCT.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
public static SQL_YEAR_MONTH_STRUCT.Buffer create(long address, int capacity)
Create aSQL_YEAR_MONTH_STRUCT.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
createSafe
@Nullable public static SQL_YEAR_MONTH_STRUCT.Buffer createSafe(long address, int capacity)
-
mallocStack
public static SQL_YEAR_MONTH_STRUCT mallocStack()
Returns a newSQL_YEAR_MONTH_STRUCT
instance allocated on the thread-localMemoryStack
.
-
callocStack
public static SQL_YEAR_MONTH_STRUCT callocStack()
Returns a newSQL_YEAR_MONTH_STRUCT
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.
-
mallocStack
public static SQL_YEAR_MONTH_STRUCT mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newSQL_YEAR_MONTH_STRUCT
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
callocStack
public static SQL_YEAR_MONTH_STRUCT callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newSQL_YEAR_MONTH_STRUCT
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocate
-
mallocStack
public static SQL_YEAR_MONTH_STRUCT.Buffer mallocStack(int capacity)
Returns a newSQL_YEAR_MONTH_STRUCT.Buffer
instance allocated on the thread-localMemoryStack
.- Parameters:
capacity
- the buffer capacity
-
callocStack
public static SQL_YEAR_MONTH_STRUCT.Buffer callocStack(int capacity)
Returns a newSQL_YEAR_MONTH_STRUCT.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.- Parameters:
capacity
- the buffer capacity
-
mallocStack
public static SQL_YEAR_MONTH_STRUCT.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newSQL_YEAR_MONTH_STRUCT.Buffer
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
callocStack
public static SQL_YEAR_MONTH_STRUCT.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newSQL_YEAR_MONTH_STRUCT.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
nyear
public static int nyear(long struct)
Unsafe version ofyear()
.
-
nmonth
public static int nmonth(long struct)
Unsafe version ofmonth()
.
-
nyear
public static void nyear(long struct, int value)
Unsafe version ofyear
.
-
nmonth
public static void nmonth(long struct, int value)
Unsafe version ofmonth
.
-
-