Top Fields Constructors Methods
org.python.modules.jffi

public Class ScalarCData

extends CData
Class Inheritance
Annotations
@ExposedType
name:jffi.ScalarCData
base:CData
Imports
org.python.core.Py, .PyFloat, .PyNewWrapper, .PyObject, .PyType, .Visitproc, org.python.expose.ExposedClassMethod, .ExposedGet, .ExposedMethod, .ExposedNew, .ExposedSet, .ExposedType

Field Summary

Modifier and TypeField and Description
public static final PyType
private PyObject

Constructor Summary

AccessConstructor and Description
pack-priv
pack-priv

Method Summary

Modifier and TypeMethod and Description
public PyFloat
__float__()

Overrides org.python.core.PyObject.__float__.

Equivalent to the standard Python __float__ method.

public PyObject
__int__()

Overrides org.python.core.PyObject.__int__.

Equivalent to the standard Python __int__ method.

public PyObject
__long__()

Overrides org.python.core.PyObject.__long__.

Equivalent to the standard Python __long__ method.

public int
asInt()

Overrides org.python.core.PyObject.asInt.

Convert this object into an int.

public long
public long
asLong()

Overrides org.python.core.PyObject.asLong.

Convert this object into a long.

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

pack-priv static final CType.Builtin
public PyObject
protected final void
public boolean
public static PyObject
ScalarCData_new(PyNewWrapper new_, boolean init, PyType subtype, PyObject[] args, String[] keywords)

public void
public final String
toString()

Overrides org.python.core.PyObject.toString.

Returns a string representation of the object.

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:
addressallocateReferenceMemorybyreffindInDllgetContentMemorygetCTypegetMemoryOpgetReferenceMemoryhasReferenceMemorypointersetReferenceMemory

Field Detail

TYPEback to summary
public static final PyType TYPE

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

valueback to summary
private PyObject value

Constructor Detail

ScalarCDataback to summary
pack-priv ScalarCData(PyType pytype, CType.Builtin ctype)
ScalarCDataback to summary
pack-priv ScalarCData(PyType pytype, CType.Builtin ctype, DirectMemory m)

Method Detail

__float__back to summary
public PyFloat __float__()

Overrides org.python.core.PyObject.__float__.

Doc from org.python.core.PyObject.__float__.

Equivalent to the standard Python __float__ method. Should only be overridden by numeric objects that can be reasonably coerced into a python float.

Returns:PyFloat

a float corresponding to the value of this object.

Annotations
@ExposedMethod
@Override
__int__back to summary
public PyObject __int__()

Overrides org.python.core.PyObject.__int__.

Doc from org.python.core.PyObject.__int__.

Equivalent to the standard Python __int__ method. Should only be overridden by numeric objects that can be reasonably coerced into an integer.

Returns:PyObject

an integer corresponding to the value of this object.

Annotations
@ExposedMethod
@Override
__long__back to summary
public PyObject __long__()

Overrides org.python.core.PyObject.__long__.

Doc from org.python.core.PyObject.__long__.

Equivalent to the standard Python __long__ method. Should only be overridden by numeric objects that can be reasonably coerced into a python long.

Returns:PyObject

a PyLong or PyInteger corresponding to the value of this object.

Annotations
@ExposedMethod
@Override
asIntback to summary
public int asInt()

Overrides org.python.core.PyObject.asInt.

Doc from org.python.core.PyObject.asInt.

Convert this object into an int. Throws a PyException on failure.

Returns:int

an int value

Annotations
@Override
asLongback to summary
public long asLong(int index) throws ConversionException

Overrides org.python.core.PyObject.asLong.

Annotations
@Override
asLongback to summary
public long asLong()

Overrides org.python.core.PyObject.asLong.

Doc from org.python.core.PyObject.asLong.

Convert this object into a long. Throws a PyException on failure.

Returns:long

an long value

from_addressback to summary
public static final PyObject from_address(PyType subtype, PyObject address)
Annotations
@ExposedClassMethod
names:from_address
getScalarTypeback to summary
pack-priv static final CType.Builtin getScalarType(PyType subtype)
getValueback to summary
public PyObject getValue()
Annotations
@ExposedGet
name:value
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
ScalarCData_newback to summary
public static PyObject ScalarCData_new(PyNewWrapper new_, boolean init, PyType subtype, PyObject[] args, String[] keywords)
Annotations
@ExposedNew
setValueback to summary
public void setValue(PyObject value)
Annotations
@ExposedSet
name:value
toStringback to summary
public final String toString()

Overrides org.python.core.PyObject.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Returns:String

a string representation of the object

Annotations
@Override
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