VR-Forces 4.0.4 Class Documentation
include/vrfmodel/disaggregatedPatrolAlongController.h
Go to the documentation of this file.
00001 /*******************************************************************************
00002 ** Copyright (c) 2004 MAK Technologies, Inc.
00003 ** All rights reserved.
00004 *******************************************************************************/
00005 /*******************************************************************************
00006 ** $RCSfile: disaggregatedPatrolAlongController.h,v $ $Revision: 1.1 $ $State: Exp $
00007 *******************************************************************************/
00008 
00011 
00015 
00016 #ifndef disaggregatedPatrolAlongController_H_
00017 #define disaggregatedPatrolAlongController_H_
00018 
00019 #include "vrfobjcore/singleTaskControllerComponent.h"
00020 
00021 class DtFormationState;
00022 class DtAggregatePatrolAlongPSR;
00023 class DtAggregatePatrolAlongDescriptor;
00024 class DtVrfObjectManager;
00025 
00040 #include "vrfmodel/vrfmodelDefines.h"
00041 class DT_DLL_vrfmodel DtDisaggregatedPatrolAlongController : public DtSingleTaskControllerComponent
00042 {
00043 public:
00044 
00045    enum DtPatrolAlongState
00046    {
00047       DtMovingAlongRoute = 0,
00048       DtReversingDirection = 1
00049    };
00050 
00053    DtDisaggregatedPatrolAlongController(const DtString& name, 
00054       DtVrfObject* owner,
00055       DtSimManager* simManager, 
00056       DtComponentDescriptor* desc = 0,
00057       DtReaderWriterRegistry* parentRegistry = 0);
00058 
00060    virtual ~DtDisaggregatedPatrolAlongController();
00061 
00064    virtual DtString type() const;
00065 
00068    virtual bool init();
00069 
00071    virtual void tick();
00072 
00074    virtual void registerTaskMsgCallbacks();
00075 
00078    DtSimTaskStatePtr currentTaskState() const;
00079 
00083    static void patrolAlongTaskCallback(DtSimMessage * msg, void * usr, DtSimTaskStatePtr taskStatePtr);
00084 
00089    static void taskCompleteReportCallback(DtSimMessage * msg, void * usr);
00090 
00094    static DtSimComponent * creator(const DtString& name, 
00095       DtVrfObject* owner,
00096       DtSimManager* simManager, 
00097       DtComponentDescriptor* desc = 0,
00098       DtReaderWriterRegistry* parentRegistry = 0);
00099 
00100 protected:
00101 
00105    virtual void processPatrolAlongTask(DtSimMessage * msg, DtSimTaskStatePtr taskStatePtr);
00106 
00111    virtual void onTaskComplete(DtSimMessage * msg);
00112 
00118    virtual bool createPSR();
00119 
00127    virtual DtIteratorDirection initialTraversalDirection(
00128       const DtString& routeName, const DtVector& initialWorldPosition) const;
00129 
00138    virtual void sendMoveAlongToSelf(const DtString& routeName,
00139       enum DtIteratorDirection traversalDirection, bool startAtClosestPoint);
00140 
00141 private:
00142 
00144    DtDisaggregatedPatrolAlongController(const DtDisaggregatedPatrolAlongController& orig);
00145 
00147    DtDisaggregatedPatrolAlongController& operator=(const DtDisaggregatedPatrolAlongController& orig);
00148   
00149 protected:
00150 
00152    const DtAggregatePatrolAlongDescriptor* myAggregatePatrolAlongDescriptor;
00153 
00155    DtFormationState* myFormationState;
00156    
00159    DtAggregatePatrolAlongPSR* myProcessState;
00160 
00161    bool myFirstTick;
00162 };
00163 
00164 #endif

Document ID: Generated on Fri Jun 29 16:33:32 EDT 2012 from SVN revision 116588
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)