BTK  0.3dev.0
Open-source library to visualize/process biomechanical data
List of all members | Public Member Functions
btk::VAXLittleEndianBinaryFileStream Class Reference

Class to read and write binary file encoded from a VAX (LE) processor to a VAX (LE) and IEEE (LE, BE) processor. More...

#include <btkBinaryFileStream.h>

Inheritance diagram for btk::VAXLittleEndianBinaryFileStream:
Inheritance graph
[legend]

Public Member Functions

virtual double ReadDouble ()
 
virtual float ReadFloat ()
 
virtual int16_t ReadI16 ()
 
virtual int32_t ReadI32 ()
 
virtual uint16_t ReadU16 ()
 
virtual uint32_t ReadU32 ()
 
 VAXLittleEndianBinaryFileStream ()
 
 VAXLittleEndianBinaryFileStream (const std::string &filename, OpenMode mode)
 
virtual size_t Write (int16_t i16)
 
virtual size_t Write (uint16_t u16)
 
virtual size_t Write (int32_t i32)
 
virtual size_t Write (uint32_t u32)
 
virtual size_t Write (float f)
 
- Public Member Functions inherited from btk::BinaryFileStream
bool Bad () const
 
void Clear (IOState flags=GoodBit)
 
void Close ()
 
bool EndFile () const
 
bool Fail () const
 
size_t Fill (size_t nb)
 
IOState GetExceptions ()
 
const RawFileStreamGetStream () const
 
bool Good () const
 
bool IsOpen () const
 
void Open (const std::string &filename, OpenMode mode)
 
char ReadChar ()
 
void ReadChar (size_t nb, char *values)
 
void ReadChar (std::vector< char > &values)
 
std::vector< char > ReadChar (size_t nb)
 
void ReadDouble (size_t nb, double *values)
 
void ReadDouble (std::vector< double > &values)
 
std::vector< double > ReadDouble (size_t nb)
 
void ReadFloat (size_t nb, float *values)
 
void ReadFloat (std::vector< float > &values)
 
std::vector< float > ReadFloat (size_t nb)
 
void ReadI16 (size_t nb, int16_t *values)
 
void ReadI16 (std::vector< int16_t > &values)
 
std::vector< int16_t > ReadI16 (size_t nb)
 
void ReadI32 (size_t nb, int32_t *values)
 
void ReadI32 (std::vector< int32_t > &values)
 
std::vector< int32_t > ReadI32 (size_t nb)
 
int8_t ReadI8 ()
 
void ReadI8 (size_t nb, int8_t *values)
 
void ReadI8 (std::vector< int8_t > &values)
 
std::vector< int8_t > ReadI8 (size_t nb)
 
std::string ReadString (size_t nbChar)
 
void ReadString (size_t nb, size_t nbChar, std::string *values)
 
void ReadString (size_t nbChar, std::vector< std::string > &values)
 
std::vector< std::string > ReadString (size_t nb, size_t nbChar)
 
void ReadU16 (size_t nb, uint16_t *values)
 
void ReadU16 (std::vector< uint16_t > &values)
 
std::vector< uint16_t > ReadU16 (size_t nb)
 
void ReadU32 (size_t nb, uint32_t *values)
 
void ReadU32 (std::vector< uint32_t > &values)
 
std::vector< uint32_t > ReadU32 (size_t nb)
 
uint8_t ReadU8 ()
 
void ReadU8 (size_t nb, uint8_t *values)
 
void ReadU8 (std::vector< uint8_t > &values)
 
std::vector< uint8_t > ReadU8 (size_t nb)
 
void SeekRead (StreamOffset offset, SeekDir dir)
 
void SeekWrite (StreamOffset offset, SeekDir dir)
 
void SetExceptions (IOState except)
 
void SwapStream (BinaryFileStream *toSwap)
 
StreamPosition TellRead () const
 
size_t Write (int8_t i8)
 
size_t Write (const std::vector< int8_t > &rVectorI8)
 
size_t Write (uint8_t u8)
 
size_t Write (const std::vector< uint8_t > &rVectorU8)
 
size_t Write (const std::vector< int16_t > &rVectorI16)
 
size_t Write (const std::vector< uint16_t > &rVectorU16)
 
size_t Write (const std::vector< int32_t > &rVectorI32)
 
size_t Write (const std::vector< uint32_t > &rVectorU32)
 
