Public Member Functions | Static Public Member Functions | Private Attributes | Static Private Attributes | Related Functions
Algorithms::Event Class Reference

List of all members.

Public Member Functions

 Event ()
void clear ()
void all ()
Event & operator+= (const Event &event)
Event & operator-= (const Event &event)
bool test (const Event &event) const
bool any () const
template<class OS >
void print (OS &os) const

Static Public Member Functions

static Event assign (const char *name)
template<class OS >
static void print_assigned (OS &os)

Private Attributes

bool all_true
std::vector< bool > flags

Static Private Attributes

static std::vector< std::string > names

Related Functions

(Note that these are not member functions.)

template<class OS >
OS & operator<< (OS &o, const Event &e)

Detailed Description

Objects of this kind are used to notify interior applications of changes provoked by an outer loop. They are handed to the application through Operator::notify() and it is up to the actual application how to handle them.

Event is organized as an extensible binary enumerator. Every class can add its own events using assign(). A typical code example is

 class A
 {
   static Event event;
 };

 Event A::event = Event::assign("Event for A");

Constructor & Destructor Documentation

Algorithms::Event::Event ( )

If you forgot to store the result of assign, here is how to retrieve it knowing the name. Constructor, generating a clear Event.


Member Function Documentation

static Event Algorithms::Event::assign ( const char *  name) [static]

This function registers a new event type and assigns a unique identifier to it. The result of this function should be stored for later use.

void Algorithms::Event::clear ( )

Clear all flags

void Algorithms::Event::all ( )

Set all flags

Event & Algorithms::Event::operator+= ( const Event &  event) [inline]

Add the flags of the other event

References all_true, and flags.

Event & Algorithms::Event::operator-= ( const Event &  event) [inline]

Clear the flags of the other event

References all_true, any(), and flags.

bool Algorithms::Event::test ( const Event &  event) const [inline]

Test whether all the flags set in the other Event are also set in this one.

References all_true, and flags.

bool Algorithms::Event::any ( ) const [inline]

Return true if any event is set.

References all_true, and flags.

Referenced by operator-=().

template<class OS >
void Algorithms::Event::print ( OS &  os) const [inline]

List the flags to a stream.

References all_true, flags, and names.

Referenced by operator<<().

template<class OS >
void Algorithms::Event::print_assigned ( OS &  os) [inline, static]

List all assigned events.

References names.


Friends And Related Function Documentation

template<class OS >
OS & operator<< ( OS &  o,
const Event &  e 
) [related]

Output shift operator for events. Calls Event::print().

References print().


Member Data Documentation

Sometimes, actions have to be taken by all means. Therefore, if this value is true, test() always returns true.

Referenced by any(), operator+=(), operator-=(), print(), and test().

std::vector<bool> Algorithms::Event::flags [private]

The actual list of events

Referenced by any(), operator+=(), operator-=(), print(), and test().

std::vector<std::string> Algorithms::Event::names [static, private]

The names of registered events

Referenced by print(), and print_assigned().


The documentation for this class was generated from the following file:

deal.II documentation generated on Fri Aug 12 2011 15:01:08 by doxygen 1.7.4