FDO .NET API Reference Feature Data Objects

mgIoTextWriter.h

Go to the documentation of this file.
00001 /*
00002 * Copyright (C) 2004-2006  Autodesk, Inc.
00003 * 
00004 * This library is free software; you can redistribute it and/or
00005 * modify it under the terms of version 2.1 of the GNU Lesser
00006 * General Public License as published by the Free Software Foundation.
00007 * 
00008 * This library is distributed in the hope that it will be useful,
00009 * but WITHOUT ANY WARRANTY; without even the implied warranty of
00010 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00011 * Lesser General Public License for more details.
00012 * 
00013 * You should have received a copy of the GNU Lesser General Public
00014 * License along with this library; if not, write to the Free Software
00015 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
00016 *
00017 */
00018 
00019 #pragma once
00020 
00021 #include "Runtime\Disposable.h"
00022 
00023 class FdoIoTextWriter;
00024 
00025 BEGIN_NAMESPACE_OSGEO_COMMON_IO
00026 public __gc class IoStream;
00027 
00028 /// \ingroup (OSGeoFDOCommonIo)
00029 /// \brief
00030 ///     IoTextWriter writes Unicode wide character text to a binary stream.
00031 ///     The text is written in UTF8 format.
00032 public __sealed __gc class IoTextWriter : public NAMESPACE_OSGEO_RUNTIME::Disposable
00033 {
00034 public:
00035     /// \brief
00036     ///     Constructs a text writer on a file.
00037     /// 
00038     /// \param fileName 
00039     ///     Input name of the file to write to. The file is created
00040     ///     if it does not yet exist. If it already exists, its previous contents are 
00041     ///     completely overwritten.
00042     /// 
00043     /// \return
00044     ///     Returns IoTextWriter
00045     /// 
00046     ///  
00047     IoTextWriter(System::String* fileName);
00048 
00049     /// \brief
00050     ///     Constructs a text writer on a stream.
00051     /// 
00052     /// \param stream 
00053     ///     Input the stream to write to. Writing starts at the 
00054     ///     stream's current position.
00055     /// 
00056     /// \return
00057     ///     Returns IoTextWriter
00058     /// 
00059     ///  
00060     IoTextWriter(NAMESPACE_OSGEO_COMMON_IO::IoStream* stream);
00061 
00062     /// \brief
00063     ///     Gets the underlying stream. If a stream was passed to this object
00064     ///     then this stream is returned.
00065     ///     Otherwise, an auto-generated stream (wrapped around the  file name 
00066     ///     that was passed to this object) is returned.
00067     /// 
00068     /// \return
00069     ///     Returns the underlying stream.
00070     /// 
00071     ///  
00072     __property NAMESPACE_OSGEO_COMMON_IO::IoStream* get_Stream();
00073 
00074     /// \brief
00075     ///     Writes to this text writer. The text is written in UTF8 format.
00076     /// 
00077     /// \param data 
00078     ///     The text to write.
00079     /// 
00080     System::Void Write(System::String* data);
00081 
00082     /// \brief
00083     ///     Same as Write(), except that a carriage return (n) is appended to
00084     ///     the text.
00085     /// 
00086     /// \param data 
00087     ///     The text to write.
00088     /// 
00089     System::Void WriteLine(System::String* data);
00090 
00091     /// \brief
00092     ///     Constructs a text writer based on an unmanaged instance of the object
00093     /// 
00094     /// \param unmanaged 
00095     ///     Input A Pointer to the unmanaged writer.
00096     /// 
00097     /// \param autoDelete 
00098     ///     Input Indicates if the constructed object should be automatically deleted 
00099     ///     once it no longer referenced.
00100     /// 
00101     IoTextWriter(System::IntPtr unmanaged, System::Boolean autoDelete);
00102 
00103 /// \cond DOXYGEN-IGNORE
00104 protected:
00105     System::Void ReleaseUnmanagedObject();
00106 
00107 public private:
00108     inline FdoIoTextWriter* GetImpObj();
00109 /// \endcond
00110 };
00111 
00112 END_NAMESPACE_OSGEO_COMMON_IO
00113 
00114 

Comments or suggestions? Send us feedback.