Skip to content

Commit

Permalink
Updated code documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
dino.gustin committed Jun 15, 2016
1 parent 38cad07 commit 07e92e7
Show file tree
Hide file tree
Showing 24 changed files with 143 additions and 21 deletions.
9 changes: 8 additions & 1 deletion MicroBlink.framework/Headers/PPBaseOverlayViewController.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,18 @@ NS_ASSUME_NONNULL_BEGIN
PP_CLASS_AVAILABLE_IOS(6.0) @interface PPBaseOverlayViewController : PPOverlayViewController

/**
Array with overlay subviews (UIView subclasses implementing the PPOverlaySubview protocol)
* Registers a subview for overlay events.
*/
- (void)registerOverlaySubview:(UIView<PPOverlaySubview>*)subview;

/**
* Unregisters a subview for overlay events.
*/
- (void)unregisterOverlaySubview:(UIView<PPOverlaySubview>*)subview;

/**
* Delegate for subview animation events.
*/
@property (nonatomic, weak) id<PPOverlaySubviewDelegate> overlaySubviewsDelegate;

@end
Expand Down
3 changes: 3 additions & 0 deletions MicroBlink.framework/Headers/PPDecodingInfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@ PP_CLASS_AVAILABLE_IOS(6.0) @interface PPDecodingInfo : NSObject
dewarpedHeight:(CGFloat)dewarpedHeight
uniqueId:(NSString *)uniqueId NS_DESIGNATED_INITIALIZER;

/**
* Please use designated initializer.
*/
- (instancetype)init NS_UNAVAILABLE;

@end
Expand Down
11 changes: 9 additions & 2 deletions MicroBlink.framework/Headers/PPDetectorRecognizerSettings.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,21 @@
NS_ASSUME_NONNULL_BEGIN

/**
* Settings class for configuring Detector recognizer
* Recognizer class for detector settings (Esentially a weapper around PPDetectorSettings).
* Detector recognizer is used to detect various documents on the image.
*
* Detector recognizer is used to detect various documents on the image
* If multiple detectors are needed, please check PPMultiDetectorSettings.
*/
PP_CLASS_AVAILABLE_IOS(6.0) @interface PPDetectorRecognizerSettings : PPRecognizerSettings

/**
* Initializes the recognizer with desired detector settings.
*/
- (instancetype)initWithDetectorSettings:(PPDetectorSettings *)detectorSettings NS_DESIGNATED_INITIALIZER;

/**
* Please use designated initializer.
*/
- (instancetype)init NS_UNAVAILABLE;

@end
Expand Down
17 changes: 17 additions & 0 deletions MicroBlink.framework/Headers/PPDetectorResult.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,23 @@
#import "PPDetectionStatus.h"
#import "PPMicroBlinkDefines.h"

/**
* Enum for type of detection status.
*/
typedef NS_ENUM(NSUInteger, PPDetectionCode) {
/**
* Object detection has failed.
*/
PPDetectionCodeFail = 0,

/**
* Object was detected partially. Only some PhotoPay detectors support this.
*/
PPDetectionCodeFallback,

/**
* Object detection has succeded.
*/
PPDetectionCodeSuccess,
};

Expand Down Expand Up @@ -47,6 +61,9 @@ PP_CLASS_AVAILABLE_IOS(6.0)
*/
- (instancetype)initWithCode:(PPDetectionCode)code status:(PPDetectionStatus)status NS_DESIGNATED_INITIALIZER;

/**
* Please use designated initializer.
*/
- (instancetype)init NS_UNAVAILABLE;

@end
Expand Down
11 changes: 6 additions & 5 deletions MicroBlink.framework/Headers/PPDetectorSettings.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,9 @@ struct DetectorSettingsImpl;
typedef struct DetectorSettingsImpl DetectorSettingsImpl;

/**
* MicroBlink scanning libraries run detector objects to find objects on image
*
* Each detector is configured with PPDetectorSettings object
*
* This class is common superclass for each of the Detector settings,
* MicroBlink scanning libraries run detector objects to find objects on image.
* Each detector is configured with PPDetectorSettings object.
* This class is common superclass for each of the Detector settings.
*/
PP_CLASS_AVAILABLE_IOS(6.0) @interface PPDetectorSettings : NSObject <NSCopying>

Expand All @@ -35,6 +33,9 @@ PP_CLASS_AVAILABLE_IOS(6.0) @interface PPDetectorSettings : NSObject <NSCopying>
*/
- (instancetype)initWithSettings:(DetectorSettingsImpl*)settings NS_DESIGNATED_INITIALIZER;

