diff options
author | Justin Clark-Casey (justincc) | 2013-06-27 23:14:28 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2013-06-27 23:14:28 +0100 |
commit | f7d09b898ad6df32b3f07cb64657623980178c2f (patch) | |
tree | f7f2b1117e9843267dab89993ad6d5492c1b3cc8 /OpenSim/Framework/DOMap.cs | |
parent | Update temporary "Unknown UserUMMTGUN2" name to "Unknown UserUMMTGUN3" to see... (diff) | |
download | opensim-SC-f7d09b898ad6df32b3f07cb64657623980178c2f.zip opensim-SC-f7d09b898ad6df32b3f07cb64657623980178c2f.tar.gz opensim-SC-f7d09b898ad6df32b3f07cb64657623980178c2f.tar.bz2 opensim-SC-f7d09b898ad6df32b3f07cb64657623980178c2f.tar.xz |
Make the concept of namespaces explicit in dynamic attributes
This is in order to reduce the likelihood of naming clashes, make it easier to filter in/out attributes, ensure uniformity, etc.
All dynattrs in the opensim distro itself or likely future ones should be in the "OpenSim" namespace.
This does alter the underlying dynattrs data structure. All data in previous structures may not be available, though old structures should not cause errors.
This is done without notice since this feature has been explicitly labelled as experimental, subject to change and has not been in a release.
However, existing materials data is being preserved by moving it to the "Materials" store in the "OpenSim" namespace.
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Framework/DOMap.cs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/OpenSim/Framework/DOMap.cs b/OpenSim/Framework/DOMap.cs index 755e129..f5b650b 100644 --- a/OpenSim/Framework/DOMap.cs +++ b/OpenSim/Framework/DOMap.cs | |||
@@ -42,22 +42,22 @@ namespace OpenSim.Framework | |||
42 | /// This class stores and retrieves dynamic objects. | 42 | /// This class stores and retrieves dynamic objects. |
43 | /// </summary> | 43 | /// </summary> |
44 | /// <remarks> | 44 | /// <remarks> |
45 | /// Experimental - DO NOT USE. | 45 | /// Experimental - DO NOT USE. Does not yet have namespace support. |
46 | /// </remarks> | 46 | /// </remarks> |
47 | public class DOMap | 47 | public class DOMap |
48 | { | 48 | { |
49 | private IDictionary<string, object> m_map; | 49 | private IDictionary<string, object> m_map; |
50 | 50 | ||
51 | public void Add(string key, object dynObj) | 51 | public void Add(string ns, string objName, object dynObj) |
52 | { | 52 | { |
53 | DAMap.ValidateKey(key); | 53 | DAMap.ValidateNamespace(ns); |
54 | 54 | ||
55 | lock (this) | 55 | lock (this) |
56 | { | 56 | { |
57 | if (m_map == null) | 57 | if (m_map == null) |
58 | m_map = new Dictionary<string, object>(); | 58 | m_map = new Dictionary<string, object>(); |
59 | 59 | ||
60 | m_map.Add(key, dynObj); | 60 | m_map.Add(objName, dynObj); |
61 | } | 61 | } |
62 | } | 62 | } |
63 | 63 | ||