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

DC_ControlAction.cpp

00001 // 00002 // Copyright 2004 P&P Software GmbH - All Rights Reserved 00003 // 00004 // DC_ControlAction.cpp 00005 // 00006 // Version 1.0 00007 // Date 28.07.03 00008 // Author A. Pasetti (P&P Software) 00009 00010 #include "../GeneralInclude/CompilerSwitches.h" 00011 #include "../GeneralInclude/DebugSupport.h" 00012 #include "../GeneralInclude/Constants.h" 00013 #include "../GeneralInclude/ClassId.h" 00014 #include "../Base/ConditionalPunctualAction.h" 00015 #include "ControlBlock.h" 00016 #include "DC_ControlAction.h" 00017 00018 DC_ControlAction::DC_ControlAction(void) { 00019 setClassId(ID_CONTROLACTION); 00020 pTargetControlBlock = pNULL; 00021 } 00022 00023 TD_ActionOutcome DC_ControlAction::doConditionalAction(void) { 00024 assert( pTargetControlBlock != pNULL ); 00025 pTargetControlBlock->propagate(); 00026 return ACTION_SUCCESS; 00027 } 00028 00029 bool DC_ControlAction::canExecute(void) { 00030 return true; 00031 } 00032 00033 void DC_ControlAction::setTargetControlBlock(ControlBlock* pBlock) { 00034 assert( pBlock != pNULL ); 00035 pTargetControlBlock = pBlock; 00036 } 00037 00038 ControlBlock* DC_ControlAction::getTargetControlBlock(void) { 00039 return pTargetControlBlock; 00040 } 00041 00042 void DC_ControlAction::reset(void) { 00043 assert( pTargetControlBlock != pNULL ); 00044 pTargetControlBlock->reset(); 00045 } 00046 00047 bool DC_ControlAction::isObjectConfigured(void) { 00048 return (ConditionalPunctualAction::isObjectConfigured() && pTargetControlBlock!=pNULL); 00049 }
Copyright 2003 P&P Software GmbH - All Rights Reserved