In corlib/System.Runtime.InteropServices:
[mono.git] / mcs / class / FirebirdSql.Data.Firebird / FirebirdSql.Data.Common / ArrayDesc.cs
1 /*
2  *  Firebird ADO.NET Data provider for .NET and Mono 
3  * 
4  *     The contents of this file are subject to the Initial 
5  *     Developer's Public License Version 1.0 (the "License"); 
6  *     you may not use this file except in compliance with the 
7  *     License. You may obtain a copy of the License at 
8  *     http://www.firebirdsql.org/index.php?op=doc&id=idpl
9  *
10  *     Software distributed under the License is distributed on 
11  *     an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either 
12  *     express or implied.  See the License for the specific 
13  *     language governing rights and limitations under the License.
14  * 
15  *  Copyright (c) 2002, 2005 Carlos Guzman Alvarez
16  *  All Rights Reserved.
17  */
18
19 using System;
20 using System.Runtime.InteropServices;
21
22 namespace FirebirdSql.Data.Common
23 {
24         internal struct ArrayDesc
25         {
26                 #region Fields
27
28                 private byte    dataType;
29                 private short   scale;
30                 private short   length;
31                 private string  fieldName;
32                 private string  relationName;
33                 private short   dimensions;
34                 private short   flags;
35                 private ArrayBound[] bounds;
36
37                 #endregion
38
39                 #region Properties
40
41                 public byte DataType
42                 {
43                         get { return this.dataType; }
44                         set { this.dataType = value; }
45                 }
46
47                 // Scale for numeric datatypes
48                 public short Scale
49                 {
50                         get { return this.scale; }
51                         set { this.scale = value; }
52                 }
53
54                 // Legth in bytes of each array element
55                 public short Length
56                 {
57                         get { return this.length; }
58                         set { this.length = value; }
59                 }
60
61                 // Column name - 32
62                 public string FieldName
63                 {
64                         get { return this.fieldName; }
65                         set { this.fieldName = value; }
66                 }
67
68                 // Table name -32
69                 public string RelationName
70                 {
71                         get { return this.relationName; }
72                         set { this.relationName = value; }
73                 }
74
75                 // Number of array dimensions 
76                 public short Dimensions
77                 {
78                         get { return this.dimensions; }
79                         set { this.dimensions = value; }
80                 }
81
82                 // Specifies wheter array is to be accesed in
83                 // row mayor or column-mayor order
84                 public short Flags
85                 {
86                         get { return this.flags; }
87                         set { this.flags = value; }
88                 }
89
90                 // Lower and upper bounds for each dimension - 16
91                 public ArrayBound[] Bounds
92                 {
93                         get { return this.bounds; }
94                         set { this.bounds = value; }
95                 }
96
97                 #endregion
98         }
99
100         internal struct ArrayBound
101         {
102                 #region Fields
103
104                 private int lowerBound;
105                 private int upperBound;
106
107                 #endregion
108
109                 #region Properties
110
111                 public int LowerBound
112                 {
113                         get { return this.lowerBound; }
114                         set { this.lowerBound = value; }
115                 }
116
117                 public int UpperBound
118                 {
119                         get { return this.upperBound; }
120                         set { this.upperBound = value; }
121                 }
122
123                 #endregion
124         }
125 }