This class is available for the OPUS Blackboard API. The initial OPUS 2.0 release is described here
Constructors:
Event_journal( ) | |
~Event_journal( ) |
Methods:
write( ) | produce a journal on disk for the event |
read( ) | reconstruct the event entries from a journal |
remove( ) | remove a journal file |
str( ) | return the journal name |
Description
This class supports the reading and writing of event journals for class Opus_env. Event journals are records kept on disk that store clean-up information in the event a process goes absent while handling an event.
Event_journal::Event_journal - The Event_journal constructor.
Synopsis
Event_journal::Event_journal( const string& path, // I - journal location const string& name) // I - journal type Event_journal::Event_journal( const Pstat* pstat, // I - PSTAT of journal // owner const string& path) // I - journal location
Description
This method either creates an Event_journal object for the running process, or one associated with the process identified by the Pid and Node object arguments.
Exceptions Thrown
Bad_val<string> | - if the indicated path does not exist; Bad_val.arg contains a copy of the bad argument |
Bad_val<void*> | - if the Pstat* argument is null; Bad_val.arg contains zero |
Event_journal::~Event_journal - The Event_journal destructor.
Synopsis
Event_journal::~Event_journal()
Description
This method destroys the object.
Exceptions Thrown
Event_journal::write - Write a journal file to disk for an event.
Synopsis
void Event_journal::write( const Event* e, // I - Event to journal const vector<Field*>& mods) // I - modifiers
Description
A journal file containing entry information as well as modifiers to apply to mark the entries as "absent" is written to the journal file.
Exceptions Thrown
Io_error<int> | - if file creation fails; Io_error.arg contains the value of errno |
Event_journal::read - Read the journal file associated with this object.
Synopsis
void Event_journal::read( const Entry* e, // I - sample Entry object vector<Entry*>& ents, // O - journal entries vector<Field*>& mods) // O - journal modifiers
Description
This method attempts to read the journal file for the object, and reconstruct the entries and modifiers used to create the file.
Exceptions Thrown
Event_journal::str - Get the journal name.
Synopsis
string Event_journal::str() const
Description
This method returns the journal name used to construct the object.
Exceptions Thrown
Event_journal::remove - Remove a journal file.
Synopsis
void Event_journal::remove( const Pstat* pstat, // I - journal process // PSTAT const string& loc) // I - journal location void Event_journal::remove( const string& loc) // I - journal location
Description
This method deletes the journal file associated with the indicated PSTAT or for the current process.
Exceptions Thrown
Copyright © 1997-2000 The Association of Universities for
Research in Astronomy, Inc. All Rights Reserved.
For more information, contact opushelp@stsci.edu
Last modified: 25 April 2000