From 171847d8a8105038d7d88214f1297b0312ebde4d Mon Sep 17 00:00:00 2001 From: Kyle Date: Sun, 10 Mar 2024 17:14:03 +0800 Subject: [PATCH] [Optimize] Provide default value for options --- .../arm64-apple-ios.swiftinterface | 36 +++++++++---------- .../arm64e-apple-ios.swiftinterface | 36 +++++++++---------- .../arm64-apple-ios-simulator.swiftinterface | 36 +++++++++---------- .../x86_64-apple-ios-simulator.swiftinterface | 36 +++++++++---------- .../arm64-apple-macos.swiftinterface | 36 +++++++++---------- .../arm64e-apple-macos.swiftinterface | 36 +++++++++---------- .../x86_64-apple-macos.swiftinterface | 36 +++++++++---------- .../template.swiftinterface | 36 +++++++++---------- .../Attribute/Attribute/Attribute.swift | 12 +++---- .../Attribute/Attribute/OGAttribute.swift | 6 ++-- .../Indirect/IndirectAttribute.swift | 2 +- .../Optional/OptionalAttribute.swift | 2 +- .../Attribute/Rule/AnyRuleContext.swift | 4 +-- Sources/OpenGraph/Attribute/Rule/Rule.swift | 6 ++-- .../Attribute/Rule/RuleContext.swift | 4 +-- .../Attribute/Weak/WeakAttribute.swift | 2 +- 16 files changed, 163 insertions(+), 163 deletions(-) diff --git a/AG/AttributeGraph.xcframework/ios-arm64-arm64e/AttributeGraph.framework/Modules/AttributeGraph.swiftmodule/arm64-apple-ios.swiftinterface b/AG/AttributeGraph.xcframework/ios-arm64-arm64e/AttributeGraph.framework/Modules/AttributeGraph.swiftmodule/arm64-apple-ios.swiftinterface index 9178400..8be7e2c 100644 --- a/AG/AttributeGraph.xcframework/ios-arm64-arm64e/AttributeGraph.framework/Modules/AttributeGraph.swiftmodule/arm64-apple-ios.swiftinterface +++ b/AG/AttributeGraph.xcframework/ios-arm64-arm64e/AttributeGraph.framework/Modules/AttributeGraph.swiftmodule/arm64-apple-ios.swiftinterface @@ -18,11 +18,11 @@ extension AGAttribute { public static var current: AGAttribute? { get } public func unsafeOffset(at offset: Int) -> AGAttribute public func setFlags(_ newFlags: AGAttributeFlags, mask: AGAttributeFlags) - public func addInput(_ attribute: AGAttribute, options: AGInputOptions, token: Swift.Int) - public func addInput(_ attribute: AttributeGraph.Attribute, options: AGInputOptions, token: Int) + public func addInput(_ attribute: AGAttribute, options: AGInputOptions = [], token: Swift.Int) + public func addInput(_ attribute: AttributeGraph.Attribute, options: AGInputOptions = [], token: Int) public func visitBody(_ visitor: inout Visitor); public func mutateBody(as: Value.Type, invalidating: Swift.Bool, _ body: (inout Value) -> ()) - public func breadthFirstSearch(options: AGSearchOptions, _: (AGAttribute) -> Swift.Bool) -> Swift.Bool + public func breadthFirstSearch(options: AGSearchOptions = [], _: (AGAttribute) -> Swift.Bool) -> Swift.Bool public var _bodyType: Any.Type { get } public var _bodyPointer: UnsafeRawPointer { get } public var valueType: Any.Type { get } @@ -61,15 +61,15 @@ public struct Attribute { public func applying(offset: AttributeGraph.PointerOffset) -> AttributeGraph.Attribute public func visitBody(_ visitor: inout Body) public func mutateBody(as type: V.Type, invalidating: Swift.Bool, _ body: (inout V) -> Swift.Void) - public func breadthFirstSearch(options: AGSearchOptions, _ body: (AGAttribute) -> Swift.Bool) -> Swift.Bool + public func breadthFirstSearch(options: AGSearchOptions = [], _ body: (AGAttribute) -> Swift.Bool) -> Swift.Bool public var graph: AGGraph { get } public var subgraph: AGSubgraph { get } public var value: Value { unsafeAddress set } public var valueState: AGValueState { get } - public func valueAndFlags(options: AGValueOptions) -> (value: Value, flags: AGChangedValueFlags) - public func changedValue(options: AGValueOptions) -> (value: Value, changed: Bool) + public func valueAndFlags(options: AGValueOptions = []) -> (value: Value, flags: AGChangedValueFlags) + public func changedValue(options: AGValueOptions = []) -> (value: Value, changed: Bool) public func setValue(_ value: Value) -> Bool public var hasValue: Bool { get } public func updateValue() @@ -77,8 +77,8 @@ public struct Attribute { public func invalidateValue() public func validate() - public func addInput(_ attribute: AGAttribute, options: AGInputOptions, token: Swift.Int) - public func addInput(_ attribute: AttributeGraph.Attribute, options: AGInputOptions, token: Int) + public func addInput(_ attribute: AGAttribute, options: AGInputOptions = [], token: Swift.Int) + public func addInput(_ attribute: AttributeGraph.Attribute, options: AGInputOptions = [], token: Int) public var flags: AGAttributeFlags { get _modify } public func setFlags(_ newFlags: AGAttributeFlags, mask: AGAttributeFlags) @@ -178,7 +178,7 @@ public struct WeakAttribute { public subscript(dynamicMember keyPath: Swift.KeyPath) -> AttributeGraph.Attribute? { get } public var attribute: AttributeGraph.Attribute? { get set _modify } public var value: Value? { get } - public func changedValue(options: AGValueOptions) -> (value: Value, changed: Swift.Bool)? + public func changedValue(options: AGValueOptions = []) -> (value: Value, changed: Swift.Bool)? } extension AttributeGraph.WeakAttribute: Swift.Hashable { @@ -226,7 +226,7 @@ public struct OptionalAttribute { public init(_ weakAttribute: AttributeGraph.WeakAttribute) public var attribute: AttributeGraph.Attribute? { get set _modify } public var value: Value? { get } - public func changedValue(options: AGValueOptions) -> (value: Value, changed: Bool)? + public func changedValue(options: AGValueOptions = []) -> (value: Value, changed: Bool)? public func map(_ body: (AttributeGraph.Attribute) -> V) -> V? public var wrappedValue: Value? { get } public var projectedValue: Attribute? { get set _modify } @@ -266,7 +266,7 @@ public struct IndirectAttribute { nonmutating set nonmutating _modify } - public func changedValue(options: AGValueOptions) -> (value: Value, changed: Bool) + public func changedValue(options: AGValueOptions = []) -> (value: Value, changed: Bool) public var wrappedValue: Value { get nonmutating set @@ -413,17 +413,17 @@ extension AttributeGraph.Rule { extension AttributeGraph.Rule where Self: Swift.Hashable { public func cachedValueIfExists( - options: AGCachedValueOptions, + options: AGCachedValueOptions = [], owner: AGAttribute? ) -> Value? public func cachedValue( - options: AGCachedValueOptions, + options: AGCachedValueOptions = [], owner: AGAttribute? ) -> Value public static func _cachedValue( - options: AGCachedValueOptions, + options: AGCachedValueOptions = [], owner: AGAttribute?, hashValue: Swift.Int, bodyPtr: Swift.UnsafeRawPointer, @@ -463,8 +463,8 @@ public struct RuleContext { // public subscript(optionalAttribute: OptionalAttribute) -> V? { get } public var value: Value { unsafeAddress nonmutating set } public var hasValue: Bool - public func valueAndFlags(of input: AttributeGraph.Attribute, options: AGValueOptions) -> (value: V, flags: AGChangedValueFlags) - public func changedValue(of input: AttributeGraph.Attribute, options: AGValueOptions) -> (value: V, changed: Swift.Bool) + public func valueAndFlags(of input: AttributeGraph.Attribute, options: AGValueOptions = []) -> (value: V, flags: AGChangedValueFlags) + public func changedValue(of input: AttributeGraph.Attribute, options: AGValueOptions = []) -> (value: V, changed: Swift.Bool) public func update(body: () -> Void) } @@ -478,8 +478,8 @@ public struct AnyRuleContext { public subscript(attribute: Attribute) -> V { unsafeAddress } // public subscript(weakAttribute: WeakAttribute) -> V? { get } // public subscript(optionalAttribute: OptionalAttribute) -> V? { get } - public func valueAndFlags(of input: AttributeGraph.Attribute, options: AGValueOptions) -> (value: V, flags: AGChangedValueFlags) - public func changedValue(of input: AttributeGraph.Attribute, options: AGValueOptions) -> (value: V, changed: Swift.Bool) + public func valueAndFlags(of input: AttributeGraph.Attribute, options: AGValueOptions = []) -> (value: V, flags: AGChangedValueFlags) + public func changedValue(of input: AttributeGraph.Attribute, options: AGValueOptions = []) -> (value: V, changed: Swift.Bool) public func update(body: () -> Void) public func unsafeCast(to _: V.Type) -> AttributeGraph.RuleContext } diff --git a/AG/AttributeGraph.xcframework/ios-arm64-arm64e/AttributeGraph.framework/Modules/AttributeGraph.swiftmodule/arm64e-apple-ios.swiftinterface b/AG/AttributeGraph.xcframework/ios-arm64-arm64e/AttributeGraph.framework/Modules/AttributeGraph.swiftmodule/arm64e-apple-ios.swiftinterface index 9178400..8be7e2c 100644 --- a/AG/AttributeGraph.xcframework/ios-arm64-arm64e/AttributeGraph.framework/Modules/AttributeGraph.swiftmodule/arm64e-apple-ios.swiftinterface +++ b/AG/AttributeGraph.xcframework/ios-arm64-arm64e/AttributeGraph.framework/Modules/AttributeGraph.swiftmodule/arm64e-apple-ios.swiftinterface @@ -18,11 +18,11 @@ extension AGAttribute { public static var current: AGAttribute? { get } public func unsafeOffset(at offset: Int) -> AGAttribute public func setFlags(_ newFlags: AGAttributeFlags, mask: AGAttributeFlags) - public func addInput(_ attribute: AGAttribute, options: AGInputOptions, token: Swift.Int) - public func addInput(_ attribute: AttributeGraph.Attribute, options: AGInputOptions, token: Int) + public func addInput(_ attribute: AGAttribute, options: AGInputOptions = [], token: Swift.Int) + public func addInput(_ attribute: AttributeGraph.Attribute, options: AGInputOptions = [], token: Int) public func visitBody(_ visitor: inout Visitor); public func mutateBody(as: Value.Type, invalidating: Swift.Bool, _ body: (inout Value) -> ()) - public func breadthFirstSearch(options: AGSearchOptions, _: (AGAttribute) -> Swift.Bool) -> Swift.Bool + public func breadthFirstSearch(options: AGSearchOptions = [], _: (AGAttribute) -> Swift.Bool) -> Swift.Bool public var _bodyType: Any.Type { get } public var _bodyPointer: UnsafeRawPointer { get } public var valueType: Any.Type { get } @@ -61,15 +61,15 @@ public struct Attribute { public func applying(offset: AttributeGraph.PointerOffset) -> AttributeGraph.Attribute public func visitBody(_ visitor: inout Body) public func mutateBody(as type: V.Type, invalidating: Swift.Bool, _ body: (inout V) -> Swift.Void) - public func breadthFirstSearch(options: AGSearchOptions, _ body: (AGAttribute) -> Swift.Bool) -> Swift.Bool + public func breadthFirstSearch(options: AGSearchOptions = [], _ body: (AGAttribute) -> Swift.Bool) -> Swift.Bool public var graph: AGGraph { get } public var subgraph: AGSubgraph { get } public var value: Value { unsafeAddress set } public var valueState: AGValueState { get } - public func valueAndFlags(options: AGValueOptions) -> (value: Value, flags: AGChangedValueFlags) - public func changedValue(options: AGValueOptions) -> (value: Value, changed: Bool) + public func valueAndFlags(options: AGValueOptions = []) -> (value: Value, flags: AGChangedValueFlags) + public func changedValue(options: AGValueOptions = []) -> (value: Value, changed: Bool) public func setValue(_ value: Value) -> Bool public var hasValue: Bool { get } public func updateValue() @@ -77,8 +77,8 @@ public struct Attribute { public func invalidateValue() public func validate() - public func addInput(_ attribute: AGAttribute, options: AGInputOptions, token: Swift.Int) - public func addInput(_ attribute: AttributeGraph.Attribute, options: AGInputOptions, token: Int) + public func addInput(_ attribute: AGAttribute, options: AGInputOptions = [], token: Swift.Int) + public func addInput(_ attribute: AttributeGraph.Attribute, options: AGInputOptions = [], token: Int) public var flags: AGAttributeFlags { get _modify } public func setFlags(_ newFlags: AGAttributeFlags, mask: AGAttributeFlags) @@ -178,7 +178,7 @@ public struct WeakAttribute { public subscript(dynamicMember keyPath: Swift.KeyPath) -> AttributeGraph.Attribute? { get } public var attribute: AttributeGraph.Attribute? { get set _modify } public var value: Value? { get } - public func changedValue(options: AGValueOptions) -> (value: Value, changed: Swift.Bool)? + public func changedValue(options: AGValueOptions = []) -> (value: Value, changed: Swift.Bool)? } extension AttributeGraph.WeakAttribute: Swift.Hashable { @@ -226,7 +226,7 @@ public struct OptionalAttribute { public init(_ weakAttribute: AttributeGraph.WeakAttribute) public var attribute: AttributeGraph.Attribute? { get set _modify } public var value: Value? { get } - public func changedValue(options: AGValueOptions) -> (value: Value, changed: Bool)? + public func changedValue(options: AGValueOptions = []) -> (value: Value, changed: Bool)? public func map(_ body: (AttributeGraph.Attribute) -> V) -> V? public var wrappedValue: Value? { get } public var projectedValue: Attribute? { get set _modify } @@ -266,7 +266,7 @@ public struct IndirectAttribute { nonmutating set nonmutating _modify } - public func changedValue(options: AGValueOptions) -> (value: Value, changed: Bool) + public func changedValue(options: AGValueOptions = []) -> (value: Value, changed: Bool) public var wrappedValue: Value { get nonmutating set @@ -413,17 +413,17 @@ extension AttributeGraph.Rule { extension AttributeGraph.Rule where Self: Swift.Hashable { public func cachedValueIfExists( - options: AGCachedValueOptions, + options: AGCachedValueOptions = [], owner: AGAttribute? ) -> Value? public func cachedValue( - options: AGCachedValueOptions, + options: AGCachedValueOptions = [], owner: AGAttribute? ) -> Value public static func _cachedValue( - options: AGCachedValueOptions, + options: AGCachedValueOptions = [], owner: AGAttribute?, hashValue: Swift.Int, bodyPtr: Swift.UnsafeRawPointer, @@ -463,8 +463,8 @@ public struct RuleContext { // public subscript(optionalAttribute: OptionalAttribute) -> V? { get } public var value: Value { unsafeAddress nonmutating set } public var hasValue: Bool - public func valueAndFlags(of input: AttributeGraph.Attribute, options: AGValueOptions) -> (value: V, flags: AGChangedValueFlags) - public func changedValue(of input: AttributeGraph.Attribute, options: AGValueOptions) -> (value: V, changed: Swift.Bool) + public func valueAndFlags(of input: AttributeGraph.Attribute, options: AGValueOptions = []) -> (value: V, flags: AGChangedValueFlags) + public func changedValue(of input: AttributeGraph.Attribute, options: AGValueOptions = []) -> (value: V, changed: Swift.Bool) public func update(body: () -> Void) } @@ -478,8 +478,8 @@ public struct AnyRuleContext { public subscript(attribute: Attribute) -> V { unsafeAddress } // public subscript(weakAttribute: WeakAttribute) -> V? { get } // public subscript(optionalAttribute: OptionalAttribute) -> V? { get } - public func valueAndFlags(of input: AttributeGraph.Attribute, options: AGValueOptions) -> (value: V, flags: AGChangedValueFlags) - public func changedValue(of input: AttributeGraph.Attribute, options: AGValueOptions) -> (value: V, changed: Swift.Bool) + public func valueAndFlags(of input: AttributeGraph.Attribute, options: AGValueOptions = []) -> (value: V, flags: AGChangedValueFlags) + public func changedValue(of input: AttributeGraph.Attribute, options: AGValueOptions = []) -> (value: V, changed: Swift.Bool) public func update(body: () -> Void) public func unsafeCast(to _: V.Type) -> AttributeGraph.RuleContext } diff --git a/AG/AttributeGraph.xcframework/ios-arm64-x86_64-simulator/AttributeGraph.framework/Modules/AttributeGraph.swiftmodule/arm64-apple-ios-simulator.swiftinterface b/AG/AttributeGraph.xcframework/ios-arm64-x86_64-simulator/AttributeGraph.framework/Modules/AttributeGraph.swiftmodule/arm64-apple-ios-simulator.swiftinterface index 5d25a1f..44e5aa3 100644 --- a/AG/AttributeGraph.xcframework/ios-arm64-x86_64-simulator/AttributeGraph.framework/Modules/AttributeGraph.swiftmodule/arm64-apple-ios-simulator.swiftinterface +++ b/AG/AttributeGraph.xcframework/ios-arm64-x86_64-simulator/AttributeGraph.framework/Modules/AttributeGraph.swiftmodule/arm64-apple-ios-simulator.swiftinterface @@ -18,11 +18,11 @@ extension AGAttribute { public static var current: AGAttribute? { get } public func unsafeOffset(at offset: Int) -> AGAttribute public func setFlags(_ newFlags: AGAttributeFlags, mask: AGAttributeFlags) - public func addInput(_ attribute: AGAttribute, options: AGInputOptions, token: Swift.Int) - public func addInput(_ attribute: AttributeGraph.Attribute, options: AGInputOptions, token: Int) + public func addInput(_ attribute: AGAttribute, options: AGInputOptions = [], token: Swift.Int) + public func addInput(_ attribute: AttributeGraph.Attribute, options: AGInputOptions = [], token: Int) public func visitBody(_ visitor: inout Visitor); public func mutateBody(as: Value.Type, invalidating: Swift.Bool, _ body: (inout Value) -> ()) - public func breadthFirstSearch(options: AGSearchOptions, _: (AGAttribute) -> Swift.Bool) -> Swift.Bool + public func breadthFirstSearch(options: AGSearchOptions = [], _: (AGAttribute) -> Swift.Bool) -> Swift.Bool public var _bodyType: Any.Type { get } public var _bodyPointer: UnsafeRawPointer { get } public var valueType: Any.Type { get } @@ -61,15 +61,15 @@ public struct Attribute { public func applying(offset: AttributeGraph.PointerOffset) -> AttributeGraph.Attribute public func visitBody(_ visitor: inout Body) public func mutateBody(as type: V.Type, invalidating: Swift.Bool, _ body: (inout V) -> Swift.Void) - public func breadthFirstSearch(options: AGSearchOptions, _ body: (AGAttribute) -> Swift.Bool) -> Swift.Bool + public func breadthFirstSearch(options: AGSearchOptions = [], _ body: (AGAttribute) -> Swift.Bool) -> Swift.Bool public var graph: AGGraph { get } public var subgraph: AGSubgraph { get } public var value: Value { unsafeAddress set } public var valueState: AGValueState { get } - public func valueAndFlags(options: AGValueOptions) -> (value: Value, flags: AGChangedValueFlags) - public func changedValue(options: AGValueOptions) -> (value: Value, changed: Bool) + public func valueAndFlags(options: AGValueOptions = []) -> (value: Value, flags: AGChangedValueFlags) + public func changedValue(options: AGValueOptions = []) -> (value: Value, changed: Bool) public func setValue(_ value: Value) -> Bool public var hasValue: Bool { get } public func updateValue() @@ -77,8 +77,8 @@ public struct Attribute { public func invalidateValue() public func validate() - public func addInput(_ attribute: AGAttribute, options: AGInputOptions, token: Swift.Int) - public func addInput(_ attribute: AttributeGraph.Attribute, options: AGInputOptions, token: Int) + public func addInput(_ attribute: AGAttribute, options: AGInputOptions = [], token: Swift.Int) + public func addInput(_ attribute: AttributeGraph.Attribute, options: AGInputOptions = [], token: Int) public var flags: AGAttributeFlags { get _modify } public func setFlags(_ newFlags: AGAttributeFlags, mask: AGAttributeFlags) @@ -178,7 +178,7 @@ public struct WeakAttribute { public subscript(dynamicMember keyPath: Swift.KeyPath) -> AttributeGraph.Attribute? { get } public var attribute: AttributeGraph.Attribute? { get set _modify } public var value: Value? { get } - public func changedValue(options: AGValueOptions) -> (value: Value, changed: Swift.Bool)? + public func changedValue(options: AGValueOptions = []) -> (value: Value, changed: Swift.Bool)? } extension AttributeGraph.WeakAttribute: Swift.Hashable { @@ -226,7 +226,7 @@ public struct OptionalAttribute { public init(_ weakAttribute: AttributeGraph.WeakAttribute) public var attribute: AttributeGraph.Attribute? { get set _modify } public var value: Value? { get } - public func changedValue(options: AGValueOptions) -> (value: Value, changed: Bool)? + public func changedValue(options: AGValueOptions = []) -> (value: Value, changed: Bool)? public func map(_ body: (AttributeGraph.Attribute) -> V) -> V? public var wrappedValue: Value? { get } public var projectedValue: Attribute? { get set _modify } @@ -266,7 +266,7 @@ public struct IndirectAttribute { nonmutating set nonmutating _modify } - public func changedValue(options: AGValueOptions) -> (value: Value, changed: Bool) + public func changedValue(options: AGValueOptions = []) -> (value: Value, changed: Bool) public var wrappedValue: Value { get nonmutating set @@ -413,17 +413,17 @@ extension AttributeGraph.Rule { extension AttributeGraph.Rule where Self: Swift.Hashable { public func cachedValueIfExists( - options: AGCachedValueOptions, + options: AGCachedValueOptions = [], owner: AGAttribute? ) -> Value? public func cachedValue( - options: AGCachedValueOptions, + options: AGCachedValueOptions = [], owner: AGAttribute? ) -> Value public static func _cachedValue( - options: AGCachedValueOptions, + options: AGCachedValueOptions = [], owner: AGAttribute?, hashValue: Swift.Int, bodyPtr: Swift.UnsafeRawPointer, @@ -463,8 +463,8 @@ public struct RuleContext { // public subscript(optionalAttribute: OptionalAttribute) -> V? { get } public var value: Value { unsafeAddress nonmutating set } public var hasValue: Bool - public func valueAndFlags(of input: AttributeGraph.Attribute, options: AGValueOptions) -> (value: V, flags: AGChangedValueFlags) - public func changedValue(of input: AttributeGraph.Attribute, options: AGValueOptions) -> (value: V, changed: Swift.Bool) + public func valueAndFlags(of input: AttributeGraph.Attribute, options: AGValueOptions = []) -> (value: V, flags: AGChangedValueFlags) + public func changedValue(of input: AttributeGraph.Attribute, options: AGValueOptions = []) -> (value: V, changed: Swift.Bool) public func update(body: () -> Void) } @@ -478,8 +478,8 @@ public struct AnyRuleContext { public subscript(attribute: Attribute) -> V { unsafeAddress } // public subscript(weakAttribute: WeakAttribute) -> V? { get } // public subscript(optionalAttribute: OptionalAttribute) -> V? { get } - public func valueAndFlags(of input: AttributeGraph.Attribute, options: AGValueOptions) -> (value: V, flags: AGChangedValueFlags) - public func changedValue(of input: AttributeGraph.Attribute, options: AGValueOptions) -> (value: V, changed: Swift.Bool) + public func valueAndFlags(of input: AttributeGraph.Attribute, options: AGValueOptions = []) -> (value: V, flags: AGChangedValueFlags) + public func changedValue(of input: AttributeGraph.Attribute, options: AGValueOptions = []) -> (value: V, changed: Swift.Bool) public func update(body: () -> Void) public func unsafeCast(to _: V.Type) -> AttributeGraph.RuleContext } diff --git a/AG/AttributeGraph.xcframework/ios-arm64-x86_64-simulator/AttributeGraph.framework/Modules/AttributeGraph.swiftmodule/x86_64-apple-ios-simulator.swiftinterface b/AG/AttributeGraph.xcframework/ios-arm64-x86_64-simulator/AttributeGraph.framework/Modules/AttributeGraph.swiftmodule/x86_64-apple-ios-simulator.swiftinterface index 96bb2a3..8f3a7e7 100644 --- a/AG/AttributeGraph.xcframework/ios-arm64-x86_64-simulator/AttributeGraph.framework/Modules/AttributeGraph.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +++ b/AG/AttributeGraph.xcframework/ios-arm64-x86_64-simulator/AttributeGraph.framework/Modules/AttributeGraph.swiftmodule/x86_64-apple-ios-simulator.swiftinterface @@ -18,11 +18,11 @@ extension AGAttribute { public static var current: AGAttribute? { get } public func unsafeOffset(at offset: Int) -> AGAttribute public func setFlags(_ newFlags: AGAttributeFlags, mask: AGAttributeFlags) - public func addInput(_ attribute: AGAttribute, options: AGInputOptions, token: Swift.Int) - public func addInput(_ attribute: AttributeGraph.Attribute, options: AGInputOptions, token: Int) + public func addInput(_ attribute: AGAttribute, options: AGInputOptions = [], token: Swift.Int) + public func addInput(_ attribute: AttributeGraph.Attribute, options: AGInputOptions = [], token: Int) public func visitBody(_ visitor: inout Visitor); public func mutateBody(as: Value.Type, invalidating: Swift.Bool, _ body: (inout Value) -> ()) - public func breadthFirstSearch(options: AGSearchOptions, _: (AGAttribute) -> Swift.Bool) -> Swift.Bool + public func breadthFirstSearch(options: AGSearchOptions = [], _: (AGAttribute) -> Swift.Bool) -> Swift.Bool public var _bodyType: Any.Type { get } public var _bodyPointer: UnsafeRawPointer { get } public var valueType: Any.Type { get } @@ -61,15 +61,15 @@ public struct Attribute { public func applying(offset: AttributeGraph.PointerOffset) -> AttributeGraph.Attribute public func visitBody(_ visitor: inout Body) public func mutateBody(as type: V.Type, invalidating: Swift.Bool, _ body: (inout V) -> Swift.Void) - public func breadthFirstSearch(options: AGSearchOptions, _ body: (AGAttribute) -> Swift.Bool) -> Swift.Bool + public func breadthFirstSearch(options: AGSearchOptions = [], _ body: (AGAttribute) -> Swift.Bool) -> Swift.Bool public var graph: AGGraph { get } public var subgraph: AGSubgraph { get } public var value: Value { unsafeAddress set } public var valueState: AGValueState { get } - public func valueAndFlags(options: AGValueOptions) -> (value: Value, flags: AGChangedValueFlags) - public func changedValue(options: AGValueOptions) -> (value: Value, changed: Bool) + public func valueAndFlags(options: AGValueOptions = []) -> (value: Value, flags: AGChangedValueFlags) + public func changedValue(options: AGValueOptions = []) -> (value: Value, changed: Bool) public func setValue(_ value: Value) -> Bool public var hasValue: Bool { get } public func updateValue() @@ -77,8 +77,8 @@ public struct Attribute { public func invalidateValue() public func validate() - public func addInput(_ attribute: AGAttribute, options: AGInputOptions, token: Swift.Int) - public func addInput(_ attribute: AttributeGraph.Attribute, options: AGInputOptions, token: Int) + public func addInput(_ attribute: AGAttribute, options: AGInputOptions = [], token: Swift.Int) + public func addInput(_ attribute: AttributeGraph.Attribute, options: AGInputOptions = [], token: Int) public var flags: AGAttributeFlags { get _modify } public func setFlags(_ newFlags: AGAttributeFlags, mask: AGAttributeFlags) @@ -178,7 +178,7 @@ public struct WeakAttribute { public subscript(dynamicMember keyPath: Swift.KeyPath) -> AttributeGraph.Attribute? { get } public var attribute: AttributeGraph.Attribute? { get set _modify } public var value: Value? { get } - public func changedValue(options: AGValueOptions) -> (value: Value, changed: Swift.Bool)? + public func changedValue(options: AGValueOptions = []) -> (value: Value, changed: Swift.Bool)? } extension AttributeGraph.WeakAttribute: Swift.Hashable { @@ -226,7 +226,7 @@ public struct OptionalAttribute { public init(_ weakAttribute: AttributeGraph.WeakAttribute) public var attribute: AttributeGraph.Attribute? { get set _modify } public var value: Value? { get } - public func changedValue(options: AGValueOptions) -> (value: Value, changed: Bool)? + public func changedValue(options: AGValueOptions = []) -> (value: Value, changed: Bool)? public func map(_ body: (AttributeGraph.Attribute) -> V) -> V? public var wrappedValue: Value? { get } public var projectedValue: Attribute? { get set _modify } @@ -266,7 +266,7 @@ public struct IndirectAttribute { nonmutating set nonmutating _modify } - public func changedValue(options: AGValueOptions) -> (value: Value, changed: Bool) + public func changedValue(options: AGValueOptions = []) -> (value: Value, changed: Bool) public var wrappedValue: Value { get nonmutating set @@ -413,17 +413,17 @@ extension AttributeGraph.Rule { extension AttributeGraph.Rule where Self: Swift.Hashable { public func cachedValueIfExists( - options: AGCachedValueOptions, + options: AGCachedValueOptions = [], owner: AGAttribute? ) -> Value? public func cachedValue( - options: AGCachedValueOptions, + options: AGCachedValueOptions = [], owner: AGAttribute? ) -> Value public static func _cachedValue( - options: AGCachedValueOptions, + options: AGCachedValueOptions = [], owner: AGAttribute?, hashValue: Swift.Int, bodyPtr: Swift.UnsafeRawPointer, @@ -463,8 +463,8 @@ public struct RuleContext { // public subscript(optionalAttribute: OptionalAttribute) -> V? { get } public var value: Value { unsafeAddress nonmutating set } public var hasValue: Bool - public func valueAndFlags(of input: AttributeGraph.Attribute, options: AGValueOptions) -> (value: V, flags: AGChangedValueFlags) - public func changedValue(of input: AttributeGraph.Attribute, options: AGValueOptions) -> (value: V, changed: Swift.Bool) + public func valueAndFlags(of input: AttributeGraph.Attribute, options: AGValueOptions = []) -> (value: V, flags: AGChangedValueFlags) + public func changedValue(of input: AttributeGraph.Attribute, options: AGValueOptions = []) -> (value: V, changed: Swift.Bool) public func update(body: () -> Void) } @@ -478,8 +478,8 @@ public struct AnyRuleContext { public subscript(attribute: Attribute) -> V { unsafeAddress } // public subscript(weakAttribute: WeakAttribute) -> V? { get } // public subscript(optionalAttribute: OptionalAttribute) -> V? { get } - public func valueAndFlags(of input: AttributeGraph.Attribute, options: AGValueOptions) -> (value: V, flags: AGChangedValueFlags) - public func changedValue(of input: AttributeGraph.Attribute, options: AGValueOptions) -> (value: V, changed: Swift.Bool) + public func valueAndFlags(of input: AttributeGraph.Attribute, options: AGValueOptions = []) -> (value: V, flags: AGChangedValueFlags) + public func changedValue(of input: AttributeGraph.Attribute, options: AGValueOptions = []) -> (value: V, changed: Swift.Bool) public func update(body: () -> Void) public func unsafeCast(to _: V.Type) -> AttributeGraph.RuleContext } diff --git a/AG/AttributeGraph.xcframework/macos-arm64e-arm64-x86_64/AttributeGraph.framework/Modules/AttributeGraph.swiftmodule/arm64-apple-macos.swiftinterface b/AG/AttributeGraph.xcframework/macos-arm64e-arm64-x86_64/AttributeGraph.framework/Modules/AttributeGraph.swiftmodule/arm64-apple-macos.swiftinterface index a6663f5..b71ebea 100644 --- a/AG/AttributeGraph.xcframework/macos-arm64e-arm64-x86_64/AttributeGraph.framework/Modules/AttributeGraph.swiftmodule/arm64-apple-macos.swiftinterface +++ b/AG/AttributeGraph.xcframework/macos-arm64e-arm64-x86_64/AttributeGraph.framework/Modules/AttributeGraph.swiftmodule/arm64-apple-macos.swiftinterface @@ -18,11 +18,11 @@ extension AGAttribute { public static var current: AGAttribute? { get } public func unsafeOffset(at offset: Int) -> AGAttribute public func setFlags(_ newFlags: AGAttributeFlags, mask: AGAttributeFlags) - public func addInput(_ attribute: AGAttribute, options: AGInputOptions, token: Swift.Int) - public func addInput(_ attribute: AttributeGraph.Attribute, options: AGInputOptions, token: Int) + public func addInput(_ attribute: AGAttribute, options: AGInputOptions = [], token: Swift.Int) + public func addInput(_ attribute: AttributeGraph.Attribute, options: AGInputOptions = [], token: Int) public func visitBody(_ visitor: inout Visitor); public func mutateBody(as: Value.Type, invalidating: Swift.Bool, _ body: (inout Value) -> ()) - public func breadthFirstSearch(options: AGSearchOptions, _: (AGAttribute) -> Swift.Bool) -> Swift.Bool + public func breadthFirstSearch(options: AGSearchOptions = [], _: (AGAttribute) -> Swift.Bool) -> Swift.Bool public var _bodyType: Any.Type { get } public var _bodyPointer: UnsafeRawPointer { get } public var valueType: Any.Type { get } @@ -61,15 +61,15 @@ public struct Attribute { public func applying(offset: AttributeGraph.PointerOffset) -> AttributeGraph.Attribute public func visitBody(_ visitor: inout Body) public func mutateBody(as type: V.Type, invalidating: Swift.Bool, _ body: (inout V) -> Swift.Void) - public func breadthFirstSearch(options: AGSearchOptions, _ body: (AGAttribute) -> Swift.Bool) -> Swift.Bool + public func breadthFirstSearch(options: AGSearchOptions = [], _ body: (AGAttribute) -> Swift.Bool) -> Swift.Bool public var graph: AGGraph { get } public var subgraph: AGSubgraph { get } public var value: Value { unsafeAddress set } public var valueState: AGValueState { get } - public func valueAndFlags(options: AGValueOptions) -> (value: Value, flags: AGChangedValueFlags) - public func changedValue(options: AGValueOptions) -> (value: Value, changed: Bool) + public func valueAndFlags(options: AGValueOptions = []) -> (value: Value, flags: AGChangedValueFlags) + public func changedValue(options: AGValueOptions = []) -> (value: Value, changed: Bool) public func setValue(_ value: Value) -> Bool public var hasValue: Bool { get } public func updateValue() @@ -77,8 +77,8 @@ public struct Attribute { public func invalidateValue() public func validate() - public func addInput(_ attribute: AGAttribute, options: AGInputOptions, token: Swift.Int) - public func addInput(_ attribute: AttributeGraph.Attribute, options: AGInputOptions, token: Int) + public func addInput(_ attribute: AGAttribute, options: AGInputOptions = [], token: Swift.Int) + public func addInput(_ attribute: AttributeGraph.Attribute, options: AGInputOptions = [], token: Int) public var flags: AGAttributeFlags { get _modify } public func setFlags(_ newFlags: AGAttributeFlags, mask: AGAttributeFlags) @@ -178,7 +178,7 @@ public struct WeakAttribute { public subscript(dynamicMember keyPath: Swift.KeyPath) -> AttributeGraph.Attribute? { get } public var attribute: AttributeGraph.Attribute? { get set _modify } public var value: Value? { get } - public func changedValue(options: AGValueOptions) -> (value: Value, changed: Swift.Bool)? + public func changedValue(options: AGValueOptions = []) -> (value: Value, changed: Swift.Bool)? } extension AttributeGraph.WeakAttribute: Swift.Hashable { @@ -226,7 +226,7 @@ public struct OptionalAttribute { public init(_ weakAttribute: AttributeGraph.WeakAttribute) public var attribute: AttributeGraph.Attribute? { get set _modify } public var value: Value? { get } - public func changedValue(options: AGValueOptions) -> (value: Value, changed: Bool)? + public func changedValue(options: AGValueOptions = []) -> (value: Value, changed: Bool)? public func map(_ body: (AttributeGraph.Attribute) -> V) -> V? public var wrappedValue: Value? { get } public var projectedValue: Attribute? { get set _modify } @@ -266,7 +266,7 @@ public struct IndirectAttribute { nonmutating set nonmutating _modify } - public func changedValue(options: AGValueOptions) -> (value: Value, changed: Bool) + public func changedValue(options: AGValueOptions = []) -> (value: Value, changed: Bool) public var wrappedValue: Value { get nonmutating set @@ -413,17 +413,17 @@ extension AttributeGraph.Rule { extension AttributeGraph.Rule where Self: Swift.Hashable { public func cachedValueIfExists( - options: AGCachedValueOptions, + options: AGCachedValueOptions = [], owner: AGAttribute? ) -> Value? public func cachedValue( - options: AGCachedValueOptions, + options: AGCachedValueOptions = [], owner: AGAttribute? ) -> Value public static func _cachedValue( - options: AGCachedValueOptions, + options: AGCachedValueOptions = [], owner: AGAttribute?, hashValue: Swift.Int, bodyPtr: Swift.UnsafeRawPointer, @@ -463,8 +463,8 @@ public struct RuleContext { // public subscript(optionalAttribute: OptionalAttribute) -> V? { get } public var value: Value { unsafeAddress nonmutating set } public var hasValue: Bool - public func valueAndFlags(of input: AttributeGraph.Attribute, options: AGValueOptions) -> (value: V, flags: AGChangedValueFlags) - public func changedValue(of input: AttributeGraph.Attribute, options: AGValueOptions) -> (value: V, changed: Swift.Bool) + public func valueAndFlags(of input: AttributeGraph.Attribute, options: AGValueOptions = []) -> (value: V, flags: AGChangedValueFlags) + public func changedValue(of input: AttributeGraph.Attribute, options: AGValueOptions = []) -> (value: V, changed: Swift.Bool) public func update(body: () -> Void) } @@ -478,8 +478,8 @@ public struct AnyRuleContext { public subscript(attribute: Attribute) -> V { unsafeAddress } // public subscript(weakAttribute: WeakAttribute) -> V? { get } // public subscript(optionalAttribute: OptionalAttribute) -> V? { get } - public func valueAndFlags(of input: AttributeGraph.Attribute, options: AGValueOptions) -> (value: V, flags: AGChangedValueFlags) - public func changedValue(of input: AttributeGraph.Attribute, options: AGValueOptions) -> (value: V, changed: Swift.Bool) + public func valueAndFlags(of input: AttributeGraph.Attribute, options: AGValueOptions = []) -> (value: V, flags: AGChangedValueFlags) + public func changedValue(of input: AttributeGraph.Attribute, options: AGValueOptions = []) -> (value: V, changed: Swift.Bool) public func update(body: () -> Void) public func unsafeCast(to _: V.Type) -> AttributeGraph.RuleContext } diff --git a/AG/AttributeGraph.xcframework/macos-arm64e-arm64-x86_64/AttributeGraph.framework/Modules/AttributeGraph.swiftmodule/arm64e-apple-macos.swiftinterface b/AG/AttributeGraph.xcframework/macos-arm64e-arm64-x86_64/AttributeGraph.framework/Modules/AttributeGraph.swiftmodule/arm64e-apple-macos.swiftinterface index 156deaf..4498950 100644 --- a/AG/AttributeGraph.xcframework/macos-arm64e-arm64-x86_64/AttributeGraph.framework/Modules/AttributeGraph.swiftmodule/arm64e-apple-macos.swiftinterface +++ b/AG/AttributeGraph.xcframework/macos-arm64e-arm64-x86_64/AttributeGraph.framework/Modules/AttributeGraph.swiftmodule/arm64e-apple-macos.swiftinterface @@ -18,11 +18,11 @@ extension AGAttribute { public static var current: AGAttribute? { get } public func unsafeOffset(at offset: Int) -> AGAttribute public func setFlags(_ newFlags: AGAttributeFlags, mask: AGAttributeFlags) - public func addInput(_ attribute: AGAttribute, options: AGInputOptions, token: Swift.Int) - public func addInput(_ attribute: AttributeGraph.Attribute, options: AGInputOptions, token: Int) + public func addInput(_ attribute: AGAttribute, options: AGInputOptions = [], token: Swift.Int) + public func addInput(_ attribute: AttributeGraph.Attribute, options: AGInputOptions = [], token: Int) public func visitBody(_ visitor: inout Visitor); public func mutateBody(as: Value.Type, invalidating: Swift.Bool, _ body: (inout Value) -> ()) - public func breadthFirstSearch(options: AGSearchOptions, _: (AGAttribute) -> Swift.Bool) -> Swift.Bool + public func breadthFirstSearch(options: AGSearchOptions = [], _: (AGAttribute) -> Swift.Bool) -> Swift.Bool public var _bodyType: Any.Type { get } public var _bodyPointer: UnsafeRawPointer { get } public var valueType: Any.Type { get } @@ -61,15 +61,15 @@ public struct Attribute { public func applying(offset: AttributeGraph.PointerOffset) -> AttributeGraph.Attribute public func visitBody(_ visitor: inout Body) public func mutateBody(as type: V.Type, invalidating: Swift.Bool, _ body: (inout V) -> Swift.Void) - public func breadthFirstSearch(options: AGSearchOptions, _ body: (AGAttribute) -> Swift.Bool) -> Swift.Bool + public func breadthFirstSearch(options: AGSearchOptions = [], _ body: (AGAttribute) -> Swift.Bool) -> Swift.Bool public var graph: AGGraph { get } public var subgraph: AGSubgraph { get } public var value: Value { unsafeAddress set } public var valueState: AGValueState { get } - public func valueAndFlags(options: AGValueOptions) -> (value: Value, flags: AGChangedValueFlags) - public func changedValue(options: AGValueOptions) -> (value: Value, changed: Bool) + public func valueAndFlags(options: AGValueOptions = []) -> (value: Value, flags: AGChangedValueFlags) + public func changedValue(options: AGValueOptions = []) -> (value: Value, changed: Bool) public func setValue(_ value: Value) -> Bool public var hasValue: Bool { get } public func updateValue() @@ -77,8 +77,8 @@ public struct Attribute { public func invalidateValue() public func validate() - public func addInput(_ attribute: AGAttribute, options: AGInputOptions, token: Swift.Int) - public func addInput(_ attribute: AttributeGraph.Attribute, options: AGInputOptions, token: Int) + public func addInput(_ attribute: AGAttribute, options: AGInputOptions = [], token: Swift.Int) + public func addInput(_ attribute: AttributeGraph.Attribute, options: AGInputOptions = [], token: Int) public var flags: AGAttributeFlags { get _modify } public func setFlags(_ newFlags: AGAttributeFlags, mask: AGAttributeFlags) @@ -178,7 +178,7 @@ public struct WeakAttribute { public subscript(dynamicMember keyPath: Swift.KeyPath) -> AttributeGraph.Attribute? { get } public var attribute: AttributeGraph.Attribute? { get set _modify } public var value: Value? { get } - public func changedValue(options: AGValueOptions) -> (value: Value, changed: Swift.Bool)? + public func changedValue(options: AGValueOptions = []) -> (value: Value, changed: Swift.Bool)? } extension AttributeGraph.WeakAttribute: Swift.Hashable { @@ -226,7 +226,7 @@ public struct OptionalAttribute { public init(_ weakAttribute: AttributeGraph.WeakAttribute) public var attribute: AttributeGraph.Attribute? { get set _modify } public var value: Value? { get } - public func changedValue(options: AGValueOptions) -> (value: Value, changed: Bool)? + public func changedValue(options: AGValueOptions = []) -> (value: Value, changed: Bool)? public func map(_ body: (AttributeGraph.Attribute) -> V) -> V? public var wrappedValue: Value? { get } public var projectedValue: Attribute? { get set _modify } @@ -266,7 +266,7 @@ public struct IndirectAttribute { nonmutating set nonmutating _modify } - public func changedValue(options: AGValueOptions) -> (value: Value, changed: Bool) + public func changedValue(options: AGValueOptions = []) -> (value: Value, changed: Bool) public var wrappedValue: Value { get nonmutating set @@ -413,17 +413,17 @@ extension AttributeGraph.Rule { extension AttributeGraph.Rule where Self: Swift.Hashable { public func cachedValueIfExists( - options: AGCachedValueOptions, + options: AGCachedValueOptions = [], owner: AGAttribute? ) -> Value? public func cachedValue( - options: AGCachedValueOptions, + options: AGCachedValueOptions = [], owner: AGAttribute? ) -> Value public static func _cachedValue( - options: AGCachedValueOptions, + options: AGCachedValueOptions = [], owner: AGAttribute?, hashValue: Swift.Int, bodyPtr: Swift.UnsafeRawPointer, @@ -463,8 +463,8 @@ public struct RuleContext { // public subscript(optionalAttribute: OptionalAttribute) -> V? { get } public var value: Value { unsafeAddress nonmutating set } public var hasValue: Bool - public func valueAndFlags(of input: AttributeGraph.Attribute, options: AGValueOptions) -> (value: V, flags: AGChangedValueFlags) - public func changedValue(of input: AttributeGraph.Attribute, options: AGValueOptions) -> (value: V, changed: Swift.Bool) + public func valueAndFlags(of input: AttributeGraph.Attribute, options: AGValueOptions = []) -> (value: V, flags: AGChangedValueFlags) + public func changedValue(of input: AttributeGraph.Attribute, options: AGValueOptions = []) -> (value: V, changed: Swift.Bool) public func update(body: () -> Void) } @@ -478,8 +478,8 @@ public struct AnyRuleContext { public subscript(attribute: Attribute) -> V { unsafeAddress } // public subscript(weakAttribute: WeakAttribute) -> V? { get } // public subscript(optionalAttribute: OptionalAttribute) -> V? { get } - public func valueAndFlags(of input: AttributeGraph.Attribute, options: AGValueOptions) -> (value: V, flags: AGChangedValueFlags) - public func changedValue(of input: AttributeGraph.Attribute, options: AGValueOptions) -> (value: V, changed: Swift.Bool) + public func valueAndFlags(of input: AttributeGraph.Attribute, options: AGValueOptions = []) -> (value: V, flags: AGChangedValueFlags) + public func changedValue(of input: AttributeGraph.Attribute, options: AGValueOptions = []) -> (value: V, changed: Swift.Bool) public func update(body: () -> Void) public func unsafeCast(to _: V.Type) -> AttributeGraph.RuleContext } diff --git a/AG/AttributeGraph.xcframework/macos-arm64e-arm64-x86_64/AttributeGraph.framework/Modules/AttributeGraph.swiftmodule/x86_64-apple-macos.swiftinterface b/AG/AttributeGraph.xcframework/macos-arm64e-arm64-x86_64/AttributeGraph.framework/Modules/AttributeGraph.swiftmodule/x86_64-apple-macos.swiftinterface index bab4b86..3280f86 100644 --- a/AG/AttributeGraph.xcframework/macos-arm64e-arm64-x86_64/AttributeGraph.framework/Modules/AttributeGraph.swiftmodule/x86_64-apple-macos.swiftinterface +++ b/AG/AttributeGraph.xcframework/macos-arm64e-arm64-x86_64/AttributeGraph.framework/Modules/AttributeGraph.swiftmodule/x86_64-apple-macos.swiftinterface @@ -18,11 +18,11 @@ extension AGAttribute { public static var current: AGAttribute? { get } public func unsafeOffset(at offset: Int) -> AGAttribute public func setFlags(_ newFlags: AGAttributeFlags, mask: AGAttributeFlags) - public func addInput(_ attribute: AGAttribute, options: AGInputOptions, token: Swift.Int) - public func addInput(_ attribute: AttributeGraph.Attribute, options: AGInputOptions, token: Int) + public func addInput(_ attribute: AGAttribute, options: AGInputOptions = [], token: Swift.Int) + public func addInput(_ attribute: AttributeGraph.Attribute, options: AGInputOptions = [], token: Int) public func visitBody(_ visitor: inout Visitor); public func mutateBody(as: Value.Type, invalidating: Swift.Bool, _ body: (inout Value) -> ()) - public func breadthFirstSearch(options: AGSearchOptions, _: (AGAttribute) -> Swift.Bool) -> Swift.Bool + public func breadthFirstSearch(options: AGSearchOptions = [], _: (AGAttribute) -> Swift.Bool) -> Swift.Bool public var _bodyType: Any.Type { get } public var _bodyPointer: UnsafeRawPointer { get } public var valueType: Any.Type { get } @@ -61,15 +61,15 @@ public struct Attribute { public func applying(offset: AttributeGraph.PointerOffset) -> AttributeGraph.Attribute public func visitBody(_ visitor: inout Body) public func mutateBody(as type: V.Type, invalidating: Swift.Bool, _ body: (inout V) -> Swift.Void) - public func breadthFirstSearch(options: AGSearchOptions, _ body: (AGAttribute) -> Swift.Bool) -> Swift.Bool + public func breadthFirstSearch(options: AGSearchOptions = [], _ body: (AGAttribute) -> Swift.Bool) -> Swift.Bool public var graph: AGGraph { get } public var subgraph: AGSubgraph { get } public var value: Value { unsafeAddress set } public var valueState: AGValueState { get } - public func valueAndFlags(options: AGValueOptions) -> (value: Value, flags: AGChangedValueFlags) - public func changedValue(options: AGValueOptions) -> (value: Value, changed: Bool) + public func valueAndFlags(options: AGValueOptions = []) -> (value: Value, flags: AGChangedValueFlags) + public func changedValue(options: AGValueOptions = []) -> (value: Value, changed: Bool) public func setValue(_ value: Value) -> Bool public var hasValue: Bool { get } public func updateValue() @@ -77,8 +77,8 @@ public struct Attribute { public func invalidateValue() public func validate() - public func addInput(_ attribute: AGAttribute, options: AGInputOptions, token: Swift.Int) - public func addInput(_ attribute: AttributeGraph.Attribute, options: AGInputOptions, token: Int) + public func addInput(_ attribute: AGAttribute, options: AGInputOptions = [], token: Swift.Int) + public func addInput(_ attribute: AttributeGraph.Attribute, options: AGInputOptions = [], token: Int) public var flags: AGAttributeFlags { get _modify } public func setFlags(_ newFlags: AGAttributeFlags, mask: AGAttributeFlags) @@ -178,7 +178,7 @@ public struct WeakAttribute { public subscript(dynamicMember keyPath: Swift.KeyPath) -> AttributeGraph.Attribute? { get } public var attribute: AttributeGraph.Attribute? { get set _modify } public var value: Value? { get } - public func changedValue(options: AGValueOptions) -> (value: Value, changed: Swift.Bool)? + public func changedValue(options: AGValueOptions = []) -> (value: Value, changed: Swift.Bool)? } extension AttributeGraph.WeakAttribute: Swift.Hashable { @@ -226,7 +226,7 @@ public struct OptionalAttribute { public init(_ weakAttribute: AttributeGraph.WeakAttribute) public var attribute: AttributeGraph.Attribute? { get set _modify } public var value: Value? { get } - public func changedValue(options: AGValueOptions) -> (value: Value, changed: Bool)? + public func changedValue(options: AGValueOptions = []) -> (value: Value, changed: Bool)? public func map(_ body: (AttributeGraph.Attribute) -> V) -> V? public var wrappedValue: Value? { get } public var projectedValue: Attribute? { get set _modify } @@ -266,7 +266,7 @@ public struct IndirectAttribute { nonmutating set nonmutating _modify } - public func changedValue(options: AGValueOptions) -> (value: Value, changed: Bool) + public func changedValue(options: AGValueOptions = []) -> (value: Value, changed: Bool) public var wrappedValue: Value { get nonmutating set @@ -413,17 +413,17 @@ extension AttributeGraph.Rule { extension AttributeGraph.Rule where Self: Swift.Hashable { public func cachedValueIfExists( - options: AGCachedValueOptions, + options: AGCachedValueOptions = [], owner: AGAttribute? ) -> Value? public func cachedValue( - options: AGCachedValueOptions, + options: AGCachedValueOptions = [], owner: AGAttribute? ) -> Value public static func _cachedValue( - options: AGCachedValueOptions, + options: AGCachedValueOptions = [], owner: AGAttribute?, hashValue: Swift.Int, bodyPtr: Swift.UnsafeRawPointer, @@ -463,8 +463,8 @@ public struct RuleContext { // public subscript(optionalAttribute: OptionalAttribute) -> V? { get } public var value: Value { unsafeAddress nonmutating set } public var hasValue: Bool - public func valueAndFlags(of input: AttributeGraph.Attribute, options: AGValueOptions) -> (value: V, flags: AGChangedValueFlags) - public func changedValue(of input: AttributeGraph.Attribute, options: AGValueOptions) -> (value: V, changed: Swift.Bool) + public func valueAndFlags(of input: AttributeGraph.Attribute, options: AGValueOptions = []) -> (value: V, flags: AGChangedValueFlags) + public func changedValue(of input: AttributeGraph.Attribute, options: AGValueOptions = []) -> (value: V, changed: Swift.Bool) public func update(body: () -> Void) } @@ -478,8 +478,8 @@ public struct AnyRuleContext { public subscript(attribute: Attribute) -> V { unsafeAddress } // public subscript(weakAttribute: WeakAttribute) -> V? { get } // public subscript(optionalAttribute: OptionalAttribute) -> V? { get } - public func valueAndFlags(of input: AttributeGraph.Attribute, options: AGValueOptions) -> (value: V, flags: AGChangedValueFlags) - public func changedValue(of input: AttributeGraph.Attribute, options: AGValueOptions) -> (value: V, changed: Swift.Bool) + public func valueAndFlags(of input: AttributeGraph.Attribute, options: AGValueOptions = []) -> (value: V, flags: AGChangedValueFlags) + public func changedValue(of input: AttributeGraph.Attribute, options: AGValueOptions = []) -> (value: V, changed: Swift.Bool) public func update(body: () -> Void) public func unsafeCast(to _: V.Type) -> AttributeGraph.RuleContext } diff --git a/AG/Sources/Modules/AttributeGraph.swiftmodule/template.swiftinterface b/AG/Sources/Modules/AttributeGraph.swiftmodule/template.swiftinterface index abd008a..70b2cb6 100644 --- a/AG/Sources/Modules/AttributeGraph.swiftmodule/template.swiftinterface +++ b/AG/Sources/Modules/AttributeGraph.swiftmodule/template.swiftinterface @@ -14,11 +14,11 @@ extension AGAttribute { public static var current: AGAttribute? { get } public func unsafeOffset(at offset: Int) -> AGAttribute public func setFlags(_ newFlags: AGAttributeFlags, mask: AGAttributeFlags) - public func addInput(_ attribute: AGAttribute, options: AGInputOptions, token: Swift.Int) - public func addInput(_ attribute: AttributeGraph.Attribute, options: AGInputOptions, token: Int) + public func addInput(_ attribute: AGAttribute, options: AGInputOptions = [], token: Swift.Int) + public func addInput(_ attribute: AttributeGraph.Attribute, options: AGInputOptions = [], token: Int) public func visitBody(_ visitor: inout Visitor); public func mutateBody(as: Value.Type, invalidating: Swift.Bool, _ body: (inout Value) -> ()) - public func breadthFirstSearch(options: AGSearchOptions, _: (AGAttribute) -> Swift.Bool) -> Swift.Bool + public func breadthFirstSearch(options: AGSearchOptions = [], _: (AGAttribute) -> Swift.Bool) -> Swift.Bool public var _bodyType: Any.Type { get } public var _bodyPointer: UnsafeRawPointer { get } public var valueType: Any.Type { get } @@ -57,15 +57,15 @@ public struct Attribute { public func applying(offset: AttributeGraph.PointerOffset) -> AttributeGraph.Attribute public func visitBody(_ visitor: inout Body) public func mutateBody(as type: V.Type, invalidating: Swift.Bool, _ body: (inout V) -> Swift.Void) - public func breadthFirstSearch(options: AGSearchOptions, _ body: (AGAttribute) -> Swift.Bool) -> Swift.Bool + public func breadthFirstSearch(options: AGSearchOptions = [], _ body: (AGAttribute) -> Swift.Bool) -> Swift.Bool public var graph: AGGraph { get } public var subgraph: AGSubgraph { get } public var value: Value { unsafeAddress set } public var valueState: AGValueState { get } - public func valueAndFlags(options: AGValueOptions) -> (value: Value, flags: AGChangedValueFlags) - public func changedValue(options: AGValueOptions) -> (value: Value, changed: Bool) + public func valueAndFlags(options: AGValueOptions = []) -> (value: Value, flags: AGChangedValueFlags) + public func changedValue(options: AGValueOptions = []) -> (value: Value, changed: Bool) public func setValue(_ value: Value) -> Bool public var hasValue: Bool { get } public func updateValue() @@ -73,8 +73,8 @@ public struct Attribute { public func invalidateValue() public func validate() - public func addInput(_ attribute: AGAttribute, options: AGInputOptions, token: Swift.Int) - public func addInput(_ attribute: AttributeGraph.Attribute, options: AGInputOptions, token: Int) + public func addInput(_ attribute: AGAttribute, options: AGInputOptions = [], token: Swift.Int) + public func addInput(_ attribute: AttributeGraph.Attribute, options: AGInputOptions = [], token: Int) public var flags: AGAttributeFlags { get _modify } public func setFlags(_ newFlags: AGAttributeFlags, mask: AGAttributeFlags) @@ -174,7 +174,7 @@ public struct WeakAttribute { public subscript(dynamicMember keyPath: Swift.KeyPath) -> AttributeGraph.Attribute? { get } public var attribute: AttributeGraph.Attribute? { get set _modify } public var value: Value? { get } - public func changedValue(options: AGValueOptions) -> (value: Value, changed: Swift.Bool)? + public func changedValue(options: AGValueOptions = []) -> (value: Value, changed: Swift.Bool)? } extension AttributeGraph.WeakAttribute: Swift.Hashable { @@ -222,7 +222,7 @@ public struct OptionalAttribute { public init(_ weakAttribute: AttributeGraph.WeakAttribute) public var attribute: AttributeGraph.Attribute? { get set _modify } public var value: Value? { get } - public func changedValue(options: AGValueOptions) -> (value: Value, changed: Bool)? + public func changedValue(options: AGValueOptions = []) -> (value: Value, changed: Bool)? public func map(_ body: (AttributeGraph.Attribute) -> V) -> V? public var wrappedValue: Value? { get } public var projectedValue: Attribute? { get set _modify } @@ -262,7 +262,7 @@ public struct IndirectAttribute { nonmutating set nonmutating _modify } - public func changedValue(options: AGValueOptions) -> (value: Value, changed: Bool) + public func changedValue(options: AGValueOptions = []) -> (value: Value, changed: Bool) public var wrappedValue: Value { get nonmutating set @@ -409,17 +409,17 @@ extension AttributeGraph.Rule { extension AttributeGraph.Rule where Self: Swift.Hashable { public func cachedValueIfExists( - options: AGCachedValueOptions, + options: AGCachedValueOptions = [], owner: AGAttribute? ) -> Value? public func cachedValue( - options: AGCachedValueOptions, + options: AGCachedValueOptions = [], owner: AGAttribute? ) -> Value public static func _cachedValue( - options: AGCachedValueOptions, + options: AGCachedValueOptions = [], owner: AGAttribute?, hashValue: Swift.Int, bodyPtr: Swift.UnsafeRawPointer, @@ -459,8 +459,8 @@ public struct RuleContext { // public subscript(optionalAttribute: OptionalAttribute) -> V? { get } public var value: Value { unsafeAddress nonmutating set } public var hasValue: Bool - public func valueAndFlags(of input: AttributeGraph.Attribute, options: AGValueOptions) -> (value: V, flags: AGChangedValueFlags) - public func changedValue(of input: AttributeGraph.Attribute, options: AGValueOptions) -> (value: V, changed: Swift.Bool) + public func valueAndFlags(of input: AttributeGraph.Attribute, options: AGValueOptions = []) -> (value: V, flags: AGChangedValueFlags) + public func changedValue(of input: AttributeGraph.Attribute, options: AGValueOptions = []) -> (value: V, changed: Swift.Bool) public func update(body: () -> Void) } @@ -474,8 +474,8 @@ public struct AnyRuleContext { public subscript(attribute: Attribute) -> V { unsafeAddress } // public subscript(weakAttribute: WeakAttribute) -> V? { get } // public subscript(optionalAttribute: OptionalAttribute) -> V? { get } - public func valueAndFlags(of input: AttributeGraph.Attribute, options: AGValueOptions) -> (value: V, flags: AGChangedValueFlags) - public func changedValue(of input: AttributeGraph.Attribute, options: AGValueOptions) -> (value: V, changed: Swift.Bool) + public func valueAndFlags(of input: AttributeGraph.Attribute, options: AGValueOptions = []) -> (value: V, flags: AGChangedValueFlags) + public func changedValue(of input: AttributeGraph.Attribute, options: AGValueOptions = []) -> (value: V, changed: Swift.Bool) public func update(body: () -> Void) public func unsafeCast(to _: V.Type) -> AttributeGraph.RuleContext } diff --git a/Sources/OpenGraph/Attribute/Attribute/Attribute.swift b/Sources/OpenGraph/Attribute/Attribute/Attribute.swift index b698b22..92beafd 100644 --- a/Sources/OpenGraph/Attribute/Attribute/Attribute.swift +++ b/Sources/OpenGraph/Attribute/Attribute/Attribute.swift @@ -71,7 +71,7 @@ public struct Attribute { } public var projectedValue: Attribute { - get { Attribute(identifier: identifier) } + get { self } _modify { yield &self } } @@ -120,7 +120,7 @@ public struct Attribute { identifier.mutateBody(as: type, invalidating: invalidating, body) } - public func breadthFirstSearch(options: OGSearchOptions, _ body: (OGAttribute) -> Bool) -> Bool { + public func breadthFirstSearch(options: OGSearchOptions = [], _ body: (OGAttribute) -> Bool) -> Bool { identifier.breadthFirstSearch(options: options, body) } @@ -154,7 +154,7 @@ public struct Attribute { public var valueState: OGValueState { identifier.valueState } - public func valueAndFlags(options: OGValueOptions) -> (value: Value, flags: OGChangedValueFlags) { + public func valueAndFlags(options: OGValueOptions = []) -> (value: Value, flags: OGChangedValueFlags) { let value = OGGraphGetValue(identifier, options: options, type: Value.self) return ( value.value.assumingMemoryBound(to: Value.self).pointee, @@ -162,7 +162,7 @@ public struct Attribute { ) } - public func changedValue(options: OGValueOptions) -> (value: Value, changed: Bool) { + public func changedValue(options: OGValueOptions = []) -> (value: Value, changed: Bool) { let value = OGGraphGetValue(identifier, options: options, type: Value.self) return ( value.value.assumingMemoryBound(to: Value.self).pointee, @@ -184,11 +184,11 @@ public struct Attribute { // MARK: - Input - public func addInput(_ attribute: OGAttribute, options: OGInputOptions, token: Int) { + public func addInput(_ attribute: OGAttribute, options: OGInputOptions = [], token: Int) { identifier.addInput(attribute, options: options, token: token) } - public func addInput(_ attribute: Attribute, options: OGInputOptions, token: Int) { + public func addInput(_ attribute: Attribute, options: OGInputOptions = [], token: Int) { identifier.addInput(attribute, options: options, token: token) } diff --git a/Sources/OpenGraph/Attribute/Attribute/OGAttribute.swift b/Sources/OpenGraph/Attribute/Attribute/OGAttribute.swift index bb94996..2cabafe 100644 --- a/Sources/OpenGraph/Attribute/Attribute/OGAttribute.swift +++ b/Sources/OpenGraph/Attribute/Attribute/OGAttribute.swift @@ -29,11 +29,11 @@ extension OGAttribute { flags = flags.subtracting(mask).union(newFlags.intersection(mask)) } - public func addInput(_ attribute: OGAttribute, options: OGInputOptions, token: Int) { + public func addInput(_ attribute: OGAttribute, options: OGInputOptions = [], token: Int) { __OGGraphAddInput(self, attribute, options, token) } - public func addInput(_ attribute: Attribute, options: OGInputOptions, token: Int) { + public func addInput(_ attribute: Attribute, options: OGInputOptions = [], token: Int) { addInput(attribute.identifier, options: options, token: token) } @@ -48,7 +48,7 @@ extension OGAttribute { __OGGraphMutateAttribute(self, OGTypeID(type), invalidating) } - public func breadthFirstSearch(options _: OGSearchOptions, _: (OGAttribute) -> Bool) -> Bool { + public func breadthFirstSearch(options _: OGSearchOptions = [], _: (OGAttribute) -> Bool) -> Bool { fatalError("TODO") } diff --git a/Sources/OpenGraph/Attribute/Indirect/IndirectAttribute.swift b/Sources/OpenGraph/Attribute/Indirect/IndirectAttribute.swift index 97fe5de..4b25a11 100644 --- a/Sources/OpenGraph/Attribute/Indirect/IndirectAttribute.swift +++ b/Sources/OpenGraph/Attribute/Indirect/IndirectAttribute.swift @@ -47,7 +47,7 @@ public struct IndirectAttribute { nonmutating _modify { yield &Attribute(identifier: identifier).value } } - public func changedValue(options: OGValueOptions) -> (value: Value, changed: Bool) { + public func changedValue(options: OGValueOptions = []) -> (value: Value, changed: Bool) { Attribute(identifier: identifier).changedValue(options: options) } diff --git a/Sources/OpenGraph/Attribute/Optional/OptionalAttribute.swift b/Sources/OpenGraph/Attribute/Optional/OptionalAttribute.swift index d91f8d2..5caf203 100644 --- a/Sources/OpenGraph/Attribute/Optional/OptionalAttribute.swift +++ b/Sources/OpenGraph/Attribute/Optional/OptionalAttribute.swift @@ -43,7 +43,7 @@ public struct OptionalAttribute { public var value: Value? { attribute?.value } - public func changedValue(options: OGValueOptions) -> (value: Value, changed: Bool)? { + public func changedValue(options: OGValueOptions = []) -> (value: Value, changed: Bool)? { attribute?.changedValue(options: options) } diff --git a/Sources/OpenGraph/Attribute/Rule/AnyRuleContext.swift b/Sources/OpenGraph/Attribute/Rule/AnyRuleContext.swift index c5220ba..7bedfcc 100644 --- a/Sources/OpenGraph/Attribute/Rule/AnyRuleContext.swift +++ b/Sources/OpenGraph/Attribute/Rule/AnyRuleContext.swift @@ -35,7 +35,7 @@ public struct AnyRuleContext { // get // } - public func valueAndFlags(of input: Attribute, options: OGValueOptions) -> (value: V, flags: OGChangedValueFlags) { + public func valueAndFlags(of input: Attribute, options: OGValueOptions = []) -> (value: V, flags: OGChangedValueFlags) { let value = OGGraphGetInputValue(attribute, input: input.identifier, options: options, type: V.self) return ( value.value.assumingMemoryBound(to: V.self).pointee, @@ -43,7 +43,7 @@ public struct AnyRuleContext { ) } - public func changedValue(of input: Attribute, options: OGValueOptions) -> (value: V, changed: Bool) { + public func changedValue(of input: Attribute, options: OGValueOptions = []) -> (value: V, changed: Bool) { let value = OGGraphGetInputValue(attribute, input: input.identifier, options: options, type: V.self) return ( value.value.assumingMemoryBound(to: V.self).pointee, diff --git a/Sources/OpenGraph/Attribute/Rule/Rule.swift b/Sources/OpenGraph/Attribute/Rule/Rule.swift index 5140e42..3381b0c 100644 --- a/Sources/OpenGraph/Attribute/Rule/Rule.swift +++ b/Sources/OpenGraph/Attribute/Rule/Rule.swift @@ -54,7 +54,7 @@ extension Rule { extension Rule where Self: Hashable { public func cachedValue( - options: OGCachedValueOptions, + options: OGCachedValueOptions = [], owner: OGAttribute? ) -> Value { withUnsafePointer(to: self) { pointer in @@ -69,7 +69,7 @@ extension Rule where Self: Hashable { } public func cachedValueIfExists( - options: OGCachedValueOptions, + options: OGCachedValueOptions = [], owner: OGAttribute? ) -> Value? { withUnsafePointer(to: self) { bodyPointer in @@ -80,7 +80,7 @@ extension Rule where Self: Hashable { } public static func _cachedValue( - options: OGCachedValueOptions, + options: OGCachedValueOptions = [], owner: OGAttribute?, hashValue: Int, bodyPtr: UnsafeRawPointer, diff --git a/Sources/OpenGraph/Attribute/Rule/RuleContext.swift b/Sources/OpenGraph/Attribute/Rule/RuleContext.swift index 69a339b..5110d1b 100644 --- a/Sources/OpenGraph/Attribute/Rule/RuleContext.swift +++ b/Sources/OpenGraph/Attribute/Rule/RuleContext.swift @@ -47,7 +47,7 @@ public struct RuleContext { return valuePointer != nil } - public func valueAndFlags(of input: Attribute, options: OGValueOptions) -> (value: V, flags: OGChangedValueFlags) { + public func valueAndFlags(of input: Attribute, options: OGValueOptions = []) -> (value: V, flags: OGChangedValueFlags) { let value = OGGraphGetInputValue(attribute.identifier, input: input.identifier, options: options, type: V.self) return ( value.value.assumingMemoryBound(to: V.self).pointee, @@ -55,7 +55,7 @@ public struct RuleContext { ) } - public func changedValue(of input: Attribute, options: OGValueOptions) -> (value: V, changed: Bool) { + public func changedValue(of input: Attribute, options: OGValueOptions = []) -> (value: V, changed: Bool) { let value = OGGraphGetInputValue(attribute.identifier, input: input.identifier, options: options, type: V.self) return ( value.value.assumingMemoryBound(to: V.self).pointee, diff --git a/Sources/OpenGraph/Attribute/Weak/WeakAttribute.swift b/Sources/OpenGraph/Attribute/Weak/WeakAttribute.swift index d046b2a..94b68d0 100644 --- a/Sources/OpenGraph/Attribute/Weak/WeakAttribute.swift +++ b/Sources/OpenGraph/Attribute/Weak/WeakAttribute.swift @@ -57,7 +57,7 @@ public struct WeakAttribute { attribute?.value } - public func changedValue(options: OGValueOptions) -> (value: Value, changed: Bool)? { + public func changedValue(options: OGValueOptions = []) -> (value: Value, changed: Bool)? { attribute?.changedValue(options: options) } }