VR-Forces 4.5 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator 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 /******************************************************************************
6 ** $RCSfile: DtDriver.h,v $ $Revision: 1.43 $ $State: Exp $
7 ******************************************************************************/
8 
12 
13 #pragma once
16 #include <vrvCore/DtElementEntry.h>
17 
18 namespace makVrv
19 {
20  class DtAgentManager;
21  class DtAgentManagerInterface;
22  class DtDeRecord;
23 
24 
35  {
36 
37  public:
38 
39  friend class DtDriverManager;
40 
42  DtDriver(DtAgentManager& agentManager, const std::string& instanceName);
43 
45  virtual ~DtDriver();
46 
48  virtual void realizeConfiguration(const DtConfiguration& configuration);
49 
51  virtual DtConfiguration createConfiguration() const;
52 
56  DtAgentManager& agentManager();
57 
59  virtual DtAgentManagerInterface& sceneInterface();
60 
62  inline bool started() const
63  {
64  return myStartedFlag;
65  }
66 
68  virtual const std::string& className() const = 0;
69 
71  virtual const std::string& instanceName() const;
72 
75  virtual bool autoStart() const;
76 
79  virtual void setAutoStart(bool autoStart);
80 
84  virtual bool isWindowDependent() const;
85 
89  virtual void setIsWindowDependent(bool dep);
90 
93  virtual void setIsUserControllable(bool);
94 
97  virtual bool isUserControllable() const;
98 
101  virtual void setIsPersistent(bool per);
102 
105  virtual bool isPersistent() const;
106 
109  virtual bool isOnDriverSelectionList() const;
110 
113  virtual void setOnDriverSelectionList(bool);
114 
117  bool objectFromAgentManager(const DtUniqueID& id) const;
118 
119  protected:
120 
124  void applyChangesAndDelete(DtElementChanges* changes);
125 
127  void reportElementCreated(DtElementID id, DtElementID parentId,
129 
132  void reportElementAttribute(DtElementID id, DtElementAttribute* attribute);
133 
135  void reportElementDestroyed(DtElementID id);
136 
139  void start();
140 
143  void stop();
144 
148  bool tick();
149 
154  virtual bool onStart() = 0;
155 
160  virtual bool onStop() = 0;
161 
165  virtual bool onTick() = 0;
166 
169  virtual void slot_displayEngineAdded(const DtDeRecord& igRecord);
170 
175  virtual void setInstanceName(const std::string& name);
176 
180  virtual void installAccessories();
181 
185  virtual void uninstallAccessories();
186 
187  protected:
188 
191  std::string myName;
193 
198 
199  };
200 
201 
205  {
206  public:
207 
209  DtDriverCreator();
210 
212  virtual ~DtDriverCreator();
213 
217  virtual const std::string& extension() const = 0;
218 
220  virtual DtDriver* create(DtAgentManager& agentManager,
221  const std::string& instanceName) const = 0;
222  };
223 
224 }

Document ID: Generated on Thu Mar 23 18:54:12 EDT 2017 from SVN revision 174804
Copyright © 2005-2017 VT MÄK. All Rights Reserved (www.mak.com)