Last change
on this file since 1530 was
1454,
checked in by epitzer, 15 years ago
|
merge persistence exploration branch into trunk as HL plugin. (#506)
|
File size:
885 bytes
|
Line | |
---|
1 | using System;
|
---|
2 | using HeuristicLab.Persistence.Core;
|
---|
3 |
|
---|
4 | namespace HeuristicLab.Persistence.Default.Xml.Compact {
|
---|
5 |
|
---|
6 | [EmptyStorableClass]
|
---|
7 | public class IntArray2XmlFormatter : NumberArray2XmlFormatter {
|
---|
8 |
|
---|
9 | public override Type Type {
|
---|
10 | get {
|
---|
11 | return typeof(int[]);
|
---|
12 | }
|
---|
13 | }
|
---|
14 |
|
---|
15 | protected override string formatValue(object o) {
|
---|
16 | return o.ToString();
|
---|
17 | }
|
---|
18 |
|
---|
19 | protected override object parseValue(string o) {
|
---|
20 | return int.Parse(o);
|
---|
21 | }
|
---|
22 | }
|
---|
23 |
|
---|
24 |
|
---|
25 | [EmptyStorableClass]
|
---|
26 | public class Int2DArray2XmlFormatter : IntArray2XmlFormatter {
|
---|
27 | public override Type Type {
|
---|
28 | get {
|
---|
29 | return typeof(int[,]);
|
---|
30 | }
|
---|
31 | }
|
---|
32 | }
|
---|
33 |
|
---|
34 |
|
---|
35 | [EmptyStorableClass]
|
---|
36 | public class Int3DArray2XmlFormatter : IntArray2XmlFormatter {
|
---|
37 | public override Type Type {
|
---|
38 | get {
|
---|
39 | return typeof(int[, ,]);
|
---|
40 | }
|
---|
41 | }
|
---|
42 | }
|
---|
43 |
|
---|
44 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.