VR-Forces 4.1 Class Documentation
DtBaseConnection.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2009 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 /******************************************************************************
6 ** $RCSfile: DtBaseConnection.h,v $ $Revision: 1.43 $ $State: Exp $
7 ******************************************************************************/
8 
12 
13 #pragma once
14 #include <vrvCore/vrvCore.h>
15 #include <vrvCore/DtUniqueID.h>
18 #include <vrvUtil/templateUtil.h>
19 #include <vrvUtil/DtUnicode.h>
20 
21 #include <boost/unordered_map.hpp>
22 
23 #include <string>
24 #include <map>
25 
26 namespace makVrv
27 {
28  class DtSharedSettingsManager;
29  class DtAgentManagerInterface;
30  class DtElementChanges;
31  class DtElementAttribute;
32  class DtBlinkingObjectManager;
33  class DtTemporaryAgentManager;
34 
38  {
39 
40  public:
43 
46  virtual ~DtBaseConnection();
47 
50  virtual void clearInstances();
51 
53  DtSharedSettingsManager& settingsManager();
54 
56  virtual DtAgentManagerInterface& sceneInterface();
57 
59  const DtSharedSettingsManager& settingsManager() const;
60 
62  void reportElementCreated(DtElementID id, DtElementID parentId, unsigned int type);
63 
64  //The attribute passed in should not be used again.
65  void reportElementAttribute(DtElementID id, DtElementAttribute* attribute);
66 
68  void reportElementDestroyed(DtElementID id);
69 
71  const DtElementChanges& currentElementChanges() const;
72 
74  DtElementChanges* takeElementChanges();
75 
77  DtTemporaryAgentManager& temporaryEffects();
78 
80  DtBlinkingObjectManager& blinkManager();
81 
83  DtRandomNumberGenerator& randomNumberGenerator();
84 
86  virtual const std::string& tag()
87  {
88  const static std::string tagStr = "";
89  return tagStr;
90  }
91 
93  const DtUnicode& emptyString() const;
94 
100  virtual DtVirtualBaseClass* findInstance(const std::string& instanceName);
101 
115  inline bool destroyingInstances() const
116  {
117  return myDestroyingInstanceFlag;
118  }
119 
122  virtual void registerInstance(const std::string& instanceName,
123  DtVirtualBaseClass* instance);
124 
125 
126  protected:
127 
128  //Hold on to the shared simulation manager.
130 
131  //The random number generator for the local simulation.
133 
134  //Thread specific Variables. This variables are used by the second thread.
135  //They should not be used in any functions in the main thread while the
136  //secondary thread is running.
138 
139  //Internal working element changes
141 
142  //Manager for temporary global effects.
144 
147 
149 
150  typedef boost::unordered_map<std::string,DtVirtualBaseClass*> InstanceMap;
151 
152  //Stores a pointer to simulation specific instances.
154 
155  //Flag to store if the connection is destroying the instances in it's
156  //DTOR
158  };
159 }

Document ID: Generated on Tue Jan 29 18:21:16 EST 2013 from SVN revision 123193
Copyright © 2005-2013 VT MÄK Inc. All Rights Reserved (www.mak.com)