Main Page | Modules | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

DC_NestedFsmActivatorWithEndState.cpp

00001 // 00002 // Copyright 2004 P&P Software GmbH - All Rights Reserved 00003 // 00004 // DC_NestedFsmActivatorWithEndState.cpp 00005 // 00006 // Version 1.0 00007 // Date 23.06.03 00008 // Author R. Totaro 00009 00010 #include "../GeneralInclude/CompilerSwitches.h" 00011 #include "../GeneralInclude/DebugSupport.h" 00012 #include "../GeneralInclude/ClassId.h" 00013 #include "../GeneralInclude/Constants.h" 00014 #include "../Base/CC_RootObject.h" 00015 #include "../FSM/CC_FSM.h" 00016 #include "DC_NestedFsmActivatorWithEndState.h" 00017 00018 DC_NestedFsmActivatorWithEndState::DC_NestedFsmActivatorWithEndState(void) { 00019 targetState=-1; 00020 setClassId(ID_NESTEDFSMACTIVATORWITHENDSTATE); 00021 } 00022 00023 void DC_NestedFsmActivatorWithEndState::setTargetState(TD_FsmStateIndex targetState) { 00024 assert(targetState>=0); 00025 this->targetState=targetState; 00026 } 00027 00028 TD_FsmStateIndex DC_NestedFsmActivatorWithEndState::getTargetState(void) { 00029 assert(targetState>=0); 00030 return targetState; 00031 } 00032 00033 bool DC_NestedFsmActivatorWithEndState::isFinished(void) { 00034 assert(isObjectConfigured()); 00035 return (getTargetFsm()->getCurrentState()==targetState); 00036 } 00037 00038 bool DC_NestedFsmActivatorWithEndState::isObjectConfigured(void) { 00039 return (DC_NestedFsmActivator::isObjectConfigured() && targetState>=0); 00040 }
Copyright 2003 P&P Software GmbH - All Rights Reserved