|
Boost : |
From: Mattias Flodin (flodin_at_[hidden])
Date: 2002-10-31 03:09:54
On Wed, Oct 30, 2002 at 03:45:05PM -0500, Marc Jacobs wrote:
> > Exception handling may be expensive. Perhaps it could be good to provide a
> > query, to determine if an operation may be performed.
>
> Good suggestion. I will add it. Requires a little slight of hand given that
> the state objects have no intrinsic value, just type, but entirely doable.
> Usage would probably be something like:
>
> if( context::equals( fsmtl::state< on >() ) ) {
> // ...
> }
Why not also have:
if(context::raise( fsmtl::event< fsm::poweron >() )) {
// ...
}
I suppose this would require configuration by policies, though.
-- Mattias Flodin <flodin_at_[hidden]> - http://www.cs.umu.se/~flodin/ Room NADV 102 Department of Computing Science Umeå University S-901 87 Umeå, Sweden -- "If I said you had a beautiful body, would you hold it against me?" -- Joe Dirt
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk