Public Member Functions | |
IdlTreeManipulator (NamingConventions namingConventions) | |
void | findXmlTypedefNodes (IdlObject node, Set entityTypes) |
boolean | findXmlEntityNodes (IdlObject node, Set affectedIdentifiers, Set nodesToBeGenerated) |
boolean | isPLGenerationRoot (IdlObject node) |
void | renameXmlBindingNode (IdlObject node) |
void | resetGraph (IdlObject node) |
void | recursivePrint (IdlObject node, int depth) |
Static Public Member Functions | |
static String | getTypeName (int type) |
Static Public Attributes | |
static final String | XML_WRAPPER_STRUCT_NAME = "XmlEntityStruct" |
The IDL parse tree gets manipulated here, so that later the original OpenORB Java code output routines from IdlToJava
are used as much as possible.
alma.tools.idlgen.IdlTreeManipulator.IdlTreeManipulator | ( | NamingConventions | namingConventions | ) |
boolean alma.tools.idlgen.IdlTreeManipulator.findXmlEntityNodes | ( | IdlObject | node, | |
Set | affectedIdentifiers, | |||
Set | nodesToBeGenerated | |||
) |
Walks recursively down the tree and sorts out nodes that are directly or through their children affected by XML entities and therefore will need later code generation. Such nodes will be renamed using renameXmlBindingNode.
node | the node from which to start | |
affectedIdentifiers | [id,IdlIdent ] read-only map with identifiers that refer to something which is involved with xml entity objects. | |
nodesToBeGenerated | gathers all nodes for which code generation must be run to properly handle xml entity objects. The selection might depend on the IDL->PL mapping, so check this (todo) when PLs other than Java are generated from this. For Java, currently idl interfaces and typedefs are considered. |
References alma.tools.idlgen.IdlTreeManipulator.isPLGenerationRoot(), and alma.tools.idlgen.IdlTreeManipulator.renameXmlBindingNode().
Referenced by alma.tools.idlgen.XmlIdlCompiler.compile_file().
void alma.tools.idlgen.IdlTreeManipulator.findXmlTypedefNodes | ( | IdlObject | node, | |
Set | entityTypes | |||
) |
Searches the tree underneath node
for typedefs based on XML_WRAPPER_STRUCT_NAME.
node | tree root | |
entityTypes | gets filled with IdlTypeDef nodes. |
References alma.tools.idlgen.IdlTreeManipulator.XML_WRAPPER_STRUCT_NAME.
Referenced by alma.tools.idlgen.XmlIdlCompiler.compile_file().
static String alma.tools.idlgen.IdlTreeManipulator.getTypeName | ( | int | type | ) | [static] |
For printing the parse tree, needed since OpenORB uses bare int values as enums.
Referenced by alma.tools.idlgen.IdlTreeManipulator.recursivePrint().
boolean alma.tools.idlgen.IdlTreeManipulator.isPLGenerationRoot | ( | IdlObject | node | ) |
Might need to adjust this for languages other than Java
Referenced by alma.tools.idlgen.IdlTreeManipulator.findXmlEntityNodes().
void alma.tools.idlgen.IdlTreeManipulator.recursivePrint | ( | IdlObject | node, | |
int | depth | |||
) |
References alma.tools.idlgen.IdlTreeManipulator.getTypeName().
Referenced by alma.tools.idlgen.XmlIdlCompiler.compile_file().
void alma.tools.idlgen.IdlTreeManipulator.renameXmlBindingNode | ( | IdlObject | node | ) |
Renames a node using the selected NamingConventions.
References alma.tools.idlgen.NamingConventions.getSuffix().
Referenced by alma.tools.idlgen.IdlTreeManipulator.findXmlEntityNodes().
void alma.tools.idlgen.IdlTreeManipulator.resetGraph | ( | IdlObject | node | ) |
Calls reset()
and setId(null)
on all nodes below and including node
.
setId(null)
is called to invalidate the id cache inside IdlObject
. Otherwise getId()
produces results that are inconsistent with the names of the parent nodes, if a parent node was renamed after getId was called. This could be fixed in the implementation of IdlObject
if IdlObject.name()
would not only invalidate the id cache of the node itself, but also of all child nodes.
Referenced by alma.tools.idlgen.XmlIdlCompiler.compile_file().
final String alma.tools.idlgen.IdlTreeManipulator.XML_WRAPPER_STRUCT_NAME = "XmlEntityStruct" [static] |
Referenced by alma.tools.idlgen.IdlTreeManipulator.findXmlTypedefNodes().