2 * @file StreamFactory.h
4 * @author Krishnakumar B <kitty@cs.wustl.edu>
7 #ifndef _ACEXML_STREAM_FACTORY_H
8 #define _ACEXML_STREAM_FACTORY_H
10 #include /**/ "ace/pre.h"
11 #include "ACEXML/common/ACEXML_Export.h"
13 #if !defined (ACE_LACKS_PRAGMA_ONCE)
15 #endif /* ACE_LACKS_PRAGMA_ONCE */
17 #include "ACEXML/common/XML_Types.h"
19 // Forward declarations
21 class ACEXML_CharStream
;
24 * @class ACEXML_StreamFactory
26 * @brief A generic factory used to create an appropriate @sa
27 * ACEXML_CharStream from a SYSTEM id. This class creates a @sa
28 * ACEXML_FileCharStream or a @sa ACEXML_HttpCharStream depending on the
31 * @todo Write a stream abstraction for handling ftp:// type URIs and add
32 * a function to create and return such streams. That is the only chunk
33 * missing in the armour.
36 class ACEXML_Export ACEXML_StreamFactory
40 virtual ~ACEXML_StreamFactory ();
43 * Create the appropriate stream from the @a uri passed and return the
44 * stream. The caller is responsible for deallocating the returned
47 * @param uri SYSTEM id or a stream of characters (in the case of a
50 virtual ACEXML_CharStream
* create_stream (const ACEXML_Char
* uri
);
53 #include /**/ "ace/post.h"
55 #endif /* _ACEXML_STREAM_FACTORY_H */