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 Miroslaw Dobrzanski-Neumann <mn...@mosaic-ag.com> on 2000/11/03 12:37:32 UTC
new operator
Hi,
What about a new operator in DOM_Node.
it allows the strightforward check for null such as
DOM_Node node;
...
if (node) {
...
}
here the unified diff
---- cut ----
--- xerces-c-src1_3_0.org/src/dom/DOM_Node.hpp Sat Sep 30 19:37:26 2000
+++ xerces-c-src1_3_0/src/dom/DOM_Node.hpp Fri Nov 3 12:13:44 2000
@@ -182,6 +182,7 @@
*/
bool operator != (const DOM_NullPtr * other) const;
+ operator bool (void) const {return !isNull();}
enum NodeType {
ELEMENT_NODE = 1,
---- cut ----
--
Miroslaw Dobrzanski-Neumann
MOSAIC SOFTWARE AG
Base Development and Research
Tel +49-2225-882-291
Fax +49-2225-882-201
E-mail: mne@mosaic-ag.com