00001
00010 #ifndef IOUTILS_H
00011 #define IOUTILS_H
00012
00013 #define OUTSIDE_GLUE_CORE
00014 #include <std/strings.H>
00015 #include <mlib/points.H>
00016
00017 #include <Color.H>
00018 #include "streamwrap.H"
00019
00020 namespace InSpace {
00021
00022 class IOUTILS
00023 {
00024 public:
00025
00026
00027
00028
00029
00030 static str_ptr readln(istream *is);
00031
00032
00033 static str_ptr getBracketedStr(str_ptr in);
00034 static int getBracketedInt(str_ptr in);
00035 static double getBracketedDouble(str_ptr in);
00036 static Wpt getBracketedWpt(str_ptr in);
00037 static Wvec getBracketedWvec(str_ptr in);
00038 static Color getBracketedColor(str_ptr in);
00039
00040
00041 static str_ptr getBracketedStr(istream *is);
00042 static int getBracketedInt(istream *is);
00043 static double getBracketedDouble(istream *is);
00044 static Wpt getBracketedWpt(istream *is);
00045 static Wvec getBracketedWvec(istream *is);
00046 static Wtransf getBracketedWtransf(istream *is);
00047 static Color getBracketedColor(istream *is);
00048
00049
00050 static str_list getBracketedStrList(istream *is);
00051 static ARRAY<int> getBracketedIntList(istream *is);
00052 static ARRAY<double> getBracketedDoubleList(istream *is);
00053 static Wpt_list getBracketedWptList(istream *is);
00054 static ARRAY<Wvec> getBracketedWvecList(istream *is);
00055 static ARRAY<Wtransf> getBracketedWtransfList(istream *is);
00056 static ARRAY<Color> getBracketedColorList(istream *is);
00057
00058
00059
00060 static void writeBracketed(ostream *os, str_ptr token, str_ptr s);
00061 static void writeBracketed(ostream *os, str_ptr token, int i);
00062 static void writeBracketed(ostream *os, str_ptr token, double d);
00063 static void writeBracketed(ostream *os, str_ptr token, Wpt p);
00064 static void writeBracketed(ostream *os, str_ptr token, Wvec v);
00065 static void writeBracketed(ostream *os, str_ptr token, Wtransf m);
00066 static void writeBracketed(ostream *os, str_ptr token, Color c);
00067
00068 static void writeBracketed(ostream *os, str_ptr token, str_list sl);
00069 static void writeBracketed(ostream *os, str_ptr token, ARRAY<int> il);
00070 static void writeBracketed(ostream *os, str_ptr token, ARRAY<double> dl);
00071 static void writeBracketed(ostream *os, str_ptr token, Wpt_list wl);
00072 static void writeBracketed(ostream *os, str_ptr token, ARRAY<Wvec> wl);
00073 static void writeBracketed(ostream *os, str_ptr token, ARRAY<Wtransf> wl);
00074 static void writeBracketed(ostream *os, str_ptr token, ARRAY<Color> cl);
00075
00076 };
00077
00078 }
00079 #endif