I'm sorry, I'm confused. Whats the point of putting everything into a
namespace, if you're going to turn around and immediately( in header files
needed to use the classes ) export everything to the global namespace? I
don't think uncondiftional using declarations, or using directives belong
in ANY header file! Let the client of the library decide how to handle the
namespace. One way to do that would be to use a macro, say
EXPORT_XERCES_NAMESPACE, and and wrap the using declarations in a #ifdef
... #endif. For example:
#ifdef EXPORT_XERCES_NAMESPACE
using Xerces::XercesDOMParser;
using Xerces::DOMDocument;
...
#endif
Then, the library client( me, amoung others! ) can choose to define that
macro, or not.
Marc Robertson
Staff Consultant
AWD Development
DST Systems, Inc.
"Pitt, Esmond"
<[EMAIL PROTECTED] To: [EMAIL PROTECTED]
> cc:
Subject: RE: Proposal Review: Using C++
Namespace
11/06/2002
05:45 PM
Please respond
to
xerces-c-dev
Tinny
As per my previous message, the 'correct' solution is to enumerate all the
namespace exports explicitly with using-declarations, e.g.
using Xerces::XercesDOMParser;
using Xerces::DOMDOcument;
// ...
in XercesDefs.hpp (or in each header file which exports a class). There is
no accidental namespace pollution with this technique, no
order-dependencies, and no user migration is required.
EJP
-----Original Message-----
From: Tinny Ng [mailto:tng-xml@;ca.ibm.com]
Sent: Thursday, 7 November 2002 12:53 AM
To: [EMAIL PROTECTED]
Subject: Re: Proposal Review: Using C++ Namespace
Hi everyone,
I have implemented the proposed C++ Namespace to the latest code base.
Since a number of response indicated no "using" clause in a global header,
I've removed that from the XercesDefs.hpp which then means users'
application has a migration item.
Please review the latest nightly build
(http://xml.apache.org/dist/xerces-c/nightly/2002-11-06/) and let me know
any comment.
Thanks!
Tinny
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]