//
//  LKFBatchFileExecutionParameters.swift
//  lkfc
//
//  Created by Alexander Holzer on 11.06.18.
//  Copyright © 2018 Alexander Holzer. All rights reserved.
//

import Foundation

public enum LKFBatchDifferenceMode {
    case disable
    case enable
    case print
}

public enum LKFBatchErrorFileMode {
    case disable
    case write
    case writeToResult
    case compare
    case compareAndWriteToResult
}

public class LKFBatchFileExecutionParameters {
    public let outPath: URL
    public var createTestOutput = false
    public var compareMode = LKFBatchDifferenceMode.disable
    public var keepContext = false
    public var rootPath : String?
    public var anonymization: LKFAnonymizationSettings?
    public var comparePath: URL?
    public var statOnly = false
    public var includeStat = true
    public var year : UInt32 = 0
    public var model : UInt32 = 0
    public var errorFiles = LKFBatchErrorFileMode.write
    public var removeBM = false
    public var contextFlags : Int32?
    public var unloadStamm = false
    public var debugMemoryConfig: LKFBatchFileDebugMemoryConfig? = nil
    
    public var errorFilePrefix = "CE1|"
    public var warningFilePrefix = "CW1|"
    public var infoFilePrefix = "CI1|"
    
    public init(outPath: URL) {
        self.outPath = outPath
    }
}

public class LKFBatchFileExecutionParametersForTest : LKFBatchFileExecutionParameters {
    public override init(outPath: URL) {
        super.init(outPath: outPath)
        createTestOutput = true
        compareMode = .print
    }
}

public class LKFBatchFileDebugMemoryConfig {
    
    let returnMemoryTracker : Bool
    var memoryTracker : LKFMemoryTracker?
    
    
    init (returnMemoryTracker: Bool = false) {
        self.returnMemoryTracker = returnMemoryTracker
    }
}

