MXAFILEREADER_CLASS_NAME Class Reference

Collaboration diagram for MXAFILEREADER_CLASS_NAME:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 MXAFILEREADER_CLASS_NAME (const std::string &filename)
virtual ~MXAFILEREADER_CLASS_NAME ()
bool initReader ()
 Initializes our stream object and opens the file.
template<typename EndianPolicy, typename P>
bool read (P &t)
 Reads and swaps (if necessary) a single primitive value.
bool rawRead (char *data, std::streamsize numBytes)
 Reads a number of bytes from the underlying stream.
template<typename P>
bool readValue (P &t)
 Reads a single primitive value from the underlying stream without any byte swapping or conversions.
template<typename EndianPolicy, typename P>
bool readArrayWithSwap (P *t, int64 size)
 This method will read an array of values and swap each value.
template<typename T>
bool readArray (T *t, int64 numElements)
 This method will read an array of values and swap each value.
void setFilePointer64 (int64 position)
 Sets the filepointer of the underlying stream.
int64 getFilePointer64 ()
 Returns the current position of the file pointer.
 MXAFILEREADER_CLASS_NAME (const std::string &filename)
virtual ~MXAFILEREADER_CLASS_NAME ()
bool initReader ()
 Initializes our stream object and opens the file.
template<typename EndianPolicy, typename P>
bool read (P &t)
 Reads and swaps (if necessary) a single primitive value.
bool rawRead (char *data, std::streamsize numBytes)
 Reads a number of bytes from the underlying stream.
template<typename P>
bool readValue (P &t)
 Reads a single primitive value from the underlying stream without any byte swapping or conversions.
template<typename EndianPolicy, typename P>
bool readArrayWithSwap (P *t, int32 size)
 This method will read an array of values and swap each value.
template<typename T>
bool readArray (T *t, int64 numElements)
 This method will read an array of values and swap each value.
void setFilePointer64 (int64 position)
 Sets the filepointer of the underlying stream.
int64 getFilePointer64 ()
 Returns the current position of the file pointer.

Private Member Functions

 MXAFILEREADER_CLASS_NAME (const MXAFILEREADER_CLASS_NAME &)
void operator= (const MXAFILEREADER_CLASS_NAME &)

Private Attributes

std::string _filename
READER64_INPUT_STREAM _instream
std::vector< char > _buffer
std::vector< char > _buffer

Constructor & Destructor Documentation

MXAFILEREADER_CLASS_NAME::MXAFILEREADER_CLASS_NAME ( const std::string &  filename  )  [explicit]

MXAFILEREADER_CLASS_NAME::~MXAFILEREADER_CLASS_NAME (  )  [virtual]

MXAFILEREADER_CLASS_NAME::MXAFILEREADER_CLASS_NAME ( const MXAFILEREADER_CLASS_NAME  )  [private]

MXAFILEREADER_CLASS_NAME::MXAFILEREADER_CLASS_NAME ( const std::string &  filename  ) 

virtual MXAFILEREADER_CLASS_NAME::~MXAFILEREADER_CLASS_NAME (  )  [virtual]


Member Function Documentation

bool MXAFILEREADER_CLASS_NAME::initReader (  ) 

Initializes our stream object and opens the file.

Returns:
True on success. False on any failure

template<typename EndianPolicy, typename P>
bool MXAFILEREADER_CLASS_NAME::read ( P &  t  )  [inline]

Reads and swaps (if necessary) a single primitive value.

Parameters:
t The value to read the value into

bool MXAFILEREADER_CLASS_NAME::rawRead ( char *  data,
std::streamsize  numBytes 
) [inline]

Reads a number of bytes from the underlying stream.

Parameters:
data The char pointer to read the data into
numBytes The number of bytes to read
Returns:
false if errors

template<typename P>
bool MXAFILEREADER_CLASS_NAME::readValue ( P &  t  )  [inline]

Reads a single primitive value from the underlying stream without any byte swapping or conversions.

Parameters:
t The value to read the primitive into

template<typename EndianPolicy, typename P>
bool MXAFILEREADER_CLASS_NAME::readArrayWithSwap ( P *  t,
int64  size 
) [inline]

This method will read an array of values and swap each value.

Parameters:
t Pointer to the front of the array where the values will be stored. The array MUST already be preallocated.
size The number of elements in the array

template<typename T>
bool MXAFILEREADER_CLASS_NAME::readArray ( T *  t,
int64  numElements 
) [inline]

This method will read an array of values and swap each value.

Parameters:
t Pointer to the front of the array where the values will be stored. The array MUST already be preallocated.
numElements The number of elements in the array

void MXAFILEREADER_CLASS_NAME::setFilePointer64 ( int64  position  )  [inline]

Sets the filepointer of the underlying stream.

Parameters:
position The position to set the file pointer to

int64 MXAFILEREADER_CLASS_NAME::getFilePointer64 (  )  [inline]

Returns the current position of the file pointer.

Returns:
the Current position of the file pointer

void MXAFILEREADER_CLASS_NAME::operator= ( const MXAFILEREADER_CLASS_NAME  )  [private]

bool MXAFILEREADER_CLASS_NAME::initReader (  ) 

Initializes our stream object and opens the file.

Returns:
True on success. False on any failure

template<typename EndianPolicy, typename P>
bool MXAFILEREADER_CLASS_NAME::read ( P &  t  )  [inline]

Reads and swaps (if necessary) a single primitive value.

Parameters:
t The value to read the value into

bool MXAFILEREADER_CLASS_NAME::rawRead ( char *  data,
std::streamsize  numBytes 
) [inline]

Reads a number of bytes from the underlying stream.

Parameters:
data The char pointer to read the data into
numBytes The number of bytes to read

template<typename P>
bool MXAFILEREADER_CLASS_NAME::readValue ( P &  t  )  [inline]

Reads a single primitive value from the underlying stream without any byte swapping or conversions.

Parameters:
t The value to read the primitive into

template<typename EndianPolicy, typename P>
bool MXAFILEREADER_CLASS_NAME::readArrayWithSwap ( P *  t,
int32  size 
) [inline]

This method will read an array of values and swap each value.

Parameters:
t Pointer to the front of the array where the values will be stored. The array MUST already be preallocated.
size The number of elements in the array

template<typename T>
bool MXAFILEREADER_CLASS_NAME::readArray ( T *  t,
int64  numElements 
) [inline]

This method will read an array of values and swap each value.

Parameters:
t Pointer to the front of the array where the values will be stored. The array MUST already be preallocated.
numElements The number of elements in the array

void MXAFILEREADER_CLASS_NAME::setFilePointer64 ( int64  position  )  [inline]

Sets the filepointer of the underlying stream.

Parameters:
position The position to set the file pointer to

int64 MXAFILEREADER_CLASS_NAME::getFilePointer64 (  )  [inline]

Returns the current position of the file pointer.

Returns:
the Current position of the file pointer


Member Data Documentation

std::string MXAFILEREADER_CLASS_NAME::_filename [private]

READER64_INPUT_STREAM MXAFILEREADER_CLASS_NAME::_instream [private]

std::vector<char> MXAFILEREADER_CLASS_NAME::_buffer [private]

std::vector<char> MXAFILEREADER_CLASS_NAME::_buffer [private]


The documentation for this class was generated from the following files:
Generated on Tue Nov 17 18:43:15 2009 for MXADataModel by  doxygen 1.5.2