aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Framework')
-rw-r--r--OpenSim/Framework/Data.MySQL/MySQLDatabaseMapper.cs48
-rw-r--r--OpenSim/Framework/Data/OpenSimDataReader.cs78
-rw-r--r--OpenSim/Framework/Data/OpenSimDatabaseMapper.cs46
-rw-r--r--OpenSim/Framework/Data/OpenSimObjectFieldMapper.cs146
-rw-r--r--OpenSim/Framework/Data/PrimitiveBaseShapeTableMapper.cs284
5 files changed, 301 insertions, 301 deletions
diff --git a/OpenSim/Framework/Data.MySQL/MySQLDatabaseMapper.cs b/OpenSim/Framework/Data.MySQL/MySQLDatabaseMapper.cs
index 1514f00..6b23c74 100644
--- a/OpenSim/Framework/Data.MySQL/MySQLDatabaseMapper.cs
+++ b/OpenSim/Framework/Data.MySQL/MySQLDatabaseMapper.cs
@@ -1,24 +1,24 @@
1using System.Data.Common; 1using System.Data.Common;
2using MySql.Data.MySqlClient; 2using MySql.Data.MySqlClient;
3 3
4namespace OpenSim.Framework.Data.MySQL 4namespace OpenSim.Framework.Data.MySQL
5{ 5{
6 public class MySQLDatabaseMapper : OpenSimDatabaseMapper 6 public class MySQLDatabaseMapper : OpenSimDatabaseMapper
7 { 7 {
8 public MySQLDatabaseMapper(string connectionString) 8 public MySQLDatabaseMapper(string connectionString)
9 : base(connectionString) 9 : base(connectionString)
10 { 10 {
11 } 11 }
12 12
13 public override DbConnection GetNewConnection() 13 public override DbConnection GetNewConnection()
14 { 14 {
15 MySqlConnection connection = new MySqlConnection(m_connectionString); 15 MySqlConnection connection = new MySqlConnection(m_connectionString);
16 return connection; 16 return connection;
17 } 17 }
18 18
19 public override string CreateParamName(string fieldName) 19 public override string CreateParamName(string fieldName)
20 { 20 {
21 return "?" + fieldName; 21 return "?" + fieldName;
22 } 22 }
23 } 23 }
24} 24}
diff --git a/OpenSim/Framework/Data/OpenSimDataReader.cs b/OpenSim/Framework/Data/OpenSimDataReader.cs
index 225df60..11a8b8b 100644
--- a/OpenSim/Framework/Data/OpenSimDataReader.cs
+++ b/OpenSim/Framework/Data/OpenSimDataReader.cs
@@ -1,39 +1,39 @@
1using System; 1using System;
2using System.Collections.Generic; 2using System.Collections.Generic;
3using System.Data; 3using System.Data;
4using System.Text; 4using System.Text;
5using libsecondlife; 5using libsecondlife;
6using TribalMedia.Framework.Data; 6using TribalMedia.Framework.Data;
7 7
8namespace OpenSim.Framework.Data 8namespace OpenSim.Framework.Data
9{ 9{
10 public class OpenSimDataReader : DataReader 10 public class OpenSimDataReader : DataReader
11 { 11 {
12 public OpenSimDataReader(IDataReader source) : base(source) 12 public OpenSimDataReader(IDataReader source) : base(source)
13 { 13 {
14 } 14 }
15 15
16 public LLVector3 GetVector(string s) 16 public LLVector3 GetVector(string s)
17 { 17 {
18 float x = GetFloat(s + "X"); 18 float x = GetFloat(s + "X");
19 float y = GetFloat(s + "Y"); 19 float y = GetFloat(s + "Y");
20 float z = GetFloat(s + "Z"); 20 float z = GetFloat(s + "Z");
21 21
22 LLVector3 vector = new LLVector3(x, y, z); 22 LLVector3 vector = new LLVector3(x, y, z);
23 23
24 return vector; 24 return vector;
25 } 25 }
26 26
27 public LLQuaternion GetQuaternion(string s) 27 public LLQuaternion GetQuaternion(string s)
28 { 28 {
29 float x = GetFloat(s + "X"); 29 float x = GetFloat(s + "X");
30 float y = GetFloat(s + "Y"); 30 float y = GetFloat(s + "Y");
31 float z = GetFloat(s + "Z"); 31 float z = GetFloat(s + "Z");
32 float w = GetFloat(s + "W"); 32 float w = GetFloat(s + "W");
33 33
34 LLQuaternion quaternion = new LLQuaternion(x, y, z, w); 34 LLQuaternion quaternion = new LLQuaternion(x, y, z, w);
35 35
36 return quaternion; 36 return quaternion;
37 } 37 }
38 } 38 }
39} 39}
diff --git a/OpenSim/Framework/Data/OpenSimDatabaseMapper.cs b/OpenSim/Framework/Data/OpenSimDatabaseMapper.cs
index 2001110..bb82462 100644
--- a/OpenSim/Framework/Data/OpenSimDatabaseMapper.cs
+++ b/OpenSim/Framework/Data/OpenSimDatabaseMapper.cs
@@ -1,23 +1,23 @@
1using System.Data.Common; 1using System.Data.Common;
2using libsecondlife; 2using libsecondlife;
3using TribalMedia.Framework.Data; 3using TribalMedia.Framework.Data;
4 4
5namespace OpenSim.Framework.Data 5namespace OpenSim.Framework.Data
6{ 6{
7 public abstract class OpenSimDatabaseMapper : DatabaseMapper 7 public abstract class OpenSimDatabaseMapper : DatabaseMapper
8 { 8 {
9 public OpenSimDatabaseMapper(string connectionString) : base(connectionString) 9 public OpenSimDatabaseMapper(string connectionString) : base(connectionString)
10 { 10 {
11 } 11 }
12 12
13 public override object ConvertToDbType(object value) 13 public override object ConvertToDbType(object value)
14 { 14 {
15 if (value is LLUUID) 15 if (value is LLUUID)
16 { 16 {
17 return ((LLUUID) value).UUID.ToString(); 17 return ((LLUUID) value).UUID.ToString();
18 } 18 }
19 19
20 return base.ConvertToDbType(value); 20 return base.ConvertToDbType(value);
21 } 21 }
22 } 22 }
23} 23}
diff --git a/OpenSim/Framework/Data/OpenSimObjectFieldMapper.cs b/OpenSim/Framework/Data/OpenSimObjectFieldMapper.cs
index 2b20a79..b718fe4 100644
--- a/OpenSim/Framework/Data/OpenSimObjectFieldMapper.cs
+++ b/OpenSim/Framework/Data/OpenSimObjectFieldMapper.cs
@@ -1,73 +1,73 @@
1using System; 1using System;
2using System.Collections.Generic; 2using System.Collections.Generic;
3using System.Text; 3using System.Text;
4using libsecondlife; 4using libsecondlife;
5using TribalMedia.Framework.Data; 5using TribalMedia.Framework.Data;
6 6
7namespace OpenSim.Framework.Data 7namespace OpenSim.Framework.Data
8{ 8{
9 public class OpenSimObjectFieldMapper<TObject, TField> : ObjectField<TObject, TField> 9 public class OpenSimObjectFieldMapper<TObject, TField> : ObjectField<TObject, TField>
10 { 10 {
11 public OpenSimObjectFieldMapper(TableMapper tableMapper, string fieldName, 11 public OpenSimObjectFieldMapper(TableMapper tableMapper, string fieldName,
12 ObjectGetAccessor<TObject, TField> rowMapperGetAccessor, 12 ObjectGetAccessor<TObject, TField> rowMapperGetAccessor,
13 ObjectSetAccessor<TObject, TField> rowMapperSetAccessor) 13 ObjectSetAccessor<TObject, TField> rowMapperSetAccessor)
14 : base(tableMapper, fieldName, rowMapperGetAccessor, rowMapperSetAccessor) 14 : base(tableMapper, fieldName, rowMapperGetAccessor, rowMapperSetAccessor)
15 { 15 {
16 } 16 }
17 17
18 public override void ExpandField<TObj>(TObj obj, System.Data.Common.DbCommand command, List<string> fieldNames) 18 public override void ExpandField<TObj>(TObj obj, System.Data.Common.DbCommand command, List<string> fieldNames)
19 { 19 {
20 string fieldName = FieldName; 20 string fieldName = FieldName;
21 object value = GetParamValue(obj); 21 object value = GetParamValue(obj);
22 22
23 if (ValueType == typeof(LLVector3)) 23 if (ValueType == typeof(LLVector3))
24 { 24 {
25 LLVector3 vector = (LLVector3)value; 25 LLVector3 vector = (LLVector3)value;
26 26
27 RawAddParam(command, fieldNames, fieldName + "X", vector.X); 27 RawAddParam(command, fieldNames, fieldName + "X", vector.X);
28 RawAddParam(command, fieldNames, fieldName + "Y", vector.Y); 28 RawAddParam(command, fieldNames, fieldName + "Y", vector.Y);
29 RawAddParam(command, fieldNames, fieldName + "Z", vector.Z); 29 RawAddParam(command, fieldNames, fieldName + "Z", vector.Z);
30 } 30 }
31 else if (ValueType == typeof(LLQuaternion)) 31 else if (ValueType == typeof(LLQuaternion))
32 { 32 {
33 LLQuaternion quaternion = (LLQuaternion)value; 33 LLQuaternion quaternion = (LLQuaternion)value;
34 34
35 RawAddParam(command, fieldNames, fieldName + "X", quaternion.X); 35 RawAddParam(command, fieldNames, fieldName + "X", quaternion.X);
36 RawAddParam(command, fieldNames, fieldName + "Y", quaternion.Y); 36 RawAddParam(command, fieldNames, fieldName + "Y", quaternion.Y);
37 RawAddParam(command, fieldNames, fieldName + "Z", quaternion.Z); 37 RawAddParam(command, fieldNames, fieldName + "Z", quaternion.Z);
38 RawAddParam(command, fieldNames, fieldName + "W", quaternion.W); 38 RawAddParam(command, fieldNames, fieldName + "W", quaternion.W);
39 } 39 }
40 else 40 else
41 { 41 {
42 base.ExpandField<TObj>(obj, command, fieldNames); 42 base.ExpandField<TObj>(obj, command, fieldNames);
43 } 43 }
44 } 44 }
45 45
46 protected override object GetValue(DataReader reader) 46 protected override object GetValue(DataReader reader)
47 { 47 {
48 object value; 48 object value;
49 49
50 OpenSimDataReader osreader = (OpenSimDataReader) reader; 50 OpenSimDataReader osreader = (OpenSimDataReader) reader;
51 51
52 if (ValueType == typeof(LLVector3)) 52 if (ValueType == typeof(LLVector3))
53 { 53 {
54 value = osreader.GetVector(FieldName); 54 value = osreader.GetVector(FieldName);
55 } 55 }
56 else if (ValueType == typeof(LLQuaternion)) 56 else if (ValueType == typeof(LLQuaternion))
57 { 57 {
58 value = osreader.GetQuaternion(FieldName); 58 value = osreader.GetQuaternion(FieldName);
59 } 59 }
60 else if (ValueType == typeof(LLUUID)) 60 else if (ValueType == typeof(LLUUID))
61 { 61 {
62 Guid guid = reader.GetGuid(FieldName); 62 Guid guid = reader.GetGuid(FieldName);
63 value = new LLUUID(guid); 63 value = new LLUUID(guid);
64 } 64 }
65 else 65 else
66 { 66 {
67 value = base.GetValue(reader); 67 value = base.GetValue(reader);
68 } 68 }
69 69
70 return value; 70 return value;
71 } 71 }
72 } 72 }
73} 73}
diff --git a/OpenSim/Framework/Data/PrimitiveBaseShapeTableMapper.cs b/OpenSim/Framework/Data/PrimitiveBaseShapeTableMapper.cs
index 8026373..ab0115e 100644
--- a/OpenSim/Framework/Data/PrimitiveBaseShapeTableMapper.cs
+++ b/OpenSim/Framework/Data/PrimitiveBaseShapeTableMapper.cs
@@ -1,143 +1,143 @@
1using System; 1using System;
2using OpenSim.Framework; 2using OpenSim.Framework;
3using TribalMedia.Framework.Data; 3using TribalMedia.Framework.Data;
4using libsecondlife; 4using libsecondlife;
5 5
6namespace OpenSim.Framework.Data 6namespace OpenSim.Framework.Data
7{ 7{
8 public class PrimitiveBaseShapeRowMapper : RowMapper<PrimitiveBaseShape> 8 public class PrimitiveBaseShapeRowMapper : RowMapper<PrimitiveBaseShape>
9 { 9 {
10 public Guid SceneObjectPartId; 10 public Guid SceneObjectPartId;
11 11
12 public PrimitiveBaseShapeRowMapper(Schema schema, PrimitiveBaseShape obj) : base(schema, obj) 12 public PrimitiveBaseShapeRowMapper(Schema schema, PrimitiveBaseShape obj) : base(schema, obj)
13 { 13 {
14 } 14 }
15 } 15 }
16 16
17 public class PrimitiveBaseShapeTableMapper : ObjectTableMapper<PrimitiveBaseShapeRowMapper, Guid> 17 public class PrimitiveBaseShapeTableMapper : ObjectTableMapper<PrimitiveBaseShapeRowMapper, Guid>
18 { 18 {
19 public PrimitiveBaseShapeTableMapper(DatabaseMapper connection, string tableName) 19 public PrimitiveBaseShapeTableMapper(DatabaseMapper connection, string tableName)
20 : base(connection, tableName) 20 : base(connection, tableName)
21 { 21 {
22 RowMapperSchema<PrimitiveBaseShapeRowMapper> rowMapperSchema = new RowMapperSchema<PrimitiveBaseShapeRowMapper>(this); 22 RowMapperSchema<PrimitiveBaseShapeRowMapper> rowMapperSchema = new RowMapperSchema<PrimitiveBaseShapeRowMapper>(this);
23 m_schema = rowMapperSchema; 23 m_schema = rowMapperSchema;
24 24
25 m_keyFieldMapper = rowMapperSchema.AddMapping<Guid>("SceneObjectPartId", 25 m_keyFieldMapper = rowMapperSchema.AddMapping<Guid>("SceneObjectPartId",
26 delegate(PrimitiveBaseShapeRowMapper shape) { return shape.SceneObjectPartId; }, 26 delegate(PrimitiveBaseShapeRowMapper shape) { return shape.SceneObjectPartId; },
27 delegate(PrimitiveBaseShapeRowMapper shape, Guid value) { shape.SceneObjectPartId = value; }); 27 delegate(PrimitiveBaseShapeRowMapper shape, Guid value) { shape.SceneObjectPartId = value; });
28 28
29 rowMapperSchema.AddMapping<byte>("PCode", 29 rowMapperSchema.AddMapping<byte>("PCode",
30 delegate(PrimitiveBaseShapeRowMapper shape) { return shape.Object.PCode; }, 30 delegate(PrimitiveBaseShapeRowMapper shape) { return shape.Object.PCode; },
31 delegate(PrimitiveBaseShapeRowMapper shape, byte value) { shape.Object.PCode = value; }); 31 delegate(PrimitiveBaseShapeRowMapper shape, byte value) { shape.Object.PCode = value; });
32 32
33 rowMapperSchema.AddMapping<ushort>("PathBegin", 33 rowMapperSchema.AddMapping<ushort>("PathBegin",
34 delegate(PrimitiveBaseShapeRowMapper shape) { return shape.Object.PathBegin; }, 34 delegate(PrimitiveBaseShapeRowMapper shape) { return shape.Object.PathBegin; },
35 delegate(PrimitiveBaseShapeRowMapper shape, ushort value) { shape.Object.PathBegin = value; }); 35 delegate(PrimitiveBaseShapeRowMapper shape, ushort value) { shape.Object.PathBegin = value; });
36 36
37 rowMapperSchema.AddMapping<ushort>("PathEnd", 37 rowMapperSchema.AddMapping<ushort>("PathEnd",
38 delegate(PrimitiveBaseShapeRowMapper shape) { return shape.Object.PathEnd; }, 38 delegate(PrimitiveBaseShapeRowMapper shape) { return shape.Object.PathEnd; },
39 delegate(PrimitiveBaseShapeRowMapper shape, ushort value) { shape.Object.PathEnd = value; }); 39 delegate(PrimitiveBaseShapeRowMapper shape, ushort value) { shape.Object.PathEnd = value; });
40 40
41 rowMapperSchema.AddMapping<byte>("PathScaleX", 41 rowMapperSchema.AddMapping<byte>("PathScaleX",
42 delegate(PrimitiveBaseShapeRowMapper shape) { return shape.Object.PathScaleX; }, 42 delegate(PrimitiveBaseShapeRowMapper shape) { return shape.Object.PathScaleX; },
43 delegate(PrimitiveBaseShapeRowMapper shape, byte value) { shape.Object.PathScaleX = value; }); 43 delegate(PrimitiveBaseShapeRowMapper shape, byte value) { shape.Object.PathScaleX = value; });
44 44
45 rowMapperSchema.AddMapping<byte>("PathScaleY", 45 rowMapperSchema.AddMapping<byte>("PathScaleY",
46 delegate(PrimitiveBaseShapeRowMapper shape) { return shape.Object.PathScaleY; }, 46 delegate(PrimitiveBaseShapeRowMapper shape) { return shape.Object.PathScaleY; },
47 delegate(PrimitiveBaseShapeRowMapper shape, byte value) { shape.Object.PathScaleY = value; }); 47 delegate(PrimitiveBaseShapeRowMapper shape, byte value) { shape.Object.PathScaleY = value; });
48 48
49 rowMapperSchema.AddMapping<byte>("PathShearX", 49 rowMapperSchema.AddMapping<byte>("PathShearX",
50 delegate(PrimitiveBaseShapeRowMapper shape) { return shape.Object.PathShearX; }, 50 delegate(PrimitiveBaseShapeRowMapper shape) { return shape.Object.PathShearX; },
51 delegate(PrimitiveBaseShapeRowMapper shape, byte value) { shape.Object.PathShearX = value; }); 51 delegate(PrimitiveBaseShapeRowMapper shape, byte value) { shape.Object.PathShearX = value; });
52 52
53 rowMapperSchema.AddMapping<byte>("PathShearY", 53 rowMapperSchema.AddMapping<byte>("PathShearY",
54 delegate(PrimitiveBaseShapeRowMapper shape) { return shape.Object.PathShearY; }, 54 delegate(PrimitiveBaseShapeRowMapper shape) { return shape.Object.PathShearY; },
55 delegate(PrimitiveBaseShapeRowMapper shape, byte value) { shape.Object.PathShearY = value; }); 55 delegate(PrimitiveBaseShapeRowMapper shape, byte value) { shape.Object.PathShearY = value; });
56 56
57 rowMapperSchema.AddMapping<ushort>("ProfileBegin", 57 rowMapperSchema.AddMapping<ushort>("ProfileBegin",
58 delegate(PrimitiveBaseShapeRowMapper shape) { return shape.Object.ProfileBegin; }, 58 delegate(PrimitiveBaseShapeRowMapper shape) { return shape.Object.ProfileBegin; },
59 delegate(PrimitiveBaseShapeRowMapper shape, ushort value) { shape.Object.ProfileBegin = value; }); 59 delegate(PrimitiveBaseShapeRowMapper shape, ushort value) { shape.Object.ProfileBegin = value; });
60 60
61 rowMapperSchema.AddMapping<ushort>("ProfileEnd", 61 rowMapperSchema.AddMapping<ushort>("ProfileEnd",
62 delegate(PrimitiveBaseShapeRowMapper shape) { return shape.Object.ProfileEnd; }, 62 delegate(PrimitiveBaseShapeRowMapper shape) { return shape.Object.ProfileEnd; },
63 delegate(PrimitiveBaseShapeRowMapper shape, ushort value) { shape.Object.ProfileEnd = value; }); 63 delegate(PrimitiveBaseShapeRowMapper shape, ushort value) { shape.Object.ProfileEnd = value; });
64 64
65 rowMapperSchema.AddMapping<LLVector3>("Scale", 65 rowMapperSchema.AddMapping<LLVector3>("Scale",
66 delegate(PrimitiveBaseShapeRowMapper shape) { return shape.Object.Scale; }, 66 delegate(PrimitiveBaseShapeRowMapper shape) { return shape.Object.Scale; },
67 delegate(PrimitiveBaseShapeRowMapper shape, LLVector3 value) { shape.Object.Scale = value; }); 67 delegate(PrimitiveBaseShapeRowMapper shape, LLVector3 value) { shape.Object.Scale = value; });
68 68
69 rowMapperSchema.AddMapping<sbyte>("PathTaperX", 69 rowMapperSchema.AddMapping<sbyte>("PathTaperX",
70 delegate(PrimitiveBaseShapeRowMapper shape) { return shape.Object.PathTaperX; }, 70 delegate(PrimitiveBaseShapeRowMapper shape) { return shape.Object.PathTaperX; },
71 delegate(PrimitiveBaseShapeRowMapper shape, sbyte value) { shape.Object.PathTaperX = value; }); 71 delegate(PrimitiveBaseShapeRowMapper shape, sbyte value) { shape.Object.PathTaperX = value; });
72 72
73 rowMapperSchema.AddMapping<sbyte>("PathTaperY", 73 rowMapperSchema.AddMapping<sbyte>("PathTaperY",
74 delegate(PrimitiveBaseShapeRowMapper shape) { return shape.Object.PathTaperY; }, 74 delegate(PrimitiveBaseShapeRowMapper shape) { return shape.Object.PathTaperY; },
75 delegate(PrimitiveBaseShapeRowMapper shape, sbyte value) { shape.Object.PathTaperY = value; }); 75 delegate(PrimitiveBaseShapeRowMapper shape, sbyte value) { shape.Object.PathTaperY = value; });
76 76
77 rowMapperSchema.AddMapping<sbyte>("PathTwist", 77 rowMapperSchema.AddMapping<sbyte>("PathTwist",
78 delegate(PrimitiveBaseShapeRowMapper shape) { return shape.Object.PathTwist; }, 78 delegate(PrimitiveBaseShapeRowMapper shape) { return shape.Object.PathTwist; },
79 delegate(PrimitiveBaseShapeRowMapper shape, sbyte value) { shape.Object.PathTwist = value; }); 79 delegate(PrimitiveBaseShapeRowMapper shape, sbyte value) { shape.Object.PathTwist = value; });
80 80
81 rowMapperSchema.AddMapping<sbyte>("PathRadiusOffset", 81 rowMapperSchema.AddMapping<sbyte>("PathRadiusOffset",
82 delegate(PrimitiveBaseShapeRowMapper shape) { return shape.Object.PathRadiusOffset; }, 82 delegate(PrimitiveBaseShapeRowMapper shape) { return shape.Object.PathRadiusOffset; },
83 delegate(PrimitiveBaseShapeRowMapper shape, sbyte value) { shape.Object.PathRadiusOffset = value; }); 83 delegate(PrimitiveBaseShapeRowMapper shape, sbyte value) { shape.Object.PathRadiusOffset = value; });
84 84
85 rowMapperSchema.AddMapping<byte>("PathRevolutions", 85 rowMapperSchema.AddMapping<byte>("PathRevolutions",
86 delegate(PrimitiveBaseShapeRowMapper shape) { return shape.Object.PathRevolutions; }, 86 delegate(PrimitiveBaseShapeRowMapper shape) { return shape.Object.PathRevolutions; },
87 delegate(PrimitiveBaseShapeRowMapper shape, byte value) { shape.Object.PathRevolutions = value; }); 87 delegate(PrimitiveBaseShapeRowMapper shape, byte value) { shape.Object.PathRevolutions = value; });
88 88
89 rowMapperSchema.AddMapping<sbyte>("PathTwistBegin", 89 rowMapperSchema.AddMapping<sbyte>("PathTwistBegin",
90 delegate(PrimitiveBaseShapeRowMapper shape) { return shape.Object.PathTwistBegin; }, 90 delegate(PrimitiveBaseShapeRowMapper shape) { return shape.Object.PathTwistBegin; },
91 delegate(PrimitiveBaseShapeRowMapper shape, sbyte value) { shape.Object.PathTwistBegin = value; }); 91 delegate(PrimitiveBaseShapeRowMapper shape, sbyte value) { shape.Object.PathTwistBegin = value; });
92 92
93 rowMapperSchema.AddMapping<byte>("PathCurve", 93 rowMapperSchema.AddMapping<byte>("PathCurve",
94 delegate(PrimitiveBaseShapeRowMapper shape) { return shape.Object.PathCurve; }, 94 delegate(PrimitiveBaseShapeRowMapper shape) { return shape.Object.PathCurve; },
95 delegate(PrimitiveBaseShapeRowMapper shape, byte value) { shape.Object.PathCurve = value; }); 95 delegate(PrimitiveBaseShapeRowMapper shape, byte value) { shape.Object.PathCurve = value; });
96 96
97 rowMapperSchema.AddMapping<byte>("ProfileCurve", 97 rowMapperSchema.AddMapping<byte>("ProfileCurve",
98 delegate(PrimitiveBaseShapeRowMapper shape) { return shape.Object.ProfileCurve; }, 98 delegate(PrimitiveBaseShapeRowMapper shape) { return shape.Object.ProfileCurve; },
99 delegate(PrimitiveBaseShapeRowMapper shape, byte value) { shape.Object.ProfileCurve = value; }); 99 delegate(PrimitiveBaseShapeRowMapper shape, byte value) { shape.Object.ProfileCurve = value; });
100 100
101 rowMapperSchema.AddMapping<ushort>("ProfileHollow", 101 rowMapperSchema.AddMapping<ushort>("ProfileHollow",
102 delegate(PrimitiveBaseShapeRowMapper shape) { return shape.Object.ProfileHollow; }, 102 delegate(PrimitiveBaseShapeRowMapper shape) { return shape.Object.ProfileHollow; },
103 delegate(PrimitiveBaseShapeRowMapper shape, ushort value) { shape.Object.ProfileHollow = value; }); 103 delegate(PrimitiveBaseShapeRowMapper shape, ushort value) { shape.Object.ProfileHollow = value; });
104 104
105 rowMapperSchema.AddMapping<byte[]>("TextureEntry", 105 rowMapperSchema.AddMapping<byte[]>("TextureEntry",
106 delegate(PrimitiveBaseShapeRowMapper shape) { return shape.Object.TextureEntry; }, 106 delegate(PrimitiveBaseShapeRowMapper shape) { return shape.Object.TextureEntry; },
107 delegate(PrimitiveBaseShapeRowMapper shape, byte[] value) { shape.Object.TextureEntry = value; }); 107 delegate(PrimitiveBaseShapeRowMapper shape, byte[] value) { shape.Object.TextureEntry = value; });
108 108
109 rowMapperSchema.AddMapping<byte[]>("ExtraParams", 109 rowMapperSchema.AddMapping<byte[]>("ExtraParams",
110 delegate(PrimitiveBaseShapeRowMapper shape) { return shape.Object.ExtraParams; }, 110 delegate(PrimitiveBaseShapeRowMapper shape) { return shape.Object.ExtraParams; },
111 delegate(PrimitiveBaseShapeRowMapper shape, byte[] value) { shape.Object.ExtraParams = value; }); 111 delegate(PrimitiveBaseShapeRowMapper shape, byte[] value) { shape.Object.ExtraParams = value; });
112 } 112 }
113 113
114 public override PrimitiveBaseShapeRowMapper FromReader(DataReader reader) 114 public override PrimitiveBaseShapeRowMapper FromReader(DataReader reader)
115 { 115 {
116 PrimitiveBaseShape shape = new PrimitiveBaseShape(); 116 PrimitiveBaseShape shape = new PrimitiveBaseShape();
117 117
118 PrimitiveBaseShapeRowMapper mapper = new PrimitiveBaseShapeRowMapper(m_schema, shape); 118 PrimitiveBaseShapeRowMapper mapper = new PrimitiveBaseShapeRowMapper(m_schema, shape);
119 mapper.FillObject( reader ); 119 mapper.FillObject( reader );
120 120
121 return mapper; 121 return mapper;
122 } 122 }
123 123
124 public bool Update(Guid sceneObjectPartId, PrimitiveBaseShape primitiveBaseShape) 124 public bool Update(Guid sceneObjectPartId, PrimitiveBaseShape primitiveBaseShape)
125 { 125 {
126 PrimitiveBaseShapeRowMapper mapper = CreateRowMapper(sceneObjectPartId, primitiveBaseShape); 126 PrimitiveBaseShapeRowMapper mapper = CreateRowMapper(sceneObjectPartId, primitiveBaseShape);
127 return Update(sceneObjectPartId, mapper); 127 return Update(sceneObjectPartId, mapper);
128 } 128 }
129 129
130 public bool Add(Guid sceneObjectPartId, PrimitiveBaseShape primitiveBaseShape) 130 public bool Add(Guid sceneObjectPartId, PrimitiveBaseShape primitiveBaseShape)
131 { 131 {
132 PrimitiveBaseShapeRowMapper mapper = CreateRowMapper(sceneObjectPartId, primitiveBaseShape); 132 PrimitiveBaseShapeRowMapper mapper = CreateRowMapper(sceneObjectPartId, primitiveBaseShape);
133 return Add(mapper); 133 return Add(mapper);
134 } 134 }
135 135
136 private PrimitiveBaseShapeRowMapper CreateRowMapper(Guid sceneObjectPartId, PrimitiveBaseShape primitiveBaseShape) 136 private PrimitiveBaseShapeRowMapper CreateRowMapper(Guid sceneObjectPartId, PrimitiveBaseShape primitiveBaseShape)
137 { 137 {
138 PrimitiveBaseShapeRowMapper mapper = new PrimitiveBaseShapeRowMapper( m_schema, primitiveBaseShape ); 138 PrimitiveBaseShapeRowMapper mapper = new PrimitiveBaseShapeRowMapper( m_schema, primitiveBaseShape );
139 mapper.SceneObjectPartId = sceneObjectPartId; 139 mapper.SceneObjectPartId = sceneObjectPartId;
140 return mapper; 140 return mapper;
141 } 141 }
142 } 142 }
143} \ No newline at end of file 143} \ No newline at end of file