
Public Member Functions | |
| ComponentHelperGeneratorProxy (String outputRootDir, boolean verbose) | |
| void | setOriginalParseTree (IdlObject root, String rootPackage) |
| void | generateComponentHelperCode () |
Private Member Functions | |
| void | collectACSComponents (IdlObject node, HashMap interfaceMap) |
Private Attributes | |
| Map< String, IdlInterface > | m_interfaceMap |
| JavaPackageScout | m_packageScout |
| boolean | m_verbose |
| ComponentHelperInfo | m_compHelpInfo |
Gets the information together that the generator for component helper classes (alma.acs.tools.comphelpergen.CompHelperGenerator) needs, and runs it.
The communication is through XML to decouple this module from the comphelpgen module. The XML complies with the schema HelperInfo.xsd from the module comphelpgen which is listed here for convenience:
<?xml version="1.0" encoding="ISO-8859-1"?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified"> <xs:element name="ComponentHelperInfo"> <xs:complexType> <xs:sequence> <xs:element ref="ComponentInterface" minOccurs="0" maxOccurs="unbounded"/> </xs:sequence> <xs:attribute name="outputRootDirectory" type="xs:string" use="required"/> </xs:complexType> </xs:element> <xs:element name="ComponentInterface"> <xs:complexType> <xs:attribute name="idlPackage" type="xs:string" use="required"/> <xs:attribute name="componentClassName" type="xs:string" use="required"/> <xs:attribute name="internalInterface" type="xs:string" use="optional"/> </xs:complexType> </xs:element> </xs:schema>
In the implementation, schema conformance is guaranteed by using identical binding classes on either side of the XML communication.
| alma::tools::idlgen::comphelpgen::ComponentHelperGeneratorProxy::ComponentHelperGeneratorProxy | ( | String | outputRootDir, | |
| boolean | verbose | |||
| ) | [inline] |
Constructor for ComponentHelperGeneratorProxy.
| outputRootDir | the directory under which the component helper classes will be put. | |
| verbose | if true, some information will be dumped to System.out, including the XML. |
References m_compHelpInfo, m_verbose, and alma::acs::tools::comphelpergen::generated::ComponentHelperInfo::setOutputRootDirectory().
| void alma::tools::idlgen::comphelpgen::ComponentHelperGeneratorProxy::collectACSComponents | ( | IdlObject | node, | |
| HashMap | interfaceMap | |||
| ) | [inline, private] |
Traverses the tree under node and puts all interface nodes into the map if the interface has ACSComponent as an ancestor.
| node | IDL parse tree node | |
| interfaceMap | will get interfaces (key=name, value=IdlObject) |
Referenced by setOriginalParseTree().
| void alma::tools::idlgen::comphelpgen::ComponentHelperGeneratorProxy::generateComponentHelperCode | ( | ) | [inline] |
Creates the configuration XML and sends it to an alma.acs.tools.comphelpergen.CompHelperGenerator for code generation.
References alma::acs::tools::comphelpergen::generated::ComponentHelperInfo::addComponentInterface(), alma::acs::tools::comphelpergen::CompHelperGenerator::generate(), alma::tools::idlgen::comphelpgen::JavaPackageScout::getPackage(), m_compHelpInfo, m_interfaceMap, m_packageScout, m_verbose, alma::acs::tools::comphelpergen::generated::ComponentHelperInfo::marshal(), alma::acs::tools::comphelpergen::generated::ComponentInterface::setComponentClassName(), alma::acs::tools::comphelpergen::generated::ComponentInterface::setCorbaRepositoryId(), alma::acs::tools::comphelpergen::generated::ComponentInterface::setIdlPackage(), and alma::acs::tools::comphelpergen::generated::ComponentInterface::setInternalInterface().
| void alma::tools::idlgen::comphelpgen::ComponentHelperGeneratorProxy::setOriginalParseTree | ( | IdlObject | root, | |
| String | rootPackage | |||
| ) | [inline] |
Sets the original parse tree. This method must be called before alma.tools.idlgen.IdlTreeManipulator does its work because we need the original interface names that could otherwise be altered.
| root | the root node of the IDL parse tree |
References collectACSComponents(), alma::tools::idlgen::comphelpgen::JavaPackageScout::collectInterfacePackages(), m_interfaceMap, m_packageScout, and m_verbose.
ComponentHelperInfo alma::tools::idlgen::comphelpgen::ComponentHelperGeneratorProxy::m_compHelpInfo [private] |
Referenced by ComponentHelperGeneratorProxy(), and generateComponentHelperCode().
Map<String, IdlInterface> alma::tools::idlgen::comphelpgen::ComponentHelperGeneratorProxy::m_interfaceMap [private] |
Referenced by generateComponentHelperCode(), and setOriginalParseTree().
JavaPackageScout alma::tools::idlgen::comphelpgen::ComponentHelperGeneratorProxy::m_packageScout [private] |
Referenced by generateComponentHelperCode(), and setOriginalParseTree().
Referenced by ComponentHelperGeneratorProxy(), generateComponentHelperCode(), and setOriginalParseTree().
1.6.2