LangSpecificInit
public static String LangSpecificInit()
getDataExt
public static String getDataExt()
Returns the varialbe extension used to identify a temporary variable of
for holding the pointer that inout arguments point to in serialization.
ie: if we have an inout argument of type int, it is passed as an
int32_t*. However, we must unserialize the actual integer somewhere. So:
int32_t x_data = unserialize_int();
int32_t* x = &x_data;
_retval = foo(x);
getMethodExtension
public static String getMethodExtension(Type t)
generate the proper method extension for packing or unpacking
getReturnArgName
public static String getReturnArgName()
Returns internal name of the return value.
getSerializableExt
public static String getSerializableExt()
Returns the varialbe extension used to identify a temporary variable of
type sidl.io.Serializable. (Used in object serialization)
getStringExt
public static String getStringExt()
Returns the varialbe extension used to identify a temporary variable of
type String to be used for object connection.
packArg
public static void packArg(LanguageWriterForC lw,
Context context,
String packer_typename,
String packer_varname,
Argument arg,
boolean reuseable)
generate the method call to pack an argument
lw
- The language writer to write topacker_typename
- The packer type (often sidl_rmi_Serializer)packer_varname
- The name of the packer objectarg
- The Argument itselfreuseable
- True if (when the argument is an array)
babel should attempt to copy the new data into
the old array.
packType
public static void packType(LanguageWriterForC lw,
Context context,
String packer_typename,
String packer_varname,
Type type,
String varname,
String var,
int mode,
boolean isCopy,
boolean reuseable,
boolean isReturn)
generate the method call to pack an argument
lw
- The language writer to write topacker_typename
- The packer type (often sidl_rmi_Serializer)packer_varname
- The name of the packer objectvarname
- The name the argument is called in the
serializervar
- The actual argument name (return = _retval)mode
- IN, OUT, or INOUTisCopy
- Serialize the argument if it is an object.reuseable
- True is (when the argument is an array)
babel should attempt to copy the new data into
the old array.isReturn
- If it's a return value (not an argument)
unpackArg
public static void unpackArg(LanguageWriterForC lw,
Context context,
Extendable ext,
String packer_typename,
String packer_varname,
Argument arg,
boolean inIOR)
throws CodeGenerationException
generate the method call to unpack an argument
lw
- The language writer to write toext
- The Extendable this is being generated inpacker_typename
- The packer type (often sidl_rmi_Serializer)packer_varname
- The name of the packer objectinIOR
- True if this is being generated in thie IOR
unpackType
public static void unpackType(LanguageWriterForC lw,
Context context,
Extendable ext,
String packer_typename,
String packer_varname,
Type type,
String varname,
String var,
int mode,
boolean isCopy,
boolean isReturn,
boolean inIOR)
throws CodeGenerationException
generate the method call to unpack an argument or return value
lw
- The language writer to write toext
- The Extendable this is being generated inpacker_typename
- The packer type (often sidl_rmi_Serializer)packer_varname
- The name of the packer objecttype
- The Typevarname
- The name the argument is called in the
serializervar
- The actual argument name (return = _retval)mode
- IN, OUT, or INOUTisCopy
- Serialize the argument if it is an object.isReturn
- If it's a return value (not an argument)inIOR
- True if this is being generated in thie IOR