VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
joyDeviceControllerDescriptor.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2015 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
8 
10 
11 #pragma once
12 
17 
18 
23 
25 {
26 public:
29 
32 
34  virtual void setJoystickControls(const DtRwJoystickControls&) = 0;
35  virtual const DtRwJoystickControls& joystickControls() const = 0;
36 
38  virtual bool hasFunctionGroup(const DtString&) const = 0;
39 };
40 
41 template <typename BaseDescriptorClass>
43 {
44 public:
47  DtReaderWriterRegistry* parentRegistry = NULL);
49  DtReaderWriterRegistry* parentRegistry = NULL);
50 
53 
57  DtReaderWriterRegistry* parentRegistry = NULL);
58 
62 
64  virtual void setJoystickControls(const DtRwJoystickControls&) override;
65  virtual const DtRwJoystickControls& joystickControls() const override;
66 
68  virtual bool hasFunctionGroup(const DtString&) const override;
69 
71  virtual void getSelf(DtlObjPtr args, const DtReaderWriter::SearchPaths& searchPaths,
72  const DtVariableBindingsList& variableBindings);
73 
74 protected:
75  virtual void createFunctionGroupMap();
76 
77 protected:
81 
88 
89  std::map<DtString, std::set<DtString> > myFunctionGroupLookup;
90 };
91 
94 {
95 public:
97  DtReaderWriterRegistry* parentRegistry = NULL)
99  {
100  }
101 
103  DtReaderWriterRegistry* parentRegistry = NULL)
105  {
106  }
107 
109  DtReaderWriterRegistry* parentRegistry = NULL)
111  {
112  }
113 
115  virtual ~DtJoyDeviceControllerDescriptor() override {};
116 
117  virtual DtComponentDescriptor* clone(DtReaderWriterRegistry* parentRegistry = NULL) const override
118  {
119  return new DtJoyDeviceControllerDescriptor(*this, parentRegistry);
120  }
121 
123  {
124  return new DtJoyDeviceControllerDescriptor("");
125  }
126 
129  virtual DtString type() const override {
131  }
132 };
133 
134 #include <vrfobjparam/joyDeviceControllerDescriptor.inl>
DtJoyDeviceControllerDescriptorTemplate(const DtString &name, DtReaderWriterRegistry *parentRegistry=NULL)
constructor
virtual bool hasFunctionGroup(const DtString &) const override
Returns true if contains the particular function group.
Definition: joyDeviceControllerDescriptor.h:42
DtJoyDeviceControllerDescriptor(const DtString &name, DtReaderWriterRegistry *parentRegistry=NULL)
Definition: joyDeviceControllerDescriptor.h:96
This class allows one to collect and compare strings using an index number instead of having to do st...
Definition: symbolString.h:27
DtJoyDeviceControllerDescriptor(const DtSymbolString &name, DtReaderWriterRegistry *parentRegistry=NULL)
Definition: joyDeviceControllerDescriptor.h:102
virtual ~DtJoyDeviceControllerDescriptorTemplate() override
destructor
#define DT_DLL_vrfobjparam
This file is used to determine how to build.
Definition: vrfobjparamDefines.h:28
const char DtJoyDeviceControllerDescriptorType[]
Ground Vehicle Controller Descriptor Types.
Definition: simComponentDescriptorTypes.h:139
virtual void getSelf(DtlObjPtr args, const DtReaderWriter::SearchPaths &searchPaths, const DtVariableBindingsList &variableBindings)
Overridden to call createFunctionGroupMap() once everything is read.
static DtComponentDescriptor * creator()
Definition: joyDeviceControllerDescriptor.h:122
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
!!!!!!!!!!!! DtJoyDeviceControllerDescriptor
Definition: joyDeviceControllerDescriptor.h:93
virtual ~DtJoyDeviceControllerDescriptor() override
destructor
Definition: joyDeviceControllerDescriptor.h:115
std::list< const DtRwVariableBindings * > DtVariableBindingsList
Definition: readerWriterRegistry.h:29
std::vector< DtFilename > SearchPaths
Definition: readerWriter.h:92
virtual const DtRwJoystickControls & joystickControls() const override
DtJoyDeviceControllerDescriptor(const DtJoyDeviceControllerDescriptor &orig, DtReaderWriterRegistry *parentRegistry=NULL)
Definition: joyDeviceControllerDescriptor.h:108
DtJoyDeviceControllerDescriptorTemplate & operator=(const DtJoyDeviceControllerDescriptorTemplate &orig)
assignment operator
virtual DtString type() const override
Returns the type of descriptor. This will be used to create the descriptor read from an mtl file...
Definition: joyDeviceControllerDescriptor.h:129
DtJoyDeviceControllerDescriptorInterface()
CTOR.
Definition: joyDeviceControllerDescriptor.h:28
virtual ~DtJoyDeviceControllerDescriptorInterface()
DTOR.
Definition: joyDeviceControllerDescriptor.h:31
DtGroundJoyDeviceControllerDescriptor.
Definition: joyDeviceControllerDescriptor.h:24
std::map< DtString, std::set< DtString > > myFunctionGroupLookup
Definition: joyDeviceControllerDescriptor.h:89
virtual void setJoystickControls(const DtRwJoystickControls &) override
Set a joystick control list.
DtRwJoystickControls myJoystickControls
Parameter Name: joystick-controls Parameter Description: List of joystick function groups and functio...
Definition: joyDeviceControllerDescriptor.h:86
virtual DtComponentDescriptor * clone(DtReaderWriterRegistry *parentRegistry=NULL) const override
Definition: joyDeviceControllerDescriptor.h:117

Document ID: Generated on Thu Oct 23 22:29:17 EDT 2025 from SVN revision 280951
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)