StreamFactory.h

Go to the documentation of this file.
00001 /**
00002  *  @file StreamFactory.h
00003  *
00004  *  StreamFactory.h,v 1.2 2003/07/19 19:04:10 dhinton Exp
00005  *
00006  *  @author Krishnakumar B <kitty@cs.wustl.edu>
00007  */
00008 
00009 #ifndef _ACEXML_STREAM_FACTORY_H
00010 #define _ACEXML_STREAM_FACTORY_H
00011 
00012 #include /**/ "ace/pre.h"
00013 #include "ACEXML/common/ACEXML_Export.h"
00014 
00015 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00016 #pragma once
00017 #endif /* ACE_LACKS_PRAGMA_ONCE */
00018 
00019 #include "ACEXML/common/XML_Types.h"
00020 
00021 // Forward declarations
00022 
00023 class ACEXML_CharStream;
00024 
00025 /**
00026  *  @class ACEXML_StreamFactory StreamFactory.h "ACEXML/common/ACEXML_StreamFactory.h"
00027  *
00028  *  @brief A generic factory used to create an appropriate @sa
00029  *  ACEXML_CharStream from a SYSTEM id. This class creates a @sa
00030  *  ACEXML_FileCharStream or a @sa ACEXML_HttpCharStream depending on the
00031  *  URI supplied.
00032  *
00033  *  @todo Write a stream abstraction for handling ftp:// type URIs and add
00034  *  a function to create and return such streams. That is the only chunk
00035  *  missing in the armour.
00036  */
00037 
00038 class ACEXML_Export ACEXML_StreamFactory
00039 {
00040 public:
00041 
00042   // Destructor
00043   virtual ~ACEXML_StreamFactory (void);
00044 
00045   /**
00046    *  Create the appropriate stream from the @a uri passed and return the
00047    *  stream. The caller is responsible for deallocating the returned
00048    *  stream.
00049    *
00050    *  @param uri SYSTEM id or a stream of characters (in the case of a
00051    *  StrCharStream).
00052    */
00053   virtual ACEXML_CharStream* create_stream (const ACEXML_Char* uri);
00054 };
00055 
00056 #include /**/ "ace/post.h"
00057 
00058 #endif /* _ACEXML_STREAM_FACTORY_H */

Generated on Thu Nov 9 11:45:39 2006 for ACEXML by doxygen 1.3.6