VR-Forces 5.0.1 Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
luaWeaponListQueryJob.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2018 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"
14 
16 
17 #include "vlutil/vlMutex.h"
18 
19 #include <luabind/luabind.hpp>
20 
21 #include <boost/scoped_ptr.hpp>
22 
23 class DtSimMessage;
24 class DtLocalObject;
25 
28 {
29 public:
30 
31  static boost::shared_ptr<DtLuaWeaponListQueryJob> Make(
33  DtLocalObject *pLocalObjectMakingQuery,
34  DtSimObjectReference objectToBeQueried);
35 
38 
41 
47  luabind::object getObject(lua_State* L, int& index, std::string& message);
48 
50  luabind::object getDebugObject(lua_State* L) {return luabind::newtable(L);}
51 
53  virtual void cancel(lua_State* L) {};
54 
56  static void responseCallback(const DtVrfObjectMessage* msg, void* usr);
57  virtual void processResponse(const DtVrfObjectMessage* msg);
58 
59  //
61  //
62 
63  static DtAsciiSerializable* creator();
64 
66  bool deserialize(const DtString&);
67  DtString objectType() const;
68 
69  boost::shared_ptr<DtLuaWeaponListQueryJob> shared_from_this();
70  boost::shared_ptr<const DtLuaWeaponListQueryJob> shared_from_this() const;
71 
72 protected:
73 
77  DtLocalObject *pLocalObjectMakingQuery,
78  DtSimObjectReference objectToBeQueried);
79 
80  virtual void start(DtLocalObject& localObjectExecuting);
81 
83  virtual void taskComplete();
84 
88 
91 
93 
95 
96  typedef DtMutex Mutex;
97 
98  mutable Mutex myMutex;
99 };
UUID is a unique ID wrapper class.
Definition: rwUUID.h:226
DtMutex Mutex
Definition: luaWeaponListQueryJob.h:96
Mutex myMutex
Definition: luaWeaponListQueryJob.h:98
Definition: asciiSerializable.h:34
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
virtual DtString serialize()=0
The following characters are reserved and cannot be used in serialization: &#39;|&#39;, &#39;:&#39;.
bool myGotResponse
Definition: luaWeaponListQueryJob.h:90
DtLocalObject * pMyLocalObject
Definition: luaWeaponListQueryJob.h:85
File: simMsg.h.
Definition: simMessage.h:35
#define DT_DLL_vrfLua
This file is used to determine how to build.
Definition: vrfLuaDefines.h:25
virtual luabind::object getObject(lua_State *L, int &index, std::string &message)=0
Retrieve current value.
The base class for all messages to/from a specific DtVrfObject. Various subclasses of this class will...
Definition: vrfObjectMessage.h:30
virtual DtString objectType() const =0
Should return the string name of this object. The object name should not be part of the serialization...
Lua object class which represents a query for embarkation slot info.
Definition: luaWeaponListQueryJob.h:27
DtSimObjectReference myObjectBeingQueried
Definition: luaWeaponListQueryJob.h:87
std::list< WeaponSystem > DtWeaponList
Definition: weaponListResponseAdmin.h:43
Central access point of all non-object-specific the services and managers that are available for use ...
Definition: simulationServices.h:89
DtUUID myLocalObjectUUID
Definition: luaWeaponListQueryJob.h:86
luabind::object getDebugObject(lua_State *L)
Retrieve debug data, if available. Default return value is an empty table.
Definition: luaWeaponListQueryJob.h:50
bool myRequestSent
Definition: luaWeaponListQueryJob.h:89
DtWeaponList myWeaponList
Definition: luaWeaponListQueryJob.h:92
A locally simulated VRF object. Holds all internal and external data for the object, and provides access to both the current frame and next frame state data for the object. All current frame data is read-only, and next-frame data can be written to. No thread safety guarantees are made on this object during the simulation frame and it should only be accessed by the thread that is simulating the object.
Definition: localObject.h:86
DtTime myTimeToGiveUp
Definition: luaWeaponListQueryJob.h:94
virtual void cancel(lua_State *L)
Currently a no-op.
Definition: luaWeaponListQueryJob.h:53

Document ID: Generated on Mon Jun 20 00:38:30 EDT 2022 from SVN revision 244029
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)