From e8fccfeee49f9a756cfe78ca6837e4163899ab7f Mon Sep 17 00:00:00 2001 From: "William R. Otte" Date: Fri, 13 Jan 2006 20:41:12 +0000 Subject: Fri Jan 13 20:39:21 UTC 2006 William Otte --- TAO/CIAO/CIAO-INSTALL.html | 11 ++------- TAO/CIAO/ChangeLog | 16 +++++++++++++ TAO/CIAO/NEWS | 18 ++++++++++---- TAO/CIAO/tools/Config_Handlers/XSCRT/Parser.hpp | 5 ++-- 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 @@

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 Plan Launcher and the Repository Manager. 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.

Building Xerces-C

@@ -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. -
  • - NOTE: 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.
    -
    -
  • Xerces-C Environment Settings

    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 + + * 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 * 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 next_element () { - return XML::Element ( - dynamic_cast (e_->item (ei_++))); + return XML::Element (XML::dom_cast (e_->item (ei_++))); } bool @@ -44,7 +43,7 @@ namespace XSCRT next_attribute () { return XML::Attribute ( - dynamic_cast (a_->item (ai_++))); + XML::dom_cast (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 std::basic_string ns_prefix (std::basic_string const& ns, Element const& e); + + // Casting helpers, made necessary by the Xerces project's braindead + // avoidance of RTTI. + template struct dom_traits; + + // Specializations for different node types + template <> + struct dom_traits + { + enum { node_type = xercesc::DOMNode::ELEMENT_NODE }; + }; + + template <> + struct dom_traits + { + enum { node_type = xercesc::DOMNode::ATTRIBUTE_NODE }; + }; + + template + DERIVED_PTR dom_cast (xercesc::DOMNode *node) + { + DERIVED_PTR elem = 0; + if ((node != 0) && + (node->getNodeType () == dom_traits::node_type)) + { + elem = reinterpret_cast (node); + } + return elem; + } template class Element @@ -221,7 +250,7 @@ namespace XSCRT Element parent () const { - return dynamic_cast(ce_->getParentNode ()); + return dom_cast (ce_->getParentNode ()); } public: -- cgit v1.2.1