#include <FabConv.H>
Public Types | |
enum | Ordering { NormalOrder = 1, ReverseOrder = 2 } |
An enumeration describing the two ordering of a "long" that we currently support: NormalOrder and ReverseOrder. More... | |
Public Member Functions | |
IntDescriptor () | |
The default constructor. | |
IntDescriptor (long nb, Ordering ordering=NormalOrder) | |
Construct a specific IntDescriptor. | |
Ordering | order () const |
Returns the ordering of the "long". | |
int | numBytes () const |
Returns the number of bytes in a "long". | |
bool | operator== (const IntDescriptor &id) const |
The equality operator. | |
bool | operator!= (const IntDescriptor &id) const |
The inequality operator. | |
Protected Attributes | |
long | numbytes |
Ordering | ord |
This class is meant to hold all information needed to completely describe the "long" type on a machine. To describe a "long" both the number of bytes in the long and their ordering, relative to canonical ordering 1 .. sizeof(long), needs to be specified.
This allows us to write out "long"s in the native format on a machine, and then by also saving the IntDescriptor, we can read them back in on another machine and have enough information to construct the exact same "long" values.
An enumeration describing the two ordering of a "long" that we currently support: NormalOrder and ReverseOrder.
Other ordering may be added as BoxLib is ported to run on machines with non-standard "long" orderings.
IntDescriptor::IntDescriptor | ( | ) |
The default constructor.
Does not build a proper IntDescriptor. This should only be used when you need to build a generic IntDescriptor in order to be able to read in a specific one from an istream.
IntDescriptor::IntDescriptor | ( | long | nb, | |
Ordering | ordering = NormalOrder | |||
) |
Construct a specific IntDescriptor.
IntDescriptor::Ordering IntDescriptor::order | ( | ) | const |
int IntDescriptor::numBytes | ( | ) | const |
bool IntDescriptor::operator== | ( | const IntDescriptor & | id | ) | const |
bool IntDescriptor::operator!= | ( | const IntDescriptor & | id | ) | const |
long IntDescriptor::numbytes [protected] |
Referenced by numBytes(), and operator==().
Ordering IntDescriptor::ord [protected] |
Referenced by operator==(), and order().