You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by bu...@apache.org on 2004/02/25 14:05:39 UTC
DO NOT REPLY [Bug 27220] New: -
Forward declaration of classes-namespace problem
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=27220>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=27220
Forward declaration of classes-namespace problem
Summary: Forward declaration of classes-namespace problem
Product: Xerces-C++
Version: 2.4.0
Platform: PC
OS/Version: Linux
Status: NEW
Severity: Normal
Priority: Other
Component: DOM
AssignedTo: xerces-c-dev@xml.apache.org
ReportedBy: amit.flashner@comverse.com
I created classes that wrap Xerces functionality.
The users of my classes don't need to know Xerces, only these classes.
The classes have private pointers to DOMDocument and DOMElement.
I order to prevent the need to include the xerces header files, I tried to
forward declare them in my header file like this:
namespace xercesc {
class DOMDocument;
class DOMElement;
};
but this didn't compile claiming that namespace aliases can't be used.
Changing to this:
XERCES_CPP_NAMESPACE_BEGIN
class DOMDocument;
class DOMElement;
XERCES_CPP_NAMESPACE_END
worked, but again, my users will have to know these macros (which declared only
in xerces header files).
Of course I can change the namespace directly to xercesc_2_5_0, but this will
force me to to change it each time I upgrade.
I'm using gcc 3.2.3
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org