Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 41 lines (36 sloc) 1.849 kb
297ae85 initial commit
Chris authored
1 // -----------------------------------------------------------------------------------
2 // NKDModifiedPlesseyHexBarcode.m
3 // -----------------------------------------------------------------------------------
4 // Created by Jeff LaMarche on Wed May 08 2002.
5 // ©2002 Naked Software. All rights reserved.
6 // -----------------------------------------------------------------------------------
7 // THIS SOURCE CODE IS PROVIDED AS-IS WITH NO WARRANTY OF ANY KIND
8 // -----------------------------------------------------------------------------------
9 // You may use and redistribute this source code without limitation
10 // -----------------------------------------------------------------------------------
11 #import "NKDModifiedPlesseyHexBarcode.h"
12
13
14 @implementation NKDModifiedPlesseyHexBarcode
15 // -----------------------------------------------------------------------------------
16 -(NSString *)_encodeChar:(char)inChar
17 // -----------------------------------------------------------------------------------
18 {
19
20 if (![[super _encodeChar:inChar] isEqual:@""])
21 return [super _encodeChar:inChar];
22
23 switch (inChar)
24 {
25 case 'A':
26 return [NSString stringWithFormat:@"%@%@%@%@", ZERO_BIT, ONE_BIT, ZERO_BIT, ONE_BIT];
27 case 'B':
28 return [NSString stringWithFormat:@"%@%@%@%@", ONE_BIT, ONE_BIT, ZERO_BIT, ONE_BIT];
29 case 'C':
30 return [NSString stringWithFormat:@"%@%@%@%@", ZERO_BIT, ZERO_BIT, ONE_BIT, ONE_BIT];
31 case 'D':
32 return [NSString stringWithFormat:@"%@%@%@%@", ONE_BIT, ZERO_BIT, ONE_BIT, ONE_BIT];
33 case 'E':
34 return [NSString stringWithFormat:@"%@%@%@%@", ZERO_BIT, ONE_BIT, ONE_BIT, ONE_BIT];
35 case 'F':
36 return [NSString stringWithFormat:@"%@%@%@%@", ONE_BIT, ONE_BIT, ONE_BIT, ONE_BIT];
37 }
38 return @"";
39 }
40 @end
Something went wrong with that request. Please try again.