argComment
public static String argComment(Argument arg)
Create a comment to describe the SIDL type for the C signature.
arg
- the argument to make a comment from
- usually this is just the mode as a string. For arrays
and rarrays more information is returned.
generateArgumentList
public static void generateArgumentList(LanguageWriterForC writer,
Context context,
String self,
boolean is_interface,
SymbolID id,
Method method,
boolean in_signature,
boolean add_type,
boolean obj_ptr,
String exc_var,
boolean do_return,
boolean do_indices,
boolean do_rarrays)
throws CodeGenerationException
Generate the method's argument list.
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.
generateArgumentList
public static void generateArgumentList(LanguageWriterForC writer,
Context context,
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
Generate the method's argument list.
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.
generateArguments
public static void generateArguments(LanguageWriterForC writer,
Context context,
String self,
List args,
boolean isStatic,
String excVar,
Type returnType,
boolean addType,
boolean objPtr,
boolean doRaw,
boolean deref_inout)
throws CodeGenerationException
Generate the specified argument list.
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.
generateArguments
public static void generateArguments(LanguageWriterForC writer,
Context context,
String self,
List args,
boolean isStatic,
boolean doThrows,
Type returnType,
boolean addType,
boolean objPtr,
boolean doRaw,
boolean deref_inout)
throws CodeGenerationException
Generate the specified argument list.
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.
getDataGetName
public static String getDataGetName(SymbolID id)
Convert a symbol name into its private data structure get access
function name. The function name is the SIDL name with the "." scope
separators replaced by underscores followed by "__get_data".
id
- the SymbolID
of the Symbol
.
getDataName
public static String getDataName(SymbolID id)
Convert a symbol name into its private data structure identifier.
Unlike the IOR, though, use the typedef version (i.e., no "struct")
where the SIDL name with the "." scope separators replaced by
underscores is followed by "__data".
id
- the SymbolID
of the Symbol
.
getDataSetName
public static String getDataSetName(SymbolID id)
Convert a symbol name into its private data structure set access
function name. The function name is the SIDL name with the "." scope
separators replaced by underscores followed by "__set_data".
id
- the SymbolID
of the Symbol
.
getDelRefArray
public static String getDelRefArray(Type arrayType)
getEnsureArray
public static String getEnsureArray(Type arrayType)
getEnumName
public static String getEnumName(SymbolID id)
Convert a SIDL enumerated type into its symbol name, which is
"enum " followed by the symbol name followed by "__enum".
id
- the SymbolID
of the Symbol
.
getExceptionType
public static String getExceptionType()
getFullMethodName
public static String getFullMethodName(SymbolID id,
String methodName)
Generate the full method name associated with the symbol id and the
specified method. The returned name prepends the symbol name and
only one underbar to the method's name.
id
- the SymbolID
of the Symbol
associated with the method.methodName
- the String
version of the name of the
method whose full name is being built.
getFullMethodName
public static String getFullMethodName(SymbolID id,
Method method)
Generate the full method name associated with the symbol id and the
specified method. The returned name prepends the symbol name and
only one underbar to the method's name.
id
- the SymbolID
of the Symbol
associated with the method.method
- the Method
whose full name is being built.
getFullSelfDecl
public static String getFullSelfDecl(SymbolID id)
Return the full self declaration (i.e., the type and standard self
variable.
getHeaderFile
public static String getHeaderFile(SymbolID id)
Generate the header filename associated with a symbol identifier.
Replace the "." scope separators in the symbol by underscores and
append the suffix ".h".
id
- the SymbolID
of the Symbol
.
getImplFCastName
public static String getImplFCastName(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)
getImplFConnectName
public static String getImplFConnectName(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)
getImplFGetURLName
public static String getImplFGetURLName(SymbolID sourceid,
SymbolID targetid)
Convert a SIDL symbol into the name of its associated get URL function.
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)
getImplHeaderFile
public static String getImplHeaderFile(SymbolID id)
Generate the implementation header filename associated with a
symbol identifier. Replace the "." scope separators in the symbol
by underscores and append the suffix "_Impl.h".
id
- the SymbolID
of the Symbol
.
getImplSourceFile
public static String getImplSourceFile(SymbolID id)
Generate the implementation source filename associated with a
symbol identifier. Replace the "." scope separators in the symbol
by underscores and append the suffix "_Impl.c".
id
- the SymbolID
of the Symbol
.
getLongestNameLen
public static int getLongestNameLen(Struct strct)
Calculate the maximum name length of struct items.
getMethodImplName
public static String getMethodImplName(SymbolID id,
String methodName)
Generate the impl method's name.
id
- the SymbolID
of the Symbol
associated with the method.methodName
- the String
version of the name of the
method whose impl name is being built.
getMethodSkelName
public static String getMethodSkelName(SymbolID id,
Method method)
Generate the skel method's name. In most cases, the skel name is the
impl name except when the method has an array with an ordering
specification.
id
- the SymbolID
of the Symbol
associated with the method.method
- the method
getObjectName
public static String getObjectName(SymbolID id)
Convert a SIDL symbol name into its object name -- for the purposes of
this package that means convert it into its typedef object name. The
typedef name is the SIDL symbol name with the "." scope separators
replaced by underscores.
id
- the SymbolID
of the Symbol
.
getObjectStructName
public static String getObjectStructName(SymbolID id)
Convert a SIDL symbol name into its object structure name.
id
- the SymbolID
of the Symbol
.
getPrivateDestructor
public static String getPrivateDestructor(SymbolID id)
Convert a symbol name into its private destructor function name provided
by the SkelSource.
id
- the SymbolID
of the Symbol
.
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".
id
- the SymbolID
of the Symbol
.
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".
id
- the SymbolID
of the Symbol
.
getSkelFile
public static String getSkelFile(SymbolID id)
Generate the skeleton filename associated with a symbol identifier.
Replace the "." scope separators in the symbol by underscores and
append the suffix "_Skel.c".
id
- the SymbolID
of the Symbol
.
getStubFile
public static String getStubFile(SymbolID id)
Generate the stub filename associated with a symbol identifier.
Replace the "." scope separators in the symbol by underscores and
append the suffix "_Stub.c".
id
- the SymbolID
of the Symbol
.
getSymbolName
public static String getSymbolName(SymbolID id)
Convert a symbol name into an IOR identifier. This method replaces
the "." scope separators in the symbol by underscores.
id
- the SymbolID
of the Symbol
.
getSymbolObjectPtr
public static String getSymbolObjectPtr(SymbolID id)
Convert a symbol name into an IOR type pointer. This method replaces
the "." scope separators in the symbol by underscores.
id
- the SymbolID
of the Symbol
.
methodNeedsSkel
public static boolean methodNeedsSkel(Method method)