org.bridj.cpp
Class CPPRuntime

java.lang.Object
  extended by org.bridj.AbstractBridJRuntime
      extended by org.bridj.CRuntime
          extended by org.bridj.cpp.CPPRuntime
All Implemented Interfaces:
BridJRuntime
Direct Known Subclasses:
COMRuntime, MFCRuntime

public class CPPRuntime
extends CRuntime

C++ runtime (derives from the C runtime).
Deals with registration and lifecycle of C++ classes and methods (virtual or not).

Author:
ochafik

Nested Class Summary
static class CPPRuntime.CPPDestructor
           
 class CPPRuntime.CPPTypeInfo<T extends CPPObject>
           
static class CPPRuntime.MemoryOperators
           
 
Nested classes/interfaces inherited from class org.bridj.CRuntime
CRuntime.CTypeInfo<T extends NativeObject>, CRuntime.MethodCallInfoBuilder
 
Nested classes/interfaces inherited from interface org.bridj.BridJRuntime
BridJRuntime.TypeInfo<T extends NativeObject>
 
Field Summary
static int DEFAULT_CONSTRUCTOR
           
static int SKIP_CONSTRUCTOR
           
 
Fields inherited from class org.bridj.CRuntime
PROPERTY_bridj_c_defaultObjectSize
 
Constructor Summary
CPPRuntime()
           
 
Method Summary
<T extends NativeObject>
Class<? extends T>
getActualInstanceClass(Pointer<T> pInstance, Type officialType)
           
<T extends CPPObject>
CPPRuntime.CPPTypeInfo<T>
getCPPTypeInfo(Type type)
           
static CPPRuntime getInstance()
           
 CPPRuntime.MemoryOperators getMemoryOperators()
           
 int getPositionInVirtualTable(Pointer<Pointer<?>> pVirtualTable, Method method, NativeLibrary library)
           
 Object[] getTemplateParameters(CPPObject object, Class<?> typeClass)
           
<T extends NativeObject>
BridJRuntime.TypeInfo<T>
getTypeInfo(Type type)
           
 int getVirtualMethodsCount(Class<?> type)
           
 void setTemplateParameters(CPPObject object, Class<?> typeClass, Object[] params)
           
 
Methods inherited from class org.bridj.CRuntime
allocate, createCToJavaCallback, getCallbackNativeImplementer, getDefaultStructSize, getDynamicFunctionFactory, getTypeForCast, isAvailable, register, sizeOf, unregister
 
Methods inherited from class org.bridj.AbstractBridJRuntime
getType, isOverridenSignature
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_CONSTRUCTOR

public static final int DEFAULT_CONSTRUCTOR
See Also:
Constant Field Values

SKIP_CONSTRUCTOR

public static final int SKIP_CONSTRUCTOR
See Also:
Constant Field Values
Constructor Detail

CPPRuntime

public CPPRuntime()
Method Detail

getInstance

public static CPPRuntime getInstance()

getTemplateParameters

public Object[] getTemplateParameters(CPPObject object,
                                      Class<?> typeClass)

setTemplateParameters

public void setTemplateParameters(CPPObject object,
                                  Class<?> typeClass,
                                  Object[] params)

getActualInstanceClass

public <T extends NativeObject> Class<? extends T> getActualInstanceClass(Pointer<T> pInstance,
                                                                          Type officialType)
Specified by:
getActualInstanceClass in interface BridJRuntime
Overrides:
getActualInstanceClass in class CRuntime

getVirtualMethodsCount

public int getVirtualMethodsCount(Class<?> type)

getMemoryOperators

public CPPRuntime.MemoryOperators getMemoryOperators()

getPositionInVirtualTable

public int getPositionInVirtualTable(Pointer<Pointer<?>> pVirtualTable,
                                     Method method,
                                     NativeLibrary library)

getTypeInfo

public <T extends NativeObject> BridJRuntime.TypeInfo<T> getTypeInfo(Type type)
Specified by:
getTypeInfo in interface BridJRuntime
Overrides:
getTypeInfo in class CRuntime

getCPPTypeInfo

public <T extends CPPObject> CPPRuntime.CPPTypeInfo<T> getCPPTypeInfo(Type type)


Copyright © 2009-2013. All Rights Reserved.