Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

alma::tools::idlgen::IdlTreeManipulator Class Reference

Collaboration diagram for alma::tools::idlgen::IdlTreeManipulator:

Collaboration graph
[legend]
List of all members.

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

String getTypeName (int type)

Static Public Attributes

final String XML_WRAPPER_STRUCT_NAME = "XmlEntityStruct"

Static Private Member Functions

String getIndentation (int depth)

Private Attributes

NamingConventions m_namingConventions

Static Private Attributes

String[] s_indentations = {"", " ", " ", " ", " ", " "}

Detailed Description

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.

Author:
hsommer


Constructor & Destructor Documentation

alma::tools::idlgen::IdlTreeManipulator::IdlTreeManipulator NamingConventions  namingConventions  )  [inline]
 


Member Function Documentation

boolean alma::tools::idlgen::IdlTreeManipulator::findXmlEntityNodes IdlObject  node,
Set  affectedIdentifiers,
Set  nodesToBeGenerated
[inline]
 

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.

Parameters:
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.
Returns:
true if the node requires its parent node to be "xml entity aware".

void alma::tools::idlgen::IdlTreeManipulator::findXmlTypedefNodes IdlObject  node,
Set  entityTypes
[inline]
 

Searches the tree underneath node for typedefs based on XML_WRAPPER_STRUCT_NAME.

Parameters:
node tree root
entityTypes gets filled with IdlTypeDef nodes.

String alma::tools::idlgen::IdlTreeManipulator::getIndentation int  depth  )  [inline, static, private]
 

String alma::tools::idlgen::IdlTreeManipulator::getTypeName int  type  )  [inline, static]
 

For printing the parse tree, needed since OpenORB uses bare int values as enums.

boolean alma::tools::idlgen::IdlTreeManipulator::isPLGenerationRoot IdlObject  node  )  [inline]
 

Might need to adjust this for languages other than Java

void alma::tools::idlgen::IdlTreeManipulator::recursivePrint IdlObject  node,
int  depth
[inline]
 

void alma::tools::idlgen::IdlTreeManipulator::renameXmlBindingNode IdlObject  node  )  [inline]
 

Renames a node using the selected NamingConventions.

void alma::tools::idlgen::IdlTreeManipulator::resetGraph IdlObject  node  )  [inline]
 

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.


Member Data Documentation

NamingConventions alma::tools::idlgen::IdlTreeManipulator::m_namingConventions [private]
 

String [] alma::tools::idlgen::IdlTreeManipulator::s_indentations = {"", " ", " ", " ", " ", " "} [static, private]
 

final String alma::tools::idlgen::IdlTreeManipulator::XML_WRAPPER_STRUCT_NAME = "XmlEntityStruct" [static]
 


The documentation for this class was generated from the following file:
Generated on Thu Apr 30 03:07:29 2009 for ACS Java API by doxygen 1.3.8