gov.llnl.babel.backend.ucxx

Class Cxx


public class Cxx
extends java.lang.Object

Class Cxx contains common C++ language binding routines shared by the C++ backend code generators. This class simply collects many common C+ binding routines into one place.

Field Summary

static int
FILE_ROLE_IMPL
static int
FILE_ROLE_MAX
static int
FILE_ROLE_MIN
static int
FILE_ROLE_NONE
static int
FILE_ROLE_SKEL
static int
FILE_ROLE_STUB
static String[]
FILE_ROLE_SUFFIX
static int
FILE_TYPE_CXX_HEADER
static int
FILE_TYPE_CXX_SOURCE
static int
FILE_TYPE_C_HEADER
static int
FILE_TYPE_C_SOURCE
static String[]
FILE_TYPE_EXTENSION
static int
FILE_TYPE_MAX
static int
FILE_TYPE_MIN
static int
FILE_TYPE_NONE

Method Summary

static String
argComment(Argument arg)
convert an argument to a comment indicating the mode and perhaps the type.
static void
beginExternCRegion(LanguageWriterForCxx writer)
begin a region of method calls with C linkage
static void
closeUCxxNamespace(LanguageWriterForCxx writer)
static String
constCast(String newtype, String arg)
generate a constCast
static LanguageWriterForCxx
createHeader(Symbol symbol, int role, String filegroup, Context context)
Create an empty header file and return the language writer to create subsequent content.
static LanguageWriterForCxx
createSource(Symbol symbol, int role, String filegroup, Context context)
Create an empty source file and return the language writer to create subsequent content.
static void
endExternCRegion(LanguageWriterForCxx writer)
end region of method calls with C linkage
static void
generateArgumentList(LanguageWriterForCxx writer, Method method, Context context, boolean rarrays, boolean isStub)
static void
generateExceptionSetBody(LanguageWriterForCxx writer, Set throw_set, Context context)
Generate Signature for the exception throwing method
static void
generateExceptionSetSignature(LanguageWriterForCxx writer, SymbolID id, Set throw_set, int index, boolean stub, boolean isSuper)
Generate Signature for the exception throwing method
static String
generateFilename(String symbolName, int role, int ftype)
Generate the filename associated with a symbol identifier.
static String
generateFilename(SymbolID id, int role, int ftype, Context context)
Generate the filename associated with a symbol identifier.
static String
generateFunctionDeclaration(Method m, Extendable d_ext, Context context, String d_self, boolean isSuper, boolean rarrays)
static String
generateIORCall(Method m, Extendable d_ext, Context context, String d_self, boolean isSuper, boolean rarrays)
static Set
generateImplHeaderDependencyIncludes(LanguageWriterForCxx writer, Extendable ext, boolean removeSelf, Context context)
Generates include directives for all the extendables that this extendable inherits from for Impls.
static Set
generateImplSourceIncludes(LanguageWriterForCxx writer, Class cls, Context context)
Generates include directives for all the Babel clases used in this Impl.cxx file
static Set
generateIncludeSet(Extendable ext, Context context)
Generate the set of SymbolID's that this Extendable must #include.
static Set
generateIncludes(LanguageWriterForCxx writer, Extendable ext, boolean removeSelf, Context context)
Generates include directives for all the extendables that this extendable inherits from.
static String
generateInitialization(Method m, Extendable d_ext, String d_self, Context context)
Generates initialization of methods prior to IOR call.
static void
generateInlineMethodSignature(LanguageWriterForCxx writer, Context context, Method method, String altcomment, int role, boolean isSuper, boolean rarrays)
static void
generateMethodSignature(LanguageWriterForCxx writer, Context context, Method method, String altcomment, int role, boolean rarrays)
static String
generatePostIORCall(Method m, Extendable d_ext, String d_self, boolean isSuper, boolean rarrays)
static String
generatePostIORCleanup(Method m, boolean rarrays)
static String
generatePreIORCall(Method m, Extendable d_ext, String d_self, boolean isSuper, boolean rarrays, Context context)
Function generates argument initialization prior to IOR call.
static String
generateRoleDescription(SymbolID id, int role)
Generate the role description associated with the symbol identifier and the specified role of the file.
static Set
generateSourceIncludes(LanguageWriterForCxx writer, Extendable ext, Context context)
Generates include directives for all the Babel clases used in this Stub .cxx file
static void
generateThrowsList(LanguageWriterForCxx writer, Method method, boolean canThrowNullIORException, Context context)
static String
generateThrowsList(Method method, boolean canThrowNullIORException, Context context)
static String
getCxxString(Type type, boolean rarrays, Context context)
Convert the type to a Cxx representation in string form
static String
getEnumName(SymbolID id)
Convert a sidl enumerated type into its symbol name, which is just the colon separated symbol name
static Map
getExceptionSets(Collection methods)
On the first time it is called it generates sets of exceptions for all the methods in this Extendable.
static String
getFileExtension(int ftype)
Returns the appropriate file extension String based on the file type, prepended with the period (e.g., ".hxx").
static String
getFileSuffix(int role)
Returns the appropriate String suffix associated with the specified role.
static Set
getFrontIncludes(Extendable ext, Context context)
Generates include directives for all the extendables that this extendable inherits from.
static String
getIORCacheVariable(Interface ifc)
Returns the name of the IOR cache variable for the passed in interface.
static String
getIORCall(String objName, SymbolID id)
static String
getIORCall(String objName, Type t)
static String
getImplSymbolName(SymbolID id, String postfix)
Convert a symbol name into its C++ identifier.
static String
getImplSymbolNameWithoutLeadingColons(SymbolID id, String postfix)
Convert a symbol name into its C++ identifier.
static String
getLocalIOR(Type t)
static String
getMethodImplName(SymbolID id, String methodName)
Generate the impl method's name.
static String
getMethodSkelName(SymbolID id, String methodName)
Generate the skel method's name.
static String
getMethodStubName(SymbolID id, String methodName, boolean isSuper)
Generate the stub method's name.
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.
static String
getRarrayReturnString(Type type, Context context)
Generate a Cxx return string for the specified sidl type.
static String
getReturnString(Type type, Context context)
Generate a Cxx return string for the specified sidl type.
static List
getStubMethodList(Extendable ext)
This returns the list of all methods that need to have stub methods generated.
static String
getSymbolName(SymbolID id)
static String
getSymbolName(SymbolID id, String postfix)
Convert a symbol name into its C++ identifier.
static String
getSymbolNameWithoutLeadingColons(SymbolID id, String postfix)
static void
initializeLocalIOR(LanguageWriterForCxx writer, Interface ifc, String self, boolean inList)
Prints a string that initializes the cache variable for the passed in interface.
static boolean
inlineStub(Method m)
Determines if the stub function should be inlined based on the simplicity of the arguments and return type.
static void
nestImplPackagesInNamespaces(LanguageWriterForCxx writer, Symbol symbol)
Generate a the namespaces in which the C++ class is nested.
static void
nestPackagesInNamespaces(LanguageWriterForCxx writer, Symbol symbol)
Generate a the namespaces in which the C++ class is nested.
static void
nestPackagesInNamespaces(LanguageWriterForCxx writer, SymbolID symbolid)
Generate a the namespaces in which the C++ class is nested.
static void
openUCxxNamespace(LanguageWriterForCxx writer)
Opens ucxx namespace
static String
prependGlobalUCxx()
static String
prependLocalUCxx()
static String
reinterpretCast(String newtype, String arg)
generate a reinterpretCast
static void
unnestImplPackagesInNamespaces(LanguageWriterForCxx writer, Symbol symbol)
Close the namespaces in which the C++ class is nested.
static void
unnestPackagesInNamespaces(LanguageWriterForCxx writer, Symbol symbol)
Close the namespaces in which the C++ class is nested.
static void
unnestPackagesInNamespaces(LanguageWriterForCxx writer, SymbolID symbolid)
Close the namespaces in which the C++ class is nested.
static void
writeCallsToParentInterfaceConstructors(LanguageWriterForCxx writer, Class cls, String self)
Prints cache initialization for all parent interfaces of this extendable.
static void
writeInterfaceCacheInitialization(LanguageWriterForCxx writer, Extendable ext, String self)
Prints cache initialization for all parent interfaces of this extendable.