size_t Write (const std::vector< float > &rVectorFloat)
 
size_t Write (const std::string &rString)
 
size_t Write (const std::vector< std::string > &rVectorString)
 
virtual ~BinaryFileStream ()
 

Additional Inherited Members

- Public Types inherited from btk::BinaryFileStream
typedef std::ios_base::iostate IOState
 
typedef std::ios_base::openmode OpenMode
 
typedef std::ios_base::seekdir SeekDir
 
typedef std::streamoff StreamOffset
 
typedef std::streampos StreamPosition
 
- Static Public Attributes inherited from btk::BinaryFileStream
static const IOState BadBit = std::ios_base::badbit
 
static const SeekDir Begin = std::ios_base::beg
 
static const SeekDir Current = std::ios_base::cur
 
static const SeekDir End = std::ios_base::end
 
static const IOState EndFileBit = std::ios_base::eofbit
 
static const IOState FailBit = std::ios_base::failbit
 
static const IOState GoodBit = std::ios_base::goodbit
 
static const OpenMode In = std::ios_base::in
 
static const OpenMode Out = std::ios_base::out
 
static const OpenMode Truncate = std::ios_base::trunc
 
- Protected Member Functions inherited from btk::BinaryFileStream
 BinaryFileStream ()
 
 BinaryFileStream (const std::string &filename, OpenMode mode)
 
- Protected Attributes inherited from btk::BinaryFileStream
RawFileStreammp_Stream
 

Detailed Description

Class to read and write binary file encoded from a VAX (LE) processor to a VAX (LE) and IEEE (LE, BE) processor.

See Also
BinaryFileStream, IEEELittleEndianBinaryFileStream, IEEEBigEndianBinaryFileStream, NativeBinaryFileStream

Constructor & Destructor Documentation

btk::VAXLittleEndianBinaryFileStream::VAXLittleEndianBinaryFileStream ( )
inline

Creates a new default DEC binary file stream.

btk::VAXLittleEndianBinaryFileStream::VAXLittleEndianBinaryFileStream ( const std::string &  filename,
OpenMode  mode 
)
inline

Creates a new default DEC binary file stream and associates the file with the filename filename using the option mode.

If the opening is not successfull, then the FailBit is set. You can check its state by using the method Fail().

Member Function Documentation

double btk::VAXLittleEndianBinaryFileStream::ReadDouble ( )
virtual

Extracts one double.

Implements btk::BinaryFileStream.

float btk::VAXLittleEndianBinaryFileStream::ReadFloat ( )
virtual

Extracts one float.

Implements btk::BinaryFileStream.

int16_t btk::VAXLittleEndianBinaryFileStream::ReadI16 ( )
virtual

Extracts one signed 16-bit integer.

Implements btk::BinaryFileStream.

int32_t btk::VAXLittleEndianBinaryFileStream::ReadI32 ( )
virtual

Extracts one signed 32-bit integer.

Implements btk::BinaryFileStream.

uint16_t btk::VAXLittleEndianBinaryFileStream::ReadU16 ( )
virtual

Extracts one unsigned 16-bit integer.

Implements btk::BinaryFileStream.

uint32_t btk::VAXLittleEndianBinaryFileStream::ReadU32 ( )
virtual

Extracts one unsigned 32-bit integer.

Implements btk::BinaryFileStream.

size_t btk::VAXLittleEndianBinaryFileStream::Write ( int16_t  i16)
virtual

Writes the signed 16-bit integer i16 in the stream an return its size.

Implements btk::BinaryFileStream.

size_t btk::VAXLittleEndianBinaryFileStream::Write ( uint16_t  u16)
virtual

Writes the unsigned 16-bit integer u16 in the stream an return its size.

Implements btk::BinaryFileStream.

size_t btk::VAXLittleEndianBinaryFileStream::Write ( int32_t  i32)
virtual

Write the 32-bit signed integer i32 and return its size.

Implements btk::BinaryFileStream.

size_t btk::VAXLittleEndianBinaryFileStream::Write ( uint32_t  u32)
virtual

Write the 32-bit unsigned integer u32 and return its size

Implements btk::BinaryFileStream.

size_t btk::VAXLittleEndianBinaryFileStream::Write ( float  f)
virtual

Writes the float f in the stream an return its size.

Implements btk::BinaryFileStream.