FDO API Reference | Feature Data Objects |
00001 #ifndef FDO_IO_TEXTREADER_H 00002 #define FDO_IO_TEXTREADER_H 00003 // 00004 00005 // 00006 // Copyright (C) 2004-2006 Autodesk, Inc. 00007 // 00008 // This library is free software; you can redistribute it and/or 00009 // modify it under the terms of version 2.1 of the GNU Lesser 00010 // General Public License as published by the Free Software Foundation. 00011 // 00012 // This library is distributed in the hope that it will be useful, 00013 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00014 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00015 // Lesser General Public License for more details. 00016 // 00017 // You should have received a copy of the GNU Lesser General Public 00018 // License along with this library; if not, write to the Free Software 00019 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 00020 // 00021 00022 00023 #include <FdoCommon.h> 00024 00025 /// \brief 00026 /// FdoIoTextReader reads from a binary stream containing UTF8 characters. 00027 /// It formats these UTF8 characters into Unicode wide characters. This class is 00028 /// not yet complete, since the Read functions still have to be added. 00029 class FdoIoTextReader : public FdoDisposable 00030 { 00031 public: 00032 /// \brief 00033 /// Constructs a text reader on a file 00034 /// 00035 /// \param fileName 00036 /// Input name of the file to read. 00037 /// 00038 /// \return 00039 /// Returns FdoIoTextReader 00040 /// 00041 FDO_API_COMMON static FdoIoTextReader* Create( FdoString* fileName ); 00042 00043 /// \brief 00044 /// Constructs a text reader on a stream 00045 /// 00046 /// \param stream 00047 /// Input the stream to read. 00048 /// 00049 /// \return 00050 /// Returns FdoIoTextReader 00051 /// 00052 FDO_API_COMMON static FdoIoTextReader* Create( FdoIoStream* stream ); 00053 00054 /// \brief 00055 /// Gets the underlying stream. If a stream was passed to this object 00056 /// then this stream is returned. 00057 /// Otherwise, an auto-generated stream (wrapped around the file name 00058 /// that was passed to this object) is returned. 00059 /// 00060 /// \return 00061 /// Returns the underlying stream. 00062 /// 00063 FDO_API_COMMON FdoIoStream* GetStream(); 00064 00065 protected: 00066 /// \cond DOXYGEN-IGNORE 00067 FdoIoTextReader() {} 00068 FdoIoTextReader( FdoIoStream* stream ); 00069 virtual ~FdoIoTextReader(void); 00070 /// \endcond 00071 00072 private: 00073 /// the underlying stream. 00074 FdoIoStreamP mStream; 00075 }; 00076 00077 /// \brief 00078 /// FdoIoTextReaderP is a FdoPtr on FdoIoTextReader, provided for convenience. 00079 typedef FdoPtr<FdoIoTextReader> FdoIoTextReaderP; 00080 00081 #endif 00082 00083
Comments or suggestions? Send us feedback. |