00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011 #ifndef FIELD_DEBUG_PRINT_H
00012 #define FIELD_DEBUG_PRINT_H
00013
00014
00015 template<class T, unsigned Dim> class BareField;
00016 template<unsigned Dim> class NDIndex;
00017 class Inform;
00018
00019
00020 template<class T, unsigned Dim>
00021 class FieldDebugPrint {
00022
00023 public:
00024
00025
00026
00027 FieldDebugPrint(bool printbc = false,
00028 unsigned int dataWidth = 0, unsigned int dataPrecision = 0,
00029 unsigned int carReturn = 0, bool scientific = true) :
00030 DataWidth(dataWidth), DataPrecision(dataPrecision),
00031 CarReturn(carReturn), Scientific(scientific), PrintBC(printbc) { }
00032
00033
00034 ~FieldDebugPrint() { }
00035
00036
00037
00038
00039
00040 void print(BareField<T,Dim>&, const NDIndex<Dim>&, Inform&, bool = true);
00041 void print(BareField<T,Dim>&, Inform&, bool = true);
00042 void print(BareField<T,Dim>&, const NDIndex<Dim>&, bool = true);
00043 void print(BareField<T,Dim>&, bool = true);
00044
00045
00046 void set_DataWidth(unsigned int in) { DataWidth = in; }
00047 void set_DataPrecision(unsigned int in) { DataPrecision = in; }
00048 void set_CarReturn(unsigned int in) { CarReturn = in; }
00049 void set_Scientific(bool in) { Scientific = in; }
00050 void set_PrintBC(bool in) { PrintBC = in; }
00051
00052
00053 unsigned int get_DataWidth() const { return DataWidth; }
00054 unsigned int get_DataPrecision() const { return DataPrecision; }
00055 unsigned int get_CarReturn() const { return CarReturn; }
00056 bool get_Scientific() const { return Scientific; }
00057 bool get_PrintBC() const { return PrintBC; }
00058
00059 private:
00060
00061 unsigned int DataWidth;
00062 unsigned int DataPrecision;
00063 unsigned int CarReturn;
00064 bool Scientific;
00065 bool PrintBC;
00066
00067
00068 void printelem(bool, T&, unsigned int, Inform&);
00069 };
00070
00071 #include "Utility/FieldDebugPrint.cpp"
00072
00073 #endif
00074
00075
00076
00077
00078
00079