Field Details

FILE_ROLE_IMPL

public static final int FILE_ROLE_IMPL
Field Value:
1

FILE_ROLE_MAX

public static final int FILE_ROLE_MAX
Field Value:
3

FILE_ROLE_MIN

public static final int FILE_ROLE_MIN
Field Value:
0

FILE_ROLE_NONE

public static final int FILE_ROLE_NONE
Field Value:
0

FILE_ROLE_SKEL

public static final int FILE_ROLE_SKEL
Field Value:
2

FILE_ROLE_STUB

public static final int FILE_ROLE_STUB
Field Value:
3

FILE_ROLE_SUFFIX

public static final String[] FILE_ROLE_SUFFIX

FILE_TYPE_CXX_HEADER

public static final int FILE_TYPE_CXX_HEADER
Field Value:
1

FILE_TYPE_CXX_SOURCE

public static final int FILE_TYPE_CXX_SOURCE
Field Value:
2

FILE_TYPE_C_HEADER

public static final int FILE_TYPE_C_HEADER
Field Value:
3

FILE_TYPE_C_SOURCE

public static final int FILE_TYPE_C_SOURCE
Field Value:
4

FILE_TYPE_EXTENSION

public static final String[] FILE_TYPE_EXTENSION

FILE_TYPE_MAX

