VR-Forces 5.0.1 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 
10 #include <boost/shared_ptr.hpp>
12 #include <map>
13 #include <vlutil/vlString.h>
14 
15 class DtLocalObject;
16 class DtScriptInterface;
18 
20 {
21 public:
23  virtual ~DtScriptInterfaceHandler();
24 
25  virtual bool init();
26 
27  virtual void tick();
28 
29  virtual DtLocalObject* entity() { return myEntity; }
30 
31  virtual void setReactiveTaskController(DtScriptReactiveTaskController* controller) { myReactiveTaskController = controller; }
32 
33  virtual bool shouldResumeScriptInterface(const DtSimTaskMessageType& scriptId);
34  virtual void notifySuspend(const DtSimTaskMessageType& scriptId, int taskId);
35  virtual void notifyResume(const DtSimTaskMessageType& scriptId, int taskId);
36  virtual void notifyScriptError(const DtSimTaskMessageType& scriptId, int taskId);
37 
38  virtual boost::shared_ptr<DtScriptInterface> createScriptInterface(const DtGenericMessageType& scriptId);
39  virtual void releaseScriptInterface(const DtGenericMessageType& scriptId, int taskId, boost::shared_ptr<DtScriptInterface> iFace);
40  virtual bool passScriptInterface(const DtGenericMessageType& scriptId, boost::shared_ptr<DtScriptInterface> iFace);
41 
42  virtual void removeScriptInterfacePass(const DtGenericMessageType& scriptId);
43 
44 protected:
46 
47  std::map<DtGenericMessageType, boost::shared_ptr<DtScriptInterface> > myPassingScriptInterfaces;
48  std::map<DtGenericMessageType, boost::shared_ptr<DtScriptInterface> > myReturningScriptInterfaces;
50 };
Definition: scriptInterfaceHandler.h:19
DtScriptReactiveTaskController * myReactiveTaskController
Definition: scriptInterfaceHandler.h:45
DtLocalObject * myEntity
Definition: scriptInterfaceHandler.h:49
virtual DtLocalObject * entity()
Definition: scriptInterfaceHandler.h:29
std::map< DtGenericMessageType, boost::shared_ptr< DtScriptInterface > > myReturningScriptInterfaces
Definition: scriptInterfaceHandler.h:48
#define DT_DLL_vrfobjcore
This file is used to determine how to build.
Definition: vrfobjcoreDefines.h:24
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:31
std::map< DtGenericMessageType, boost::shared_ptr< DtScriptInterface > > myPassingScriptInterfaces
Definition: scriptInterfaceHandler.h:47
virtual void setReactiveTaskController(DtScriptReactiveTaskController *controller)
Definition: scriptInterfaceHandler.h:31
A locally simulated VRF object. Holds all internal and external data for the object, and provides access to both the current frame and next frame state data for the object. All current frame data is read-only, and next-frame data can be written to. No thread safety guarantees are made on this object during the simulation frame and it should only be accessed by the thread that is simulating the object.
Definition: localObject.h:86
READ ME!
Definition: scriptReactiveTaskController.h:53

Document ID: Generated on Mon Jun 20 00:38:30 EDT 2022 from SVN revision 244029
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)