VR-Forces 4.10 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
systemSwitcherComponent.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2012 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
10 
13 
14 #pragma once
15 
17 #include "vrfobjcore/simRadio.h"
18 
19 class DtComponentSystem;
22 
25 {
26 public:
27 
29  DtSystemSwitcherComponent(const DtString & name, DtVrfObject* owner,
30  DtSimManager * simManager, DtComponentDescriptor* desc = NULL,
31  DtReaderWriterRegistry * parentRegistry = 0);
32 
34  virtual ~DtSystemSwitcherComponent();
35 
37  virtual bool init();
38 
41  virtual const char* type() const;
42 
43  virtual void tick();
44 
47  virtual void enable();
48 
51  virtual void disable();
52 
53  virtual bool transitionIsComplete() const;
54 
55  virtual void onTransitionComplete();
56 
57 public:
58 
59  static void setSwitchSystemsCallback(DtSimMessage * msg, void * usrData);
60 
61 
63  static DtSimComponent* creator(const DtString & name, DtVrfObject* owner,
64  DtSimManager * simManager, DtComponentDescriptor* desc,
65  DtReaderWriterRegistry * parentRegistry);
66 
67 protected:
68 
71 
74 
76  virtual void setRadio(DtSimRadio * radio);
77 
78  virtual bool createPSR();
79 
82  virtual void addSetDataCallbacks();
83 
86  void removeSetDataCallbacks();
87 
88  virtual void processSetSwitchSystems(DtSimMessage * msg);
89 
92  virtual bool switchSystems();
93 
96  void enableComponentSystem(DtComponentSystem* activateSystem);
97  void disableComponentSystem(DtComponentSystem* deactivateSystem);
98  void enableSimComponent(DtSimComponent* simComponent);
99  void disableSimComponent(DtSimComponent* simComponent);
101 
104  virtual bool allowedToTransition() const;
105 
106 protected:
107 
111 
113 
115 };
#define DT_DLL_vrfmodel
This file is used to determine how to build.
Definition: vrfmodelDefines.h:24
DtSwitchSystemComponentPSR * myProcessState
Definition: systemSwitcherComponent.h:112
DtVrfObject is used to represent any type of simulated object (entities, aggregate, control objects) in a VR-Forces application.
Definition: vrfObject.h:215
const DtControllerComponent & operator=(const DtControllerComponent &orig)
assignment operator
class DtSimRadio:
Definition: simRadio.h:25
DtComponentSystem * mySystemToActivate
Definition: systemSwitcherComponent.h:110
virtual void setRadio(DtSimRadio *radio)
bool mySwitchingSystems
Definition: systemSwitcherComponent.h:114
A set of DtSimComponent and DtComponentSystem instances that are connected with a set of connections...
Definition: simComponentNetwork.h:33
A DtComponentSystem is a collection of DtSimComponents that are associated with each other...
Definition: componentSystem.h:35
virtual const char * type() const =0
This returns a string from compTypes.h, and identifies the type of component.
A readable, writable type whose name is the name of a component and that has a list of component name...
Definition: componentDescriptor.h:42
Definition: readerWriterRegistry.h:39
Definition: systemSwitcherComponent.h:24
virtual bool init()
Calls setRadio()
virtual void disable()
DtComponentSystem * mySystemToDeactivate
Definition: systemSwitcherComponent.h:109
virtual void enable()
Is this component enabled or not.
File: simMsg.h.
Definition: simMessage.h:35
virtual void tick()
This gives the thread of control to the component.
End User Description: DtControllerComponent is the base class for all controllers components...
Definition: controllerComponent.h:29
The DtSimComponent class is the base class for the entire simulation model component hierarchy...
Definition: simComponent.h:67
Definition: switchSystemComponentPSR.h:21
The simulation engine is controlled by a single,top-level class called the Simulation Manager...
Definition: simManager.h:103
DtSimComponentNetwork * myComponentNetwork
Definition: systemSwitcherComponent.h:108

Document ID: Generated on Tue Sep 21 17:42:52 EDT 2021 from SVN revision 234861
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)