| Getting Started | Documentation | Glish | Learn More | Programming | Contact Us |
| Version 1.9 Build 803 |
|
This file containd the .h module. The working part of this file is really only two lines long but the required "boiler-plate" takes up the first 25 lines (approximately). This text must be included with every file that is intended for the AIPS++ system (i.e. that could be distributed outside of NRAO).
This include file may be found in $AIPSROOT/code/trial/implememnt/test/FileIO.h.
1 //# FileIO.h: this defines ileIO functions, which ...
2 //# Copyright (C) 1996,1999,2001
3 //# Associated Universities, Inc. Washington DC, USA.
4 //#
5 //# This library is free software; you can redistribute it and/or modify it
6 //# under the terms of the GNU Library General Public License as published by
7 //# the Free Software Foundation; either version 2 of the License, or (at your
8 //# option) any later version.
9 //#
10 //# This library is distributed in the hope that it will be useful, but WITHOUT
11 //# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 //# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
13 //# License for more details.
14 //#
15 //# You should have received a copy of the GNU Library General Public License
16 //# along with this library; if not, write to the Free Software Foundation,
17 //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
18 //#
19 //# Correspondence concerning AIPS++ should be addressed as follows:
20 //# Internet email: aips2-request@nrao.edu.
21 //# Postal address: AIPS++ Project Office
22 //# National Radio Astronomy Observatory
23 //# 520 Edgemont Road
24 //# Charlottesville, VA 22903-2475 USA
25 //#
26 //#
27 //# $Id: IntroPrg.tex,v 19.0 2003/07/16 04:18:22 aips2adm Exp $
28
29 #if !defined (AIPS_FILEIO_H)
30 #define AIPS_FILEIO_H
31
32 #if defined(_AIX)
33 #pragma implementation ("AsciiFileIO.cc")
34 #endif
35
36 #include <aips/aips.h>
37 #include <aips/Arrays/ArrayIO.h>
38
39 //# Forward Declarations
40
41 // <summary>
42 Input/output using ASCII format
43 // </summary>
44
45 // <use visibility=local> or <use visibility=export>
46
47 // <reviewed reviewer="" date="yyyy/mm/dd" tests="" demos="">
48 // </reviewed>
49
50 // <prerequisite>
51 // <li> SomeClass
52 // <li> SomeOtherClass
53 // <li> some concept
54 // </prerequisite>
55 //
56 // <etymology>
57 // </etymology>
58 //
59 // <synopsis>
60 // </synopsis>
61 //
62 // <example>
63 // </example>
64 //
65 // <motivation>
66 // </motivation>
67 //
68 // <templating arg=T>
69 // <li>
70 // <li>
71 // </templating>
72 //
73 // <thrown>
74 // <li>
75 // <li>
76 // </thrown>
77 //
78 // <todo asof="yyyy/mm/dd">
79 // <li> add this feature
80 // <li> fix this bug
81 // <li> start discussion of this possible extension
82 // </todo>
83
84 template <class T>
85 void
86 readAsciiFile(const char *filein, Matrix<T> &mat){
87 readAsciiMatrix(mat, filein);
88 }
89 template <class T>
90 void
91 readAsciiFile(const char *filein, Vector<T> &vec){
92 readAsciiVector(vec, filein);
93 }
94
95 //
96
97 template <class T>
98 void
99 writeAsciiFile(const char *fileout, const Matrix<T> &mat){
100 writeAsciiMatrix(mat, fileout);
101 }
102 template <class T>
103 void
104 writeAsciiFile(const char *fileout, const Vector<T> &vec){
105 writeAsciiVector(vec, fileout);
106 }
107 #endif
The implications of this are important. Since the class is only specified later on (when the routine is called) the compiler cannot create ahead of time a module that will be linked with the calling code. So even though we will place these routines in a library, it really is a source library and every time a module is used it must be compiled at that time!