[OPUS]

Trigger - Defines the conditions for triggering an event on a blackboard.


Availability:

This class is available for the OPUS Blackboard API. The initial OPUS 2.0 release is described here

Constructors:
Trigger( )
~Trigger( )

Methods:
poll( ) apply condition to Blackboard
str( ) return Trigger name

Description

Trigger objects specify the search criteria on a blackboard for generating an event. As such, they contain a blackboard entry that serves as the search condition for polling. Matching entries to the search can have a field modifier applied to them that can be used to prevent re-triggering. A copy of an Event object of the type to be generated after polling finds a match is maintained by the object.

See Also:


Trigger::Trigger - The Trigger constructor.

Synopsis


Trigger::Trigger(Blackboard* bbrd,       // I - Blackboard pointer
                 const Entry* e,         // I - Trigger condition
                 const string& t,        // I - label for Trigger
                 const Field* f,         // I - Field modifier
                 const Event* evt,       // I - Event to generate
                 const int mx)           // I - max. matching Entry's

Description

The constructor creates local copies of all of the calling arguments.

Exceptions Thrown

none


Trigger::~Trigger - The Trigger destructor.

Synopsis


Trigger::~Trigger()

Description

The destructor deletes private data objects allocated off of the heap.

Exceptions Thrown

none


Trigger::poll - Poll blackboard for matches to condition.

Synopsis


Event* Trigger::poll()

Description

This method calls the search method of the associated blackboard with the trigger condition. If matching entries are found, the modifier (if defined) is applied to each match, and the entries are replaced on the blackboard. Finally, an Event is generated.

No matching entries to the blackboard search results in the return of a null pointer.

Returns

    A pointer to an Event object constructed off the heap if the trigger

condition was satisfied; 0 otherwise.

Exceptions Thrown

[any exceptions thrown by the search and replace methods of the associated Blackboard, and the get_field, set_field methods and % operator of modified fields]


Trigger::str - Get the trigger name

Synopsis


string Trigger::str() const

Description

This method returns the name of the trigger set at construction.

Returns

    string containing the trigger name

Exceptions Thrown

none


OPUS API index · STScI Home Page · Search · Topics · Index

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