lmsg::TransInput Class Reference
[DMT message facility]

#include <TransInput.hh>

List of all members.

Public Member Functions

 TransInput (const Buffer &b)
 TransInput (void)
void align (size_type bdry)
bool available (size_type N) const
bool empty (void) const
template<class T>
size_type read (T x[], size_type N=1)
template<class T>
TransInputoperator>> (T &x) throw (std::runtime_error)
template<>
size_type read (char x[], size_type N)
 Read a character string.
template<>
size_type read (MsgAddr x[], size_type N)
 Read MsgAddr's.
template<>
size_type read (Time x[], size_type N)
 Read GPS Time's.
template<>
size_type read (std::string x[], size_type N)
 Read byte-count strings.


Detailed Description

Message input stream with translation capability. The TransInput class is effectively an input stream that is intelligent enough to translate between the big-endian external format and an internal format appropriate to the execution time machine.

Author:
John Zweizig
Version:
1.1; Modified August 20, 2001

Constructor & Destructor Documentation

lmsg::TransInput::TransInput ( const Buffer b  ) 

Construct an input stream and attach a full message buffer to it. brief data constructor.

Parameters:
b Message buffer to be read by the input stream.

lmsg::TransInput::TransInput ( void   ) 

Default input stream constructor.


Member Function Documentation

void lmsg::TransInput::align ( size_type  bdry  ) 

Align data to appropriate boundary.

bool lmsg::TransInput::available ( size_type  N  )  const [inline]

Test whether the specified number of bytes remain in the input buffer.

bool lmsg::TransInput::empty ( void   )  const [inline]

Test whether there is any more data in the input buffer. brief Test whether buffer is empty;

Returns:
true if the buffer is empty.

template<class T>
size_type lmsg::TransInput::read ( x[],
size_type  N = 1 
) [inline]

Template to read and translate a character array. brief read a character array.

Returns:
number of characters read.
Parameters:
x Pointer to a character array to receive the data.
N Number of characters to be read.

template<class T>
TransInput & lmsg::TransInput::operator>> ( T &  x  )  throw (std::runtime_error) [inline]

Stream input operator template;

template<>
size_type lmsg::TransInput::read ( char  x[],
size_type  N 
) [inline]

Read a character string.

Read a character string of length N.

Parameters:
x Character array to receive string.
N Number of characters to read.
Returns:
Number of characters read.

template<>
size_type lmsg::TransInput::read ( MsgAddr  x[],
size_type  N 
) [inline]

Read MsgAddr's.

Read N message addresses.

Parameters:
x MsgAddr array to receive data.
N Number of items to read.
Returns:
Number of data items read.

template<>
size_type lmsg::TransInput::read ( Time  x[],
size_type  N 
) [inline]

Read GPS Time's.

Read N GPS times.

Parameters:
x Time array to receive data.
N Number of items to read.
Returns:
Number of data items read.

template<>
size_type lmsg::TransInput::read ( std::string  x[],
size_type  N 
) [inline]

Read byte-count strings.

Read N byte-count strings.

Parameters:
x String array to receive data.
N Number of items to read.
Returns:
Number of data items read.


The documentation for this class was generated from the following file:
Generated on Sun Mar 8 19:21:35 2009 for dmt by  doxygen 1.5.4