Package de.intarsys.nativec.type
Class NativeStruct
java.lang.Object
de.intarsys.nativec.type.NativeObject
de.intarsys.nativec.type.NativeStruct
- All Implemented Interfaces:
INativeObject
- Direct Known Subclasses:
NativeGenericStruct
,NativeStaticStruct
An abstract superclass for the implementation of structured
NativeObject
instances. These objects are built using named slots
with other INativeObject
instances (as opposed to NativeArray
,
using indexed slots).-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final NativeStructType
The meta class instanceprotected INativeObject[]
Fields inherited from class de.intarsys.nativec.type.NativeObject
DEBUG, handle, SHIFT_INT, SHIFT_LONG, SHIFT_LONGLONG, SIZE_BYTE, SIZE_INT, SIZE_LONG, SIZE_LONGLONG, SIZE_PTR, SIZE_SHORT
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
The number of bytes occupied by this.getNativeObject
(String name) The NativeObject at the named slot name.protected StructMember
getStructField
(String name) getValue()
A Java side representation from the memory.void
Assign (and marshall to memory) the Java side representation.A string for debugging purposes.toString()
Methods inherited from class de.intarsys.nativec.type.NativeObject
allocate, cast, createReference, getByte, getByteArray, getBytes, getCLong, getInt, getNativeHandle, getNativeHandle, getNativeType, getShort, getString, getWideString, isNull, setByte, setByteArray, setCLong, setInt, setNativeHandle, setShort, setString, setWideString
-
Field Details
-
META
The meta class instance -
values
-
-
Constructor Details
-
NativeStruct
public NativeStruct() -
NativeStruct
-
-
Method Details
-
getByteCount
public int getByteCount()Description copied from class:NativeObject
The number of bytes occupied by this.- Specified by:
getByteCount
in classNativeObject
- Returns:
- The number of bytes occupied by this.
-
getNativeObject
The NativeObject at the named slot name.The marshalling is delegated to the StructMember in the StructDeclaration.
- Parameters:
name
- The name of the slot in the structure.- Returns:
- The NativeObject at the named slot name.
-
getStructField
-
getStructType
-
getValue
Description copied from interface:INativeObject
A Java side representation from the memory.- Returns:
- A Java side representation for the
INativeObject
.
-
setValue
Description copied from interface:INativeObject
Assign (and marshall to memory) the Java side representation.- Parameters:
value
- The new Java value.
-
toNestedString
Description copied from class:NativeObject
A string for debugging purposes.- Overrides:
toNestedString
in classNativeObject
- Returns:
- A string for debugging purposes.
-
toString
-