Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members

lccd::Xdr Class Reference

Utility functions for DB streamer objects. More...

#include <Xdr.hh>

List of all members.

Static Public Member Functions

void copy (unsigned const char *from, unsigned char *dest, const int size, const int count)
 Copies the the data in XDR, i.e.

template<class T> void tostream (std::string &s, T *t, unsigned count)
 Writes count objects of (simple) type T to the string s in Xdr format.

template<class T> unsigned fromstream (const std::string &s, unsigned position, T *t, unsigned count)
 Read count objects of (simple) type t from the string/stream s at position.
Callers have to keep the current position within the string.

void tostream (std::string &s, std::string *strVal, unsigned count)
 Specialization for strings - count is ignored and taken to be 1.

unsigned fromstream (const std::string &s, unsigned index, std::string *strVal, unsigned count)
 Specialization for strings - count is ignored and taken to be 1.


Detailed Description

Utility functions for DB streamer objects.

These functions take care of the byte ordering and make sure the streamed data adheres to the xdr convention, e.g. every data item starts at a 32-bit word boundary.

Author:
F.Gaede, DESY
Version:
Id
Xdr.hh,v 1.3 2005/09/09 08:09:37 gaede Exp


Member Function Documentation

void lccd::Xdr::copy unsigned const char *  from,
unsigned char *  dest,
const int  size,
const int  count
[static]
 

Copies the the data in XDR, i.e.

machine independent format from one location to the another

unsigned lccd::Xdr::fromstream const std::string &  s,
unsigned  index,
std::string *  strVal,
unsigned  count
[inline, static]
 

Specialization for strings - count is ignored and taken to be 1.

Returns:
the new position in the stream.

template<class T>
unsigned lccd::Xdr::fromstream const std::string &  s,
unsigned  position,
T *  t,
unsigned  count
[inline, static]
 

Read count objects of (simple) type t from the string/stream s at position.
Callers have to keep the current position within the string.

Returns:
the new position in the stream.


The documentation for this class was generated from the following file:
Generated on Fri Sep 9 12:30:33 2005 for LCCD by doxygen 1.3.5