IntDescriptor Class Reference

: A Descriptor of the Long Integer type More...

#include <FabConv.H>

List of all members.

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


Detailed Description

: A Descriptor of the Long Integer type

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.


Member Enumeration Documentation

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.

Enumerator:
NormalOrder 
ReverseOrder 


Constructor & Destructor Documentation

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.


Member Function Documentation

IntDescriptor::Ordering IntDescriptor::order (  )  const

Returns the ordering of the "long".

References ord.

Referenced by PD_convert().

int IntDescriptor::numBytes (  )  const

Returns the number of bytes in a "long".

References numbytes.

Referenced by PD_convert().

bool IntDescriptor::operator== ( const IntDescriptor id  )  const

The equality operator.

References numbytes, and ord.

Referenced by operator!=().

bool IntDescriptor::operator!= ( const IntDescriptor id  )  const

The inequality operator.

References operator==().


Member Data Documentation

long IntDescriptor::numbytes [protected]

Referenced by numBytes(), and operator==().

Referenced by operator==(), and order().


The documentation for this class was generated from the following files:

Generated on Fri Nov 21 10:11:02 2008 for AMRParticlePaths by  doxygen 1.5.5