Overture  Version 25
DisplayParameters.h
Go to the documentation of this file.
1 #ifndef DISPLAY_PARAMETERS_H
2 #define DISPLAY_PARAMETERS_H
3 
4 #include "GenericDataBase.h"
5 #include "A++.h"
6 #include "aString.H"
7 
9 {
10  public:
12  {
13  intFormat, // set format for int's
14  floatFormat, // set format for float's
15  doubleFormat, // set format for double's
16  labelAllIndicies, // put comments to number all indicies
17  labelNoIndicies, // no comments
18  labelIndex, // indicate which indicies to label or not.
19  forwardOrdering, // print index 0, then index 1, ...
20  backwardOrdering, // print last index first, second-last next, ...
21  strideForAllIndicies, // print a specified index as base,base+stride,... (if stride>0)
22  indexStride // or bound,bound-stride,...(if stride<0)
23  };
24 
27 
28  int set(FILE *file);
29  int set(const DisplayOption & displayOption);
30  int set(const DisplayOption & displayOption, const int & value );
31  int set(const DisplayOption & displayOption, const aString & value );
32  int set(const DisplayOption & displayOption, const int & index, const int & value );
33 
34  protected:
35  FILE *file;
36  aString iFormat,fFormat,dFormat; // formats for int, float, double
37  int indexLabel[MAX_ARRAY_DIMENSION];
38  bool ordering;
39  int stride[MAX_ARRAY_DIMENSION];
40 
44  friend int display( const intArray & x,
45  const char *label,
46  FILE *file,
47  const char *format_ ,
48  const DisplayParameters *displayParameters,
49  const Index *Iv );
50 
51  friend int display( const floatArray & x,
52  const char *label,
53  FILE *file,
54  const char *format_ ,
55  const DisplayParameters *displayParameters,
56  const Index *Iv );
57 
58  friend int display( const doubleArray & x,
59  const char *label,
60  FILE *file,
61  const char *format_ ,
62  const DisplayParameters *displayParameters,
63  const Index *Iv );
64 
65  friend int displayMaskPrivate( const intArray & mask,
66  const aString & label,
67  FILE *file,
68  const DisplayParameters *displayParameters,
69  const Index *Iv );
70 
71 #ifdef USE_PPP
72  friend int display( const intSerialArray & x,
73  const char *label,
74  FILE *file,
75  const char *format_ ,
76  const DisplayParameters *displayParameters,
77  const Index *Iv =NULL );
78 
79  friend int display( const floatSerialArray & x,
80  const char *label,
81  FILE *file,
82  const char *format_ ,
83  const DisplayParameters *displayParameters,
84  const Index *Iv =NULL );
85 
86  friend int display( const doubleSerialArray & x,
87  const char *label,
88  FILE *file,
89  const char *format_ ,
90  const DisplayParameters *displayParameters,
91  const Index *Iv =NULL );
92 
93  friend int displayMaskPrivate( const intSerialArray & mask,
94  const aString & label,
95  FILE *file,
96  const DisplayParameters *displayParameters,
97  const Index *Iv =NULL );
98 #endif
99 };
100 
101 #endif