OPAL (Object Oriented Parallel Accelerator Library)
2021.1.99
OPAL
src
ippl
src
Utility
FieldPrint.h
Go to the documentation of this file.
1
// -*- C++ -*-
2
/***************************************************************************
3
*
4
* The IPPL Framework
5
*
6
*
7
* Visit http://people.web.psi.ch/adelmann/ for more details
8
*
9
***************************************************************************/
10
11
#ifndef FIELD_PRINT_H
12
#define FIELD_PRINT_H
13
14
// forward declarations
15
template
<
class
T,
unsigned
Dim>
class
BareField
;
16
template
<
unsigned
Dim>
class
NDIndex
;
17
18
// class FieldPrint
19
//----------------------------------------------------------------------
20
template
<
class
T,
unsigned
Dim>
21
class
FieldPrint
{
22
23
public
:
24
25
// attach a 2D Field to a FieldPrint
26
FieldPrint
(
BareField<T,Dim>
& f,
unsigned
parent = 0,
int
indexWidth = 3,
27
int
dataWidth = 8,
int
dataPrecision = 4,
28
int
carReturn = -1,
bool
scientific =
false
) :
29
MyField
(f),
Parent
(parent),
IndexWidth
(indexWidth),
DataWidth
(dataWidth),
30
DataPrecision
(dataPrecision),
CarReturn
(carReturn),
Scientific
(scientific) { };
31
32
33
~FieldPrint
() { };
34
void
print
(
NDIndex<Dim>
& view);
35
36
// reset values
37
void
set_IndexWidth
(
unsigned
in ) {
IndexWidth
= in; }
38
void
set_DataWidth
(
unsigned
in ) {
DataWidth
= in; }
39
void
set_DataPrecision
(
unsigned
in ) {
DataPrecision
= in; }
40
void
set_CarReturn
(
int
in ) {
CarReturn
= in; }
41
void
set_Scientific
(
bool
in ) {
Scientific
= in; }
42
43
private
:
44
BareField<T,Dim>
&
MyField
;
45
46
unsigned
Parent
;
47
48
// formatting information
49
unsigned
IndexWidth
;
// the width for the Index fields
50
unsigned
DataWidth
;
// the width for the Data fields
51
unsigned
DataPrecision
;
// the precision of the data
52
int
CarReturn
;
// how long before a carriage return
53
bool
Scientific
;
54
55
};
56
//----------------------------------------------------------------------
57
58
#include "
Utility/FieldPrint.hpp
"
59
60
#endif
// FIELD_PRINT_H
61
62
/***************************************************************************
63
* $RCSfile: FieldPrint.h,v $ $Author: adelmann $
64
* $Revision: 1.1.1.1 $ $Date: 2003/01/23 07:40:33 $
65
* IPPL_VERSION_ID: $Id: FieldPrint.h,v 1.1.1.1 2003/01/23 07:40:33 adelmann Exp $
66
***************************************************************************/
FieldPrint.hpp
NDIndex
Definition:
NDIndex.h:74
BareField
Definition:
BareField.h:56
FieldPrint
Definition:
FieldPrint.h:21
FieldPrint::IndexWidth
unsigned IndexWidth
Definition:
FieldPrint.h:49
FieldPrint::set_IndexWidth
void set_IndexWidth(unsigned in)
Definition:
FieldPrint.h:37
FieldPrint::set_CarReturn
void set_CarReturn(int in)
Definition:
FieldPrint.h:40
FieldPrint::~FieldPrint
~FieldPrint()
Definition:
FieldPrint.h:33
FieldPrint::Parent
unsigned Parent
Definition:
FieldPrint.h:46
FieldPrint::DataWidth
unsigned DataWidth
Definition:
FieldPrint.h:50
FieldPrint::set_DataPrecision
void set_DataPrecision(unsigned in)
Definition:
FieldPrint.h:39
FieldPrint::Scientific
bool Scientific
Definition:
FieldPrint.h:53
FieldPrint::CarReturn
int CarReturn
Definition:
FieldPrint.h:52
FieldPrint::DataPrecision
unsigned DataPrecision
Definition:
FieldPrint.h:51
FieldPrint::set_Scientific
void set_Scientific(bool in)
Definition:
FieldPrint.h:41
FieldPrint::FieldPrint
FieldPrint(BareField< T, Dim > &f, unsigned parent=0, int indexWidth=3, int dataWidth=8, int dataPrecision=4, int carReturn=-1, bool scientific=false)
Definition:
FieldPrint.h:26
FieldPrint::MyField
BareField< T, Dim > & MyField
Definition:
FieldPrint.h:44
FieldPrint::set_DataWidth
void set_DataWidth(unsigned in)
Definition:
FieldPrint.h:38
FieldPrint::print
void print(NDIndex< Dim > &view)
Definition:
FieldPrint.hpp:39
Generated on Wed Aug 25 2021 16:41:00 for OPAL (Object Oriented Parallel Accelerator Library) by
1.9.1