VR-Forces Development_Version Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
simTerrainRequestManager.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2013 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
8 
9 #pragma once
10 
13 #include <vrfmsgs/ifComputeRoute.h>
16 
17 #include <list>
18 
19 class DtSimManager;
20 class DtIfComputeRoute;
21 class DtSimulationAddress;
23 class DtSimMessage;
24 
26 {
27 protected:
28  struct PendingIntersection;
29 
30 public:
32 
34 
35  virtual ~DtSimTerrainRequestManager();
36 
37  virtual void init();
38 
39  virtual void tick();
40 
41  virtual void process(const DtIfComputeRoute& msg, const DtSimulationAddress& from);
42 
44  virtual void setIntersectionRecheckPeriod(double);
45  double intersectionRecheckPeriod() const
46  {
47  return myIntersectionRecheckPeriod;
48  }
49 
51  virtual void setVectorFeatureLookup(const DtString&);
52  const DtString& vectorFeatureLookup() const
53  {
54  return myVectorFeatureLookup;
55  }
56 
58  virtual void terrainClosed();
59 
60 protected:
61  static void intersectionRequestCallback(DtSimMessage*, void* usr);
62  virtual void processIntersectionRequest(DtIfRequestIntersectionInformation*);
63 
65  virtual bool processPendingIntersection(PendingIntersection&);
66 
67 protected:
69 
70  typedef boost::shared_ptr<DtAsyncJobMapEntry> EntryPtr;
71 
72  struct Record
73  {
74  Record(const EntryPtr& entry, const DtSimulationAddress& addr, const DtIfComputeRoute& msg)
75  : entry(entry), address(addr), message(msg) { }
76 
78  DtSimulationAddress address;
80  };
81 
82  bool processRecord(const Record&);
83 
84  typedef std::list<Record> Records;
86 
90  {
91  std::vector<bool> awaiting;
94  double nextCheckTime;
95  };
96 
97  typedef std::vector<PendingIntersection> PendingIntersectionRequest;
98 
100 
103 };

Document ID: Generated on Tue Mar 8 22:13:38 EST 2016 from SVN revision 162938
Copyright © 2005-2015 VT MÄK. All Rights Reserved (www.mak.com)