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 #include <boost/scoped_ptr.hpp>
22 
23 class DtSimMessage;
24 
27 {
28 public:
29  typedef std::vector<DtLocation3D> Points;
30 
31  static boost::shared_ptr<DtLuaEmbarkationEgressPointsQueryJob> Make(
33  DtSimObjectReference queryingObject,
34  DtSimObjectReference objectToBeQueried);
35 
38 
41 
43  luabind::object getObject(lua_State* L, int& index, std::string& message);
44 
46  luabind::object getDebugObject(lua_State* L) { return luabind::newtable(L); }
47 
49  virtual void cancel(lua_State* L) {};
50 
52  static void responseCallback(DtSimMessage* msg, void* usr);
53  virtual void processResponse(DtSimMessage* msg);
54 
55  //
57  //
58 
59  static DtAsciiSerializable* creator();
60 
62  bool deserialize(const DtString&);
63  DtString objectType() const;
64 
65  boost::shared_ptr<DtLuaEmbarkationEgressPointsQueryJob> shared_from_this();
66  boost::shared_ptr<const DtLuaEmbarkationEgressPointsQueryJob> shared_from_this() const;
67 
68 protected:
69 
70  static int nextRequestId()
71  {
72  static int theRequestId = 0;
73 
74  return ++theRequestId;
75  }
76 
77  class PathTask;
78  friend class PathTask;
79 
83  DtSimObjectReference queryingObject,
84  DtSimObjectReference objectToBeQueried);
85 
86  void start();
87 
89  void taskComplete();
90 
93 
95 
97 
99 
100  typedef DtMutex Mutex;
101 
102  mutable Mutex myMutex;
103 };
virtual void cancel(lua_State *L)
Currently a no-op.
Definition: luaEmbarkationEgressPointsQueryJob.h:49
DtSimObjectReference myQueryingObject
Definition: luaEmbarkationEgressPointsQueryJob.h:91
static int nextRequestId()
Definition: luaEmbarkationEgressPointsQueryJob.h:70
std::map< int, EgressPointInformation > EgressPointInformationMap
Definition: ifEmbarkationEgressPointsResponse.h:30
Definition: asciiSerializable.h:38
Interface for getting asynchronously computed data into Lua.
Definition: luaAsyncJob.h:29
virtual bool deserialize(const DtString &)=0
This function should take the string that was serialized via serialize() and fill this object with th...
The DtSimObjectReference is a shared pointer that can be used amongst many object for access to the u...
Definition: simObjectReference.h:26
bool myGotResponse
Definition: luaEmbarkationEgressPointsQueryJob.h:96
virtual DtString serialize()=0
The following characters are reserved and cannot be used in serialization: &#39;|&#39;, &#39;:&#39;.
DtMutex Mutex
Definition: luaEmbarkationEgressPointsQueryJob.h:100
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:98
luabind::object getDebugObject(lua_State *L)
Retrieve debug data, if available. Default return value is an empty table.
Definition: luaEmbarkationEgressPointsQueryJob.h:46
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:94
Lua object class which represents a query for embarkation ingress and egress point info...
Definition: luaEmbarkationEgressPointsQueryJob.h:26
std::vector< DtLocation3D > Points
Definition: luaEmbarkationEgressPointsQueryJob.h:29
DtSimObjectReference myObjectBeingQueried
Definition: luaEmbarkationEgressPointsQueryJob.h:92
int myRequestId
Definition: luaEmbarkationEgressPointsQueryJob.h:94
Mutex myMutex
Definition: luaEmbarkationEgressPointsQueryJob.h:102

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)