public static final int FILE_TYPE_MAX
Field Value:
4

FILE_TYPE_MIN

public static final int FILE_TYPE_MIN
Field Value:
0

FILE_TYPE_NONE

public static final int FILE_TYPE_NONE
Field Value:
0

Method Details

argComment

public static String argComment(Argument arg)
convert an argument to a comment indicating the mode and perhaps the type.
Parameters:
arg -
Returns:
either a comment string

beginExternCRegion

public static void beginExternCRegion(LanguageWriterForCxx writer)
begin a region of method calls with C linkage
Parameters:
writer - languageWriter for the file

closeUCxxNamespace

public static void closeUCxxNamespace(LanguageWriterForCxx writer)

constCast

public static String constCast(String newtype,
                               String arg)
generate a constCast
Parameters:
newtype - the new type to cast to
arg - the variable to cast
Returns:
string that properly declares the cast

createHeader

public static LanguageWriterForCxx createHeader(Symbol symbol,
                                                int role,
                                                String filegroup,
                                                Context context)
            throws CodeGenerationException
Create an empty header file and return the language writer to create subsequent content.
Parameters:
symbol - the SymbolID of the Symbol
role - the int identifying the role of the file to differentiate skeletons, stubs, impls, etc.
filegroup - a String to associate the file with for possible makefile generation

createSource

public static LanguageWriterForCxx createSource(Symbol symbol,
                                                int role,
                                                String filegroup,
                                                Context context)
            throws CodeGenerationException
Create an empty source file and return the language writer to create subsequent content.
Parameters:
symbol - the SymbolID of the Symbol
role - the int identifying the role of the file to differentiate skeletons, stubs, impls, etc.
filegroup - a String to associate the file with for possible makefile generation

endExternCRegion

public static void endExternCRegion(LanguageWriterForCxx writer)
end region of method calls with C linkage
Parameters:
writer - languageWriter for the file

generateArgumentList

public static void generateArgumentList(LanguageWriterForCxx writer,
                                        Method method,
                                        Context context,
                                        boolean rarrays,
                                        boolean isStub)
            throws CodeGenerationException

generateExceptionSetBody

public static void generateExceptionSetBody(LanguageWriterForCxx writer,
                                            Set throw_set,
                                            Context context)
Generate Signature for the exception throwing method

generateExceptionSetSignature

public static void generateExceptionSetSignature(LanguageWriterForCxx writer,
                                                 SymbolID id,
                                                 Set throw_set,
                                                 int index,
                                                 boolean stub,
                                                 boolean isSuper)
            throws CodeGenerationException
Generate Signature for the exception throwing method

generateFilename

public static String generateFilename(String symbolName,
                                      int role,
                                      int ftype)
Generate the filename associated with a symbol identifier.
  1. Replaces the "." scope separators in the symbol by underscores
  2. Appends a "_" + suffix, if appropriate
  3. Appends the appropriate extension
Parameters:
symbolName - the stringified name of the Symbol
role - the int associated with the role of the file to differentiate skeletons, stubs, impls, etc.
ftype - the int associated with the type of the file to differentiate between header and source

generateFilename

public static String generateFilename(SymbolID id,
                                      int role,
                                      int ftype,
                                      Context context)
Generate the filename associated with a symbol identifier.
  1. Replaces the "." scope separators in the symbol by underscores
  2. Appends a "_" + suffix, if appropriate
  3. Appends the appropriate extension
Parameters:
id - the SymbolID of the Symbol
role - the int associated with the role of the file to differentiate skeletons, stubs, impls, etc.
ftype - the int associated with the type of the file to differentiate between header and source When the --generate-subdirs and --short-file-names options are used simultaneously, the generated file names will not include the package names of the packages containing the symbol whose SymbolID is passed as an argument. Thus, either long or short names must be used in all clients or servers that have interdependencies; mixing short and long names will result in compile and/or runtime errors.

