|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgov.llnl.babel.backend.IOR
public class IOR
Class IOR
contains common SIDL to IOR translation
routines shared by the backend code generators. This class simply
collects many common IOR language bindings into one place.
Nested Class Summary | |
---|---|
static class |
IOR.CompareMethods
|
Field Summary | |
---|---|
static int |
BASE_EPV
|
static int |
CAST
The index of the builtin method for casting. |
static int |
CHECK_ERROR
The index of the builtin method for assertion checking implementation. |
static int |
CHECKS
The index of the builtin method for setting the assertion checking. |
static int |
CLASS_BUILTIN_METHODS
The number of builtin methods that a class has. |
static int |
CONSTRUCTOR
The index of the builtin method for constructing a class instance |
static int |
CONSTRUCTOR2
The index of the special builtin method for constructing a class instance with user passed in private data |
static java.lang.String |
D_CALLS
|
static java.lang.String |
D_CHECKS
|
static java.lang.String |
D_CONTROLS
|
static java.lang.String |
D_COUNTDOWN
|
static java.lang.String |
D_DATA
|
static java.lang.String |
D_HOOKS
|
static java.lang.String |
D_METHOD_CONTROLS
|
static java.lang.String |
D_METHOD_EXCEPT
|
static java.lang.String |
D_RATE
|
static java.lang.String |
D_SUCCESSES
|
static java.lang.String |
D_TRIES
|
static java.lang.String |
DEFAULT_CHECK_LEVEL
Some assertion checking defaults...at least until we provide another mechanism. |
static java.lang.String |
DEFAULT_OPTION_HOOKS
|
static java.lang.String |
DEFAULT_THRESHOLD
|
static int |
DELETE
The index of the builtin method for deleting an object. |
static int |
DESTRUCTOR
The index of the builtin method for destructing a class instance |
static int |
DUMP_STATS
The index of the builtin method for dumping assertion checking data. |
static int |
EPV_ARG
|
static int |
EPV_NEW
|
static int |
EPV_OLD
|
static int |
EPV_REMOTE
|
static int |
EPV_STATIC
|
static int |
EXEC
The index of the builtin method for executing a named method. |
static java.lang.String |
FUND_EXCEPTION_CALL_PREFIX
|
static java.lang.String |
GENERIC_POST_SUFFIX
|
static java.lang.String |
GENERIC_PRE_SUFFIX
|
static int |
GENERIC_SUFFIX_MAXLEN
|
static int |
GETURL
The index of the builtin method for getting the object's URL. |
static int |
HOOKS
The index of the builtin method for enabling/disabling hooks execution. |
static int |
INTERFACE_BUILTIN_METHODS
The number of builtin methods that an interface has. |
static java.lang.String |
INVARIANT_CALL_PREFIX
|
static int |
ISREMOTE
The index of the builtin method for determining if an object is remote. |
static int |
LOAD
The index of the builtin method for initializing a class (before first instance, or static method is called). |
static int |
MAJOR_VERSION
|
static int |
MINOR_VERSION
|
static java.lang.String |
POSTCONDITION_CALL_PREFIX
|
static java.lang.String |
PRECONDITION_CALL_PREFIX
|
static int |
PUBLIC_EPV
|
static int |
RADDREF
The index of the builtin method for determining if an object is local. |
static java.lang.String |
S_CONTROLS
|
static java.lang.String |
S_DUMP_FILE
|
static java.lang.String |
S_FULL_STATS_MACRO
|
static java.lang.String |
s_static_suffix
|
static java.lang.String |
S_TEXT_STATS_MACRO
|
static int |
SET_ASSERTIONS
|
static int |
SET_HOOKS
|
static int |
SET_PUBLIC
|
Constructor Summary | |
---|---|
IOR()
|
Method Summary | |
---|---|
static java.lang.String |
classToInterfacePtr(Class cls,
Extendable e,
java.lang.String self)
Generate an expression to obtain a pointer to an interface or subclass from an object pointer. |
static void |
declareEPVsAsArgs(LanguageWriterForC lw,
Class cls,
boolean first)
|
static void |
generateArgumentList(LanguageWriterForC writer,
Context context,
java.lang.String self,
boolean is_interface,
SymbolID id,
Method method,
boolean in_signature,
boolean add_type,
boolean obj_ptr,
boolean do_throws,
boolean do_return,
boolean do_indices,
boolean do_rarrays)
Generate the method's argument list. |
static void |
generateArgumentList(LanguageWriterForC writer,
Context context,
java.lang.String self,
boolean is_interface,
SymbolID id,
Method method,
boolean in_signature,
boolean add_type,
boolean obj_ptr,
java.lang.String exc_var,
boolean do_return,
boolean do_indices,
boolean do_rarrays,
boolean isExec)
Generate the method's argument list. |
static void |
generateArguments(LanguageWriterForC writer,
Context context,
java.lang.String self,
java.util.List args,
boolean isStatic,
boolean doThrows,
Type returnType,
boolean addType,
boolean objPtr,
boolean doRaw,
boolean deref_inout)
Generate the specified argument list. |
static void |
generateArguments(LanguageWriterForC writer,
Context context,
java.lang.String self,
java.util.List args,
boolean isStatic,
java.lang.String excVar,
Type returnType,
boolean addType,
boolean objPtr,
boolean doRaw,
boolean deref_inout,
boolean isExec)
Generate the specified argument list. |
static void |
generateCastFunction(Class cls,
java.lang.String self,
LanguageWriterForC writer,
boolean rmi,
boolean addref)
Generate the cast function for a class. |
static void |
generateStaticEPVVariables(LanguageWriterForC lw,
Extendable ext,
boolean has_static,
boolean is_remote,
int setType)
Generate the static EPV variables for the specified extendable and EPV type. |
static java.lang.String |
getArgumentString(Argument arg,
Context context)
Generate an argument string for the specified SIDL argument. |
static java.lang.String |
getArgumentString(Argument arg,
Context context,
boolean objPtr,
boolean inStub,
boolean isExec)
Generate a C argument string for the specified SIDL argument. |
static java.lang.String |
getArgumentString(Method method,
Context context)
Generate a string containing only the specified method's arguments, including exceptions, if any. |
static java.lang.String |
getArgumentWithFormal(Argument arg,
Context context)
Generate an argument string with the formal argument name. |
static java.lang.String |
getArgumentWithFormal(Argument arg,
Context context,
boolean objPtr,
boolean inStub,
boolean isExec)
Generate a C argument string with the formal argument name. |
static java.lang.String |
getArrayName(int intType)
Get the sidl array name for a given type. |
static java.lang.String |
getArrayName(SymbolID id)
Convert a SIDL symbol into its array representation, which is "struct " followed by the symbol name followed by "__array". |
static java.lang.String |
getArrayNameForFunctions(int intType)
Gets the sidl array name for a given type, for use in C functions. |
static java.lang.String |
getArrayNameWithoutAsterix(int intType)
Gets the sidl array name for a given type, and removes the trailing asterix. |
static java.lang.String |
getBuiltinComment(int index)
Return the comment for the specified builtin method. |
static Method |
getBuiltinMethod(int index,
SymbolID id,
Context context)
Return the method description of a particular non-static builtin method. |
static Method |
getBuiltinMethod(int index,
SymbolID id,
Context context,
boolean sVersion)
Return the method description of a particular builtin method. |
static java.lang.String |
getBuiltinName(int index)
Return the normal name of the builtin method. |
static java.lang.String |
getBuiltinName(int index,
boolean sVersion)
Return the name of the specified version of the builtin method. |
static java.lang.String |
getCallLoadName(SymbolID id)
Convert a sidl symbol into the name of its associated _call_load method which is the symbol name appended with "__call_load" |
static java.lang.String |
getCast(Method method,
java.lang.String self,
Context context)
Generate a cast string for the specified method. |
static java.lang.String |
getClassType()
Return the name of the type of the implicit base class type. |
static java.lang.String |
getControlsStruct(SymbolID id)
Convert a SIDL symbol into its control structure. |
static java.lang.String |
getEnumName(SymbolID id)
Convert a SIDL enumerated type into its symbol name, which is "enum " followed by the symbol name followed by "__enum". |
static java.lang.String |
getEnumValueSymbol(SymbolID id,
java.lang.String value)
Return the enum value symbol for a particular enum type and string. |
static java.lang.String |
getEPVName(SymbolID id)
Convert a SIDL symbol into its method entry point vector (EPV) name. |
static java.lang.String |
getEPVPrefix(int epvType)
Return the static EPV prefix string or, if invalid, the one with the minimum type value. |
static java.lang.String |
getEPVType(int type)
Return the type associated with the specified EPV type index, or an empty string if the index is out of range. |
static java.lang.String |
getEPVVar(int type)
Return the standard method entry point vector (EPV) variable. |
static java.lang.String |
getExceptionFundamentalType()
Return the name of the type of the implicit exception argument; namely, sidl_BaseInterface__object. |
static java.lang.String |
getExternalFunc(SymbolID id)
Get the name of the function that returns the structure of external entry points. |
static java.lang.String |
getExternalName(SymbolID id)
Get struct name for extern entry point structure. |
static java.lang.String |
getExternalVariableName(SymbolID id)
Get struct name for extern entry point variable. |
static java.util.Set |
getFCastSymbolIDs(Extendable ext)
Returns a Set containing all the Symbol IDs that need FCast methods generated for them in this Extendable. |
static java.util.Set |
getFConnectSymbolIDs(Extendable ext)
Returns a Set containing all the Symbol IDs that need FConnect methods generated for them in this Extendable. |
static java.lang.String |
getFiniName(SymbolID id)
Convert a SIDL symbol into the name of its associated fini method, which is the symbol name appended with "__fini". |
static java.lang.String |
getGetEPVsName(SymbolID id)
Convert a SIDL symbol into its method that returns initialized epv pointers. |
static java.lang.String |
getHaveLockStaticGlobalsMacroName()
A CPP macro name |
static java.lang.String |
getHeaderFile(SymbolID id)
Generate the header filename associated with a symbol identifier. |
static java.lang.String |
getInitEPVName(SymbolID id)
Convert a SIDL symbol into the name of its associated init method, which is the symbol name appended with "__init". |
static java.lang.String |
getInitialValue(Type type)
Gives an initial value based on the type of the argument |
static java.lang.String |
getInitName(SymbolID id)
Convert a SIDL symbol into the name of its associated init method, which is the symbol name appended with "__init". |
static java.lang.String |
getInterfaceType()
Return the name of the type of the base interface type. |
static java.lang.String |
getInvariantExceptType()
|
static java.lang.String |
getLocalStaticsName(SymbolID id)
Convert a SIDL symbol into the name of its associated local statics method. |
static java.lang.String |
getLockStaticGlobalsMacroName()
A CPP Macro Name |
static java.lang.String |
getMethodControlsStruct(SymbolID id)
Convert a SIDL symbol into its method control structure. |
static java.lang.String |
getMethodDescDataName(SymbolID id)
Return the name of the static variable associated with the method description data. |
static java.lang.String |
getMethodDescDataStruct(SymbolID id)
Return the name of the method description data structure name. |
static java.lang.String |
getMethodIndex(SymbolID id,
Method meth)
Return the method index constant name associated with the specified method. |
static java.lang.String |
getMethodIndex(SymbolID id,
java.lang.String lit)
Return the method index constant name associated with the specified literal. |
static java.lang.String |
getMethodName(SymbolID id,
java.lang.String name)
Returns the name of the built-in method, prepending "ior_" and the name of the symbol. |
static java.lang.String |
getNewName(SymbolID id)
Convert a SIDL symbol into the name of its associated constructor, which is the symbol name appended with "__new". |
static java.lang.String |
getObjectName(java.lang.String fqn)
Convert a SIDL interface or class into its symbol name, which is "struct " followed by the symbol name followed by "__object". |
static java.lang.String |
getObjectName(SymbolID id)
Convert a SIDL interface or class into its symbol name, which is "struct " followed by the symbol name followed by "__object". |
static java.lang.String |
getPostconditionExceptType()
|
static java.lang.String |
getPostEPVName(SymbolID id)
Convert a SIDL symbol into its Post hooks method entry point vector (EPV) name. |
static java.lang.String |
getPostSEPVName(SymbolID id)
Convert a SIDL symbol into its post hooks static entry point vector (SEPV) name. |
static java.lang.String |
getPreconditionExceptType()
|
static java.lang.String |
getPreEPVName(SymbolID id)
Convert a SIDL symbol into its Pre hooks method entry point vector (EPV) name. |
static java.lang.String |
getPreSEPVName(SymbolID id)
Convert a SIDL symbol into its pre hooks static entry point vector (SEPV) name. |
static java.lang.String |
getRaddRefName(SymbolID id)
Convert a SIDL symbol into the name of its associated getURL function, which is the symbol name appended with "__getURL". |
static java.lang.String |
getRemoteCastName(SymbolID id)
Convert a SIDL symbol into the name of its associated remote cast, which is the symbol name appended with "__rmicast". |
static java.lang.String |
getRemoteConnectName(SymbolID id)
Convert a SIDL symbol into the name of its associated remote connector, which is the symbol name appended with "__connect". |
static java.lang.String |
getRemoteGetURLName(SymbolID id)
Convert a SIDL symbol into the name of its associated getURL function, which is the symbol name appended with "__getURL". |
static java.lang.String |
getRemoteIsRemoteName(SymbolID id)
Convert a SIDL symbol into the name of its associated getURL function, which is the symbol name appended with "__getURL". |
static java.lang.String |
getRemoteName(SymbolID id)
Convert a SIDL symbol into the name of its associated remote constructor, which is the symbol name appended with "__remote". |
static java.lang.String |
getRemoteStructName(SymbolID id)
Convert a SIDL interface or class into its remote struct name, which is "struct " followed by the symbol name followed by "__remote". |
static java.lang.String |
getReturnString(Type type,
Context context)
Generate a return string for the specified SIDL type. |
static java.lang.String |
getReturnString(Type type,
Context context,
boolean objPtr,
boolean inStub)
Generate a C return string for the specified SIDL type. |
static SymbolID |
getRuntimeException(Context context)
|
static Symbol |
getRuntimeExceptionSymbol(Context context)
|
static java.lang.String |
getSEPVName(SymbolID id)
Convert a SIDL symbol into its static entry point vector (SEPV) name. |
static java.lang.String |
getSetEPVName(SymbolID id)
Convert a SIDL symbol into the name of its set EPV method. |
static java.lang.String |
getSetEPVTypeName(int type)
Returns the name of the set EPV type. |
static java.lang.String |
getSetSEPVName(SymbolID id)
Convert a SIDL symbol into the name of its set static EPV method. |
static java.lang.String |
getSkelFCastName(SymbolID sourceid,
SymbolID targetid)
Convert a SIDL symbol into the name of its associated remote connector. |
static java.lang.String |
getSkelFConnectName(SymbolID sourceid,
SymbolID targetid)
Convert a SIDL symbol into the name of its associated remote connector. |
static java.lang.String |
getSkelSerializationName(SymbolID extid,
SymbolID structid,
boolean serialize)
|
static java.lang.String |
getSourceFile(SymbolID id)
Generate the source filename associated with a symbol identifier. |
static java.lang.String |
getStaticEPVVariable(SymbolID id,
int epvType,
int setType)
Return the name of the specified static EPV variable. |
static java.lang.String |
getStaticsName(SymbolID id)
Convert a SIDL symbol into the name of its associated statics method, which is the symbol name appended with "__statics". |
static java.lang.String |
getStaticTypeOption(SymbolID id,
int type)
Return the static epv type option name. |
static java.lang.String |
getStructName(SymbolID id)
Convert a SIDL struct into its IOR data type name, which is "struct " followed by the symbol name followed by "__data". |
static java.util.Set |
getStructSymbolIDs(Extendable ext,
boolean serialize)
Returns a Set containing all the Symbol IDs of structs that need serialize/deserialize methods generated for them in this Extendable. |
static java.lang.String |
getSymbolName(java.lang.String name)
Convert a symbol name into an IOR identifier. |
static java.lang.String |
getSymbolName(SymbolID id)
Convert a symbol name into an IOR identifier. |
static java.lang.String |
getSymbolType(Symbol sym)
|
static java.lang.String |
getUnlockStaticGlobalsMacroName()
A CPP macro name |
static java.lang.String |
getVectorEntry(java.lang.String methodName)
Generate the name of an entry in the entry point vector or the static entry point vector. |
static java.lang.String |
getVersionName(SymbolID id)
Convert a SIDL symbol into the name of its associated fini method, which is the symbol name appended with "__fini". |
static boolean |
hasStaticBuiltin(int index)
Return TRUE if there is a builtin static version of the method; FALSE otherwise. |
static boolean |
isBuiltinAssert(int ind)
Return TRUE if the index is associated with an assertion related built-in method, FALSE otherwise. |
static boolean |
isBuiltinBasic(int ind)
Return TRUE if the index is associated with a basic built-in method, FALSE otherwise. |
static boolean |
isBuiltinMethod(java.lang.String methodName)
Return TRUE if the method name is one of the non-static built-in methods, FALSE otherwise. |
static boolean |
isBuiltinMethod(java.lang.String methodName,
boolean sVersion)
Return TRUE if the method name is one of the built-in methods, FALSE otherwise. |
static boolean |
isSIDLSymbol(SymbolID id)
Return TRUE if the extendable is a SIDL symbol; FALSE otherwise. |
static boolean |
isUnserializable(Context context,
Struct strct)
|
static boolean |
isUnserializable(Context context,
Type t)
|
static void |
resolveRenamedMethods(Extendable ext,
java.util.HashMap renames)
|
static boolean |
supportAssertions(Extendable ext,
Context context)
Return TRUE if assertion checking needs to be supported; FALSE otherwise. |
static boolean |
supportBaseEPVAttr(Extendable ext,
Context context)
Return TRUE if the base EPV attribute needs to be supported; FALSE otherwise. |
static boolean |
supportHooks(Extendable ext,
Context context)
Return TRUE if hooks need to be supported; FALSE otherwise. |
static boolean |
supportHooks(SymbolID id,
Context context)
Return TRUE if hooks need to be supported; FALSE otherwise. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int MAJOR_VERSION
public static final int MINOR_VERSION
public static final int INTERFACE_BUILTIN_METHODS
0...INTERFACE_BUILTIN_METHODS-1
and are available from
the method getBuiltinMethod
.
getBuiltinMethod(int, gov.llnl.babel.symbols.SymbolID, gov.llnl.babel.Context, boolean)
,
Constant Field Valuespublic static final int CLASS_BUILTIN_METHODS
0...CLASS_BUILTIN_METHODS-1
and are available from
the method getBuiltinMethod
.
public static final int CAST
public static final int DELETE
public static final int EXEC
public static final int GETURL
public static final int RADDREF
public static final int ISREMOTE
public static final int HOOKS
public static final int CONSTRUCTOR
public static final int CONSTRUCTOR2
public static final int DESTRUCTOR
public static final int LOAD
public static final int CHECKS
public static final int CHECK_ERROR
public static final int DUMP_STATS
public static java.lang.String FUND_EXCEPTION_CALL_PREFIX
public static java.lang.String PRECONDITION_CALL_PREFIX
public static java.lang.String POSTCONDITION_CALL_PREFIX
public static java.lang.String INVARIANT_CALL_PREFIX
public static final int PUBLIC_EPV
public static final int BASE_EPV
public static final int SET_PUBLIC
public static final int SET_ASSERTIONS
public static final int SET_HOOKS
public static final int EPV_NEW
public static final int EPV_OLD
public static final int EPV_REMOTE
public static final int EPV_STATIC
public static final int EPV_ARG
public static final java.lang.String GENERIC_PRE_SUFFIX
public static final java.lang.String GENERIC_POST_SUFFIX
public static final int GENERIC_SUFFIX_MAXLEN
public static final java.lang.String D_CALLS
public static final java.lang.String D_CHECKS
public static final java.lang.String D_CONTROLS
public static final java.lang.String D_COUNTDOWN
public static final java.lang.String D_DATA
public static final java.lang.String D_HOOKS
public static final java.lang.String D_METHOD_CONTROLS
public static final java.lang.String D_METHOD_EXCEPT
public static final java.lang.String D_SUCCESSES
public static final java.lang.String D_RATE
public static final java.lang.String D_TRIES
public static final java.lang.String S_CONTROLS
public static final java.lang.String S_DUMP_FILE
public static final java.lang.String DEFAULT_CHECK_LEVEL
public static final java.lang.String DEFAULT_OPTION_HOOKS
public static final java.lang.String DEFAULT_THRESHOLD
public static final java.lang.String S_FULL_STATS_MACRO
public static final java.lang.String S_TEXT_STATS_MACRO
public static final java.lang.String s_static_suffix
Constructor Detail |
---|
public IOR()
Method Detail |
---|
public static java.lang.String getLockStaticGlobalsMacroName()
public static java.lang.String getUnlockStaticGlobalsMacroName()
public static java.lang.String getHaveLockStaticGlobalsMacroName()
public static Method getBuiltinMethod(int index, SymbolID id, Context context, boolean sVersion) throws CodeGenerationException
ArrayIndexOutOfBoundsException
if
index
is less than zero or greater than or equal to the
number of builtin methods.
index
- the index of the builtin method that is
desired. Generally, one of CAST
,
DELETE
, CONSTRUCTOR
,
or DESTRUCTOR
though others possible.id
- the name of the symbolsVersion
- TRUE if the static version is desired; else FALSE
java.lang.ArrayIndexOutOfBoundsException
- this runtime exception is thrown if index
is out of
bounds.
CodeGenerationException
public static Method getBuiltinMethod(int index, SymbolID id, Context context) throws CodeGenerationException
ArrayIndexOutOfBoundsException
if
index
is less than zero or greater than or equal to the
number of builtin methods.
index
- the index of the desired builtin method.id
- the name of the symbol
java.lang.ArrayIndexOutOfBoundsException
- this runtime exception is thrown if index
is out of
bounds.
CodeGenerationException
public static boolean hasStaticBuiltin(int index)
index
- the index of the desired builtin method.public static java.lang.String getBuiltinName(int index, boolean sVersion)
index
- the index of the builtin method that is
desired. Generally, one of CAST
,
DELETE
, CONSTRUCTOR
,
or DESTRUCTOR
though others possible.sVersion
- TRUE if the static version is desired; FALSE otherwise.
java.lang.ArrayIndexOutOfBoundsException
- this runtime exception is thrown if index
is out of
bounds.public static java.lang.String getBuiltinComment(int index)
index
- the index of the builtin method that is
desired. Generally, one of CAST
,
DELETE
, CONSTRUCTOR
,
or DESTRUCTOR
though others possible.
java.lang.ArrayIndexOutOfBoundsException
- this runtime exception is thrown if index
is out of
bounds.public static java.lang.String getBuiltinName(int index)
index
- the index of the desired builtin method.
java.lang.ArrayIndexOutOfBoundsException
- this runtime exception is thrown if index
is out of
bounds.public static boolean isBuiltinMethod(java.lang.String methodName, boolean sVersion)
methodName
- the name of the method being checkedsVersion
- TRUE if the static version is desired; FALSE otherwise.public static boolean isBuiltinMethod(java.lang.String methodName)
methodName
- the name of the method being checkedpublic static boolean isBuiltinBasic(int ind)
public static boolean isBuiltinAssert(int ind)
public static java.lang.String getVectorEntry(java.lang.String methodName)
methodName
- the name of the method that is an element
in the entry point vector.public static java.lang.String getHeaderFile(SymbolID id)
public static java.lang.String getSourceFile(SymbolID id)
public static java.lang.String getSymbolName(SymbolID id)
public static java.lang.String getSymbolName(java.lang.String name)
public static java.lang.String getMethodName(SymbolID id, java.lang.String name)
public static java.lang.String getEnumName(SymbolID id)
public static java.lang.String getEnumValueSymbol(SymbolID id, java.lang.String value)
public static java.lang.String getExternalName(SymbolID id)
public static java.lang.String getExternalVariableName(SymbolID id)
public static java.lang.String getExternalFunc(SymbolID id)
public static java.lang.String getObjectName(SymbolID id)
public static java.lang.String getObjectName(java.lang.String fqn)
public static java.lang.String getStructName(SymbolID id)
public static java.lang.String getRemoteStructName(SymbolID id)
public static java.lang.String getArrayName(SymbolID id)
null
to this function causes it to
return the generic (typeless) SIDL array.
public static java.lang.String getArrayName(int intType)
public static java.lang.String getArrayNameWithoutAsterix(int intType)
public static java.lang.String getArrayNameForFunctions(int intType)
public static boolean isSIDLSymbol(SymbolID id)
public static boolean supportAssertions(Extendable ext, Context context) throws CodeGenerationException
CodeGenerationException
public static boolean supportHooks(Extendable ext, Context context)
public static boolean supportHooks(SymbolID id, Context context)
public static boolean supportBaseEPVAttr(Extendable ext, Context context) throws CodeGenerationException
CodeGenerationException
public static java.lang.String getMethodDescDataStruct(SymbolID id)
public static java.lang.String getMethodDescDataName(SymbolID id)
public static java.lang.String getControlsStruct(SymbolID id)
public static java.lang.String getMethodControlsStruct(SymbolID id)
public static java.lang.String getEPVName(SymbolID id)
public static java.lang.String getGetEPVsName(SymbolID id)
public static java.lang.String getSEPVName(SymbolID id)
public static java.lang.String getPreEPVName(SymbolID id)
public static java.lang.String getPreSEPVName(SymbolID id)
public static java.lang.String getPostEPVName(SymbolID id)
public static java.lang.String getPostSEPVName(SymbolID id)
public static java.lang.String getEPVType(int type)
public static java.lang.String getEPVVar(int type)
public static java.lang.String getSetEPVTypeName(int type)
public static java.lang.String getNewName(SymbolID id)
public static java.lang.String getRemoteName(SymbolID id)
public static java.lang.String getRemoteConnectName(SymbolID id)
public static java.lang.String getRemoteCastName(SymbolID id)
public static java.lang.String getRemoteGetURLName(SymbolID id)
public static java.lang.String getRemoteIsRemoteName(SymbolID id)
public static java.lang.String getRaddRefName(SymbolID id)
public static java.util.Set getFConnectSymbolIDs(Extendable ext) throws CodeGenerationException
CodeGenerationException
public static java.util.Set getFCastSymbolIDs(Extendable ext) throws CodeGenerationException
CodeGenerationException
public static java.util.Set getStructSymbolIDs(Extendable ext, boolean serialize) throws CodeGenerationException
CodeGenerationException
public static java.lang.String getSkelSerializationName(SymbolID extid, SymbolID structid, boolean serialize)
public static java.lang.String getSkelFConnectName(SymbolID sourceid, SymbolID targetid)
public static java.lang.String getSkelFCastName(SymbolID sourceid, SymbolID targetid)
public static java.lang.String getSetEPVName(SymbolID id)
public static java.lang.String getSetSEPVName(SymbolID id)
public static java.lang.String getEPVPrefix(int epvType)
public static java.lang.String getStaticEPVVariable(SymbolID id, int epvType, int setType)
public static void generateStaticEPVVariables(LanguageWriterForC lw, Extendable ext, boolean has_static, boolean is_remote, int setType)
public static java.lang.String getCallLoadName(SymbolID id)
public static java.lang.String getLocalStaticsName(SymbolID id)
public static java.lang.String getStaticsName(SymbolID id)
public static java.lang.String getInitName(SymbolID id)
public static java.lang.String getInitEPVName(SymbolID id)
public static java.lang.String getFiniName(SymbolID id)
public static java.lang.String getVersionName(SymbolID id)
public static java.lang.String getExceptionFundamentalType()
public static java.lang.String getClassType()
public static java.lang.String getInterfaceType()
public static java.lang.String getPreconditionExceptType()
public static java.lang.String getPostconditionExceptType()
public static java.lang.String getInvariantExceptType()
public static java.lang.String getSymbolType(Symbol sym)
public static java.lang.String getReturnString(Type type, Context context) throws CodeGenerationException
type
- the Type
whose return string is being built.
CodeGenerationException
public static java.lang.String getInitialValue(Type type) throws CodeGenerationException
type
- the Type
whose return string is being built.
CodeGenerationException
public static java.lang.String getReturnString(Type type, Context context, boolean objPtr, boolean inStub) throws CodeGenerationException
type
- the Type
whose return string is being built.objPtr
- TRUE if the object pointer type should be returned; FALSE
otherwise.inStub
- TRUE is the string is for the stub; FALSE otherwise.
CodeGenerationException
public static java.lang.String getArgumentString(Method method, Context context) throws CodeGenerationException
CodeGenerationException
public static java.lang.String getArgumentString(Argument arg, Context context) throws CodeGenerationException
arg
- the Argument
whose string is being built.
CodeGenerationException
public static java.lang.String getArgumentString(Argument arg, Context context, boolean objPtr, boolean inStub, boolean isExec) throws CodeGenerationException
arg
- the Argument
whose string is being built.objPtr
- TRUE if the object pointer type should be returned; FALSE
otherwise.inStub
- TRUE is the string is for the stub; FALSE otherwise.isExec
- TRUE if the string is for declaring variables in an Exec
function, FALSE otherwise
CodeGenerationException
public static java.lang.String getArgumentWithFormal(Argument arg, Context context) throws CodeGenerationException
arg
- the Argument
whose string is being built.
CodeGenerationException
public static java.lang.String getArgumentWithFormal(Argument arg, Context context, boolean objPtr, boolean inStub, boolean isExec) throws CodeGenerationException
arg
- the Argument
whose string is being built.objPtr
- TRUE if the object pointer type should be returned; FALSE
otherwise.inStub
- TRUE if the string is for the stub; FALSE otherwise.isExec
- TRUE if the string is generated for an exec function
CodeGenerationException
public static java.lang.String getCast(Method method, java.lang.String self, Context context) throws CodeGenerationException
CodeGenerationException
public static java.lang.String getStaticTypeOption(SymbolID id, int type)
public static java.lang.String getMethodIndex(SymbolID id, Method meth)
public static java.lang.String getMethodIndex(SymbolID id, java.lang.String lit)
public static SymbolID getRuntimeException(Context context)
public static Symbol getRuntimeExceptionSymbol(Context context)
public static void generateCastFunction(Class cls, java.lang.String self, LanguageWriterForC writer, boolean rmi, boolean addref) throws CodeGenerationException
CodeGenerationException
public static java.lang.String classToInterfacePtr(Class cls, Extendable e, java.lang.String self) throws CodeGenerationException
self
- this string holds the name to the object pointer
that the interface/subclass pointer will be
obtained fromcls
- the object pointer self is a class pointer to
this typee
- this is the type of the interface/subclass pointer
to be obtained
CodeGenerationException
public static void resolveRenamedMethods(Extendable ext, java.util.HashMap renames)
public static void declareEPVsAsArgs(LanguageWriterForC lw, Class cls, boolean first)
public static boolean isUnserializable(Context context, Type t)
public static boolean isUnserializable(Context context, Struct strct)
public static void generateArgumentList(LanguageWriterForC writer, Context context, java.lang.String self, boolean is_interface, SymbolID id, Method method, boolean in_signature, boolean add_type, boolean obj_ptr, boolean do_throws, boolean do_return, boolean do_indices, boolean do_rarrays) throws CodeGenerationException
writer
- the language writer.self
- the String representing the method's self argument name.is_interface
- the boolean indicating whether working with a class
or an interface.id
- the SymbolID
of the Extendable
whose
stub source is being written.method
- the Method
whose list is being output.in_signature
- the boolean indicating whether the argument list is
being generated in a signature.add_type
- the boolean indicating whether the argument types are
to be added.do_throws
- the boolean indicating whether the exception is to be
added.do_return
- the boolean indicating whether the return type is to be
added.do_rarrays
- the boolean indicating if special raw array argument
handling is needed.
CodeGenerationException
- this is a catch all exception. It can be caused by I/O trouble or
violations of the data type invariants.public static void generateArgumentList(LanguageWriterForC writer, Context context, java.lang.String self, boolean is_interface, SymbolID id, Method method, boolean in_signature, boolean add_type, boolean obj_ptr, java.lang.String exc_var, boolean do_return, boolean do_indices, boolean do_rarrays, boolean isExec) throws CodeGenerationException
writer
- the language writer.self
- the String representing the method's self argument name.is_interface
- the boolean indicating whether working with a class
or an interface.id
- the SymbolID
of the Extendable
whose
stub source is being written.method
- the Method
whose list is being output.in_signature
- the boolean indicating whether the argument list is
being generated in a signature.add_type
- the boolean indicating whether the argument types are
to be added.exc_var
- the variable to be used for the exception argument; NULL
if no exception argument to be generated.do_return
- the boolean indicating whether the return type is to be
added.do_rarrays
- the boolean indicating if special raw array argument
handling is needed.
CodeGenerationException
- this is a catch all exception. It can be caused by I/O trouble or
violations of the data type invariants.public static void generateArguments(LanguageWriterForC writer, Context context, java.lang.String self, java.util.List args, boolean isStatic, boolean doThrows, Type returnType, boolean addType, boolean objPtr, boolean doRaw, boolean deref_inout) throws CodeGenerationException
writer
- the language writer.self
- the String representing the method's self argument name.args
- the basic argument list for the method.isStatic
- the boolean indicating whether the method is static.doThrows
- the boolean indicating if an exception argument is to be
added.returnType
- the return type of the method OR null if the method
return type should not be included.objPtr
- TRUE if the object pointer type should be returned; FALSE
otherwise.doRaw
- the boolean indicating if special raw array argument handling
is needed.deref_inout
- if true, out and inout arguments are dereferenced in
passing. (Used for pre and post hooks)
CodeGenerationException
- this is a catch all exception. It can be caused by I/O trouble or
violations of the data type invariants.public static void generateArguments(LanguageWriterForC writer, Context context, java.lang.String self, java.util.List args, boolean isStatic, java.lang.String excVar, Type returnType, boolean addType, boolean objPtr, boolean doRaw, boolean deref_inout, boolean isExec) throws CodeGenerationException
writer
- the language writer.self
- the String representing the method's self argument name.args
- the basic argument list for the method.isStatic
- the boolean indicating whether the method is static.excVar
- the variable to be used for the exception argument; NULL
if no exception argument to be generated.returnType
- the return type of the method OR null if the method
return type should not be included.objPtr
- TRUE if the object pointer type should be returned; FALSE
otherwise.doRaw
- the boolean indicating if special raw array argument handling
is needed.deref_inout
- if true, out and inout arguments are dereferenced in
passing. (Used for pre and post hooks)
CodeGenerationException
- this is a catch all exception. It can be caused by I/O trouble or
violations of the data type invariants.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |