ADMB Documentation  -a65f1c97
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
str_aio.cpp
Go to the documentation of this file.
1 
8 #include <fvar.hpp>
9 #include <cifstrem.h>
10 
14 ifstream& operator>>(ifstream& ifs, adstring_array& sa)
15 {
16  if (sa.ptr)
17  {
18  int min = sa.indexmin();
19  int max = sa.indexmax();
20  for (int i = min; i <= max; ++i)
21  {
22  ifs >> sa[i];
23  }
24  }
25  return ifs;
26 }
30 ostream& operator<<(const ostream& _ofs, const adstring_array& sa)
31 {
32  ostream& ofs = (ostream&)_ofs;
33  if (sa.ptr)
34  {
35  int min = sa.indexmin();
36  int max = sa.indexmax();
37  for (int i = min; i <= max; ++i)
38  {
39  ofs << sa[i];
40  if (i < max) ofs << endl;
41  }
42  }
43  return ofs;
44 }
49 {
50  if (sa.ptr)
51  {
52  int min = sa.indexmin();
53  int max = sa.indexmax();
54  for (int i = min; i <= max; ++i)
55  {
56  ifs >> sa[i];
57  }
58  }
59  return ifs;
60 }
adstring ** ptr
Definition: adstring.hpp:201
int indexmin(void) const
Definition: string5.cpp:68
prnstream & endl(prnstream &)
#define min(a, b)
Definition: cbivnorm.cpp:188
Author: David Fournier Copyright (c) 2008-2012 Regents of the University of California.
istream & operator>>(const istream &input, const d3_array &arr3)
Read values from input stream into arr3.
Definition: d3_io.cpp:60
ostream & operator<<(const ostream &_s, preshowpoint p)
Description not yet available.
Definition: admanip.cpp:48
int indexmax(void) const
Definition: string5.cpp:71
Definition of the cifstream class.
#define max(a, b)
Definition: cbivnorm.cpp:189