java.lang.Object
api.Native
au.notzed.zcl.CLObject
au.notzed.zcl.CLExtendable
- Direct Known Subclasses:
CLCommandQueue
,CLContext
,CLDevice
public abstract class CLExtendable extends CLObject
Extendable object. These keep track of the platform and api revision to be
able to lookup extension pointers efficiently.
-
Field Summary
Fields Modifier and Type Field Description protected CLPlatform
platform
-
Constructor Summary
Constructors Constructor Description CLExtendable(jdk.incubator.foreign.MemoryAddress p)
-
Method Summary
Modifier and Type Method Description int
getAPIVersion()
protected <T extends CLExtension>
TgetExtension(java.lang.Class<T> klass, int id)
Retrieve an extension interface for this object.Used by implementors of CLExtenable.CLPlatform
getPlatform()
boolean
haveAPIVersion(int version)
protected abstract CLPlatform
initPlatform()
Retrieve the platform.void
requireAPIVersion(int version)
Methods inherited from class au.notzed.zcl.CLObject
getInfo, getInfo, getInfo, getInfoAny, getInfoAny, getInfoAny, getInfoAny, getInfoAnyV, getInfoByteV, getInfoByteV, getInfoInt, getInfoInt, getInfoInt, getInfoInt, getInfoJava, getInfoLong, getInfoLong, getInfoLong, getInfoLong, getInfoLongV, getInfoLongV, getInfoPropertyV, getInfoSizeT, getInfoSizeT, getInfoSizeT, getInfoSizeTA, getInfoString, getInfoString, getInfoString, getInfoString, release, release
Methods inherited from class api.Native
addr, addr, addr, debugDumpReachable, debugFlushAll, downcallHandle, downcallHandle, dumpSignature, freeUpcallStub, getAddr, getAddr, getByte, getByte, getDouble, getDouble, getFloat, getFloat, getInt, getInt, getLong, getLong, getShort, loadLibraries, parseStruct, parseUnion, release, release, release, resolve, setAddr, setAddr, setByte, setByte, setDouble, setDouble, setFloat, setFloat, setInt, setInt, setLong, setLong, setShort, setShort, toAddrV, toAddrV, toAddrV, toByteV, toByteV, toLongV, toLongV, toObjectV, toObjectV, toString, upcallStub
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
platform
-
-
Constructor Details
-
CLExtendable
public CLExtendable(jdk.incubator.foreign.MemoryAddress p)
-
-
Method Details
-
initPlatform
Retrieve the platform. This should not cache the lookup. It cannot return null by definition. This should not be called by any implementing class.- Returns:
-
getPlatform
-
getAPIVersion
public int getAPIVersion() -
requireAPIVersion
public void requireAPIVersion(int version) throws java.lang.UnsupportedOperationException- Throws:
java.lang.UnsupportedOperationException
-
haveAPIVersion
public boolean haveAPIVersion(int version) -
getExtension
Retrieve an extension interface for this object.Used by implementors of CLExtenable.- Type Parameters:
T
-- Parameters:
klass
-id
- The extension id code on CLPlatform.- Returns:
-