Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

EBFeventIterator Class Reference

Class for iterating over a buffer of EBFevent(s). More...

#include <EBFeventIterator.h>

Inheritance diagram for EBFeventIterator:

Inheritance graph
[legend]
Collaboration diagram for EBFeventIterator:

Collaboration graph
[legend]
List of all members.

Public Types

enum  { ERR_NonEBFevent = 1 }

Public Member Functions

 EBFeventIterator (EBFevent *start, EBFevent *end)
 Constructor used with an array of EBFevents.
 EBFeventIterator (char *buffer, unsigned size, bool swap=!DFC_BIG_ENDIAN)
 Constructor used with an array of EBFevents passed in a string buffer.
 EBFeventIterator ()
 Default constructor used with an array of EBFevents.
unsigned iterate (EBFevent *start, EBFevent *end)
 Class for iterating over a buffer of EBFevent(s). Iterate over the EBFevents in the array from start to end.
unsigned iterate (char *buffer, unsigned size, bool swap=!DFC_BIG_ENDIAN)
 Iterate over the EBFevents in the passed in buffer from start to end.
unsigned iterate ()
 Iterate over the EBFevents in the array from start to end.
virtual int handleError (EBFevent *evt, unsigned code, unsigned p1=0, unsigned p2=0) const
 Handle all errors possible in EBFeventIterator.
virtual int process (EBFevent *evt)=0
const EBFeventstart () const
 Return a pointer to the first event in the array.
const EBFeventend () const
 Return a pointer to the first event after the end of the array.
unsigned status () const
 Return the iteration status.

Detailed Description

Class for iterating over a buffer of EBFevent(s).

Author:
R. Claus -- GLAST LAT I&T/Online - (claus@slac.stanford.edu)
Revision
1.7
Date:
February 21, 2003 -- Created
Id
EBFeventIterator.h,v 1.7 2005/03/15 18:59:39 panetta Exp

Copyright: Copyright 2004 by The Board of Trustees of the Leland Stanford Junior University. All rights reserved.


Constructor & Destructor Documentation

EBFeventIterator::EBFeventIterator EBFevent start,
EBFevent end
[inline]
 

Constructor used with an array of EBFevents.

Parameters:
start - A pointer to the first EBFevent in the array
end - A pointer to the first EBFevent after the end of the array

EBFeventIterator::EBFeventIterator char *  buffer,
unsigned  size,
bool  swap = !DFC_BIG_ENDIAN
[inline]
 

Constructor used with an array of EBFevents passed in a string buffer.

Parameters:
buffer - A string buffer containing (an) EBFevent(s)
size - The size of the string buffer in bytes
swap - An optional parameter to force, or not force, the buffer to be byte swapped in place. By default it is set according to the endianess of the machine running this code with the assumption that buffer is in big endian format.


Member Function Documentation

const EBFevent * EBFeventIterator::end  )  const [inline]
 

Return a pointer to the first event after the end of the array.

Returns:
The first EBFevent after the end of the array.

int EBFeventIterator::handleError EBFevent evt,
unsigned  code,
unsigned  p1 = 0,
unsigned  p2 = 0
const [virtual]
 

Handle all errors possible in EBFeventIterator.

This method is used to handle errors occurring during the iteration over an EBFevent. By default it does nothing, however it is virtual and is able to be overridden by the user.

Parameters:
evt The event in error
code The error code
p1 a parameter associated with the error code
p2 a parameter associated with the error code

Reimplemented in LDBI_EBFeventIterator.

unsigned EBFeventIterator::iterate  )  [inline]
 

Iterate over the EBFevents in the array from start to end.

This method is used when a constructor setting up the array parameters has been used.

Returns:
Any status returned by the called back process() method, -1 when an error is detected, or 0 upon successful completion.

unsigned EBFeventIterator::iterate char *  buffer,
unsigned  size,
bool  swap = !DFC_BIG_ENDIAN
[inline]
 

Iterate over the EBFevents in the passed in buffer from start to end.

This method is used when a buffer containing EBFevents is provided by the caller.

Parameters:
buffer - A buffer containing an EBFevent in string form
size - The size of the buffer
swap - Optional parameter to force or not force in place byte swapping
Returns:
Any status returned by the called back process() method, -1 when an error is detected, or 0 upon successful completion.

unsigned EBFeventIterator::iterate EBFevent start,
EBFevent end
 

Class for iterating over a buffer of EBFevent(s). Iterate over the EBFevents in the array from start to end.

This method is used when the array parameters are passed on the fly.

Parameters:
start - A pointer to the first EBFevent in the array
end - A pointer to the first EBFevent after the end of the array
Returns:
Any status returned by the called back process() method, -1 when an error is detected, or 0 upon successful completion.

virtual int EBFeventIterator::process EBFevent evt  )  [pure virtual]
 

Virtual method for calling the application back with an EBFevent

Implemented in LDBI_EBFeventIterator.

const EBFevent * EBFeventIterator::start  )  const [inline]
 

Return a pointer to the first event in the array.

Returns:
The first EBFevent in the array.

unsigned EBFeventIterator::status  )  const [inline]
 

Return the iteration status.

Returns:
The iteration status


The documentation for this class was generated from the following files:
Generated on Thu Sep 29 12:13:38 2005 for LDF v05-07-00 by doxygen 1.3.9.1