generateFunctionDeclaration

public static String generateFunctionDeclaration(Method m,
                                                 Extendable d_ext,
                                                 Context context,
                                                 String d_self,
                                                 boolean isSuper,
                                                 boolean rarrays)
            throws CodeGenerationException

generateIORCall

public static String generateIORCall(Method m,
                                     Extendable d_ext,
                                     Context context,
                                     String d_self,
                                     boolean isSuper,
                                     boolean rarrays)
            throws CodeGenerationException

generateImplHeaderDependencyIncludes

public static Set generateImplHeaderDependencyIncludes(LanguageWriterForCxx writer,
                                                       Extendable ext,
                                                       boolean removeSelf,
                                                       Context context)
            throws CodeGenerationException
Generates include directives for all the extendables that this extendable inherits from for Impls. For Impl header files only
Parameters:
writer - Language writer for C++
ext - Extendible (Class or Interface) to generate dependencies
removeSelf - True if called from a Stub generator since this would cause an inclusion loop in Stub.h False if called from an impl generator since the impl may need to know about the stub.

generateImplSourceIncludes

public static Set generateImplSourceIncludes(LanguageWriterForCxx writer,
                                             Class cls,
                                             Context context)
            throws CodeGenerationException
Generates include directives for all the Babel clases used in this Impl.cxx file
Parameters:
writer - Language writer for C++

generateIncludeSet

public static Set generateIncludeSet(Extendable ext,
                                     Context context)
            throws CodeGenerationException
Generate the set of SymbolID's that this Extendable must #include.

generateIncludes

public static Set generateIncludes(LanguageWriterForCxx writer,
                                   Extendable ext,
                                   boolean removeSelf,
                                   Context context)
            throws CodeGenerationException
Generates include directives for all the extendables that this extendable inherits from.
Parameters:
writer - Language writer for C++
ext - Extendible (Class or Interface) to generate dependencies
removeSelf - True if called from a Stub generator since this would cause an inclusion loop in Stub.h False if called from an impl generator since the impl may need to know about the stub.

generateInitialization

public static String generateInitialization(Method m,
                                            Extendable d_ext,
                                            String d_self,
                                            Context context)
            throws CodeGenerationException
Generates initialization of methods prior to IOR call.

generateInlineMethodSignature

public static void generateInlineMethodSignature(LanguageWriterForCxx writer,
                                                 Context context,
                                                 Method method,
                                                 String altcomment,
                                                 int role,
                                                 boolean isSuper,
                                                 boolean rarrays)
            throws CodeGenerationException

generateMethodSignature

public static void generateMethodSignature(LanguageWriterForCxx writer,
                                           Context context,
                                           Method method,
                                           String altcomment,
                                           int role,
                                           boolean rarrays)
            throws CodeGenerationException

generatePostIORCall

public static String generatePostIORCall(Method m,
                                         Extendable d_ext,
                                         String d_self,
                                         boolean isSuper,
                                         boolean rarrays)
            throws CodeGenerationException

generatePostIORCleanup

public static String generatePostIORCleanup(Method m,
                                            boolean rarrays)
            throws CodeGenerationException

generatePreIORCall

public static String generatePreIORCall(Method m,
                                        Extendable d_ext,
                                        String d_self,
                                        boolean isSuper,
                                        boolean rarrays,
                                        Context context)
            throws CodeGenerationException
Function generates argument initialization prior to IOR call.

generateRoleDescription

public static String generateRoleDescription(SymbolID id,
                                             int role)
Generate the role description associated with the symbol identifier and the specified role of the file.
Parameters:
id - the SymbolID of the Symbol
role - the int associated with the role of the file to differentiate skeletons, stubs, impls, etc.

generateSourceIncludes

public static Set generateSourceIncludes(LanguageWriterForCxx writer,
                                         Extendable ext,
                                         Context context)
            throws CodeGenerationException
Generates include directives for all the Babel clases used in this Stub .cxx file
Parameters:
writer - Language writer for C++
ext - Extendible (Class or Interface) to generate dependencies

generateThrowsList

public static void generateThrowsList(LanguageWriterForCxx writer,
                                      Method method,
                                      boolean canThrowNullIORException,
                                      Context context)

generateThrowsList

public static String generateThrowsList(Method method,
                                        boolean canThrowNullIORException,
                                        Context context)

getCxxString

public static String getCxxString(Type type,
                                  boolean rarrays,
                                  Context context)
            throws CodeGenerationException
Convert the type to a Cxx representation in string form

