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 "Bovy, Stephen J" <ST...@ca.com> on 2004/04/22 02:29:38 UTC

DOMInputSource and BinInputStream ???

How can I use DOMInputSource so that it uses a BinInputStream ????

Any suggestions would be greatly appreciated 

Can I do the following:

class myinput : DOMInputSource, BinMemInputStream
{

public:

  myinput ( ) { };

 ~myinput ( ) { }; 

 BinInputStream* makestream ( ) { return this };

}

---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org


Re: DOMInputSource and BinInputStream ???

Posted by Gareth Reakes <ga...@parthenoncomputing.com>.
Hi,
	without knowing what you are trying to achieve it is hard to know
if this is the best way to do it, however, the code looks OK to me.

Gareth


On Wed, 21 Apr 2004, Bovy, Stephen J wrote:

> How can I use DOMInputSource so that it uses a BinInputStream ????
>
> Any suggestions would be greatly appreciated
>
> Can I do the following:
>
> class myinput : DOMInputSource, BinMemInputStream
> {
>
> public:
>
>   myinput ( ) { };
>
>  ~myinput ( ) { };
>
>  BinInputStream* makestream ( ) { return this };
>
> }
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-c-dev-help@xml.apache.org
>

-- 
Gareth Reakes, Managing Director      Parthenon Computing
+44-1865-811184                  http://www.parthcomp.com

---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org


Re: DOMInputSource and BinInputStream ???

Posted by da...@us.ibm.com.
> Can I do the following:
>
> class myinput : DOMInputSource, BinMemInputStream
> {
>
> public:
>
>   myinput ( ) { };
>
>  ~myinput ( ) { };
>
>  BinInputStream* makestream ( ) { return this };
>
> }

You shouldn't do this, because the parser will want to delete the
BinMemInputStream instance, and I don't think there's any guarantee the
parser won't try to access to DOMInputSource instance after it has deleted
the stream.

As an side, perhaps you meant to derive from DOMInputSource using public
inheritence, rather than private?

Dave


---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org