00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011 #ifndef FIELD_PRINT_H
00012 #define FIELD_PRINT_H
00013
00014
00015 template<class T, unsigned Dim> class BareField;
00016 template<unsigned Dim> class NDIndex;
00017
00018
00019
00020 template<class T, unsigned Dim>
00021 class FieldPrint {
00022
00023 public:
00024
00025
00026 FieldPrint(BareField<T,Dim>& f, unsigned parent = 0, int indexWidth = 3,
00027 int dataWidth = 8, int dataPrecision = 4,
00028 int carReturn = -1, bool scientific = false) :
00029 MyField(f), Parent(parent),IndexWidth(indexWidth), DataWidth(dataWidth),
00030 DataPrecision(dataPrecision), CarReturn(carReturn), Scientific(scientific) { };
00031
00032
00033 ~FieldPrint() { };
00034 void print(NDIndex<Dim>& view);
00035
00036
00037 void set_IndexWidth( unsigned in ) { IndexWidth = in; }
00038 void set_DataWidth( unsigned in ) { DataWidth = in; }
00039 void set_DataPrecision( unsigned in ) { DataPrecision = in; }
00040 void set_CarReturn( int in ) { CarReturn = in; }
00041 void set_Scientific( bool in ) { Scientific = in; }
00042
00043 private:
00044 BareField<T,Dim>& MyField;
00045
00046 unsigned Parent;
00047
00048
00049 unsigned IndexWidth;
00050 unsigned DataWidth;
00051 unsigned DataPrecision;
00052 int CarReturn;
00053 bool Scientific;
00054
00055 };
00056
00057
00058 #include "Utility/FieldPrint.cpp"
00059
00060 #endif // FIELD_PRINT_H
00061
00062
00063
00064
00065
00066