VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
luaEmbarkationEgressPointsQueryJob.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2019 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
6 #pragma once
7 
8 #include "vrfLua/vrfLuaDefines.h"
9 #include "vrfLua/luaAsyncJob.h"
10 #include "vrfobjcore/simObject.h"
11 #include "vrfutil/scriptGeometry.h"
16 
17 #include "vlutil/vlMutex.h"
18 
19 #include <luabind/luabind.hpp>
20 
21 
22 class DtSimMessage;
23 
26 {
27 public:
28  typedef std::vector<DtLocation3D> Points;
29 
30  static std::shared_ptr<DtLuaEmbarkationEgressPointsQueryJob> Make(
32  DtSimObjectReference queryingObject,
33  DtSimObjectReference objectToBeQueried);
34 
37 
39  virtual ~DtLuaEmbarkationEgressPointsQueryJob() override;
40 
42  virtual luabind::object getObject(lua_State* L, int& index, std::string& message) override;
43 
45  virtual luabind::object getDebugObject(lua_State* L) override { return luabind::newtable(L); }
46 
48  virtual void cancel(lua_State* L) override {};
49 
51  static void responseCallback(DtSimMessage* msg, void* usr);
52  virtual void processResponse(DtSimMessage* msg);
53 
54  //
56  //
57 
58  static DtAsciiSerializable* creator();
59 
60  virtual DtString serialize() override;
61  virtual bool deserialize(const DtString&) override;
62  virtual DtString objectType() const override;
63 
64  std::shared_ptr<DtLuaEmbarkationEgressPointsQueryJob> shared_from_this();
65  std::shared_ptr<const DtLuaEmbarkationEgressPointsQueryJob> shared_from_this() const;
66 
67 protected:
68 
69  static int nextRequestId()
70  {
71  static int theRequestId = 0;
72 
73  return ++theRequestId;
74  }
75 
76  class PathTask;
77  friend class PathTask;
78 
82  DtSimObjectReference queryingObject,
83  DtSimObjectReference objectToBeQueried);
84 
85  void start();
86 
88  void taskComplete();
89 
92 
94 
96 
98 
99  typedef DtMutex Mutex;
100 
101  mutable Mutex myMutex;
102 };
DtSimObjectReference myQueryingObject
Definition: luaEmbarkationEgressPointsQueryJob.h:90
static int nextRequestId()
Definition: luaEmbarkationEgressPointsQueryJob.h:69
std::map< int, EgressPointInformation > EgressPointInformationMap
Definition: ifEmbarkationEgressPointsResponse.h:30
virtual void cancel(lua_State *L) override
Currently a no-op.
Definition: luaEmbarkationEgressPointsQueryJob.h:48
Definition: asciiSerializable.h:40
Interface for getting asynchronously computed data into Lua.
Definition: luaAsyncJob.h:27
virtual bool deserialize(const DtString &)=0
This function should take the string that was serialized via serialize() and fill this object with th...
bool myGotResponse
Definition: luaEmbarkationEgressPointsQueryJob.h:95
virtual DtString serialize()=0
The following characters are reserved and cannot be used in serialization: &#39;|&#39;, &#39;:&#39;.
DtMutex Mutex
Definition: luaEmbarkationEgressPointsQueryJob.h:99
File: simMsg.h.
Definition: simMessage.h:35
#define DT_DLL_vrfLua
This file is used to determine how to build.
Definition: vrfLuaDefines.h:25
DtIfEmbarkationEgressPointsResponse::EgressPointInformationMap myEgressInfo
Definition: luaEmbarkationEgressPointsQueryJob.h:97
virtual luabind::object getObject(lua_State *L, int &index, std::string &message)=0
Retrieve current value.
virtual DtString objectType() const =0
Should return the string name of this object. The object name should not be part of the serialization...
Central access point of all non-object-specific the services and managers that are available for use ...
Definition: simulationServices.h:96
virtual luabind::object getDebugObject(lua_State *L) override
Retrieve debug data, if available. Default return value is an empty table.
Definition: luaEmbarkationEgressPointsQueryJob.h:45
Lua object class which represents a query for embarkation ingress and egress point info...
Definition: luaEmbarkationEgressPointsQueryJob.h:25
std::vector< DtLocation3D > Points
Definition: luaEmbarkationEgressPointsQueryJob.h:28
DtSimObjectReference myObjectBeingQueried
Definition: luaEmbarkationEgressPointsQueryJob.h:91
int myRequestId
Definition: luaEmbarkationEgressPointsQueryJob.h:93
Mutex myMutex
Definition: luaEmbarkationEgressPointsQueryJob.h:101

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)