0001    // PropertyDescription.swift
0002    //
0003    // Copyright (c) 2015 Oven Bits, LLC
0004    //
0005    // Permission is hereby granted, free of charge, to any person obtaining a copy
0006    // of this software and associated documentation files (the "Software"), to deal
0007    // in the Software without restriction, including without limitation the rights
0008    // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
0009    // copies of the Software, and to permit persons to whom the Software is
0010    // furnished to do so, subject to the following conditions:
0011    //
0012    // The above copyright notice and this permission notice shall be included in all
0013    // copies or substantial portions of the Software.
0014    //
0015    // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
0016    // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
0017    // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
0018    // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
0019    // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
0020    // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
0021    // SOFTWARE.
0022    
0023    import Foundation
0024    
0025    public protocol PropertyDescription
Model.swift:27
    private var JSONMappings: [PropertyDescription] {
Model.swift:32
    private func inspect(mirror: Mirror, _ mappings: [PropertyDescription] = []) -> [PropertyDescription] {
Model.swift:32
    private func inspect(mirror: Mirror, _ mappings: [PropertyDescription] = []) -> [PropertyDescription] {
Model.swift:40
        mappings += mirror.children.flatMap { $0.value as? PropertyDescription }
Property.swift:25
final public class Property<T : JSONTransformable>: PropertyDescription {
PropertyArray.swift:25
final public class PropertyArray<T : JSONTransformable>: PropertyDescription {
PropertyDictionary.swift:25
final public class PropertyDictionary<T : JSONTransformable>: PropertyDescription {
{ 0026 0027 /// JSON parameter key 0028 var key
Model.swift:116
            let components = map.key.componentsSeparatedByString(".")
Model.swift:129
                dictionary[map.key] = value
: String { get } 0029 0030 /// Type information 0031 var type: String { get } 0032 0033 /// Specify whether value is required 0034 var required
Model.swift:67
            if map.required && !validObject {
: Bool { get } 0035 0036 /// Extract object from JSON and return whether or not the value was extracted 0037 func fromJSON
Model.swift:53
        JSONMappings.forEach { $0.fromJSON(json) }
Model.swift:65
            let validObject = map.fromJSON(strictJSON)
(json: JSON) -> Bool 0038 0039 /// Convert object to JSON 0040 func toJSON
Model.swift:118
                if let value: AnyObject = map.toJSON() {
Model.swift:128
            else if let value: AnyObject = map.toJSON() {
() -> AnyObject? 0041 0042 /// Encode object for NSCoder 0043 func encode
Model.swift:150
        JSONMappings.forEach { $0.encode(aCoder) }
(coder: NSCoder) 0044 0045 /// Encode object from NSCoder 0046 func decode
Model.swift:146
        JSONMappings.forEach { $0.decode(aDecoder) }
(decoder: NSCoder) 0047 0048 /// After the whole Model object has been initialized and its Property properties initalized fromJSON(), 0049 /// invoked to permit further post-processing of the Property that may depend upon other information from the 0050 /// whole of the Model object. 0051 func initPostProcess
Model.swift:54
        JSONMappings.forEach { $0.initPostProcess() }
Model.swift:85
        JSONMappings.forEach { $0.initPostProcess() }
() 0052 }