VR-Forces 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  static void setMarkingTextCallback(DtSimMessage* msg, void* usr);
67  virtual void processSetMarkingText(DtSimMessage* msg);
68 
69 private:
70 
73 
75  DtSetController(const
76  DtSetController & orig);
77 
79  const DtSetController & operator=(
80  const DtSetController & orig);
81 
82 
83 protected:
84  typedef std::map<DtString, SetControllerCallbackFcn> RegisteredSets;
87 };
#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)
virtual void enable() override
Enables the component and resends capable tasks and sets.
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 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 bool init() override
Calls setRadio()
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:84
RegisteredSets myRegisteredSets
Those sets that can be registered.
Definition: setController.h:86
Central access point of all non-object-specific the services and managers that are available for use ...
Definition: simulationServices.h:94
RegisteredSets myRegisterSets
Definition: setController.h:85
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 Wed Mar 27 22:49:11 EDT 2024 from SVN revision 264633
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)