<commit_before>//
//  SECGraphicStyle.swift
//  SwiftyEcharts
//
//  Created by <NAME> on 11/02/2017.
//  Copyright © 2017 com.pluto-y. All rights reserved.
//

public protocol SECGraphicStyle : SECShadowable {
    var fill: SECColor? { get set }
    var stroke: SECColor? { get set }
    var lineWidth: Float? { get set }
}

public struct SECCommonGraphicStyle : SECGraphicStyle {
    public var fill: SECColor?
    public var stroke: SECColor?
    public var lineWidth: Float?
    public var shadowBlur: Float?
    public var shadowOffsetX: Float?
    public var shadowOffsetY: Float?
    public var shadowColor: SECColor?
}<commit_msg>Make `SECCommonGraphicStyle` conform to `SECEnumable` an `SECMappable`<commit_after>//
//  SECGraphicStyle.swift
//  SwiftyEcharts
//
//  Created by <NAME> on 11/02/2017.
//  Copyright © 2017 com.pluto-y. All rights reserved.
//

public protocol SECGraphicStyle : SECShadowable {
    var fill: SECColor? { get set }
    var stroke: SECColor? { get set }
    var lineWidth: Float? { get set }
}

public struct SECCommonGraphicStyle : SECGraphicStyle {
    public var fill: SECColor?
    public var stroke: SECColor?
    public var lineWidth: Float?
    public var shadowBlur: Float?
    public var shadowOffsetX: Float?
    public var shadowOffsetY: Float?
    public var shadowColor: SECColor?
    
    public init() {}
}

extension SECCommonGraphicStyle : SECEnumable {
    public enum Enums {
        case fill(SECColor), stroke(SECColor), lineWidth(Float), shadowBlur(Float), shadowOffsetX(Float), shadowOffsetY(Float), shadowColor(SECColor)
    }
    
    public typealias ContentEnum = Enums
    
    public init(_ elements: Enums...) {
        for ele in elements {
            switch ele {
            case let .fill(fill):
                self.fill = fill
            case let .stroke(stroke):
                self.stroke = stroke
            case let .lineWidth(lineWidth):
                self.lineWidth = lineWidth
            case let .shadowBlur(shadowBlur):
                self.shadowBlur = shadowBlur
            case let .shadowOffsetX(shadowOffsetX):
                self.shadowOffsetX = shadowOffsetX
            case let .shadowOffsetY(shadowOffsetY):
                self.shadowOffsetY = shadowOffsetY
            case let .shadowColor(shadowColor):
                self.shadowColor = shadowColor
            }
        }
    }
}

extension SECCommonGraphicStyle : SECMappable {
    public func mapping(map: SECMap) {
        map["fill"] = fill
        map["stroke"] = stroke
        map["lineWidth"] = lineWidth
        map["shadowBlur"] = shadowBlur
        map["shadowOffsetX"] = shadowOffsetX
        map["shadowOffsetY"] = shadowOffsetY
        map["shadowColor"] = shadowColor
    }
}
{'fraction_non_alphanumeric': 0.0920669577874818, 'fraction_numerical': 0.008733624454148471, 'mean_word_length': 2.4665825977301385, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3012114', 'n_tokens_mistral': 815, 'n_tokens_neox': 795, 'n_words': 224}