Re: [libxml++] _private field
- From: murrayc t-online de (Murray Cumming)
- To: libxml++ <libxmlplusplus-general lists sourceforge net>
- Subject: Re: [libxml++] _private field
- Date: 07 Feb 2003 11:36:06 +0100
On Fri, 2003-02-07 at 00:07, Christophe de Vienne wrote:
> Good evening,
>
> I have a small doubt :
>
> Initialising the _private field of xmlNode structures is done this way (for
> element in the exemple) :
>
> node->_private = new xmlpp::Element(node);
>
> so the xmlpp::Element pointer is stored in a void *.
>
> when reading it in destruct, the _private field is cast to a Node * for
> deletion.
>
> At _private initialisation, shouldn't the pointer cast to Node * before being
> cast to void *, since we have some virtual functions ?
Why isn't an implicit conversion from Element* to Node* OK?
> Or would it be the case only if Element herit virtualy from Node ?
Yes. I think so.
--
Murray Cumming
murray usa net
www.murrayc.com
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]