[iphone] Moved original iPhone project into legacy directory

git-svn-id: https://zxing.googlecode.com/svn/trunk@1646 59b500cc-1b3d-0410-9834-0bbf25fbcc57
This commit is contained in:
rpechayr 2010-11-14 15:56:00 +00:00
parent 03537953f1
commit ec506e27be
135 changed files with 104 additions and 10 deletions

View file

@ -53,8 +53,9 @@
[parts addObject:@""];
[parts addObject:[NSString stringWithFormat:NSLocalizedString(@"EmailParsedResult Display: Body", @"%@"), self.body]];
}
return [parts componentsJoinedByString:@"\n"];
NSString *res = [parts componentsJoinedByString:@"\n"];
[parts release];
return res;
}
+ (NSString *)typeName {

View file

@ -0,0 +1,20 @@
//
// UniversalResultParser.h
// ZXingWidget
//
// Created by Romain Pechayre on 11/14/10.
// Copyright 2010 __MyCompanyName__. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "ResultParser.h"
@interface UniversalResultParser : ResultParser {
NSMutableArray *parsers;
}
@property(nonatomic,retain) NSMutableArray *parsers;
- (id) initWithDefaultParsers;
- (ParsedResult *)resultForString:(NSString *)theString;
@end

View file

@ -0,0 +1,72 @@
//
// UniversalResultParser.m
// ZXingWidget
//
// Created by Romain Pechayre on 11/14/10.
// Copyright 2010 __MyCompanyName__. All rights reserved.
//
#import "UniversalResultParser.h"
#import "SMSTOResultParser.h"
#import "URLResultParser.h"
#import "TelResultParser.h"
#import "URLTOResultParser.h"
#import "SMSResultParser.h"
#import "PlainEmailResultParser.h"
#import "MeCardParser.h"
#import "EmailDoCoMoResultParser.h"
#import "BookmarkDoCoMoResultParser.h"
#import "GeoResultParser.h"
#import "TextResultParser.h"
@implementation UniversalResultParser
@synthesize parsers;
- (void)addParserClass:(Class)klass {
[self.parsers addObject:klass];
}
- (id) initWithDefaultParsers {
NSMutableArray *set = [[NSMutableArray alloc] initWithCapacity:11];
self.parsers = set;
[set release];
[self addParserClass:[SMSResultParser class]];
[self addParserClass:[TelResultParser class]];
[self addParserClass:[SMSTOResultParser class]];
[self addParserClass:[MeCardParser class]];
[self addParserClass:[URLResultParser class]];
[self addParserClass:[URLTOResultParser class]];
[self addParserClass:[PlainEmailResultParser class]];
[self addParserClass:[EmailDoCoMoResultParser class]];
[self addParserClass:[BookmarkDoCoMoResultParser class]];
[self addParserClass:[GeoResultParser class]];
[self addParserClass:[TextResultParser class]];
return self;
}
- (ParsedResult *)resultForString:(NSString *)s {
#ifdef DEBUG
NSLog(@"parsing result:\n<<<\n%@\n>>>\n", s);
#endif
for (Class c in parsers) {
#ifdef DEBUG
NSLog(@"trying %@", NSStringFromClass(c));
#endif
ParsedResult *result = [c parsedResultForString:s];
if (result != nil) {
#ifdef DEBUG
NSLog(@"parsed as %@ %@", NSStringFromClass([result class]), result);
#endif
return result;
}
}
return nil;
}
-(void)dealloc {
[parsers release];
[super dealloc];
}
@end

View file

@ -85,6 +85,8 @@
1F3DB0FE11C61080009C581B /* MultiFormatOneDReader.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1F3DB0F811C61080009C581B /* MultiFormatOneDReader.mm */; };
1F3DB0FF11C61080009C581B /* MultiFormatUPCEANReader.h in Headers */ = {isa = PBXBuildFile; fileRef = 1F3DB0F911C61080009C581B /* MultiFormatUPCEANReader.h */; };
1F3DB10011C61080009C581B /* MultiFormatUPCEANReader.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1F3DB0FA11C61080009C581B /* MultiFormatUPCEANReader.mm */; };
1FB4319F12901C76002D63E8 /* UniversalResultParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 1FB4319D12901C76002D63E8 /* UniversalResultParser.h */; };
1FB431A012901C76002D63E8 /* UniversalResultParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 1FB4319E12901C76002D63E8 /* UniversalResultParser.m */; };
3B72D96F12130EF6007CEF32 /* ResultPointCallback.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3B72D96D12130EF6007CEF32 /* ResultPointCallback.cpp */; };
3B72D97012130EF6007CEF32 /* ResultPointCallback.h in Headers */ = {isa = PBXBuildFile; fileRef = 3B72D96E12130EF6007CEF32 /* ResultPointCallback.h */; };
3B81AAC5120F07E40022E5D4 /* DecodeHints.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3B81AAC3120F07E40022E5D4 /* DecodeHints.cpp */; };
@ -312,6 +314,8 @@
1F3DB0F811C61080009C581B /* MultiFormatOneDReader.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = MultiFormatOneDReader.mm; path = Classes/MultiFormatOneDReader.mm; sourceTree = "<group>"; };
1F3DB0F911C61080009C581B /* MultiFormatUPCEANReader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MultiFormatUPCEANReader.h; path = Classes/MultiFormatUPCEANReader.h; sourceTree = "<group>"; };
1F3DB0FA11C61080009C581B /* MultiFormatUPCEANReader.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = MultiFormatUPCEANReader.mm; path = Classes/MultiFormatUPCEANReader.mm; sourceTree = "<group>"; };
1FB4319D12901C76002D63E8 /* UniversalResultParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = UniversalResultParser.h; path = Classes/resultParsers/UniversalResultParser.h; sourceTree = "<group>"; };
1FB4319E12901C76002D63E8 /* UniversalResultParser.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = UniversalResultParser.m; path = Classes/resultParsers/UniversalResultParser.m; sourceTree = "<group>"; };
3B72D96D12130EF6007CEF32 /* ResultPointCallback.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ResultPointCallback.cpp; sourceTree = "<group>"; };
3B72D96E12130EF6007CEF32 /* ResultPointCallback.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ResultPointCallback.h; sourceTree = "<group>"; };
3B81AAC3120F07E40022E5D4 /* DecodeHints.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DecodeHints.cpp; sourceTree = "<group>"; };
@ -780,6 +784,8 @@
E53459D4119876A5000CB77F /* ResultParsers */ = {
isa = PBXGroup;
children = (
1FB4319D12901C76002D63E8 /* UniversalResultParser.h */,
1FB4319E12901C76002D63E8 /* UniversalResultParser.m */,
1F027FFB11A7BF06006B06DE /* BookmarkDoCoMoResultParser.h */,
1F027FFC11A7BF06006B06DE /* BookmarkDoCoMoResultParser.m */,
1F027FFD11A7BF06006B06DE /* DoCoMoResultParser.h */,
@ -979,6 +985,7 @@
3B81AACE120F08170022E5D4 /* HybridBinarizer.h in Headers */,
3B81AAF9120F0A7E0022E5D4 /* GreyscaleRotatedLuminanceSource.h in Headers */,
3B72D97012130EF6007CEF32 /* ResultPointCallback.h in Headers */,
1FB4319F12901C76002D63E8 /* UniversalResultParser.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@ -1141,6 +1148,7 @@
3B81AACD120F08170022E5D4 /* HybridBinarizer.cpp in Sources */,
3B81AAF8120F0A7E0022E5D4 /* GreyscaleRotatedLuminanceSource.cpp in Sources */,
3B72D96F12130EF6007CEF32 /* ResultPointCallback.cpp in Sources */,
1FB431A012901C76002D63E8 /* UniversalResultParser.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};

View file

Before

Width:  |  Height:  |  Size: 5.3 KiB

After

Width:  |  Height:  |  Size: 5.3 KiB

View file

@ -64,8 +64,6 @@
1F513C0711B4E19800E217E3 /* GridSampler.h in Headers */ = {isa = PBXBuildFile; fileRef = 1F513B7A11B4E19800E217E3 /* GridSampler.h */; };
1F513C0811B4E19800E217E3 /* IllegalArgumentException.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1F513B7B11B4E19800E217E3 /* IllegalArgumentException.cpp */; };
1F513C0911B4E19800E217E3 /* IllegalArgumentException.h in Headers */ = {isa = PBXBuildFile; fileRef = 1F513B7C11B4E19800E217E3 /* IllegalArgumentException.h */; };
1F513C0A11B4E19800E217E3 /* LocalBlockBinarizer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1F513B7D11B4E19800E217E3 /* LocalBlockBinarizer.cpp */; };
1F513C0B11B4E19800E217E3 /* LocalBlockBinarizer.h in Headers */ = {isa = PBXBuildFile; fileRef = 1F513B7E11B4E19800E217E3 /* LocalBlockBinarizer.h */; };
1F513C0C11B4E19800E217E3 /* PerspectiveTransform.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1F513B7F11B4E19800E217E3 /* PerspectiveTransform.cpp */; };
1F513C0D11B4E19800E217E3 /* PerspectiveTransform.h in Headers */ = {isa = PBXBuildFile; fileRef = 1F513B8011B4E19800E217E3 /* PerspectiveTransform.h */; };
1F513C0E11B4E19800E217E3 /* Point.h in Headers */ = {isa = PBXBuildFile; fileRef = 1F513B8111B4E19800E217E3 /* Point.h */; };
@ -376,8 +374,6 @@
1F513B7A11B4E19800E217E3 /* GridSampler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GridSampler.h; sourceTree = "<group>"; };
1F513B7B11B4E19800E217E3 /* IllegalArgumentException.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = IllegalArgumentException.cpp; sourceTree = "<group>"; };
1F513B7C11B4E19800E217E3 /* IllegalArgumentException.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IllegalArgumentException.h; sourceTree = "<group>"; };
1F513B7D11B4E19800E217E3 /* LocalBlockBinarizer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LocalBlockBinarizer.cpp; sourceTree = "<group>"; };
1F513B7E11B4E19800E217E3 /* LocalBlockBinarizer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LocalBlockBinarizer.h; sourceTree = "<group>"; };
1F513B7F11B4E19800E217E3 /* PerspectiveTransform.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PerspectiveTransform.cpp; sourceTree = "<group>"; };
1F513B8011B4E19800E217E3 /* PerspectiveTransform.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PerspectiveTransform.h; sourceTree = "<group>"; };
1F513B8111B4E19800E217E3 /* Point.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Point.h; sourceTree = "<group>"; };
@ -964,8 +960,6 @@
1F513B7A11B4E19800E217E3 /* GridSampler.h */,
1F513B7B11B4E19800E217E3 /* IllegalArgumentException.cpp */,
1F513B7C11B4E19800E217E3 /* IllegalArgumentException.h */,
1F513B7D11B4E19800E217E3 /* LocalBlockBinarizer.cpp */,
1F513B7E11B4E19800E217E3 /* LocalBlockBinarizer.h */,
1F513B7F11B4E19800E217E3 /* PerspectiveTransform.cpp */,
1F513B8011B4E19800E217E3 /* PerspectiveTransform.h */,
1F513B8111B4E19800E217E3 /* Point.h */,
@ -1655,7 +1649,6 @@
1F513C0511B4E19800E217E3 /* GlobalHistogramBinarizer.h in Headers */,
1F513C0711B4E19800E217E3 /* GridSampler.h in Headers */,
1F513C0911B4E19800E217E3 /* IllegalArgumentException.h in Headers */,
1F513C0B11B4E19800E217E3 /* LocalBlockBinarizer.h in Headers */,
1F513C0D11B4E19800E217E3 /* PerspectiveTransform.h in Headers */,
1F513C0E11B4E19800E217E3 /* Point.h in Headers */,
1F513C1011B4E19800E217E3 /* GF256.h in Headers */,
@ -1798,6 +1791,7 @@
isa = PBXProject;
buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "ZXing" */;
compatibilityVersion = "Xcode 3.1";
developmentRegion = English;
hasScannedForEncodings = 1;
knownRegions = (
English,
@ -1943,7 +1937,6 @@
1F513C0411B4E19800E217E3 /* GlobalHistogramBinarizer.cpp in Sources */,
1F513C0611B4E19800E217E3 /* GridSampler.cpp in Sources */,
1F513C0811B4E19800E217E3 /* IllegalArgumentException.cpp in Sources */,
1F513C0A11B4E19800E217E3 /* LocalBlockBinarizer.cpp in Sources */,
1F513C0C11B4E19800E217E3 /* PerspectiveTransform.cpp in Sources */,
1F513C0F11B4E19800E217E3 /* GF256.cpp in Sources */,
1F513C1111B4E19800E217E3 /* GF256Poly.cpp in Sources */,
@ -2676,7 +2669,7 @@
HEADER_SEARCH_PATHS = ../../cpp/core/src;
ONLY_ACTIVE_ARCH = YES;
PREBINDING = NO;
SDKROOT = iphoneos3.1.2;
SDKROOT = iphoneos4.2;
};
name = Debug;
};

View file

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

Some files were not shown because too many files have changed in this diff Show more