VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Static Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes
DtLuaWeaponListQueryJob Class Reference

Lua object class which represents a query for embarkation slot info.

Inheritance diagram for DtLuaWeaponListQueryJob:
Inheritance graph
[legend]

Public Member Functions

 DtLuaWeaponListQueryJob ()
 
virtual ~DtLuaWeaponListQueryJob () override
 
virtual luabind::object getObject (lua_State *L, int &index, std::string &message) override
 
virtual luabind::object getDebugObject (lua_State *L) override
 
virtual void cancel (lua_State *L) override
 
virtual void processResponse (const DtVrfObjectMessage *msg)
 
virtual DtString serialize () override
 
virtual bool deserialize (const DtString &) override
 
virtual DtString objectType () const override
 
std::shared_ptr
< DtLuaWeaponListQueryJob
shared_from_this ()
 
std::shared_ptr< const
DtLuaWeaponListQueryJob
shared_from_this () const
 
- Public Member Functions inherited from DtLuaAsyncJob
virtual void init (void *userData) override
 
- Public Member Functions inherited from DtAsciiSerializable
 DtAsciiSerializable ()
 
 DtAsciiSerializable (const DtAsciiSerializable &orig)
 
virtual ~DtAsciiSerializable ()
 
virtual std::string objectTypeC () const
 

Static Public Member Functions

static std::shared_ptr
< DtLuaWeaponListQueryJob
Make (DtSimulationServices *mgr, DtLocalObject *pLocalObjectMakingQuery, DtSimObjectReference objectToBeQueried)
 
static void responseCallback (const DtVrfObjectMessage *msg, void *usr)
 
static DtAsciiSerializablecreator ()
 

Protected Types

typedef DtMutex Mutex
 

Protected Member Functions

 DtLuaWeaponListQueryJob (DtSimulationServices *mgr, DtLocalObject *pLocalObjectMakingQuery, DtSimObjectReference objectToBeQueried)
 
virtual void start (DtLocalObject &localObjectExecuting)
 
virtual void taskComplete ()
 
- Protected Member Functions inherited from DtLuaAsyncJob
 DtLuaAsyncJob ()
 
 DtLuaAsyncJob (DtSimulationServices *)
 

Protected Attributes

DtLocalObjectpMyLocalObject
 
DtUUID myLocalObjectUUID
 
DtSimObjectReference myObjectBeingQueried
 
bool myRequestSent
 
bool myGotResponse
 
DtWeaponList myWeaponList
 
DtTime myTimeToGiveUp
 
Mutex myMutex
 
- Protected Attributes inherited from DtLuaAsyncJob
DtSimulationServicesmySimulationServices
 

Member Typedef Documentation

typedef DtMutex DtLuaWeaponListQueryJob::Mutex
protected

Constructor & Destructor Documentation

DtLuaWeaponListQueryJob::DtLuaWeaponListQueryJob ( )

For creating when deserializing.

virtual DtLuaWeaponListQueryJob::~DtLuaWeaponListQueryJob ( )
overridevirtual

DTOR.

DtLuaWeaponListQueryJob::DtLuaWeaponListQueryJob ( DtSimulationServices mgr,
DtLocalObject pLocalObjectMakingQuery,
DtSimObjectReference  objectToBeQueried 
)
protected

For creating from lua call.

Member Function Documentation

static std::shared_ptr<DtLuaWeaponListQueryJob> DtLuaWeaponListQueryJob::Make ( DtSimulationServices mgr,
DtLocalObject pLocalObjectMakingQuery,
DtSimObjectReference  objectToBeQueried 
)
static
virtual luabind::object DtLuaWeaponListQueryJob::getObject ( lua_State *  L,
int index,
std::string &  message 
)
overridevirtual

Retrieve value Returns index 1 if job complete, -1 if job error, 0 if job running Index will return 9 if the job needs to be recreated because it was interrupted by serialization and deserialization and is incomplete. Returns { {"<weaponName>", "<weaponType>", { "<resourceName>","<resourceName>"... }, { "<weaponName>","<weaponType>",{"<resourceName>","<resourceName>"...}, ... }.

Implements DtLuaAsyncJob.

virtual luabind::object DtLuaWeaponListQueryJob::getDebugObject ( lua_State *  L)
inlineoverridevirtual

Retrieve debug data, if available. Default return value is an empty table.

Implements DtLuaAsyncJob.

virtual void DtLuaWeaponListQueryJob::cancel ( lua_State *  L)
inlineoverridevirtual

Currently a no-op.

Implements DtLuaAsyncJob.

static void DtLuaWeaponListQueryJob::responseCallback ( const DtVrfObjectMessage msg,
void *  usr 
)
static

Processes the query response.

virtual void DtLuaWeaponListQueryJob::processResponse ( const DtVrfObjectMessage msg)
virtual
static DtAsciiSerializable* DtLuaWeaponListQueryJob::creator ( )
static

DtAsciiSerializable functions.

virtual DtString DtLuaWeaponListQueryJob::serialize ( )
overridevirtual

The following characters are reserved and cannot be used in serialization: '|', ':'.

Implements DtAsciiSerializable.

virtual bool DtLuaWeaponListQueryJob::deserialize ( const DtString )
overridevirtual

This function should take the string that was serialized via serialize() and fill this object with the correct data.

Implements DtAsciiSerializable.

virtual DtString DtLuaWeaponListQueryJob::objectType ( ) const
overridevirtual

Should return the string name of this object. The object name should not be part of the serialization unless you want it to be, but you should take it into account when implementing both functions.

Implements DtAsciiSerializable.

std::shared_ptr<DtLuaWeaponListQueryJob> DtLuaWeaponListQueryJob::shared_from_this ( )
std::shared_ptr<const DtLuaWeaponListQueryJob> DtLuaWeaponListQueryJob::shared_from_this ( ) const
virtual void DtLuaWeaponListQueryJob::start ( DtLocalObject localObjectExecuting)
protectedvirtual
virtual void DtLuaWeaponListQueryJob::taskComplete ( )
protectedvirtual

Called by task object whenever it is done.

Member Data Documentation

DtLocalObject* DtLuaWeaponListQueryJob::pMyLocalObject
protected
DtUUID DtLuaWeaponListQueryJob::myLocalObjectUUID
protected
DtSimObjectReference DtLuaWeaponListQueryJob::myObjectBeingQueried
protected
bool DtLuaWeaponListQueryJob::myRequestSent
protected
bool DtLuaWeaponListQueryJob::myGotResponse
protected
DtWeaponList DtLuaWeaponListQueryJob::myWeaponList
protected
DtTime DtLuaWeaponListQueryJob::myTimeToGiveUp
protected
Mutex DtLuaWeaponListQueryJob::myMutex
mutableprotected

The documentation for this class was generated from the following file:

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)