VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtDriver.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2010 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
9 
10 #pragma once
13 #include <vrvCore/DtElementEntry.h>
14 
15 namespace makVrv
16 {
17  class DtAgentManager;
18  class DtAgentManagerInterface;
19  class DtDeRecord;
20 
21 
32  {
33 
34  public:
35 
36  friend class DtDriverManager;
37 
39  DtDriver(DtAgentManager& agentManager, const std::string& instanceName);
40 
42  virtual ~DtDriver();
43 
45  virtual void realizeConfiguration(const DtConfiguration& configuration);
46 
48  virtual DtConfiguration createConfiguration() const;
49 
53  DtAgentManager& agentManager();
54 
56  virtual DtAgentManagerInterface& sceneInterface();
57 
59  inline bool started() const
60  {
61  return myStartedFlag;
62  }
63 
65  virtual const std::string& className() const = 0;
66 
68  virtual const std::string& instanceName() const;
69 
72  virtual bool autoStart() const;
73 
76  virtual void setAutoStart(bool autoStart);
77 
81  virtual bool isWindowDependent() const;
82 
86  virtual void setIsWindowDependent(bool dep);
87 
90  virtual void setIsUserControllable(bool);
91 
94  virtual bool isUserControllable() const;
95 
98  virtual void setIsPersistent(bool per);
99 
102  virtual bool isPersistent() const;
103 
106  virtual bool isOnDriverSelectionList() const;
107 
110  virtual void setOnDriverSelectionList(bool);
111 
114  bool objectFromAgentManager(const DtUniqueID& id) const;
115 
116  protected:
117 
121  void applyChangesAndDelete(DtElementChanges* changes);
122 
124  void reportElementCreated(DtElementID id, DtElementID parentId,
126 
129  void reportElementAttribute(DtElementID id, DtElementAttribute* attribute);
130 
132  void reportElementDestroyed(DtElementID id);
133 
136  void start();
137 
140  void stop();
141 
145  bool tick();
146 
151  virtual bool onStart() = 0;
152 
157  virtual bool onStop() = 0;
158 
162  virtual bool onTick() = 0;
163 
166  virtual void slot_displayEngineAdded(const DtDeRecord& igRecord);
167 
172  virtual void setInstanceName(const std::string& name);
173 
177  virtual void installAccessories();
178 
182  virtual void uninstallAccessories();
183 
184  protected:
185 
188  std::string myName;
190 
195 
196  };
197 
198 
202  {
203  public:
204 
206  DtDriverCreator();
207 
209  virtual ~DtDriverCreator();
210 
214  virtual const std::string& extension() const = 0;
215 
217  virtual DtDriver* create(DtAgentManager& agentManager,
218  const std::string& instanceName) const = 0;
219  };
220 
221 }
bool myUserControllableFlag
Definition: DtDriver.h:192
A Record of an IG instance.
Definition: DtDeRecord.h:24
DtConfiguration myConfiguration
Definition: DtDriver.h:189
The DtDriverManager manages all the DtDriver&#39;s in the DtDe.
Definition: DtDriverManager.h:32
DtUniqueID DtElementID
The ElementID is a specific type of unique ID used to represent VR-Vantage uniquely defined elements...
Definition: DtUniqueID.h:23
DtElementChanges is used to communicate changes in element data between drivers and the main applicat...
Definition: DtElementChanges.h:25
The DtDriver is an abstract class. Developers derive from this to create logic that &quot;directs&quot; things ...
Definition: DtDriver.h:31
#define DT_DLL_VRVCORE
Definition: vrvCore.h:20
DtElementChanges myChanges
Definition: DtDriver.h:194
bool myRequestStateDiffPendingFlag
Definition: DtDriver.h:193
bool myStartedFlag
Definition: DtDriver.h:187
ElementType
Definition: DtElementEntry.h:26
The DtAgentManager manages the distributed scene object framework. This includes the objects and upda...
Definition: DtAgentManager.h:38
unsigned long long DtUniqueID
Definition: DtUniqueID.h:19
Contains makVrv::DtConfiguration class.
DtAgentManager & myAgentManager
Definition: DtDriver.h:186
bool myPersistentFlag
Definition: DtDriver.h:191
The base implementation of a configuration.
Definition: DtConfiguration.h:24
The abstract interface necessary for agents.
Definition: DtAgentManagerInterface.h:33
std::string myName
Definition: DtDriver.h:188
DtElementAttribute is a common base class used for all element attributes, such as those found in a D...
Definition: DtElementAttribute.h:20
Abstract DtDriver creator.
Definition: DtDriver.h:201
Contains makVrv::DtElementChanges class.
bool started() const
Get this driver&#39;s active state.
Definition: DtDriver.h:59
Contains makVrv::DtElementEntry class.

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)