VR-Forces 4.10 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Protected Member Functions | Protected Attributes
DtLuaAsyncJob Class Referenceabstract

Interface for getting asynchronously computed data into Lua. More...

Inheritance diagram for DtLuaAsyncJob:
Inheritance graph
[legend]

Public Member Functions

virtual luabind::object getObject (lua_State *L, int &index, std::string &message)=0
 Retrieve current value. More...
 
virtual luabind::object getDebugObject (lua_State *L)=0
 Returns debug data. More...
 
virtual void cancel (lua_State *L)=0
 Cancels the job. More...
 
void init (void *userData)
 Called by framework with userData set to the DtSimManager. More...
 
- Public Member Functions inherited from DtAsciiSerializable
 DtAsciiSerializable ()
 The implementer of this interface should be sure to create a creator function to create an empty object that returns a pointer to this interface. More...
 
 DtAsciiSerializable (const DtAsciiSerializable &orig)
 
virtual ~DtAsciiSerializable ()
 
virtual DtString objectType () const =0
 Should return the string name of this object. More...
 
virtual std::string objectTypeC () const
 Returns a std::string version of the objectType. More...
 
virtual DtString serialize ()=0
 The following characters are reserved and cannot be used in serialization: '|', ':'. More...
 
virtual bool deserialize (const DtString &)=0
 This function should take the string that was serialized via serialize() and fill this object with the correct data. More...
 

Protected Member Functions

 DtLuaAsyncJob ()
 
 DtLuaAsyncJob (DtSimManager *)
 

Protected Attributes

DtSimManagermySimManager
 

Detailed Description

Interface for getting asynchronously computed data into Lua.

The class is designed to be a general interface to some process which is computing values. The getObject function returns the "current" value and some control information. The subclass is responsible for all aspects of the asynchronous operation: Starting/stopping, data synchronization, and serialization/deserialization. The Lua framework will hold on to this object as a shared pointer.

Constructor & Destructor Documentation

DtLuaAsyncJob::DtLuaAsyncJob ( )
protected
DtLuaAsyncJob::DtLuaAsyncJob ( DtSimManager )
explicitprotected

Member Function Documentation

virtual luabind::object DtLuaAsyncJob::getObject ( lua_State *  L,
int index,
std::string &  message 
)
pure virtual

Retrieve current value.

Parameters
LLua state.
indexIndex of returned value, returned in Lua as the second return value. Allows implementation to distinguish between different values computed over time.
messageError message, returned in Lua as the third return value.
Returns
Computed value.

Implemented in DtLuaNavFindPathJob, DtLuaNavCoverPointJob, DtLuaNavPointOfInterestJob, DtLuaNavRandomPointJob, DtLuaPathJob, DtLuaEmbarkationEgressPointsQueryJob, DtLuaEmbarkationSlotQueryJob, DtLuaEmbarkationSlotReservationJob, and DtLuaNavJob.

virtual luabind::object DtLuaAsyncJob::getDebugObject ( lua_State *  L)
pure virtual

Returns debug data.

Not generally used.

Parameters
LLua state.
Returns
Debug data.

Implemented in DtLuaNavFindPathJob, DtLuaNavRandomPointJob, DtLuaPathJob, DtLuaEmbarkationEgressPointsQueryJob, DtLuaEmbarkationSlotQueryJob, DtLuaEmbarkationSlotReservationJob, and DtLuaNavJob.

virtual void DtLuaAsyncJob::cancel ( lua_State *  L)
pure virtual
void DtLuaAsyncJob::init ( void *  userData)
virtual

Called by framework with userData set to the DtSimManager.

Reimplemented from DtAsciiSerializable.

Member Data Documentation

DtSimManager* DtLuaAsyncJob::mySimManager
protected

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

Document ID: Generated on Tue Sep 21 17:42:52 EDT 2021 from SVN revision 234861
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)