VR-Forces 5.0.1 Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
setController.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2018 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
8 
9 #pragma once
10 
14 #include <map>
15 
16 class DtSimMessage;
17 
22 {
23 protected:
24  typedef void (*SetControllerCallbackFcn)(DtSimMessage*, void*);
25 
26 public:
27 
30  DtSetController(const DtString& name,
31  DtLocalObject* owner,
32  DtSimulationServices* simManager,
33  DtComponentDescriptor* desc = 0,
34  DtReaderWriterRegistry* parentRegistry = 0);
35 
37  virtual ~DtSetController();
38 
40  virtual void addSetToRegister(const DtString&, SetControllerCallbackFcn);
41  virtual void removeSetToRegister(const DtString&);
42 
43  virtual void enable();
44  virtual void disable();
45 
46  static void setSystemEnabledCallback(DtSimMessage *msg, void* usrData);
47 
48  virtual bool init();
49 
50 protected:
53  void removeSetDataCallbacks();
54 
56  virtual void setRadio(DtSimRadio* radio);
57 
59  virtual void addSetDataCallbacks();
60 
61  virtual void processSetSystemEnabled(DtSimMessage* msg);
62 
63  static void setNotifyLevelCallback(DtSimMessage* msg, void* usr);
64  virtual void processSetNotifyLevel(DtSimMessage* msg);
65 
66 private:
67 
70 
72  DtSetController(const
73  DtSetController & orig);
74 
76  const DtSetController & operator=(
77  const DtSetController & orig);
78 
79 
80 protected:
81  typedef std::map<DtString, SetControllerCallbackFcn> RegisteredSets;
84 };
#define DT_DLL_vrfmodel
This file is used to determine how to build.
Definition: vrfmodelDefines.h:24
const DtControllerComponent & operator=(const DtControllerComponent &orig)
assignment operator
Definition: simRadio.h:30
virtual void setRadio(DtSimRadio *radio)
A readable, writable type whose name is the name of a component and that has a list of component name...
Definition: componentDescriptor.h:49
Definition: readerWriterRegistry.h:39
virtual bool init()
Calls setRadio()
virtual void disable()
Is this component enabled or not. If enabled, component&#39;s tick function will be called, otherwise it will not. Default is true (enabled).
virtual void enable()
Is this component enabled or not. If enabled, component&#39;s tick function will be called, otherwise it will not. Default is true (enabled).
File: simMsg.h.
Definition: simMessage.h:35
This class will define a basic set controller that will allow for adding sets of that can be register...
Definition: setController.h:21
End User Description: DtControllerComponent is the base class for all controllers components...
Definition: controllerComponent.h:31
std::map< DtString, SetControllerCallbackFcn > RegisteredSets
Definition: setController.h:81
RegisteredSets myRegisteredSets
Those sets that can be registered.
Definition: setController.h:83
Central access point of all non-object-specific the services and managers that are available for use ...
Definition: simulationServices.h:89
RegisteredSets myRegisterSets
Definition: setController.h:82
A locally simulated VRF object. Holds all internal and external data for the object, and provides access to both the current frame and next frame state data for the object. All current frame data is read-only, and next-frame data can be written to. No thread safety guarantees are made on this object during the simulation frame and it should only be accessed by the thread that is simulating the object.
Definition: localObject.h:86

Document ID: Generated on Mon Jun 20 00:38:30 EDT 2022 from SVN revision 244029
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)