Committed C# port from Mohamad
[zxing.git] / csharp / BarcodeFormat.cs
1 /*\r
2 * Copyright 2007 ZXing authors\r
3 *\r
4 * Licensed under the Apache License, Version 2.0 (the "License");\r
5 * you may not use this file except in compliance with the License.\r
6 * You may obtain a copy of the License at\r
7 *\r
8 *      http://www.apache.org/licenses/LICENSE-2.0\r
9 *\r
10 * Unless required by applicable law or agreed to in writing, software\r
11 * distributed under the License is distributed on an "AS IS" BASIS,\r
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
13 * See the License for the specific language governing permissions and\r
14 * limitations under the License.\r
15 */\r
16 namespace com.google.zxing\r
17 {\r
18     using System;\r
19 \r
20     /// <summary> Enumerates barcode formats known to this package.\r
21     /// *\r
22     /// </summary>\r
23     /// <author>  Sean Owen\r
24     /// \r
25     /// </author>\r
26     public sealed class BarcodeFormat\r
27     {\r
28 \r
29         // No, we can't use an enum here. J2ME doesn't support it.\r
30 \r
31         /// <summary>QR Code 2D barcode format. \r
32         /// </summary>\r
33         //UPGRADE_NOTE: Final was removed from the declaration of 'QR_CODE '. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1003"'\r
34         public static readonly BarcodeFormat QR_CODE = new BarcodeFormat("QR_CODE");\r
35 \r
36         /// <summary>DataMatrix 2D barcode format. \r
37         /// </summary>\r
38         //UPGRADE_NOTE: Final was removed from the declaration of 'DATAMATRIX '. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1003"'\r
39         public static readonly BarcodeFormat DATAMATRIX = new BarcodeFormat("DATAMATRIX");\r
40 \r
41         /// <summary>UPC-E 1D format. \r
42         /// </summary>\r
43         //UPGRADE_NOTE: Final was removed from the declaration of 'UPC_E '. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1003"'\r
44         public static readonly BarcodeFormat UPC_E = new BarcodeFormat("UPC_E");\r
45 \r
46         /// <summary>UPC-A 1D format. \r
47         /// </summary>\r
48         //UPGRADE_NOTE: Final was removed from the declaration of 'UPC_A '. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1003"'\r
49         public static readonly BarcodeFormat UPC_A = new BarcodeFormat("UPC_A");\r
50 \r
51         /// <summary>EAN-8 1D format. \r
52         /// </summary>\r
53         //UPGRADE_NOTE: Final was removed from the declaration of 'EAN_8 '. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1003"'\r
54         public static readonly BarcodeFormat EAN_8 = new BarcodeFormat("EAN_8");\r
55 \r
56         /// <summary>EAN-13 1D format. \r
57         /// </summary>\r
58         //UPGRADE_NOTE: Final was removed from the declaration of 'EAN_13 '. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1003"'\r
59         public static readonly BarcodeFormat EAN_13 = new BarcodeFormat("EAN_13");\r
60 \r
61         /// <summary>Code 128 1D format. \r
62         /// </summary>\r
63         //UPGRADE_NOTE: Final was removed from the declaration of 'CODE_128 '. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1003"'\r
64         public static readonly BarcodeFormat CODE_128 = new BarcodeFormat("CODE_128");\r
65 \r
66         /// <summary>Code 39 1D format. \r
67         /// </summary>\r
68         //UPGRADE_NOTE: Final was removed from the declaration of 'CODE_39 '. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1003"'\r
69         public static readonly BarcodeFormat CODE_39 = new BarcodeFormat("CODE_39");\r
70 \r
71         /// <summary>ITF (Interleaved Two of Five) 1D format. \r
72         /// </summary>\r
73         //UPGRADE_NOTE: Final was removed from the declaration of 'ITF '. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1003"'\r
74         public static readonly BarcodeFormat ITF = new BarcodeFormat("ITF");\r
75 \r
76         //UPGRADE_NOTE: Final was removed from the declaration of 'name '. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1003"'\r
77         private System.String name;\r
78 \r
79         private BarcodeFormat(System.String name)\r
80         {\r
81             this.name = name;\r
82         }\r
83 \r
84         public override System.String ToString()\r
85         {\r
86             return name;\r
87         }\r
88     }\r
89 }