createPyWriter
public static LanguageWriterForPython createPyWriter(Symbol symbol,
String file,
String description,
Context context)
throws CodeGenerationException
Create a Python LanguageWriterForPython
with a banner
comment a documentation string in the FileManager
group
PYTHON.
symbol
- the symbol for which the
LanguageWriter
is being created.file
- the name of the file to be created. This contains
no directory references.description
- a brief statement of the purpose of the file.
This string should have no newlines.
getAPIVarName
public static String getAPIVarName(Symbol symbol)
getBorrowArrayFromPython
public static String getBorrowArrayFromPython(Type arrayType)
getBorrowArrayFromSIDL
public static String getBorrowArrayFromSIDL(Type arrayType)
getCHeaderPath
public static String getCHeaderPath(Symbol symbol,
String modifier)
getCopyArrayFromPython
public static String getCopyArrayFromPython(Type arrayType)
getCopyArrayFromSIDL
public static String getCopyArrayFromSIDL(Type arrayType)
getDestroyArray
public static String getDestroyArray(Type arrayType)
getExceptionType
public static String getExceptionType(Symbol symbol)
getExtendableAddRef
public static String getExtendableAddRef(Symbol symbol)
getExtendableBorrow
public static String getExtendableBorrow(Symbol symbol)
getExtendableConnect
public static String getExtendableConnect(Symbol symbol)
getExtendableConverter
public static String getExtendableConverter(Symbol symbol)
getExtendableDeref
public static String getExtendableDeref(Symbol symbol)
getExtendableImport
public static String getExtendableImport(Symbol symbol)
getExtendableNewRef
public static String getExtendableNewRef(Symbol symbol)
getExtendableType
public static String getExtendableType(Symbol symbol)
getExtendableWrapper
public static String getExtendableWrapper(Symbol symbol)
getImport
public static String getImport(String className)
getIncludeGuard
public static String getIncludeGuard(Symbol symbol,
String modifier)
Generate an include file for a symbol.
getInternalGuard
public static String getInternalGuard(Symbol symbol)
getPSkelFCastName
public static String getPSkelFCastName(SymbolID sourceid,
SymbolID targetid)
Convert a SIDL symbol into the name of its associated remote
connector. This requires both the SybmolID of the class this is being
defined in (sourceid) and the SymbolID of the target class to be
connected (targetid)
getPSkelFConnectName
public static String getPSkelFConnectName(SymbolID sourceid,
SymbolID targetid)
Convert a SIDL symbol into the name of its associated remote
connector. This requires both the SybmolID of the class this is being
defined in (sourceid) and the SymbolID of the target class to be
connected (targetid)
getPSkelSerializeName
public static String getPSkelSerializeName(SymbolID sourceid,
SymbolID targetid,
boolean serialize,
boolean inLaunch)
Convert a SIDL symbol into the name of its associated remote
(de)serialize method. This requires both the SybmolID of the class
this is being defined in (sourceid) and the SymbolID of the target
class to be connected (targetid)
getPySplicer
public static CodeSplicer getPySplicer(Symbol symbol,
String filename,
Context context)
throws java.io.IOException
If filename
already exists, extract the code splicer
blocks from it and store the contents in the returned code splicer;
otherwise, return an empty code splicer.
symbol
- the symbol whose splicer is to be returned.filename
- the name of the file
- a valid (though possibly empty)
CodeSplicer
getPyStructType
public static String getPyStructType(Symbol symbol)
getRMIExternName
public static String getRMIExternName(SymbolID id)
Convert a sidl symbol into the name of its associated get RMI
Externals method, which is the symbol name appended with
"__impl_rmi_externals".
getSetEPVName
public static String getSetEPVName(SymbolID id)
Convert a sidl symbol into the name of its associated set EPV
method, which is the symbol name appended with "__set_epv".
getSetSEPVName
public static String getSetSEPVName(SymbolID id)
Convert a sidl symbol into the name of its associated set static
EPV method, which is the symbol name appended with "__set_sepv".
getSkelMethod
public static String getSkelMethod(SymbolID id,
Method m)
Return the name of the function that should be used for the
skeleton.
id
- the symbol who owns the method.m
- the method
getStructBorrow
public static String getStructBorrow(Symbol symbol)
getStructCopy
public static String getStructCopy(Symbol symbol)
getStructDeserialize
public static String getStructDeserialize(Symbol symbol)
getStructDestroy
public static String getStructDestroy(Symbol symbol)
getStructInit
public static String getStructInit(Symbol symbol)
getStructSerialize
public static String getStructSerialize(Symbol symbol)
getStubMethod
public static String getStubMethod(SymbolID id,
Method m)
Return the name of the function that should be used for the
Python stub code.
id
- the symbol who owns the method.m
- the method
headerFilename
public static String headerFilename(Symbol symbol,
String modifier)
implFilename
public static String implFilename(Symbol symbol)
maxNameLength
public static int maxNameLength(Collection items)
skelFilename
public static String skelFilename(Symbol symbol,
String modifier)
sourceFilename
public static String sourceFilename(Symbol symbol,
String modifier)