I've used Dictionary<string, System.Object> in other projects, only problem is a cast is needed to use the object on retrieval. That can be inferred from the name or using the "is" keyword in C#.<br><br>
<div class="gmail_quote">On Thu, Jul 29, 2010 at 8:54 AM, Justin Clark-Casey <span dir="ltr"><<a href="mailto:jjustincc@googlemail.com">jjustincc@googlemail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">On 29/07/10 01:40, Dahlia Trimble wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Similar to the OSDMap in libomv?<br>
</blockquote>
<br></div>
Not dissimilar, though the in-memory maps in OpenSim would need to hold arbitrary data types. We couldn't use OSDMap directly unless we were happy to serialize objects to and from OSD for every get and set (or change the values directly in the OSD representation, which might be an idea).<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">
<br>
<br>
On Wed, Jul 28, 2010 at 2:39 PM, Justin Clark-Casey<br></div><div><div></div><div class="h5">
<<a href="mailto:jjustincc@googlemail.com" target="_blank">jjustincc@googlemail.com</a> <mailto:<a href="mailto:jjustincc@googlemail.com" target="_blank">jjustincc@googlemail.com</a>>> wrote:<br>
<br>
Hi there. Whilst implementing media-on-a-prim, I've been keeping as<br>
much code in the MOAP region module as possible.<br>
<br>
I'm quite impressed with how feasible this is. However, there<br>
remain three major structures where the core of OpenSim has to<br>
understand something about media on a prim.<br>
<br>
1) Database plugins - to get/put values to named database columns<br>
(e.g. prims.MediaURL).<br>
2) Script functions (e.g. llGetPrimMediaParams()).<br>
3) Scene objects (PrimitiveBaseShape.Media and<br>
SceneObjectPart.MediaURL).<br>
<br>
It's difficult to do anything right now about (1) and (2), but I<br>
believe there is an opportunity to address (3).<br>
<br>
What I would like to do is introduce dictionaries into<br>
PrimitiveBaseShape and SceneObjectPart that would supplement<br>
existing fields by storing arbitrary key/value pairs. So instead of<br>
having to hardcode a new MediaURL property on SceneObjectPart I<br>
could instead get/put the data as something like<br>
SceneObjectPart.Values["MediaURL"].<br>
<br>
Thus, the dictionaries can act as blackboards for communication<br>
between plugins and modules without the core of OpenSim having to<br>
get involved. I think that this would move us a tiny way towards<br>
our vision of being a generic virtual environment platform and away<br>
from hardcoded Second Life specifics, and make it easier to write<br>
more ambitious region modules without additions to core.<br>
<br>
Thoughts?<br>
<br>
--<br>
Justin Clark-Casey (justincc)<br>
<a href="http://justincc.org" target="_blank">http://justincc.org</a><br>
<a href="http://twitter.com/justincc" target="_blank">http://twitter.com/justincc</a><br>
_______________________________________________<br>
Opensim-dev mailing list<br></div></div>
<a href="mailto:Opensim-dev@lists.berlios.de" target="_blank">Opensim-dev@lists.berlios.de</a> <mailto:<a href="mailto:Opensim-dev@lists.berlios.de" target="_blank">Opensim-dev@lists.berlios.de</a>><div class="im">
<br>
<a href="https://lists.berlios.de/mailman/listinfo/opensim-dev" target="_blank">https://lists.berlios.de/mailman/listinfo/opensim-dev</a><br>
<br>
<br>
<br>
<br>
_______________________________________________<br>
Opensim-dev mailing list<br>
<a href="mailto:Opensim-dev@lists.berlios.de" target="_blank">Opensim-dev@lists.berlios.de</a><br>
<a href="https://lists.berlios.de/mailman/listinfo/opensim-dev" target="_blank">https://lists.berlios.de/mailman/listinfo/opensim-dev</a><br>
</div></blockquote><div><div></div><div class="h5">
<br>
<br>
-- <br>
Justin Clark-Casey (justincc)<br>
<a href="http://justincc.org" target="_blank">http://justincc.org</a><br>
<a href="http://twitter.com/justincc" target="_blank">http://twitter.com/justincc</a><br>
_______________________________________________<br>
Opensim-dev mailing list<br>
<a href="mailto:Opensim-dev@lists.berlios.de" target="_blank">Opensim-dev@lists.berlios.de</a><br>
<a href="https://lists.berlios.de/mailman/listinfo/opensim-dev" target="_blank">https://lists.berlios.de/mailman/listinfo/opensim-dev</a><br>
</div></div></blockquote></div><br>