-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from xremix/develop
v0.2.0 Logic Refactoring
- Loading branch information
Showing
10 changed files
with
229 additions
and
103 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
// | ||
// GS1Node.swift | ||
// SwiftGS1Barcode | ||
// | ||
// Created by Toni Hoffmann on 26.06.17. | ||
// Copyright © 2017 Toni Hoffmann. All rights reserved. | ||
// | ||
|
||
import UIKit | ||
|
||
enum GS1Type: String{ | ||
case Date | ||
case String | ||
case Int | ||
var description: String{ | ||
return self.rawValue | ||
} | ||
} | ||
|
||
class GS1Node: NSObject{ | ||
var identifier: String | ||
var maxLength: Int | ||
var dynamicLength: Bool = false | ||
|
||
var type: GS1Type? | ||
|
||
var originalValue: String? | ||
var dateValue: NSDate? | ||
var intValue: Int? | ||
|
||
var stringValue: String? | ||
|
||
init(_ identifier: String, length: Int){ | ||
self.identifier = identifier | ||
self.maxLength = length | ||
} | ||
convenience init(_ identifier: String, length: Int, type: GS1Type){ | ||
self.init(identifier, length: length) | ||
self.type = type | ||
} | ||
convenience init(_ identifier: String, length: Int, type: GS1Type, dynamicLength: Bool){ | ||
self.init(identifier, length: length, type: type) | ||
self.dynamicLength = dynamicLength | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.