Getting Started Documentation Glish Learn More Programming Contact Us
Version 1.9 Build 1556
News FAQ
Search Home


next up previous contents index
Next: Coding Fundamentals Up: Introduction to Programming for AIPS++ Previous: The Vector modules

The expanded include modules

In this module we placed the boiler-plate that was discussed in the earlier example but we do not show it merely to save space.

30  
31  #if !defined (AIPS_ASCIIFILEIO_H)
32  #define AIPS_ASCIIFILEIO_H
33  
34  #include <aips/aips.h>
35  #include <aips/Matrix.h>
36  #include <aips/Vector.h>
37  
38  template <class T>
39     void
40     ReadAsciiFile(const char *filein, Matrix<T> &mat);
41  template <class T>
42     void
43     WriteAsciiFile(const char *fileout, Matrix<T> &mat);
44  
45  template <class T>
46     void
47     ReadAsciiFile(const char *fileout, Vector<T> &vect);
48  template <class T>
49     void
50     WriteAsciiFile(const char *fileout, Vector<T> &vect);
51  
52  #endif

45-50-
These declarations are similar to the ones for Matrices except that they take Vectors as their arguments. Note that we did NOT have to change the function name - hence polymorphism!


next up previous contents index
Next: Coding Fundamentals Up: Introduction to Programming for AIPS++ Previous: The Vector modules   Contents   Index
Please send questions or comments about AIPS++ to aips2-request@nrao.edu.
Copyright © 1995-2000 Associated Universities Inc., Washington, D.C.

Return to AIPS++ Home Page
2006-10-15