/**
* Please use designated initializer.
*/
- (instancetype)init NS_UNAVAILABLE;

@end
Expand Down
6 changes: 3 additions & 3 deletions MicroBlink.framework/Headers/PPDocumentDetectorResult.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,18 @@
NS_ASSUME_NONNULL_BEGIN

/**
* Result of the document detector
* Result of a document detector (used to detector various rectangular objects).
*/
PP_CLASS_AVAILABLE_IOS(6.0)
@interface PPDocumentDetectorResult : PPQuadDetectorResult

/**
* Aspect ratio of detected document
* Aspect ratio of detected document.
*/
@property (nonatomic) CGFloat aspectRatio;

/**
* screen orientation used when detecting the document
* Screen orientation used when detecting the document.
*/
@property (nonatomic) UIInterfaceOrientation screenOrientation;

Expand Down
1 change: 1 addition & 0 deletions MicroBlink.framework/Headers/PPDocumentSpecification.h
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ typedef NS_ENUM(NSUInteger, PPDocumentPreset) {

/**
* Document class describes a document which is being detected by DocumentDetector.
* We encurage users to create specifications with one of our presets, if possible.
*/
PP_CLASS_AVAILABLE_IOS(6.0) @interface PPDocumentSpecification : NSObject<NSCopying>

Expand Down
2 changes: 1 addition & 1 deletion MicroBlink.framework/Headers/PPEmailOcrParserFactory.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#import "PPOcrParserFactory.h"

/**
* Parses email addresses
* Parses email addresses.
*/
PP_CLASS_AVAILABLE_IOS(6.0) @interface PPEmailOcrParserFactory : PPOcrParserFactory

Expand Down
3 changes: 3 additions & 0 deletions MicroBlink.framework/Headers/PPEudlCountry.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ typedef NS_ENUM(NSUInteger, PPEudlCountry) {
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wall"

/**
* Gets the string representation of PPEudlCountry enum.
*/
static NSString* eudlCountryToString(PPEudlCountry country) {
switch (country) {
case PPEudlCountryUnitedKingdom:
Expand Down
3 changes: 3 additions & 0 deletions MicroBlink.framework/Headers/PPImage.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@

NS_ASSUME_NONNULL_BEGIN

/**
* Enum which describes text orientation on an image.
*/
typedef NS_ENUM(NSUInteger, PPProcessingOrientation){
/** Text oriented same as picture */
PPProcessingOrientationUp,
Expand Down
23 changes: 21 additions & 2 deletions MicroBlink.framework/Headers/PPImageMetadata.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ typedef NS_ENUM(NSUInteger, PPImageMetadataType) {


/**
* Debug images (and PPDebugMetadata) are only needed if you need to figure out what is not working as expected
* Debug images (and PPDebugMetadata) are only needed if you need to figure out what is not working as expected.
*/

/**
Expand All @@ -60,19 +60,38 @@ NS_ASSUME_NONNULL_BEGIN
*/
PP_CLASS_AVAILABLE_IOS(6.0) @interface PPImageMetadata : PPMetadata

/**
* Orientation with which contained UIImage was processed
*/
@property (nonatomic, assign, readonly) UIImageOrientation orientation;

/**
* Type of image returned.
*/
@property (nonatomic, readonly) PPImageMetadataType imageType;

/**
* Please use designated initializer.
*/
- (instancetype)init NS_UNAVAILABLE;

/**
* Please use designated initializer.
*/
- (instancetype)initWithName:(NSString *)name NS_UNAVAILABLE;

/**
* Creates new PPImageMetadata with desired parameters.
*/
- (instancetype)initWithName:(NSString *)name
orientation:(UIImageOrientation)orientation
imageType:(PPImageMetadataType)imageType NS_DESIGNATED_INITIALIZER;

- (UIImage*)image;
/**
* UIImage of returned PPImageMetadata.
* This image is lazy loaded.
*/
- (UIImage *)image;

@end

Expand Down
4 changes: 4 additions & 0 deletions MicroBlink.framework/Headers/PPMetadataSettings.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,10 @@ PP_CLASS_AVAILABLE_IOS(6.0) @interface PPMetadataSettings : NSObject <NSCopying>

@end

/**
* Settings for debuging various data.
* These settings can help you understand why something isn't working as expected.
*/
@interface PPDebugMetadata : NSObject <NSCopying>

/**
Expand Down
4 changes: 3 additions & 1 deletion MicroBlink.framework/Headers/PPMrtdDetectorSettings.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,9 @@ PP_CLASS_AVAILABLE_IOS(6.0) @interface PPMrtdDetectorSettings : PPQuadDetectorSe
*/
- (instancetype)init;

// Unavailable initializer from superclass
/**
* Unavailable initializer from superclass
*/
- (instancetype)initWithSettings:(DetectorSettingsImpl*)settings NS_UNAVAILABLE;

/**
Expand Down
3 changes: 3 additions & 0 deletions MicroBlink.framework/Headers/PPMyKadRecognizerResult.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@

NS_ASSUME_NONNULL_BEGIN

/**
* Result of scanning MyKad (Malaysian ID document).
*/
PP_CLASS_AVAILABLE_IOS(6.0) @interface PPMyKadRecognizerResult : PPRecognizerResult

/**
Expand Down
6 changes: 6 additions & 0 deletions MicroBlink.framework/Headers/PPOcrParserFactory.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,14 @@ typedef struct OcrParserFactoryImpl OcrParserFactoryImpl;
*/
PP_CLASS_AVAILABLE_IOS(6.0) @interface PPOcrParserFactory : NSObject

/**
* Internal parser factory.
*/
@property (nonatomic, readonly, assign) OcrParserFactoryImpl *factory;

/**
* Internal initializer. Please use default initializer.
*/
- (instancetype)initWithFactory:(struct OcrParserFactoryImpl *)factory;

/**
Expand Down
3 changes: 3 additions & 0 deletions MicroBlink.framework/Headers/PPOverlaySubview.h
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,9 @@ NS_ASSUME_NONNULL_BEGIN
PP_CLASS_AVAILABLE_IOS(6.0)
@interface PPOverlaySubview : UIView<PPOverlaySubview>

/**
* Sorts an array of CGPoint objects
*/
- (NSArray*)sortedPoints:(NSArray*)points;

@end
Expand Down
5 changes: 3 additions & 2 deletions MicroBlink.framework/Headers/PPOverlayViewController.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ NS_ASSUME_NONNULL_BEGIN
@class PPMetadata;
@class PPRecognizerResult;

//@protocol PPOverlayContainerViewController;


/**
Overlay View Controller is an abstract class for all overlay views placed on top PhotoPay's Camera View Controller.
Expand Down Expand Up @@ -180,6 +178,9 @@ PP_CLASS_AVAILABLE_IOS(6.0)
- (void)cameraViewController:(UIViewController<PPScanningViewController>*)cameraViewController
didPublishProgress:(CGFloat)progress;

/**
* Camera view reports the start of detection cycle.
*/
- (void)cameraViewControllerDidStartDetection:(UIViewController<PPScanningViewController> *)cameraViewController;

/**
Expand Down
2 changes: 1 addition & 1 deletion MicroBlink.framework/Headers/PPPointsDetectorResult.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ PP_CLASS_AVAILABLE_IOS(6.0)
@interface PPPointsDetectorResult : PPDetectorResult

/**
* Coordinates of points of a detected object
* Coordinates of points (CGPoint) of a detected object.
*/
@property (nonatomic) NSArray *points;

Expand Down
2 changes: 1 addition & 1 deletion MicroBlink.framework/Headers/PPPriceOcrParserFactory.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#import "PPOcrParserFactory.h"

/**
* Parses transaction amount on invoices
* Parses various transaction amount formats on invoices.
*/
PP_CLASS_AVAILABLE_IOS(6.0) @interface PPPriceOcrParserFactory : PPOcrParserFactory

Expand Down
6 changes: 4 additions & 2 deletions MicroBlink.framework/Headers/PPQuadDetectorResult.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,15 @@
NS_ASSUME_NONNULL_BEGIN

/**
* Result of the detection of a Quad detector
* Result of the detection of a Quad detector.
* Quad results are results of detecting various rectangular objects.
*/
PP_CLASS_AVAILABLE_IOS(6.0)
@interface PPQuadDetectorResult : PPDetectorResult

/**
* Exact location of detected object on image
* Exact location of detected object on image.
* Contains 4 points of detected object's corners.
*/
@property (nonatomic) PPQuadrangle* detectionLocation;

Expand Down
3 changes: 3 additions & 0 deletions MicroBlink.framework/Headers/PPQuadrangle.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ PP_CLASS_AVAILABLE_IOS(6.0) @interface PPQuadrangle : NSObject
*/
- (NSArray *)toPointsArray;

/**
* Creates new quadrangle from this quadrangle, transformed by specified affine transformation.
*/
- (instancetype)quadrangleWithTransformation:(CGAffineTransform)transform;

@end
Expand Down
Loading

0 comments on commit 07e92e7

Please sign in to comment.