Top Fields Constructors Methods
org.python.modules.jffi

public Class Structure

extends CData
implements Pointer, Traverseproc
Class Inheritance
All Implemented Interfaces
org.python.core.Traverseproc, org.python.modules.jffi.Pointer
Annotations
@ExposedType
name:jffi.Structure
base:CData
Imports
java.util.List, org.python.core.Py, .PyNewWrapper, .PyObject, .PyType, .Traverseproc, .Visitproc, org.python.expose.ExposedClassMethod, .ExposedNew, .ExposedType

Field Summary

Modifier and TypeField and Description
private final StructLayout
private final MemoryOp
public static final PyType

Constructor Summary

AccessConstructor and Description
pack-priv
Structure(PyType pyType, StructLayout layout)

pack-priv
Structure(PyType pyType, StructLayout layout, Memory m)

Method Summary

Modifier and TypeMethod and Description
public PyObject
__getitem__(PyObject
the key to lookup in this container.
key
)

Overrides org.python.core.PyObject.__getitem__.

Equivalent to the standard Python __getitem__ method.

public void
__setitem__(PyObject
the key whose value will be set
key
,
PyObject
the value to set this key to
value
)

Overrides org.python.core.PyObject.__setitem__.

Equivalent to the standard Python __setitem__ method.

public static final PyObject
from_address(PyType subtype, PyObject address)

pack-priv StructLayout.Field
public DirectMemory
pack-priv MemoryOp
pack-priv static final StructLayout
protected final void
public boolean
public static PyObject
Structure_new(PyNewWrapper new_, boolean init, PyType subtype, PyObject[] args, String[] keywords)

public int
traverse(Visitproc visit, Object arg)

Overrides org.python.modules.jffi.CData.traverse.

Implements org.python.core.Traverseproc.traverse.

Traverses all directly contained PyObjects.

Inherited from org.python.modules.jffi.CData:
addressallocateReferenceMemorybyreffindInDllgetContentMemorygetCTypegetReferenceMemoryhasReferenceMemorypointersetReferenceMemory

Field Detail

layoutback to summary
private final StructLayout layout
memoryOpback to summary
private final MemoryOp memoryOp
TYPEback to summary
public static final PyType TYPE

Hides org.python.modules.jffi.CData.TYPE.

Constructor Detail

Structureback to summary
pack-priv Structure(PyType pyType, StructLayout layout)
Structureback to summary
pack-priv Structure(PyType pyType, StructLayout layout, Memory m)

Method Detail

__getitem__back to summary
public PyObject __getitem__(PyObject key)

Overrides org.python.core.PyObject.__getitem__.

Doc from org.python.core.PyObject.__getitem__.

Equivalent to the standard Python __getitem__ method. This method should not be overridden. Override the __finditem__ method instead.

Parameters
key:PyObject

the key to lookup in this container.

Returns:PyObject

the value corresponding to that key.

Annotations
@Override

__setitem__back to summary
public void __setitem__(PyObject key, PyObject value)

Overrides org.python.core.PyObject.__setitem__.

Doc from org.python.core.PyObject.__setitem__.

Equivalent to the standard Python __setitem__ method.

Parameters
key:PyObject

the key whose value will be set

value:PyObject

the value to set this key to

Annotations
@Override
from_addressback to summary
public static final PyObject from_address(PyType subtype, PyObject address)
Annotations
@ExposedClassMethod
names:from_address
getFieldback to summary
pack-priv StructLayout.Field getField(PyObject key)
getMemoryback to summary
public DirectMemory getMemory()

Implements org.python.modules.jffi.Pointer.getMemory.

getMemoryOpback to summary
pack-priv MemoryOp getMemoryOp()

Overrides org.python.modules.jffi.CData.getMemoryOp.

Annotations
@Override
getStructLayoutback to summary
pack-priv static final StructLayout getStructLayout(PyType subtype)
initReferenceMemoryback to summary
protected final void initReferenceMemory(Memory m)

Implements abstract org.python.modules.jffi.CData.initReferenceMemory.

refersDirectlyToback to summary
public boolean refersDirectlyTo(PyObject ob)

Overrides org.python.modules.jffi.CData.refersDirectlyTo.

Implements org.python.core.Traverseproc.refersDirectlyTo.

Doc from org.python.core.Traverseproc.refersDirectlyTo.

Optional operation. Should only be implemented if it is more efficient than calling traverse(Visitproc, Object) with a visitproc that just watches out for ob. Must return false if ob is null.

Annotations
@Override
Structure_newback to summary
public static PyObject Structure_new(PyNewWrapper new_, boolean init, PyType subtype, PyObject[] args, String[] keywords)
Annotations
@ExposedNew
traverseback to summary
public int traverse(Visitproc visit, Object arg)

Overrides org.python.modules.jffi.CData.traverse.

Implements org.python.core.Traverseproc.traverse.

Doc from org.python.core.Traverseproc.traverse.

Traverses all directly contained PyObjects. Like in CPython, arg must be passed unmodified to visit as its second parameter. If Visitproc#visit(PyObject, Object) returns nonzero, this return value must be returned immediately by traverse. Visitproc#visit(PyObject, Object) must not be called with a null PyObject-argument.

Annotations
@Override