2 * Copyright 2007 ZXing authors
\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
8 * http://www.apache.org/licenses/LICENSE-2.0
\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
17 namespace com.google.zxing
\r
20 /// <summary> Enumerates barcode formats known to this package.
\r
23 /// <author> Sean Owen
\r
25 /// <author>www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source
\r
28 public sealed class BarcodeFormat
\r
30 public System.String Name
\r
39 // No, we can't use an enum here. J2ME doesn't support it.
\r
41 //UPGRADE_NOTE: Final was removed from the declaration of 'VALUES '. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1003'"
\r
42 private static readonly System.Collections.Hashtable VALUES = System.Collections.Hashtable.Synchronized(new System.Collections.Hashtable());
\r
44 /// <summary>QR Code 2D barcode format. </summary>
\r
45 //UPGRADE_NOTE: Final was removed from the declaration of 'QR_CODE '. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1003'"
\r
46 public static readonly BarcodeFormat QR_CODE = new BarcodeFormat("QR_CODE");
\r
48 /// <summary>DataMatrix 2D barcode format. </summary>
\r
49 //UPGRADE_NOTE: Final was removed from the declaration of 'DATAMATRIX '. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1003'"
\r
50 public static readonly BarcodeFormat DATAMATRIX = new BarcodeFormat("DATAMATRIX");
\r
52 /// <summary>UPC-E 1D format. </summary>
\r
53 //UPGRADE_NOTE: Final was removed from the declaration of 'UPC_E '. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1003'"
\r
54 public static readonly BarcodeFormat UPC_E = new BarcodeFormat("UPC_E");
\r
56 /// <summary>UPC-A 1D format. </summary>
\r
57 //UPGRADE_NOTE: Final was removed from the declaration of 'UPC_A '. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1003'"
\r
58 public static readonly BarcodeFormat UPC_A = new BarcodeFormat("UPC_A");
\r
60 /// <summary>EAN-8 1D format. </summary>
\r
61 //UPGRADE_NOTE: Final was removed from the declaration of 'EAN_8 '. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1003'"
\r
62 public static readonly BarcodeFormat EAN_8 = new BarcodeFormat("EAN_8");
\r
64 /// <summary>EAN-13 1D format. </summary>
\r
65 //UPGRADE_NOTE: Final was removed from the declaration of 'EAN_13 '. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1003'"
\r
66 public static readonly BarcodeFormat EAN_13 = new BarcodeFormat("EAN_13");
\r
68 /// <summary>Code 128 1D format. </summary>
\r
69 //UPGRADE_NOTE: Final was removed from the declaration of 'CODE_128 '. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1003'"
\r
70 public static readonly BarcodeFormat CODE_128 = new BarcodeFormat("CODE_128");
\r
72 /// <summary>Code 39 1D format. </summary>
\r
73 //UPGRADE_NOTE: Final was removed from the declaration of 'CODE_39 '. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1003'"
\r
74 public static readonly BarcodeFormat CODE_39 = new BarcodeFormat("CODE_39");
\r
76 /// <summary>ITF (Interleaved Two of Five) 1D format. </summary>
\r
77 //UPGRADE_NOTE: Final was removed from the declaration of 'ITF '. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1003'"
\r
78 public static readonly BarcodeFormat ITF = new BarcodeFormat("ITF");
\r
80 /// <summary>PDF417 format. </summary>
\r
81 //UPGRADE_NOTE: Final was removed from the declaration of 'PDF417 '. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1003'"
\r
82 public static readonly BarcodeFormat PDF417 = new BarcodeFormat("PDF417");
\r
84 //UPGRADE_NOTE: Final was removed from the declaration of 'name '. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1003'"
\r
85 private System.String name;
\r
87 private BarcodeFormat(System.String name)
\r
90 VALUES[name] = this;
\r
93 public override System.String ToString()
\r
98 public static BarcodeFormat valueOf(System.String name)
\r
100 BarcodeFormat format = (BarcodeFormat) VALUES[name];
\r
101 if (format == null)
\r
103 throw new System.ArgumentException();
\r