VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
scriptInterfaceHandler.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2013 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 #pragma once
6 
9 
11 #include <map>
12 #include <vlutil/vlString.h>
13 
14 class DtLocalObject;
15 class DtScriptInterface;
17 
19 {
20 public:
22  virtual ~DtScriptInterfaceHandler();
23 
24  virtual bool init();
25 
26  virtual void tick();
27 
28  virtual DtLocalObject* entity() { return myEntity; }
29 
30  virtual void setReactiveTaskController(DtScriptReactiveTaskController* controller) { myReactiveTaskController = controller; }
31 
32  virtual bool shouldResumeScriptInterface(const DtSimTaskMessageType& scriptId);
33  virtual void notifySuspend(const DtSimTaskMessageType& scriptId, int taskId);
34  virtual void notifyResume(const DtSimTaskMessageType& scriptId, int taskId);
35  virtual void notifyScriptError(const DtSimTaskMessageType& scriptId, int taskId);
36 
37  virtual std::shared_ptr<DtScriptInterface> createScriptInterface(const DtGenericMessageType& scriptId);
38  virtual void releaseScriptInterface(const DtGenericMessageType& scriptId, int taskId, std::shared_ptr<DtScriptInterface> iFace);
39  virtual bool passScriptInterface(const DtGenericMessageType& scriptId, std::shared_ptr<DtScriptInterface> iFace);
40 
41  virtual void removeScriptInterfacePass(const DtGenericMessageType& scriptId);
42 
43 protected:
45 
46  std::map<DtGenericMessageType, std::shared_ptr<DtScriptInterface> > myPassingScriptInterfaces;
47  std::map<DtGenericMessageType, std::shared_ptr<DtScriptInterface> > myReturningScriptInterfaces;
49 };
Definition: scriptInterfaceHandler.h:18
DtScriptReactiveTaskController * myReactiveTaskController
Definition: scriptInterfaceHandler.h:44
DtLocalObject * myEntity
Definition: scriptInterfaceHandler.h:48
std::map< DtGenericMessageType, std::shared_ptr< DtScriptInterface > > myPassingScriptInterfaces
Definition: scriptInterfaceHandler.h:46
virtual DtLocalObject * entity()
Definition: scriptInterfaceHandler.h:28
#define DT_DLL_vrfobjcore
This file is used to determine how to build.
Definition: vrfobjcoreDefines.h:24
std::map< DtGenericMessageType, std::shared_ptr< DtScriptInterface > > myReturningScriptInterfaces
Definition: scriptInterfaceHandler.h:47
DT_DLL_DEBUGDRAWRENDERER void init(makVrv::DtDe &de)
Work function for the plugin initialization.
This class is a two-way interface between the script language and its parent controller. There are functions that either the parent controller will call on the script interface (such as tick() ) and there will be functions the script interface will call on the parent controller to inform the parent of status updates and for data access.
Definition: scriptInterface.h:32
virtual void setReactiveTaskController(DtScriptReactiveTaskController *controller)
Definition: scriptInterfaceHandler.h:30
A locally simulated VRF object.
Definition: localObject.h:98
READ ME!
Definition: scriptReactiveTaskController.h:52

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)