getEnumName

public static String getEnumName(SymbolID id)
Convert a sidl enumerated type into its symbol name, which is just the colon separated symbol name
Parameters:
id - the SymbolID of the Symbol.

getExceptionSets

public static Map getExceptionSets(Collection methods)
On the first time it is called it generates sets of exceptions for all the methods in this Extendable. Most methods probably don't declare any exceptions, so they hold the "1 implicit exception" set.

getFileExtension

public static String getFileExtension(int ftype)
Returns the appropriate file extension String based on the file type, prepended with the period (e.g., ".hxx").
Parameters:
ftype - the int associated with the type of the file to differentiate between header and source

getFileSuffix

public static String getFileSuffix(int role)
Returns the appropriate String suffix associated with the specified role.
Parameters:
role - the int associated with the role of the file to differentiate skeletons, stubs, impls, etc.

getFrontIncludes

public static Set getFrontIncludes(Extendable ext,
                                   Context context)
            throws CodeGenerationException
Generates include directives for all the extendables that this extendable inherits from.
Parameters:
ext - Extendible (Class or Interface) to generate dependencies

getIORCacheVariable

public static String getIORCacheVariable(Interface ifc)
Returns the name of the IOR cache variable for the passed in interface.
Parameters:
ifc - the Interface the cache variable name is based on.

getIORCall

public static String getIORCall(String objName,
                                SymbolID id)

getIORCall

public static String getIORCall(String objName,
                                Type t)

getImplSymbolName

public static String getImplSymbolName(SymbolID id,
                                       String postfix)
Convert a symbol name into its C++ identifier. This method replaces the "." scope separators in the symbol by "::".
Parameters:
id - the SymbolID of the Symbol. & @param postfix an optional postfix for the class itself

getImplSymbolNameWithoutLeadingColons

public static String getImplSymbolNameWithoutLeadingColons(SymbolID id,
                                                           String postfix)
Convert a symbol name into its C++ identifier. This method replaces the "." scope separators in the symbol by "::".
Parameters:
id - the SymbolID of the Symbol.
postfix - an optional postfix for the class itself

getLocalIOR

public static String getLocalIOR(Type t)

getMethodImplName

public static String getMethodImplName(SymbolID id,
                                       String methodName)
Generate the impl method's name.
Parameters:
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,
                                       String methodName)
Generate the skel method's name.
Parameters:
id - the SymbolID of the Symbol associated with the method.
methodName - the String version of the name of the method whose skel name is being built.

getMethodStubName

public static String getMethodStubName(SymbolID id,
                                       String methodName,
                                       boolean isSuper)
Generate the stub method's name.
Parameters:
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.

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 "::".
Parameters:
id - the SymbolID of the Symbol.

getRarrayReturnString

public static String getRarrayReturnString(Type type,
                                           Context context)
            throws CodeGenerationException
Generate a Cxx return string for the specified sidl type. Most of the sidl return strings are listed in the static structures defined at the start of the class. Symbol types and array types require special processing. This one turns on the possibility of rarrays
Parameters:
type - the Type whose return string is being built.

getReturnString

public static String getReturnString(Type type,
                                     Context context)
            throws CodeGenerationException
Generate a Cxx return string for the specified sidl type. Most of the sidl return strings are listed in the static structures defined at the start of the class. Symbol types and array types require special processing. This version will treat all rarrays as sidl arrays
Parameters:
type - the Type whose return string is being built.

getStubMethodList

public static List getStubMethodList(Extendable ext)
This returns the list of all methods that need to have stub methods generated. This includes all locally defined methods and all locally overloaded methods (i.e., if a method defined in a parent class is overloaded by a locally defined method, it must be included).
Returns:
list of Method objects

getSymbolName

public static String getSymbolName(SymbolID id)

getSymbolName

public static String getSymbolName(SymbolID id,
                                   String postfix)
Convert a symbol name into its C++ identifier. This method replaces the "." scope separators in the symbol by "::".
Parameters:
id - the SymbolID of the Symbol. & @param postfix an optional postfix for the class itself

getSymbolNameWithoutLeadingColons

public static String getSymbolNameWithoutLeadingColons(SymbolID id,
                                                       String postfix)
See Also:
getSymbolName

initializeLocalIOR

public static void initializeLocalIOR(LanguageWriterForCxx writer,
                                      Interface ifc,
                                      String self,
                                      boolean inList)
