Pol  Revision:cb584c9
scrsched.h
Go to the documentation of this file.
1 
7 #ifndef __SCRSCHED_H
8 #define __SCRSCHED_H
9 
10 #include <list>
11 #include <set>
12 
13 #include "../clib/refptr.h"
14 #include "polclock.h"
15 
16 namespace Pol
17 {
18 namespace Bscript
19 {
20 class BObjectImp;
21 class EScriptProgram;
22 }
23 namespace Module
24 {
25 class UOExecutorModule;
26 }
27 namespace Core
28 {
29 class ScriptDef;
30 class UOExecutor;
31 
32 void step_scripts( polclock_t* clocksleft, bool* pactivity );
33 void start_script( const char* filename, Bscript::BObjectImp* param0,
34  Bscript::BObjectImp* param1 = nullptr );
35 
36 Module::UOExecutorModule* start_script( const ScriptDef& script, Bscript::BObjectImp* param );
37 Module::UOExecutorModule* start_script( const ScriptDef& script, Bscript::BObjectImp* param0,
38  Bscript::BObjectImp* param1,
39  Bscript::BObjectImp* param2 = nullptr,
40  Bscript::BObjectImp* param3 = nullptr );
41 Module::UOExecutorModule* start_script( ref_ptr<Bscript::EScriptProgram> program,
42  Bscript::BObjectImp* param );
43 
45 
46 UOExecutor* create_script_executor();
47 UOExecutor* create_full_script_executor();
48 
49 void schedule_executor( UOExecutor* ex );
50 void deschedule_executor( UOExecutor* ex );
51 
52 Bscript::BObjectImp* run_executor_to_completion( UOExecutor& ex, const ScriptDef& script );
53 
54 bool run_script_to_completion( const char* filename, Bscript::BObjectImp* parameter );
55 bool run_script_to_completion( const char* filename );
56 
57 Bscript::BObjectImp* run_script_to_completion( const ScriptDef& script );
58 Bscript::BObjectImp* run_script_to_completion( const ScriptDef& script,
59  Bscript::BObjectImp* param1 );
60 Bscript::BObjectImp* run_script_to_completion( const ScriptDef& script, Bscript::BObjectImp* param1,
61  Bscript::BObjectImp* param2 );
62 Bscript::BObjectImp* run_script_to_completion( const ScriptDef& script, Bscript::BObjectImp* param1,
63  Bscript::BObjectImp* param2,
64  Bscript::BObjectImp* param3 );
65 Bscript::BObjectImp* run_script_to_completion( const ScriptDef& script, Bscript::BObjectImp* param1,
66  Bscript::BObjectImp* param2,
67  Bscript::BObjectImp* param3,
68  Bscript::BObjectImp* param4 );
69 Bscript::BObjectImp* run_script_to_completion( const ScriptDef& script, Bscript::BObjectImp* param1,
70  Bscript::BObjectImp* param2,
71  Bscript::BObjectImp* param3,
72  Bscript::BObjectImp* param4,
73  Bscript::BObjectImp* param5 );
74 Bscript::BObjectImp* run_script_to_completion( const ScriptDef& script, Bscript::BObjectImp* param1,
75  Bscript::BObjectImp* param2,
76  Bscript::BObjectImp* param3,
77  Bscript::BObjectImp* param4,
78  Bscript::BObjectImp* param5,
79  Bscript::BObjectImp* param6 );
80 
81 bool call_script( const ScriptDef& script, // throw()
82  Bscript::BObjectImp* param1 );
83 bool call_script( const ScriptDef& script, Bscript::BObjectImp* param1,
84  Bscript::BObjectImp* param2 ); // throw()
85 bool call_script( const ScriptDef& script, Bscript::BObjectImp* param1, Bscript::BObjectImp* param2,
86  Bscript::BObjectImp* param3 ); // throw()
87 bool call_script( const ScriptDef& script, Bscript::BObjectImp* param1, Bscript::BObjectImp* param2,
88  Bscript::BObjectImp* param3, Bscript::BObjectImp* param4 );
89 bool call_script( const ScriptDef& script, Bscript::BObjectImp* param1, Bscript::BObjectImp* param2,
90  Bscript::BObjectImp* param3, Bscript::BObjectImp* param4,
91  Bscript::BObjectImp* param5 );
92 bool call_script( const ScriptDef& script, Bscript::BObjectImp* param1, Bscript::BObjectImp* param2,
93  Bscript::BObjectImp* param3, Bscript::BObjectImp* param4,
94  Bscript::BObjectImp* param5, Bscript::BObjectImp* param6 );
95 bool call_script( const ScriptDef& script, Bscript::BObjectImp* param1, Bscript::BObjectImp* param2,
96  Bscript::BObjectImp* param3, Bscript::BObjectImp* param4,
97  Bscript::BObjectImp* param5, Bscript::BObjectImp* param6,
98  Bscript::BObjectImp* param7 );
99 
100 bool find_uoexec( unsigned int pid, UOExecutor** pp_uoexec );
101 }
102 }
103 #endif
bool find_uoexec(unsigned int pid, UOExecutor **pp_uoexec)
Definition: scrsched.cpp:60
void deschedule_executor(UOExecutor *ex)
u64 pid
Definition: osmod.cpp:945
bool call_script(const ScriptDef &script, Bscript::BObjectImp *param0)
Definition: scrsched.cpp:546
UOExecutor * create_full_script_executor()
Definition: scrsched.cpp:653
UOExecutor * create_script_executor()
Definition: scrsched.cpp:644
polclock_t calc_script_clocksleft(polclock_t now)
Definition: scrsched.cpp:111
int polclock_t
Definition: polclock.h:26
void step_scripts(polclock_t *clocksleft, bool *pactivity)
Definition: scrsched.cpp:133
bool run_script_to_completion(const char *filename, Bscript::BObjectImp *parameter)
Definition: scrsched.cpp:333
void schedule_executor(UOExecutor *ex)
Definition: scrsched.cpp:662
void start_script(const char *filename, Bscript::BObjectImp *param0, Bscript::BObjectImp *param1)
Definition: scrsched.cpp:150
Definition: berror.cpp:12
BObjectImp * run_executor_to_completion(UOExecutor &ex, const ScriptDef &script)
Definition: scrsched.cpp:367