North State Framework in C#  V3.0.0
An object-oriented framework for implementing UML state machines.
Public Member Functions | Static Public Member Functions | List of all members
NSFBoolGuards< ContextType > Class Template Reference

Represents a list of guards. More...

Inheritance diagram for NSFBoolGuards< ContextType >:
NSFDelegateListBase

Public Member Functions

bool isEmpty ()
 Checks if the list is empty. More...
 

Static Public Member Functions

static NSFBoolGuards< ContextType > operator+ (NSFBoolGuards< ContextType > list, NSFBoolGuard< ContextType > guard)
 Adds a guard to the list of guards. More...
 
static NSFBoolGuards< ContextType > operator- (NSFBoolGuards< ContextType > list, NSFBoolGuard< ContextType > guard)
 Removes a guard from the list of guards. More...
 

Detailed Description

Represents a list of guards.

The primary purpose of this class is to provide exception handling around guard invocations. An exception thrown by any guard will be caught, allowing the other guards to execute. Notification of guard exceptions is also available. The execute() method returns true if all guards return true. If an exception is thrown by any guard, the execute() method returns false.

Member Function Documentation

bool isEmpty ( )

Checks if the list is empty.

Returns
True if the list is empty, false otherwise.
static NSFBoolGuards<ContextType> operator+ ( NSFBoolGuards< ContextType >  list,
NSFBoolGuard< ContextType >  guard 
)
static

Adds a guard to the list of guards.

Parameters
listThe guard list.
guardThe guard to add.
Returns
The list of guards.
static NSFBoolGuards<ContextType> operator- ( NSFBoolGuards< ContextType >  list,
NSFBoolGuard< ContextType >  guard 
)
static

Removes a guard from the list of guards.

Parameters
listThe guard list.
guardThe guard to remove.
Returns
The list of guards.



Copyright 2004-2014, North State Software, LLC. All rights reserved.