Prints a string that initializes the cache variable for the passed in interface.
Parameters:
writer - Launguage writer to output on.
ifc - the Interface the cache variable name is based on.
self - String giving the name of the ior variable to be assigned to the cache
inList - True if this initialization is in a C++ initialization list. False prints a normal expression.

inlineStub

public static boolean inlineStub(Method m)
Determines if the stub function should be inlined based on the simplicity of the arguments and return type. The logic is that the stub function should be inlined unless it throws an exception or one or more of it's arguments or return type is: bool, dcomplex, fcomplex, string, object out/inout, or array out/inout. RETURNS: True if babel method should be inlined

nestImplPackagesInNamespaces

public static void nestImplPackagesInNamespaces(LanguageWriterForCxx writer,
                                                Symbol symbol)
Generate a the namespaces in which the C++ class is nested. Increase the tab levels in the language writer appropriately.
Parameters:
writer - the language writer for C++
symbol - the symbol begin written to this file, containing the hierarchy of packages to which it belongs.
See Also:
unnestPackagesInNamespaces

nestPackagesInNamespaces

public static void nestPackagesInNamespaces(LanguageWriterForCxx writer,
                                            Symbol symbol)
Generate a the namespaces in which the C++ class is nested. Increase the tab levels in the language writer appropriately.
Parameters:
writer - the language writer for C++
symbol - the symbol begin written to this file, containing the hierarchy of packages to which it belongs.
See Also:
unnestPackagesInNamespaces

nestPackagesInNamespaces

public static void nestPackagesInNamespaces(LanguageWriterForCxx writer,
                                            SymbolID symbolid)
Generate a the namespaces in which the C++ class is nested. Increase the tab levels in the language writer appropriately.
Parameters:
writer - the language writer for C++
symbolid - the symbol begin written to this file, containing the hierarchy of packages to which it belongs.
See Also:
unnestPackagesInNamespaces

openUCxxNamespace

public static void openUCxxNamespace(LanguageWriterForCxx writer)
Opens ucxx namespace

prependGlobalUCxx

public static String prependGlobalUCxx()

prependLocalUCxx

public static String prependLocalUCxx()

reinterpretCast

public static String reinterpretCast(String newtype,
                                     String arg)
generate a reinterpretCast
Parameters:
newtype - the new type to cast to
arg - the variable to cast
Returns:
string that properly declares the cast

unnestImplPackagesInNamespaces

public static void unnestImplPackagesInNamespaces(LanguageWriterForCxx writer,
                                                  Symbol symbol)
Close the namespaces in which the C++ class is nested. Decrease the tab levels in the language writer appropriately.
Parameters:
writer - the language writer for C++
symbol - the symbol begin written to this file, containing the hierarchy of packages to which it belongs.
See Also:
nestPackagesInNamespaces

unnestPackagesInNamespaces

public static void unnestPackagesInNamespaces(LanguageWriterForCxx writer,
                                              Symbol symbol)
Close the namespaces in which the C++ class is nested. Decrease the tab levels in the language writer appropriately.
Parameters:
writer - the language writer for C++
symbol - the symbol begin written to this file, containing the hierarchy of packages to which it belongs.
See Also:
nestPackagesInNamespaces

unnestPackagesInNamespaces

public static void unnestPackagesInNamespaces(LanguageWriterForCxx writer,
                                              SymbolID symbolid)
Close the namespaces in which the C++ class is nested. Decrease the tab levels in the language writer appropriately.
Parameters:
writer - the language writer for C++
symbolid - the symbol begin written to this file, containing the hierarchy of packages to which it belongs.
See Also:
nestPackagesInNamespaces

writeCallsToParentInterfaceConstructors

public static void writeCallsToParentInterfaceConstructors(LanguageWriterForCxx writer,
                                                           Class cls,
                                                           String self)
            throws CodeGenerationException
Prints cache initialization for all parent interfaces of this extendable. (For use in _set_ior())
Parameters:
writer - Launguage writer to output on.
cls - the Class were generating this initialization for. (Only classes need to call their parent interface constructors, because they can initialize the IOR caches with correct values. Interfaces can just use defualt constructors.)
self - String giving the name of the ior variable to be assigned to the cache.

writeInterfaceCacheInitialization

public static void writeInterfaceCacheInitialization(LanguageWriterForCxx writer,
                                                     Extendable ext,
                                                     String self)
            throws CodeGenerationException
Prints cache initialization for all parent interfaces of this extendable. (For use in _set_ior())
Parameters:
writer - Launguage writer to output on.
ext - the Extendable were generating this initialization for.
self - String giving the name of the ior variable to be assigned to the cache.