ADMB Documentation  11.5.3197
 All Classes Files Functions Variables Typedefs Friends Defines
d4_io1.cpp
Go to the documentation of this file.
00001 /*
00002  * $Id$
00003  *
00004  * Author: David Fournier
00005  * Copyright (c) 2008-2012 Regents of the University of California
00006  */
00011 // file: dmat_io.cpp
00012 
00013 // i/o operations for class dmatrix
00014 
00015 #include "fvar.hpp"
00016 
00017 #ifdef __TURBOC__
00018   #pragma hdrstop
00019   #include <iostream.h>
00020   #include <iomanip.h>
00021   #include <fstream.h>
00022   #define __USE_IOSTREAM__
00023 #endif
00024 
00025 #ifdef __ZTC__
00026   #include <iostream.hpp>
00027   #include <iomanip.hpp>
00028   #include <fstream.hpp>
00029   #define __USE_IOSTREAM__
00030 #endif
00031 
00032 #include <string.h>
00033 
00034 #ifdef __USE_IOSTREAM__
00035 
00040 uostream& operator<<(const uostream& _ostr, const d4_array &z)
00041 {
00042   uostream & ostr = (uostream&) _ostr;
00043   for (int i=z.hslicemin();i<=z.hslicemax();i++)
00044   {
00045     ostr << z[i];
00046   }
00047   return ostr;
00048 }
00049 
00054 uistream& operator>>(const uistream& _istr, const d4_array &z)
00055 {
00056   uistream & istr = (uistream&) _istr;
00057   for (int i=z.hslicemin();i<=z.hslicemax();i++)
00058   {
00059     istr >> z[i];
00060   }
00061   return istr;
00062 }
00063 #endif