00001 // $Id: Normal.cc,v 1.9 2010/08/06 20:24:31 wmtan Exp $ 00003 00004 #include "EventFilter/StorageManager/interface/StateMachine.h" 00005 #include "EventFilter/StorageManager/interface/TransitionRecord.h" 00006 00007 #include <iostream> 00008 00009 using namespace std; 00010 using namespace stor; 00011 00012 void Normal::do_entryActionWork() 00013 { 00014 TransitionRecord tr( stateName(), true ); 00015 outermost_context().updateHistory( tr ); 00016 } 00017 00018 Normal::Normal( my_context c ): my_base(c) 00019 { 00020 safeEntryAction(); 00021 } 00022 00023 void Normal::do_exitActionWork() 00024 { 00025 TransitionRecord tr( stateName(), false ); 00026 outermost_context().updateHistory( tr ); 00027 } 00028 00029 Normal::~Normal() 00030 { 00031 safeExitAction(); 00032 } 00033 00034 string Normal::do_stateName() const 00035 { 00036 return std::string( "Normal" ); 00037 } 00038 00039 void Normal::do_moveToFailedState( xcept::Exception& exception ) const 00040 { 00041 outermost_context().getSharedResources()->moveToFailedState( exception ); 00042 } 00043