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=16219>.
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=16219

DOMUserDataHandler<_TT>::handle -- dst argument is of type const DOMNode*

           Summary: DOMUserDataHandler<_TT>::handle -- dst argument is of
                    type const DOMNode*
           Product: Xerces-C++
           Version: 2.1.0
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: DOM
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


A functional object with a 'handle' function needs to be specified when using
the setUserData method to store arbitrary data along with a DOMNode. 

During operation NODE_CLONED, I change 'dst' as follows:

dst->setUserData(key, new _TT( ( *(_TT *) data )  ), this);

(_TT is the type of the data, as I have defined a template for that.)

This operation is not legal (but compiles with GCC3.1, not with 2.95), because
dst is defined to be "const DOMNode*".

I don't know whether I'm supposed to do it that way, but if I am, this seems to
me like a design bug.

FIX:

update definition of DOMUserDataHandler::handle.


ps.:

My workaround is a cast

    ((DOMNode*) dst)->setUserData(key, new _TT( ( *(_TT *) data )  ), this);

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to