occurrence Class Reference

tracks information about something that happened during runtime. More...

#include <occurrence.h>

Inheritance diagram for occurrence:

Inheritance graph
[legend]
Collaboration diagram for occurrence:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 IMPLEMENT_CLASS_NAME ("occurrence")
 occurrence (const outcome &o=outcome(1), const earth_time::time_locus &when=earth_time::now(), const istring &operation=istring::empty_string(), const istring &location=istring::empty_string())
 the default version of the constructor provides an invalid occurrence.
bool valid () const
virtual void pack (byte_array &packed_form) const
 creates a packed form of the occurrence in "packed_form".
virtual bool unpack (byte_array &packed_form)
 restores the occurrence from the "packed_form".

Public Attributes

outcome _out
 the particular outcome that was seen.
earth_time::time_locus _when
 the time at which the outcome occurred.
istring _operation
 the operation that saw fit to record the outcome.
istring _location
 the program location where this all happened.

Detailed Description

tracks information about something that happened during runtime.

Records the occurrence of a particular outcome, the time it happened, where it was noted and any additional state information that seemed relevant to the recorder.

Note: This is a heavyweight header; it should not be used in other headers.

Definition at line 36 of file occurrence.h.


Constructor & Destructor Documentation

occurrence::occurrence ( const outcome o = outcome(1),
const earth_time::time_locus when = earth_time::now(),
const istring operation = istring::empty_string(),
const istring location = istring::empty_string() 
) [inline]

the default version of the constructor provides an invalid occurrence.

Definition at line 51 of file occurrence.h.


Member Function Documentation

occurrence::IMPLEMENT_CLASS_NAME ( "occurrence"   ) 

bool occurrence::valid (  )  const [inline]

Definition at line 57 of file occurrence.h.

References non_positive().

Referenced by runtime_history::add_outcome().

void occurrence::pack ( byte_array packed_form  )  const [virtual]

creates a packed form of the occurrence in "packed_form".

Implements packable.

Definition at line 20 of file occurrence.cpp.

References _location, _operation, _out, _when, istring::pack(), earth_time::time_locus::pack(), and outcome::pack().

bool occurrence::unpack ( byte_array packed_form  )  [virtual]

restores the occurrence from the "packed_form".

Implements packable.

Definition at line 28 of file occurrence.cpp.

References _location, _operation, _out, _when, istring::unpack(), earth_time::time_locus::unpack(), and outcome::unpack().


Member Data Documentation

outcome occurrence::_out

the particular outcome that was seen.

Definition at line 40 of file occurrence.h.

Referenced by pack(), and unpack().

earth_time::time_locus occurrence::_when

the time at which the outcome occurred.

Definition at line 41 of file occurrence.h.

Referenced by pack(), and unpack().

istring occurrence::_operation

the operation that saw fit to record the outcome.

Definition at line 42 of file occurrence.h.

Referenced by pack(), and unpack().

istring occurrence::_location

the program location where this all happened.

should also include any other useful state information that might help with debugging or understanding the problem.

Definition at line 44 of file occurrence.h.

Referenced by pack(), and unpack().


The documentation for this class was generated from the following files:
Generated on Fri Aug 29 04:30:40 2008 for HOOPLE Libraries by  doxygen 1.5.1