VR-Forces 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 
22 class DtSimMessage;
23 class DtLocalObject;
24 
27 {
28 public:
29 
30  static std::shared_ptr<DtLuaWeaponListQueryJob> Make(
32  DtLocalObject *pLocalObjectMakingQuery,
33  DtSimObjectReference objectToBeQueried);
34 
37 
39  virtual ~DtLuaWeaponListQueryJob() override;
40 
47  virtual luabind::object getObject(lua_State* L, int& index, std::string& message) override;
48 
50  virtual luabind::object getDebugObject(lua_State* L) override { return luabind::newtable(L);}
51 
53  virtual void cancel(lua_State* L) override {};
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 
65  virtual DtString serialize() override;
66  virtual bool deserialize(const DtString&) override;
67  virtual DtString objectType() const override;
68 
69  std::shared_ptr<DtLuaWeaponListQueryJob> shared_from_this();
70  std::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: uuid.h:59
DtMutex Mutex
Definition: luaWeaponListQueryJob.h:96
Mutex myMutex
Definition: luaWeaponListQueryJob.h:98
virtual void cancel(lua_State *L) override
Currently a no-op.
Definition: luaWeaponListQueryJob.h:53
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...
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:26
DtSimObjectReference myObjectBeingQueried
Definition: luaWeaponListQueryJob.h:87
std::list< WeaponSystem > DtWeaponList
Definition: weaponListResponseAdmin.h:53
Central access point of all non-object-specific the services and managers that are available for use ...
Definition: simulationServices.h:96
DtUUID myLocalObjectUUID
Definition: luaWeaponListQueryJob.h:86
virtual luabind::object getDebugObject(lua_State *L) override
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.
Definition: localObject.h:98
DtTime myTimeToGiveUp
Definition: luaWeaponListQueryJob.h:94

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)