Документ взят из кэша поисковой машины. Адрес оригинального документа : http://www.atnf.csiro.au/computing/software/casacore/casacore-1.2.0/doc/html/IO_8h_source.html
Дата изменения: Unknown
Дата индексирования: Mon Feb 14 19:08:04 2011
Кодировка:

Поисковые слова: http astro.uni-altai.ru pub article.html id 1542
casacore: casa/IO.h Source File

IO.h

Go to the documentation of this file.
00001 //# IO.h: Basic classes and global functions for IO and object persistency
00002 //# Copyright (C) 1995,1996,1999,2001
00003 //# Associated Universities, Inc. Washington DC, USA.
00004 //#
00005 //# This library is free software; you can redistribute it and/or modify it
00006 //# under the terms of the GNU Library General Public License as published by
00007 //# the Free Software Foundation; either version 2 of the License, or (at your
00008 //# option) any later version.
00009 //#
00010 //# This library is distributed in the hope that it will be useful, but WITHOUT
00011 //# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00012 //# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Library General Public
00013 //# License for more details.
00014 //#
00015 //# You should have received a copy of the GNU Library General Public License
00016 //# along with this library; if not, write to the Free Software Foundation,
00017 //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
00018 //#
00019 //# Correspondence concerning AIPS++ should be addressed as follows:
00020 //#        Internet email: aips2-request@nrao.edu.
00021 //#        Postal address: AIPS++ Project Office
00022 //#                        National Radio Astronomy Observatory
00023 //#                        520 Edgemont Road
00024 //#                        Charlottesville, VA 22903-2475 USA
00025 //#
00026 //# $Id: IO.h 20615 2009-06-09 02:16:01Z Malte.Marquarding $
00027 
00028 #ifndef CASA_IO_H
00029 #define CASA_IO_H
00030 
00031 //# Includes for object persistency.
00032 #include <casa/IO/AipsIO.h>
00033 #include <casa/IO/AipsIOCarray.h>
00034 
00035 //# Includes for general IO.
00036 #include <casa/IO/ByteSinkSource.h>
00037 
00038 //# Includes for underlying IO classes.
00039 #include <casa/IO/CanonicalIO.h>
00040 #include <casa/IO/RawIO.h>
00041 #include <casa/IO/RegularFileIO.h>
00042 #include <casa/IO/FilebufIO.h>
00043 #include <casa/IO/FiledesIO.h>
00044 #include <casa/IO/MemoryIO.h>
00045 
00046 
00047 namespace casa { //# NAMESPACE CASA - BEGIN
00048 
00049 // <module>
00050 
00051 // <summary>
00052 // Basic classes and global functions for IO and object persistency
00053 // </summary>
00054 
00055 // <reviewed reviewer="UNKNOWN" date="before2004/08/25" demos="">
00056 // </reviewed>
00057 
00058 // <synopsis>
00059 // This module provides the basic IO functionality for the AIPS++ classes.
00060 // There are two IO mechanisms:
00061 // <ol>
00062 // <li> Class <linkto class=AipsIO:description>AipsIO</linkto>
00063 //      provides the object persistency mechanism.
00064 //      The templated global functions in
00065 //      <linkto file="AipsIOCarray.h#AipsIOCarray">AipsIOCarray.h</linkto>
00066 //      form a little layer upon AipsIO. They provide the means to put or
00067 //      get a C-style array of any type.
00068 // <li> Class <linkto class=ByteSinkSource:description>ByteSinkSource</linkto>
00069 //      and its ancestors provide a general IO mechanism.
00070 // </ol>
00071 //
00072 // Both use the underlying IO framework which define where and how
00073 // the data is written. The how-part is defined by classes derived from
00074 // <linkto class=TypeIO:description>TypeIO</linkto> as shown
00075 // in the <a href=IO/IO_1.html>OMT diagram</a>.
00076 // There are three such classes:
00077 // <ol>
00078 // <li> <linkto class=CanonicalIO:description>CanonicalIO</linkto> reads/writes
00079 //      data in canonical (machine-independent) format. This should be
00080 //      used when data are meant to be exportable.
00081 //      It uses the conversion functions in class
00082 //      <linkto class=CanonicalConversion:description>CanonicalConversion
00083 //      </linkto>.
00084 // <li> <linkto class=RawIO:description>RawIO</linkto> reads/writes
00085 //      data in native (machine-dependent) format. This can be used when
00086 //      data are not exported.
00087 // <li> <linkto class=ConversionIO:description>ConversionIO</linkto>
00088 //      reads/writes in an external format as defined at construction time.
00089 //      This can be used when the external format can be one of several
00090 //      (e.g. VAX or IBM for a WSRT archive tape). In this way the
00091 //      format has to be defined only once and thereafter is it handled
00092 //      correctly by the polymorphism mechanism.
00093 // </ol>
00094 // The where-part is defined by classes derived from
00095 // <linkto class=ByteIO:description>ByteIO</linkto> as shown
00096 // in the <a href=IO/IO_2.html>OMT diagram</a>.
00097 // There are a few such classes:
00098 // <ol>
00099 // <li> <linkto class=RegularFileIO:description>RegularFileIO</linkto> uses a
00100 //      regular file to hold the data. Internally it uses FilebufIO (see below).
00101 // <li> <linkto class=LargeRegularFileIO:description>LargeRegularFileIO</linkto>
00102 //      is similar to RegularFileIO for 64-bit systems.
00103 // <li> <linkto class=FilebufIO:description>FilebufIO</linkto> does the IO
00104 //      in a buffered way similar to the <src>stdio</src> system. However, it
00105 //      does not use stdio because that gave problems when doing concurrent
00106 //      access from multiple processes.
00107 // <li> <linkto class=LargeFilebufIO:description>LargeFilebufIO</linkto> is
00108 //      similar to FilebufIO for 64-bit systems.
00109 // <li> <linkto class=FiledesIO:description>FiledesIO</linkto> uses the
00110 //      UNIX IO-functions like <src>open, read</src> to do IO directly.
00111 //      It does not use an internal buffer. Instead it always does
00112 //      physical IO. It is meant for IO operations where large chunks of
00113 //      a file are accessed and for IO on sockets, pipes, etc..
00114 // <li> <linkto class=LargeFiledesIO:description>LargeFiledesIO</linkto> is
00115 //      similar to FiledesIO for 64-bit systems.
00116 // <li> <linkto class=MemoryIO:description>MemoryIO</linkto> uses a
00117 //      (possibly expandable) buffer in memory to hold the data.
00118 // <li> <linkto class=MMapIO>MMapIO:description</linkto> uses memory-mapped IO.
00119 //      Be careful to use this on 32-bit machines, because its address space is
00120 //      too small to handle a file of a few GBytes.
00121 // </ol>
00122 //
00123 // The IO framework is easily expandable. One can for instance think of a
00124 // class <src>AsciiIO</src> derived from <src>TypeIO</src>
00125 // to hold data in ASCII format.
00126 // <br> A class <src>TapeIO</src> could be derived from <src>ByteIO</src>
00127 // to access tape files. This class can also contain functions to skip to
00128 // a tape file, which the user can call directly.
00129 // Similarly a class <src>RemoteTapeIO</src> could be developed.
00130 // </synopsis>
00131 
00132 // </module>
00133 
00134 
00135 
00136 } //# NAMESPACE CASA - END
00137 
00138 #endif
00139 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines