aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Data/OpenSimDataReader.cs
diff options
context:
space:
mode:
authorlbsa712008-01-14 22:34:19 +0000
committerlbsa712008-01-14 22:34:19 +0000
commit6d751411b7f996c486052c8cbbdbe1e186cebd9f (patch)
treeeb7a0a101695e85cefb3a8f0ed540d402caedc63 /OpenSim/Framework/Data/OpenSimDataReader.cs
parentmy Exists check was slow and wrong. This fixes issues people (diff)
downloadopensim-SC-6d751411b7f996c486052c8cbbdbe1e186cebd9f.zip
opensim-SC-6d751411b7f996c486052c8cbbdbe1e186cebd9f.tar.gz
opensim-SC-6d751411b7f996c486052c8cbbdbe1e186cebd9f.tar.bz2
opensim-SC-6d751411b7f996c486052c8cbbdbe1e186cebd9f.tar.xz
* Added specialization of DatabaseMapper, DataReader and ObjectFieldMapper to support LLVector3, LLQuaternion and LLUUID
* Added PrimitiveBaseShapeTableMapper to show how it's done NOTE: Nothing actually works yet - this code should be considered more of educational value until it's all wired together
Diffstat (limited to 'OpenSim/Framework/Data/OpenSimDataReader.cs')
-rw-r--r--OpenSim/Framework/Data/OpenSimDataReader.cs39
1 files changed, 39 insertions, 0 deletions
diff --git a/OpenSim/Framework/Data/OpenSimDataReader.cs b/OpenSim/Framework/Data/OpenSimDataReader.cs
new file mode 100644
index 0000000..225df60
--- /dev/null
+++ b/OpenSim/Framework/Data/OpenSimDataReader.cs
@@ -0,0 +1,39 @@
1using System;
2using System.Collections.Generic;
3using System.Data;
4using System.Text;
5using libsecondlife;
6using TribalMedia.Framework.Data;
7
8namespace OpenSim.Framework.Data
9{
10 public class OpenSimDataReader : DataReader
11 {
12 public OpenSimDataReader(IDataReader source) : base(source)
13 {
14 }
15
16 public LLVector3 GetVector(string s)
17 {
18 float x = GetFloat(s + "X");
19 float y = GetFloat(s + "Y");
20 float z = GetFloat(s + "Z");
21
22 LLVector3 vector = new LLVector3(x, y, z);
23
24 return vector;
25 }
26
27 public LLQuaternion GetQuaternion(string s)
28 {
29 float x = GetFloat(s + "X");
30 float y = GetFloat(s + "Y");
31 float z = GetFloat(s + "Z");
32 float w = GetFloat(s + "W");
33
34 LLQuaternion quaternion = new LLQuaternion(x, y, z, w);
35
36 return quaternion;
37 }
38 }
39}