diff options
author | Sean Dague | 2009-02-26 22:54:50 +0000 |
---|---|---|
committer | Sean Dague | 2009-02-26 22:54:50 +0000 |
commit | cddaaf3e13fdadf473bd8fd63e37c4805b48dde8 (patch) | |
tree | 83132771fc3890abddc997b119c631235b1de366 /OpenSim/Framework | |
parent | Added IRegionCreator interface that all ApplicationPlugins that are creators ... (diff) | |
download | opensim-SC_OLD-cddaaf3e13fdadf473bd8fd63e37c4805b48dde8.zip opensim-SC_OLD-cddaaf3e13fdadf473bd8fd63e37c4805b48dde8.tar.gz opensim-SC_OLD-cddaaf3e13fdadf473bd8fd63e37c4805b48dde8.tar.bz2 opensim-SC_OLD-cddaaf3e13fdadf473bd8fd63e37c4805b48dde8.tar.xz |
svn attribute fixes so that we can play nice between windows and linux
Diffstat (limited to 'OpenSim/Framework')
-rw-r--r-- | OpenSim/Framework/IRegionCreator.cs | 24 | ||||
-rw-r--r-- | OpenSim/Framework/IRegistryCore.cs | 32 | ||||
-rw-r--r-- | OpenSim/Framework/RegistryCore.cs | 108 |
3 files changed, 82 insertions, 82 deletions
diff --git a/OpenSim/Framework/IRegionCreator.cs b/OpenSim/Framework/IRegionCreator.cs index 7920ee4..0da5c0f 100644 --- a/OpenSim/Framework/IRegionCreator.cs +++ b/OpenSim/Framework/IRegionCreator.cs | |||
@@ -1,12 +1,12 @@ | |||
1 | using System; | 1 | using System; |
2 | using System.Collections.Generic; | 2 | using System.Collections.Generic; |
3 | using System.Text; | 3 | using System.Text; |
4 | 4 | ||
5 | namespace OpenSim.Framework | 5 | namespace OpenSim.Framework |
6 | { | 6 | { |
7 | public delegate void NewRegionCreated(IScene scene); | 7 | public delegate void NewRegionCreated(IScene scene); |
8 | public interface IRegionCreator | 8 | public interface IRegionCreator |
9 | { | 9 | { |
10 | event NewRegionCreated OnNewRegionCreated; | 10 | event NewRegionCreated OnNewRegionCreated; |
11 | } | 11 | } |
12 | } | 12 | } |
diff --git a/OpenSim/Framework/IRegistryCore.cs b/OpenSim/Framework/IRegistryCore.cs index 9f251c5..be7e1e6 100644 --- a/OpenSim/Framework/IRegistryCore.cs +++ b/OpenSim/Framework/IRegistryCore.cs | |||
@@ -1,16 +1,16 @@ | |||
1 | using System; | 1 | using System; |
2 | using System.Collections.Generic; | 2 | using System.Collections.Generic; |
3 | using System.Text; | 3 | using System.Text; |
4 | 4 | ||
5 | namespace OpenSim.Framework | 5 | namespace OpenSim.Framework |
6 | { | 6 | { |
7 | public interface IRegistryCore | 7 | public interface IRegistryCore |
8 | { | 8 | { |
9 | T Get<T>(); | 9 | T Get<T>(); |
10 | void RegisterInterface<T>(T iface); | 10 | void RegisterInterface<T>(T iface); |
11 | bool TryGet<T>(out T iface); | 11 | bool TryGet<T>(out T iface); |
12 | 12 | ||
13 | void StackModuleInterface<M>(M mod); | 13 | void StackModuleInterface<M>(M mod); |
14 | T[] RequestModuleInterfaces<T>(); | 14 | T[] RequestModuleInterfaces<T>(); |
15 | } | 15 | } |
16 | } | 16 | } |
diff --git a/OpenSim/Framework/RegistryCore.cs b/OpenSim/Framework/RegistryCore.cs index ee15845..08d343a 100644 --- a/OpenSim/Framework/RegistryCore.cs +++ b/OpenSim/Framework/RegistryCore.cs | |||
@@ -1,54 +1,54 @@ | |||
1 | using System; | 1 | using System; |
2 | using System.Collections.Generic; | 2 | using System.Collections.Generic; |
3 | using System.Text; | 3 | using System.Text; |
4 | 4 | ||
5 | namespace OpenSim.Framework | 5 | namespace OpenSim.Framework |
6 | { | 6 | { |
7 | public class RegistryCore : IRegistryCore | 7 | public class RegistryCore : IRegistryCore |
8 | { | 8 | { |
9 | protected Dictionary<Type, object> m_moduleInterfaces = new Dictionary<Type, object>(); | 9 | protected Dictionary<Type, object> m_moduleInterfaces = new Dictionary<Type, object>(); |
10 | 10 | ||
11 | /// <summary> | 11 | /// <summary> |
12 | /// Register an Module interface. | 12 | /// Register an Module interface. |
13 | /// </summary> | 13 | /// </summary> |
14 | /// <typeparam name="T"></typeparam> | 14 | /// <typeparam name="T"></typeparam> |
15 | /// <param name="iface"></param> | 15 | /// <param name="iface"></param> |
16 | public void RegisterInterface<T>(T iface) | 16 | public void RegisterInterface<T>(T iface) |
17 | { | 17 | { |
18 | lock (m_moduleInterfaces) | 18 | lock (m_moduleInterfaces) |
19 | { | 19 | { |
20 | if (!m_moduleInterfaces.ContainsKey(typeof(T))) | 20 | if (!m_moduleInterfaces.ContainsKey(typeof(T))) |
21 | { | 21 | { |
22 | m_moduleInterfaces.Add(typeof(T), iface); | 22 | m_moduleInterfaces.Add(typeof(T), iface); |
23 | } | 23 | } |
24 | } | 24 | } |
25 | } | 25 | } |
26 | 26 | ||
27 | public bool TryGet<T>(out T iface) | 27 | public bool TryGet<T>(out T iface) |
28 | { | 28 | { |
29 | if (m_moduleInterfaces.ContainsKey(typeof(T))) | 29 | if (m_moduleInterfaces.ContainsKey(typeof(T))) |
30 | { | 30 | { |
31 | iface = (T)m_moduleInterfaces[typeof(T)]; | 31 | iface = (T)m_moduleInterfaces[typeof(T)]; |
32 | return true; | 32 | return true; |
33 | } | 33 | } |
34 | iface = default(T); | 34 | iface = default(T); |
35 | return false; | 35 | return false; |
36 | } | 36 | } |
37 | 37 | ||
38 | public T Get<T>() | 38 | public T Get<T>() |
39 | { | 39 | { |
40 | return (T)m_moduleInterfaces[typeof(T)]; | 40 | return (T)m_moduleInterfaces[typeof(T)]; |
41 | } | 41 | } |
42 | 42 | ||
43 | public void StackModuleInterface<M>(M mod) | 43 | public void StackModuleInterface<M>(M mod) |
44 | { | 44 | { |
45 | 45 | ||
46 | } | 46 | } |
47 | 47 | ||
48 | public T[] RequestModuleInterfaces<T>() | 48 | public T[] RequestModuleInterfaces<T>() |
49 | { | 49 | { |
50 | return new T[] { default(T) }; | 50 | return new T[] { default(T) }; |
51 | } | 51 | } |
52 | 52 | ||
53 | } | 53 | } |
54 | } | 54 | } |