diff options
-rw-r--r-- | TAO/CIAO/CIAO-INSTALL.html | 11 | ||||
-rw-r--r-- | TAO/CIAO/ChangeLog | 16 | ||||
-rw-r--r-- | TAO/CIAO/NEWS | 18 | ||||
-rw-r--r-- | TAO/CIAO/tools/Config_Handlers/XSCRT/Parser.hpp | 5 | ||||
-rw-r--r-- | TAO/CIAO/tools/Config_Handlers/XSCRT/XML.hpp | 31 |
5 files changed, 63 insertions, 18 deletions
diff --git a/TAO/CIAO/CIAO-INSTALL.html b/TAO/CIAO/CIAO-INSTALL.html index 17b6fd46597..ce66f61fb5f 100644 --- a/TAO/CIAO/CIAO-INSTALL.html +++ b/TAO/CIAO/CIAO-INSTALL.html @@ -163,9 +163,8 @@ <p>The Xerces-C XML parsing library is a necessary component to build parts of DAnCE that need to process XML based descriptor files, which include the <b>Plan Launcher</b> and the <b>Repository Manager</b>. Currently, the only Xerces-C - version supported by the DOC group is version 2.6 compiled with RTTI support. - Earlier versions of the Xerces-C library may work, but only if they were built - with RTTI support. + version supported by the DOC group is version 2.6 or later. + Earlier versions of the Xerces-C library may work. </p> <h4>Building Xerces-C </h4> @@ -182,12 +181,6 @@ inconsistant library decorators onto the end of the Xerces-C libraries. The MPC build tool will expect these libraries to be named xerces-c for non debug versions, and xerces-cd for debug versions. - <li> - <strong>NOTE</strong>: RTTI is not enabled on most Win32 targets by default. If - you are building your own libraries, please make sure that you enable RTTI - support.<br> - <br> - </li> </ul> <h4>Xerces-C Environment Settings </h4> diff --git a/TAO/CIAO/ChangeLog b/TAO/CIAO/ChangeLog index 45647230ce9..1bbf31af204 100644 --- a/TAO/CIAO/ChangeLog +++ b/TAO/CIAO/ChangeLog @@ -1,3 +1,19 @@ +Fri Jan 13 20:39:21 UTC 2006 William Otte <wotte@dre.vanderbilt.edu> + + * tools/Config_Handlers/XSCRT/Parser.hpp + * tools/Config_Handlers/XSCRT/XML.hpp + + Added a templated casting operator for Xerces types instead + of using standard dynamic_cast. Thanks to Ossama Othman + ossama at dre dot vanderbilt dot edu for suggesting this + fix. + + * CIAO-INSTALL.html + * NEWS + + The above changes removed the requirement for an RTTI enabled + version of Xerces. Updated these documents to reflect this. + Thu Jan 12 21:40:47 UTC 2006 Gan Deng <gan.deng@vanderbilt.edu> * examples/Hello/ReDaC-Usage.html diff --git a/TAO/CIAO/NEWS b/TAO/CIAO/NEWS index 582adf7aeef..6b904316751 100644 --- a/TAO/CIAO/NEWS +++ b/TAO/CIAO/NEWS @@ -75,6 +75,9 @@ PLANNED MAJOR CHANGES FOR THE NEXT RELEASE USER VISIBLE CHANGES BETWEEN CIAO-0.4.8 and CIAO-0.4.9 ====================================================== +. RTTI enabled versions of the Xerces library are no longer needed on + Windows platforms. + . The CIDLC compiler now supports basic preprocessor directives: #ifdef, #ifndef, #else, and #endif as well as the -D command- line option. @@ -92,12 +95,17 @@ USER VISIBLE CHANGES BETWEEN CIAO-0.4.8 and CIAO-0.4.9 reconfiguration granularity level, including: 1) Install/remove component instances of the existing component types. - 2) Install/remove component instances of a different type, i.e., a totally new type of component. + 2) Install/remove component instances of a different type, i.e., a + totally new type of component. 3) Install/remove component instances from an existing container. - 4) Install new component instances into a dynamically created brand new container. - Move around existing components from one existing container to another existing/new container. - 5) Install new component instances into another component server in the same physical node. - 6) Install new component instances into another component server into a remote host. + 4) Install new component instances into a dynamically created brand + new container. + Move around existing components from one existing container to + another existing/new container. + 5) Install new component instances into another component server in + the same physical node. + 6) Install new component instances into another component server + into a remote host. To see how to use this feature, please see the ReDaC-Usage.html under the $CIAO_ROOT/examples/Hello/ directory. diff --git a/TAO/CIAO/tools/Config_Handlers/XSCRT/Parser.hpp b/TAO/CIAO/tools/Config_Handlers/XSCRT/Parser.hpp index 66fd4b6db5c..5fa1e827f8d 100644 --- a/TAO/CIAO/tools/Config_Handlers/XSCRT/Parser.hpp +++ b/TAO/CIAO/tools/Config_Handlers/XSCRT/Parser.hpp @@ -30,8 +30,7 @@ namespace XSCRT XML::Element<C> next_element () { - return XML::Element<C> ( - dynamic_cast<xercesc::DOMElement*> (e_->item (ei_++))); + return XML::Element<C> (XML::dom_cast <xercesc::DOMElement*> (e_->item (ei_++))); } bool @@ -44,7 +43,7 @@ namespace XSCRT next_attribute () { return XML::Attribute<C> ( - dynamic_cast<xercesc::DOMAttr*> (a_->item (ai_++))); + XML::dom_cast <xercesc::DOMAttr*> (a_->item (ai_++))); } private: diff --git a/TAO/CIAO/tools/Config_Handlers/XSCRT/XML.hpp b/TAO/CIAO/tools/Config_Handlers/XSCRT/XML.hpp index 4b440803a0f..588cb61dc84 100644 --- a/TAO/CIAO/tools/Config_Handlers/XSCRT/XML.hpp +++ b/TAO/CIAO/tools/Config_Handlers/XSCRT/XML.hpp @@ -144,6 +144,35 @@ namespace XSCRT template <typename C> std::basic_string<C> ns_prefix (std::basic_string<C> const& ns, Element<C> const& e); + + // Casting helpers, made necessary by the Xerces project's braindead + // avoidance of RTTI. + template <typename DERIVED> struct dom_traits; + + // Specializations for different node types + template <> + struct dom_traits<xercesc::DOMElement *> + { + enum { node_type = xercesc::DOMNode::ELEMENT_NODE }; + }; + + template <> + struct dom_traits<xercesc::DOMAttr *> + { + enum { node_type = xercesc::DOMNode::ATTRIBUTE_NODE }; + }; + + template <typename DERIVED_PTR> + DERIVED_PTR dom_cast (xercesc::DOMNode *node) + { + DERIVED_PTR elem = 0; + if ((node != 0) && + (node->getNodeType () == dom_traits<DERIVED_PTR>::node_type)) + { + elem = reinterpret_cast <DERIVED_PTR> (node); + } + return elem; + } template <typename C> class Element @@ -221,7 +250,7 @@ namespace XSCRT Element<C> parent () const { - return dynamic_cast<xercesc::DOMElement const*>(ce_->getParentNode ()); + return dom_cast <xercesc::DOMElement const*>(ce_->getParentNode ()); } public: |