VR-Forces 4.8 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
myHumanSetController.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2010 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
6 //\file myHumanSetController.h
7 //\brief MyHumanSetController; handles new DtSetSpeedAndHeadingRequest
8 
9 
10 #pragma once
11 
13 #include "vrfobjcore/simRadio.h"
14 
15 namespace vrfAddSetExample
16 {
17  //\brief MyLocalEntitySetController is a controller that handles new
18  //DtSetSpeedAndHeadingRequest. It replaces the existing DtHumanSetController.
19  //
20  //Uses Descriptor Type: DtComponentDescriptor
21 
23  {
24 
25  public:
26 
27  //\copydoc DtSimComponent(const DtString&,DtVrfObject*,DtSimManager*,
28  //DtComponentDescriptor*,DtReaderWriterRegistry* parentRegistry)
30  DtVrfObject* owner,
32  DtComponentDescriptor* desc = 0,
33  DtReaderWriterRegistry* parentRegistry = 0);
34 
35  //destructor
36  virtual ~MyHumanSetController();
37 
38  virtual void processSetSpeedAndHeading(DtSimMessage * msg);
39 
40  static void setSpeedAndHeadingCallback(DtSimMessage * msg, void * usrData);
41 
42  //\copydoc DtSimComponent(const DtString&,DtVrfObject*,DtSimManager*,
43  //DtComponentDescriptor*,DtReaderWriterRegistry* parentRegistry)
44  //\return New instance of this class.
45  static DtSimComponent * creator(const DtString& name,
46  DtVrfObject* owner,
47  DtSimManager* simManager,
48  DtComponentDescriptor* desc = 0,
49  DtReaderWriterRegistry* parentRegistry = 0);
50 
51  private:
52  //Default constructor; should not be called. Here because the compiler
53  //will generate an unprotected one otherwise.
55 
56  //copy constructor
58 
59  //assignment operator
60  const MyHumanSetController & operator=(const
61  MyHumanSetController& orig);
62 
63 
64  protected:
65  //Overrides this so it can register its interest in the set commands.
66  virtual void setRadio(DtSimRadio * radio);
67  };
68 }
69 
virtual void setRadio(DtSimRadio *radio)
Override to add set data callbacks.
DtVrfObject is used to represent any type of simulated object (entities, aggregate, control objects) in a VR-Forces application.
Definition: vrfObject.h:215
static DtSimComponent * creator(const DtString &name, DtVrfObject *owner, DtSimManager *simManager, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0)
class DtSimRadio:
Definition: simRadio.h:25
DtSimManager * simManager()
Gets the sim manager.
Definition: simComponent.h:408
A readable, writable type whose name is the name of a component and that has a list of component name...
Definition: componentDescriptor.h:42
const MyHumanSetController & operator=(const MyHumanSetController &orig)
Definition: readerWriterRegistry.h:39
static void setSpeedAndHeadingCallback(DtSimMessage *msg, void *usrData)
File: simMsg.h.
Definition: simMessage.h:35
virtual void processSetSpeedAndHeading(DtSimMessage *msg)
Definition: myHumanSetController.h:22
The DtSimComponent class is the base class for the entire simulation model component hierarchy...
Definition: simComponent.h:67
DtHumanSetController handles DtSetDataRequest messages for individual lifeform entities.
Definition: humanSetController.h:29
The simulation engine is controlled by a single,top-level class called the Simulation Manager...
Definition: simManager.h:102
virtual DtSymbolString name() const
Accessor for name of this readable/writable object.
virtual DtSimRadio * radio()
The radio this component is listening to.

Document ID: Generated on Thu Aug 27 10:56:05 EDT 2020 from SVN revision 217100
Copyright © 2005-2020 MAK Technologies. All Rights Reserved (www.mak.com)