#include <FArrayBox.H>
Public Types | |
enum | Precision { FAB_FLOAT = 0, FAB_DOUBLE } |
An enum which controls precision of FAB output. More... | |
enum | Format { FAB_ASCII = 0, FAB_IEEE, FAB_NATIVE, FAB_8BIT = 4, FAB_IEEE_32 } |
An enum which controls format of FAB output. More... | |
enum | Ordering { FAB_NORMAL_ORDER, FAB_REVERSE_ORDER, FAB_REVERSE_ORDER_2 } |
An enum which controls byte ordering of FAB output. More... | |
Public Member Functions | |
virtual | ~FABio () |
virtual void | read (std::istream &is, FArrayBox &fb) const =0 |
virtual void | write (std::ostream &os, const FArrayBox &fb, int comp, int num_comp) const =0 |
virtual void | skip (std::istream &is, FArrayBox &f) const =0 |
virtual void | skip (std::istream &is, FArrayBox &f, int nCompToSkip) const =0 |
virtual void | write_header (std::ostream &os, const FArrayBox &f, int nvar) const |
Static Public Member Functions | |
static FABio * | read_header (std::istream &is, FArrayBox &f) |
static FABio * | read_header (std::istream &is, FArrayBox &f, int compIndex, int &nCompAvailable) |
This data-less class aids I/O for FABs and encapsulates information about the floating point format being used in output. Note that the "new" format for writing out FABs is self-describing; i.e. we can always read in a FAB written in the "new" format. For this reason, it is usually preferable to write FABs out in the native format on the machine, unless you're doing computations in 64 bit and only want to write out 32 bit FABs.
With the exception of the enumeration constants, this class is primarily for FArrayBox implementors; i.e. user's shouldn't call any of the member functions in this class directly.
enum FABio::Precision |
enum FABio::Format |
An enum which controls format of FAB output.
Valid values are FAB, FAB, FAB, FAB and FAB;
FAB: write the FAB out in ASCII format.
FAB: write the FAB out with all floating-point values scaled to range 0 - 255.
FAB: write out floating-point values in the native format. This is usually the "best" choice of formats.
FAB: write out floating-point values in IEEE 32 bit normal format. This is recommended for use when your internal computations are done in 64 bits and you want to save space when writing out the FABs.
FAB: this is deprecated. It is identical to FAB.
enum FABio::Ordering |
An enum which controls byte ordering of FAB output.
Valid values are FAB, FAB, and FAB. This is deprecated; i.e. please don't use it except for reading old FABs as it will probably be going away in a later release. These exist solely to describe the ordering of "old" FABs that you want to read.
FABio::~FABio | ( | ) | [virtual] |
virtual void FABio::read | ( | std::istream & | is, | |
FArrayBox & | fb | |||
) | const [pure virtual] |
Referenced by operator>>(), and FArrayBox::readFrom().
virtual void FABio::write | ( | std::ostream & | os, | |
const FArrayBox & | fb, | |||
int | comp, | |||
int | num_comp | |||
) | const [pure virtual] |
Referenced by FArrayBox::writeOn().
virtual void FABio::skip | ( | std::istream & | is, | |
FArrayBox & | f | |||
) | const [pure virtual] |
Referenced by FArrayBox::readFrom(), and FArrayBox::skipFAB().
virtual void FABio::skip | ( | std::istream & | is, | |
FArrayBox & | f, | |||
int | nCompToSkip | |||
) | const [pure virtual] |
void FABio::write_header | ( | std::ostream & | os, | |
const FArrayBox & | f, | |||
int | nvar | |||
) | const [virtual] |
References BL_ASSERT, BaseFab< T >::box(), BoxLib::Error(), and BaseFab< T >::nComp().
Referenced by FArrayBox::writeOn().
References BL_IGNORE_MAX, BoxLib::Error(), FAB_8BIT, FAB_ASCII, FAB_IEEE, FAB_NATIVE, RealDescriptor::newRealDescriptor(), FArrayBox::ordering, and FArrayBox::resize().
Referenced by operator>>(), FArrayBox::readFrom(), and FArrayBox::skipFAB().