diff options
author | Tedd Hansen | 2008-01-12 14:45:59 +0000 |
---|---|---|
committer | Tedd Hansen | 2008-01-12 14:45:59 +0000 |
commit | 0081c060d0bb66e842a381e1a15a6cf01c0bd793 (patch) | |
tree | 19a02716e74838a6a7856a265cdc2319feb136b7 /OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/ScriptEngine.cs | |
parent | Added license to new files (diff) | |
download | opensim-SC-0081c060d0bb66e842a381e1a15a6cf01c0bd793.zip opensim-SC-0081c060d0bb66e842a381e1a15a6cf01c0bd793.tar.gz opensim-SC-0081c060d0bb66e842a381e1a15a6cf01c0bd793.tar.bz2 opensim-SC-0081c060d0bb66e842a381e1a15a6cf01c0bd793.tar.xz |
Set eol
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/ScriptEngine.cs')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/ScriptEngine.cs | 262 |
1 files changed, 131 insertions, 131 deletions
diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/ScriptEngine.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/ScriptEngine.cs index 39d0bc3..da0baba 100644 --- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/ScriptEngine.cs +++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/ScriptEngine.cs | |||
@@ -1,132 +1,132 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) Contributors, http://opensimulator.org/ | 2 | * Copyright (c) Contributors, http://opensimulator.org/ |
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | 3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. |
4 | * | 4 | * |
5 | * Redistribution and use in source and binary forms, with or without | 5 | * Redistribution and use in source and binary forms, with or without |
6 | * modification, are permitted provided that the following conditions are met: | 6 | * modification, are permitted provided that the following conditions are met: |
7 | * * Redistributions of source code must retain the above copyright | 7 | * * Redistributions of source code must retain the above copyright |
8 | * notice, this list of conditions and the following disclaimer. | 8 | * notice, this list of conditions and the following disclaimer. |
9 | * * Redistributions in binary form must reproduce the above copyright | 9 | * * Redistributions in binary form must reproduce the above copyright |
10 | * notice, this list of conditions and the following disclaimer in the | 10 | * notice, this list of conditions and the following disclaimer in the |
11 | * documentation and/or other materials provided with the distribution. | 11 | * documentation and/or other materials provided with the distribution. |
12 | * * Neither the name of the OpenSim Project nor the | 12 | * * Neither the name of the OpenSim Project nor the |
13 | * names of its contributors may be used to endorse or promote products | 13 | * names of its contributors may be used to endorse or promote products |
14 | * derived from this software without specific prior written permission. | 14 | * derived from this software without specific prior written permission. |
15 | * | 15 | * |
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS AS IS AND ANY | 16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS AS IS AND ANY |
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | 17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | 18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | 19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY |
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | 20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES |
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | 21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; |
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | 22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND |
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | 24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS |
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
26 | * | 26 | * |
27 | */ | 27 | */ |
28 | 28 | ||
29 | 29 | ||
30 | using System; | 30 | using System; |
31 | using Nini.Config; | 31 | using Nini.Config; |
32 | using OpenSim.Framework.Console; | 32 | using OpenSim.Framework.Console; |
33 | using OpenSim.Region.Environment.Interfaces; | 33 | using OpenSim.Region.Environment.Interfaces; |
34 | using OpenSim.Region.Environment.Scenes; | 34 | using OpenSim.Region.Environment.Scenes; |
35 | using OpenSim.Region.ScriptEngine.Common; | 35 | using OpenSim.Region.ScriptEngine.Common; |
36 | using OpenSim.Region.ScriptEngine.Common.ScriptEngineBase; | 36 | using OpenSim.Region.ScriptEngine.Common.ScriptEngineBase; |
37 | 37 | ||
38 | namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase | 38 | namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase |
39 | { | 39 | { |
40 | /// <summary> | 40 | /// <summary> |
41 | /// This is the root object for ScriptEngine. Objects access each other trough this class. | 41 | /// This is the root object for ScriptEngine. Objects access each other trough this class. |
42 | /// </summary> | 42 | /// </summary> |
43 | /// | 43 | /// |
44 | [Serializable] | 44 | [Serializable] |
45 | public abstract class ScriptEngine : IRegionModule, OpenSim.Region.ScriptEngine.Common.ScriptServerInterfaces.ScriptEngine | 45 | public abstract class ScriptEngine : IRegionModule, OpenSim.Region.ScriptEngine.Common.ScriptServerInterfaces.ScriptEngine |
46 | { | 46 | { |
47 | public Scene World; | 47 | public Scene World; |
48 | public EventManager m_EventManager; // Handles and queues incoming events from OpenSim | 48 | public EventManager m_EventManager; // Handles and queues incoming events from OpenSim |
49 | public EventQueueManager m_EventQueueManager; // Executes events | 49 | public EventQueueManager m_EventQueueManager; // Executes events |
50 | public ScriptManager m_ScriptManager; // Load, unload and execute scripts | 50 | public ScriptManager m_ScriptManager; // Load, unload and execute scripts |
51 | public AppDomainManager m_AppDomainManager; | 51 | public AppDomainManager m_AppDomainManager; |
52 | public LSLLongCmdHandler m_LSLLongCmdHandler; | 52 | public LSLLongCmdHandler m_LSLLongCmdHandler; |
53 | 53 | ||
54 | public ScriptManager GetScriptManager() | 54 | public ScriptManager GetScriptManager() |
55 | { | 55 | { |
56 | return _GetScriptManager(); | 56 | return _GetScriptManager(); |
57 | } | 57 | } |
58 | public abstract ScriptManager _GetScriptManager(); | 58 | public abstract ScriptManager _GetScriptManager(); |
59 | 59 | ||
60 | private LogBase m_log; | 60 | private LogBase m_log; |
61 | 61 | ||
62 | public ScriptEngine() | 62 | public ScriptEngine() |
63 | { | 63 | { |
64 | //Common.SendToDebug("ScriptEngine Object Initialized"); | 64 | //Common.SendToDebug("ScriptEngine Object Initialized"); |
65 | Common.mySE = this; | 65 | Common.mySE = this; |
66 | } | 66 | } |
67 | 67 | ||
68 | public LogBase Log | 68 | public LogBase Log |
69 | { | 69 | { |
70 | get { return m_log; } | 70 | get { return m_log; } |
71 | } | 71 | } |
72 | 72 | ||
73 | public void InitializeEngine(Scene Sceneworld, LogBase logger, bool HookUpToServer, ScriptManager newScriptManager) | 73 | public void InitializeEngine(Scene Sceneworld, LogBase logger, bool HookUpToServer, ScriptManager newScriptManager) |
74 | { | 74 | { |
75 | World = Sceneworld; | 75 | World = Sceneworld; |
76 | m_log = logger; | 76 | m_log = logger; |
77 | 77 | ||
78 | Log.Verbose("ScriptEngine", "DotNet & LSL ScriptEngine initializing"); | 78 | Log.Verbose("ScriptEngine", "DotNet & LSL ScriptEngine initializing"); |
79 | 79 | ||
80 | //m_logger.Status("ScriptEngine", "InitializeEngine"); | 80 | //m_logger.Status("ScriptEngine", "InitializeEngine"); |
81 | 81 | ||
82 | // Create all objects we'll be using | 82 | // Create all objects we'll be using |
83 | m_EventQueueManager = new EventQueueManager(this); | 83 | m_EventQueueManager = new EventQueueManager(this); |
84 | m_EventManager = new EventManager(this, HookUpToServer); | 84 | m_EventManager = new EventManager(this, HookUpToServer); |
85 | m_ScriptManager = newScriptManager; | 85 | m_ScriptManager = newScriptManager; |
86 | //m_ScriptManager = new ScriptManager(this); | 86 | //m_ScriptManager = new ScriptManager(this); |
87 | m_AppDomainManager = new AppDomainManager(); | 87 | m_AppDomainManager = new AppDomainManager(); |
88 | m_LSLLongCmdHandler = new LSLLongCmdHandler(this); | 88 | m_LSLLongCmdHandler = new LSLLongCmdHandler(this); |
89 | 89 | ||
90 | // Should we iterate the region for scripts that needs starting? | 90 | // Should we iterate the region for scripts that needs starting? |
91 | // Or can we assume we are loaded before anything else so we can use proper events? | 91 | // Or can we assume we are loaded before anything else so we can use proper events? |
92 | } | 92 | } |
93 | 93 | ||
94 | public void Shutdown() | 94 | public void Shutdown() |
95 | { | 95 | { |
96 | // We are shutting down | 96 | // We are shutting down |
97 | } | 97 | } |
98 | 98 | ||
99 | ScriptServerInterfaces.RemoteEvents ScriptServerInterfaces.ScriptEngine.EventManager() | 99 | ScriptServerInterfaces.RemoteEvents ScriptServerInterfaces.ScriptEngine.EventManager() |
100 | { | 100 | { |
101 | return this.m_EventManager; | 101 | return this.m_EventManager; |
102 | } | 102 | } |
103 | 103 | ||
104 | 104 | ||
105 | #region IRegionModule | 105 | #region IRegionModule |
106 | 106 | ||
107 | public abstract void Initialise(Scene scene, IConfigSource config); | 107 | public abstract void Initialise(Scene scene, IConfigSource config); |
108 | 108 | ||
109 | public void PostInitialise() | 109 | public void PostInitialise() |
110 | { | 110 | { |
111 | } | 111 | } |
112 | 112 | ||
113 | public void Close() | 113 | public void Close() |
114 | { | 114 | { |
115 | } | 115 | } |
116 | 116 | ||
117 | public string Name | 117 | public string Name |
118 | { | 118 | { |
119 | get { return "DotNetEngine"; } | 119 | get { return "DotNetEngine"; } |
120 | } | 120 | } |
121 | 121 | ||
122 | public bool IsSharedModule | 122 | public bool IsSharedModule |
123 | { | 123 | { |
124 | get { return false; } | 124 | get { return false; } |
125 | } | 125 | } |
126 | 126 | ||
127 | 127 | ||
128 | 128 | ||
129 | #endregion | 129 | #endregion |
130 | 130 | ||
131 | } | 131 | } |
132 | } \ No newline at end of file | 132 | } \ No newline at end of file |