VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
luaMultiAsyncJob.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2026 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
6 #pragma once
7 
8 #include <vrfLua/vrfLuaDefines.h>
9 #include <vrfLua/luaAsyncJob.h>
10 
11 
13 {
14 public:
15 
19  static std::shared_ptr<DtLuaMultiAsyncJob> Make(
20  DtSimulationServices* simServices,
21  std::vector<std::shared_ptr<DtLuaAsyncJob> > jobs);
22 
25 
27  virtual ~DtLuaMultiAsyncJob() override;
28 
29  //@copydoc DtLuaAsyncJob::getObject
30  virtual luabind::object getObject(lua_State* L, int& index, std::string& message) override;
31 
32  //@copydoc DtLuaAsyncJob::getDebugObject
33  virtual luabind::object getDebugObject(lua_State* L) override;
34 
35  //@copydoc DtLuaAsyncJob::cancel
36  virtual void cancel(lua_State* L) override;
37 
38  //
40  //
41 
42  static DtAsciiSerializable* creator();
43 
44  virtual DtString serialize() override;
45  virtual bool deserialize(const DtString&) override;
46  virtual DtString objectType() const override;
47 
48  std::shared_ptr<DtLuaMultiAsyncJob> shared_from_this();
49  std::shared_ptr<const DtLuaMultiAsyncJob> shared_from_this() const;
50 
51 protected:
52 
53  virtual bool areAllJobsDone(lua_State* L) const;
54 
55  virtual bool isJobDone(lua_State* L, std::shared_ptr<DtLuaAsyncJob> job) const;
56 
58  std::vector<std::shared_ptr<DtLuaAsyncJob> > jobs);
59 
61  std::vector<std::shared_ptr<DtLuaAsyncJob> > myJobs;
62 };
63 
virtual void cancel(lua_State *L)=0
Cancels the job.
Definition: luaMultiAsyncJob.h:12
virtual luabind::object getDebugObject(lua_State *L)=0
Returns debug data. Not generally used.
Definition: asciiSerializable.h:42
Interface for getting asynchronously computed data into Lua.
Definition: luaAsyncJob.h:50
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;.
std::vector< std::shared_ptr< DtLuaAsyncJob > > myJobs
List of jobs to wait on.
Definition: luaMultiAsyncJob.h:61
#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.
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:97

Document ID: Generated on Thu Oct 15 21:27:02 EDT 2026 from SVN revision 296421
Copyright © 2005-2026 MAK Technologies. All Rights Reserved (www.mak.com)