-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
110 additions
and
9 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
// | ||
// IcebergType.swift | ||
// DXFeedFramework | ||
// | ||
// Created by Aleksey Kosylo on 11.10.23. | ||
// | ||
|
||
import Foundation | ||
|
||
/// Type of an iceberg order. | ||
public enum IcebergType: Int, CaseIterable { | ||
/// Iceberg type is undefined, unknown or inapplicable. | ||
case undefined = 0 | ||
/// Represents native (exchange-managed) iceberg type. | ||
case native | ||
/// Represents synthetic (managed outside of the exchange) iceberg type. | ||
case synthetic | ||
} | ||
|
||
/// Class extension for ``IcebergType`` enum. | ||
public class IcebergTypeExt { | ||
private static let values: [IcebergType] = | ||
EnumUtil.createEnumBitMaskArrayByValue(defaultValue: .undefined, allCases: IcebergType.allCases) | ||
|
||
|
||
/// Returns an enum constant of the``IcebergType`` by integer code bit pattern. | ||
/// - Parameters: | ||
/// - value: Property value | ||
/// - Returns: The enum constant of the specified enum type with the specified value | ||
public static func valueOf(value: Int) -> IcebergType { | ||
return values[value] | ||
} | ||
} |
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