code
stringlengths
3
10M
language
stringclasses
31 values
module UnrealScript.Engine.OnlineGameplayEvents; import ScriptClasses; import UnrealScript.Helpers; import UnrealScript.Engine.OnlineSubsystem; import UnrealScript.Core.UObject; extern(C++) interface OnlineGameplayEvents : UObject { public extern(D): private static __gshared ScriptClass mStaticClass; @property final static ScriptClass StaticClass() { mixin(MGSCC("Class Engine.OnlineGameplayEvents")); } private static __gshared OnlineGameplayEvents mDefaultProperties; @property final static OnlineGameplayEvents DefaultProperties() { mixin(MGDPC("OnlineGameplayEvents", "OnlineGameplayEvents Engine.Default__OnlineGameplayEvents")); } struct PlayerInformation { private ubyte __buffer__[40]; public extern(D): private static __gshared ScriptStruct mStaticClass; @property final static ScriptStruct StaticClass() { mixin(MGSCS("ScriptStruct Engine.OnlineGameplayEvents.PlayerInformation")); } @property final { auto ref { int LastPlayerEventIdx() { mixin(MGPS("int", 36)); } OnlineSubsystem.UniqueNetId UniqueId() { mixin(MGPS("OnlineSubsystem.UniqueNetId", 24)); } ScriptString PlayerName() { mixin(MGPS("ScriptString", 12)); } ScriptString ControllerName() { mixin(MGPS("ScriptString", 0)); } } bool bIsBot() { mixin(MGBPS(32, 0x1)); } bool bIsBot(bool val) { mixin(MSBPS(32, 0x1)); } } } struct GameplayEvent { private ubyte __buffer__[8]; public extern(D): private static __gshared ScriptStruct mStaticClass; @property final static ScriptStruct StaticClass() { mixin(MGSCS("ScriptStruct Engine.OnlineGameplayEvents.GameplayEvent")); } @property final auto ref { int EventNameAndDesc() { mixin(MGPS("int", 4)); } int PlayerEventAndTarget() { mixin(MGPS("int", 0)); } } } struct PlayerEvent { private ubyte __buffer__[24]; public extern(D): private static __gshared ScriptStruct mStaticClass; @property final static ScriptStruct StaticClass() { mixin(MGSCS("ScriptStruct Engine.OnlineGameplayEvents.PlayerEvent")); } @property final auto ref { int PlayerPitchAndRoll() { mixin(MGPS("int", 20)); } int PlayerIndexAndYaw() { mixin(MGPS("int", 16)); } Vector EventLocation() { mixin(MGPS("Vector", 4)); } float EventTime() { mixin(MGPS("float", 0)); } } } @property final { auto ref { ScriptArray!(OnlineGameplayEvents.PlayerInformation) PlayerList() { mixin(MGPC("ScriptArray!(OnlineGameplayEvents.PlayerInformation)", 60)); } ScriptArray!(ScriptString) EventDescList() { mixin(MGPC("ScriptArray!(ScriptString)", 72)); } ScriptArray!(ScriptName) EventNames() { mixin(MGPC("ScriptArray!(ScriptName)", 84)); } ScriptArray!(OnlineGameplayEvents.GameplayEvent) GameplayEventsVar() { mixin(MGPC("ScriptArray!(OnlineGameplayEvents.GameplayEvent)", 96)); } ScriptArray!(OnlineGameplayEvents.PlayerEvent) PlayerEventsVar() { mixin(MGPC("ScriptArray!(OnlineGameplayEvents.PlayerEvent)", 108)); } UObject.Guid GameplaySessionID() { mixin(MGPC("UObject.Guid", 136)); } ScriptString GameplaySessionStartTime() { mixin(MGPC("ScriptString", 120)); } } bool bGameplaySessionInProgress() { mixin(MGBPC(132, 0x1)); } bool bGameplaySessionInProgress(bool val) { mixin(MSBPC(132, 0x1)); } } }
D
import std.stdio; void main(){ int i = 10; i += 2; }
D
/* ******************************************************************************************* * Dgame (a D game framework) - Copyright (c) Randy Schütt * * This software is provided 'as-is', without any express or implied warranty. * In no event will the authors be held liable for any damages arising from * the use of this software. * * Permission is granted to anyone to use this software for any purpose, * including commercial applications, and to alter it and redistribute it * freely, subject to the following restrictions: * * 1. The origin of this software must not be misrepresented; you must not claim * that you wrote the original software. If you use this software in a product, * an acknowledgment in the product documentation would be appreciated but is * not required. * * 2. Altered source versions must be plainly marked as such, and must not be * misrepresented as being the original software. * * 3. This notice may not be removed or altered from any source distribution. ******************************************************************************************* */ module Dgame.Math.Vector2; private: import std.traits : isNumeric; static import std.math; public: /** * Vector2 is a structure that defines a two-dimensional point. * * Author: Randy Schuett (rswhite4@googlemail.com) */ struct Vector2(T) if (isNumeric!(T)) { /** * The x coordinate */ T x = 0; /** * The y coordinate */ T y = 0; /** * CTor */ @nogc this(T x, T y) pure nothrow { this.x = x; this.y = y; } /** * CTor */ @nogc this(U)(U x, U y) pure nothrow if (isNumeric!(U) && !is(U == T)) { this(cast(T) x, cast(T) y); } /** * CTor */ @nogc this(U)(auto ref const Vector2!(U) vec) pure nothrow if (!is(U == T)) { this(vec.x, vec.y); } /** * Supported operation: +=, -=, *=, /= and %= */ @nogc ref Vector2!(T) opOpAssign(string op)(ref const Vector2!(T) vec) pure nothrow { switch (op) { case "+": case "-": case "*": case "/": case "%": mixin("this.x " ~ op ~ "= vec.x;"); mixin("this.y " ~ op ~ "= vec.y;"); break; default: assert(0, "Unsupported operator " ~ op); } return this; } /** * Supported operation: +=, -=, *=, /= and %= */ @nogc ref Vector2!(T) opOpAssign(string op)(float num) pure nothrow { switch (op) { case "+": case "-": case "*": case "/": case "%": mixin("this.x " ~ op ~ "= num;"); mixin("this.y " ~ op ~ "= num;"); break; default: assert(0, "Unsupported operator " ~ op); } return this; } /** * Supported operation: +, -, *, / and % */ @nogc Vector2!(T) opBinary(string op)(ref const Vector2!(T) vec) const pure nothrow { switch (op) { case "+": case "-": case "*": case "/": case "%": mixin("return Vector2!(T)(this.x " ~ op ~ " vec.x, this.y " ~ op ~ " vec.y);"); default: assert(0, "Unsupported operator " ~ op); } } /** * Supported operation: +, -, *, / and % */ @nogc Vector2!(T) opBinary(string op)(float num) const pure { switch (op) { case "+": case "-": case "*": case "/": case "%": mixin("return Vector2!(T)(cast(T)(this.x " ~ op ~ " num), cast(T)(this.y " ~ op ~ " num));"); default: assert(0, "Unsupported operator " ~ op); } } /** * Returns a negated copy of this Vector. */ @nogc Vector2!(T) opNeg() const pure nothrow { return Vector2!(T)(-this.x, -this.y); } /** * Compares two vectors by checking whether the coordinates are equals. */ @nogc bool opEquals(ref const Vector2!(T) vec) const pure nothrow { return vec.x == this.x && vec.y == this.y; } /** * Checks if this vector is empty. This means that his coordinates are 0. */ @nogc bool isEmpty() const pure nothrow { return this.x == 0 && this.y == 0; } /** * Calculate the scalar product. */ @nogc float scalar(ref const Vector2!(T) vec) const pure nothrow { return this.x * vec.x + this.y * vec.y; } /** * alias for scalar */ alias dot = scalar; /** * Calculate the length. */ @nogc @property float length() const pure nothrow { if (this.isEmpty()) return 0f; return std.math.sqrt(std.math.pow(this.x, 2f) + std.math.pow(this.y, 2f)); } /** * Calculate the angle between two vectors. * If the second paramter is true, the return value is converted to degrees. * Otherwise, radiant is used. */ @nogc float angle(ref const Vector2!(T) vec, bool degrees = true) const pure nothrow { immutable float angle = std.math.acos(this.scalar(vec) / (this.length * vec.length)); if (degrees) return angle * 180f / std.math.PI; return angle; } /** * Calculate the diff between two vectors. */ @nogc float diff(ref const Vector2!(T) vec) const pure nothrow { return std.math.sqrt(std.math.pow(this.x - vec.x, 2f) + std.math.pow(this.y - vec.y, 2f)); } /** * Normalize the vector in which the coordinates are divided by the length. */ @nogc ref Vector2!(T) normalize() pure nothrow { immutable float len = this.length; if (len != 0) { this.x /= len; this.y /= len; } return this; } } alias Vector2f = Vector2!(float); /// A float representation alias Vector2i = Vector2!(int); /// An int representation @nogc unittest { Vector2i vec; assert(vec.x == 0); assert(vec.y == 0); assert(vec.isEmpty()); vec = Vector2i(20, 30); assert(vec.x == 20); assert(vec.y == 30); assert(!vec.isEmpty()); vec += 42; assert(vec.x == 62); assert(vec.y == 72); assert(!vec.isEmpty()); const Vector2i vec2 = vec * 3; assert(vec2.x == 3 * vec.x); assert(vec2.y == 3 * vec.y); const Vector2i vec3 = vec2 + vec; assert(vec3.x == vec.x + vec2.x); assert(vec3.y == vec.y + vec2.y); assert(vec == vec); assert(vec2 != vec3); const Vector2i vec4 = -vec; assert(vec4.x == -62); assert(vec4.y == -72); const Vector2f vconv = vec4; assert(vec4.x == vconv.x && vec4.y == vconv.y); Vector2f v1 = Vector2f(2.3, 4.2); immutable float l1 = v1.length; const Vector2f v1n = v1.normalize(); Vector2i v2 = Vector2i(2.3, 4.2); immutable float l2 = v2.length; const Vector2i v2n = v2.normalize(); const Vector2f vec5 = Vector2f(80, 64); const Vector2f vec6 = Vector2f(32, 32); const Vector2f vec7 = Vector2f(2.5, 2); assert(vec5 / vec6 == vec7); assert(vec5 / vec6.x == vec7); const Vector2i vec8 = Vector2i(32, 32); const Vector2f vec9 = (vec8 / 32) * 32; assert(vec9.x == vec8.x && vec9.y == vec8.y); }
D
/Users/Trupti/Desktop/Eva/build/Eva.build/Debug-iphonesimulator/Eva.build/Objects-normal/x86_64/String+Emoji.o : /Users/Trupti/Desktop/Eva/Eva/ThirdPartyFiles/FloatingTextField/FloatingTextField.swift /Users/Trupti/Desktop/Eva/Eva/Helper/Models/CardRecommand.swift /Users/Trupti/Desktop/Eva/Eva/AppDelegate/AppDelegate.swift /Users/Trupti/Desktop/Eva/Eva/Extensions/String.swift /Users/Trupti/Desktop/Eva/Eva/ThirdPartyFiles/EmojiDisplay/String+Emoji.swift /Users/Trupti/Desktop/Eva/Eva/ThirdPartyFiles/EmojiDisplay/Emoji.swift /Users/Trupti/Desktop/Eva/Eva/ThirdPartyFiles/Reachability/ReachabilityCheck.swift /Users/Trupti/Desktop/Eva/Eva/Helper/CustomView/TransactionInfoCell.swift /Users/Trupti/Desktop/Eva/Eva/ViewControllers/CustomCells/BaseTableViewCell.swift /Users/Trupti/Desktop/Eva/Eva/Clover/CloverWebserviceManager.swift /Users/Trupti/Desktop/Eva/Eva/Helper/DataController/EvaDataController.swift /Users/Trupti/Desktop/Eva/Eva/ThirdPartyFiles/SideMenu/SlideMenuController.swift /Users/Trupti/Desktop/Eva/Eva/ThirdPartyFiles/SideMenu/ExSlideMenuController.swift /Users/Trupti/Desktop/Eva/Eva/ViewController.swift /Users/Trupti/Desktop/Eva/Eva/ViewControllers/MessageTypeViewController.swift /Users/Trupti/Desktop/Eva/Eva/ThirdPartyFiles/ScrollableGraphView/GraphViewController.swift /Users/Trupti/Desktop/Eva/Eva/ViewControllers/InitialViewController.swift /Users/Trupti/Desktop/Eva/Eva/ViewControllers/MainViewController.swift /Users/Trupti/Desktop/Eva/Eva/ViewControllers/MerchantInfoViewController.swift /Users/Trupti/Desktop/Eva/Eva/ViewControllers/RecentSearchesViewController.swift /Users/Trupti/Desktop/Eva/Eva/ViewControllers/SettingsViewController.swift /Users/Trupti/Desktop/Eva/Eva/ThirdPartyFiles/SideMenu/LeftViewController.swift /Users/Trupti/Desktop/Eva/Eva/ViewControllers/TransactionsResultViewController.swift /Users/Trupti/Desktop/Eva/Eva/Clover/Listener/CloverGoConnectorListener.swift /Users/Trupti/Desktop/Eva/Eva/Helper/Models/JsonMapper.swift /Users/Trupti/Desktop/Eva/Eva/Helper/EvaUtils/EvaUtils.swift /Users/Trupti/Desktop/Eva/Eva/ViewControllers/CustomCells/MenuTopItems.swift /Users/Trupti/Desktop/Eva/Eva/ThirdPartyFiles/ScrollableGraphView/ScrollableGraphView.swift /Users/Trupti/Desktop/Eva/Eva/ThirdPartyFiles/SwiftSiriWaveformView/SwiftSiriWaveformView.swift /Users/Trupti/Desktop/Eva/Eva/Helper/CustomView/customHeaderView.swift /Users/Trupti/Desktop/Eva/Eva/Helper/CustomView/SiriContentView.swift /Users/Trupti/Desktop/Eva/Eva/Extensions/UIColor+colorFromHex.swift /Users/Trupti/Desktop/Eva/Eva/Clover/Utility/Utility.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.apinotesc /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/CloverConnector-Hackathon-2017/CloverConnector_Hackathon_2017.framework/Modules/CloverConnector_Hackathon_2017.swiftmodule/x86_64.swiftmodule /Users/Trupti/Desktop/Eva/Pods/CLVGoSDK/CloverGoReaderSDK.framework/Modules/CloverGoReaderSDK.swiftmodule/x86_64.swiftmodule /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/SwiftyJSON/SwiftyJSON.framework/Modules/SwiftyJSON.swiftmodule/x86_64.swiftmodule /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/Alamofire/Alamofire.framework/Modules/Alamofire.swiftmodule/x86_64.swiftmodule /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/Starscream/Starscream.framework/Modules/Starscream.swiftmodule/x86_64.swiftmodule /Users/Trupti/Desktop/Eva/Pods/CLVGoSDK/CloverGoLogger.framework/Modules/CloverGoLogger.swiftmodule/x86_64.swiftmodule /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/ObjectMapper/ObjectMapper.framework/Modules/ObjectMapper.swiftmodule/x86_64.swiftmodule /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/RealmSwift/RealmSwift.framework/Modules/RealmSwift.swiftmodule/x86_64.swiftmodule /Users/Trupti/Desktop/Eva/Pods/CLVGoSDK/clovergoclient.framework/Modules/clovergoclient.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/ObjectiveC.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreMedia.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreData.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/simd.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreImage.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/QuartzCore.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Metal.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/AVFoundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreFoundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreAudio.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreGraphics.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/UIKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/SwiftOnoneSupport.swiftmodule /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSFMDB.h /Users/Trupti/Desktop/Eva/Eva/ThirdPartyFiles/Postgre/testPostgreSqlAPI.h /Users/Trupti/Desktop/Eva/Pods/CLVGoSDK/CloverGoReaderSDK.framework/Headers/CloverGoReaderSDK.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSGZIP.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSSTS.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSDDLog+LOGV.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/CloverConnector-Hackathon-2017/CloverConnector_Hackathon_2017.framework/Headers/CloverConnector-Hackathon-2017-umbrella.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/SwiftyJSON/SwiftyJSON.framework/Headers/SwiftyJSON-umbrella.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/Alamofire/Alamofire.framework/Headers/Alamofire-umbrella.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSCore-umbrella.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/Starscream/Starscream.framework/Headers/Starscream-umbrella.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/ObjectMapper/ObjectMapper.framework/Headers/ObjectMapper-umbrella.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/RealmSwift/RealmSwift.framework/Headers/RealmSwift-umbrella.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSPolly/AWSPolly.framework/Headers/AWSPolly-umbrella.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/Realm/Realm.framework/Headers/RLMSchema.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/Realm/Realm.framework/Headers/RLMObjectSchema.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/Realm/Realm.framework/Headers/RLMObjectBase_Dynamic.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/Realm/Realm.framework/Headers/RLMRealm_Dynamic.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSGeneric.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/Realm/Realm.framework/Headers/RLMRealmConfiguration+Sync.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/Realm/Realm.framework/Headers/NSError+RLMSync.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSSTSService.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSService.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSPolly/AWSPolly.framework/Headers/AWSPollyService.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSCognitoIdentityService.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/Realm/Realm.framework/Headers/RLMThreadSafeReference.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSCancellationTokenSource.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSTaskCompletionSource.h /Users/Trupti/Desktop/Eva/libpq.framework/Headers/libpq-fe.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/Realm/Realm.framework/Headers/RLMSyncPermissionChange.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSTMCache.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSTMDiskCache.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSTMMemoryCache.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSMantle.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSCore.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSUICKeyChainStore.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/Realm/Realm.framework/PrivateHeaders/RLMObjectStore.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSSignature.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSDDASLLogCapture.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/Realm/Realm.framework/Headers/RLMOptionalBase.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/Realm/Realm.framework/Headers/RLMObjectBase.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/Realm/Realm.framework/Headers/RLMListBase.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSFMDatabase.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/Realm/Realm.framework/Headers/RLMSyncPermissionOfferResponse.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/Realm/Realm.framework/PrivateHeaders/RLMSchema_Private.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/Realm/Realm.framework/PrivateHeaders/RLMObjectSchema_Private.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/Realm/Realm.framework/PrivateHeaders/RLMObjectBase_Private.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/Realm/Realm.framework/PrivateHeaders/RLMSyncUtil_Private.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/Realm/Realm.framework/PrivateHeaders/RLMRealm_Private.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/Realm/Realm.framework/PrivateHeaders/RLMSyncConfiguration_Private.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/Realm/Realm.framework/PrivateHeaders/RLMRealmConfiguration_Private.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/Realm/Realm.framework/PrivateHeaders/RLMCollection_Private.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/Realm/Realm.framework/PrivateHeaders/RLMResults_Private.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/Realm/Realm.framework/PrivateHeaders/RLMObject_Private.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/Realm/Realm.framework/PrivateHeaders/RLMArray_Private.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/Realm/Realm.framework/PrivateHeaders/RLMProperty_Private.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSFMDatabaseQueue.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/Realm/Realm.framework/Headers/RLMSyncPermissionValue.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSMTLModel+NSCoding.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSLogging.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSNetworking.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSDDLog.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSCocoaLumberjack.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSTask.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSMTLModel.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSSTSModel.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSModel.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSPolly/AWSPolly.framework/Headers/AWSPollyModel.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSCognitoIdentityModel.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/Realm/Realm.framework/Headers/RLMSyncUtil.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSFMDatabasePool.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/Realm/Realm.framework/Headers/Realm.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/Realm/Realm.framework/Headers/RLMRealm.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/Realm/Realm.framework/Headers/RLMPlatform.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSServiceEnum.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSCancellationToken.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/Realm/Realm.framework/Headers/RLMSyncSession.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/Realm/Realm.framework/Headers/RLMSyncPermission.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSValidation.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/Realm/Realm.framework/Headers/RLMMigration.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSCancellationTokenRegistration.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/Realm/Realm.framework/Headers/RLMSyncConfiguration.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/Realm/Realm.framework/Headers/RLMRealmConfiguration.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSSerialization.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSURLResponseSerialization.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSURLRequestSerialization.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSMTLReflection.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/Realm/Realm.framework/Headers/RLMCollection.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/NSError+AWSMTLModelException.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSInfo.h /Users/Trupti/Desktop/Eva/Eva/Eva-Bridging-Header.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSCredentialsProvider.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSIdentityProvider.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSPolly/AWSPolly.framework/Headers/AWSPollySynthesizeSpeechURLBuilder.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/Realm/Realm.framework/Headers/RLMSyncPermissionOffer.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/Realm/Realm.framework/Headers/RLMSyncManager.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSTMCacheBackgroundTaskManager.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSURLSessionManager.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSDDASLLogger.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSDDOSLogger.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSDDTTYLogger.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSDDFileLogger.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSDDAbstractDatabaseLogger.h /Users/Trupti/Desktop/Eva/Pods/CLVGoSDK/CloverGoLogger.framework/Headers/CloverGoLogger.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSURLRequestRetryHandler.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSMTLValueTransformer.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/Realm/Realm.framework/Headers/RLMSyncUser.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSMTLJSONAdapter.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSMTLManagedObjectAdapter.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSDDDispatchQueueLogFormatter.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSDDContextFilterLogFormatter.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSDDMultiFormatter.h /Users/Trupti/Desktop/Eva/Eva/ThirdPartyFiles/PieChart/UIColor+HexColor.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/Realm/Realm.framework/PrivateHeaders/RLMAccessor.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSExecutor.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSSTSResources.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSPolly/AWSPolly.framework/Headers/AWSPollyResources.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSCognitoIdentityResources.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/Realm/Realm.framework/Headers/RLMSyncCredentials.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSFMDatabaseAdditions.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/NSValueTransformer+AWSMTLInversionAdditions.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/NSArray+AWSMTLManipulationAdditions.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/NSDictionary+AWSMTLManipulationAdditions.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/NSObject+AWSMTLComparisonAdditions.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/NSValueTransformer+AWSMTLPredefinedTransformerAdditions.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSDDLogMacros.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSDDAssertMacros.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSDDLegacyMacros.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSBolts.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/Realm/Realm.framework/Headers/RLMResults.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/Realm/Realm.framework/Headers/RLMSyncPermissionResults.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/Realm/Realm.framework/Headers/RLMConstants.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/Realm/Realm.framework/Headers/RLMObject.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSFMResultSet.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/CloverConnector-Hackathon-2017/CloverConnector_Hackathon_2017.framework/Headers/CloverConnector_Hackathon_2017-Swift.h /Users/Trupti/Desktop/Eva/Pods/CLVGoSDK/CloverGoReaderSDK.framework/Headers/CloverGoReaderSDK-Swift.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/SwiftyJSON/SwiftyJSON.framework/Headers/SwiftyJSON-Swift.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/Alamofire/Alamofire.framework/Headers/Alamofire-Swift.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/Starscream/Starscream.framework/Headers/Starscream-Swift.h /Users/Trupti/Desktop/Eva/Pods/CLVGoSDK/CloverGoLogger.framework/Headers/CloverGoLogger-Swift.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/ObjectMapper/ObjectMapper.framework/Headers/ObjectMapper-Swift.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/RealmSwift/RealmSwift.framework/Headers/RealmSwift-Swift.h /Users/Trupti/Desktop/Eva/Pods/CLVGoSDK/clovergoclient.framework/Headers/clovergoclient-Swift.h /Users/Trupti/Desktop/Eva/Pods/CLVGoSDK/clovergoclient.framework/Headers/clovergoclient.h /Users/Trupti/Desktop/Eva/Eva/ThirdPartyFiles/PieChart/VBPieChart.h /Users/Trupti/Desktop/Eva/libpq.framework/Headers/pg_config_ext.h /Users/Trupti/Desktop/Eva/libpq.framework/Headers/postgres_ext.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSClientContext.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/Realm/Realm.framework/Headers/RLMArray.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSPolly/AWSPolly.framework/Headers/AWSPolly.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSSynchronizedMutableDictionary.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSCategory.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSKSReachability.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSPolly/AWSPolly.framework/Headers/AWSPollyEnumTranslatorUtility.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSCognitoIdentity.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/Realm/Realm.framework/Headers/RLMProperty.h /Users/Trupti/Desktop/Eva/Pods/CLVGoSDK/module.modulemap /Users/Trupti/Desktop/Eva/Pods/Starscream/zlib/module.modulemap /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/CloverConnector-Hackathon-2017/CloverConnector_Hackathon_2017.framework/Modules/module.modulemap /Users/Trupti/Desktop/Eva/Pods/CLVGoSDK/CloverGoReaderSDK.framework/Modules/module.modulemap /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/SwiftyJSON/SwiftyJSON.framework/Modules/module.modulemap /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/Alamofire/Alamofire.framework/Modules/module.modulemap /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Modules/module.modulemap /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/Starscream/Starscream.framework/Modules/module.modulemap /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/Realm/Realm.framework/Modules/module.modulemap /Users/Trupti/Desktop/Eva/Pods/CLVGoSDK/CloverGoLogger.framework/Modules/module.modulemap /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/ObjectMapper/ObjectMapper.framework/Modules/module.modulemap /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/RealmSwift/RealmSwift.framework/Modules/module.modulemap /Users/Trupti/Desktop/Eva/Pods/CLVGoSDK/clovergoclient.framework/Modules/module.modulemap /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSPolly/AWSPolly.framework/Modules/module.modulemap /Users/Trupti/Desktop/Eva/build/Eva.build/Debug-iphonesimulator/Eva.build/Objects-normal/x86_64/String+Emoji~partial.swiftmodule : /Users/Trupti/Desktop/Eva/Eva/ThirdPartyFiles/FloatingTextField/FloatingTextField.swift /Users/Trupti/Desktop/Eva/Eva/Helper/Models/CardRecommand.swift /Users/Trupti/Desktop/Eva/Eva/AppDelegate/AppDelegate.swift /Users/Trupti/Desktop/Eva/Eva/Extensions/String.swift /Users/Trupti/Desktop/Eva/Eva/ThirdPartyFiles/EmojiDisplay/String+Emoji.swift /Users/Trupti/Desktop/Eva/Eva/ThirdPartyFiles/EmojiDisplay/Emoji.swift /Users/Trupti/Desktop/Eva/Eva/ThirdPartyFiles/Reachability/ReachabilityCheck.swift /Users/Trupti/Desktop/Eva/Eva/Helper/CustomView/TransactionInfoCell.swift /Users/Trupti/Desktop/Eva/Eva/ViewControllers/CustomCells/BaseTableViewCell.swift /Users/Trupti/Desktop/Eva/Eva/Clover/CloverWebserviceManager.swift /Users/Trupti/Desktop/Eva/Eva/Helper/DataController/EvaDataController.swift /Users/Trupti/Desktop/Eva/Eva/ThirdPartyFiles/SideMenu/SlideMenuController.swift /Users/Trupti/Desktop/Eva/Eva/ThirdPartyFiles/SideMenu/ExSlideMenuController.swift /Users/Trupti/Desktop/Eva/Eva/ViewController.swift /Users/Trupti/Desktop/Eva/Eva/ViewControllers/MessageTypeViewController.swift /Users/Trupti/Desktop/Eva/Eva/ThirdPartyFiles/ScrollableGraphView/GraphViewController.swift /Users/Trupti/Desktop/Eva/Eva/ViewControllers/InitialViewController.swift /Users/Trupti/Desktop/Eva/Eva/ViewControllers/MainViewController.swift /Users/Trupti/Desktop/Eva/Eva/ViewControllers/MerchantInfoViewController.swift /Users/Trupti/Desktop/Eva/Eva/ViewControllers/RecentSearchesViewController.swift /Users/Trupti/Desktop/Eva/Eva/ViewControllers/SettingsViewController.swift /Users/Trupti/Desktop/Eva/Eva/ThirdPartyFiles/SideMenu/LeftViewController.swift /Users/Trupti/Desktop/Eva/Eva/ViewControllers/TransactionsResultViewController.swift /Users/Trupti/Desktop/Eva/Eva/Clover/Listener/CloverGoConnectorListener.swift /Users/Trupti/Desktop/Eva/Eva/Helper/Models/JsonMapper.swift /Users/Trupti/Desktop/Eva/Eva/Helper/EvaUtils/EvaUtils.swift /Users/Trupti/Desktop/Eva/Eva/ViewControllers/CustomCells/MenuTopItems.swift /Users/Trupti/Desktop/Eva/Eva/ThirdPartyFiles/ScrollableGraphView/ScrollableGraphView.swift /Users/Trupti/Desktop/Eva/Eva/ThirdPartyFiles/SwiftSiriWaveformView/SwiftSiriWaveformView.swift /Users/Trupti/Desktop/Eva/Eva/Helper/CustomView/customHeaderView.swift /Users/Trupti/Desktop/Eva/Eva/Helper/CustomView/SiriContentView.swift /Users/Trupti/Desktop/Eva/Eva/Extensions/UIColor+colorFromHex.swift /Users/Trupti/Desktop/Eva/Eva/Clover/Utility/Utility.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.apinotesc /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/CloverConnector-Hackathon-2017/CloverConnector_Hackathon_2017.framework/Modules/CloverConnector_Hackathon_2017.swiftmodule/x86_64.swiftmodule /Users/Trupti/Desktop/Eva/Pods/CLVGoSDK/CloverGoReaderSDK.framework/Modules/CloverGoReaderSDK.swiftmodule/x86_64.swiftmodule /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/SwiftyJSON/SwiftyJSON.framework/Modules/SwiftyJSON.swiftmodule/x86_64.swiftmodule /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/Alamofire/Alamofire.framework/Modules/Alamofire.swiftmodule/x86_64.swiftmodule /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/Starscream/Starscream.framework/Modules/Starscream.swiftmodule/x86_64.swiftmodule /Users/Trupti/Desktop/Eva/Pods/CLVGoSDK/CloverGoLogger.framework/Modules/CloverGoLogger.swiftmodule/x86_64.swiftmodule /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/ObjectMapper/ObjectMapper.framework/Modules/ObjectMapper.swiftmodule/x86_64.swiftmodule /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/RealmSwift/RealmSwift.framework/Modules/RealmSwift.swiftmodule/x86_64.swiftmodule /Users/Trupti/Desktop/Eva/Pods/CLVGoSDK/clovergoclient.framework/Modules/clovergoclient.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/ObjectiveC.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreMedia.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreData.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/simd.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreImage.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/QuartzCore.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Metal.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/AVFoundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreFoundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreAudio.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreGraphics.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/UIKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/SwiftOnoneSupport.swiftmodule /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSFMDB.h /Users/Trupti/Desktop/Eva/Eva/ThirdPartyFiles/Postgre/testPostgreSqlAPI.h /Users/Trupti/Desktop/Eva/Pods/CLVGoSDK/CloverGoReaderSDK.framework/Headers/CloverGoReaderSDK.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSGZIP.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSSTS.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSDDLog+LOGV.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/CloverConnector-Hackathon-2017/CloverConnector_Hackathon_2017.framework/Headers/CloverConnector-Hackathon-2017-umbrella.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/SwiftyJSON/SwiftyJSON.framework/Headers/SwiftyJSON-umbrella.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/Alamofire/Alamofire.framework/Headers/Alamofire-umbrella.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSCore-umbrella.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/Starscream/Starscream.framework/Headers/Starscream-umbrella.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/ObjectMapper/ObjectMapper.framework/Headers/ObjectMapper-umbrella.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/RealmSwift/RealmSwift.framework/Headers/RealmSwift-umbrella.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSPolly/AWSPolly.framework/Headers/AWSPolly-umbrella.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/Realm/Realm.framework/Headers/RLMSchema.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/Realm/Realm.framework/Headers/RLMObjectSchema.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/Realm/Realm.framework/Headers/RLMObjectBase_Dynamic.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/Realm/Realm.framework/Headers/RLMRealm_Dynamic.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSGeneric.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/Realm/Realm.framework/Headers/RLMRealmConfiguration+Sync.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/Realm/Realm.framework/Headers/NSError+RLMSync.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSSTSService.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSService.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSPolly/AWSPolly.framework/Headers/AWSPollyService.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSCognitoIdentityService.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/Realm/Realm.framework/Headers/RLMThreadSafeReference.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSCancellationTokenSource.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSTaskCompletionSource.h /Users/Trupti/Desktop/Eva/libpq.framework/Headers/libpq-fe.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/Realm/Realm.framework/Headers/RLMSyncPermissionChange.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSTMCache.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSTMDiskCache.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSTMMemoryCache.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSMantle.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSCore.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSUICKeyChainStore.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/Realm/Realm.framework/PrivateHeaders/RLMObjectStore.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSSignature.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSDDASLLogCapture.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/Realm/Realm.framework/Headers/RLMOptionalBase.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/Realm/Realm.framework/Headers/RLMObjectBase.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/Realm/Realm.framework/Headers/RLMListBase.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSFMDatabase.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/Realm/Realm.framework/Headers/RLMSyncPermissionOfferResponse.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/Realm/Realm.framework/PrivateHeaders/RLMSchema_Private.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/Realm/Realm.framework/PrivateHeaders/RLMObjectSchema_Private.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/Realm/Realm.framework/PrivateHeaders/RLMObjectBase_Private.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/Realm/Realm.framework/PrivateHeaders/RLMSyncUtil_Private.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/Realm/Realm.framework/PrivateHeaders/RLMRealm_Private.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/Realm/Realm.framework/PrivateHeaders/RLMSyncConfiguration_Private.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/Realm/Realm.framework/PrivateHeaders/RLMRealmConfiguration_Private.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/Realm/Realm.framework/PrivateHeaders/RLMCollection_Private.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/Realm/Realm.framework/PrivateHeaders/RLMResults_Private.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/Realm/Realm.framework/PrivateHeaders/RLMObject_Private.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/Realm/Realm.framework/PrivateHeaders/RLMArray_Private.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/Realm/Realm.framework/PrivateHeaders/RLMProperty_Private.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSFMDatabaseQueue.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/Realm/Realm.framework/Headers/RLMSyncPermissionValue.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSMTLModel+NSCoding.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSLogging.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSNetworking.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSDDLog.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSCocoaLumberjack.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSTask.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSMTLModel.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSSTSModel.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSModel.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSPolly/AWSPolly.framework/Headers/AWSPollyModel.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSCognitoIdentityModel.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/Realm/Realm.framework/Headers/RLMSyncUtil.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSFMDatabasePool.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/Realm/Realm.framework/Headers/Realm.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/Realm/Realm.framework/Headers/RLMRealm.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/Realm/Realm.framework/Headers/RLMPlatform.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSServiceEnum.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSCancellationToken.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/Realm/Realm.framework/Headers/RLMSyncSession.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/Realm/Realm.framework/Headers/RLMSyncPermission.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSValidation.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/Realm/Realm.framework/Headers/RLMMigration.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSCancellationTokenRegistration.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/Realm/Realm.framework/Headers/RLMSyncConfiguration.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/Realm/Realm.framework/Headers/RLMRealmConfiguration.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSSerialization.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSURLResponseSerialization.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSURLRequestSerialization.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSMTLReflection.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/Realm/Realm.framework/Headers/RLMCollection.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/NSError+AWSMTLModelException.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSInfo.h /Users/Trupti/Desktop/Eva/Eva/Eva-Bridging-Header.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSCredentialsProvider.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSIdentityProvider.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSPolly/AWSPolly.framework/Headers/AWSPollySynthesizeSpeechURLBuilder.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/Realm/Realm.framework/Headers/RLMSyncPermissionOffer.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/Realm/Realm.framework/Headers/RLMSyncManager.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSTMCacheBackgroundTaskManager.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSURLSessionManager.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSDDASLLogger.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSDDOSLogger.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSDDTTYLogger.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSDDFileLogger.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSDDAbstractDatabaseLogger.h /Users/Trupti/Desktop/Eva/Pods/CLVGoSDK/CloverGoLogger.framework/Headers/CloverGoLogger.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSURLRequestRetryHandler.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSMTLValueTransformer.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/Realm/Realm.framework/Headers/RLMSyncUser.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSMTLJSONAdapter.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSMTLManagedObjectAdapter.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSDDDispatchQueueLogFormatter.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSDDContextFilterLogFormatter.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSDDMultiFormatter.h /Users/Trupti/Desktop/Eva/Eva/ThirdPartyFiles/PieChart/UIColor+HexColor.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/Realm/Realm.framework/PrivateHeaders/RLMAccessor.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSExecutor.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSSTSResources.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSPolly/AWSPolly.framework/Headers/AWSPollyResources.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSCognitoIdentityResources.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/Realm/Realm.framework/Headers/RLMSyncCredentials.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSFMDatabaseAdditions.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/NSValueTransformer+AWSMTLInversionAdditions.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/NSArray+AWSMTLManipulationAdditions.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/NSDictionary+AWSMTLManipulationAdditions.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/NSObject+AWSMTLComparisonAdditions.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/NSValueTransformer+AWSMTLPredefinedTransformerAdditions.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSDDLogMacros.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSDDAssertMacros.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSDDLegacyMacros.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSBolts.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/Realm/Realm.framework/Headers/RLMResults.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/Realm/Realm.framework/Headers/RLMSyncPermissionResults.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/Realm/Realm.framework/Headers/RLMConstants.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/Realm/Realm.framework/Headers/RLMObject.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSFMResultSet.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/CloverConnector-Hackathon-2017/CloverConnector_Hackathon_2017.framework/Headers/CloverConnector_Hackathon_2017-Swift.h /Users/Trupti/Desktop/Eva/Pods/CLVGoSDK/CloverGoReaderSDK.framework/Headers/CloverGoReaderSDK-Swift.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/SwiftyJSON/SwiftyJSON.framework/Headers/SwiftyJSON-Swift.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/Alamofire/Alamofire.framework/Headers/Alamofire-Swift.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/Starscream/Starscream.framework/Headers/Starscream-Swift.h /Users/Trupti/Desktop/Eva/Pods/CLVGoSDK/CloverGoLogger.framework/Headers/CloverGoLogger-Swift.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/ObjectMapper/ObjectMapper.framework/Headers/ObjectMapper-Swift.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/RealmSwift/RealmSwift.framework/Headers/RealmSwift-Swift.h /Users/Trupti/Desktop/Eva/Pods/CLVGoSDK/clovergoclient.framework/Headers/clovergoclient-Swift.h /Users/Trupti/Desktop/Eva/Pods/CLVGoSDK/clovergoclient.framework/Headers/clovergoclient.h /Users/Trupti/Desktop/Eva/Eva/ThirdPartyFiles/PieChart/VBPieChart.h /Users/Trupti/Desktop/Eva/libpq.framework/Headers/pg_config_ext.h /Users/Trupti/Desktop/Eva/libpq.framework/Headers/postgres_ext.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSClientContext.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/Realm/Realm.framework/Headers/RLMArray.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSPolly/AWSPolly.framework/Headers/AWSPolly.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSSynchronizedMutableDictionary.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSCategory.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSKSReachability.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSPolly/AWSPolly.framework/Headers/AWSPollyEnumTranslatorUtility.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSCognitoIdentity.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/Realm/Realm.framework/Headers/RLMProperty.h /Users/Trupti/Desktop/Eva/Pods/CLVGoSDK/module.modulemap /Users/Trupti/Desktop/Eva/Pods/Starscream/zlib/module.modulemap /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/CloverConnector-Hackathon-2017/CloverConnector_Hackathon_2017.framework/Modules/module.modulemap /Users/Trupti/Desktop/Eva/Pods/CLVGoSDK/CloverGoReaderSDK.framework/Modules/module.modulemap /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/SwiftyJSON/SwiftyJSON.framework/Modules/module.modulemap /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/Alamofire/Alamofire.framework/Modules/module.modulemap /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Modules/module.modulemap /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/Starscream/Starscream.framework/Modules/module.modulemap /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/Realm/Realm.framework/Modules/module.modulemap /Users/Trupti/Desktop/Eva/Pods/CLVGoSDK/CloverGoLogger.framework/Modules/module.modulemap /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/ObjectMapper/ObjectMapper.framework/Modules/module.modulemap /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/RealmSwift/RealmSwift.framework/Modules/module.modulemap /Users/Trupti/Desktop/Eva/Pods/CLVGoSDK/clovergoclient.framework/Modules/module.modulemap /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSPolly/AWSPolly.framework/Modules/module.modulemap /Users/Trupti/Desktop/Eva/build/Eva.build/Debug-iphonesimulator/Eva.build/Objects-normal/x86_64/String+Emoji~partial.swiftdoc : /Users/Trupti/Desktop/Eva/Eva/ThirdPartyFiles/FloatingTextField/FloatingTextField.swift /Users/Trupti/Desktop/Eva/Eva/Helper/Models/CardRecommand.swift /Users/Trupti/Desktop/Eva/Eva/AppDelegate/AppDelegate.swift /Users/Trupti/Desktop/Eva/Eva/Extensions/String.swift /Users/Trupti/Desktop/Eva/Eva/ThirdPartyFiles/EmojiDisplay/String+Emoji.swift /Users/Trupti/Desktop/Eva/Eva/ThirdPartyFiles/EmojiDisplay/Emoji.swift /Users/Trupti/Desktop/Eva/Eva/ThirdPartyFiles/Reachability/ReachabilityCheck.swift /Users/Trupti/Desktop/Eva/Eva/Helper/CustomView/TransactionInfoCell.swift /Users/Trupti/Desktop/Eva/Eva/ViewControllers/CustomCells/BaseTableViewCell.swift /Users/Trupti/Desktop/Eva/Eva/Clover/CloverWebserviceManager.swift /Users/Trupti/Desktop/Eva/Eva/Helper/DataController/EvaDataController.swift /Users/Trupti/Desktop/Eva/Eva/ThirdPartyFiles/SideMenu/SlideMenuController.swift /Users/Trupti/Desktop/Eva/Eva/ThirdPartyFiles/SideMenu/ExSlideMenuController.swift /Users/Trupti/Desktop/Eva/Eva/ViewController.swift /Users/Trupti/Desktop/Eva/Eva/ViewControllers/MessageTypeViewController.swift /Users/Trupti/Desktop/Eva/Eva/ThirdPartyFiles/ScrollableGraphView/GraphViewController.swift /Users/Trupti/Desktop/Eva/Eva/ViewControllers/InitialViewController.swift /Users/Trupti/Desktop/Eva/Eva/ViewControllers/MainViewController.swift /Users/Trupti/Desktop/Eva/Eva/ViewControllers/MerchantInfoViewController.swift /Users/Trupti/Desktop/Eva/Eva/ViewControllers/RecentSearchesViewController.swift /Users/Trupti/Desktop/Eva/Eva/ViewControllers/SettingsViewController.swift /Users/Trupti/Desktop/Eva/Eva/ThirdPartyFiles/SideMenu/LeftViewController.swift /Users/Trupti/Desktop/Eva/Eva/ViewControllers/TransactionsResultViewController.swift /Users/Trupti/Desktop/Eva/Eva/Clover/Listener/CloverGoConnectorListener.swift /Users/Trupti/Desktop/Eva/Eva/Helper/Models/JsonMapper.swift /Users/Trupti/Desktop/Eva/Eva/Helper/EvaUtils/EvaUtils.swift /Users/Trupti/Desktop/Eva/Eva/ViewControllers/CustomCells/MenuTopItems.swift /Users/Trupti/Desktop/Eva/Eva/ThirdPartyFiles/ScrollableGraphView/ScrollableGraphView.swift /Users/Trupti/Desktop/Eva/Eva/ThirdPartyFiles/SwiftSiriWaveformView/SwiftSiriWaveformView.swift /Users/Trupti/Desktop/Eva/Eva/Helper/CustomView/customHeaderView.swift /Users/Trupti/Desktop/Eva/Eva/Helper/CustomView/SiriContentView.swift /Users/Trupti/Desktop/Eva/Eva/Extensions/UIColor+colorFromHex.swift /Users/Trupti/Desktop/Eva/Eva/Clover/Utility/Utility.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.apinotesc /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/CloverConnector-Hackathon-2017/CloverConnector_Hackathon_2017.framework/Modules/CloverConnector_Hackathon_2017.swiftmodule/x86_64.swiftmodule /Users/Trupti/Desktop/Eva/Pods/CLVGoSDK/CloverGoReaderSDK.framework/Modules/CloverGoReaderSDK.swiftmodule/x86_64.swiftmodule /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/SwiftyJSON/SwiftyJSON.framework/Modules/SwiftyJSON.swiftmodule/x86_64.swiftmodule /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/Alamofire/Alamofire.framework/Modules/Alamofire.swiftmodule/x86_64.swiftmodule /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/Starscream/Starscream.framework/Modules/Starscream.swiftmodule/x86_64.swiftmodule /Users/Trupti/Desktop/Eva/Pods/CLVGoSDK/CloverGoLogger.framework/Modules/CloverGoLogger.swiftmodule/x86_64.swiftmodule /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/ObjectMapper/ObjectMapper.framework/Modules/ObjectMapper.swiftmodule/x86_64.swiftmodule /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/RealmSwift/RealmSwift.framework/Modules/RealmSwift.swiftmodule/x86_64.swiftmodule /Users/Trupti/Desktop/Eva/Pods/CLVGoSDK/clovergoclient.framework/Modules/clovergoclient.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/ObjectiveC.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreMedia.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreData.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/simd.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreImage.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/QuartzCore.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Metal.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/AVFoundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreFoundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreAudio.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreGraphics.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/UIKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/SwiftOnoneSupport.swiftmodule /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSFMDB.h /Users/Trupti/Desktop/Eva/Eva/ThirdPartyFiles/Postgre/testPostgreSqlAPI.h /Users/Trupti/Desktop/Eva/Pods/CLVGoSDK/CloverGoReaderSDK.framework/Headers/CloverGoReaderSDK.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSGZIP.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSSTS.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSDDLog+LOGV.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/CloverConnector-Hackathon-2017/CloverConnector_Hackathon_2017.framework/Headers/CloverConnector-Hackathon-2017-umbrella.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/SwiftyJSON/SwiftyJSON.framework/Headers/SwiftyJSON-umbrella.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/Alamofire/Alamofire.framework/Headers/Alamofire-umbrella.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSCore-umbrella.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/Starscream/Starscream.framework/Headers/Starscream-umbrella.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/ObjectMapper/ObjectMapper.framework/Headers/ObjectMapper-umbrella.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/RealmSwift/RealmSwift.framework/Headers/RealmSwift-umbrella.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSPolly/AWSPolly.framework/Headers/AWSPolly-umbrella.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/Realm/Realm.framework/Headers/RLMSchema.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/Realm/Realm.framework/Headers/RLMObjectSchema.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/Realm/Realm.framework/Headers/RLMObjectBase_Dynamic.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/Realm/Realm.framework/Headers/RLMRealm_Dynamic.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSGeneric.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/Realm/Realm.framework/Headers/RLMRealmConfiguration+Sync.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/Realm/Realm.framework/Headers/NSError+RLMSync.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSSTSService.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSService.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSPolly/AWSPolly.framework/Headers/AWSPollyService.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSCognitoIdentityService.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/Realm/Realm.framework/Headers/RLMThreadSafeReference.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSCancellationTokenSource.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSTaskCompletionSource.h /Users/Trupti/Desktop/Eva/libpq.framework/Headers/libpq-fe.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/Realm/Realm.framework/Headers/RLMSyncPermissionChange.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSTMCache.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSTMDiskCache.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSTMMemoryCache.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSMantle.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSCore.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSUICKeyChainStore.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/Realm/Realm.framework/PrivateHeaders/RLMObjectStore.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSSignature.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSDDASLLogCapture.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/Realm/Realm.framework/Headers/RLMOptionalBase.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/Realm/Realm.framework/Headers/RLMObjectBase.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/Realm/Realm.framework/Headers/RLMListBase.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSFMDatabase.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/Realm/Realm.framework/Headers/RLMSyncPermissionOfferResponse.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/Realm/Realm.framework/PrivateHeaders/RLMSchema_Private.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/Realm/Realm.framework/PrivateHeaders/RLMObjectSchema_Private.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/Realm/Realm.framework/PrivateHeaders/RLMObjectBase_Private.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/Realm/Realm.framework/PrivateHeaders/RLMSyncUtil_Private.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/Realm/Realm.framework/PrivateHeaders/RLMRealm_Private.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/Realm/Realm.framework/PrivateHeaders/RLMSyncConfiguration_Private.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/Realm/Realm.framework/PrivateHeaders/RLMRealmConfiguration_Private.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/Realm/Realm.framework/PrivateHeaders/RLMCollection_Private.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/Realm/Realm.framework/PrivateHeaders/RLMResults_Private.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/Realm/Realm.framework/PrivateHeaders/RLMObject_Private.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/Realm/Realm.framework/PrivateHeaders/RLMArray_Private.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/Realm/Realm.framework/PrivateHeaders/RLMProperty_Private.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSFMDatabaseQueue.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/Realm/Realm.framework/Headers/RLMSyncPermissionValue.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSMTLModel+NSCoding.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSLogging.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSNetworking.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSDDLog.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSCocoaLumberjack.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSTask.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSMTLModel.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSSTSModel.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSModel.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSPolly/AWSPolly.framework/Headers/AWSPollyModel.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSCognitoIdentityModel.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/Realm/Realm.framework/Headers/RLMSyncUtil.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSFMDatabasePool.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/Realm/Realm.framework/Headers/Realm.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/Realm/Realm.framework/Headers/RLMRealm.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/Realm/Realm.framework/Headers/RLMPlatform.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSServiceEnum.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSCancellationToken.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/Realm/Realm.framework/Headers/RLMSyncSession.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/Realm/Realm.framework/Headers/RLMSyncPermission.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSValidation.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/Realm/Realm.framework/Headers/RLMMigration.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSCancellationTokenRegistration.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/Realm/Realm.framework/Headers/RLMSyncConfiguration.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/Realm/Realm.framework/Headers/RLMRealmConfiguration.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSSerialization.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSURLResponseSerialization.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSURLRequestSerialization.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSMTLReflection.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/Realm/Realm.framework/Headers/RLMCollection.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/NSError+AWSMTLModelException.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSInfo.h /Users/Trupti/Desktop/Eva/Eva/Eva-Bridging-Header.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSCredentialsProvider.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSIdentityProvider.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSPolly/AWSPolly.framework/Headers/AWSPollySynthesizeSpeechURLBuilder.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/Realm/Realm.framework/Headers/RLMSyncPermissionOffer.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/Realm/Realm.framework/Headers/RLMSyncManager.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSTMCacheBackgroundTaskManager.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSURLSessionManager.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSDDASLLogger.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSDDOSLogger.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSDDTTYLogger.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSDDFileLogger.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSDDAbstractDatabaseLogger.h /Users/Trupti/Desktop/Eva/Pods/CLVGoSDK/CloverGoLogger.framework/Headers/CloverGoLogger.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSURLRequestRetryHandler.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSMTLValueTransformer.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/Realm/Realm.framework/Headers/RLMSyncUser.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSMTLJSONAdapter.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSMTLManagedObjectAdapter.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSDDDispatchQueueLogFormatter.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSDDContextFilterLogFormatter.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSDDMultiFormatter.h /Users/Trupti/Desktop/Eva/Eva/ThirdPartyFiles/PieChart/UIColor+HexColor.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/Realm/Realm.framework/PrivateHeaders/RLMAccessor.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSExecutor.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSSTSResources.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSPolly/AWSPolly.framework/Headers/AWSPollyResources.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSCognitoIdentityResources.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/Realm/Realm.framework/Headers/RLMSyncCredentials.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSFMDatabaseAdditions.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/NSValueTransformer+AWSMTLInversionAdditions.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/NSArray+AWSMTLManipulationAdditions.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/NSDictionary+AWSMTLManipulationAdditions.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/NSObject+AWSMTLComparisonAdditions.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/NSValueTransformer+AWSMTLPredefinedTransformerAdditions.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSDDLogMacros.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSDDAssertMacros.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSDDLegacyMacros.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSBolts.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/Realm/Realm.framework/Headers/RLMResults.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/Realm/Realm.framework/Headers/RLMSyncPermissionResults.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/Realm/Realm.framework/Headers/RLMConstants.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/Realm/Realm.framework/Headers/RLMObject.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSFMResultSet.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/CloverConnector-Hackathon-2017/CloverConnector_Hackathon_2017.framework/Headers/CloverConnector_Hackathon_2017-Swift.h /Users/Trupti/Desktop/Eva/Pods/CLVGoSDK/CloverGoReaderSDK.framework/Headers/CloverGoReaderSDK-Swift.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/SwiftyJSON/SwiftyJSON.framework/Headers/SwiftyJSON-Swift.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/Alamofire/Alamofire.framework/Headers/Alamofire-Swift.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/Starscream/Starscream.framework/Headers/Starscream-Swift.h /Users/Trupti/Desktop/Eva/Pods/CLVGoSDK/CloverGoLogger.framework/Headers/CloverGoLogger-Swift.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/ObjectMapper/ObjectMapper.framework/Headers/ObjectMapper-Swift.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/RealmSwift/RealmSwift.framework/Headers/RealmSwift-Swift.h /Users/Trupti/Desktop/Eva/Pods/CLVGoSDK/clovergoclient.framework/Headers/clovergoclient-Swift.h /Users/Trupti/Desktop/Eva/Pods/CLVGoSDK/clovergoclient.framework/Headers/clovergoclient.h /Users/Trupti/Desktop/Eva/Eva/ThirdPartyFiles/PieChart/VBPieChart.h /Users/Trupti/Desktop/Eva/libpq.framework/Headers/pg_config_ext.h /Users/Trupti/Desktop/Eva/libpq.framework/Headers/postgres_ext.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSClientContext.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/Realm/Realm.framework/Headers/RLMArray.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSPolly/AWSPolly.framework/Headers/AWSPolly.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSSynchronizedMutableDictionary.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSCategory.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSKSReachability.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSPolly/AWSPolly.framework/Headers/AWSPollyEnumTranslatorUtility.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Headers/AWSCognitoIdentity.h /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/Realm/Realm.framework/Headers/RLMProperty.h /Users/Trupti/Desktop/Eva/Pods/CLVGoSDK/module.modulemap /Users/Trupti/Desktop/Eva/Pods/Starscream/zlib/module.modulemap /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/CloverConnector-Hackathon-2017/CloverConnector_Hackathon_2017.framework/Modules/module.modulemap /Users/Trupti/Desktop/Eva/Pods/CLVGoSDK/CloverGoReaderSDK.framework/Modules/module.modulemap /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/SwiftyJSON/SwiftyJSON.framework/Modules/module.modulemap /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/Alamofire/Alamofire.framework/Modules/module.modulemap /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSCore/AWSCore.framework/Modules/module.modulemap /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/Starscream/Starscream.framework/Modules/module.modulemap /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/Realm/Realm.framework/Modules/module.modulemap /Users/Trupti/Desktop/Eva/Pods/CLVGoSDK/CloverGoLogger.framework/Modules/module.modulemap /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/ObjectMapper/ObjectMapper.framework/Modules/module.modulemap /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/RealmSwift/RealmSwift.framework/Modules/module.modulemap /Users/Trupti/Desktop/Eva/Pods/CLVGoSDK/clovergoclient.framework/Modules/module.modulemap /Users/Trupti/Desktop/Eva/build/Debug-iphonesimulator/AWSPolly/AWSPolly.framework/Modules/module.modulemap
D
/Users/AndyTang/XcodeProjects/cs378-iOS/Cheers/build/Pods.build/Debug-iphonesimulator/Alamofire.build/Objects-normal/x86_64/ParameterEncoding.o : /Users/AndyTang/XcodeProjects/cs378-iOS/Cheers/Pods/Alamofire/Source/Alamofire.swift /Users/AndyTang/XcodeProjects/cs378-iOS/Cheers/Pods/Alamofire/Source/Download.swift /Users/AndyTang/XcodeProjects/cs378-iOS/Cheers/Pods/Alamofire/Source/Error.swift /Users/AndyTang/XcodeProjects/cs378-iOS/Cheers/Pods/Alamofire/Source/Manager.swift /Users/AndyTang/XcodeProjects/cs378-iOS/Cheers/Pods/Alamofire/Source/MultipartFormData.swift /Users/AndyTang/XcodeProjects/cs378-iOS/Cheers/Pods/Alamofire/Source/NetworkReachabilityManager.swift /Users/AndyTang/XcodeProjects/cs378-iOS/Cheers/Pods/Alamofire/Source/Notifications.swift /Users/AndyTang/XcodeProjects/cs378-iOS/Cheers/Pods/Alamofire/Source/ParameterEncoding.swift /Users/AndyTang/XcodeProjects/cs378-iOS/Cheers/Pods/Alamofire/Source/Request.swift /Users/AndyTang/XcodeProjects/cs378-iOS/Cheers/Pods/Alamofire/Source/Response.swift /Users/AndyTang/XcodeProjects/cs378-iOS/Cheers/Pods/Alamofire/Source/ResponseSerialization.swift /Users/AndyTang/XcodeProjects/cs378-iOS/Cheers/Pods/Alamofire/Source/Result.swift /Users/AndyTang/XcodeProjects/cs378-iOS/Cheers/Pods/Alamofire/Source/ServerTrustPolicy.swift /Users/AndyTang/XcodeProjects/cs378-iOS/Cheers/Pods/Alamofire/Source/Stream.swift /Users/AndyTang/XcodeProjects/cs378-iOS/Cheers/Pods/Alamofire/Source/Timeline.swift /Users/AndyTang/XcodeProjects/cs378-iOS/Cheers/Pods/Alamofire/Source/Upload.swift /Users/AndyTang/XcodeProjects/cs378-iOS/Cheers/Pods/Alamofire/Source/Validation.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Swift.swiftmodule /Users/AndyTang/XcodeProjects/cs378-iOS/Cheers/Pods/Target\ Support\ Files/Alamofire/Alamofire-umbrella.h /Users/AndyTang/XcodeProjects/cs378-iOS/Cheers/build/Pods.build/Debug-iphonesimulator/Alamofire.build/unextended-module.modulemap /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/UIKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/ObjectiveC.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreGraphics.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreImage.swiftmodule /Users/AndyTang/XcodeProjects/cs378-iOS/Cheers/build/Pods.build/Debug-iphonesimulator/Alamofire.build/Objects-normal/x86_64/ParameterEncoding~partial.swiftmodule : /Users/AndyTang/XcodeProjects/cs378-iOS/Cheers/Pods/Alamofire/Source/Alamofire.swift /Users/AndyTang/XcodeProjects/cs378-iOS/Cheers/Pods/Alamofire/Source/Download.swift /Users/AndyTang/XcodeProjects/cs378-iOS/Cheers/Pods/Alamofire/Source/Error.swift /Users/AndyTang/XcodeProjects/cs378-iOS/Cheers/Pods/Alamofire/Source/Manager.swift /Users/AndyTang/XcodeProjects/cs378-iOS/Cheers/Pods/Alamofire/Source/MultipartFormData.swift /Users/AndyTang/XcodeProjects/cs378-iOS/Cheers/Pods/Alamofire/Source/NetworkReachabilityManager.swift /Users/AndyTang/XcodeProjects/cs378-iOS/Cheers/Pods/Alamofire/Source/Notifications.swift /Users/AndyTang/XcodeProjects/cs378-iOS/Cheers/Pods/Alamofire/Source/ParameterEncoding.swift /Users/AndyTang/XcodeProjects/cs378-iOS/Cheers/Pods/Alamofire/Source/Request.swift /Users/AndyTang/XcodeProjects/cs378-iOS/Cheers/Pods/Alamofire/Source/Response.swift /Users/AndyTang/XcodeProjects/cs378-iOS/Cheers/Pods/Alamofire/Source/ResponseSerialization.swift /Users/AndyTang/XcodeProjects/cs378-iOS/Cheers/Pods/Alamofire/Source/Result.swift /Users/AndyTang/XcodeProjects/cs378-iOS/Cheers/Pods/Alamofire/Source/ServerTrustPolicy.swift /Users/AndyTang/XcodeProjects/cs378-iOS/Cheers/Pods/Alamofire/Source/Stream.swift /Users/AndyTang/XcodeProjects/cs378-iOS/Cheers/Pods/Alamofire/Source/Timeline.swift /Users/AndyTang/XcodeProjects/cs378-iOS/Cheers/Pods/Alamofire/Source/Upload.swift /Users/AndyTang/XcodeProjects/cs378-iOS/Cheers/Pods/Alamofire/Source/Validation.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Swift.swiftmodule /Users/AndyTang/XcodeProjects/cs378-iOS/Cheers/Pods/Target\ Support\ Files/Alamofire/Alamofire-umbrella.h /Users/AndyTang/XcodeProjects/cs378-iOS/Cheers/build/Pods.build/Debug-iphonesimulator/Alamofire.build/unextended-module.modulemap /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/UIKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/ObjectiveC.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreGraphics.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreImage.swiftmodule /Users/AndyTang/XcodeProjects/cs378-iOS/Cheers/build/Pods.build/Debug-iphonesimulator/Alamofire.build/Objects-normal/x86_64/ParameterEncoding~partial.swiftdoc : /Users/AndyTang/XcodeProjects/cs378-iOS/Cheers/Pods/Alamofire/Source/Alamofire.swift /Users/AndyTang/XcodeProjects/cs378-iOS/Cheers/Pods/Alamofire/Source/Download.swift /Users/AndyTang/XcodeProjects/cs378-iOS/Cheers/Pods/Alamofire/Source/Error.swift /Users/AndyTang/XcodeProjects/cs378-iOS/Cheers/Pods/Alamofire/Source/Manager.swift /Users/AndyTang/XcodeProjects/cs378-iOS/Cheers/Pods/Alamofire/Source/MultipartFormData.swift /Users/AndyTang/XcodeProjects/cs378-iOS/Cheers/Pods/Alamofire/Source/NetworkReachabilityManager.swift /Users/AndyTang/XcodeProjects/cs378-iOS/Cheers/Pods/Alamofire/Source/Notifications.swift /Users/AndyTang/XcodeProjects/cs378-iOS/Cheers/Pods/Alamofire/Source/ParameterEncoding.swift /Users/AndyTang/XcodeProjects/cs378-iOS/Cheers/Pods/Alamofire/Source/Request.swift /Users/AndyTang/XcodeProjects/cs378-iOS/Cheers/Pods/Alamofire/Source/Response.swift /Users/AndyTang/XcodeProjects/cs378-iOS/Cheers/Pods/Alamofire/Source/ResponseSerialization.swift /Users/AndyTang/XcodeProjects/cs378-iOS/Cheers/Pods/Alamofire/Source/Result.swift /Users/AndyTang/XcodeProjects/cs378-iOS/Cheers/Pods/Alamofire/Source/ServerTrustPolicy.swift /Users/AndyTang/XcodeProjects/cs378-iOS/Cheers/Pods/Alamofire/Source/Stream.swift /Users/AndyTang/XcodeProjects/cs378-iOS/Cheers/Pods/Alamofire/Source/Timeline.swift /Users/AndyTang/XcodeProjects/cs378-iOS/Cheers/Pods/Alamofire/Source/Upload.swift /Users/AndyTang/XcodeProjects/cs378-iOS/Cheers/Pods/Alamofire/Source/Validation.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Swift.swiftmodule /Users/AndyTang/XcodeProjects/cs378-iOS/Cheers/Pods/Target\ Support\ Files/Alamofire/Alamofire-umbrella.h /Users/AndyTang/XcodeProjects/cs378-iOS/Cheers/build/Pods.build/Debug-iphonesimulator/Alamofire.build/unextended-module.modulemap /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/UIKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/ObjectiveC.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreGraphics.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreImage.swiftmodule
D
/** This module implements the compile-time reflection machinery to automatically register all D functions that are eligible in a compile-time define list of modules to be called from Excel. Import this module from any module from your XLL build and: ----------- import xlld; mixin(implGetWorksheetFunctionsString!("module1", "module2", "module3")); ----------- All eligible functions in the 3 example modules above will automagically be accessible from Excel (assuming the built XLL is loaded as an add-in). */ module xlld.wrap.traits; import xlld.wrap.worksheet; import xlld.sdk.xlcall; import std.traits: isSomeFunction, isSomeString; import std.meta: allSatisfy; import std.typecons: Flag, No; /// import unit_threaded and introduce helper functions for testing version(testingExcelD) { import unit_threaded; } /** Take a D function as a compile-time parameter and returns a WorksheetFunction struct with the fields filled in accordingly. */ WorksheetFunction getWorksheetFunction(alias F)() if(isSomeFunction!F) { import xlld.wrap.wrap: pascalCase; import std.traits: ReturnType, Parameters, getUDAs; import std.conv: text, to; alias R = ReturnType!F; alias T = Parameters!F; static if(!isWorksheetFunction!F) { throw new Exception("Unsupported function type " ~ R.stringof ~ T.stringof ~ " for " ~ __traits(identifier, F).stringof[1 .. $-1]); } else { WorksheetFunction ret; auto name = __traits(identifier, F).pascalCase.to!wstring; ret.procedure = Procedure(name); ret.functionText = FunctionText(name); ret.typeText = TypeText(getTypeText!F); // check to see if decorated with @Register alias registerAttrs = getUDAs!(F, Register); static if(registerAttrs.length > 0) { static assert(registerAttrs.length == 1, text("Only 1 @Register allowed, found ", registerAttrs.length, " on function ", __traits(identifier, F))); ret.optional = registerAttrs[0]; } return ret; } } wstring getTypeText(alias F)() if(isSomeFunction!F) { import std.traits: ReturnType, Parameters, Unqual, hasUDA; wstring typeToString(T)() { alias Type = Unqual!T; static if(is(Type == double)) return "B"; else static if(is(Type == FP12*)) return "K%"; else static if(is(Type == LPXLOPER12)) return "U"; else static if(is(Type == void)) return ">"; else static assert(false, "Unsupported type " ~ T.stringof); } auto retType = typeToString!(ReturnType!F); foreach(i, argType; Parameters!F) { static if(i == Parameters!F.length - 1 && hasUDA!(F, Async)) retType ~= "X"; else retType ~= typeToString!(argType); } return retType; } // helper template for aliasing alias Identity(alias T) = T; /** Is true if F is a callable function and functionTypePredicate is true for the return type and all parameter types of F. */ template isSupportedFunction(alias F, alias functionTypePredicate) { import std.traits: ReturnType, Parameters; import std.meta: allSatisfy; static if(isCallableFunction!F) { enum returnTypeOk = functionTypePredicate!(ReturnType!F) || is(ReturnType!F == void); enum paramTypesOk = allSatisfy!(functionTypePredicate, Parameters!F); enum isSupportedFunction = returnTypeOk && paramTypesOk; } else enum isSupportedFunction = false; } template isCallableFunction(alias F) { import std.traits: isSomeFunction, Parameters; import std.typecons: Tuple; /// trying to get a pointer to something is a good way of making sure we can /// attempt to evaluate `isSomeFunction` - it's not always possible enum canGetPointerToIt = __traits(compiles, &F); static if(canGetPointerToIt) { static if(isSomeFunction!F) enum isCallableFunction = __traits(compiles, F(Tuple!(Parameters!F)().expand)); else enum isCallableFunction = false; } else enum isCallableFunction = false; } // if T is one of A template isOneOf(T, A...) { static if(A.length == 0) enum isOneOf = false; else enum isOneOf = is(T == A[0]) || isOneOf!(T, A[1..$]); } @safe pure unittest { static assert(isOneOf!(int, int, int)); static assert(!isOneOf!(int, double, string)); } // whether or not this is a function that can be called from Excel template isWorksheetFunction(alias F) { static if(isWorksheetFunctionModuloLinkage!F) { import std.traits: functionLinkage; enum isWorksheetFunction = functionLinkage!F == "Windows"; } else enum isWorksheetFunction = false; } /// if the types match for a worksheet function but without checking the linkage template isWorksheetFunctionModuloLinkage(alias F) { import std.traits: ReturnType, Parameters, isCallable; import std.meta: anySatisfy; static if(!isCallable!F) enum isWorksheetFunctionModuloLinkage = false; else { enum isEnum(T) = is(T == enum); enum isOneOfSupported(U) = isOneOf!(U, double, FP12*, LPXLOPER12); enum isWorksheetFunctionModuloLinkage = isSupportedFunction!(F, isOneOfSupported) && !is(ReturnType!F == enum) && !anySatisfy!(isEnum, Parameters!F); } } /** Gets all Excel-callable functions in a given module */ WorksheetFunction[] getModuleWorksheetFunctions(string moduleName) (Flag!"onlyExports" onlyExports = No.onlyExports) { mixin(`import ` ~ moduleName ~ `;`); alias module_ = Identity!(mixin(moduleName)); WorksheetFunction[] ret; foreach(moduleMemberStr; __traits(allMembers, module_)) { alias moduleMember = Identity!(__traits(getMember, module_, moduleMemberStr)); static if(isWorksheetFunction!moduleMember) { try { const shouldWrap = onlyExports ? __traits(getProtection, moduleMember) == "export" : true; if(shouldWrap) ret ~= getWorksheetFunction!(moduleMember); } catch(Exception ex) assert(0); //can't happen } else static if(isWorksheetFunctionModuloLinkage!moduleMember) { import std.traits: functionLinkage; pragma(msg, "!!!!! excel-d warning: function " ~ __traits(identifier, moduleMember) ~ " has the right types to be callable from Excel but isn't due to having " ~ functionLinkage!moduleMember ~ " linkage instead of the required 'Windows'"); } } return ret; } /** Gets all Excel-callable functions from the given modules */ WorksheetFunction[] getAllWorksheetFunctions(Modules...) (Flag!"onlyExports" onlyExports = No.onlyExports) pure @safe if(allSatisfy!(isSomeString, typeof(Modules))) { WorksheetFunction[] ret; foreach(module_; Modules) { ret ~= getModuleWorksheetFunctions!module_(onlyExports); } return ret; } /** Implements the getWorksheetFunctions function needed by xlld.sdk.xll in order to register the Excel-callable functions at runtime This used to be a template mixin but even using a string mixin inside fails to actually make it an extern(C) function. */ string implGetWorksheetFunctionsString(Modules...)() if(allSatisfy!(isSomeString, typeof(Modules))) { return implGetWorksheetFunctionsString(Modules); } string implGetWorksheetFunctionsString(string[] modules...) { import std.array: join; if(!__ctfe) { return ""; } string modulesString() { string[] ret; foreach(module_; modules) { ret ~= `"` ~ module_ ~ `"`; } return ret.join(", "); } return [ `extern(C) WorksheetFunction[] getWorksheetFunctions() @safe pure nothrow {`, ` return getAllWorksheetFunctions!(` ~ modulesString ~ `);`, `}`, ].join("\n"); } /// struct DllDefFile { Statement[] statements; } /// struct Statement { string name; string[] args; this(string name, string[] args) @safe pure nothrow { this.name = name; this.args = args; } this(string name, string arg) @safe pure nothrow { this(name, [arg]); } string toString() @safe pure const { import std.array: join; import std.algorithm: map; if(name == "EXPORTS") return name ~ "\n" ~ args.map!(a => "\t\t" ~ a).join("\n"); else return name ~ "\t\t" ~ args.map!(a => stringify(name, a)).join(" "); } static private string stringify(in string name, in string arg) @safe pure { if(name == "LIBRARY") return `"` ~ arg ~ `"`; if(name == "DESCRIPTION") return `'` ~ arg ~ `'`; return arg; } } /** Returns a structure descripting a Windows .def file. This allows the tests to not care about the specific formatting used when writing the information out. This encapsulates all the functions to be exported by the DLL/XLL. */ DllDefFile dllDefFile(Modules...) (string libName, string description, Flag!"onlyExports" onlyExports = No.onlyExports) if(allSatisfy!(isSomeString, typeof(Modules))) { import std.conv: to; auto statements = [ Statement("LIBRARY", libName), ]; string[] exports = ["xlAutoOpen", "xlAutoClose", "xlAutoFree12"]; foreach(func; getAllWorksheetFunctions!Modules(onlyExports)) { exports ~= func.procedure.to!string; } return DllDefFile(statements ~ Statement("EXPORTS", exports)); } /// mixin template GenerateDllDef(string module_ = __MODULE__) { version(exceldDef) { void main(string[] args) nothrow { import xlld.wrap.traits: generateDllDef; try { generateDllDef!module_(args); } catch(Exception ex) { import std.stdio: stderr; try stderr.writeln("Error: ", ex.msg); catch(Exception ex2) assert(0, "Program could not write exception message"); } } } } /// void generateDllDef(string module_ = __MODULE__, Flag!"onlyExports" onlyExports = No.onlyExports) (string[] args) { import std.stdio: File; import std.exception: enforce; import std.path: stripExtension; enforce(args.length >= 2 && args.length <= 4, "Usage: " ~ args[0] ~ " [file_name] <lib_name> <description>"); immutable fileName = args[1]; immutable libName = args.length > 2 ? args[2] : fileName.stripExtension ~ ".xll"; immutable description = args.length > 3 ? args[3] : "Simple D add-in to Excel"; auto file = File(fileName, "w"); foreach(stmt; dllDefFile!module_(libName, description, onlyExports).statements) file.writeln(stmt.toString); } /** UDA for functions to be executed asynchronously */ enum Async; version(unittest) { // to link extern(C) auto getWorksheetFunctions() @safe pure nothrow { import xlld: WorksheetFunction; WorksheetFunction[] ret; return ret; } }
D
 module std.uri; export extern(D) { бцел аски8гекс(дим с) { return ascii2hex(с); } ткст раскодируйУИР(ткст кодирУИР) { return decode(кодирУИР); } ткст раскодируйКомпонентУИР(ткст кодирКомпонУИР) { return decodeComponent(кодирКомпонУИР); } ткст кодируйУИР(ткст уир) { return encode(уир); } ткст кодируйКомпонентУИР(ткст уирКомпон) { return encodeComponent(уирКомпон); } } ///////////////////////////// private import std.ctype; private import cidrus; private import std.utf; private import std.io; class ОшибкаУИР : Исключение { this() { super("Ошибка при обработке Уникального Идентификатора Ресурса"); } } enum { URI_Alpha = 1, URI_Reserved = 2, URI_Mark = 4, URI_Digit = 8, URI_Hash = 0x10, // '#' } enum { УИР_Альфа = 1, УИР_Резервн = 2, УИР_Метка = 4, УИР_Цифра = 8, УИР_Хэш = 0x10, // '#' } char[16] hex2ascii = "0123456789ABCDEF"; ubyte[128] uri_flags; // indexed by character static this() { // Initialize uri_flags[] static void helper(char[] p, uint flags) { int i; for (i = 0; i < p.length; i++) uri_flags[p[i]] |= flags; } uri_flags['#'] |= URI_Hash; for (int i = 'A'; i <= 'Z'; i++) { uri_flags[i] |= URI_Alpha; uri_flags[i + 0x20] |= URI_Alpha; // lowercase letters } helper("0123456789", URI_Digit); helper(";/?:@&=+$,", URI_Reserved); helper("-_.!~*'()", URI_Mark); } private char[] URI_Encode(dchar[] string, uint unescapedSet) { uint len; uint j; uint k; dchar V; dchar C; // результат buffer char[50] buffer = void; char* R; uint Rlen; uint Rsize; // alloc'd size len = string.length; R = buffer.ptr; Rsize = buffer.length; Rlen = 0; for (k = 0; k != len; k++) { C = string[k]; // if (C in unescapedSet) if (C < uri_flags.length && uri_flags[C] & unescapedSet) { if (Rlen == Rsize) { char* R2; Rsize *= 2; if (Rsize > 1024) R2 = (new char[Rsize]).ptr; else { R2 = cast(char *)alloca(Rsize * char.sizeof); if (!R2) goto LthrowURIerror; } R2[0..Rlen] = R[0..Rlen]; R = R2; } R[Rlen] = cast(char)C; Rlen++; } else { char[6] Octet; uint L; V = C; // Transform V into octets if (V <= 0x7F) { Octet[0] = cast(char) V; L = 1; } else if (V <= 0x7FF) { Octet[0] = cast(char)(0xC0 | (V >> 6)); Octet[1] = cast(char)(0x80 | (V & 0x3F)); L = 2; } else if (V <= 0xFFFF) { Octet[0] = cast(char)(0xE0 | (V >> 12)); Octet[1] = cast(char)(0x80 | ((V >> 6) & 0x3F)); Octet[2] = cast(char)(0x80 | (V & 0x3F)); L = 3; } else if (V <= 0x1FFFFF) { Octet[0] = cast(char)(0xF0 | (V >> 18)); Octet[1] = cast(char)(0x80 | ((V >> 12) & 0x3F)); Octet[2] = cast(char)(0x80 | ((V >> 6) & 0x3F)); Octet[3] = cast(char)(0x80 | (V & 0x3F)); L = 4; } /+ else if (V <= 0x3FFFFFF) { Octet[0] = cast(char)(0xF8 | (V >> 24)); Octet[1] = cast(char)(0x80 | ((V >> 18) & 0x3F)); Octet[2] = cast(char)(0x80 | ((V >> 12) & 0x3F)); Octet[3] = cast(char)(0x80 | ((V >> 6) & 0x3F)); Octet[4] = cast(char)(0x80 | (V & 0x3F)); L = 5; } else if (V <= 0x7FFFFFFF) { Octet[0] = cast(char)(0xFC | (V >> 30)); Octet[1] = cast(char)(0x80 | ((V >> 24) & 0x3F)); Octet[2] = cast(char)(0x80 | ((V >> 18) & 0x3F)); Octet[3] = cast(char)(0x80 | ((V >> 12) & 0x3F)); Octet[4] = cast(char)(0x80 | ((V >> 6) & 0x3F)); Octet[5] = cast(char)(0x80 | (V & 0x3F)); L = 6; } +/ else { goto LthrowURIerror; // undefined UTF-32 code } if (Rlen + L * 3 > Rsize) { char *R2; Rsize = 2 * (Rlen + L * 3); if (Rsize > 1024) R2 = (new char[Rsize]).ptr; else { R2 = cast(char *)alloca(Rsize * char.sizeof); if (!R2) goto LthrowURIerror; } R2[0..Rlen] = R[0..Rlen]; R = R2; } for (j = 0; j < L; j++) { R[Rlen] = '%'; R[Rlen + 1] = hex2ascii[Octet[j] >> 4]; R[Rlen + 2] = hex2ascii[Octet[j] & 15]; Rlen += 3; } } } char[] результат = new char[Rlen]; результат[] = R[0..Rlen]; return результат; LthrowURIerror: throw new ОшибкаУИР(); } uint ascii2hex(dchar c) { return (c <= '9') ? c - '0' : (c <= 'F') ? c - 'A' + 10 : c - 'a' + 10; } private dchar[] URI_Decode(char[] string, uint reservedSet) { uint len; uint j; uint k; uint V; dchar C; char* s; //эхо("URI_Decode('%.*s')\n", string); // Result array, allocated on stack dchar* R; uint Rlen; uint Rsize; // alloc'd size len = string.length; s = string.ptr; // Preallocate результат buffer R guaranteed to be large enough for результат Rsize = len; if (Rsize > 1024 / dchar.sizeof) R = (new dchar[Rsize]).ptr; else { R = cast(dchar *)alloca(Rsize * dchar.sizeof); if (!R) goto LthrowURIerror; } Rlen = 0; for (k = 0; k != len; k++) { char B; uint start; C = s[k]; if (C != '%') { R[Rlen] = C; Rlen++; continue; } start = k; if (k + 2 >= len) goto LthrowURIerror; if (!cidrus.isxdigit(s[k + 1]) || !cidrus.isxdigit(s[k + 2])) goto LthrowURIerror; B = cast(char)((ascii2hex(s[k + 1]) << 4) + ascii2hex(s[k + 2])); k += 2; if ((B & 0x80) == 0) { C = B; } else { uint n; for (n = 1; ; n++) { if (n > 4) goto LthrowURIerror; if (((B << n) & 0x80) == 0) { if (n == 1) goto LthrowURIerror; break; } } // Pick off (7 - n) significant bits of B from first byte of octet V = B & ((1 << (7 - n)) - 1); // (!!!) if (k + (3 * (n - 1)) >= len) goto LthrowURIerror; for (j = 1; j != n; j++) { k++; if (s[k] != '%') goto LthrowURIerror; if (!cidrus.isxdigit(s[k + 1]) || !cidrus.isxdigit(s[k + 2])) goto LthrowURIerror; B = cast(char)((ascii2hex(s[k + 1]) << 4) + ascii2hex(s[k + 2])); if ((B & 0xC0) != 0x80) goto LthrowURIerror; k += 2; V = (V << 6) | (B & 0x3F); } if (V > 0x10FFFF) goto LthrowURIerror; C = V; } if (C < uri_flags.length && uri_flags[C] & reservedSet) { // R ~= s[start .. k + 1]; int width = (k + 1) - start; for (int ii = 0; ii < width; ii++) R[Rlen + ii] = s[start + ii]; Rlen += width; } else { R[Rlen] = C; Rlen++; } } assert(Rlen <= Rsize); // enforce our preallocation size guarantee // Copy array on stack to array in memory dchar[] d = new dchar[Rlen]; d[] = R[0..Rlen]; return d; LthrowURIerror: throw new ОшибкаУИР(); } /************************************* * Decodes the URI string encodedURI into a UTF-8 string and returns it. * Escape sequences that resolve to reserved URI characters are not replaced. * Escape sequences that resolve to the '#' character are not replaced. */ char[] decode(char[] encodedURI) { dchar[] s; s = URI_Decode(encodedURI, URI_Reserved | URI_Hash); return std.utf.toUTF8(s); } /******************************* * Decodes the URI string encodedURI into a UTF-8 string and returns it. All * escape sequences are decoded. */ char[] decodeComponent(char[] encodedURIComponent) { dchar[] s; s = URI_Decode(encodedURIComponent, 0); return std.utf.toUTF8(s); } /***************************** * Encodes the UTF-8 string uri into a URI and returns that URI. Any character * not a valid URI character is escaped. The '#' character is not escaped. */ char[] encode(char[] uri) { dchar[] s; s = std.utf.toUTF32(uri); return URI_Encode(s, URI_Reserved | URI_Hash | URI_Alpha | URI_Digit | URI_Mark); } /******************************** * Encodes the UTF-8 string uriComponent into a URI and returns that URI. * Any character not a letter, digit, or one of -_.!~*'() is escaped. */ char[] encodeComponent(char[] uriComponent) { dchar[] s; s = std.utf.toUTF32(uriComponent); return URI_Encode(s, URI_Alpha | URI_Digit | URI_Mark); } unittest { debug(uri) эхо("uri.encodeURI.unittest\n"); char[] s = "http://www.digitalmars.com/~fred/fred's RX.html#foo"; char[] t = "http://www.digitalmars.com/~fred/fred's%20RX.html#foo"; char[] r; r = encode(s); debug(uri) эхо("r = '%.*s'\n", r); assert(r == t); r = decode(t); debug(uri) эхо("r = '%.*s'\n", r); assert(r == s); r = encode( decode("%E3%81%82%E3%81%82") ); assert(r == "%E3%81%82%E3%81%82"); r = encodeComponent("c++"); //эхо("r = '%.*s'\n", r); assert(r == "c%2B%2B"); char[] str = new char[10_000_000]; str[] = 'A'; r = encodeComponent(str); foreach (char c; r) assert(c == 'A'); r = decode("%41%42%43"); debug(uri) writefln(r); }
D
void main() { runSolver(); } void problem() { auto QN = scan!int; auto solve() { auto subSolve() { auto N = scan!int; auto A = scan!int(N); auto rbt = A.redBlackTree; auto uf = UnionFind(N + 1); int rest = N; int last; foreach(a; A) { if (last < a) { foreach(other; rbt.lowerBound(a)) { if (!uf.same(a, other)) { rest--; uf.unite(a, other); } } } rbt.removeKey(a); if (rest == 1) break; last = max(last, a); } return rest; } foreach(i; 0..QN) { subSolve().writeln; } } outputForAtCoder(&solve); } // ---------------------------------------------- import std.stdio, std.conv, std.array, std.string, std.algorithm, std.container, std.range, core.stdc.stdlib, std.math, std.typecons, std.numeric, std.traits, std.functional, std.bigint, std.datetime.stopwatch, core.time, core.bitop; T[][] combinations(T)(T[] s, in long m) { if (!m) return [[]]; if (s.empty) return []; return s[1 .. $].combinations(m - 1).map!(x => s[0] ~ x).array ~ s[1 .. $].combinations(m); } string scan(){ static string[] ss; while(!ss.length) ss = readln.chomp.split; string res = ss[0]; ss.popFront; return res; } T scan(T)(){ return scan.to!T; } T[] scan(T)(long n){ return n.iota.map!(i => scan!T()).array; } void deb(T ...)(T t){ debug writeln(t); } alias Point = Tuple!(long, "x", long, "y"); Point invert(Point p) { return Point(p.y, p.x); } long[] divisors(long n) { long[] ret; for (long i = 1; i * i <= n; i++) { if (n % i == 0) { ret ~= i; if (i * i != n) ret ~= n / i; } } return ret.sort.array; } bool chmin(T)(ref T a, T b) { if (b < a) { a = b; return true; } else return false; } bool chmax(T)(ref T a, T b) { if (b > a) { a = b; return true; } else return false; } string charSort(alias S = "a < b")(string s) { return (cast(char[])((cast(byte[])s).sort!S.array)).to!string; } ulong comb(ulong a, ulong b) { if (b == 0) {return 1;}else{return comb(a - 1, b - 1) * a / b;}} T[] compress(T)(T[] arr, T origin = T.init) { T[T] indecies; arr.dup.sort.uniq.enumerate(origin).each!((i, t) => indecies[t] = i); return arr.map!(t => indecies[t]).array; } string toAnswerString(R)(R r) { return r.map!"a.to!string".joiner(" ").array.to!string; } struct ModInt(uint MD) if (MD < int.max) {ulong v;this(string v) {this(v.to!long);}this(int v) {this(long(v));}this(long v) {this.v = (v%MD+MD)%MD;}void opAssign(long t) {v = (t%MD+MD)%MD;}static auto normS(ulong x) {return (x<MD)?x:x-MD;}static auto make(ulong x) {ModInt m; m.v = x; return m;}auto opBinary(string op:"+")(ModInt r) const {return make(normS(v+r.v));}auto opBinary(string op:"-")(ModInt r) const {return make(normS(v+MD-r.v));}auto opBinary(string op:"*")(ModInt r) const {return make((ulong(v)*r.v%MD).to!ulong);}auto opBinary(string op:"^^", T)(T r) const {long x=v;long y=1;while(r){if(r%2==1)y=(y*x)%MD;x=x^^2%MD;r/=2;} return make(y);}auto opBinary(string op:"/")(ModInt r) const {return this*memoize!inv(r);}static ModInt inv(ModInt x) {return x^^(MD-2);}string toString() const {return v.to!string;}auto opOpAssign(string op)(ModInt r) {return mixin ("this=this"~op~"r");}} alias MInt1 = ModInt!(10^^9 + 7); alias MInt9 = ModInt!(998_244_353); void outputForAtCoder(T)(T delegate() fn) { static if (is(T == float) || is(T == double) || is(T == real)) "%.16f".writefln(fn()); else static if (is(T == void)) fn(); else static if (is(T == string)) fn().writeln; else static if (isInputRange!T) { static if (!is(string == ElementType!T) && isInputRange!(ElementType!T)) foreach(r; fn()) r.toAnswerString.writeln; else foreach(r; fn()) r.writeln; } else fn().writeln; } void runSolver() { enum BORDER = "=================================="; debug { BORDER.writeln; while(!stdin.eof) { "<<< Process time: %s >>>".writefln(benchmark!problem(1)); BORDER.writeln; } } else problem(); } enum YESNO = [true: "Yes", false: "No"]; // ----------------------------------------------- struct UnionFind { int[] parent; this(int size) { parent.length = size; foreach(i; 0..size) parent[i] = i; } int root(int x) { if (parent[x] == x) return x; return parent[x] = root(parent[x]); } int unite(int x, int y) { int rootX = root(x); int rootY = root(y); if (rootX == rootY) return rootY; return parent[rootX] = rootY; } bool same(int x, int y) { int rootX = root(x); int rootY = root(y); return rootX == rootY; } }
D
// Copyright Michael D. Parker 2018. // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) module bindbc.sdl.bind.sdlhints; import bindbc.sdl.config; import bindbc.sdl.bind.sdlstdinc : SDL_bool; enum SDL_HINT_FRAMEBUFFER_ACCELERATION = "SDL_FRAMEBUFFER_ACCELERATION"; enum SDL_HINT_RENDER_DRIVER = "SDL_RENDER_DRIVER"; enum SDL_HINT_RENDER_OPENGL_SHADERS = "SDL_RENDER_OPENGL_SHADERS"; enum SDL_HINT_RENDER_SCALE_QUALITY = "SDL_RENDER_SCALE_QUALITY"; enum SDL_HINT_RENDER_VSYNC = "SDL_RENDER_VSYNC"; enum SDL_HINT_VIDEO_X11_XVIDMODE = "SDL_VIDEO_X11_XVIDMODE"; enum SDL_HINT_VIDEO_X11_XINERAMA = "SDL_VIDEO_X11_XINERAMA"; enum SDL_HINT_VIDEO_X11_XRANDR = "SDL_VIDEO_X11_XRANDR"; enum SDL_HINT_GRAB_KEYBOARD = "SDL_GRAB_KEYBOARD"; enum SDL_HINT_VIDEO_MINIMIZE_ON_FOCUS_LOSS = "SDL_VIDEO_MINIMIZE_ON_FOCUS_LOSS"; enum SDL_HINT_IDLE_TIMER_DISABLED = "SDL_IOS_IDLE_TIMER_DISABLED"; enum SDL_HINT_ORIENTATIONS = "SDL_IOS_ORIENTATIONS"; enum SDL_HINT_XINPUT_ENABLED = "SDL_XINPUT_ENABLED"; enum SDL_HINT_GAMECONTROLLERCONFIG = "SDL_GAMECONTROLLERCONFIG"; enum SDL_HINT_JOYSTICK_ALLOW_BACKGROUND_EVENTS = "SDL_JOYSTICK_ALLOW_BACKGROUND_EVENTS"; enum SDL_HINT_ALLOW_TOPMOST = "SDL_ALLOW_TOPMOST"; enum SDL_HINT_TIMER_RESOLUTION = "SDL_TIMER_RESOLUTION"; static if(sdlSupport >= SDLSupport.sdl201) { enum SDL_HINT_RENDER_DIRECT3D_THREADSAFE = "SDL_RENDER_DIRECT3D_THREADSAFE"; enum SDL_HINT_VIDEO_HIGHDPI_DISABLED = "SDL_VIDEO_HIGHDPI_DISABLED"; } static if(sdlSupport >= SDLSupport.sdl202) { enum SDL_HINT_VIDEO_ALLOW_SCREENSAVER = "SDL_VIDEO_ALLOW_SCREENSAVER"; enum SDL_HINT_MOUSE_RELATIVE_MODE_WARP = "SDL_MOUSE_RELATIVE_MODE_WARP"; enum SDL_HINT_ACCELEROMETER_AS_JOYSTICK = "SDL_ACCELEROMETER_AS_JOYSTICK"; enum SDL_HINT_MAC_CTRL_CLICK_EMULATE_RIGHT_CLICK = "SDL_MAC_CTRL_CLICK_EMULATE_RIGHT_CLICK"; enum SDL_HINT_VIDEO_WIN_D3DCOMPILER = "SDL_VIDEO_WIN_D3DCOMPILER"; enum SDL_HINT_VIDEO_WINDOW_SHARE_PIXEL_FORMAT = "SDL_VIDEO_WINDOW_SHARE_PIXEL_FORMAT"; enum SDL_HINT_VIDEO_MAC_FULLSCREEN_SPACES = "SDL_HINT_VIDEO_MAC_FULLSCREEN_SPACES"; } // This is *intended* to be == and not >=. The values for all of these changed in 2.0.4. static if(sdlSupport == SDLSupport.sdl203) { enum SDL_HINT_RENDER_DIRECT3D11_DEBUG = "SDL_HINT_RENDER_DIRECT3D11_DEBUG"; enum SDL_HINT_WINRT_PRIVACY_POLICY_URL = "SDL_HINT_WINRT_PRIVACY_POLICY_URL"; enum SDL_HINT_WINRT_PRIVACY_POLICY_LABEL = "SDL_HINT_WINRT_PRIVACY_POLICY_LABEL"; enum SDL_HINT_WINRT_HANDLE_BACK_BUTTON = "SDL_HINT_WINRT_HANDLE_BACK_BUTTON"; } static if(sdlSupport >= SDLSupport.sdl204) { enum SDL_HINT_VIDEO_X11_NET_WM_PING = "SDL_VIDEO_X11_NET_WM_PING"; enum SDL_HINT_WINDOW_FRAME_USABLE_WHILE_CURSOR_HIDDEN = "SDL_WINDOW_FRAME_USABLE_WHILE_CURSOR_HIDDEN"; enum SDL_HINT_WINDOWS_ENABLE_MESSAGELOOP = "SDL_WINDOWS_ENABLE_MESSAGELOOP"; enum SDL_HINT_XINPUT_USE_OLD_JOYSTICK_MAPPING = "SDL_XINPUT_USE_OLD_JOYSTICK_MAPPING"; enum SDL_HINT_THREAD_STACK_SIZE = "SDL_THREAD_STACK_SIZE"; enum SDL_HINT_MAC_BACKGROUND_APP = "SDL_MAC_BACKGROUND_APP"; enum SDL_HINT_ANDROID_APK_EXPANSION_MAIN_FILE_VERSION = "SDL_ANDROID_APK_EXPANSION_MAIN_FILE_VERSION"; enum SDL_HINT_ANDROID_APK_EXPANSION_PATCH_FILE_VERSION = "SDL_ANDROID_APK_EXPANSION_PATCH_FILE_VERSION"; enum SDL_HINT_IME_INTERNAL_EDITING = "SDL_IME_INTERNAL_EDITING"; enum SDL_HINT_EMSCRIPTEN_KEYBOARD_ELEMENT = "SDL_EMSCRIPTEN_KEYBOARD_ELEMENT"; enum SDL_HINT_NO_SIGNAL_HANDLERS = "SDL_NO_SIGNAL_HANDLERS"; enum SDL_HINT_WINDOWS_NO_CLOSE_ON_ALT_F4 = "SDL_WINDOWS_NO_CLOSE_ON_ALT_F4"; // Changed values from those introduced in 2.0.3 enum SDL_HINT_RENDER_DIRECT3D11_DEBUG = "SDL_RENDER_DIRECT3D11_DEBUG"; enum SDL_HINT_WINRT_PRIVACY_POLICY_URL = "SDL_WINRT_PRIVACY_POLICY_URL"; enum SDL_HINT_WINRT_PRIVACY_POLICY_LABEL = "SDL_WINRT_PRIVACY_POLICY_LABEL"; enum SDL_HINT_WINRT_HANDLE_BACK_BUTTON = "SDL_WINRT_HANDLE_BACK_BUTTON"; } static if(sdlSupport >= SDLSupport.sdl205) { enum SDL_HINT_MOUSE_FOCUS_CLICKTHROUGH = "SDL_MOUSE_FOCUS_CLICKTHROUGH"; enum SDL_HINT_APPLE_TV_CONTROLLER_UI_EVENTS = "SDL_APPLE_TV_CONTROLLER_UI_EVENTS"; enum SDL_HINT_APPLE_TV_REMOTE_ALLOW_ROTATION = "SDL_APPLE_TV_REMOTE_ALLOW_ROTATION"; enum SDL_HINT_BMP_SAVE_LEGACY_FORMAT = "SDL_BMP_SAVE_LEGACY_FORMAT"; enum SDL_HINT_WINDOWS_DISABLE_THREAD_NAMING = "SDL_WINDOWS_DISABLE_THREAD_NAMING"; enum SDL_HINT_RPI_VIDEO_LAYER = "SDL_RPI_VIDEO_LAYER"; } static if(sdlSupport >= SDLSupport.sdl206) { enum SDL_HINT_RENDER_LOGICAL_SIZE_MODE = "SDL_RENDER_LOGICAL_SIZE_MODE"; enum SDL_HINT_WINDOWS_INTRESOURCE_ICON = "SDL_WINDOWS_INTRESOURCE_ICON"; enum SDL_HINT_WINDOWS_INTRESOURCE_ICON_SMALL = "SDL_WINDOWS_INTRESOURCE_ICON_SMALL"; enum SDL_HINT_MOUSE_NORMAL_SPEED_SCALE = "SDL_MOUSE_NORMAL_SPEED_SCALE"; enum SDL_HINT_MOUSE_RELATIVE_SPEED_SCALE = "SDL_MOUSE_RELATIVE_SPEED_SCALE"; enum SDL_HINT_TOUCH_MOUSE_EVENTS = "SDL_TOUCH_MOUSE_EVENTS"; enum SDL_HINT_GAMECONTROLLER_IGNORE_DEVICES = "SDL_GAMECONTROLLER_IGNORE_DEVICES"; enum SDL_HINT_GAMECONTROLLER_IGNORE_DEVICES_EXCEPT = "SDL_GAMECONTROLLER_IGNORE_DEVICES_EXCEPT"; enum SDL_HINT_QTWAYLAND_CONTENT_ORIENTATION = "SDL_QTWAYLAND_CONTENT_ORIENTATION"; enum SDL_HINT_QTWAYLAND_WINDOW_FLAGS = "SDL_QTWAYLAND_WINDOW_FLAGS"; enum SDL_HINT_OPENGL_ES_DRIVER = "SDL_OPENGL_ES_DRIVER"; enum SDL_HINT_AUDIO_RESAMPLING_MODE = "SDL_AUDIO_RESAMPLING_MODE"; enum SDL_HINT_AUDIO_CATEGORY = "SDL_AUDIO_CATEGORY"; } static if(sdlSupport >= SDLSupport.sdl208) { enum SDL_HINT_VIDEO_X11_NET_WM_BYPASS_COMPOSITOR = "SDL_VIDEO_X11_NET_WM_BYPASS_COMPOSITOR"; enum SDL_HINT_IOS_HIDE_HOME_INDICATOR = "SDL_IOS_HIDE_HOME_INDICATOR"; enum SDL_HINT_TV_REMOTE_AS_JOYSTICK = "SDL_TV_REMOTE_AS_JOYSTICK"; enum SDL_HINT_RETURN_KEY_HIDES_IME = "SDL_RETURN_KEY_HIDES_IME"; enum SDL_HINT_VIDEO_DOUBLE_BUFFER = "SDL_VIDEO_DOUBLE_BUFFER"; } static if(sdlSupport >= SDLSupport.sdl209) { enum SDL_HINT_MOUSE_DOUBLE_CLICK_TIME = "SDL_MOUSE_DOUBLE_CLICK_TIME"; enum SDL_HINT_MOUSE_DOUBLE_CLICK_RADIUS = "SDL_MOUSE_DOUBLE_CLICK_RADIUS"; enum SDL_HINT_JOYSTICK_HIDAPI = "SDL_JOYSTICK_HIDAPI"; enum SDL_HINT_JOYSTICK_HIDAPI_PS4 = "SDL_JOYSTICK_HIDAPI_PS4"; enum SDL_HINT_JOYSTICK_HIDAPI_PS4_RUMBLE = "SDL_JOYSTICK_HIDAPI_PS4_RUMBLE"; enum SDL_HINT_JOYSTICK_HIDAPI_STEAM = "SDL_JOYSTICK_HIDAPI_STEAM"; enum SDL_HINT_JOYSTICK_HIDAPI_SWITCH = "SDL_JOYSTICK_HIDAPI_SWITCH"; enum SDL_HINT_JOYSTICK_HIDAPI_XBOX = "SDL_JOYSTICK_HIDAPI_XBOX"; enum SDL_HINT_ENABLE_STEAM_CONTROLLERS = "SDL_ENABLE_STEAM_CONTROLLERS"; enum SDL_HINT_ANDROID_TRAP_BACK_BUTTON = "SDL_ANDROID_TRAP_BACK_BUTTON"; } static if(sdlSupport >= SDLSupport.sdl2010) { enum SDL_HINT_MOUSE_TOUCH_EVENTS = "SDL_MOUSE_TOUCH_EVENTS"; enum SDL_HINT_GAMECONTROLLERCONFIG_FILE = "SDL_GAMECONTROLLERCONFIG_FILE"; enum SDL_HINT_ANDROID_BLOCK_ON_PAUSE = "SDL_ANDROID_BLOCK_ON_PAUSE"; enum SDL_HINT_RENDER_BATCHING = "SDL_RENDER_BATCHING"; enum SDL_HINT_EVENT_LOGGING = "SDL_EVENT_LOGGING"; enum SDL_HINT_WAVE_RIFF_CHUNK_SIZE = "SDL_WAVE_RIFF_CHUNK_SIZE"; enum SDL_HINT_WAVE_TRUNCATION = "SDL_WAVE_TRUNCATION"; enum SDL_HINT_WAVE_FACT_CHUNK = "SDL_WAVE_FACT_CHUNK"; } else static if(sdlSupport >= SDLSupport.sdl204) { // Added in 2.0.4, removed in 2.0.10. enum SDL_HINT_ANDROID_SEPARATE_MOUSE_AND_TOUCH = "SDL_ANDROID_SEPARATE_MOUSE_AND_TOUCH"; } static if(sdlSupport >= SDLSupport.sdl2012) { enum SDL_HINT_VIDEO_EXTERNAL_CONTEXT = "SDL_VIDEO_EXTERNAL_CONTEXT"; enum SDL_HINT_VIDEO_X11_WINDOW_VISUALID = "SDL_VIDEO_X11_WINDOW_VISUALID"; enum SDL_HINT_VIDEO_X11_FORCE_EGL = "SDL_VIDEO_X11_FORCE_EGL"; enum SDL_HINT_GAMECONTROLLERTYPE = "SDL_GAMECONTROLLERTYPE"; enum SDL_HINT_GAMECONTROLLER_USE_BUTTON_LABELS = "SDL_GAMECONTROLLER_USE_BUTTON_LABELS"; enum SDL_HINT_JOYSTICK_HIDAPI_GAMECUBE = "SDL_JOYSTICK_HIDAPI_GAMECUBE"; enum SDL_HINT_DISPLAY_USABLE_BOUNDS = "SDL_DISPLAY_USABLE_BOUNDS"; } enum SDL_HintPriority { SDL_HINT_DEFAULT, SDL_HINT_NORMAL, SDL_HINT_OVERRIDE, } mixin(expandEnum!SDL_HintPriority); extern(C) nothrow alias SDL_HintCallback = void function(void*, const(char)*, const(char)*); static if(staticBinding) { extern(C) @nogc nothrow { SDL_bool SDL_SetHintWithPriority(const(char)*,const(char)*,SDL_HintPriority); SDL_bool SDL_SetHint(const(char)*,const(char)*); const(char)* SDL_GetHint(const(char)*); void SDL_AddHintCallback(const(char)*,SDL_HintCallback,void*); void SDL_DelHintCallback(const(char)*,SDL_HintCallback,void*); void SDL_ClearHints(); static if(sdlSupport >= SDLSupport.sdl205) { SDL_bool SDL_GetHintBoolean(const(char)*,SDL_bool); } } } else { extern(C) @nogc nothrow { alias pSDL_SetHintWithPriority = SDL_bool function(const(char)*,const(char)*,SDL_HintPriority); alias pSDL_SetHint = SDL_bool function(const(char)*,const(char)*); alias pSDL_GetHint = const(char)* function(const(char)*); alias pSDL_AddHintCallback = void function(const(char)*,SDL_HintCallback,void*); alias pSDL_DelHintCallback = void function(const(char)*,SDL_HintCallback,void*); alias pSDL_ClearHints = void function(); } __gshared { pSDL_SetHintWithPriority SDL_SetHintWithPriority; pSDL_SetHint SDL_SetHint; pSDL_GetHint SDL_GetHint; pSDL_AddHintCallback SDL_AddHintCallback; pSDL_DelHintCallback SDL_DelHintCallback; pSDL_ClearHints SDL_ClearHints; } static if(sdlSupport >= SDLSupport.sdl205) { extern(C) @nogc nothrow { alias pSDL_GetHintBoolean = SDL_bool function(const(char)*,SDL_bool); } __gshared { pSDL_GetHintBoolean SDL_GetHintBoolean; } } }
D
module gsb.gl.graphicsmodule; import gsb.core.log; import gsb.utils.signals; import gsb.core.singleton; import gsb.core.stats; import gsb.engine.engine_interface: FrameTime; import std.format; import std.algorithm.sorting; class GraphicsComponent { abstract void onLoad (); abstract void onUnload (); abstract void render (); @property auto name () { return _name; } @property auto id () { return _id; } @property auto active () { return _active; } @property auto priority () { return _priority; } private string _name; private ulong _id = 0; private uint _priority = 0; private bool _active = false; private bool _needsInit = false; private bool _needsDeinit = false; } public @property auto GraphicsComponentManager () { return GraphicsComponentManagerInstance.instance; } private class GraphicsComponentManagerInstance { mixin LowLockSingleton; // attach to on main thread public Signal!(string, GraphicsComponent) onComponentLoaded; public Signal!(string, GraphicsComponent) onComponentUnloaded; public Signal!(string, GraphicsComponent) onComponentRegistered; private GraphicsComponent[] components; //private GraphicsComponent[] pendingComponents; private ulong nextComponentId = 1; // temp shared lists -- gt writes, mt reads + clears private GraphicsComponent[] pendingComponentLoadSignals; private GraphicsComponent[] pendingComponentUnloadSignals; // temp lists used only on graphics thread private GraphicsComponent[] tmp_queuedInit; private GraphicsComponent[] tmp_queuedDeinit; void updateFromGraphicsThread () { synchronized { //components ~= pendingComponents; //pendingComponents.length = 0; tmp_queuedInit.length = 0; tmp_queuedDeinit.length = 0; for (auto i = components.length; i --> 0; ) { auto component = components[i]; if (component._needsInit && !component._active) { component._needsInit = false; component._active = true; tmp_queuedInit ~= component; pendingComponentLoadSignals ~= component; } else if (component._needsDeinit && component._active) { component._needsDeinit = false; component._active = false; tmp_queuedDeinit ~= component; pendingComponentUnloadSignals ~= component; } } } if (tmp_queuedInit.length) { foreach (component; tmp_queuedInit) { component.onLoad(); } } if (tmp_queuedDeinit.length) { foreach (component; tmp_queuedDeinit) { component.onUnload(); } } if (tmp_queuedInit.length || tmp_queuedDeinit.length) components.sort!"a.active && !b.active || a.id < b.id"(); foreach (component; components) { if (component.active) { component.render(); } } } void updateFromMainThread ( FrameTime ft ) { if (pendingComponentLoadSignals.length || pendingComponentUnloadSignals.length) { GraphicsComponent[] recentlyLoaded, recentlyUnloaded; synchronized { recentlyLoaded = pendingComponentLoadSignals; recentlyUnloaded = pendingComponentUnloadSignals; pendingComponentLoadSignals.length = 0; pendingComponentUnloadSignals.length = 0; } foreach (component; recentlyLoaded) onComponentLoaded.emit(component.name, component); foreach (component; recentlyUnloaded) onComponentUnloaded.emit(component.name, component); } } void registerComponent (GraphicsComponent component, string name, bool active = true) { synchronized { foreach (component_; components) { if (component_.name == name) { throw new Exception(format("Already registered component '%s'", name)); } } component._id = nextComponentId++; component._name = name; component._needsInit = active; components ~= component; } } void activateComponent (string name) { synchronized { foreach (component; components) { if (component.name == name) { component._needsInit = true; return; } } throw new Exception(format("No registered component '%s'", name)); } } void deactivateComponent (string name) { synchronized { foreach (component; components) { if (component.name == name) { component._needsDeinit = true; return; } } throw new Exception(format("No registered component '%s'", name)); } } }
D
// URL: https://yukicoder.me/problems/no/656 import std.algorithm, std.array, std.container, std.math, std.range, std.typecons, std.string; version(unittest) {} else void main() { string S; io.getV(S); io.put(S.map!(c => cast(int)(c-'0')).sum + S.count('0')*10); } auto io = IO!()(); import lib.io;
D
move so that an opening or passage is obstructed become closed cease to operate or cause to cease operating finish or terminate (meetings, speeches, etc. come to a close complete a business deal, negotiation, or an agreement be priced or listed when trading stops engage at close quarters cause a window or an application to disappear on a computer desktop change one's body stance so that the forward shoulder and foot are closer to the intended point of impact come together, as if in an embrace draw near bring together all the elements or parts of bar access to fill or stop up unite or bring into contact or bring together the edges of finish a game in baseball by protecting a lead not open or affording passage or access (set theory) of an interval that contains both its endpoints not open used especially of mouth or eyes requiring union membership with shutters closed not open to the general public not having an open mind blocked against entry
D
import std.stdio; import core.thread; import server; void main() { Server _server = new Server(); auto tid = new Thread(() { _server.run(); }).start(); }
D
/* DSFML - The Simple and Fast Multimedia Library for D Copyright (c) <2013> <Jeremy DeHaan> This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution ***All code is based on code written by Laurent Gomila*** External Libraries Used: SFML - The Simple and Fast Multimedia Library Copyright (C) 2007-2013 Laurent Gomila (laurent.gom@gmail.com) All Libraries used by SFML - For a full list see http://www.sfml-dev.org/license.php */ module dsfml.window.joystick; class Joystick { enum { JoystickCount = 8, JoystickButtonCount = 32, JoystickAxisCount = 8 } enum Axis { X, Y, Z, R, U, V, PovX, PovY } static bool isConnected(uint joystick) { return (sfJoystick_isConnected(joystick)); } static uint getButtonCount(uint joystick) { return sfJoystick_getButtonCount(joystick); } static void update() { sfJoystick_update(); } static bool hasAxis(uint joystick, Axis axis) { return (sfJoystick_hasAxis(joystick, axis)); } static float getAxisPosition(uint joystick, Axis axis) { return sfJoystick_getAxisPosition(joystick, axis); } static bool isButtonPressed(uint joystick, uint button) { return sfJoystick_isButtonPressed(joystick, button); } } private extern(C): //Check if a joystick is connected bool sfJoystick_isConnected(uint joystick); //Return the number of buttons supported by a joystick uint sfJoystick_getButtonCount(uint joystick); //Check if a joystick supports a given axis bool sfJoystick_hasAxis(uint joystick, int axis); //Check if a joystick button is pressed bool sfJoystick_isButtonPressed(uint joystick, uint button); //Get the current position of a joystick axis float sfJoystick_getAxisPosition(uint joystick, int axis); //Update the states of all joysticks void sfJoystick_update(); unittest { import std.stdio; Joystick.update(); bool[] joysticks = [false,false,false,false,false,false,false,false]; for(uint i; i < Joystick.JoystickCount; ++i) { if(Joystick.isConnected(i)) { joysticks[i] = true; writeln("Joystick number ",i," is connected!"); } } foreach(uint i,bool joystick;joysticks) { if(joystick) { //Check buttons uint buttonCounts = Joystick.getButtonCount(i); for(uint j = 0; j<buttonCounts; ++j) { if(Joystick.isButtonPressed(i,j)) { writeln("Button ", j, " was pressed on joystick ", i); } } //check axis for(int j = 0; j<Joystick.JoystickAxisCount;++j) { Joystick.Axis axis = cast(Joystick.Axis)j; if(Joystick.hasAxis(i,axis)) { writeln("Axis ", axis, " has a position of ", Joystick.getAxisPosition(i,axis), "for joystick", i); } } } } }
D
import std.stdio, std.string; void main() { uint[string] dictionary; foreach (line; stdin.byLine()) { // Break sentence into words // Add each word in the sentence to the vocab foreach (word; splitter(strip(line))) { if(word in dictionary) continue; // Nothing to do auto newId = dictionary.length; dictionary[word] = newID; writeln(newID, '\t', word); } } }
D
/* Converted to D from openinput.h by htod */ module openinput.openinput; /* * openinput.h : Top-level include file for OpenInput * * This file is a part of the OpenInput library. * Copyright (C) 2005 Jakob Kjaer <makob@makob.dk>. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* ******************************************************************** */ //C #ifndef _OPENINPUT_H_ //C #define _OPENINPUT_H_ //C #ifdef __cplusplus //C extern "C" { //C #endif /* ******************************************************************** */ /** * @ingroup PMain * @{ */ // Fix Windows //C #if !defined(WIN32) && defined(_WIN32) //C #define WIN32 //C #endif // Export keyword //C #ifndef DECLSPEC //C # ifdef WIN32 //C # define DECLSPEC __declspec(dllexport) /**< Export keyword, Windows */ //C # else //C # define DECLSPEC /**< Export keyword, default */ //C # endif //C #endif // Calling convention //C #ifndef OICALL //C # define OICALL /**< Calling convention, default */ //C #endif /** @} */ /* ******************************************************************** */ /** * @ingroup PMain * @{ */ //C #define OI_MAJOR_VERSION 0 /**< Major version number (autogenerated) */ //C #define OI_MINOR_VERSION 2 /**< Minor version number (autogenerated) */ const OI_MAJOR_VERSION = 0; //C #define OI_PATCH_VERSION 3 /**< Patch version number (autogenerated) */ const OI_MINOR_VERSION = 2; //C #define OI_VERSION "0.2.3" /**< Version as a string (autogenerated) */ const OI_PATCH_VERSION = 3; /** @} */ /* ******************************************************************** */ //C #include "openinput_types.h" import openinput.openinput_types; //C #include "openinput_keyboard.h" import openinput.openinput_keyboard; //C #include "openinput_mouse.h" import openinput.openinput_mouse; //C #include "openinput_joystick.h" import openinput.openinput_joystick; //C #include "openinput_action.h" import openinput.openinput_action; //C #include "openinput_events.h" import openinput.openinput_events; //C #include "openinput_api.h" import openinput.openinput_api; /* ******************************************************************** */ //C #ifdef __cplusplus //C } //C #endif //C #endif
D
module served.linters.diagnosticmanager; import std.array : array; import std.algorithm : map, sort; import served.utils.memory; import served.types; import painlessjson; enum NumDiagnosticProviders = 3; alias DiagnosticCollection = PublishDiagnosticsParams[]; DiagnosticCollection[NumDiagnosticProviders] diagnostics; DiagnosticCollection combinedDiagnostics; DocumentUri[] publishedUris; void combineDiagnostics() { combinedDiagnostics.length = 0; foreach (provider; diagnostics) { foreach (errors; provider) { size_t index = combinedDiagnostics.length; foreach (i, existing; combinedDiagnostics) { if (existing.uri == errors.uri) { index = i; break; } } if (index == combinedDiagnostics.length) combinedDiagnostics ~= PublishDiagnosticsParams(errors.uri); combinedDiagnostics[index].diagnostics ~= errors.diagnostics; } } } /// Returns a reference to existing diagnostics for a given url in a given slot or creates a new array for them and returns the reference for it. /// Params: /// slot = the diagnostic provider slot to edit /// uri = the document uri to attach the diagnostics array for ref auto createDiagnosticsFor(int slot)(string uri) { static assert(slot < NumDiagnosticProviders); foreach (ref existing; diagnostics[slot]) if (existing.uri == uri) return existing.diagnostics; return pushRef(diagnostics[slot], PublishDiagnosticsParams(uri, null)).diagnostics; } private ref T pushRef(T)(ref T[] arr, T value) { auto len = arr.length++; return arr[len] = value; } void updateDiagnostics(string uriHint = "") { combineDiagnostics(); foreach (diagnostics; combinedDiagnostics) { if (!uriHint.length || diagnostics.uri == uriHint) { // TODO: related information RequestMessage request; request.method = "textDocument/publishDiagnostics"; request.params = diagnostics.toJSON; rpc.send(request); } } // clear old diagnostics auto diags = combinedDiagnostics.map!"a.uri".array; auto sorted = diags.sort!"a<b"; foreach (submitted; publishedUris) { if (!sorted.contains(submitted)) { RequestMessage request; request.method = "textDocument/publishDiagnostics"; request.params = PublishDiagnosticsParams(submitted, null).toJSON; rpc.send(request); } } destroyUnset(publishedUris); publishedUris = diags; }
D
/home/dur4n/developer/blockchain/solana/SecretNumber/solanaProgram/target/debug/deps/time_macros-c046401916b559fb.rmeta: /home/dur4n/.cargo/registry/src/github.com-1ecc6299db9ec823/time-macros-0.1.1/src/lib.rs /home/dur4n/developer/blockchain/solana/SecretNumber/solanaProgram/target/debug/deps/libtime_macros-c046401916b559fb.rlib: /home/dur4n/.cargo/registry/src/github.com-1ecc6299db9ec823/time-macros-0.1.1/src/lib.rs /home/dur4n/developer/blockchain/solana/SecretNumber/solanaProgram/target/debug/deps/time_macros-c046401916b559fb.d: /home/dur4n/.cargo/registry/src/github.com-1ecc6299db9ec823/time-macros-0.1.1/src/lib.rs /home/dur4n/.cargo/registry/src/github.com-1ecc6299db9ec823/time-macros-0.1.1/src/lib.rs:
D
import pl0_extended_ast; import pl0_extended_token; version = Location; immutable string header = ` version (Location) { MyLocation loc; auto firstToken = peekToken(0); loc.line = firstToken.line; loc.col = firstToken.col; loc.absPos = firstToken.pos; } `; string footer(alias T)() if (is(T : PLNode) || is(typeof(T):PLNode)) { static if (!is(T : PLNode) && is(typeof(T):PLNode)) { auto m = __traits(identifier, T); auto r = m ~ ".loc = loc;\n\t\t\t return " ~ m ~ ";\n"; } else { auto ta = [__traits(derivedMembers, T)[0 .. ((!$) ? $ : $-1)]]; static if (is(typeof(ta)==void[])) { auto ms = ""; } else { import std.range; auto ms = ta.join(", "); } auto m = "new " ~ __traits(identifier, T) ~ "(" ~ ms ~ ")\n"; auto r = "auto ret = " ~ m ~ ";\n\t\t\t" ~"ret.loc = loc;\n\t\t\treturn ret;\n"; } immutable string footer = ` version (Location) { auto lastToken = peekToken(-1); loc.length = lastToken.pos - firstToken.pos + lastToken.length; ` ~ r ~ ` } else { return ` ~ m ~ `; } `; return footer; } Programm parse(in Token[] tokens) pure { struct Parser { pure : const(Token[]) tokens; uint pos; Token lastMatched; const(Token) peekToken(int offset) { if (pos + offset > tokens.length - 1) { return Token.init; } assert(pos + offset >= 0, "Trying to read outside of sourceCode"); return tokens[pos + offset]; } bool peekMatch(TokenType[] arr) { foreach (uint i,e;arr) { if(peekToken(i).type != e) { return false; } } return true; } bool opt_match(TokenType t) { lastMatched = cast(Token) peekToken(0); if (lastMatched.type == t) { pos++; return true; } else { lastMatched = Token.init; return false; } } Token match(bool _try = false)(TokenType t) { import std.conv; import std.exception:enforce; static if (!_try) { enforce(opt_match(t), "Expected : " ~ to!string(t) ~ " Got : " ~ to!string(peekToken(0)) ); return lastMatched; } else { return ((opt_match(t) ? lastMatched : Token.init)); } } bool isPLNode() { return isProgramm(); } bool isBlock() { return peekMatch([TokenType.TT_21]) || peekMatch([TokenType.TT_26]) || peekMatch([TokenType.TT_28]) || isStatement(); } bool isProgramm() { return isBlock(); } bool isLiteral() { return peekMatch([TokenType.TT_Number]); } bool isNumber() { return peekMatch([TokenType.TT_Number]); } bool isIdentifier() { return peekMatch([TokenType.TT_Identifier]); } bool isProDecl() { return peekMatch([TokenType.TT_Identifier, TokenType.TT_12]); } bool isConstDecl() { return peekMatch([TokenType.TT_Identifier, TokenType.TT_15]); } bool isVarDecl() { return peekMatch([TokenType.TT_Identifier]); } bool isStatement() { return isIfStatement() || isWhileStatement() || isAssignmentStatement() || isBeginEndStatement() || isCallStatement() || isOutputStatement(); } bool isIfStatement() { return peekMatch([TokenType.TT_24]); } bool isWhileStatement() { return peekMatch([TokenType.TT_29]); } bool isAssignmentStatement() { return peekMatch([TokenType.TT_Identifier, TokenType.TT_11]); } bool isBeginEndStatement() { return peekMatch([TokenType.TT_19]); } bool isCallStatement() { return peekMatch([TokenType.TT_20]); } bool isOutputStatement() { return peekMatch([TokenType.TT_1]); } bool isCondition() { return isOddCondition() || isExpression(); } // bool isRelCondition() { // return peekMatch([TokenType.TT_Expression, TokenType.TT_RelOp]); // } bool isOddCondition() { return peekMatch([TokenType.TT_25]); } bool isRelOp() { return isEquals() || isGreater() || isLess() || isGreaterEq() || isLessEq() || isHash(); } bool isEquals() { return peekMatch([TokenType.TT_15]); } bool isGreater() { return peekMatch([TokenType.TT_16]); } bool isLess() { return peekMatch([TokenType.TT_13]); } bool isGreaterEq() { return peekMatch([TokenType.TT_17]); } bool isLessEq() { return peekMatch([TokenType.TT_14]); } bool isHash() { return peekMatch([TokenType.TT_2]); } bool isAddOp() { return isAdd() || isSub(); } bool isAdd() { return peekMatch([TokenType.TT_6]); } bool isSub() { return peekMatch([TokenType.TT_8]); } bool isMulOp() { return isMul() || isDiv(); } bool isMul() { return peekMatch([TokenType.TT_5]); } bool isDiv() { return peekMatch([TokenType.TT_10]); } bool isExpression() { return isAddExprssion() || isMulExpression() || isPrimaryExpression(); } bool isAddExprssion() { return isAddOp(); } bool isMulExpression() { return isMulOp(); } bool isParenExpression() { return peekMatch([TokenType.TT_3]); } bool isPrimaryExpression() { return peekMatch([TokenType.TT_Identifier]) || peekMatch([TokenType.TT_Number]) || peekMatch([TokenType.TT_3]) || peekMatch([TokenType.TT_8, TokenType.TT_Identifier]) || peekMatch([TokenType.TT_8, TokenType.TT_Number]) || peekMatch([TokenType.TT_8, TokenType.TT_3]); } PLNode parsePLNode() { PLNode p; if (isLiteral()) { p = parseLiteral(); } else if (isProgramm()) { p = parseProgramm(); } return p; } Identifier parseIdentifier() { char[] identifier; mixin(header); identifier = match(TokenType.TT_Identifier).data; mixin(footer!Identifier); } Number parseNumber() { char[] number; mixin(header); number = match(TokenType.TT_Number).data; mixin(footer!Number); } Literal parseLiteral() { Number intp; Number floatp; mixin(header); intp = parseNumber(); if (opt_match(TokenType.TT_9)) { floatp = parseNumber(); } mixin(footer!Literal); } Programm parseProgramm() { Block block; mixin(header); block = parseBlock(); match(TokenType.TT_9); mixin(footer!Programm); } Block parseBlock() { ConstDecl[] constants; VarDecl[] variables; ProDecl[] procedures; Statement statement; mixin(header); if (opt_match(TokenType.TT_21)) { constants ~= parseConstDecl(); while(opt_match(TokenType.TT_7)) { constants ~= parseConstDecl(); } match(TokenType.TT_12); } if (opt_match(TokenType.TT_28)) { variables ~= parseVarDecl(); while(opt_match(TokenType.TT_7)) { variables ~= parseVarDecl(); } match(TokenType.TT_12); } if (opt_match(TokenType.TT_26)) { procedures ~= parseProDecl(); while(opt_match(TokenType.TT_26)) { procedures ~= parseProDecl(); } } statement = parseStatement(); mixin(footer!Block); } ConstDecl parseConstDecl() { Identifier name; PrimaryExpression _init; mixin(header); name = parseIdentifier(); match(TokenType.TT_15); _init = parsePrimaryExpression(); mixin(footer!ConstDecl); } VarDecl parseVarDecl() { Identifier name; PrimaryExpression _init; mixin(header); name = parseIdentifier(); if (opt_match(TokenType.TT_15)) { _init = parsePrimaryExpression(); } mixin(footer!VarDecl); } ProDecl parseProDecl() { Identifier name; bool isFunction; Block block; VarDecl[] arguments; mixin(header); name = parseIdentifier(); match(TokenType.TT_12); if (opt_match(TokenType.TT_18)) { isFunction = true; if(!opt_match(TokenType.TT_12)) { arguments ~= parseVarDecl(); while(opt_match(TokenType.TT_7)) { arguments ~= parseVarDecl(); } match(TokenType.TT_12); } } block = parseBlock(); match(TokenType.TT_12); mixin(footer!ProDecl); } Statement parseStatement() { Statement s; mixin(header); if (isAssignmentStatement()) { s = parseAssignmentStatement(); } else if (isBeginEndStatement()) { s = parseBeginEndStatement(); } else if (isIfStatement()) { s = parseIfStatement(); } else if (isWhileStatement()) { s = parseWhileStatement(); } else if (isCallStatement()) { s = parseCallStatement(); } else if (isOutputStatement()) { s = parseOutputStatement(); } else { import std.conv; debug { import std.stdio; // __ctfeWriteln(isStatement()); } assert(s !is null, to!(string)(peekToken(0))); } mixin(footer!s); } AssignmentStatement parseAssignmentStatement() { Identifier name; Expression expr; mixin(header); name = parseIdentifier(); match(TokenType.TT_11); expr = parseExpression(); mixin(footer!AssignmentStatement); } BeginEndStatement parseBeginEndStatement() { Statement[] statements; mixin(header); match(TokenType.TT_19); do { statements ~= parseStatement(); } while(opt_match(TokenType.TT_12)); match!(false)(TokenType.TT_23); mixin(footer!BeginEndStatement); } IfStatement parseIfStatement() { Condition cond; Statement stmt; mixin(header); match(TokenType.TT_24); cond = parseCondition(); match(TokenType.TT_27); stmt = parseStatement(); mixin(footer!IfStatement); } WhileStatement parseWhileStatement() { Condition cond; Statement stmt; mixin(header); match(TokenType.TT_29); cond = parseCondition(); match(TokenType.TT_22); stmt = parseStatement(); mixin(footer!WhileStatement); } CallStatement parseCallStatement() { Identifier name; Expression[] arguments; mixin(header); match(TokenType.TT_20); name = parseIdentifier(); if (opt_match(TokenType.TT_18)) { arguments ~= parseExpression; while(opt_match(TokenType.TT_7)) { arguments ~= parseExpression(); } } mixin(footer!CallStatement); } OutputStatement parseOutputStatement() { Expression expr; mixin(header); match(TokenType.TT_1); expr = parseExpression(); mixin(footer!OutputStatement); } Condition parseCondition() { Condition c; mixin(header); if (isOddCondition()) { c = parseOddCondition(); } else { c = parseRelCondition(); } mixin(footer!c); } OddCondition parseOddCondition() { Expression expr; match(TokenType.TT_25); expr = parseExpression(); return new OddCondition(expr); } RelCondition parseRelCondition() { Expression lhs; RelOp op; Expression rhs; mixin(header); lhs = parseExpression(); op = parseRelOp(); rhs = parseExpression(); mixin(footer!RelCondition); } RelOp parseRelOp() { RelOp r; if (isEquals()) { r = parseEquals(); } else if (isGreater()) { r = parseGreater(); } else if (isLess()) { r = parseLess(); } else if (isGreaterEq()) { r = parseGreaterEq(); } else if (isLessEq()) { r = parseLessEq(); } else if (isHash()) { r = parseHash(); } return r; } Equals parseEquals() { match(TokenType.TT_15); return new Equals(); } Greater parseGreater() { match(TokenType.TT_16); return new Greater(); } Less parseLess() { match(TokenType.TT_13); return new Less(); } GreaterEq parseGreaterEq() { match(TokenType.TT_17); return new GreaterEq(); } LessEq parseLessEq() { match(TokenType.TT_14); return new LessEq(); } Hash parseHash() { match(TokenType.TT_2); return new Hash(); } AddOp parseAddOp() { AddOp a; if (isAdd()) { a = parseAdd(); } else if (isSub()) { a = parseSub(); } return a; } Add parseAdd() { match(TokenType.TT_6); return new Add(); } Sub parseSub() { match(TokenType.TT_8); return new Sub(); } MulOp parseMulOp() { MulOp m; if (isMul()) { m = parseMul(); } else if (isDiv()) { m = parseDiv(); } return m; } Mul parseMul() { match(TokenType.TT_5); return new Mul(); } Div parseDiv() { match(TokenType.TT_10); return new Div(); } enum ExpressionRCEnum { __Init, __AddExprssion, __MulExpression } Expression parseExpression(ExpressionRCEnum __rc = ExpressionRCEnum.__Init) { Expression e; mixin(header); if (isPrimaryExpression()) { e = parsePrimaryExpression(); } if (isAddExprssion()) { e = parseAddExprssion(e); } else if (isMulExpression()) { e = parseMulExpression(e); } mixin(footer!e); } AddExprssion parseAddExprssion(Expression prev) { Expression lhs; AddOp op; Expression rhs; mixin(header); lhs = prev; op = parseAddOp(); rhs = parseExpression(); mixin(footer!AddExprssion); } MulExpression parseMulExpression(Expression prev) { Expression lhs; MulOp op; Expression rhs; mixin(header); lhs = prev; op = parseMulOp(); rhs = parseExpression(); mixin(footer!MulExpression); } ParenExpression parseParenExpression() { Expression expr; mixin(header); match(TokenType.TT_3); expr = parseExpression(); match(TokenType.TT_4); mixin(footer!ParenExpression); } PrimaryExpression parsePrimaryExpression() { bool isNegative; Literal literal; Identifier identifier; ParenExpression paren; mixin(header); if (opt_match(TokenType.TT_8)) { isNegative = true; } if (isLiteral()) { literal = parseLiteral(); } else if (isIdentifier()) { identifier = parseIdentifier(); } else if (isParenExpression()) { paren = parseParenExpression(); } mixin(footer!PrimaryExpression); } } return Parser(tokens).parseProgramm; }
D
#!/usr/bin/env rdmd /** DMD builder Usage: ./build.d dmd detab, tolf, install targets - require the D Language Tools (detab.exe, tolf.exe) https://github.com/dlang/tools. zip target - requires Info-ZIP or equivalent (zip32.exe) http://www.info-zip.org/Zip.html#Downloads TODO: - add all posix.mak Makefile targets - support 32-bit builds - allow appending DFLAGS via the environment - test the script with LDC or GDC as host compiler */ version(CoreDdoc) {} else: import std.algorithm, std.conv, std.datetime, std.exception, std.file, std.format, std.functional, std.getopt, std.parallelism, std.path, std.process, std.range, std.stdio, std.string, std.traits; import core.stdc.stdlib : exit; const thisBuildScript = __FILE_FULL_PATH__.buildNormalizedPath; const srcDir = thisBuildScript.dirName; const dmdRepo = srcDir.dirName; shared bool verbose; // output verbose logging shared bool force; // always build everything (ignores timestamp checking) shared bool dryRun; /// dont execute targets, just print command to be executed __gshared string[string] env; __gshared string[][string] flags; __gshared typeof(sourceFiles()) sources; /// Array of dependencies through which all other dependencies can be reached immutable rootDeps = [ &dmdDefault, &runDmdUnittest, &clean, &checkwhitespace, &runCxxUnittest, &detab, &tolf, &zip, &html, ]; void main(string[] args) { int jobs = totalCPUs; bool calledFromMake = false; auto res = getopt(args, "j|jobs", "Specifies the number of jobs (commands) to run simultaneously (default: %d)".format(totalCPUs), &jobs, "v", "Verbose command output", (cast(bool*) &verbose), "f", "Force run (ignore timestamps and always run all tests)", (cast(bool*) &force), "d|dry-run", "Print commands instead of executing them", (cast(bool*) &dryRun), "called-from-make", "Calling the build script from the Makefile", &calledFromMake ); void showHelp() { defaultGetoptPrinter(`./build.d <targets>... Examples -------- ./build.d dmd # build DMD ./build.d unittest # runs internal unittests ./build.d clean # remove all generated files ./build.d generated/linux/release/64/dmd.conf Important variables: -------------------- HOST_DMD: Host D compiler to use for bootstrapping AUTO_BOOTSTRAP: Enable auto-boostrapping by downloading a stable DMD binary MODEL: Target architecture to build for (32,64) - defaults to the host architecture Build modes: ------------ BUILD: release (default) | debug (enabled a build with debug instructions) Opt-in build features: ENABLE_RELEASE: Optimized release built ENABLE_DEBUG: Add debug instructions and symbols (set if ENABLE_RELEASE isn't set) ENABLE_LTO: Enable link-time optimizations ENABLE_UNITTEST: Build dmd with unittests (sets ENABLE_COVERAGE=1) ENABLE_PROFILE: Build dmd with a profiling recorder (D) ENABLE_COVERAGE Build dmd with coverage counting ENABLE_SANITIZERS Build dmd with sanitizer (e.g. ENABLE_SANITIZERS=address,undefined) Targets ------- ` ~ targetsHelp ~ ` The generated files will be in generated/$(OS)/$(BUILD)/$(MODEL) Command-line parameters ----------------------- `, res.options); return; } // parse arguments args.popFront; args2Environment(args); parseEnvironment; processEnvironment; processEnvironmentCxx; sources = sourceFiles; if (res.helpWanted) return showHelp; // default target if (!args.length) args = ["dmd"]; auto targets = args .predefinedTargets // preprocess .array; if (targets.length == 0) return showHelp; if (verbose) { log("================================================================================"); foreach (key, value; env) log("%s=%s", key, value); log("================================================================================"); } { File lockFile; if (calledFromMake) { // If called from make, use an interprocess lock so that parallel builds don't stomp on each other lockFile = File(env["GENERATED"].buildPath("build.lock"), "w"); lockFile.lock(); } scope (exit) { if (calledFromMake) { lockFile.unlock(); lockFile.close(); } } foreach (target; targets.parallel(1)) target(); } writeln("Success"); } /// Generate list of targets for use in the help message string targetsHelp() { string result = ""; foreach (dep; DependencyRange(rootDeps.map!(a => a()).array)) { if (dep.name) { enum defaultPrefix = "\n "; result ~= dep.name; string prefix = defaultPrefix[1 + dep.name.length .. $]; void add(string msg) { result ~= format("%s%s", prefix, msg); prefix = defaultPrefix; } if (dep.description) add(dep.description); else if (dep.targets) { foreach (target; dep.targets) { add(target.relativePath); } } result ~= "\n"; } } return result; } /** D build dependencies ==================== The strategy of this script is to emulate what the Makefile is doing. Below all individual dependencies of DMD are defined. They have a target path, sources paths and an optional name. When a dependency is needed either its command or custom commandFunction is executed. A dependency will be skipped if all targets are older than all sources. This script is by default part of the sources and thus any change to the build script, will trigger a full rebuild. */ /// Returns: the dependency that builds the lexer alias lexer = makeDep!((builder, dep) => builder .name("lexer") .target(env["G"].buildPath("lexer").libName) .sources(sources.lexer) .deps([versionFile, sysconfDirFile]) .msg("(DC) D_LEXER_OBJ %-(%s, %)".format(dep.sources.map!(e => e.baseName).array)) .command([env["HOST_DMD_RUN"], "-of" ~ dep.target, "-lib", "-vtls"] .chain(flags["DFLAGS"], // source files need to have relative paths in order for the code coverage // .lst files to be named properly for CodeCov to find them dep.sources.map!(e => e.relativePath(srcDir)) ).array ) ); /// Returns: the dependency that generates the dmd.conf file in the output folder alias dmdConf = makeDep!((builder, dep) { // TODO: add support for Windows string exportDynamic; version(OSX) {} else exportDynamic = " -L--export-dynamic"; auto conf = `[Environment32] DFLAGS=-I%@P%/../../../../../druntime/import -I%@P%/../../../../../phobos -L-L%@P%/../../../../../phobos/generated/{OS}/{BUILD}/32{exportDynamic} [Environment64] DFLAGS=-I%@P%/../../../../../druntime/import -I%@P%/../../../../../phobos -L-L%@P%/../../../../../phobos/generated/{OS}/{BUILD}/64{exportDynamic} -fPIC` .replace("{exportDynamic}", exportDynamic) .replace("{BUILD}", env["BUILD"]) .replace("{OS}", env["OS"]); builder .name("dmdconf") .target(env["G"].buildPath("dmd.conf")) .msg("(TX) DMD_CONF") .commandFunction(() { conf.toFile(dep.target); }); }); /// Returns: the dependencies that build the D backend alias backendObj = makeDep!((builder, dep) => builder .name("backendObj") .target(env["G"].buildPath("backend").objName) .sources(sources.backend) .msg("(DC) D_BACK_OBJS %-(%s, %)".format(dep.sources.map!(e => e.baseName).array)) .command([ env["HOST_DMD_RUN"], "-c", "-of" ~ dep.target, "-betterC"] .chain(flags["DFLAGS"], dep.sources).array) ); /// Execute the sub-dependencies of the backend and pack everything into one object file alias backend = makeDep!((builder, dep) => builder .name("backend") .msg("(LIB) %s".format("BACKEND".libName)) .sources([env["G"].buildPath("backend").objName]) .target(env["G"].buildPath("backend").libName) .deps([backendObj]) .command([env["HOST_DMD_RUN"], env["MODEL_FLAG"], "-lib", "-of" ~ dep.target].chain(dep.sources).array) ); /// Returns: the dependencies that generate required string files: VERSION and SYSCONFDIR.imp alias versionFile = makeDep!((builder, dep) => builder .msg("(TX) VERSION") .target(env["G"].buildPath("VERSION")) .commandFunction(() { string ver; if (dmdRepo.buildPath(".git").exists) { try { auto gitResult = ["git", "describe", "--dirty"].run; if (gitResult.status == 0) ver = gitResult.output.strip; } catch (ProcessException) { // git not installed } } // version fallback if (ver.length == 0) ver = dmdRepo.buildPath("VERSION").readText; updateIfChanged(dep.target, ver); }) ); alias sysconfDirFile = makeDep!((builder, dep) => builder .msg("(TX) SYSCONFDIR") .target(env["G"].buildPath("SYSCONFDIR.imp")) .commandFunction(() { updateIfChanged(dep.target, env["SYSCONFDIR"]); }) ); /** Dependency for the DMD executable. Params: extra_flags = Flags to apply to the main build but not the dependencies */ alias dmdExe = makeDepWithArgs!((MethodInitializer!Dependency builder, Dependency dep, string targetSuffix, string[] extraFlags) { const dmdSources = sources.dmd.chain(sources.root).array; string[] platformArgs; version (Windows) platformArgs = ["-L/STACK:8388608"]; builder // newdelete.o + lexer.a + backend.a .sources(dmdSources.chain(lexer.targets, backend.targets).array) .target(env["DMD_PATH"] ~ targetSuffix) .msg("(DC) DMD%s %-(%s, %)".format(targetSuffix, dmdSources.map!(e => e.baseName).array)) .deps([versionFile, sysconfDirFile, lexer, backend]) .command([ env["HOST_DMD_RUN"], "-of" ~ dep.target, "-vtls", "-J" ~ env["RES"], ].chain(extraFlags, platformArgs, flags["DFLAGS"], // source files need to have relative paths in order for the code coverage // .lst files to be named properly for CodeCov to find them dep.sources.map!(e => e.relativePath(srcDir)) ).array); }); alias dmdDefault = makeDep!((builder, dep) => builder .name("dmd") .description("Build dmd") .deps([dmdConf, dmdExe(null, null)]) ); /// Dependency to run the DMD unittest executable. alias runDmdUnittest = makeDep!((builder, dep) { auto dmdUnittestExe = dmdExe("-unittest", ["-version=NoMain", "-unittest", "-main"]); builder .name("unittest") .description("Run the dmd unittests") .msg("(RUN) DMD-UNITTEST") .deps([dmdUnittestExe]) .commandFunction(() { spawnProcess(dmdUnittestExe.targets[0]); }); }); /// Runs the C++ unittest executable alias runCxxUnittest = makeDep!((runCxxBuilder, runCxxDep) { /// Compiles the C++ frontend test files alias cxxFrontend = methodInit!(Dependency, (frontendBuilder, frontendDep) => frontendBuilder .name("cxx-frontend") .description("Build the C++ frontend") .msg("(CXX) CXX-FRONTEND") .sources(srcDir.buildPath("tests", "cxxfrontend.c") ~ .sources.frontendHeaders ~ .sources.dmd ~ .sources.root) .target(env["G"].buildPath("cxxfrontend").objName) .command([ env["CXX"], "-c", frontendDep.sources[0], "-o" ~ frontendDep.target, "-I" ~ env["D"] ] ~ flags["CXXFLAGS"]) ); alias cxxUnittestExe = methodInit!(Dependency, (exeBuilder, exeDep) => exeBuilder .name("cxx-unittest") .description("Build the C++ unittests") .msg("(DMD) CXX-UNITTEST") .deps([lexer, backend, cxxFrontend]) .sources(sources.dmd ~ sources.root) .target(env["G"].buildPath("cxx-unittest").exeName) .command([ env["HOST_DMD_RUN"], "-of=" ~ exeDep.target, "-vtls", "-J" ~ env["RES"], "-L-lstdc++", "-version=NoMain" ].chain( flags["DFLAGS"], exeDep.sources, exeDep.deps.map!(d => d.target) ).array) ); runCxxBuilder .name("cxx-unittest") .description("Run the C++ unittests") .msg("(RUN) CXX-UNITTEST"); version (Windows) runCxxBuilder .commandFunction({ enforce(0, "Running the C++ unittests is not supported on Windows yet"); }); else runCxxBuilder .deps([cxxUnittestExe]) .command([cxxUnittestExe.target]); }); /// Dependency that removes all generated files alias clean = makeDep!((builder, dep) => builder .name("clean") .description("Remove the generated directory") .msg("(RM) " ~ env["G"]) .commandFunction(delegate() { if (env["G"].exists) env["G"].rmdirRecurse; }) ); alias toolsRepo = makeDep!((builder, dep) => builder .commandFunction(delegate() { if (!env["TOOLS_DIR"].exists) { writefln("cloning tools repo to '%s'...", env["TOOLS_DIR"]); run(["git", "clone", "--depth=1", env["GIT_HOME"] ~ "/tools", env["TOOLS_DIR"]]); } }) ); alias checkwhitespace = makeDep!((builder, dep) => builder .name("checkwhitespace") .description("Checks for trailing whitespace and tabs") .deps([toolsRepo]) .commandFunction(delegate() { const cmdPrefix = [env["HOST_DMD_RUN"], "-run", env["TOOLS_DIR"].buildPath("checkwhitespace.d")]; writefln("Checking whitespace on %s files...", allSources.length); auto chunkLength = allSources.length; version (Win32) chunkLength = 80; // avoid command-line limit on win32 foreach (nextSources; allSources.chunks(chunkLength).parallel(1)) { const nextCommand = cmdPrefix ~ nextSources; writeln(nextCommand.join(" ")); run(nextCommand); } }) ); alias detab = makeDep!((builder, dep) => builder .name("detab") .description("replace hard tabs with spaces") .command([env["DETAB"]] ~ allSources) .msg(dep.command.join(" ")) ); alias tolf = makeDep!((builder, dep) => builder .name("tolf") .description("convert to Unix line endings") .command([env["TOLF"]] ~ allSources) .msg(dep.command.join(" ")) ); alias zip = makeDep!((builder, dep) => builder .name("zip") .target(srcDir.buildPath("dmdsrc.zip")) .sources(sources.root ~ sources.backend ~ sources.lexer ~ sources.frontendHeaders ~ sources.dmd) .msg("ZIP " ~ dep.target) .commandFunction(() { if (exists(dep.target)) remove(dep.target); run([env["ZIP"], dep.target, thisBuildScript] ~ dep.sources); }) ); alias html = makeDep!((htmlBuilder, htmlDep) { htmlBuilder .name("html") .description("Generate html docs, requires DMD and STDDOC to be set"); if (env.get("DMD", null).length == 0) { htmlBuilder.commandFunction(delegate() { writefln("ERROR: cannot build '%s' unless DMD is set", htmlDep.name); }); return; } static string d2html(string sourceFile) { const ext = sourceFile.extension(); assert(ext == ".d" || ext == ".di", sourceFile); const htmlFilePrefix = (sourceFile.baseName == "package.d") ? sourceFile[0 .. $ - "package.d".length - 1] : sourceFile[0 .. $ - ext.length]; return htmlFilePrefix ~ ".html"; } const stddocs = env.get("STDDOC", "").split(); auto docSources = .sources.root ~ .sources.lexer ~ .sources.dmd ~ env["D"].buildPath("frontend.d"); htmlBuilder.deps(docSources.chunks(1).map!(sourceArray => methodInit!(Dependency, (docBuilder, docDep) { const source = sourceArray[0]; docBuilder .sources(sourceArray) .target(env["DOC_OUTPUT_DIR"].buildPath(d2html(source)[srcDir.length + 1..$] .replace(dirSeparator, "_"))) .deps([versionFile, sysconfDirFile]) .command([ env["DMD"], "-o-", "-c", "-Dd" ~ env["DOCSRC"], "-J" ~ env["RES"], "-I" ~ env["D"], srcDir.buildPath("project.ddoc") ] ~ stddocs ~ [ "-Df" ~ docDep.target, // Need to use a short relative path to make sure ddoc links are correct source.relativePath(runDir) ] ~ flags["DFLAGS"]) .msg(docDep.command.join(" ")); }) ).array); }); /** Goes through the target list and replaces short-hand targets with their expanded version. Special targets: - clean -> removes generated directory + immediately stops the builder Params: targets = the target list to process Returns: the expanded targets */ auto predefinedTargets(string[] targets) { import std.functional : toDelegate; Appender!(void delegate()[]) newTargets; LtargetsLoop: foreach (t; targets) { t = t.buildNormalizedPath; // remove trailing slashes // check if `t` matches any dependency names first foreach (dep; DependencyRange(rootDeps.map!(a => a()).array)) { if (t == dep.name) { newTargets.put(&dep.run); continue LtargetsLoop; } } switch (t) { case "all": t = "dmd"; goto default; case "auto-tester-build": "TODO: auto-tester-all".writeln; // TODO break; case "toolchain-info": "TODO: info".writeln; // TODO break; case "check-examples": "TODO: cxx-unittest".writeln; // TODO break; case "build-examples": "TODO: build-examples".writeln; // TODO break; case "install": "TODO: install".writeln; // TODO break; case "man": "TODO: man".writeln; // TODO break; default: // check this last, target paths should be checked after predefined names const tAbsolute = t.absolutePath.buildNormalizedPath; foreach (dep; DependencyRange(rootDeps.map!(a => a()).array)) { foreach (depTarget; dep.targets) { if (depTarget.endsWith(t, tAbsolute)) { newTargets.put(&dep.run); continue LtargetsLoop; } } } writefln("ERROR: Target `%s` is unknown.", t); writeln; exit(1); break; } } return newTargets.data; } /// An input range for a recursive set of dependencies struct DependencyRange { private Dependency[] next; private bool[Dependency] added; this(Dependency[] deps) { addDeps(deps); } bool empty() const { return next.length == 0; } auto front() inout { return next[0]; } void popFront() { auto save = next[0]; next = next[1 .. $]; addDeps(save.deps); } void addDeps(Dependency[] deps) { foreach (dep; deps) { if (!added.get(dep, false)) { next ~= dep; added[dep] = true; } } } } /// Sets the environment variables void parseEnvironment() { // This block is temporary until we can remove the windows make files { const ddebug = env.get("DDEBUG", null); if (ddebug.length) { writefln("WARNING: the DDEBUG variable is deprecated"); if (ddebug == "-debug -g -unittest -cov") { environment["ENABLE_DEBUG"] = "1"; environment["ENABLE_UNITTEST"] = "1"; environment["ENABLE_COVERAGE"] = "1"; } else if (ddebug == "-debug -g -unittest") { environment["ENABLE_DEBUG"] = "1"; environment["ENABLE_UNITTEST"] = "1"; } else { writefln("Error: DDEBUG is not an expected value '%s'", ddebug); exit(1); } } } env.getDefault("TARGET_CPU", "X86"); version (Windows) { // On windows, the OS environment variable is already being used by the system. // For example, on a default Windows7 system it's configured by the system // to be "Windows_NT". // // However, there are a good number of components in this repo and the other // repos that set this environment variable to "windows" without checking whether // it's already configured, i.e. // dmd\src\win32.mak (OS=windows) // druntime\win32.mak (OS=windows) // phobos\win32.mak (OS=windows) // // It's necessary to emulate the same behavior in this tool in order to make this // new tool compatible with existing tools. We can do this by also setting the // environment variable to "windows" whether or not it already has a value. // const os = env["OS"] = "windows"; } else const os = env.getDefault("OS", detectOS); auto build = env.getDefault("BUILD", "release"); enforce(build.among("release", "debug"), "BUILD must be 'debug' or 'release'"); // detect Model auto model = env.getDefault("MODEL", detectModel); env["MODEL_FLAG"] = "-m" ~ env["MODEL"]; // detect PIC version(Posix) { // default to PIC on x86_64, use PIC=1/0 to en-/disable PIC. // Note that shared libraries and C files are always compiled with PIC. bool pic; version(X86_64) pic = true; else version(X86) pic = false; if (environment.get("PIC", "0") == "1") pic = true; env["PIC_FLAG"] = pic ? "-fPIC" : ""; } else { env["PIC_FLAG"] = ""; } env.getDefault("GIT", "git"); env.getDefault("GIT_HOME", "https://github.com/dlang"); env.getDefault("SYSCONFDIR", "/etc"); env.getDefault("TMP", tempDir); env.getDefault("RES", dmdRepo.buildPath("res")); env.getDefault("DOCSRC", dmdRepo.buildPath("dlang.org")); if (env.get("DOCDIR", null).length == 0) env["DOCDIR"] = srcDir; env.getDefault("DOC_OUTPUT_DIR", env["DOCDIR"]); auto d = env["D"] = srcDir.buildPath("dmd"); env["C"] = d.buildPath("backend"); env["ROOT"] = d.buildPath("root"); env["EX"] = srcDir.buildPath("examples"); auto generated = env["GENERATED"] = dmdRepo.buildPath("generated"); auto g = env["G"] = generated.buildPath(os, build, model); mkdirRecurse(g); env.getDefault("TOOLS_DIR", dmdRepo.dirName.buildPath("tools")); if (env.get("HOST_DMD", null).length == 0) { const hostDmd = env.get("HOST_DC", null); env["HOST_DMD"] = hostDmd.length ? hostDmd : "dmd"; } // Auto-bootstrapping of a specific host compiler if (env.getDefault("AUTO_BOOTSTRAP", null) == "1") { auto hostDMDVer = env.getDefault("HOST_DMD_VER", "2.088.0"); writefln("Using Bootstrap compiler: %s", hostDMDVer); auto hostDMDRoot = env["G"].buildPath("host_dmd-"~hostDMDVer); auto hostDMDBase = hostDMDVer~"."~os; auto hostDMDURL = "http://downloads.dlang.org/releases/2.x/"~hostDMDVer~"/dmd."~hostDMDBase; env["HOST_DMD"] = hostDMDRoot.buildPath("dmd2", os, os == "osx" ? "bin" : "bin"~model, "dmd"); env["HOST_DMD_PATH"] = env["HOST_DMD"]; // TODO: use dmd.conf from the host too (in case there's a global or user-level dmd.conf) env["HOST_DMD_RUN"] = env["HOST_DMD"]; if (!env["HOST_DMD"].exists) { writefln("Downloading DMD %s", hostDMDVer); auto curlFlags = "-fsSL --retry 5 --retry-max-time 120 --connect-timeout 5 --speed-time 30 --speed-limit 1024"; hostDMDRoot.mkdirRecurse; ("curl " ~ curlFlags ~ " " ~ hostDMDURL~".tar.xz | tar -C "~hostDMDRoot~" -Jxf - || rm -rf "~hostDMDRoot).spawnShell.wait; } } else { env["HOST_DMD_PATH"] = getHostDMDPath(env["HOST_DMD"]).strip.absolutePath; env["HOST_DMD_RUN"] = env["HOST_DMD_PATH"]; } if (!env["HOST_DMD_PATH"].exists) { stderr.writefln("No DMD compiler is installed. Try AUTO_BOOTSTRAP=1 or manually set the D host compiler with HOST_DMD"); exit(1); } } /// Checks the environment variables and flags void processEnvironment() { import std.meta : AliasSeq; const os = env["OS"]; const hostDMDVersion = [env["HOST_DMD_RUN"], "--version"].execute.output; alias DMD = AliasSeq!("DMD"); alias LDC = AliasSeq!("LDC"); alias GDC = AliasSeq!("GDC", "gdmd", "gdc"); const kindIdx = hostDMDVersion.canFind(DMD, LDC, GDC); enforce(kindIdx, "Invalid Host DMD found: " ~ hostDMDVersion); if (kindIdx <= DMD.length) env["HOST_DMD_KIND"] = "dmd"; else if (kindIdx <= LDC.length + DMD.length) env["HOST_DMD_KIND"] = "ldc"; else env["HOST_DMD_KIND"] = "gdc"; env["DMD_PATH"] = env["G"].buildPath("dmd").exeName; env.getDefault("DETAB", "detab"); env.getDefault("TOLF", "tolf"); version (Windows) env.getDefault("ZIP", "zip32"); else env.getDefault("ZIP", "zip"); env.getDefault("ENABLE_WARNINGS", "0"); string[] warnings; // TODO: allow adding new flags from the environment string[] dflags = ["-version=MARS", "-w", "-de", env["PIC_FLAG"], env["MODEL_FLAG"], "-J"~env["G"]]; if (env["HOST_DMD_KIND"] != "gdc") dflags ~= ["-dip25"]; // gdmd doesn't support -dip25 // TODO: add support for dObjc auto dObjc = false; version(OSX) version(X86_64) dObjc = true; if (env.getDefault("ENABLE_DEBUG", "0") != "0") { dflags ~= ["-g", "-debug"]; } if (env.getDefault("ENABLE_RELEASE", "0") != "0") { dflags ~= ["-O", "-release", "-inline"]; } else { // add debug symbols for all non-release builds if (!dflags.canFind("-g")) dflags ~= ["-g"]; } if (env.getDefault("ENABLE_LTO", "0") != "0") { dflags ~= ["-flto=full"]; } if (env.getDefault("ENABLE_UNITTEST", "0") != "0") { dflags ~= ["-unittest", "-cov"]; } if (env.getDefault("ENABLE_PROFILE", "0") != "0") { dflags ~= ["-profile"]; } if (env.getDefault("ENABLE_COVERAGE", "0") != "0") { dflags ~= ["-cov", "-L-lgcov"]; } if (env.getDefault("ENABLE_SANITIZERS", "0") != "0") { dflags ~= ["-fsanitize="~env["ENABLE_SANITIZERS"]]; } flags["DFLAGS"] ~= dflags; } /// Setup environment for a C++ compiler void processEnvironmentCxx() { // Windows requires additional work to handle e.g. Cygwin on Azure version (Windows) return; const cxxKind = env["CXX_KIND"] = detectHostCxx(); string[] warnings = [ "-Wall", "-Werror", "-Wextra", "-Wno-attributes", "-Wno-char-subscripts", "-Wno-deprecated", "-Wno-empty-body", "-Wno-format", "-Wno-missing-braces", "-Wno-missing-field-initializers", "-Wno-overloaded-virtual", "-Wno-parentheses", "-Wno-reorder", "-Wno-return-type", "-Wno-sign-compare", "-Wno-strict-aliasing", "-Wno-switch", "-Wno-type-limits", "-Wno-unknown-pragmas", "-Wno-unused-function", "-Wno-unused-label", "-Wno-unused-parameter", "-Wno-unused-value", "-Wno-unused-variable" ]; if (cxxKind == "g++") warnings ~= [ "-Wno-class-memaccess", "-Wno-implicit-fallthrough", "-Wno-logical-op", "-Wno-narrowing", "-Wno-uninitialized", "-Wno-unused-but-set-variable" ]; if (cxxKind == "clang++") warnings ~= ["-Wno-logical-op-parentheses", "-Wno-unused-private-field"]; auto cxxFlags = warnings ~ [ "-g", "-fno-exceptions", "-fno-rtti", "-fasynchronous-unwind-tables", "-DMARS=1", env["MODEL_FLAG"], env["PIC_FLAG"], // No explicit if since cxxKind will always be either g++ or clang++ cxxKind == "g++" ? "-std=gnu++98" : "-xc++" ]; if (env["ENABLE_COVERAGE"] != "0") cxxFlags ~= "--coverage"; if (env["ENABLE_SANITIZERS"] != "0") cxxFlags ~= "-fsanitize=" ~ env["ENABLE_SANITIZERS"]; // Enable a temporary workaround in globals.h and rmem.h concerning // wrong name mangling using DMD. // Remove when the minimally required D version becomes 2.082 or later if (env["HOST_DMD_KIND"] == "dmd") { const output = run([ env["HOST_DMD_RUN"], "--version" ]).output; if (output.canFind("v2.079", "v2.080", "v2.081")) cxxFlags ~= "-DDMD_VERSION=2080"; } flags["CXXFLAGS"] = cxxFlags; } /// Returns: the host C++ compiler, either "g++" or "clang++" string detectHostCxx() { import std.meta: AliasSeq; const cxxVersion = [env.getDefault("CXX", "c++"), "--version"].execute.output; alias GCC = AliasSeq!("g++", "gcc", "Free Software"); alias CLANG = AliasSeq!("clang"); const cxxKindIdx = cxxVersion.canFind(GCC, CLANG); enforce(cxxKindIdx, "Invalid CXX found: " ~ cxxVersion); return cxxKindIdx <= GCC.length ? "g++" : "clang++"; } //////////////////////////////////////////////////////////////////////////////// // D source files //////////////////////////////////////////////////////////////////////////////// /// Returns: all source files in the repository alias allSources = memoize!(() => srcDir.dirEntries("*.{d,h,di}", SpanMode.depth).map!(e => e.name).array); /// Returns: all source files for the compiler auto sourceFiles() { struct Sources { string[] frontend, lexer, root, glue, dmd, backend; string[] frontendHeaders, backendHeaders, backendObjects; } string targetCH; string[] targetObjs; if (env["TARGET_CPU"] == "X86") { targetCH = "code_x86.h"; } else if (env["TARGET_CPU"] == "stub") { targetCH = "code_stub.h"; targetObjs = ["platform_stub"]; } else { assert(0, "Unknown TARGET_CPU: " ~ env["TARGET_CPU"]); } static string[] fileArray(string dir, string files) { return files.split.map!(e => dir.buildPath(e)).array; } Sources sources = { glue: fileArray(env["D"], " irstate.d toctype.d glue.d gluelayer.d todt.d tocsym.d toir.d dmsc.d tocvdebug.d s2ir.d toobj.d e2ir.d eh.d iasm.d iasmdmd.d iasmgcc.d objc_glue.d "), frontend: fileArray(env["D"], " access.d aggregate.d aliasthis.d apply.d argtypes.d argtypes_sysv_x64.d arrayop.d arraytypes.d ast_node.d astbase.d astcodegen.d attrib.d blockexit.d builtin.d canthrow.d cli.d clone.d compiler.d complex.d cond.d constfold.d cppmangle.d cppmanglewin.d ctfeexpr.d ctorflow.d dcast.d dclass.d declaration.d delegatize.d denum.d dimport.d dinifile.d dinterpret.d dmacro.d dmangle.d dmodule.d doc.d dscope.d dstruct.d dsymbol.d dsymbolsem.d dtemplate.d dversion.d env.d escape.d expression.d expressionsem.d func.d hdrgen.d impcnvtab.d imphint.d init.d initsem.d inline.d inlinecost.d intrange.d json.d lambdacomp.d lib.d libelf.d libmach.d libmscoff.d libomf.d link.d mars.d mtype.d nogc.d nspace.d objc.d opover.d optimize.d parse.d parsetimevisitor.d permissivevisitor.d printast.d safe.d sapply.d scanelf.d scanmach.d scanmscoff.d scanomf.d semantic2.d semantic3.d sideeffect.d statement.d statement_rewrite_walker.d statementsem.d staticassert.d staticcond.d strictvisitor.d target.d templateparamsem.d traits.d transitivevisitor.d typesem.d typinf.d utils.d visitor.d foreachvar.d "), frontendHeaders: fileArray(env["D"], " aggregate.h aliasthis.h arraytypes.h attrib.h compiler.h complex_t.h cond.h ctfe.h declaration.h dsymbol.h doc.h enum.h errors.h expression.h globals.h hdrgen.h identifier.h id.h import.h init.h json.h mangle.h module.h mtype.h nspace.h objc.h scope.h statement.h staticassert.h target.h template.h tokens.h version.h visitor.h "), lexer: fileArray(env["D"], " console.d entity.d errors.d filecache.d globals.d id.d identifier.d lexer.d tokens.d utf.d ") ~ fileArray(env["ROOT"], " array.d bitarray.d ctfloat.d file.d filename.d hash.d outbuffer.d port.d region.d rmem.d rootobject.d stringtable.d "), root: fileArray(env["ROOT"], " aav.d longdouble.d man.d response.d speller.d string.d strtold.d "), backend: fileArray(env["C"], " backend.d bcomplex.d evalu8.d divcoeff.d dvec.d go.d gsroa.d glocal.d gdag.d gother.d gflow.d out.d gloop.d compress.d cgelem.d cgcs.d ee.d cod4.d cod5.d nteh.d blockopt.d mem.d cg.d cgreg.d dtype.d debugprint.d fp.d symbol.d elem.d dcode.d cgsched.d cg87.d cgxmm.d cgcod.d cod1.d cod2.d cod3.d cv8.d dcgcv.d pdata.d util2.d var.d md5.d backconfig.d ph2.d drtlsym.d dwarfeh.d ptrntab.d dvarstats.d dwarfdbginf.d cgen.d os.d goh.d barray.d cgcse.d elpicpie.d machobj.d elfobj.d " ~ ((env["OS"] == "windows") ? "cgobj.d filespec.d mscoffobj.d newman.d" : "aarray.d") ), backendHeaders: fileArray(env["C"], " cc.d cdef.d cgcv.d code.d cv4.d dt.d el.d global.d obj.d oper.d outbuf.d rtlsym.d code_x86.d iasm.d codebuilder.d ty.d type.d exh.d mach.d mscoff.d dwarf.d dwarf2.d xmm.d dlist.d melf.d varstats.di "), }; sources.dmd = sources.frontend ~ sources.glue ~ sources.backendHeaders; return sources; } /** Downloads a file from a given URL Params: to = Location to store the file downloaded from = The URL to the file to download tries = The number of times to try if an attempt to download fails Returns: `true` if download succeeded */ bool download(string to, string from, uint tries = 3) { import std.net.curl : download, HTTPStatusException; foreach(i; 0..tries) { try { log("Downloading %s ...", from); download(from, to); return true; } catch(HTTPStatusException e) { if (e.status == 404) throw e; else { log("Failed to download %s (Attempt %s of %s)", from, i + 1, tries); continue; } } } return false; } /** Detects the host OS. Returns: a string from `{windows, osx,linux,freebsd,openbsd,netbsd,dragonflybsd,solaris}` */ string detectOS() { version(Windows) return "windows"; else version(OSX) return "osx"; else version(linux) return "linux"; else version(FreeBSD) return "freebsd"; else version(OpenBSD) return "openbsd"; else version(NetBSD) return "netbsd"; else version(DragonFlyBSD) return "dragonflybsd"; else version(Solaris) return "solaris"; else static assert(0, "Unrecognized or unsupported OS."); } /** Detects the host model Returns: 32, 64 or throws an Exception */ auto detectModel() { string uname; if (detectOS == "solaris") uname = ["isainfo", "-n"].execute.output; else if (detectOS == "windows") { version (D_LP64) return "64"; // host must be 64-bit if this compiles else version (Windows) { import core.sys.windows.winbase; int is64; if (IsWow64Process(GetCurrentProcess(), &is64)) return is64 ? "64" : "32"; } } else uname = ["uname", "-m"].execute.output; if (uname.canFind("x86_64", "amd64", "64-bit", "64-Bit", "64 bit")) return "64"; if (uname.canFind("i386", "i586", "i686", "32-bit", "32-Bit", "32 bit")) return "32"; throw new Exception(`Cannot figure 32/64 model from "` ~ uname ~ `"`); } /** Gets the absolute path of the host's dmd executable Params: hostDmd = the command used to launch the host's dmd executable Returns: a string that is the absolute path of the host's dmd executable */ auto getHostDMDPath(string hostDmd) { version(Posix) return ["which", hostDmd].execute.output; else version(Windows) { if (hostDmd.canFind("/", "\\")) return hostDmd; return ["where", hostDmd].execute.output .lineSplitter.filter!(file => file != srcDir.buildPath("dmd.exe")).front; } else static assert(false, "Unrecognized or unsupported OS."); } /** Add the executable filename extension to the given `name` for the current OS. Params: name = the name to append the file extention to */ auto exeName(T)(T name) { version(Windows) return name ~ ".exe"; return name; } /** Add the object file extension to the given `name` for the current OS. Params: name = the name to append the file extention to */ auto objName(T)(T name) { version(Windows) return name ~ ".obj"; return name ~ ".o"; } /** Add the library file extension to the given `name` for the current OS. Params: name = the name to append the file extention to */ auto libName(T)(T name) { version(Windows) return name ~ ".lib"; return name ~ ".a"; } /** Add additional make-like assignments to the environment e.g. ./build.d ARGS=foo -> sets the "ARGS" internal environment variable to "foo" Params: args = the command-line arguments from which the assignments will be parsed */ void args2Environment(ref string[] args) { bool tryToAdd(string arg) { if (!arg.canFind("=")) return false; auto sp = arg.splitter("="); auto key = sp.front; auto value = sp.dropOne.front; environment[key] = value; env[key] = value; return true; } args = args.filter!(a => !tryToAdd(a)).array; } /** Checks whether the environment already contains a value for key and if so, sets the found value to the new environment object. Otherwise uses the `default_` value as fallback. Params: env = environment to write the check to key = key to check for existence and write into the new env default_ = fallback value if the key doesn't exist in the global environment */ auto getDefault(ref string[string] env, string key, string default_) { if (key in environment) env[key] = environment[key]; else env[key] = default_; return env[key]; } //////////////////////////////////////////////////////////////////////////////// // Mini build system //////////////////////////////////////////////////////////////////////////////// /** Determines if a target is up to date with respect to its source files Params: target = the target to check source = the source file to check against Returns: `true` if the target is up to date */ auto isUpToDate(string target, string source) { return isUpToDate(target, [source]); } /** Determines if a target is up to date with respect to its source files Params: target = the target to check source = the source files to check against Returns: `true` if the target is up to date */ auto isUpToDate(string target, string[][] sources...) { return isUpToDate([target], sources); } /** Checks whether any of the targets are older than the sources Params: targets = the targets to check sources = the source files to check against Returns: `true` if the target is up to date */ auto isUpToDate(string[] targets, string[][] sources...) { if (force) return false; foreach (target; targets) { auto sourceTime = target.timeLastModified.ifThrown(SysTime.init); // if a target has no sources, it only needs to be built once if (sources.empty || sources.length == 1 && sources.front.empty) return sourceTime > SysTime.init; foreach (arg; sources) foreach (a; arg) if (sourceTime < a.timeLastModified.ifThrown(SysTime.init + 1.seconds)) return false; } return true; } /** Writes given the content to the given file. The content will only be written to the file specified in `path` if that file doesn't exist, or the content of the existing file is different from the given content. This makes sure the timestamp of the file is only updated when the content has changed. This will avoid rebuilding when the content hasn't changed. Params: path = the path to the file to write the content to content = the content to write to the file */ void updateIfChanged(const string path, const string content) { import std.file : exists, readText, write; const existingContent = path.exists ? path.readText : ""; if (content != existingContent) write(path, content); } /** A dependency has one or more sources and yields one or more targets. It knows how to build these target by invoking either the external command or the commandFunction. If a run fails, the entire build stops. */ class Dependency { string target; // path to the resulting target file (if target is used, it will set targets) string[] targets; // list of all target files string[] sources; // list of all source files string[] rebuildSources; // Optional list of files that trigger a rebuild of this dependency Dependency[] deps; // dependencies to build before this one string[] command; // the dependency command void delegate() commandFunction; // a custom dependency command which gets called instead of command string msg; // msg of the dependency that is e.g. written to the CLI when it's executed string name; /// optional string that can be used to identify this dependency string description; /// optional string to describe this dependency rather than printing the target files private bool executed; /// Finish creating the dependency by checking that it is configured properly void finalize() { if (target) { assert(!targets, "target and targets cannot both be set"); targets = [target]; } } /// Executes the dependency void run() { synchronized (this) runSynchronized(); } private void runSynchronized() { if (executed) return; scope (exit) executed = true; bool depUpdated = false; foreach (dep; deps.parallel(1)) { dep.run(); } if (targets && targets.isUpToDate(this.sources, [thisBuildScript], rebuildSources)) { if (this.sources !is null) log("Skipping build of %-(%s%) as it's newer than %-(%s%)", targets, this.sources); return; } // Display the execution of the dependency if (msg) msg.writeln; if(dryRun) { if(commandFunction) { write("\n => Executing commandFunction()"); if(name) writef!" of %s"(name); if(targets.length) writef!" to generate:\n%( - %s\n%)"(targets); writeln('\n'); } if(command) writefln!"\n => %(%s %)\n"(command); } else { if (commandFunction !is null) return commandFunction(); if (command) { command.runCanThrow; } } } } /** Initializes an object using a chain of method calls */ struct MethodInitializer(T) if (is(T == class)) // currenly only works with classes { private T obj; auto ref opDispatch(string name)(typeof(__traits(getMember, T, name)) arg) { mixin("obj." ~ name ~ " = arg;"); return this; } } /** Create an object using a chain of method calls for each field. */ T methodInit(T, alias Func, Args...)(Args args) if (is(T == class)) // currently only works with classes { auto initializer = MethodInitializer!T(new T()); Func(initializer, initializer.obj, args); initializer.obj.finalize(); return initializer.obj; } /** Takes a lambda and returns a memoized function to build a dependecy object. The lambda takes a builder and a dependency object. This differs from makeDepWithArgs in that the function literal does not need explicit parameter types. */ alias makeDep(alias Func) = memoize!(methodInit!(Dependency, Func)); /** Takes a lambda and returns a memoized function to build a dependecy object. The lambda takes a builder, dependency object and any extra arguments needed to create the dependnecy. This differs from makeDep in that the function literal must contain explicit parameter types. */ alias makeDepWithArgs(alias Func) = memoize!(methodInit!(Dependency, Func, Parameters!Func[2..$])); /** Logging primitive Params: args = the data to write to the log */ auto log(T...)(T args) { if (verbose) writefln(args); } /** The directory where all run commands are executed from. All relative file paths in a `run` command must be relative to `runDir`. */ alias runDir = srcDir; /** Run a command and optionally log the invocation Params: args = the command and command arguments to execute */ auto run(T)(T args) { args = args.filter!(a => !a.empty).array; log("Run: %s", args.join(" ")); return execute(args, null, Config.none, size_t.max, runDir); } /** Wrapper around execute that logs the execution and throws an exception for a non-zero exit code. Params: args = the command and command arguments to execute */ auto runCanThrow(T)(T args) { auto res = run(args); if (res.status) { writeln(res.output ? res.output : format("last command failed with exit code %s", res.status)); exit(1); } return res.output; } version (CRuntime_DigitalMars) { // workaround issue https://issues.dlang.org/show_bug.cgi?id=13727 auto parallel(R)(R range, size_t workUnitSize) { return range; } }
D
/Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/SnapKit.build/Objects-normal/x86_64/ConstraintRelatableTarget.o : /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/ConstraintLayoutGuideDSL.swift /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/ConstraintDSL.swift /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/ConstraintLayoutSupportDSL.swift /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/ConstraintViewDSL.swift /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/ConstraintLayoutGuide.swift /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/ConstraintMakerExtendable.swift /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/ConstraintMakerRelatable.swift /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/ConstraintMakerEditable.swift /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/ConstraintMakerFinalizable.swift /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/ConstraintMakerPriortizable.swift /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/ConstraintConfig.swift /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/Debugging.swift /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/ConstraintItem.swift /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/LayoutConstraintItem.swift /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/ConstraintRelation.swift /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/ConstraintDescription.swift /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/ConstraintMaker.swift /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/Typealiases.swift /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/ConstraintAttributes.swift /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/ConstraintLayoutGuide+Extensions.swift /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/UILayoutSupport+Extensions.swift /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/ConstraintView+Extensions.swift /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/ConstraintInsets.swift /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/ConstraintRelatableTarget.swift /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/ConstraintMultiplierTarget.swift /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/ConstraintOffsetTarget.swift /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/ConstraintInsetTarget.swift /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/ConstraintConstantTarget.swift /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/ConstraintPriorityTarget.swift /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/Constraint.swift /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/LayoutConstraint.swift /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/ConstraintLayoutSupport.swift /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/ConstraintView.swift /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/ConstraintPriority.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.apinotesc /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/ObjectiveC.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreImage.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/QuartzCore.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Metal.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreFoundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreGraphics.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/UIKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/SwiftOnoneSupport.swiftmodule /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/Target\ Support\ Files/SnapKit/SnapKit-umbrella.h /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/SnapKit.build/unextended-module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/OpenGLES.framework/Headers/OpenGLES.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImage.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/QuartzCore.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/SnapKit.build/Objects-normal/x86_64/ConstraintRelatableTarget~partial.swiftmodule : /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/ConstraintLayoutGuideDSL.swift /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/ConstraintDSL.swift /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/ConstraintLayoutSupportDSL.swift /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/ConstraintViewDSL.swift /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/ConstraintLayoutGuide.swift /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/ConstraintMakerExtendable.swift /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/ConstraintMakerRelatable.swift /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/ConstraintMakerEditable.swift /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/ConstraintMakerFinalizable.swift /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/ConstraintMakerPriortizable.swift /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/ConstraintConfig.swift /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/Debugging.swift /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/ConstraintItem.swift /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/LayoutConstraintItem.swift /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/ConstraintRelation.swift /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/ConstraintDescription.swift /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/ConstraintMaker.swift /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/Typealiases.swift /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/ConstraintAttributes.swift /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/ConstraintLayoutGuide+Extensions.swift /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/UILayoutSupport+Extensions.swift /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/ConstraintView+Extensions.swift /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/ConstraintInsets.swift /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/ConstraintRelatableTarget.swift /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/ConstraintMultiplierTarget.swift /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/ConstraintOffsetTarget.swift /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/ConstraintInsetTarget.swift /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/ConstraintConstantTarget.swift /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/ConstraintPriorityTarget.swift /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/Constraint.swift /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/LayoutConstraint.swift /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/ConstraintLayoutSupport.swift /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/ConstraintView.swift /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/ConstraintPriority.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.apinotesc /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/ObjectiveC.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreImage.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/QuartzCore.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Metal.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreFoundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreGraphics.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/UIKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/SwiftOnoneSupport.swiftmodule /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/Target\ Support\ Files/SnapKit/SnapKit-umbrella.h /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/SnapKit.build/unextended-module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/OpenGLES.framework/Headers/OpenGLES.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImage.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/QuartzCore.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/SnapKit.build/Objects-normal/x86_64/ConstraintRelatableTarget~partial.swiftdoc : /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/ConstraintLayoutGuideDSL.swift /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/ConstraintDSL.swift /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/ConstraintLayoutSupportDSL.swift /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/ConstraintViewDSL.swift /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/ConstraintLayoutGuide.swift /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/ConstraintMakerExtendable.swift /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/ConstraintMakerRelatable.swift /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/ConstraintMakerEditable.swift /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/ConstraintMakerFinalizable.swift /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/ConstraintMakerPriortizable.swift /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/ConstraintConfig.swift /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/Debugging.swift /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/ConstraintItem.swift /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/LayoutConstraintItem.swift /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/ConstraintRelation.swift /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/ConstraintDescription.swift /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/ConstraintMaker.swift /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/Typealiases.swift /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/ConstraintAttributes.swift /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/ConstraintLayoutGuide+Extensions.swift /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/UILayoutSupport+Extensions.swift /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/ConstraintView+Extensions.swift /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/ConstraintInsets.swift /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/ConstraintRelatableTarget.swift /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/ConstraintMultiplierTarget.swift /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/ConstraintOffsetTarget.swift /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/ConstraintInsetTarget.swift /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/ConstraintConstantTarget.swift /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/ConstraintPriorityTarget.swift /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/Constraint.swift /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/LayoutConstraint.swift /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/ConstraintLayoutSupport.swift /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/ConstraintView.swift /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/ConstraintPriority.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.apinotesc /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/ObjectiveC.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreImage.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/QuartzCore.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Metal.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreFoundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreGraphics.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/UIKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/SwiftOnoneSupport.swiftmodule /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/Target\ Support\ Files/SnapKit/SnapKit-umbrella.h /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/SnapKit.build/unextended-module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/OpenGLES.framework/Headers/OpenGLES.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImage.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/QuartzCore.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes
D
/Users/Khanh/vapor/TILApp/.build/x86_64-apple-macosx10.10/debug/Command.build/Run/CommandContext.swift.o : /Users/Khanh/vapor/TILApp/.build/checkouts/console.git--2431895819212044213/Sources/Command/Command/Command.swift /Users/Khanh/vapor/TILApp/.build/checkouts/console.git--2431895819212044213/Sources/Command/Base/CommandRunnable.swift /Users/Khanh/vapor/TILApp/.build/checkouts/console.git--2431895819212044213/Sources/Command/Run/Output+Autocomplete.swift /Users/Khanh/vapor/TILApp/.build/checkouts/console.git--2431895819212044213/Sources/Command/Config/CommandConfig.swift /Users/Khanh/vapor/TILApp/.build/checkouts/console.git--2431895819212044213/Sources/Command/Base/CommandOption.swift /Users/Khanh/vapor/TILApp/.build/checkouts/console.git--2431895819212044213/Sources/Command/Run/Console+Run.swift /Users/Khanh/vapor/TILApp/.build/checkouts/console.git--2431895819212044213/Sources/Command/Run/Output+Help.swift /Users/Khanh/vapor/TILApp/.build/checkouts/console.git--2431895819212044213/Sources/Command/Group/CommandGroup.swift /Users/Khanh/vapor/TILApp/.build/checkouts/console.git--2431895819212044213/Sources/Command/Group/BasicCommandGroup.swift /Users/Khanh/vapor/TILApp/.build/checkouts/console.git--2431895819212044213/Sources/Command/Utilities/CommandError.swift /Users/Khanh/vapor/TILApp/.build/checkouts/console.git--2431895819212044213/Sources/Command/Config/Commands.swift /Users/Khanh/vapor/TILApp/.build/checkouts/console.git--2431895819212044213/Sources/Command/Utilities/Utilities.swift /Users/Khanh/vapor/TILApp/.build/checkouts/console.git--2431895819212044213/Sources/Command/Utilities/Exports.swift /Users/Khanh/vapor/TILApp/.build/checkouts/console.git--2431895819212044213/Sources/Command/Command/CommandArgument.swift /Users/Khanh/vapor/TILApp/.build/checkouts/console.git--2431895819212044213/Sources/Command/Run/CommandInput.swift /Users/Khanh/vapor/TILApp/.build/checkouts/console.git--2431895819212044213/Sources/Command/Run/CommandContext.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Dispatch.apinotesc /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/ObjectiveC.swiftmodule /Users/Khanh/vapor/TILApp/.build/x86_64-apple-macosx10.10/debug/NIO.swiftmodule /Users/Khanh/vapor/TILApp/.build/x86_64-apple-macosx10.10/debug/Async.swiftmodule /Users/Khanh/vapor/TILApp/.build/x86_64-apple-macosx10.10/debug/Service.swiftmodule /Users/Khanh/vapor/TILApp/.build/x86_64-apple-macosx10.10/debug/Console.swiftmodule /Users/Khanh/vapor/TILApp/.build/x86_64-apple-macosx10.10/debug/Core.swiftmodule /Users/Khanh/vapor/TILApp/.build/x86_64-apple-macosx10.10/debug/Logging.swiftmodule /Users/Khanh/vapor/TILApp/.build/x86_64-apple-macosx10.10/debug/Debugging.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Dispatch.swiftmodule /Users/Khanh/vapor/TILApp/.build/x86_64-apple-macosx10.10/debug/COperatingSystem.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/CoreFoundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/CoreGraphics.swiftmodule /Users/Khanh/vapor/TILApp/.build/x86_64-apple-macosx10.10/debug/NIOConcurrencyHelpers.swiftmodule /Users/Khanh/vapor/TILApp/.build/x86_64-apple-macosx10.10/debug/Bits.swiftmodule /Users/Khanh/vapor/TILApp/.build/x86_64-apple-macosx10.10/debug/NIOFoundationCompat.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/IOKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/SwiftOnoneSupport.swiftmodule /Users/Khanh/vapor/TILApp/.build/checkouts/swift-nio.git-3108475404973543938/Sources/CNIOAtomics/include/cpp_magic.h /Users/Khanh/vapor/TILApp/.build/checkouts/swift-nio.git-3108475404973543938/Sources/CNIODarwin/include/c_nio_darwin.h /Users/Khanh/vapor/TILApp/.build/checkouts/swift-nio.git-3108475404973543938/Sources/CNIOAtomics/include/c-atomics.h /Users/Khanh/vapor/TILApp/.build/checkouts/swift-nio.git-3108475404973543938/Sources/CNIOLinux/include/c_nio_linux.h /Users/Khanh/vapor/TILApp/.build/checkouts/swift-nio-zlib-support.git--1071467962839356487/module.modulemap /Users/Khanh/vapor/TILApp/.build/x86_64-apple-macosx10.10/debug/CNIOSHA1.build/module.modulemap /Users/Khanh/vapor/TILApp/.build/x86_64-apple-macosx10.10/debug/CNIOOpenSSL.build/module.modulemap /Users/Khanh/vapor/TILApp/.build/x86_64-apple-macosx10.10/debug/CNIOZlib.build/module.modulemap /Users/Khanh/vapor/TILApp/.build/x86_64-apple-macosx10.10/debug/CNIODarwin.build/module.modulemap /Users/Khanh/vapor/TILApp/.build/x86_64-apple-macosx10.10/debug/CNIOHTTPParser.build/module.modulemap /Users/Khanh/vapor/TILApp/.build/x86_64-apple-macosx10.10/debug/CNIOAtomics.build/module.modulemap /Users/Khanh/vapor/TILApp/.build/x86_64-apple-macosx10.10/debug/CNIOLinux.build/module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Users/Khanh/vapor/TILApp/.build/x86_64-apple-macosx10.10/debug/Command.build/CommandContext~partial.swiftmodule : /Users/Khanh/vapor/TILApp/.build/checkouts/console.git--2431895819212044213/Sources/Command/Command/Command.swift /Users/Khanh/vapor/TILApp/.build/checkouts/console.git--2431895819212044213/Sources/Command/Base/CommandRunnable.swift /Users/Khanh/vapor/TILApp/.build/checkouts/console.git--2431895819212044213/Sources/Command/Run/Output+Autocomplete.swift /Users/Khanh/vapor/TILApp/.build/checkouts/console.git--2431895819212044213/Sources/Command/Config/CommandConfig.swift /Users/Khanh/vapor/TILApp/.build/checkouts/console.git--2431895819212044213/Sources/Command/Base/CommandOption.swift /Users/Khanh/vapor/TILApp/.build/checkouts/console.git--2431895819212044213/Sources/Command/Run/Console+Run.swift /Users/Khanh/vapor/TILApp/.build/checkouts/console.git--2431895819212044213/Sources/Command/Run/Output+Help.swift /Users/Khanh/vapor/TILApp/.build/checkouts/console.git--2431895819212044213/Sources/Command/Group/CommandGroup.swift /Users/Khanh/vapor/TILApp/.build/checkouts/console.git--2431895819212044213/Sources/Command/Group/BasicCommandGroup.swift /Users/Khanh/vapor/TILApp/.build/checkouts/console.git--2431895819212044213/Sources/Command/Utilities/CommandError.swift /Users/Khanh/vapor/TILApp/.build/checkouts/console.git--2431895819212044213/Sources/Command/Config/Commands.swift /Users/Khanh/vapor/TILApp/.build/checkouts/console.git--2431895819212044213/Sources/Command/Utilities/Utilities.swift /Users/Khanh/vapor/TILApp/.build/checkouts/console.git--2431895819212044213/Sources/Command/Utilities/Exports.swift /Users/Khanh/vapor/TILApp/.build/checkouts/console.git--2431895819212044213/Sources/Command/Command/CommandArgument.swift /Users/Khanh/vapor/TILApp/.build/checkouts/console.git--2431895819212044213/Sources/Command/Run/CommandInput.swift /Users/Khanh/vapor/TILApp/.build/checkouts/console.git--2431895819212044213/Sources/Command/Run/CommandContext.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Dispatch.apinotesc /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/ObjectiveC.swiftmodule /Users/Khanh/vapor/TILApp/.build/x86_64-apple-macosx10.10/debug/NIO.swiftmodule /Users/Khanh/vapor/TILApp/.build/x86_64-apple-macosx10.10/debug/Async.swiftmodule /Users/Khanh/vapor/TILApp/.build/x86_64-apple-macosx10.10/debug/Service.swiftmodule /Users/Khanh/vapor/TILApp/.build/x86_64-apple-macosx10.10/debug/Console.swiftmodule /Users/Khanh/vapor/TILApp/.build/x86_64-apple-macosx10.10/debug/Core.swiftmodule /Users/Khanh/vapor/TILApp/.build/x86_64-apple-macosx10.10/debug/Logging.swiftmodule /Users/Khanh/vapor/TILApp/.build/x86_64-apple-macosx10.10/debug/Debugging.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Dispatch.swiftmodule /Users/Khanh/vapor/TILApp/.build/x86_64-apple-macosx10.10/debug/COperatingSystem.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/CoreFoundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/CoreGraphics.swiftmodule /Users/Khanh/vapor/TILApp/.build/x86_64-apple-macosx10.10/debug/NIOConcurrencyHelpers.swiftmodule /Users/Khanh/vapor/TILApp/.build/x86_64-apple-macosx10.10/debug/Bits.swiftmodule /Users/Khanh/vapor/TILApp/.build/x86_64-apple-macosx10.10/debug/NIOFoundationCompat.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/IOKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/SwiftOnoneSupport.swiftmodule /Users/Khanh/vapor/TILApp/.build/checkouts/swift-nio.git-3108475404973543938/Sources/CNIOAtomics/include/cpp_magic.h /Users/Khanh/vapor/TILApp/.build/checkouts/swift-nio.git-3108475404973543938/Sources/CNIODarwin/include/c_nio_darwin.h /Users/Khanh/vapor/TILApp/.build/checkouts/swift-nio.git-3108475404973543938/Sources/CNIOAtomics/include/c-atomics.h /Users/Khanh/vapor/TILApp/.build/checkouts/swift-nio.git-3108475404973543938/Sources/CNIOLinux/include/c_nio_linux.h /Users/Khanh/vapor/TILApp/.build/checkouts/swift-nio-zlib-support.git--1071467962839356487/module.modulemap /Users/Khanh/vapor/TILApp/.build/x86_64-apple-macosx10.10/debug/CNIOSHA1.build/module.modulemap /Users/Khanh/vapor/TILApp/.build/x86_64-apple-macosx10.10/debug/CNIOOpenSSL.build/module.modulemap /Users/Khanh/vapor/TILApp/.build/x86_64-apple-macosx10.10/debug/CNIOZlib.build/module.modulemap /Users/Khanh/vapor/TILApp/.build/x86_64-apple-macosx10.10/debug/CNIODarwin.build/module.modulemap /Users/Khanh/vapor/TILApp/.build/x86_64-apple-macosx10.10/debug/CNIOHTTPParser.build/module.modulemap /Users/Khanh/vapor/TILApp/.build/x86_64-apple-macosx10.10/debug/CNIOAtomics.build/module.modulemap /Users/Khanh/vapor/TILApp/.build/x86_64-apple-macosx10.10/debug/CNIOLinux.build/module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Users/Khanh/vapor/TILApp/.build/x86_64-apple-macosx10.10/debug/Command.build/CommandContext~partial.swiftdoc : /Users/Khanh/vapor/TILApp/.build/checkouts/console.git--2431895819212044213/Sources/Command/Command/Command.swift /Users/Khanh/vapor/TILApp/.build/checkouts/console.git--2431895819212044213/Sources/Command/Base/CommandRunnable.swift /Users/Khanh/vapor/TILApp/.build/checkouts/console.git--2431895819212044213/Sources/Command/Run/Output+Autocomplete.swift /Users/Khanh/vapor/TILApp/.build/checkouts/console.git--2431895819212044213/Sources/Command/Config/CommandConfig.swift /Users/Khanh/vapor/TILApp/.build/checkouts/console.git--2431895819212044213/Sources/Command/Base/CommandOption.swift /Users/Khanh/vapor/TILApp/.build/checkouts/console.git--2431895819212044213/Sources/Command/Run/Console+Run.swift /Users/Khanh/vapor/TILApp/.build/checkouts/console.git--2431895819212044213/Sources/Command/Run/Output+Help.swift /Users/Khanh/vapor/TILApp/.build/checkouts/console.git--2431895819212044213/Sources/Command/Group/CommandGroup.swift /Users/Khanh/vapor/TILApp/.build/checkouts/console.git--2431895819212044213/Sources/Command/Group/BasicCommandGroup.swift /Users/Khanh/vapor/TILApp/.build/checkouts/console.git--2431895819212044213/Sources/Command/Utilities/CommandError.swift /Users/Khanh/vapor/TILApp/.build/checkouts/console.git--2431895819212044213/Sources/Command/Config/Commands.swift /Users/Khanh/vapor/TILApp/.build/checkouts/console.git--2431895819212044213/Sources/Command/Utilities/Utilities.swift /Users/Khanh/vapor/TILApp/.build/checkouts/console.git--2431895819212044213/Sources/Command/Utilities/Exports.swift /Users/Khanh/vapor/TILApp/.build/checkouts/console.git--2431895819212044213/Sources/Command/Command/CommandArgument.swift /Users/Khanh/vapor/TILApp/.build/checkouts/console.git--2431895819212044213/Sources/Command/Run/CommandInput.swift /Users/Khanh/vapor/TILApp/.build/checkouts/console.git--2431895819212044213/Sources/Command/Run/CommandContext.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Dispatch.apinotesc /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/ObjectiveC.swiftmodule /Users/Khanh/vapor/TILApp/.build/x86_64-apple-macosx10.10/debug/NIO.swiftmodule /Users/Khanh/vapor/TILApp/.build/x86_64-apple-macosx10.10/debug/Async.swiftmodule /Users/Khanh/vapor/TILApp/.build/x86_64-apple-macosx10.10/debug/Service.swiftmodule /Users/Khanh/vapor/TILApp/.build/x86_64-apple-macosx10.10/debug/Console.swiftmodule /Users/Khanh/vapor/TILApp/.build/x86_64-apple-macosx10.10/debug/Core.swiftmodule /Users/Khanh/vapor/TILApp/.build/x86_64-apple-macosx10.10/debug/Logging.swiftmodule /Users/Khanh/vapor/TILApp/.build/x86_64-apple-macosx10.10/debug/Debugging.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Dispatch.swiftmodule /Users/Khanh/vapor/TILApp/.build/x86_64-apple-macosx10.10/debug/COperatingSystem.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/CoreFoundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/CoreGraphics.swiftmodule /Users/Khanh/vapor/TILApp/.build/x86_64-apple-macosx10.10/debug/NIOConcurrencyHelpers.swiftmodule /Users/Khanh/vapor/TILApp/.build/x86_64-apple-macosx10.10/debug/Bits.swiftmodule /Users/Khanh/vapor/TILApp/.build/x86_64-apple-macosx10.10/debug/NIOFoundationCompat.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/IOKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/SwiftOnoneSupport.swiftmodule /Users/Khanh/vapor/TILApp/.build/checkouts/swift-nio.git-3108475404973543938/Sources/CNIOAtomics/include/cpp_magic.h /Users/Khanh/vapor/TILApp/.build/checkouts/swift-nio.git-3108475404973543938/Sources/CNIODarwin/include/c_nio_darwin.h /Users/Khanh/vapor/TILApp/.build/checkouts/swift-nio.git-3108475404973543938/Sources/CNIOAtomics/include/c-atomics.h /Users/Khanh/vapor/TILApp/.build/checkouts/swift-nio.git-3108475404973543938/Sources/CNIOLinux/include/c_nio_linux.h /Users/Khanh/vapor/TILApp/.build/checkouts/swift-nio-zlib-support.git--1071467962839356487/module.modulemap /Users/Khanh/vapor/TILApp/.build/x86_64-apple-macosx10.10/debug/CNIOSHA1.build/module.modulemap /Users/Khanh/vapor/TILApp/.build/x86_64-apple-macosx10.10/debug/CNIOOpenSSL.build/module.modulemap /Users/Khanh/vapor/TILApp/.build/x86_64-apple-macosx10.10/debug/CNIOZlib.build/module.modulemap /Users/Khanh/vapor/TILApp/.build/x86_64-apple-macosx10.10/debug/CNIODarwin.build/module.modulemap /Users/Khanh/vapor/TILApp/.build/x86_64-apple-macosx10.10/debug/CNIOHTTPParser.build/module.modulemap /Users/Khanh/vapor/TILApp/.build/x86_64-apple-macosx10.10/debug/CNIOAtomics.build/module.modulemap /Users/Khanh/vapor/TILApp/.build/x86_64-apple-macosx10.10/debug/CNIOLinux.build/module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes
D
instance NOV_1347_Novize(Npc_Default) { name[0] = NAME_Novize; npcType = npctype_ambient; guild = GIL_NOV; level = 3; flags = 0; voice = 5; id = 1347; attribute[ATR_STRENGTH] = 10; attribute[ATR_DEXTERITY] = 10; attribute[ATR_MANA_MAX] = 0; attribute[ATR_MANA] = 0; attribute[ATR_HITPOINTS_MAX] = 76; attribute[ATR_HITPOINTS] = 76; Mdl_SetVisual(self,"HUMANS.MDS"); Mdl_ApplyOverlayMds(self,"Humans_Relaxed.mds"); Mdl_SetVisualBody(self,"hum_body_Naked0",1,1,"Hum_Head_FatBald",33,2,nov_armor_l); B_Scale(self); Mdl_SetModelFatness(self,-1); fight_tactic = FAI_HUMAN_COWARD; EquipItem(self,ItMw_1H_Hatchet_01); daily_routine = Rtn_start_1347; }; func void Rtn_start_1347() { TA_Smalltalk(8,0,23,0,"PSI_PATH_TEMPLE_9_MOVEMENT"); TA_Smalltalk(23,0,8,0,"PSI_PATH_TEMPLE_9_MOVEMENT"); }; func void Rtn_Ritual_1347() { TA_Stay(0,0,8,0,"PSI_TEMPLE_NOVIZE_PR7"); TA_Stay(8,0,24,0,"PSI_TEMPLE_NOVIZE_PR7"); };
D
/** * Copyright: Copyright (c) 2010-2011 Jacob Carlborg. All rights reserved. * Authors: Jacob Carlborg * Version: Initial created: Nov 14, 2010 * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost Software License 1.0) */ module dvm.dvm.Exceptions; import mambo.core.string; class DvmException : Exception { template Constructor () { this (string message, string file, size_t line) { super(message, file, line); } } mixin Constructor; } class MissingArgumentException : DvmException { mixin Constructor; } class InvalidOptionException : DvmException { mixin Constructor; }
D
/Users/dbessonov/Desktop/CryptoApp/DerivedData/CryptoApp/Build/Intermediates/CryptoApp.build/Debug-iphonesimulator/CryptoApp.build/Objects-normal/x86_64/RegisterViewController.o : /Users/dbessonov/Desktop/CryptoApp/CryptoApp/AppDelegate.swift /Users/dbessonov/Desktop/CryptoApp/DerivedData/CryptoApp/Build/Intermediates/CryptoApp.build/Debug-iphonesimulator/CryptoApp.build/DerivedSources/CoreDataGenerated/UserDataModel/UserDataModel+CoreDataModel.swift /Users/dbessonov/Desktop/CryptoApp/CryptoApp/ViewController.swift /Users/dbessonov/Desktop/CryptoApp/RegisterViewController.swift /Users/dbessonov/Desktop/CryptoApp/DerivedData/CryptoApp/Build/Intermediates/CryptoApp.build/Debug-iphonesimulator/CryptoApp.build/DerivedSources/CoreDataGenerated/UserDataModel/UserAccount+CoreDataProperties.swift /Users/dbessonov/Desktop/CryptoApp/DerivedData/CryptoApp/Build/Intermediates/CryptoApp.build/Debug-iphonesimulator/CryptoApp.build/DerivedSources/CoreDataGenerated/UserDataModel/UserAccount+CoreDataClass.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/ObjectiveC.apinotesc /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreData.apinotesc /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.apinotesc /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Foundation.apinotesc /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreGraphics.apinotesc /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/UIKit.apinotesc /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreText.apinotesc /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/ObjectiveC.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreData.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreImage.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/QuartzCore.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreGraphics.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/UIKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/SwiftOnoneSupport.swiftmodule /Users/dbessonov/Desktop/CryptoApp/CryptoApp/Bridge.h /Users/dbessonov/Desktop/CryptoApp/DerivedData/CryptoApp/Build/Intermediates/CryptoApp.build/Debug-iphonesimulator/CryptoApp.build/Objects-normal/x86_64/RegisterViewController~partial.swiftmodule : /Users/dbessonov/Desktop/CryptoApp/CryptoApp/AppDelegate.swift /Users/dbessonov/Desktop/CryptoApp/DerivedData/CryptoApp/Build/Intermediates/CryptoApp.build/Debug-iphonesimulator/CryptoApp.build/DerivedSources/CoreDataGenerated/UserDataModel/UserDataModel+CoreDataModel.swift /Users/dbessonov/Desktop/CryptoApp/CryptoApp/ViewController.swift /Users/dbessonov/Desktop/CryptoApp/RegisterViewController.swift /Users/dbessonov/Desktop/CryptoApp/DerivedData/CryptoApp/Build/Intermediates/CryptoApp.build/Debug-iphonesimulator/CryptoApp.build/DerivedSources/CoreDataGenerated/UserDataModel/UserAccount+CoreDataProperties.swift /Users/dbessonov/Desktop/CryptoApp/DerivedData/CryptoApp/Build/Intermediates/CryptoApp.build/Debug-iphonesimulator/CryptoApp.build/DerivedSources/CoreDataGenerated/UserDataModel/UserAccount+CoreDataClass.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/ObjectiveC.apinotesc /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreData.apinotesc /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.apinotesc /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Foundation.apinotesc /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreGraphics.apinotesc /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/UIKit.apinotesc /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreText.apinotesc /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/ObjectiveC.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreData.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreImage.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/QuartzCore.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreGraphics.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/UIKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/SwiftOnoneSupport.swiftmodule /Users/dbessonov/Desktop/CryptoApp/CryptoApp/Bridge.h /Users/dbessonov/Desktop/CryptoApp/DerivedData/CryptoApp/Build/Intermediates/CryptoApp.build/Debug-iphonesimulator/CryptoApp.build/Objects-normal/x86_64/RegisterViewController~partial.swiftdoc : /Users/dbessonov/Desktop/CryptoApp/CryptoApp/AppDelegate.swift /Users/dbessonov/Desktop/CryptoApp/DerivedData/CryptoApp/Build/Intermediates/CryptoApp.build/Debug-iphonesimulator/CryptoApp.build/DerivedSources/CoreDataGenerated/UserDataModel/UserDataModel+CoreDataModel.swift /Users/dbessonov/Desktop/CryptoApp/CryptoApp/ViewController.swift /Users/dbessonov/Desktop/CryptoApp/RegisterViewController.swift /Users/dbessonov/Desktop/CryptoApp/DerivedData/CryptoApp/Build/Intermediates/CryptoApp.build/Debug-iphonesimulator/CryptoApp.build/DerivedSources/CoreDataGenerated/UserDataModel/UserAccount+CoreDataProperties.swift /Users/dbessonov/Desktop/CryptoApp/DerivedData/CryptoApp/Build/Intermediates/CryptoApp.build/Debug-iphonesimulator/CryptoApp.build/DerivedSources/CoreDataGenerated/UserDataModel/UserAccount+CoreDataClass.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/ObjectiveC.apinotesc /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreData.apinotesc /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.apinotesc /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Foundation.apinotesc /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreGraphics.apinotesc /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/UIKit.apinotesc /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreText.apinotesc /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/ObjectiveC.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreData.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreImage.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/QuartzCore.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreGraphics.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/UIKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/SwiftOnoneSupport.swiftmodule /Users/dbessonov/Desktop/CryptoApp/CryptoApp/Bridge.h
D
module ogregl.windows.context; version(Windows): import derelict.opengl3.gl; import derelict.opengl3.wgl; import derelict.util.wintypes; import ogre.bindings.mini_win32; import ogre.exception; import ogre.general.root; import ogregl.context; import ogregl.rendersystem; import ogregl.windows.support; class Win32Context: GLContext { public: this(HDC hDC, HGLRC Glrc) { mHDC = hDC; mGlrc = Glrc; } ~this() { // NB have to do this is subclass to ensure any methods called back // are on this subclass and not half-destructed superclass GLRenderSystem rs = cast(GLRenderSystem)(Root.getSingleton().getRenderSystem()); rs._unregisterContext(this); } /** See GLContext */ override void setCurrent() { wglMakeCurrent(mHDC, mGlrc); } /** See GLContext */ override void endCurrent() { wglMakeCurrent(null, null); } /// @copydoc GLContext::clone override GLContext clone() //const { // Create new context based on own HDC HGLRC newCtx = wglCreateContext(mHDC); if (!newCtx) { throw new InternalError( "Error calling wglCreateContext", "Win32Context.clone"); } HGLRC oldrc = wglGetCurrentContext(); HDC oldhdc = wglGetCurrentDC(); wglMakeCurrent(null, null); // Share lists with old context if (!wglShareLists(mGlrc, newCtx)) { string errorMsg = translateWGLError(); wglDeleteContext(newCtx); throw new RenderingApiError("wglShareLists() failed: " ~ errorMsg, "Win32Context::clone"); } // restore old context wglMakeCurrent(oldhdc, oldrc); return new Win32Context(mHDC, newCtx); } override void releaseContext() { if (mGlrc !is null) { wglDeleteContext(mGlrc); mGlrc = null; mHDC = null; } } protected: HDC mHDC; HGLRC mGlrc; } /*static if (OGRE_THREAD_SUPPORT == 1) { // declared in OgreGLPrerequisites.h WGLEWContext * wglewGetContext() { //static OGRE_THREAD_POINTER_VAR(WGLEWContext, WGLEWContextsPtr); __gshared WGLEWContext WGLEWContextsPtr; WGLEWContext * currentWGLEWContextsPtr = OGRE_THREAD_POINTER_GET(WGLEWContextsPtr); if (currentWGLEWContextsPtr == null) { currentWGLEWContextsPtr = new WGLEWContext(); OGRE_THREAD_POINTER_SET(WGLEWContextsPtr, currentWGLEWContextsPtr); ZeroMemory(currentWGLEWContextsPtr, WGLEWContext.sizeof); wglewInit(); } return currentWGLEWContextsPtr; } }*/
D
/* Copyright (c) 2011-2021 Timur Gafarov Boost Software License - Version 1.0 - August 17th, 2003 Permission is hereby granted, free of charge, to any person or organization obtaining a copy of the software and accompanying documentation covered by this license (the "Software") to use, reproduce, display, distribute, execute, and transmit the Software, and to prepare derivative works of the Software, and to permit third-parties to whom the Software is furnished to do so, all subject to the following: The copyright notices in the Software and this entire statement, including the above license grant, this restriction and the following disclaimer, must be included in all copies of the Software, in whole or in part, and all derivative works of the Software, unless such copies or derivative works are solely in the form of machine-executable object code generated by a source language processor. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /** * Image sharpening * * Copyright: Timur Gafarov 2011-2021. * License: $(LINK2 boost.org/LICENSE_1_0.txt, Boost License 1.0). * Authors: Timur Gafarov */ module dlib.image.filters.sharpen; import dlib.image.image; import dlib.image.color; import dlib.image.arithmetics; import dlib.image.filters.contrast; import dlib.image.filters.boxblur; /// Sharpen an image SuperImage sharpen(SuperImage src, SuperImage outp, int radius, float amount) { if (outp is null) outp = src.dup; auto blurred = boxBlur(src, outp, radius); auto mask = subtract(src, blurred, outp, 1.0f); auto highcon = contrast(mask, outp, amount, ContrastMethod.AverageImage); return add(src, highcon, outp, 0.25f); } /// ditto SuperImage sharpen(SuperImage src, int radius, float amount) { return sharpen(src, null, radius, amount); }
D
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////// ////////////////////////////////////////////// ////////////////////////////////////////////// Beliars ChaosWaffe ////////////////////////////////////////////// ////////////////////////////////////////////// ////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////// 1 HAND WAFFE ////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// prototype BeliarWeaponPrototype_1H (C_Item) { name = NAME_ADDON_BELIARSWEAPON; mainflag = ITEM_KAT_NF; flags = ITEM_SWD; material = MAT_METAL; //value = 0; //damageTotal = 0; damagetype = DAM_EDGE; range = Range_Orkschlaechter; cond_atr[2] = ATR_STRENGTH; cond_value[2] = 0; visual = "ItMw_BeliarWeapon_1H.3DS"; effect = "SPELLFX_FIRESWORDBLACK"; description = name; TEXT[2] = NAME_OneHanded; TEXT[3] = NAME_Damage; COUNT[3] = damageTotal; TEXT[4] = NAME_ADDON_ONEHANDED_BELIAR; TEXT[5] = NAME_Value; COUNT[5] = value; }; instance ItMw_BeliarWeapon_1H_01 (BeliarWeaponPrototype_1H) { value = Value_BeliarW_1H_01; damageTotal = Damage_BeliarW_1H_01; COUNT[5] = value; COUNT[3] = damageTotal; COUNT[4] = BeliarDamageChance_01; }; instance ItMw_BeliarWeapon_1H_02 (BeliarWeaponPrototype_1H) { value = Value_BeliarW_1H_02; damageTotal = Damage_BeliarW_1H_02; COUNT[5] = value; COUNT[3] = damageTotal; COUNT[4] = BeliarDamageChance_02; }; instance ItMw_BeliarWeapon_1H_03 (BeliarWeaponPrototype_1H) { value = Value_BeliarW_1H_03; damageTotal = Damage_BeliarW_1H_03; COUNT[5] = value; COUNT[3] = damageTotal; COUNT[4] = BeliarDamageChance_03; }; instance ItMw_BeliarWeapon_1H_04 (BeliarWeaponPrototype_1H) { value = Value_BeliarW_1H_04; damageTotal = Damage_BeliarW_1H_04; COUNT[5] = value; COUNT[3] = damageTotal; COUNT[4] = BeliarDamageChance_04; }; instance ItMw_BeliarWeapon_1H_05 (BeliarWeaponPrototype_1H) { value = Value_BeliarW_1H_05; damageTotal = Damage_BeliarW_1H_05; COUNT[5] = value; COUNT[3] = damageTotal; COUNT[4] = BeliarDamageChance_05; }; instance ItMw_BeliarWeapon_1H_06 (BeliarWeaponPrototype_1H) { value = Value_BeliarW_1H_06; damageTotal = Damage_BeliarW_1H_06; COUNT[5] = value; COUNT[3] = damageTotal; COUNT[4] = BeliarDamageChance_06; }; instance ItMw_BeliarWeapon_1H_07 (BeliarWeaponPrototype_1H) { value = Value_BeliarW_1H_07; damageTotal = Damage_BeliarW_1H_07; COUNT[5] = value; COUNT[3] = damageTotal; COUNT[4] = BeliarDamageChance_07; }; instance ItMw_BeliarWeapon_1H_08 (BeliarWeaponPrototype_1H) { value = Value_BeliarW_1H_08; damageTotal = Damage_BeliarW_1H_08; COUNT[5] = value; COUNT[3] = damageTotal; COUNT[4] = BeliarDamageChance_08; }; instance ItMw_BeliarWeapon_1H_09 (BeliarWeaponPrototype_1H) { value = Value_BeliarW_1H_09; damageTotal = Damage_BeliarW_1H_09; COUNT[5] = value; COUNT[3] = damageTotal; COUNT[4] = BeliarDamageChance_09; }; instance ItMw_BeliarWeapon_1H_10 (BeliarWeaponPrototype_1H) { value = Value_BeliarW_1H_10; damageTotal = Damage_BeliarW_1H_10; COUNT[5] = value; COUNT[3] = damageTotal; COUNT[4] = BeliarDamageChance_10; }; instance ItMw_BeliarWeapon_1H_11 (BeliarWeaponPrototype_1H) { value = Value_BeliarW_1H_11; damageTotal = Damage_BeliarW_1H_11; COUNT[5] = value; COUNT[3] = damageTotal; COUNT[4] = BeliarDamageChance_11; }; instance ItMw_BeliarWeapon_1H_12 (BeliarWeaponPrototype_1H) { value = Value_BeliarW_1H_12; damageTotal = Damage_BeliarW_1H_12; COUNT[5] = value; COUNT[3] = damageTotal; COUNT[4] = BeliarDamageChance_12; }; instance ItMw_BeliarWeapon_1H_13 (BeliarWeaponPrototype_1H) { value = Value_BeliarW_1H_13; damageTotal = Damage_BeliarW_1H_13; COUNT[5] = value; COUNT[3] = damageTotal; COUNT[4] = BeliarDamageChance_13; }; instance ItMw_BeliarWeapon_1H_14 (BeliarWeaponPrototype_1H) { value = Value_BeliarW_1H_14; damageTotal = Damage_BeliarW_1H_14; COUNT[5] = value; COUNT[3] = damageTotal; COUNT[4] = BeliarDamageChance_14; }; instance ItMw_BeliarWeapon_1H_15 (BeliarWeaponPrototype_1H) { value = Value_BeliarW_1H_15; damageTotal = Damage_BeliarW_1H_15; COUNT[5] = value; COUNT[3] = damageTotal; COUNT[4] = BeliarDamageChance_15; }; instance ItMw_BeliarWeapon_1H_16 (BeliarWeaponPrototype_1H) { value = Value_BeliarW_1H_16; damageTotal = Damage_BeliarW_1H_16; COUNT[5] = value; COUNT[3] = damageTotal; COUNT[4] = BeliarDamageChance_16; }; instance ItMw_BeliarWeapon_1H_17 (BeliarWeaponPrototype_1H) { value = Value_BeliarW_1H_17; damageTotal = Damage_BeliarW_1H_17; COUNT[5] = value; COUNT[3] = damageTotal; COUNT[4] = BeliarDamageChance_17; }; instance ItMw_BeliarWeapon_1H_18 (BeliarWeaponPrototype_1H) { value = Value_BeliarW_1H_18; damageTotal = Damage_BeliarW_1H_18; COUNT[5] = value; COUNT[3] = damageTotal; COUNT[4] = BeliarDamageChance_18; }; instance ItMw_BeliarWeapon_1H_19 (BeliarWeaponPrototype_1H) { value = Value_BeliarW_1H_19; damageTotal = Damage_BeliarW_1H_19; COUNT[5] = value; COUNT[3] = damageTotal; COUNT[4] = BeliarDamageChance_19; }; instance ItMw_BeliarWeapon_1H_20 (BeliarWeaponPrototype_1H) { value = Value_BeliarW_1H_20; damageTotal = Damage_BeliarW_1H_20; COUNT[5] = value; COUNT[3] = damageTotal; COUNT[4] = BeliarDamageChance_20; }; ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////// 2 HAND WAFFE ////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// prototype BeliarWeaponPrototype_2H (C_Item) { name = NAME_ADDON_BELIARSWEAPON; mainflag = ITEM_KAT_NF; flags = ITEM_2HD_SWD; material = MAT_METAL; //value = Value_Drachenschneide; //damageTotal = Damage_Drachenschneide; damagetype = DAM_EDGE; range = Range_Drachenschneide; effect = "SPELLFX_FIRESWORDBLACK"; cond_atr[2] = ATR_STRENGTH; cond_value[2] = 0; visual = "ItMw_BeliarWeapon_2H.3DS"; description = name; TEXT[2] = NAME_TwoHanded; TEXT[3] = NAME_Damage; COUNT[3] = damageTotal; TEXT[4] = NAME_ADDON_TWOHANDED_BELIAR; TEXT[5] = NAME_Value; COUNT[5] = value; }; instance ItMw_BeliarWeapon_Raven (BeliarWeaponPrototype_2H) { value = Value_BeliarW_Raven; damageTotal = Damage_BeliarW_Raven; cond_atr[2] = ATR_MANA_MAX; cond_value[2] = 666666; //Joly:spezieller Wert von Raven! TEXT[3] = ""; TEXT[5] = NAME_Value; COUNT[5] = value; }; instance ItMw_BeliarWeapon_2H_01 (BeliarWeaponPrototype_2H) { value = Value_BeliarW_2H_01; damageTotal = Damage_BeliarW_2H_01; COUNT[5] = value; COUNT[3] = damageTotal; COUNT[4] = BeliarDamageChance_01; }; instance ItMw_BeliarWeapon_2H_02 (BeliarWeaponPrototype_2H) { value = Value_BeliarW_2H_02; damageTotal = Damage_BeliarW_2H_02; COUNT[5] = value; COUNT[3] = damageTotal; COUNT[4] = BeliarDamageChance_02; }; instance ItMw_BeliarWeapon_2H_03 (BeliarWeaponPrototype_2H) { value = Value_BeliarW_2H_03; damageTotal = Damage_BeliarW_2H_03; COUNT[5] = value; COUNT[3] = damageTotal; COUNT[4] = BeliarDamageChance_03; }; instance ItMw_BeliarWeapon_2H_04 (BeliarWeaponPrototype_2H) { value = Value_BeliarW_2H_04; damageTotal = Damage_BeliarW_2H_04; COUNT[5] = value; COUNT[3] = damageTotal; COUNT[4] = BeliarDamageChance_04; }; instance ItMw_BeliarWeapon_2H_05 (BeliarWeaponPrototype_2H) { value = Value_BeliarW_2H_05; damageTotal = Damage_BeliarW_2H_05; COUNT[5] = value; COUNT[3] = damageTotal; COUNT[4] = BeliarDamageChance_05; }; instance ItMw_BeliarWeapon_2H_06 (BeliarWeaponPrototype_2H) { value = Value_BeliarW_2H_06; damageTotal = Damage_BeliarW_2H_06; COUNT[5] = value; COUNT[3] = damageTotal; COUNT[4] = BeliarDamageChance_06; }; instance ItMw_BeliarWeapon_2H_07 (BeliarWeaponPrototype_2H) { value = Value_BeliarW_2H_07; damageTotal = Damage_BeliarW_2H_07; COUNT[5] = value; COUNT[3] = damageTotal; COUNT[4] = BeliarDamageChance_07; }; instance ItMw_BeliarWeapon_2H_08 (BeliarWeaponPrototype_2H) { value = Value_BeliarW_2H_08; damageTotal = Damage_BeliarW_2H_08; COUNT[5] = value; COUNT[3] = damageTotal; COUNT[4] = BeliarDamageChance_08; }; instance ItMw_BeliarWeapon_2H_09 (BeliarWeaponPrototype_2H) { value = Value_BeliarW_2H_09; damageTotal = Damage_BeliarW_2H_09; COUNT[5] = value; COUNT[3] = damageTotal; COUNT[4] = BeliarDamageChance_09; }; instance ItMw_BeliarWeapon_2H_10 (BeliarWeaponPrototype_2H) { value = Value_BeliarW_2H_10; damageTotal = Damage_BeliarW_2H_10; COUNT[5] = value; COUNT[3] = damageTotal; COUNT[4] = BeliarDamageChance_10; }; instance ItMw_BeliarWeapon_2H_11 (BeliarWeaponPrototype_2H) { value = Value_BeliarW_2H_11; damageTotal = Damage_BeliarW_2H_11; COUNT[5] = value; COUNT[3] = damageTotal; COUNT[4] = BeliarDamageChance_11; }; instance ItMw_BeliarWeapon_2H_12 (BeliarWeaponPrototype_2H) { value = Value_BeliarW_2H_12; damageTotal = Damage_BeliarW_2H_12; COUNT[5] = value; COUNT[3] = damageTotal; COUNT[4] = BeliarDamageChance_12; }; instance ItMw_BeliarWeapon_2H_13 (BeliarWeaponPrototype_2H) { value = Value_BeliarW_2H_13; damageTotal = Damage_BeliarW_2H_13; COUNT[5] = value; COUNT[3] = damageTotal; COUNT[4] = BeliarDamageChance_13; }; instance ItMw_BeliarWeapon_2H_14 (BeliarWeaponPrototype_2H) { value = Value_BeliarW_2H_14; damageTotal = Damage_BeliarW_2H_14; COUNT[5] = value; COUNT[3] = damageTotal; COUNT[4] = BeliarDamageChance_14; }; instance ItMw_BeliarWeapon_2H_15 (BeliarWeaponPrototype_2H) { value = Value_BeliarW_2H_15; damageTotal = Damage_BeliarW_2H_15; COUNT[5] = value; COUNT[3] = damageTotal; COUNT[4] = BeliarDamageChance_15; }; instance ItMw_BeliarWeapon_2H_16 (BeliarWeaponPrototype_2H) { value = Value_BeliarW_2H_16; damageTotal = Damage_BeliarW_2H_16; COUNT[5] = value; COUNT[3] = damageTotal; COUNT[4] = BeliarDamageChance_16; }; instance ItMw_BeliarWeapon_2H_17 (BeliarWeaponPrototype_2H) { value = Value_BeliarW_2H_17; damageTotal = Damage_BeliarW_2H_17; COUNT[5] = value; COUNT[3] = damageTotal; COUNT[4] = BeliarDamageChance_17; }; instance ItMw_BeliarWeapon_2H_18 (BeliarWeaponPrototype_2H) { value = Value_BeliarW_2H_18; damageTotal = Damage_BeliarW_2H_18; COUNT[5] = value; COUNT[3] = damageTotal; COUNT[4] = BeliarDamageChance_18; }; instance ItMw_BeliarWeapon_2H_19 (BeliarWeaponPrototype_2H) { value = Value_BeliarW_2H_19; damageTotal = Damage_BeliarW_2H_19; COUNT[5] = value; COUNT[3] = damageTotal; COUNT[4] = BeliarDamageChance_19; }; instance ItMw_BeliarWeapon_2H_20 (BeliarWeaponPrototype_2H) { value = Value_BeliarW_2H_20; damageTotal = Damage_BeliarW_2H_20; COUNT[5] = value; COUNT[3] = damageTotal; COUNT[4] = BeliarDamageChance_20; }; /* ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////// RUNE ////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// prototype BeliarWeaponPrototype_Rune (C_Item) { name = NAME_ADDON_BELIARSWEAPON; mainflag = ITEM_KAT_RUNE; flags = 0; value = Value_Ru_ArmyofDarkness; visual = "ItRu_ArmyOfDarkness.3DS"; material = MAT_STONE; spell = SPL_ARMYOFDARKNESS; mag_circle = 6; description = NAME_SPL_ArmyOfDarkness; TEXT [1] = NAME_Manakosten; COUNT [1] = SPL_COST_ARMYOFDARKNESS; TEXT [5] = NAME_Value; COUNT [5] = value; }; instance ItRu_BeliarWeapon_Rune_01 (BeliarWeaponPrototype_Rune) { }; instance ItRu_BeliarWeapon_Rune_02 (BeliarWeaponPrototype_Rune) { }; instance ItRu_BeliarWeapon_Rune_03 (BeliarWeaponPrototype_Rune) { }; instance ItRu_BeliarWeapon_Rune_04 (BeliarWeaponPrototype_Rune) { }; instance ItRu_BeliarWeapon_Rune_05 (BeliarWeaponPrototype_Rune) { }; */ // Feuerschwert instance ItMw_BeliarWeapon_Fire (BeliarWeaponPrototype_2H) { value = Value_BeliarW_2H_20; damageTotal = Damage_BeliarW_2H_20; COUNT[5] = value; COUNT[3] = damageTotal; effect = "SPELLFX_FIRESWORD"; };
D
/** D bindings for GSL. Authors: Chibisi Chima-Okereke Copyright: Copyright (c) 2016, Chibisi Chima-Okereke. All rights reserved. License: Boost License 1.0 */ module gsl.siman; import gsl.rng; extern (C): alias double function (void*) gsl_siman_Efunc_t; alias void function (const(gsl_rng)*, void*, double) gsl_siman_step_t; alias double function (void*, void*) gsl_siman_metric_t; alias void function (void*) gsl_siman_print_t; alias void function (void*, void*) gsl_siman_copy_t; alias void* function (void*) gsl_siman_copy_construct_t; alias void function (void*) gsl_siman_destroy_t; struct gsl_siman_params_t { int n_tries; int iters_fixed_T; double step_size; double k; double t_initial; double mu_t; double t_min; } void gsl_siman_solve (const(gsl_rng)* r, void* x0_p, gsl_siman_Efunc_t Ef, gsl_siman_step_t take_step, gsl_siman_metric_t distance, gsl_siman_print_t print_position, gsl_siman_copy_t copyfunc, gsl_siman_copy_construct_t copy_constructor, gsl_siman_destroy_t destructor, size_t element_size, gsl_siman_params_t params); void gsl_siman_solve_many (const(gsl_rng)* r, void* x0_p, gsl_siman_Efunc_t Ef, gsl_siman_step_t take_step, gsl_siman_metric_t distance, gsl_siman_print_t print_position, size_t element_size, gsl_siman_params_t params);
D
instance NOV_1300_TALAS_EXIT(C_INFO) { npc = nov_1300_talas; nr = 999; condition = nov_1300_talas_exit_condition; information = nov_1300_talas_exit_info; important = 0; permanent = 1; description = DIALOG_ENDE; }; func int nov_1300_talas_exit_condition() { return TRUE; }; func void nov_1300_talas_exit_info() { AI_StopProcessInfos(self); }; instance NOV_1300_TALAS_UR(C_INFO) { npc = nov_1300_talas; condition = nov_1300_talas_ur_condition; information = nov_1300_talas_ur_info; important = 0; permanent = 0; description = "Ты Талас? Это тебя ограбили, да?"; }; func int nov_1300_talas_ur_condition() { if(Npc_KnowsInfo(hero,info_corkalom_bringbook) && (CORKALOM_BRINGBOOK != LOG_SUCCESS)) { return TRUE; }; }; func void nov_1300_talas_ur_info() { AI_Output(other,self,"Nov_1300_Talas_UR_Info_15_01"); //Ты Талас? Это тебя ограбили, да? AI_Output(self,other,"Nov_1300_Talas_UR_Info_02_02"); //Оставь меня в покое, я не хочу об этом говорить! }; instance NOV_1300_TALAS_HELP(C_INFO) { npc = nov_1300_talas; condition = nov_1300_talas_help_condition; information = nov_1300_talas_help_info; important = 0; permanent = 0; description = "Я могу помочь тебе вернуть альманах."; }; func int nov_1300_talas_help_condition() { if(Npc_KnowsInfo(hero,nov_1300_talas_ur) && (CORKALOM_BRINGBOOK != LOG_SUCCESS)) { return 1; }; }; func void nov_1300_talas_help_info() { AI_Output(other,self,"Nov_1300_Talas_HELP_Info_15_01"); //Я могу помочь тебе вернуть альманах. AI_Output(self,other,"Nov_1300_Talas_HELP_Info_02_02"); //Правда? Знаешь, на меня напали гоблины... и теперь я должен вернуться туда и добыть книгу. AI_Output(self,other,"Nov_1300_Talas_HELP_Info_02_03"); //Послушай, у меня есть идея: давай я покажу тебе, где это находится, а ты заберешь альманах. Info_ClearChoices(nov_1300_talas_help); Info_AddChoice(nov_1300_talas_help,"Хорошо.",nov_1300_talas_help_ok); Info_AddChoice(nov_1300_talas_help,"Это обойдется тебе в тридцать кусков руды.",nov_1300_talas_help_bring); Info_AddChoice(nov_1300_talas_help,"Я сделаю это, но только за пятьдесят кусков.",nov_1300_talas_help_more); }; func void nov_1300_talas_help_ok() { AI_Output(other,self,"Nov_1300_Talas_HELP_OK_15_01"); //Хорошо. AI_Output(self,other,"Nov_1300_Talas_HELP_OK_02_02"); //Тогда мы можем отправиться прямо сейчас. Info_ClearChoices(nov_1300_talas_help); }; func void nov_1300_talas_help_bring() { AI_Output(other,self,"Nov_1300_Talas_HELP_BRING_15_01"); //Это обойдется тебе в тридцать кусков руды. AI_Output(self,other,"Nov_1300_Talas_HELP_BRING_02_02"); //Ладно. Мы можем отправиться прямо сейчас. b_printtrademsg1("Получено руды: 30"); CreateInvItems(self,itminugget,30); b_giveinvitems(self,hero,itminugget,30); Info_ClearChoices(nov_1300_talas_help); }; func void nov_1300_talas_help_more() { AI_Output(other,self,"Nov_1300_Talas_HELP_MORE_15_01"); //Я сделаю это, но только за пятьдесят кусков. AI_Output(self,other,"Nov_1300_Talas_HELP_MORE_02_02"); //Что? Да это же грабеж! Ну хорошо... дай мне знать, когда будешь готов. b_printtrademsg1("Получено руды: 50"); CreateInvItems(self,itminugget,50); b_giveinvitems(self,hero,itminugget,50); Info_ClearChoices(nov_1300_talas_help); }; instance NOV_1300_TALAS_READY(C_INFO) { npc = nov_1300_talas; condition = nov_1300_talas_ready_condition; information = nov_1300_talas_ready_info; important = 0; permanent = 0; description = "Я готов, мы можем идти."; }; func int nov_1300_talas_ready_condition() { if(Npc_KnowsInfo(hero,nov_1300_talas_help) && (CORKALOM_BRINGBOOK != LOG_SUCCESS)) { return 1; }; }; func void nov_1300_talas_ready_info() { AI_Output(other,self,"Nov_1300_Talas_READY_Info_15_01"); //Я готов, мы можем идти. AI_Output(self,other,"Nov_1300_Talas_READY_Info_02_02"); //Иди за мной. b_logentry(CH2_BOOK,"Я предложил Таласу вместе вернуть альманах. Он отведет меня к тому месту, где находится книга."); self.aivar[AIV_PARTYMEMBER] = TRUE; Npc_ExchangeRoutine(self,"GOBBOCAVE"); AI_StopProcessInfos(self); }; instance NOV_1300_TALAS_BRIDGE(C_INFO) { npc = nov_1300_talas; condition = nov_1300_talas_bridge_condition; information = nov_1300_talas_bridge_info; important = 1; permanent = 0; }; func int nov_1300_talas_bridge_condition() { if(Npc_KnowsInfo(hero,nov_1300_talas_ready) && (Npc_GetDistToWP(self,"LOCATION_29_02") < 1000)) { return 1; }; }; func void nov_1300_talas_bridge_info() { AI_Output(self,other,"Nov_1300_Talas_BRIDGE_Info_02_01"); //За мостом в пещере обитают эти чертовы твари. Будь осторожен. AI_Output(other,self,"Nov_1300_Talas_BRIDGE_Info_15_02"); //Ты со мной не пойдешь? AI_Output(self,other,"Nov_1300_Talas_BRIDGE_Info_02_03"); //Я подожду здесь... гм... буду прикрывать отход. b_logentry(CH2_BOOK,"Мы стоим у входа в пещеру гоблинов. Талас не будет сопровождать меня дальше. Мне придется все делать самому."); }; instance NOV_1300_TALAS_BACK(C_INFO) { npc = nov_1300_talas; condition = nov_1300_talas_back_condition; information = nov_1300_talas_back_info; important = 1; permanent = 0; }; func int nov_1300_talas_back_condition() { if(Npc_KnowsInfo(hero,nov_1300_talas_bridge) && Npc_HasItems(hero,itwrfokusbuch)) { return 1; }; }; func void nov_1300_talas_back_info() { AI_Output(self,other,"Nov_1300_Talas_BACK_Info_02_01"); //Альманах у тебя! Здорово! Теперь мы можем вернуться в лагерь. b_logentry(CH2_BOOK,"Я нашел альманах. Вместе с Таласом мы отнесем его в Болотный лагерь."); Npc_ExchangeRoutine(self,"RETURNTOCAMP"); AI_StopProcessInfos(self); }; instance NOV_1300_TALAS_RETURNED(C_INFO) { npc = nov_1300_talas; condition = nov_1300_talas_returned_condition; information = nov_1300_talas_returned_info; important = 1; permanent = 0; }; func int nov_1300_talas_returned_condition() { if(Npc_KnowsInfo(hero,nov_1300_talas_back) && Npc_HasItems(hero,itwrfokusbuch) && (Npc_GetDistToWP(self,"PSI_START") < 1000) && (CORKALOM_BRINGBOOK != LOG_SUCCESS)) { return TRUE; }; }; func void nov_1300_talas_returned_info() { AI_Output(self,other,"Info_Talas_RETURNED_02_01"); //Вот мы и дома. Тебе лучше поскорее отдать альманах Кор Галому. AI_Output(other,self,"Info_Talas_RETURNED_15_02"); //Будь осторожен и не переживай за меня! AI_Output(self,other,"Info_Talas_RETURNED_02_03"); //Уж точно не буду! Не стоит даже и волноваться. b_logentry(CH2_BOOK,"Мы пришли в Болотный лагерь. Талас оказался тем еще трусом. Я сам отнесу альманах Кор Галому."); self.aivar[AIV_PARTYMEMBER] = FALSE; Npc_ExchangeRoutine(self,"BackInCamp"); AI_StopProcessInfos(self); }; instance NOV_1300_TALAS_OGY(C_INFO) { npc = nov_1300_talas; condition = nov_1300_talas_ogy_condition; information = nov_1300_talas_ogy_info; important = 0; permanent = 0; description = "Меня прислал Кор Ангар."; }; func int nov_1300_talas_ogy_condition() { if(Npc_KnowsInfo(hero,gur_1202_corangar_where)) { return 1; }; }; func void nov_1300_talas_ogy_info() { AI_Output(other,self,"Nov_1300_Talas_OGY_15_01"); //Меня прислал Кор Ангар. Он сказал, что ты сможешь отвести меня к кладбищу орков. Мне нужно найти Идола Люкора и Стражей, которые ушли с ним. AI_Output(self,other,"Nov_1300_Talas_OGY_02_02"); //Так, я снова посыльный. Черт! Если бы я не потерял этот альманах... AI_Output(self,other,"Nov_1300_Talas_OGY_02_03"); //Ну хорошо, иди за мной. self.aivar[AIV_PARTYMEMBER] = TRUE; AI_StopProcessInfos(self); Npc_ExchangeRoutine(self,"OGY"); }; instance NOV_1300_TALAS_BACKAGAIN(C_INFO) { npc = nov_1300_talas; condition = nov_1300_talas_backagain_condition; information = nov_1300_talas_backagain_info; important = 1; permanent = 0; }; func int nov_1300_talas_backagain_condition() { if(Npc_GetDistToWP(self,"OW_PATH_011") < 1000) { return 1; }; }; func void nov_1300_talas_backagain_info() { AI_Output(self,other,"Nov_1300_Talas_BACKAGAIN_Info_02_01"); //Через мост я с тобой не пойду, жизнь еще мне дорога. AI_Output(self,other,"Nov_1300_Talas_BACKAGAIN_Info_02_02"); //Нужно быть ненормальным, чтобы соваться туда. Даже Люкор со своими Стражами - и тот не вернулся. AI_Output(other,self,"Nov_1300_Talas_BACKAGAIN_Info_15_03"); //Что ж, посмотрим, что там такое. Возвращайся в лагерь, а я приду туда позже. self.aivar[AIV_PARTYMEMBER] = FALSE; AI_StopProcessInfos(self); Npc_ExchangeRoutine(self,"ReturnToCampAgain"); };
D
/home/oscar/Documents/E7020E/E7020E-Project/PCB-code/target/thumbv7em-none-eabihf/debug/examples/temp_test-32bcec0b6a557c1d: examples/temp_test.rs /home/oscar/Documents/E7020E/E7020E-Project/PCB-code/target/thumbv7em-none-eabihf/debug/examples/temp_test-32bcec0b6a557c1d.d: examples/temp_test.rs examples/temp_test.rs:
D
// Written in the D programming language. /** * Templates with which to extract information about types and symbols at * compile time. * * Macros: * WIKI = Phobos/StdTraits * * Copyright: Copyright Digital Mars 2005 - 2009. * License: <a href="http://www.boost.org/LICENSE_1_0.txt">Boost License 1.0</a>. * Authors: $(WEB digitalmars.com, Walter Bright), * Tomasz Stachowiak ($(D isExpressionTuple)), * $(WEB erdani.org, Andrei Alexandrescu), * Shin Fujishiro, * $(WEB octarineparrot.com, Robert Clipsham), * $(WEB klickverbot.at, David Nadlinger), * Kenji Hara, * Shoichi Kato * Source: $(PHOBOSSRC std/_traits.d) */ /* Copyright Digital Mars 2005 - 2009. * Distributed under the Boost Software License, Version 1.0. * (See accompanying file LICENSE_1_0.txt or copy at * http://www.boost.org/LICENSE_1_0.txt) */ module std.traits; import std.algorithm; import std.typetuple; import std.typecons; import core.vararg; /////////////////////////////////////////////////////////////////////////////// // Functions /////////////////////////////////////////////////////////////////////////////// // Petit demangler // (this or similar thing will eventually go to std.demangle if necessary // ctfe stuffs are available) private { struct Demangle(T) { T value; // extracted information string rest; } /* Demangles mstr as the storage class part of Argument. */ Demangle!uint demangleParameterStorageClass(string mstr) { uint pstc = 0; // parameter storage class // Argument --> Argument2 | M Argument2 if (mstr.length > 0 && mstr[0] == 'M') { pstc |= ParameterStorageClass.scope_; mstr = mstr[1 .. $]; } // Argument2 --> Type | J Type | K Type | L Type ParameterStorageClass stc2; switch (mstr.length ? mstr[0] : char.init) { case 'J': stc2 = ParameterStorageClass.out_; break; case 'K': stc2 = ParameterStorageClass.ref_; break; case 'L': stc2 = ParameterStorageClass.lazy_; break; default : break; } if (stc2 != ParameterStorageClass.init) { pstc |= stc2; mstr = mstr[1 .. $]; } return Demangle!uint(pstc, mstr); } /* Demangles mstr as FuncAttrs. */ Demangle!uint demangleFunctionAttributes(string mstr) { enum LOOKUP_ATTRIBUTE = [ 'a': FunctionAttribute.pure_, 'b': FunctionAttribute.nothrow_, 'c': FunctionAttribute.ref_, 'd': FunctionAttribute.property, 'e': FunctionAttribute.trusted, 'f': FunctionAttribute.safe ]; uint atts = 0; // FuncAttrs --> FuncAttr | FuncAttr FuncAttrs // FuncAttr --> empty | Na | Nb | Nc | Nd | Ne | Nf while (mstr.length >= 2 && mstr[0] == 'N') { if (FunctionAttribute att = LOOKUP_ATTRIBUTE[ mstr[1] ]) { atts |= att; mstr = mstr[2 .. $]; } else assert(0); } return Demangle!uint(atts, mstr); } alias TypeTuple!(byte, ubyte, short, ushort, int, uint, long, ulong) IntegralTypeList; alias TypeTuple!(byte, short, int, long) SignedIntTypeList; alias TypeTuple!(ubyte, ushort, uint, ulong) UnsignedIntTypeList; alias TypeTuple!(float, double, real) FloatingPointTypeList; alias TypeTuple!(ifloat, idouble, ireal) ImaginaryTypeList; alias TypeTuple!(cfloat, cdouble, creal) ComplexTypeList; alias TypeTuple!(IntegralTypeList, FloatingPointTypeList) NumericTypeList; alias TypeTuple!(char, wchar, dchar) CharTypeList; /* Get an expression typed as T, like T.init */ template defaultInit(T) { static if (!is(typeof({ T v = void; }))) // inout(U) @property T defaultInit(T v = T.init); else @property T defaultInit(); } } version(unittest) { template MutableOf(T) { alias T MutableOf; } template ConstOf(T) { alias const(T) ConstOf; } template SharedOf(T) { alias shared(T) SharedOf; } template SharedConstOf(T) { alias shared(const(T)) SharedConstOf; } template ImmutableOf(T) { alias immutable(T) ImmutableOf; } template WildOf(T) { alias inout(T) WildOf; } template SharedWildOf(T) { alias shared(inout(T)) SharedWildOf; } alias TypeTuple!(MutableOf, ConstOf, SharedOf, SharedConstOf, ImmutableOf) TypeQualifierList; struct SubTypeOf(T) { T val; alias val this; } } /** * Get the full package name for the given symbol. * Example: * --- * import std.traits; * static assert(packageName!packageName == "std"); * --- */ template packageName(alias T) { static if (is(typeof(__traits(parent, T)))) enum parent = packageName!(__traits(parent, T)); else enum string parent = null; static if (T.stringof.startsWith("package ")) enum packageName = (parent ? parent ~ '.' : "") ~ T.stringof[8 .. $]; else static if (parent) enum packageName = parent; else static assert(false, T.stringof ~ " has no parent"); } unittest { // Commented out because of dmd @@@BUG8922@@@ // static assert(packageName!std == "std"); // this package (currently: "std.std") static assert(packageName!(std.traits) == "std"); // this module static assert(packageName!packageName == "std"); // symbol in this module static assert(packageName!(std.algorithm) == "std"); // other module from same package import etc.c.curl; // local import static assert(packageName!etc == "etc"); static assert(packageName!(etc.c) == "etc.c"); static assert(packageName!curl_httppost == "etc.c"); } version(unittest) { import etc.c.curl; // global import // Commented out because of dmd @@@BUG8922@@@ // static assert(packageName!etc == "etc"); // (currently: "std.etc") static assert(packageName!(etc.c) == "etc.c"); static assert(packageName!curl_httppost == "etc.c"); } /** * Get the module name (including package) for the given symbol. * Example: * --- * import std.traits; * static assert(moduleName!moduleName == "std.traits"); * --- */ template moduleName(alias T) { static assert(!T.stringof.startsWith("package "), "cannot get the module name for a package"); static if (T.stringof.startsWith("module ")) { static if (__traits(compiles, packageName!T)) enum packagePrefix = packageName!T ~ '.'; else enum packagePrefix = ""; enum moduleName = packagePrefix ~ T.stringof[7..$]; } else alias moduleName!(__traits(parent, T)) moduleName; } unittest { static assert(!__traits(compiles, moduleName!std)); static assert(moduleName!(std.traits) == "std.traits"); // this module static assert(moduleName!moduleName == "std.traits"); // symbol in this module static assert(moduleName!(std.algorithm) == "std.algorithm"); // other module static assert(moduleName!(std.algorithm.map) == "std.algorithm"); // symbol in other module import etc.c.curl; // local import static assert(!__traits(compiles, moduleName!(etc.c))); static assert(moduleName!(etc.c.curl) == "etc.c.curl"); static assert(moduleName!curl_httppost == "etc.c.curl"); } version(unittest) { import etc.c.curl; // global import static assert(!__traits(compiles, moduleName!(etc.c))); static assert(moduleName!(etc.c.curl) == "etc.c.curl"); static assert(moduleName!curl_httppost == "etc.c.curl"); } /** * Get the fully qualified name of a symbol. * Example: * --- * import std.traits; * static assert(fullyQualifiedName!fullyQualifiedName == "std.traits.fullyQualifiedName"); * --- */ template fullyQualifiedName(alias T) { static if (__traits(compiles, __traits(parent, T))) enum parentPrefix = fullyQualifiedName!(__traits(parent, T)) ~ '.'; else enum parentPrefix = null; enum fullyQualifiedName = parentPrefix ~ (s) { if(s.skipOver("package ") || s.skipOver("module ")) return s; return s.findSplit("(")[0]; }(T.stringof); } version(unittest) { struct Outer { struct Inner { } } } unittest { static assert(fullyQualifiedName!fullyQualifiedName == "std.traits.fullyQualifiedName"); static assert(fullyQualifiedName!(Outer.Inner) == "std.traits.Outer.Inner"); import etc.c.curl; static assert(fullyQualifiedName!curl_httppost == "etc.c.curl.curl_httppost"); } /*** * Get the type of the return value from a function, * a pointer to function, a delegate, a struct * with an opCall, a pointer to a struct with an opCall, * or a class with an opCall. * Example: * --- * import std.traits; * int foo(); * ReturnType!foo x; // x is declared as int * --- */ template ReturnType(func...) if (func.length == 1 && isCallable!func) { static if (is(FunctionTypeOf!func R == return)) alias R ReturnType; else static assert(0, "argument has no return type"); } unittest { struct G { int opCall (int i) { return 1;} } alias ReturnType!G ShouldBeInt; static assert(is(ShouldBeInt == int)); G g; static assert(is(ReturnType!g == int)); G* p; alias ReturnType!p pg; static assert(is(pg == int)); class C { int opCall (int i) { return 1;} } static assert(is(ReturnType!C == int)); C c; static assert(is(ReturnType!c == int)); class Test { int prop() @property { return 0; } } alias ReturnType!(Test.prop) R_Test_prop; static assert(is(R_Test_prop == int)); alias ReturnType!((int a) { return a; }) R_dglit; static assert(is(R_dglit == int)); } /*** Get, as a tuple, the types of the parameters to a function, a pointer to function, a delegate, a struct with an $(D opCall), a pointer to a struct with an $(D opCall), or a class with an $(D opCall). Example: --- import std.traits; int foo(int, long); void bar(ParameterTypeTuple!foo); // declares void bar(int, long); void abc(ParameterTypeTuple!foo[1]); // declares void abc(long); --- */ template ParameterTypeTuple(func...) if (func.length == 1 && isCallable!func) { static if (is(FunctionTypeOf!func P == function)) alias P ParameterTypeTuple; else static assert(0, "argument has no parameters"); } unittest { int foo(int i, bool b) { return 0; } static assert(is(ParameterTypeTuple!foo == TypeTuple!(int, bool))); static assert(is(ParameterTypeTuple!(typeof(&foo)) == TypeTuple!(int, bool))); struct S { real opCall(real r, int i) { return 0.0; } } S s; static assert(is(ParameterTypeTuple!S == TypeTuple!(real, int))); static assert(is(ParameterTypeTuple!(S*) == TypeTuple!(real, int))); static assert(is(ParameterTypeTuple!s == TypeTuple!(real, int))); class Test { int prop() @property { return 0; } } alias ParameterTypeTuple!(Test.prop) P_Test_prop; static assert(P_Test_prop.length == 0); alias ParameterTypeTuple!((int a){}) P_dglit; static assert(P_dglit.length == 1); static assert(is(P_dglit[0] == int)); } /** Returns the number of arguments of function $(D func). arity is undefined for variadic functions. Example: --- void foo(){} static assert(arity!foo==0); void bar(uint){} static assert(arity!bar==1); --- */ template arity(alias func) if ( isCallable!func && variadicFunctionStyle!func == Variadic.no ) { enum size_t arity = ParameterTypeTuple!func.length; } unittest { void foo(){} static assert(arity!foo==0); void bar(uint){} static assert(arity!bar==1); void variadicFoo(uint...){} static assert(__traits(compiles,arity!variadicFoo)==false); } /** Returns a tuple consisting of the storage classes of the parameters of a function $(D func). Example: -------------------- alias ParameterStorageClass STC; // shorten the enum name void func(ref int ctx, out real result, real param) { } alias ParameterStorageClassTuple!func pstc; static assert(pstc.length == 3); // three parameters static assert(pstc[0] == STC.ref_); static assert(pstc[1] == STC.out_); static assert(pstc[2] == STC.none); -------------------- */ enum ParameterStorageClass : uint { /** * These flags can be bitwise OR-ed together to represent complex storage * class. */ none = 0, /// ditto scope_ = 0b000_1, /// ditto out_ = 0b001_0, /// ditto ref_ = 0b010_0, /// ditto lazy_ = 0b100_0, /// ditto } /// ditto template ParameterStorageClassTuple(func...) if (func.length == 1 && isCallable!func) { alias Unqual!(FunctionTypeOf!func) Func; /* * TypeFuncion: * CallConvention FuncAttrs Arguments ArgClose Type */ alias ParameterTypeTuple!Func Params; // chop off CallConvention and FuncAttrs enum margs = demangleFunctionAttributes(mangledName!Func[1 .. $]).rest; // demangle Arguments and store parameter storage classes in a tuple template demangleNextParameter(string margs, size_t i = 0) { static if (i < Params.length) { enum demang = demangleParameterStorageClass(margs); enum skip = mangledName!(Params[i]).length; // for bypassing Type enum rest = demang.rest; alias TypeTuple!( demang.value + 0, // workaround: "not evaluatable at ..." demangleNextParameter!(rest[skip .. $], i + 1) ) demangleNextParameter; } else // went thru all the parameters { alias TypeTuple!() demangleNextParameter; } } alias demangleNextParameter!margs ParameterStorageClassTuple; } unittest { alias ParameterStorageClass STC; void noparam() {} static assert(ParameterStorageClassTuple!noparam.length == 0); void test(scope int, ref int, out int, lazy int, int) { } alias ParameterStorageClassTuple!test test_pstc; static assert(test_pstc.length == 5); static assert(test_pstc[0] == STC.scope_); static assert(test_pstc[1] == STC.ref_); static assert(test_pstc[2] == STC.out_); static assert(test_pstc[3] == STC.lazy_); static assert(test_pstc[4] == STC.none); interface Test { void test_const(int) const; void test_sharedconst(int) shared const; } Test testi; alias ParameterStorageClassTuple!(Test.test_const) test_const_pstc; static assert(test_const_pstc.length == 1); static assert(test_const_pstc[0] == STC.none); alias ParameterStorageClassTuple!(testi.test_sharedconst) test_sharedconst_pstc; static assert(test_sharedconst_pstc.length == 1); static assert(test_sharedconst_pstc[0] == STC.none); alias ParameterStorageClassTuple!((ref int a) {}) dglit_pstc; static assert(dglit_pstc.length == 1); static assert(dglit_pstc[0] == STC.ref_); } /** Get, as a tuple, the identifiers of the parameters to a function symbol. Example: --- import std.traits; int foo(int num, string name); static assert([ParameterIdentifierTuple!foo] == ["num", "name"]); --- */ template ParameterIdentifierTuple(func...) if (func.length == 1 && isCallable!func) { static if (is(typeof(func[0]) PT == __parameters)) { template Get(size_t i) { enum Get = __traits(identifier, PT[i..i+1]); } } else static if (is(FunctionTypeOf!func PT == __parameters)) { template Get(size_t i) { enum Get = ""; } } else static assert(0, func[0].stringof ~ "is not a function"); template Impl(size_t i = 0) { static if (i == PT.length) alias TypeTuple!() Impl; else alias TypeTuple!(Get!i, Impl!(i+1)) Impl; } alias Impl!() ParameterIdentifierTuple; } unittest { // Test for ddoc example import std.traits; int foo(int num, string name); static assert([ParameterIdentifierTuple!foo] == ["num", "name"]); } unittest { alias ParameterIdentifierTuple PIT; void bar(int num, string name, int[] array){} static assert([PIT!bar] == ["num", "name", "array"]); // might be changed in the future? void function(int num, string name) fp; static assert([PIT!fp] == ["", ""]); // might be changed in the future? void delegate(int num, string name, int[long] aa) dg; static assert([PIT!dg] == ["", "", ""]); /+ // depends on internal void baw(int, string, int[]){} static assert([PIT!baw] == ["_param_0", "_param_1", "_param_2"]); // depends on internal void baz(TypeTuple!(int, string, int[]) args){} static assert([PIT!baz] == ["_param_0", "_param_1", "_param_2"]); +/ } /** Get, as a tuple, the default value of the parameters to a function symbol. If a parameter doesn't have the default value, $(D void) is returned instead. Example: --- import std.traits; int foo(int num, string name = "hello", int[] arr = [1,2,3]); static assert(is(ParameterDefaultValueTuple!foo[0] == void)); static assert( ParameterDefaultValueTuple!foo[1] == "hello"); static assert( ParameterDefaultValueTuple!foo[2] == [1,2,3]); --- */ template ParameterDefaultValueTuple(func...) if (func.length == 1 && isCallable!func) { static if (is(typeof(func[0]) PT == __parameters)) { template Get(size_t i) { enum get = (PT[i..i+1] args) => args[0]; static if (is(typeof(get()))) enum Get = get(); else alias void Get; // If default arg doesn't exist, returns void instead. } } else static if (is(FunctionTypeOf!func PT == __parameters)) { template Get(size_t i) { enum Get = ""; } } else static assert(0, func[0].stringof ~ "is not a function"); template Impl(size_t i = 0) { static if (i == PT.length) alias TypeTuple!() Impl; else alias TypeTuple!(Get!i, Impl!(i+1)) Impl; } alias Impl!() ParameterDefaultValueTuple; } unittest { // Test for ddoc example int foo(int num, string name = "hello", int[] arr = [1,2,3]); static assert(is(ParameterDefaultValueTuple!foo[0] == void)); static assert( ParameterDefaultValueTuple!foo[1] == "hello"); static assert( ParameterDefaultValueTuple!foo[2] == [1,2,3]); } unittest { alias ParameterDefaultValueTuple PDVT; void bar(int n = 1, string s = "hello"){} static assert(PDVT!bar.length == 2); static assert(PDVT!bar[0] == 1); static assert(PDVT!bar[1] == "hello"); static assert(is(typeof(PDVT!bar) == typeof(TypeTuple!(1, "hello")))); void baz(int x, int n = 1, string s = "hello"){} static assert(PDVT!baz.length == 3); static assert(is(PDVT!baz[0] == void)); static assert( PDVT!baz[1] == 1); static assert( PDVT!baz[2] == "hello"); static assert(is(typeof(PDVT!baz) == typeof(TypeTuple!(void, 1, "hello")))); struct Colour { ubyte a,r,g,b; immutable Colour white = Colour(255,255,255,255); } void bug8106(Colour c = Colour.white){} //pragma(msg, PDVT!bug8106); static assert(PDVT!bug8106[0] == Colour.white); } /** Returns the attributes attached to a function $(D func). Example: -------------------- alias FunctionAttribute FA; // shorten the enum name real func(real x) pure nothrow @safe { return x; } static assert(functionAttributes!func & FA.pure_); static assert(functionAttributes!func & FA.safe); static assert(!(functionAttributes!func & FA.trusted)); // not @trusted -------------------- */ enum FunctionAttribute : uint { /** * These flags can be bitwise OR-ed together to represent complex attribute. */ none = 0, /// ditto pure_ = 0b00000001, /// ditto nothrow_ = 0b00000010, /// ditto ref_ = 0b00000100, /// ditto property = 0b00001000, /// ditto trusted = 0b00010000, /// ditto safe = 0b00100000, /// ditto } /// ditto template functionAttributes(func...) if (func.length == 1 && isCallable!func) { alias Unqual!(FunctionTypeOf!func) Func; enum uint functionAttributes = demangleFunctionAttributes(mangledName!Func[1 .. $]).value; } unittest { alias FunctionAttribute FA; interface Set { int pureF() pure; int nothrowF() nothrow; ref int refF(); int propertyF() @property; int trustedF() @trusted; int safeF() @safe; } static assert(functionAttributes!(Set.pureF) == FA.pure_); static assert(functionAttributes!(Set.nothrowF) == FA.nothrow_); static assert(functionAttributes!(Set.refF) == FA.ref_); static assert(functionAttributes!(Set.propertyF) == FA.property); static assert(functionAttributes!(Set.trustedF) == FA.trusted); static assert(functionAttributes!(Set.safeF) == FA.safe); static assert(!(functionAttributes!(Set.safeF) & FA.trusted)); int pure_nothrow() pure nothrow { return 0; } static ref int static_ref_property() @property { return *(new int); } ref int ref_property() @property { return *(new int); } void safe_nothrow() @safe nothrow { } static assert(functionAttributes!pure_nothrow == (FA.pure_ | FA.nothrow_)); static assert(functionAttributes!static_ref_property == (FA.ref_ | FA.property)); static assert(functionAttributes!ref_property == (FA.ref_ | FA.property)); static assert(functionAttributes!safe_nothrow == (FA.safe | FA.nothrow_)); interface Test2 { int pure_const() pure const; int pure_sharedconst() pure shared const; } static assert(functionAttributes!(Test2.pure_const) == FA.pure_); static assert(functionAttributes!(Test2.pure_sharedconst) == FA.pure_); static assert(functionAttributes!((int a) {}) == (FA.safe | FA.pure_ | FA.nothrow_)); auto safeDel = delegate() @safe {}; static assert(functionAttributes!safeDel == (FA.safe | FA.pure_ | FA.nothrow_)); auto trustedDel = delegate() @trusted {}; static assert(functionAttributes!trustedDel == (FA.trusted | FA.pure_ | FA.nothrow_)); auto systemDel = delegate() @system {}; static assert(functionAttributes!systemDel == (FA.pure_ | FA.nothrow_)); } /** $(D true) if $(D func) is $(D @safe) or $(D @trusted). Example: -------------------- @safe int add(int a, int b) {return a+b;} @trusted int sub(int a, int b) {return a-b;} @system int mul(int a, int b) {return a*b;} static assert( isSafe!add); static assert( isSafe!sub); static assert(!isSafe!mul); -------------------- */ template isSafe(alias func) if(isCallable!func) { enum isSafe = (functionAttributes!func & FunctionAttribute.safe) != 0 || (functionAttributes!func & FunctionAttribute.trusted) != 0; } //Verify Examples. unittest { @safe int add(int a, int b) {return a+b;} @trusted int sub(int a, int b) {return a-b;} @system int mul(int a, int b) {return a*b;} static assert( isSafe!add); static assert( isSafe!sub); static assert(!isSafe!mul); } unittest { //Member functions interface Set { int systemF() @system; int trustedF() @trusted; int safeF() @safe; } static assert( isSafe!(Set.safeF)); static assert( isSafe!(Set.trustedF)); static assert(!isSafe!(Set.systemF)); //Functions @safe static safeFunc() {} @trusted static trustedFunc() {} @system static systemFunc() {} static assert( isSafe!safeFunc); static assert( isSafe!trustedFunc); static assert(!isSafe!systemFunc); //Delegates auto safeDel = delegate() @safe {}; auto trustedDel = delegate() @trusted {}; auto systemDel = delegate() @system {}; static assert( isSafe!safeDel); static assert( isSafe!trustedDel); static assert(!isSafe!systemDel); //Lambdas static assert( isSafe!({safeDel();})); static assert( isSafe!({trustedDel();})); static assert(!isSafe!({systemDel();})); //Static opCall struct SafeStatic { @safe static SafeStatic opCall() { return SafeStatic.init; } } struct TrustedStatic { @trusted static TrustedStatic opCall() { return TrustedStatic.init; } } struct SystemStatic { @system static SystemStatic opCall() { return SystemStatic.init; } } static assert( isSafe!(SafeStatic())); static assert( isSafe!(TrustedStatic())); static assert(!isSafe!(SystemStatic())); //Non-static opCall struct Safe { @safe Safe opCall() { return Safe.init; } } struct Trusted { @trusted Trusted opCall() { return Trusted.init; } } struct System { @system System opCall() { return System.init; } } static assert( isSafe!(Safe.init())); static assert( isSafe!(Trusted.init())); static assert(!isSafe!(System.init())); } /** $(D true) if $(D func) is $(D @system). Example: -------------------- @safe int add(int a, int b) {return a+b;} @trusted int sub(int a, int b) {return a-b;} @system int mul(int a, int b) {return a*b;} static assert(!isUnsafe!add); static assert(!isUnsafe!sub); static assert( isUnsafe!mul); -------------------- */ template isUnsafe(alias func) { enum isUnsafe = !isSafe!func; } //Verify Examples. unittest { @safe int add(int a, int b) {return a+b;} @trusted int sub(int a, int b) {return a-b;} @system int mul(int a, int b) {return a*b;} static assert(!isUnsafe!add); static assert(!isUnsafe!sub); static assert( isUnsafe!mul); } unittest { //Member functions interface Set { int systemF() @system; int trustedF() @trusted; int safeF() @safe; } static assert(!isUnsafe!(Set.safeF)); static assert(!isUnsafe!(Set.trustedF)); static assert( isUnsafe!(Set.systemF)); //Functions @safe static safeFunc() {} @trusted static trustedFunc() {} @system static systemFunc() {} static assert(!isUnsafe!safeFunc); static assert(!isUnsafe!trustedFunc); static assert( isUnsafe!systemFunc); //Delegates auto safeDel = delegate() @safe {}; auto trustedDel = delegate() @trusted {}; auto systemDel = delegate() @system {}; static assert(!isUnsafe!safeDel); static assert(!isUnsafe!trustedDel); static assert( isUnsafe!systemDel); //Lambdas static assert(!isUnsafe!({safeDel();})); static assert(!isUnsafe!({trustedDel();})); static assert( isUnsafe!({systemDel();})); //Static opCall struct SafeStatic { @safe static SafeStatic opCall() { return SafeStatic.init; } } struct TrustedStatic { @trusted static TrustedStatic opCall() { return TrustedStatic.init; } } struct SystemStatic { @system static SystemStatic opCall() { return SystemStatic.init; } } static assert(!isUnsafe!(SafeStatic())); static assert(!isUnsafe!(TrustedStatic())); static assert( isUnsafe!(SystemStatic())); //Non-static opCall struct Safe { @safe Safe opCall() { return Safe.init; } } struct Trusted { @trusted Trusted opCall() { return Trusted.init; } } struct System { @system System opCall() { return System.init; } } static assert(!isUnsafe!(Safe.init())); static assert(!isUnsafe!(Trusted.init())); static assert( isUnsafe!(System.init())); } /** $(RED Scheduled for deprecation in January 2013. It's badly named and provides redundant functionality. It was also badly broken prior to 2.060 (bug# 8362), so any code which uses it probably needs to be changed anyway. Please use $(D allSatisfy(isSafe, ...)) instead.) $(D true) all functions are $(D isSafe). Example: -------------------- @safe int add(int a, int b) {return a+b;} @trusted int sub(int a, int b) {return a-b;} @system int mul(int a, int b) {return a*b;} static assert( areAllSafe!(add, add)); static assert( areAllSafe!(add, sub)); static assert(!areAllSafe!(sub, mul)); -------------------- */ template areAllSafe(funcs...) if (funcs.length > 0) { static if (funcs.length == 1) { enum areAllSafe = isSafe!(funcs[0]); } else static if (isSafe!(funcs[0])) { enum areAllSafe = areAllSafe!(funcs[1..$]); } else { enum areAllSafe = false; } } //Verify Example unittest { @safe int add(int a, int b) {return a+b;} @trusted int sub(int a, int b) {return a-b;} @system int mul(int a, int b) {return a*b;} static assert( areAllSafe!(add, add)); static assert( areAllSafe!(add, sub)); static assert(!areAllSafe!(sub, mul)); } unittest { interface Set { int systemF() @system; int trustedF() @trusted; int safeF() @safe; } static assert( areAllSafe!((int a){}, Set.safeF)); static assert( areAllSafe!((int a){}, Set.safeF, Set.trustedF)); static assert(!areAllSafe!(Set.trustedF, Set.systemF)); } /** Returns the calling convention of function as a string. Example: -------------------- string a = functionLinkage!(writeln!(string, int)); assert(a == "D"); // extern(D) auto fp = &printf; string b = functionLinkage!fp; assert(b == "C"); // extern(C) -------------------- */ template functionLinkage(func...) if (func.length == 1 && isCallable!func) { alias Unqual!(FunctionTypeOf!func) Func; enum string functionLinkage = [ 'F': "D", 'U': "C", 'W': "Windows", 'V': "Pascal", 'R': "C++" ][ mangledName!Func[0] ]; } unittest { extern(D) void Dfunc() {} extern(C) void Cfunc() {} static assert(functionLinkage!Dfunc == "D"); static assert(functionLinkage!Cfunc == "C"); interface Test { void const_func() const; void sharedconst_func() shared const; } static assert(functionLinkage!(Test.const_func) == "D"); static assert(functionLinkage!(Test.sharedconst_func) == "D"); static assert(functionLinkage!((int a){}) == "D"); } /** Determines what kind of variadic parameters function has. Example: -------------------- void func() {} static assert(variadicFunctionStyle!func == Variadic.no); extern(C) int printf(in char*, ...); static assert(variadicFunctionStyle!printf == Variadic.c); -------------------- */ enum Variadic { no, /// Function is not variadic. c, /// Function is a _C-style variadic function. /// Function is a _D-style variadic function, which uses d, /// __argptr and __arguments. typesafe, /// Function is a typesafe variadic function. } /// ditto template variadicFunctionStyle(func...) if (func.length == 1 && isCallable!func) { alias Unqual!(FunctionTypeOf!func) Func; // TypeFuncion --> CallConvention FuncAttrs Arguments ArgClose Type enum callconv = functionLinkage!Func; enum mfunc = mangledName!Func; enum mtype = mangledName!(ReturnType!Func); static assert(mfunc[$ - mtype.length .. $] == mtype, mfunc ~ "|" ~ mtype); enum argclose = mfunc[$ - mtype.length - 1]; static assert(argclose >= 'X' && argclose <= 'Z'); enum Variadic variadicFunctionStyle = argclose == 'X' ? Variadic.typesafe : argclose == 'Y' ? (callconv == "C") ? Variadic.c : Variadic.d : Variadic.no; // 'Z' } unittest { extern(D) void novar() {} extern(C) void cstyle(int, ...) {} extern(D) void dstyle(...) {} extern(D) void typesafe(int[]...) {} static assert(variadicFunctionStyle!novar == Variadic.no); static assert(variadicFunctionStyle!cstyle == Variadic.c); static assert(variadicFunctionStyle!dstyle == Variadic.d); static assert(variadicFunctionStyle!typesafe == Variadic.typesafe); static assert(variadicFunctionStyle!((int[] a...) {}) == Variadic.typesafe); } /** Get the function type from a callable object $(D func). Using builtin $(D typeof) on a property function yields the types of the property value, not of the property function itself. Still, $(D FunctionTypeOf) is able to obtain function types of properties. -------------------- class C { int value() @property; } static assert(is( typeof(C.value) == int )); static assert(is( FunctionTypeOf!(C.value) == function )); -------------------- Note: Do not confuse function types with function pointer types; function types are usually used for compile-time reflection purposes. */ template FunctionTypeOf(func...) if (func.length == 1 && isCallable!func) { static if (is(typeof(& func[0]) Fsym : Fsym*) && is(Fsym == function) || is(typeof(& func[0]) Fsym == delegate)) { alias Fsym FunctionTypeOf; // HIT: (nested) function symbol } else static if (is(typeof(& func[0].opCall) Fobj == delegate)) { alias Fobj FunctionTypeOf; // HIT: callable object } else static if (is(typeof(& func[0].opCall) Ftyp : Ftyp*) && is(Ftyp == function)) { alias Ftyp FunctionTypeOf; // HIT: callable type } else static if (is(func[0] T) || is(typeof(func[0]) T)) { static if (is(T == function)) alias T FunctionTypeOf; // HIT: function else static if (is(T Fptr : Fptr*) && is(Fptr == function)) alias Fptr FunctionTypeOf; // HIT: function pointer else static if (is(T Fdlg == delegate)) alias Fdlg FunctionTypeOf; // HIT: delegate else static assert(0); } else static assert(0); } unittest { int test(int a) { return 0; } int propGet() @property { return 0; } int propSet(int a) @property { return 0; } int function(int) test_fp; int delegate(int) test_dg; static assert(is( typeof(test) == FunctionTypeOf!(typeof(test)) )); static assert(is( typeof(test) == FunctionTypeOf!test )); static assert(is( typeof(test) == FunctionTypeOf!test_fp )); static assert(is( typeof(test) == FunctionTypeOf!test_dg )); alias int GetterType() @property; alias int SetterType(int) @property; static assert(is( FunctionTypeOf!propGet == GetterType )); static assert(is( FunctionTypeOf!propSet == SetterType )); interface Prop { int prop() @property; } Prop prop; static assert(is( FunctionTypeOf!(Prop.prop) == GetterType )); static assert(is( FunctionTypeOf!(prop.prop) == GetterType )); class Callable { int opCall(int) { return 0; } } auto call = new Callable; static assert(is( FunctionTypeOf!call == typeof(test) )); struct StaticCallable { static int opCall(int) { return 0; } } StaticCallable stcall_val; StaticCallable* stcall_ptr; static assert(is( FunctionTypeOf!stcall_val == typeof(test) )); static assert(is( FunctionTypeOf!stcall_ptr == typeof(test) )); interface Overloads { void test(string); real test(real); int test(); int test() @property; } alias TypeTuple!(__traits(getVirtualFunctions, Overloads, "test")) ov; alias FunctionTypeOf!(ov[0]) F_ov0; alias FunctionTypeOf!(ov[1]) F_ov1; alias FunctionTypeOf!(ov[2]) F_ov2; alias FunctionTypeOf!(ov[3]) F_ov3; static assert(is(F_ov0* == void function(string))); static assert(is(F_ov1* == real function(real))); static assert(is(F_ov2* == int function())); static assert(is(F_ov3* == int function() @property)); alias FunctionTypeOf!((int a){ return a; }) F_dglit; static assert(is(F_dglit* : int function(int))); } /** * Constructs a new function or delegate type with the same basic signature * as the given one, but different attributes (including linkage). * * This is especially useful for adding/removing attributes from/to types in * generic code, where the actual type name cannot be spelt out. * * Params: * T = The base type. * linkage = The desired linkage of the result type. * attrs = The desired $(LREF FunctionAttribute)s of the result type. * * Examples: * --- * template ExternC(T) * if (isFunctionPointer!T || isDelegate!T || is(T == function)) * { * alias SetFunctionAttributes!(T, "C", functionAttributes!T) ExternC; * } * --- * * --- * auto assumePure(T)(T t) * if (isFunctionPointer!T || isDelegate!T) * { * enum attrs = functionAttributes!T | FunctionAttribute.pure_; * return cast(SetFunctionAttributes!(T, functionLinkage!T, attrs)) t; * } * --- */ template SetFunctionAttributes(T, string linkage, uint attrs) if (isFunctionPointer!T || isDelegate!T) { mixin({ static assert(!(attrs & FunctionAttribute.trusted) || !(attrs & FunctionAttribute.safe), "Cannot have a function/delegate that is both trusted and safe."); enum linkages = ["D", "C", "Windows", "Pascal", "C++", "System"]; static assert(canFind(linkages, linkage), "Invalid linkage '" ~ linkage ~ "', must be one of " ~ linkages.stringof ~ "."); string result = "alias "; static if (linkage != "D") result ~= "extern(" ~ linkage ~ ") "; static if (attrs & FunctionAttribute.ref_) result ~= "ref "; result ~= "ReturnType!T"; static if (isDelegate!T) result ~= " delegate"; else result ~= " function"; result ~= "("; static if (ParameterTypeTuple!T.length > 0) result ~= "ParameterTypeTuple!T"; enum varStyle = variadicFunctionStyle!T; static if (varStyle == Variadic.c) result ~= ", ..."; else static if (varStyle == Variadic.d) result ~= "..."; else static if (varStyle == Variadic.typesafe) result ~= "..."; result ~= ")"; static if (attrs & FunctionAttribute.pure_) result ~= " pure"; static if (attrs & FunctionAttribute.nothrow_) result ~= " nothrow"; static if (attrs & FunctionAttribute.property) result ~= " @property"; static if (attrs & FunctionAttribute.trusted) result ~= " @trusted"; static if (attrs & FunctionAttribute.safe) result ~= " @safe"; result ~= " SetFunctionAttributes;"; return result; }()); } /// Ditto template SetFunctionAttributes(T, string linkage, uint attrs) if (is(T == function)) { // To avoid a lot of syntactic headaches, we just use the above version to // operate on the corresponding function pointer type and then remove the // indirection again. alias FunctionTypeOf!(SetFunctionAttributes!(T*, linkage, attrs)) SetFunctionAttributes; } version (unittest) { // Some function types to test. int sc(scope int, ref int, out int, lazy int, int); extern(System) int novar(); extern(C) int cstyle(int, ...); extern(D) int dstyle(...); extern(D) int typesafe(int[]...); } unittest { alias FunctionAttribute FA; foreach (BaseT; TypeTuple!(typeof(&sc), typeof(&novar), typeof(&cstyle), typeof(&dstyle), typeof(&typesafe))) { foreach (T; TypeTuple!(BaseT, FunctionTypeOf!BaseT)) { enum linkage = functionLinkage!T; enum attrs = functionAttributes!T; static assert(is(SetFunctionAttributes!(T, linkage, attrs) == T), "Identity check failed for: " ~ T.stringof); // Check that all linkage types work (D-style variadics require D linkage). static if (variadicFunctionStyle!T != Variadic.d) { foreach (newLinkage; TypeTuple!("D", "C", "Windows", "Pascal", "C++")) { alias SetFunctionAttributes!(T, newLinkage, attrs) New; static assert(functionLinkage!New == newLinkage, "Linkage test failed for: " ~ T.stringof ~ ", " ~ newLinkage ~ " (got " ~ New.stringof ~ ")"); } } // Add @safe. alias SetFunctionAttributes!(T, functionLinkage!T, FA.safe) T1; static assert(functionAttributes!T1 == FA.safe); // Add all known attributes, excluding conflicting ones. enum allAttrs = reduce!"a | b"([EnumMembers!FA]) & ~FA.safe & ~FA.property; alias SetFunctionAttributes!(T1, functionLinkage!T, allAttrs) T2; static assert(functionAttributes!T2 == allAttrs); // Strip all attributes again. alias SetFunctionAttributes!(T2, functionLinkage!T, FA.none) T3; static assert(is(T3 == T)); } } } //:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::// // Aggregate Types //:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::// /*** * Get the types of the fields of a struct or class. * This consists of the fields that take up memory space, * excluding the hidden fields like the virtual function * table pointer. */ template FieldTypeTuple(S) { static if (is(S == struct) || is(S == class) || is(S == union)) alias typeof(S.tupleof) FieldTypeTuple; else alias TypeTuple!S FieldTypeTuple; //static assert(0, "argument is not struct or class"); } // // FieldOffsetsTuple // private template FieldOffsetsTupleImpl(size_t n, T...) // { // static if (T.length == 0) // { // alias TypeTuple!() Result; // } // else // { // //private alias FieldTypeTuple!(T[0]) Types; // private enum size_t myOffset = // ((n + T[0].alignof - 1) / T[0].alignof) * T[0].alignof; // static if (is(T[0] == struct)) // { // alias FieldTypeTuple!(T[0]) MyRep; // alias FieldOffsetsTupleImpl!(myOffset, MyRep, T[1 .. $]).Result // Result; // } // else // { // private enum size_t mySize = T[0].sizeof; // alias TypeTuple!myOffset Head; // static if (is(T == union)) // { // alias FieldOffsetsTupleImpl!(myOffset, T[1 .. $]).Result // Tail; // } // else // { // alias FieldOffsetsTupleImpl!(myOffset + mySize, // T[1 .. $]).Result // Tail; // } // alias TypeTuple!(Head, Tail) Result; // } // } // } // template FieldOffsetsTuple(T...) // { // alias FieldOffsetsTupleImpl!(0, T).Result FieldOffsetsTuple; // } // unittest // { // alias FieldOffsetsTuple!int T1; // assert(T1.length == 1 && T1[0] == 0); // // // struct S2 { char a; int b; char c; double d; char e, f; } // alias FieldOffsetsTuple!S2 T2; // //pragma(msg, T2); // static assert(T2.length == 6 // && T2[0] == 0 && T2[1] == 4 && T2[2] == 8 && T2[3] == 16 // && T2[4] == 24&& T2[5] == 25); // // // class C { int a, b, c, d; } // struct S3 { char a; C b; char c; } // alias FieldOffsetsTuple!S3 T3; // //pragma(msg, T2); // static assert(T3.length == 3 // && T3[0] == 0 && T3[1] == 4 && T3[2] == 8); // // // struct S4 { char a; union { int b; char c; } int d; } // alias FieldOffsetsTuple!S4 T4; // //pragma(msg, FieldTypeTuple!S4); // static assert(T4.length == 4 // && T4[0] == 0 && T4[1] == 4 && T4[2] == 8); // } // /*** // Get the offsets of the fields of a struct or class. // */ // template FieldOffsetsTuple(S) // { // static if (is(S == struct) || is(S == class)) // alias typeof(S.tupleof) FieldTypeTuple; // else // static assert(0, "argument is not struct or class"); // } /*** Get the primitive types of the fields of a struct or class, in topological order. Example: ---- struct S1 { int a; float b; } struct S2 { char[] a; union { S1 b; S1 * c; } } alias RepresentationTypeTuple!S2 R; assert(R.length == 4 && is(R[0] == char[]) && is(R[1] == int) && is(R[2] == float) && is(R[3] == S1*)); ---- */ template RepresentationTypeTuple(T) { template Impl(T...) { static if (T.length == 0) { alias TypeTuple!() Impl; } else { static if (is(T[0] R: Rebindable!R)) { alias Impl!(Impl!R, T[1 .. $]) Impl; } else static if (is(T[0] == struct) || is(T[0] == union)) { // @@@BUG@@@ this should work // alias .RepresentationTypes!(T[0].tupleof) // RepresentationTypes; alias Impl!(FieldTypeTuple!(T[0]), T[1 .. $]) Impl; } else static if (is(T[0] U == typedef)) { alias Impl!(FieldTypeTuple!U, T[1 .. $]) Impl; } else { alias TypeTuple!(T[0], Impl!(T[1 .. $])) Impl; } } } static if (is(T == struct) || is(T == union) || is(T == class)) { alias Impl!(FieldTypeTuple!T) RepresentationTypeTuple; } else static if (is(T U == typedef)) { alias RepresentationTypeTuple!U RepresentationTypeTuple; } else { alias Impl!T RepresentationTypeTuple; } } unittest { alias RepresentationTypeTuple!int S1; static assert(is(S1 == TypeTuple!int)); struct S2 { int a; } struct S3 { int a; char b; } struct S4 { S1 a; int b; S3 c; } static assert(is(RepresentationTypeTuple!S2 == TypeTuple!int)); static assert(is(RepresentationTypeTuple!S3 == TypeTuple!(int, char))); static assert(is(RepresentationTypeTuple!S4 == TypeTuple!(int, int, int, char))); struct S11 { int a; float b; } struct S21 { char[] a; union { S11 b; S11 * c; } } alias RepresentationTypeTuple!S21 R; assert(R.length == 4 && is(R[0] == char[]) && is(R[1] == int) && is(R[2] == float) && is(R[3] == S11*)); class C { int a; float b; } alias RepresentationTypeTuple!C R1; static assert(R1.length == 2 && is(R1[0] == int) && is(R1[1] == float)); /* Issue 6642 */ struct S5 { int a; Rebindable!(immutable Object) b; } alias RepresentationTypeTuple!S5 R2; static assert(R2.length == 2 && is(R2[0] == int) && is(R2[1] == immutable(Object))); } /* RepresentationOffsets */ // private template Repeat(size_t n, T...) // { // static if (n == 0) alias TypeTuple!() Repeat; // else alias TypeTuple!(T, Repeat!(n - 1, T)) Repeat; // } // template RepresentationOffsetsImpl(size_t n, T...) // { // static if (T.length == 0) // { // alias TypeTuple!() Result; // } // else // { // private enum size_t myOffset = // ((n + T[0].alignof - 1) / T[0].alignof) * T[0].alignof; // static if (!is(T[0] == union)) // { // alias Repeat!(n, FieldTypeTuple!(T[0])).Result // Head; // } // static if (is(T[0] == struct)) // { // alias .RepresentationOffsetsImpl!(n, FieldTypeTuple!(T[0])).Result // Head; // } // else // { // alias TypeTuple!myOffset Head; // } // alias TypeTuple!(Head, // RepresentationOffsetsImpl!( // myOffset + T[0].sizeof, T[1 .. $]).Result) // Result; // } // } // template RepresentationOffsets(T) // { // alias RepresentationOffsetsImpl!(0, T).Result // RepresentationOffsets; // } // unittest // { // struct S1 { char c; int i; } // alias RepresentationOffsets!S1 Offsets; // static assert(Offsets[0] == 0); // //pragma(msg, Offsets[1]); // static assert(Offsets[1] == 4); // } /* Statically evaluates to $(D true) if and only if $(D T)'s representation contains at least one field of pointer or array type. Members of class types are not considered raw pointers. Pointers to immutable objects are not considered raw aliasing. Example: --- // simple types static assert(!hasRawAliasing!int); static assert( hasRawAliasing!(char*)); // references aren't raw pointers static assert(!hasRawAliasing!Object); // built-in arrays do contain raw pointers static assert( hasRawAliasing!(int[])); // aggregate of simple types struct S1 { int a; double b; } static assert(!hasRawAliasing!S1); // indirect aggregation struct S2 { S1 a; double b; } static assert(!hasRawAliasing!S2); // struct with a pointer member struct S3 { int a; double * b; } static assert( hasRawAliasing!S3); // struct with an indirect pointer member struct S4 { S3 a; double b; } static assert( hasRawAliasing!S4); ---- */ private template hasRawAliasing(T...) { template Impl(T...) { static if (T.length == 0) { enum Impl = false; } else { static if (is(T[0] foo : U*, U) && !isFunctionPointer!(T[0])) enum has = !is(U == immutable); else static if (is(T[0] foo : U[], U) && !isStaticArray!(T[0])) enum has = !is(U == immutable); else static if (isAssociativeArray!(T[0])) enum has = !is(T[0] == immutable); else enum has = false; enum Impl = has || Impl!(T[1 .. $]); } } enum hasRawAliasing = Impl!(RepresentationTypeTuple!T); } unittest { // simple types static assert(!hasRawAliasing!int); static assert( hasRawAliasing!(char*)); // references aren't raw pointers static assert(!hasRawAliasing!Object); static assert(!hasRawAliasing!int); struct S1 { int z; } struct S2 { int* z; } static assert(!hasRawAliasing!S1); static assert( hasRawAliasing!S2); struct S3 { int a; int* z; int c; } struct S4 { int a; int z; int c; } struct S5 { int a; Object z; int c; } static assert( hasRawAliasing!S3); static assert(!hasRawAliasing!S4); static assert(!hasRawAliasing!S5); union S6 { int a; int b; } union S7 { int a; int * b; } static assert(!hasRawAliasing!S6); static assert( hasRawAliasing!S7); static assert(!hasRawAliasing!(void delegate())); static assert(!hasRawAliasing!(void delegate() const)); static assert(!hasRawAliasing!(void delegate() immutable)); static assert(!hasRawAliasing!(void delegate() shared)); static assert(!hasRawAliasing!(void delegate() shared const)); static assert(!hasRawAliasing!(const(void delegate()))); static assert(!hasRawAliasing!(immutable(void delegate()))); struct S8 { void delegate() a; int b; Object c; } class S12 { typeof(S8.tupleof) a; } class S13 { typeof(S8.tupleof) a; int* b; } static assert(!hasRawAliasing!S8); static assert(!hasRawAliasing!S12); static assert( hasRawAliasing!S13); //typedef int* S8; //static assert(hasRawAliasing!S8); enum S9 { a } static assert(!hasRawAliasing!S9); // indirect members struct S10 { S7 a; int b; } struct S11 { S6 a; int b; } static assert( hasRawAliasing!S10); static assert(!hasRawAliasing!S11); static assert( hasRawAliasing!(int[string])); static assert(!hasRawAliasing!(immutable(int[string]))); } /* Statically evaluates to $(D true) if and only if $(D T)'s representation contains at least one non-shared field of pointer or array type. Members of class types are not considered raw pointers. Pointers to immutable objects are not considered raw aliasing. Example: --- // simple types static assert(!hasRawLocalAliasing!int); static assert( hasRawLocalAliasing!(char*)); static assert(!hasRawLocalAliasing!(shared char*)); // references aren't raw pointers static assert(!hasRawLocalAliasing!Object); // built-in arrays do contain raw pointers static assert( hasRawLocalAliasing!(int[])); static assert(!hasRawLocalAliasing!(shared int[])); // aggregate of simple types struct S1 { int a; double b; } static assert(!hasRawLocalAliasing!S1); // indirect aggregation struct S2 { S1 a; double b; } static assert(!hasRawLocalAliasing!S2); // struct with a pointer member struct S3 { int a; double * b; } static assert( hasRawLocalAliasing!S3); struct S4 { int a; shared double * b; } static assert( hasRawLocalAliasing!S4); // struct with an indirect pointer member struct S5 { S3 a; double b; } static assert( hasRawLocalAliasing!S5); struct S6 { S4 a; double b; } static assert(!hasRawLocalAliasing!S6); ---- */ private template hasRawUnsharedAliasing(T...) { template Impl(T...) { static if (T.length == 0) { enum Impl = false; } else { static if (is(T[0] foo : U*, U) && !isFunctionPointer!(T[0])) enum has = !is(U == immutable) && !is(U == shared); else static if (is(T[0] foo : U[], U) && !isStaticArray!(T[0])) enum has = !is(U == immutable) && !is(U == shared); else static if (isAssociativeArray!(T[0])) enum has = !is(T[0] == immutable) && !is(T[0] == shared); else enum has = false; enum Impl = has || Impl!(T[1 .. $]); } } enum hasRawUnsharedAliasing = Impl!(RepresentationTypeTuple!T); } unittest { // simple types static assert(!hasRawUnsharedAliasing!int); static assert( hasRawUnsharedAliasing!(char*)); static assert(!hasRawUnsharedAliasing!(shared char*)); // references aren't raw pointers static assert(!hasRawUnsharedAliasing!Object); static assert(!hasRawUnsharedAliasing!int); struct S1 { int z; } struct S2 { int* z; } static assert(!hasRawUnsharedAliasing!S1); static assert( hasRawUnsharedAliasing!S2); struct S3 { shared int* z; } struct S4 { int a; int* z; int c; } static assert(!hasRawUnsharedAliasing!S3); static assert( hasRawUnsharedAliasing!S4); struct S5 { int a; shared int* z; int c; } struct S6 { int a; int z; int c; } struct S7 { int a; Object z; int c; } static assert(!hasRawUnsharedAliasing!S5); static assert(!hasRawUnsharedAliasing!S6); static assert(!hasRawUnsharedAliasing!S7); union S8 { int a; int b; } union S9 { int a; int* b; } union S10 { int a; shared int* b; } static assert(!hasRawUnsharedAliasing!S8); static assert( hasRawUnsharedAliasing!S9); static assert(!hasRawUnsharedAliasing!S10); static assert(!hasRawUnsharedAliasing!(void delegate())); static assert(!hasRawUnsharedAliasing!(void delegate() const)); static assert(!hasRawUnsharedAliasing!(void delegate() immutable)); static assert(!hasRawUnsharedAliasing!(void delegate() shared)); static assert(!hasRawUnsharedAliasing!(void delegate() shared const)); static assert(!hasRawUnsharedAliasing!(const(void delegate()))); static assert(!hasRawUnsharedAliasing!(const(void delegate() const))); static assert(!hasRawUnsharedAliasing!(const(void delegate() immutable))); static assert(!hasRawUnsharedAliasing!(const(void delegate() shared))); static assert(!hasRawUnsharedAliasing!(const(void delegate() shared const))); static assert(!hasRawUnsharedAliasing!(immutable(void delegate()))); static assert(!hasRawUnsharedAliasing!(immutable(void delegate() const))); static assert(!hasRawUnsharedAliasing!(immutable(void delegate() immutable))); static assert(!hasRawUnsharedAliasing!(immutable(void delegate() shared))); static assert(!hasRawUnsharedAliasing!(immutable(void delegate() shared const))); static assert(!hasRawUnsharedAliasing!(shared(void delegate()))); static assert(!hasRawUnsharedAliasing!(shared(void delegate() const))); static assert(!hasRawUnsharedAliasing!(shared(void delegate() immutable))); static assert(!hasRawUnsharedAliasing!(shared(void delegate() shared))); static assert(!hasRawUnsharedAliasing!(shared(void delegate() shared const))); static assert(!hasRawUnsharedAliasing!(shared(const(void delegate())))); static assert(!hasRawUnsharedAliasing!(shared(const(void delegate() const)))); static assert(!hasRawUnsharedAliasing!(shared(const(void delegate() immutable)))); static assert(!hasRawUnsharedAliasing!(shared(const(void delegate() shared)))); static assert(!hasRawUnsharedAliasing!(shared(const(void delegate() shared const)))); static assert(!hasRawUnsharedAliasing!(void function())); //typedef int* S11; //typedef shared int* S12; //static assert( hasRawUnsharedAliasing!S11); //static assert( hasRawUnsharedAliasing!S12); enum S13 { a } static assert(!hasRawUnsharedAliasing!S13); // indirect members struct S14 { S9 a; int b; } struct S15 { S10 a; int b; } struct S16 { S6 a; int b; } static assert( hasRawUnsharedAliasing!S14); static assert(!hasRawUnsharedAliasing!S15); static assert(!hasRawUnsharedAliasing!S16); static assert( hasRawUnsharedAliasing!(int[string])); static assert(!hasRawUnsharedAliasing!(shared(int[string]))); static assert(!hasRawUnsharedAliasing!(immutable(int[string]))); struct S17 { void delegate() shared a; void delegate() immutable b; void delegate() shared const c; shared(void delegate()) d; shared(void delegate() shared) e; shared(void delegate() immutable) f; shared(void delegate() shared const) g; immutable(void delegate()) h; immutable(void delegate() shared) i; immutable(void delegate() immutable) j; immutable(void delegate() shared const) k; shared(const(void delegate())) l; shared(const(void delegate() shared)) m; shared(const(void delegate() immutable)) n; shared(const(void delegate() shared const)) o; } struct S18 { typeof(S17.tupleof) a; void delegate() p; } struct S19 { typeof(S17.tupleof) a; Object p; } struct S20 { typeof(S17.tupleof) a; int* p; } class S21 { typeof(S17.tupleof) a; } class S22 { typeof(S17.tupleof) a; void delegate() p; } class S23 { typeof(S17.tupleof) a; Object p; } class S24 { typeof(S17.tupleof) a; int* p; } static assert(!hasRawUnsharedAliasing!S17); static assert(!hasRawUnsharedAliasing!(immutable(S17))); static assert(!hasRawUnsharedAliasing!(shared(S17))); static assert(!hasRawUnsharedAliasing!S18); static assert(!hasRawUnsharedAliasing!(immutable(S18))); static assert(!hasRawUnsharedAliasing!(shared(S18))); static assert(!hasRawUnsharedAliasing!S19); static assert(!hasRawUnsharedAliasing!(immutable(S19))); static assert(!hasRawUnsharedAliasing!(shared(S19))); static assert( hasRawUnsharedAliasing!S20); static assert(!hasRawUnsharedAliasing!(immutable(S20))); static assert(!hasRawUnsharedAliasing!(shared(S20))); static assert(!hasRawUnsharedAliasing!S21); static assert(!hasRawUnsharedAliasing!(immutable(S21))); static assert(!hasRawUnsharedAliasing!(shared(S21))); static assert(!hasRawUnsharedAliasing!S22); static assert(!hasRawUnsharedAliasing!(immutable(S22))); static assert(!hasRawUnsharedAliasing!(shared(S22))); static assert(!hasRawUnsharedAliasing!S23); static assert(!hasRawUnsharedAliasing!(immutable(S23))); static assert(!hasRawUnsharedAliasing!(shared(S23))); static assert( hasRawUnsharedAliasing!S24); static assert(!hasRawUnsharedAliasing!(immutable(S24))); static assert(!hasRawUnsharedAliasing!(shared(S24))); struct S25 {} class S26 {} interface S27 {} union S28 {} static assert(!hasRawUnsharedAliasing!S25); static assert(!hasRawUnsharedAliasing!S26); static assert(!hasRawUnsharedAliasing!S27); static assert(!hasRawUnsharedAliasing!S28); } /* Statically evaluates to $(D true) if and only if $(D T)'s representation includes at least one non-immutable object reference. */ private template hasObjects(T...) { static if (T.length == 0) { enum hasObjects = false; } else static if (is(T[0] U == typedef)) { enum hasObjects = hasObjects!(U, T[1 .. $]); } else static if (is(T[0] == struct)) { enum hasObjects = hasObjects!( RepresentationTypeTuple!(T[0]), T[1 .. $]); } else { enum hasObjects = ((is(T[0] == class) || is(T[0] == interface)) && !is(T[0] == immutable)) || hasObjects!(T[1 .. $]); } } /* Statically evaluates to $(D true) if and only if $(D T)'s representation includes at least one non-immutable non-shared object reference. */ private template hasUnsharedObjects(T...) { static if (T.length == 0) { enum hasUnsharedObjects = false; } else static if (is(T[0] U == typedef)) { enum hasUnsharedObjects = hasUnsharedObjects!(U, T[1 .. $]); } else static if (is(T[0] == struct)) { enum hasUnsharedObjects = hasUnsharedObjects!( RepresentationTypeTuple!(T[0]), T[1 .. $]); } else { enum hasUnsharedObjects = ((is(T[0] == class) || is(T[0] == interface)) && !is(T[0] == immutable) && !is(T[0] == shared)) || hasUnsharedObjects!(T[1 .. $]); } } /** Returns $(D true) if and only if $(D T)'s representation includes at least one of the following: $(OL $(LI a raw pointer $(D U*) and $(D U) is not immutable;) $(LI an array $(D U[]) and $(D U) is not immutable;) $(LI a reference to a class or interface type $(D C) and $(D C) is not immutable.) $(LI an associative array that is not immutable.) $(LI a delegate.)) */ template hasAliasing(T...) { template isAliasingDelegate(T) { enum isAliasingDelegate = isDelegate!T && !is(T == immutable) && !is(FunctionTypeOf!T == immutable); } enum hasAliasing = hasRawAliasing!T || hasObjects!T || anySatisfy!(isAliasingDelegate, T, RepresentationTypeTuple!T); } // Specialization to special-case std.typecons.Rebindable. template hasAliasing(R : Rebindable!R) { enum hasAliasing = hasAliasing!R; } unittest { struct S1 { int a; Object b; } struct S2 { string a; } struct S3 { int a; immutable Object b; } struct S4 { float[3] vals; } static assert( hasAliasing!S1); static assert(!hasAliasing!S2); static assert(!hasAliasing!S3); static assert(!hasAliasing!S4); static assert( hasAliasing!(uint[uint])); static assert(!hasAliasing!(immutable(uint[uint]))); static assert( hasAliasing!(void delegate())); static assert( hasAliasing!(void delegate() const)); static assert(!hasAliasing!(void delegate() immutable)); static assert( hasAliasing!(void delegate() shared)); static assert( hasAliasing!(void delegate() shared const)); static assert( hasAliasing!(const(void delegate()))); static assert( hasAliasing!(const(void delegate() const))); static assert(!hasAliasing!(const(void delegate() immutable))); static assert( hasAliasing!(const(void delegate() shared))); static assert( hasAliasing!(const(void delegate() shared const))); static assert(!hasAliasing!(immutable(void delegate()))); static assert(!hasAliasing!(immutable(void delegate() const))); static assert(!hasAliasing!(immutable(void delegate() immutable))); static assert(!hasAliasing!(immutable(void delegate() shared))); static assert(!hasAliasing!(immutable(void delegate() shared const))); static assert( hasAliasing!(shared(const(void delegate())))); static assert( hasAliasing!(shared(const(void delegate() const)))); static assert(!hasAliasing!(shared(const(void delegate() immutable)))); static assert( hasAliasing!(shared(const(void delegate() shared)))); static assert( hasAliasing!(shared(const(void delegate() shared const)))); static assert(!hasAliasing!(void function())); interface I; static assert( hasAliasing!I); static assert( hasAliasing!(Rebindable!(const Object))); static assert(!hasAliasing!(Rebindable!(immutable Object))); static assert( hasAliasing!(Rebindable!(shared Object))); static assert( hasAliasing!(Rebindable!Object)); struct S5 { void delegate() immutable b; shared(void delegate() immutable) f; immutable(void delegate() immutable) j; shared(const(void delegate() immutable)) n; } struct S6 { typeof(S5.tupleof) a; void delegate() p; } static assert(!hasAliasing!S5); static assert( hasAliasing!S6); struct S7 { void delegate() a; int b; Object c; } class S8 { int a; int b; } class S9 { typeof(S8.tupleof) a; } class S10 { typeof(S8.tupleof) a; int* b; } static assert( hasAliasing!S7); static assert( hasAliasing!S8); static assert( hasAliasing!S9); static assert( hasAliasing!S10); struct S11 {} class S12 {} interface S13 {} union S14 {} static assert(!hasAliasing!S11); static assert( hasAliasing!S12); static assert( hasAliasing!S13); static assert(!hasAliasing!S14); } /** Returns $(D true) if and only if $(D T)'s representation includes at least one of the following: $(OL $(LI a raw pointer $(D U*);) $(LI an array $(D U[]);) $(LI a reference to a class type $(D C).) $(LI an associative array.) $(LI a delegate.)) */ template hasIndirections(T) { template Impl(T...) { static if (!T.length) { enum Impl = false; } else static if(isFunctionPointer!(T[0])) { enum Impl = Impl!(T[1 .. $]); } else static if(isStaticArray!(T[0])) { static if (is(T[0] _ : void[N], size_t N)) enum Impl = true; else enum Impl = Impl!(T[1 .. $]) || Impl!(RepresentationTypeTuple!(typeof(T[0].init[0]))); } else { enum Impl = isPointer!(T[0]) || isDynamicArray!(T[0]) || is (T[0] : const(Object)) || isAssociativeArray!(T[0]) || isDelegate!(T[0]) || is(T[0] == interface) || Impl!(T[1 .. $]); } } enum hasIndirections = Impl!(T, RepresentationTypeTuple!T); } unittest { static assert( hasIndirections!(int[string])); static assert( hasIndirections!(void delegate())); static assert( hasIndirections!(void delegate() immutable)); static assert( hasIndirections!(immutable(void delegate()))); static assert( hasIndirections!(immutable(void delegate() immutable))); static assert(!hasIndirections!(void function())); static assert( hasIndirections!(void*[1])); static assert(!hasIndirections!(byte[1])); // void static array hides actual type of bits, so "may have indirections". static assert( hasIndirections!(void[1])); interface I; struct S1 {} struct S2 { int a; } struct S3 { int a; int b; } struct S4 { int a; int* b; } struct S5 { int a; Object b; } struct S6 { int a; string b; } struct S7 { int a; immutable Object b; } struct S8 { int a; immutable I b; } struct S9 { int a; void delegate() b; } struct S10 { int a; immutable(void delegate()) b; } struct S11 { int a; void delegate() immutable b; } struct S12 { int a; immutable(void delegate() immutable) b; } class S13 {} class S14 { int a; } class S15 { int a; int b; } class S16 { int a; Object b; } class S17 { string a; } class S18 { int a; immutable Object b; } class S19 { int a; immutable(void delegate() immutable) b; } union S20 {} union S21 { int a; } union S22 { int a; int b; } union S23 { int a; Object b; } union S24 { string a; } union S25 { int a; immutable Object b; } union S26 { int a; immutable(void delegate() immutable) b; } static assert( hasIndirections!I); static assert(!hasIndirections!S1); static assert(!hasIndirections!S2); static assert(!hasIndirections!S3); static assert( hasIndirections!S4); static assert( hasIndirections!S5); static assert( hasIndirections!S6); static assert( hasIndirections!S7); static assert( hasIndirections!S8); static assert( hasIndirections!S9); static assert( hasIndirections!S10); static assert( hasIndirections!S12); static assert( hasIndirections!S13); static assert( hasIndirections!S14); static assert( hasIndirections!S15); static assert( hasIndirections!S16); static assert( hasIndirections!S17); static assert( hasIndirections!S18); static assert( hasIndirections!S19); static assert(!hasIndirections!S20); static assert(!hasIndirections!S21); static assert(!hasIndirections!S22); static assert( hasIndirections!S23); static assert( hasIndirections!S24); static assert( hasIndirections!S25); static assert( hasIndirections!S26); } // These are for backwards compatibility, are intentionally lacking ddoc, // and should eventually be deprecated. alias hasUnsharedAliasing hasLocalAliasing; alias hasRawUnsharedAliasing hasRawLocalAliasing; alias hasUnsharedObjects hasLocalObjects; /** Returns $(D true) if and only if $(D T)'s representation includes at least one of the following: $(OL $(LI a raw pointer $(D U*) and $(D U) is not immutable or shared;) $(LI an array $(D U[]) and $(D U) is not immutable or shared;) $(LI a reference to a class type $(D C) and $(D C) is not immutable or shared.) $(LI an associative array that is not immutable or shared.) $(LI a delegate that is not shared.)) */ template hasUnsharedAliasing(T...) { static if (!T.length) { enum hasUnsharedAliasing = false; } else static if (is(T[0] R: Rebindable!R)) { enum hasUnsharedAliasing = hasUnsharedAliasing!R; } else { template unsharedDelegate(T) { enum bool unsharedDelegate = isDelegate!T && !is(T == shared) && !is(T == shared) && !is(T == immutable) && !is(FunctionTypeOf!T == shared) && !is(FunctionTypeOf!T == immutable); } enum hasUnsharedAliasing = hasRawUnsharedAliasing!(T[0]) || anySatisfy!(unsharedDelegate, RepresentationTypeTuple!(T[0])) || hasUnsharedObjects!(T[0]) || hasUnsharedAliasing!(T[1..$]); } } unittest { struct S1 { int a; Object b; } struct S2 { string a; } struct S3 { int a; immutable Object b; } static assert( hasUnsharedAliasing!S1); static assert(!hasUnsharedAliasing!S2); static assert(!hasUnsharedAliasing!S3); struct S4 { int a; shared Object b; } struct S5 { char[] a; } struct S6 { shared char[] b; } struct S7 { float[3] vals; } static assert(!hasUnsharedAliasing!S4); static assert( hasUnsharedAliasing!S5); static assert(!hasUnsharedAliasing!S6); static assert(!hasUnsharedAliasing!S7); /* Issue 6642 */ struct S8 { int a; Rebindable!(immutable Object) b; } static assert(!hasUnsharedAliasing!S8); static assert( hasUnsharedAliasing!(uint[uint])); static assert( hasUnsharedAliasing!(void delegate())); static assert( hasUnsharedAliasing!(void delegate() const)); static assert(!hasUnsharedAliasing!(void delegate() immutable)); static assert(!hasUnsharedAliasing!(void delegate() shared)); static assert(!hasUnsharedAliasing!(void delegate() shared const)); static assert( hasUnsharedAliasing!(const(void delegate()))); static assert( hasUnsharedAliasing!(const(void delegate() const))); static assert(!hasUnsharedAliasing!(const(void delegate() immutable))); static assert(!hasUnsharedAliasing!(const(void delegate() shared))); static assert(!hasUnsharedAliasing!(const(void delegate() shared const))); static assert(!hasUnsharedAliasing!(immutable(void delegate()))); static assert(!hasUnsharedAliasing!(immutable(void delegate() const))); static assert(!hasUnsharedAliasing!(immutable(void delegate() immutable))); static assert(!hasUnsharedAliasing!(immutable(void delegate() shared))); static assert(!hasUnsharedAliasing!(immutable(void delegate() shared const))); static assert(!hasUnsharedAliasing!(shared(void delegate()))); static assert(!hasUnsharedAliasing!(shared(void delegate() const))); static assert(!hasUnsharedAliasing!(shared(void delegate() immutable))); static assert(!hasUnsharedAliasing!(shared(void delegate() shared))); static assert(!hasUnsharedAliasing!(shared(void delegate() shared const))); static assert(!hasUnsharedAliasing!(shared(const(void delegate())))); static assert(!hasUnsharedAliasing!(shared(const(void delegate() const)))); static assert(!hasUnsharedAliasing!(shared(const(void delegate() immutable)))); static assert(!hasUnsharedAliasing!(shared(const(void delegate() shared)))); static assert(!hasUnsharedAliasing!(shared(const(void delegate() shared const)))); static assert(!hasUnsharedAliasing!(void function())); interface I {} static assert(hasUnsharedAliasing!I); static assert( hasUnsharedAliasing!(Rebindable!(const Object))); static assert(!hasUnsharedAliasing!(Rebindable!(immutable Object))); static assert(!hasUnsharedAliasing!(Rebindable!(shared Object))); static assert( hasUnsharedAliasing!(Rebindable!Object)); /* Issue 6979 */ static assert(!hasUnsharedAliasing!(int, shared(int)*)); static assert( hasUnsharedAliasing!(int, int*)); static assert( hasUnsharedAliasing!(int, const(int)[])); static assert( hasUnsharedAliasing!(int, shared(int)*, Rebindable!Object)); static assert(!hasUnsharedAliasing!(shared(int)*, Rebindable!(shared Object))); static assert(!hasUnsharedAliasing!()); struct S9 { void delegate() shared a; void delegate() immutable b; void delegate() shared const c; shared(void delegate()) d; shared(void delegate() shared) e; shared(void delegate() immutable) f; shared(void delegate() shared const) g; immutable(void delegate()) h; immutable(void delegate() shared) i; immutable(void delegate() immutable) j; immutable(void delegate() shared const) k; shared(const(void delegate())) l; shared(const(void delegate() shared)) m; shared(const(void delegate() immutable)) n; shared(const(void delegate() shared const)) o; } struct S10 { typeof(S9.tupleof) a; void delegate() p; } struct S11 { typeof(S9.tupleof) a; Object p; } struct S12 { typeof(S9.tupleof) a; int* p; } class S13 { typeof(S9.tupleof) a; } class S14 { typeof(S9.tupleof) a; void delegate() p; } class S15 { typeof(S9.tupleof) a; Object p; } class S16 { typeof(S9.tupleof) a; int* p; } static assert(!hasUnsharedAliasing!S9); static assert(!hasUnsharedAliasing!(immutable(S9))); static assert(!hasUnsharedAliasing!(shared(S9))); static assert( hasUnsharedAliasing!S10); static assert(!hasUnsharedAliasing!(immutable(S10))); static assert(!hasUnsharedAliasing!(shared(S10))); static assert( hasUnsharedAliasing!S11); static assert(!hasUnsharedAliasing!(immutable(S11))); static assert(!hasUnsharedAliasing!(shared(S11))); static assert( hasUnsharedAliasing!S12); static assert(!hasUnsharedAliasing!(immutable(S12))); static assert(!hasUnsharedAliasing!(shared(S12))); static assert( hasUnsharedAliasing!S13); static assert(!hasUnsharedAliasing!(immutable(S13))); static assert(!hasUnsharedAliasing!(shared(S13))); static assert( hasUnsharedAliasing!S14); static assert(!hasUnsharedAliasing!(immutable(S14))); static assert(!hasUnsharedAliasing!(shared(S14))); static assert( hasUnsharedAliasing!S15); static assert(!hasUnsharedAliasing!(immutable(S15))); static assert(!hasUnsharedAliasing!(shared(S15))); static assert( hasUnsharedAliasing!S16); static assert(!hasUnsharedAliasing!(immutable(S16))); static assert(!hasUnsharedAliasing!(shared(S16))); struct S17 {} class S18 {} interface S19 {} union S20 {} static assert(!hasUnsharedAliasing!S17); static assert( hasUnsharedAliasing!S18); static assert( hasUnsharedAliasing!S19); static assert(!hasUnsharedAliasing!S20); } /** True if $(D S) or any type embedded directly in the representation of $(D S) defines an elaborate copy constructor. Elaborate copy constructors are introduced by defining $(D this(this)) for a $(D struct). (Non-struct types never have elaborate copy constructors.) */ template hasElaborateCopyConstructor(S) { static if(isStaticArray!S && S.length) { enum bool hasElaborateCopyConstructor = hasElaborateCopyConstructor!(typeof(S[0])); } else static if(is(S == struct)) { enum hasElaborateCopyConstructor = hasMember!(S, "__postblit") || anySatisfy!(.hasElaborateCopyConstructor, typeof(S.tupleof)); } else { enum bool hasElaborateCopyConstructor = false; } } unittest { static assert(!hasElaborateCopyConstructor!int); static struct S1 { } static struct S2 { this(this) {} } static struct S3 { S2 field; } static struct S4 { S3[1] field; } static struct S5 { S3[] field; } static struct S6 { S3[0] field; } static struct S7 { @disable this(); S3 field; } static assert(!hasElaborateCopyConstructor!S1); static assert( hasElaborateCopyConstructor!S2); static assert( hasElaborateCopyConstructor!(immutable S2)); static assert( hasElaborateCopyConstructor!S3); static assert( hasElaborateCopyConstructor!(S3[1])); static assert(!hasElaborateCopyConstructor!(S3[0])); static assert( hasElaborateCopyConstructor!S4); static assert(!hasElaborateCopyConstructor!S5); static assert(!hasElaborateCopyConstructor!S6); static assert( hasElaborateCopyConstructor!S7); } /** True if $(D S) or any type directly embedded in the representation of $(D S) defines an elaborate assignment. Elaborate assignments are introduced by defining $(D opAssign(typeof(this))) or $(D opAssign(ref typeof(this))) for a $(D struct). (Non-struct types never have elaborate assignments.) */ template hasElaborateAssign(S) { static if(!is(S == struct)) { enum bool hasElaborateAssign = false; } else { enum hasElaborateAssign = is(typeof(S.init.opAssign(S.init))) || is(typeof(S.init.opAssign({ S s = void; return s; }()))) || anySatisfy!(.hasElaborateAssign, typeof(S.tupleof)); } } unittest { static assert(!hasElaborateAssign!int); struct S { void opAssign(S) {} } static assert( hasElaborateAssign!S); static assert(!hasElaborateAssign!(const(S))); struct S1 { void opAssign(ref S1) {} } struct S2 { void opAssign(S1) {} } struct S3 { S s; } static assert( hasElaborateAssign!S1); static assert(!hasElaborateAssign!S2); static assert( hasElaborateAssign!S3); struct S4 { void opAssign(U)(U u) {} @disable void opAssign(U)(ref U u); } static assert( hasElaborateAssign!S4); struct S5 { @disable this(); this(int n){ s = S(); } S s; } static assert( hasElaborateAssign!S5); } /** True if $(D S) or any type directly embedded in the representation of $(D S) defines an elaborate destructor. Elaborate destructors are introduced by defining $(D ~this()) for a $(D struct). (Non-struct types never have elaborate destructors, even though classes may define $(D ~this()).) */ template hasElaborateDestructor(S) { static if(isStaticArray!S && S.length) { enum bool hasElaborateDestructor = hasElaborateDestructor!(typeof(S[0])); } else static if(is(S == struct)) { enum hasElaborateDestructor = hasMember!(S, "__dtor") || anySatisfy!(.hasElaborateDestructor, typeof(S.tupleof)); } else { enum bool hasElaborateDestructor = false; } } unittest { static assert(!hasElaborateDestructor!int); static struct S1 { } static struct S2 { ~this() {} } static struct S3 { S2 field; } static struct S4 { S3[1] field; } static struct S5 { S3[] field; } static struct S6 { S3[0] field; } static struct S7 { @disable this(); S3 field; } static assert(!hasElaborateDestructor!S1); static assert( hasElaborateDestructor!S2); static assert( hasElaborateDestructor!(immutable S2)); static assert( hasElaborateDestructor!S3); static assert( hasElaborateDestructor!(S3[1])); static assert(!hasElaborateDestructor!(S3[0])); static assert( hasElaborateDestructor!S4); static assert(!hasElaborateDestructor!S5); static assert(!hasElaborateDestructor!S6); static assert( hasElaborateDestructor!S7); } template Identity(alias A) { alias A Identity; } /** Yields $(D true) if and only if $(D T) is an aggregate that defines a symbol called $(D name). */ template hasMember(T, string name) { static if (is(T == struct) || is(T == class) || is(T == union) || is(T == interface)) { enum bool hasMember = staticIndexOf!(name, __traits(allMembers, T)) != -1 || __traits(compiles, { mixin("alias Identity!(T."~name~") Sym;"); }); } else { enum bool hasMember = false; } } unittest { //pragma(msg, __traits(allMembers, void delegate())); static assert(!hasMember!(int, "blah")); struct S1 { int blah; } struct S2 { int blah(){ return 0; } } class C1 { int blah; } class C2 { int blah(){ return 0; } } static assert(hasMember!(S1, "blah")); static assert(hasMember!(S2, "blah")); static assert(hasMember!(C1, "blah")); static assert(hasMember!(C2, "blah")); // 6973 import std.range; static assert(isOutputRange!(OutputRange!int, int)); } // Temporarily disabled until bug4617 is fixed. version(none) unittest { // 8231 struct S { int x; void f(){} void t()(){} template T(){} } struct R1(T) { T t; alias t this; } struct R2(T) { T t; @property ref inout(T) payload() inout { return t; } alias t this; } static assert(hasMember!(S, "x")); static assert(hasMember!(S, "f")); static assert(hasMember!(S, "t")); static assert(hasMember!(S, "T")); static assert(hasMember!(R1!S, "x")); static assert(hasMember!(R1!S, "f")); static assert(hasMember!(R1!S, "t")); static assert(hasMember!(R1!S, "T")); static assert(hasMember!(R2!S, "x")); static assert(hasMember!(R2!S, "f")); static assert(hasMember!(R2!S, "t")); static assert(hasMember!(R2!S, "T")); } /** Retrieves the members of an enumerated type $(D enum E). Params: E = An enumerated type. $(D E) may have duplicated values. Returns: Static tuple composed of the members of the enumerated type $(D E). The members are arranged in the same order as declared in $(D E). Note: Returned values are strictly typed with $(D E). Thus, the following code does not work without the explicit cast: -------------------- enum E : int { a, b, c } int[] abc = cast(int[]) [ EnumMembers!E ]; -------------------- Cast is not necessary if the type of the variable is inferred. See the example below. Examples: Creating an array of enumerated values: -------------------- enum Sqrts : real { one = 1, two = 1.41421, three = 1.73205, } auto sqrts = [ EnumMembers!Sqrts ]; assert(sqrts == [ Sqrts.one, Sqrts.two, Sqrts.three ]); -------------------- A generic function $(D rank(v)) in the following example uses this template for finding a member $(D e) in an enumerated type $(D E). -------------------- // Returns i if e is the i-th enumerator of E. size_t rank(E)(E e) if (is(E == enum)) { foreach (i, member; EnumMembers!E) { if (e == member) return i; } assert(0, "Not an enum member"); } enum Mode { read = 1, write = 2, map = 4, } assert(rank(Mode.read ) == 0); assert(rank(Mode.write) == 1); assert(rank(Mode.map ) == 2); -------------------- */ template EnumMembers(E) if (is(E == enum)) { // Supply the specified identifier to an constant value. template WithIdentifier(string ident) { static if (ident == "Symbolize") { template Symbolize(alias value) { enum Symbolize = value; } } else { mixin("template Symbolize(alias "~ ident ~")" ~"{" ~"alias "~ ident ~" Symbolize;" ~"}"); } } template EnumSpecificMembers(names...) { static if (names.length > 0) { alias TypeTuple!( WithIdentifier!(names[0]) .Symbolize!(__traits(getMember, E, names[0])), EnumSpecificMembers!(names[1 .. $]) ) EnumSpecificMembers; } else { alias TypeTuple!() EnumSpecificMembers; } } alias EnumSpecificMembers!(__traits(allMembers, E)) EnumMembers; } unittest { enum A { a } static assert([ EnumMembers!A ] == [ A.a ]); enum B { a, b, c, d, e } static assert([ EnumMembers!B ] == [ B.a, B.b, B.c, B.d, B.e ]); } unittest // typed enums { enum A : string { a = "alpha", b = "beta" } static assert([ EnumMembers!A ] == [ A.a, A.b ]); static struct S { int value; int opCmp(S rhs) const nothrow { return value - rhs.value; } } enum B : S { a = S(1), b = S(2), c = S(3) } static assert([ EnumMembers!B ] == [ B.a, B.b, B.c ]); } unittest // duplicated values { enum A { a = 0, b = 0, c = 1, d = 1, e } static assert([ EnumMembers!A ] == [ A.a, A.b, A.c, A.d, A.e ]); } unittest { enum E { member, a = 0, b = 0 } static assert(__traits(identifier, EnumMembers!E[0]) == "member"); static assert(__traits(identifier, EnumMembers!E[1]) == "a"); static assert(__traits(identifier, EnumMembers!E[2]) == "b"); } //:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::// // Classes and Interfaces //:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::// /*** * Get a $(D_PARAM TypeTuple) of the base class and base interfaces of * this class or interface. $(D_PARAM BaseTypeTuple!Object) returns * the empty type tuple. * * Example: * --- * import std.traits, std.typetuple, std.stdio; * interface I { } * class A { } * class B : A, I { } * * void main() * { * alias BaseTypeTuple!B TL; * writeln(typeid(TL)); // prints: (A,I) * } * --- */ template BaseTypeTuple(A) { static if (is(A P == super)) alias P BaseTypeTuple; else static assert(0, "argument is not a class or interface"); } unittest { interface I1 { } interface I2 { } interface I12 : I1, I2 { } static assert(is(BaseTypeTuple!I12 == TypeTuple!(I1, I2))); interface I3 : I1 { } interface I123 : I1, I2, I3 { } static assert(is(BaseTypeTuple!I123 == TypeTuple!(I1, I2, I3))); } unittest { interface I1 { } interface I2 { } class A { } class C : A, I1, I2 { } alias BaseTypeTuple!C TL; assert(TL.length == 3); assert(is (TL[0] == A)); assert(is (TL[1] == I1)); assert(is (TL[2] == I2)); assert(BaseTypeTuple!Object.length == 0); } /** * Get a $(D_PARAM TypeTuple) of $(I all) base classes of this class, * in decreasing order. Interfaces are not included. $(D_PARAM * BaseClassesTuple!Object) yields the empty type tuple. * * Example: * --- * import std.traits, std.typetuple, std.stdio; * interface I { } * class A { } * class B : A, I { } * class C : B { } * * void main() * { * alias BaseClassesTuple!C TL; * writeln(typeid(TL)); // prints: (B,A,Object) * } * --- */ template BaseClassesTuple(T) { static if (is(T == Object)) { alias TypeTuple!() BaseClassesTuple; } static if (is(BaseTypeTuple!T[0] == Object)) { alias TypeTuple!Object BaseClassesTuple; } else { alias TypeTuple!(BaseTypeTuple!T[0], BaseClassesTuple!(BaseTypeTuple!T[0])) BaseClassesTuple; } } /** * Get a $(D_PARAM TypeTuple) of $(I all) interfaces directly or * indirectly inherited by this class or interface. Interfaces do not * repeat if multiply implemented. $(D_PARAM InterfacesTuple!Object) * yields the empty type tuple. * * Example: * --- * import std.traits, std.typetuple, std.stdio; * interface I1 { } * interface I2 { } * class A : I1, I2 { } * class B : A, I1 { } * class C : B { } * * void main() * { * alias InterfacesTuple!C TL; * writeln(typeid(TL)); // prints: (I1, I2) * } * --- */ template InterfacesTuple(T) { template Flatten(H, T...) { static if (T.length) { alias TypeTuple!(Flatten!H, Flatten!T) Flatten; } else { static if (is(H == interface)) alias TypeTuple!(H, InterfacesTuple!H) Flatten; else alias InterfacesTuple!H Flatten; } } static if (is(T S == super) && S.length) alias NoDuplicates!(Flatten!S) InterfacesTuple; else alias TypeTuple!() InterfacesTuple; } unittest { { // doc example interface I1 {} interface I2 {} class A : I1, I2 { } class B : A, I1 { } class C : B { } alias InterfacesTuple!C TL; static assert(is(TL[0] == I1) && is(TL[1] == I2)); } { interface Iaa {} interface Iab {} interface Iba {} interface Ibb {} interface Ia : Iaa, Iab {} interface Ib : Iba, Ibb {} interface I : Ia, Ib {} interface J {} class B2 : J {} class C2 : B2, Ia, Ib {} static assert(is(InterfacesTuple!I == TypeTuple!(Ia, Iaa, Iab, Ib, Iba, Ibb))); static assert(is(InterfacesTuple!C2 == TypeTuple!(J, Ia, Iaa, Iab, Ib, Iba, Ibb))); } } /** * Get a $(D_PARAM TypeTuple) of $(I all) base classes of $(D_PARAM * T), in decreasing order, followed by $(D_PARAM T)'s * interfaces. $(D_PARAM TransitiveBaseTypeTuple!Object) yields the * empty type tuple. * * Example: * --- * import std.traits, std.typetuple, std.stdio; * interface I { } * class A { } * class B : A, I { } * class C : B { } * * void main() * { * alias TransitiveBaseTypeTuple!C TL; * writeln(typeid(TL)); // prints: (B,A,Object,I) * } * --- */ template TransitiveBaseTypeTuple(T) { static if (is(T == Object)) alias TypeTuple!() TransitiveBaseTypeTuple; else alias TypeTuple!(BaseClassesTuple!T, InterfacesTuple!T) TransitiveBaseTypeTuple; } unittest { interface J1 {} interface J2 {} class B1 {} class B2 : B1, J1, J2 {} class B3 : B2, J1 {} alias TransitiveBaseTypeTuple!B3 TL; assert(TL.length == 5); assert(is (TL[0] == B2)); assert(is (TL[1] == B1)); assert(is (TL[2] == Object)); assert(is (TL[3] == J1)); assert(is (TL[4] == J2)); assert(TransitiveBaseTypeTuple!Object.length == 0); } /** Returns a tuple of non-static functions with the name $(D name) declared in the class or interface $(D C). Covariant duplicates are shrunk into the most derived one. Example: -------------------- interface I { I foo(); } class B { real foo(real v) { return v; } } class C : B, I { override C foo() { return this; } // covariant overriding of I.foo() } alias MemberFunctionsTuple!(C, "foo") foos; static assert(foos.length == 2); static assert(__traits(isSame, foos[0], C.foo)); static assert(__traits(isSame, foos[1], B.foo)); -------------------- */ template MemberFunctionsTuple(C, string name) if (is(C == class) || is(C == interface)) { static if (__traits(hasMember, C, name)) { /* * First, collect all overloads in the class hierarchy. */ template CollectOverloads(Node) { static if (__traits(hasMember, Node, name) && __traits(compiles, __traits(getMember, Node, name))) { // Get all overloads in sight (not hidden). alias TypeTuple!(__traits(getVirtualFunctions, Node, name)) inSight; // And collect all overloads in ancestor classes to reveal hidden // methods. The result may contain duplicates. template walkThru(Parents...) { static if (Parents.length > 0) alias TypeTuple!( CollectOverloads!(Parents[0]), walkThru!(Parents[1 .. $]) ) walkThru; else alias TypeTuple!() walkThru; } static if (is(Node Parents == super)) alias TypeTuple!(inSight, walkThru!Parents) CollectOverloads; else alias TypeTuple!inSight CollectOverloads; } else alias TypeTuple!() CollectOverloads; // no overloads in this hierarchy } // duplicates in this tuple will be removed by shrink() alias CollectOverloads!C overloads; // shrinkOne!args[0] = the most derived one in the covariant siblings of target // shrinkOne!args[1..$] = non-covariant others template shrinkOne(/+ alias target, rest... +/ args...) { alias args[0 .. 1] target; // prevent property functions from being evaluated alias args[1 .. $] rest; static if (rest.length > 0) { alias FunctionTypeOf!target Target; alias FunctionTypeOf!(rest[0]) Rest0; static if (isCovariantWith!(Target, Rest0)) // target overrides rest[0] -- erase rest[0]. alias shrinkOne!(target, rest[1 .. $]) shrinkOne; else static if (isCovariantWith!(Rest0, Target)) // rest[0] overrides target -- erase target. alias shrinkOne!(rest[0], rest[1 .. $]) shrinkOne; else // target and rest[0] are distinct. alias TypeTuple!( shrinkOne!(target, rest[1 .. $]), rest[0] // keep ) shrinkOne; } else alias TypeTuple!target shrinkOne; // done } /* * Now shrink covariant overloads into one. */ template shrink(overloads...) { static if (overloads.length > 0) { alias shrinkOne!overloads temp; alias TypeTuple!(temp[0], shrink!(temp[1 .. $])) shrink; } else alias TypeTuple!() shrink; // done } // done. alias shrink!overloads MemberFunctionsTuple; } else alias TypeTuple!() MemberFunctionsTuple; } unittest { interface I { I test(); } interface J : I { J test(); } interface K { K test(int); } class B : I, K { K test(int) { return this; } B test() { return this; } static void test(string) { } } class C : B, J { override C test() { return this; } } alias MemberFunctionsTuple!(C, "test") test; static assert(test.length == 2); static assert(is(FunctionTypeOf!(test[0]) == FunctionTypeOf!(C.test))); static assert(is(FunctionTypeOf!(test[1]) == FunctionTypeOf!(K.test))); alias MemberFunctionsTuple!(C, "noexist") noexist; static assert(noexist.length == 0); interface L { int prop() @property; } alias MemberFunctionsTuple!(L, "prop") prop; static assert(prop.length == 1); interface Test_I { void foo(); void foo(int); void foo(int, int); } interface Test : Test_I {} alias MemberFunctionsTuple!(Test, "foo") Test_foo; static assert(Test_foo.length == 3); static assert(is(typeof(&Test_foo[0]) == void function())); static assert(is(typeof(&Test_foo[2]) == void function(int))); static assert(is(typeof(&Test_foo[1]) == void function(int, int))); } //:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::// // Type Conversion //:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::// /** Get the type that all types can be implicitly converted to. Useful e.g. in figuring out an array type from a bunch of initializing values. Returns $(D_PARAM void) if passed an empty list, or if the types have no common type. Example: ---- alias CommonType!(int, long, short) X; assert(is(X == long)); alias CommonType!(int, char[], short) Y; assert(is(Y == void)); ---- */ template CommonType(T...) { static if (!T.length) { alias void CommonType; } else static if (T.length == 1) { static if(is(typeof(T[0]))) { alias typeof(T[0]) CommonType; } else { alias T[0] CommonType; } } else static if (is(typeof(true ? T[0].init : T[1].init) U)) { alias CommonType!(U, T[2 .. $]) CommonType; } else alias void CommonType; } unittest { alias CommonType!(int, long, short) X; static assert(is(X == long)); alias CommonType!(char[], int, long, short) Y; static assert(is(Y == void), Y.stringof); static assert(is(CommonType!(3) == int)); static assert(is(CommonType!(double, 4, float) == double)); static assert(is(CommonType!(string, char[]) == const(char)[])); static assert(is(CommonType!(3, 3U) == uint)); } /** * Returns a tuple with all possible target types of an implicit * conversion of a value of type $(D_PARAM T). * * Important note: * * The possible targets are computed more conservatively than the D * 2.005 compiler does, eliminating all dangerous conversions. For * example, $(D_PARAM ImplicitConversionTargets!double) does not * include $(D_PARAM float). */ template ImplicitConversionTargets(T) { static if (is(T == bool)) alias TypeTuple!(byte, ubyte, short, ushort, int, uint, long, ulong, float, double, real, char, wchar, dchar) ImplicitConversionTargets; else static if (is(T == byte)) alias TypeTuple!(short, ushort, int, uint, long, ulong, float, double, real, char, wchar, dchar) ImplicitConversionTargets; else static if (is(T == ubyte)) alias TypeTuple!(short, ushort, int, uint, long, ulong, float, double, real, char, wchar, dchar) ImplicitConversionTargets; else static if (is(T == short)) alias TypeTuple!(ushort, int, uint, long, ulong, float, double, real) ImplicitConversionTargets; else static if (is(T == ushort)) alias TypeTuple!(int, uint, long, ulong, float, double, real) ImplicitConversionTargets; else static if (is(T == int)) alias TypeTuple!(long, ulong, float, double, real) ImplicitConversionTargets; else static if (is(T == uint)) alias TypeTuple!(long, ulong, float, double, real) ImplicitConversionTargets; else static if (is(T == long)) alias TypeTuple!(float, double, real) ImplicitConversionTargets; else static if (is(T == ulong)) alias TypeTuple!(float, double, real) ImplicitConversionTargets; else static if (is(T == float)) alias TypeTuple!(double, real) ImplicitConversionTargets; else static if (is(T == double)) alias TypeTuple!real ImplicitConversionTargets; else static if (is(T == char)) alias TypeTuple!(wchar, dchar, byte, ubyte, short, ushort, int, uint, long, ulong, float, double, real) ImplicitConversionTargets; else static if (is(T == wchar)) alias TypeTuple!(wchar, dchar, short, ushort, int, uint, long, ulong, float, double, real) ImplicitConversionTargets; else static if (is(T == dchar)) alias TypeTuple!(wchar, dchar, int, uint, long, ulong, float, double, real) ImplicitConversionTargets; else static if (is(T : typeof(null))) alias TypeTuple!(typeof(null)) ImplicitConversionTargets; else static if(is(T : Object)) alias TransitiveBaseTypeTuple!T ImplicitConversionTargets; // @@@BUG@@@ this should work // else static if (isDynamicArray!T && !is(typeof(T.init[0]) == const)) // alias TypeTuple!(const(typeof(T.init[0]))[]) ImplicitConversionTargets; else static if (is(T == char[])) alias TypeTuple!(const(char)[]) ImplicitConversionTargets; else static if (isDynamicArray!T && !is(typeof(T.init[0]) == const)) alias TypeTuple!(const(typeof(T.init[0]))[]) ImplicitConversionTargets; else static if (is(T : void*)) alias TypeTuple!(void*) ImplicitConversionTargets; else alias TypeTuple!() ImplicitConversionTargets; } unittest { assert(is(ImplicitConversionTargets!double[0] == real)); } /** Is $(D From) implicitly convertible to $(D To)? */ template isImplicitlyConvertible(From, To) { enum bool isImplicitlyConvertible = is(typeof({ void fun(ref From v) { void gun(To) {} gun(v); } })); } unittest { static assert( isImplicitlyConvertible!(immutable(char), char)); static assert( isImplicitlyConvertible!(const(char), char)); static assert( isImplicitlyConvertible!(char, wchar)); static assert(!isImplicitlyConvertible!(wchar, char)); // bug6197 static assert(!isImplicitlyConvertible!(const(ushort), ubyte)); static assert(!isImplicitlyConvertible!(const(uint), ubyte)); static assert(!isImplicitlyConvertible!(const(ulong), ubyte)); // from std.conv.implicitlyConverts assert(!isImplicitlyConvertible!(const(char)[], string)); assert( isImplicitlyConvertible!(string, const(char)[])); } /** Returns $(D true) iff a value of type $(D Rhs) can be assigned to a variable of type $(D Lhs). If you omit $(D Rhs), $(D isAssignable) will check identity assignable of $(D Lhs). Examples: --- static assert(isAssignable!(long, int)); static assert(!isAssignable!(int, long)); static assert( isAssignable!(const(char)[], string)); static assert(!isAssignable!(string, char[])); // int is assignable to int static assert( isAssignable!int); // immutable int is not assinable to immutable int static assert(!isAssignable!(immutable int)); --- */ template isAssignable(Lhs, Rhs = Lhs) { enum bool isAssignable = is(typeof({ Lhs l = void; void f(Rhs r) { l = r; } return l; })); } unittest { static assert( isAssignable!(long, int)); static assert( isAssignable!(const(char)[], string)); static assert(!isAssignable!(int, long)); static assert(!isAssignable!(string, char[])); static assert(!isAssignable!(immutable(int), int)); static assert( isAssignable!(int, immutable(int))); struct S { @disable this(); this(int n){} } static assert( isAssignable!(S, S)); struct S2 { this(int n){} } static assert( isAssignable!(S2, S2)); static assert(!isAssignable!(S2, int)); struct S3 { @disable void opAssign(); } static assert(!isAssignable!(S3, S3)); struct S4 { void opAssign(int); } static assert( isAssignable!(S4, int)); static assert( isAssignable!(S4, immutable(int))); struct S5 { @disable this(); @disable this(this); } struct S6 { void opAssign(in ref S5); } static assert( isAssignable!(S6, S5)); static assert( isAssignable!(S6, immutable(S5))); } unittest { static assert( isAssignable!int); static assert(!isAssignable!(immutable int)); } /* Works like $(D isImplicitlyConvertible), except this cares only about storage classes of the arguments. */ private template isStorageClassImplicitlyConvertible(From, To) { enum isStorageClassImplicitlyConvertible = isImplicitlyConvertible!( ModifyTypePreservingSTC!(Pointify, From), ModifyTypePreservingSTC!(Pointify, To) ); } private template Pointify(T) { alias void* Pointify; } unittest { static assert( isStorageClassImplicitlyConvertible!( int, const int)); static assert( isStorageClassImplicitlyConvertible!(immutable int, const int)); static assert(!isStorageClassImplicitlyConvertible!(const int, int)); static assert(!isStorageClassImplicitlyConvertible!(const int, immutable int)); static assert(!isStorageClassImplicitlyConvertible!(int, shared int)); static assert(!isStorageClassImplicitlyConvertible!(shared int, int)); } /** Determines whether the function type $(D F) is covariant with $(D G), i.e., functions of the type $(D F) can override ones of the type $(D G). Example: -------------------- interface I { I clone(); } interface J { J clone(); } class C : I { override C clone() // covariant overriding of I.clone() { return new C; } } // C.clone() can override I.clone(), indeed. static assert(isCovariantWith!(typeof(C.clone), typeof(I.clone))); // C.clone() can't override J.clone(); the return type C is not implicitly // convertible to J. static assert(isCovariantWith!(typeof(C.clone), typeof(J.clone))); -------------------- */ template isCovariantWith(F, G) if (is(F == function) && is(G == function)) { static if (is(F : G)) enum isCovariantWith = true; else { alias F Upr; alias G Lwr; /* * Check for calling convention: require exact match. */ template checkLinkage() { enum ok = functionLinkage!Upr == functionLinkage!Lwr; } /* * Check for variadic parameter: require exact match. */ template checkVariadicity() { enum ok = variadicFunctionStyle!Upr == variadicFunctionStyle!Lwr; } /* * Check for function storage class: * - overrider can have narrower storage class than base */ template checkSTC() { // Note the order of arguments. The convertion order Lwr -> Upr is // correct since Upr should be semantically 'narrower' than Lwr. enum ok = isStorageClassImplicitlyConvertible!(Lwr, Upr); } /* * Check for function attributes: * - require exact match for ref and @property * - overrider can add pure and nothrow, but can't remove them * - @safe and @trusted are covariant with each other, unremovable */ template checkAttributes() { alias FunctionAttribute FA; enum uprAtts = functionAttributes!Upr; enum lwrAtts = functionAttributes!Lwr; // enum wantExact = FA.ref_ | FA.property; enum safety = FA.safe | FA.trusted; enum ok = ( (uprAtts & wantExact) == (lwrAtts & wantExact)) && ( (uprAtts & FA.pure_ ) >= (lwrAtts & FA.pure_ )) && ( (uprAtts & FA.nothrow_) >= (lwrAtts & FA.nothrow_)) && (!!(uprAtts & safety ) >= !!(lwrAtts & safety )) ; } /* * Check for return type: usual implicit convertion. */ template checkReturnType() { enum ok = is(ReturnType!Upr : ReturnType!Lwr); } /* * Check for parameters: * - require exact match for types (cf. bugzilla 3075) * - require exact match for in, out, ref and lazy * - overrider can add scope, but can't remove */ template checkParameters() { alias ParameterStorageClass STC; alias ParameterTypeTuple!Upr UprParams; alias ParameterTypeTuple!Lwr LwrParams; alias ParameterStorageClassTuple!Upr UprPSTCs; alias ParameterStorageClassTuple!Lwr LwrPSTCs; // template checkNext(size_t i) { static if (i < UprParams.length) { enum uprStc = UprPSTCs[i]; enum lwrStc = LwrPSTCs[i]; // enum wantExact = STC.out_ | STC.ref_ | STC.lazy_; enum ok = ((uprStc & wantExact ) == (lwrStc & wantExact )) && ((uprStc & STC.scope_) >= (lwrStc & STC.scope_)) && checkNext!(i + 1).ok; } else enum ok = true; // done } static if (UprParams.length == LwrParams.length) enum ok = is(UprParams == LwrParams) && checkNext!(0).ok; else enum ok = false; } /* run all the checks */ enum isCovariantWith = checkLinkage !().ok && checkVariadicity!().ok && checkSTC !().ok && checkAttributes !().ok && checkReturnType !().ok && checkParameters !().ok ; } } version (unittest) private template isCovariantWith(alias f, alias g) { enum bool isCovariantWith = isCovariantWith!(typeof(f), typeof(g)); } unittest { // covariant return type interface I {} interface J : I {} interface BaseA { const(I) test(int); } interface DerivA_1 : BaseA { override const(J) test(int); } interface DerivA_2 : BaseA { override J test(int); } static assert( isCovariantWith!(DerivA_1.test, BaseA.test)); static assert( isCovariantWith!(DerivA_2.test, BaseA.test)); static assert(!isCovariantWith!(BaseA.test, DerivA_1.test)); static assert(!isCovariantWith!(BaseA.test, DerivA_2.test)); static assert(isCovariantWith!(BaseA.test, BaseA.test)); static assert(isCovariantWith!(DerivA_1.test, DerivA_1.test)); static assert(isCovariantWith!(DerivA_2.test, DerivA_2.test)); // scope parameter interface BaseB { void test( int, int); } interface DerivB_1 : BaseB { override void test(scope int, int); } interface DerivB_2 : BaseB { override void test( int, scope int); } interface DerivB_3 : BaseB { override void test(scope int, scope int); } static assert( isCovariantWith!(DerivB_1.test, BaseB.test)); static assert( isCovariantWith!(DerivB_2.test, BaseB.test)); static assert( isCovariantWith!(DerivB_3.test, BaseB.test)); static assert(!isCovariantWith!(BaseB.test, DerivB_1.test)); static assert(!isCovariantWith!(BaseB.test, DerivB_2.test)); static assert(!isCovariantWith!(BaseB.test, DerivB_3.test)); // function storage class interface BaseC { void test() ; } interface DerivC_1 : BaseC { override void test() const; } static assert( isCovariantWith!(DerivC_1.test, BaseC.test)); static assert(!isCovariantWith!(BaseC.test, DerivC_1.test)); // increasing safety interface BaseE { void test() ; } interface DerivE_1 : BaseE { override void test() @safe ; } interface DerivE_2 : BaseE { override void test() @trusted; } static assert( isCovariantWith!(DerivE_1.test, BaseE.test)); static assert( isCovariantWith!(DerivE_2.test, BaseE.test)); static assert(!isCovariantWith!(BaseE.test, DerivE_1.test)); static assert(!isCovariantWith!(BaseE.test, DerivE_2.test)); // @safe and @trusted interface BaseF { void test1() @safe; void test2() @trusted; } interface DerivF : BaseF { override void test1() @trusted; override void test2() @safe; } static assert( isCovariantWith!(DerivF.test1, BaseF.test1)); static assert( isCovariantWith!(DerivF.test2, BaseF.test2)); } //:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::// // SomethingTypeOf //:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::// /* */ template BooleanTypeOf(T) { inout(bool) idx( inout(bool) ); shared(inout bool) idx( shared(inout bool) ); immutable(bool) idy( immutable(bool) ); static if (is(T == enum)) alias .BooleanTypeOf!(OriginalType!T) BooleanTypeOf; else static if (is(typeof(idx(T.init)) X) && !isIntegral!T) alias X BooleanTypeOf; else static if (is(typeof(idy(T.init)) X) && is(Unqual!X == bool) && !isIntegral!T) alias X BooleanTypeOf; else static assert(0, T.stringof~" is not boolean type"); } unittest { // unexpected failure, maybe dmd type-merging bug foreach (T; TypeTuple!bool) foreach (Q; TypeQualifierList) { static assert( is(Q!T == BooleanTypeOf!( Q!T ))); static assert( is(Q!T == BooleanTypeOf!( SubTypeOf!(Q!T) ))); } foreach (T; TypeTuple!(void, NumericTypeList, ImaginaryTypeList, ComplexTypeList, CharTypeList)) foreach (Q; TypeQualifierList) { static assert(!is(BooleanTypeOf!( Q!T )), Q!T.stringof); static assert(!is(BooleanTypeOf!( SubTypeOf!(Q!T) ))); } } /* */ template IntegralTypeOf(T) { inout( byte) idx( inout( byte) ); inout( ubyte) idx( inout( ubyte) ); inout( short) idx( inout( short) ); inout(ushort) idx( inout(ushort) ); inout( int) idx( inout( int) ); inout( uint) idx( inout( uint) ); inout( long) idx( inout( long) ); inout( ulong) idx( inout( ulong) ); shared(inout byte) idx( shared(inout byte) ); shared(inout ubyte) idx( shared(inout ubyte) ); shared(inout short) idx( shared(inout short) ); shared(inout ushort) idx( shared(inout ushort) ); shared(inout int) idx( shared(inout int) ); shared(inout uint) idx( shared(inout uint) ); shared(inout long) idx( shared(inout long) ); shared(inout ulong) idx( shared(inout ulong) ); immutable( char) idy( immutable( char) ); immutable( wchar) idy( immutable( wchar) ); immutable( dchar) idy( immutable( dchar) ); // Integrals and characers are impilcit convertible each other with value copy. // Then adding exact overloads to detect it. immutable( byte) idy( immutable( byte) ); immutable( ubyte) idy( immutable( ubyte) ); immutable( short) idy( immutable( short) ); immutable(ushort) idy( immutable(ushort) ); immutable( int) idy( immutable( int) ); immutable( uint) idy( immutable( uint) ); immutable( long) idy( immutable( long) ); immutable( ulong) idy( immutable( ulong) ); static if (is(T == enum)) alias .IntegralTypeOf!(OriginalType!T) IntegralTypeOf; else static if (is(typeof(idx(T.init)) X)) alias X IntegralTypeOf; else static if (is(typeof(idy(T.init)) X) && staticIndexOf!(Unqual!X, IntegralTypeList) >= 0) alias X IntegralTypeOf; else static assert(0, T.stringof~" is not an integral type"); } unittest { foreach (T; IntegralTypeList) foreach (Q; TypeQualifierList) { static assert( is(Q!T == IntegralTypeOf!( Q!T ))); static assert( is(Q!T == IntegralTypeOf!( SubTypeOf!(Q!T) ))); } foreach (T; TypeTuple!(void, bool, FloatingPointTypeList, ImaginaryTypeList, ComplexTypeList, CharTypeList)) foreach (Q; TypeQualifierList) { static assert(!is(IntegralTypeOf!( Q!T ))); static assert(!is(IntegralTypeOf!( SubTypeOf!(Q!T) ))); } } /* */ template FloatingPointTypeOf(T) { inout( float) idx( inout( float) ); inout(double) idx( inout(double) ); inout( real) idx( inout( real) ); shared(inout float) idx( shared(inout float) ); shared(inout double) idx( shared(inout double) ); shared(inout real) idx( shared(inout real) ); immutable( float) idy( immutable( float) ); immutable(double) idy( immutable(double) ); immutable( real) idy( immutable( real) ); static if (is(T == enum)) alias .FloatingPointTypeOf!(OriginalType!T) FloatingPointTypeOf; else static if (is(typeof(idx(T.init)) X)) alias X FloatingPointTypeOf; else static if (is(typeof(idy(T.init)) X)) alias X FloatingPointTypeOf; else static assert(0, T.stringof~" is not a floating point type"); } unittest { foreach (T; FloatingPointTypeList) foreach (Q; TypeQualifierList) { static assert( is(Q!T == FloatingPointTypeOf!( Q!T ))); static assert( is(Q!T == FloatingPointTypeOf!( SubTypeOf!(Q!T) ))); } foreach (T; TypeTuple!(void, bool, IntegralTypeList, ImaginaryTypeList, ComplexTypeList, CharTypeList)) foreach (Q; TypeQualifierList) { static assert(!is(FloatingPointTypeOf!( Q!T ))); static assert(!is(FloatingPointTypeOf!( SubTypeOf!(Q!T) ))); } } /* */ template NumericTypeOf(T) { static if (is(IntegralTypeOf!T X)) alias X NumericTypeOf; else static if (is(FloatingPointTypeOf!T X)) alias X NumericTypeOf; else static assert(0, T.stringof~" is not a numeric type"); } unittest { foreach (T; TypeTuple!(IntegralTypeList, FloatingPointTypeList)) foreach (Q; TypeQualifierList) { static assert( is(Q!T == NumericTypeOf!( Q!T ))); static assert( is(Q!T == NumericTypeOf!( SubTypeOf!(Q!T) ))); } foreach (T; TypeTuple!(void, bool, CharTypeList, ImaginaryTypeList, ComplexTypeList)) foreach (Q; TypeQualifierList) { static assert(!is(NumericTypeOf!( Q!T ))); static assert(!is(NumericTypeOf!( SubTypeOf!(Q!T) ))); } } /* */ template UnsignedTypeOf(T) { static if (is(IntegralTypeOf!T X) && staticIndexOf!(Unqual!X, UnsignedIntTypeList) >= 0) alias X UnsignedTypeOf; else static assert(0, T.stringof~" is not an unsigned type."); } template SignedTypeOf(T) { static if (is(IntegralTypeOf!T X) && staticIndexOf!(Unqual!X, SignedIntTypeList) >= 0) alias X SignedTypeOf; else static if (is(FloatingPointTypeOf!T X)) alias X SignedTypeOf; else static assert(0, T.stringof~" is not an signed type."); } /* */ template CharTypeOf(T) { inout( char) idx( inout( char) ); inout(wchar) idx( inout(wchar) ); inout(dchar) idx( inout(dchar) ); shared(inout char) idx( shared(inout char) ); shared(inout wchar) idx( shared(inout wchar) ); shared(inout dchar) idx( shared(inout dchar) ); immutable( char) idy( immutable( char) ); immutable( wchar) idy( immutable( wchar) ); immutable( dchar) idy( immutable( dchar) ); // Integrals and characers are impilcit convertible each other with value copy. // Then adding exact overloads to detect it. immutable( byte) idy( immutable( byte) ); immutable( ubyte) idy( immutable( ubyte) ); immutable( short) idy( immutable( short) ); immutable(ushort) idy( immutable(ushort) ); immutable( int) idy( immutable( int) ); immutable( uint) idy( immutable( uint) ); immutable( long) idy( immutable( long) ); immutable( ulong) idy( immutable( ulong) ); static if (is(T == enum)) alias .CharTypeOf!(OriginalType!T) CharTypeOf; else static if (is(typeof(idx(T.init)) X)) alias X CharTypeOf; else static if (is(typeof(idy(T.init)) X) && staticIndexOf!(Unqual!X, CharTypeList) >= 0) alias X CharTypeOf; else static assert(0, T.stringof~" is not a character type"); } unittest { foreach (T; CharTypeList) foreach (Q; TypeQualifierList) { static assert( is(CharTypeOf!( Q!T ))); static assert( is(CharTypeOf!( SubTypeOf!(Q!T) ))); } foreach (T; TypeTuple!(void, bool, NumericTypeList, ImaginaryTypeList, ComplexTypeList)) foreach (Q; TypeQualifierList) { static assert(!is(CharTypeOf!( Q!T ))); static assert(!is(CharTypeOf!( SubTypeOf!(Q!T) ))); } foreach (T; TypeTuple!(string, wstring, dstring, char[4])) foreach (Q; TypeQualifierList) { static assert(!is(CharTypeOf!( Q!T ))); static assert(!is(CharTypeOf!( SubTypeOf!(Q!T) ))); } } /* */ template StaticArrayTypeOf(T) { inout(U[n]) idx(U, size_t n)( inout(U[n]) ); static if (is(typeof(idx(defaultInit!T)) X)) alias X StaticArrayTypeOf; else static assert(0, T.stringof~" is not a static array type"); } unittest { foreach (T; TypeTuple!(bool, NumericTypeList, ImaginaryTypeList, ComplexTypeList)) foreach (Q; TypeTuple!(TypeQualifierList, WildOf, SharedWildOf)) { static assert(is( Q!( T[1] ) == StaticArrayTypeOf!( Q!( T[1] ) ) )); foreach (P; TypeQualifierList) { // SubTypeOf cannot have inout type static assert(is( Q!(P!(T[1])) == StaticArrayTypeOf!( Q!(SubTypeOf!(P!(T[1]))) ) )); } } foreach (T; TypeTuple!void) foreach (Q; TypeTuple!TypeQualifierList) { static assert(is( StaticArrayTypeOf!( Q!(void[1]) ) == Q!(void[1]) )); } } /* */ template DynamicArrayTypeOf(T) { inout(U[]) idx(U)( inout(U[]) ); static if (is(typeof(idx(defaultInit!T)) X)) { alias typeof(defaultInit!T[0]) E; E[] idy( E[] ); const(E[]) idy( const(E[]) ); inout(E[]) idy( inout(E[]) ); shared( E[]) idy( shared( E[]) ); shared(const E[]) idy( shared(const E[]) ); shared(inout E[]) idy( shared(inout E[]) ); immutable(E[]) idy( immutable(E[]) ); alias typeof(idy(defaultInit!T)) DynamicArrayTypeOf; } else static assert(0, T.stringof~" is not a dynamic array"); } unittest { foreach (T; TypeTuple!(/*void, */bool, NumericTypeList, ImaginaryTypeList, ComplexTypeList)) foreach (Q; TypeTuple!(TypeQualifierList, WildOf, SharedWildOf)) { static assert(is( Q!T[] == DynamicArrayTypeOf!( Q!T[] ) )); static assert(is( Q!(T[]) == DynamicArrayTypeOf!( Q!(T[]) ) )); foreach (P; TypeTuple!(MutableOf, ConstOf, ImmutableOf)) { static assert(is( Q!(P!T[]) == DynamicArrayTypeOf!( Q!(SubTypeOf!(P!T[])) ) )); static assert(is( Q!(P!(T[])) == DynamicArrayTypeOf!( Q!(SubTypeOf!(P!(T[]))) ) )); } } } /* */ template ArrayTypeOf(T) { static if (is(StaticArrayTypeOf!T X)) alias X ArrayTypeOf; else static if (is(DynamicArrayTypeOf!T X)) alias X ArrayTypeOf; else static assert(0, T.stringof~" is not an array type"); } unittest { } /* */ template StringTypeOf(T) if (isSomeString!T) { alias ArrayTypeOf!T StringTypeOf; } unittest { foreach (T; CharTypeList) foreach (Q; TypeTuple!(MutableOf, ConstOf, ImmutableOf, WildOf)) { static assert(is(Q!T[] == StringTypeOf!( Q!T[] ))); static if (!__traits(isSame, Q, WildOf)) { static assert(is(Q!T[] == StringTypeOf!( SubTypeOf!(Q!T[]) ))); alias Q!T[] Str; class C(Str) { Str val; alias val this; } static assert(is(StringTypeOf!(C!Str) == Str)); } } foreach (T; CharTypeList) foreach (Q; TypeTuple!(SharedOf, SharedConstOf, SharedWildOf)) { static assert(!is(StringTypeOf!( Q!T[] ))); } } /* */ template AssocArrayTypeOf(T) { immutable(V [K]) idx(K, V)( immutable(V [K]) ); inout(V)[K] idy(K, V)( inout(V)[K] ); shared( V [K]) idy(K, V)( shared( V [K]) ); inout(V [K]) idz(K, V)( inout(V [K]) ); shared(inout V [K]) idz(K, V)( shared(inout V [K]) ); inout(immutable(V)[K]) idw(K, V)( inout(immutable(V)[K]) ); shared(inout(immutable(V)[K])) idw(K, V)( shared(inout(immutable(V)[K])) ); static if (is(typeof(idx(defaultInit!T)) X)) { alias X AssocArrayTypeOf; } else static if (is(typeof(idy(defaultInit!T)) X)) { alias X AssocArrayTypeOf; } else static if (is(typeof(idz(defaultInit!T)) X)) { inout( V [K]) idzp(K, V)( inout( V [K]) ); inout( shared(V) [K]) idzp(K, V)( inout( shared(V) [K]) ); inout( const(V) [K]) idzp(K, V)( inout( const(V) [K]) ); inout(shared(const V) [K]) idzp(K, V)( inout(shared(const V) [K]) ); inout( immutable(V) [K]) idzp(K, V)( inout( immutable(V) [K]) ); shared(inout V [K]) idzp(K, V)( shared(inout V [K]) ); shared(inout const(V) [K]) idzp(K, V)( shared(inout const(V) [K]) ); shared(inout immutable(V) [K]) idzp(K, V)( shared(inout immutable(V) [K]) ); alias typeof(idzp(defaultInit!T)) AssocArrayTypeOf; } else static if (is(typeof(idw(defaultInit!T)) X)) alias X AssocArrayTypeOf; else static assert(0, T.stringof~" is not an associative array type"); } unittest { foreach (T; TypeTuple!(int/*bool, CharTypeList, NumericTypeList, ImaginaryTypeList, ComplexTypeList*/)) foreach (P; TypeTuple!(TypeQualifierList, WildOf, SharedWildOf)) foreach (Q; TypeTuple!(TypeQualifierList, WildOf, SharedWildOf)) foreach (R; TypeTuple!(TypeQualifierList, WildOf, SharedWildOf)) { static assert(is( P!(Q!T[R!T]) == AssocArrayTypeOf!( P!(Q!T[R!T]) ) )); } foreach (T; TypeTuple!(int/*bool, CharTypeList, NumericTypeList, ImaginaryTypeList, ComplexTypeList*/)) foreach (O; TypeTuple!(TypeQualifierList, WildOf, SharedWildOf)) foreach (P; TypeTuple!TypeQualifierList) foreach (Q; TypeTuple!TypeQualifierList) foreach (R; TypeTuple!TypeQualifierList) { static assert(is( O!(P!(Q!T[R!T])) == AssocArrayTypeOf!( O!(SubTypeOf!(P!(Q!T[R!T]))) ) )); } } /* */ template BuiltinTypeOf(T) { static if (is(T : void)) alias void BuiltinTypeOf; else static if (is(BooleanTypeOf!T X)) alias X BuiltinTypeOf; else static if (is(IntegralTypeOf!T X)) alias X BuiltinTypeOf; else static if (is(FloatingPointTypeOf!T X))alias X BuiltinTypeOf; else static if (is(T : const(ireal))) alias ireal BuiltinTypeOf; //TODO else static if (is(T : const(creal))) alias creal BuiltinTypeOf; //TODO else static if (is(CharTypeOf!T X)) alias X BuiltinTypeOf; else static if (is(ArrayTypeOf!T X)) alias X BuiltinTypeOf; else static if (is(AssocArrayTypeOf!T X)) alias X BuiltinTypeOf; else static assert(0); } //:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::// // isSomething //:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::// /** * Detect whether we can treat T as a built-in boolean type. */ template isBoolean(T) { enum bool isBoolean = is(BooleanTypeOf!T); } unittest { enum EB : bool { a = true } static assert(isBoolean!EB); } /** * Detect whether we can treat T as a built-in integral type. Types $(D bool), * $(D char), $(D wchar), and $(D dchar) are not considered integral. */ template isIntegral(T) { enum bool isIntegral = is(IntegralTypeOf!T); } unittest { static assert(isIntegral!byte); static assert(isIntegral!(const(byte))); static assert(isIntegral!(immutable(byte))); static assert(isIntegral!(shared(byte))); static assert(isIntegral!(shared(const(byte)))); static assert(isIntegral!ubyte); static assert(isIntegral!(const(ubyte))); static assert(isIntegral!(immutable(ubyte))); static assert(isIntegral!(shared(ubyte))); static assert(isIntegral!(shared(const(ubyte)))); static assert(isIntegral!short); static assert(isIntegral!(const(short))); static assert(isIntegral!(immutable(short))); static assert(isIntegral!(shared(short))); static assert(isIntegral!(shared(const(short)))); static assert(isIntegral!ushort); static assert(isIntegral!(const(ushort))); static assert(isIntegral!(immutable(ushort))); static assert(isIntegral!(shared(ushort))); static assert(isIntegral!(shared(const(ushort)))); static assert(isIntegral!int); static assert(isIntegral!(const(int))); static assert(isIntegral!(immutable(int))); static assert(isIntegral!(shared(int))); static assert(isIntegral!(shared(const(int)))); static assert(isIntegral!uint); static assert(isIntegral!(const(uint))); static assert(isIntegral!(immutable(uint))); static assert(isIntegral!(shared(uint))); static assert(isIntegral!(shared(const(uint)))); static assert(isIntegral!long); static assert(isIntegral!(const(long))); static assert(isIntegral!(immutable(long))); static assert(isIntegral!(shared(long))); static assert(isIntegral!(shared(const(long)))); static assert(isIntegral!ulong); static assert(isIntegral!(const(ulong))); static assert(isIntegral!(immutable(ulong))); static assert(isIntegral!(shared(ulong))); static assert(isIntegral!(shared(const(ulong)))); static assert(!isIntegral!float); enum EU : uint { a = 0, b = 1, c = 2 } // base type is unsigned enum EI : int { a = -1, b = 0, c = 1 } // base type is signed (bug 7909) static assert(isIntegral!EU && isUnsigned!EU && !isSigned!EU); static assert(isIntegral!EI && !isUnsigned!EI && isSigned!EI); } /** * Detect whether we can treat T as a built-in floating point type. */ template isFloatingPoint(T) { enum bool isFloatingPoint = is(FloatingPointTypeOf!T); } unittest { foreach (F; TypeTuple!(float, double, real)) { F a = 5.5; const F b = 5.5; immutable F c = 5.5; static assert(isFloatingPoint!(typeof(a))); static assert(isFloatingPoint!(typeof(b))); static assert(isFloatingPoint!(typeof(c))); } foreach (T; TypeTuple!(int, long, char)) { T a; const T b = 0; immutable T c = 0; static assert(!isFloatingPoint!(typeof(a))); static assert(!isFloatingPoint!(typeof(b))); static assert(!isFloatingPoint!(typeof(c))); } enum EF : real { a = 1.414, b = 1.732, c = 2.236 } static assert( isFloatingPoint!EF); } /** Detect whether we can treat T as a built-in numeric type (integral or floating point). */ template isNumeric(T) { enum bool isNumeric = is(NumericTypeOf!T); } /** Detect whether T is a scalar type. */ template isScalarType(T) { enum bool isScalarType = isNumeric!T || isSomeChar!T || isBoolean!T; } unittest { static assert(!isScalarType!void); static assert( isScalarType!(immutable(int))); static assert( isScalarType!(shared(float))); static assert( isScalarType!(shared(const bool))); static assert( isScalarType!(const(dchar))); } /** Detect whether T is a basic type. */ template isBasicType(T) { enum bool isBasicType = isScalarType!T || is(T == void); } unittest { static assert(isBasicType!void); static assert(isBasicType!(immutable(int))); static assert(isBasicType!(shared(float))); static assert(isBasicType!(shared(const bool))); static assert(isBasicType!(const(dchar))); } /** Detect whether $(D T) is a built-in unsigned numeric type. */ template isUnsigned(T) { enum bool isUnsigned = is(UnsignedTypeOf!T); } /** Detect whether $(D T) is a built-in signed numeric type. */ template isSigned(T) { enum bool isSigned = is(SignedTypeOf!T); } /** Detect whether we can treat T as one of the built-in character types. */ template isSomeChar(T) { enum isSomeChar = is(CharTypeOf!T); } unittest { static assert( isSomeChar!char); static assert( isSomeChar!dchar); static assert( isSomeChar!(immutable(char))); static assert(!isSomeChar!int); static assert(!isSomeChar!int); static assert(!isSomeChar!byte); static assert(!isSomeChar!string); static assert(!isSomeChar!wstring); static assert(!isSomeChar!dstring); static assert(!isSomeChar!(char[4])); enum EC : char { a = 'x', b = 'y' } static assert( isSomeChar!EC); } /** Detect whether we can treat T as one of the built-in string types. */ template isSomeString(T) { static if (is(T == typeof(null))) { // It is impossible to determine exact string type from typeof(null) - // it means that StringTypeOf!(typeof(null)) is undefined. // Then this behavior is convenient for template constraint. enum isSomeString = false; } else enum isSomeString = isNarrowString!T || is(T : const(dchar[])); } unittest { static assert( isSomeString!(char[])); static assert( isSomeString!(dchar[])); static assert( isSomeString!string); static assert( isSomeString!wstring); static assert( isSomeString!dstring); static assert( isSomeString!(char[4])); static assert(!isSomeString!int); static assert(!isSomeString!(int[])); static assert(!isSomeString!(byte[])); static assert(!isSomeString!(typeof(null))); enum ES : string { a = "aaa", b = "bbb" } static assert( isSomeString!ES); } template isNarrowString(T) { enum isNarrowString = is(T : const(char[])) || is(T : const(wchar[])); } unittest { static assert( isNarrowString!(char[])); static assert( isNarrowString!string); static assert( isNarrowString!wstring); static assert( isNarrowString!(char[4])); static assert(!isNarrowString!int); static assert(!isNarrowString!(int[])); static assert(!isNarrowString!(byte[])); static assert(!isNarrowString!(dchar[])); static assert(!isNarrowString!dstring); } /** * Detect whether type T is a static array. */ template isStaticArray(T : U[N], U, size_t N) { enum bool isStaticArray = true; } template isStaticArray(T) { enum bool isStaticArray = false; } unittest { static assert( isStaticArray!(int[51])); static assert( isStaticArray!(int[][2])); static assert( isStaticArray!(char[][int][11])); static assert( isStaticArray!(immutable char[13u])); static assert( isStaticArray!(const(real)[1])); static assert( isStaticArray!(const(real)[1][1])); static assert( isStaticArray!(void[0])); static assert(!isStaticArray!(const(int)[])); static assert(!isStaticArray!(immutable(int)[])); static assert(!isStaticArray!(const(int)[4][])); static assert(!isStaticArray!(int[])); static assert(!isStaticArray!(int[char])); static assert(!isStaticArray!(int[1][])); static assert(!isStaticArray!(int[int])); static assert(!isStaticArray!int); //enum ESA : int[1] { a = [1], b = [2] } //static assert( isStaticArray!ESA); } /** * Detect whether type T is a dynamic array. */ template isDynamicArray(T, U = void) { enum bool isDynamicArray = false; } template isDynamicArray(T : U[], U) { enum bool isDynamicArray = !isStaticArray!T; } unittest { static assert( isDynamicArray!(int[])); static assert(!isDynamicArray!(int[5])); static assert(!isDynamicArray!(typeof(null))); //enum EDA : int[] { a = [1], b = [2] } //static assert( isDynamicArray!EDA); } /** * Detect whether type T is an array. */ template isArray(T) { enum bool isArray = isStaticArray!T || isDynamicArray!T; } unittest { static assert( isArray!(int[])); static assert( isArray!(int[5])); static assert( isArray!(void[])); static assert(!isArray!uint); static assert(!isArray!(uint[uint])); static assert(!isArray!(typeof(null))); } /** * Detect whether T is an associative array type */ template isAssociativeArray(T) { enum bool isAssociativeArray = is(AssocArrayTypeOf!T); } unittest { struct Foo { @property uint[] keys() { return null; } @property uint[] values() { return null; } } static assert( isAssociativeArray!(int[int])); static assert( isAssociativeArray!(int[string])); static assert( isAssociativeArray!(immutable(char[5])[int])); static assert(!isAssociativeArray!Foo); static assert(!isAssociativeArray!int); static assert(!isAssociativeArray!(int[])); static assert(!isAssociativeArray!(typeof(null))); //enum EAA : int[int] { a = [1:1], b = [2:2] } //static assert( isAssociativeArray!EAA); } template isBuiltinType(T) { enum isBuiltinType = is(BuiltinTypeOf!T); } /** * Detect whether type $(D T) is a pointer. */ template isPointer(T) { static if (is(T P == U*, U)) { enum bool isPointer = true; } else { enum bool isPointer = false; } } unittest { static assert( isPointer!(int*)); static assert( isPointer!(void*)); static assert(!isPointer!uint); static assert(!isPointer!(uint[uint])); static assert(!isPointer!(char[])); static assert(!isPointer!(typeof(null))); } /** Returns the target type of a pointer. */ template PointerTarget(T : T*) { alias T PointerTarget; } /// $(RED Scheduled for deprecation. Please use $(LREF PointerTarget) instead.) alias PointerTarget pointerTarget; unittest { static assert( is(PointerTarget!(int*) == int)); static assert( is(PointerTarget!(long*) == long)); static assert(!is(PointerTarget!int)); } /** * Detect whether type $(D T) is an aggregate type. */ template isAggregateType(T) { enum isAggregateType = is(T == struct) || is(T == union) || is(T == class) || is(T == interface); } /** * Returns $(D true) if T can be iterated over using a $(D foreach) loop with * a single loop variable of automatically inferred type, regardless of how * the $(D foreach) loop is implemented. This includes ranges, structs/classes * that define $(D opApply) with a single loop variable, and builtin dynamic, * static and associative arrays. */ template isIterable(T) { enum isIterable = is(typeof({ foreach(elem; T.init) {} })); } unittest { struct OpApply { int opApply(int delegate(ref uint) dg) { assert(0); } } struct Range { @property uint front() { assert(0); } void popFront() { assert(0); } enum bool empty = false; } static assert( isIterable!(uint[])); static assert( isIterable!OpApply); static assert( isIterable!(uint[string])); static assert( isIterable!Range); static assert(!isIterable!uint); } /** * Returns true if T is not const or immutable. Note that isMutable is true for * string, or immutable(char)[], because the 'head' is mutable. */ template isMutable(T) { enum isMutable = !is(T == const) && !is(T == immutable) && !is(T == inout); } unittest { static assert( isMutable!int); static assert( isMutable!string); static assert( isMutable!(shared int)); static assert( isMutable!(shared const(int)[])); static assert(!isMutable!(const int)); static assert(!isMutable!(inout int)); static assert(!isMutable!(shared(const int))); static assert(!isMutable!(shared(inout int))); static assert(!isMutable!(immutable string)); } /** * Tells whether the tuple T is an expression tuple. */ template isExpressionTuple(T ...) { static if (T.length > 0) enum bool isExpressionTuple = !is(T[0]) && __traits(compiles, { auto ex = T[0]; }) && isExpressionTuple!(T[1 .. $]); else enum bool isExpressionTuple = true; // default } unittest { void foo(); static int bar() { return 42; } enum aa = [ 1: -1 ]; alias int myint; static assert( isExpressionTuple!(42)); static assert( isExpressionTuple!aa); static assert( isExpressionTuple!("cattywampus", 2.7, aa)); static assert( isExpressionTuple!(bar())); static assert(!isExpressionTuple!isExpressionTuple); static assert(!isExpressionTuple!foo); static assert(!isExpressionTuple!( (a) { } )); static assert(!isExpressionTuple!int); static assert(!isExpressionTuple!myint); } /** Detect whether tuple $(D T) is a type tuple. */ template isTypeTuple(T...) { static if (T.length > 0) enum bool isTypeTuple = is(T[0]) && isTypeTuple!(T[1 .. $]); else enum bool isTypeTuple = true; // default } unittest { class C {} void func(int) {} auto c = new C; enum CONST = 42; static assert( isTypeTuple!int); static assert( isTypeTuple!string); static assert( isTypeTuple!C); static assert( isTypeTuple!(typeof(func))); static assert( isTypeTuple!(int, char, double)); static assert(!isTypeTuple!c); static assert(!isTypeTuple!isTypeTuple); static assert(!isTypeTuple!CONST); } /** Detect whether symbol or type $(D T) is a function pointer. */ template isFunctionPointer(T...) if (T.length == 1) { static if (is(T[0] U) || is(typeof(T[0]) U)) { static if (is(U F : F*) && is(F == function)) enum bool isFunctionPointer = true; else enum bool isFunctionPointer = false; } else enum bool isFunctionPointer = false; } unittest { static void foo() {} void bar() {} auto fpfoo = &foo; static assert( isFunctionPointer!fpfoo); static assert( isFunctionPointer!(void function())); auto dgbar = &bar; static assert(!isFunctionPointer!dgbar); static assert(!isFunctionPointer!(void delegate())); static assert(!isFunctionPointer!foo); static assert(!isFunctionPointer!bar); static assert( isFunctionPointer!((int a) {})); } /** Detect whether $(D T) is a delegate. */ template isDelegate(T...) if(T.length == 1) { enum bool isDelegate = is(T[0] == delegate); } unittest { static assert( isDelegate!(void delegate())); static assert( isDelegate!(uint delegate(uint))); static assert( isDelegate!(shared uint delegate(uint))); static assert(!isDelegate!uint); static assert(!isDelegate!(void function())); } /** Detect whether symbol or type $(D T) is a function, a function pointer or a delegate. */ template isSomeFunction(T...) if (T.length == 1) { static if (is(typeof(& T[0]) U : U*) && is(U == function) || is(typeof(& T[0]) U == delegate)) { // T is a (nested) function symbol. enum bool isSomeFunction = true; } else static if (is(T[0] W) || is(typeof(T[0]) W)) { // T is an expression or a type. Take the type of it and examine. static if (is(W F : F*) && is(F == function)) enum bool isSomeFunction = true; // function pointer else enum bool isSomeFunction = is(W == function) || is(W == delegate); } else enum bool isSomeFunction = false; } unittest { static real func(ref int) { return 0; } static void prop() @property { } void nestedFunc() { } void nestedProp() @property { } class C { real method(ref int) { return 0; } real prop() @property { return 0; } } auto c = new C; auto fp = &func; auto dg = &c.method; real val; static assert( isSomeFunction!func); static assert( isSomeFunction!prop); static assert( isSomeFunction!nestedFunc); static assert( isSomeFunction!nestedProp); static assert( isSomeFunction!(C.method)); static assert( isSomeFunction!(C.prop)); static assert( isSomeFunction!(c.prop)); static assert( isSomeFunction!(c.prop)); static assert( isSomeFunction!fp); static assert( isSomeFunction!dg); static assert( isSomeFunction!(typeof(func))); static assert( isSomeFunction!(real function(ref int))); static assert( isSomeFunction!(real delegate(ref int))); static assert( isSomeFunction!((int a) { return a; })); static assert(!isSomeFunction!int); static assert(!isSomeFunction!val); static assert(!isSomeFunction!isSomeFunction); } /** Detect whether $(D T) is a callable object, which can be called with the function call operator $(D $(LPAREN)...$(RPAREN)). */ template isCallable(T...) if (T.length == 1) { static if (is(typeof(& T[0].opCall) == delegate)) // T is a object which has a member function opCall(). enum bool isCallable = true; else static if (is(typeof(& T[0].opCall) V : V*) && is(V == function)) // T is a type which has a static member function opCall(). enum bool isCallable = true; else enum bool isCallable = isSomeFunction!T; } unittest { interface I { real value() @property; } struct S { static int opCall(int) { return 0; } } class C { int opCall(int) { return 0; } } auto c = new C; static assert( isCallable!c); static assert( isCallable!S); static assert( isCallable!(c.opCall)); static assert( isCallable!(I.value)); static assert( isCallable!((int a) { return a; })); static assert(!isCallable!I); } /** Exactly the same as the builtin traits: $(D ___traits(_isAbstractFunction, method)). */ template isAbstractFunction(method...) if (method.length == 1) { enum bool isAbstractFunction = __traits(isAbstractFunction, method[0]); } //:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::// // General Types //:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::// /** Removes all qualifiers, if any, from type $(D T). Example: ---- static assert(is(Unqual!int == int)); static assert(is(Unqual!(const int) == int)); static assert(is(Unqual!(immutable int) == int)); static assert(is(Unqual!(shared int) == int)); static assert(is(Unqual!(shared(const int)) == int)); ---- */ template Unqual(T) { version (none) // Error: recursive alias declaration @@@BUG1308@@@ { static if (is(T U == const U)) alias Unqual!U Unqual; else static if (is(T U == immutable U)) alias Unqual!U Unqual; else static if (is(T U == inout U)) alias Unqual!U Unqual; else static if (is(T U == shared U)) alias Unqual!U Unqual; else alias T Unqual; } else // workaround { static if (is(T U == shared(const U))) alias U Unqual; else static if (is(T U == const U )) alias U Unqual; else static if (is(T U == immutable U )) alias U Unqual; else static if (is(T U == inout U )) alias U Unqual; else static if (is(T U == shared U )) alias U Unqual; else alias T Unqual; } } unittest { static assert(is(Unqual!int == int)); static assert(is(Unqual!(const int) == int)); static assert(is(Unqual!(immutable int) == int)); static assert(is(Unqual!(inout int) == int)); static assert(is(Unqual!(shared int) == int)); static assert(is(Unqual!(shared(const int)) == int)); alias immutable(int[]) ImmIntArr; static assert(is(Unqual!ImmIntArr == immutable(int)[])); } // [For internal use] private template ModifyTypePreservingSTC(alias Modifier, T) { static if (is(T U == shared(const U))) alias shared(const Modifier!U) ModifyTypePreservingSTC; else static if (is(T U == const U )) alias const(Modifier!U) ModifyTypePreservingSTC; else static if (is(T U == immutable U )) alias immutable(Modifier!U) ModifyTypePreservingSTC; else static if (is(T U == shared U )) alias shared(Modifier!U) ModifyTypePreservingSTC; else alias Modifier!T ModifyTypePreservingSTC; } unittest { static assert(is(ModifyTypePreservingSTC!(Intify, const real) == const int)); static assert(is(ModifyTypePreservingSTC!(Intify, immutable real) == immutable int)); static assert(is(ModifyTypePreservingSTC!(Intify, shared real) == shared int)); static assert(is(ModifyTypePreservingSTC!(Intify, shared(const real)) == shared(const int))); } version (unittest) private template Intify(T) { alias int Intify; } /** Returns the inferred type of the loop variable when a variable of type T is iterated over using a $(D foreach) loop with a single loop variable and automatically inferred return type. Note that this may not be the same as $(D std.range.ElementType!Range) in the case of narrow strings, or if T has both opApply and a range interface. */ template ForeachType(T) { alias ReturnType!(typeof( (inout int x = 0) { foreach(elem; T.init) { return elem; } assert(0); })) ForeachType; } unittest { static assert(is(ForeachType!(uint[]) == uint)); static assert(is(ForeachType!string == immutable(char))); static assert(is(ForeachType!(string[string]) == string)); static assert(is(ForeachType!(inout(int)[]) == inout(int))); } /** Strips off all $(D typedef)s (including $(D enum) ones) from type $(D T). Example: -------------------- enum E : int { a } typedef E F; typedef const F G; static assert(is(OriginalType!G == const int)); -------------------- */ template OriginalType(T) { template Impl(T) { static if (is(T U == typedef)) alias OriginalType!U Impl; else static if (is(T U == enum)) alias OriginalType!U Impl; else alias T Impl; } alias ModifyTypePreservingSTC!(Impl, T) OriginalType; } unittest { //typedef real T; //typedef T U; //enum V : U { a } //static assert(is(OriginalType!T == real)); //static assert(is(OriginalType!U == real)); //static assert(is(OriginalType!V == real)); enum E : real { a } enum F : E { a = E.a } //typedef const F G; static assert(is(OriginalType!E == real)); static assert(is(OriginalType!F == real)); //static assert(is(OriginalType!G == const real)); } /** * Get the Key type of an Associative Array. * Example: * --- * import std.traits; * alias int[string] Hash; * static assert(is(KeyType!Hash == string)); * KeyType!Hash str = "string"; // str is declared as string * --- */ template KeyType(V : V[K], K) { alias K KeyType; } /** * Get the Value type of an Associative Array. * Example: * --- * import std.traits; * alias int[string] Hash; * static assert(is(ValueType!Hash == int)); * ValueType!Hash num = 1; // num is declared as int * --- */ template ValueType(V : V[K], K) { alias V ValueType; } unittest { alias int[string] Hash; static assert(is(KeyType!Hash == string)); static assert(is(ValueType!Hash == int)); KeyType!Hash str = "a"; ValueType!Hash num = 1; } /** * Returns the corresponding unsigned type for T. T must be a numeric * integral type, otherwise a compile-time error occurs. */ template Unsigned(T) { template Impl(T) { static if (is(UnsignedTypeOf!T X)) alias X Impl; else static if (is(SignedTypeOf!T X)) { static if (is(X == byte )) alias ubyte Impl; static if (is(X == short)) alias ushort Impl; static if (is(X == int )) alias uint Impl; static if (is(X == long )) alias ulong Impl; } else static assert(false, "Type " ~ T.stringof ~ " does not have an Unsigned counterpart"); } alias ModifyTypePreservingSTC!(Impl, OriginalType!T) Unsigned; } unittest { alias Unsigned!int U1; alias Unsigned!(const(int)) U2; alias Unsigned!(immutable(int)) U3; static assert(is(U1 == uint)); static assert(is(U2 == const(uint))); static assert(is(U3 == immutable(uint))); //struct S {} //alias Unsigned!S U2; //alias Unsigned!double U3; } /** Returns the largest type, i.e. T such that T.sizeof is the largest. If more than one type is of the same size, the leftmost argument of these in will be returned. */ template Largest(T...) if(T.length >= 1) { static if (T.length == 1) { alias T[0] Largest; } else static if (T.length == 2) { static if(T[0].sizeof >= T[1].sizeof) { alias T[0] Largest; } else { alias T[1] Largest; } } else { alias Largest!(Largest!(T[0], T[1]), T[2..$]) Largest; } } unittest { static assert(is(Largest!(uint, ubyte, ulong, real) == real)); static assert(is(Largest!(ulong, double) == ulong)); static assert(is(Largest!(double, ulong) == double)); static assert(is(Largest!(uint, byte, double, short) == double)); } /** Returns the corresponding signed type for T. T must be a numeric integral type, otherwise a compile-time error occurs. */ template Signed(T) { template Impl(T) { static if (is(SignedTypeOf!T X)) alias X Impl; else static if (is(UnsignedTypeOf!T X)) { static if (is(X == ubyte )) alias byte Impl; static if (is(X == ushort)) alias short Impl; static if (is(X == uint )) alias int Impl; static if (is(X == ulong )) alias long Impl; } else static assert(false, "Type " ~ T.stringof ~ " does not have an Signed counterpart"); } alias ModifyTypePreservingSTC!(Impl, OriginalType!T) Signed; } unittest { alias Signed!uint S1; alias Signed!(const(uint)) S2; alias Signed!(immutable(uint)) S3; static assert(is(S1 == int)); static assert(is(S2 == const(int))); static assert(is(S3 == immutable(int))); } /** * Returns the corresponding unsigned value for $(D x), e.g. if $(D x) * has type $(D int), returns $(D cast(uint) x). The advantage * compared to the cast is that you do not need to rewrite the cast if * $(D x) later changes type to e.g. $(D long). */ auto unsigned(T)(T x) if (isIntegral!T) { static if (is(Unqual!T == byte )) return cast(ubyte ) x; else static if (is(Unqual!T == short)) return cast(ushort) x; else static if (is(Unqual!T == int )) return cast(uint ) x; else static if (is(Unqual!T == long )) return cast(ulong ) x; else { static assert(T.min == 0, "Bug in either unsigned or isIntegral"); return cast(Unqual!T) x; } } unittest { foreach(T; TypeTuple!(byte, ubyte)) { static assert(is(typeof(unsigned(cast(T)1)) == ubyte)); static assert(is(typeof(unsigned(cast(const T)1)) == ubyte)); static assert(is(typeof(unsigned(cast(immutable T)1)) == ubyte)); } foreach(T; TypeTuple!(short, ushort)) { static assert(is(typeof(unsigned(cast(T)1)) == ushort)); static assert(is(typeof(unsigned(cast(const T)1)) == ushort)); static assert(is(typeof(unsigned(cast(immutable T)1)) == ushort)); } foreach(T; TypeTuple!(int, uint)) { static assert(is(typeof(unsigned(cast(T)1)) == uint)); static assert(is(typeof(unsigned(cast(const T)1)) == uint)); static assert(is(typeof(unsigned(cast(immutable T)1)) == uint)); } foreach(T; TypeTuple!(long, ulong)) { static assert(is(typeof(unsigned(cast(T)1)) == ulong)); static assert(is(typeof(unsigned(cast(const T)1)) == ulong)); static assert(is(typeof(unsigned(cast(immutable T)1)) == ulong)); } } auto unsigned(T)(T x) if (isSomeChar!T) { // All characters are unsigned static assert(T.min == 0); return cast(Unqual!T) x; } unittest { foreach(T; TypeTuple!(char, wchar, dchar)) { static assert(is(typeof(unsigned(cast(T)'A')) == T)); static assert(is(typeof(unsigned(cast(const T)'A')) == T)); static assert(is(typeof(unsigned(cast(immutable T)'A')) == T)); } } /** Returns the most negative value of the numeric type T. */ template mostNegative(T) if(isNumeric!T || isSomeChar!T) { static if (is(typeof(T.min_normal))) enum mostNegative = -T.max; else static if (T.min == 0) enum byte mostNegative = 0; else enum mostNegative = T.min; } unittest { static assert(mostNegative!float == -float.max); static assert(mostNegative!double == -double.max); static assert(mostNegative!real == -real.max); foreach(T; TypeTuple!(byte, short, int, long)) static assert(mostNegative!T == T.min); foreach(T; TypeTuple!(ubyte, ushort, uint, ulong, char, wchar, dchar)) static assert(mostNegative!T == 0); } //::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::// // Misc. //::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::// /** Returns the mangled name of symbol or type $(D sth). $(D mangledName) is the same as builtin $(D .mangleof) property, except that the correct names of property functions are obtained. -------------------- module test; import std.traits : mangledName; class C { int value() @property; } pragma(msg, C.value.mangleof); // prints "i" pragma(msg, mangledName!(C.value)); // prints "_D4test1C5valueMFNdZi" -------------------- */ template mangledName(sth...) if (sth.length == 1) { static if (is(typeof(sth[0]) X) && is(X == void)) { // sth[0] is a template symbol enum string mangledName = removeDummyEnvelope(Dummy!sth.Hook.mangleof); } else { enum string mangledName = sth[0].mangleof; } } private template Dummy(T...) { struct Hook {} } private string removeDummyEnvelope(string s) { // remove --> S3std6traits ... Z4Hook s = s[12 .. $ - 6]; // remove --> DIGIT+ __T5Dummy foreach (i, c; s) { if (c < '0' || '9' < c) { s = s[i .. $]; break; } } s = s[9 .. $]; // __T5Dummy // remove --> T | V | S immutable kind = s[0]; s = s[1 .. $]; if (kind == 'S') // it's a symbol { /* * The mangled symbol name is packed in LName --> Number Name. Here * we are chopping off the useless preceding Number, which is the * length of Name in decimal notation. * * NOTE: n = m + Log(m) + 1; n = LName.length, m = Name.length. */ immutable n = s.length; size_t m_upb = 10; foreach (k; 1 .. 5) // k = Log(m_upb) { if (n < m_upb + k + 1) { // Now m_upb/10 <= m < m_upb; hence k = Log(m) + 1. s = s[k .. $]; break; } m_upb *= 10; } } return s; } unittest { //typedef int MyInt; //MyInt test() { return 0; } //static assert(mangledName!MyInt[$ - 7 .. $] == "T5MyInt"); // XXX depends on bug 4237 //static assert(mangledName!test[$ - 7 .. $] == "T5MyInt"); class C { int value() @property { return 0; } } static assert(mangledName!int == int.mangleof); static assert(mangledName!C == C.mangleof); static assert(mangledName!(C.value)[$ - 12 .. $] == "5valueMFNdZi"); static assert(mangledName!mangledName == "3std6traits11mangledName"); static assert(mangledName!removeDummyEnvelope == "_D3std6traits19removeDummyEnvelopeFAyaZAya"); int x; static assert(mangledName!((int a) { return a+x; }) == "DFNbNfiZi"); // nothrow safe } unittest { // Test for bug 5718 import std.demangle; int foo; assert(demangle(mangledName!foo)[$-7 .. $] == "int foo"); void bar(){} assert(demangle(mangledName!bar)[$-10 .. $] == "void bar()"); } // XXX Select & select should go to another module. (functional or algorithm?) /** Aliases itself to $(D T) if the boolean $(D condition) is $(D true) and to $(D F) otherwise. Example: ---- alias Select!(size_t.sizeof == 4, int, long) Int; ---- */ template Select(bool condition, T, F) { static if (condition) alias T Select; else alias F Select; } unittest { static assert(is(Select!(true, int, long) == int)); static assert(is(Select!(false, int, long) == long)); } /** If $(D cond) is $(D true), returns $(D a) without evaluating $(D b). Otherwise, returns $(D b) without evaluating $(D a). */ A select(bool cond : true, A, B)(A a, lazy B b) { return a; } /// Ditto B select(bool cond : false, A, B)(lazy A a, B b) { return b; } unittest { real pleasecallme() { return 0; } int dontcallme() { assert(0); } auto a = select!true(pleasecallme(), dontcallme()); auto b = select!false(dontcallme(), pleasecallme()); static assert(is(typeof(a) == real)); static assert(is(typeof(b) == real)); }
D
int main() { int a; int b; int c; int d; int z; a = ReadInteger(); b = ReadInteger(); c = ReadInteger(); d = ReadInteger(); z = a + b * c - d / a; Print(z); }
D
; Copyright (C) 2008 The Android Open Source Project ; ; Licensed under the Apache License, Version 2.0 (the "License"); ; you may not use this file except in compliance with the License. ; You may obtain a copy of the License at ; ; http://www.apache.org/licenses/LICENSE-2.0 ; ; Unless required by applicable law or agreed to in writing, software ; distributed under the License is distributed on an "AS IS" BASIS, ; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ; See the License for the specific language governing permissions and ; limitations under the License. .source T_invoke_virtual_range_10.java .class public dot.junit.opcodes.invoke_virtual_range.d.T_invoke_virtual_range_10 .super java/lang/Object .method static <clinit>()V return-void .end method .method public <init>()V .limit regs 2 invoke-direct {v1}, java/lang/Object/<init>()V return-void .end method .method public run()V .limit regs 1 invoke-virtual/range {v0}, dot.junit.opcodes.invoke_virtual_range.d.T_invoke_virtual_range_10/<clinit>()V return-void .end method
D
const int MAX_ITEMS = 150; const int MENU_EVENT_MAX = 9; class zCMenu { var int _vtbl; //0x0000 var string backPic; //0x0004 zSTRING var string backWorld; //0x0018 zSTRING var int posx; //0x001C int var int posy; //0x0020 int var int dimx; //0x0000 int var int dimy; //0x0000 int var int alpha; //0x0000 int var string musicThemeName; //0x0000 zSTRING var int eventTimerUpdateMSec; //0x0000 int var string itemID[MAX_ITEMS]; //0x0000 zSTRING var int flags; //0x0000 int var int defaultOutGame; //0x0000 int var int defaultInGame; //0x0000 int var int m_pWindow; //0x0000 zCViewWindow* var int m_pInnerWindow; //0x0000 zCViewWindow* var int m_exitState; //0x0000 enum { NONE, BACK, GO, FINISHED } var string name; //0x0000 zSTRING var int m_musicTheme; //zCMusicTheme* var int m_mainSel; //int var int m_screenInitDone; //zBOOL var int m_use_dimx; //int var int m_use_dimy; //int var int m_use_posx; //int var int m_use_posy; //int var int m_pViewInfo; //zCView* var int cursorVob; //zCVob* var int eventOccured[MENU_EVENT_MAX]; //zBOOL var int cursorEn; //zBOOL var int noneSelectable; //zBOOL var int registeredCPP; //zBOOL var int updateTimer; //int var int fxTimer; //float /* enum zTMenuItemSelAction { SEL_ACTION_UNDEF = 0, SEL_ACTION_BACK = 1, SEL_ACTION_STARTMENU = 2, SEL_ACTION_STARTITEM = 3, SEL_ACTION_CLOSE = 4, SEL_ACTION_CONCOMMANDS = 5, SEL_ACTION_PLAY_SOUND = 6, SEL_ACTION_EXECCOMMANDS = 7 };*/ var int forceSelAction; //zTMenuItemSelAction var string forceSelAction_S; //zSTRING var int forceSelActionItem; //zCMenuItem* var int forcedSelAction; //zBOOL //zCArray <zCMenuItem *> m_listItems; var int m_listItems_array; //zCMenuItem* var int m_listItems_numAlloc;//int var int m_listItems_numInArray;//int //[oCMenu_Status_only] //oCMenu_Status это подкласс, который дополнительно содержит свойства: //Чтобы не создавать отдельный класс ради этих свойств, см. ниже: //zCArray <oSMenuInfoAttribute> m_listAttributes; var int m_listAttributes_array; //oSMenuInfoAttribute* var int m_listAttributes_numAlloc; //int var int m_listAttributes_numInArray;//int //zCArray <oSMenuInfoTalent> m_listTalents; var int m_listTalents_array; //oSMenuInfoTalent* var int m_listTalents_numAlloc; //int var int m_listTalents_numInArray; //int //zCArray <oSMenuInfoArmor> m_listArmory; var int m_listArmory_array; //oSMenuInfoArmor* var int m_listArmory_numAlloc; //int var int m_listArmory_numInArray; //int //[/oCMenu_Status_only] }; //Спасибо Nico за следующие три класса: class oSMenuInfoAttribute { var string Name; var string Description; var int Value; var int MaxValue; var int Type; // 0 = HP, 1 = DEX, 2 = MANA, 3 = STR }; class oSMenuInfoTalent { var string Name; var string Description; var string SkillEnum; var int Value; var int Skill; }; class oSMenuInfoArmor { var int Value; // 0 = 1H, 1 = 2H, 2 = BOW, 3 = CROSSBOW }; //################################################################# // // zCView: Основа для большинства отображаемых элементов // //################################################################# //------------------------------------------------ // Строка текста для zCView: //------------------------------------------------ class zCViewText { var int _vtbl; var int posx; var int posy; var string text; //zSTRING //Ключевое свойство. var int font; //zCFont* var int timer; //zREAL //оставшееся время для PrintScreen, в течение которого текст будет отображаться? var int inPrintWin; //zBOOL //вероятно, для отображения через "Print", чтобы поднимать текст вверх. var int color; //zCOLOR var int timed; //zBOOL var int colored; //zBOOL //звучит интересно. Возможно, вы начнете с этого. }; //См. константы адресов для доступа к глобальному экрану zCView. /* zCViews инкапсулирует двумерные объекты, отображаемые на экране. * Например, текст или пункты меню. * * Для пунктов меню: * -Каждый пункт меню генерируется при первом обращении к нему. После этого он сохраняется до выхода из Готики. * -Каждый пункт меню сохраняет свой текст в zCMenuItem.m_listLines. * -Если в пункте меню должно что-то отображаться, он создает внутреннее окно "InnerWindow" и сохраняет ссылку на него в zCMenuItem.m_pInnerWindow. * -Каждое InnerWindow - это тоже zCView, и оно получает копию текста для отображения в пункте меню. * -Само InnerWindow сохраняет все свои строки текста (обычно одну) в zCView.textLines. "Нулевой" элемент такого списка всегда пуст. * -Текст из InnerWindow перерисовывается в каждом кадре. Как только пункт меню решает, что он больше не должен отображаться, InnerWindow уничтожается. */ class zCView { var int _vtbl; var int _zCInputCallBack_vtbl; //Еще одна _vtbl, т.к. zCView является наследником двух классов. /* enum zEViewFX { VIEW_FX_NONE, VIEW_FX_ZOOM, VIEW_FX_MAX }*/ var int m_bFillZ; //zBOOL var int next; //zCView* //enum zTviewID { VIEW_SCREEN,VIEW_VIEWPORT,VIEW_ITEM }; var int viewID; //zTviewID var int flags; //int var int intflags; //int var int ondesk; //zBOOL Flag if in list /* enum zTRnd_AlphaBlendFunc { zRND_ALPHA_FUNC_MAT_DEFAULT, zRND_ALPHA_FUNC_NONE, zRND_ALPHA_FUNC_BLEND, zRND_ALPHA_FUNC_ADD, zRND_ALPHA_FUNC_SUB, zRND_ALPHA_FUNC_MUL, zRND_ALPHA_FUNC_MUL2, zRND_ALPHA_FUNC_TEST, zRND_ALPHA_FUNC_BLEND_TEST }; */ var int alphafunc; //zTRnd_AlphaBlendFunc var int color; //zCOLOR b, g, r, a var int alpha; //int // Дочерние zCView //zList <zCView> childs var int childs_compare; //(*Compare)(zCView *ele1,zCView *ele2) var int childs_count; //int var int childs_last; //zCView* var int childs_wurzel; //zCView* var int owner; //zCView* var int backTex; //zCTexture* //В меню часто используются виртуальные координаты. var int vposx; //int var int vposy; //int var int vsizex; //int var int vsizey; //int //А это "реальные" координаты в пикселях var int pposx; //int var int pposy; //int var int psizex; //int var int psizey; //int //Шрифт var int font; //zCFont* var int fontColor; //zCOLOR //Текстовое окно: var int px1; //int var int py1; //int var int px2; //int var int py2; //int var int winx; //int // Координаты в Text-Win var int winy; //int //zCList <zCViewText> textLines; var int textLines_data; //zCViewText* var int textLines_next; //zCList <zCViewText>* var int scrollMaxTime; //zREAL var int scrollTimer; //zREAL /* enum zTViewFX: { VIEW_FX_NONE = 0, VIEW_FX_ZOOM = 1, VIEW_FX_FADE = VIEW_FX_ZOOM << 1, VIEW_FX_BOUNCE = VIEW_FX_FADE << 1, VIEW_FX_FORCE_DWORD = 0xffffffff }*/ var int fxOpen ; //zTViewFX var int fxClose ; //zTViewFX var int timeDialog ; //zREAL var int timeOpen ; //zREAL var int timeClose ; //zREAL var int speedOpen ; //zREAL var int speedClose ; //zREAL var int isOpen ; //zBOOL var int isClosed ; //zBOOL var int continueOpen ; //zBOOL var int continueClose; //zBOOL var int removeOnClose; //zBOOL var int resizeOnOpen ; //zBOOL var int maxTextLength; //int var string textMaxLength; //zSTRING var int posCurrent_0[2]; //zVEC2 var int posCurrent_1[2]; //zVEC2 var int posOpenClose_0[2]; //zVEC2 var int posOpenClose_1[2]; //zVEC2 }; const int MAX_USERSTRINGS = 10; const int MAX_SEL_ACTIONS = 5; const int MAX_USERVARS = 4; const int MAX_EVENTS = 10; class zCMenuItem { var int zCView__vtbl; var int zCInputCallBack_vtbl; var int zCView_m_bFillZ; var int zCView_next; var int zCView_viewID; var int zCView_flags; var int zCView_intflags; var int zCView_ondesk; var int zCView_alphafunc; var int zCView_color; var int zCView_alpha; var int zCView_compare; var int zCView_childs_count; var int zCView_childs_last; var int zCView_childs_wurzel; var int zCView_childs_owner; var int zCView_backTex; var int zCView_vposx; var int zCView_vposy; var int zCView_vsizex; var int zCView_vsizey; var int zCView_pposx; var int zCView_pposy; var int zCView_psizex; var int zCView_psizey; var int zCView_font; var int zCView_fontColor; var int zCView_px1; var int zCView_py1; var int zCView_px2; var int zCView_py2; var int zCView_winx; var int zCView_winy; var int zCView_textLines_data; var int zCView_textLines_next; var int zCView_scrollMaxTime; var int zCView_scrollTimer; var int zCView_fxOpen ; var int zCView_fxClose ; var int zCView_timeDialog ; var int zCView_timeOpen ; var int zCView_timeClose ; var int zCView_speedOpen ; var int zCView_speedClose ; var int zCView_isOpen ; var int zCView_isClosed ; var int zCView_continueOpen ; var int zCView_continueClose; var int zCView_removeOnClose; var int zCView_resizeOnOpen ; var int zCView_maxTextLength; var string zCView_textMaxLength; var int zCView_posCurrent_0[2]; var int zCView_posCurrent_1[2]; var int zCView_posOpenClose_0[2]; var int zCView_posOpenClose_1[2]; //Parser Start //начало парсера var string m_parFontName; //zSTRING var string m_parText [MAX_USERSTRINGS]; //zSTRING var string m_parBackPic; //zSTRING var string m_parAlphaMode; //zSTRING var int m_parAlpha; //int var int m_parType; //int var int m_parOnSelAction [MAX_SEL_ACTIONS] ; //int var string m_parOnSelAction_S [MAX_SEL_ACTIONS]; //zSTRING var string m_parOnChgSetOption; //zSTRING var string m_parOnChgSetOptionSection; //zSTRING var int m_parOnEventAction [MAX_EVENTS]; //int var int m_parPosX; //int var int m_parPosY; //int var int m_parDimX; //int var int m_parDimY; //int var int m_parSizeStartScale; //float var int m_parItemFlags; //int var int m_parOpenDelayTime; //float var int m_parOpenDuration; //float var int m_parUserFloat [MAX_USERVARS]; //float var string m_parUserString [MAX_USERVARS]; //zSTRING var int m_parFrameSizeX; //int var int m_parFrameSizeY; //int var string m_parHideIfOptionSectionSet; //zSTRING var string m_parHideIfOptionSet; //zSTRING var int m_parHideOnValue; //int //Parser End //конец парсера var int m_iRefCtr; //int var int m_pInnerWindow; //zCView* var int m_pFont; //zCFont* var int m_pFontHi; //zCFont* var int m_pFontSel; //zCFont* var int m_pFontDis; //zCFont* var int m_bViewInitialized; //zBOOL var int m_bLeaveItem; //zBOOL var int m_bVisible; //zBOOL var int m_bDontRender; //zBOOL //zCArray<zSTRING> m_listLines; var int m_listLines_array; //zSTRING* var int m_listLines_numAlloc; //int var int m_listLines_numInArray;//int var string id; //zSTRING var int inserted; //zBOOL var int changed; //zBOOL var int active; //zBOOL var int open; //zBOOL var int close; //zBOOL var int opened; //zBOOL var int closed; //zBOOL var int disabled; //zBOOL var int orgWin; //zCView* var int fxTimer; //float var int openDelayTimer; //float var int activeTimer; //float var int registeredCPP; //zBOOL var int firstTimeInserted; //zBOOL }; //################################################################# // // Тоже zCView, но с отличиями: // //################################################################# class oCViewStatusBar { var int zCView__vtbl; var int _zCInputCallBack_vtbl; var int zCView_m_bFillZ; var int zCView_next; var int zCView_viewID; var int zCView_flags; var int zCView_intflags; var int zCView_ondesk; var int zCView_alphafunc; var int zCView_color; var int zCView_alpha; var int zCView_compare; var int zCView_childs_count; var int zCView_childs_last; var int zCView_childs_wurzel; var int zCView_childs_owner; var int zCView_backTex; var int zCView_vposx; var int zCView_vposy; var int zCView_vsizex; var int zCView_vsizey; var int zCView_pposx; var int zCView_pposy; var int zCView_psizex; var int zCView_psizey; var int zCView_font; var int zCView_fontColor; var int zCView_px1; var int zCView_py1; var int zCView_px2; var int zCView_py2; var int zCView_winx; var int zCView_winy; var int zCView_textLines_data; var int zCView_textLines_next; var int zCView_scrollMaxTime; var int zCView_scrollTimer; var int zCView_fxOpen ; var int zCView_fxClose ; var int zCView_timeDialog ; var int zCView_timeOpen ; var int zCView_timeClose ; var int zCView_speedOpen ; var int zCView_speedClose ; var int zCView_isOpen ; var int zCView_isClosed ; var int zCView_continueOpen ; var int zCView_continueClose; var int zCView_removeOnClose; var int zCView_resizeOnOpen ; var int zCView_maxTextLength; var string zCView_textMaxLength; var int zCView_posCurrent_0[2]; var int zCView_posCurrent_1[2]; var int zCView_posOpenClose_0[2]; var int zCView_posOpenClose_1[2]; var int minLow, maxHigh; //zREAL var int low, high; //zREAL var int previewValue; //zREAL var int currentValue; //zREAL var int scale; //float var int range_bar; //zCView* var int value_bar; //zCView* var string texView; //zSTRING var string texRange; //zSTRING var string texValue; //zSTRING }; //################################################################# // // Вероятно, довольно бесполезный, сначала я думал этот класс // окажется более важным. Все важные элементы, // такие как меню персонажа, отображаются в обычных // zCMenuItems. zCMenuItemText (без исключений) используется // для прямоугольников выделения (в настройках: выбор [да|нет]) // //################################################################# class zCMenuItemText { var int zCView__vtbl; var int _zCInputCallBack_vtbl; var int zCView_m_bFillZ; var int zCView_next; var int zCView_viewID; var int zCView_flags; var int zCView_intflags; var int zCView_ondesk; var int zCView_alphafunc; var int zCView_color; var int zCView_alpha; var int zCView_compare; var int zCView_childs_count; var int zCView_childs_last; var int zCView_childs_wurzel; var int zCView_childs_owner; var int zCView_backTex; var int zCView_vposx; var int zCView_vposy; var int zCView_vsizex; var int zCView_vsizey; var int zCView_pposx; var int zCView_pposy; var int zCView_psizex; var int zCView_psizey; var int zCView_font; var int zCView_fontColor; var int zCView_px1; var int zCView_py1; var int zCView_px2; var int zCView_py2; var int zCView_winx; var int zCView_winy; var int zCView_textLines_data; var int zCView_textLines_next; var int zCView_scrollMaxTime; var int zCView_scrollTimer; var int zCView_fxOpen ; var int zCView_fxClose ; var int zCView_timeDialog ; var int zCView_timeOpen ; var int zCView_timeClose ; var int zCView_speedOpen ; var int zCView_speedClose ; var int zCView_isOpen ; var int zCView_isClosed ; var int zCView_continueOpen ; var int zCView_continueClose; var int zCView_removeOnClose; var int zCView_resizeOnOpen ; var int zCView_maxTextLength; var string zCView_textMaxLength; var int zCView_posCurrent_0[2]; var int zCView_posCurrent_1[2]; var int zCView_posOpenClose_0[2]; var int zCView_posOpenClose_1[2]; var string _zCMenuItem_m_parFontName; var string _zCMenuItem_m_parText [MAX_USERSTRINGS]; var string _zCMenuItem_m_parBackPic; var string _zCMenuItem_m_parAlphaMode; var int _zCMenuItem_m_parAlpha; var int _zCMenuItem_m_parType; var int _zCMenuItem_m_parOnSelAction [MAX_SEL_ACTIONS] ; var string _zCMenuItem_m_parOnSelAction_S [MAX_SEL_ACTIONS]; var string _zCMenuItem_m_parOnChgSetOption; var string _zCMenuItem_m_parOnChgSetOptionSection; var int _zCMenuItem_m_parOnEventAction [MAX_EVENTS]; var int _zCMenuItem_m_parPosX; var int _zCMenuItem_m_parPosY; var int _zCMenuItem_m_parDimX; var int _zCMenuItem_m_parDimY; var int _zCMenuItem_m_parSizeStartScale; var int _zCMenuItem_m_parItemFlags; var int _zCMenuItem_m_parOpenDelayTime; var int _zCMenuItem_m_parOpenDuration; var int _zCMenuItem_m_parUserFloat [MAX_USERVARS]; var string _zCMenuItem_m_parUserString [MAX_USERVARS]; var int _zCMenuItem_m_parFrameSizeX; var int _zCMenuItem_m_parFrameSizeY; var string _zCMenuItem_m_parHideIfOptionSectionSet; var string _zCMenuItem_m_parHideIfOptionSet; var int _zCMenuItem_m_parHideOnValue; var int _zCMenuItem_m_iRefCtr; var int _zCMenuItem_m_pInnerWindow; var int _zCMenuItem_m_pFont; var int _zCMenuItem_m_pFontHi; var int _zCMenuItem_m_pFontSel; var int _zCMenuItem_m_pFontDis; var int _zCMenuItem_m_bViewInitialized; var int _zCMenuItem_m_bLeaveItem; var int _zCMenuItem_m_bVisible; var int _zCMenuItem_m_bDontRender; var int _zCMenuItem_m_listLines_array; var int _zCMenuItem_m_listLines_numAlloc; var int _zCMenuItem_m_listLines_numInArray; var string _zCMenuItem_id; var int _zCMenuItem_inserted; var int _zCMenuItem_changed; var int _zCMenuItem_active; var int _zCMenuItem_open; var int _zCMenuItem_close; var int _zCMenuItem_opened; var int _zCMenuItem_closed; var int _zCMenuItem_disabled; var int _zCMenuItem_orgWin; var int _zCMenuItem_fxTimer; var int _zCMenuItem_openDelayTimer; var int _zCMenuItem_activeTimer; var int _zCMenuItem_registeredCPP; var int _zCMenuItem_firstTimeInserted; /* enum { MODE_SIMPLE, MODE_ENUM, MODE_MULTILINE } */ var int m_mode; //siehe enum var string m_fullText; //zSTRING var int m_numOptions; //int //Относится к меню со списком выбора, где можно, например выбрать "вкл." или "выкл." var int m_topLine; //int var int m_viewLines; //int var int m_numLines; //int var int m_unformated; //zBOOL };
D
/Users/MohamedNawar/Desktop/Task/build/Pods.build/Debug-iphonesimulator/CryptoSwift.build/Objects-normal/x86_64/AES+Foundation.o : /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/ChaCha20.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/SHA1.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/PKCS/PBKDF1.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/SHA2.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/PKCS/PBKDF2.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/SHA3.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/Poly1305.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/AEAD/AEADChaCha20Poly1305.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/MD5.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/PKCS/PKCS5.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/PKCS/PKCS7.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/UInt128.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/BlockMode/ECB.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/BlockMode/CFB.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/BlockMode/OFB.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/CMAC.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/CBCMAC.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/HMAC.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/BlockMode/CBC.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/BlockMode/PCBC.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/AEAD/AEAD.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/HKDF.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/BlockMode/CCM.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/BlockMode/GCM.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/BlockMode/CTR.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/AES.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/BlockMode/BlockMode.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/Updatable.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/DigestType.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/Padding.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/ISO78164Padding.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/PKCS/PKCS7Padding.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/NoPadding.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/ZeroPadding.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/Blowfish.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/Checksum.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/UInt32+Extension.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/UInt64+Extension.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/UInt16+Extension.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/UInt8+Extension.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/Foundation/Data+Extension.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/String+Extension.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/Collection+Extension.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/Int+Extension.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/Array+Extension.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/Foundation/String+FoundationExtension.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/Foundation/ChaCha20+Foundation.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/Foundation/HMAC+Foundation.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/Foundation/AES+Foundation.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/Foundation/Blowfish+Foundation.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/Foundation/Utils+Foundation.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/Foundation/Rabbit+Foundation.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/Foundation/Array+Foundation.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/BatchedCollection.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/CompactMap.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/Cipher.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/BlockCipher.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/BlockMode/CipherModeWorker.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/Authenticator.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/Cryptor.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/BlockDecryptor.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/StreamDecryptor.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/BlockEncryptor.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/StreamEncryptor.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/Generics.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/SecureBytes.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/Utils.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/BlockMode/BlockModeOptions.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/Operators.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/AES.Cryptors.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/Cryptors.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/Bit.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/Rabbit.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/Scrypt.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/Digest.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/ObjectiveC.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/CoreImage.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/QuartzCore.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Dispatch.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Metal.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Darwin.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Foundation.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/CoreFoundation.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/CoreGraphics.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Swift.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/UIKit.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/SwiftOnoneSupport.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Combine.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Users/MohamedNawar/Desktop/Task/Pods/Target\ Support\ Files/CryptoSwift/CryptoSwift-umbrella.h /Users/MohamedNawar/Desktop/Task/build/Pods.build/Debug-iphonesimulator/CryptoSwift.build/unextended-module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.5.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.5.sdk/System/Library/Frameworks/OpenGLES.framework/Headers/OpenGLES.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.5.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImage.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.5.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/QuartzCore.apinotes /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/apinotes/Dispatch.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.5.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.5.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.5.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.5.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.5.sdk/System/Library/Frameworks/UserNotifications.framework/Headers/UserNotifications.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.5.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.5.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.5.sdk/System/Library/Frameworks/Security.framework/Headers/Security.apinotes /Users/MohamedNawar/Desktop/Task/build/Pods.build/Debug-iphonesimulator/CryptoSwift.build/Objects-normal/x86_64/AES+Foundation~partial.swiftmodule : /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/ChaCha20.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/SHA1.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/PKCS/PBKDF1.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/SHA2.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/PKCS/PBKDF2.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/SHA3.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/Poly1305.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/AEAD/AEADChaCha20Poly1305.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/MD5.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/PKCS/PKCS5.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/PKCS/PKCS7.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/UInt128.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/BlockMode/ECB.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/BlockMode/CFB.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/BlockMode/OFB.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/CMAC.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/CBCMAC.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/HMAC.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/BlockMode/CBC.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/BlockMode/PCBC.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/AEAD/AEAD.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/HKDF.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/BlockMode/CCM.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/BlockMode/GCM.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/BlockMode/CTR.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/AES.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/BlockMode/BlockMode.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/Updatable.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/DigestType.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/Padding.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/ISO78164Padding.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/PKCS/PKCS7Padding.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/NoPadding.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/ZeroPadding.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/Blowfish.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/Checksum.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/UInt32+Extension.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/UInt64+Extension.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/UInt16+Extension.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/UInt8+Extension.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/Foundation/Data+Extension.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/String+Extension.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/Collection+Extension.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/Int+Extension.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/Array+Extension.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/Foundation/String+FoundationExtension.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/Foundation/ChaCha20+Foundation.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/Foundation/HMAC+Foundation.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/Foundation/AES+Foundation.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/Foundation/Blowfish+Foundation.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/Foundation/Utils+Foundation.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/Foundation/Rabbit+Foundation.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/Foundation/Array+Foundation.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/BatchedCollection.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/CompactMap.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/Cipher.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/BlockCipher.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/BlockMode/CipherModeWorker.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/Authenticator.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/Cryptor.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/BlockDecryptor.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/StreamDecryptor.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/BlockEncryptor.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/StreamEncryptor.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/Generics.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/SecureBytes.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/Utils.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/BlockMode/BlockModeOptions.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/Operators.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/AES.Cryptors.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/Cryptors.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/Bit.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/Rabbit.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/Scrypt.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/Digest.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/ObjectiveC.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/CoreImage.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/QuartzCore.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Dispatch.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Metal.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Darwin.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Foundation.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/CoreFoundation.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/CoreGraphics.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Swift.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/UIKit.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/SwiftOnoneSupport.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Combine.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Users/MohamedNawar/Desktop/Task/Pods/Target\ Support\ Files/CryptoSwift/CryptoSwift-umbrella.h /Users/MohamedNawar/Desktop/Task/build/Pods.build/Debug-iphonesimulator/CryptoSwift.build/unextended-module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.5.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.5.sdk/System/Library/Frameworks/OpenGLES.framework/Headers/OpenGLES.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.5.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImage.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.5.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/QuartzCore.apinotes /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/apinotes/Dispatch.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.5.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.5.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.5.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.5.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.5.sdk/System/Library/Frameworks/UserNotifications.framework/Headers/UserNotifications.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.5.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.5.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.5.sdk/System/Library/Frameworks/Security.framework/Headers/Security.apinotes /Users/MohamedNawar/Desktop/Task/build/Pods.build/Debug-iphonesimulator/CryptoSwift.build/Objects-normal/x86_64/AES+Foundation~partial.swiftdoc : /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/ChaCha20.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/SHA1.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/PKCS/PBKDF1.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/SHA2.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/PKCS/PBKDF2.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/SHA3.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/Poly1305.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/AEAD/AEADChaCha20Poly1305.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/MD5.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/PKCS/PKCS5.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/PKCS/PKCS7.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/UInt128.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/BlockMode/ECB.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/BlockMode/CFB.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/BlockMode/OFB.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/CMAC.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/CBCMAC.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/HMAC.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/BlockMode/CBC.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/BlockMode/PCBC.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/AEAD/AEAD.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/HKDF.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/BlockMode/CCM.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/BlockMode/GCM.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/BlockMode/CTR.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/AES.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/BlockMode/BlockMode.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/Updatable.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/DigestType.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/Padding.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/ISO78164Padding.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/PKCS/PKCS7Padding.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/NoPadding.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/ZeroPadding.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/Blowfish.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/Checksum.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/UInt32+Extension.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/UInt64+Extension.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/UInt16+Extension.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/UInt8+Extension.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/Foundation/Data+Extension.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/String+Extension.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/Collection+Extension.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/Int+Extension.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/Array+Extension.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/Foundation/String+FoundationExtension.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/Foundation/ChaCha20+Foundation.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/Foundation/HMAC+Foundation.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/Foundation/AES+Foundation.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/Foundation/Blowfish+Foundation.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/Foundation/Utils+Foundation.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/Foundation/Rabbit+Foundation.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/Foundation/Array+Foundation.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/BatchedCollection.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/CompactMap.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/Cipher.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/BlockCipher.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/BlockMode/CipherModeWorker.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/Authenticator.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/Cryptor.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/BlockDecryptor.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/StreamDecryptor.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/BlockEncryptor.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/StreamEncryptor.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/Generics.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/SecureBytes.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/Utils.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/BlockMode/BlockModeOptions.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/Operators.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/AES.Cryptors.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/Cryptors.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/Bit.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/Rabbit.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/Scrypt.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/Digest.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/ObjectiveC.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/CoreImage.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/QuartzCore.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Dispatch.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Metal.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Darwin.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Foundation.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/CoreFoundation.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/CoreGraphics.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Swift.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/UIKit.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/SwiftOnoneSupport.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Combine.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Users/MohamedNawar/Desktop/Task/Pods/Target\ Support\ Files/CryptoSwift/CryptoSwift-umbrella.h /Users/MohamedNawar/Desktop/Task/build/Pods.build/Debug-iphonesimulator/CryptoSwift.build/unextended-module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.5.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.5.sdk/System/Library/Frameworks/OpenGLES.framework/Headers/OpenGLES.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.5.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImage.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.5.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/QuartzCore.apinotes /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/apinotes/Dispatch.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.5.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.5.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.5.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.5.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.5.sdk/System/Library/Frameworks/UserNotifications.framework/Headers/UserNotifications.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.5.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.5.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.5.sdk/System/Library/Frameworks/Security.framework/Headers/Security.apinotes /Users/MohamedNawar/Desktop/Task/build/Pods.build/Debug-iphonesimulator/CryptoSwift.build/Objects-normal/x86_64/AES+Foundation~partial.swiftsourceinfo : /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/ChaCha20.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/SHA1.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/PKCS/PBKDF1.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/SHA2.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/PKCS/PBKDF2.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/SHA3.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/Poly1305.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/AEAD/AEADChaCha20Poly1305.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/MD5.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/PKCS/PKCS5.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/PKCS/PKCS7.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/UInt128.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/BlockMode/ECB.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/BlockMode/CFB.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/BlockMode/OFB.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/CMAC.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/CBCMAC.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/HMAC.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/BlockMode/CBC.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/BlockMode/PCBC.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/AEAD/AEAD.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/HKDF.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/BlockMode/CCM.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/BlockMode/GCM.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/BlockMode/CTR.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/AES.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/BlockMode/BlockMode.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/Updatable.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/DigestType.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/Padding.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/ISO78164Padding.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/PKCS/PKCS7Padding.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/NoPadding.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/ZeroPadding.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/Blowfish.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/Checksum.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/UInt32+Extension.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/UInt64+Extension.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/UInt16+Extension.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/UInt8+Extension.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/Foundation/Data+Extension.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/String+Extension.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/Collection+Extension.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/Int+Extension.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/Array+Extension.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/Foundation/String+FoundationExtension.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/Foundation/ChaCha20+Foundation.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/Foundation/HMAC+Foundation.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/Foundation/AES+Foundation.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/Foundation/Blowfish+Foundation.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/Foundation/Utils+Foundation.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/Foundation/Rabbit+Foundation.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/Foundation/Array+Foundation.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/BatchedCollection.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/CompactMap.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/Cipher.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/BlockCipher.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/BlockMode/CipherModeWorker.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/Authenticator.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/Cryptor.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/BlockDecryptor.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/StreamDecryptor.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/BlockEncryptor.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/StreamEncryptor.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/Generics.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/SecureBytes.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/Utils.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/BlockMode/BlockModeOptions.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/Operators.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/AES.Cryptors.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/Cryptors.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/Bit.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/Rabbit.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/Scrypt.swift /Users/MohamedNawar/Desktop/Task/Pods/CryptoSwift/Sources/CryptoSwift/Digest.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/ObjectiveC.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/CoreImage.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/QuartzCore.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Dispatch.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Metal.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Darwin.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Foundation.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/CoreFoundation.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/CoreGraphics.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Swift.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/UIKit.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/SwiftOnoneSupport.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Combine.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Users/MohamedNawar/Desktop/Task/Pods/Target\ Support\ Files/CryptoSwift/CryptoSwift-umbrella.h /Users/MohamedNawar/Desktop/Task/build/Pods.build/Debug-iphonesimulator/CryptoSwift.build/unextended-module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.5.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.5.sdk/System/Library/Frameworks/OpenGLES.framework/Headers/OpenGLES.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.5.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImage.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.5.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/QuartzCore.apinotes /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/apinotes/Dispatch.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.5.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.5.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.5.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.5.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.5.sdk/System/Library/Frameworks/UserNotifications.framework/Headers/UserNotifications.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.5.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.5.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.5.sdk/System/Library/Frameworks/Security.framework/Headers/Security.apinotes
D
// Written in the D programming language. /** Functions and types that manipulate built-in arrays and associative arrays. This module provides all kinds of functions to create, manipulate or convert arrays: $(BOOKTABLE , $(TR $(TH Function Name) $(TH Description) ) $(TR $(TD $(D $(LREF _array))) $(TD Returns a copy of the input in a newly allocated dynamic _array. )) $(TR $(TD $(D $(LREF appender))) $(TD Returns a new Appender initialized with a given _array. )) $(TR $(TD $(D $(LREF assocArray))) $(TD Returns a newly allocated associative _array from a range of key/value tuples. )) $(TR $(TD $(D $(LREF byPair))) $(TD Construct a range iterating over an associative _array by key/value tuples. )) $(TR $(TD $(D $(LREF insertInPlace))) $(TD Inserts into an existing _array at a given position. )) $(TR $(TD $(D $(LREF join))) $(TD Concatenates a range of ranges into one _array. )) $(TR $(TD $(D $(LREF minimallyInitializedArray))) $(TD Returns a new _array of type $(D T). )) $(TR $(TD $(D $(LREF replace))) $(TD Returns a new _array with all occurrences of a certain subrange replaced. )) $(TR $(TD $(D $(LREF replaceFirst))) $(TD Returns a new _array with the first occurrence of a certain subrange replaced. )) $(TR $(TD $(D $(LREF replaceInPlace))) $(TD Replaces all occurrences of a certain subrange and puts the result into a given _array. )) $(TR $(TD $(D $(LREF replaceInto))) $(TD Replaces all occurrences of a certain subrange and puts the result into an output range. )) $(TR $(TD $(D $(LREF replaceLast))) $(TD Returns a new _array with the last occurrence of a certain subrange replaced. )) $(TR $(TD $(D $(LREF replaceSlice))) $(TD Returns a new _array with a given slice replaced. )) $(TR $(TD $(D $(LREF replicate))) $(TD Creates a new _array out of several copies of an input _array or range. )) $(TR $(TD $(D $(LREF sameHead))) $(TD Checks if the initial segments of two arrays refer to the same place in memory. )) $(TR $(TD $(D $(LREF sameTail))) $(TD Checks if the final segments of two arrays refer to the same place in memory. )) $(TR $(TD $(D $(LREF split))) $(TD Eagerly split a range or string into an _array. )) $(TR $(TD $(D $(LREF uninitializedArray))) $(TD Returns a new _array of type $(D T) without initializing its elements. )) ) Copyright: Copyright Andrei Alexandrescu 2008- and Jonathan M Davis 2011-. License: $(WEB boost.org/LICENSE_1_0.txt, Boost License 1.0). Authors: $(WEB erdani.org, Andrei Alexandrescu) and Jonathan M Davis Source: $(PHOBOSSRC std/_array.d) */ module std.array; import std.meta; import std.traits; import std.functional; static import std.algorithm; // FIXME, remove with alias of splitter import std.range.primitives; public import std.range.primitives : save, empty, popFront, popBack, front, back; /** * Allocates an array and initializes it with copies of the elements * of range $(D r). * * Narrow strings are handled as a special case in an overload. * * Params: * r = range (or aggregate with $(D opApply) function) whose elements are copied into the allocated array * Returns: * allocated and initialized array */ ForeachType!Range[] array(Range)(Range r) if (isIterable!Range && !isNarrowString!Range && !isInfinite!Range) { if (__ctfe) { // Compile-time version to avoid memcpy calls. // Also used to infer attributes of array(). typeof(return) result; foreach (e; r) result ~= e; return result; } alias E = ForeachType!Range; static if (hasLength!Range) { auto length = r.length; if (length == 0) return null; import std.conv : emplaceRef; auto result = (() @trusted => uninitializedArray!(Unqual!E[])(length))(); // Every element of the uninitialized array must be initialized size_t i; foreach (e; r) { emplaceRef!E(result[i], e); ++i; } return (() @trusted => cast(E[])result)(); } else { auto a = appender!(E[])(); foreach (e; r) { a.put(e); } return a.data; } } /// @safe pure nothrow unittest { auto a = array([1, 2, 3, 4, 5][]); assert(a == [ 1, 2, 3, 4, 5 ]); } @safe pure nothrow unittest { import std.algorithm : equal; struct Foo { int a; } auto a = array([Foo(1), Foo(2), Foo(3), Foo(4), Foo(5)][]); assert(equal(a, [Foo(1), Foo(2), Foo(3), Foo(4), Foo(5)])); } @system unittest { import std.algorithm : equal; struct Foo { int a; auto opAssign(Foo foo) { assert(0); } auto opEquals(Foo foo) { return a == foo.a; } } auto a = array([Foo(1), Foo(2), Foo(3), Foo(4), Foo(5)][]); assert(equal(a, [Foo(1), Foo(2), Foo(3), Foo(4), Foo(5)])); } unittest { // Issue 12315 static struct Bug12315 { immutable int i; } enum bug12315 = [Bug12315(123456789)].array(); static assert(bug12315[0].i == 123456789); } unittest { import std.range; static struct S{int* p;} auto a = array(immutable(S).init.repeat(5)); } /** Convert a narrow string to an array type that fully supports random access. This is handled as a special case and always returns a $(D dchar[]), $(D const(dchar)[]), or $(D immutable(dchar)[]) depending on the constness of the input. */ ElementType!String[] array(String)(String str) if (isNarrowString!String) { import std.utf : toUTF32; return cast(typeof(return)) str.toUTF32; } unittest { import std.conv : to; static struct TestArray { int x; string toString() { return to!string(x); } } static struct OpAssign { uint num; this(uint num) { this.num = num; } // Templating opAssign to make sure the bugs with opAssign being // templated are fixed. void opAssign(T)(T rhs) { this.num = rhs.num; } } static struct OpApply { int opApply(int delegate(ref int) dg) { int res; foreach(i; 0..10) { res = dg(i); if(res) break; } return res; } } auto a = array([1, 2, 3, 4, 5][]); //writeln(a); assert(a == [ 1, 2, 3, 4, 5 ]); auto b = array([TestArray(1), TestArray(2)][]); //writeln(b); class C { int x; this(int y) { x = y; } override string toString() const { return to!string(x); } } auto c = array([new C(1), new C(2)][]); //writeln(c); auto d = array([1.0, 2.2, 3][]); assert(is(typeof(d) == double[])); //writeln(d); auto e = [OpAssign(1), OpAssign(2)]; auto f = array(e); assert(e == f); assert(array(OpApply.init) == [0,1,2,3,4,5,6,7,8,9]); assert(array("ABC") == "ABC"d); assert(array("ABC".dup) == "ABC"d.dup); } //Bug# 8233 unittest { assert(array("hello world"d) == "hello world"d); immutable a = [1, 2, 3, 4, 5]; assert(array(a) == a); const b = a; assert(array(b) == a); //To verify that the opAssign branch doesn't get screwed up by using Unqual. //EDIT: array no longer calls opAssign. struct S { ref S opAssign(S)(const ref S rhs) { assert(0); } int i; } foreach(T; AliasSeq!(S, const S, immutable S)) { auto arr = [T(1), T(2), T(3), T(4)]; assert(array(arr) == arr); } } unittest { //9824 static struct S { @disable void opAssign(S); int i; } auto arr = [S(0), S(1), S(2)]; arr.array(); } // Bugzilla 10220 unittest { import std.exception; import std.algorithm : equal; import std.range : repeat; static struct S { int val; @disable this(); this(int v) { val = v; } } assertCTFEable!( { auto r = S(1).repeat(2).array(); assert(equal(r, [S(1), S(1)])); }); } unittest { //Turn down infinity: static assert(!is(typeof( repeat(1).array() ))); } /** Returns a newly allocated associative _array from a range of key/value tuples. Params: r = An input range of tuples of keys and values. Returns: A newly allocated associative array out of elements of the input range, which must be a range of tuples (Key, Value). Returns a null associative array reference when given an empty range. Duplicates: Associative arrays have unique keys. If r contains duplicate keys, then the result will contain the value of the last pair for that key in r. See_Also: $(XREF typecons, Tuple) */ auto assocArray(Range)(Range r) if (isInputRange!Range) { import std.typecons : isTuple; alias E = ElementType!Range; static assert(isTuple!E, "assocArray: argument must be a range of tuples"); static assert(E.length == 2, "assocArray: tuple dimension must be 2"); alias KeyType = E.Types[0]; alias ValueType = E.Types[1]; static assert(isMutable!ValueType, "assocArray: value type must be mutable"); ValueType[KeyType] aa; foreach (t; r) aa[t[0]] = t[1]; return aa; } /// /*@safe*/ pure /*nothrow*/ unittest { import std.range; import std.typecons; auto a = assocArray(zip([0, 1, 2], ["a", "b", "c"])); assert(is(typeof(a) == string[int])); assert(a == [0:"a", 1:"b", 2:"c"]); auto b = assocArray([ tuple("foo", "bar"), tuple("baz", "quux") ]); assert(is(typeof(b) == string[string])); assert(b == ["foo":"bar", "baz":"quux"]); } // @@@11053@@@ - Cannot be version(unittest) - recursive instantiation error unittest { import std.typecons; static assert(!__traits(compiles, [ tuple("foo", "bar", "baz") ].assocArray())); static assert(!__traits(compiles, [ tuple("foo") ].assocArray())); assert([ tuple("foo", "bar") ].assocArray() == ["foo": "bar"]); } // Issue 13909 unittest { import std.typecons; auto a = [tuple!(const string, string)("foo", "bar")]; auto b = [tuple!(string, const string)("foo", "bar")]; assert(assocArray(a) == [cast(const(string)) "foo": "bar"]); static assert(!__traits(compiles, assocArray(b))); } /** Construct a range iterating over an associative array by key/value tuples. Params: aa = The associative array to iterate over. Returns: A forward range of Tuple's of key and value pairs from the given associative array. */ auto byPair(Key, Value)(Value[Key] aa) { import std.typecons : tuple; import std.algorithm : map; return aa.byKeyValue.map!(pair => tuple(pair.key, pair.value)); } /// unittest { import std.typecons : tuple, Tuple; import std.algorithm : sort; auto aa = ["a": 1, "b": 2, "c": 3]; Tuple!(string, int)[] pairs; // Iteration over key/value pairs. foreach (pair; aa.byPair) { pairs ~= pair; } // Iteration order is implementation-dependent, so we should sort it to get // a fixed order. sort(pairs); assert(pairs == [ tuple("a", 1), tuple("b", 2), tuple("c", 3) ]); } unittest { import std.typecons : tuple, Tuple; auto aa = ["a":2]; auto pairs = aa.byPair(); static assert(is(typeof(pairs.front) == Tuple!(string,int))); static assert(isForwardRange!(typeof(pairs))); assert(!pairs.empty); assert(pairs.front == tuple("a", 2)); auto savedPairs = pairs.save; pairs.popFront(); assert(pairs.empty); assert(!savedPairs.empty); assert(savedPairs.front == tuple("a", 2)); } private template blockAttribute(T) { import core.memory; static if (hasIndirections!(T) || is(T == void)) { enum blockAttribute = 0; } else { enum blockAttribute = GC.BlkAttr.NO_SCAN; } } version(unittest) { import core.memory : UGC = GC; static assert(!(blockAttribute!void & UGC.BlkAttr.NO_SCAN)); } // Returns the number of dimensions in an array T. private template nDimensions(T) { static if(isArray!T) { enum nDimensions = 1 + nDimensions!(typeof(T.init[0])); } else { enum nDimensions = 0; } } version(unittest) { static assert(nDimensions!(uint[]) == 1); static assert(nDimensions!(float[][]) == 2); } /++ Returns a new array of type $(D T) allocated on the garbage collected heap without initializing its elements. This can be a useful optimization if every element will be immediately initialized. $(D T) may be a multidimensional array. In this case sizes may be specified for any number of dimensions from 0 to the number in $(D T). uninitializedArray is nothrow and weakly pure. uninitializedArray is @system if the uninitialized element type has pointers. +/ auto uninitializedArray(T, I...)(I sizes) nothrow @system if (isDynamicArray!T && allSatisfy!(isIntegral, I) && hasIndirections!(ElementEncodingType!T)) { enum isSize_t(E) = is (E : size_t); alias toSize_t(E) = size_t; static assert(allSatisfy!(isSize_t, I), "Argument types in "~I.stringof~" are not all convertible to size_t: " ~Filter!(templateNot!(isSize_t), I).stringof); //Eagerlly transform non-size_t into size_t to avoid template bloat alias ST = staticMap!(toSize_t, I); return arrayAllocImpl!(false, T, ST)(sizes); } /// auto uninitializedArray(T, I...)(I sizes) nothrow @trusted if (isDynamicArray!T && allSatisfy!(isIntegral, I) && !hasIndirections!(ElementEncodingType!T)) { enum isSize_t(E) = is (E : size_t); alias toSize_t(E) = size_t; static assert(allSatisfy!(isSize_t, I), "Argument types in "~I.stringof~" are not all convertible to size_t: " ~Filter!(templateNot!(isSize_t), I).stringof); //Eagerlly transform non-size_t into size_t to avoid template bloat alias ST = staticMap!(toSize_t, I); return arrayAllocImpl!(false, T, ST)(sizes); } /// @system nothrow pure unittest { double[] arr = uninitializedArray!(double[])(100); assert(arr.length == 100); double[][] matrix = uninitializedArray!(double[][])(42, 31); assert(matrix.length == 42); assert(matrix[0].length == 31); char*[] ptrs = uninitializedArray!(char*[])(100); assert(ptrs.length == 100); } /++ Returns a new array of type $(D T) allocated on the garbage collected heap. Partial initialization is done for types with indirections, for preservation of memory safety. Note that elements will only be initialized to 0, but not necessarily the element type's $(D .init). minimallyInitializedArray is nothrow and weakly pure. +/ auto minimallyInitializedArray(T, I...)(I sizes) nothrow @trusted if (isDynamicArray!T && allSatisfy!(isIntegral, I)) { enum isSize_t(E) = is (E : size_t); alias toSize_t(E) = size_t; static assert(allSatisfy!(isSize_t, I), "Argument types in "~I.stringof~" are not all convertible to size_t: " ~Filter!(templateNot!(isSize_t), I).stringof); //Eagerlly transform non-size_t into size_t to avoid template bloat alias ST = staticMap!(toSize_t, I); return arrayAllocImpl!(true, T, ST)(sizes); } @safe pure nothrow unittest { cast(void)minimallyInitializedArray!(int[][][][][])(); double[] arr = minimallyInitializedArray!(double[])(100); assert(arr.length == 100); double[][] matrix = minimallyInitializedArray!(double[][])(42); assert(matrix.length == 42); foreach(elem; matrix) { assert(elem.ptr is null); } } private auto arrayAllocImpl(bool minimallyInitialized, T, I...)(I sizes) nothrow { static assert(I.length <= nDimensions!T, I.length.stringof~"dimensions specified for a "~nDimensions!T.stringof~" dimensional array."); alias E = ElementEncodingType!T; E[] ret; static if (I.length != 0) { static assert (is(I[0] == size_t)); alias size = sizes[0]; } static if (I.length == 1) { if (__ctfe) { static if (__traits(compiles, new E[](size))) ret = new E[](size); else static if (__traits(compiles, ret ~= E.init)) { try { //Issue: if E has an impure postblit, then all of arrayAllocImpl //Will be impure, even during non CTFE. foreach (i; 0 .. size) ret ~= E.init; } catch (Exception e) throw new Error(e.msg); } else assert(0, "No postblit nor default init on " ~ E.stringof ~ ": At least one is required for CTFE."); } else { import core.stdc.string : memset; import core.memory; auto ptr = cast(E*) GC.malloc(sizes[0] * E.sizeof, blockAttribute!E); static if (minimallyInitialized && hasIndirections!E) memset(ptr, 0, size * E.sizeof); ret = ptr[0 .. size]; } } else static if (I.length > 1) { ret = arrayAllocImpl!(false, E[])(size); foreach(ref elem; ret) elem = arrayAllocImpl!(minimallyInitialized, E)(sizes[1..$]); } return ret; } nothrow pure unittest { auto s1 = uninitializedArray!(int[])(); auto s2 = minimallyInitializedArray!(int[])(); assert(s1.length == 0); assert(s2.length == 0); } nothrow pure unittest //@@@9803@@@ { auto a = minimallyInitializedArray!(int*[])(1); assert(a[0] == null); auto b = minimallyInitializedArray!(int[][])(1); assert(b[0].empty); auto c = minimallyInitializedArray!(int*[][])(1, 1); assert(c[0][0] == null); } unittest //@@@10637@@@ { static struct S { static struct I{int i; alias i this;} int* p; this() @disable; this(int i) { p = &(new I(i)).i; } this(this) { p = &(new I(*p)).i; } ~this() { assert(p != null); } } auto a = minimallyInitializedArray!(S[])(1); assert(a[0].p == null); enum b = minimallyInitializedArray!(S[])(1); } nothrow unittest { static struct S1 { this() @disable; this(this) @disable; } auto a1 = minimallyInitializedArray!(S1[][])(2, 2); //enum b1 = minimallyInitializedArray!(S1[][])(2, 2); static struct S2 { this() @disable; //this(this) @disable; } auto a2 = minimallyInitializedArray!(S2[][])(2, 2); enum b2 = minimallyInitializedArray!(S2[][])(2, 2); static struct S3 { //this() @disable; this(this) @disable; } auto a3 = minimallyInitializedArray!(S3[][])(2, 2); enum b3 = minimallyInitializedArray!(S3[][])(2, 2); } // overlap /* NOTE: Undocumented for now, overlap does not yet work with ctfe. Returns the overlapping portion, if any, of two arrays. Unlike $(D equal), $(D overlap) only compares the pointers in the ranges, not the values referred by them. If $(D r1) and $(D r2) have an overlapping slice, returns that slice. Otherwise, returns the null slice. */ inout(T)[] overlap(T)(inout(T)[] r1, inout(T)[] r2) @trusted pure nothrow { alias U = inout(T); static U* max(U* a, U* b) nothrow { return a > b ? a : b; } static U* min(U* a, U* b) nothrow { return a < b ? a : b; } auto b = max(r1.ptr, r2.ptr); auto e = min(r1.ptr + r1.length, r2.ptr + r2.length); return b < e ? b[0 .. e - b] : null; } /// @safe pure /*nothrow*/ unittest { int[] a = [ 10, 11, 12, 13, 14 ]; int[] b = a[1 .. 3]; assert(overlap(a, b) == [ 11, 12 ]); b = b.dup; // overlap disappears even though the content is the same assert(overlap(a, b).empty); } /*@safe nothrow*/ unittest { static void test(L, R)(L l, R r) { import std.stdio; scope(failure) writeln("Types: L %s R %s", L.stringof, R.stringof); assert(overlap(l, r) == [ 100, 12 ]); assert(overlap(l, l[0 .. 2]) is l[0 .. 2]); assert(overlap(l, l[3 .. 5]) is l[3 .. 5]); assert(overlap(l[0 .. 2], l) is l[0 .. 2]); assert(overlap(l[3 .. 5], l) is l[3 .. 5]); } int[] a = [ 10, 11, 12, 13, 14 ]; int[] b = a[1 .. 3]; a[1] = 100; immutable int[] c = a.idup; immutable int[] d = c[1 .. 3]; test(a, b); assert(overlap(a, b.dup).empty); test(c, d); assert(overlap(c, d.idup).empty); } @safe pure nothrow unittest // bugzilla 9836 { // range primitives for array should work with alias this types struct Wrapper { int[] data; alias data this; @property Wrapper save() { return this; } } auto w = Wrapper([1,2,3,4]); std.array.popFront(w); // should work static assert(isInputRange!Wrapper); static assert(isForwardRange!Wrapper); static assert(isBidirectionalRange!Wrapper); static assert(isRandomAccessRange!Wrapper); } private void copyBackwards(T)(T[] src, T[] dest) { import core.stdc.string; assert(src.length == dest.length); if (!__ctfe || hasElaborateCopyConstructor!T) { /* insertInPlace relies on dest being uninitialized, so no postblits allowed, * as this is a MOVE that overwrites the destination, not a COPY. * BUG: insertInPlace will not work with ctfe and postblits */ memmove(dest.ptr, src.ptr, src.length * T.sizeof); } else { immutable len = src.length; for (size_t i = len; i-- > 0;) { dest[i] = src[i]; } } } /++ Inserts $(D stuff) (which must be an input range or any number of implicitly convertible items) in $(D array) at position $(D pos). +/ void insertInPlace(T, U...)(ref T[] array, size_t pos, U stuff) if(!isSomeString!(T[]) && allSatisfy!(isInputRangeOrConvertible!T, U) && U.length > 0) { static if(allSatisfy!(isInputRangeWithLengthOrConvertible!T, U)) { import std.conv : emplaceRef; immutable oldLen = array.length; size_t to_insert = 0; foreach (i, E; U) { static if (is(E : T)) //a single convertible value, not a range to_insert += 1; else to_insert += stuff[i].length; } if (to_insert) { array.length += to_insert; // Takes arguments array, pos, stuff // Spread apart array[] at pos by moving elements (() @trusted { copyBackwards(array[pos..oldLen], array[pos+to_insert..$]); })(); // Initialize array[pos .. pos+to_insert] with stuff[] auto j = 0; foreach (i, E; U) { static if (is(E : T)) { emplaceRef!T(array[pos + j++], stuff[i]); } else { foreach (v; stuff[i]) { emplaceRef!T(array[pos + j++], v); } } } } } else { // stuff has some InputRanges in it that don't have length // assume that stuff to be inserted is typically shorter // then the array that can be arbitrary big // TODO: needs a better implementation as there is no need to build an _array_ // a singly-linked list of memory blocks (rope, etc.) will do auto app = appender!(T[])(); foreach (i, E; U) app.put(stuff[i]); insertInPlace(array, pos, app.data); } } /// Ditto void insertInPlace(T, U...)(ref T[] array, size_t pos, U stuff) if(isSomeString!(T[]) && allSatisfy!(isCharOrStringOrDcharRange, U)) { static if(is(Unqual!T == T) && allSatisfy!(isInputRangeWithLengthOrConvertible!dchar, U)) { import std.utf : codeLength; // mutable, can do in place //helper function: re-encode dchar to Ts and store at *ptr static T* putDChar(T* ptr, dchar ch) { static if(is(T == dchar)) { *ptr++ = ch; return ptr; } else { import std.utf : encode; T[dchar.sizeof/T.sizeof] buf; size_t len = encode(buf, ch); final switch(len) { static if(T.sizeof == char.sizeof) { case 4: ptr[3] = buf[3]; goto case; case 3: ptr[2] = buf[2]; goto case; } case 2: ptr[1] = buf[1]; goto case; case 1: ptr[0] = buf[0]; } ptr += len; return ptr; } } immutable oldLen = array.length; size_t to_insert = 0; //count up the number of *codeunits* to insert foreach (i, E; U) to_insert += codeLength!T(stuff[i]); array.length += to_insert; @trusted static void moveToRight(T[] arr, size_t gap) { static assert(!hasElaborateCopyConstructor!T); import core.stdc.string; if (__ctfe) { for (size_t i = arr.length - gap; i; --i) arr[gap + i - 1] = arr[i - 1]; } else memmove(arr.ptr + gap, arr.ptr, (arr.length - gap) * T.sizeof); } moveToRight(array[pos .. $], to_insert); auto ptr = array.ptr + pos; foreach (i, E; U) { static if(is(E : dchar)) { ptr = putDChar(ptr, stuff[i]); } else { foreach (dchar ch; stuff[i]) ptr = putDChar(ptr, ch); } } assert(ptr == array.ptr + pos + to_insert, "(ptr == array.ptr + pos + to_insert) is false"); } else { // immutable/const, just construct a new array auto app = appender!(T[])(); app.put(array[0..pos]); foreach (i, E; U) app.put(stuff[i]); app.put(array[pos..$]); array = app.data; } } /// @safe pure unittest { int[] a = [ 1, 2, 3, 4 ]; a.insertInPlace(2, [ 1, 2 ]); assert(a == [ 1, 2, 1, 2, 3, 4 ]); a.insertInPlace(3, 10u, 11); assert(a == [ 1, 2, 1, 10, 11, 2, 3, 4]); } //constraint helpers private template isInputRangeWithLengthOrConvertible(E) { template isInputRangeWithLengthOrConvertible(R) { //hasLength not defined for char[], wchar[] and dchar[] enum isInputRangeWithLengthOrConvertible = (isInputRange!R && is(typeof(R.init.length)) && is(ElementType!R : E)) || is(R : E); } } //ditto private template isCharOrStringOrDcharRange(T) { enum isCharOrStringOrDcharRange = isSomeString!T || isSomeChar!T || (isInputRange!T && is(ElementType!T : dchar)); } //ditto private template isInputRangeOrConvertible(E) { template isInputRangeOrConvertible(R) { enum isInputRangeOrConvertible = (isInputRange!R && is(ElementType!R : E)) || is(R : E); } } unittest { import core.exception; import std.conv : to; import std.exception; import std.algorithm; bool test(T, U, V)(T orig, size_t pos, U toInsert, V result, string file = __FILE__, size_t line = __LINE__) { { static if(is(T == typeof(T.init.dup))) auto a = orig.dup; else auto a = orig.idup; a.insertInPlace(pos, toInsert); if(!std.algorithm.equal(a, result)) return false; } static if(isInputRange!U) { orig.insertInPlace(pos, filter!"true"(toInsert)); return std.algorithm.equal(orig, result); } else return true; } assert(test([1, 2, 3, 4], 0, [6, 7], [6, 7, 1, 2, 3, 4])); assert(test([1, 2, 3, 4], 2, [8, 9], [1, 2, 8, 9, 3, 4])); assert(test([1, 2, 3, 4], 4, [10, 11], [1, 2, 3, 4, 10, 11])); assert(test([1, 2, 3, 4], 0, 22, [22, 1, 2, 3, 4])); assert(test([1, 2, 3, 4], 2, 23, [1, 2, 23, 3, 4])); assert(test([1, 2, 3, 4], 4, 24, [1, 2, 3, 4, 24])); auto testStr(T, U)(string file = __FILE__, size_t line = __LINE__) { auto l = to!T("hello"); auto r = to!U(" વિશ્વ"); enforce(test(l, 0, r, " વિશ્વhello"), new AssertError("testStr failure 1", file, line)); enforce(test(l, 3, r, "hel વિશ્વlo"), new AssertError("testStr failure 2", file, line)); enforce(test(l, l.length, r, "hello વિશ્વ"), new AssertError("testStr failure 3", file, line)); } foreach (T; AliasSeq!(char, wchar, dchar, immutable(char), immutable(wchar), immutable(dchar))) { foreach (U; AliasSeq!(char, wchar, dchar, immutable(char), immutable(wchar), immutable(dchar))) { testStr!(T[], U[])(); } } // variadic version bool testVar(T, U...)(T orig, size_t pos, U args) { static if(is(T == typeof(T.init.dup))) auto a = orig.dup; else auto a = orig.idup; auto result = args[$-1]; a.insertInPlace(pos, args[0..$-1]); if (!std.algorithm.equal(a, result)) return false; return true; } assert(testVar([1, 2, 3, 4], 0, 6, 7u, [6, 7, 1, 2, 3, 4])); assert(testVar([1L, 2, 3, 4], 2, 8, 9L, [1, 2, 8, 9, 3, 4])); assert(testVar([1L, 2, 3, 4], 4, 10L, 11, [1, 2, 3, 4, 10, 11])); assert(testVar([1L, 2, 3, 4], 4, [10, 11], 40L, 42L, [1, 2, 3, 4, 10, 11, 40, 42])); assert(testVar([1L, 2, 3, 4], 4, 10, 11, [40L, 42], [1, 2, 3, 4, 10, 11, 40, 42])); assert(testVar("t".idup, 1, 'e', 's', 't', "test")); assert(testVar("!!"w.idup, 1, "\u00e9ll\u00f4", 'x', "TTT"w, 'y', "!\u00e9ll\u00f4xTTTy!")); assert(testVar("flipflop"d.idup, 4, '_', "xyz"w, '\U00010143', '_', "abc"d, "__", "flip_xyz\U00010143_abc__flop")); } unittest { import std.algorithm : equal; // insertInPlace interop with postblit static struct Int { int* payload; this(int k) { payload = new int; *payload = k; } this(this) { int* np = new int; *np = *payload; payload = np; } ~this() { if (payload) *payload = 0; //'destroy' it } @property int getPayload(){ return *payload; } alias getPayload this; } Int[] arr = [Int(1), Int(4), Int(5)]; assert(arr[0] == 1); insertInPlace(arr, 1, Int(2), Int(3)); assert(equal(arr, [1, 2, 3, 4, 5])); //check it works with postblit version (none) // illustrates that insertInPlace() will not work with CTFE and postblit { static bool testctfe() { Int[] arr = [Int(1), Int(4), Int(5)]; assert(arr[0] == 1); insertInPlace(arr, 1, Int(2), Int(3)); return equal(arr, [1, 2, 3, 4, 5]); //check it works with postblit } enum E = testctfe(); } } @safe unittest { import std.exception; assertCTFEable!( { int[] a = [1, 2]; a.insertInPlace(2, 3); a.insertInPlace(0, -1, 0); return a == [-1, 0, 1, 2, 3]; }); } unittest // bugzilla 6874 { import core.memory; // allocate some space byte[] a; a.length = 1; // fill it a.length = a.capacity; // write beyond byte[] b = a[$ .. $]; b.insertInPlace(0, a); // make sure that reallocation has happened assert(GC.addrOf(&b[0]) == GC.addrOf(&b[$-1])); } /++ Returns whether the $(D front)s of $(D lhs) and $(D rhs) both refer to the same place in memory, making one of the arrays a slice of the other which starts at index $(D 0). +/ @safe pure nothrow bool sameHead(T)(in T[] lhs, in T[] rhs) { return lhs.ptr == rhs.ptr; } /// @safe pure nothrow unittest { auto a = [1, 2, 3, 4, 5]; auto b = a[0..2]; assert(a.sameHead(b)); } /++ Returns whether the $(D back)s of $(D lhs) and $(D rhs) both refer to the same place in memory, making one of the arrays a slice of the other which end at index $(D $). +/ @trusted pure nothrow bool sameTail(T)(in T[] lhs, in T[] rhs) { return lhs.ptr + lhs.length == rhs.ptr + rhs.length; } /// @safe pure nothrow unittest { auto a = [1, 2, 3, 4, 5]; auto b = a[3..$]; assert(a.sameTail(b)); } @safe pure nothrow unittest { foreach(T; AliasSeq!(int[], const(int)[], immutable(int)[], const int[], immutable int[])) { T a = [1, 2, 3, 4, 5]; T b = a; T c = a[1 .. $]; T d = a[0 .. 1]; T e = null; assert(sameHead(a, a)); assert(sameHead(a, b)); assert(!sameHead(a, c)); assert(sameHead(a, d)); assert(!sameHead(a, e)); assert(sameTail(a, a)); assert(sameTail(a, b)); assert(sameTail(a, c)); assert(!sameTail(a, d)); assert(!sameTail(a, e)); //verifies R-value compatibilty assert(a.sameHead(a[0 .. 0])); assert(a.sameTail(a[$ .. $])); } } /******************************************** Returns an array that consists of $(D s) (which must be an input range) repeated $(D n) times. This function allocates, fills, and returns a new array. For a lazy version, refer to $(XREF range, repeat). */ ElementEncodingType!S[] replicate(S)(S s, size_t n) if (isDynamicArray!S) { alias RetType = ElementEncodingType!S[]; // Optimization for return join(std.range.repeat(s, n)); if (n == 0) return RetType.init; if (n == 1) return cast(RetType) s; auto r = new Unqual!(typeof(s[0]))[n * s.length]; if (s.length == 1) r[] = s[0]; else { immutable len = s.length, nlen = n * len; for (size_t i = 0; i < nlen; i += len) { r[i .. i + len] = s[]; } } return r; } /// ditto ElementType!S[] replicate(S)(S s, size_t n) if (isInputRange!S && !isDynamicArray!S) { import std.range : repeat; return join(std.range.repeat(s, n)); } /// unittest { auto a = "abc"; auto s = replicate(a, 3); assert(s == "abcabcabc"); auto b = [1, 2, 3]; auto c = replicate(b, 3); assert(c == [1, 2, 3, 1, 2, 3, 1, 2, 3]); auto d = replicate(b, 0); assert(d == []); } unittest { import std.conv : to; debug(std_array) printf("array.replicate.unittest\n"); foreach (S; AliasSeq!(string, wstring, dstring, char[], wchar[], dchar[])) { S s; immutable S t = "abc"; assert(replicate(to!S("1234"), 0) is null); assert(replicate(to!S("1234"), 0) is null); assert(replicate(to!S("1234"), 1) == "1234"); assert(replicate(to!S("1234"), 2) == "12341234"); assert(replicate(to!S("1"), 4) == "1111"); assert(replicate(t, 3) == "abcabcabc"); assert(replicate(cast(S) null, 4) is null); } } /++ Eagerly split the string $(D s) into an array of words, using whitespace as delimiter. Runs of whitespace are merged together (no empty words are produced). $(D @safe), $(D pure) and $(D CTFE)-able. See_Also: $(XREF_PACK algorithm,iteration,splitter) for a version that splits using any separator. $(XREF regex, splitter) for a version that splits using a regular expression defined separator. +/ S[] split(S)(S s) @safe pure if (isSomeString!S) { size_t istart; bool inword = false; S[] result; foreach (i, dchar c ; s) { import std.uni : isWhite; if (isWhite(c)) { if (inword) { result ~= s[istart .. i]; inword = false; } } else { if (!inword) { istart = i; inword = true; } } } if (inword) result ~= s[istart .. $]; return result; } unittest { import std.conv : to; import std.format; import std.typecons; static auto makeEntry(S)(string l, string[] r) {return tuple(l.to!S(), r.to!(S[])());} foreach (S; AliasSeq!(string, wstring, dstring,)) { auto entries = [ makeEntry!S("", []), makeEntry!S(" ", []), makeEntry!S("hello", ["hello"]), makeEntry!S(" hello ", ["hello"]), makeEntry!S(" h e l l o ", ["h", "e", "l", "l", "o"]), makeEntry!S("peter\t\npaul\rjerry", ["peter", "paul", "jerry"]), makeEntry!S(" \t\npeter paul\tjerry \n", ["peter", "paul", "jerry"]), makeEntry!S("\u2000日\u202F本\u205F語\u3000", ["日", "本", "語"]), makeEntry!S("  哈・郎博尔德}    ___一个", ["哈・郎博尔德}", "___一个"]) ]; foreach (entry; entries) assert(entry[0].split() == entry[1], format("got: %s, expected: %s.", entry[0].split(), entry[1])); } //Just to test that an immutable is split-able immutable string s = " \t\npeter paul\tjerry \n"; assert(split(s) == ["peter", "paul", "jerry"]); } unittest //safety, purity, ctfe ... { import std.exception; void dg() @safe pure { assert(split("hello world"c) == ["hello"c, "world"c]); assert(split("hello world"w) == ["hello"w, "world"w]); assert(split("hello world"d) == ["hello"d, "world"d]); } dg(); assertCTFEable!dg; } /// unittest { assert(split("hello world") == ["hello","world"]); assert(split("192.168.0.1", ".") == ["192", "168", "0", "1"]); auto a = split([1, 2, 3, 4, 5, 1, 2, 3, 4, 5], [2, 3]); assert(a == [[1], [4, 5, 1], [4, 5]]); } /++ Alias for $(XREF_PACK algorithm,iteration,_splitter). +/ deprecated("Please use std.algorithm.iteration.splitter instead.") alias splitter = std.algorithm.iteration.splitter; /++ Eagerly splits $(D range) into an array, using $(D sep) as the delimiter. The _range must be a $(XREF_PACK_NAMED _range,primitives,isForwardRange,forward _range). The separator can be a value of the same type as the elements in $(D range) or it can be another forward _range. Example: If $(D range) is a $(D string), $(D sep) can be a $(D char) or another $(D string). The return type will be an array of strings. If $(D range) is an $(D int) array, $(D sep) can be an $(D int) or another $(D int) array. The return type will be an array of $(D int) arrays. Params: range = a forward _range. sep = a value of the same type as the elements of $(D range) or another forward range. Returns: An array containing the divided parts of $(D range). See_Also: $(XREF_PACK algorithm,iteration,splitter) for the lazy version of this function. +/ auto split(Range, Separator)(Range range, Separator sep) if (isForwardRange!Range && is(typeof(ElementType!Range.init == Separator.init))) { import std.algorithm : splitter; return range.splitter(sep).array; } ///ditto auto split(Range, Separator)(Range range, Separator sep) if (isForwardRange!Range && isForwardRange!Separator && is(typeof(ElementType!Range.init == ElementType!Separator.init))) { import std.algorithm : splitter; return range.splitter(sep).array; } ///ditto auto split(alias isTerminator, Range)(Range range) if (isForwardRange!Range && is(typeof(unaryFun!isTerminator(range.front)))) { import std.algorithm : splitter; return range.splitter!isTerminator.array; } unittest { import std.conv; import std.algorithm : cmp; debug(std_array) printf("array.split\n"); foreach (S; AliasSeq!(string, wstring, dstring, immutable(string), immutable(wstring), immutable(dstring), char[], wchar[], dchar[], const(char)[], const(wchar)[], const(dchar)[], const(char[]), immutable(char[]))) { S s = to!S(",peter,paul,jerry,"); auto words = split(s, ","); assert(words.length == 5, text(words.length)); assert(cmp(words[0], "") == 0); assert(cmp(words[1], "peter") == 0); assert(cmp(words[2], "paul") == 0); assert(cmp(words[3], "jerry") == 0); assert(cmp(words[4], "") == 0); auto s1 = s[0 .. s.length - 1]; // lop off trailing ',' words = split(s1, ","); assert(words.length == 4); assert(cmp(words[3], "jerry") == 0); auto s2 = s1[1 .. s1.length]; // lop off leading ',' words = split(s2, ","); assert(words.length == 3); assert(cmp(words[0], "peter") == 0); auto s3 = to!S(",,peter,,paul,,jerry,,"); words = split(s3, ",,"); assert(words.length == 5); assert(cmp(words[0], "") == 0); assert(cmp(words[1], "peter") == 0); assert(cmp(words[2], "paul") == 0); assert(cmp(words[3], "jerry") == 0); assert(cmp(words[4], "") == 0); auto s4 = s3[0 .. s3.length - 2]; // lop off trailing ',,' words = split(s4, ",,"); assert(words.length == 4); assert(cmp(words[3], "jerry") == 0); auto s5 = s4[2 .. s4.length]; // lop off leading ',,' words = split(s5, ",,"); assert(words.length == 3); assert(cmp(words[0], "peter") == 0); } } /++ Conservative heuristic to determine if a range can be iterated cheaply. Used by $(D join) in decision to do an extra iteration of the range to compute the resultant length. If iteration is not cheap then precomputing length could be more expensive than using $(D Appender). For now, we only assume arrays are cheap to iterate. +/ private enum bool hasCheapIteration(R) = isArray!R; /++ Concatenates all of the ranges in $(D ror) together into one array using $(D sep) as the separator if present. Params: ror = Range of Ranges of Elements sep = Range of Elements Returns: an allocated array of Elements See_Also: $(XREF_PACK algorithm,iteration,joiner) +/ ElementEncodingType!(ElementType!RoR)[] join(RoR, R)(RoR ror, R sep) if(isInputRange!RoR && isInputRange!(Unqual!(ElementType!RoR)) && isInputRange!R && is(Unqual!(ElementType!(ElementType!RoR)) == Unqual!(ElementType!R))) { alias RetType = typeof(return); alias RetTypeElement = Unqual!(ElementEncodingType!RetType); alias RoRElem = ElementType!RoR; if (ror.empty) return RetType.init; // Constraint only requires input range for sep. // This converts sep to an array (forward range) if it isn't one, // and makes sure it has the same string encoding for string types. static if (isSomeString!RetType && !is(RetTypeElement == Unqual!(ElementEncodingType!R))) { import std.conv : to; auto sepArr = to!RetType(sep); } else static if (!isArray!R) auto sepArr = array(sep); else alias sepArr = sep; static if(hasCheapIteration!RoR && (hasLength!RoRElem || isNarrowString!RoRElem)) { import std.conv : emplaceRef; size_t length; // length of result array size_t rorLength; // length of range ror foreach(r; ror.save) { length += r.length; ++rorLength; } if (!rorLength) return null; length += (rorLength - 1) * sepArr.length; auto result = (() @trusted => uninitializedArray!(RetTypeElement[])(length))(); size_t len; foreach(e; ror.front) emplaceRef(result[len++], e); ror.popFront(); foreach(r; ror) { foreach(e; sepArr) emplaceRef(result[len++], e); foreach(e; r) emplaceRef(result[len++], e); } assert(len == result.length); return (() @trusted => cast(RetType) result)(); } else { auto result = appender!RetType(); put(result, ror.front); ror.popFront(); for (; !ror.empty; ror.popFront()) { put(result, sep); put(result, ror.front); } return result.data; } } unittest // Issue 14230 { string[] ary = ["","aa","bb","cc"]; // leaded by _empty_ element assert(ary.join(" @") == " @aa @bb @cc"); // OK in 2.067b1 and olders } /// Ditto ElementEncodingType!(ElementType!RoR)[] join(RoR, E)(RoR ror, E sep) if(isInputRange!RoR && isInputRange!(Unqual!(ElementType!RoR)) && is(E : ElementType!(ElementType!RoR))) { alias RetType = typeof(return); alias RetTypeElement = Unqual!(ElementEncodingType!RetType); alias RoRElem = ElementType!RoR; if (ror.empty) return RetType.init; static if(hasCheapIteration!RoR && (hasLength!RoRElem || isNarrowString!RoRElem)) { static if (isSomeChar!E && isSomeChar!RetTypeElement && E.sizeof > RetTypeElement.sizeof) { import std.utf : encode; RetTypeElement[4 / RetTypeElement.sizeof] encodeSpace; immutable size_t sepArrLength = encode(encodeSpace, sep); return join(ror, encodeSpace[0..sepArrLength]); } else { import std.conv : emplaceRef; size_t length; size_t rorLength; foreach(r; ror.save) { length += r.length; ++rorLength; } if (!rorLength) return null; length += rorLength - 1; auto result = uninitializedArray!(RetTypeElement[])(length); size_t len; foreach(e; ror.front) emplaceRef(result[len++], e); ror.popFront(); foreach(r; ror) { emplaceRef(result[len++], sep); foreach(e; r) emplaceRef(result[len++], e); } assert(len == result.length); return (() @trusted => cast(RetType) result)(); } } else { auto result = appender!RetType(); put(result, ror.front); ror.popFront(); for (; !ror.empty; ror.popFront()) { put(result, sep); put(result, ror.front); } return result.data; } } unittest // Issue 10895 { class A { string name; alias name this; this(string name) { this.name = name; } } auto a = [new A(`foo`)]; assert(a[0].length == 3); auto temp = join(a, " "); assert(a[0].length == 3); } unittest // Issue 14230 { string[] ary = ["","aa","bb","cc"]; assert(ary.join('@') == "@aa@bb@cc"); } /// Ditto ElementEncodingType!(ElementType!RoR)[] join(RoR)(RoR ror) if(isInputRange!RoR && isInputRange!(Unqual!(ElementType!RoR))) { alias RetType = typeof(return); alias RetTypeElement = Unqual!(ElementEncodingType!RetType); alias RoRElem = ElementType!RoR; if (ror.empty) return RetType.init; static if(hasCheapIteration!RoR && (hasLength!RoRElem || isNarrowString!RoRElem)) { import std.conv : emplaceRef; size_t length; foreach(r; ror.save) length += r.length; auto result = (() @trusted => uninitializedArray!(RetTypeElement[])(length))(); size_t len; foreach(r; ror) foreach(e; r) emplaceRef(result[len++], e); assert(len == result.length); return (() @trusted => cast(RetType)result)(); } else { auto result = appender!RetType(); for (; !ror.empty; ror.popFront()) put(result, ror.front); return result.data; } } /// @safe pure nothrow unittest { assert(join(["hello", "silly", "world"], " ") == "hello silly world"); assert(join(["hello", "silly", "world"]) == "hellosillyworld"); assert(join([[1, 2, 3], [4, 5]], [72, 73]) == [1, 2, 3, 72, 73, 4, 5]); assert(join([[1, 2, 3], [4, 5]]) == [1, 2, 3, 4, 5]); const string[] arr = ["apple", "banana"]; assert(arr.join(",") == "apple,banana"); assert(arr.join() == "applebanana"); } @safe pure unittest { import std.conv : to; foreach (T; AliasSeq!(string,wstring,dstring)) { auto arr2 = "Здравствуй Мир Unicode".to!(T); auto arr = ["Здравствуй", "Мир", "Unicode"].to!(T[]); assert(join(arr) == "ЗдравствуйМирUnicode"); foreach (S; AliasSeq!(char,wchar,dchar)) { auto jarr = arr.join(to!S(' ')); static assert(is(typeof(jarr) == T)); assert(jarr == arr2); } foreach (S; AliasSeq!(string,wstring,dstring)) { auto jarr = arr.join(to!S(" ")); static assert(is(typeof(jarr) == T)); assert(jarr == arr2); } } foreach (T; AliasSeq!(string,wstring,dstring)) { auto arr2 = "Здравствуй\u047CМир\u047CUnicode".to!(T); auto arr = ["Здравствуй", "Мир", "Unicode"].to!(T[]); foreach (S; AliasSeq!(wchar,dchar)) { auto jarr = arr.join(to!S('\u047C')); static assert(is(typeof(jarr) == T)); assert(jarr == arr2); } } const string[] arr = ["apple", "banana"]; assert(arr.join(',') == "apple,banana"); } unittest { import std.conv : to; import std.algorithm; import std.range; debug(std_array) printf("array.join.unittest\n"); foreach(R; AliasSeq!(string, wstring, dstring)) { R word1 = "日本語"; R word2 = "paul"; R word3 = "jerry"; R[] words = [word1, word2, word3]; auto filteredWord1 = filter!"true"(word1); auto filteredLenWord1 = takeExactly(filteredWord1, word1.walkLength()); auto filteredWord2 = filter!"true"(word2); auto filteredLenWord2 = takeExactly(filteredWord2, word2.walkLength()); auto filteredWord3 = filter!"true"(word3); auto filteredLenWord3 = takeExactly(filteredWord3, word3.walkLength()); auto filteredWordsArr = [filteredWord1, filteredWord2, filteredWord3]; auto filteredLenWordsArr = [filteredLenWord1, filteredLenWord2, filteredLenWord3]; auto filteredWords = filter!"true"(filteredWordsArr); foreach(S; AliasSeq!(string, wstring, dstring)) (){ // avoid slow optimizations for large functions @@@BUG@@@ 2396 assert(join(filteredWords, to!S(", ")) == "日本語, paul, jerry"); assert(join(filteredWords, to!(ElementType!S)(',')) == "日本語,paul,jerry"); assert(join(filteredWordsArr, to!(ElementType!(S))(',')) == "日本語,paul,jerry"); assert(join(filteredWordsArr, to!S(", ")) == "日本語, paul, jerry"); assert(join(filteredWordsArr, to!(ElementType!(S))(',')) == "日本語,paul,jerry"); assert(join(filteredLenWordsArr, to!S(", ")) == "日本語, paul, jerry"); assert(join(filter!"true"(words), to!S(", ")) == "日本語, paul, jerry"); assert(join(words, to!S(", ")) == "日本語, paul, jerry"); assert(join(filteredWords, to!S("")) == "日本語pauljerry"); assert(join(filteredWordsArr, to!S("")) == "日本語pauljerry"); assert(join(filteredLenWordsArr, to!S("")) == "日本語pauljerry"); assert(join(filter!"true"(words), to!S("")) == "日本語pauljerry"); assert(join(words, to!S("")) == "日本語pauljerry"); assert(join(filter!"true"([word1]), to!S(", ")) == "日本語"); assert(join([filteredWord1], to!S(", ")) == "日本語"); assert(join([filteredLenWord1], to!S(", ")) == "日本語"); assert(join(filter!"true"([filteredWord1]), to!S(", ")) == "日本語"); assert(join([word1], to!S(", ")) == "日本語"); assert(join(filteredWords, to!S(word1)) == "日本語日本語paul日本語jerry"); assert(join(filteredWordsArr, to!S(word1)) == "日本語日本語paul日本語jerry"); assert(join(filteredLenWordsArr, to!S(word1)) == "日本語日本語paul日本語jerry"); assert(join(filter!"true"(words), to!S(word1)) == "日本語日本語paul日本語jerry"); assert(join(words, to!S(word1)) == "日本語日本語paul日本語jerry"); auto filterComma = filter!"true"(to!S(", ")); assert(join(filteredWords, filterComma) == "日本語, paul, jerry"); assert(join(filteredWordsArr, filterComma) == "日本語, paul, jerry"); assert(join(filteredLenWordsArr, filterComma) == "日本語, paul, jerry"); assert(join(filter!"true"(words), filterComma) == "日本語, paul, jerry"); assert(join(words, filterComma) == "日本語, paul, jerry"); }(); assert(join(filteredWords) == "日本語pauljerry"); assert(join(filteredWordsArr) == "日本語pauljerry"); assert(join(filteredLenWordsArr) == "日本語pauljerry"); assert(join(filter!"true"(words)) == "日本語pauljerry"); assert(join(words) == "日本語pauljerry"); assert(join(filteredWords, filter!"true"(", ")) == "日本語, paul, jerry"); assert(join(filteredWordsArr, filter!"true"(", ")) == "日本語, paul, jerry"); assert(join(filteredLenWordsArr, filter!"true"(", ")) == "日本語, paul, jerry"); assert(join(filter!"true"(words), filter!"true"(", ")) == "日本語, paul, jerry"); assert(join(words, filter!"true"(", ")) == "日本語, paul, jerry"); assert(join(filter!"true"(cast(typeof(filteredWordsArr))[]), ", ").empty); assert(join(cast(typeof(filteredWordsArr))[], ", ").empty); assert(join(cast(typeof(filteredLenWordsArr))[], ", ").empty); assert(join(filter!"true"(cast(R[])[]), ", ").empty); assert(join(cast(R[])[], ", ").empty); assert(join(filter!"true"(cast(typeof(filteredWordsArr))[])).empty); assert(join(cast(typeof(filteredWordsArr))[]).empty); assert(join(cast(typeof(filteredLenWordsArr))[]).empty); assert(join(filter!"true"(cast(R[])[])).empty); assert(join(cast(R[])[]).empty); } assert(join([[1, 2], [41, 42]], [5, 6]) == [1, 2, 5, 6, 41, 42]); assert(join([[1, 2], [41, 42]], cast(int[])[]) == [1, 2, 41, 42]); assert(join([[1, 2]], [5, 6]) == [1, 2]); assert(join(cast(int[][])[], [5, 6]).empty); assert(join([[1, 2], [41, 42]]) == [1, 2, 41, 42]); assert(join(cast(int[][])[]).empty); alias f = filter!"true"; assert(join([[1, 2], [41, 42]], [5, 6]) == [1, 2, 5, 6, 41, 42]); assert(join(f([[1, 2], [41, 42]]), [5, 6]) == [1, 2, 5, 6, 41, 42]); assert(join([f([1, 2]), f([41, 42])], [5, 6]) == [1, 2, 5, 6, 41, 42]); assert(join(f([f([1, 2]), f([41, 42])]), [5, 6]) == [1, 2, 5, 6, 41, 42]); assert(join([[1, 2], [41, 42]], f([5, 6])) == [1, 2, 5, 6, 41, 42]); assert(join(f([[1, 2], [41, 42]]), f([5, 6])) == [1, 2, 5, 6, 41, 42]); assert(join([f([1, 2]), f([41, 42])], f([5, 6])) == [1, 2, 5, 6, 41, 42]); assert(join(f([f([1, 2]), f([41, 42])]), f([5, 6])) == [1, 2, 5, 6, 41, 42]); } // Issue 10683 unittest { import std.range : join; import std.typecons : tuple; assert([[tuple(1)]].join == [tuple(1)]); assert([[tuple("x")]].join == [tuple("x")]); } // Issue 13877 unittest { // Test that the range is iterated only once. import std.algorithm : map; int c = 0; auto j1 = [1, 2, 3].map!(_ => [c++]).join; assert(c == 3); assert(j1 == [0, 1, 2]); c = 0; auto j2 = [1, 2, 3].map!(_ => [c++]).join(9); assert(c == 3); assert(j2 == [0, 9, 1, 9, 2]); c = 0; auto j3 = [1, 2, 3].map!(_ => [c++]).join([9]); assert(c == 3); assert(j3 == [0, 9, 1, 9, 2]); } /++ Replace occurrences of $(D from) with $(D to) in $(D subject). Returns a new array without changing the contents of $(D subject), or the original array if no match is found. +/ E[] replace(E, R1, R2)(E[] subject, R1 from, R2 to) if (isDynamicArray!(E[]) && isForwardRange!R1 && isForwardRange!R2 && (hasLength!R2 || isSomeString!R2)) { if (from.empty) return subject; auto balance = std.algorithm.find(subject, from.save); if (balance.empty) return subject; auto app = appender!(E[])(); app.put(subject[0 .. subject.length - balance.length]); app.put(to.save); replaceInto(app, balance[from.length .. $], from, to); return app.data; } /// unittest { assert("Hello Wörld".replace("o Wö", "o Wo") == "Hello World"); assert("Hello Wörld".replace("l", "h") == "Hehho Wörhd"); } /++ Same as above, but outputs the result via OutputRange $(D sink). If no match is found the original array is transferred to $(D sink) as is. +/ void replaceInto(E, Sink, R1, R2)(Sink sink, E[] subject, R1 from, R2 to) if (isOutputRange!(Sink, E) && isDynamicArray!(E[]) && isForwardRange!R1 && isForwardRange!R2 && (hasLength!R2 || isSomeString!R2)) { if (from.empty) { sink.put(subject); return; } for (;;) { auto balance = std.algorithm.find(subject, from.save); if (balance.empty) { sink.put(subject); break; } sink.put(subject[0 .. subject.length - balance.length]); sink.put(to.save); subject = balance[from.length .. $]; } } /// unittest { auto arr = [1, 2, 3, 4, 5]; auto from = [2, 3]; auto into = [4, 6]; auto sink = appender!(int[])(); replaceInto(sink, arr, from, into); assert(sink.data == [1, 4, 6, 4, 5]); } unittest { import std.conv : to; import std.algorithm : cmp; debug(std_array) printf("array.replace.unittest\n"); foreach (S; AliasSeq!(string, wstring, dstring, char[], wchar[], dchar[])) { foreach (T; AliasSeq!(string, wstring, dstring, char[], wchar[], dchar[])) (){ // avoid slow optimizations for large functions @@@BUG@@@ 2396 auto s = to!S("This is a foo foo list"); auto from = to!T("foo"); auto into = to!S("silly"); S r; int i; r = replace(s, from, into); i = cmp(r, "This is a silly silly list"); assert(i == 0); r = replace(s, to!S(""), into); i = cmp(r, "This is a foo foo list"); assert(i == 0); assert(replace(r, to!S("won't find this"), to!S("whatever")) is r); }(); } immutable s = "This is a foo foo list"; assert(replace(s, "foo", "silly") == "This is a silly silly list"); } unittest { import std.conv : to; import std.algorithm : skipOver; struct CheckOutput(C) { C[] desired; this(C[] arr){ desired = arr; } void put(C[] part){ assert(skipOver(desired, part)); } } foreach (S; AliasSeq!(string, wstring, dstring, char[], wchar[], dchar[])) { alias Char = ElementEncodingType!S; S s = to!S("yet another dummy text, yet another ..."); S from = to!S("yet another"); S into = to!S("some"); replaceInto(CheckOutput!(Char)(to!S("some dummy text, some ...")) , s, from, into); } } /++ Replaces elements from $(D array) with indices ranging from $(D from) (inclusive) to $(D to) (exclusive) with the range $(D stuff). Returns a new array without changing the contents of $(D subject). +/ T[] replace(T, Range)(T[] subject, size_t from, size_t to, Range stuff) if(isInputRange!Range && (is(ElementType!Range : T) || isSomeString!(T[]) && is(ElementType!Range : dchar))) { static if(hasLength!Range && is(ElementEncodingType!Range : T)) { import std.algorithm : copy; assert(from <= to); immutable sliceLen = to - from; auto retval = new Unqual!(T)[](subject.length - sliceLen + stuff.length); retval[0 .. from] = subject[0 .. from]; if(!stuff.empty) copy(stuff, retval[from .. from + stuff.length]); retval[from + stuff.length .. $] = subject[to .. $]; return cast(T[])retval; } else { auto app = appender!(T[])(); app.put(subject[0 .. from]); app.put(stuff); app.put(subject[to .. $]); return app.data; } } /// unittest { auto a = [ 1, 2, 3, 4 ]; auto b = a.replace(1, 3, [ 9, 9, 9 ]); assert(a == [ 1, 2, 3, 4 ]); assert(b == [ 1, 9, 9, 9, 4 ]); } unittest { import core.exception; import std.conv : to; import std.exception; import std.algorithm; auto a = [ 1, 2, 3, 4 ]; assert(replace(a, 0, 0, [5, 6, 7]) == [5, 6, 7, 1, 2, 3, 4]); assert(replace(a, 0, 2, cast(int[])[]) == [3, 4]); assert(replace(a, 0, 4, [5, 6, 7]) == [5, 6, 7]); assert(replace(a, 0, 2, [5, 6, 7]) == [5, 6, 7, 3, 4]); assert(replace(a, 2, 4, [5, 6, 7]) == [1, 2, 5, 6, 7]); assert(replace(a, 0, 0, filter!"true"([5, 6, 7])) == [5, 6, 7, 1, 2, 3, 4]); assert(replace(a, 0, 2, filter!"true"(cast(int[])[])) == [3, 4]); assert(replace(a, 0, 4, filter!"true"([5, 6, 7])) == [5, 6, 7]); assert(replace(a, 0, 2, filter!"true"([5, 6, 7])) == [5, 6, 7, 3, 4]); assert(replace(a, 2, 4, filter!"true"([5, 6, 7])) == [1, 2, 5, 6, 7]); assert(a == [ 1, 2, 3, 4 ]); auto testStr(T, U)(string file = __FILE__, size_t line = __LINE__) { auto l = to!T("hello"); auto r = to!U(" world"); enforce(replace(l, 0, 0, r) == " worldhello", new AssertError("testStr failure 1", file, line)); enforce(replace(l, 0, 3, r) == " worldlo", new AssertError("testStr failure 2", file, line)); enforce(replace(l, 3, l.length, r) == "hel world", new AssertError("testStr failure 3", file, line)); enforce(replace(l, 0, l.length, r) == " world", new AssertError("testStr failure 4", file, line)); enforce(replace(l, l.length, l.length, r) == "hello world", new AssertError("testStr failure 5", file, line)); } testStr!(string, string)(); testStr!(string, wstring)(); testStr!(string, dstring)(); testStr!(wstring, string)(); testStr!(wstring, wstring)(); testStr!(wstring, dstring)(); testStr!(dstring, string)(); testStr!(dstring, wstring)(); testStr!(dstring, dstring)(); enum s = "0123456789"; enum w = "⁰¹²³⁴⁵⁶⁷⁸⁹"w; enum d = "⁰¹²³⁴⁵⁶⁷⁸⁹"d; assert(replace(s, 0, 0, "***") == "***0123456789"); assert(replace(s, 10, 10, "***") == "0123456789***"); assert(replace(s, 3, 8, "1012") == "012101289"); assert(replace(s, 0, 5, "43210") == "4321056789"); assert(replace(s, 5, 10, "43210") == "0123443210"); assert(replace(w, 0, 0, "***"w) == "***⁰¹²³⁴⁵⁶⁷⁸⁹"w); assert(replace(w, 10, 10, "***"w) == "⁰¹²³⁴⁵⁶⁷⁸⁹***"w); assert(replace(w, 3, 8, "¹⁰¹²"w) == "⁰¹²¹⁰¹²⁸⁹"w); assert(replace(w, 0, 5, "⁴³²¹⁰"w) == "⁴³²¹⁰⁵⁶⁷⁸⁹"w); assert(replace(w, 5, 10, "⁴³²¹⁰"w) == "⁰¹²³⁴⁴³²¹⁰"w); assert(replace(d, 0, 0, "***"d) == "***⁰¹²³⁴⁵⁶⁷⁸⁹"d); assert(replace(d, 10, 10, "***"d) == "⁰¹²³⁴⁵⁶⁷⁸⁹***"d); assert(replace(d, 3, 8, "¹⁰¹²"d) == "⁰¹²¹⁰¹²⁸⁹"d); assert(replace(d, 0, 5, "⁴³²¹⁰"d) == "⁴³²¹⁰⁵⁶⁷⁸⁹"d); assert(replace(d, 5, 10, "⁴³²¹⁰"d) == "⁰¹²³⁴⁴³²¹⁰"d); } /++ Replaces elements from $(D array) with indices ranging from $(D from) (inclusive) to $(D to) (exclusive) with the range $(D stuff). Expands or shrinks the array as needed. +/ void replaceInPlace(T, Range)(ref T[] array, size_t from, size_t to, Range stuff) if(is(typeof(replace(array, from, to, stuff)))) { static if(isDynamicArray!Range && is(Unqual!(ElementEncodingType!Range) == T) && !isNarrowString!(T[])) { // optimized for homogeneous arrays that can be overwritten. import std.algorithm : remove; import std.typecons : tuple; if (overlap(array, stuff).length) { // use slower/conservative method array = array[0 .. from] ~ stuff ~ array[to .. $]; } else if (stuff.length <= to - from) { // replacement reduces length immutable stuffEnd = from + stuff.length; array[from .. stuffEnd] = stuff[]; if (stuffEnd < to) array = remove(array, tuple(stuffEnd, to)); } else { // replacement increases length // @@@TODO@@@: optimize this immutable replaceLen = to - from; array[from .. to] = stuff[0 .. replaceLen]; insertInPlace(array, to, stuff[replaceLen .. $]); } } else { // default implementation, just do what replace does. array = replace(array, from, to, stuff); } } /// unittest { int[] a = [1, 4, 5]; replaceInPlace(a, 1u, 2u, [2, 3, 4]); assert(a == [1, 2, 3, 4, 5]); replaceInPlace(a, 1u, 2u, cast(int[])[]); assert(a == [1, 3, 4, 5]); replaceInPlace(a, 1u, 3u, a[2 .. 4]); assert(a == [1, 4, 5, 5]); } unittest { // Bug# 12889 int[1][] arr = [[0], [1], [2], [3], [4], [5], [6]]; int[1][] stuff = [[0], [1]]; replaceInPlace(arr, 4, 6, stuff); assert(arr == [[0], [1], [2], [3], [0], [1], [6]]); } unittest { // Bug# 14925 char[] a = "mon texte 1".dup; char[] b = "abc".dup; replaceInPlace(a, 4, 9, b); assert(a == "mon abc 1"); // ensure we can replace in place with different encodings string unicoded = "\U00010437"; string unicodedLong = "\U00010437aaaaa"; string base = "abcXXXxyz"; string result = "abc\U00010437xyz"; string resultLong = "abc\U00010437aaaaaxyz"; size_t repstart = 3; size_t repend = 3 + 3; void testStringReplaceInPlace(T, U)() { import std.conv; import std.algorithm : equal; auto a = unicoded.to!(U[]); auto b = unicodedLong.to!(U[]); auto test = base.to!(T[]); test.replaceInPlace(repstart, repend, a); assert(equal(test, result), "Failed for types " ~ T.stringof ~ " and " ~ U.stringof); test = base.to!(T[]); test.replaceInPlace(repstart, repend, b); assert(equal(test, resultLong), "Failed for types " ~ T.stringof ~ " and " ~ U.stringof); } import std.meta : AliasSeq; alias allChars = AliasSeq!(char, immutable(char), const(char), wchar, immutable(wchar), const(wchar), dchar, immutable(dchar), const(dchar)); foreach(T; allChars) foreach(U; allChars) testStringReplaceInPlace!(T, U)(); void testInout(inout(int)[] a) { // will be transferred to the 'replace' function replaceInPlace(a, 1, 2, [1,2,3]); } } unittest { // the constraint for the first overload used to match this, which wouldn't compile. import std.algorithm : equal; long[] a = [1L, 2, 3]; int[] b = [4, 5, 6]; a.replaceInPlace(1, 2, b); assert(equal(a, [1L, 4, 5, 6, 3])); } unittest { import core.exception; import std.conv : to; import std.exception; import std.algorithm; bool test(T, U, V)(T orig, size_t from, size_t to, U toReplace, V result, string file = __FILE__, size_t line = __LINE__) { { static if(is(T == typeof(T.init.dup))) auto a = orig.dup; else auto a = orig.idup; a.replaceInPlace(from, to, toReplace); if(!std.algorithm.equal(a, result)) return false; } static if(isInputRange!U) { orig.replaceInPlace(from, to, filter!"true"(toReplace)); return std.algorithm.equal(orig, result); } else return true; } assert(test([1, 2, 3, 4], 0, 0, [5, 6, 7], [5, 6, 7, 1, 2, 3, 4])); assert(test([1, 2, 3, 4], 0, 2, cast(int[])[], [3, 4])); assert(test([1, 2, 3, 4], 0, 4, [5, 6, 7], [5, 6, 7])); assert(test([1, 2, 3, 4], 0, 2, [5, 6, 7], [5, 6, 7, 3, 4])); assert(test([1, 2, 3, 4], 2, 4, [5, 6, 7], [1, 2, 5, 6, 7])); assert(test([1, 2, 3, 4], 0, 0, filter!"true"([5, 6, 7]), [5, 6, 7, 1, 2, 3, 4])); assert(test([1, 2, 3, 4], 0, 2, filter!"true"(cast(int[])[]), [3, 4])); assert(test([1, 2, 3, 4], 0, 4, filter!"true"([5, 6, 7]), [5, 6, 7])); assert(test([1, 2, 3, 4], 0, 2, filter!"true"([5, 6, 7]), [5, 6, 7, 3, 4])); assert(test([1, 2, 3, 4], 2, 4, filter!"true"([5, 6, 7]), [1, 2, 5, 6, 7])); auto testStr(T, U)(string file = __FILE__, size_t line = __LINE__) { auto l = to!T("hello"); auto r = to!U(" world"); enforce(test(l, 0, 0, r, " worldhello"), new AssertError("testStr failure 1", file, line)); enforce(test(l, 0, 3, r, " worldlo"), new AssertError("testStr failure 2", file, line)); enforce(test(l, 3, l.length, r, "hel world"), new AssertError("testStr failure 3", file, line)); enforce(test(l, 0, l.length, r, " world"), new AssertError("testStr failure 4", file, line)); enforce(test(l, l.length, l.length, r, "hello world"), new AssertError("testStr failure 5", file, line)); } testStr!(string, string)(); testStr!(string, wstring)(); testStr!(string, dstring)(); testStr!(wstring, string)(); testStr!(wstring, wstring)(); testStr!(wstring, dstring)(); testStr!(dstring, string)(); testStr!(dstring, wstring)(); testStr!(dstring, dstring)(); } /++ Replaces the first occurrence of $(D from) with $(D to) in $(D a). Returns a new array without changing the contents of $(D subject), or the original array if no match is found. +/ E[] replaceFirst(E, R1, R2)(E[] subject, R1 from, R2 to) if (isDynamicArray!(E[]) && isForwardRange!R1 && is(typeof(appender!(E[])().put(from[0 .. 1]))) && isForwardRange!R2 && is(typeof(appender!(E[])().put(to[0 .. 1])))) { import std.algorithm : countUntil; if (from.empty) return subject; static if (isSomeString!(E[])) { import std.string : indexOf; immutable idx = subject.indexOf(from); } else { import std.algorithm : countUntil; immutable idx = subject.countUntil(from); } if (idx == -1) return subject; auto app = appender!(E[])(); app.put(subject[0 .. idx]); app.put(to); static if (isSomeString!(E[]) && isSomeString!R1) { import std.utf : codeLength; immutable fromLength = codeLength!(Unqual!E, R1)(from); } else immutable fromLength = from.length; app.put(subject[idx + fromLength .. $]); return app.data; } /// unittest { auto a = [1, 2, 2, 3, 4, 5]; auto b = a.replaceFirst([2], [1337]); assert(b == [1, 1337, 2, 3, 4, 5]); auto s = "This is a foo foo list"; auto r = s.replaceFirst("foo", "silly"); assert(r == "This is a silly foo list"); } unittest { import std.conv : to; import std.algorithm : cmp; debug(std_array) printf("array.replaceFirst.unittest\n"); foreach (S; AliasSeq!(string, wstring, dstring, char[], wchar[], dchar[], const(char[]), immutable(char[]))) { foreach (T; AliasSeq!(string, wstring, dstring, char[], wchar[], dchar[], const(char[]), immutable(char[]))) (){ // avoid slow optimizations for large functions @@@BUG@@@ 2396 auto s = to!S("This is a foo foo list"); auto s2 = to!S("Thüs is a ßöö foo list"); auto from = to!T("foo"); auto from2 = to!T("ßöö"); auto into = to!T("silly"); auto into2 = to!T("sälly"); S r1 = replaceFirst(s, from, into); assert(cmp(r1, "This is a silly foo list") == 0); S r11 = replaceFirst(s2, from2, into2); assert(cmp(r11, "Thüs is a sälly foo list") == 0, to!string(r11) ~ " : " ~ S.stringof ~ " " ~ T.stringof); S r2 = replaceFirst(r1, from, into); assert(cmp(r2, "This is a silly silly list") == 0); S r3 = replaceFirst(s, to!T(""), into); assert(cmp(r3, "This is a foo foo list") == 0); assert(replaceFirst(r3, to!T("won't find"), to!T("whatever")) is r3); }(); } } //Bug# 8187 unittest { auto res = ["a", "a"]; assert(replace(res, "a", "b") == ["b", "b"]); assert(replaceFirst(res, "a", "b") == ["b", "a"]); } /++ Replaces the last occurrence of $(D from) with $(D to) in $(D a). Returns a new array without changing the contents of $(D subject), or the original array if no match is found. +/ E[] replaceLast(E, R1, R2)(E[] subject, R1 from , R2 to) if (isDynamicArray!(E[]) && isForwardRange!R1 && is(typeof(appender!(E[])().put(from[0 .. 1]))) && isForwardRange!R2 && is(typeof(appender!(E[])().put(to[0 .. 1])))) { import std.range : retro; if (from.empty) return subject; static if (isSomeString!(E[])) { import std.string : lastIndexOf; auto idx = subject.lastIndexOf(from); } else { import std.algorithm : countUntil; auto idx = retro(subject).countUntil(retro(from)); } if (idx == -1) return subject; static if (isSomeString!(E[]) && isSomeString!R1) { import std.utf : codeLength; auto fromLength = codeLength!(Unqual!E, R1)(from); } else auto fromLength = from.length; auto app = appender!(E[])(); static if (isSomeString!(E[])) app.put(subject[0 .. idx]); else app.put(subject[0 .. $ - idx - fromLength]); app.put(to); static if (isSomeString!(E[])) app.put(subject[idx+fromLength .. $]); else app.put(subject[$ - idx .. $]); return app.data; } /// unittest { auto a = [1, 2, 2, 3, 4, 5]; auto b = a.replaceLast([2], [1337]); assert(b == [1, 2, 1337, 3, 4, 5]); auto s = "This is a foo foo list"; auto r = s.replaceLast("foo", "silly"); assert(r == "This is a foo silly list", r); } unittest { import std.conv : to; import std.algorithm : cmp; debug(std_array) printf("array.replaceLast.unittest\n"); foreach (S; AliasSeq!(string, wstring, dstring, char[], wchar[], dchar[], const(char[]), immutable(char[]))) { foreach (T; AliasSeq!(string, wstring, dstring, char[], wchar[], dchar[], const(char[]), immutable(char[]))) (){ // avoid slow optimizations for large functions @@@BUG@@@ 2396 auto s = to!S("This is a foo foo list"); auto s2 = to!S("Thüs is a ßöö ßöö list"); auto from = to!T("foo"); auto from2 = to!T("ßöö"); auto into = to!T("silly"); auto into2 = to!T("sälly"); S r1 = replaceLast(s, from, into); assert(cmp(r1, "This is a foo silly list") == 0, to!string(r1)); S r11 = replaceLast(s2, from2, into2); assert(cmp(r11, "Thüs is a ßöö sälly list") == 0, to!string(r11) ~ " : " ~ S.stringof ~ " " ~ T.stringof); S r2 = replaceLast(r1, from, into); assert(cmp(r2, "This is a silly silly list") == 0); S r3 = replaceLast(s, to!T(""), into); assert(cmp(r3, "This is a foo foo list") == 0); assert(replaceLast(r3, to!T("won't find"), to!T("whatever")) is r3); }(); } } /++ Returns a new array that is $(D s) with $(D slice) replaced by $(D replacement[]). +/ inout(T)[] replaceSlice(T)(inout(T)[] s, in T[] slice, in T[] replacement) in { // Verify that slice[] really is a slice of s[] assert(overlap(s, slice) is slice); } body { auto result = new T[s.length - slice.length + replacement.length]; immutable so = slice.ptr - s.ptr; result[0 .. so] = s[0 .. so]; result[so .. so + replacement.length] = replacement[]; result[so + replacement.length .. result.length] = s[so + slice.length .. s.length]; return cast(inout(T)[]) result; } /// unittest { auto a = [1, 2, 3, 4, 5]; auto b = replaceSlice(a, a[1..4], [0, 0, 0]); assert(b == [1, 0, 0, 0, 5]); } unittest { import std.algorithm : cmp; debug(std_array) printf("array.replaceSlice.unittest\n"); string s = "hello"; string slice = s[2 .. 4]; auto r = replaceSlice(s, slice, "bar"); int i; i = cmp(r, "hebaro"); assert(i == 0); } /** Implements an output range that appends data to an array. This is recommended over $(D a ~= data) when appending many elements because it is more efficient. */ struct Appender(A) if (isDynamicArray!A) { import core.memory; private alias T = ElementEncodingType!A; private struct Data { size_t capacity; Unqual!T[] arr; bool canExtend = false; } private Data* _data; /** * Construct an appender with a given array. Note that this does not copy the * data. If the array has a larger capacity as determined by arr.capacity, * it will be used by the appender. After initializing an appender on an array, * appending to the original array will reallocate. */ this(T[] arr) @trusted pure nothrow { // initialize to a given array. _data = new Data; _data.arr = cast(Unqual!T[])arr; //trusted if (__ctfe) return; // We want to use up as much of the block the array is in as possible. // if we consume all the block that we can, then array appending is // safe WRT built-in append, and we can use the entire block. // We only do this for mutable types that can be extended. static if (isMutable!T && is(typeof(arr.length = size_t.max))) { auto cap = arr.capacity; //trusted // Replace with "GC.setAttr( Not Appendable )" once pure (and fixed) if (cap > arr.length) arr.length = cap; } _data.capacity = arr.length; } //Broken function. To be removed. static if (is(T == immutable)) { deprecated ("Using this constructor will break the type system. Please fix your code to use `Appender!(T[]).this(T[] arr)' directly.") this(Unqual!T[] arr) pure nothrow { this(cast(T[]) arr); } //temporary: For resolving ambiguity: this(typeof(null)) { this(cast(T[]) null); } } /** * Reserve at least newCapacity elements for appending. Note that more elements * may be reserved than requested. If newCapacity <= capacity, then nothing is * done. */ void reserve(size_t newCapacity) @safe pure nothrow { if (_data) { if (newCapacity > _data.capacity) ensureAddable(newCapacity - _data.arr.length); } else { ensureAddable(newCapacity); } } /** * Returns the capacity of the array (the maximum number of elements the * managed array can accommodate before triggering a reallocation). If any * appending will reallocate, $(D capacity) returns $(D 0). */ @property size_t capacity() const @safe pure nothrow { return _data ? _data.capacity : 0; } /** * Returns the managed array. */ @property inout(T)[] data() inout @trusted pure nothrow { /* @trusted operation: * casting Unqual!T[] to inout(T)[] */ return cast(typeof(return))(_data ? _data.arr : null); } // ensure we can add nelems elements, resizing as necessary private void ensureAddable(size_t nelems) @trusted pure nothrow { if (!_data) _data = new Data; immutable len = _data.arr.length; immutable reqlen = len + nelems; if (_data.capacity >= reqlen) return; // need to increase capacity if (__ctfe) { static if (__traits(compiles, new Unqual!T[1])) { _data.arr.length = reqlen; } else { // avoid restriction of @disable this() _data.arr = _data.arr[0 .. _data.capacity]; foreach (i; _data.capacity .. reqlen) _data.arr ~= Unqual!T.init; } _data.arr = _data.arr[0 .. len]; _data.capacity = reqlen; } else { // Time to reallocate. // We need to almost duplicate what's in druntime, except we // have better access to the capacity field. auto newlen = appenderNewCapacity!(T.sizeof)(_data.capacity, reqlen); // first, try extending the current block if (_data.canExtend) { auto u = GC.extend(_data.arr.ptr, nelems * T.sizeof, (newlen - len) * T.sizeof); if (u) { // extend worked, update the capacity _data.capacity = u / T.sizeof; return; } } // didn't work, must reallocate auto bi = GC.qalloc(newlen * T.sizeof, blockAttribute!T); _data.capacity = bi.size / T.sizeof; import core.stdc.string : memcpy; if (len) memcpy(bi.base, _data.arr.ptr, len * T.sizeof); _data.arr = (cast(Unqual!T*)bi.base)[0 .. len]; _data.canExtend = true; // leave the old data, for safety reasons } } private template canPutItem(U) { enum bool canPutItem = isImplicitlyConvertible!(U, T) || isSomeChar!T && isSomeChar!U; } private template canPutConstRange(Range) { enum bool canPutConstRange = isInputRange!(Unqual!Range) && !isInputRange!Range; } private template canPutRange(Range) { enum bool canPutRange = isInputRange!Range && is(typeof(Appender.init.put(Range.init.front))); } /** * Appends one item to the managed array. */ void put(U)(U item) if (canPutItem!U) { static if (isSomeChar!T && isSomeChar!U && T.sizeof < U.sizeof) { /* may throwable operation: * - std.utf.encode */ // must do some transcoding around here import std.utf : encode; Unqual!T[T.sizeof == 1 ? 4 : 2] encoded; auto len = encode(encoded, item); put(encoded[0 .. len]); } else { import std.conv : emplaceRef; ensureAddable(1); immutable len = _data.arr.length; auto bigData = (() @trusted => _data.arr.ptr[0 .. len + 1])(); emplaceRef!(Unqual!T)(bigData[len], cast(Unqual!T)item); //We do this at the end, in case of exceptions _data.arr = bigData; } } // Const fixing hack. void put(Range)(Range items) if (canPutConstRange!Range) { alias p = put!(Unqual!Range); p(items); } /** * Appends an entire range to the managed array. */ void put(Range)(Range items) if (canPutRange!Range) { // note, we disable this branch for appending one type of char to // another because we can't trust the length portion. static if (!(isSomeChar!T && isSomeChar!(ElementType!Range) && !is(immutable Range == immutable T[])) && is(typeof(items.length) == size_t)) { // optimization -- if this type is something other than a string, // and we are adding exactly one element, call the version for one // element. static if (!isSomeChar!T) { if (items.length == 1) { put(items.front); return; } } // make sure we have enough space, then add the items @trusted auto bigDataFun(size_t extra) { ensureAddable(extra); return _data.arr.ptr[0 .. _data.arr.length + extra]; } auto bigData = bigDataFun(items.length); immutable len = _data.arr.length; immutable newlen = bigData.length; alias UT = Unqual!T; static if (is(typeof(_data.arr[] = items[])) && !hasElaborateAssign!(Unqual!T) && isAssignable!(UT, ElementEncodingType!Range)) { bigData[len .. newlen] = items[]; } else { import std.conv : emplaceRef; foreach (ref it ; bigData[len .. newlen]) { emplaceRef!T(it, items.front); items.popFront(); } } //We do this at the end, in case of exceptions _data.arr = bigData; } else { //pragma(msg, Range.stringof); // Generic input range for (; !items.empty; items.popFront()) { put(items.front); } } } /** * Appends one item to the managed array. */ void opOpAssign(string op : "~", U)(U item) if (canPutItem!U) { put(item); } // Const fixing hack. void opOpAssign(string op : "~", Range)(Range items) if (canPutConstRange!Range) { put(items); } /** * Appends an entire range to the managed array. */ void opOpAssign(string op : "~", Range)(Range items) if (canPutRange!Range) { put(items); } // only allow overwriting data on non-immutable and non-const data static if (isMutable!T) { /** * Clears the managed array. This allows the elements of the array to be reused * for appending. * * Note that clear is disabled for immutable or const element types, due to the * possibility that $(D Appender) might overwrite immutable data. */ void clear() @trusted pure nothrow { if (_data) { _data.arr = _data.arr.ptr[0 .. 0]; } } /** * Shrinks the managed array to the given length. * * Throws: $(D Exception) if newlength is greater than the current array length. */ void shrinkTo(size_t newlength) @trusted pure { import std.exception : enforce; if (_data) { enforce(newlength <= _data.arr.length, "Attempting to shrink Appender with newlength > length"); _data.arr = _data.arr.ptr[0 .. newlength]; } else enforce(newlength == 0, "Attempting to shrink empty Appender with non-zero newlength"); } } void toString()(scope void delegate(const(char)[]) sink) { import std.format : formattedWrite; sink.formattedWrite(typeof(this).stringof ~ "(%s)", data); } } /// unittest{ auto app = appender!string(); string b = "abcdefg"; foreach (char c; b) app.put(c); assert(app.data == "abcdefg"); int[] a = [ 1, 2 ]; auto app2 = appender(a); app2.put(3); app2.put([ 4, 5, 6 ]); assert(app2.data == [ 1, 2, 3, 4, 5, 6 ]); } unittest { import std.format : format; auto app = appender!(int[])(); app.put(1); app.put(2); app.put(3); assert("%s".format(app) == "Appender!(int[])(%s)".format([1,2,3])); } //Calculates an efficient growth scheme based on the old capacity //of data, and the minimum requested capacity. //arg curLen: The current length //arg reqLen: The length as requested by the user //ret sugLen: A suggested growth. private size_t appenderNewCapacity(size_t TSizeOf)(size_t curLen, size_t reqLen) @safe pure nothrow { import core.bitop : bsr; import std.algorithm : max; if(curLen == 0) return max(reqLen,8); ulong mult = 100 + (1000UL) / (bsr(curLen * TSizeOf) + 1); // limit to doubling the length, we don't want to grow too much if(mult > 200) mult = 200; auto sugLen = cast(size_t)((curLen * mult + 99) / 100); return max(reqLen, sugLen); } /** * An appender that can update an array in-place. It forwards all calls to an * underlying appender implementation. Any calls made to the appender also update * the pointer to the original array passed in. */ struct RefAppender(A) if (isDynamicArray!A) { private { alias T = ElementEncodingType!A; Appender!A impl; T[] *arr; } /** * Construct a ref appender with a given array reference. This does not copy the * data. If the array has a larger capacity as determined by arr.capacity, it * will be used by the appender. $(D RefAppender) assumes that arr is a non-null * value. * * Note, do not use builtin appending (i.e. ~=) on the original array passed in * until you are done with the appender, because calls to the appender override * those appends. */ this(T[] *arr) { impl = Appender!A(*arr); this.arr = arr; } auto opDispatch(string fn, Args...)(Args args) if (is(typeof(mixin("impl." ~ fn ~ "(args)")))) { // we do it this way because we can't cache a void return scope(exit) *this.arr = impl.data; mixin("return impl." ~ fn ~ "(args);"); } private alias AppenderType = Appender!A; /** * Appends one item to the managed array. */ void opOpAssign(string op : "~", U)(U item) if (AppenderType.canPutItem!U) { scope(exit) *this.arr = impl.data; impl.put(item); } // Const fixing hack. void opOpAssign(string op : "~", Range)(Range items) if (AppenderType.canPutConstRange!Range) { scope(exit) *this.arr = impl.data; impl.put(items); } /** * Appends an entire range to the managed array. */ void opOpAssign(string op : "~", Range)(Range items) if (AppenderType.canPutRange!Range) { scope(exit) *this.arr = impl.data; impl.put(items); } /** * Returns the capacity of the array (the maximum number of elements the * managed array can accommodate before triggering a reallocation). If any * appending will reallocate, $(D capacity) returns $(D 0). */ @property size_t capacity() const { return impl.capacity; } /** * Returns the managed array. */ @property inout(T)[] data() inout { return impl.data; } } /++ Convenience function that returns an $(D Appender!A) object initialized with $(D array). +/ Appender!A appender(A)() if (isDynamicArray!A) { return Appender!A(null); } /// ditto Appender!(E[]) appender(A : E[], E)(auto ref A array) { static assert (!isStaticArray!A || __traits(isRef, array), "Cannot create Appender from an rvalue static array"); return Appender!(E[])(array); } @safe pure nothrow unittest { import std.exception; { auto app = appender!(char[])(); string b = "abcdefg"; foreach (char c; b) app.put(c); assert(app.data == "abcdefg"); } { auto app = appender!(char[])(); string b = "abcdefg"; foreach (char c; b) app ~= c; assert(app.data == "abcdefg"); } { int[] a = [ 1, 2 ]; auto app2 = appender(a); assert(app2.data == [ 1, 2 ]); app2.put(3); app2.put([ 4, 5, 6 ][]); assert(app2.data == [ 1, 2, 3, 4, 5, 6 ]); app2.put([ 7 ]); assert(app2.data == [ 1, 2, 3, 4, 5, 6, 7 ]); } int[] a = [ 1, 2 ]; auto app2 = appender(a); assert(app2.data == [ 1, 2 ]); app2 ~= 3; app2 ~= [ 4, 5, 6 ][]; assert(app2.data == [ 1, 2, 3, 4, 5, 6 ]); app2 ~= [ 7 ]; assert(app2.data == [ 1, 2, 3, 4, 5, 6, 7 ]); app2.reserve(5); assert(app2.capacity >= 5); try // shrinkTo may throw { app2.shrinkTo(3); } catch (Exception) assert(0); assert(app2.data == [ 1, 2, 3 ]); assertThrown(app2.shrinkTo(5)); const app3 = app2; assert(app3.capacity >= 3); assert(app3.data == [1, 2, 3]); auto app4 = appender([]); try // shrinkTo may throw { app4.shrinkTo(0); } catch (Exception) assert(0); // Issue 5663 & 9725 tests foreach (S; AliasSeq!(char[], const(char)[], string)) { { Appender!S app5663i; assertNotThrown(app5663i.put("\xE3")); assert(app5663i.data == "\xE3"); Appender!S app5663c; assertNotThrown(app5663c.put(cast(const(char)[])"\xE3")); assert(app5663c.data == "\xE3"); Appender!S app5663m; assertNotThrown(app5663m.put("\xE3".dup)); assert(app5663m.data == "\xE3"); } // ditto for ~= { Appender!S app5663i; assertNotThrown(app5663i ~= "\xE3"); assert(app5663i.data == "\xE3"); Appender!S app5663c; assertNotThrown(app5663c ~= cast(const(char)[])"\xE3"); assert(app5663c.data == "\xE3"); Appender!S app5663m; assertNotThrown(app5663m ~= "\xE3".dup); assert(app5663m.data == "\xE3"); } } static struct S10122 { int val; @disable this(); this(int v) @safe pure nothrow { val = v; } } assertCTFEable!( { auto w = appender!(S10122[])(); w.put(S10122(1)); assert(w.data.length == 1 && w.data[0].val == 1); }); } @safe pure nothrow unittest { { auto w = appender!string(); w.reserve(4); cast(void)w.capacity; cast(void)w.data; try { wchar wc = 'a'; dchar dc = 'a'; w.put(wc); // decoding may throw w.put(dc); // decoding may throw } catch (Exception) assert(0); } { auto w = appender!(int[])(); w.reserve(4); cast(void)w.capacity; cast(void)w.data; w.put(10); w.put([10]); w.clear(); try { w.shrinkTo(0); } catch (Exception) assert(0); struct N { int payload; alias payload this; } w.put(N(1)); w.put([N(2)]); struct S(T) { @property bool empty() { return true; } @property T front() { return T.init; } void popFront() {} } S!int r; w.put(r); } } unittest { import std.typecons; import std.algorithm; //10690 [tuple(1)].filter!(t => true).array; // No error [tuple("A")].filter!(t => true).array; // error } unittest { import std.range; //Coverage for put(Range) struct S1 { } struct S2 { void opAssign(S2){} } auto a1 = Appender!(S1[])(); auto a2 = Appender!(S2[])(); auto au1 = Appender!(const(S1)[])(); auto au2 = Appender!(const(S2)[])(); a1.put(S1().repeat().take(10)); a2.put(S2().repeat().take(10)); auto sc1 = const(S1)(); auto sc2 = const(S2)(); au1.put(sc1.repeat().take(10)); au2.put(sc2.repeat().take(10)); } unittest { struct S { int* p; } auto a0 = Appender!(S[])(); auto a1 = Appender!(const(S)[])(); auto a2 = Appender!(immutable(S)[])(); auto s0 = S(null); auto s1 = const(S)(null); auto s2 = immutable(S)(null); a1.put(s0); a1.put(s1); a1.put(s2); a1.put([s0]); a1.put([s1]); a1.put([s2]); a0.put(s0); static assert(!is(typeof(a0.put(a1)))); static assert(!is(typeof(a0.put(a2)))); a0.put([s0]); static assert(!is(typeof(a0.put([a1])))); static assert(!is(typeof(a0.put([a2])))); static assert(!is(typeof(a2.put(a0)))); static assert(!is(typeof(a2.put(a1)))); a2.put(s2); static assert(!is(typeof(a2.put([a0])))); static assert(!is(typeof(a2.put([a1])))); a2.put([s2]); } unittest { //9528 const(E)[] fastCopy(E)(E[] src) { auto app = appender!(const(E)[])(); foreach (i, e; src) app.put(e); return app.data; } class C {} struct S { const(C) c; } S[] s = [ S(new C) ]; auto t = fastCopy(s); // Does not compile } unittest { import std.algorithm : map; //10753 struct Foo { immutable dchar d; } struct Bar { immutable int x; } "12".map!Foo.array; [1, 2].map!Bar.array; } unittest { //New appender signature tests alias mutARR = int[]; alias conARR = const(int)[]; alias immARR = immutable(int)[]; mutARR mut; conARR con; immARR imm; {auto app = Appender!mutARR(mut);} //Always worked. Should work. Should not create a warning. static assert(!is(typeof(Appender!mutARR(con)))); //Never worked. Should not work. static assert(!is(typeof(Appender!mutARR(imm)))); //Never worked. Should not work. {auto app = Appender!conARR(mut);} //Always worked. Should work. Should not create a warning. {auto app = Appender!conARR(con);} //Didn't work. Now works. Should not create a warning. {auto app = Appender!conARR(imm);} //Didn't work. Now works. Should not create a warning. //{auto app = Appender!immARR(mut);} //Worked. Will cease to work. Creates warning. //static assert(!is(typeof(Appender!immARR(mut)))); //Worked. Will cease to work. Uncomment me after full deprecation. static assert(!is(typeof(Appender!immARR(con)))); //Never worked. Should not work. {auto app = Appender!immARR(imm);} //Didn't work. Now works. Should not create a warning. //Deprecated. Please uncomment and make sure this doesn't work: //char[] cc; //static assert(!is(typeof(Appender!string(cc)))); //This should always work: {auto app = appender!string(null);} {auto app = appender!(const(char)[])(null);} {auto app = appender!(char[])(null);} } unittest //Test large allocations (for GC.extend) { import std.range; import std.algorithm : equal; Appender!(char[]) app; app.reserve(1); //cover reserve on non-initialized foreach(_; 0 .. 100_000) app.put('a'); assert(equal(app.data, 'a'.repeat(100_000))); } unittest { auto reference = new ubyte[](2048 + 1); //a number big enough to have a full page (EG: the GC extends) auto arr = reference.dup; auto app = appender(arr[0 .. 0]); app.reserve(1); //This should not trigger a call to extend app.put(ubyte(1)); //Don't clobber arr assert(reference[] == arr[]); } unittest // clear method is supported only for mutable element types { Appender!string app; static assert(!__traits(compiles, app.clear())); } unittest { static struct D//dynamic { int[] i; alias i this; } static struct S//static { int[5] i; alias i this; } static assert(!is(Appender!(char[5]))); static assert(!is(Appender!D)); static assert(!is(Appender!S)); enum int[5] a = []; int[5] b; D d; S s; int[5] foo(){return a;} static assert(!is(typeof(appender(a)))); static assert( is(typeof(appender(b)))); static assert( is(typeof(appender(d)))); static assert( is(typeof(appender(s)))); static assert(!is(typeof(appender(foo())))); } unittest { // Issue 13077 static class A {} // reduced case auto w = appender!(shared(A)[])(); w.put(new shared A()); // original case import std.range; InputRange!(shared A) foo() { return [new shared A].inputRangeObject; } auto res = foo.array; } /++ Convenience function that returns a $(D RefAppender!A) object initialized with $(D array). Don't use null for the $(D array) pointer, use the other version of $(D appender) instead. +/ RefAppender!(E[]) appender(A : E[]*, E)(A array) { return RefAppender!(E[])(array); } unittest { import std.exception; { auto arr = new char[0]; auto app = appender(&arr); string b = "abcdefg"; foreach (char c; b) app.put(c); assert(app.data == "abcdefg"); assert(arr == "abcdefg"); } { auto arr = new char[0]; auto app = appender(&arr); string b = "abcdefg"; foreach (char c; b) app ~= c; assert(app.data == "abcdefg"); assert(arr == "abcdefg"); } { int[] a = [ 1, 2 ]; auto app2 = appender(&a); assert(app2.data == [ 1, 2 ]); assert(a == [ 1, 2 ]); app2.put(3); app2.put([ 4, 5, 6 ][]); assert(app2.data == [ 1, 2, 3, 4, 5, 6 ]); assert(a == [ 1, 2, 3, 4, 5, 6 ]); } int[] a = [ 1, 2 ]; auto app2 = appender(&a); assert(app2.data == [ 1, 2 ]); assert(a == [ 1, 2 ]); app2 ~= 3; app2 ~= [ 4, 5, 6 ][]; assert(app2.data == [ 1, 2, 3, 4, 5, 6 ]); assert(a == [ 1, 2, 3, 4, 5, 6 ]); app2.reserve(5); assert(app2.capacity >= 5); try // shrinkTo may throw { app2.shrinkTo(3); } catch (Exception) assert(0); assert(app2.data == [ 1, 2, 3 ]); assertThrown(app2.shrinkTo(5)); const app3 = app2; assert(app3.capacity >= 3); assert(app3.data == [1, 2, 3]); } unittest // issue 14605 { static assert(isOutputRange!(Appender!(int[]), int)); static assert(isOutputRange!(RefAppender!(int[]), int)); } unittest { Appender!(int[]) app; short[] range = [1, 2, 3]; app.put(range); assert(app.data == [1, 2, 3]); } unittest { string s = "hello".idup; char[] a = "hello".dup; auto appS = appender(s); auto appA = appender(a); put(appS, 'w'); put(appA, 'w'); s ~= 'a'; //Clobbers here? a ~= 'a'; //Clobbers here? assert(appS.data == "hellow"); assert(appA.data == "hellow"); }
D
/******************************************************************************* Mixin for shared request initialization code copyright: Copyright (c) 2015-2017 sociomantic labs GmbH. All rights reserved License: Boost Software License Version 1.0. See LICENSE.txt for details. *******************************************************************************/ module dlsnode.request.model.ConstructorMixin; /******************************************************************************* Common code shared by all requests after the protocol split (which requires storing reference to node-specific shared resource object) *******************************************************************************/ public template RequestConstruction ( ) { import dlsnode.request.model.RequestResources; /*************************************************************************** Keeps resource object without reducing it to DlsCommand.Resources interface ***************************************************************************/ private IDlsRequestResources resources; /*************************************************************************** Constructor Params: reader = FiberSelectReader instance to use for read requests writer = FiberSelectWriter instance to use for write requests resources = shared resources which might be required by the request ***************************************************************************/ public this ( FiberSelectReader reader, FiberSelectWriter writer, IDlsRequestResources resources ) { super(reader, writer, resources); this.resources = resources; } }
D
/* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). * Version 3.0.0 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. * ----------------------------------------------------------------------------- */ module vtkVector2uintT; static import vtkd_im; static import core.stdc.config; static import std.conv; static import std.string; static import std.conv; static import std.string; static import vtkUnsignedIntTuple2TN; class vtkVector2uintT : vtkUnsignedIntTuple2TN.vtkUnsignedIntTuple2TN { private void* swigCPtr; public this(void* cObject, bool ownCObject) { super(vtkd_im.vtkVector2uintT_Upcast(cObject), ownCObject); swigCPtr = cObject; } public static void* swigGetCPtr(vtkVector2uintT obj) { return (obj is null) ? null : obj.swigCPtr; } mixin vtkd_im.SwigOperatorDefinitions; ~this() { dispose(); } public override void dispose() { synchronized(this) { if (swigCPtr !is null) { if (swigCMemOwn) { swigCMemOwn = false; vtkd_im.delete_vtkVector2uintT(cast(void*)swigCPtr); } swigCPtr = null; super.dispose(); } } } public this() { this(vtkd_im.new_vtkVector2uintT__SWIG_0(), true); } public this(uint scalar) { this(vtkd_im.new_vtkVector2uintT__SWIG_1(scalar), true); } public this(uint* init) { this(vtkd_im.new_vtkVector2uintT__SWIG_2(cast(void*)init), true); } public uint SquaredNorm() const { auto ret = vtkd_im.vtkVector2uintT_SquaredNorm(cast(void*)swigCPtr); return ret; } public double Norm() const { auto ret = vtkd_im.vtkVector2uintT_Norm(cast(void*)swigCPtr); return ret; } public double Normalize() { auto ret = vtkd_im.vtkVector2uintT_Normalize(cast(void*)swigCPtr); return ret; } public vtkVector2uintT Normalized() const { vtkVector2uintT ret = new vtkVector2uintT(vtkd_im.vtkVector2uintT_Normalized(cast(void*)swigCPtr), true); return ret; } public uint Dot(vtkVector2uintT other) const { auto ret = vtkd_im.vtkVector2uintT_Dot(cast(void*)swigCPtr, vtkVector2uintT.swigGetCPtr(other)); if (vtkd_im.SwigPendingException.isPending) throw vtkd_im.SwigPendingException.retrieve(); return ret; } }
D
/Users/gsengott/Documents/GitHub/UrbanCrawl-iOS/DerivedData/UrbanCrawl/Build/Intermediates/Pods.build/Debug-iphonesimulator/INSPhotoGallery.build/Objects-normal/x86_64/INSPhotosViewController.o : /Users/gsengott/Documents/GitHub/UrbanCrawl-iOS/Pods/INSPhotoGallery/INSPhotoGallery/INSPhoto.swift /Users/gsengott/Documents/GitHub/UrbanCrawl-iOS/Pods/INSPhotoGallery/INSPhotoGallery/INSPhotosDataSource.swift /Users/gsengott/Documents/GitHub/UrbanCrawl-iOS/Pods/INSPhotoGallery/INSPhotoGallery/INSPhotosInteractionAnimator.swift /Users/gsengott/Documents/GitHub/UrbanCrawl-iOS/Pods/INSPhotoGallery/INSPhotoGallery/INSPhotosOverlayView.swift /Users/gsengott/Documents/GitHub/UrbanCrawl-iOS/Pods/INSPhotoGallery/INSPhotoGallery/INSPhotosTransitionAnimator.swift /Users/gsengott/Documents/GitHub/UrbanCrawl-iOS/Pods/INSPhotoGallery/INSPhotoGallery/INSPhotosViewController.swift /Users/gsengott/Documents/GitHub/UrbanCrawl-iOS/Pods/INSPhotoGallery/INSPhotoGallery/INSPhotoViewController.swift /Users/gsengott/Documents/GitHub/UrbanCrawl-iOS/Pods/INSPhotoGallery/INSPhotoGallery/INSScalingImageView.swift /Users/gsengott/Documents/GitHub/UrbanCrawl-iOS/Pods/INSPhotoGallery/INSPhotoGallery/UIVIew+INSPhotoViewer.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Swift.swiftmodule /Users/gsengott/Documents/GitHub/UrbanCrawl-iOS/Pods/Target\ Support\ Files/INSPhotoGallery/INSPhotoGallery-umbrella.h /Users/gsengott/Documents/GitHub/UrbanCrawl-iOS/DerivedData/UrbanCrawl/Build/Intermediates/Pods.build/Debug-iphonesimulator/INSPhotoGallery.build/unextended-module.modulemap /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/UIKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/ObjectiveC.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreGraphics.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/QuartzCore.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreImage.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/SwiftOnoneSupport.swiftmodule /Users/gsengott/Documents/GitHub/UrbanCrawl-iOS/DerivedData/UrbanCrawl/Build/Intermediates/Pods.build/Debug-iphonesimulator/INSPhotoGallery.build/Objects-normal/x86_64/INSPhotosViewController~partial.swiftmodule : /Users/gsengott/Documents/GitHub/UrbanCrawl-iOS/Pods/INSPhotoGallery/INSPhotoGallery/INSPhoto.swift /Users/gsengott/Documents/GitHub/UrbanCrawl-iOS/Pods/INSPhotoGallery/INSPhotoGallery/INSPhotosDataSource.swift /Users/gsengott/Documents/GitHub/UrbanCrawl-iOS/Pods/INSPhotoGallery/INSPhotoGallery/INSPhotosInteractionAnimator.swift /Users/gsengott/Documents/GitHub/UrbanCrawl-iOS/Pods/INSPhotoGallery/INSPhotoGallery/INSPhotosOverlayView.swift /Users/gsengott/Documents/GitHub/UrbanCrawl-iOS/Pods/INSPhotoGallery/INSPhotoGallery/INSPhotosTransitionAnimator.swift /Users/gsengott/Documents/GitHub/UrbanCrawl-iOS/Pods/INSPhotoGallery/INSPhotoGallery/INSPhotosViewController.swift /Users/gsengott/Documents/GitHub/UrbanCrawl-iOS/Pods/INSPhotoGallery/INSPhotoGallery/INSPhotoViewController.swift /Users/gsengott/Documents/GitHub/UrbanCrawl-iOS/Pods/INSPhotoGallery/INSPhotoGallery/INSScalingImageView.swift /Users/gsengott/Documents/GitHub/UrbanCrawl-iOS/Pods/INSPhotoGallery/INSPhotoGallery/UIVIew+INSPhotoViewer.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Swift.swiftmodule /Users/gsengott/Documents/GitHub/UrbanCrawl-iOS/Pods/Target\ Support\ Files/INSPhotoGallery/INSPhotoGallery-umbrella.h /Users/gsengott/Documents/GitHub/UrbanCrawl-iOS/DerivedData/UrbanCrawl/Build/Intermediates/Pods.build/Debug-iphonesimulator/INSPhotoGallery.build/unextended-module.modulemap /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/UIKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/ObjectiveC.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreGraphics.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/QuartzCore.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreImage.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/SwiftOnoneSupport.swiftmodule /Users/gsengott/Documents/GitHub/UrbanCrawl-iOS/DerivedData/UrbanCrawl/Build/Intermediates/Pods.build/Debug-iphonesimulator/INSPhotoGallery.build/Objects-normal/x86_64/INSPhotosViewController~partial.swiftdoc : /Users/gsengott/Documents/GitHub/UrbanCrawl-iOS/Pods/INSPhotoGallery/INSPhotoGallery/INSPhoto.swift /Users/gsengott/Documents/GitHub/UrbanCrawl-iOS/Pods/INSPhotoGallery/INSPhotoGallery/INSPhotosDataSource.swift /Users/gsengott/Documents/GitHub/UrbanCrawl-iOS/Pods/INSPhotoGallery/INSPhotoGallery/INSPhotosInteractionAnimator.swift /Users/gsengott/Documents/GitHub/UrbanCrawl-iOS/Pods/INSPhotoGallery/INSPhotoGallery/INSPhotosOverlayView.swift /Users/gsengott/Documents/GitHub/UrbanCrawl-iOS/Pods/INSPhotoGallery/INSPhotoGallery/INSPhotosTransitionAnimator.swift /Users/gsengott/Documents/GitHub/UrbanCrawl-iOS/Pods/INSPhotoGallery/INSPhotoGallery/INSPhotosViewController.swift /Users/gsengott/Documents/GitHub/UrbanCrawl-iOS/Pods/INSPhotoGallery/INSPhotoGallery/INSPhotoViewController.swift /Users/gsengott/Documents/GitHub/UrbanCrawl-iOS/Pods/INSPhotoGallery/INSPhotoGallery/INSScalingImageView.swift /Users/gsengott/Documents/GitHub/UrbanCrawl-iOS/Pods/INSPhotoGallery/INSPhotoGallery/UIVIew+INSPhotoViewer.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Swift.swiftmodule /Users/gsengott/Documents/GitHub/UrbanCrawl-iOS/Pods/Target\ Support\ Files/INSPhotoGallery/INSPhotoGallery-umbrella.h /Users/gsengott/Documents/GitHub/UrbanCrawl-iOS/DerivedData/UrbanCrawl/Build/Intermediates/Pods.build/Debug-iphonesimulator/INSPhotoGallery.build/unextended-module.modulemap /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/UIKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/ObjectiveC.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreGraphics.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/QuartzCore.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreImage.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/SwiftOnoneSupport.swiftmodule
D
module sb.model_loaders.loadobj; public import sb.model_loaders.loadobj.loadobj_impl;
D
module orly.engine.renderer.rendertarget; import orly.engine.backend.ibackend; import orly.engine.renderer.texture; alias Texture _Texture; /** Render to texture object. */ class RenderTarget { private: RT rt; _Texture tex; int lastId; public: /** Creates a new render target with specified size. */ this(int width, int height) { tex = new _Texture(width, height, MinFilter.Nearest, MagFilter.Nearest); rt = Backend.RenderTargetCreate(width, height, tex.Id); } ~this() { //delete tex; Backend.RenderTargetDestroy(rt); } @property ref _Texture Texture() { return tex; } /** Binds the render target for drawing. */ void Bind() { lastId = Backend.RenderTargetBind(rt); } /** Binds previous render target. */ void Unbind() { Backend.RenderTargetBind(lastId); } /** Binds the texture. */ void BindTexture() { tex.Bind(); } }
D
/+++module evael.physics.physics_2d.Space; // import chipmunk; import dlib.math; class Space { /*private cpSpace* m_space; mixin(ChipmunkProperty!(float, "test"));*/ /** * Space constructor. */ public this() { this.m_space = cpSpaceNew(); } /** * Space destructor. */ public void dispose() { assert(this.m_space !is null); cpSpaceFree(this.m_space); } /** * Properties */ @property { public void gravity(in vec2 gravity) { cpSpaceSetGravity(this.m_space, cpv(gravity.x, gravity.y)); } } } template ChipmunkProperty(Type, string name) { public string chipmunkPropertyImpl() { return ""; } enum ChipmunkProperty = chipmunkPropertyImpl; }+++/
D
/Users/user/Documents/RiseTimeAssets/server/.build/x86_64-apple-macosx10.10/debug/Command.build/Run/CommandInput.swift.o : /Users/user/Documents/RiseTimeAssets/server/.build/checkouts/console.git--2431895819212044213/Sources/Command/Command/Command.swift /Users/user/Documents/RiseTimeAssets/server/.build/checkouts/console.git--2431895819212044213/Sources/Command/Base/CommandRunnable.swift /Users/user/Documents/RiseTimeAssets/server/.build/checkouts/console.git--2431895819212044213/Sources/Command/Run/Output+Autocomplete.swift /Users/user/Documents/RiseTimeAssets/server/.build/checkouts/console.git--2431895819212044213/Sources/Command/Config/CommandConfig.swift /Users/user/Documents/RiseTimeAssets/server/.build/checkouts/console.git--2431895819212044213/Sources/Command/Base/CommandOption.swift /Users/user/Documents/RiseTimeAssets/server/.build/checkouts/console.git--2431895819212044213/Sources/Command/Run/Console+Run.swift /Users/user/Documents/RiseTimeAssets/server/.build/checkouts/console.git--2431895819212044213/Sources/Command/Run/Output+Help.swift /Users/user/Documents/RiseTimeAssets/server/.build/checkouts/console.git--2431895819212044213/Sources/Command/Group/CommandGroup.swift /Users/user/Documents/RiseTimeAssets/server/.build/checkouts/console.git--2431895819212044213/Sources/Command/Group/BasicCommandGroup.swift /Users/user/Documents/RiseTimeAssets/server/.build/checkouts/console.git--2431895819212044213/Sources/Command/Utilities/CommandError.swift /Users/user/Documents/RiseTimeAssets/server/.build/checkouts/console.git--2431895819212044213/Sources/Command/Config/Commands.swift /Users/user/Documents/RiseTimeAssets/server/.build/checkouts/console.git--2431895819212044213/Sources/Command/Utilities/Utilities.swift /Users/user/Documents/RiseTimeAssets/server/.build/checkouts/console.git--2431895819212044213/Sources/Command/Utilities/Exports.swift /Users/user/Documents/RiseTimeAssets/server/.build/checkouts/console.git--2431895819212044213/Sources/Command/Command/CommandArgument.swift /Users/user/Documents/RiseTimeAssets/server/.build/checkouts/console.git--2431895819212044213/Sources/Command/Run/CommandInput.swift /Users/user/Documents/RiseTimeAssets/server/.build/checkouts/console.git--2431895819212044213/Sources/Command/Run/CommandContext.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Dispatch.apinotesc /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/ObjectiveC.swiftmodule /Users/user/Documents/RiseTimeAssets/server/.build/x86_64-apple-macosx10.10/debug/NIO.swiftmodule /Users/user/Documents/RiseTimeAssets/server/.build/x86_64-apple-macosx10.10/debug/Async.swiftmodule /Users/user/Documents/RiseTimeAssets/server/.build/x86_64-apple-macosx10.10/debug/Service.swiftmodule /Users/user/Documents/RiseTimeAssets/server/.build/x86_64-apple-macosx10.10/debug/Console.swiftmodule /Users/user/Documents/RiseTimeAssets/server/.build/x86_64-apple-macosx10.10/debug/Core.swiftmodule /Users/user/Documents/RiseTimeAssets/server/.build/x86_64-apple-macosx10.10/debug/Logging.swiftmodule /Users/user/Documents/RiseTimeAssets/server/.build/x86_64-apple-macosx10.10/debug/Debugging.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Dispatch.swiftmodule /Users/user/Documents/RiseTimeAssets/server/.build/x86_64-apple-macosx10.10/debug/COperatingSystem.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/CoreFoundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/CoreGraphics.swiftmodule /Users/user/Documents/RiseTimeAssets/server/.build/x86_64-apple-macosx10.10/debug/NIOConcurrencyHelpers.swiftmodule /Users/user/Documents/RiseTimeAssets/server/.build/x86_64-apple-macosx10.10/debug/Bits.swiftmodule /Users/user/Documents/RiseTimeAssets/server/.build/x86_64-apple-macosx10.10/debug/NIOFoundationCompat.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/IOKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/SwiftOnoneSupport.swiftmodule /Users/user/Documents/RiseTimeAssets/server/.build/checkouts/swift-nio.git-3108475404973543938/Sources/CNIOAtomics/include/cpp_magic.h /Users/user/Documents/RiseTimeAssets/server/.build/checkouts/swift-nio.git-3108475404973543938/Sources/CNIODarwin/include/c_nio_darwin.h /Users/user/Documents/RiseTimeAssets/server/.build/checkouts/swift-nio.git-3108475404973543938/Sources/CNIOAtomics/include/c-atomics.h /Users/user/Documents/RiseTimeAssets/server/.build/checkouts/swift-nio.git-3108475404973543938/Sources/CNIOLinux/include/c_nio_linux.h /Users/user/Documents/RiseTimeAssets/server/.build/checkouts/swift-nio-zlib-support.git--1071467962839356487/module.modulemap /Users/user/Documents/RiseTimeAssets/server/.build/x86_64-apple-macosx10.10/debug/CNIOSHA1.build/module.modulemap /Users/user/Documents/RiseTimeAssets/server/.build/x86_64-apple-macosx10.10/debug/CNIOOpenSSL.build/module.modulemap /Users/user/Documents/RiseTimeAssets/server/.build/x86_64-apple-macosx10.10/debug/CNIOZlib.build/module.modulemap /Users/user/Documents/RiseTimeAssets/server/.build/x86_64-apple-macosx10.10/debug/CNIODarwin.build/module.modulemap /Users/user/Documents/RiseTimeAssets/server/.build/x86_64-apple-macosx10.10/debug/CNIOHTTPParser.build/module.modulemap /Users/user/Documents/RiseTimeAssets/server/.build/x86_64-apple-macosx10.10/debug/CNIOAtomics.build/module.modulemap /Users/user/Documents/RiseTimeAssets/server/.build/x86_64-apple-macosx10.10/debug/CNIOLinux.build/module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Users/user/Documents/RiseTimeAssets/server/.build/x86_64-apple-macosx10.10/debug/Command.build/CommandInput~partial.swiftmodule : /Users/user/Documents/RiseTimeAssets/server/.build/checkouts/console.git--2431895819212044213/Sources/Command/Command/Command.swift /Users/user/Documents/RiseTimeAssets/server/.build/checkouts/console.git--2431895819212044213/Sources/Command/Base/CommandRunnable.swift /Users/user/Documents/RiseTimeAssets/server/.build/checkouts/console.git--2431895819212044213/Sources/Command/Run/Output+Autocomplete.swift /Users/user/Documents/RiseTimeAssets/server/.build/checkouts/console.git--2431895819212044213/Sources/Command/Config/CommandConfig.swift /Users/user/Documents/RiseTimeAssets/server/.build/checkouts/console.git--2431895819212044213/Sources/Command/Base/CommandOption.swift /Users/user/Documents/RiseTimeAssets/server/.build/checkouts/console.git--2431895819212044213/Sources/Command/Run/Console+Run.swift /Users/user/Documents/RiseTimeAssets/server/.build/checkouts/console.git--2431895819212044213/Sources/Command/Run/Output+Help.swift /Users/user/Documents/RiseTimeAssets/server/.build/checkouts/console.git--2431895819212044213/Sources/Command/Group/CommandGroup.swift /Users/user/Documents/RiseTimeAssets/server/.build/checkouts/console.git--2431895819212044213/Sources/Command/Group/BasicCommandGroup.swift /Users/user/Documents/RiseTimeAssets/server/.build/checkouts/console.git--2431895819212044213/Sources/Command/Utilities/CommandError.swift /Users/user/Documents/RiseTimeAssets/server/.build/checkouts/console.git--2431895819212044213/Sources/Command/Config/Commands.swift /Users/user/Documents/RiseTimeAssets/server/.build/checkouts/console.git--2431895819212044213/Sources/Command/Utilities/Utilities.swift /Users/user/Documents/RiseTimeAssets/server/.build/checkouts/console.git--2431895819212044213/Sources/Command/Utilities/Exports.swift /Users/user/Documents/RiseTimeAssets/server/.build/checkouts/console.git--2431895819212044213/Sources/Command/Command/CommandArgument.swift /Users/user/Documents/RiseTimeAssets/server/.build/checkouts/console.git--2431895819212044213/Sources/Command/Run/CommandInput.swift /Users/user/Documents/RiseTimeAssets/server/.build/checkouts/console.git--2431895819212044213/Sources/Command/Run/CommandContext.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Dispatch.apinotesc /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/ObjectiveC.swiftmodule /Users/user/Documents/RiseTimeAssets/server/.build/x86_64-apple-macosx10.10/debug/NIO.swiftmodule /Users/user/Documents/RiseTimeAssets/server/.build/x86_64-apple-macosx10.10/debug/Async.swiftmodule /Users/user/Documents/RiseTimeAssets/server/.build/x86_64-apple-macosx10.10/debug/Service.swiftmodule /Users/user/Documents/RiseTimeAssets/server/.build/x86_64-apple-macosx10.10/debug/Console.swiftmodule /Users/user/Documents/RiseTimeAssets/server/.build/x86_64-apple-macosx10.10/debug/Core.swiftmodule /Users/user/Documents/RiseTimeAssets/server/.build/x86_64-apple-macosx10.10/debug/Logging.swiftmodule /Users/user/Documents/RiseTimeAssets/server/.build/x86_64-apple-macosx10.10/debug/Debugging.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Dispatch.swiftmodule /Users/user/Documents/RiseTimeAssets/server/.build/x86_64-apple-macosx10.10/debug/COperatingSystem.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/CoreFoundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/CoreGraphics.swiftmodule /Users/user/Documents/RiseTimeAssets/server/.build/x86_64-apple-macosx10.10/debug/NIOConcurrencyHelpers.swiftmodule /Users/user/Documents/RiseTimeAssets/server/.build/x86_64-apple-macosx10.10/debug/Bits.swiftmodule /Users/user/Documents/RiseTimeAssets/server/.build/x86_64-apple-macosx10.10/debug/NIOFoundationCompat.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/IOKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/SwiftOnoneSupport.swiftmodule /Users/user/Documents/RiseTimeAssets/server/.build/checkouts/swift-nio.git-3108475404973543938/Sources/CNIOAtomics/include/cpp_magic.h /Users/user/Documents/RiseTimeAssets/server/.build/checkouts/swift-nio.git-3108475404973543938/Sources/CNIODarwin/include/c_nio_darwin.h /Users/user/Documents/RiseTimeAssets/server/.build/checkouts/swift-nio.git-3108475404973543938/Sources/CNIOAtomics/include/c-atomics.h /Users/user/Documents/RiseTimeAssets/server/.build/checkouts/swift-nio.git-3108475404973543938/Sources/CNIOLinux/include/c_nio_linux.h /Users/user/Documents/RiseTimeAssets/server/.build/checkouts/swift-nio-zlib-support.git--1071467962839356487/module.modulemap /Users/user/Documents/RiseTimeAssets/server/.build/x86_64-apple-macosx10.10/debug/CNIOSHA1.build/module.modulemap /Users/user/Documents/RiseTimeAssets/server/.build/x86_64-apple-macosx10.10/debug/CNIOOpenSSL.build/module.modulemap /Users/user/Documents/RiseTimeAssets/server/.build/x86_64-apple-macosx10.10/debug/CNIOZlib.build/module.modulemap /Users/user/Documents/RiseTimeAssets/server/.build/x86_64-apple-macosx10.10/debug/CNIODarwin.build/module.modulemap /Users/user/Documents/RiseTimeAssets/server/.build/x86_64-apple-macosx10.10/debug/CNIOHTTPParser.build/module.modulemap /Users/user/Documents/RiseTimeAssets/server/.build/x86_64-apple-macosx10.10/debug/CNIOAtomics.build/module.modulemap /Users/user/Documents/RiseTimeAssets/server/.build/x86_64-apple-macosx10.10/debug/CNIOLinux.build/module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Users/user/Documents/RiseTimeAssets/server/.build/x86_64-apple-macosx10.10/debug/Command.build/CommandInput~partial.swiftdoc : /Users/user/Documents/RiseTimeAssets/server/.build/checkouts/console.git--2431895819212044213/Sources/Command/Command/Command.swift /Users/user/Documents/RiseTimeAssets/server/.build/checkouts/console.git--2431895819212044213/Sources/Command/Base/CommandRunnable.swift /Users/user/Documents/RiseTimeAssets/server/.build/checkouts/console.git--2431895819212044213/Sources/Command/Run/Output+Autocomplete.swift /Users/user/Documents/RiseTimeAssets/server/.build/checkouts/console.git--2431895819212044213/Sources/Command/Config/CommandConfig.swift /Users/user/Documents/RiseTimeAssets/server/.build/checkouts/console.git--2431895819212044213/Sources/Command/Base/CommandOption.swift /Users/user/Documents/RiseTimeAssets/server/.build/checkouts/console.git--2431895819212044213/Sources/Command/Run/Console+Run.swift /Users/user/Documents/RiseTimeAssets/server/.build/checkouts/console.git--2431895819212044213/Sources/Command/Run/Output+Help.swift /Users/user/Documents/RiseTimeAssets/server/.build/checkouts/console.git--2431895819212044213/Sources/Command/Group/CommandGroup.swift /Users/user/Documents/RiseTimeAssets/server/.build/checkouts/console.git--2431895819212044213/Sources/Command/Group/BasicCommandGroup.swift /Users/user/Documents/RiseTimeAssets/server/.build/checkouts/console.git--2431895819212044213/Sources/Command/Utilities/CommandError.swift /Users/user/Documents/RiseTimeAssets/server/.build/checkouts/console.git--2431895819212044213/Sources/Command/Config/Commands.swift /Users/user/Documents/RiseTimeAssets/server/.build/checkouts/console.git--2431895819212044213/Sources/Command/Utilities/Utilities.swift /Users/user/Documents/RiseTimeAssets/server/.build/checkouts/console.git--2431895819212044213/Sources/Command/Utilities/Exports.swift /Users/user/Documents/RiseTimeAssets/server/.build/checkouts/console.git--2431895819212044213/Sources/Command/Command/CommandArgument.swift /Users/user/Documents/RiseTimeAssets/server/.build/checkouts/console.git--2431895819212044213/Sources/Command/Run/CommandInput.swift /Users/user/Documents/RiseTimeAssets/server/.build/checkouts/console.git--2431895819212044213/Sources/Command/Run/CommandContext.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Dispatch.apinotesc /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/ObjectiveC.swiftmodule /Users/user/Documents/RiseTimeAssets/server/.build/x86_64-apple-macosx10.10/debug/NIO.swiftmodule /Users/user/Documents/RiseTimeAssets/server/.build/x86_64-apple-macosx10.10/debug/Async.swiftmodule /Users/user/Documents/RiseTimeAssets/server/.build/x86_64-apple-macosx10.10/debug/Service.swiftmodule /Users/user/Documents/RiseTimeAssets/server/.build/x86_64-apple-macosx10.10/debug/Console.swiftmodule /Users/user/Documents/RiseTimeAssets/server/.build/x86_64-apple-macosx10.10/debug/Core.swiftmodule /Users/user/Documents/RiseTimeAssets/server/.build/x86_64-apple-macosx10.10/debug/Logging.swiftmodule /Users/user/Documents/RiseTimeAssets/server/.build/x86_64-apple-macosx10.10/debug/Debugging.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Dispatch.swiftmodule /Users/user/Documents/RiseTimeAssets/server/.build/x86_64-apple-macosx10.10/debug/COperatingSystem.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/CoreFoundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/CoreGraphics.swiftmodule /Users/user/Documents/RiseTimeAssets/server/.build/x86_64-apple-macosx10.10/debug/NIOConcurrencyHelpers.swiftmodule /Users/user/Documents/RiseTimeAssets/server/.build/x86_64-apple-macosx10.10/debug/Bits.swiftmodule /Users/user/Documents/RiseTimeAssets/server/.build/x86_64-apple-macosx10.10/debug/NIOFoundationCompat.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/IOKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/SwiftOnoneSupport.swiftmodule /Users/user/Documents/RiseTimeAssets/server/.build/checkouts/swift-nio.git-3108475404973543938/Sources/CNIOAtomics/include/cpp_magic.h /Users/user/Documents/RiseTimeAssets/server/.build/checkouts/swift-nio.git-3108475404973543938/Sources/CNIODarwin/include/c_nio_darwin.h /Users/user/Documents/RiseTimeAssets/server/.build/checkouts/swift-nio.git-3108475404973543938/Sources/CNIOAtomics/include/c-atomics.h /Users/user/Documents/RiseTimeAssets/server/.build/checkouts/swift-nio.git-3108475404973543938/Sources/CNIOLinux/include/c_nio_linux.h /Users/user/Documents/RiseTimeAssets/server/.build/checkouts/swift-nio-zlib-support.git--1071467962839356487/module.modulemap /Users/user/Documents/RiseTimeAssets/server/.build/x86_64-apple-macosx10.10/debug/CNIOSHA1.build/module.modulemap /Users/user/Documents/RiseTimeAssets/server/.build/x86_64-apple-macosx10.10/debug/CNIOOpenSSL.build/module.modulemap /Users/user/Documents/RiseTimeAssets/server/.build/x86_64-apple-macosx10.10/debug/CNIOZlib.build/module.modulemap /Users/user/Documents/RiseTimeAssets/server/.build/x86_64-apple-macosx10.10/debug/CNIODarwin.build/module.modulemap /Users/user/Documents/RiseTimeAssets/server/.build/x86_64-apple-macosx10.10/debug/CNIOHTTPParser.build/module.modulemap /Users/user/Documents/RiseTimeAssets/server/.build/x86_64-apple-macosx10.10/debug/CNIOAtomics.build/module.modulemap /Users/user/Documents/RiseTimeAssets/server/.build/x86_64-apple-macosx10.10/debug/CNIOLinux.build/module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes
D
/Users/paulpatarinski/WIP/Personal/XamUITests_Examples/src/Swift/Build/Intermediates/HelloWorld.build/Debug-iphonesimulator/HelloWorld.build/Objects-normal/x86_64/AppDelegate.o : /Users/paulpatarinski/WIP/Personal/XamUITests_Examples/src/Swift/HelloWorld/ViewController.swift /Users/paulpatarinski/WIP/Personal/XamUITests_Examples/src/Swift/HelloWorld/AppDelegate.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/UIKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/Dispatch.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/ObjectiveC.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/CoreGraphics.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/Security.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/CoreImage.swiftmodule /Users/paulpatarinski/WIP/Personal/XamUITests_Examples/src/Swift/Build/Intermediates/HelloWorld.build/Debug-iphonesimulator/HelloWorld.build/Objects-normal/x86_64/AppDelegate~partial.swiftmodule : /Users/paulpatarinski/WIP/Personal/XamUITests_Examples/src/Swift/HelloWorld/ViewController.swift /Users/paulpatarinski/WIP/Personal/XamUITests_Examples/src/Swift/HelloWorld/AppDelegate.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/UIKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/Dispatch.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/ObjectiveC.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/CoreGraphics.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/Security.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/CoreImage.swiftmodule /Users/paulpatarinski/WIP/Personal/XamUITests_Examples/src/Swift/Build/Intermediates/HelloWorld.build/Debug-iphonesimulator/HelloWorld.build/Objects-normal/x86_64/AppDelegate~partial.swiftdoc : /Users/paulpatarinski/WIP/Personal/XamUITests_Examples/src/Swift/HelloWorld/ViewController.swift /Users/paulpatarinski/WIP/Personal/XamUITests_Examples/src/Swift/HelloWorld/AppDelegate.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/UIKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/Dispatch.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/ObjectiveC.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/CoreGraphics.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/Security.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/CoreImage.swiftmodule
D
/home/albertfega/Desktop/LaSalleChat/.build/x86_64-unknown-linux/debug/Console.build/Bar/Bar.swift.o : /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Terminal/String+ANSI.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Utilities/Bool+Polymorphic.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Terminal/Terminal+Command.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Command/Command.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Command/Runnable.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Console/Style/Console+ConsoleStyle.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Console/Style/ConsoleStyle.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Command/Value.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Console/Console+Ask.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Terminal/ConsoleStyle+Terminal.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Terminal/ConsoleColor+Terminal.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Terminal/Terminal.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Console/Console+Ephemeral.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Console/ConsoleProtocol.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Stream/FileHandle+Stream.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Stream/Pipe+Stream.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Stream/Stream.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Utilities/String+Trim.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Console/Console+Confirm.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Command/Option.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Console/Console+Run.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Command/Group.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Bar/Bar.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Bar/Loading/Console+LoadingBar.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Bar/Loading/LoadingBar.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Bar/Progress/Console+ProgressBar.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Bar/Progress/ProgressBar.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Console/Clear/ConsoleClear.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Console/Console+Center.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Console/Color/ConsoleColor.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Console/ConsoleError.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Console/Console+Options.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Command/Argument.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Command/Command+Print.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Console/Console+Print.swift /home/albertfega/Desktop/LaSalleChat/.build/x86_64-unknown-linux/debug/libc.swiftmodule /usr/lib/swift/linux/x86_64/Glibc.swiftmodule /home/albertfega/Desktop/LaSalleChat/.build/x86_64-unknown-linux/debug/Core.swiftmodule /home/albertfega/Desktop/LaSalleChat/.build/x86_64-unknown-linux/debug/Debugging.swiftmodule /usr/lib/swift/linux/x86_64/Dispatch.swiftmodule /usr/lib/swift/linux/x86_64/Foundation.swiftmodule /home/albertfega/Desktop/LaSalleChat/.build/x86_64-unknown-linux/debug/Bits.swiftmodule /usr/lib/swift/linux/x86_64/Swift.swiftmodule /usr/lib/swift/linux/x86_64/SwiftOnoneSupport.swiftmodule /usr/lib/swift/linux/x86_64/glibc.modulemap /home/albertfega/Desktop/LaSalleChat/.build/x86_64-unknown-linux/debug/CHTTP.build/module.modulemap /home/albertfega/Desktop/LaSalleChat/.build/x86_64-unknown-linux/debug/CSQLite.build/module.modulemap /home/albertfega/Desktop/LaSalleChat/.build/x86_64-unknown-linux/debug/Console.build/Bar~partial.swiftmodule : /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Terminal/String+ANSI.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Utilities/Bool+Polymorphic.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Terminal/Terminal+Command.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Command/Command.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Command/Runnable.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Console/Style/Console+ConsoleStyle.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Console/Style/ConsoleStyle.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Command/Value.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Console/Console+Ask.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Terminal/ConsoleStyle+Terminal.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Terminal/ConsoleColor+Terminal.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Terminal/Terminal.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Console/Console+Ephemeral.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Console/ConsoleProtocol.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Stream/FileHandle+Stream.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Stream/Pipe+Stream.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Stream/Stream.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Utilities/String+Trim.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Console/Console+Confirm.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Command/Option.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Console/Console+Run.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Command/Group.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Bar/Bar.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Bar/Loading/Console+LoadingBar.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Bar/Loading/LoadingBar.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Bar/Progress/Console+ProgressBar.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Bar/Progress/ProgressBar.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Console/Clear/ConsoleClear.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Console/Console+Center.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Console/Color/ConsoleColor.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Console/ConsoleError.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Console/Console+Options.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Command/Argument.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Command/Command+Print.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Console/Console+Print.swift /home/albertfega/Desktop/LaSalleChat/.build/x86_64-unknown-linux/debug/libc.swiftmodule /usr/lib/swift/linux/x86_64/Glibc.swiftmodule /home/albertfega/Desktop/LaSalleChat/.build/x86_64-unknown-linux/debug/Core.swiftmodule /home/albertfega/Desktop/LaSalleChat/.build/x86_64-unknown-linux/debug/Debugging.swiftmodule /usr/lib/swift/linux/x86_64/Dispatch.swiftmodule /usr/lib/swift/linux/x86_64/Foundation.swiftmodule /home/albertfega/Desktop/LaSalleChat/.build/x86_64-unknown-linux/debug/Bits.swiftmodule /usr/lib/swift/linux/x86_64/Swift.swiftmodule /usr/lib/swift/linux/x86_64/SwiftOnoneSupport.swiftmodule /usr/lib/swift/linux/x86_64/glibc.modulemap /home/albertfega/Desktop/LaSalleChat/.build/x86_64-unknown-linux/debug/CHTTP.build/module.modulemap /home/albertfega/Desktop/LaSalleChat/.build/x86_64-unknown-linux/debug/CSQLite.build/module.modulemap /home/albertfega/Desktop/LaSalleChat/.build/x86_64-unknown-linux/debug/Console.build/Bar~partial.swiftdoc : /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Terminal/String+ANSI.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Utilities/Bool+Polymorphic.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Terminal/Terminal+Command.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Command/Command.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Command/Runnable.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Console/Style/Console+ConsoleStyle.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Console/Style/ConsoleStyle.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Command/Value.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Console/Console+Ask.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Terminal/ConsoleStyle+Terminal.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Terminal/ConsoleColor+Terminal.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Terminal/Terminal.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Console/Console+Ephemeral.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Console/ConsoleProtocol.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Stream/FileHandle+Stream.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Stream/Pipe+Stream.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Stream/Stream.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Utilities/String+Trim.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Console/Console+Confirm.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Command/Option.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Console/Console+Run.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Command/Group.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Bar/Bar.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Bar/Loading/Console+LoadingBar.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Bar/Loading/LoadingBar.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Bar/Progress/Console+ProgressBar.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Bar/Progress/ProgressBar.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Console/Clear/ConsoleClear.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Console/Console+Center.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Console/Color/ConsoleColor.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Console/ConsoleError.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Console/Console+Options.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Command/Argument.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Command/Command+Print.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Console/Console+Print.swift /home/albertfega/Desktop/LaSalleChat/.build/x86_64-unknown-linux/debug/libc.swiftmodule /usr/lib/swift/linux/x86_64/Glibc.swiftmodule /home/albertfega/Desktop/LaSalleChat/.build/x86_64-unknown-linux/debug/Core.swiftmodule /home/albertfega/Desktop/LaSalleChat/.build/x86_64-unknown-linux/debug/Debugging.swiftmodule /usr/lib/swift/linux/x86_64/Dispatch.swiftmodule /usr/lib/swift/linux/x86_64/Foundation.swiftmodule /home/albertfega/Desktop/LaSalleChat/.build/x86_64-unknown-linux/debug/Bits.swiftmodule /usr/lib/swift/linux/x86_64/Swift.swiftmodule /usr/lib/swift/linux/x86_64/SwiftOnoneSupport.swiftmodule /usr/lib/swift/linux/x86_64/glibc.modulemap /home/albertfega/Desktop/LaSalleChat/.build/x86_64-unknown-linux/debug/CHTTP.build/module.modulemap /home/albertfega/Desktop/LaSalleChat/.build/x86_64-unknown-linux/debug/CSQLite.build/module.modulemap
D
/Users/okasho/serverProject/tryswift/helloworld/swift/.build/debug/SocksCore.build/Conversions.swift.o : /Users/okasho/serverProject/tryswift/helloworld/swift/Packages/Socks-1.2.7/Sources/SocksCore/Address+C.swift /Users/okasho/serverProject/tryswift/helloworld/swift/Packages/Socks-1.2.7/Sources/SocksCore/Address.swift /Users/okasho/serverProject/tryswift/helloworld/swift/Packages/Socks-1.2.7/Sources/SocksCore/Bytes.swift /Users/okasho/serverProject/tryswift/helloworld/swift/Packages/Socks-1.2.7/Sources/SocksCore/Conversions.swift /Users/okasho/serverProject/tryswift/helloworld/swift/Packages/Socks-1.2.7/Sources/SocksCore/Error.swift /Users/okasho/serverProject/tryswift/helloworld/swift/Packages/Socks-1.2.7/Sources/SocksCore/FDSet.swift /Users/okasho/serverProject/tryswift/helloworld/swift/Packages/Socks-1.2.7/Sources/SocksCore/InternetSocket.swift /Users/okasho/serverProject/tryswift/helloworld/swift/Packages/Socks-1.2.7/Sources/SocksCore/Pipe.swift /Users/okasho/serverProject/tryswift/helloworld/swift/Packages/Socks-1.2.7/Sources/SocksCore/Select.swift /Users/okasho/serverProject/tryswift/helloworld/swift/Packages/Socks-1.2.7/Sources/SocksCore/Socket.swift /Users/okasho/serverProject/tryswift/helloworld/swift/Packages/Socks-1.2.7/Sources/SocksCore/SocketOptions+Deprecated.swift /Users/okasho/serverProject/tryswift/helloworld/swift/Packages/Socks-1.2.7/Sources/SocksCore/SocketOptions.swift /Users/okasho/serverProject/tryswift/helloworld/swift/Packages/Socks-1.2.7/Sources/SocksCore/TCPSocket.swift /Users/okasho/serverProject/tryswift/helloworld/swift/Packages/Socks-1.2.7/Sources/SocksCore/Types.swift /Users/okasho/serverProject/tryswift/helloworld/swift/Packages/Socks-1.2.7/Sources/SocksCore/UDPSocket.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/SwiftOnoneSupport.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Dispatch.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/ObjectiveC.swiftmodule /Users/okasho/serverProject/tryswift/helloworld/swift/.build/debug/SocksCore.build/Conversions~partial.swiftmodule : /Users/okasho/serverProject/tryswift/helloworld/swift/Packages/Socks-1.2.7/Sources/SocksCore/Address+C.swift /Users/okasho/serverProject/tryswift/helloworld/swift/Packages/Socks-1.2.7/Sources/SocksCore/Address.swift /Users/okasho/serverProject/tryswift/helloworld/swift/Packages/Socks-1.2.7/Sources/SocksCore/Bytes.swift /Users/okasho/serverProject/tryswift/helloworld/swift/Packages/Socks-1.2.7/Sources/SocksCore/Conversions.swift /Users/okasho/serverProject/tryswift/helloworld/swift/Packages/Socks-1.2.7/Sources/SocksCore/Error.swift /Users/okasho/serverProject/tryswift/helloworld/swift/Packages/Socks-1.2.7/Sources/SocksCore/FDSet.swift /Users/okasho/serverProject/tryswift/helloworld/swift/Packages/Socks-1.2.7/Sources/SocksCore/InternetSocket.swift /Users/okasho/serverProject/tryswift/helloworld/swift/Packages/Socks-1.2.7/Sources/SocksCore/Pipe.swift /Users/okasho/serverProject/tryswift/helloworld/swift/Packages/Socks-1.2.7/Sources/SocksCore/Select.swift /Users/okasho/serverProject/tryswift/helloworld/swift/Packages/Socks-1.2.7/Sources/SocksCore/Socket.swift /Users/okasho/serverProject/tryswift/helloworld/swift/Packages/Socks-1.2.7/Sources/SocksCore/SocketOptions+Deprecated.swift /Users/okasho/serverProject/tryswift/helloworld/swift/Packages/Socks-1.2.7/Sources/SocksCore/SocketOptions.swift /Users/okasho/serverProject/tryswift/helloworld/swift/Packages/Socks-1.2.7/Sources/SocksCore/TCPSocket.swift /Users/okasho/serverProject/tryswift/helloworld/swift/Packages/Socks-1.2.7/Sources/SocksCore/Types.swift /Users/okasho/serverProject/tryswift/helloworld/swift/Packages/Socks-1.2.7/Sources/SocksCore/UDPSocket.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/SwiftOnoneSupport.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Dispatch.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/ObjectiveC.swiftmodule /Users/okasho/serverProject/tryswift/helloworld/swift/.build/debug/SocksCore.build/Conversions~partial.swiftdoc : /Users/okasho/serverProject/tryswift/helloworld/swift/Packages/Socks-1.2.7/Sources/SocksCore/Address+C.swift /Users/okasho/serverProject/tryswift/helloworld/swift/Packages/Socks-1.2.7/Sources/SocksCore/Address.swift /Users/okasho/serverProject/tryswift/helloworld/swift/Packages/Socks-1.2.7/Sources/SocksCore/Bytes.swift /Users/okasho/serverProject/tryswift/helloworld/swift/Packages/Socks-1.2.7/Sources/SocksCore/Conversions.swift /Users/okasho/serverProject/tryswift/helloworld/swift/Packages/Socks-1.2.7/Sources/SocksCore/Error.swift /Users/okasho/serverProject/tryswift/helloworld/swift/Packages/Socks-1.2.7/Sources/SocksCore/FDSet.swift /Users/okasho/serverProject/tryswift/helloworld/swift/Packages/Socks-1.2.7/Sources/SocksCore/InternetSocket.swift /Users/okasho/serverProject/tryswift/helloworld/swift/Packages/Socks-1.2.7/Sources/SocksCore/Pipe.swift /Users/okasho/serverProject/tryswift/helloworld/swift/Packages/Socks-1.2.7/Sources/SocksCore/Select.swift /Users/okasho/serverProject/tryswift/helloworld/swift/Packages/Socks-1.2.7/Sources/SocksCore/Socket.swift /Users/okasho/serverProject/tryswift/helloworld/swift/Packages/Socks-1.2.7/Sources/SocksCore/SocketOptions+Deprecated.swift /Users/okasho/serverProject/tryswift/helloworld/swift/Packages/Socks-1.2.7/Sources/SocksCore/SocketOptions.swift /Users/okasho/serverProject/tryswift/helloworld/swift/Packages/Socks-1.2.7/Sources/SocksCore/TCPSocket.swift /Users/okasho/serverProject/tryswift/helloworld/swift/Packages/Socks-1.2.7/Sources/SocksCore/Types.swift /Users/okasho/serverProject/tryswift/helloworld/swift/Packages/Socks-1.2.7/Sources/SocksCore/UDPSocket.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/SwiftOnoneSupport.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Dispatch.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/ObjectiveC.swiftmodule
D
//********************************************************************* // Info EXIT //********************************************************************* INSTANCE DIA_NASZ_121_Straznik_EXIT (C_INFO) { npc = NASZ_121_Straznik; nr = 999; condition = DIA_NASZ_121_Straznik_EXIT_Condition; information = DIA_NASZ_121_Straznik_EXIT_Info; permanent = TRUE; description = DIALOG_ENDE; }; FUNC INT DIA_NASZ_121_Straznik_EXIT_Condition() { return TRUE; }; FUNC VOID DIA_NASZ_121_Straznik_EXIT_Info() { AI_StopProcessInfos (self); }; //********************************************************************* // Info Hello //********************************************************************* INSTANCE DIA_NASZ_121_Straznik_siema (C_INFO) { npc = NASZ_121_Straznik; nr = 1; condition = DIA_NASZ_121_Straznik_siema_Condition; information = DIA_NASZ_121_Straznik_siema_Info; permanent = FALSE; important = TRUE; }; FUNC INT DIA_NASZ_121_Straznik_siema_Condition() { if (WejscieDoObozuLowcow == FALSE) { return TRUE; }; }; FUNC VOID DIA_NASZ_121_Straznik_siema_Info() { AI_Output (self, other,"DIA_NASZ_121_Straznik_siema_55_00"); //Nowy? Udaj się od razu do szefa. Znajdziesz go w chałupie za karczmą. AI_Output (self, other,"DIA_NASZ_121_Straznik_siema_55_01"); //A teraz wybacz, ale muszę być czujny. WejscieDoObozuLowcow = TRUE; AI_StopProcessInfos (self); }; //********************************************************************* // Info Hello2 //********************************************************************* INSTANCE DIA_NASZ_121_Straznik_siema2 (C_INFO) { npc = NASZ_121_Straznik; nr = 2; condition = DIA_NASZ_121_Straznik_siema2_Condition; information = DIA_NASZ_121_Straznik_siema2_Info; permanent = TRUE; important = TRUE; }; FUNC INT DIA_NASZ_121_Straznik_siema2_Condition() { if (Npc_IsInState(self, ZS_TALK) && (WejscieDoObozuLowcow == TRUE)) { return TRUE; }; }; FUNC VOID DIA_NASZ_121_Straznik_siema2_Info() { AI_Output (self, other,"DIA_NASZ_121_Straznik_siema2_15_00"); //Nie mam czasu. AI_StopProcessInfos (self); };
D
/Users/a123456/Desktop/MagicalRecordDemo/Build/Intermediates/MagicalRecordDemo.build/Debug-iphonesimulator/MagicalRecordDemo.build/Objects-normal/x86_64/DataModel+CoreDataModel.o : /Users/a123456/Desktop/MagicalRecordDemo/Build/Intermediates/MagicalRecordDemo.build/Debug-iphonesimulator/MagicalRecordDemo.build/DerivedSources/CoreDataGenerated/DataModel/Episode+CoreDataClass.swift /Users/a123456/Desktop/MagicalRecordDemo/Build/Intermediates/MagicalRecordDemo.build/Debug-iphonesimulator/MagicalRecordDemo.build/DerivedSources/CoreDataGenerated/DataModel/Episode+CoreDataProperties.swift /Users/a123456/Desktop/MagicalRecordDemo/Build/Intermediates/MagicalRecordDemo.build/Debug-iphonesimulator/MagicalRecordDemo.build/DerivedSources/CoreDataGenerated/DataModel/DataModel+CoreDataModel.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/ObjectiveC.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreGraphics.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreData.swiftmodule /Users/a123456/Desktop/MagicalRecordDemo/Build/Intermediates/MagicalRecordDemo.build/Debug-iphonesimulator/MagicalRecordDemo.build/Objects-normal/x86_64/DataModel+CoreDataModel~partial.swiftmodule : /Users/a123456/Desktop/MagicalRecordDemo/Build/Intermediates/MagicalRecordDemo.build/Debug-iphonesimulator/MagicalRecordDemo.build/DerivedSources/CoreDataGenerated/DataModel/Episode+CoreDataClass.swift /Users/a123456/Desktop/MagicalRecordDemo/Build/Intermediates/MagicalRecordDemo.build/Debug-iphonesimulator/MagicalRecordDemo.build/DerivedSources/CoreDataGenerated/DataModel/Episode+CoreDataProperties.swift /Users/a123456/Desktop/MagicalRecordDemo/Build/Intermediates/MagicalRecordDemo.build/Debug-iphonesimulator/MagicalRecordDemo.build/DerivedSources/CoreDataGenerated/DataModel/DataModel+CoreDataModel.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/ObjectiveC.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreGraphics.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreData.swiftmodule /Users/a123456/Desktop/MagicalRecordDemo/Build/Intermediates/MagicalRecordDemo.build/Debug-iphonesimulator/MagicalRecordDemo.build/Objects-normal/x86_64/DataModel+CoreDataModel~partial.swiftdoc : /Users/a123456/Desktop/MagicalRecordDemo/Build/Intermediates/MagicalRecordDemo.build/Debug-iphonesimulator/MagicalRecordDemo.build/DerivedSources/CoreDataGenerated/DataModel/Episode+CoreDataClass.swift /Users/a123456/Desktop/MagicalRecordDemo/Build/Intermediates/MagicalRecordDemo.build/Debug-iphonesimulator/MagicalRecordDemo.build/DerivedSources/CoreDataGenerated/DataModel/Episode+CoreDataProperties.swift /Users/a123456/Desktop/MagicalRecordDemo/Build/Intermediates/MagicalRecordDemo.build/Debug-iphonesimulator/MagicalRecordDemo.build/DerivedSources/CoreDataGenerated/DataModel/DataModel+CoreDataModel.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/ObjectiveC.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreGraphics.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreData.swiftmodule
D
/Users/petercernak/vapor/TILApp/Build/Intermediates.noindex/TILApp.build/Debug/SQL.build/Objects-normal/x86_64/SQLPredicateBuilder.o : /Users/petercernak/vapor/TILApp/.build/checkouts/sql.git--5031097865152321144/Sources/SQL/SQLBind.swift /Users/petercernak/vapor/TILApp/.build/checkouts/sql.git--5031097865152321144/Sources/SQL/SQLJoinMethod.swift /Users/petercernak/vapor/TILApp/.build/checkouts/sql.git--5031097865152321144/Sources/SQL/SQLTable.swift /Users/petercernak/vapor/TILApp/.build/checkouts/sql.git--5031097865152321144/Sources/SQL/SQLCreateTable.swift /Users/petercernak/vapor/TILApp/.build/checkouts/sql.git--5031097865152321144/Sources/SQL/SQLDropTable.swift /Users/petercernak/vapor/TILApp/.build/checkouts/sql.git--5031097865152321144/Sources/SQL/SQLAlterTable.swift /Users/petercernak/vapor/TILApp/.build/checkouts/sql.git--5031097865152321144/Sources/SQL/SQLSerializable.swift /Users/petercernak/vapor/TILApp/.build/checkouts/sql.git--5031097865152321144/Sources/SQL/SQLDataType.swift /Users/petercernak/vapor/TILApp/.build/checkouts/sql.git--5031097865152321144/Sources/SQL/SQLUpdate.swift /Users/petercernak/vapor/TILApp/.build/checkouts/sql.git--5031097865152321144/Sources/SQL/SQLDelete.swift /Users/petercernak/vapor/TILApp/.build/checkouts/sql.git--5031097865152321144/Sources/SQL/SQLLiteral.swift /Users/petercernak/vapor/TILApp/.build/checkouts/sql.git--5031097865152321144/Sources/SQL/SQLBoolLiteral.swift /Users/petercernak/vapor/TILApp/.build/checkouts/sql.git--5031097865152321144/Sources/SQL/SQLDefaultLiteral.swift /Users/petercernak/vapor/TILApp/.build/checkouts/sql.git--5031097865152321144/Sources/SQL/SQLTableConstraintAlgorithm.swift /Users/petercernak/vapor/TILApp/.build/checkouts/sql.git--5031097865152321144/Sources/SQL/SQLColumnConstraintAlgorithm.swift /Users/petercernak/vapor/TILApp/.build/checkouts/sql.git--5031097865152321144/Sources/SQL/SQLJoin.swift /Users/petercernak/vapor/TILApp/.build/checkouts/sql.git--5031097865152321144/Sources/SQL/SQLExpression.swift /Users/petercernak/vapor/TILApp/.build/checkouts/sql.git--5031097865152321144/Sources/SQL/SQLSelectExpression.swift /Users/petercernak/vapor/TILApp/.build/checkouts/sql.git--5031097865152321144/Sources/SQL/SQLCollation.swift /Users/petercernak/vapor/TILApp/.build/checkouts/sql.git--5031097865152321144/Sources/SQL/SQLForeignKeyAction.swift /Users/petercernak/vapor/TILApp/.build/checkouts/sql.git--5031097865152321144/Sources/SQL/SQLConnection.swift /Users/petercernak/vapor/TILApp/.build/checkouts/sql.git--5031097865152321144/Sources/SQL/SQLDirection.swift /Users/petercernak/vapor/TILApp/.build/checkouts/sql.git--5031097865152321144/Sources/SQL/SQLFunction.swift /Users/petercernak/vapor/TILApp/.build/checkouts/sql.git--5031097865152321144/Sources/SQL/SQLColumnDefinition.swift /Users/petercernak/vapor/TILApp/.build/checkouts/sql.git--5031097865152321144/Sources/SQL/SQLCreateTableBuilder.swift /Users/petercernak/vapor/TILApp/.build/checkouts/sql.git--5031097865152321144/Sources/SQL/SQLDropTableBuilder.swift /Users/petercernak/vapor/TILApp/.build/checkouts/sql.git--5031097865152321144/Sources/SQL/SQLAlterTableBuilder.swift /Users/petercernak/vapor/TILApp/.build/checkouts/sql.git--5031097865152321144/Sources/SQL/SQLPredicateBuilder.swift /Users/petercernak/vapor/TILApp/.build/checkouts/sql.git--5031097865152321144/Sources/SQL/SQLUpdateBuilder.swift /Users/petercernak/vapor/TILApp/.build/checkouts/sql.git--5031097865152321144/Sources/SQL/SQLDeleteBuilder.swift /Users/petercernak/vapor/TILApp/.build/checkouts/sql.git--5031097865152321144/Sources/SQL/SQLColumnBuilder.swift /Users/petercernak/vapor/TILApp/.build/checkouts/sql.git--5031097865152321144/Sources/SQL/SQLPredicateGroupBuilder.swift /Users/petercernak/vapor/TILApp/.build/checkouts/sql.git--5031097865152321144/Sources/SQL/SQLSelectBuilder.swift /Users/petercernak/vapor/TILApp/.build/checkouts/sql.git--5031097865152321144/Sources/SQL/SQLInsertBuilder.swift /Users/petercernak/vapor/TILApp/.build/checkouts/sql.git--5031097865152321144/Sources/SQL/SQLRawBuilder.swift /Users/petercernak/vapor/TILApp/.build/checkouts/sql.git--5031097865152321144/Sources/SQL/SQLCreateIndexBuilder.swift /Users/petercernak/vapor/TILApp/.build/checkouts/sql.git--5031097865152321144/Sources/SQL/SQLQueryBuilder.swift /Users/petercernak/vapor/TILApp/.build/checkouts/sql.git--5031097865152321144/Sources/SQL/SQLQueryEncoder.swift /Users/petercernak/vapor/TILApp/.build/checkouts/sql.git--5031097865152321144/Sources/SQL/SQLQueryFetcher.swift /Users/petercernak/vapor/TILApp/.build/checkouts/sql.git--5031097865152321144/Sources/SQL/SQLIndexModifier.swift /Users/petercernak/vapor/TILApp/.build/checkouts/sql.git--5031097865152321144/Sources/SQL/SQLIdentifier.swift /Users/petercernak/vapor/TILApp/.build/checkouts/sql.git--5031097865152321144/Sources/SQL/SQLTableIdentifier.swift /Users/petercernak/vapor/TILApp/.build/checkouts/sql.git--5031097865152321144/Sources/SQL/SQLColumnIdentifier.swift /Users/petercernak/vapor/TILApp/.build/checkouts/sql.git--5031097865152321144/Sources/SQL/SQLError.swift /Users/petercernak/vapor/TILApp/.build/checkouts/sql.git--5031097865152321144/Sources/SQL/SQLBinaryOperator.swift /Users/petercernak/vapor/TILApp/.build/checkouts/sql.git--5031097865152321144/Sources/SQL/Exports.swift /Users/petercernak/vapor/TILApp/.build/checkouts/sql.git--5031097865152321144/Sources/SQL/SQLSelect.swift /Users/petercernak/vapor/TILApp/.build/checkouts/sql.git--5031097865152321144/Sources/SQL/SQLDistinct.swift /Users/petercernak/vapor/TILApp/.build/checkouts/sql.git--5031097865152321144/Sources/SQL/SQLFunctionArgument.swift /Users/petercernak/vapor/TILApp/.build/checkouts/sql.git--5031097865152321144/Sources/SQL/SQLTableConstraint.swift /Users/petercernak/vapor/TILApp/.build/checkouts/sql.git--5031097865152321144/Sources/SQL/SQLColumnConstraint.swift /Users/petercernak/vapor/TILApp/.build/checkouts/sql.git--5031097865152321144/Sources/SQL/SQLInsert.swift /Users/petercernak/vapor/TILApp/.build/checkouts/sql.git--5031097865152321144/Sources/SQL/SQLCreateIndex.swift /Users/petercernak/vapor/TILApp/.build/checkouts/sql.git--5031097865152321144/Sources/SQL/SQLDropIndex.swift /Users/petercernak/vapor/TILApp/.build/checkouts/sql.git--5031097865152321144/Sources/SQL/SQLGroupBy.swift /Users/petercernak/vapor/TILApp/.build/checkouts/sql.git--5031097865152321144/Sources/SQL/SQLOrderBy.swift /Users/petercernak/vapor/TILApp/.build/checkouts/sql.git--5031097865152321144/Sources/SQL/SQLForeignKey.swift /Users/petercernak/vapor/TILApp/.build/checkouts/sql.git--5031097865152321144/Sources/SQL/SQLPrimaryKey.swift /Users/petercernak/vapor/TILApp/.build/checkouts/sql.git--5031097865152321144/Sources/SQL/SQLQuery.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Dispatch.apinotesc /Users/petercernak/vapor/TILApp/Build/Products/Debug/NIO.framework/Modules/NIO.swiftmodule/x86_64.swiftmodule /Users/petercernak/vapor/TILApp/Build/Products/Debug/Async.framework/Modules/Async.swiftmodule/x86_64.swiftmodule /Users/petercernak/vapor/TILApp/Build/Products/Debug/Service.framework/Modules/Service.swiftmodule/x86_64.swiftmodule /Users/petercernak/vapor/TILApp/Build/Products/Debug/Core.framework/Modules/Core.swiftmodule/x86_64.swiftmodule /Users/petercernak/vapor/TILApp/Build/Products/Debug/Debugging.framework/Modules/Debugging.swiftmodule/x86_64.swiftmodule /Users/petercernak/vapor/TILApp/Build/Products/Debug/COperatingSystem.framework/Modules/COperatingSystem.swiftmodule/x86_64.swiftmodule /Users/petercernak/vapor/TILApp/Build/Products/Debug/NIOConcurrencyHelpers.framework/Modules/NIOConcurrencyHelpers.swiftmodule/x86_64.swiftmodule /Users/petercernak/vapor/TILApp/Build/Products/Debug/Bits.framework/Modules/Bits.swiftmodule/x86_64.swiftmodule /Users/petercernak/vapor/TILApp/Build/Products/Debug/NIOFoundationCompat.framework/Modules/NIOFoundationCompat.swiftmodule/x86_64.swiftmodule /Users/petercernak/vapor/TILApp/Build/Products/Debug/DatabaseKit.framework/Modules/DatabaseKit.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/ObjectiveC.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Dispatch.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/CoreFoundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/CoreGraphics.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/IOKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/SwiftOnoneSupport.swiftmodule /Users/petercernak/vapor/TILApp/.build/checkouts/swift-nio.git--2128188973977302459/Sources/CNIOAtomics/include/cpp_magic.h /Users/petercernak/vapor/TILApp/.build/checkouts/swift-nio.git--2128188973977302459/Sources/CNIODarwin/include/c_nio_darwin.h /Users/petercernak/vapor/TILApp/.build/checkouts/swift-nio.git--2128188973977302459/Sources/CNIOAtomics/include/c-atomics.h /Users/petercernak/vapor/TILApp/.build/checkouts/swift-nio.git--2128188973977302459/Sources/CNIOLinux/include/c_nio_linux.h /Users/petercernak/vapor/TILApp/TILApp.xcodeproj/GeneratedModuleMap/CNIOSHA1/module.modulemap /Users/petercernak/vapor/TILApp/.build/checkouts/swift-nio-zlib-support.git--6538424668019974428/module.modulemap /Users/petercernak/vapor/TILApp/TILApp.xcodeproj/GeneratedModuleMap/CNIODarwin/module.modulemap /Users/petercernak/vapor/TILApp/TILApp.xcodeproj/GeneratedModuleMap/CNIOAtomics/module.modulemap /Users/petercernak/vapor/TILApp/TILApp.xcodeproj/GeneratedModuleMap/CNIOLinux/module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/ApplicationServices.framework/Headers/ApplicationServices.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Security.framework/Headers/Security.apinotes /Users/petercernak/vapor/TILApp/Build/Intermediates.noindex/TILApp.build/Debug/SQL.build/Objects-normal/x86_64/SQLPredicateBuilder~partial.swiftmodule : /Users/petercernak/vapor/TILApp/.build/checkouts/sql.git--5031097865152321144/Sources/SQL/SQLBind.swift /Users/petercernak/vapor/TILApp/.build/checkouts/sql.git--5031097865152321144/Sources/SQL/SQLJoinMethod.swift /Users/petercernak/vapor/TILApp/.build/checkouts/sql.git--5031097865152321144/Sources/SQL/SQLTable.swift /Users/petercernak/vapor/TILApp/.build/checkouts/sql.git--5031097865152321144/Sources/SQL/SQLCreateTable.swift /Users/petercernak/vapor/TILApp/.build/checkouts/sql.git--5031097865152321144/Sources/SQL/SQLDropTable.swift /Users/petercernak/vapor/TILApp/.build/checkouts/sql.git--5031097865152321144/Sources/SQL/SQLAlterTable.swift /Users/petercernak/vapor/TILApp/.build/checkouts/sql.git--5031097865152321144/Sources/SQL/SQLSerializable.swift /Users/petercernak/vapor/TILApp/.build/checkouts/sql.git--5031097865152321144/Sources/SQL/SQLDataType.swift /Users/petercernak/vapor/TILApp/.build/checkouts/sql.git--5031097865152321144/Sources/SQL/SQLUpdate.swift /Users/petercernak/vapor/TILApp/.build/checkouts/sql.git--5031097865152321144/Sources/SQL/SQLDelete.swift /Users/petercernak/vapor/TILApp/.build/checkouts/sql.git--5031097865152321144/Sources/SQL/SQLLiteral.swift /Users/petercernak/vapor/TILApp/.build/checkouts/sql.git--5031097865152321144/Sources/SQL/SQLBoolLiteral.swift /Users/petercernak/vapor/TILApp/.build/checkouts/sql.git--5031097865152321144/Sources/SQL/SQLDefaultLiteral.swift /Users/petercernak/vapor/TILApp/.build/checkouts/sql.git--5031097865152321144/Sources/SQL/SQLTableConstraintAlgorithm.swift /Users/petercernak/vapor/TILApp/.build/checkouts/sql.git--5031097865152321144/Sources/SQL/SQLColumnConstraintAlgorithm.swift /Users/petercernak/vapor/TILApp/.build/checkouts/sql.git--5031097865152321144/Sources/SQL/SQLJoin.swift /Users/petercernak/vapor/TILApp/.build/checkouts/sql.git--5031097865152321144/Sources/SQL/SQLExpression.swift /Users/petercernak/vapor/TILApp/.build/checkouts/sql.git--5031097865152321144/Sources/SQL/SQLSelectExpression.swift /Users/petercernak/vapor/TILApp/.build/checkouts/sql.git--5031097865152321144/Sources/SQL/SQLCollation.swift /Users/petercernak/vapor/TILApp/.build/checkouts/sql.git--5031097865152321144/Sources/SQL/SQLForeignKeyAction.swift /Users/petercernak/vapor/TILApp/.build/checkouts/sql.git--5031097865152321144/Sources/SQL/SQLConnection.swift /Users/petercernak/vapor/TILApp/.build/checkouts/sql.git--5031097865152321144/Sources/SQL/SQLDirection.swift /Users/petercernak/vapor/TILApp/.build/checkouts/sql.git--5031097865152321144/Sources/SQL/SQLFunction.swift /Users/petercernak/vapor/TILApp/.build/checkouts/sql.git--5031097865152321144/Sources/SQL/SQLColumnDefinition.swift /Users/petercernak/vapor/TILApp/.build/checkouts/sql.git--5031097865152321144/Sources/SQL/SQLCreateTableBuilder.swift /Users/petercernak/vapor/TILApp/.build/checkouts/sql.git--5031097865152321144/Sources/SQL/SQLDropTableBuilder.swift /Users/petercernak/vapor/TILApp/.build/checkouts/sql.git--5031097865152321144/Sources/SQL/SQLAlterTableBuilder.swift /Users/petercernak/vapor/TILApp/.build/checkouts/sql.git--5031097865152321144/Sources/SQL/SQLPredicateBuilder.swift /Users/petercernak/vapor/TILApp/.build/checkouts/sql.git--5031097865152321144/Sources/SQL/SQLUpdateBuilder.swift /Users/petercernak/vapor/TILApp/.build/checkouts/sql.git--5031097865152321144/Sources/SQL/SQLDeleteBuilder.swift /Users/petercernak/vapor/TILApp/.build/checkouts/sql.git--5031097865152321144/Sources/SQL/SQLColumnBuilder.swift /Users/petercernak/vapor/TILApp/.build/checkouts/sql.git--5031097865152321144/Sources/SQL/SQLPredicateGroupBuilder.swift /Users/petercernak/vapor/TILApp/.build/checkouts/sql.git--5031097865152321144/Sources/SQL/SQLSelectBuilder.swift /Users/petercernak/vapor/TILApp/.build/checkouts/sql.git--5031097865152321144/Sources/SQL/SQLInsertBuilder.swift /Users/petercernak/vapor/TILApp/.build/checkouts/sql.git--5031097865152321144/Sources/SQL/SQLRawBuilder.swift /Users/petercernak/vapor/TILApp/.build/checkouts/sql.git--5031097865152321144/Sources/SQL/SQLCreateIndexBuilder.swift /Users/petercernak/vapor/TILApp/.build/checkouts/sql.git--5031097865152321144/Sources/SQL/SQLQueryBuilder.swift /Users/petercernak/vapor/TILApp/.build/checkouts/sql.git--5031097865152321144/Sources/SQL/SQLQueryEncoder.swift /Users/petercernak/vapor/TILApp/.build/checkouts/sql.git--5031097865152321144/Sources/SQL/SQLQueryFetcher.swift /Users/petercernak/vapor/TILApp/.build/checkouts/sql.git--5031097865152321144/Sources/SQL/SQLIndexModifier.swift /Users/petercernak/vapor/TILApp/.build/checkouts/sql.git--5031097865152321144/Sources/SQL/SQLIdentifier.swift /Users/petercernak/vapor/TILApp/.build/checkouts/sql.git--5031097865152321144/Sources/SQL/SQLTableIdentifier.swift /Users/petercernak/vapor/TILApp/.build/checkouts/sql.git--5031097865152321144/Sources/SQL/SQLColumnIdentifier.swift /Users/petercernak/vapor/TILApp/.build/checkouts/sql.git--5031097865152321144/Sources/SQL/SQLError.swift /Users/petercernak/vapor/TILApp/.build/checkouts/sql.git--5031097865152321144/Sources/SQL/SQLBinaryOperator.swift /Users/petercernak/vapor/TILApp/.build/checkouts/sql.git--5031097865152321144/Sources/SQL/Exports.swift /Users/petercernak/vapor/TILApp/.build/checkouts/sql.git--5031097865152321144/Sources/SQL/SQLSelect.swift /Users/petercernak/vapor/TILApp/.build/checkouts/sql.git--5031097865152321144/Sources/SQL/SQLDistinct.swift /Users/petercernak/vapor/TILApp/.build/checkouts/sql.git--5031097865152321144/Sources/SQL/SQLFunctionArgument.swift /Users/petercernak/vapor/TILApp/.build/checkouts/sql.git--5031097865152321144/Sources/SQL/SQLTableConstraint.swift /Users/petercernak/vapor/TILApp/.build/checkouts/sql.git--5031097865152321144/Sources/SQL/SQLColumnConstraint.swift /Users/petercernak/vapor/TILApp/.build/checkouts/sql.git--5031097865152321144/Sources/SQL/SQLInsert.swift /Users/petercernak/vapor/TILApp/.build/checkouts/sql.git--5031097865152321144/Sources/SQL/SQLCreateIndex.swift /Users/petercernak/vapor/TILApp/.build/checkouts/sql.git--5031097865152321144/Sources/SQL/SQLDropIndex.swift /Users/petercernak/vapor/TILApp/.build/checkouts/sql.git--5031097865152321144/Sources/SQL/SQLGroupBy.swift /Users/petercernak/vapor/TILApp/.build/checkouts/sql.git--5031097865152321144/Sources/SQL/SQLOrderBy.swift /Users/petercernak/vapor/TILApp/.build/checkouts/sql.git--5031097865152321144/Sources/SQL/SQLForeignKey.swift /Users/petercernak/vapor/TILApp/.build/checkouts/sql.git--5031097865152321144/Sources/SQL/SQLPrimaryKey.swift /Users/petercernak/vapor/TILApp/.build/checkouts/sql.git--5031097865152321144/Sources/SQL/SQLQuery.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Dispatch.apinotesc /Users/petercernak/vapor/TILApp/Build/Products/Debug/NIO.framework/Modules/NIO.swiftmodule/x86_64.swiftmodule /Users/petercernak/vapor/TILApp/Build/Products/Debug/Async.framework/Modules/Async.swiftmodule/x86_64.swiftmodule /Users/petercernak/vapor/TILApp/Build/Products/Debug/Service.framework/Modules/Service.swiftmodule/x86_64.swiftmodule /Users/petercernak/vapor/TILApp/Build/Products/Debug/Core.framework/Modules/Core.swiftmodule/x86_64.swiftmodule /Users/petercernak/vapor/TILApp/Build/Products/Debug/Debugging.framework/Modules/Debugging.swiftmodule/x86_64.swiftmodule /Users/petercernak/vapor/TILApp/Build/Products/Debug/COperatingSystem.framework/Modules/COperatingSystem.swiftmodule/x86_64.swiftmodule /Users/petercernak/vapor/TILApp/Build/Products/Debug/NIOConcurrencyHelpers.framework/Modules/NIOConcurrencyHelpers.swiftmodule/x86_64.swiftmodule /Users/petercernak/vapor/TILApp/Build/Products/Debug/Bits.framework/Modules/Bits.swiftmodule/x86_64.swiftmodule /Users/petercernak/vapor/TILApp/Build/Products/Debug/NIOFoundationCompat.framework/Modules/NIOFoundationCompat.swiftmodule/x86_64.swiftmodule /Users/petercernak/vapor/TILApp/Build/Products/Debug/DatabaseKit.framework/Modules/DatabaseKit.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/ObjectiveC.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Dispatch.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/CoreFoundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/CoreGraphics.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/IOKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/SwiftOnoneSupport.swiftmodule /Users/petercernak/vapor/TILApp/.build/checkouts/swift-nio.git--2128188973977302459/Sources/CNIOAtomics/include/cpp_magic.h /Users/petercernak/vapor/TILApp/.build/checkouts/swift-nio.git--2128188973977302459/Sources/CNIODarwin/include/c_nio_darwin.h /Users/petercernak/vapor/TILApp/.build/checkouts/swift-nio.git--2128188973977302459/Sources/CNIOAtomics/include/c-atomics.h /Users/petercernak/vapor/TILApp/.build/checkouts/swift-nio.git--2128188973977302459/Sources/CNIOLinux/include/c_nio_linux.h /Users/petercernak/vapor/TILApp/TILApp.xcodeproj/GeneratedModuleMap/CNIOSHA1/module.modulemap /Users/petercernak/vapor/TILApp/.build/checkouts/swift-nio-zlib-support.git--6538424668019974428/module.modulemap /Users/petercernak/vapor/TILApp/TILApp.xcodeproj/GeneratedModuleMap/CNIODarwin/module.modulemap /Users/petercernak/vapor/TILApp/TILApp.xcodeproj/GeneratedModuleMap/CNIOAtomics/module.modulemap /Users/petercernak/vapor/TILApp/TILApp.xcodeproj/GeneratedModuleMap/CNIOLinux/module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/ApplicationServices.framework/Headers/ApplicationServices.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Security.framework/Headers/Security.apinotes /Users/petercernak/vapor/TILApp/Build/Intermediates.noindex/TILApp.build/Debug/SQL.build/Objects-normal/x86_64/SQLPredicateBuilder~partial.swiftdoc : /Users/petercernak/vapor/TILApp/.build/checkouts/sql.git--5031097865152321144/Sources/SQL/SQLBind.swift /Users/petercernak/vapor/TILApp/.build/checkouts/sql.git--5031097865152321144/Sources/SQL/SQLJoinMethod.swift /Users/petercernak/vapor/TILApp/.build/checkouts/sql.git--5031097865152321144/Sources/SQL/SQLTable.swift /Users/petercernak/vapor/TILApp/.build/checkouts/sql.git--5031097865152321144/Sources/SQL/SQLCreateTable.swift /Users/petercernak/vapor/TILApp/.build/checkouts/sql.git--5031097865152321144/Sources/SQL/SQLDropTable.swift /Users/petercernak/vapor/TILApp/.build/checkouts/sql.git--5031097865152321144/Sources/SQL/SQLAlterTable.swift /Users/petercernak/vapor/TILApp/.build/checkouts/sql.git--5031097865152321144/Sources/SQL/SQLSerializable.swift /Users/petercernak/vapor/TILApp/.build/checkouts/sql.git--5031097865152321144/Sources/SQL/SQLDataType.swift /Users/petercernak/vapor/TILApp/.build/checkouts/sql.git--5031097865152321144/Sources/SQL/SQLUpdate.swift /Users/petercernak/vapor/TILApp/.build/checkouts/sql.git--5031097865152321144/Sources/SQL/SQLDelete.swift /Users/petercernak/vapor/TILApp/.build/checkouts/sql.git--5031097865152321144/Sources/SQL/SQLLiteral.swift /Users/petercernak/vapor/TILApp/.build/checkouts/sql.git--5031097865152321144/Sources/SQL/SQLBoolLiteral.swift /Users/petercernak/vapor/TILApp/.build/checkouts/sql.git--5031097865152321144/Sources/SQL/SQLDefaultLiteral.swift /Users/petercernak/vapor/TILApp/.build/checkouts/sql.git--5031097865152321144/Sources/SQL/SQLTableConstraintAlgorithm.swift /Users/petercernak/vapor/TILApp/.build/checkouts/sql.git--5031097865152321144/Sources/SQL/SQLColumnConstraintAlgorithm.swift /Users/petercernak/vapor/TILApp/.build/checkouts/sql.git--5031097865152321144/Sources/SQL/SQLJoin.swift /Users/petercernak/vapor/TILApp/.build/checkouts/sql.git--5031097865152321144/Sources/SQL/SQLExpression.swift /Users/petercernak/vapor/TILApp/.build/checkouts/sql.git--5031097865152321144/Sources/SQL/SQLSelectExpression.swift /Users/petercernak/vapor/TILApp/.build/checkouts/sql.git--5031097865152321144/Sources/SQL/SQLCollation.swift /Users/petercernak/vapor/TILApp/.build/checkouts/sql.git--5031097865152321144/Sources/SQL/SQLForeignKeyAction.swift /Users/petercernak/vapor/TILApp/.build/checkouts/sql.git--5031097865152321144/Sources/SQL/SQLConnection.swift /Users/petercernak/vapor/TILApp/.build/checkouts/sql.git--5031097865152321144/Sources/SQL/SQLDirection.swift /Users/petercernak/vapor/TILApp/.build/checkouts/sql.git--5031097865152321144/Sources/SQL/SQLFunction.swift /Users/petercernak/vapor/TILApp/.build/checkouts/sql.git--5031097865152321144/Sources/SQL/SQLColumnDefinition.swift /Users/petercernak/vapor/TILApp/.build/checkouts/sql.git--5031097865152321144/Sources/SQL/SQLCreateTableBuilder.swift /Users/petercernak/vapor/TILApp/.build/checkouts/sql.git--5031097865152321144/Sources/SQL/SQLDropTableBuilder.swift /Users/petercernak/vapor/TILApp/.build/checkouts/sql.git--5031097865152321144/Sources/SQL/SQLAlterTableBuilder.swift /Users/petercernak/vapor/TILApp/.build/checkouts/sql.git--5031097865152321144/Sources/SQL/SQLPredicateBuilder.swift /Users/petercernak/vapor/TILApp/.build/checkouts/sql.git--5031097865152321144/Sources/SQL/SQLUpdateBuilder.swift /Users/petercernak/vapor/TILApp/.build/checkouts/sql.git--5031097865152321144/Sources/SQL/SQLDeleteBuilder.swift /Users/petercernak/vapor/TILApp/.build/checkouts/sql.git--5031097865152321144/Sources/SQL/SQLColumnBuilder.swift /Users/petercernak/vapor/TILApp/.build/checkouts/sql.git--5031097865152321144/Sources/SQL/SQLPredicateGroupBuilder.swift /Users/petercernak/vapor/TILApp/.build/checkouts/sql.git--5031097865152321144/Sources/SQL/SQLSelectBuilder.swift /Users/petercernak/vapor/TILApp/.build/checkouts/sql.git--5031097865152321144/Sources/SQL/SQLInsertBuilder.swift /Users/petercernak/vapor/TILApp/.build/checkouts/sql.git--5031097865152321144/Sources/SQL/SQLRawBuilder.swift /Users/petercernak/vapor/TILApp/.build/checkouts/sql.git--5031097865152321144/Sources/SQL/SQLCreateIndexBuilder.swift /Users/petercernak/vapor/TILApp/.build/checkouts/sql.git--5031097865152321144/Sources/SQL/SQLQueryBuilder.swift /Users/petercernak/vapor/TILApp/.build/checkouts/sql.git--5031097865152321144/Sources/SQL/SQLQueryEncoder.swift /Users/petercernak/vapor/TILApp/.build/checkouts/sql.git--5031097865152321144/Sources/SQL/SQLQueryFetcher.swift /Users/petercernak/vapor/TILApp/.build/checkouts/sql.git--5031097865152321144/Sources/SQL/SQLIndexModifier.swift /Users/petercernak/vapor/TILApp/.build/checkouts/sql.git--5031097865152321144/Sources/SQL/SQLIdentifier.swift /Users/petercernak/vapor/TILApp/.build/checkouts/sql.git--5031097865152321144/Sources/SQL/SQLTableIdentifier.swift /Users/petercernak/vapor/TILApp/.build/checkouts/sql.git--5031097865152321144/Sources/SQL/SQLColumnIdentifier.swift /Users/petercernak/vapor/TILApp/.build/checkouts/sql.git--5031097865152321144/Sources/SQL/SQLError.swift /Users/petercernak/vapor/TILApp/.build/checkouts/sql.git--5031097865152321144/Sources/SQL/SQLBinaryOperator.swift /Users/petercernak/vapor/TILApp/.build/checkouts/sql.git--5031097865152321144/Sources/SQL/Exports.swift /Users/petercernak/vapor/TILApp/.build/checkouts/sql.git--5031097865152321144/Sources/SQL/SQLSelect.swift /Users/petercernak/vapor/TILApp/.build/checkouts/sql.git--5031097865152321144/Sources/SQL/SQLDistinct.swift /Users/petercernak/vapor/TILApp/.build/checkouts/sql.git--5031097865152321144/Sources/SQL/SQLFunctionArgument.swift /Users/petercernak/vapor/TILApp/.build/checkouts/sql.git--5031097865152321144/Sources/SQL/SQLTableConstraint.swift /Users/petercernak/vapor/TILApp/.build/checkouts/sql.git--5031097865152321144/Sources/SQL/SQLColumnConstraint.swift /Users/petercernak/vapor/TILApp/.build/checkouts/sql.git--5031097865152321144/Sources/SQL/SQLInsert.swift /Users/petercernak/vapor/TILApp/.build/checkouts/sql.git--5031097865152321144/Sources/SQL/SQLCreateIndex.swift /Users/petercernak/vapor/TILApp/.build/checkouts/sql.git--5031097865152321144/Sources/SQL/SQLDropIndex.swift /Users/petercernak/vapor/TILApp/.build/checkouts/sql.git--5031097865152321144/Sources/SQL/SQLGroupBy.swift /Users/petercernak/vapor/TILApp/.build/checkouts/sql.git--5031097865152321144/Sources/SQL/SQLOrderBy.swift /Users/petercernak/vapor/TILApp/.build/checkouts/sql.git--5031097865152321144/Sources/SQL/SQLForeignKey.swift /Users/petercernak/vapor/TILApp/.build/checkouts/sql.git--5031097865152321144/Sources/SQL/SQLPrimaryKey.swift /Users/petercernak/vapor/TILApp/.build/checkouts/sql.git--5031097865152321144/Sources/SQL/SQLQuery.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Dispatch.apinotesc /Users/petercernak/vapor/TILApp/Build/Products/Debug/NIO.framework/Modules/NIO.swiftmodule/x86_64.swiftmodule /Users/petercernak/vapor/TILApp/Build/Products/Debug/Async.framework/Modules/Async.swiftmodule/x86_64.swiftmodule /Users/petercernak/vapor/TILApp/Build/Products/Debug/Service.framework/Modules/Service.swiftmodule/x86_64.swiftmodule /Users/petercernak/vapor/TILApp/Build/Products/Debug/Core.framework/Modules/Core.swiftmodule/x86_64.swiftmodule /Users/petercernak/vapor/TILApp/Build/Products/Debug/Debugging.framework/Modules/Debugging.swiftmodule/x86_64.swiftmodule /Users/petercernak/vapor/TILApp/Build/Products/Debug/COperatingSystem.framework/Modules/COperatingSystem.swiftmodule/x86_64.swiftmodule /Users/petercernak/vapor/TILApp/Build/Products/Debug/NIOConcurrencyHelpers.framework/Modules/NIOConcurrencyHelpers.swiftmodule/x86_64.swiftmodule /Users/petercernak/vapor/TILApp/Build/Products/Debug/Bits.framework/Modules/Bits.swiftmodule/x86_64.swiftmodule /Users/petercernak/vapor/TILApp/Build/Products/Debug/NIOFoundationCompat.framework/Modules/NIOFoundationCompat.swiftmodule/x86_64.swiftmodule /Users/petercernak/vapor/TILApp/Build/Products/Debug/DatabaseKit.framework/Modules/DatabaseKit.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/ObjectiveC.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Dispatch.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/CoreFoundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/CoreGraphics.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/IOKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/SwiftOnoneSupport.swiftmodule /Users/petercernak/vapor/TILApp/.build/checkouts/swift-nio.git--2128188973977302459/Sources/CNIOAtomics/include/cpp_magic.h /Users/petercernak/vapor/TILApp/.build/checkouts/swift-nio.git--2128188973977302459/Sources/CNIODarwin/include/c_nio_darwin.h /Users/petercernak/vapor/TILApp/.build/checkouts/swift-nio.git--2128188973977302459/Sources/CNIOAtomics/include/c-atomics.h /Users/petercernak/vapor/TILApp/.build/checkouts/swift-nio.git--2128188973977302459/Sources/CNIOLinux/include/c_nio_linux.h /Users/petercernak/vapor/TILApp/TILApp.xcodeproj/GeneratedModuleMap/CNIOSHA1/module.modulemap /Users/petercernak/vapor/TILApp/.build/checkouts/swift-nio-zlib-support.git--6538424668019974428/module.modulemap /Users/petercernak/vapor/TILApp/TILApp.xcodeproj/GeneratedModuleMap/CNIODarwin/module.modulemap /Users/petercernak/vapor/TILApp/TILApp.xcodeproj/GeneratedModuleMap/CNIOAtomics/module.modulemap /Users/petercernak/vapor/TILApp/TILApp.xcodeproj/GeneratedModuleMap/CNIOLinux/module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/ApplicationServices.framework/Headers/ApplicationServices.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Security.framework/Headers/Security.apinotes
D
/* * $Id: turret.d,v 1.3 2005/07/17 11:02:46 kenta Exp $ * * Copyright 2005 Kenta Cho. Some rights reserved. */ module abagames.gr.turret; private import std.math; private import gl3n.linalg; private import abagames.util.actor; private import abagames.util.rand; private import abagames.util.math; private import abagames.util.support.gl; private import abagames.util.sdl.shaderprogram; private import abagames.util.sdl.shape; private import abagames.gr.field; private import abagames.gr.bullet; private import abagames.gr.ship; private import abagames.gr.screen; private import abagames.gr.particle; private import abagames.gr.shot; private import abagames.gr.shape; private import abagames.gr.enemy; private import abagames.gr.soundmanager; /** * Turret mounted on a deck of an enemy ship. */ public class Turret { private: static ShaderProgram program; static GLuint vao; static GLuint vbo; static Rand rand; static vec2 damagedPos; Field field; BulletPool bullets; Ship ship; SparkPool sparks; SmokePool smokes; FragmentPool fragments; TurretSpec spec; vec2 pos; float deg, baseDeg; int cnt; int appCnt; int startCnt; int shield; bool damaged; int destroyedCnt; int damagedCnt; float bulletSpeed; int burstCnt; Enemy parent; vec3 storedColor; invariant() { assert(pos.x < 15 && pos.x > -15); assert(pos.y < 60 && pos.y > -40); assert(!deg.isNaN); assert(!baseDeg.isNaN); assert(bulletSpeed > 0); } public static void init() { rand = new Rand; damagedPos = vec2(0); program = new ShaderProgram; program.setVertexShader( "uniform mat4 projmat;\n" "uniform float minAlphaFactor;\n" "uniform float maxAlphaFactor;\n" "uniform float minRange;\n" "uniform float maxRange;\n" "uniform float deg;\n" "uniform float ndeg;\n" "uniform vec2 pos;\n" "\n" "attribute float minmax;\n" "attribute float angleChoice;\n" "\n" "varying float f_alphaFactor;\n" "\n" "void main() {\n" " float factor = (minmax > 0.) ? maxRange : minRange;\n" " float rdeg = (angleChoice > 0.) ? ndeg : deg;\n" " vec2 rot = factor * vec2(sin(rdeg), cos(rdeg));\n" " gl_Position = projmat * vec4(pos + rot, 0, 1);\n" " float alphaFactor = (minmax > 0.) ? maxAlphaFactor : minAlphaFactor;\n" " f_alphaFactor = alphaFactor;\n" "}\n" ); program.setFragmentShader( "uniform float brightness;\n" "uniform float alpha;\n" "uniform vec3 color;\n" "\n" "varying float f_alphaFactor;\n" "\n" "void main() {\n" " gl_FragColor = vec4(color * vec3(brightness), alpha * f_alphaFactor);\n" "}\n" ); GLint minmaxLoc = 0; GLint angleChoiceLoc = 1; program.bindAttribLocation(minmaxLoc, "minmax"); program.bindAttribLocation(angleChoiceLoc, "angleChoice"); program.link(); program.use(); program.setUniform("color", 0.9f, 0.1f, 0.1f); static const float[] BUF = [ /* minmax, angleChoice */ 0, 0, 1, 0, 1, 1, 0, 1 ]; enum MINMAX = 0; enum ANGLECHOICE = 1; enum BUFSZ = 2; glGenVertexArrays(1, &vao); glGenBuffers(1, &vbo); glBindBuffer(GL_ARRAY_BUFFER, vbo); glBufferData(GL_ARRAY_BUFFER, BUF.length * float.sizeof, BUF.ptr, GL_STATIC_DRAW); glBindVertexArray(vao); vertexAttribPointer(minmaxLoc, 1, BUFSZ, MINMAX); glEnableVertexAttribArray(minmaxLoc); vertexAttribPointer(angleChoiceLoc, 1, BUFSZ, ANGLECHOICE); glEnableVertexAttribArray(angleChoiceLoc); } public static close() { glDeleteVertexArrays(1, &vao); glDeleteBuffers(1, &vbo); program.close(); } public static void setRandSeed(long seed) { rand.setSeed(seed); } public this(Field field, BulletPool bullets, Ship ship, SparkPool sparks, SmokePool smokes, FragmentPool fragments, Enemy parent) { this.field = field; this.bullets = bullets; this.ship = ship; this.sparks = sparks; this.smokes = smokes; this.fragments = fragments; this.parent = parent; pos = vec2(0); deg = baseDeg = 0; bulletSpeed = 1; } public void start(TurretSpec spec) { this.spec = spec; shield = spec.shield; appCnt = cnt = startCnt = 0; deg = baseDeg = 0; damaged = false; damagedCnt = 0; destroyedCnt = -1; bulletSpeed = 1; burstCnt = 0; } public bool move(float x, float y, float d, float bulletFireSpeed = 0, float bulletFireDeg = -99999) { pos = vec2(x, y); baseDeg = d; if (destroyedCnt >= 0) { destroyedCnt++; int itv = 5 + destroyedCnt / 12; if (itv < 60 && destroyedCnt % itv == 0) { Smoke s = smokes.getInstance(); if (s) s.set(pos, 0, 0, 0.01f + rand.nextFloat(0.01f), Smoke.SmokeType.FIRE, 90 + rand.nextInt(30), spec.size); } return false; } float td = baseDeg + deg; vec2 shipPos = ship.nearPos(pos); vec2 shipVel = ship.nearVel(pos); vec2 a = shipPos - pos; if (spec.lookAheadRatio != 0) { float rd = pos.fastdist(shipPos) / spec.speed * 1.2f; a += shipVel * spec.lookAheadRatio * rd; } float ad; if (fabs(a.x) + fabs(a.y) < 0.1f) ad = 0; else ad = atan2(a.x, a.y); assert(!ad.isNaN); float od = td - ad; Math.normalizeDeg(od); float ts; if (cnt >= 0) ts = spec.turnSpeed; else ts = spec.turnSpeed * spec.burstTurnRatio; if (fabs(od) <= ts) deg = ad - baseDeg; else if (od > 0) deg -= ts; else deg += ts; Math.normalizeDeg(deg); if (deg > spec.turnRange) deg = spec.turnRange; else if (deg < -spec.turnRange) deg = -spec.turnRange; cnt++; if (field.checkInField(pos) || (parent.isBoss && cnt % 4 == 0)) appCnt++; if (cnt >= spec.interval) { if (spec.blind || (fabs(od) <= spec.turnSpeed && pos.fastdist(shipPos) < spec.maxRange * 1.1f && pos.fastdist(shipPos) > spec.minRange)) { cnt = -(spec.burstNum - 1) * spec.burstInterval; bulletSpeed = spec.speed; burstCnt = 0; } } if (cnt <= 0 && -cnt % spec.burstInterval == 0 && ((spec.invisible && field.checkInField(pos)) || (spec.invisible && parent.isBoss && field.checkInOuterField(pos)) || (!spec.invisible && field.checkInFieldExceptTop(pos))) && pos.fastdist(shipPos) > spec.minRange) { float bd = baseDeg + deg; Smoke s = smokes.getInstance(); if (s) s.set(pos, sin(bd) * bulletSpeed, cos(bd) * bulletSpeed, 0, Smoke.SmokeType.SPARK, 20, spec.size * 2); int nw = spec.nway; if (spec.nwayChange && burstCnt % 2 == 1) nw--; bd -= spec.nwayAngle * (nw - 1) / 2; for (int i = 0; i < nw; i++) { Bullet b = bullets.getInstance(); if (!b) break; b.set(parent.index, pos, bd, bulletSpeed, spec.size * 3, spec.bulletShape, spec.maxRange, bulletFireSpeed, bulletFireDeg, spec.bulletDestructive); bd += spec.nwayAngle; } bulletSpeed += spec.speedAccel; burstCnt++; } damaged = false; if (damagedCnt > 0) damagedCnt--; startCnt++; return true; } public void setDefaultColor(vec3 color) { storedColor = color; } public void draw(mat4 view) { if (spec.invisible) return; mat4 model = mat4.identity; model.rotate(baseDeg + deg, vec3(0, 0, 1)); if (destroyedCnt < 0 && damagedCnt > 0) { damagedPos.x = pos.x + rand.nextSignedFloat(damagedCnt * 0.015f); damagedPos.y = pos.y + rand.nextSignedFloat(damagedCnt * 0.015f); model.translate(damagedPos.x, damagedPos.y, 0); } else { model.translate(pos.x, pos.y, 0); } if (destroyedCnt >= 0) { spec.destroyedShape.setDefaultColor(storedColor); spec.destroyedShape.draw(view, model); } else if (!damaged) { spec.shape.setDefaultColor(storedColor); spec.shape.draw(view, model); } else { spec.damagedShape.setDefaultColor(storedColor); spec.damagedShape.draw(view, model); } if (destroyedCnt >= 0) return; if (appCnt > 120) return; float a = 1 - cast(float) appCnt / 120; if (startCnt < 12) a = cast(float) startCnt / 12; float td = baseDeg + deg; program.use(); program.setUniform("projmat", view); program.setUniform("brightness", Screen.brightness); program.setUniform("minRange", spec.minRange); program.setUniform("maxRange", spec.maxRange); program.setUniform("pos", pos); program.setUniform("alpha", a); if (spec.nway <= 1) { program.setUniform("deg", td); program.setUniform("minAlphaFactor", 1f); program.setUniform("maxAlphaFactor", 0.5f); program.useVao(vao); glDrawArrays(GL_LINE_STRIP, 0, 2); } else { td -= spec.nwayAngle * (spec.nway - 1) / 2; program.setUniform("deg", td); program.setUniform("minAlphaFactor", 0.75f); program.setUniform("maxAlphaFactor", 0.25f); program.useVao(vao); glDrawArrays(GL_LINE_STRIP, 0, 2); program.setUniform("minAlphaFactor", 0.3f); program.setUniform("maxAlphaFactor", 0.05f); for (int i = 0; i < spec.nway - 1; i++) { float ntd = td + spec.nwayAngle; program.setUniform("deg", td); program.setUniform("ndeg", ntd); glDrawArrays(GL_TRIANGLE_FAN, 0, 4); td = ntd; } program.setUniform("deg", td); program.setUniform("minAlphaFactor", 0.75f); program.setUniform("maxAlphaFactor", 0.25f); glDrawArrays(GL_LINE_STRIP, 0, 2); } } public bool checkCollision(float x, float y, Collidable c, Shot shot) { if (destroyedCnt >= 0 || spec.invisible) return false; float ox = fabs(pos.x - x), oy = fabs(pos.y - y); if (spec.shape.checkCollision(ox, oy, c)) { addDamage(shot.damage); return true; } return false; } public void addDamage(int n) { shield -= n; if (shield <= 0) destroyed(); damaged = true; damagedCnt = 10; } public void destroyed() { SoundManager.playSe("turret_destroyed.wav"); destroyedCnt = 0; for (int i = 0; i < 6; i++) { Smoke s = smokes.getInstanceForced(); s.set(pos, rand.nextSignedFloat(0.1f), rand.nextSignedFloat(0.1f), rand.nextFloat(0.04f), Smoke.SmokeType.EXPLOSION, 30 + rand.nextInt(20), spec.size * 1.5f); } for (int i = 0; i < 32; i++) { Spark sp = sparks.getInstanceForced(); sp.set(pos, rand.nextSignedFloat(0.5f), rand.nextSignedFloat(0.5f), 0.5f + rand.nextFloat(0.5f), 0.5f + rand.nextFloat(0.5f), 0, 30 + rand.nextInt(30)); } for (int i = 0; i < 7; i++) { Fragment f = fragments.getInstanceForced(); f.set(pos, rand.nextSignedFloat(0.25f), rand.nextSignedFloat(0.25f), 0.05f + rand.nextFloat(0.05f), spec.size * (0.5f + rand.nextFloat(0.5f))); } switch (spec.type) { case TurretSpec.TurretType.MAIN: parent.increaseMultiplier(2); parent.addScore(40); break; case TurretSpec.TurretType.SUB: case TurretSpec.TurretType.SUB_DESTRUCTIVE: parent.increaseMultiplier(1); parent.addScore(20); break; default: assert(0); } } public void remove() { if (destroyedCnt < 0) destroyedCnt = 999; } } /** * Turret specification changing according to a rank(difficulty). */ public class TurretSpec { public: static enum TurretType { MAIN, SUB, SUB_DESTRUCTIVE, SMALL, MOVING, DUMMY, }; int type; int interval; float speed; float speedAccel; float minRange, maxRange; float turnSpeed, turnRange; int burstNum, burstInterval; float burstTurnRatio; bool blind; float lookAheadRatio; int nway; float nwayAngle; bool nwayChange; int bulletShape; bool bulletDestructive; int shield; bool invisible; TurretShape shape, damagedShape, destroyedShape; private: float _size; invariant() { assert(type >= 0); assert(interval > 0); assert(speed > 0); assert(speedAccel < 1 && speedAccel > -1); assert(minRange >= 0); assert(maxRange >= 0); assert(turnSpeed >= 0); assert(turnRange >= 0); assert(burstNum >= 1); assert(burstInterval >= 1); assert(burstTurnRatio >= 0 && burstTurnRatio <= 1); assert(lookAheadRatio >= 0 && lookAheadRatio <= 1); assert(nway >= 1); assert(nwayAngle >= 0); assert(bulletShape >= 0); assert(shield >= 0); assert(_size > 0 && _size < 10); } public this() { shape = new TurretShape(TurretShape.TurretShapeType.NORMAL); damagedShape = new TurretShape(TurretShape.TurretShapeType.DAMAGED); destroyedShape = new TurretShape(TurretShape.TurretShapeType.DESTROYED); init(); } private void init() { type = 0; interval = 99999; speed = 1; speedAccel = 0; minRange = 0; maxRange = 99999; turnSpeed = 99999; turnRange = 99999; burstNum = 1; burstInterval = 99999; burstTurnRatio = 0; blind = false; lookAheadRatio = 0; nway = 1; nwayAngle = 0; nwayChange = false; bulletShape = BulletShape.BulletShapeType.NORMAL; bulletDestructive = false; shield = 99999; invisible = false; _size = 1; } public void setParam(TurretSpec ts) { type = ts.type; interval = ts.interval; speed = ts.speed; speedAccel = ts.speedAccel; minRange = ts.minRange; maxRange = ts.maxRange; turnSpeed = ts.turnSpeed; turnRange = ts.turnRange; burstNum = ts.burstNum; burstInterval = ts.burstInterval; burstTurnRatio = ts.burstTurnRatio; blind = ts.blind; lookAheadRatio = ts.lookAheadRatio; nway = ts.nway; nwayAngle = ts.nwayAngle; nwayChange = ts.nwayChange; bulletShape = ts.bulletShape; bulletDestructive = ts.bulletDestructive; shield = ts.shield; invisible = ts.invisible; size = ts.size; } public void setParam(float rank, int type, Rand rand) { init(); this.type = type; if (type == TurretType.DUMMY) { invisible = true; return; } float rk = rank; switch (type) { case TurretType.SMALL: minRange = 8; bulletShape = BulletShape.BulletShapeType.SMALL; blind = true; invisible = true; break; case TurretType.MOVING: minRange = 6; bulletShape = BulletShape.BulletShapeType.MOVING_TURRET; blind = true; invisible = true; turnSpeed = 0; maxRange = 9 + rand.nextFloat(12); rk *= (10.0f / sqrt(maxRange)); break; default: maxRange = 9 + rand.nextFloat(16); minRange = maxRange / (4 + rand.nextFloat(0.5f)); if (type == TurretType.SUB || type == TurretType.SUB_DESTRUCTIVE) { maxRange *= 0.72f; minRange *= 0.9f; } rk *= (10.0f / sqrt(maxRange)); if (rand.nextInt(4) == 0) { float lar = rank * 0.1f; if (lar > 1) lar = 1; lookAheadRatio = rand.nextFloat(lar / 2) + lar / 2; rk /= (1 + lookAheadRatio * 0.3f); } if (rand.nextInt(3) == 0 && lookAheadRatio == 0) { blind = false; rk *= 1.5f; } else { blind = true; } turnRange = PI / 4 + rand.nextFloat(PI / 4); turnSpeed = 0.005f + rand.nextFloat(0.015f); if (type == TurretType.MAIN) turnRange *= 1.2f; if (rand.nextInt(4) == 0) burstTurnRatio = rand.nextFloat(0.66f) + 0.33f; break; } burstInterval = 6 + rand.nextInt(8); switch (type) { case TurretType.MAIN: size = 0.42f + rand.nextFloat(0.05f); float br = (rk * 0.3f) * (1 + rand.nextSignedFloat(0.2f)); float nr = (rk * 0.33f) * rand.nextFloat(1); float ir = (rk * 0.1f) * (1 + rand.nextSignedFloat(0.2f)); burstNum = cast(int) br + 1; nway = cast(int) (nr * 0.66f + 1); interval = cast(int) (120.0f / (ir * 2 + 1)) + 1; float sr = rk - burstNum + 1 - (nway - 1) / 0.66f - ir; if (sr < 0) sr = 0; speed = sqrt(sr * 0.6f); assert(!speed.isNaN); speed *= 0.12f; shield = 20; break; case TurretType.SUB: size = 0.36f + rand.nextFloat(0.025f); float br = (rk * 0.4f) * (1 + rand.nextSignedFloat(0.2f)); float nr = (rk * 0.2f) * rand.nextFloat(1); float ir = (rk * 0.2f) * (1 + rand.nextSignedFloat(0.2f)); burstNum = cast(int) br + 1; nway = cast(int) (nr * 0.66f + 1); interval = cast(int) (120.0f / (ir * 2 + 1)) + 1; float sr = rk - burstNum + 1 - (nway - 1) / 0.66f - ir; if (sr < 0) sr = 0; speed = sqrt(sr * 0.7f); assert(!speed.isNaN); speed *= 0.2f; shield = 12; break; case TurretType.SUB_DESTRUCTIVE: size = 0.36f + rand.nextFloat(0.025f); float br = (rk * 0.4f) * (1 + rand.nextSignedFloat(0.2f)); float nr = (rk * 0.2f) * rand.nextFloat(1); float ir = (rk * 0.2f) * (1 + rand.nextSignedFloat(0.2f)); burstNum = cast(int) br * 2 + 1; nway = cast(int) (nr * 0.66f + 1); interval = cast(int) (60.0f / (ir * 2 + 1)) + 1; burstInterval = cast(int)(burstInterval * 0.88f); bulletShape = BulletShape.BulletShapeType.DESTRUCTIVE; bulletDestructive = true; float sr = rk - (burstNum - 1) / 2 - (nway - 1) / 0.66f - ir; if (sr < 0) sr = 0; speed = sqrt(sr * 0.7f); assert(!speed.isNaN); speed *= 0.33f; shield = 12; break; case TurretType.SMALL: size = 0.33f; float br = (rk * 0.33f) * (1 + rand.nextSignedFloat(0.2f)); float ir = (rk * 0.2f) * (1 + rand.nextSignedFloat(0.2f)); burstNum = cast(int) br + 1; nway = 1; interval = cast(int) (120.0f / (ir * 2 + 1)) + 1; float sr = rk - burstNum + 1 - ir; if (sr < 0) sr = 0; speed = sqrt(sr); assert(!speed.isNaN); speed *= 0.24f; break; case TurretType.MOVING: size = 0.36f; float br = (rk * 0.3f) * (1 + rand.nextSignedFloat(0.2f)); float nr = (rk * 0.1f) * rand.nextFloat(1); float ir = (rk * 0.33f) * (1 + rand.nextSignedFloat(0.2f)); burstNum = cast(int) br + 1; nway = cast(int) (nr * 0.66f + 1); interval = cast(int) (120.0f / (ir * 2 + 1)) + 1; float sr = rk - burstNum + 1 - (nway - 1) / 0.66f - ir; if (sr < 0) sr = 0; speed = sqrt(sr * 0.7f); assert(!speed.isNaN); speed *= 0.2f; break; default: assert(0); } if (speed < 0.1f) speed = 0.1f; else speed = sqrt(speed * 10) / 10; assert(!speed.isNaN); if (burstNum > 2) { if (rand.nextInt(4) == 0) { speed *= 0.8f; burstInterval = cast(int)(burstInterval * 0.7f); speedAccel = (speed * (0.4f + rand.nextFloat(0.3f))) / burstNum; if (rand.nextInt(2) == 0) speedAccel *= -1; speed -= speedAccel * burstNum / 2; } if (rand.nextInt(5) == 0) { if (nway > 1) nwayChange = true; } } nwayAngle = (0.1f + rand.nextFloat(0.33f)) / (1 + nway * 0.1f); } public void setBossSpec() { minRange = 0; maxRange *= 1.5f; shield = cast(int)(shield * 2.1f); } public float size() { return _size; } public float size(float v) { _size = v; shape.size = damagedShape.size = destroyedShape.size = _size; return _size; } } /** * Grouped turrets. */ public class TurretGroup { private: static const int MAX_NUM = 16; Ship ship; SparkPool sparks; SmokePool smokes; FragmentPool fragments; TurretGroupSpec spec; vec2 centerPos; Turret[MAX_NUM] turret; int cnt; invariant() { assert(centerPos.x < 15 && centerPos.x > -15); assert(centerPos.y < 60 && centerPos.y > -40); } public this(Field field, BulletPool bullets, Ship ship, SparkPool sparks, SmokePool smokes, FragmentPool fragments, Enemy parent) { this.ship = ship; centerPos = vec2(0); foreach (ref Turret t; turret) t = new Turret(field, bullets, ship, sparks, smokes, fragments, parent); } public void set(TurretGroupSpec spec) { this.spec = spec; for (int i = 0; i < spec.num; i++) turret[i].start(spec.turretSpec); cnt = 0; } public bool move(vec2 p, float deg) { bool alive = false; centerPos = p; float d, md, y, my; switch (spec.alignType) { case TurretGroupSpec.AlignType.ROUND: d = spec.alignDeg; if (spec.num > 1) { md = spec.alignWidth / (spec.num - 1); d -= spec.alignWidth / 2; } else { md = 0; } break; case TurretGroupSpec.AlignType.STRAIGHT: y = 0; my = spec.offset.y / (spec.num + 1); break; default: assert(0); } for (int i = 0; i < spec.num; i++) { float tbx, tby; switch (spec.alignType) { case TurretGroupSpec.AlignType.ROUND: tbx = sin(d) * spec.radius; tby = cos(d) * spec.radius; break; case TurretGroupSpec.AlignType.STRAIGHT: y += my; tbx = spec.offset.x; tby = y; d = atan2(tbx, tby); assert(!d.isNaN); break; default: assert(0); } tbx *= (1 - spec.distRatio); float bx = tbx * cos(-deg) - tby * sin(-deg); float by = tbx * sin(-deg) + tby * cos(-deg); alive |= turret[i].move(centerPos.x + bx, centerPos.y + by, d + deg); if (spec.alignType == TurretGroupSpec.AlignType.ROUND) d += md; } cnt++; return alive; } public void setDefaultColor(vec3 color) { for (int i = 0; i < spec.num; i++) turret[i].setDefaultColor(color); } public void draw(mat4 view) { for (int i = 0; i < spec.num; i++) turret[i].draw(view); } public void remove() { for (int i = 0; i < spec.num; i++) turret[i].remove(); } public bool checkCollision(float x, float y, Collidable c, Shot shot) { bool col = false; for (int i = 0; i < spec.num; i++) col |= turret[i].checkCollision(x, y, c, shot); return col; } } public class TurretGroupSpec { public: static enum AlignType { ROUND, STRAIGHT, }; TurretSpec turretSpec; int num; int alignType; float alignDeg; float alignWidth; float radius; float distRatio; vec2 offset; invariant() { assert(num >= 1 && num < 20); assert(!alignDeg.isNaN); assert(!alignWidth.isNaN); assert(radius >= 0); assert(distRatio >= 0 && distRatio <= 1); assert(offset.x < 10 && offset.x > -10); assert(offset.y < 10 && offset.y > -10); } public this() { turretSpec = new TurretSpec; offset = vec2(0); num = 1; alignDeg = alignWidth = 0; radius = 0; distRatio = 0; } public void init() { num = 1; alignType = AlignType.ROUND; alignDeg = alignWidth = radius = distRatio = 0; offset = vec2(0); } } /** * Turrets moving around a bridge. */ public class MovingTurretGroup { private: static const int MAX_NUM = 16; Ship ship; MovingTurretGroupSpec spec; float radius; float radiusAmpCnt; float deg; float rollAmpCnt; float swingAmpCnt; float swingAmpDeg; float swingFixDeg; float alignAmpCnt; float distDeg; float distAmpCnt; int cnt; vec2 centerPos; Turret[MAX_NUM] turret; invariant() { assert(radius > -10); assert(!radiusAmpCnt.isNaN); assert(!deg.isNaN); assert(!rollAmpCnt.isNaN); assert(!swingAmpCnt.isNaN); assert(!swingAmpDeg.isNaN); assert(!swingFixDeg.isNaN); assert(!alignAmpCnt.isNaN); assert(!distDeg.isNaN); assert(!distAmpCnt.isNaN); assert(centerPos.x < 15 && centerPos.x > -15); assert(centerPos.y < 60 && centerPos.y > -40); } public this(Field field, BulletPool bullets, Ship ship, SparkPool sparks, SmokePool smokes, FragmentPool fragments, Enemy parent) { this.ship = ship; centerPos = vec2(0); foreach (ref Turret t; turret) t = new Turret(field, bullets, ship, sparks, smokes, fragments, parent); radius = radiusAmpCnt = 0; deg = 0; rollAmpCnt = swingAmpCnt = swingAmpDeg = swingFixDeg = alignAmpCnt = 0; distDeg = distAmpCnt = 0; } public void set(MovingTurretGroupSpec spec) { this.spec = spec; radius = spec.radiusBase; radiusAmpCnt = 0; deg = 0; rollAmpCnt = swingAmpCnt = swingAmpDeg = alignAmpCnt = 0; distDeg = distAmpCnt = 0; swingFixDeg = PI; for (int i = 0; i < spec.num; i++) turret[i].start(spec.turretSpec); cnt = 0; } public void move(vec2 p, float ed) { if (spec.moveType == MovingTurretGroupSpec.MoveType.SWING_FIX) swingFixDeg = ed; centerPos = p; if (spec.radiusAmp > 0) { radiusAmpCnt += spec.radiusAmpVel; float av = sin(radiusAmpCnt); radius = spec.radiusBase + spec.radiusAmp * av; } if (spec.moveType == MovingTurretGroupSpec.MoveType.ROLL) { if (spec.rollAmp != 0) { rollAmpCnt += spec.rollAmpVel; float av = sin(rollAmpCnt); deg += spec.rollDegVel + spec.rollAmp * av; } else { deg += spec.rollDegVel; } } else { swingAmpCnt += spec.swingAmpVel; if (cos(swingAmpCnt) > 0) { swingAmpDeg += spec.swingDegVel; } else { swingAmpDeg -= spec.swingDegVel; } if (spec.moveType == MovingTurretGroupSpec.MoveType.SWING_AIM) { float od; vec2 shipPos = ship.nearPos(centerPos); if (shipPos.fastdist(centerPos) < 0.1f) od = 0; else od = atan2(shipPos.x - centerPos.x, shipPos.y - centerPos.y); assert(!od.isNaN); od += swingAmpDeg - deg; Math.normalizeDeg(od); deg += od * 0.1f; } else { float od = swingFixDeg + swingAmpDeg - deg; Math.normalizeDeg(od); deg += od * 0.1f; } } float d, ad, md; calcAlignDeg(d, ad, md); for (int i = 0; i < spec.num; i++) { d += md; float bx = sin(d) * radius * spec.xReverse; float by = cos(d) * radius * (1 - spec.distRatio); float fs, fd; if (fabs(bx) + fabs(by) < 0.1f) { fs = radius; fd = d; } else { fs = sqrt(bx * bx + by * by); fd = atan2(bx, by); assert(!fd.isNaN); } fs *= 0.06f; turret[i].move(centerPos.x, centerPos.y, d, fs, fd); } cnt++; } private void calcAlignDeg(out float d, out float ad, out float md) { alignAmpCnt += spec.alignAmpVel; ad = spec.alignDeg * (1 + sin(alignAmpCnt) * spec.alignAmp); if (spec.num > 1) { if (spec.moveType == MovingTurretGroupSpec.MoveType.ROLL) md = ad / spec.num; else md = ad / (spec.num - 1); } else { md = 0; } d = deg - md - ad / 2; } public void draw(mat4 view) { for (int i = 0; i < spec.num; i++) turret[i].draw(view); } public void remove() { for (int i = 0; i < spec.num; i++) turret[i].remove(); } } public class MovingTurretGroupSpec { public: static enum MoveType { ROLL, SWING_FIX, SWING_AIM, }; TurretSpec turretSpec; int num; float alignDeg; float alignAmp; float alignAmpVel; float radiusBase; float radiusAmp; float radiusAmpVel; int moveType; float rollDegVel; float rollAmp; float rollAmpVel; float swingDegVel; float swingAmpVel; float distRatio; float xReverse; invariant() { assert(num >= 1); assert(!alignDeg.isNaN); assert(!alignAmp.isNaN); assert(!alignAmpVel.isNaN); assert(!radiusBase.isNaN); assert(!radiusAmp.isNaN); assert(!radiusAmpVel.isNaN); assert(!rollDegVel.isNaN); assert(!rollAmp.isNaN); assert(!rollAmpVel.isNaN); assert(!swingDegVel.isNaN); assert(!swingAmpVel.isNaN); assert(!distRatio.isNaN); assert(xReverse == 1 || xReverse == -1); } public this() { turretSpec = new TurretSpec; num = 1; initParam(); } private void initParam() { num = 1; alignDeg = PI * 2; alignAmp = alignAmpVel = 0; radiusBase = 1; radiusAmp = radiusAmpVel = 0; moveType = MoveType.SWING_FIX; rollDegVel = rollAmp = rollAmpVel = 0; swingDegVel = swingAmpVel = 0; distRatio = 0; xReverse = 1; } public void init() { initParam(); } public void setAlignAmp(float a, float v) { alignAmp = a; alignAmpVel = v; } public void setRadiusAmp(float a, float v) { radiusAmp = a; radiusAmpVel = v; } public void setRoll(float dv, float a, float v) { moveType = MoveType.ROLL; rollDegVel = dv; rollAmp = a; rollAmpVel = v; } public void setSwing(float dv, float a, bool aim = false) { if (aim) moveType = MoveType.SWING_AIM; else moveType = MoveType.SWING_FIX; swingDegVel = dv; swingAmpVel = a; } public void setXReverse(float xr) { xReverse = xr; } }
D
/** Common classes for HTTP clients and servers. Copyright: © 2012 RejectedSoftware e.K. License: Subject to the terms of the MIT license, as written in the included LICENSE.txt file. Authors: Sönke Ludwig, Jan Krüger */ module vibe.http.common; public import vibe.http.status; import vibe.core.log; import vibe.core.net; import vibe.inet.message; import vibe.stream.operations; import vibe.utils.array; import vibe.utils.memory; import vibe.utils.string; import std.algorithm; import std.array; import std.conv; import std.datetime; import std.exception; import std.format; import std.string; import std.typecons; enum HttpVersion { HTTP_1_0, HTTP_1_1 } enum HttpMethod { GET, HEAD, PUT, POST, PATCH, DELETE, OPTIONS, TRACE, CONNECT } /** Returns the string representation of the given HttpMethod. */ string httpMethodString(HttpMethod m) { static immutable strings = ["GET", "HEAD", "PUT", "POST", "PATCH", "DELETE", "OPTIONS", "TRACE", "CONNECT"]; static assert(m.max+1 == strings.length); return strings[m]; } /** Returns the HttpMethod value matching the given HTTP method string. */ HttpMethod httpMethodFromString(string str) { switch(str){ default: throw new Exception("Invalid HTTP method: "~str); case "GET": return HttpMethod.GET; case "HEAD": return HttpMethod.HEAD; case "PUT": return HttpMethod.PUT; case "POST": return HttpMethod.POST; case "PATCH": return HttpMethod.PATCH; case "DELETE": return HttpMethod.DELETE; case "OPTIONS": return HttpMethod.OPTIONS; case "TRACE": return HttpMethod.TRACE; case "CONNECT": return HttpMethod.CONNECT; } } /** Utility function that throws a HttpStatusException if the _condition is not met. */ void enforceHttp(T)(T condition, HttpStatus statusCode, string message = null) { enforce(condition, new HttpStatusException(statusCode, message)); } /** Represents an HTTP request made to a server. */ class HttpRequest { protected { Stream m_conn; } public { /// The HTTP protocol version used for the request HttpVersion httpVersion = HttpVersion.HTTP_1_1; /// The HTTP _method of the request HttpMethod method = HttpMethod.GET; /** The request URL Note that the request URL usually does not include the global 'http://server' part, but only the local path and a query string. A possible exception is a proxy server, which will get full URLs. */ string requestUrl = "/"; /// Please use requestUrl instead. deprecated("Please use requestUrl instead.") alias requestUrl url; /// All request _headers InetHeaderMap headers; } protected this(Stream conn) { m_conn = conn; } protected this() { } /** Shortcut to the 'Host' header (always present for HTTP 1.1) */ @property string host() const { auto ph = "Host" in headers; return ph ? *ph : null; } /// ditto @property void host(string v) { headers["Host"] = v; } /** Returns the mime type part of the 'Content-Type' header. This function gets the pure mime type (e.g. "text/plain") without any supplimentary parameters such as "charset=...". Use contentTypeParameters to get any parameter string or headers["Content-Type"] to get the raw value. */ @property string contentType() const { auto pv = "Content-Type" in headers; if( !pv ) return null; auto idx = std.string.indexOf(*pv, ';'); return idx >= 0 ? (*pv)[0 .. idx] : *pv; } /** Returns any supplementary parameters of the 'Content-Type' header. This is a semicolon separated ist of key/value pairs. Usually, if set, this contains the character set used for text based content types. */ @property string contentTypeParameters() const { auto pv = "Content-Type" in headers; if( !pv ) return null; auto idx = std.string.indexOf(*pv, ';'); return idx >= 0 ? (*pv)[idx+1 .. $] : null; } /** Determines if the connection persists across requests. */ @property bool persistent() const { auto ph = "connection" in headers; switch(httpVersion) { case HttpVersion.HTTP_1_0: if (ph && toLower(*ph) == "keep-alive") return true; return false; case HttpVersion.HTTP_1_1: if (ph && toLower(*ph) == "close") return false; return true; default: return false; } } } /** Represents the HTTP response from the server back to the client. */ class HttpResponse { public { /// The protocol version of the response - should not be changed HttpVersion httpVersion = HttpVersion.HTTP_1_1; /// The status code of the response, 200 by default int statusCode = HttpStatus.OK; /** The status phrase of the response If no phrase is set, a default one corresponding to the status code will be used. */ string statusPhrase; /// The response header fields InetHeaderMap headers; /// All cookies that shall be set on the client for this request Cookie[string] cookies; } /** Shortcut to the "Content-Type" header */ @property string contentType() const { auto pct = "Content-Type" in headers; return pct ? *pct : "application/octet-stream"; } /// ditto @property void contentType(string ct) { headers["Content-Type"] = ct; } } /** Respresents a HTTP response status. Throwing this exception from within a request handler will produce a matching error page. */ class HttpStatusException : Exception { private { int m_status; } this(int status, string message = null, string file = __FILE__, int line = __LINE__, Throwable next = null) { super(message ? message : httpStatusText(status), file, line, next); m_status = status; } /// The HTTP status code @property int status() const { return m_status; } } class MultiPart { string contentType; InputStream stream; //JsonValue json; string[string] form; } string getHttpVersionString(HttpVersion ver) { final switch(ver){ case HttpVersion.HTTP_1_0: return "HTTP/1.0"; case HttpVersion.HTTP_1_1: return "HTTP/1.1"; } } HttpVersion parseHttpVersion(ref string str) { enforce(str.startsWith("HTTP/")); str = str[5 .. $]; int majorVersion = parse!int(str); enforce(str.startsWith(".")); str = str[1 .. $]; int minorVersion = parse!int(str); enforce( majorVersion == 1 && (minorVersion == 0 || minorVersion == 1) ); return minorVersion == 0 ? HttpVersion.HTTP_1_0 : HttpVersion.HTTP_1_1; } /** Takes an input stream that contains data in HTTP chunked format and outputs the raw data. */ final class ChunkedInputStream : InputStream { private { InputStream m_in; ulong m_bytesInCurrentChunk = 0; } this(InputStream stream) { assert(stream !is null); m_in = stream; readChunk(); } @property bool empty() const { return m_bytesInCurrentChunk == 0; } @property ulong leastSize() const { return m_bytesInCurrentChunk; } @property bool dataAvailableForRead() { return m_in.dataAvailableForRead; } const(ubyte)[] peek() { auto dt = m_in.peek(); return dt[0 .. min(dt.length, m_bytesInCurrentChunk)]; } void read(ubyte[] dst) { while( dst.length > 0 ){ enforce(m_bytesInCurrentChunk > 0, "Reading past end of chunked HTTP stream."); auto sz = cast(size_t)min(m_bytesInCurrentChunk, dst.length); m_in.read(dst[0 .. sz]); dst = dst[sz .. $]; m_bytesInCurrentChunk -= sz; if( m_bytesInCurrentChunk == 0 ){ // skip current chunk footer and read next chunk ubyte[2] crlf; m_in.read(crlf); enforce(crlf[0] == '\r' && crlf[1] == '\n'); readChunk(); } } } private void readChunk() { // read chunk header logTrace("read next chunk header"); auto ln = m_in.readLine(); ulong sz = toImpl!ulong(cast(string)ln, 16u); m_bytesInCurrentChunk = sz; if( m_bytesInCurrentChunk == 0 ){ // empty chunk denotes the end // skip final chunk footer ubyte[2] crlf; m_in.read(crlf); enforce(crlf[0] == '\r' && crlf[1] == '\n'); } } } /** Outputs data to an output stream in HTTP chunked format. */ final class ChunkedOutputStream : OutputStream { private { OutputStream m_out; Appender!(ubyte[]) m_buffer; } this(OutputStream stream) { m_out = stream; m_buffer = appender!(ubyte[])(); } void write(in ubyte[] bytes, bool do_flush = true) { m_buffer.put(bytes); if( do_flush ) flush(); } void write(InputStream data, ulong nbytes = 0, bool do_flush = true) { if( m_buffer.data.length > 0 ) flush(); if( nbytes == 0 ){ while( !data.empty ){ writeChunkSize(data.leastSize); m_out.write(data, data.leastSize, false); m_out.write("\r\n", do_flush); } } else { writeChunkSize(nbytes); m_out.write(data, nbytes, false); m_out.write("\r\n", do_flush); } } void flush() { auto data = m_buffer.data(); if( data.length ){ writeChunkSize(data.length); m_out.write(data, false); m_out.write("\r\n"); m_buffer.clear(); } m_out.flush(); } void finalize() { flush(); m_out.write("0\r\n\r\n"); m_out.flush(); } private void writeChunkSize(long length) { m_out.write(format("%x\r\n", length), false); } } final class Cookie { private { string m_value; string m_domain; string m_path; string m_expires; long m_maxAge; bool m_secure; bool m_httpOnly; } @property void value(string value) { m_value = value; } @property string value() const { return m_value; } @property void domain(string value) { m_domain = value; } @property string domain() const { return m_domain; } @property void path(string value) { m_path = value; } @property string path() const { return m_path; } @property void expires(string value) { m_expires = value; } @property string expires() const { return m_expires; } @property void maxAge(long value) { m_maxAge = value; } @property long maxAge() const { return m_maxAge; } @property void secure(bool value) { m_secure = value; } @property bool secure() const { return m_secure; } @property void httpOnly(bool value) { m_httpOnly = value; } @property bool httpOnly() const { return m_httpOnly; } /// Deprecated compatibility aliases deprecated("Please use secure instead.") alias secure isSecure; // ditto deprecated("Please use httpOnly instead.") alias httpOnly isHttpOnly; // ditto deprecated("Please use the 'value' property instead.") Cookie setValue(string value) { m_value = value; return this; } /// ditto deprecated("Please use the 'domain' property instead.") Cookie setDomain(string domain) { m_domain = domain; return this; } /// ditto deprecated("Please use the 'path' property instead.") Cookie setPath(string path) { m_path = path; return this; } /// ditto deprecated("Please use the 'expire' property instead.") Cookie setExpire(string expires) { m_expires = expires; return this; } /// ditto deprecated("Please use the 'maxAge' property instead.") Cookie setMaxAge(long maxAge) { m_maxAge = maxAge; return this;} /// ditto deprecated("Please use the 'secure' property instead.") Cookie setSecure(bool enabled) { m_secure = enabled; return this; } /// ditto deprecated("Please use the 'httpOnly' property instead.") Cookie setHttpOnly(bool enabled) { m_httpOnly = enabled; return this; } } /// Compatibility alias for vibe.inet.message.InetHeaderMap deprecated("please use vibe.inet.message.InetHeaderMap instead.") alias InetHeaderMap StrMapCI; /** */ struct CookieValueMap { struct Cookie { string name; string value; } private { Cookie[] m_entries; } string get(string name, string def_value = null) const { auto pv = name in this; if( !pv ) return def_value; return *pv; } string[] getAll(string name) const { string[] ret; foreach(c; m_entries) if( c.name == name ) ret ~= c.value; return ret; } void opIndexAssign(string value, string name) { m_entries ~= Cookie(name, value); } string opIndex(string name) const { auto pv = name in this; if( !pv ) throw new RangeError("Non-existent cookie: "~name); return *pv; } int opApply(scope int delegate(ref Cookie) del) { foreach(ref c; m_entries) if( auto ret = del(c) ) return ret; return 0; } int opApply(scope int delegate(ref Cookie) del) const { foreach(Cookie c; m_entries) if( auto ret = del(c) ) return ret; return 0; } int opApply(scope int delegate(ref string name, ref string value) del) { foreach(ref c; m_entries) if( auto ret = del(c.name, c.value) ) return ret; return 0; } int opApply(scope int delegate(ref string name, ref string value) del) const { foreach(Cookie c; m_entries) if( auto ret = del(c.name, c.value) ) return ret; return 0; } inout(string)* opBinaryRight(string op)(string name) inout if(op == "in") { foreach(c; m_entries) if( c.name == name ) return &c.value; return null; } }
D
module UnrealScript.UTGame.UTSeqAct_DummyWeaponFire; import ScriptClasses; import UnrealScript.Helpers; import UnrealScript.Engine.SeqAct_Latent; import UnrealScript.UTGame.UTDummyPawn; import UnrealScript.Engine.Actor; extern(C++) interface UTSeqAct_DummyWeaponFire : SeqAct_Latent { public extern(D): private static __gshared ScriptClass mStaticClass; @property final static ScriptClass StaticClass() { mixin(MGSCC("Class UTGame.UTSeqAct_DummyWeaponFire")); } private static __gshared UTSeqAct_DummyWeaponFire mDefaultProperties; @property final static UTSeqAct_DummyWeaponFire DefaultProperties() { mixin(MGDPC("UTSeqAct_DummyWeaponFire", "UTSeqAct_DummyWeaponFire UTGame.Default__UTSeqAct_DummyWeaponFire")); } static struct Functions { private static __gshared { ScriptFunction mActivated; ScriptFunction mNotifyDummyFire; ScriptFunction mUpdate; } public @property static final { ScriptFunction Activated() { mixin(MGF("mActivated", "Function UTGame.UTSeqAct_DummyWeaponFire.Activated")); } ScriptFunction NotifyDummyFire() { mixin(MGF("mNotifyDummyFire", "Function UTGame.UTSeqAct_DummyWeaponFire.NotifyDummyFire")); } ScriptFunction Update() { mixin(MGF("mUpdate", "Function UTGame.UTSeqAct_DummyWeaponFire.Update")); } } } @property final { auto ref { Actor Target() { mixin(MGPC("Actor", 268)); } Rotator MaxSpread() { mixin(MGPC("Rotator", 272)); } Actor Origin() { mixin(MGPC("Actor", 264)); } int ShotsFired() { mixin(MGPC("int", 288)); } ubyte FireMode() { mixin(MGPC("ubyte", 260)); } ScriptClass WeaponClass() { mixin(MGPC("ScriptClass", 256)); } int ShotsToFire() { mixin(MGPC("int", 252)); } UTDummyPawn DummyPawn() { mixin(MGPC("UTDummyPawn", 248)); } } bool bSuppressSounds() { mixin(MGBPC(284, 0x1)); } bool bSuppressSounds(bool val) { mixin(MSBPC(284, 0x1)); } } final: void Activated() { (cast(ScriptObject)this).ProcessEvent(Functions.Activated, cast(void*)0, cast(void*)0); } void NotifyDummyFire() { (cast(ScriptObject)this).ProcessEvent(Functions.NotifyDummyFire, cast(void*)0, cast(void*)0); } bool Update(float DeltaTime) { ubyte params[8]; params[] = 0; *cast(float*)params.ptr = DeltaTime; (cast(ScriptObject)this).ProcessEvent(Functions.Update, params.ptr, cast(void*)0); return *cast(bool*)&params[4]; } }
D
/Users/glasses/Documents/GitHub/Perfect-Turnstile-PostgreSQL-Demo/.build/x86_64-apple-macosx10.10/debug/Turnstile.build/Realm/MemoryRealm.swift.o : /Users/glasses/Documents/GitHub/Perfect-Turnstile-PostgreSQL-Demo/.build/checkouts/Turnstile.git-2443676010155639616/Sources/Turnstile/Credentials/UsernamePassword.swift /Users/glasses/Documents/GitHub/Perfect-Turnstile-PostgreSQL-Demo/.build/checkouts/Turnstile.git-2443676010155639616/Sources/Turnstile/Core/Turnstile.swift /Users/glasses/Documents/GitHub/Perfect-Turnstile-PostgreSQL-Demo/.build/checkouts/Turnstile.git-2443676010155639616/Sources/Turnstile/Realm/Realm.swift /Users/glasses/Documents/GitHub/Perfect-Turnstile-PostgreSQL-Demo/.build/checkouts/Turnstile.git-2443676010155639616/Sources/Turnstile/Realm/MemoryRealm.swift /Users/glasses/Documents/GitHub/Perfect-Turnstile-PostgreSQL-Demo/.build/checkouts/Turnstile.git-2443676010155639616/Sources/Turnstile/Credentials/Token.swift /Users/glasses/Documents/GitHub/Perfect-Turnstile-PostgreSQL-Demo/.build/checkouts/Turnstile.git-2443676010155639616/Sources/Turnstile/SessionManager/SessionManager.swift /Users/glasses/Documents/GitHub/Perfect-Turnstile-PostgreSQL-Demo/.build/checkouts/Turnstile.git-2443676010155639616/Sources/Turnstile/SessionManager/MemorySessionManager.swift /Users/glasses/Documents/GitHub/Perfect-Turnstile-PostgreSQL-Demo/.build/checkouts/Turnstile.git-2443676010155639616/Sources/Turnstile/TurnstileError.swift /Users/glasses/Documents/GitHub/Perfect-Turnstile-PostgreSQL-Demo/.build/checkouts/Turnstile.git-2443676010155639616/Sources/Turnstile/Credentials/CredentialsError.swift /Users/glasses/Documents/GitHub/Perfect-Turnstile-PostgreSQL-Demo/.build/checkouts/Turnstile.git-2443676010155639616/Sources/Turnstile/Credentials/Credentials.swift /Users/glasses/Documents/GitHub/Perfect-Turnstile-PostgreSQL-Demo/.build/checkouts/Turnstile.git-2443676010155639616/Sources/Turnstile/Core/Subject.swift /Users/glasses/Documents/GitHub/Perfect-Turnstile-PostgreSQL-Demo/.build/checkouts/Turnstile.git-2443676010155639616/Sources/Turnstile/Realm/Account.swift /Users/glasses/Documents/GitHub/Perfect-Turnstile-PostgreSQL-Demo/.build/checkouts/Turnstile.git-2443676010155639616/Sources/Turnstile/Credentials/APIKey.swift /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Dispatch.apinotesc /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/ObjectiveC.swiftmodule /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Dispatch.swiftmodule /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Darwin.swiftmodule /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Foundation.swiftmodule /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/CoreFoundation.swiftmodule /Users/glasses/Documents/GitHub/Perfect-Turnstile-PostgreSQL-Demo/.build/x86_64-apple-macosx10.10/debug/TurnstileCrypto.swiftmodule /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/CoreGraphics.swiftmodule /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Swift.swiftmodule /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/IOKit.swiftmodule /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/SwiftOnoneSupport.swiftmodule /Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/include/Darwin.apinotes /Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Users/glasses/Documents/GitHub/Perfect-Turnstile-PostgreSQL-Demo/.build/x86_64-apple-macosx10.10/debug/Turnstile.build/MemoryRealm~partial.swiftmodule : /Users/glasses/Documents/GitHub/Perfect-Turnstile-PostgreSQL-Demo/.build/checkouts/Turnstile.git-2443676010155639616/Sources/Turnstile/Credentials/UsernamePassword.swift /Users/glasses/Documents/GitHub/Perfect-Turnstile-PostgreSQL-Demo/.build/checkouts/Turnstile.git-2443676010155639616/Sources/Turnstile/Core/Turnstile.swift /Users/glasses/Documents/GitHub/Perfect-Turnstile-PostgreSQL-Demo/.build/checkouts/Turnstile.git-2443676010155639616/Sources/Turnstile/Realm/Realm.swift /Users/glasses/Documents/GitHub/Perfect-Turnstile-PostgreSQL-Demo/.build/checkouts/Turnstile.git-2443676010155639616/Sources/Turnstile/Realm/MemoryRealm.swift /Users/glasses/Documents/GitHub/Perfect-Turnstile-PostgreSQL-Demo/.build/checkouts/Turnstile.git-2443676010155639616/Sources/Turnstile/Credentials/Token.swift /Users/glasses/Documents/GitHub/Perfect-Turnstile-PostgreSQL-Demo/.build/checkouts/Turnstile.git-2443676010155639616/Sources/Turnstile/SessionManager/SessionManager.swift /Users/glasses/Documents/GitHub/Perfect-Turnstile-PostgreSQL-Demo/.build/checkouts/Turnstile.git-2443676010155639616/Sources/Turnstile/SessionManager/MemorySessionManager.swift /Users/glasses/Documents/GitHub/Perfect-Turnstile-PostgreSQL-Demo/.build/checkouts/Turnstile.git-2443676010155639616/Sources/Turnstile/TurnstileError.swift /Users/glasses/Documents/GitHub/Perfect-Turnstile-PostgreSQL-Demo/.build/checkouts/Turnstile.git-2443676010155639616/Sources/Turnstile/Credentials/CredentialsError.swift /Users/glasses/Documents/GitHub/Perfect-Turnstile-PostgreSQL-Demo/.build/checkouts/Turnstile.git-2443676010155639616/Sources/Turnstile/Credentials/Credentials.swift /Users/glasses/Documents/GitHub/Perfect-Turnstile-PostgreSQL-Demo/.build/checkouts/Turnstile.git-2443676010155639616/Sources/Turnstile/Core/Subject.swift /Users/glasses/Documents/GitHub/Perfect-Turnstile-PostgreSQL-Demo/.build/checkouts/Turnstile.git-2443676010155639616/Sources/Turnstile/Realm/Account.swift /Users/glasses/Documents/GitHub/Perfect-Turnstile-PostgreSQL-Demo/.build/checkouts/Turnstile.git-2443676010155639616/Sources/Turnstile/Credentials/APIKey.swift /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Dispatch.apinotesc /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/ObjectiveC.swiftmodule /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Dispatch.swiftmodule /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Darwin.swiftmodule /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Foundation.swiftmodule /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/CoreFoundation.swiftmodule /Users/glasses/Documents/GitHub/Perfect-Turnstile-PostgreSQL-Demo/.build/x86_64-apple-macosx10.10/debug/TurnstileCrypto.swiftmodule /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/CoreGraphics.swiftmodule /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Swift.swiftmodule /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/IOKit.swiftmodule /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/SwiftOnoneSupport.swiftmodule /Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/include/Darwin.apinotes /Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Users/glasses/Documents/GitHub/Perfect-Turnstile-PostgreSQL-Demo/.build/x86_64-apple-macosx10.10/debug/Turnstile.build/MemoryRealm~partial.swiftdoc : /Users/glasses/Documents/GitHub/Perfect-Turnstile-PostgreSQL-Demo/.build/checkouts/Turnstile.git-2443676010155639616/Sources/Turnstile/Credentials/UsernamePassword.swift /Users/glasses/Documents/GitHub/Perfect-Turnstile-PostgreSQL-Demo/.build/checkouts/Turnstile.git-2443676010155639616/Sources/Turnstile/Core/Turnstile.swift /Users/glasses/Documents/GitHub/Perfect-Turnstile-PostgreSQL-Demo/.build/checkouts/Turnstile.git-2443676010155639616/Sources/Turnstile/Realm/Realm.swift /Users/glasses/Documents/GitHub/Perfect-Turnstile-PostgreSQL-Demo/.build/checkouts/Turnstile.git-2443676010155639616/Sources/Turnstile/Realm/MemoryRealm.swift /Users/glasses/Documents/GitHub/Perfect-Turnstile-PostgreSQL-Demo/.build/checkouts/Turnstile.git-2443676010155639616/Sources/Turnstile/Credentials/Token.swift /Users/glasses/Documents/GitHub/Perfect-Turnstile-PostgreSQL-Demo/.build/checkouts/Turnstile.git-2443676010155639616/Sources/Turnstile/SessionManager/SessionManager.swift /Users/glasses/Documents/GitHub/Perfect-Turnstile-PostgreSQL-Demo/.build/checkouts/Turnstile.git-2443676010155639616/Sources/Turnstile/SessionManager/MemorySessionManager.swift /Users/glasses/Documents/GitHub/Perfect-Turnstile-PostgreSQL-Demo/.build/checkouts/Turnstile.git-2443676010155639616/Sources/Turnstile/TurnstileError.swift /Users/glasses/Documents/GitHub/Perfect-Turnstile-PostgreSQL-Demo/.build/checkouts/Turnstile.git-2443676010155639616/Sources/Turnstile/Credentials/CredentialsError.swift /Users/glasses/Documents/GitHub/Perfect-Turnstile-PostgreSQL-Demo/.build/checkouts/Turnstile.git-2443676010155639616/Sources/Turnstile/Credentials/Credentials.swift /Users/glasses/Documents/GitHub/Perfect-Turnstile-PostgreSQL-Demo/.build/checkouts/Turnstile.git-2443676010155639616/Sources/Turnstile/Core/Subject.swift /Users/glasses/Documents/GitHub/Perfect-Turnstile-PostgreSQL-Demo/.build/checkouts/Turnstile.git-2443676010155639616/Sources/Turnstile/Realm/Account.swift /Users/glasses/Documents/GitHub/Perfect-Turnstile-PostgreSQL-Demo/.build/checkouts/Turnstile.git-2443676010155639616/Sources/Turnstile/Credentials/APIKey.swift /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Dispatch.apinotesc /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/ObjectiveC.swiftmodule /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Dispatch.swiftmodule /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Darwin.swiftmodule /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Foundation.swiftmodule /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/CoreFoundation.swiftmodule /Users/glasses/Documents/GitHub/Perfect-Turnstile-PostgreSQL-Demo/.build/x86_64-apple-macosx10.10/debug/TurnstileCrypto.swiftmodule /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/CoreGraphics.swiftmodule /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Swift.swiftmodule /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/IOKit.swiftmodule /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/SwiftOnoneSupport.swiftmodule /Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/include/Darwin.apinotes /Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes
D
#as: -O0 #objdump: -drw #name: i386 Intel register names .*: +file format .*i386.* Disassembly of section \.text: 0+0 <.*>: .*[ ]+R_386_32[ ]+tmm1 .*[ ]+R_386_16[ ]+eax .*[ ]+R_386_16[ ]+rax .*[ ]+R_386_16[ ]+axl .*[ ]+R_386_16[ ]+r8b .*[ ]+R_386_16[ ]+r8w .*[ ]+R_386_16[ ]+r8d .*[ ]+R_386_16[ ]+r8 .*[ ]+R_386_16[ ]+fs .*[ ]+R_386_16[ ]+st .*[ ]+R_386_16[ ]+cr0 .*[ ]+R_386_16[ ]+dr0 .*[ ]+R_386_16[ ]+tr0 .*[ ]+R_386_16[ ]+mm0 .*[ ]+R_386_16[ ]+xmm0 .*[ ]+R_386_16[ ]+ymm0 .*[ ]+R_386_16[ ]+xmm16 .*[ ]+R_386_16[ ]+zmm0 .*[ ]+R_386_32[ ]+rax .*[ ]+R_386_32[ ]+axl .*[ ]+R_386_32[ ]+r8b .*[ ]+R_386_32[ ]+r8w .*[ ]+R_386_32[ ]+r8d .*[ ]+R_386_32[ ]+r8 .*[ ]+R_386_32[ ]+st .*:[ ]+0f 20 c0[ ]+mov[ ]+%cr0,%eax .*:[ ]+0f 21 c0[ ]+mov[ ]+%db0,%eax .*:[ ]+0f 24 c0[ ]+mov[ ]+%tr0,%eax .*[ ]+R_386_32[ ]+mm0 .*[ ]+R_386_32[ ]+xmm0 .*[ ]+R_386_32[ ]+ymm0 .*[ ]+R_386_32[ ]+xmm16 .*[ ]+R_386_32[ ]+zmm0 .*:[ ]+dd c0[ ]+ffree[ ]+%st(\(0\))? .*:[ ]+0f ef c0[ ]+pxor[ ]+%mm0,%mm0 .*:[ ]+0f 57 c0[ ]+xorps[ ]+%xmm0,%xmm0 .*:[ ]+c5 fc 57 c0[ ]+vxorps[ ]+%ymm0,%ymm0,%ymm0 .*:[ ]+44[ ]+inc %esp .*:[ ]+88 c0[ ]+mov[ ]+%al,%al .*:[ ]+66 44[ ]+inc[ ]+%sp .*:[ ]+89 c0[ ]+mov[ ]+%eax,%eax .*:[ ]+44[ ]+inc %esp .*:[ ]+89 c0[ ]+mov[ ]+%eax,%eax .*:[ ]+4c[ ]+dec %esp .*:[ ]+89 c0[ ]+mov[ ]+%eax,%eax .* <ymm8>: .*[ ]+<ymm8> .* <tmm0>: .*[ ]+<tmm0> #pass
D
module java.lang.Class; import java.lang.Object; class Class : _Object { //mixin autoReflector!Class; }
D
instance BAU_104_DS2P_Barok(Npc_Default) { name[0] = "Барок"; guild = GIL_BAU; id = 104; voice = 1; flags = 0; npcType = npctype_main; B_SetAttributesToChapter(self,1); fight_tactic = FAI_HUMAN_COWARD; EquipItem(self,ItMw_1h_Bau_Axe); B_CreateAmbientInv(self); B_SetNpcVisual(self,MALE,"Hum_Head_Bald",Face_B_Normal01,BodyTex_B,ITAR_Bau_L); Mdl_SetModelFatness(self,0); Mdl_ApplyOverlayMds(self,"Humans_Relaxed.mds"); B_GiveNpcTalents(self); B_SetFightSkills(self,15); daily_routine = Rtn_Start_104; }; func void Rtn_Start_104() { };
D
module tangled.interfaces; import tango.net.InternetAddress; import tango.io.selector.model.ISelector; import tangled.failure; import tangled.time; import tangled.conduit; //enum SystemEvent { startup, shutdown, persist }; //enum Phase {before, during, after }; interface IConnector { void stopConnecting(); void disconnect(); void connect(); InternetAddress getDestination(); } interface IDeferred (T...) { static if (typeof(T).length != 0) alias T[0] Return; else alias void Return; void addCallback(Return delegate(T) f); void callBack(T res); void callback(T res); Return yieldForResult(); uint numWaiters(); } interface IDelayedCall { double time(); void cancel(); bool active(); void call(); int opCmp(IDelayedCall o); } interface IProtocol { void makeConnection(ASocketConduit transport); /* void dataReceived(char[] data); void connectionLost(Failure reason); void connectionMade(); void connectionFlushed();*/ } interface IProtocolFactory { IProtocol buildProtocol(); void doStart(); void doStop(); } interface IHTTPRequest { char[] remoteHost(); void sendPage(int code, char[] reason, char[]data); } interface IHTTPProtocolFactory { IHTTPProtocol buildProtocol(); void doStart(); void doStop(); } interface IHTTPProtocol { void handleRequest(IHTTPRequest req); } interface ITransport { void write(char[] data); void writeSequence(char[][] data); void loseConnection(); bool isFlushed(); InternetAddress getPeer(); InternetAddress getHost(); } interface IASelectable : ISelectable { void readyToRead(); void readyToWrite(); void signal(); void timeout(); } interface IListener { int fileHandle(); ASocketConduit accept(); IProtocolFactory factory(); } interface IAConduit { InternetAddress remoteAddr(); }
D
import helloWorld; void main() { go(); }
D
/Users/okasho/serverProject/tryswift/get_post_patch_and_delate/swift/.build/debug/Jay.build/Reader.swift.o : /Users/okasho/serverProject/tryswift/get_post_patch_and_delate/swift/Packages/Jay-1.0.1/Sources/Jay/ArrayParser.swift /Users/okasho/serverProject/tryswift/get_post_patch_and_delate/swift/Packages/Jay-1.0.1/Sources/Jay/BooleanParser.swift /Users/okasho/serverProject/tryswift/get_post_patch_and_delate/swift/Packages/Jay-1.0.1/Sources/Jay/ByteReader.swift /Users/okasho/serverProject/tryswift/get_post_patch_and_delate/swift/Packages/Jay-1.0.1/Sources/Jay/CommentParser.swift /Users/okasho/serverProject/tryswift/get_post_patch_and_delate/swift/Packages/Jay-1.0.1/Sources/Jay/Consts.swift /Users/okasho/serverProject/tryswift/get_post_patch_and_delate/swift/Packages/Jay-1.0.1/Sources/Jay/Error.swift /Users/okasho/serverProject/tryswift/get_post_patch_and_delate/swift/Packages/Jay-1.0.1/Sources/Jay/Extensions.swift /Users/okasho/serverProject/tryswift/get_post_patch_and_delate/swift/Packages/Jay-1.0.1/Sources/Jay/Formatter.swift /Users/okasho/serverProject/tryswift/get_post_patch_and_delate/swift/Packages/Jay-1.0.1/Sources/Jay/Jay.swift /Users/okasho/serverProject/tryswift/get_post_patch_and_delate/swift/Packages/Jay-1.0.1/Sources/Jay/NativeParser.swift /Users/okasho/serverProject/tryswift/get_post_patch_and_delate/swift/Packages/Jay-1.0.1/Sources/Jay/NativeTypeConversions.swift /Users/okasho/serverProject/tryswift/get_post_patch_and_delate/swift/Packages/Jay-1.0.1/Sources/Jay/NullParser.swift /Users/okasho/serverProject/tryswift/get_post_patch_and_delate/swift/Packages/Jay-1.0.1/Sources/Jay/NumberParser.swift /Users/okasho/serverProject/tryswift/get_post_patch_and_delate/swift/Packages/Jay-1.0.1/Sources/Jay/ObjectParser.swift /Users/okasho/serverProject/tryswift/get_post_patch_and_delate/swift/Packages/Jay-1.0.1/Sources/Jay/OutputStream.swift /Users/okasho/serverProject/tryswift/get_post_patch_and_delate/swift/Packages/Jay-1.0.1/Sources/Jay/Parser.swift /Users/okasho/serverProject/tryswift/get_post_patch_and_delate/swift/Packages/Jay-1.0.1/Sources/Jay/Reader.swift /Users/okasho/serverProject/tryswift/get_post_patch_and_delate/swift/Packages/Jay-1.0.1/Sources/Jay/RootParser.swift /Users/okasho/serverProject/tryswift/get_post_patch_and_delate/swift/Packages/Jay-1.0.1/Sources/Jay/StringParser.swift /Users/okasho/serverProject/tryswift/get_post_patch_and_delate/swift/Packages/Jay-1.0.1/Sources/Jay/Types.swift /Users/okasho/serverProject/tryswift/get_post_patch_and_delate/swift/Packages/Jay-1.0.1/Sources/Jay/ValueParser.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/SwiftOnoneSupport.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Dispatch.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/ObjectiveC.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/CoreGraphics.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/IOKit.swiftmodule /Users/okasho/serverProject/tryswift/get_post_patch_and_delate/swift/.build/debug/Jay.build/Reader~partial.swiftmodule : /Users/okasho/serverProject/tryswift/get_post_patch_and_delate/swift/Packages/Jay-1.0.1/Sources/Jay/ArrayParser.swift /Users/okasho/serverProject/tryswift/get_post_patch_and_delate/swift/Packages/Jay-1.0.1/Sources/Jay/BooleanParser.swift /Users/okasho/serverProject/tryswift/get_post_patch_and_delate/swift/Packages/Jay-1.0.1/Sources/Jay/ByteReader.swift /Users/okasho/serverProject/tryswift/get_post_patch_and_delate/swift/Packages/Jay-1.0.1/Sources/Jay/CommentParser.swift /Users/okasho/serverProject/tryswift/get_post_patch_and_delate/swift/Packages/Jay-1.0.1/Sources/Jay/Consts.swift /Users/okasho/serverProject/tryswift/get_post_patch_and_delate/swift/Packages/Jay-1.0.1/Sources/Jay/Error.swift /Users/okasho/serverProject/tryswift/get_post_patch_and_delate/swift/Packages/Jay-1.0.1/Sources/Jay/Extensions.swift /Users/okasho/serverProject/tryswift/get_post_patch_and_delate/swift/Packages/Jay-1.0.1/Sources/Jay/Formatter.swift /Users/okasho/serverProject/tryswift/get_post_patch_and_delate/swift/Packages/Jay-1.0.1/Sources/Jay/Jay.swift /Users/okasho/serverProject/tryswift/get_post_patch_and_delate/swift/Packages/Jay-1.0.1/Sources/Jay/NativeParser.swift /Users/okasho/serverProject/tryswift/get_post_patch_and_delate/swift/Packages/Jay-1.0.1/Sources/Jay/NativeTypeConversions.swift /Users/okasho/serverProject/tryswift/get_post_patch_and_delate/swift/Packages/Jay-1.0.1/Sources/Jay/NullParser.swift /Users/okasho/serverProject/tryswift/get_post_patch_and_delate/swift/Packages/Jay-1.0.1/Sources/Jay/NumberParser.swift /Users/okasho/serverProject/tryswift/get_post_patch_and_delate/swift/Packages/Jay-1.0.1/Sources/Jay/ObjectParser.swift /Users/okasho/serverProject/tryswift/get_post_patch_and_delate/swift/Packages/Jay-1.0.1/Sources/Jay/OutputStream.swift /Users/okasho/serverProject/tryswift/get_post_patch_and_delate/swift/Packages/Jay-1.0.1/Sources/Jay/Parser.swift /Users/okasho/serverProject/tryswift/get_post_patch_and_delate/swift/Packages/Jay-1.0.1/Sources/Jay/Reader.swift /Users/okasho/serverProject/tryswift/get_post_patch_and_delate/swift/Packages/Jay-1.0.1/Sources/Jay/RootParser.swift /Users/okasho/serverProject/tryswift/get_post_patch_and_delate/swift/Packages/Jay-1.0.1/Sources/Jay/StringParser.swift /Users/okasho/serverProject/tryswift/get_post_patch_and_delate/swift/Packages/Jay-1.0.1/Sources/Jay/Types.swift /Users/okasho/serverProject/tryswift/get_post_patch_and_delate/swift/Packages/Jay-1.0.1/Sources/Jay/ValueParser.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/SwiftOnoneSupport.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Dispatch.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/ObjectiveC.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/CoreGraphics.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/IOKit.swiftmodule /Users/okasho/serverProject/tryswift/get_post_patch_and_delate/swift/.build/debug/Jay.build/Reader~partial.swiftdoc : /Users/okasho/serverProject/tryswift/get_post_patch_and_delate/swift/Packages/Jay-1.0.1/Sources/Jay/ArrayParser.swift /Users/okasho/serverProject/tryswift/get_post_patch_and_delate/swift/Packages/Jay-1.0.1/Sources/Jay/BooleanParser.swift /Users/okasho/serverProject/tryswift/get_post_patch_and_delate/swift/Packages/Jay-1.0.1/Sources/Jay/ByteReader.swift /Users/okasho/serverProject/tryswift/get_post_patch_and_delate/swift/Packages/Jay-1.0.1/Sources/Jay/CommentParser.swift /Users/okasho/serverProject/tryswift/get_post_patch_and_delate/swift/Packages/Jay-1.0.1/Sources/Jay/Consts.swift /Users/okasho/serverProject/tryswift/get_post_patch_and_delate/swift/Packages/Jay-1.0.1/Sources/Jay/Error.swift /Users/okasho/serverProject/tryswift/get_post_patch_and_delate/swift/Packages/Jay-1.0.1/Sources/Jay/Extensions.swift /Users/okasho/serverProject/tryswift/get_post_patch_and_delate/swift/Packages/Jay-1.0.1/Sources/Jay/Formatter.swift /Users/okasho/serverProject/tryswift/get_post_patch_and_delate/swift/Packages/Jay-1.0.1/Sources/Jay/Jay.swift /Users/okasho/serverProject/tryswift/get_post_patch_and_delate/swift/Packages/Jay-1.0.1/Sources/Jay/NativeParser.swift /Users/okasho/serverProject/tryswift/get_post_patch_and_delate/swift/Packages/Jay-1.0.1/Sources/Jay/NativeTypeConversions.swift /Users/okasho/serverProject/tryswift/get_post_patch_and_delate/swift/Packages/Jay-1.0.1/Sources/Jay/NullParser.swift /Users/okasho/serverProject/tryswift/get_post_patch_and_delate/swift/Packages/Jay-1.0.1/Sources/Jay/NumberParser.swift /Users/okasho/serverProject/tryswift/get_post_patch_and_delate/swift/Packages/Jay-1.0.1/Sources/Jay/ObjectParser.swift /Users/okasho/serverProject/tryswift/get_post_patch_and_delate/swift/Packages/Jay-1.0.1/Sources/Jay/OutputStream.swift /Users/okasho/serverProject/tryswift/get_post_patch_and_delate/swift/Packages/Jay-1.0.1/Sources/Jay/Parser.swift /Users/okasho/serverProject/tryswift/get_post_patch_and_delate/swift/Packages/Jay-1.0.1/Sources/Jay/Reader.swift /Users/okasho/serverProject/tryswift/get_post_patch_and_delate/swift/Packages/Jay-1.0.1/Sources/Jay/RootParser.swift /Users/okasho/serverProject/tryswift/get_post_patch_and_delate/swift/Packages/Jay-1.0.1/Sources/Jay/StringParser.swift /Users/okasho/serverProject/tryswift/get_post_patch_and_delate/swift/Packages/Jay-1.0.1/Sources/Jay/Types.swift /Users/okasho/serverProject/tryswift/get_post_patch_and_delate/swift/Packages/Jay-1.0.1/Sources/Jay/ValueParser.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/SwiftOnoneSupport.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Dispatch.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/ObjectiveC.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/CoreGraphics.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/IOKit.swiftmodule
D
/* * Hunt - A refined core library for D programming language. * * Copyright (C) 2018-2019 HuntLabs * * Website: https://www.huntlabs.net/ * * Licensed under the Apache-2.0 License. * */ module hunt.io.BufferedOutputStream; import hunt.io.Common; import hunt.Exceptions; version(HUNT_DEBUG) { import hunt.logging; } /** * */ class BufferedOutputStream : OutputStream { protected OutputStream output; protected int bufferSize; /** * The internal buffer where data is stored. */ protected byte[] buf; /** * The number of valid bytes in the buffer. This value is always * in the range {@code 0} through {@code buf.length}; elements * {@code buf[0]} through {@code buf[count-1]} contain valid * byte data. */ protected int count; this(OutputStream output, int bufferSize = 1024) { this.output = output; if (bufferSize > 1024) { this.bufferSize = bufferSize; this.buf = new byte[bufferSize]; } else { this.bufferSize = 1024; this.buf = new byte[1024]; } } alias write = OutputStream.write; override void write(int b) { if (count >= buf.length) { flush(); } buf[count++] = cast(byte) b; } override void write(byte[] array, int offset, int length) { if (array is null || array.length == 0 || length <= 0) { return; } if (offset < 0) { throw new IllegalArgumentException("the offset is less than 0"); } if (length >= buf.length) { flush(); output.write(array, offset, length); return; } if (length > buf.length - count) { flush(); } buf[count .. count+length] = array[offset .. offset+length]; count += length; // version(HUNT_DEBUG) // tracef("%(%02X %)", buf[0 .. count]); } override void flush() { version(HUNT_DEBUG_MORE) { tracef("remaining: %d bytes", count); } if (count > 0) { output.write(buf, 0, count); count = 0; buf = new byte[bufferSize]; } } override void close() { flush(); output.close(); } }
D
/Users/seijiro/work/rust/20191110/201912/webapi/target/debug/deps/api-b27fa690ef459ecc.rmeta: api/src/lib.rs /Users/seijiro/work/rust/20191110/201912/webapi/target/debug/deps/libapi-b27fa690ef459ecc.rlib: api/src/lib.rs /Users/seijiro/work/rust/20191110/201912/webapi/target/debug/deps/api-b27fa690ef459ecc.d: api/src/lib.rs api/src/lib.rs:
D
instance DIA_BENNET_EXIT(C_INFO) { npc = sld_809_bennet; nr = 999; condition = dia_bennet_exit_condition; information = dia_bennet_exit_info; permanent = TRUE; description = DIALOG_ENDE; }; func int dia_bennet_exit_condition() { if(KAPITEL < 3) { return TRUE; }; }; func void dia_bennet_exit_info() { AI_StopProcessInfos(self); }; instance DIA_BENNET_HALLO(C_INFO) { npc = sld_809_bennet; nr = 1; condition = dia_bennet_hallo_condition; information = dia_bennet_hallo_info; permanent = FALSE; important = TRUE; }; func int dia_bennet_hallo_condition() { if((KAPITEL < 3) && Npc_IsInState(self,zs_talk)) { return TRUE; }; }; func void dia_bennet_hallo_info() { AI_Output(self,other,"DIA_Bennet_HALLO_06_00"); //Я не продаю оружие. Халед продает. Он находится в доме Онара. Log_CreateTopic(TOPIC_SOLDIERTRADER,LOG_NOTE); b_logentry(TOPIC_SOLDIERTRADER,"Халед - торговец оружием."); }; instance DIA_BENNET_TRADE(C_INFO) { npc = sld_809_bennet; nr = 700; condition = dia_bennet_trade_condition; information = dia_bennet_trade_info; permanent = TRUE; description = "А как насчет кузнечного инструмента?"; trade = TRUE; }; func int dia_bennet_trade_condition() { if((KAPITEL != 3) || (MIS_RESCUEBENNET == LOG_SUCCESS)) { return TRUE; }; }; func void dia_bennet_trade_info() { var int mcbolzenamount; var int mcarrowamount; AI_Output(other,self,"DIA_Bennet_TRADE_15_00"); //А как насчет кузнечного инструмента? b_givetradeinv(self); Npc_RemoveInvItems(self,itrw_bolt,Npc_HasItems(self,itrw_bolt)); mcbolzenamount = KAPITEL * 50; CreateInvItems(self,itrw_bolt,mcbolzenamount); Npc_RemoveInvItems(self,itrw_arrow,Npc_HasItems(self,itrw_arrow)); mcarrowamount = KAPITEL * 50; CreateInvItems(self,itrw_arrow,mcarrowamount); AI_Output(self,other,"DIA_Bennet_TRADE_06_01"); //Что тебе нужно? if(BENNETLOG == FALSE) { Log_CreateTopic(TOPIC_SOLDIERTRADER,LOG_NOTE); b_logentry(TOPIC_SOLDIERTRADER,"Беннет продает кузнечное снаряжение."); BENNETLOG = TRUE; }; }; instance DIA_BENNET_WHICHWEAPONS(C_INFO) { npc = sld_809_bennet; nr = 2; condition = dia_bennet_whichweapons_condition; information = dia_bennet_whichweapons_info; permanent = FALSE; description = "Какое оружие ты делаешь?"; }; func int dia_bennet_whichweapons_condition() { if(((KAPITEL != 3) || (MIS_RESCUEBENNET == LOG_SUCCESS)) && (MIS_BENNET_BRINGORE == FALSE)) { return TRUE; }; }; func void dia_bennet_whichweapons_info() { AI_Output(other,self,"DIA_Bennet_WhichWeapons_15_00"); //Какое оружие ты делаешь? AI_Output(self,other,"DIA_Bennet_WhichWeapons_06_01"); //Сейчас - обычные мечи. Больше ничего. AI_Output(self,other,"DIA_Bennet_WhichWeapons_06_02"); //Но если бы у меня была магическая руда, я мог бы выковать оружие, превосходящее любой меч из обычной стали. AI_Output(self,other,"DIA_Bennet_WhichWeapons_06_03"); //Ты случайно не знаешь, где можно раздобыть руды? (смеется) Кроме как в Долине Рудников, я имею в виду. AI_Output(other,self,"DIA_Bennet_WhichWeapons_15_04"); //Нет. AI_Output(self,other,"DIA_Bennet_WhichWeapons_06_05"); //Конечно же, не знаешь. }; instance DIA_BENNET_BAUORSLD(C_INFO) { npc = sld_809_bennet; nr = 3; condition = dia_bennet_bauorsld_condition; information = dia_bennet_bauorsld_info; permanent = FALSE; description = "Ты с фермерами или с наемниками?"; }; func int dia_bennet_bauorsld_condition() { return TRUE; }; func void dia_bennet_bauorsld_info() { AI_Output(other,self,"DIA_Bennet_BauOrSld_15_00"); //Ты с фермерами или с наемниками? AI_Output(self,other,"DIA_Bennet_BauOrSld_06_01"); //Ты смеешься надо мной, да? AI_Output(other,self,"DIA_Bennet_BauOrSld_15_02"); //Мне просто интересно. AI_Output(self,other,"DIA_Bennet_BauOrSld_06_03"); //Ты когда-нибудь видел фермера, который ковал бы оружие? AI_Output(other,self,"DIA_Bennet_BauOrSld_15_04"); //Нет. AI_Output(self,other,"DIA_Bennet_BauOrSld_06_05"); //Тогда зачем ты задаешь такие тупые вопросы? }; instance DIA_BENNET_WANNAJOIN(C_INFO) { npc = sld_809_bennet; nr = 4; condition = dia_bennet_wannajoin_condition; information = dia_bennet_wannajoin_info; permanent = TRUE; description = "Я хочу присоединиться к наемникам!"; }; func int dia_bennet_wannajoin_condition() { if(Npc_KnowsInfo(other,dia_bennet_bauorsld) && (other.guild == GIL_NONE)) { return TRUE; }; }; func void dia_bennet_wannajoin_info() { AI_Output(other,self,"DIA_Bennet_WannaJoin_15_00"); //Я хочу присоединиться к наемникам! AI_Output(self,other,"DIA_Bennet_WannaJoin_06_01"); //Тогда прекращай болтать и иди к Торлофу. Пусть он даст тебе испытание. if((MIS_TORLOF_HOLPACHTVONSEKOB == LOG_SUCCESS) || (MIS_TORLOF_BENGARMILIZKLATSCHEN == LOG_SUCCESS)) { AI_Output(other,self,"DIA_Bennet_WannaJoin_15_02"); //Я прошел испытание. AI_Output(self,other,"DIA_Bennet_WannaJoin_06_03"); //Хорошо, тогда я проголосую за тебя. }; }; instance DIA_BENNET_WANNASMITH(C_INFO) { npc = sld_809_bennet; nr = 5; condition = dia_bennet_wannasmith_condition; information = dia_bennet_wannasmith_info; permanent = TRUE; description = "Ты можешь научить меня ковать мечи?"; }; func int dia_bennet_wannasmith_condition() { if((PLAYER_TALENT_SMITH[WEAPON_COMMON] == FALSE) && (BENNET_TEACHCOMMON == FALSE) && ((KAPITEL != 3) || (MIS_RESCUEBENNET == LOG_SUCCESS))) { return TRUE; }; }; func void dia_bennet_wannasmith_info() { AI_Output(other,self,"DIA_Bennet_WannaSmith_15_00"); //Ты можешь научить меня ковать мечи? AI_Output(self,other,"DIA_Bennet_WannaSmith_06_01"); //Конечно. AI_Output(self,other,"DIA_Bennet_WannaSmith_06_02"); //Впрочем, это обойдется тебе в некоторую сумму. Скажем, 30 золотых. Info_ClearChoices(dia_bennet_wannasmith); Info_AddChoice(dia_bennet_wannasmith,"Может быть, позже.",dia_bennet_wannasmith_later); Info_AddChoice(dia_bennet_wannasmith,"Отлично. Вот твои 30 золотых.",dia_bennet_wannasmith_pay); }; func void dia_bennet_wannasmith_pay() { AI_Output(other,self,"DIA_Bennet_WannaSmith_Pay_15_00"); //Отлично. Вот твои 30 золотых. if(b_giveinvitems(other,self,itmi_gold,30)) { AI_Output(self,other,"DIA_Bennet_WannaSmith_Pay_06_01"); //Должен сказать, это очень хорошая цена! Я готов приступить к обучению, как только ты будешь готов. BENNET_TEACHCOMMON = TRUE; Log_CreateTopic(TOPIC_SOLDIERTEACHER,LOG_NOTE); b_logentry(TOPIC_SOLDIERTEACHER,"Беннет может обучить меня кузнечному делу."); } else { AI_Output(self,other,"DIA_Bennet_WannaSmith_Pay_06_02"); //Не надо держать меня за идиота. 30 золотых и ни одной монетой меньше. }; Info_ClearChoices(dia_bennet_wannasmith); }; func void dia_bennet_wannasmith_later() { AI_Output(other,self,"DIA_Bennet_WannaSmith_Later_15_00"); //Может быть, позже. Info_ClearChoices(dia_bennet_wannasmith); }; instance DIA_BENNET_TEACHCOMMON(C_INFO) { npc = sld_809_bennet; nr = 6; condition = dia_bennet_teachcommon_condition; information = dia_bennet_teachcommon_info; permanent = TRUE; description = b_buildlearnstring("Научиться кузнечному делу",b_getlearncosttalent(other,NPC_TALENT_SMITH)); }; func int dia_bennet_teachcommon_condition() { if((PLAYER_TALENT_SMITH[WEAPON_COMMON] == FALSE) && (BENNET_TEACHCOMMON == TRUE) && ((KAPITEL != 3) || (MIS_RESCUEBENNET == LOG_SUCCESS))) { return TRUE; }; }; func void dia_bennet_teachcommon_info() { AI_Output(other,self,"DIA_Bennet_TeachCOMMON_15_00"); //Научи меня ковать мечи! if(b_teachplayertalentsmith(self,other,WEAPON_COMMON)) { AI_Output(self,other,"DIA_Bennet_TeachCOMMON_06_01"); //Это довольно просто: берешь кусок сырой стали и держишь его над огнем, пока он не раскалится. AI_Output(self,other,"DIA_Bennet_TeachCOMMON_06_02"); //Затем кладешь его на наковальню и придаешь мечу форму. AI_Output(self,other,"DIA_Bennet_TeachCOMMON_06_03"); //Самое важное - следи, чтобы сталь не стала слишком холодной. У тебя есть всего несколько минут для обработки оружия... AI_Output(self,other,"DIA_Bennet_TeachCOMMON_06_04"); //А остальному ты научишься сам - это всего лишь вопрос практики. }; }; instance DIA_BENNET_WANNASMITHORE(C_INFO) { npc = sld_809_bennet; nr = 7; condition = dia_bennet_wannasmithore_condition; information = dia_bennet_wannasmithore_info; permanent = TRUE; description = "Научи меня ковать магическое оружие!"; }; func int dia_bennet_wannasmithore_condition() { if((BENNET_TEACHSMITH == FALSE) && ((KAPITEL != 3) || (MIS_RESCUEBENNET == LOG_SUCCESS))) { return TRUE; }; }; func void dia_bennet_wannasmithore_info() { AI_Output(other,self,"DIA_Bennet_WannaSmithORE_15_00"); //Научи меня ковать магическое оружие! if(PLAYER_TALENT_SMITH[WEAPON_COMMON] == FALSE) { AI_Output(self,other,"DIA_Bennet_WannaSmithORE_06_01"); //Но ты даже не знаешь основ кузнечного дела. AI_Output(self,other,"DIA_Bennet_WannaSmithORE_06_02"); //Сначала ты должен научиться ковать обычные мечи. А там посмотрим. } else if((other.guild != GIL_SLD) && (other.guild != GIL_DJG)) { AI_Output(self,other,"DIA_Bennet_WannaSmithORE_06_03"); //Пока ты не один из нас, будь я проклят, если научу тебя секретам изготовления магического оружия. AI_Output(self,other,"DIA_Bennet_WannaSmithORE_06_04"); //Только немногие кузнецы владеют этим искусством, и я думаю, даже кузнецы в городе ничего не знают об этом. AI_Output(self,other,"DIA_Bennet_WannaSmithORE_06_05"); //И это хорошо. Иначе все эти пьяницы из городской стражи потрясали бы магическими мечами. if(other.guild == GIL_MIL) { AI_Output(self,other,"DIA_Bennet_WannaSmithORE_06_06"); //Ничего личного. (ухмыляется) Против тебя я ничего не имею. }; } else if(MIS_BENNET_BRINGORE != LOG_SUCCESS) { AI_Output(self,other,"DIA_Bennet_WannaSmithORE_06_07"); //Если бы у меня была магическая руда, я бы, возможно, согласился. AI_Output(other,self,"DIA_Bennet_WannaSmithORE_15_08"); //Ах, да ладно. Я с наемниками, и я знаю кузнечное дело. Что еще тебе нужно? AI_Output(self,other,"DIA_Bennet_WannaSmithORE_06_09"); //Скажи мне, как интересно я должен ковать магическое оружие, не имея магической руды? AI_Output(other,self,"DIA_Bennet_WannaSmithORE_15_10"); //Нууу... AI_Output(self,other,"DIA_Bennet_WannaSmithORE_06_11"); //Вот что скажу. Мне нужно как минимум 5 кусков руды - или ты можешь забыть об этом. if(MIS_BENNET_BRINGORE == FALSE) { MIS_BENNET_BRINGORE = LOG_RUNNING; }; } else { AI_Output(self,other,"DIA_Bennet_WannaSmithORE_06_12"); //Отлично, ты принес мне руду, и ты также знаешь, как куется обычный меч. AI_Output(other,self,"DIA_Bennet_WannaSmithORE_15_13"); //Так давай же, обучай меня! AI_Output(self,other,"DIA_Bennet_WannaSmithORE_06_14"); //Самое главное: не важно, целиком сделан твой меч, - из магической руды, или ты просто покрыл обычный меч ее тонким слоем. Поверхность - только это имеет значение. AI_Output(self,other,"DIA_Bennet_WannaSmithORE_06_15"); //А так как эта чертова руда очень дорогая, просто берешь стальную заготовку и несколько кусков руды. AI_Output(self,other,"DIA_Bennet_WannaSmithORE_06_16"); //Естественно, нельзя просто покрыть готовый меч магической рудой. Оружие нужно создавать с нуля. AI_Output(self,other,"DIA_Bennet_WannaSmithORE_06_17"); //А все остальное зависит от оружия, которое ты хочешь получить. BENNET_TEACHSMITH = TRUE; }; }; instance DIA_BENNET_WHEREORE(C_INFO) { npc = sld_809_bennet; nr = 8; condition = dia_bennet_whereore_condition; information = dia_bennet_whereore_info; permanent = FALSE; description = "Где мне найти магическую руду?"; }; func int dia_bennet_whereore_condition() { if((MIS_BENNET_BRINGORE == LOG_RUNNING) && ((KAPITEL != 3) || (MIS_RESCUEBENNET == LOG_SUCCESS))) { return TRUE; }; }; func void dia_bennet_whereore_info() { AI_Output(other,self,"DIA_Bennet_WhereOre_15_00"); //Где мне найти магическую руду? AI_Output(self,other,"DIA_Bennet_WhereOre_06_01"); //Эх, если бы я только знал это. Я думаю, в горнодобывающей колонии ты наверняка найдешь что-нибудь. AI_Output(self,other,"DIA_Bennet_WhereOre_06_02"); //Но, может быть, тебе повезет и ты найдешь несколько мелких обломков где-нибудь здесь и сможешь слепить из них приличный кусок руды. AI_Output(self,other,"DIA_Bennet_WhereOre_06_03"); //Насколько я знаю, в горах к югу отсюда есть заброшенные шахты. Попробуй попытать счастья там. AI_Output(self,other,"DIA_Bennet_WhereOre_06_04"); //Но будь осторожен: я слышал, там устроили логово бандиты. }; instance DIA_BENNET_BRINGORE(C_INFO) { npc = sld_809_bennet; nr = 9; condition = dia_bennet_bringore_condition; information = dia_bennet_bringore_info; permanent = FALSE; description = "Вот, держи - (5 кусков руды)."; }; func int dia_bennet_bringore_condition() { if((MIS_BENNET_BRINGORE == LOG_RUNNING) && (Npc_HasItems(other,itmi_nugget) >= 5)) { return TRUE; }; }; func void dia_bennet_bringore_info() { AI_Output(other,self,"DIA_Bennet_BringOre_15_00"); //Вот держи. AI_Output(self,other,"DIA_Bennet_BringOre_06_01"); //(смеется) Покажи! b_giveinvitems(other,self,itmi_nugget,5); AI_Output(self,other,"DIA_Bennet_BringOre_06_02"); //Да ты что! Я потрясен! AI_Output(self,other,"DIA_Bennet_BringOre_06_03"); //Оставь себе два куска. Они тебе понадобятся, чтобы сделать твое собственное оружие. b_giveinvitems(self,other,itmi_nugget,2); MIS_BENNET_BRINGORE = LOG_SUCCESS; }; var int bennet_kap2smith; var int bennet_kap3smith; var int bennet_kap4smith; var int bennet_kap5smith; func void b_saybennetlater() { AI_Output(self,other,"DIA_Bennet_GetInnosEye_06_04"); //Этого недостаточно. Заходи попозже. }; instance DIA_BENNET_TEACHSMITH(C_INFO) { npc = sld_809_bennet; nr = 30; condition = dia_bennet_teachsmith_condition; information = dia_bennet_teachsmith_info; permanent = TRUE; description = "Я хочу больше узнать о магическом оружии."; }; func int dia_bennet_teachsmith_condition() { if((BENNET_TEACHSMITH == TRUE) && ((KAPITEL != 3) || (MIS_RESCUEBENNET == LOG_SUCCESS))) { return TRUE; }; }; func void dia_bennet_teachsmith_info() { AI_Output(other,self,"DIA_Bennet_TeachSmith_15_00"); //Я хочу больше узнать о магическом оружии. if(KAPITEL == 1) { b_saybennetlater(); } else if((KAPITEL == 2) && (BENNET_KAP2SMITH == FALSE)) { AI_Output(self,other,"DIA_Bennet_TeachSmith_06_01"); //Я могу научить тебя ковать магические мечи и даже двуручные клинки. BENNET_KAP2SMITH = TRUE; } else if((KAPITEL == 3) && (MIS_READYFORCHAPTER4 == FALSE) && (BENNET_KAP3SMITH == FALSE)) { AI_Output(self,other,"DIA_Bennet_TeachSmith_06_02"); //Я немного потренировался, и теперь я могу научить тебя, как ковать полуторные и тяжелые двуручные магические мечи. BENNET_KAP3SMITH = TRUE; } else if((MIS_READYFORCHAPTER4 == TRUE) && (KAPITEL < 5) && (BENNET_KAP4SMITH == FALSE)) { AI_Output(self,other,"DIA_Bennet_TeachSmith_06_03"); //Пока мне нечему учить тебя. Это лучшее, что я умею ковать сейчас. BENNET_KAP4SMITH = TRUE; } else if((KAPITEL >= 5) && (BENNET_KAP5SMITH == FALSE)) { AI_Output(self,other,"DIA_Bennet_TeachSmith_06_04"); //Послушай. На меня только что снизошло вдохновение. Магическое оружие, покрытое кровью дракона. И я точно знаю, как изготовить его! AI_Output(self,other,"DIA_Bennet_TeachSmith_06_05"); //(ухмыляется) А ты хочешь узнать? BENNET_KAP5SMITH = TRUE; } else { AI_Output(self,other,"DIA_Bennet_TeachSmith_06_06"); //Какое оружие ты хотел бы научиться делать? }; Info_ClearChoices(dia_bennet_teachsmith); Info_AddChoice(dia_bennet_teachsmith,DIALOG_BACK,dia_bennet_teachsmith_back); if((PLAYER_TALENT_SMITH[WEAPON_1H_SPECIAL_01] == FALSE) && (KAPITEL >= 2)) { Info_AddChoice(dia_bennet_teachsmith,b_buildlearnstring(NAME_ITMW_1H_SPECIAL_01,b_getlearncosttalent(other,NPC_TALENT_SMITH)),dia_bennet_teachsmith_1hspecial1); }; if((PLAYER_TALENT_SMITH[WEAPON_2H_SPECIAL_01] == FALSE) && (KAPITEL >= 2)) { Info_AddChoice(dia_bennet_teachsmith,b_buildlearnstring(NAME_ITMW_2H_SPECIAL_01,b_getlearncosttalent(other,NPC_TALENT_SMITH)),dia_bennet_teachsmith_2hspecial1); }; if((PLAYER_TALENT_SMITH[WEAPON_1H_SPECIAL_02] == FALSE) && (KAPITEL >= 3)) { Info_AddChoice(dia_bennet_teachsmith,b_buildlearnstring(NAME_ITMW_1H_SPECIAL_02,b_getlearncosttalent(other,NPC_TALENT_SMITH)),dia_bennet_teachsmith_1hspecial2); }; if((PLAYER_TALENT_SMITH[WEAPON_2H_SPECIAL_02] == FALSE) && (KAPITEL >= 3)) { Info_AddChoice(dia_bennet_teachsmith,b_buildlearnstring(NAME_ITMW_2H_SPECIAL_02,b_getlearncosttalent(other,NPC_TALENT_SMITH)),dia_bennet_teachsmith_2hspecial2); }; if((PLAYER_TALENT_SMITH[WEAPON_1H_SPECIAL_03] == FALSE) && (KAPITEL >= 4)) { Info_AddChoice(dia_bennet_teachsmith,b_buildlearnstring(NAME_ITMW_1H_SPECIAL_03,b_getlearncosttalent(other,NPC_TALENT_SMITH)),dia_bennet_teachsmith_1hspecial3); }; if((PLAYER_TALENT_SMITH[WEAPON_2H_SPECIAL_03] == FALSE) && (KAPITEL >= 4)) { Info_AddChoice(dia_bennet_teachsmith,b_buildlearnstring(NAME_ITMW_2H_SPECIAL_03,b_getlearncosttalent(other,NPC_TALENT_SMITH)),dia_bennet_teachsmith_2hspecial3); }; if((PLAYER_TALENT_SMITH[WEAPON_1H_SPECIAL_04] == FALSE) && (KAPITEL >= 5)) { Info_AddChoice(dia_bennet_teachsmith,b_buildlearnstring(NAME_ITMW_1H_SPECIAL_04,b_getlearncosttalent(other,NPC_TALENT_SMITH)),dia_bennet_teachsmith_1hspecial4); }; if((PLAYER_TALENT_SMITH[WEAPON_2H_SPECIAL_04] == FALSE) && (KAPITEL >= 5)) { Info_AddChoice(dia_bennet_teachsmith,b_buildlearnstring(NAME_ITMW_2H_SPECIAL_04,b_getlearncosttalent(other,NPC_TALENT_SMITH)),dia_bennet_teachsmith_2hspecial4); }; }; func void dia_bennet_teachsmith_back() { Info_ClearChoices(dia_bennet_teachsmith); }; func void dia_bennet_teachsmith_1hspecial1() { b_teachplayertalentsmith(self,other,WEAPON_1H_SPECIAL_01); }; func void dia_bennet_teachsmith_2hspecial1() { b_teachplayertalentsmith(self,other,WEAPON_2H_SPECIAL_01); }; func void dia_bennet_teachsmith_1hspecial2() { b_teachplayertalentsmith(self,other,WEAPON_1H_SPECIAL_02); }; func void dia_bennet_teachsmith_2hspecial2() { b_teachplayertalentsmith(self,other,WEAPON_2H_SPECIAL_02); }; func void dia_bennet_teachsmith_1hspecial3() { b_teachplayertalentsmith(self,other,WEAPON_1H_SPECIAL_03); }; func void dia_bennet_teachsmith_2hspecial3() { b_teachplayertalentsmith(self,other,WEAPON_2H_SPECIAL_03); }; func void dia_bennet_teachsmith_1hspecial4() { b_teachplayertalentsmith(self,other,WEAPON_1H_SPECIAL_04); }; func void dia_bennet_teachsmith_2hspecial4() { b_teachplayertalentsmith(self,other,WEAPON_2H_SPECIAL_04); }; instance DIA_BENNET_KAP3_EXIT(C_INFO) { npc = sld_809_bennet; nr = 999; condition = dia_bennet_kap3_exit_condition; information = dia_bennet_kap3_exit_info; permanent = TRUE; description = DIALOG_ENDE; }; func int dia_bennet_kap3_exit_condition() { if(KAPITEL == 3) { return TRUE; }; }; func void dia_bennet_kap3_exit_info() { AI_StopProcessInfos(self); }; instance DIA_BENNET_WHYPRISON(C_INFO) { npc = sld_809_bennet; nr = 8; condition = dia_bennet_whyprison_condition; information = dia_bennet_whyprison_info; permanent = FALSE; description = "Как ты попал за решетку?"; }; func int dia_bennet_whyprison_condition() { if((KAPITEL == 3) && (MIS_RESCUEBENNET != LOG_SUCCESS)) { return TRUE; }; }; func void dia_bennet_whyprison_info() { AI_Output(other,self,"DIA_Bennet_WhyPrison_15_00"); //Как ты попал за решетку? AI_Output(self,other,"DIA_Bennet_WhyPrison_06_01"); //Эти свиньи схватили меня и бросили сюда. Говорят, что я убил паладина. AI_Output(self,other,"DIA_Bennet_WhyPrison_06_02"); //Но я не делал этого, они хотят оклеветать меня. AI_Output(other,self,"DIA_Bennet_WhyPrison_15_03"); //Зачем бы им это? AI_Output(self,other,"DIA_Bennet_WhyPrison_06_04"); //Откуда мне знать? Ты должен вытащить меня отсюда. AI_Output(self,other,"DIA_Bennet_WhyPrison_06_05"); //Поговори с лордом Хагеном, проломи стену... ну, я не знаю... сделай же что-нибудь! MIS_RESCUEBENNET = LOG_RUNNING; Log_CreateTopic(TOPIC_RESCUEBENNET,LOG_MISSION); Log_SetTopicStatus(TOPIC_RESCUEBENNET,LOG_RUNNING); b_logentry(TOPIC_RESCUEBENNET,"У Беннета серьезные проблемы. Он на все готов, чтобы только вырваться из тюрьмы."); }; instance DIA_BENNET_WHATHAPPENED(C_INFO) { npc = sld_809_bennet; nr = 8; condition = dia_bennet_whathappened_condition; information = dia_bennet_whathappened_info; permanent = FALSE; description = "Что произошло?"; }; func int dia_bennet_whathappened_condition() { if((MIS_RESCUEBENNET == LOG_RUNNING) && Npc_KnowsInfo(other,dia_bennet_whyprison)) { return TRUE; }; }; func void dia_bennet_whathappened_info() { AI_Output(other,self,"DIA_Bennet_WhatHappened_15_00"); //Что произошло? AI_Output(self,other,"DIA_Bennet_WhatHappened_06_01"); //Я пошел в нижнюю часть города с Ходжесом, чтобы купить кое-что для наших парней. AI_Output(self,other,"DIA_Bennet_WhatHappened_06_02"); //Неожиданно мы услышали громкий крик и звук топот убегающих ног. AI_Output(other,self,"DIA_Bennet_WhatHappened_15_03"); //Давай к делу. AI_Output(self,other,"DIA_Bennet_WhatHappened_06_04"); //Мы сразу поняли - что-то случилось, и нас тут же схватят, если застанут там. AI_Output(self,other,"DIA_Bennet_WhatHappened_06_05"); //И мы побежали. А затем, когда до городских ворот оставалось уже совсем немного, я споткнулся и повредил колено. AI_Output(self,other,"DIA_Bennet_WhatHappened_06_06"); //А дальше все просто. Стражники тут же накинулись на меня и бросили за решетку. }; instance DIA_BENNET_VICTIM(C_INFO) { npc = sld_809_bennet; nr = 8; condition = dia_bennet_victim_condition; information = dia_bennet_victim_info; permanent = FALSE; description = "Кто был убит?"; }; func int dia_bennet_victim_condition() { if((MIS_RESCUEBENNET == LOG_RUNNING) && Npc_KnowsInfo(other,dia_bennet_whyprison)) { return TRUE; }; }; func void dia_bennet_victim_info() { AI_Output(other,self,"DIA_Bennet_Victim_15_00"); //Кто был убит? AI_Output(self,other,"DIA_Bennet_Victim_06_01"); //Понятия не имею - один из паладинов, я не знаю, кто. AI_Output(other,self,"DIA_Bennet_Victim_15_02"); //Ты знаешь имя? AI_Output(self,other,"DIA_Bennet_Victim_06_03"); //Какой-то Лотар, по-моему. Ну, я не знаю, я не уверен. AI_Output(self,other,"DIA_Bennet_Victim_06_04"); //Тебе лучше спросить лорда Хагена, ему известны все детали. b_logentry(TOPIC_RESCUEBENNET,"Лотар, один из паладинов, был убит. Лорд Хаген, возможно, сможет рассказать мне подробнее об этом деле, ведь именно он ведет расследование."); }; instance DIA_BENNET_EVIDENCE(C_INFO) { npc = sld_809_bennet; nr = 8; condition = dia_bennet_evidence_condition; information = dia_bennet_evidence_info; permanent = FALSE; description = "У них есть доказательства против тебя?"; }; func int dia_bennet_evidence_condition() { if((MIS_RESCUEBENNET == LOG_RUNNING) && Npc_KnowsInfo(other,dia_bennet_whyprison)) { return TRUE; }; }; func void dia_bennet_evidence_info() { AI_Output(other,self,"DIA_Bennet_Evidence_15_00"); //У них есть доказательства против тебя? AI_Output(self,other,"DIA_Bennet_Evidence_06_01"); //Говорят, есть свидетель, который опознал меня. AI_Output(other,self,"DIA_Bennet_Evidence_15_02"); //Ты знаешь, кто этот свидетель? AI_Output(self,other,"DIA_Bennet_Evidence_06_03"); //Нет. Я знаю только, что он лжет. b_logentry(TOPIC_RESCUEBENNET,"Есть свидетель, утверждающий, что видел, как это сделал Беннет. Я должен найти этого свидетеля, если я хочу выяснить правду."); RESCUEBENNET_KNOWSWITNESS = TRUE; }; instance DIA_BENNET_INVESTIGATION(C_INFO) { npc = sld_809_bennet; nr = 8; condition = dia_bennet_investigation_condition; information = dia_bennet_investigation_info; permanent = FALSE; description = "Кто ведет расследование?"; }; func int dia_bennet_investigation_condition() { if((MIS_RESCUEBENNET == LOG_RUNNING) && Npc_KnowsInfo(other,dia_bennet_evidence)) { return TRUE; }; }; func void dia_bennet_investigation_info() { AI_Output(other,self,"DIA_Bennet_Investigation_15_00"); //Кто ведет расследование? AI_Output(self,other,"DIA_Bennet_Investigation_06_01"); //Сам лорд Хаген. Так как был убит один из паладинов, это дело подпадает под закон о военном положении. AI_Output(other,self,"DIA_Bennet_Investigation_15_02"); //Что это означает? AI_Output(self,other,"DIA_Bennet_Investigation_06_03"); //Это легко предположить. Если меня не вытащить отсюда, то я буду повешен без долгих разговоров. AI_Output(self,other,"DIA_Bennet_Investigation_06_04"); //Ты должен помочь мне, или начнется война. Ли не отставит это просто так. AI_Output(self,other,"DIA_Bennet_Investigation_06_05"); //Ты сам понимаешь, что это значит. }; instance DIA_BENNET_THANKYOU(C_INFO) { npc = sld_809_bennet; nr = 8; condition = dia_bennet_thankyou_condition; information = dia_bennet_thankyou_info; permanent = FALSE; important = TRUE; }; func int dia_bennet_thankyou_condition() { if(MIS_RESCUEBENNET == LOG_SUCCESS) { return TRUE; }; }; func void dia_bennet_thankyou_info() { if(hero.guild == GIL_SLD) { other.guild = GIL_DJG; Npc_SetTrueGuild(other,GIL_DJG); }; AI_Output(self,other,"DIA_Bennet_ThankYou_06_00"); //Ох, а я уж думал, что меня наверняка повесят! AI_Output(other,self,"DIA_Bennet_ThankYou_15_01"); //Что ж, в конце концов, все окончилось хорошо. AI_Output(self,other,"DIA_Bennet_ThankYou_06_02"); //Да уж. Ты бы видел выражение лица солдата, который выпускал меня! AI_Output(self,other,"DIA_Bennet_ThankYou_06_03"); //(смеется) Он был так напуган, что чуть не наложил в штаны. AI_Output(self,other,"DIA_Bennet_ThankYou_06_04"); //Да, чуть не забыл. У меня есть кое-что для тебя. AI_Output(other,self,"DIA_Bennet_ThankYou_15_05"); //Что ты имеешь в виду? AI_Output(self,other,"DIA_Bennet_ThankYou_06_06"); //(ухмыляется) Презент. }; instance DIA_BENNET_PRESENT(C_INFO) { npc = sld_809_bennet; nr = 8; condition = dia_bennet_present_condition; information = dia_bennet_present_info; permanent = FALSE; description = "Какой презент?"; }; func int dia_bennet_present_condition() { if(Npc_KnowsInfo(other,dia_bennet_thankyou)) { return TRUE; }; }; func void dia_bennet_present_info() { AI_Output(other,self,"DIA_Bennet_Present_15_00"); //Какой презент? AI_Output(self,other,"DIA_Bennet_Present_06_01"); //Мы все слышали о драконах, которые вроде бы появились в Долине. AI_Output(other,self,"DIA_Bennet_Present_15_02"); //Они действительно там! AI_Output(self,other,"DIA_Bennet_Present_06_03"); //Хорошо, я верю тебе. if(hero.guild == GIL_DJG) { AI_Output(self,other,"DIA_Bennet_Present_06_04"); //Как бы там ни было, некоторые из парней решили отправиться в Долину. AI_Output(self,other,"DIA_Bennet_Present_06_05"); //(ухмыляется) Они собираются навести там порядок. AI_Output(other,self,"DIA_Bennet_Present_15_06"); //А какое это имеет отношение ко мне? AI_Output(self,other,"DIA_Bennet_Present_06_07"); //(гордо) Я разработал новый тип доспехов. Доспехи охотника на драконов! AI_Output(self,other,"DIA_Bennet_Present_06_08"); //Они прочнее и легче, чем традиционные доспехи. AI_Output(self,other,"DIA_Bennet_Present_06_09"); //Так как ты спас меня, я хочу, чтобы ты получил первый экземпляр. Это подарок! CreateInvItems(self,itar_djg_l,1); b_giveinvitems(self,other,itar_djg_l,1); AI_Output(self,other,"DIA_Bennet_Present_06_10"); //Я подумал, что, возможно, тебе тоже захочется позабавиться там. Тебе понадобится хорошее снаряжение, когда ты отправишься в эту долину. AI_Output(self,other,"DIA_Bennet_Present_06_11"); //Также, мне интересны драконьи чешуйки. Настоящие драконьи чешуйки. Я хорошо заплачу тебе за них. AI_Output(other,self,"DIA_Bennet_Present_15_12"); //Сколько я получу за чешуйку? b_say_gold(self,other,VALUE_DRAGONSCALE); } else { AI_Output(self,other,"DIA_Bennet_Present_06_13"); //Ладно, я думаю, ты наверняка захочешь поучаствовать в готовящейся охоте на драконов. AI_Output(other,self,"DIA_Bennet_Present_15_14"); //И? AI_Output(self,other,"DIA_Bennet_Present_06_15"); //Вот, возьми этот амулет. Тебе он нужнее, чем мне. CreateInvItems(self,itam_hp_01,1); b_giveinvitems(self,other,itam_hp_01,1); }; }; var int bennet_dragonscale_counter; var int show_djg_armor_m; instance DIA_BENNET_DRAGONSCALE(C_INFO) { npc = sld_809_bennet; nr = 8; condition = dia_bennet_dragonscale_condition; information = dia_bennet_dragonscale_info; permanent = TRUE; description = "Я принес тебе несколько драконьих чешуек."; }; func int dia_bennet_dragonscale_condition() { if((Npc_HasItems(other,itat_dragonscale) > 0) && (hero.guild == GIL_DJG)) { return TRUE; }; }; func void dia_bennet_dragonscale_info() { AI_Output(other,self,"DIA_Bennet_DragonScale_15_00"); //Я принес тебе несколько драконьих чешуек. AI_Output(self,other,"DIA_Bennet_DragonScale_06_01"); //Настоящая чешуя дракона! AI_Output(self,other,"DIA_Bennet_DragonScale_06_02"); //Вот твое золото! BENNET_DRAGONSCALE_COUNTER = BENNET_DRAGONSCALE_COUNTER + Npc_HasItems(other,itat_dragonscale); b_giveinvitems(self,other,itmi_gold,Npc_HasItems(other,itat_dragonscale) * VALUE_DRAGONSCALE); b_giveinvitems(other,self,itat_dragonscale,Npc_HasItems(other,itat_dragonscale)); if((BENNET_DRAGONSCALE_COUNTER >= 20) && (SHOW_DJG_ARMOR_M == FALSE)) { AI_Output(self,other,"DIA_Bennet_DragonScale_06_03"); //Хорошо, этого должно быть достаточно. Я могу продать тебе новые, улучшенные доспехи, если, конечно, тебе это интересно. SHOW_DJG_ARMOR_M = TRUE; }; }; var int bennet_dia_bennet_djg_armor_m_permanent; instance DIA_BENNET_DJG_ARMOR_M(C_INFO) { npc = sld_809_bennet; nr = 8; condition = dia_bennet_djg_armor_m_condition; information = dia_bennet_djg_armor_m_info; permanent = TRUE; description = "Средние доспехи охотника на драконов: Защита: оружие 80, стрелы 80. (12000 золота)"; }; func int dia_bennet_djg_armor_m_condition() { if((BENNET_DIA_BENNET_DJG_ARMOR_M_PERMANENT == FALSE) && (hero.guild == GIL_DJG) && (SHOW_DJG_ARMOR_M == TRUE)) { return TRUE; }; }; func void dia_bennet_djg_armor_m_info() { AI_Output(other,self,"DIA_Bennet_DJG_ARMOR_M_15_00"); //Я хочу купить доспехи. if(Npc_HasItems(other,itmi_gold) >= 12000) { AI_Output(self,other,"DIA_Bennet_DJG_ARMOR_M_06_01"); //Очень хорошо. Уверен, они тебя не разочаруют. AI_Output(other,self,"DIA_Bennet_DJG_ARMOR_M_15_02"); //Да уж, за такую-то цену... AI_Output(self,other,"DIA_Bennet_DJG_ARMOR_M_06_03"); //Ты проймешь, что они стоят этих денег. b_giveinvitems(other,self,itmi_gold,12000); CreateInvItems(self,itar_djg_m,1); b_giveinvitems(self,other,itar_djg_m,1); BENNET_DIA_BENNET_DJG_ARMOR_M_PERMANENT = TRUE; } else { AI_Output(self,other,"DIA_Bennet_DJG_ARMOR_M_06_04"); //У тебя недостаточно золота. }; }; instance DIA_BENNET_BETTERARMOR(C_INFO) { npc = sld_809_bennet; nr = 8; condition = dia_bennet_betterarmor_condition; information = dia_bennet_betterarmor_info; permanent = FALSE; description = "Я знаю, как можно еще улучшить доспехи."; }; func int dia_bennet_betterarmor_condition() { if((PLAYERGETSFINALDJGARMOR == TRUE) && (hero.guild == GIL_DJG)) { return TRUE; }; }; func void dia_bennet_betterarmor_info() { AI_Output(other,self,"DIA_Bennet_BetterArmor_15_00"); //Я знаю, как можно еще улучшить доспехи. AI_Output(self,other,"DIA_Bennet_BetterArmor_06_01"); //(ухмыляется про себя) Ну расскажи мне. AI_Output(other,self,"DIA_Bennet_BetterArmor_15_02"); //Можно покрыть драконьи чешуйки магической рудой. AI_Output(self,other,"DIA_Bennet_BetterArmor_06_03"); //(смеется) Эта мысль приходила и ко мне. Да, ты прав. AI_Output(self,other,"DIA_Bennet_BetterArmor_06_04"); //Мои новые доспехи превосходят все, что ты когда-либо видел. Они очень легкие и очень прочные. AI_Output(self,other,"DIA_Bennet_BetterArmor_06_05"); //Они СОВЕРШЕННЫ. AI_Output(self,other,"DIA_Bennet_BetterArmor_06_06"); //Ты можешь купить их, если хочешь. Я не предложил бы их абы кому, а цена только-только покрывает стоимость производства. }; var int bennet_dia_bennet_djg_armor_h_permanent; instance DIA_BENNET_DJG_ARMOR_H(C_INFO) { npc = sld_809_bennet; nr = 8; condition = dia_bennet_djg_armor_h_condition; information = dia_bennet_djg_armor_h_info; permanent = TRUE; description = "Тяжелые доспехи охотника на драконов: Защита: оружие 90, стрелы 90. (20000 золота)"; }; func int dia_bennet_djg_armor_h_condition() { if((BENNET_DIA_BENNET_DJG_ARMOR_H_PERMANENT == FALSE) && (hero.guild == GIL_DJG) && Npc_KnowsInfo(other,dia_bennet_betterarmor)) { return TRUE; }; }; func void dia_bennet_djg_armor_h_info() { AI_Output(other,self,"DIA_Bennet_DJG_ARMOR_H_15_00"); //Дай мне доспехи. if(Npc_HasItems(other,itmi_gold) >= 20000) { AI_Output(self,other,"DIA_Bennet_DJG_ARMOR_H_06_01"); //Это лучшие доспехи из того, что я когда-либо делал. AI_Output(self,other,"DIA_Bennet_DJG_ARMOR_H_06_02"); //Настоящее произведение искусства. b_giveinvitems(other,self,itmi_gold,20000); CreateInvItems(self,itar_djg_h,1); b_giveinvitems(self,other,itar_djg_h,1); BENNET_DIA_BENNET_DJG_ARMOR_H_PERMANENT = TRUE; } else { AI_Output(self,other,"DIA_Bennet_DJG_ARMOR_H_06_03"); //У тебя недостаточно золота. }; }; instance DIA_BENNET_REPAIRNECKLACE(C_INFO) { npc = sld_809_bennet; nr = 8; condition = dia_bennet_repairnecklace_condition; information = dia_bennet_repairnecklace_info; permanent = FALSE; description = "Ты можешь ремонтировать ювелирные изделия?"; }; func int dia_bennet_repairnecklace_condition() { if((MIS_BENNET_INNOSEYEREPAIREDSETTING != LOG_SUCCESS) && (Npc_HasItems(other,itmi_innoseye_broken_mis) || (MIS_SCKNOWSINNOSEYEISBROKEN == TRUE))) { return TRUE; }; }; func void dia_bennet_repairnecklace_info() { AI_Output(other,self,"DIA_Bennet_RepairNecklace_15_00"); //Ты можешь ремонтировать ювелирные изделия? AI_Output(self,other,"DIA_Bennet_RepairNecklace_06_01"); //Может быть. Ты должен сначала показать мне их. if(MIS_RESCUEBENNET != LOG_SUCCESS) { AI_Output(self,other,"DIA_Bennet_RepairNecklace_06_02"); //Также мне сначала нужно выбраться отсюда. AI_Output(self,other,"DIA_Bennet_RepairNecklace_06_03"); //Без этого я не смогу ничего сделать, это очевидно. }; MIS_SCKNOWSINNOSEYEISBROKEN = TRUE; }; instance DIA_BENNET_SHOWINNOSEYE(C_INFO) { npc = sld_809_bennet; nr = 8; condition = dia_bennet_showinnoseye_condition; information = dia_bennet_showinnoseye_info; permanent = FALSE; description = "Ты можешь взглянуть на этот амулет?"; }; func int dia_bennet_showinnoseye_condition() { if(Npc_HasItems(other,itmi_innoseye_broken_mis) && (MIS_BENNET_INNOSEYEREPAIREDSETTING != LOG_SUCCESS)) { return TRUE; }; }; func void dia_bennet_showinnoseye_info() { AI_Output(other,self,"DIA_Bennet_ShowInnosEye_15_00"); //Ты можешь взглянуть на этот амулет? AI_Output(self,other,"DIA_Bennet_ShowInnosEye_06_01"); //Конечно, давай посмотрим. AI_Output(self,other,"DIA_Bennet_ShowInnosEye_06_02"); //Хммм, превосходная работа. Оправа сломана. Но, думаю, впрочем, я смогу починить ее. AI_Output(other,self,"DIA_Bennet_ShowInnosEye_15_03"); //Сколько это займет времени? if(MIS_RESCUEBENNET != LOG_SUCCESS) { AI_Output(self,other,"DIA_Bennet_ShowInnosEye_06_04"); //Ну, я застрял здесь пока. Или ты где-то здесь видишь кузницу? AI_Output(self,other,"DIA_Bennet_ShowInnosEye_06_05"); //Если бы я был в своей кузнице, я мог бы сделать это за один день. Но, конечно же, сначала мне нужно выбраться отсюда. } else { AI_Output(self,other,"DIA_Bennet_ShowInnosEye_06_06"); //Если ты оставишь его мне, к завтрашнему утру он будет как новенький. AI_Output(self,other,"DIA_Bennet_ShowInnosEye_06_07"); //И я даже не возьму с тебя денег за эту работу. Ведь это ты вытащил меня из тюрьмы. }; b_logentry(TOPIC_INNOSEYE,"Беннет - кузнец, который нужен мне, чтобы починить амулет."); MIS_SCKNOWSINNOSEYEISBROKEN = TRUE; }; instance DIA_BENNET_GIVEINNOSEYE(C_INFO) { npc = sld_809_bennet; nr = 8; condition = dia_bennet_giveinnoseye_condition; information = dia_bennet_giveinnoseye_info; permanent = FALSE; description = "Вот амулет, пожалуйста, почини его."; }; func int dia_bennet_giveinnoseye_condition() { if((Npc_HasItems(other,itmi_innoseye_broken_mis) >= 1) && (MIS_SCKNOWSINNOSEYEISBROKEN == TRUE) && (MIS_RESCUEBENNET == LOG_SUCCESS) && (MIS_BENNET_INNOSEYEREPAIREDSETTING != LOG_SUCCESS)) { return TRUE; }; }; func void dia_bennet_giveinnoseye_info() { AI_Output(other,self,"DIA_Bennet_GiveInnosEye_15_00"); //Вот амулет, пожалуйста, почини его. AI_Output(self,other,"DIA_Bennet_GiveInnosEye_06_01"); //Хорошо. Я закончу работу к завтрашнему утру. AI_Output(self,other,"DIA_Bennet_GiveInnosEye_06_02"); //Заходи завтра, и заберешь его. Npc_RemoveInvItems(other,itmi_innoseye_broken_mis,1); AI_PrintScreen(PRINT_INNOSEYEGIVEN,-1,YPOS_ITEMGIVEN,FONT_SCREENSMALL,2); BENNET_REPAIRDAY = Wld_GetDay(); }; instance DIA_BENNET_GETINNOSEYE(C_INFO) { npc = sld_809_bennet; nr = 8; condition = dia_bennet_getinnoseye_condition; information = dia_bennet_getinnoseye_info; permanent = TRUE; description = "Амулет готов?"; }; func int dia_bennet_getinnoseye_condition() { if(Npc_KnowsInfo(other,dia_bennet_giveinnoseye) && (MIS_BENNET_INNOSEYEREPAIREDSETTING != LOG_SUCCESS)) { return TRUE; }; }; func void dia_bennet_getinnoseye_info() { AI_Output(other,self,"DIA_Bennet_GetInnosEye_15_00"); //Амулет готов? if(BENNET_REPAIRDAY < Wld_GetDay()) { AI_Output(self,other,"DIA_Bennet_GetInnosEye_06_01"); //Да, держи. TEXT_INNOSEYE_SETTING = TEXT_INNOSEYE_SETTING_REPAIRED; CreateInvItems(other,itmi_innoseye_broken_mis,1); AI_PrintScreen(PRINT_INNOSEYEGET,-1,YPOS_ITEMGIVEN,FONT_SCREENSMALL,2); AI_Output(self,other,"DIA_Bennet_GetInnosEye_06_02"); //Мне пришлось сделать новую оправу для камня. AI_Output(self,other,"DIA_Bennet_GetInnosEye_06_03"); //Я работал всю ночь, и теперь он как новенький. b_logentry(TOPIC_INNOSEYE,"Амулет опять как новенький. Беннет проделал отличную работу."); MIS_BENNET_INNOSEYEREPAIREDSETTING = LOG_SUCCESS; b_giveplayerxp(XP_INNOSEYEISREPAIRED); } else { b_saybennetlater(); AI_Output(self,other,"DIA_Bennet_GetInnosEye_06_05"); //Если ты будешь продолжать мешать мне, это только задержит работу. AI_StopProcessInfos(self); }; }; instance DIA_BENNET_KAP4_EXIT(C_INFO) { npc = sld_809_bennet; nr = 999; condition = dia_bennet_kap4_exit_condition; information = dia_bennet_kap4_exit_info; permanent = TRUE; description = DIALOG_ENDE; }; func int dia_bennet_kap4_exit_condition() { if(KAPITEL == 4) { return TRUE; }; }; func void dia_bennet_kap4_exit_info() { AI_StopProcessInfos(self); }; instance DIA_BENNET_DRACHENEIER(C_INFO) { npc = sld_809_bennet; nr = 5; condition = dia_bennet_dracheneier_condition; information = dia_bennet_dracheneier_info; permanent = TRUE; description = "Ты можешь что-нибудь сделать с драконьими яйцами?"; }; func int dia_bennet_dracheneier_condition() { if((KAPITEL >= 4) && (BENNETSDRAGONEGGOFFER == 0) && (Npc_HasItems(other,itat_dragonegg_mis) >= 1) && (hero.guild == GIL_DJG)) { return TRUE; }; }; var int bennetsdragoneggoffer; var int dracheneier_angebotenxp_onetime; func void dia_bennet_dracheneier_info() { AI_Output(other,self,"DIA_Bennet_DRACHENEIER_15_00"); //Ты можешь что-нибудь сделать с драконьими яйцами? if(DRACHENEIER_ANGEBOTENXP_ONETIME == FALSE) { AI_Output(self,other,"DIA_Bennet_DRACHENEIER_06_01"); //Драконьи яйца? Где, черт возьми, тебе удалось добыть их? AI_Output(other,self,"DIA_Bennet_DRACHENEIER_15_02"); //Я забрал их у людей-ящеров. AI_Output(self,other,"DIA_Bennet_DRACHENEIER_06_03"); //Давай посмотрим. }; Npc_RemoveInvItems(other,itat_dragonegg_mis,1); AI_PrintScreen("Яйцо отдано",-1,YPOS_ITEMGIVEN,FONT_SCREENSMALL,2); if(DRACHENEIER_ANGEBOTENXP_ONETIME == FALSE) { AI_Output(self,other,"DIA_Bennet_DRACHENEIER_06_04"); //Ммм. Очень твердый материал. Идеально подходит для доспехов. Если только удастся открыть их. AI_Output(other,self,"DIA_Bennet_DRACHENEIER_15_05"); //Ну и как? Они нужны тебе? AI_Output(self,other,"DIA_Bennet_DRACHENEIER_06_06"); //Конечно! Давай сюда. } else { AI_Output(self,other,"DIA_Bennet_DRACHENEIER_06_07"); //Ну и сколько еще ты собираешься вертеть их у меня перед носом? Ты продашь их или нет? }; AI_Output(self,other,"DIA_Bennet_DRACHENEIER_06_08"); //Я заплачу тебе, ммм, скажем, 300 золотых за каждое яйцо, что ты принесешь мне. Info_ClearChoices(dia_bennet_dracheneier); Info_AddChoice(dia_bennet_dracheneier,"Тогда можешь оставить золото себе. Я пока попридержу эти яйца.",dia_bennet_dracheneier_nein); Info_AddChoice(dia_bennet_dracheneier,"Это яйца дракона, а не какие-нибудь куриные.",dia_bennet_dracheneier_mehr); Info_AddChoice(dia_bennet_dracheneier,"Договорились.",dia_bennet_dracheneier_ok); if(DRACHENEIER_ANGEBOTENXP_ONETIME == FALSE) { b_logentry(TOPIC_DRACHENEIER,"Беннет готов дать за драконьи яйца, которые найду, хорошую цену."); b_giveplayerxp(XP_DJG_BRINGDRAGONEGG); DRACHENEIER_ANGEBOTENXP_ONETIME = TRUE; }; }; func void dia_bennet_dracheneier_ok() { AI_Output(other,self,"DIA_Bennet_DRACHENEIER_ok_15_00"); //Договорились. AI_Output(self,other,"DIA_Bennet_DRACHENEIER_ok_06_01"); //Отлично. AI_Output(self,other,"DIA_Bennet_DRACHENEIER_ok_06_02"); //Если найдешь еще, неси их сюда. if(BENNETSDRAGONEGGOFFER != 350) { BENNETSDRAGONEGGOFFER = 300; }; CreateInvItems(self,itmi_gold,BENNETSDRAGONEGGOFFER); b_giveinvitems(self,other,itmi_gold,BENNETSDRAGONEGGOFFER); AI_Output(self,other,"DIA_Bennet_DRACHENEIER_ok_06_03"); //Эээ. Ты сказал, что забрал их у людей-ящеров? AI_Output(other,self,"DIA_Bennet_DRACHENEIER_ok_15_04"); //Точно. AI_Output(self,other,"DIA_Bennet_DRACHENEIER_ok_06_05"); //Насколько я знаю, люди-ящеры обычно обитают в пещерах. AI_Output(self,other,"DIA_Bennet_DRACHENEIER_ok_06_06"); //Я не удивлюсь, если тебе удастся найти еще яйца в пещерах неподалеку. b_logentry(TOPIC_DRACHENEIER,"Беннет полагает, что мне стоит поискать яйца в пещерах Хориниса. Во многих из них, по слухам, видели человекоящеров."); if(!Npc_HasItems(other,itwr_map_caves_mis)) { if(!Npc_IsDead(Brahim)) { AI_Output(self,other,"DIA_Bennet_DRACHENEIER_ok_06_08"); //Но сначала ты должен взять карту пещер у картографа в городе. Будет жаль, если ты найдешь не все яйца. b_logentry(TOPIC_DRACHENEIER,"Я должен купить карту пещер у картографа в городе, чтобы быть уверенным, что я не пропущу часть яиц."); } else { AI_Output(self,other,"DIA_Bennet_DRACHENEIER_ok_06_07"); //Вот. Возьми эту карту. Она поможет тебе найти пещеры. CreateInvItems(self,itwr_map_caves_mis,1); b_giveinvitems(self,other,itwr_map_caves_mis,1); b_logentry(TOPIC_DRACHENEIER,"Он дал мне карту пещер, возможно, она поможет мне."); }; }; Info_ClearChoices(dia_bennet_dracheneier); }; func void dia_bennet_dracheneier_mehr() { AI_Output(other,self,"DIA_Bennet_DRACHENEIER_mehr_15_00"); //Это яйца дракона, а не какие-нибудь куриные. AI_Output(self,other,"DIA_Bennet_DRACHENEIER_mehr_06_01"); //(сердито) Хорошо. 350 и точка. Я не могу дать тебе больше - иначе это дело не окупится. BENNETSDRAGONEGGOFFER = 350; }; func void dia_bennet_dracheneier_nein() { AI_Output(other,self,"DIA_Bennet_DRACHENEIER_nein_15_00"); //Тогда можешь оставить золото себе. Я пока попридержу эти яйца. AI_Output(self,other,"DIA_Bennet_DRACHENEIER_nein_06_01"); //Дай мне знать, если передумаешь. CreateInvItems(other,itat_dragonegg_mis,1); AI_PrintScreen("Яйцо получено",-1,YPOS_ITEMTAKEN,FONT_SCREENSMALL,2); BENNETSDRAGONEGGOFFER = 0; Info_ClearChoices(dia_bennet_dracheneier); }; instance DIA_BENNET_EIERBRINGEN(C_INFO) { npc = sld_809_bennet; nr = 5; condition = dia_bennet_eierbringen_condition; information = dia_bennet_eierbringen_info; permanent = TRUE; description = "Нужны еще драконьи яйца?"; }; func int dia_bennet_eierbringen_condition() { if((BENNETSDRAGONEGGOFFER > 0) && (KAPITEL >= 4) && (Npc_HasItems(other,itat_dragonegg_mis) >= 1) && (hero.guild == GIL_DJG)) { return TRUE; }; }; var int dragoneggcounter; func void dia_bennet_eierbringen_info() { var int dragoneggcount; var int xp_djg_bringdragoneggs; var int dragonegggeld; var string concattext; AI_Output(other,self,"DIA_Bennet_EierBringen_15_00"); //Нужны еще драконьи яйца? AI_Output(self,other,"DIA_Bennet_EierBringen_06_01"); //Конечно! dragoneggcount = Npc_HasItems(other,itat_dragonegg_mis); if(dragoneggcount == 1) { AI_Output(other,self,"DIA_Bennet_EierBringen_15_02"); //Вот. Я принес еще одно. b_giveplayerxp(XP_DJG_BRINGDRAGONEGG); Npc_RemoveInvItems(other,itat_dragonegg_mis,1); AI_PrintScreen("Яйцо отдано",-1,YPOS_ITEMGIVEN,FONT_SCREENSMALL,2); DRAGONEGGCOUNTER = DRAGONEGGCOUNTER + 1; } else { AI_Output(other,self,"DIA_Bennet_EierBringen_15_03"); //Я принес еще несколько. Npc_RemoveInvItems(other,itat_dragonegg_mis,dragoneggcount); concattext = ConcatStrings(IntToString(dragoneggcount),PRINT_ITEMSGEGEBEN); AI_PrintScreen(concattext,-1,YPOS_ITEMGIVEN,FONT_SCREENSMALL,2); xp_djg_bringdragoneggs = dragoneggcount * XP_DJG_BRINGDRAGONEGG; DRAGONEGGCOUNTER = DRAGONEGGCOUNTER + dragoneggcount; b_giveplayerxp(xp_djg_bringdragoneggs); }; if(DRAGONEGGCOUNTER <= 7) { AI_Output(self,other,"DIA_Bennet_EierBringen_06_04"); //Отлично. Давай сюда. Ты везде посмотрел, а? Наверняка где-то должны быть еще. } else if(DRAGONEGGCOUNTER <= 11) { AI_Output(self,other,"DIA_Bennet_EierBringen_06_05"); //Где ты раскопал их? Вряд ли где-нибудь еще остались эти яйца. } else { AI_Output(self,other,"DIA_Bennet_EierBringen_06_06"); //Я не думаю, что ты найдешь еще яйца. К тому же, мне и этих достаточно. Я даже не знаю, что я буду делать со всеми ними. TOPIC_END_DRACHENEIER = TRUE; }; AI_Output(self,other,"DIA_Bennet_EierBringen_06_07"); //Ох, хорошо. Вот твои деньги. dragonegggeld = dragoneggcount * BENNETSDRAGONEGGOFFER; CreateInvItems(self,itmi_gold,dragonegggeld); b_giveinvitems(self,other,itmi_gold,dragonegggeld); }; instance DIA_BENNET_KAP5_EXIT(C_INFO) { npc = sld_809_bennet; nr = 999; condition = dia_bennet_kap5_exit_condition; information = dia_bennet_kap5_exit_info; permanent = TRUE; description = DIALOG_ENDE; }; func int dia_bennet_kap5_exit_condition() { if(KAPITEL == 5) { return TRUE; }; }; func void dia_bennet_kap5_exit_info() { AI_StopProcessInfos(self); }; instance DIA_BENNET_KNOWWHEREENEMY(C_INFO) { npc = sld_809_bennet; nr = 55; condition = dia_bennet_knowwhereenemy_condition; information = dia_bennet_knowwhereenemy_info; permanent = TRUE; description = "Мне нужно плыть на другой остров. Мне бы пригодился кузнец."; }; func int dia_bennet_knowwhereenemy_condition() { if((MIS_SCKNOWSWAYTOIRDORATH == TRUE) && (BENNET_ISONBOARD == FALSE)) { return TRUE; }; }; func void dia_bennet_knowwhereenemy_info() { AI_Output(other,self,"DIA_Bennet_KnowWhereEnemy_15_00"); //Мне нужно плыть на другой остров. Мне бы пригодился кузнец. AI_Output(self,other,"DIA_Bennet_KnowWhereEnemy_06_01"); //И ты подумал обо мне? AI_Output(other,self,"DIA_Bennet_KnowWhereEnemy_15_02"); //Да. Что скажешь? По крайней мере, ты сможешь выбраться отсюда. AI_Output(self,other,"DIA_Bennet_KnowWhereEnemy_06_03"); //Это лучше, чем работать на ферме Онара. Парень, даже ад ЛУЧШЕ, чем здесь. Ты можешь рассчитывать на меня. Log_CreateTopic(TOPIC_CREW,LOG_MISSION); Log_SetTopicStatus(TOPIC_CREW,LOG_RUNNING); b_logentry(TOPIC_CREW,"Беннет готов отправляться немедленно. Кузнец он непревзойденный. Я уверен, что смогу многому научиться у него."); if(CREWMEMBER_COUNT >= MAX_CREW) { AI_Output(other,self,"DIA_Bennet_KnowWhereEnemy_15_04"); //Моя команда сейчас полностью укомплектована. AI_Output(self,other,"DIA_Bennet_KnowWhereEnemy_06_05"); //Тогда уволь кого-нибудь из нее. } else { Info_ClearChoices(dia_bennet_knowwhereenemy); Info_AddChoice(dia_bennet_knowwhereenemy,"Я дам тебе знать, когда ты мне понадобишься.",dia_bennet_knowwhereenemy_no); Info_AddChoice(dia_bennet_knowwhereenemy,"Будь моим кузнецом. Увидимся в гавани. ",dia_bennet_knowwhereenemy_yes); }; }; func void dia_bennet_knowwhereenemy_yes() { AI_Output(other,self,"DIA_Bennet_KnowWhereEnemy_Yes_15_00"); //Будь моим кузнецом. Увидимся в гавани. AI_Output(self,other,"DIA_Bennet_KnowWhereEnemy_Yes_06_01"); //Хорошо. Увидимся позже. b_giveplayerxp(XP_CREWMEMBER_SUCCESS); self.flags = NPC_FLAG_IMMORTAL; BENNET_ISONBOARD = LOG_SUCCESS; CREWMEMBER_COUNT = CREWMEMBER_COUNT + 1; if(MIS_READYFORCHAPTER6 == TRUE) { Npc_ExchangeRoutine(self,"SHIP"); } else { Npc_ExchangeRoutine(self,"WAITFORSHIP"); }; Info_ClearChoices(dia_bennet_knowwhereenemy); }; func void dia_bennet_knowwhereenemy_no() { AI_Output(other,self,"DIA_Bennet_KnowWhereEnemy_No_15_00"); //Я дам тебе знать, когда ты мне понадобишься. AI_Output(self,other,"DIA_Bennet_KnowWhereEnemy_No_06_01"); //Отлично. Я буду здесь. BENNET_ISONBOARD = LOG_OBSOLETE; Info_ClearChoices(dia_bennet_knowwhereenemy); }; instance DIA_BENNET_LEAVEMYSHIP(C_INFO) { npc = sld_809_bennet; nr = 55; condition = dia_bennet_leavemyship_condition; information = dia_bennet_leavemyship_info; permanent = TRUE; description = "Я хочу найти себе другого кузнеца."; }; func int dia_bennet_leavemyship_condition() { if((BENNET_ISONBOARD == LOG_SUCCESS) && (MIS_READYFORCHAPTER6 == FALSE)) { return TRUE; }; }; func void dia_bennet_leavemyship_info() { AI_Output(other,self,"DIA_Bennet_LeaveMyShip_15_00"); //Я хочу найти себе другого кузнеца. AI_Output(self,other,"DIA_Bennet_LeaveMyShip_06_01"); //Сейчас ты думаешь одно, через минуту - другое. Ты не мог бы определиться, а? Когда будешь твердо уверен в том, чего ты хочешь, дай мне знать. BENNET_ISONBOARD = LOG_OBSOLETE; CREWMEMBER_COUNT = CREWMEMBER_COUNT - 1; Npc_ExchangeRoutine(self,"Start"); }; instance DIA_BENNET_STILLNEEDYOU(C_INFO) { npc = sld_809_bennet; nr = 55; condition = dia_bennet_stillneedyou_condition; information = dia_bennet_stillneedyou_info; permanent = TRUE; description = "Возвращайся, я не могу найти другого кузнеца."; }; func int dia_bennet_stillneedyou_condition() { if(((BENNET_ISONBOARD == LOG_OBSOLETE) || (BENNET_ISONBOARD == LOG_FAILED)) && (CREWMEMBER_COUNT < MAX_CREW)) { return TRUE; }; }; func void dia_bennet_stillneedyou_info() { AI_Output(other,self,"DIA_Bennet_StillNeedYou_15_00"); //Возвращайся, я не могу найти другого кузнеца. AI_Output(self,other,"DIA_Bennet_StillNeedYou_06_01"); //(сердито) Хорошо! Всякий может издеваться над простым кузнецом! Увидимся в гавани. self.flags = NPC_FLAG_IMMORTAL; BENNET_ISONBOARD = LOG_SUCCESS; CREWMEMBER_COUNT = CREWMEMBER_COUNT + 1; AI_StopProcessInfos(self); if(MIS_READYFORCHAPTER6 == TRUE) { Npc_ExchangeRoutine(self,"SHIP"); } else { Npc_ExchangeRoutine(self,"WAITFORSHIP"); }; }; instance DIA_BENNET_PICKPOCKET(C_INFO) { npc = sld_809_bennet; nr = 900; condition = dia_bennet_pickpocket_condition; information = dia_bennet_pickpocket_info; permanent = TRUE; description = PICKPOCKET_40; }; func int dia_bennet_pickpocket_condition() { return c_beklauen(35,45); }; func void dia_bennet_pickpocket_info() { Info_ClearChoices(dia_bennet_pickpocket); Info_AddChoice(dia_bennet_pickpocket,DIALOG_BACK,dia_bennet_pickpocket_back); Info_AddChoice(dia_bennet_pickpocket,DIALOG_PICKPOCKET,dia_bennet_pickpocket_doit); }; func void dia_bennet_pickpocket_doit() { b_beklauen(); Info_ClearChoices(dia_bennet_pickpocket); }; func void dia_bennet_pickpocket_back() { Info_ClearChoices(dia_bennet_pickpocket); };
D
instance Mod_13048_SP_Seelenpeiniger_OM (Npc_Default) { //-------- primary data -------- name = "Seelenpeiniger"; npctype = npctype_main; guild = GIL_DMT; level = 25; voice = 5; id = 13048; flags = NPC_FLAG_GHOST; //-------- abilities -------- attribute[ATR_STRENGTH] = 100; attribute[ATR_HITPOINTS_MAX]= 600; attribute[ATR_HITPOINTS] = 600; protection[PROT_EDGE] = -1; protection[PROT_BLUNT] = -1; protection[PROT_POINT] = -1; protection[PROT_MAGIC] = -1; protection[PROT_FIRE] = -1; //-------- visuals -------- // animations Mdl_SetVisual (self,"HUMANS.MDS"); // body mesh ,bdytex,skin,head mesh ,headtex,teethtex,ruestung Mdl_SetVisualBody (self,"hum_body_Naked0", 0, 3,"Hum_Head_FatBald", 2, 1, ITAR_TARNUNG); Mdl_SetModelFatness(self,0); effect = "SPELLFX_DARKARMOR"; fight_tactic = FAI_HUMAN_STRONG; //-------- inventory -------- B_SetFightSkillS (self, 20); //-------------Daily Routine------------- daily_routine = Rtn_start_13048; }; FUNC VOID Rtn_start_13048 () { TA_Stand_WP (06,00,20,00,"OM_083"); TA_Stand_WP (20,00,06,00,"OM_083"); };
D
// BulletD - a D binding for the Bullet Physics engine // written in the D programming language // // Copyright: Ben Merritt 2012 - 2013, // MeinMein 2013 - 2014. // License: Boost License 1.0 // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // Authors: Ben Merrit, // Gerbrand Kamphuis (meinmein.com). module bullet.LinearMath.btMotionState; import bullet.bindings.bindings; public import bullet.LinearMath.btTransform; static if(bindSymbols) { static void writeBindings(File f) { f.writeIncludes("#include <LinearMath/btMotionState.h>"); btMotionState.writeBindings(f); } } struct btMotionState { mixin classBasic!"btMotionState"; mixin method!(void, "getWorldTransform", ParamRef!btTransform); mixin method!(void, "setWorldTransform", ParamRefConst!btTransform); }
D
# FIXED OSAL/osal_memory_icall.obj: C:/ti/simplelink_cc2640r2_sdk_1_40_00_45/source/ti/ble5stack/osal/src/common/osal_memory_icall.c OSAL/osal_memory_icall.obj: C:/ti/simplelink_cc2640r2_sdk_1_40_00_45/source/ti/ble5stack/osal/src/inc/comdef.h OSAL/osal_memory_icall.obj: C:/ti/simplelink_cc2640r2_sdk_1_40_00_45/source/ti/ble5stack/hal/src/target/_common/hal_types.h OSAL/osal_memory_icall.obj: C:/ti/simplelink_cc2640r2_sdk_1_40_00_45/source/ti/ble5stack/hal/src/target/_common/../_common/cc26xx/_hal_types.h OSAL/osal_memory_icall.obj: C:/ti/ccsv8/tools/compiler/ti-cgt-arm_16.9.6.LTS/include/stdint.h OSAL/osal_memory_icall.obj: C:/ti/simplelink_cc2640r2_sdk_1_40_00_45/source/ti/ble5stack/hal/src/inc/hal_defs.h OSAL/osal_memory_icall.obj: C:/ti/simplelink_cc2640r2_sdk_1_40_00_45/source/ti/ble5stack/osal/src/inc/osal.h OSAL/osal_memory_icall.obj: C:/ti/ccsv8/tools/compiler/ti-cgt-arm_16.9.6.LTS/include/limits.h OSAL/osal_memory_icall.obj: C:/ti/simplelink_cc2640r2_sdk_1_40_00_45/source/ti/ble5stack/osal/src/inc/osal_memory.h OSAL/osal_memory_icall.obj: C:/ti/simplelink_cc2640r2_sdk_1_40_00_45/source/ti/ble5stack/osal/src/inc/osal_timers.h OSAL/osal_memory_icall.obj: C:/ti/simplelink_cc2640r2_sdk_1_40_00_45/source/ti/ble5stack/icall/src/inc/icall.h OSAL/osal_memory_icall.obj: C:/ti/ccsv8/tools/compiler/ti-cgt-arm_16.9.6.LTS/include/stdbool.h OSAL/osal_memory_icall.obj: C:/ti/ccsv8/tools/compiler/ti-cgt-arm_16.9.6.LTS/include/stdlib.h OSAL/osal_memory_icall.obj: C:/ti/ccsv8/tools/compiler/ti-cgt-arm_16.9.6.LTS/include/linkage.h OSAL/osal_memory_icall.obj: C:/ti/simplelink_cc2640r2_sdk_1_40_00_45/source/ti/ble5stack/hal/src/inc/hal_assert.h OSAL/osal_memory_icall.obj: C:/ti/simplelink_cc2640r2_sdk_1_40_00_45/source/ti/ble5stack/hal/src/target/_common/hal_types.h OSAL/osal_memory_icall.obj: C:/ti/simplelink_cc2640r2_sdk_1_40_00_45/source/ti/ble5stack/icall/src/inc/icall_jt.h C:/ti/simplelink_cc2640r2_sdk_1_40_00_45/source/ti/ble5stack/osal/src/common/osal_memory_icall.c: C:/ti/simplelink_cc2640r2_sdk_1_40_00_45/source/ti/ble5stack/osal/src/inc/comdef.h: C:/ti/simplelink_cc2640r2_sdk_1_40_00_45/source/ti/ble5stack/hal/src/target/_common/hal_types.h: C:/ti/simplelink_cc2640r2_sdk_1_40_00_45/source/ti/ble5stack/hal/src/target/_common/../_common/cc26xx/_hal_types.h: C:/ti/ccsv8/tools/compiler/ti-cgt-arm_16.9.6.LTS/include/stdint.h: C:/ti/simplelink_cc2640r2_sdk_1_40_00_45/source/ti/ble5stack/hal/src/inc/hal_defs.h: C:/ti/simplelink_cc2640r2_sdk_1_40_00_45/source/ti/ble5stack/osal/src/inc/osal.h: C:/ti/ccsv8/tools/compiler/ti-cgt-arm_16.9.6.LTS/include/limits.h: C:/ti/simplelink_cc2640r2_sdk_1_40_00_45/source/ti/ble5stack/osal/src/inc/osal_memory.h: C:/ti/simplelink_cc2640r2_sdk_1_40_00_45/source/ti/ble5stack/osal/src/inc/osal_timers.h: C:/ti/simplelink_cc2640r2_sdk_1_40_00_45/source/ti/ble5stack/icall/src/inc/icall.h: C:/ti/ccsv8/tools/compiler/ti-cgt-arm_16.9.6.LTS/include/stdbool.h: C:/ti/ccsv8/tools/compiler/ti-cgt-arm_16.9.6.LTS/include/stdlib.h: C:/ti/ccsv8/tools/compiler/ti-cgt-arm_16.9.6.LTS/include/linkage.h: C:/ti/simplelink_cc2640r2_sdk_1_40_00_45/source/ti/ble5stack/hal/src/inc/hal_assert.h: C:/ti/simplelink_cc2640r2_sdk_1_40_00_45/source/ti/ble5stack/hal/src/target/_common/hal_types.h: C:/ti/simplelink_cc2640r2_sdk_1_40_00_45/source/ti/ble5stack/icall/src/inc/icall_jt.h:
D
/* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). * Version 3.0.0 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. * ----------------------------------------------------------------------------- */ module vtkStructuredAMRGridConnectivity; static import vtkd_im; static import core.stdc.config; static import std.conv; static import std.string; static import std.conv; static import std.string; static import vtkObjectBase; static import SWIGTYPE_p_int; static import vtkUnsignedCharArray; static import vtkPointData; static import vtkCellData; static import vtkPoints; static import vtkStructuredAMRNeighbor; static import vtkAbstractGridConnectivity; class vtkStructuredAMRGridConnectivity : vtkAbstractGridConnectivity.vtkAbstractGridConnectivity { private void* swigCPtr; public this(void* cObject, bool ownCObject) { super(vtkd_im.vtkStructuredAMRGridConnectivity_Upcast(cObject), ownCObject); swigCPtr = cObject; } public static void* swigGetCPtr(vtkStructuredAMRGridConnectivity obj) { return (obj is null) ? null : obj.swigCPtr; } mixin vtkd_im.SwigOperatorDefinitions; public override void dispose() { synchronized(this) { if (swigCPtr !is null) { if (swigCMemOwn) { swigCMemOwn = false; throw new object.Exception("C++ destructor does not have public access"); } swigCPtr = null; super.dispose(); } } } public static vtkStructuredAMRGridConnectivity New() { void* cPtr = vtkd_im.vtkStructuredAMRGridConnectivity_New(); vtkStructuredAMRGridConnectivity ret = (cPtr is null) ? null : new vtkStructuredAMRGridConnectivity(cPtr, false); return ret; } public static int IsTypeOf(string type) { auto ret = vtkd_im.vtkStructuredAMRGridConnectivity_IsTypeOf((type ? std.string.toStringz(type) : null)); return ret; } public static vtkStructuredAMRGridConnectivity SafeDownCast(vtkObjectBase.vtkObjectBase o) { void* cPtr = vtkd_im.vtkStructuredAMRGridConnectivity_SafeDownCast(vtkObjectBase.vtkObjectBase.swigGetCPtr(o)); vtkStructuredAMRGridConnectivity ret = (cPtr is null) ? null : new vtkStructuredAMRGridConnectivity(cPtr, false); return ret; } public vtkStructuredAMRGridConnectivity NewInstance() const { void* cPtr = vtkd_im.vtkStructuredAMRGridConnectivity_NewInstance(cast(void*)swigCPtr); vtkStructuredAMRGridConnectivity ret = (cPtr is null) ? null : new vtkStructuredAMRGridConnectivity(cPtr, false); return ret; } alias vtkAbstractGridConnectivity.vtkAbstractGridConnectivity.NewInstance NewInstance; public void Initialize(uint NumberOfLevels, uint N, int RefinementRatio) { vtkd_im.vtkStructuredAMRGridConnectivity_Initialize__SWIG_0(cast(void*)swigCPtr, NumberOfLevels, N, RefinementRatio); } public void Initialize(uint NumberOfLevels, uint N) { vtkd_im.vtkStructuredAMRGridConnectivity_Initialize__SWIG_1(cast(void*)swigCPtr, NumberOfLevels, N); } public override void CreateGhostLayers(int N) { vtkd_im.vtkStructuredAMRGridConnectivity_CreateGhostLayers__SWIG_0(cast(void*)swigCPtr, N); } public override void CreateGhostLayers() { vtkd_im.vtkStructuredAMRGridConnectivity_CreateGhostLayers__SWIG_1(cast(void*)swigCPtr); } public void RegisterGrid(int gridIdx, int level, int refinementRatio, SWIGTYPE_p_int.SWIGTYPE_p_int extents, vtkUnsignedCharArray.vtkUnsignedCharArray nodesGhostArray, vtkUnsignedCharArray.vtkUnsignedCharArray cellGhostArray, vtkPointData.vtkPointData pointData, vtkCellData.vtkCellData cellData, vtkPoints.vtkPoints gridNodes) { vtkd_im.vtkStructuredAMRGridConnectivity_RegisterGrid__SWIG_0(cast(void*)swigCPtr, gridIdx, level, refinementRatio, SWIGTYPE_p_int.SWIGTYPE_p_int.swigGetCPtr(extents), vtkUnsignedCharArray.vtkUnsignedCharArray.swigGetCPtr(nodesGhostArray), vtkUnsignedCharArray.vtkUnsignedCharArray.swigGetCPtr(cellGhostArray), vtkPointData.vtkPointData.swigGetCPtr(pointData), vtkCellData.vtkCellData.swigGetCPtr(cellData), vtkPoints.vtkPoints.swigGetCPtr(gridNodes)); } public void RegisterGrid(int gridIdx, int level, SWIGTYPE_p_int.SWIGTYPE_p_int extents, vtkUnsignedCharArray.vtkUnsignedCharArray nodesGhostArray, vtkUnsignedCharArray.vtkUnsignedCharArray cellGhostArray, vtkPointData.vtkPointData pointData, vtkCellData.vtkCellData cellData, vtkPoints.vtkPoints gridNodes) { vtkd_im.vtkStructuredAMRGridConnectivity_RegisterGrid__SWIG_1(cast(void*)swigCPtr, gridIdx, level, SWIGTYPE_p_int.SWIGTYPE_p_int.swigGetCPtr(extents), vtkUnsignedCharArray.vtkUnsignedCharArray.swigGetCPtr(nodesGhostArray), vtkUnsignedCharArray.vtkUnsignedCharArray.swigGetCPtr(cellGhostArray), vtkPointData.vtkPointData.swigGetCPtr(pointData), vtkCellData.vtkCellData.swigGetCPtr(cellData), vtkPoints.vtkPoints.swigGetCPtr(gridNodes)); } public void SetBalancedRefinement(bool _arg) { vtkd_im.vtkStructuredAMRGridConnectivity_SetBalancedRefinement(cast(void*)swigCPtr, _arg); } public bool GetBalancedRefinement() { bool ret = vtkd_im.vtkStructuredAMRGridConnectivity_GetBalancedRefinement(cast(void*)swigCPtr) ? true : false; return ret; } public void SetNodeCentered(bool _arg) { vtkd_im.vtkStructuredAMRGridConnectivity_SetNodeCentered(cast(void*)swigCPtr, _arg); } public bool GetNodeCentered() { bool ret = vtkd_im.vtkStructuredAMRGridConnectivity_GetNodeCentered(cast(void*)swigCPtr) ? true : false; return ret; } public void SetCellCentered(bool _arg) { vtkd_im.vtkStructuredAMRGridConnectivity_SetCellCentered(cast(void*)swigCPtr, _arg); } public bool GetCellCentered() { bool ret = vtkd_im.vtkStructuredAMRGridConnectivity_GetCellCentered(cast(void*)swigCPtr) ? true : false; return ret; } public int GetNumberOfNeighbors(int gridID) { auto ret = vtkd_im.vtkStructuredAMRGridConnectivity_GetNumberOfNeighbors(cast(void*)swigCPtr, gridID); return ret; } public void GetGhostedExtent(int gridID, SWIGTYPE_p_int.SWIGTYPE_p_int ext) { vtkd_im.vtkStructuredAMRGridConnectivity_GetGhostedExtent(cast(void*)swigCPtr, gridID, SWIGTYPE_p_int.SWIGTYPE_p_int.swigGetCPtr(ext)); } public vtkStructuredAMRNeighbor.vtkStructuredAMRNeighbor GetNeighbor(int gridID, int nei) { vtkStructuredAMRNeighbor.vtkStructuredAMRNeighbor ret = new vtkStructuredAMRNeighbor.vtkStructuredAMRNeighbor(vtkd_im.vtkStructuredAMRGridConnectivity_GetNeighbor(cast(void*)swigCPtr, gridID, nei), true); return ret; } }
D
/** * Compiler implementation of the * $(LINK2 http://www.dlang.org, D programming language). * * Copyright: Copyright (C) 1999-2020 by The D Language Foundation, All Rights Reserved * Authors: $(LINK2 http://www.digitalmars.com, Walter Bright) * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/visitor.d, _visitor.d) * Documentation: https://dlang.org/phobos/dmd_visitor.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/visitor.d */ module dmd.visitor; import dmd.astcodegen; import dmd.parsetimevisitor; import dmd.tokens; import dmd.transitivevisitor; import dmd.expression; import dmd.root.rootobject; /** * Classic Visitor class which implements visit methods for all the AST * nodes present in the compiler. The visit methods for AST nodes * created at parse time are inherited while the visiting methods * for AST nodes created at semantic time are implemented. */ extern (C++) class Visitor : ParseTimeVisitor!ASTCodegen { alias visit = ParseTimeVisitor!ASTCodegen.visit; public: void visit(ASTCodegen.ErrorStatement s) { visit(cast(ASTCodegen.Statement)s); } void visit(ASTCodegen.PeelStatement s) { visit(cast(ASTCodegen.Statement)s); } void visit(ASTCodegen.UnrolledLoopStatement s) { visit(cast(ASTCodegen.Statement)s); } void visit(ASTCodegen.SwitchErrorStatement s) { visit(cast(ASTCodegen.Statement)s); } void visit(ASTCodegen.DebugStatement s) { visit(cast(ASTCodegen.Statement)s); } void visit(ASTCodegen.DtorExpStatement s) { visit(cast(ASTCodegen.ExpStatement)s); } void visit(ASTCodegen.ForwardingStatement s) { visit(cast(ASTCodegen.Statement)s); } void visit(ASTCodegen.OverloadSet s) { visit(cast(ASTCodegen.Dsymbol)s); } void visit(ASTCodegen.LabelDsymbol s) { visit(cast(ASTCodegen.Dsymbol)s); } void visit(ASTCodegen.WithScopeSymbol s) { visit(cast(ASTCodegen.ScopeDsymbol)s); } void visit(ASTCodegen.ArrayScopeSymbol s) { visit(cast(ASTCodegen.ScopeDsymbol)s); } void visit(ASTCodegen.OverDeclaration s) { visit(cast(ASTCodegen.Declaration)s); } void visit(ASTCodegen.SymbolDeclaration s) { visit(cast(ASTCodegen.Declaration)s); } void visit(ASTCodegen.ThisDeclaration s) { visit(cast(ASTCodegen.VarDeclaration)s); } void visit(ASTCodegen.TypeInfoDeclaration s) { visit(cast(ASTCodegen.VarDeclaration)s); } void visit(ASTCodegen.TypeInfoStructDeclaration s) { visit(cast(ASTCodegen.TypeInfoDeclaration)s); } void visit(ASTCodegen.TypeInfoClassDeclaration s) { visit(cast(ASTCodegen.TypeInfoDeclaration)s); } void visit(ASTCodegen.TypeInfoInterfaceDeclaration s) { visit(cast(ASTCodegen.TypeInfoDeclaration)s); } void visit(ASTCodegen.TypeInfoPointerDeclaration s) { visit(cast(ASTCodegen.TypeInfoDeclaration)s); } void visit(ASTCodegen.TypeInfoArrayDeclaration s) { visit(cast(ASTCodegen.TypeInfoDeclaration)s); } void visit(ASTCodegen.TypeInfoStaticArrayDeclaration s) { visit(cast(ASTCodegen.TypeInfoDeclaration)s); } void visit(ASTCodegen.TypeInfoAssociativeArrayDeclaration s) { visit(cast(ASTCodegen.TypeInfoDeclaration)s); } void visit(ASTCodegen.TypeInfoEnumDeclaration s) { visit(cast(ASTCodegen.TypeInfoDeclaration)s); } void visit(ASTCodegen.TypeInfoFunctionDeclaration s) { visit(cast(ASTCodegen.TypeInfoDeclaration)s); } void visit(ASTCodegen.TypeInfoDelegateDeclaration s) { visit(cast(ASTCodegen.TypeInfoDeclaration)s); } void visit(ASTCodegen.TypeInfoTupleDeclaration s) { visit(cast(ASTCodegen.TypeInfoDeclaration)s); } void visit(ASTCodegen.TypeInfoConstDeclaration s) { visit(cast(ASTCodegen.TypeInfoDeclaration)s); } void visit(ASTCodegen.TypeInfoInvariantDeclaration s) { visit(cast(ASTCodegen.TypeInfoDeclaration)s); } void visit(ASTCodegen.TypeInfoSharedDeclaration s) { visit(cast(ASTCodegen.TypeInfoDeclaration)s); } void visit(ASTCodegen.TypeInfoWildDeclaration s) { visit(cast(ASTCodegen.TypeInfoDeclaration)s); } void visit(ASTCodegen.TypeInfoVectorDeclaration s) { visit(cast(ASTCodegen.TypeInfoDeclaration)s); } void visit(ASTCodegen.FuncAliasDeclaration s) { visit(cast(ASTCodegen.FuncDeclaration)s); } void visit(ASTCodegen.ErrorInitializer i) { visit(cast(ASTCodegen.Initializer)i); } void visit(ASTCodegen.ErrorExp e) { visit(cast(ASTCodegen.Expression)e); } void visit(ASTCodegen.ComplexExp e) { visit(cast(ASTCodegen.Expression)e); } void visit(ASTCodegen.StructLiteralExp e) { visit(cast(ASTCodegen.Expression)e); } void visit(ASTCodegen.ObjcClassReferenceExp e) { visit(cast(ASTCodegen.Expression)e); } void visit(ASTCodegen.SymOffExp e) { visit(cast(ASTCodegen.SymbolExp)e); } void visit(ASTCodegen.OverExp e) { visit(cast(ASTCodegen.Expression)e); } void visit(ASTCodegen.HaltExp e) { visit(cast(ASTCodegen.Expression)e); } void visit(ASTCodegen.DotTemplateExp e) { visit(cast(ASTCodegen.UnaExp)e); } void visit(ASTCodegen.DotVarExp e) { visit(cast(ASTCodegen.UnaExp)e); } void visit(ASTCodegen.DelegateExp e) { visit(cast(ASTCodegen.UnaExp)e); } void visit(ASTCodegen.DotTypeExp e) { visit(cast(ASTCodegen.UnaExp)e); } void visit(ASTCodegen.VectorExp e) { visit(cast(ASTCodegen.UnaExp)e); } void visit(ASTCodegen.VectorArrayExp e) { visit(cast(ASTCodegen.UnaExp)e); } void visit(ASTCodegen.SliceExp e) { visit(cast(ASTCodegen.UnaExp)e); } void visit(ASTCodegen.ArrayLengthExp e) { visit(cast(ASTCodegen.UnaExp)e); } void visit(ASTCodegen.DelegatePtrExp e) { visit(cast(ASTCodegen.UnaExp)e); } void visit(ASTCodegen.DelegateFuncptrExp e) { visit(cast(ASTCodegen.UnaExp)e); } void visit(ASTCodegen.DotExp e) { visit(cast(ASTCodegen.BinExp)e); } void visit(ASTCodegen.IndexExp e) { visit(cast(ASTCodegen.BinExp)e); } void visit(ASTCodegen.ConstructExp e) { visit(cast(ASTCodegen.AssignExp)e); } void visit(ASTCodegen.BlitExp e) { visit(cast(ASTCodegen.AssignExp)e); } void visit(ASTCodegen.RemoveExp e) { visit(cast(ASTCodegen.BinExp)e); } void visit(ASTCodegen.ClassReferenceExp e) { visit(cast(ASTCodegen.Expression)e); } void visit(ASTCodegen.VoidInitExp e) { visit(cast(ASTCodegen.Expression)e); } void visit(ASTCodegen.ThrownExceptionExp e) { visit(cast(ASTCodegen.Expression)e); } } /** * The PermissiveVisitor overrides the root AST nodes with * empty visiting methods. */ extern (C++) class SemanticTimePermissiveVisitor : Visitor { alias visit = Visitor.visit; override void visit(ASTCodegen.Dsymbol){} override void visit(ASTCodegen.Parameter){} override void visit(ASTCodegen.Statement){} override void visit(ASTCodegen.Type){} override void visit(ASTCodegen.Expression){} override void visit(ASTCodegen.TemplateParameter){} override void visit(ASTCodegen.Condition){} override void visit(ASTCodegen.Initializer){} } /** * The TransitiveVisitor implements the AST traversal logic for all AST nodes. */ extern (C++) class SemanticTimeTransitiveVisitor : SemanticTimePermissiveVisitor { alias visit = SemanticTimePermissiveVisitor.visit; mixin ParseVisitMethods!ASTCodegen __methods; alias visit = __methods.visit; override void visit(ASTCodegen.PeelStatement s) { if (s.s) s.s.accept(this); } override void visit(ASTCodegen.UnrolledLoopStatement s) { foreach(sx; *s.statements) { if (sx) sx.accept(this); } } override void visit(ASTCodegen.DebugStatement s) { if (s.statement) s.statement.accept(this); } override void visit(ASTCodegen.ForwardingStatement s) { if (s.statement) s.statement.accept(this); } override void visit(ASTCodegen.StructLiteralExp e) { // CTFE can generate struct literals that contain an AddrExp pointing to themselves, // need to avoid infinite recursion. if (!(e.stageflags & stageToCBuffer)) { int old = e.stageflags; e.stageflags |= stageToCBuffer; foreach (el; *e.elements) if (el) el.accept(this); e.stageflags = old; } } override void visit(ASTCodegen.DotTemplateExp e) { e.e1.accept(this); } override void visit(ASTCodegen.DotVarExp e) { e.e1.accept(this); } override void visit(ASTCodegen.DelegateExp e) { if (!e.func.isNested() || e.func.needThis()) e.e1.accept(this); } override void visit(ASTCodegen.DotTypeExp e) { e.e1.accept(this); } override void visit(ASTCodegen.VectorExp e) { visitType(e.to); e.e1.accept(this); } override void visit(ASTCodegen.VectorArrayExp e) { e.e1.accept(this); } override void visit(ASTCodegen.SliceExp e) { e.e1.accept(this); if (e.upr) e.upr.accept(this); if (e.lwr) e.lwr.accept(this); } override void visit(ASTCodegen.ArrayLengthExp e) { e.e1.accept(this); } override void visit(ASTCodegen.DelegatePtrExp e) { e.e1.accept(this); } override void visit(ASTCodegen.DelegateFuncptrExp e) { e.e1.accept(this); } override void visit(ASTCodegen.DotExp e) { e.e1.accept(this); e.e2.accept(this); } override void visit(ASTCodegen.IndexExp e) { e.e1.accept(this); e.e2.accept(this); } override void visit(ASTCodegen.RemoveExp e) { e.e1.accept(this); e.e2.accept(this); } } extern (C++) class StoppableVisitor : Visitor { alias visit = Visitor.visit; public: bool stop; final extern (D) this() { } }
D
// Written in the D programming language. /** This module is a port of a growing fragment of the $(D_PARAM numeric) header in Alexander Stepanov's $(LINK2 https://en.wikipedia.org/wiki/Standard_Template_Library, Standard Template Library), with a few additions. Macros: Copyright: Copyright Andrei Alexandrescu 2008 - 2009. License: $(HTTP www.boost.org/LICENSE_1_0.txt, Boost License 1.0). Authors: $(HTTP erdani.org, Andrei Alexandrescu), Don Clugston, Robert Jacques, Ilya Yaroshenko Source: $(PHOBOSSRC std/numeric.d) */ /* Copyright Andrei Alexandrescu 2008 - 2009. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) */ module std.numeric; import std.complex; import std.math; import std.range.primitives; import std.traits; import std.typecons; /// Format flags for CustomFloat. public enum CustomFloatFlags { /// Adds a sign bit to allow for signed numbers. signed = 1, /** * Store values in normalized form by default. The actual precision of the * significand is extended by 1 bit by assuming an implicit leading bit of 1 * instead of 0. i.e. `1.nnnn` instead of `0.nnnn`. * True for all $(LINK2 https://en.wikipedia.org/wiki/IEEE_floating_point, IEE754) types */ storeNormalized = 2, /** * Stores the significand in $(LINK2 https://en.wikipedia.org/wiki/IEEE_754-1985#Denormalized_numbers, * IEEE754 denormalized) form when the exponent is 0. Required to express the value 0. */ allowDenorm = 4, /** * Allows the storage of $(LINK2 https://en.wikipedia.org/wiki/IEEE_754-1985#Positive_and_negative_infinity, * IEEE754 _infinity) values. */ infinity = 8, /// Allows the storage of $(LINK2 https://en.wikipedia.org/wiki/NaN, IEEE754 Not a Number) values. nan = 16, /** * If set, select an exponent bias such that max_exp = 1. * i.e. so that the maximum value is >= 1.0 and < 2.0. * Ignored if the exponent bias is manually specified. */ probability = 32, /// If set, unsigned custom floats are assumed to be negative. negativeUnsigned = 64, /**If set, 0 is the only allowed $(LINK2 https://en.wikipedia.org/wiki/IEEE_754-1985#Denormalized_numbers, * IEEE754 denormalized) number. * Requires allowDenorm and storeNormalized. */ allowDenormZeroOnly = 128 | allowDenorm | storeNormalized, /// Include _all of the $(LINK2 https://en.wikipedia.org/wiki/IEEE_floating_point, IEEE754) options. ieee = signed | storeNormalized | allowDenorm | infinity | nan , /// Include none of the above options. none = 0 } private template CustomFloatParams(uint bits) { enum CustomFloatFlags flags = CustomFloatFlags.ieee ^ ((bits == 80) ? CustomFloatFlags.storeNormalized : CustomFloatFlags.none); static if (bits == 8) alias CustomFloatParams = CustomFloatParams!( 4, 3, flags); static if (bits == 16) alias CustomFloatParams = CustomFloatParams!(10, 5, flags); static if (bits == 32) alias CustomFloatParams = CustomFloatParams!(23, 8, flags); static if (bits == 64) alias CustomFloatParams = CustomFloatParams!(52, 11, flags); static if (bits == 80) alias CustomFloatParams = CustomFloatParams!(64, 15, flags); } private template CustomFloatParams(uint precision, uint exponentWidth, CustomFloatFlags flags) { import std.meta : AliasSeq; alias CustomFloatParams = AliasSeq!( precision, exponentWidth, flags, (1 << (exponentWidth - ((flags & flags.probability) == 0))) - ((flags & (flags.nan | flags.infinity)) != 0) - ((flags & flags.probability) != 0) ); // ((flags & CustomFloatFlags.probability) == 0) } /** * Allows user code to define custom floating-point formats. These formats are * for storage only; all operations on them are performed by first implicitly * extracting them to `real` first. After the operation is completed the * result can be stored in a custom floating-point value via assignment. */ template CustomFloat(uint bits) if (bits == 8 || bits == 16 || bits == 32 || bits == 64 || bits == 80) { alias CustomFloat = CustomFloat!(CustomFloatParams!(bits)); } /// ditto template CustomFloat(uint precision, uint exponentWidth, CustomFloatFlags flags = CustomFloatFlags.ieee) if (((flags & flags.signed) + precision + exponentWidth) % 8 == 0 && precision + exponentWidth > 0) { alias CustomFloat = CustomFloat!(CustomFloatParams!(precision, exponentWidth, flags)); } /// @safe unittest { import std.math : sin, cos; // Define a 16-bit floating point values CustomFloat!16 x; // Using the number of bits CustomFloat!(10, 5) y; // Using the precision and exponent width CustomFloat!(10, 5,CustomFloatFlags.ieee) z; // Using the precision, exponent width and format flags CustomFloat!(10, 5,CustomFloatFlags.ieee, 15) w; // Using the precision, exponent width, format flags and exponent offset bias // Use the 16-bit floats mostly like normal numbers w = x*y - 1; // Functions calls require conversion z = sin(+x) + cos(+y); // Use unary plus to concisely convert to a real z = sin(x.get!float) + cos(y.get!float); // Or use get!T z = sin(cast(float) x) + cos(cast(float) y); // Or use cast(T) to explicitly convert // Define a 8-bit custom float for storing probabilities alias Probability = CustomFloat!(4, 4, CustomFloatFlags.ieee^CustomFloatFlags.probability^CustomFloatFlags.signed ); auto p = Probability(0.5); } // Facilitate converting numeric types to custom float private union ToBinary(F) if (is(typeof(CustomFloatParams!(F.sizeof*8))) || is(F == real)) { F set; // If on Linux or Mac, where 80-bit reals are padded, ignore the // padding. import std.algorithm.comparison : min; CustomFloat!(CustomFloatParams!(min(F.sizeof*8, 80))) get; // Convert F to the correct binary type. static typeof(get) opCall(F value) { ToBinary r; r.set = value; return r.get; } alias get this; } /// ditto struct CustomFloat(uint precision, // fraction bits (23 for float) uint exponentWidth, // exponent bits (8 for float) Exponent width CustomFloatFlags flags, uint bias) if (isCorrectCustomFloat(precision, exponentWidth, flags)) { import std.bitmanip : bitfields; import std.meta : staticIndexOf; private: // get the correct unsigned bitfield type to support > 32 bits template uType(uint bits) { static if (bits <= size_t.sizeof*8) alias uType = size_t; else alias uType = ulong ; } // get the correct signed bitfield type to support > 32 bits template sType(uint bits) { static if (bits <= ptrdiff_t.sizeof*8-1) alias sType = ptrdiff_t; else alias sType = long; } alias T_sig = uType!precision; alias T_exp = uType!exponentWidth; alias T_signed_exp = sType!exponentWidth; alias Flags = CustomFloatFlags; // Perform IEEE rounding with round to nearest detection void roundedShift(T,U)(ref T sig, U shift) { if (sig << (T.sizeof*8 - shift) == cast(T) 1uL << (T.sizeof*8 - 1)) { // round to even sig >>= shift; sig += sig & 1; } else { sig >>= shift - 1; sig += sig & 1; // Perform standard rounding sig >>= 1; } } // Convert the current value to signed exponent, normalized form void toNormalized(T,U)(ref T sig, ref U exp) { sig = significand; auto shift = (T.sizeof*8) - precision; exp = exponent; static if (flags&(Flags.infinity|Flags.nan)) { // Handle inf or nan if (exp == exponent_max) { exp = exp.max; sig <<= shift; static if (flags&Flags.storeNormalized) { // Save inf/nan in denormalized format sig >>= 1; sig += cast(T) 1uL << (T.sizeof*8 - 1); } return; } } if ((~flags&Flags.storeNormalized) || // Convert denormalized form to normalized form ((flags&Flags.allowDenorm) && exp == 0)) { if (sig > 0) { import core.bitop : bsr; auto shift2 = precision - bsr(sig); exp -= shift2-1; shift += shift2; } else // value = 0.0 { exp = exp.min; return; } } sig <<= shift; exp -= bias; } // Set the current value from signed exponent, normalized form void fromNormalized(T,U)(ref T sig, ref U exp) { auto shift = (T.sizeof*8) - precision; if (exp == exp.max) { // infinity or nan exp = exponent_max; static if (flags & Flags.storeNormalized) sig <<= 1; // convert back to normalized form static if (~flags & Flags.infinity) // No infinity support? assert(sig != 0, "Infinity floating point value assigned to a " ~ typeof(this).stringof ~ " (no infinity support)."); static if (~flags & Flags.nan) // No NaN support? assert(sig == 0, "NaN floating point value assigned to a " ~ typeof(this).stringof ~ " (no nan support)."); sig >>= shift; return; } if (exp == exp.min) // 0.0 { exp = 0; sig = 0; return; } exp += bias; if (exp <= 0) { static if ((flags&Flags.allowDenorm) || // Convert from normalized form to denormalized (~flags&Flags.storeNormalized)) { shift += -exp; roundedShift(sig,1); sig += cast(T) 1uL << (T.sizeof*8 - 1); // Add the leading 1 exp = 0; } else assert((flags&Flags.storeNormalized) && exp == 0, "Underflow occured assigning to a " ~ typeof(this).stringof ~ " (no denormal support)."); } else { static if (~flags&Flags.storeNormalized) { // Convert from normalized form to denormalized roundedShift(sig,1); sig += cast(T) 1uL << (T.sizeof*8 - 1); // Add the leading 1 } } if (shift > 0) roundedShift(sig,shift); if (sig > significand_max) { // handle significand overflow (should only be 1 bit) static if (~flags&Flags.storeNormalized) { sig >>= 1; } else sig &= significand_max; exp++; } static if ((flags&Flags.allowDenormZeroOnly)==Flags.allowDenormZeroOnly) { // disallow non-zero denormals if (exp == 0) { sig <<= 1; if (sig > significand_max && (sig&significand_max) > 0) // Check and round to even exp++; sig = 0; } } if (exp >= exponent_max) { static if (flags&(Flags.infinity|Flags.nan)) { sig = 0; exp = exponent_max; static if (~flags&(Flags.infinity)) assert(0, "Overflow occured assigning to a " ~ typeof(this).stringof ~ " (no infinity support)."); } else assert(exp == exponent_max, "Overflow occured assigning to a " ~ typeof(this).stringof ~ " (no infinity support)."); } } public: static if (precision == 64) // CustomFloat!80 support hack { ulong significand; enum ulong significand_max = ulong.max; mixin(bitfields!( T_exp , "exponent", exponentWidth, bool , "sign" , flags & flags.signed )); } else { mixin(bitfields!( T_sig, "significand", precision, T_exp, "exponent" , exponentWidth, bool , "sign" , flags & flags.signed )); } /// Returns: infinity value static if (flags & Flags.infinity) static @property CustomFloat infinity() { CustomFloat value; static if (flags & Flags.signed) value.sign = 0; value.significand = 0; value.exponent = exponent_max; return value; } /// Returns: NaN value static if (flags & Flags.nan) static @property CustomFloat nan() { CustomFloat value; static if (flags & Flags.signed) value.sign = 0; value.significand = cast(typeof(significand_max)) 1L << (precision-1); value.exponent = exponent_max; return value; } /// Returns: number of decimal digits of precision static @property size_t dig() { auto shiftcnt = precision - ((flags&Flags.storeNormalized) == 0); return shiftcnt == 64 ? 19 : cast(size_t) log10(1uL << shiftcnt); } /// Returns: smallest increment to the value 1 static @property CustomFloat epsilon() { CustomFloat value; static if (flags & Flags.signed) value.sign = 0; T_signed_exp exp = -precision; T_sig sig = 0; value.fromNormalized(sig,exp); if (exp == 0 && sig == 0) // underflowed to zero { static if ((flags&Flags.allowDenorm) || (~flags&Flags.storeNormalized)) sig = 1; else sig = cast(T) 1uL << (precision - 1); } value.exponent = cast(value.T_exp) exp; value.significand = cast(value.T_sig) sig; return value; } /// the number of bits in mantissa enum mant_dig = precision + ((flags&Flags.storeNormalized) != 0); /// Returns: maximum int value such that 10<sup>max_10_exp</sup> is representable static @property int max_10_exp(){ return cast(int) log10( +max ); } /// maximum int value such that 2<sup>max_exp-1</sup> is representable enum max_exp = exponent_max - bias - ((flags & (Flags.infinity | Flags.nan)) != 0) + 1; /// Returns: minimum int value such that 10<sup>min_10_exp</sup> is representable static @property int min_10_exp(){ return cast(int) log10( +min_normal ); } /// minimum int value such that 2<sup>min_exp-1</sup> is representable as a normalized value enum min_exp = cast(T_signed_exp) -(cast(long) bias) + 1 + ((flags & Flags.allowDenorm) != 0); /// Returns: largest representable value that's not infinity static @property CustomFloat max() { CustomFloat value; static if (flags & Flags.signed) value.sign = 0; value.exponent = exponent_max - ((flags&(flags.infinity|flags.nan)) != 0); value.significand = significand_max; return value; } /// Returns: smallest representable normalized value that's not 0 static @property CustomFloat min_normal() { CustomFloat value; static if (flags & Flags.signed) value.sign = 0; value.exponent = (flags & Flags.allowDenorm) != 0; static if (flags & Flags.storeNormalized) value.significand = 0; else value.significand = cast(T_sig) 1uL << (precision - 1); return value; } /// Returns: real part @property CustomFloat re() { return this; } /// Returns: imaginary part static @property CustomFloat im() { return CustomFloat(0.0f); } /// Initialize from any `real` compatible type. this(F)(F input) if (__traits(compiles, cast(real) input )) { this = input; } /// Self assignment void opAssign(F:CustomFloat)(F input) { static if (flags & Flags.signed) sign = input.sign; exponent = input.exponent; significand = input.significand; } /// Assigns from any `real` compatible type. void opAssign(F)(F input) if (__traits(compiles, cast(real) input)) { import std.conv : text; static if (staticIndexOf!(Unqual!F, float, double, real) >= 0) auto value = ToBinary!(Unqual!F)(input); else auto value = ToBinary!(real )(input); // Assign the sign bit static if (~flags & Flags.signed) assert((!value.sign) ^ ((flags&flags.negativeUnsigned) > 0), "Incorrectly signed floating point value assigned to a " ~ typeof(this).stringof ~ " (no sign support)."); else sign = value.sign; CommonType!(T_signed_exp ,value.T_signed_exp) exp = value.exponent; CommonType!(T_sig, value.T_sig ) sig = value.significand; value.toNormalized(sig,exp); fromNormalized(sig,exp); assert(exp <= exponent_max, text(typeof(this).stringof ~ " exponent too large: " ,exp," > ",exponent_max, "\t",input,"\t",sig)); assert(sig <= significand_max, text(typeof(this).stringof ~ " significand too large: ",sig," > ",significand_max, "\t",input,"\t",exp," ",exponent_max)); exponent = cast(T_exp) exp; significand = cast(T_sig) sig; } /// Fetches the stored value either as a `float`, `double` or `real`. @property F get(F)() if (staticIndexOf!(Unqual!F, float, double, real) >= 0) { import std.conv : text; ToBinary!F result; static if (flags&Flags.signed) result.sign = sign; else result.sign = (flags&flags.negativeUnsigned) > 0; CommonType!(T_signed_exp ,result.get.T_signed_exp ) exp = exponent; // Assign the exponent and fraction CommonType!(T_sig, result.get.T_sig ) sig = significand; toNormalized(sig,exp); result.fromNormalized(sig,exp); assert(exp <= result.exponent_max, text("get exponent too large: " ,exp," > ",result.exponent_max) ); assert(sig <= result.significand_max, text("get significand too large: ",sig," > ",result.significand_max) ); result.exponent = cast(result.get.T_exp) exp; result.significand = cast(result.get.T_sig) sig; return result.set; } ///ditto alias opCast = get; /// Convert the CustomFloat to a real and perform the relevant operator on the result real opUnary(string op)() if (__traits(compiles, mixin(op~`(get!real)`)) || op=="++" || op=="--") { static if (op=="++" || op=="--") { auto result = get!real; this = mixin(op~`result`); return result; } else return mixin(op~`get!real`); } /// ditto // Define an opBinary `CustomFloat op CustomFloat` so that those below // do not match equally, which is disallowed by the spec: // https://dlang.org/spec/operatoroverloading.html#binary real opBinary(string op,T)(T b) if (__traits(compiles, mixin(`get!real`~op~`b.get!real`))) { return mixin(`get!real`~op~`b.get!real`); } /// ditto real opBinary(string op,T)(T b) if ( __traits(compiles, mixin(`get!real`~op~`b`)) && !__traits(compiles, mixin(`get!real`~op~`b.get!real`))) { return mixin(`get!real`~op~`b`); } /// ditto real opBinaryRight(string op,T)(T a) if ( __traits(compiles, mixin(`a`~op~`get!real`)) && !__traits(compiles, mixin(`get!real`~op~`b`)) && !__traits(compiles, mixin(`get!real`~op~`b.get!real`))) { return mixin(`a`~op~`get!real`); } /// ditto int opCmp(T)(auto ref T b) if (__traits(compiles, cast(real) b)) { auto x = get!real; auto y = cast(real) b; return (x >= y)-(x <= y); } /// ditto void opOpAssign(string op, T)(auto ref T b) if (__traits(compiles, mixin(`get!real`~op~`cast(real) b`))) { return mixin(`this = this `~op~` cast(real) b`); } /// ditto template toString() { import std.format : FormatSpec, formatValue; // Needs to be a template because of DMD @@BUG@@ 13737. void toString()(scope void delegate(const(char)[]) sink, scope const ref FormatSpec!char fmt) { sink.formatValue(get!real, fmt); } } } @safe unittest { import std.meta; alias FPTypes = AliasSeq!( CustomFloat!(5, 10), CustomFloat!(5, 11, CustomFloatFlags.ieee ^ CustomFloatFlags.signed), CustomFloat!(1, 15, CustomFloatFlags.ieee ^ CustomFloatFlags.signed), CustomFloat!(4, 3, CustomFloatFlags.ieee | CustomFloatFlags.probability ^ CustomFloatFlags.signed) ); foreach (F; FPTypes) { auto x = F(0.125); assert(x.get!float == 0.125F); assert(x.get!double == 0.125); x -= 0.0625; assert(x.get!float == 0.0625F); assert(x.get!double == 0.0625); x *= 2; assert(x.get!float == 0.125F); assert(x.get!double == 0.125); x /= 4; assert(x.get!float == 0.03125); assert(x.get!double == 0.03125); x = 0.5; x ^^= 4; assert(x.get!float == 1 / 16.0F); assert(x.get!double == 1 / 16.0); } } @system unittest { // @system due to to!string(CustomFloat) import std.conv; CustomFloat!(5, 10) y = CustomFloat!(5, 10)(0.125); assert(y.to!string == "0.125"); } @safe unittest { alias cf = CustomFloat!(5, 2); auto a = cf.infinity; assert(a.sign == 0); assert(a.exponent == 3); assert(a.significand == 0); auto b = cf.nan; assert(b.exponent == 3); assert(b.significand != 0); assert(cf.dig == 1); auto c = cf.epsilon; /* doesn't work yet due to bug 20261 assert(c.sign == 0); assert(c.exponent == 0); assert(c.significand == 1); */ assert(cf.mant_dig == 6); assert(cf.max_10_exp == 0); assert(cf.max_exp == 2); assert(cf.min_10_exp == 0); assert(cf.min_exp == 1); auto d = cf.max; assert(d.sign == 0); assert(d.exponent == 2); assert(d.significand == 31); auto e = cf.min_normal; assert(e.sign == 0); assert(e.exponent == 1); assert(e.significand == 0); assert(e.re == e); assert(e.im == cf(0.0)); } // check whether CustomFloats identical to float/double behave like float/double @safe unittest { import std.conv : to; alias myFloat = CustomFloat!(23, 8); static assert(myFloat.dig == float.dig); static assert(myFloat.mant_dig == float.mant_dig); assert(myFloat.max_10_exp == float.max_10_exp); static assert(myFloat.max_exp == float.max_exp); assert(myFloat.min_10_exp == float.min_10_exp); static assert(myFloat.min_exp == float.min_exp); // static assert(to!float(myFloat.epsilon) == float.epsilon); // doesn't work yet due to bug 20261 assert(to!float(myFloat.max) == float.max); assert(to!float(myFloat.min_normal) == float.min_normal); alias myDouble = CustomFloat!(52, 11); static assert(myDouble.dig == double.dig); static assert(myDouble.mant_dig == double.mant_dig); assert(myDouble.max_10_exp == double.max_10_exp); static assert(myDouble.max_exp == double.max_exp); assert(myDouble.min_10_exp == double.min_10_exp); static assert(myDouble.min_exp == double.min_exp); // static assert(to!double(myDouble.epsilon) == double.epsilon); // doesn't work yet due to bug 20261 assert(to!double(myDouble.max) == double.max); assert(to!double(myDouble.min_normal) == double.min_normal); } // testing .dig @safe unittest { static assert(CustomFloat!(1, 6).dig == 0); static assert(CustomFloat!(9, 6).dig == 2); static assert(CustomFloat!(10, 5).dig == 3); static assert(CustomFloat!(10, 6, CustomFloatFlags.none).dig == 2); static assert(CustomFloat!(11, 5, CustomFloatFlags.none).dig == 3); static assert(CustomFloat!(64, 7).dig == 19); } // testing .mant_dig @safe unittest { static assert(CustomFloat!(10, 5).mant_dig == 11); static assert(CustomFloat!(10, 6, CustomFloatFlags.none).mant_dig == 10); } // testing .max_exp @safe unittest { static assert(CustomFloat!(1, 6).max_exp == 2^^5); static assert(CustomFloat!(2, 6, CustomFloatFlags.none).max_exp == 2^^5); static assert(CustomFloat!(5, 10).max_exp == 2^^9); static assert(CustomFloat!(6, 10, CustomFloatFlags.none).max_exp == 2^^9); static assert(CustomFloat!(2, 6, CustomFloatFlags.nan).max_exp == 2^^5); static assert(CustomFloat!(6, 10, CustomFloatFlags.nan).max_exp == 2^^9); } // testing .min_exp @safe unittest { static assert(CustomFloat!(1, 6).min_exp == -2^^5+3); static assert(CustomFloat!(5, 10).min_exp == -2^^9+3); static assert(CustomFloat!(2, 6, CustomFloatFlags.none).min_exp == -2^^5+1); static assert(CustomFloat!(6, 10, CustomFloatFlags.none).min_exp == -2^^9+1); static assert(CustomFloat!(2, 6, CustomFloatFlags.nan).min_exp == -2^^5+2); static assert(CustomFloat!(6, 10, CustomFloatFlags.nan).min_exp == -2^^9+2); static assert(CustomFloat!(2, 6, CustomFloatFlags.allowDenorm).min_exp == -2^^5+2); static assert(CustomFloat!(6, 10, CustomFloatFlags.allowDenorm).min_exp == -2^^9+2); } // testing .max_10_exp @safe unittest { assert(CustomFloat!(1, 6).max_10_exp == 9); assert(CustomFloat!(5, 10).max_10_exp == 154); assert(CustomFloat!(2, 6, CustomFloatFlags.none).max_10_exp == 9); assert(CustomFloat!(6, 10, CustomFloatFlags.none).max_10_exp == 154); assert(CustomFloat!(2, 6, CustomFloatFlags.nan).max_10_exp == 9); assert(CustomFloat!(6, 10, CustomFloatFlags.nan).max_10_exp == 154); } // testing .min_10_exp @safe unittest { assert(CustomFloat!(1, 6).min_10_exp == -9); assert(CustomFloat!(5, 10).min_10_exp == -153); assert(CustomFloat!(2, 6, CustomFloatFlags.none).min_10_exp == -9); assert(CustomFloat!(6, 10, CustomFloatFlags.none).min_10_exp == -154); assert(CustomFloat!(2, 6, CustomFloatFlags.nan).min_10_exp == -9); assert(CustomFloat!(6, 10, CustomFloatFlags.nan).min_10_exp == -153); assert(CustomFloat!(2, 6, CustomFloatFlags.allowDenorm).min_10_exp == -9); assert(CustomFloat!(6, 10, CustomFloatFlags.allowDenorm).min_10_exp == -153); } // testing .epsilon @safe unittest { // Tests don't work due to bug 20261. /* static assert(CustomFloat!(1,6).epsilon.sign == 0); static assert(CustomFloat!(1,6).epsilon.exponent == 30); static assert(CustomFloat!(1,6).epsilon.significand == 0); static assert(CustomFloat!(2,5).epsilon.sign == 0); static assert(CustomFloat!(2,5).epsilon.exponent == 13); static assert(CustomFloat!(2,5).epsilon.significand == 0); static assert(CustomFloat!(3,4).epsilon.sign == 0); static assert(CustomFloat!(3,4).epsilon.exponent == 4); static assert(CustomFloat!(3,4).epsilon.significand == 0); // the following epsilons are only available, when denormalized numbers are allowed: static assert(CustomFloat!(4,3).epsilon.sign == 0); static assert(CustomFloat!(4,3).epsilon.exponent == 0); static assert(CustomFloat!(4,3).epsilon.significand == 4); static assert(CustomFloat!(5,2).epsilon.sign == 0); static assert(CustomFloat!(5,2).epsilon.exponent == 0); static assert(CustomFloat!(5,2).epsilon.significand == 1); */ } // testing .max @safe unittest { static assert(CustomFloat!(5,2).max.sign == 0); static assert(CustomFloat!(5,2).max.exponent == 2); static assert(CustomFloat!(5,2).max.significand == 31); static assert(CustomFloat!(4,3).max.sign == 0); static assert(CustomFloat!(4,3).max.exponent == 6); static assert(CustomFloat!(4,3).max.significand == 15); static assert(CustomFloat!(3,4).max.sign == 0); static assert(CustomFloat!(3,4).max.exponent == 14); static assert(CustomFloat!(3,4).max.significand == 7); static assert(CustomFloat!(2,5).max.sign == 0); static assert(CustomFloat!(2,5).max.exponent == 30); static assert(CustomFloat!(2,5).max.significand == 3); static assert(CustomFloat!(1,6).max.sign == 0); static assert(CustomFloat!(1,6).max.exponent == 62); static assert(CustomFloat!(1,6).max.significand == 1); static assert(CustomFloat!(3,5, CustomFloatFlags.none).max.exponent == 31); static assert(CustomFloat!(3,5, CustomFloatFlags.none).max.significand == 7); } // testing .min_normal @safe unittest { static assert(CustomFloat!(5,2).min_normal.sign == 0); static assert(CustomFloat!(5,2).min_normal.exponent == 1); static assert(CustomFloat!(5,2).min_normal.significand == 0); static assert(CustomFloat!(4,3).min_normal.sign == 0); static assert(CustomFloat!(4,3).min_normal.exponent == 1); static assert(CustomFloat!(4,3).min_normal.significand == 0); static assert(CustomFloat!(3,4).min_normal.sign == 0); static assert(CustomFloat!(3,4).min_normal.exponent == 1); static assert(CustomFloat!(3,4).min_normal.significand == 0); static assert(CustomFloat!(2,5).min_normal.sign == 0); static assert(CustomFloat!(2,5).min_normal.exponent == 1); static assert(CustomFloat!(2,5).min_normal.significand == 0); static assert(CustomFloat!(1,6).min_normal.sign == 0); static assert(CustomFloat!(1,6).min_normal.exponent == 1); static assert(CustomFloat!(1,6).min_normal.significand == 0); static assert(CustomFloat!(3,5, CustomFloatFlags.none).min_normal.exponent == 0); static assert(CustomFloat!(3,5, CustomFloatFlags.none).min_normal.significand == 4); } private bool isCorrectCustomFloat(uint precision, uint exponentWidth, CustomFloatFlags flags) @safe pure nothrow @nogc { // Restrictions from bitfield // due to CustomFloat!80 support hack precision with 64 bits is handled specially auto length = (flags & flags.signed) + exponentWidth + ((precision == 64) ? 0 : precision); if (length != 8 && length != 16 && length != 32 && length != 64) return false; // mantissa needs to fit into real mantissa if (precision > real.mant_dig - 1 && precision != 64) return false; // exponent needs to fit into real exponent if (1L << exponentWidth - 1 > real.max_exp) return false; // mantissa should have at least one bit if (precision == 0) return false; // exponent should have at least one bit, in some cases two if (exponentWidth <= ((flags & (flags.allowDenorm | flags.infinity | flags.nan)) != 0)) return false; return true; } @safe pure nothrow @nogc unittest { assert(isCorrectCustomFloat(3,4,CustomFloatFlags.ieee)); assert(isCorrectCustomFloat(3,5,CustomFloatFlags.none)); assert(!isCorrectCustomFloat(3,3,CustomFloatFlags.ieee)); assert(isCorrectCustomFloat(64,7,CustomFloatFlags.ieee)); assert(!isCorrectCustomFloat(64,4,CustomFloatFlags.ieee)); assert(!isCorrectCustomFloat(508,3,CustomFloatFlags.ieee)); assert(!isCorrectCustomFloat(3,100,CustomFloatFlags.ieee)); assert(!isCorrectCustomFloat(0,7,CustomFloatFlags.ieee)); assert(!isCorrectCustomFloat(6,1,CustomFloatFlags.ieee)); assert(isCorrectCustomFloat(7,1,CustomFloatFlags.none)); assert(!isCorrectCustomFloat(8,0,CustomFloatFlags.none)); } /** Defines the fastest type to use when storing temporaries of a calculation intended to ultimately yield a result of type `F` (where `F` must be one of `float`, `double`, or $(D real)). When doing a multi-step computation, you may want to store intermediate results as `FPTemporary!F`. The necessity of `FPTemporary` stems from the optimized floating-point operations and registers present in virtually all processors. When adding numbers in the example above, the addition may in fact be done in `real` precision internally. In that case, storing the intermediate `result` in $(D double format) is not only less precise, it is also (surprisingly) slower, because a conversion from `real` to `double` is performed every pass through the loop. This being a lose-lose situation, `FPTemporary!F` has been defined as the $(I fastest) type to use for calculations at precision `F`. There is no need to define a type for the $(I most accurate) calculations, as that is always `real`. Finally, there is no guarantee that using `FPTemporary!F` will always be fastest, as the speed of floating-point calculations depends on very many factors. */ template FPTemporary(F) if (isFloatingPoint!F) { version (X86) alias FPTemporary = real; else alias FPTemporary = Unqual!F; } /// @safe unittest { import std.math : approxEqual; // Average numbers in an array double avg(in double[] a) { if (a.length == 0) return 0; FPTemporary!double result = 0; foreach (e; a) result += e; return result / a.length; } auto a = [1.0, 2.0, 3.0]; assert(approxEqual(avg(a), 2)); } /** Implements the $(HTTP tinyurl.com/2zb9yr, secant method) for finding a root of the function `fun` starting from points $(D [xn_1, x_n]) (ideally close to the root). `Num` may be `float`, `double`, or `real`. */ template secantMethod(alias fun) { import std.functional : unaryFun; Num secantMethod(Num)(Num xn_1, Num xn) { auto fxn = unaryFun!(fun)(xn_1), d = xn_1 - xn; typeof(fxn) fxn_1; xn = xn_1; while (!approxEqual(d, 0) && isFinite(d)) { xn_1 = xn; xn -= d; fxn_1 = fxn; fxn = unaryFun!(fun)(xn); d *= -fxn / (fxn - fxn_1); } return xn; } } /// @safe unittest { import std.math : approxEqual, cos; float f(float x) { return cos(x) - x*x*x; } auto x = secantMethod!(f)(0f, 1f); assert(approxEqual(x, 0.865474)); } @system unittest { // @system because of __gshared stderr import std.stdio; scope(failure) stderr.writeln("Failure testing secantMethod"); float f(float x) { return cos(x) - x*x*x; } immutable x = secantMethod!(f)(0f, 1f); assert(approxEqual(x, 0.865474)); auto d = &f; immutable y = secantMethod!(d)(0f, 1f); assert(approxEqual(y, 0.865474)); } /** * Return true if a and b have opposite sign. */ private bool oppositeSigns(T1, T2)(T1 a, T2 b) { return signbit(a) != signbit(b); } public: /** Find a real root of a real function f(x) via bracketing. * * Given a function `f` and a range `[a .. b]` such that `f(a)` * and `f(b)` have opposite signs or at least one of them equals ±0, * returns the value of `x` in * the range which is closest to a root of `f(x)`. If `f(x)` * has more than one root in the range, one will be chosen * arbitrarily. If `f(x)` returns NaN, NaN will be returned; * otherwise, this algorithm is guaranteed to succeed. * * Uses an algorithm based on TOMS748, which uses inverse cubic * interpolation whenever possible, otherwise reverting to parabolic * or secant interpolation. Compared to TOMS748, this implementation * improves worst-case performance by a factor of more than 100, and * typical performance by a factor of 2. For 80-bit reals, most * problems require 8 to 15 calls to `f(x)` to achieve full machine * precision. The worst-case performance (pathological cases) is * approximately twice the number of bits. * * References: "On Enclosing Simple Roots of Nonlinear Equations", * G. Alefeld, F.A. Potra, Yixun Shi, Mathematics of Computation 61, * pp733-744 (1993). Fortran code available from $(HTTP * www.netlib.org,www.netlib.org) as algorithm TOMS478. * */ T findRoot(T, DF, DT)(scope DF f, in T a, in T b, scope DT tolerance) //= (T a, T b) => false) if ( isFloatingPoint!T && is(typeof(tolerance(T.init, T.init)) : bool) && is(typeof(f(T.init)) == R, R) && isFloatingPoint!R ) { immutable fa = f(a); if (fa == 0) return a; immutable fb = f(b); if (fb == 0) return b; immutable r = findRoot(f, a, b, fa, fb, tolerance); // Return the first value if it is smaller or NaN return !(fabs(r[2]) > fabs(r[3])) ? r[0] : r[1]; } ///ditto T findRoot(T, DF)(scope DF f, in T a, in T b) { return findRoot(f, a, b, (T a, T b) => false); } /** Find root of a real function f(x) by bracketing, allowing the * termination condition to be specified. * * Params: * * f = Function to be analyzed * * ax = Left bound of initial range of `f` known to contain the * root. * * bx = Right bound of initial range of `f` known to contain the * root. * * fax = Value of `f(ax)`. * * fbx = Value of `f(bx)`. `fax` and `fbx` should have opposite signs. * (`f(ax)` and `f(bx)` are commonly known in advance.) * * * tolerance = Defines an early termination condition. Receives the * current upper and lower bounds on the root. The * delegate must return `true` when these bounds are * acceptable. If this function always returns `false`, * full machine precision will be achieved. * * Returns: * * A tuple consisting of two ranges. The first two elements are the * range (in `x`) of the root, while the second pair of elements * are the corresponding function values at those points. If an exact * root was found, both of the first two elements will contain the * root, and the second pair of elements will be 0. */ Tuple!(T, T, R, R) findRoot(T, R, DF, DT)(scope DF f, in T ax, in T bx, in R fax, in R fbx, scope DT tolerance) // = (T a, T b) => false) if ( isFloatingPoint!T && is(typeof(tolerance(T.init, T.init)) : bool) && is(typeof(f(T.init)) == R) && isFloatingPoint!R ) in { assert(!ax.isNaN() && !bx.isNaN(), "Limits must not be NaN"); assert(signbit(fax) != signbit(fbx), "Parameters must bracket the root."); } do { // Author: Don Clugston. This code is (heavily) modified from TOMS748 // (www.netlib.org). The changes to improve the worst-cast performance are // entirely original. T a, b, d; // [a .. b] is our current bracket. d is the third best guess. R fa, fb, fd; // Values of f at a, b, d. bool done = false; // Has a root been found? // Allow ax and bx to be provided in reverse order if (ax <= bx) { a = ax; fa = fax; b = bx; fb = fbx; } else { a = bx; fa = fbx; b = ax; fb = fax; } // Test the function at point c; update brackets accordingly void bracket(T c) { R fc = f(c); if (fc == 0 || fc.isNaN()) // Exact solution, or NaN { a = c; fa = fc; d = c; fd = fc; done = true; return; } // Determine new enclosing interval if (signbit(fa) != signbit(fc)) { d = b; fd = fb; b = c; fb = fc; } else { d = a; fd = fa; a = c; fa = fc; } } /* Perform a secant interpolation. If the result would lie on a or b, or if a and b differ so wildly in magnitude that the result would be meaningless, perform a bisection instead. */ static T secant_interpolate(T a, T b, R fa, R fb) { if (( ((a - b) == a) && b != 0) || (a != 0 && ((b - a) == b))) { // Catastrophic cancellation if (a == 0) a = copysign(T(0), b); else if (b == 0) b = copysign(T(0), a); else if (signbit(a) != signbit(b)) return 0; T c = ieeeMean(a, b); return c; } // avoid overflow if (b - a > T.max) return b / 2 + a / 2; if (fb - fa > R.max) return a - (b - a) / 2; T c = a - (fa / (fb - fa)) * (b - a); if (c == a || c == b) return (a + b) / 2; return c; } /* Uses 'numsteps' newton steps to approximate the zero in [a .. b] of the quadratic polynomial interpolating f(x) at a, b, and d. Returns: The approximate zero in [a .. b] of the quadratic polynomial. */ T newtonQuadratic(int numsteps) { // Find the coefficients of the quadratic polynomial. immutable T a0 = fa; immutable T a1 = (fb - fa)/(b - a); immutable T a2 = ((fd - fb)/(d - b) - a1)/(d - a); // Determine the starting point of newton steps. T c = oppositeSigns(a2, fa) ? a : b; // start the safeguarded newton steps. foreach (int i; 0 .. numsteps) { immutable T pc = a0 + (a1 + a2 * (c - b))*(c - a); immutable T pdc = a1 + a2*((2 * c) - (a + b)); if (pdc == 0) return a - a0 / a1; else c = c - pc / pdc; } return c; } // On the first iteration we take a secant step: if (fa == 0 || fa.isNaN()) { done = true; b = a; fb = fa; } else if (fb == 0 || fb.isNaN()) { done = true; a = b; fa = fb; } else { bracket(secant_interpolate(a, b, fa, fb)); } // Starting with the second iteration, higher-order interpolation can // be used. int itnum = 1; // Iteration number int baditer = 1; // Num bisections to take if an iteration is bad. T c, e; // e is our fourth best guess R fe; whileloop: while (!done && (b != nextUp(a)) && !tolerance(a, b)) { T a0 = a, b0 = b; // record the brackets // Do two higher-order (cubic or parabolic) interpolation steps. foreach (int QQ; 0 .. 2) { // Cubic inverse interpolation requires that // all four function values fa, fb, fd, and fe are distinct; // otherwise use quadratic interpolation. bool distinct = (fa != fb) && (fa != fd) && (fa != fe) && (fb != fd) && (fb != fe) && (fd != fe); // The first time, cubic interpolation is impossible. if (itnum<2) distinct = false; bool ok = distinct; if (distinct) { // Cubic inverse interpolation of f(x) at a, b, d, and e immutable q11 = (d - e) * fd / (fe - fd); immutable q21 = (b - d) * fb / (fd - fb); immutable q31 = (a - b) * fa / (fb - fa); immutable d21 = (b - d) * fd / (fd - fb); immutable d31 = (a - b) * fb / (fb - fa); immutable q22 = (d21 - q11) * fb / (fe - fb); immutable q32 = (d31 - q21) * fa / (fd - fa); immutable d32 = (d31 - q21) * fd / (fd - fa); immutable q33 = (d32 - q22) * fa / (fe - fa); c = a + (q31 + q32 + q33); if (c.isNaN() || (c <= a) || (c >= b)) { // DAC: If the interpolation predicts a or b, it's // probable that it's the actual root. Only allow this if // we're already close to the root. if (c == a && a - b != a) { c = nextUp(a); } else if (c == b && a - b != -b) { c = nextDown(b); } else { ok = false; } } } if (!ok) { // DAC: Alefeld doesn't explain why the number of newton steps // should vary. c = newtonQuadratic(distinct ? 3 : 2); if (c.isNaN() || (c <= a) || (c >= b)) { // Failure, try a secant step: c = secant_interpolate(a, b, fa, fb); } } ++itnum; e = d; fe = fd; bracket(c); if (done || ( b == nextUp(a)) || tolerance(a, b)) break whileloop; if (itnum == 2) continue whileloop; } // Now we take a double-length secant step: T u; R fu; if (fabs(fa) < fabs(fb)) { u = a; fu = fa; } else { u = b; fu = fb; } c = u - 2 * (fu / (fb - fa)) * (b - a); // DAC: If the secant predicts a value equal to an endpoint, it's // probably false. if (c == a || c == b || c.isNaN() || fabs(c - u) > (b - a) / 2) { if ((a-b) == a || (b-a) == b) { if ((a>0 && b<0) || (a<0 && b>0)) c = 0; else { if (a == 0) c = ieeeMean(copysign(T(0), b), b); else if (b == 0) c = ieeeMean(copysign(T(0), a), a); else c = ieeeMean(a, b); } } else { c = a + (b - a) / 2; } } e = d; fe = fd; bracket(c); if (done || (b == nextUp(a)) || tolerance(a, b)) break; // IMPROVE THE WORST-CASE PERFORMANCE // We must ensure that the bounds reduce by a factor of 2 // in binary space! every iteration. If we haven't achieved this // yet, or if we don't yet know what the exponent is, // perform a binary chop. if ((a == 0 || b == 0 || (fabs(a) >= T(0.5) * fabs(b) && fabs(b) >= T(0.5) * fabs(a))) && (b - a) < T(0.25) * (b0 - a0)) { baditer = 1; continue; } // DAC: If this happens on consecutive iterations, we probably have a // pathological function. Perform a number of bisections equal to the // total number of consecutive bad iterations. if ((b - a) < T(0.25) * (b0 - a0)) baditer = 1; foreach (int QQ; 0 .. baditer) { e = d; fe = fd; T w; if ((a>0 && b<0) || (a<0 && b>0)) w = 0; else { T usea = a; T useb = b; if (a == 0) usea = copysign(T(0), b); else if (b == 0) useb = copysign(T(0), a); w = ieeeMean(usea, useb); } bracket(w); } ++baditer; } return Tuple!(T, T, R, R)(a, b, fa, fb); } ///ditto Tuple!(T, T, R, R) findRoot(T, R, DF)(scope DF f, in T ax, in T bx, in R fax, in R fbx) { return findRoot(f, ax, bx, fax, fbx, (T a, T b) => false); } ///ditto T findRoot(T, R)(scope R delegate(T) f, in T a, in T b, scope bool delegate(T lo, T hi) tolerance = (T a, T b) => false) { return findRoot!(T, R delegate(T), bool delegate(T lo, T hi))(f, a, b, tolerance); } @safe nothrow unittest { int numProblems = 0; int numCalls; void testFindRoot(real delegate(real) @nogc @safe nothrow pure f , real x1, real x2) @nogc @safe nothrow pure { //numCalls=0; //++numProblems; assert(!x1.isNaN() && !x2.isNaN()); assert(signbit(x1) != signbit(x2)); auto result = findRoot(f, x1, x2, f(x1), f(x2), (real lo, real hi) { return false; }); auto flo = f(result[0]); auto fhi = f(result[1]); if (flo != 0) { assert(oppositeSigns(flo, fhi)); } } // Test functions real cubicfn(real x) @nogc @safe nothrow pure { //++numCalls; if (x>float.max) x = float.max; if (x<-double.max) x = -double.max; // This has a single real root at -59.286543284815 return 0.386*x*x*x + 23*x*x + 15.7*x + 525.2; } // Test a function with more than one root. real multisine(real x) { ++numCalls; return sin(x); } //testFindRoot( &multisine, 6, 90); //testFindRoot(&cubicfn, -100, 100); //testFindRoot( &cubicfn, -double.max, real.max); /* Tests from the paper: * "On Enclosing Simple Roots of Nonlinear Equations", G. Alefeld, F.A. Potra, * Yixun Shi, Mathematics of Computation 61, pp733-744 (1993). */ // Parameters common to many alefeld tests. int n; real ale_a, ale_b; int powercalls = 0; real power(real x) { ++powercalls; ++numCalls; return pow(x, n) + double.min_normal; } int [] power_nvals = [3, 5, 7, 9, 19, 25]; // Alefeld paper states that pow(x,n) is a very poor case, where bisection // outperforms his method, and gives total numcalls = // 921 for bisection (2.4 calls per bit), 1830 for Alefeld (4.76/bit), // 2624 for brent (6.8/bit) // ... but that is for double, not real80. // This poor performance seems mainly due to catastrophic cancellation, // which is avoided here by the use of ieeeMean(). // I get: 231 (0.48/bit). // IE this is 10X faster in Alefeld's worst case numProblems=0; foreach (k; power_nvals) { n = k; //testFindRoot(&power, -1, 10); } int powerProblems = numProblems; // Tests from Alefeld paper int [9] alefeldSums; real alefeld0(real x) { ++alefeldSums[0]; ++numCalls; real q = sin(x) - x/2; for (int i=1; i<20; ++i) q+=(2*i-5.0)*(2*i-5.0)/((x-i*i)*(x-i*i)*(x-i*i)); return q; } real alefeld1(real x) { ++numCalls; ++alefeldSums[1]; return ale_a*x + exp(ale_b * x); } real alefeld2(real x) { ++numCalls; ++alefeldSums[2]; return pow(x, n) - ale_a; } real alefeld3(real x) { ++numCalls; ++alefeldSums[3]; return (1.0 +pow(1.0L-n, 2))*x - pow(1.0L-n*x, 2); } real alefeld4(real x) { ++numCalls; ++alefeldSums[4]; return x*x - pow(1-x, n); } real alefeld5(real x) { ++numCalls; ++alefeldSums[5]; return (1+pow(1.0L-n, 4))*x - pow(1.0L-n*x, 4); } real alefeld6(real x) { ++numCalls; ++alefeldSums[6]; return exp(-n*x)*(x-1.01L) + pow(x, n); } real alefeld7(real x) { ++numCalls; ++alefeldSums[7]; return (n*x-1)/((n-1)*x); } numProblems=0; //testFindRoot(&alefeld0, PI_2, PI); for (n=1; n <= 10; ++n) { //testFindRoot(&alefeld0, n*n+1e-9L, (n+1)*(n+1)-1e-9L); } ale_a = -40; ale_b = -1; //testFindRoot(&alefeld1, -9, 31); ale_a = -100; ale_b = -2; //testFindRoot(&alefeld1, -9, 31); ale_a = -200; ale_b = -3; //testFindRoot(&alefeld1, -9, 31); int [] nvals_3 = [1, 2, 5, 10, 15, 20]; int [] nvals_5 = [1, 2, 4, 5, 8, 15, 20]; int [] nvals_6 = [1, 5, 10, 15, 20]; int [] nvals_7 = [2, 5, 15, 20]; for (int i=4; i<12; i+=2) { n = i; ale_a = 0.2; //testFindRoot(&alefeld2, 0, 5); ale_a=1; //testFindRoot(&alefeld2, 0.95, 4.05); //testFindRoot(&alefeld2, 0, 1.5); } foreach (i; nvals_3) { n=i; //testFindRoot(&alefeld3, 0, 1); } foreach (i; nvals_3) { n=i; //testFindRoot(&alefeld4, 0, 1); } foreach (i; nvals_5) { n=i; //testFindRoot(&alefeld5, 0, 1); } foreach (i; nvals_6) { n=i; //testFindRoot(&alefeld6, 0, 1); } foreach (i; nvals_7) { n=i; //testFindRoot(&alefeld7, 0.01L, 1); } real worstcase(real x) { ++numCalls; return x<0.3*real.max? -0.999e-3 : 1.0; } //testFindRoot(&worstcase, -real.max, real.max); // just check that the double + float cases compile //findRoot((double x){ return 0.0; }, -double.max, double.max); //findRoot((float x){ return 0.0f; }, -float.max, float.max); /* int grandtotal=0; foreach (calls; alefeldSums) { grandtotal+=calls; } grandtotal-=2*numProblems; printf("\nALEFELD TOTAL = %d avg = %f (alefeld avg=19.3 for double)\n", grandtotal, (1.0*grandtotal)/numProblems); powercalls -= 2*powerProblems; printf("POWER TOTAL = %d avg = %f ", powercalls, (1.0*powercalls)/powerProblems); */ //Issue 14231 auto xp = findRoot((float x) => x, 0f, 1f); auto xn = findRoot((float x) => x, -1f, -0f); } //regression control @system unittest { // @system due to the case in the 2nd line static assert(__traits(compiles, findRoot((float x)=>cast(real) x, float.init, float.init))); static assert(__traits(compiles, findRoot!real((x)=>cast(double) x, real.init, real.init))); static assert(__traits(compiles, findRoot((real x)=>cast(double) x, real.init, real.init))); } /++ Find a real minimum of a real function `f(x)` via bracketing. Given a function `f` and a range `(ax .. bx)`, returns the value of `x` in the range which is closest to a minimum of `f(x)`. `f` is never evaluted at the endpoints of `ax` and `bx`. If `f(x)` has more than one minimum in the range, one will be chosen arbitrarily. If `f(x)` returns NaN or -Infinity, `(x, f(x), NaN)` will be returned; otherwise, this algorithm is guaranteed to succeed. Params: f = Function to be analyzed ax = Left bound of initial range of f known to contain the minimum. bx = Right bound of initial range of f known to contain the minimum. relTolerance = Relative tolerance. absTolerance = Absolute tolerance. Preconditions: `ax` and `bx` shall be finite reals. $(BR) `relTolerance` shall be normal positive real. $(BR) `absTolerance` shall be normal positive real no less then `T.epsilon*2`. Returns: A tuple consisting of `x`, `y = f(x)` and `error = 3 * (absTolerance * fabs(x) + relTolerance)`. The method used is a combination of golden section search and successive parabolic interpolation. Convergence is never much slower than that for a Fibonacci search. References: "Algorithms for Minimization without Derivatives", Richard Brent, Prentice-Hall, Inc. (1973) See_Also: $(LREF findRoot), $(REF isNormal, std,math) +/ Tuple!(T, "x", Unqual!(ReturnType!DF), "y", T, "error") findLocalMin(T, DF)( scope DF f, in T ax, in T bx, in T relTolerance = sqrt(T.epsilon), in T absTolerance = sqrt(T.epsilon), ) if (isFloatingPoint!T && __traits(compiles, {T _ = DF.init(T.init);})) in { assert(isFinite(ax), "ax is not finite"); assert(isFinite(bx), "bx is not finite"); assert(isNormal(relTolerance), "relTolerance is not normal floating point number"); assert(isNormal(absTolerance), "absTolerance is not normal floating point number"); assert(relTolerance >= 0, "absTolerance is not positive"); assert(absTolerance >= T.epsilon*2, "absTolerance is not greater then `2*T.epsilon`"); } out (result) { assert(isFinite(result.x)); } do { alias R = Unqual!(CommonType!(ReturnType!DF, T)); // c is the squared inverse of the golden ratio // (3 - sqrt(5))/2 // Value obtained from Wolfram Alpha. enum T c = 0x0.61c8864680b583ea0c633f9fa31237p+0L; enum T cm1 = 0x0.9e3779b97f4a7c15f39cc0605cedc8p+0L; R tolerance; T a = ax > bx ? bx : ax; T b = ax > bx ? ax : bx; // sequence of declarations suitable for SIMD instructions T v = a * cm1 + b * c; assert(isFinite(v)); R fv = f(v); if (isNaN(fv) || fv == -T.infinity) { return typeof(return)(v, fv, T.init); } T w = v; R fw = fv; T x = v; R fx = fv; size_t i; for (R d = 0, e = 0;;) { i++; T m = (a + b) / 2; // This fix is not part of the original algorithm if (!isFinite(m)) // fix infinity loop. Issue can be reproduced in R. { m = a / 2 + b / 2; if (!isFinite(m)) // fast-math compiler switch is enabled { //SIMD instructions can be used by compiler, do not reduce declarations int a_exp = void; int b_exp = void; immutable an = frexp(a, a_exp); immutable bn = frexp(b, b_exp); immutable am = ldexp(an, a_exp-1); immutable bm = ldexp(bn, b_exp-1); m = am + bm; if (!isFinite(m)) // wrong input: constraints are disabled in release mode { return typeof(return).init; } } } tolerance = absTolerance * fabs(x) + relTolerance; immutable t2 = tolerance * 2; // check stopping criterion if (!(fabs(x - m) > t2 - (b - a) / 2)) { break; } R p = 0; R q = 0; R r = 0; // fit parabola if (fabs(e) > tolerance) { immutable xw = x - w; immutable fxw = fx - fw; immutable xv = x - v; immutable fxv = fx - fv; immutable xwfxv = xw * fxv; immutable xvfxw = xv * fxw; p = xv * xvfxw - xw * xwfxv; q = (xvfxw - xwfxv) * 2; if (q > 0) p = -p; else q = -q; r = e; e = d; } T u; // a parabolic-interpolation step if (fabs(p) < fabs(q * r / 2) && p > q * (a - x) && p < q * (b - x)) { d = p / q; u = x + d; // f must not be evaluated too close to a or b if (u - a < t2 || b - u < t2) d = x < m ? tolerance : -tolerance; } // a golden-section step else { e = (x < m ? b : a) - x; d = c * e; } // f must not be evaluated too close to x u = x + (fabs(d) >= tolerance ? d : d > 0 ? tolerance : -tolerance); immutable fu = f(u); if (isNaN(fu) || fu == -T.infinity) { return typeof(return)(u, fu, T.init); } // update a, b, v, w, and x if (fu <= fx) { (u < x ? b : a) = x; v = w; fv = fw; w = x; fw = fx; x = u; fx = fu; } else { (u < x ? a : b) = u; if (fu <= fw || w == x) { v = w; fv = fw; w = u; fw = fu; } else if (fu <= fv || v == x || v == w) { // do not remove this braces v = u; fv = fu; } } } return typeof(return)(x, fx, tolerance * 3); } /// @safe unittest { import std.math : approxEqual; auto ret = findLocalMin((double x) => (x-4)^^2, -1e7, 1e7); assert(ret.x.approxEqual(4.0)); assert(ret.y.approxEqual(0.0)); } @safe unittest { import std.meta : AliasSeq; static foreach (T; AliasSeq!(double, float, real)) { { auto ret = findLocalMin!T((T x) => (x-4)^^2, T.min_normal, 1e7); assert(ret.x.approxEqual(T(4))); assert(ret.y.approxEqual(T(0))); } { auto ret = findLocalMin!T((T x) => fabs(x-1), -T.max/4, T.max/4, T.min_normal, 2*T.epsilon); assert(approxEqual(ret.x, T(1))); assert(approxEqual(ret.y, T(0))); assert(ret.error <= 10 * T.epsilon); } { auto ret = findLocalMin!T((T x) => T.init, 0, 1, T.min_normal, 2*T.epsilon); assert(!ret.x.isNaN); assert(ret.y.isNaN); assert(ret.error.isNaN); } { auto ret = findLocalMin!T((T x) => log(x), 0, 1, T.min_normal, 2*T.epsilon); assert(ret.error < 3.00001 * ((2*T.epsilon)*fabs(ret.x)+ T.min_normal)); assert(ret.x >= 0 && ret.x <= ret.error); } { auto ret = findLocalMin!T((T x) => log(x), 0, T.max, T.min_normal, 2*T.epsilon); assert(ret.y < -18); assert(ret.error < 5e-08); assert(ret.x >= 0 && ret.x <= ret.error); } { auto ret = findLocalMin!T((T x) => -fabs(x), -1, 1, T.min_normal, 2*T.epsilon); assert(ret.x.fabs.approxEqual(T(1))); assert(ret.y.fabs.approxEqual(T(1))); assert(ret.error.approxEqual(T(0))); } } } /** Computes $(LINK2 https://en.wikipedia.org/wiki/Euclidean_distance, Euclidean distance) between input ranges `a` and `b`. The two ranges must have the same length. The three-parameter version stops computation as soon as the distance is greater than or equal to `limit` (this is useful to save computation if a small distance is sought). */ CommonType!(ElementType!(Range1), ElementType!(Range2)) euclideanDistance(Range1, Range2)(Range1 a, Range2 b) if (isInputRange!(Range1) && isInputRange!(Range2)) { enum bool haveLen = hasLength!(Range1) && hasLength!(Range2); static if (haveLen) assert(a.length == b.length); Unqual!(typeof(return)) result = 0; for (; !a.empty; a.popFront(), b.popFront()) { immutable t = a.front - b.front; result += t * t; } static if (!haveLen) assert(b.empty); return sqrt(result); } /// Ditto CommonType!(ElementType!(Range1), ElementType!(Range2)) euclideanDistance(Range1, Range2, F)(Range1 a, Range2 b, F limit) if (isInputRange!(Range1) && isInputRange!(Range2)) { limit *= limit; enum bool haveLen = hasLength!(Range1) && hasLength!(Range2); static if (haveLen) assert(a.length == b.length); Unqual!(typeof(return)) result = 0; for (; ; a.popFront(), b.popFront()) { if (a.empty) { static if (!haveLen) assert(b.empty); break; } immutable t = a.front - b.front; result += t * t; if (result >= limit) break; } return sqrt(result); } @safe unittest { import std.meta : AliasSeq; static foreach (T; AliasSeq!(double, const double, immutable double)) {{ T[] a = [ 1.0, 2.0, ]; T[] b = [ 4.0, 6.0, ]; assert(euclideanDistance(a, b) == 5); assert(euclideanDistance(a, b, 6) == 5); assert(euclideanDistance(a, b, 5) == 5); assert(euclideanDistance(a, b, 4) == 5); assert(euclideanDistance(a, b, 2) == 3); }} } /** Computes the $(LINK2 https://en.wikipedia.org/wiki/Dot_product, dot product) of input ranges `a` and $(D b). The two ranges must have the same length. If both ranges define length, the check is done once; otherwise, it is done at each iteration. */ CommonType!(ElementType!(Range1), ElementType!(Range2)) dotProduct(Range1, Range2)(Range1 a, Range2 b) if (isInputRange!(Range1) && isInputRange!(Range2) && !(isArray!(Range1) && isArray!(Range2))) { enum bool haveLen = hasLength!(Range1) && hasLength!(Range2); static if (haveLen) assert(a.length == b.length); Unqual!(typeof(return)) result = 0; for (; !a.empty; a.popFront(), b.popFront()) { result += a.front * b.front; } static if (!haveLen) assert(b.empty); return result; } /// Ditto CommonType!(F1, F2) dotProduct(F1, F2)(in F1[] avector, in F2[] bvector) { immutable n = avector.length; assert(n == bvector.length); auto avec = avector.ptr, bvec = bvector.ptr; Unqual!(typeof(return)) sum0 = 0, sum1 = 0; const all_endp = avec + n; const smallblock_endp = avec + (n & ~3); const bigblock_endp = avec + (n & ~15); for (; avec != bigblock_endp; avec += 16, bvec += 16) { sum0 += avec[0] * bvec[0]; sum1 += avec[1] * bvec[1]; sum0 += avec[2] * bvec[2]; sum1 += avec[3] * bvec[3]; sum0 += avec[4] * bvec[4]; sum1 += avec[5] * bvec[5]; sum0 += avec[6] * bvec[6]; sum1 += avec[7] * bvec[7]; sum0 += avec[8] * bvec[8]; sum1 += avec[9] * bvec[9]; sum0 += avec[10] * bvec[10]; sum1 += avec[11] * bvec[11]; sum0 += avec[12] * bvec[12]; sum1 += avec[13] * bvec[13]; sum0 += avec[14] * bvec[14]; sum1 += avec[15] * bvec[15]; } for (; avec != smallblock_endp; avec += 4, bvec += 4) { sum0 += avec[0] * bvec[0]; sum1 += avec[1] * bvec[1]; sum0 += avec[2] * bvec[2]; sum1 += avec[3] * bvec[3]; } sum0 += sum1; /* Do trailing portion in naive loop. */ while (avec != all_endp) { sum0 += *avec * *bvec; ++avec; ++bvec; } return sum0; } /// ditto F dotProduct(F, uint N)(const ref scope F[N] a, const ref scope F[N] b) if (N <= 16) { F sum0 = 0; F sum1 = 0; static foreach (i; 0 .. N / 2) { sum0 += a[i*2] * b[i*2]; sum1 += a[i*2+1] * b[i*2+1]; } static if (N % 2 == 1) { sum0 += a[N-1] * b[N-1]; } return sum0 + sum1; } @system unittest { // @system due to dotProduct and assertCTFEable import std.exception : assertCTFEable; import std.meta : AliasSeq; static foreach (T; AliasSeq!(double, const double, immutable double)) {{ T[] a = [ 1.0, 2.0, ]; T[] b = [ 4.0, 6.0, ]; assert(dotProduct(a, b) == 16); assert(dotProduct([1, 3, -5], [4, -2, -1]) == 3); // Test with fixed-length arrays. T[2] c = [ 1.0, 2.0, ]; T[2] d = [ 4.0, 6.0, ]; assert(dotProduct(c, d) == 16); T[3] e = [1, 3, -5]; T[3] f = [4, -2, -1]; assert(dotProduct(e, f) == 3); }} // Make sure the unrolled loop codepath gets tested. static const x = [1.0, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22]; static const y = [2.0, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23]; assertCTFEable!({ assert(dotProduct(x, y) == 4048); }); } /** Computes the $(LINK2 https://en.wikipedia.org/wiki/Cosine_similarity, cosine similarity) of input ranges `a` and $(D b). The two ranges must have the same length. If both ranges define length, the check is done once; otherwise, it is done at each iteration. If either range has all-zero elements, return 0. */ CommonType!(ElementType!(Range1), ElementType!(Range2)) cosineSimilarity(Range1, Range2)(Range1 a, Range2 b) if (isInputRange!(Range1) && isInputRange!(Range2)) { enum bool haveLen = hasLength!(Range1) && hasLength!(Range2); static if (haveLen) assert(a.length == b.length); Unqual!(typeof(return)) norma = 0, normb = 0, dotprod = 0; for (; !a.empty; a.popFront(), b.popFront()) { immutable t1 = a.front, t2 = b.front; norma += t1 * t1; normb += t2 * t2; dotprod += t1 * t2; } static if (!haveLen) assert(b.empty); if (norma == 0 || normb == 0) return 0; return dotprod / sqrt(norma * normb); } @safe unittest { import std.meta : AliasSeq; static foreach (T; AliasSeq!(double, const double, immutable double)) {{ T[] a = [ 1.0, 2.0, ]; T[] b = [ 4.0, 3.0, ]; assert(approxEqual( cosineSimilarity(a, b), 10.0 / sqrt(5.0 * 25), 0.01)); }} } /** Normalizes values in `range` by multiplying each element with a number chosen such that values sum up to `sum`. If elements in $(D range) sum to zero, assigns $(D sum / range.length) to all. Normalization makes sense only if all elements in `range` are positive. `normalize` assumes that is the case without checking it. Returns: `true` if normalization completed normally, `false` if all elements in `range` were zero or if `range` is empty. */ bool normalize(R)(R range, ElementType!(R) sum = 1) if (isForwardRange!(R)) { ElementType!(R) s = 0; // Step 1: Compute sum and length of the range static if (hasLength!(R)) { const length = range.length; foreach (e; range) { s += e; } } else { uint length = 0; foreach (e; range) { s += e; ++length; } } // Step 2: perform normalization if (s == 0) { if (length) { immutable f = sum / range.length; foreach (ref e; range) e = f; } return false; } // The path most traveled assert(s >= 0); immutable f = sum / s; foreach (ref e; range) e *= f; return true; } /// @safe unittest { double[] a = []; assert(!normalize(a)); a = [ 1.0, 3.0 ]; assert(normalize(a)); assert(a == [ 0.25, 0.75 ]); a = [ 0.0, 0.0 ]; assert(!normalize(a)); assert(a == [ 0.5, 0.5 ]); } /** Compute the sum of binary logarithms of the input range `r`. The error of this method is much smaller than with a naive sum of log2. */ ElementType!Range sumOfLog2s(Range)(Range r) if (isInputRange!Range && isFloatingPoint!(ElementType!Range)) { long exp = 0; Unqual!(typeof(return)) x = 1; foreach (e; r) { if (e < 0) return typeof(return).nan; int lexp = void; x *= frexp(e, lexp); exp += lexp; if (x < 0.5) { x *= 2; exp--; } } return exp + log2(x); } /// @safe unittest { import std.math : isNaN; assert(sumOfLog2s(new double[0]) == 0); assert(sumOfLog2s([0.0L]) == -real.infinity); assert(sumOfLog2s([-0.0L]) == -real.infinity); assert(sumOfLog2s([2.0L]) == 1); assert(sumOfLog2s([-2.0L]).isNaN()); assert(sumOfLog2s([real.nan]).isNaN()); assert(sumOfLog2s([-real.nan]).isNaN()); assert(sumOfLog2s([real.infinity]) == real.infinity); assert(sumOfLog2s([-real.infinity]).isNaN()); assert(sumOfLog2s([ 0.25, 0.25, 0.25, 0.125 ]) == -9); } /** Computes $(LINK2 https://en.wikipedia.org/wiki/Entropy_(information_theory), _entropy) of input range `r` in bits. This function assumes (without checking) that the values in `r` are all in $(D [0, 1]). For the entropy to be meaningful, often `r` should be normalized too (i.e., its values should sum to 1). The two-parameter version stops evaluating as soon as the intermediate result is greater than or equal to `max`. */ ElementType!Range entropy(Range)(Range r) if (isInputRange!Range) { Unqual!(typeof(return)) result = 0.0; for (;!r.empty; r.popFront) { if (!r.front) continue; result -= r.front * log2(r.front); } return result; } /// Ditto ElementType!Range entropy(Range, F)(Range r, F max) if (isInputRange!Range && !is(CommonType!(ElementType!Range, F) == void)) { Unqual!(typeof(return)) result = 0.0; for (;!r.empty; r.popFront) { if (!r.front) continue; result -= r.front * log2(r.front); if (result >= max) break; } return result; } @safe unittest { import std.meta : AliasSeq; static foreach (T; AliasSeq!(double, const double, immutable double)) {{ T[] p = [ 0.0, 0, 0, 1 ]; assert(entropy(p) == 0); p = [ 0.25, 0.25, 0.25, 0.25 ]; assert(entropy(p) == 2); assert(entropy(p, 1) == 1); }} } /** Computes the $(LINK2 https://en.wikipedia.org/wiki/Kullback%E2%80%93Leibler_divergence, Kullback-Leibler divergence) between input ranges `a` and `b`, which is the sum $(D ai * log(ai / bi)). The base of logarithm is 2. The ranges are assumed to contain elements in $(D [0, 1]). Usually the ranges are normalized probability distributions, but this is not required or checked by $(D kullbackLeiblerDivergence). If any element `bi` is zero and the corresponding element `ai` nonzero, returns infinity. (Otherwise, if $(D ai == 0 && bi == 0), the term $(D ai * log(ai / bi)) is considered zero.) If the inputs are normalized, the result is positive. */ CommonType!(ElementType!Range1, ElementType!Range2) kullbackLeiblerDivergence(Range1, Range2)(Range1 a, Range2 b) if (isInputRange!(Range1) && isInputRange!(Range2)) { enum bool haveLen = hasLength!(Range1) && hasLength!(Range2); static if (haveLen) assert(a.length == b.length); Unqual!(typeof(return)) result = 0; for (; !a.empty; a.popFront(), b.popFront()) { immutable t1 = a.front; if (t1 == 0) continue; immutable t2 = b.front; if (t2 == 0) return result.infinity; assert(t1 > 0 && t2 > 0); result += t1 * log2(t1 / t2); } static if (!haveLen) assert(b.empty); return result; } /// @safe unittest { import std.math : approxEqual; double[] p = [ 0.0, 0, 0, 1 ]; assert(kullbackLeiblerDivergence(p, p) == 0); double[] p1 = [ 0.25, 0.25, 0.25, 0.25 ]; assert(kullbackLeiblerDivergence(p1, p1) == 0); assert(kullbackLeiblerDivergence(p, p1) == 2); assert(kullbackLeiblerDivergence(p1, p) == double.infinity); double[] p2 = [ 0.2, 0.2, 0.2, 0.4 ]; assert(approxEqual(kullbackLeiblerDivergence(p1, p2), 0.0719281)); assert(approxEqual(kullbackLeiblerDivergence(p2, p1), 0.0780719)); } /** Computes the $(LINK2 https://en.wikipedia.org/wiki/Jensen%E2%80%93Shannon_divergence, Jensen-Shannon divergence) between `a` and $(D b), which is the sum $(D (ai * log(2 * ai / (ai + bi)) + bi * log(2 * bi / (ai + bi))) / 2). The base of logarithm is 2. The ranges are assumed to contain elements in $(D [0, 1]). Usually the ranges are normalized probability distributions, but this is not required or checked by `jensenShannonDivergence`. If the inputs are normalized, the result is bounded within $(D [0, 1]). The three-parameter version stops evaluations as soon as the intermediate result is greater than or equal to `limit`. */ CommonType!(ElementType!Range1, ElementType!Range2) jensenShannonDivergence(Range1, Range2)(Range1 a, Range2 b) if (isInputRange!Range1 && isInputRange!Range2 && is(CommonType!(ElementType!Range1, ElementType!Range2))) { enum bool haveLen = hasLength!(Range1) && hasLength!(Range2); static if (haveLen) assert(a.length == b.length); Unqual!(typeof(return)) result = 0; for (; !a.empty; a.popFront(), b.popFront()) { immutable t1 = a.front; immutable t2 = b.front; immutable avg = (t1 + t2) / 2; if (t1 != 0) { result += t1 * log2(t1 / avg); } if (t2 != 0) { result += t2 * log2(t2 / avg); } } static if (!haveLen) assert(b.empty); return result / 2; } /// Ditto CommonType!(ElementType!Range1, ElementType!Range2) jensenShannonDivergence(Range1, Range2, F)(Range1 a, Range2 b, F limit) if (isInputRange!Range1 && isInputRange!Range2 && is(typeof(CommonType!(ElementType!Range1, ElementType!Range2).init >= F.init) : bool)) { enum bool haveLen = hasLength!(Range1) && hasLength!(Range2); static if (haveLen) assert(a.length == b.length); Unqual!(typeof(return)) result = 0; limit *= 2; for (; !a.empty; a.popFront(), b.popFront()) { immutable t1 = a.front; immutable t2 = b.front; immutable avg = (t1 + t2) / 2; if (t1 != 0) { result += t1 * log2(t1 / avg); } if (t2 != 0) { result += t2 * log2(t2 / avg); } if (result >= limit) break; } static if (!haveLen) assert(b.empty); return result / 2; } /// @safe unittest { import std.math : approxEqual; double[] p = [ 0.0, 0, 0, 1 ]; assert(jensenShannonDivergence(p, p) == 0); double[] p1 = [ 0.25, 0.25, 0.25, 0.25 ]; assert(jensenShannonDivergence(p1, p1) == 0); assert(approxEqual(jensenShannonDivergence(p1, p), 0.548795)); double[] p2 = [ 0.2, 0.2, 0.2, 0.4 ]; assert(approxEqual(jensenShannonDivergence(p1, p2), 0.0186218)); assert(approxEqual(jensenShannonDivergence(p2, p1), 0.0186218)); assert(approxEqual(jensenShannonDivergence(p2, p1, 0.005), 0.00602366)); } /** The so-called "all-lengths gap-weighted string kernel" computes a similarity measure between `s` and `t` based on all of their common subsequences of all lengths. Gapped subsequences are also included. To understand what $(D gapWeightedSimilarity(s, t, lambda)) computes, consider first the case $(D lambda = 1) and the strings $(D s = ["Hello", "brave", "new", "world"]) and $(D t = ["Hello", "new", "world"]). In that case, `gapWeightedSimilarity` counts the following matches: $(OL $(LI three matches of length 1, namely `"Hello"`, `"new"`, and `"world"`;) $(LI three matches of length 2, namely ($(D "Hello", "new")), ($(D "Hello", "world")), and ($(D "new", "world"));) $(LI one match of length 3, namely ($(D "Hello", "new", "world")).)) The call $(D gapWeightedSimilarity(s, t, 1)) simply counts all of these matches and adds them up, returning 7. ---- string[] s = ["Hello", "brave", "new", "world"]; string[] t = ["Hello", "new", "world"]; assert(gapWeightedSimilarity(s, t, 1) == 7); ---- Note how the gaps in matching are simply ignored, for example ($(D "Hello", "new")) is deemed as good a match as ($(D "new", "world")). This may be too permissive for some applications. To eliminate gapped matches entirely, use $(D lambda = 0): ---- string[] s = ["Hello", "brave", "new", "world"]; string[] t = ["Hello", "new", "world"]; assert(gapWeightedSimilarity(s, t, 0) == 4); ---- The call above eliminated the gapped matches ($(D "Hello", "new")), ($(D "Hello", "world")), and ($(D "Hello", "new", "world")) from the tally. That leaves only 4 matches. The most interesting case is when gapped matches still participate in the result, but not as strongly as ungapped matches. The result will be a smooth, fine-grained similarity measure between the input strings. This is where values of `lambda` between 0 and 1 enter into play: gapped matches are $(I exponentially penalized with the number of gaps) with base `lambda`. This means that an ungapped match adds 1 to the return value; a match with one gap in either string adds `lambda` to the return value; ...; a match with a total of `n` gaps in both strings adds $(D pow(lambda, n)) to the return value. In the example above, we have 4 matches without gaps, 2 matches with one gap, and 1 match with three gaps. The latter match is ($(D "Hello", "world")), which has two gaps in the first string and one gap in the second string, totaling to three gaps. Summing these up we get $(D 4 + 2 * lambda + pow(lambda, 3)). ---- string[] s = ["Hello", "brave", "new", "world"]; string[] t = ["Hello", "new", "world"]; assert(gapWeightedSimilarity(s, t, 0.5) == 4 + 0.5 * 2 + 0.125); ---- `gapWeightedSimilarity` is useful wherever a smooth similarity measure between sequences allowing for approximate matches is needed. The examples above are given with words, but any sequences with elements comparable for equality are allowed, e.g. characters or numbers. `gapWeightedSimilarity` uses a highly optimized dynamic programming implementation that needs $(D 16 * min(s.length, t.length)) extra bytes of memory and $(BIGOH s.length * t.length) time to complete. */ F gapWeightedSimilarity(alias comp = "a == b", R1, R2, F)(R1 s, R2 t, F lambda) if (isRandomAccessRange!(R1) && hasLength!(R1) && isRandomAccessRange!(R2) && hasLength!(R2)) { import core.exception : onOutOfMemoryError; import core.stdc.stdlib : malloc, free; import std.algorithm.mutation : swap; import std.functional : binaryFun; if (s.length < t.length) return gapWeightedSimilarity(t, s, lambda); if (!t.length) return 0; auto dpvi = cast(F*) malloc(F.sizeof * 2 * t.length); if (!dpvi) onOutOfMemoryError(); auto dpvi1 = dpvi + t.length; scope(exit) free(dpvi < dpvi1 ? dpvi : dpvi1); dpvi[0 .. t.length] = 0; dpvi1[0] = 0; immutable lambda2 = lambda * lambda; F result = 0; foreach (i; 0 .. s.length) { const si = s[i]; for (size_t j = 0;;) { F dpsij = void; if (binaryFun!(comp)(si, t[j])) { dpsij = 1 + dpvi[j]; result += dpsij; } else { dpsij = 0; } immutable j1 = j + 1; if (j1 == t.length) break; dpvi1[j1] = dpsij + lambda * (dpvi1[j] + dpvi[j1]) - lambda2 * dpvi[j]; j = j1; } swap(dpvi, dpvi1); } return result; } @system unittest { string[] s = ["Hello", "brave", "new", "world"]; string[] t = ["Hello", "new", "world"]; assert(gapWeightedSimilarity(s, t, 1) == 7); assert(gapWeightedSimilarity(s, t, 0) == 4); assert(gapWeightedSimilarity(s, t, 0.5) == 4 + 2 * 0.5 + 0.125); } /** The similarity per `gapWeightedSimilarity` has an issue in that it grows with the lengths of the two strings, even though the strings are not actually very similar. For example, the range $(D ["Hello", "world"]) is increasingly similar with the range $(D ["Hello", "world", "world", "world",...]) as more instances of `"world"` are appended. To prevent that, `gapWeightedSimilarityNormalized` computes a normalized version of the similarity that is computed as $(D gapWeightedSimilarity(s, t, lambda) / sqrt(gapWeightedSimilarity(s, t, lambda) * gapWeightedSimilarity(s, t, lambda))). The function `gapWeightedSimilarityNormalized` (a so-called normalized kernel) is bounded in $(D [0, 1]), reaches `0` only for ranges that don't match in any position, and `1` only for identical ranges. The optional parameters `sSelfSim` and `tSelfSim` are meant for avoiding duplicate computation. Many applications may have already computed $(D gapWeightedSimilarity(s, s, lambda)) and/or $(D gapWeightedSimilarity(t, t, lambda)). In that case, they can be passed as `sSelfSim` and `tSelfSim`, respectively. */ Select!(isFloatingPoint!(F), F, double) gapWeightedSimilarityNormalized(alias comp = "a == b", R1, R2, F) (R1 s, R2 t, F lambda, F sSelfSim = F.init, F tSelfSim = F.init) if (isRandomAccessRange!(R1) && hasLength!(R1) && isRandomAccessRange!(R2) && hasLength!(R2)) { static bool uncomputed(F n) { static if (isFloatingPoint!(F)) return isNaN(n); else return n == n.init; } if (uncomputed(sSelfSim)) sSelfSim = gapWeightedSimilarity!(comp)(s, s, lambda); if (sSelfSim == 0) return 0; if (uncomputed(tSelfSim)) tSelfSim = gapWeightedSimilarity!(comp)(t, t, lambda); if (tSelfSim == 0) return 0; return gapWeightedSimilarity!(comp)(s, t, lambda) / sqrt(cast(typeof(return)) sSelfSim * tSelfSim); } /// @system unittest { import std.math : approxEqual, sqrt; string[] s = ["Hello", "brave", "new", "world"]; string[] t = ["Hello", "new", "world"]; assert(gapWeightedSimilarity(s, s, 1) == 15); assert(gapWeightedSimilarity(t, t, 1) == 7); assert(gapWeightedSimilarity(s, t, 1) == 7); assert(approxEqual(gapWeightedSimilarityNormalized(s, t, 1), 7.0 / sqrt(15.0 * 7), 0.01)); } /** Similar to `gapWeightedSimilarity`, just works in an incremental manner by first revealing the matches of length 1, then gapped matches of length 2, and so on. The memory requirement is $(BIGOH s.length * t.length). The time complexity is $(BIGOH s.length * t.length) time for computing each step. Continuing on the previous example: The implementation is based on the pseudocode in Fig. 4 of the paper $(HTTP jmlr.csail.mit.edu/papers/volume6/rousu05a/rousu05a.pdf, "Efficient Computation of Gapped Substring Kernels on Large Alphabets") by Rousu et al., with additional algorithmic and systems-level optimizations. */ struct GapWeightedSimilarityIncremental(Range, F = double) if (isRandomAccessRange!(Range) && hasLength!(Range)) { import core.stdc.stdlib : malloc, realloc, alloca, free; private: Range s, t; F currentValue = 0; F* kl; size_t gram = void; F lambda = void, lambda2 = void; public: /** Constructs an object given two ranges `s` and `t` and a penalty `lambda`. Constructor completes in $(BIGOH s.length * t.length) time and computes all matches of length 1. */ this(Range s, Range t, F lambda) { import core.exception : onOutOfMemoryError; assert(lambda > 0); this.gram = 0; this.lambda = lambda; this.lambda2 = lambda * lambda; // for efficiency only size_t iMin = size_t.max, jMin = size_t.max, iMax = 0, jMax = 0; /* initialize */ Tuple!(size_t, size_t) * k0; size_t k0len; scope(exit) free(k0); currentValue = 0; foreach (i, si; s) { foreach (j; 0 .. t.length) { if (si != t[j]) continue; k0 = cast(typeof(k0)) realloc(k0, ++k0len * (*k0).sizeof); with (k0[k0len - 1]) { field[0] = i; field[1] = j; } // Maintain the minimum and maximum i and j if (iMin > i) iMin = i; if (iMax < i) iMax = i; if (jMin > j) jMin = j; if (jMax < j) jMax = j; } } if (iMin > iMax) return; assert(k0len); currentValue = k0len; // Chop strings down to the useful sizes s = s[iMin .. iMax + 1]; t = t[jMin .. jMax + 1]; this.s = s; this.t = t; kl = cast(F*) malloc(s.length * t.length * F.sizeof); if (!kl) onOutOfMemoryError(); kl[0 .. s.length * t.length] = 0; foreach (pos; 0 .. k0len) { with (k0[pos]) { kl[(field[0] - iMin) * t.length + field[1] -jMin] = lambda2; } } } /** Returns: `this`. */ ref GapWeightedSimilarityIncremental opSlice() { return this; } /** Computes the match of the popFront length. Completes in $(BIGOH s.length * t.length) time. */ void popFront() { import std.algorithm.mutation : swap; // This is a large source of optimization: if similarity at // the gram-1 level was 0, then we can safely assume // similarity at the gram level is 0 as well. if (empty) return; // Now attempt to match gapped substrings of length `gram' ++gram; currentValue = 0; auto Si = cast(F*) alloca(t.length * F.sizeof); Si[0 .. t.length] = 0; foreach (i; 0 .. s.length) { const si = s[i]; F Sij_1 = 0; F Si_1j_1 = 0; auto kli = kl + i * t.length; for (size_t j = 0;;) { const klij = kli[j]; const Si_1j = Si[j]; const tmp = klij + lambda * (Si_1j + Sij_1) - lambda2 * Si_1j_1; // now update kl and currentValue if (si == t[j]) currentValue += kli[j] = lambda2 * Si_1j_1; else kli[j] = 0; // commit to Si Si[j] = tmp; if (++j == t.length) break; // get ready for the popFront step; virtually increment j, // so essentially stuffj_1 <-- stuffj Si_1j_1 = Si_1j; Sij_1 = tmp; } } currentValue /= pow(lambda, 2 * (gram + 1)); version (none) { Si_1[0 .. t.length] = 0; kl[0 .. min(t.length, maxPerimeter + 1)] = 0; foreach (i; 1 .. min(s.length, maxPerimeter + 1)) { auto kli = kl + i * t.length; assert(s.length > i); const si = s[i]; auto kl_1i_1 = kl_1 + (i - 1) * t.length; kli[0] = 0; F lastS = 0; foreach (j; 1 .. min(maxPerimeter - i + 1, t.length)) { immutable j_1 = j - 1; immutable tmp = kl_1i_1[j_1] + lambda * (Si_1[j] + lastS) - lambda2 * Si_1[j_1]; kl_1i_1[j_1] = float.nan; Si_1[j_1] = lastS; lastS = tmp; if (si == t[j]) { currentValue += kli[j] = lambda2 * lastS; } else { kli[j] = 0; } } Si_1[t.length - 1] = lastS; } currentValue /= pow(lambda, 2 * (gram + 1)); // get ready for the popFront computation swap(kl, kl_1); } } /** Returns: The gapped similarity at the current match length (initially 1, grows with each call to `popFront`). */ @property F front() { return currentValue; } /** Returns: Whether there are more matches. */ @property bool empty() { if (currentValue) return false; if (kl) { free(kl); kl = null; } return true; } } /** Ditto */ GapWeightedSimilarityIncremental!(R, F) gapWeightedSimilarityIncremental(R, F) (R r1, R r2, F penalty) { return typeof(return)(r1, r2, penalty); } /// @system unittest { string[] s = ["Hello", "brave", "new", "world"]; string[] t = ["Hello", "new", "world"]; auto simIter = gapWeightedSimilarityIncremental(s, t, 1.0); assert(simIter.front == 3); // three 1-length matches simIter.popFront(); assert(simIter.front == 3); // three 2-length matches simIter.popFront(); assert(simIter.front == 1); // one 3-length match simIter.popFront(); assert(simIter.empty); // no more match } @system unittest { import std.conv : text; string[] s = ["Hello", "brave", "new", "world"]; string[] t = ["Hello", "new", "world"]; auto simIter = gapWeightedSimilarityIncremental(s, t, 1.0); //foreach (e; simIter) writeln(e); assert(simIter.front == 3); // three 1-length matches simIter.popFront(); assert(simIter.front == 3, text(simIter.front)); // three 2-length matches simIter.popFront(); assert(simIter.front == 1); // one 3-length matches simIter.popFront(); assert(simIter.empty); // no more match s = ["Hello"]; t = ["bye"]; simIter = gapWeightedSimilarityIncremental(s, t, 0.5); assert(simIter.empty); s = ["Hello"]; t = ["Hello"]; simIter = gapWeightedSimilarityIncremental(s, t, 0.5); assert(simIter.front == 1); // one match simIter.popFront(); assert(simIter.empty); s = ["Hello", "world"]; t = ["Hello"]; simIter = gapWeightedSimilarityIncremental(s, t, 0.5); assert(simIter.front == 1); // one match simIter.popFront(); assert(simIter.empty); s = ["Hello", "world"]; t = ["Hello", "yah", "world"]; simIter = gapWeightedSimilarityIncremental(s, t, 0.5); assert(simIter.front == 2); // two 1-gram matches simIter.popFront(); assert(simIter.front == 0.5, text(simIter.front)); // one 2-gram match, 1 gap } @system unittest { GapWeightedSimilarityIncremental!(string[]) sim = GapWeightedSimilarityIncremental!(string[])( ["nyuk", "I", "have", "no", "chocolate", "giba"], ["wyda", "I", "have", "I", "have", "have", "I", "have", "hehe"], 0.5); double[] witness = [ 7.0, 4.03125, 0, 0 ]; foreach (e; sim) { //writeln(e); assert(e == witness.front); witness.popFront(); } witness = [ 3.0, 1.3125, 0.25 ]; sim = GapWeightedSimilarityIncremental!(string[])( ["I", "have", "no", "chocolate"], ["I", "have", "some", "chocolate"], 0.5); foreach (e; sim) { //writeln(e); assert(e == witness.front); witness.popFront(); } assert(witness.empty); } /** Computes the greatest common divisor of `a` and `b` by using an efficient algorithm such as $(HTTPS en.wikipedia.org/wiki/Euclidean_algorithm, Euclid's) or $(HTTPS en.wikipedia.org/wiki/Binary_GCD_algorithm, Stein's) algorithm. Params: T = Any numerical type that supports the modulo operator `%`. If bit-shifting `<<` and `>>` are also supported, Stein's algorithm will be used; otherwise, Euclid's algorithm is used as _a fallback. Returns: The greatest common divisor of the given arguments. */ T gcd(T)(T a, T b) if (isIntegral!T) { static if (is(T == const) || is(T == immutable)) { return gcd!(Unqual!T)(a, b); } else version (DigitalMars) { static if (T.min < 0) { assert(a >= 0 && b >= 0); } while (b) { immutable t = b; b = a % b; a = t; } return a; } else { if (a == 0) return b; if (b == 0) return a; import core.bitop : bsf; import std.algorithm.mutation : swap; immutable uint shift = bsf(a | b); a >>= a.bsf; do { b >>= b.bsf; if (a > b) swap(a, b); b -= a; } while (b); return a << shift; } } /// @safe unittest { assert(gcd(2 * 5 * 7 * 7, 5 * 7 * 11) == 5 * 7); const int a = 5 * 13 * 23 * 23, b = 13 * 59; assert(gcd(a, b) == 13); } // This overload is for non-builtin numerical types like BigInt or // user-defined types. /// ditto T gcd(T)(T a, T b) if (!isIntegral!T && is(typeof(T.init % T.init)) && is(typeof(T.init == 0 || T.init > 0))) { import std.algorithm.mutation : swap; enum canUseBinaryGcd = is(typeof(() { T t, u; t <<= 1; t >>= 1; t -= u; bool b = (t & 1) == 0; swap(t, u); })); assert(a >= 0 && b >= 0); // Special cases. if (a == 0) return b; if (b == 0) return a; static if (canUseBinaryGcd) { uint shift = 0; while ((a & 1) == 0 && (b & 1) == 0) { a >>= 1; b >>= 1; shift++; } if ((a & 1) == 0) swap(a, b); do { assert((a & 1) != 0); while ((b & 1) == 0) b >>= 1; if (a > b) swap(a, b); b -= a; } while (b); return a << shift; } else { // The only thing we have is %; fallback to Euclidean algorithm. while (b != 0) { auto t = b; b = a % b; a = t; } return a; } } // Issue 7102 @system pure unittest { import std.bigint : BigInt; assert(gcd(BigInt("71_000_000_000_000_000_000"), BigInt("31_000_000_000_000_000_000")) == BigInt("1_000_000_000_000_000_000")); assert(gcd(BigInt(0), BigInt(1234567)) == BigInt(1234567)); assert(gcd(BigInt(1234567), BigInt(0)) == BigInt(1234567)); } @safe pure nothrow unittest { // A numerical type that only supports % and - (to force gcd implementation // to use Euclidean algorithm). struct CrippledInt { int impl; CrippledInt opBinary(string op : "%")(CrippledInt i) { return CrippledInt(impl % i.impl); } int opEquals(CrippledInt i) { return impl == i.impl; } int opEquals(int i) { return impl == i; } int opCmp(int i) { return (impl < i) ? -1 : (impl > i) ? 1 : 0; } } assert(gcd(CrippledInt(2310), CrippledInt(1309)) == CrippledInt(77)); } // Issue 19514 @system pure unittest { import std.bigint : BigInt; assert(gcd(BigInt(2), BigInt(1)) == BigInt(1)); } // This is to make tweaking the speed/size vs. accuracy tradeoff easy, // though floats seem accurate enough for all practical purposes, since // they pass the "approxEqual(inverseFft(fft(arr)), arr)" test even for // size 2 ^^ 22. private alias lookup_t = float; /**A class for performing fast Fourier transforms of power of two sizes. * This class encapsulates a large amount of state that is reusable when * performing multiple FFTs of sizes smaller than or equal to that specified * in the constructor. This results in substantial speedups when performing * multiple FFTs with a known maximum size. However, * a free function API is provided for convenience if you need to perform a * one-off FFT. * * References: * $(HTTP en.wikipedia.org/wiki/Cooley%E2%80%93Tukey_FFT_algorithm) */ final class Fft { import core.bitop : bsf; import std.algorithm.iteration : map; import std.array : uninitializedArray; private: immutable lookup_t[][] negSinLookup; void enforceSize(R)(R range) const { import std.conv : text; assert(range.length <= size, text( "FFT size mismatch. Expected ", size, ", got ", range.length)); } void fftImpl(Ret, R)(Stride!R range, Ret buf) const in { assert(range.length >= 4); assert(isPowerOf2(range.length)); } do { auto recurseRange = range; recurseRange.doubleSteps(); if (buf.length > 4) { fftImpl(recurseRange, buf[0..$ / 2]); recurseRange.popHalf(); fftImpl(recurseRange, buf[$ / 2..$]); } else { // Do this here instead of in another recursion to save on // recursion overhead. slowFourier2(recurseRange, buf[0..$ / 2]); recurseRange.popHalf(); slowFourier2(recurseRange, buf[$ / 2..$]); } butterfly(buf); } // This algorithm works by performing the even and odd parts of our FFT // using the "two for the price of one" method mentioned at // http://www.engineeringproductivitytools.com/stuff/T0001/PT10.HTM#Head521 // by making the odd terms into the imaginary components of our new FFT, // and then using symmetry to recombine them. void fftImplPureReal(Ret, R)(R range, Ret buf) const in { assert(range.length >= 4); assert(isPowerOf2(range.length)); } do { alias E = ElementType!R; // Converts odd indices of range to the imaginary components of // a range half the size. The even indices become the real components. static if (isArray!R && isFloatingPoint!E) { // Then the memory layout of complex numbers provides a dirt // cheap way to convert. This is a common case, so take advantage. auto oddsImag = cast(Complex!E[]) range; } else { // General case: Use a higher order range. We can assume // source.length is even because it has to be a power of 2. static struct OddToImaginary { R source; alias C = Complex!(CommonType!(E, typeof(buf[0].re))); @property { C front() { return C(source[0], source[1]); } C back() { immutable n = source.length; return C(source[n - 2], source[n - 1]); } typeof(this) save() { return typeof(this)(source.save); } bool empty() { return source.empty; } size_t length() { return source.length / 2; } } void popFront() { source.popFront(); source.popFront(); } void popBack() { source.popBack(); source.popBack(); } C opIndex(size_t index) { return C(source[index * 2], source[index * 2 + 1]); } typeof(this) opSlice(size_t lower, size_t upper) { return typeof(this)(source[lower * 2 .. upper * 2]); } } auto oddsImag = OddToImaginary(range); } fft(oddsImag, buf[0..$ / 2]); auto evenFft = buf[0..$ / 2]; auto oddFft = buf[$ / 2..$]; immutable halfN = evenFft.length; oddFft[0].re = buf[0].im; oddFft[0].im = 0; evenFft[0].im = 0; // evenFft[0].re is already right b/c it's aliased with buf[0].re. foreach (k; 1 .. halfN / 2 + 1) { immutable bufk = buf[k]; immutable bufnk = buf[buf.length / 2 - k]; evenFft[k].re = 0.5 * (bufk.re + bufnk.re); evenFft[halfN - k].re = evenFft[k].re; evenFft[k].im = 0.5 * (bufk.im - bufnk.im); evenFft[halfN - k].im = -evenFft[k].im; oddFft[k].re = 0.5 * (bufk.im + bufnk.im); oddFft[halfN - k].re = oddFft[k].re; oddFft[k].im = 0.5 * (bufnk.re - bufk.re); oddFft[halfN - k].im = -oddFft[k].im; } butterfly(buf); } void butterfly(R)(R buf) const in { assert(isPowerOf2(buf.length)); } do { immutable n = buf.length; immutable localLookup = negSinLookup[bsf(n)]; assert(localLookup.length == n); immutable cosMask = n - 1; immutable cosAdd = n / 4 * 3; lookup_t negSinFromLookup(size_t index) pure nothrow { return localLookup[index]; } lookup_t cosFromLookup(size_t index) pure nothrow { // cos is just -sin shifted by PI * 3 / 2. return localLookup[(index + cosAdd) & cosMask]; } immutable halfLen = n / 2; // This loop is unrolled and the two iterations are interleaved // relative to the textbook FFT to increase ILP. This gives roughly 5% // speedups on DMD. for (size_t k = 0; k < halfLen; k += 2) { immutable cosTwiddle1 = cosFromLookup(k); immutable sinTwiddle1 = negSinFromLookup(k); immutable cosTwiddle2 = cosFromLookup(k + 1); immutable sinTwiddle2 = negSinFromLookup(k + 1); immutable realLower1 = buf[k].re; immutable imagLower1 = buf[k].im; immutable realLower2 = buf[k + 1].re; immutable imagLower2 = buf[k + 1].im; immutable upperIndex1 = k + halfLen; immutable upperIndex2 = upperIndex1 + 1; immutable realUpper1 = buf[upperIndex1].re; immutable imagUpper1 = buf[upperIndex1].im; immutable realUpper2 = buf[upperIndex2].re; immutable imagUpper2 = buf[upperIndex2].im; immutable realAdd1 = cosTwiddle1 * realUpper1 - sinTwiddle1 * imagUpper1; immutable imagAdd1 = sinTwiddle1 * realUpper1 + cosTwiddle1 * imagUpper1; immutable realAdd2 = cosTwiddle2 * realUpper2 - sinTwiddle2 * imagUpper2; immutable imagAdd2 = sinTwiddle2 * realUpper2 + cosTwiddle2 * imagUpper2; buf[k].re += realAdd1; buf[k].im += imagAdd1; buf[k + 1].re += realAdd2; buf[k + 1].im += imagAdd2; buf[upperIndex1].re = realLower1 - realAdd1; buf[upperIndex1].im = imagLower1 - imagAdd1; buf[upperIndex2].re = realLower2 - realAdd2; buf[upperIndex2].im = imagLower2 - imagAdd2; } } // This constructor is used within this module for allocating the // buffer space elsewhere besides the GC heap. It's definitely **NOT** // part of the public API and definitely **IS** subject to change. // // Also, this is unsafe because the memSpace buffer will be cast // to immutable. public this(lookup_t[] memSpace) // Public b/c of bug 4636. { immutable size = memSpace.length / 2; /* Create a lookup table of all negative sine values at a resolution of * size and all smaller power of two resolutions. This may seem * inefficient, but having all the lookups be next to each other in * memory at every level of iteration is a huge win performance-wise. */ if (size == 0) { return; } assert(isPowerOf2(size), "Can only do FFTs on ranges with a size that is a power of two."); auto table = new lookup_t[][bsf(size) + 1]; table[$ - 1] = memSpace[$ - size..$]; memSpace = memSpace[0 .. size]; auto lastRow = table[$ - 1]; lastRow[0] = 0; // -sin(0) == 0. foreach (ptrdiff_t i; 1 .. size) { // The hard coded cases are for improved accuracy and to prevent // annoying non-zeroness when stuff should be zero. if (i == size / 4) lastRow[i] = -1; // -sin(pi / 2) == -1. else if (i == size / 2) lastRow[i] = 0; // -sin(pi) == 0. else if (i == size * 3 / 4) lastRow[i] = 1; // -sin(pi * 3 / 2) == 1 else lastRow[i] = -sin(i * 2.0L * PI / size); } // Fill in all the other rows with strided versions. foreach (i; 1 .. table.length - 1) { immutable strideLength = size / (2 ^^ i); auto strided = Stride!(lookup_t[])(lastRow, strideLength); table[i] = memSpace[$ - strided.length..$]; memSpace = memSpace[0..$ - strided.length]; size_t copyIndex; foreach (elem; strided) { table[i][copyIndex++] = elem; } } negSinLookup = cast(immutable) table; } public: /**Create an `Fft` object for computing fast Fourier transforms of * power of two sizes of `size` or smaller. `size` must be a * power of two. */ this(size_t size) { // Allocate all twiddle factor buffers in one contiguous block so that, // when one is done being used, the next one is next in cache. auto memSpace = uninitializedArray!(lookup_t[])(2 * size); this(memSpace); } @property size_t size() const { return (negSinLookup is null) ? 0 : negSinLookup[$ - 1].length; } /**Compute the Fourier transform of range using the $(BIGOH N log N) * Cooley-Tukey Algorithm. `range` must be a random-access range with * slicing and a length equal to `size` as provided at the construction of * this object. The contents of range can be either numeric types, * which will be interpreted as pure real values, or complex types with * properties or members `.re` and `.im` that can be read. * * Note: Pure real FFTs are automatically detected and the relevant * optimizations are performed. * * Returns: An array of complex numbers representing the transformed data in * the frequency domain. * * Conventions: The exponent is negative and the factor is one, * i.e., output[j] := sum[ exp(-2 PI i j k / N) input[k] ]. */ Complex!F[] fft(F = double, R)(R range) const if (isFloatingPoint!F && isRandomAccessRange!R) { enforceSize(range); Complex!F[] ret; if (range.length == 0) { return ret; } // Don't waste time initializing the memory for ret. ret = uninitializedArray!(Complex!F[])(range.length); fft(range, ret); return ret; } /**Same as the overload, but allows for the results to be stored in a user- * provided buffer. The buffer must be of the same length as range, must be * a random-access range, must have slicing, and must contain elements that are * complex-like. This means that they must have a .re and a .im member or * property that can be both read and written and are floating point numbers. */ void fft(Ret, R)(R range, Ret buf) const if (isRandomAccessRange!Ret && isComplexLike!(ElementType!Ret) && hasSlicing!Ret) { assert(buf.length == range.length); enforceSize(range); if (range.length == 0) { return; } else if (range.length == 1) { buf[0] = range[0]; return; } else if (range.length == 2) { slowFourier2(range, buf); return; } else { alias E = ElementType!R; static if (is(E : real)) { return fftImplPureReal(range, buf); } else { static if (is(R : Stride!R)) return fftImpl(range, buf); else return fftImpl(Stride!R(range, 1), buf); } } } /** * Computes the inverse Fourier transform of a range. The range must be a * random access range with slicing, have a length equal to the size * provided at construction of this object, and contain elements that are * either of type std.complex.Complex or have essentially * the same compile-time interface. * * Returns: The time-domain signal. * * Conventions: The exponent is positive and the factor is 1/N, i.e., * output[j] := (1 / N) sum[ exp(+2 PI i j k / N) input[k] ]. */ Complex!F[] inverseFft(F = double, R)(R range) const if (isRandomAccessRange!R && isComplexLike!(ElementType!R) && isFloatingPoint!F) { enforceSize(range); Complex!F[] ret; if (range.length == 0) { return ret; } // Don't waste time initializing the memory for ret. ret = uninitializedArray!(Complex!F[])(range.length); inverseFft(range, ret); return ret; } /** * Inverse FFT that allows a user-supplied buffer to be provided. The buffer * must be a random access range with slicing, and its elements * must be some complex-like type. */ void inverseFft(Ret, R)(R range, Ret buf) const if (isRandomAccessRange!Ret && isComplexLike!(ElementType!Ret) && hasSlicing!Ret) { enforceSize(range); auto swapped = map!swapRealImag(range); fft(swapped, buf); immutable lenNeg1 = 1.0 / buf.length; foreach (ref elem; buf) { immutable temp = elem.re * lenNeg1; elem.re = elem.im * lenNeg1; elem.im = temp; } } } // This mixin creates an Fft object in the scope it's mixed into such that all // memory owned by the object is deterministically destroyed at the end of that // scope. private enum string MakeLocalFft = q{ import core.stdc.stdlib; import core.exception : onOutOfMemoryError; auto lookupBuf = (cast(lookup_t*) malloc(range.length * 2 * lookup_t.sizeof)) [0 .. 2 * range.length]; if (!lookupBuf.ptr) onOutOfMemoryError(); scope(exit) free(cast(void*) lookupBuf.ptr); auto fftObj = scoped!Fft(lookupBuf); }; /**Convenience functions that create an `Fft` object, run the FFT or inverse * FFT and return the result. Useful for one-off FFTs. * * Note: In addition to convenience, these functions are slightly more * efficient than manually creating an Fft object for a single use, * as the Fft object is deterministically destroyed before these * functions return. */ Complex!F[] fft(F = double, R)(R range) { mixin(MakeLocalFft); return fftObj.fft!(F, R)(range); } /// ditto void fft(Ret, R)(R range, Ret buf) { mixin(MakeLocalFft); return fftObj.fft!(Ret, R)(range, buf); } /// ditto Complex!F[] inverseFft(F = double, R)(R range) { mixin(MakeLocalFft); return fftObj.inverseFft!(F, R)(range); } /// ditto void inverseFft(Ret, R)(R range, Ret buf) { mixin(MakeLocalFft); return fftObj.inverseFft!(Ret, R)(range, buf); } @system unittest { import std.algorithm; import std.conv; import std.range; // Test values from R and Octave. auto arr = [1,2,3,4,5,6,7,8]; auto fft1 = fft(arr); assert(approxEqual(map!"a.re"(fft1), [36.0, -4, -4, -4, -4, -4, -4, -4])); assert(approxEqual(map!"a.im"(fft1), [0, 9.6568, 4, 1.6568, 0, -1.6568, -4, -9.6568])); auto fft1Retro = fft(retro(arr)); assert(approxEqual(map!"a.re"(fft1Retro), [36.0, 4, 4, 4, 4, 4, 4, 4])); assert(approxEqual(map!"a.im"(fft1Retro), [0, -9.6568, -4, -1.6568, 0, 1.6568, 4, 9.6568])); auto fft1Float = fft(to!(float[])(arr)); assert(approxEqual(map!"a.re"(fft1), map!"a.re"(fft1Float))); assert(approxEqual(map!"a.im"(fft1), map!"a.im"(fft1Float))); alias C = Complex!float; auto arr2 = [C(1,2), C(3,4), C(5,6), C(7,8), C(9,10), C(11,12), C(13,14), C(15,16)]; auto fft2 = fft(arr2); assert(approxEqual(map!"a.re"(fft2), [64.0, -27.3137, -16, -11.3137, -8, -4.6862, 0, 11.3137])); assert(approxEqual(map!"a.im"(fft2), [72, 11.3137, 0, -4.686, -8, -11.3137, -16, -27.3137])); auto inv1 = inverseFft(fft1); assert(approxEqual(map!"a.re"(inv1), arr)); assert(reduce!max(map!"a.im"(inv1)) < 1e-10); auto inv2 = inverseFft(fft2); assert(approxEqual(map!"a.re"(inv2), map!"a.re"(arr2))); assert(approxEqual(map!"a.im"(inv2), map!"a.im"(arr2))); // FFTs of size 0, 1 and 2 are handled as special cases. Test them here. ushort[] empty; assert(fft(empty) == null); assert(inverseFft(fft(empty)) == null); real[] oneElem = [4.5L]; auto oneFft = fft(oneElem); assert(oneFft.length == 1); assert(oneFft[0].re == 4.5L); assert(oneFft[0].im == 0); auto oneInv = inverseFft(oneFft); assert(oneInv.length == 1); assert(approxEqual(oneInv[0].re, 4.5)); assert(approxEqual(oneInv[0].im, 0)); long[2] twoElems = [8, 4]; auto twoFft = fft(twoElems[]); assert(twoFft.length == 2); assert(approxEqual(twoFft[0].re, 12)); assert(approxEqual(twoFft[0].im, 0)); assert(approxEqual(twoFft[1].re, 4)); assert(approxEqual(twoFft[1].im, 0)); auto twoInv = inverseFft(twoFft); assert(approxEqual(twoInv[0].re, 8)); assert(approxEqual(twoInv[0].im, 0)); assert(approxEqual(twoInv[1].re, 4)); assert(approxEqual(twoInv[1].im, 0)); } // Swaps the real and imaginary parts of a complex number. This is useful // for inverse FFTs. C swapRealImag(C)(C input) { return C(input.im, input.re); } /** This function transforms `decimal` value into a value in the factorial number system stored in `fac`. A factorial number is constructed as: $(D fac[0] * 0! + fac[1] * 1! + ... fac[20] * 20!) Params: decimal = The decimal value to convert into the factorial number system. fac = The array to store the factorial number. The array is of size 21 as `ulong.max` requires 21 digits in the factorial number system. Returns: A variable storing the number of digits of the factorial number stored in `fac`. */ size_t decimalToFactorial(ulong decimal, ref ubyte[21] fac) @safe pure nothrow @nogc { import std.algorithm.mutation : reverse; size_t idx; for (ulong i = 1; decimal != 0; ++i) { auto temp = decimal % i; decimal /= i; fac[idx++] = cast(ubyte)(temp); } if (idx == 0) { fac[idx++] = cast(ubyte) 0; } reverse(fac[0 .. idx]); // first digit of the number in factorial will always be zero assert(fac[idx - 1] == 0); return idx; } /// @safe pure @nogc unittest { ubyte[21] fac; size_t idx = decimalToFactorial(2982, fac); assert(fac[0] == 4); assert(fac[1] == 0); assert(fac[2] == 4); assert(fac[3] == 1); assert(fac[4] == 0); assert(fac[5] == 0); assert(fac[6] == 0); } @safe pure unittest { ubyte[21] fac; size_t idx = decimalToFactorial(0UL, fac); assert(idx == 1); assert(fac[0] == 0); fac[] = 0; idx = 0; idx = decimalToFactorial(ulong.max, fac); assert(idx == 21); auto t = [7, 11, 12, 4, 3, 15, 3, 5, 3, 5, 0, 8, 3, 5, 0, 0, 0, 2, 1, 1, 0]; foreach (i, it; fac[0 .. 21]) { assert(it == t[i]); } fac[] = 0; idx = decimalToFactorial(2982, fac); assert(idx == 7); t = [4, 0, 4, 1, 0, 0, 0]; foreach (i, it; fac[0 .. idx]) { assert(it == t[i]); } } private: // The reasons I couldn't use std.algorithm were b/c its stride length isn't // modifiable on the fly and because range has grown some performance hacks // for powers of 2. struct Stride(R) { import core.bitop : bsf; Unqual!R range; size_t _nSteps; size_t _length; alias E = ElementType!(R); this(R range, size_t nStepsIn) { this.range = range; _nSteps = nStepsIn; _length = (range.length + _nSteps - 1) / nSteps; } size_t length() const @property { return _length; } typeof(this) save() @property { auto ret = this; ret.range = ret.range.save; return ret; } E opIndex(size_t index) { return range[index * _nSteps]; } E front() @property { return range[0]; } void popFront() { if (range.length >= _nSteps) { range = range[_nSteps .. range.length]; _length--; } else { range = range[0 .. 0]; _length = 0; } } // Pops half the range's stride. void popHalf() { range = range[_nSteps / 2 .. range.length]; } bool empty() const @property { return length == 0; } size_t nSteps() const @property { return _nSteps; } void doubleSteps() { _nSteps *= 2; _length /= 2; } size_t nSteps(size_t newVal) @property { _nSteps = newVal; // Using >> bsf(nSteps) is a few cycles faster than / nSteps. _length = (range.length + _nSteps - 1) >> bsf(nSteps); return newVal; } } // Hard-coded base case for FFT of size 2. This is actually a TON faster than // using a generic slow DFT. This seems to be the best base case. (Size 1 // can be coded inline as buf[0] = range[0]). void slowFourier2(Ret, R)(R range, Ret buf) { assert(range.length == 2); assert(buf.length == 2); buf[0] = range[0] + range[1]; buf[1] = range[0] - range[1]; } // Hard-coded base case for FFT of size 4. Doesn't work as well as the size // 2 case. void slowFourier4(Ret, R)(R range, Ret buf) { alias C = ElementType!Ret; assert(range.length == 4); assert(buf.length == 4); buf[0] = range[0] + range[1] + range[2] + range[3]; buf[1] = range[0] - range[1] * C(0, 1) - range[2] + range[3] * C(0, 1); buf[2] = range[0] - range[1] + range[2] - range[3]; buf[3] = range[0] + range[1] * C(0, 1) - range[2] - range[3] * C(0, 1); } N roundDownToPowerOf2(N)(N num) if (isScalarType!N && !isFloatingPoint!N) { import core.bitop : bsr; return num & (cast(N) 1 << bsr(num)); } @safe unittest { assert(roundDownToPowerOf2(7) == 4); assert(roundDownToPowerOf2(4) == 4); } template isComplexLike(T) { enum bool isComplexLike = is(typeof(T.init.re)) && is(typeof(T.init.im)); } @safe unittest { static assert(isComplexLike!(Complex!double)); static assert(!isComplexLike!(uint)); }
D
/Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/SnapKit.build/Objects-normal/x86_64/ConstraintLayoutGuide+Extensions.o : /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/ConstraintLayoutGuideDSL.swift /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/ConstraintDSL.swift /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/ConstraintLayoutSupportDSL.swift /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/ConstraintViewDSL.swift /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/ConstraintLayoutGuide.swift /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/ConstraintMakerExtendable.swift /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/ConstraintMakerRelatable.swift /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/ConstraintMakerEditable.swift /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/ConstraintMakerFinalizable.swift /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/ConstraintMakerPriortizable.swift /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/ConstraintConfig.swift /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/Debugging.swift /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/ConstraintItem.swift /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/LayoutConstraintItem.swift /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/ConstraintRelation.swift /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/ConstraintDescription.swift /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/ConstraintMaker.swift /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/Typealiases.swift /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/ConstraintAttributes.swift /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/ConstraintLayoutGuide+Extensions.swift /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/UILayoutSupport+Extensions.swift /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/ConstraintView+Extensions.swift /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/ConstraintInsets.swift /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/ConstraintRelatableTarget.swift /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/ConstraintMultiplierTarget.swift /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/ConstraintOffsetTarget.swift /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/ConstraintInsetTarget.swift /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/ConstraintConstantTarget.swift /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/ConstraintPriorityTarget.swift /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/Constraint.swift /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/LayoutConstraint.swift /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/ConstraintLayoutSupport.swift /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/ConstraintView.swift /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/ConstraintPriority.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.apinotesc /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/ObjectiveC.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreImage.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/QuartzCore.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Metal.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreFoundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreGraphics.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/UIKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/SwiftOnoneSupport.swiftmodule /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/Target\ Support\ Files/SnapKit/SnapKit-umbrella.h /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/SnapKit.build/unextended-module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/OpenGLES.framework/Headers/OpenGLES.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImage.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/QuartzCore.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/SnapKit.build/Objects-normal/x86_64/ConstraintLayoutGuide+Extensions~partial.swiftmodule : /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/ConstraintLayoutGuideDSL.swift /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/ConstraintDSL.swift /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/ConstraintLayoutSupportDSL.swift /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/ConstraintViewDSL.swift /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/ConstraintLayoutGuide.swift /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/ConstraintMakerExtendable.swift /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/ConstraintMakerRelatable.swift /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/ConstraintMakerEditable.swift /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/ConstraintMakerFinalizable.swift /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/ConstraintMakerPriortizable.swift /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/ConstraintConfig.swift /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/Debugging.swift /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/ConstraintItem.swift /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/LayoutConstraintItem.swift /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/ConstraintRelation.swift /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/ConstraintDescription.swift /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/ConstraintMaker.swift /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/Typealiases.swift /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/ConstraintAttributes.swift /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/ConstraintLayoutGuide+Extensions.swift /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/UILayoutSupport+Extensions.swift /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/ConstraintView+Extensions.swift /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/ConstraintInsets.swift /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/ConstraintRelatableTarget.swift /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/ConstraintMultiplierTarget.swift /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/ConstraintOffsetTarget.swift /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/ConstraintInsetTarget.swift /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/ConstraintConstantTarget.swift /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/ConstraintPriorityTarget.swift /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/Constraint.swift /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/LayoutConstraint.swift /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/ConstraintLayoutSupport.swift /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/ConstraintView.swift /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/ConstraintPriority.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.apinotesc /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/ObjectiveC.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreImage.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/QuartzCore.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Metal.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreFoundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreGraphics.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/UIKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/SwiftOnoneSupport.swiftmodule /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/Target\ Support\ Files/SnapKit/SnapKit-umbrella.h /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/SnapKit.build/unextended-module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/OpenGLES.framework/Headers/OpenGLES.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImage.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/QuartzCore.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/SnapKit.build/Objects-normal/x86_64/ConstraintLayoutGuide+Extensions~partial.swiftdoc : /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/ConstraintLayoutGuideDSL.swift /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/ConstraintDSL.swift /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/ConstraintLayoutSupportDSL.swift /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/ConstraintViewDSL.swift /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/ConstraintLayoutGuide.swift /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/ConstraintMakerExtendable.swift /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/ConstraintMakerRelatable.swift /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/ConstraintMakerEditable.swift /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/ConstraintMakerFinalizable.swift /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/ConstraintMakerPriortizable.swift /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/ConstraintConfig.swift /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/Debugging.swift /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/ConstraintItem.swift /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/LayoutConstraintItem.swift /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/ConstraintRelation.swift /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/ConstraintDescription.swift /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/ConstraintMaker.swift /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/Typealiases.swift /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/ConstraintAttributes.swift /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/ConstraintLayoutGuide+Extensions.swift /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/UILayoutSupport+Extensions.swift /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/ConstraintView+Extensions.swift /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/ConstraintInsets.swift /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/ConstraintRelatableTarget.swift /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/ConstraintMultiplierTarget.swift /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/ConstraintOffsetTarget.swift /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/ConstraintInsetTarget.swift /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/ConstraintConstantTarget.swift /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/ConstraintPriorityTarget.swift /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/Constraint.swift /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/LayoutConstraint.swift /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/ConstraintLayoutSupport.swift /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/ConstraintView.swift /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/SnapKit/Source/ConstraintPriority.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.apinotesc /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/ObjectiveC.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreImage.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/QuartzCore.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Metal.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreFoundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreGraphics.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/UIKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/SwiftOnoneSupport.swiftmodule /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Pods/Target\ Support\ Files/SnapKit/SnapKit-umbrella.h /Users/babaiholdings/Documents/AlchemintWalletiOS/AlchemintProject/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/SnapKit.build/unextended-module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/OpenGLES.framework/Headers/OpenGLES.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImage.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/QuartzCore.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes
D
/* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). * Version 3.0.0 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. * ----------------------------------------------------------------------------- */ module vtkTreeMapView; static import vtkd_im; static import core.stdc.config; static import std.conv; static import std.string; static import std.conv; static import std.string; static import vtkObjectBase; static import vtkAreaLayoutStrategy; static import SWIGTYPE_p_int; static import vtkTreeAreaView; class vtkTreeMapView : vtkTreeAreaView.vtkTreeAreaView { private void* swigCPtr; public this(void* cObject, bool ownCObject) { super(vtkd_im.vtkTreeMapView_Upcast(cObject), ownCObject); swigCPtr = cObject; } public static void* swigGetCPtr(vtkTreeMapView obj) { return (obj is null) ? null : obj.swigCPtr; } mixin vtkd_im.SwigOperatorDefinitions; public override void dispose() { synchronized(this) { if (swigCPtr !is null) { if (swigCMemOwn) { swigCMemOwn = false; throw new object.Exception("C++ destructor does not have public access"); } swigCPtr = null; super.dispose(); } } } public static vtkTreeMapView New() { void* cPtr = vtkd_im.vtkTreeMapView_New(); vtkTreeMapView ret = (cPtr is null) ? null : new vtkTreeMapView(cPtr, false); return ret; } public static int IsTypeOf(string type) { auto ret = vtkd_im.vtkTreeMapView_IsTypeOf((type ? std.string.toStringz(type) : null)); return ret; } public static vtkTreeMapView SafeDownCast(vtkObjectBase.vtkObjectBase o) { void* cPtr = vtkd_im.vtkTreeMapView_SafeDownCast(vtkObjectBase.vtkObjectBase.swigGetCPtr(o)); vtkTreeMapView ret = (cPtr is null) ? null : new vtkTreeMapView(cPtr, false); return ret; } public vtkTreeMapView NewInstance() const { void* cPtr = vtkd_im.vtkTreeMapView_NewInstance(cast(void*)swigCPtr); vtkTreeMapView ret = (cPtr is null) ? null : new vtkTreeMapView(cPtr, false); return ret; } alias vtkTreeAreaView.vtkTreeAreaView.NewInstance NewInstance; public override void SetLayoutStrategy(vtkAreaLayoutStrategy.vtkAreaLayoutStrategy s) { vtkd_im.vtkTreeMapView_SetLayoutStrategy__SWIG_0(cast(void*)swigCPtr, vtkAreaLayoutStrategy.vtkAreaLayoutStrategy.swigGetCPtr(s)); } public void SetLayoutStrategy(string name) { vtkd_im.vtkTreeMapView_SetLayoutStrategy__SWIG_1(cast(void*)swigCPtr, (name ? std.string.toStringz(name) : null)); } alias vtkTreeAreaView.vtkTreeAreaView.SetLayoutStrategy SetLayoutStrategy; public void SetLayoutStrategyToBox() { vtkd_im.vtkTreeMapView_SetLayoutStrategyToBox(cast(void*)swigCPtr); } public void SetLayoutStrategyToSliceAndDice() { vtkd_im.vtkTreeMapView_SetLayoutStrategyToSliceAndDice(cast(void*)swigCPtr); } public void SetLayoutStrategyToSquarify() { vtkd_im.vtkTreeMapView_SetLayoutStrategyToSquarify(cast(void*)swigCPtr); } public void SetFontSizeRange(int maxSize, int minSize, int delta) { vtkd_im.vtkTreeMapView_SetFontSizeRange__SWIG_0(cast(void*)swigCPtr, maxSize, minSize, delta); } public void SetFontSizeRange(int maxSize, int minSize) { vtkd_im.vtkTreeMapView_SetFontSizeRange__SWIG_1(cast(void*)swigCPtr, maxSize, minSize); } public void GetFontSizeRange(SWIGTYPE_p_int.SWIGTYPE_p_int range) { vtkd_im.vtkTreeMapView_GetFontSizeRange(cast(void*)swigCPtr, SWIGTYPE_p_int.SWIGTYPE_p_int.swigGetCPtr(range)); } }
D
module gsl.odeiv; /* * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or (at * your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ /* * D interface file for gsl_odeiv.h and gsl_odeiv2.h * Author: Chibisi Chima-Okereke */ extern (C){ /* Description of a system of ODEs. * * y' = f(t,y) = dydt(t, y) * * The system is specified by giving the right-hand-side * of the equation and possibly a jacobian function. * * Some methods require the jacobian function, which calculates * the matrix dfdy and the vector dfdt. The matrix dfdy conforms * to the GSL standard, being a continuous range of floating point * values, in row-order. * * As with GSL function objects, user-supplied parameter * data is also present. */ struct gsl_odeiv_system { int function(double t, const(double)* y, double* dydt, void* params) function_; int function(double t, const(double)* y, double* dfdy, double* dfdt, void* params) jacobian; size_t dimension; void * params; } /* #define GSL_ODEIV_FN_EVAL(S,t,y,f) (*((S)->function))(t,y,f,(S)->params) #define GSL_ODEIV_JA_EVAL(S,t,y,dfdy,dfdt) (*((S)->jacobian))(t,y,dfdy,dfdt,(S)->params) */ /* General stepper object. * * Opaque object for stepping an ODE system from t to t+h. * In general the object has some state which facilitates * iterating the stepping operation. */ struct gsl_odeiv_step_type { const(char)* name; int can_use_dydt_in; int gives_exact_dydt_out; void* function(size_t dim) alloc; int function(void* state, size_t dim, double t, double h, double* y, double* yerr, const double* dydt_in, double* dydt_out, const gsl_odeiv_system* dydt) apply; int function(void* state, size_t dim) reset; uint function(void* state) order; void function(void* state) free; }; struct gsl_odeiv_step { const(gsl_odeiv_step_type)* type; size_t dimension; void* state; } /* Available stepper types. * * rk2 : embedded 2nd(3rd) Runge-Kutta * rk4 : 4th order (classical) Runge-Kutta * rkck : embedded 4th(5th) Runge-Kutta, Cash-Karp * rk8pd : embedded 8th(9th) Runge-Kutta, Prince-Dormand * rk2imp : implicit 2nd order Runge-Kutta at Gaussian points * rk4imp : implicit 4th order Runge-Kutta at Gaussian points * gear1 : M=1 implicit Gear method * gear2 : M=2 implicit Gear method */ extern const gsl_odeiv_step_type* gsl_odeiv_step_rk2; extern const gsl_odeiv_step_type* gsl_odeiv_step_rk4; extern const gsl_odeiv_step_type* gsl_odeiv_step_rkf45; extern const gsl_odeiv_step_type* gsl_odeiv_step_rkck; extern const gsl_odeiv_step_type* gsl_odeiv_step_rk8pd; extern const gsl_odeiv_step_type* gsl_odeiv_step_rk2imp; extern const gsl_odeiv_step_type* gsl_odeiv_step_rk2simp; extern const gsl_odeiv_step_type* gsl_odeiv_step_rk4imp; extern const gsl_odeiv_step_type* gsl_odeiv_step_bsimp; extern const gsl_odeiv_step_type* gsl_odeiv_step_gear1; extern const gsl_odeiv_step_type* gsl_odeiv_step_gear2; /* Constructor for specialized stepper objects. */ gsl_odeiv_step* gsl_odeiv_step_alloc(const(gsl_odeiv_step_type)* T, size_t dim); int gsl_odeiv_step_reset(gsl_odeiv_step* s); void gsl_odeiv_step_free(gsl_odeiv_step* s); /* General stepper object methods. */ const(char)* gsl_odeiv_step_name(const gsl_odeiv_step * s); uint gsl_odeiv_step_order(const gsl_odeiv_step * s); int gsl_odeiv_step_apply(gsl_odeiv_step* s, double t, double h, double* y, double* yerr, const(double) dydt_in, double* dydt_out, const(gsl_odeiv_system)* dydt); /* General step size control object. * * The hadjust() method controls the adjustment of * step size given the result of a step and the error. * Valid hadjust() methods must return one of the codes below. * * The general data can be used by specializations * to store state and control their heuristics. */ struct gsl_odeiv_control_type { const(char)* name; void* function() alloc; int function(void* state, double eps_abs, double eps_rel, double a_y, double a_dydt) init; int function(void* state, size_t dim, uint ord, const(double)* y, const(double)* yerr, const(double)* yp, double* h) hadjust; void function(void* state) free; } struct gsl_odeiv_control { const(gsl_odeiv_control_type)* type; void* state; } /* Possible return values for an hadjust() evolution method. */ enum GSL_ODEIV_HADJ_INC = 1; /* step was increased */ enum GSL_ODEIV_HADJ_NIL = 0; /* step unchanged */ enum GSL_ODEIV_HADJ_DEC = -1; /* step decreased */ gsl_odeiv_control* gsl_odeiv_control_alloc(const(gsl_odeiv_control_type)* T); int gsl_odeiv_control_init(gsl_odeiv_control* c, double eps_abs, double eps_rel, double a_y, double a_dydt); void gsl_odeiv_control_free(gsl_odeiv_control* c); int gsl_odeiv_control_hadjust (gsl_odeiv_control* c, gsl_odeiv_step* s, const(double)* y, const(double)* yerr, const(double)* dydt, double* h); const(char)* gsl_odeiv_control_name(const gsl_odeiv_control * c); /* Available control object constructors. * * The standard control object is a four parameter heuristic * defined as follows: * D0 = eps_abs + eps_rel * (a_y |y| + a_dydt h |y'|) * D1 = |yerr| * q = consistency order of method (q=4 for 4(5) embedded RK) * S = safety factor (0.9 say) * * / (D0/D1)^(1/(q+1)) D0 >= D1 * h_NEW = S h_OLD * | * \ (D0/D1)^(1/q) D0 < D1 * * This encompasses all the standard error scaling methods. * * The y method is the standard method with a_y=1, a_dydt=0. * The yp method is the standard method with a_y=0, a_dydt=1. */ gsl_odeiv_control* gsl_odeiv_control_standard_new(double eps_abs, double eps_rel, double a_y, double a_dydt); gsl_odeiv_control* gsl_odeiv_control_y_new(double eps_abs, double eps_rel); gsl_odeiv_control* gsl_odeiv_control_yp_new(double eps_abs, double eps_rel); /* This controller computes errors using different absolute errors for * each component * * D0 = eps_abs * scale_abs[i] + eps_rel * (a_y |y| + a_dydt h |y'|) */ gsl_odeiv_control* gsl_odeiv_control_scaled_new(double eps_abs, double eps_rel, double a_y, double a_dydt, const(double)* scale_abs, size_t dim); /* General evolution object. */ struct gsl_odeiv_evolve{ size_t dimension; double* y0; double* yerr; double* dydt_in; double* dydt_out; double last_step; ulong count; ulong failed_steps; } /* Evolution object methods. */ gsl_odeiv_evolve* gsl_odeiv_evolve_alloc(size_t dim); int gsl_odeiv_evolve_apply(gsl_odeiv_evolve* e, gsl_odeiv_control* con, gsl_odeiv_step* step, const(gsl_odeiv_system)* dydt, double* t, double t1, double* h, double* y); int gsl_odeiv_evolve_reset(gsl_odeiv_evolve* e); void gsl_odeiv_evolve_free(gsl_odeiv_evolve* e); /****************** odeiv2 ******************/ /* Description of a system of ODEs. * * y' = f(t,y) = dydt(t, y) * * The system is specified by giving the right-hand-side * of the equation and possibly a jacobian function. * * Some methods require the jacobian function, which calculates * the matrix dfdy and the vector dfdt. The matrix dfdy conforms * to the GSL standard, being a continuous range of floating point * values, in row-order. * * As with GSL function objects, user-supplied parameter * data is also present. */ struct gsl_odeiv2_system { int function(double t, const(double)* y, double* dydt, void* params) function_; int function(double t, const(double)* y, double* dfdy, double* dfdt, void* params) jacobian; size_t dimension; void* params; } /* Function evaluation macros */ /* #define GSL_ODEIV_FN_EVAL(S,t,y,f) (*((S)->function))(t,y,f,(S)->params) #define GSL_ODEIV_JA_EVAL(S,t,y,dfdy,dfdt) (*((S)->jacobian))(t,y,dfdy,dfdt,(S)->params) */ /* Type definitions */ alias gsl_odeiv2_step = gsl_odeiv2_step_struct; alias gsl_odeiv2_control = gsl_odeiv2_control_struct; alias gsl_odeiv2_evolve = gsl_odeiv2_evolve_struct; alias gsl_odeiv2_driver = gsl_odeiv2_driver_struct; /* Stepper object * * Opaque object for stepping an ODE system from t to t+h. * In general the object has some state which facilitates * iterating the stepping operation. */ struct gsl_odeiv2_step_type { const(char)* name; int can_use_dydt_in; int gives_exact_dydt_out; void* function(size_t dim) alloc; int function(void* state, size_t dim, double t, double h, double* y, double* yerr, const(double)* dydt_in, double* dydt_out, const(gsl_odeiv2_system)* dydt) apply; int function(void* state, const(gsl_odeiv2_driver)* d) set_driver; int function(void* state, size_t dim) reset; uint function(void* state) order; void function(void* state) free; } struct gsl_odeiv2_step_struct { const(gsl_odeiv2_step_type)* type; size_t dimension; void* state; }; /* Available stepper types */ extern const gsl_odeiv2_step_type* gsl_odeiv2_step_rk2; extern const gsl_odeiv2_step_type* gsl_odeiv2_step_rk4; extern const gsl_odeiv2_step_type* gsl_odeiv2_step_rkf45; extern const gsl_odeiv2_step_type* gsl_odeiv2_step_rkck; extern const gsl_odeiv2_step_type* gsl_odeiv2_step_rk8pd; extern const gsl_odeiv2_step_type* gsl_odeiv2_step_rk2imp; extern const gsl_odeiv2_step_type* gsl_odeiv2_step_rk4imp; extern const gsl_odeiv2_step_type* gsl_odeiv2_step_bsimp; extern const gsl_odeiv2_step_type* gsl_odeiv2_step_rk1imp; extern const gsl_odeiv2_step_type* gsl_odeiv2_step_msadams; extern const gsl_odeiv2_step_type* gsl_odeiv2_step_msbdf; /* Stepper object methods */ gsl_odeiv2_step* gsl_odeiv2_step_alloc (const gsl_odeiv2_step_type* T, size_t dim); int gsl_odeiv2_step_reset (gsl_odeiv2_step* s); void gsl_odeiv2_step_free (gsl_odeiv2_step* s); const(char)* gsl_odeiv2_step_name (const(gsl_odeiv2_step)* s); uint gsl_odeiv2_step_order (const(gsl_odeiv2_step)* s); int gsl_odeiv2_step_apply (gsl_odeiv2_step* s, double t, double h, double* y, double* yerr, const(double)* dydt_in, double* dydt_out, const(gsl_odeiv2_system)* dydt); int gsl_odeiv2_step_set_driver (gsl_odeiv2_step* s, const(gsl_odeiv2_driver)* d); /* Step size control object. */ struct gsl_odeiv2_control_type { const(char)* name; void function() alloc; int function(void* state, double eps_abs, double eps_rel, double a_y, double a_dydt) init; int function(void* state, size_t dim, uint ord, const(double)* y, const(double)* yerr, const(double)* yp, double* h) hadjust; int function(void* state, const(double) y, const(double) dydt, const(double) h, const size_t ind, double* errlev) errlevel; int function(void* state, const(gsl_odeiv2_driver)* d) set_driver; void function(void* state) free; } struct gsl_odeiv2_control_struct { const(gsl_odeiv2_control_type)* type; void* state; }; /* General step size control methods. * * The hadjust() method controls the adjustment of * step size given the result of a step and the error. * Valid hadjust() methods must return one of the codes below. * errlevel function calculates the desired error level D0. * * The general data can be used by specializations * to store state and control their heuristics. */ gsl_odeiv2_control* gsl_odeiv2_control_alloc(const(gsl_odeiv2_control_type)* T); int gsl_odeiv2_control_init (gsl_odeiv2_control* c, double eps_abs, double eps_rel, double a_y, double a_dydt); void gsl_odeiv2_control_free (gsl_odeiv2_control* c); int gsl_odeiv2_control_hadjust (gsl_odeiv2_control* c, gsl_odeiv2_step* s, const(double)* y, const(double)* yerr, const(double)* dydt, double* h); const(char)* gsl_odeiv2_control_name (const(gsl_odeiv2_control)* c); int gsl_odeiv2_control_errlevel (gsl_odeiv2_control* c, const(double) y, const(double) dydt, const(double) h, const(size_t) ind, double* errlev); int gsl_odeiv2_control_set_driver (gsl_odeiv2_control* c, const gsl_odeiv2_driver* d); /* Available control object constructors. * * The standard control object is a four parameter heuristic * defined as follows: * D0 = eps_abs + eps_rel * (a_y |y| + a_dydt h |y'|) * D1 = |yerr| * q = consistency order of method (q=4 for 4(5) embedded RK) * S = safety factor (0.9 say) * * / (D0/D1)^(1/(q+1)) D0 >= D1 * h_NEW = S h_OLD * | * \ (D0/D1)^(1/q) D0 < D1 * * This encompasses all the standard error scaling methods. * * The y method is the standard method with a_y=1, a_dydt=0. * The yp method is the standard method with a_y=0, a_dydt=1. */ gsl_odeiv2_control* gsl_odeiv2_control_standard_new (double eps_abs, double eps_rel, double a_y, double a_dydt); gsl_odeiv2_control* gsl_odeiv2_control_y_new (double eps_abs, double eps_rel); gsl_odeiv2_control* gsl_odeiv2_control_yp_new (double eps_abs, double eps_rel); /* This controller computes errors using different absolute errors for * each component * * D0 = eps_abs * scale_abs[i] + eps_rel * (a_y |y| + a_dydt h |y'|) */ gsl_odeiv2_control *gsl_odeiv2_control_scaled_new(double eps_abs, double eps_rel, double a_y, double a_dydt, const(double)* scale_abs, size_t dim); /* Evolution object */ struct gsl_odeiv2_evolve_struct { size_t dimension; double* y0; double* yerr; double* dydt_in; double* dydt_out; double last_step; ulong count; ulong failed_steps; const(gsl_odeiv2_driver)* driver; } /* Evolution object methods */ gsl_odeiv2_evolve* gsl_odeiv2_evolve_alloc (size_t dim); int gsl_odeiv2_evolve_apply (gsl_odeiv2_evolve* e, gsl_odeiv2_control* con, gsl_odeiv2_step* step, const gsl_odeiv2_system* dydt, double* t, double t1, double* h, double* y); int gsl_odeiv2_evolve_apply_fixed_step (gsl_odeiv2_evolve* e, gsl_odeiv2_control* con, gsl_odeiv2_step* step, const gsl_odeiv2_system* dydt, double* t, const(double) h0, double* y); int gsl_odeiv2_evolve_reset (gsl_odeiv2_evolve* e); void gsl_odeiv2_evolve_free (gsl_odeiv2_evolve* e); int gsl_odeiv2_evolve_set_driver (gsl_odeiv2_evolve* e, const(gsl_odeiv2_driver)* d); /* Driver object * * This is a high level wrapper for step, control and * evolve objects. */ struct gsl_odeiv2_driver_struct { const(gsl_odeiv2_system)* sys; /* ODE system */ gsl_odeiv2_step* s; /* stepper object */ gsl_odeiv2_control* c; /* control object */ gsl_odeiv2_evolve*e; /* evolve object */ double h; /* step size */ double hmin; /* minimum step size allowed */ double hmax; /* maximum step size allowed */ ulong n; /* number of steps taken */ ulong nmax; /* Maximum number of steps allowed */ } /* Driver object methods */ gsl_odeiv2_driver* gsl_odeiv2_driver_alloc_y_new (const(gsl_odeiv2_system)* sys, const(gsl_odeiv2_step_type)* T, const(double) hstart, const(double) epsabs, const(double) epsrel); gsl_odeiv2_driver* gsl_odeiv2_driver_alloc_yp_new (const(gsl_odeiv2_system)* sys, const(gsl_odeiv2_step_type)* T, const(double) hstart, const(double) epsabs, const(double) epsrel); gsl_odeiv2_driver* gsl_odeiv2_driver_alloc_scaled_new (const(gsl_odeiv2_system)* sys, const(gsl_odeiv2_step_type)* T, const(double) hstart, const(double) epsabs, const(double) epsrel, const(double) a_y, const(double) a_dydt, const(double)* scale_abs); gsl_odeiv2_driver* gsl_odeiv2_driver_alloc_standard_new (const(gsl_odeiv2_system)* sys, const(gsl_odeiv2_step_type)* T, const(double) hstart, const(double) epsabs, const(double) epsrel, const(double) a_y,const(double) a_dydt); int gsl_odeiv2_driver_set_hmin (gsl_odeiv2_driver* d, const(double) hmin); int gsl_odeiv2_driver_set_hmax (gsl_odeiv2_driver* d, const(double) hmax); int gsl_odeiv2_driver_set_nmax (gsl_odeiv2_driver* d, const(ulong) nmax); int gsl_odeiv2_driver_apply (gsl_odeiv2_driver* d, double* t, const(double) t1, double* y); int gsl_odeiv2_driver_apply_fixed_step (gsl_odeiv2_driver* d, double* t, const(double) h, const(ulong) n, double* y); int gsl_odeiv2_driver_reset (gsl_odeiv2_driver* d); int gsl_odeiv2_driver_reset_hstart (gsl_odeiv2_driver* d, const(double) hstart); void gsl_odeiv2_driver_free (gsl_odeiv2_driver* state); }
D
tee (1) --- tee fitting for pipelines 02/22/82 _U_s_a_g_e tee { <pathname> | -[1 | 2 | 3] } _D_e_s_c_r_i_p_t_i_o_n 'Tee' creates multiple copies of data flowing into its first standard input. By default, it copies this stream of data to its first standard output. In addition, a copy is made on each of the files named in its argument list. If a named file did not previously exist, it is created. If an argument consists only of a dash ("-"), optionally followed by a single digit in the range 1-3, a copy is sent to the standard output port corresponding to the digit. If the digit is missing, standard output one is assumed. 'Tee' is suitable for checkpointing data flowing past a given point in a pipeline, or for fanning out a data stream to feed multiple, parallel pipelines. _E_x_a_m_p_l_e_s lf -c | tee file_names | print -p -n >/dev/lps memo> tee [cat distribution_list] file_names> tee -2 |P1 |P2 _ :P1 change % //dir1/ | cat -n |$ _ :P2 change % //dir2/ | cat -n |$ _ lam _M_e_s_s_a_g_e_s "<pathname>: can't create" if a file cannot be created. _B_u_g_s This function could be performed by the i/o primitives. _S_e_e _A_l_s_o cat (1) tee (1) - 1 - tee (1)
D
/Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/PostgreSQL.build/SQL/PostgreSQLPrimaryKey.swift.o : /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Message/PostgreSQLMessage+0.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Data/PostgreSQLData+UUID.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Connection/ChannelPipeline+PostgreSQL.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Data/PostgreSQLData+Data.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Data/PostgreSQLData.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Message/PostgreSQLMessage+BackendKeyData.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/SQL/PostgreSQLGeneric.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/SQL/PostgreSQLBind.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Column/PostgreSQLDataTypeCode.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Message/PostgreSQLMessage+FormatCode.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Message/PostgreSQLMessage+PasswordMessage.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Message/PostgreSQLMessage+StartupMessage.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Connection/PostgreSQLConnection+TableNameCache.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/SQL/PostgreSQLTable.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/SQL/PostgreSQLAlterTable.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/SQL/PostgreSQLDataTypeStaticRepresentable.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Data/PostgreSQLDataConvertible.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/SQL/PostgreSQLQuery+DataType.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Database/PostgreSQLDatabase.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Message/PostgreSQLMessage+NotificationResponse.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Message/PostgreSQLMessage+ErrorResponse.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Message/PostgreSQLMessage+SSLSupportResponse.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Message/PostgreSQLMessage+Close.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Data/PostgreSQLData+Date.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Connection/PostgreSQLConnection+Authenticate.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Database/PostgreSQLDatabaseConfig.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Connection/PostgreSQLConnection+TransportConfig.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Data/PostgreSQLData+String.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/SQL/PostgreSQLBoolLiteral.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Data/PostgreSQLData+Bool.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Connection/PostgreSQLConnection+NotifyAndListen.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Column/PostgreSQLColumn.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Data/PostgreSQLData+Polygon.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/SQL/PostgreSQLCollation.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Connection/PostgreSQLConnection.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/SQL/PostgreSQLFunction.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Message/PostgreSQLMessage+ParameterDescription.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Message/PostgreSQLMessage+RowDescription.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Utilities/PostgreSQLProvider.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Codable/PostgreSQLDataDecoder.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Pipeline/PostgreSQLMessageDecoder.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Codable/PostgreSQLRowDecoder.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Pipeline/PostgreSQLMessageEncoder.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Codable/PostgreSQLValueEncoder.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Data/PostgreSQLData+FixedWidthInteger.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Database/PostgreSQLLogger.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Utilities/PostgreSQLError.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/SQL/PostgreSQLBinaryOperator.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Utilities/Utilities.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Connection/PostgreSQLConnection+ServerAddress.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Utilities/Exports.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Message/PostgreSQLMessage+ParameterStatus.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Connection/PostgreSQLResultFormat.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Connection/PostgreSQLConnection+Connect.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/SQL/PostgreSQLDefault.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Data/PostgreSQLData+Point.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Data/PostgreSQLData+BinaryFloatingPoint.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/SQL/PostgreSQLInsert.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/SQL/PostgreSQLUpsert.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Message/PostgreSQLMessage+BindRequest.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Message/PostgreSQLMessage+DescribeRequest.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Message/PostgreSQLMessage+ParseRequest.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Message/PostgreSQLMessage+ExecuteRequest.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Message/PostgreSQLMessage+AuthenticationRequest.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Message/PostgreSQLMessage+SSLSupportRequest.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Message/PostgreSQLMessage+DataRow.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/SQL/PostgreSQLDropIndex.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/SQL/PostgreSQLPrimaryKey.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Message/PostgreSQLMessage+Query.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Connection/PostgreSQLConnection+Query.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/SQL/PostgreSQLQuery.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Connection/PostgreSQLConnection+SimpleQuery.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Message/PostgreSQLMessage+ReadyForQuery.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/SQL.swiftmodule /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/NIOOpenSSL.swiftmodule /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/NIO.swiftmodule /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/NIOTLS.swiftmodule /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/Async.swiftmodule /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/Service.swiftmodule /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/Core.swiftmodule /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/Debugging.swiftmodule /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/COperatingSystem.swiftmodule /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/Random.swiftmodule /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/Crypto.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/XPC.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/ObjectiveC.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/Combine.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/Dispatch.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/Darwin.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/Foundation.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/CoreFoundation.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/CoreGraphics.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/Swift.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/IOKit.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/SwiftOnoneSupport.swiftmodule/x86_64-apple-macos.swiftmodule /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/NIOConcurrencyHelpers.swiftmodule /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/Bits.swiftmodule /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/NIOFoundationCompat.swiftmodule /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/DatabaseKit.swiftmodule /usr/local/Cellar/libressl/3.0.2/include/openssl/asn1.h /usr/local/Cellar/libressl/3.0.2/include/openssl/tls1.h /usr/local/Cellar/libressl/3.0.2/include/openssl/dtls1.h /usr/local/Cellar/libressl/3.0.2/include/openssl/pkcs12.h /usr/local/Cellar/libressl/3.0.2/include/openssl/ssl2.h /usr/local/Cellar/libressl/3.0.2/include/openssl/pem2.h /usr/local/Cellar/libressl/3.0.2/include/openssl/ssl23.h /usr/local/Cellar/libressl/3.0.2/include/openssl/ssl3.h /usr/local/Cellar/libressl/3.0.2/include/openssl/x509v3.h /usr/local/Cellar/libressl/3.0.2/include/openssl/md5.h /usr/local/Cellar/libressl/3.0.2/include/openssl/pkcs7.h /usr/local/Cellar/libressl/3.0.2/include/openssl/x509.h /usr/local/Cellar/libressl/3.0.2/include/openssl/sha.h /usr/local/Cellar/libressl/3.0.2/include/openssl/dsa.h /usr/local/Cellar/libressl/3.0.2/include/openssl/ecdsa.h /usr/local/Cellar/libressl/3.0.2/include/openssl/rsa.h /usr/local/Cellar/libressl/3.0.2/include/openssl/obj_mac.h /usr/local/Cellar/libressl/3.0.2/include/openssl/hmac.h /usr/local/Cellar/libressl/3.0.2/include/openssl/ec.h /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/CNIOAtomics/include/cpp_magic.h /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/CNIOLinux/include/ifaddrs-android.h /usr/local/Cellar/libressl/3.0.2/include/openssl/rand.h /usr/local/Cellar/libressl/3.0.2/include/openssl/conf.h /usr/local/Cellar/libressl/3.0.2/include/openssl/opensslconf.h /usr/local/Cellar/libressl/3.0.2/include/openssl/dh.h /usr/local/Cellar/libressl/3.0.2/include/openssl/ecdh.h /usr/local/Cellar/libressl/3.0.2/include/openssl/lhash.h /usr/local/Cellar/libressl/3.0.2/include/openssl/stack.h /usr/local/Cellar/libressl/3.0.2/include/openssl/safestack.h /usr/local/Cellar/libressl/3.0.2/include/openssl/ssl.h /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio-ssl/Sources/CNIOOpenSSL/include/c_nio_openssl.h /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/crypto/Sources/CCryptoOpenSSL/include/c_crypto_openssl.h /usr/local/Cellar/libressl/3.0.2/include/openssl/pem.h /usr/local/Cellar/libressl/3.0.2/include/openssl/bn.h /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/CNIODarwin/include/CNIODarwin.h /usr/local/Cellar/libressl/3.0.2/include/openssl/bio.h /usr/local/Cellar/libressl/3.0.2/include/openssl/crypto.h /usr/local/Cellar/libressl/3.0.2/include/openssl/srtp.h /usr/local/Cellar/libressl/3.0.2/include/openssl/evp.h /usr/local/Cellar/libressl/3.0.2/include/openssl/ossl_typ.h /usr/local/Cellar/libressl/3.0.2/include/openssl/buffer.h /usr/local/Cellar/libressl/3.0.2/include/openssl/err.h /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/CNIOAtomics/include/CNIOAtomics.h /usr/local/Cellar/libressl/3.0.2/include/openssl/opensslfeatures.h /usr/local/Cellar/libressl/3.0.2/include/openssl/objects.h /usr/local/Cellar/libressl/3.0.2/include/openssl/opensslv.h /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/CNIOLinux/include/CNIOLinux.h /usr/local/Cellar/libressl/3.0.2/include/openssl/x509_vfy.h /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/CNIOSHA1.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/NIOHTTP1.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/SQL.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/PostgreSQL.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/FluentPostgreSQL.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/FluentSQL.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/NIOOpenSSL.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/CNIOOpenSSL.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/CCryptoOpenSSL.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/NIO.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/HTTP.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/NIOTLS.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/CNIOZlib.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/Async.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/Command.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/Service.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/Console.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/Core.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/SQLite.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/FluentSQLite.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/NIOPriorityQueue.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/Logging.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/Debugging.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/Routing.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/SQLBenchmark.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/FluentBenchmark.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/COperatingSystem.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/Random.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/URLEncodedForm.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/CNIODarwin.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/Authentication.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/Validation.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/Crypto.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/App.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/CNIOHTTPParser.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/Vapor.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/CNIOAtomics.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/Redis.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/NIOConcurrencyHelpers.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/Bits.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/NIOFoundationCompat.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/WebSocket.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/NIOWebSocket.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/DatabaseKit.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/TemplateKit.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/Fluent.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/Multipart.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/CNIOLinux.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/crypto/Sources/CBase32/include/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/crypto/Sources/CBcrypt/include/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio-zlib-support/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio-ssl-support/module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/xpc/XPC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/apinotes/Dispatch.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/ApplicationServices.framework/Headers/ApplicationServices.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/Security.framework/Headers/Security.apinotes /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/PostgreSQL.build/SQL/PostgreSQLPrimaryKey~partial.swiftmodule : /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Message/PostgreSQLMessage+0.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Data/PostgreSQLData+UUID.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Connection/ChannelPipeline+PostgreSQL.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Data/PostgreSQLData+Data.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Data/PostgreSQLData.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Message/PostgreSQLMessage+BackendKeyData.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/SQL/PostgreSQLGeneric.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/SQL/PostgreSQLBind.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Column/PostgreSQLDataTypeCode.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Message/PostgreSQLMessage+FormatCode.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Message/PostgreSQLMessage+PasswordMessage.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Message/PostgreSQLMessage+StartupMessage.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Connection/PostgreSQLConnection+TableNameCache.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/SQL/PostgreSQLTable.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/SQL/PostgreSQLAlterTable.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/SQL/PostgreSQLDataTypeStaticRepresentable.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Data/PostgreSQLDataConvertible.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/SQL/PostgreSQLQuery+DataType.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Database/PostgreSQLDatabase.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Message/PostgreSQLMessage+NotificationResponse.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Message/PostgreSQLMessage+ErrorResponse.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Message/PostgreSQLMessage+SSLSupportResponse.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Message/PostgreSQLMessage+Close.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Data/PostgreSQLData+Date.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Connection/PostgreSQLConnection+Authenticate.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Database/PostgreSQLDatabaseConfig.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Connection/PostgreSQLConnection+TransportConfig.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Data/PostgreSQLData+String.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/SQL/PostgreSQLBoolLiteral.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Data/PostgreSQLData+Bool.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Connection/PostgreSQLConnection+NotifyAndListen.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Column/PostgreSQLColumn.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Data/PostgreSQLData+Polygon.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/SQL/PostgreSQLCollation.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Connection/PostgreSQLConnection.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/SQL/PostgreSQLFunction.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Message/PostgreSQLMessage+ParameterDescription.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Message/PostgreSQLMessage+RowDescription.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Utilities/PostgreSQLProvider.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Codable/PostgreSQLDataDecoder.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Pipeline/PostgreSQLMessageDecoder.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Codable/PostgreSQLRowDecoder.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Pipeline/PostgreSQLMessageEncoder.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Codable/PostgreSQLValueEncoder.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Data/PostgreSQLData+FixedWidthInteger.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Database/PostgreSQLLogger.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Utilities/PostgreSQLError.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/SQL/PostgreSQLBinaryOperator.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Utilities/Utilities.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Connection/PostgreSQLConnection+ServerAddress.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Utilities/Exports.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Message/PostgreSQLMessage+ParameterStatus.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Connection/PostgreSQLResultFormat.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Connection/PostgreSQLConnection+Connect.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/SQL/PostgreSQLDefault.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Data/PostgreSQLData+Point.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Data/PostgreSQLData+BinaryFloatingPoint.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/SQL/PostgreSQLInsert.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/SQL/PostgreSQLUpsert.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Message/PostgreSQLMessage+BindRequest.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Message/PostgreSQLMessage+DescribeRequest.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Message/PostgreSQLMessage+ParseRequest.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Message/PostgreSQLMessage+ExecuteRequest.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Message/PostgreSQLMessage+AuthenticationRequest.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Message/PostgreSQLMessage+SSLSupportRequest.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Message/PostgreSQLMessage+DataRow.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/SQL/PostgreSQLDropIndex.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/SQL/PostgreSQLPrimaryKey.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Message/PostgreSQLMessage+Query.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Connection/PostgreSQLConnection+Query.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/SQL/PostgreSQLQuery.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Connection/PostgreSQLConnection+SimpleQuery.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Message/PostgreSQLMessage+ReadyForQuery.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/SQL.swiftmodule /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/NIOOpenSSL.swiftmodule /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/NIO.swiftmodule /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/NIOTLS.swiftmodule /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/Async.swiftmodule /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/Service.swiftmodule /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/Core.swiftmodule /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/Debugging.swiftmodule /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/COperatingSystem.swiftmodule /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/Random.swiftmodule /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/Crypto.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/XPC.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/ObjectiveC.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/Combine.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/Dispatch.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/Darwin.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/Foundation.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/CoreFoundation.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/CoreGraphics.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/Swift.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/IOKit.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/SwiftOnoneSupport.swiftmodule/x86_64-apple-macos.swiftmodule /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/NIOConcurrencyHelpers.swiftmodule /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/Bits.swiftmodule /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/NIOFoundationCompat.swiftmodule /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/DatabaseKit.swiftmodule /usr/local/Cellar/libressl/3.0.2/include/openssl/asn1.h /usr/local/Cellar/libressl/3.0.2/include/openssl/tls1.h /usr/local/Cellar/libressl/3.0.2/include/openssl/dtls1.h /usr/local/Cellar/libressl/3.0.2/include/openssl/pkcs12.h /usr/local/Cellar/libressl/3.0.2/include/openssl/ssl2.h /usr/local/Cellar/libressl/3.0.2/include/openssl/pem2.h /usr/local/Cellar/libressl/3.0.2/include/openssl/ssl23.h /usr/local/Cellar/libressl/3.0.2/include/openssl/ssl3.h /usr/local/Cellar/libressl/3.0.2/include/openssl/x509v3.h /usr/local/Cellar/libressl/3.0.2/include/openssl/md5.h /usr/local/Cellar/libressl/3.0.2/include/openssl/pkcs7.h /usr/local/Cellar/libressl/3.0.2/include/openssl/x509.h /usr/local/Cellar/libressl/3.0.2/include/openssl/sha.h /usr/local/Cellar/libressl/3.0.2/include/openssl/dsa.h /usr/local/Cellar/libressl/3.0.2/include/openssl/ecdsa.h /usr/local/Cellar/libressl/3.0.2/include/openssl/rsa.h /usr/local/Cellar/libressl/3.0.2/include/openssl/obj_mac.h /usr/local/Cellar/libressl/3.0.2/include/openssl/hmac.h /usr/local/Cellar/libressl/3.0.2/include/openssl/ec.h /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/CNIOAtomics/include/cpp_magic.h /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/CNIOLinux/include/ifaddrs-android.h /usr/local/Cellar/libressl/3.0.2/include/openssl/rand.h /usr/local/Cellar/libressl/3.0.2/include/openssl/conf.h /usr/local/Cellar/libressl/3.0.2/include/openssl/opensslconf.h /usr/local/Cellar/libressl/3.0.2/include/openssl/dh.h /usr/local/Cellar/libressl/3.0.2/include/openssl/ecdh.h /usr/local/Cellar/libressl/3.0.2/include/openssl/lhash.h /usr/local/Cellar/libressl/3.0.2/include/openssl/stack.h /usr/local/Cellar/libressl/3.0.2/include/openssl/safestack.h /usr/local/Cellar/libressl/3.0.2/include/openssl/ssl.h /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio-ssl/Sources/CNIOOpenSSL/include/c_nio_openssl.h /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/crypto/Sources/CCryptoOpenSSL/include/c_crypto_openssl.h /usr/local/Cellar/libressl/3.0.2/include/openssl/pem.h /usr/local/Cellar/libressl/3.0.2/include/openssl/bn.h /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/CNIODarwin/include/CNIODarwin.h /usr/local/Cellar/libressl/3.0.2/include/openssl/bio.h /usr/local/Cellar/libressl/3.0.2/include/openssl/crypto.h /usr/local/Cellar/libressl/3.0.2/include/openssl/srtp.h /usr/local/Cellar/libressl/3.0.2/include/openssl/evp.h /usr/local/Cellar/libressl/3.0.2/include/openssl/ossl_typ.h /usr/local/Cellar/libressl/3.0.2/include/openssl/buffer.h /usr/local/Cellar/libressl/3.0.2/include/openssl/err.h /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/CNIOAtomics/include/CNIOAtomics.h /usr/local/Cellar/libressl/3.0.2/include/openssl/opensslfeatures.h /usr/local/Cellar/libressl/3.0.2/include/openssl/objects.h /usr/local/Cellar/libressl/3.0.2/include/openssl/opensslv.h /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/CNIOLinux/include/CNIOLinux.h /usr/local/Cellar/libressl/3.0.2/include/openssl/x509_vfy.h /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/CNIOSHA1.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/NIOHTTP1.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/SQL.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/PostgreSQL.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/FluentPostgreSQL.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/FluentSQL.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/NIOOpenSSL.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/CNIOOpenSSL.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/CCryptoOpenSSL.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/NIO.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/HTTP.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/NIOTLS.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/CNIOZlib.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/Async.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/Command.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/Service.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/Console.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/Core.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/SQLite.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/FluentSQLite.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/NIOPriorityQueue.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/Logging.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/Debugging.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/Routing.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/SQLBenchmark.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/FluentBenchmark.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/COperatingSystem.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/Random.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/URLEncodedForm.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/CNIODarwin.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/Authentication.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/Validation.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/Crypto.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/App.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/CNIOHTTPParser.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/Vapor.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/CNIOAtomics.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/Redis.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/NIOConcurrencyHelpers.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/Bits.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/NIOFoundationCompat.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/WebSocket.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/NIOWebSocket.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/DatabaseKit.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/TemplateKit.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/Fluent.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/Multipart.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/CNIOLinux.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/crypto/Sources/CBase32/include/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/crypto/Sources/CBcrypt/include/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio-zlib-support/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio-ssl-support/module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/xpc/XPC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/apinotes/Dispatch.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/ApplicationServices.framework/Headers/ApplicationServices.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/Security.framework/Headers/Security.apinotes /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/PostgreSQL.build/SQL/PostgreSQLPrimaryKey~partial.swiftdoc : /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Message/PostgreSQLMessage+0.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Data/PostgreSQLData+UUID.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Connection/ChannelPipeline+PostgreSQL.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Data/PostgreSQLData+Data.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Data/PostgreSQLData.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Message/PostgreSQLMessage+BackendKeyData.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/SQL/PostgreSQLGeneric.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/SQL/PostgreSQLBind.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Column/PostgreSQLDataTypeCode.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Message/PostgreSQLMessage+FormatCode.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Message/PostgreSQLMessage+PasswordMessage.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Message/PostgreSQLMessage+StartupMessage.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Connection/PostgreSQLConnection+TableNameCache.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/SQL/PostgreSQLTable.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/SQL/PostgreSQLAlterTable.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/SQL/PostgreSQLDataTypeStaticRepresentable.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Data/PostgreSQLDataConvertible.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/SQL/PostgreSQLQuery+DataType.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Database/PostgreSQLDatabase.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Message/PostgreSQLMessage+NotificationResponse.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Message/PostgreSQLMessage+ErrorResponse.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Message/PostgreSQLMessage+SSLSupportResponse.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Message/PostgreSQLMessage+Close.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Data/PostgreSQLData+Date.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Connection/PostgreSQLConnection+Authenticate.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Database/PostgreSQLDatabaseConfig.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Connection/PostgreSQLConnection+TransportConfig.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Data/PostgreSQLData+String.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/SQL/PostgreSQLBoolLiteral.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Data/PostgreSQLData+Bool.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Connection/PostgreSQLConnection+NotifyAndListen.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Column/PostgreSQLColumn.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Data/PostgreSQLData+Polygon.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/SQL/PostgreSQLCollation.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Connection/PostgreSQLConnection.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/SQL/PostgreSQLFunction.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Message/PostgreSQLMessage+ParameterDescription.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Message/PostgreSQLMessage+RowDescription.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Utilities/PostgreSQLProvider.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Codable/PostgreSQLDataDecoder.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Pipeline/PostgreSQLMessageDecoder.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Codable/PostgreSQLRowDecoder.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Pipeline/PostgreSQLMessageEncoder.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Codable/PostgreSQLValueEncoder.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Data/PostgreSQLData+FixedWidthInteger.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Database/PostgreSQLLogger.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Utilities/PostgreSQLError.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/SQL/PostgreSQLBinaryOperator.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Utilities/Utilities.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Connection/PostgreSQLConnection+ServerAddress.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Utilities/Exports.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Message/PostgreSQLMessage+ParameterStatus.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Connection/PostgreSQLResultFormat.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Connection/PostgreSQLConnection+Connect.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/SQL/PostgreSQLDefault.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Data/PostgreSQLData+Point.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Data/PostgreSQLData+BinaryFloatingPoint.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/SQL/PostgreSQLInsert.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/SQL/PostgreSQLUpsert.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Message/PostgreSQLMessage+BindRequest.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Message/PostgreSQLMessage+DescribeRequest.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Message/PostgreSQLMessage+ParseRequest.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Message/PostgreSQLMessage+ExecuteRequest.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Message/PostgreSQLMessage+AuthenticationRequest.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Message/PostgreSQLMessage+SSLSupportRequest.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Message/PostgreSQLMessage+DataRow.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/SQL/PostgreSQLDropIndex.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/SQL/PostgreSQLPrimaryKey.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Message/PostgreSQLMessage+Query.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Connection/PostgreSQLConnection+Query.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/SQL/PostgreSQLQuery.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Connection/PostgreSQLConnection+SimpleQuery.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Message/PostgreSQLMessage+ReadyForQuery.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/SQL.swiftmodule /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/NIOOpenSSL.swiftmodule /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/NIO.swiftmodule /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/NIOTLS.swiftmodule /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/Async.swiftmodule /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/Service.swiftmodule /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/Core.swiftmodule /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/Debugging.swiftmodule /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/COperatingSystem.swiftmodule /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/Random.swiftmodule /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/Crypto.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/XPC.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/ObjectiveC.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/Combine.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/Dispatch.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/Darwin.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/Foundation.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/CoreFoundation.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/CoreGraphics.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/Swift.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/IOKit.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/SwiftOnoneSupport.swiftmodule/x86_64-apple-macos.swiftmodule /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/NIOConcurrencyHelpers.swiftmodule /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/Bits.swiftmodule /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/NIOFoundationCompat.swiftmodule /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/DatabaseKit.swiftmodule /usr/local/Cellar/libressl/3.0.2/include/openssl/asn1.h /usr/local/Cellar/libressl/3.0.2/include/openssl/tls1.h /usr/local/Cellar/libressl/3.0.2/include/openssl/dtls1.h /usr/local/Cellar/libressl/3.0.2/include/openssl/pkcs12.h /usr/local/Cellar/libressl/3.0.2/include/openssl/ssl2.h /usr/local/Cellar/libressl/3.0.2/include/openssl/pem2.h /usr/local/Cellar/libressl/3.0.2/include/openssl/ssl23.h /usr/local/Cellar/libressl/3.0.2/include/openssl/ssl3.h /usr/local/Cellar/libressl/3.0.2/include/openssl/x509v3.h /usr/local/Cellar/libressl/3.0.2/include/openssl/md5.h /usr/local/Cellar/libressl/3.0.2/include/openssl/pkcs7.h /usr/local/Cellar/libressl/3.0.2/include/openssl/x509.h /usr/local/Cellar/libressl/3.0.2/include/openssl/sha.h /usr/local/Cellar/libressl/3.0.2/include/openssl/dsa.h /usr/local/Cellar/libressl/3.0.2/include/openssl/ecdsa.h /usr/local/Cellar/libressl/3.0.2/include/openssl/rsa.h /usr/local/Cellar/libressl/3.0.2/include/openssl/obj_mac.h /usr/local/Cellar/libressl/3.0.2/include/openssl/hmac.h /usr/local/Cellar/libressl/3.0.2/include/openssl/ec.h /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/CNIOAtomics/include/cpp_magic.h /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/CNIOLinux/include/ifaddrs-android.h /usr/local/Cellar/libressl/3.0.2/include/openssl/rand.h /usr/local/Cellar/libressl/3.0.2/include/openssl/conf.h /usr/local/Cellar/libressl/3.0.2/include/openssl/opensslconf.h /usr/local/Cellar/libressl/3.0.2/include/openssl/dh.h /usr/local/Cellar/libressl/3.0.2/include/openssl/ecdh.h /usr/local/Cellar/libressl/3.0.2/include/openssl/lhash.h /usr/local/Cellar/libressl/3.0.2/include/openssl/stack.h /usr/local/Cellar/libressl/3.0.2/include/openssl/safestack.h /usr/local/Cellar/libressl/3.0.2/include/openssl/ssl.h /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio-ssl/Sources/CNIOOpenSSL/include/c_nio_openssl.h /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/crypto/Sources/CCryptoOpenSSL/include/c_crypto_openssl.h /usr/local/Cellar/libressl/3.0.2/include/openssl/pem.h /usr/local/Cellar/libressl/3.0.2/include/openssl/bn.h /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/CNIODarwin/include/CNIODarwin.h /usr/local/Cellar/libressl/3.0.2/include/openssl/bio.h /usr/local/Cellar/libressl/3.0.2/include/openssl/crypto.h /usr/local/Cellar/libressl/3.0.2/include/openssl/srtp.h /usr/local/Cellar/libressl/3.0.2/include/openssl/evp.h /usr/local/Cellar/libressl/3.0.2/include/openssl/ossl_typ.h /usr/local/Cellar/libressl/3.0.2/include/openssl/buffer.h /usr/local/Cellar/libressl/3.0.2/include/openssl/err.h /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/CNIOAtomics/include/CNIOAtomics.h /usr/local/Cellar/libressl/3.0.2/include/openssl/opensslfeatures.h /usr/local/Cellar/libressl/3.0.2/include/openssl/objects.h /usr/local/Cellar/libressl/3.0.2/include/openssl/opensslv.h /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/CNIOLinux/include/CNIOLinux.h /usr/local/Cellar/libressl/3.0.2/include/openssl/x509_vfy.h /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/CNIOSHA1.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/NIOHTTP1.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/SQL.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/PostgreSQL.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/FluentPostgreSQL.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/FluentSQL.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/NIOOpenSSL.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/CNIOOpenSSL.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/CCryptoOpenSSL.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/NIO.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/HTTP.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/NIOTLS.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/CNIOZlib.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/Async.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/Command.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/Service.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/Console.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/Core.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/SQLite.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/FluentSQLite.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/NIOPriorityQueue.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/Logging.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/Debugging.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/Routing.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/SQLBenchmark.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/FluentBenchmark.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/COperatingSystem.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/Random.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/URLEncodedForm.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/CNIODarwin.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/Authentication.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/Validation.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/Crypto.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/App.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/CNIOHTTPParser.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/Vapor.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/CNIOAtomics.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/Redis.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/NIOConcurrencyHelpers.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/Bits.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/NIOFoundationCompat.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/WebSocket.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/NIOWebSocket.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/DatabaseKit.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/TemplateKit.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/Fluent.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/Multipart.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/CNIOLinux.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/crypto/Sources/CBase32/include/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/crypto/Sources/CBcrypt/include/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio-zlib-support/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio-ssl-support/module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/xpc/XPC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/apinotes/Dispatch.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/ApplicationServices.framework/Headers/ApplicationServices.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/Security.framework/Headers/Security.apinotes /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/PostgreSQL.build/SQL/PostgreSQLPrimaryKey~partial.swiftsourceinfo : /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Message/PostgreSQLMessage+0.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Data/PostgreSQLData+UUID.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Connection/ChannelPipeline+PostgreSQL.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Data/PostgreSQLData+Data.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Data/PostgreSQLData.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Message/PostgreSQLMessage+BackendKeyData.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/SQL/PostgreSQLGeneric.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/SQL/PostgreSQLBind.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Column/PostgreSQLDataTypeCode.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Message/PostgreSQLMessage+FormatCode.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Message/PostgreSQLMessage+PasswordMessage.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Message/PostgreSQLMessage+StartupMessage.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Connection/PostgreSQLConnection+TableNameCache.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/SQL/PostgreSQLTable.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/SQL/PostgreSQLAlterTable.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/SQL/PostgreSQLDataTypeStaticRepresentable.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Data/PostgreSQLDataConvertible.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/SQL/PostgreSQLQuery+DataType.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Database/PostgreSQLDatabase.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Message/PostgreSQLMessage+NotificationResponse.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Message/PostgreSQLMessage+ErrorResponse.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Message/PostgreSQLMessage+SSLSupportResponse.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Message/PostgreSQLMessage+Close.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Data/PostgreSQLData+Date.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Connection/PostgreSQLConnection+Authenticate.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Database/PostgreSQLDatabaseConfig.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Connection/PostgreSQLConnection+TransportConfig.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Data/PostgreSQLData+String.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/SQL/PostgreSQLBoolLiteral.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Data/PostgreSQLData+Bool.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Connection/PostgreSQLConnection+NotifyAndListen.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Column/PostgreSQLColumn.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Data/PostgreSQLData+Polygon.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/SQL/PostgreSQLCollation.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Connection/PostgreSQLConnection.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/SQL/PostgreSQLFunction.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Message/PostgreSQLMessage+ParameterDescription.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Message/PostgreSQLMessage+RowDescription.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Utilities/PostgreSQLProvider.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Codable/PostgreSQLDataDecoder.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Pipeline/PostgreSQLMessageDecoder.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Codable/PostgreSQLRowDecoder.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Pipeline/PostgreSQLMessageEncoder.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Codable/PostgreSQLValueEncoder.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Data/PostgreSQLData+FixedWidthInteger.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Database/PostgreSQLLogger.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Utilities/PostgreSQLError.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/SQL/PostgreSQLBinaryOperator.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Utilities/Utilities.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Connection/PostgreSQLConnection+ServerAddress.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Utilities/Exports.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Message/PostgreSQLMessage+ParameterStatus.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Connection/PostgreSQLResultFormat.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Connection/PostgreSQLConnection+Connect.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/SQL/PostgreSQLDefault.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Data/PostgreSQLData+Point.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Data/PostgreSQLData+BinaryFloatingPoint.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/SQL/PostgreSQLInsert.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/SQL/PostgreSQLUpsert.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Message/PostgreSQLMessage+BindRequest.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Message/PostgreSQLMessage+DescribeRequest.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Message/PostgreSQLMessage+ParseRequest.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Message/PostgreSQLMessage+ExecuteRequest.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Message/PostgreSQLMessage+AuthenticationRequest.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Message/PostgreSQLMessage+SSLSupportRequest.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Message/PostgreSQLMessage+DataRow.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/SQL/PostgreSQLDropIndex.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/SQL/PostgreSQLPrimaryKey.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Message/PostgreSQLMessage+Query.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Connection/PostgreSQLConnection+Query.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/SQL/PostgreSQLQuery.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Connection/PostgreSQLConnection+SimpleQuery.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/postgresql/Sources/PostgreSQL/Message/PostgreSQLMessage+ReadyForQuery.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/SQL.swiftmodule /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/NIOOpenSSL.swiftmodule /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/NIO.swiftmodule /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/NIOTLS.swiftmodule /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/Async.swiftmodule /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/Service.swiftmodule /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/Core.swiftmodule /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/Debugging.swiftmodule /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/COperatingSystem.swiftmodule /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/Random.swiftmodule /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/Crypto.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/XPC.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/ObjectiveC.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/Combine.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/Dispatch.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/Darwin.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/Foundation.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/CoreFoundation.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/CoreGraphics.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/Swift.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/IOKit.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/SwiftOnoneSupport.swiftmodule/x86_64-apple-macos.swiftmodule /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/NIOConcurrencyHelpers.swiftmodule /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/Bits.swiftmodule /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/NIOFoundationCompat.swiftmodule /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/DatabaseKit.swiftmodule /usr/local/Cellar/libressl/3.0.2/include/openssl/asn1.h /usr/local/Cellar/libressl/3.0.2/include/openssl/tls1.h /usr/local/Cellar/libressl/3.0.2/include/openssl/dtls1.h /usr/local/Cellar/libressl/3.0.2/include/openssl/pkcs12.h /usr/local/Cellar/libressl/3.0.2/include/openssl/ssl2.h /usr/local/Cellar/libressl/3.0.2/include/openssl/pem2.h /usr/local/Cellar/libressl/3.0.2/include/openssl/ssl23.h /usr/local/Cellar/libressl/3.0.2/include/openssl/ssl3.h /usr/local/Cellar/libressl/3.0.2/include/openssl/x509v3.h /usr/local/Cellar/libressl/3.0.2/include/openssl/md5.h /usr/local/Cellar/libressl/3.0.2/include/openssl/pkcs7.h /usr/local/Cellar/libressl/3.0.2/include/openssl/x509.h /usr/local/Cellar/libressl/3.0.2/include/openssl/sha.h /usr/local/Cellar/libressl/3.0.2/include/openssl/dsa.h /usr/local/Cellar/libressl/3.0.2/include/openssl/ecdsa.h /usr/local/Cellar/libressl/3.0.2/include/openssl/rsa.h /usr/local/Cellar/libressl/3.0.2/include/openssl/obj_mac.h /usr/local/Cellar/libressl/3.0.2/include/openssl/hmac.h /usr/local/Cellar/libressl/3.0.2/include/openssl/ec.h /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/CNIOAtomics/include/cpp_magic.h /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/CNIOLinux/include/ifaddrs-android.h /usr/local/Cellar/libressl/3.0.2/include/openssl/rand.h /usr/local/Cellar/libressl/3.0.2/include/openssl/conf.h /usr/local/Cellar/libressl/3.0.2/include/openssl/opensslconf.h /usr/local/Cellar/libressl/3.0.2/include/openssl/dh.h /usr/local/Cellar/libressl/3.0.2/include/openssl/ecdh.h /usr/local/Cellar/libressl/3.0.2/include/openssl/lhash.h /usr/local/Cellar/libressl/3.0.2/include/openssl/stack.h /usr/local/Cellar/libressl/3.0.2/include/openssl/safestack.h /usr/local/Cellar/libressl/3.0.2/include/openssl/ssl.h /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio-ssl/Sources/CNIOOpenSSL/include/c_nio_openssl.h /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/crypto/Sources/CCryptoOpenSSL/include/c_crypto_openssl.h /usr/local/Cellar/libressl/3.0.2/include/openssl/pem.h /usr/local/Cellar/libressl/3.0.2/include/openssl/bn.h /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/CNIODarwin/include/CNIODarwin.h /usr/local/Cellar/libressl/3.0.2/include/openssl/bio.h /usr/local/Cellar/libressl/3.0.2/include/openssl/crypto.h /usr/local/Cellar/libressl/3.0.2/include/openssl/srtp.h /usr/local/Cellar/libressl/3.0.2/include/openssl/evp.h /usr/local/Cellar/libressl/3.0.2/include/openssl/ossl_typ.h /usr/local/Cellar/libressl/3.0.2/include/openssl/buffer.h /usr/local/Cellar/libressl/3.0.2/include/openssl/err.h /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/CNIOAtomics/include/CNIOAtomics.h /usr/local/Cellar/libressl/3.0.2/include/openssl/opensslfeatures.h /usr/local/Cellar/libressl/3.0.2/include/openssl/objects.h /usr/local/Cellar/libressl/3.0.2/include/openssl/opensslv.h /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/CNIOLinux/include/CNIOLinux.h /usr/local/Cellar/libressl/3.0.2/include/openssl/x509_vfy.h /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/CNIOSHA1.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/NIOHTTP1.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/SQL.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/PostgreSQL.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/FluentPostgreSQL.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/FluentSQL.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/NIOOpenSSL.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/CNIOOpenSSL.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/CCryptoOpenSSL.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/NIO.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/HTTP.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/NIOTLS.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/CNIOZlib.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/Async.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/Command.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/Service.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/Console.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/Core.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/SQLite.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/FluentSQLite.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/NIOPriorityQueue.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/Logging.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/Debugging.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/Routing.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/SQLBenchmark.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/FluentBenchmark.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/COperatingSystem.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/Random.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/URLEncodedForm.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/CNIODarwin.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/Authentication.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/Validation.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/Crypto.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/App.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/CNIOHTTPParser.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/Vapor.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/CNIOAtomics.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/Redis.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/NIOConcurrencyHelpers.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/Bits.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/NIOFoundationCompat.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/WebSocket.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/NIOWebSocket.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/DatabaseKit.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/TemplateKit.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/Fluent.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/Multipart.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/CNIOLinux.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/crypto/Sources/CBase32/include/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/crypto/Sources/CBcrypt/include/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio-zlib-support/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio-ssl-support/module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/xpc/XPC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/apinotes/Dispatch.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/ApplicationServices.framework/Headers/ApplicationServices.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/Security.framework/Headers/Security.apinotes
D
/Users/nitisha/Documents/My_Task/DemoApplication/Build/Intermediates/Pods.build/Debug-iphonesimulator/ObjectMapper.build/Objects-normal/x86_64/EnumOperators.o : /Users/nitisha/Documents/My_Task/DemoApplication/Pods/ObjectMapper/Sources/FromJSON.swift /Users/nitisha/Documents/My_Task/DemoApplication/Pods/ObjectMapper/Sources/ToJSON.swift /Users/nitisha/Documents/My_Task/DemoApplication/Pods/ObjectMapper/Sources/Mappable.swift /Users/nitisha/Documents/My_Task/DemoApplication/Pods/ObjectMapper/Sources/ImmutableMappable.swift /Users/nitisha/Documents/My_Task/DemoApplication/Pods/ObjectMapper/Sources/TransformType.swift /Users/nitisha/Documents/My_Task/DemoApplication/Pods/ObjectMapper/Sources/TransformOf.swift /Users/nitisha/Documents/My_Task/DemoApplication/Pods/ObjectMapper/Sources/URLTransform.swift /Users/nitisha/Documents/My_Task/DemoApplication/Pods/ObjectMapper/Sources/DataTransform.swift /Users/nitisha/Documents/My_Task/DemoApplication/Pods/ObjectMapper/Sources/DateTransform.swift /Users/nitisha/Documents/My_Task/DemoApplication/Pods/ObjectMapper/Sources/ISO8601DateTransform.swift /Users/nitisha/Documents/My_Task/DemoApplication/Pods/ObjectMapper/Sources/EnumTransform.swift /Users/nitisha/Documents/My_Task/DemoApplication/Pods/ObjectMapper/Sources/NSDecimalNumberTransform.swift /Users/nitisha/Documents/My_Task/DemoApplication/Pods/ObjectMapper/Sources/DateFormatterTransform.swift /Users/nitisha/Documents/My_Task/DemoApplication/Pods/ObjectMapper/Sources/HexColorTransform.swift /Users/nitisha/Documents/My_Task/DemoApplication/Pods/ObjectMapper/Sources/CustomDateFormatTransform.swift /Users/nitisha/Documents/My_Task/DemoApplication/Pods/ObjectMapper/Sources/DictionaryTransform.swift /Users/nitisha/Documents/My_Task/DemoApplication/Pods/ObjectMapper/Sources/Map.swift /Users/nitisha/Documents/My_Task/DemoApplication/Pods/ObjectMapper/Sources/Mapper.swift /Users/nitisha/Documents/My_Task/DemoApplication/Pods/ObjectMapper/Sources/MapError.swift /Users/nitisha/Documents/My_Task/DemoApplication/Pods/ObjectMapper/Sources/Operators.swift /Users/nitisha/Documents/My_Task/DemoApplication/Pods/ObjectMapper/Sources/TransformOperators.swift /Users/nitisha/Documents/My_Task/DemoApplication/Pods/ObjectMapper/Sources/EnumOperators.swift /Users/nitisha/Documents/My_Task/DemoApplication/Pods/ObjectMapper/Sources/IntegerOperators.swift /Users/nitisha/Documents/Software/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/ObjectiveC.apinotesc /Users/nitisha/Documents/Software/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.apinotesc /Users/nitisha/Documents/Software/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Foundation.apinotesc /Users/nitisha/Documents/Software/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreGraphics.apinotesc /Users/nitisha/Documents/Software/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/UIKit.apinotesc /Users/nitisha/Documents/Software/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreText.apinotesc /Users/nitisha/Documents/Software/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/ObjectiveC.swiftmodule /Users/nitisha/Documents/Software/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreImage.swiftmodule /Users/nitisha/Documents/Software/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/QuartzCore.swiftmodule /Users/nitisha/Documents/Software/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.swiftmodule /Users/nitisha/Documents/Software/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Darwin.swiftmodule /Users/nitisha/Documents/Software/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Foundation.swiftmodule /Users/nitisha/Documents/Software/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreGraphics.swiftmodule /Users/nitisha/Documents/Software/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Swift.swiftmodule /Users/nitisha/Documents/Software/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/UIKit.swiftmodule /Users/nitisha/Documents/Software/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/SwiftOnoneSupport.swiftmodule /Users/nitisha/Documents/My_Task/DemoApplication/Pods/Target\ Support\ Files/ObjectMapper/ObjectMapper-umbrella.h /Users/nitisha/Documents/My_Task/DemoApplication/Build/Intermediates/Pods.build/Debug-iphonesimulator/ObjectMapper.build/unextended-module.modulemap /Users/nitisha/Documents/My_Task/DemoApplication/Build/Intermediates/Pods.build/Debug-iphonesimulator/ObjectMapper.build/Objects-normal/x86_64/EnumOperators~partial.swiftmodule : /Users/nitisha/Documents/My_Task/DemoApplication/Pods/ObjectMapper/Sources/FromJSON.swift /Users/nitisha/Documents/My_Task/DemoApplication/Pods/ObjectMapper/Sources/ToJSON.swift /Users/nitisha/Documents/My_Task/DemoApplication/Pods/ObjectMapper/Sources/Mappable.swift /Users/nitisha/Documents/My_Task/DemoApplication/Pods/ObjectMapper/Sources/ImmutableMappable.swift /Users/nitisha/Documents/My_Task/DemoApplication/Pods/ObjectMapper/Sources/TransformType.swift /Users/nitisha/Documents/My_Task/DemoApplication/Pods/ObjectMapper/Sources/TransformOf.swift /Users/nitisha/Documents/My_Task/DemoApplication/Pods/ObjectMapper/Sources/URLTransform.swift /Users/nitisha/Documents/My_Task/DemoApplication/Pods/ObjectMapper/Sources/DataTransform.swift /Users/nitisha/Documents/My_Task/DemoApplication/Pods/ObjectMapper/Sources/DateTransform.swift /Users/nitisha/Documents/My_Task/DemoApplication/Pods/ObjectMapper/Sources/ISO8601DateTransform.swift /Users/nitisha/Documents/My_Task/DemoApplication/Pods/ObjectMapper/Sources/EnumTransform.swift /Users/nitisha/Documents/My_Task/DemoApplication/Pods/ObjectMapper/Sources/NSDecimalNumberTransform.swift /Users/nitisha/Documents/My_Task/DemoApplication/Pods/ObjectMapper/Sources/DateFormatterTransform.swift /Users/nitisha/Documents/My_Task/DemoApplication/Pods/ObjectMapper/Sources/HexColorTransform.swift /Users/nitisha/Documents/My_Task/DemoApplication/Pods/ObjectMapper/Sources/CustomDateFormatTransform.swift /Users/nitisha/Documents/My_Task/DemoApplication/Pods/ObjectMapper/Sources/DictionaryTransform.swift /Users/nitisha/Documents/My_Task/DemoApplication/Pods/ObjectMapper/Sources/Map.swift /Users/nitisha/Documents/My_Task/DemoApplication/Pods/ObjectMapper/Sources/Mapper.swift /Users/nitisha/Documents/My_Task/DemoApplication/Pods/ObjectMapper/Sources/MapError.swift /Users/nitisha/Documents/My_Task/DemoApplication/Pods/ObjectMapper/Sources/Operators.swift /Users/nitisha/Documents/My_Task/DemoApplication/Pods/ObjectMapper/Sources/TransformOperators.swift /Users/nitisha/Documents/My_Task/DemoApplication/Pods/ObjectMapper/Sources/EnumOperators.swift /Users/nitisha/Documents/My_Task/DemoApplication/Pods/ObjectMapper/Sources/IntegerOperators.swift /Users/nitisha/Documents/Software/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/ObjectiveC.apinotesc /Users/nitisha/Documents/Software/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.apinotesc /Users/nitisha/Documents/Software/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Foundation.apinotesc /Users/nitisha/Documents/Software/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreGraphics.apinotesc /Users/nitisha/Documents/Software/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/UIKit.apinotesc /Users/nitisha/Documents/Software/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreText.apinotesc /Users/nitisha/Documents/Software/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/ObjectiveC.swiftmodule /Users/nitisha/Documents/Software/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreImage.swiftmodule /Users/nitisha/Documents/Software/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/QuartzCore.swiftmodule /Users/nitisha/Documents/Software/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.swiftmodule /Users/nitisha/Documents/Software/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Darwin.swiftmodule /Users/nitisha/Documents/Software/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Foundation.swiftmodule /Users/nitisha/Documents/Software/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreGraphics.swiftmodule /Users/nitisha/Documents/Software/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Swift.swiftmodule /Users/nitisha/Documents/Software/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/UIKit.swiftmodule /Users/nitisha/Documents/Software/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/SwiftOnoneSupport.swiftmodule /Users/nitisha/Documents/My_Task/DemoApplication/Pods/Target\ Support\ Files/ObjectMapper/ObjectMapper-umbrella.h /Users/nitisha/Documents/My_Task/DemoApplication/Build/Intermediates/Pods.build/Debug-iphonesimulator/ObjectMapper.build/unextended-module.modulemap /Users/nitisha/Documents/My_Task/DemoApplication/Build/Intermediates/Pods.build/Debug-iphonesimulator/ObjectMapper.build/Objects-normal/x86_64/EnumOperators~partial.swiftdoc : /Users/nitisha/Documents/My_Task/DemoApplication/Pods/ObjectMapper/Sources/FromJSON.swift /Users/nitisha/Documents/My_Task/DemoApplication/Pods/ObjectMapper/Sources/ToJSON.swift /Users/nitisha/Documents/My_Task/DemoApplication/Pods/ObjectMapper/Sources/Mappable.swift /Users/nitisha/Documents/My_Task/DemoApplication/Pods/ObjectMapper/Sources/ImmutableMappable.swift /Users/nitisha/Documents/My_Task/DemoApplication/Pods/ObjectMapper/Sources/TransformType.swift /Users/nitisha/Documents/My_Task/DemoApplication/Pods/ObjectMapper/Sources/TransformOf.swift /Users/nitisha/Documents/My_Task/DemoApplication/Pods/ObjectMapper/Sources/URLTransform.swift /Users/nitisha/Documents/My_Task/DemoApplication/Pods/ObjectMapper/Sources/DataTransform.swift /Users/nitisha/Documents/My_Task/DemoApplication/Pods/ObjectMapper/Sources/DateTransform.swift /Users/nitisha/Documents/My_Task/DemoApplication/Pods/ObjectMapper/Sources/ISO8601DateTransform.swift /Users/nitisha/Documents/My_Task/DemoApplication/Pods/ObjectMapper/Sources/EnumTransform.swift /Users/nitisha/Documents/My_Task/DemoApplication/Pods/ObjectMapper/Sources/NSDecimalNumberTransform.swift /Users/nitisha/Documents/My_Task/DemoApplication/Pods/ObjectMapper/Sources/DateFormatterTransform.swift /Users/nitisha/Documents/My_Task/DemoApplication/Pods/ObjectMapper/Sources/HexColorTransform.swift /Users/nitisha/Documents/My_Task/DemoApplication/Pods/ObjectMapper/Sources/CustomDateFormatTransform.swift /Users/nitisha/Documents/My_Task/DemoApplication/Pods/ObjectMapper/Sources/DictionaryTransform.swift /Users/nitisha/Documents/My_Task/DemoApplication/Pods/ObjectMapper/Sources/Map.swift /Users/nitisha/Documents/My_Task/DemoApplication/Pods/ObjectMapper/Sources/Mapper.swift /Users/nitisha/Documents/My_Task/DemoApplication/Pods/ObjectMapper/Sources/MapError.swift /Users/nitisha/Documents/My_Task/DemoApplication/Pods/ObjectMapper/Sources/Operators.swift /Users/nitisha/Documents/My_Task/DemoApplication/Pods/ObjectMapper/Sources/TransformOperators.swift /Users/nitisha/Documents/My_Task/DemoApplication/Pods/ObjectMapper/Sources/EnumOperators.swift /Users/nitisha/Documents/My_Task/DemoApplication/Pods/ObjectMapper/Sources/IntegerOperators.swift /Users/nitisha/Documents/Software/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/ObjectiveC.apinotesc /Users/nitisha/Documents/Software/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.apinotesc /Users/nitisha/Documents/Software/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Foundation.apinotesc /Users/nitisha/Documents/Software/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreGraphics.apinotesc /Users/nitisha/Documents/Software/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/UIKit.apinotesc /Users/nitisha/Documents/Software/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreText.apinotesc /Users/nitisha/Documents/Software/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/ObjectiveC.swiftmodule /Users/nitisha/Documents/Software/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreImage.swiftmodule /Users/nitisha/Documents/Software/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/QuartzCore.swiftmodule /Users/nitisha/Documents/Software/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.swiftmodule /Users/nitisha/Documents/Software/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Darwin.swiftmodule /Users/nitisha/Documents/Software/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Foundation.swiftmodule /Users/nitisha/Documents/Software/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreGraphics.swiftmodule /Users/nitisha/Documents/Software/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Swift.swiftmodule /Users/nitisha/Documents/Software/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/UIKit.swiftmodule /Users/nitisha/Documents/Software/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/SwiftOnoneSupport.swiftmodule /Users/nitisha/Documents/My_Task/DemoApplication/Pods/Target\ Support\ Files/ObjectMapper/ObjectMapper-umbrella.h /Users/nitisha/Documents/My_Task/DemoApplication/Build/Intermediates/Pods.build/Debug-iphonesimulator/ObjectMapper.build/unextended-module.modulemap
D
/Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/x86_64-apple-macosx/debug/HTTP.build/Codable/HTTPMessageCoder.swift.o : /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/http/Sources/HTTP/Utilities/RFC1123.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/http/Sources/HTTP/Message/URL+HTTP.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/http/Sources/HTTP/Utilities/HTTPHeaders+Basic.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/http/Sources/HTTP/Message/Forwarded.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/http/Sources/HTTP/Message/MediaTypePreference.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/http/Sources/HTTP/Body/HTTPBodyStorage.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/http/Sources/HTTP/Message/HTTPMessage.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/http/Sources/HTTP/Body/HTTPBodyRepresentable.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/http/Sources/HTTP/Message/HTTPHeaderName.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/http/Sources/HTTP/Responder/HTTPScheme.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/http/Sources/HTTP/Message/HTTPResponse.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/http/Sources/HTTP/Cookies/HTTPCookieValue.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/http/Sources/HTTP/Body/HTTPChunkedStream.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/http/Sources/HTTP/Responder/HTTPClientProtocolUpgrader.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/http/Sources/HTTP/Responder/HTTPServerResponder.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/http/Sources/HTTP/Codable/HTTPMessageCoder.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/http/Sources/HTTP/Utilities/HTTPHeaders+Bearer.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/http/Sources/HTTP/Responder/HTTPServer.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/http/Sources/HTTP/Utilities/HTTPError.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/http/Sources/HTTP/Cookies/HTTPCookies.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/http/Sources/HTTP/Message/HTTPHeaders.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/http/Sources/HTTP/Utilities/String+IsIPAddress.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/http/Sources/HTTP/Exports.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/http/Sources/HTTP/Responder/HTTPClient.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/http/Sources/HTTP/Message/HTTPRequest.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/http/Sources/HTTP/Body/HTTPBody.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/x86_64-apple-macosx/debug/NIOHTTP1.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/ObjectiveC.swiftmodule /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/x86_64-apple-macosx/debug/NIOOpenSSL.swiftmodule /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/x86_64-apple-macosx/debug/NIO.swiftmodule /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/x86_64-apple-macosx/debug/NIOTLS.swiftmodule /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/x86_64-apple-macosx/debug/Async.swiftmodule /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/x86_64-apple-macosx/debug/Core.swiftmodule /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/x86_64-apple-macosx/debug/Debugging.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Dispatch.swiftmodule /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/x86_64-apple-macosx/debug/COperatingSystem.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/CoreFoundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/CoreGraphics.swiftmodule /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/x86_64-apple-macosx/debug/NIOConcurrencyHelpers.swiftmodule /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/x86_64-apple-macosx/debug/Bits.swiftmodule /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/x86_64-apple-macosx/debug/NIOFoundationCompat.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/IOKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/SwiftOnoneSupport.swiftmodule /usr/local/Cellar/libressl/2.9.2/include/openssl/asn1.h /usr/local/Cellar/libressl/2.9.2/include/openssl/tls1.h /usr/local/Cellar/libressl/2.9.2/include/openssl/dtls1.h /usr/local/Cellar/libressl/2.9.2/include/openssl/pkcs12.h /usr/local/Cellar/libressl/2.9.2/include/openssl/ssl2.h /usr/local/Cellar/libressl/2.9.2/include/openssl/pem2.h /usr/local/Cellar/libressl/2.9.2/include/openssl/ssl23.h /usr/local/Cellar/libressl/2.9.2/include/openssl/ssl3.h /usr/local/Cellar/libressl/2.9.2/include/openssl/x509v3.h /usr/local/Cellar/libressl/2.9.2/include/openssl/md5.h /usr/local/Cellar/libressl/2.9.2/include/openssl/pkcs7.h /usr/local/Cellar/libressl/2.9.2/include/openssl/x509.h /usr/local/Cellar/libressl/2.9.2/include/openssl/sha.h /usr/local/Cellar/libressl/2.9.2/include/openssl/dsa.h /usr/local/Cellar/libressl/2.9.2/include/openssl/ecdsa.h /usr/local/Cellar/libressl/2.9.2/include/openssl/rsa.h /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/CNIOZlib/include/CNIOZlib.h /usr/local/Cellar/libressl/2.9.2/include/openssl/obj_mac.h /usr/local/Cellar/libressl/2.9.2/include/openssl/hmac.h /usr/local/Cellar/libressl/2.9.2/include/openssl/ec.h /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/CNIOAtomics/include/cpp_magic.h /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/CNIOLinux/include/ifaddrs-android.h /usr/local/Cellar/libressl/2.9.2/include/openssl/rand.h /usr/local/Cellar/libressl/2.9.2/include/openssl/conf.h /usr/local/Cellar/libressl/2.9.2/include/openssl/opensslconf.h /usr/local/Cellar/libressl/2.9.2/include/openssl/dh.h /usr/local/Cellar/libressl/2.9.2/include/openssl/ecdh.h /usr/local/Cellar/libressl/2.9.2/include/openssl/lhash.h /usr/local/Cellar/libressl/2.9.2/include/openssl/stack.h /usr/local/Cellar/libressl/2.9.2/include/openssl/safestack.h /usr/local/Cellar/libressl/2.9.2/include/openssl/ssl.h /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio-ssl/Sources/CNIOOpenSSL/include/c_nio_openssl.h /usr/local/Cellar/libressl/2.9.2/include/openssl/pem.h /usr/local/Cellar/libressl/2.9.2/include/openssl/bn.h /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/CNIODarwin/include/CNIODarwin.h /usr/local/Cellar/libressl/2.9.2/include/openssl/bio.h /usr/local/Cellar/libressl/2.9.2/include/openssl/crypto.h /usr/local/Cellar/libressl/2.9.2/include/openssl/srtp.h /usr/local/Cellar/libressl/2.9.2/include/openssl/evp.h /usr/local/Cellar/libressl/2.9.2/include/openssl/ossl_typ.h /usr/local/Cellar/libressl/2.9.2/include/openssl/buffer.h /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/CNIOHTTPParser/include/CNIOHTTPParser.h /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/CNIOHTTPParser/include/c_nio_http_parser.h /usr/local/Cellar/libressl/2.9.2/include/openssl/err.h /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/CNIOAtomics/include/CNIOAtomics.h /usr/local/Cellar/libressl/2.9.2/include/openssl/opensslfeatures.h /usr/local/Cellar/libressl/2.9.2/include/openssl/objects.h /usr/local/Cellar/libressl/2.9.2/include/openssl/opensslv.h /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/CNIOLinux/include/CNIOLinux.h /usr/local/Cellar/libressl/2.9.2/include/openssl/x509_vfy.h /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/x86_64-apple-macosx/debug/CNIOSHA1.build/module.modulemap /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/x86_64-apple-macosx/debug/CNIOOpenSSL.build/module.modulemap /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/x86_64-apple-macosx/debug/CCryptoOpenSSL.build/module.modulemap /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/x86_64-apple-macosx/debug/CNIOZlib.build/module.modulemap /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/x86_64-apple-macosx/debug/CNIODarwin.build/module.modulemap /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/x86_64-apple-macosx/debug/CNIOHTTPParser.build/module.modulemap /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/x86_64-apple-macosx/debug/CNIOAtomics.build/module.modulemap /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/x86_64-apple-macosx/debug/CNIOLinux.build/module.modulemap /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio-zlib-support/module.modulemap /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio-ssl-support/module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Dispatch.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/ApplicationServices.framework/Headers/ApplicationServices.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Security.framework/Headers/Security.apinotes /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/x86_64-apple-macosx/debug/HTTP.build/Codable/HTTPMessageCoder~partial.swiftmodule : /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/http/Sources/HTTP/Utilities/RFC1123.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/http/Sources/HTTP/Message/URL+HTTP.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/http/Sources/HTTP/Utilities/HTTPHeaders+Basic.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/http/Sources/HTTP/Message/Forwarded.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/http/Sources/HTTP/Message/MediaTypePreference.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/http/Sources/HTTP/Body/HTTPBodyStorage.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/http/Sources/HTTP/Message/HTTPMessage.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/http/Sources/HTTP/Body/HTTPBodyRepresentable.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/http/Sources/HTTP/Message/HTTPHeaderName.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/http/Sources/HTTP/Responder/HTTPScheme.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/http/Sources/HTTP/Message/HTTPResponse.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/http/Sources/HTTP/Cookies/HTTPCookieValue.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/http/Sources/HTTP/Body/HTTPChunkedStream.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/http/Sources/HTTP/Responder/HTTPClientProtocolUpgrader.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/http/Sources/HTTP/Responder/HTTPServerResponder.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/http/Sources/HTTP/Codable/HTTPMessageCoder.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/http/Sources/HTTP/Utilities/HTTPHeaders+Bearer.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/http/Sources/HTTP/Responder/HTTPServer.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/http/Sources/HTTP/Utilities/HTTPError.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/http/Sources/HTTP/Cookies/HTTPCookies.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/http/Sources/HTTP/Message/HTTPHeaders.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/http/Sources/HTTP/Utilities/String+IsIPAddress.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/http/Sources/HTTP/Exports.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/http/Sources/HTTP/Responder/HTTPClient.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/http/Sources/HTTP/Message/HTTPRequest.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/http/Sources/HTTP/Body/HTTPBody.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/x86_64-apple-macosx/debug/NIOHTTP1.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/ObjectiveC.swiftmodule /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/x86_64-apple-macosx/debug/NIOOpenSSL.swiftmodule /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/x86_64-apple-macosx/debug/NIO.swiftmodule /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/x86_64-apple-macosx/debug/NIOTLS.swiftmodule /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/x86_64-apple-macosx/debug/Async.swiftmodule /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/x86_64-apple-macosx/debug/Core.swiftmodule /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/x86_64-apple-macosx/debug/Debugging.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Dispatch.swiftmodule /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/x86_64-apple-macosx/debug/COperatingSystem.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/CoreFoundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/CoreGraphics.swiftmodule /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/x86_64-apple-macosx/debug/NIOConcurrencyHelpers.swiftmodule /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/x86_64-apple-macosx/debug/Bits.swiftmodule /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/x86_64-apple-macosx/debug/NIOFoundationCompat.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/IOKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/SwiftOnoneSupport.swiftmodule /usr/local/Cellar/libressl/2.9.2/include/openssl/asn1.h /usr/local/Cellar/libressl/2.9.2/include/openssl/tls1.h /usr/local/Cellar/libressl/2.9.2/include/openssl/dtls1.h /usr/local/Cellar/libressl/2.9.2/include/openssl/pkcs12.h /usr/local/Cellar/libressl/2.9.2/include/openssl/ssl2.h /usr/local/Cellar/libressl/2.9.2/include/openssl/pem2.h /usr/local/Cellar/libressl/2.9.2/include/openssl/ssl23.h /usr/local/Cellar/libressl/2.9.2/include/openssl/ssl3.h /usr/local/Cellar/libressl/2.9.2/include/openssl/x509v3.h /usr/local/Cellar/libressl/2.9.2/include/openssl/md5.h /usr/local/Cellar/libressl/2.9.2/include/openssl/pkcs7.h /usr/local/Cellar/libressl/2.9.2/include/openssl/x509.h /usr/local/Cellar/libressl/2.9.2/include/openssl/sha.h /usr/local/Cellar/libressl/2.9.2/include/openssl/dsa.h /usr/local/Cellar/libressl/2.9.2/include/openssl/ecdsa.h /usr/local/Cellar/libressl/2.9.2/include/openssl/rsa.h /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/CNIOZlib/include/CNIOZlib.h /usr/local/Cellar/libressl/2.9.2/include/openssl/obj_mac.h /usr/local/Cellar/libressl/2.9.2/include/openssl/hmac.h /usr/local/Cellar/libressl/2.9.2/include/openssl/ec.h /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/CNIOAtomics/include/cpp_magic.h /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/CNIOLinux/include/ifaddrs-android.h /usr/local/Cellar/libressl/2.9.2/include/openssl/rand.h /usr/local/Cellar/libressl/2.9.2/include/openssl/conf.h /usr/local/Cellar/libressl/2.9.2/include/openssl/opensslconf.h /usr/local/Cellar/libressl/2.9.2/include/openssl/dh.h /usr/local/Cellar/libressl/2.9.2/include/openssl/ecdh.h /usr/local/Cellar/libressl/2.9.2/include/openssl/lhash.h /usr/local/Cellar/libressl/2.9.2/include/openssl/stack.h /usr/local/Cellar/libressl/2.9.2/include/openssl/safestack.h /usr/local/Cellar/libressl/2.9.2/include/openssl/ssl.h /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio-ssl/Sources/CNIOOpenSSL/include/c_nio_openssl.h /usr/local/Cellar/libressl/2.9.2/include/openssl/pem.h /usr/local/Cellar/libressl/2.9.2/include/openssl/bn.h /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/CNIODarwin/include/CNIODarwin.h /usr/local/Cellar/libressl/2.9.2/include/openssl/bio.h /usr/local/Cellar/libressl/2.9.2/include/openssl/crypto.h /usr/local/Cellar/libressl/2.9.2/include/openssl/srtp.h /usr/local/Cellar/libressl/2.9.2/include/openssl/evp.h /usr/local/Cellar/libressl/2.9.2/include/openssl/ossl_typ.h /usr/local/Cellar/libressl/2.9.2/include/openssl/buffer.h /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/CNIOHTTPParser/include/CNIOHTTPParser.h /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/CNIOHTTPParser/include/c_nio_http_parser.h /usr/local/Cellar/libressl/2.9.2/include/openssl/err.h /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/CNIOAtomics/include/CNIOAtomics.h /usr/local/Cellar/libressl/2.9.2/include/openssl/opensslfeatures.h /usr/local/Cellar/libressl/2.9.2/include/openssl/objects.h /usr/local/Cellar/libressl/2.9.2/include/openssl/opensslv.h /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/CNIOLinux/include/CNIOLinux.h /usr/local/Cellar/libressl/2.9.2/include/openssl/x509_vfy.h /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/x86_64-apple-macosx/debug/CNIOSHA1.build/module.modulemap /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/x86_64-apple-macosx/debug/CNIOOpenSSL.build/module.modulemap /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/x86_64-apple-macosx/debug/CCryptoOpenSSL.build/module.modulemap /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/x86_64-apple-macosx/debug/CNIOZlib.build/module.modulemap /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/x86_64-apple-macosx/debug/CNIODarwin.build/module.modulemap /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/x86_64-apple-macosx/debug/CNIOHTTPParser.build/module.modulemap /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/x86_64-apple-macosx/debug/CNIOAtomics.build/module.modulemap /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/x86_64-apple-macosx/debug/CNIOLinux.build/module.modulemap /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio-zlib-support/module.modulemap /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio-ssl-support/module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Dispatch.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/ApplicationServices.framework/Headers/ApplicationServices.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Security.framework/Headers/Security.apinotes /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/x86_64-apple-macosx/debug/HTTP.build/Codable/HTTPMessageCoder~partial.swiftdoc : /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/http/Sources/HTTP/Utilities/RFC1123.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/http/Sources/HTTP/Message/URL+HTTP.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/http/Sources/HTTP/Utilities/HTTPHeaders+Basic.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/http/Sources/HTTP/Message/Forwarded.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/http/Sources/HTTP/Message/MediaTypePreference.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/http/Sources/HTTP/Body/HTTPBodyStorage.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/http/Sources/HTTP/Message/HTTPMessage.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/http/Sources/HTTP/Body/HTTPBodyRepresentable.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/http/Sources/HTTP/Message/HTTPHeaderName.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/http/Sources/HTTP/Responder/HTTPScheme.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/http/Sources/HTTP/Message/HTTPResponse.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/http/Sources/HTTP/Cookies/HTTPCookieValue.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/http/Sources/HTTP/Body/HTTPChunkedStream.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/http/Sources/HTTP/Responder/HTTPClientProtocolUpgrader.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/http/Sources/HTTP/Responder/HTTPServerResponder.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/http/Sources/HTTP/Codable/HTTPMessageCoder.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/http/Sources/HTTP/Utilities/HTTPHeaders+Bearer.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/http/Sources/HTTP/Responder/HTTPServer.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/http/Sources/HTTP/Utilities/HTTPError.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/http/Sources/HTTP/Cookies/HTTPCookies.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/http/Sources/HTTP/Message/HTTPHeaders.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/http/Sources/HTTP/Utilities/String+IsIPAddress.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/http/Sources/HTTP/Exports.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/http/Sources/HTTP/Responder/HTTPClient.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/http/Sources/HTTP/Message/HTTPRequest.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/http/Sources/HTTP/Body/HTTPBody.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/x86_64-apple-macosx/debug/NIOHTTP1.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/ObjectiveC.swiftmodule /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/x86_64-apple-macosx/debug/NIOOpenSSL.swiftmodule /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/x86_64-apple-macosx/debug/NIO.swiftmodule /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/x86_64-apple-macosx/debug/NIOTLS.swiftmodule /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/x86_64-apple-macosx/debug/Async.swiftmodule /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/x86_64-apple-macosx/debug/Core.swiftmodule /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/x86_64-apple-macosx/debug/Debugging.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Dispatch.swiftmodule /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/x86_64-apple-macosx/debug/COperatingSystem.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/CoreFoundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/CoreGraphics.swiftmodule /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/x86_64-apple-macosx/debug/NIOConcurrencyHelpers.swiftmodule /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/x86_64-apple-macosx/debug/Bits.swiftmodule /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/x86_64-apple-macosx/debug/NIOFoundationCompat.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/IOKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/SwiftOnoneSupport.swiftmodule /usr/local/Cellar/libressl/2.9.2/include/openssl/asn1.h /usr/local/Cellar/libressl/2.9.2/include/openssl/tls1.h /usr/local/Cellar/libressl/2.9.2/include/openssl/dtls1.h /usr/local/Cellar/libressl/2.9.2/include/openssl/pkcs12.h /usr/local/Cellar/libressl/2.9.2/include/openssl/ssl2.h /usr/local/Cellar/libressl/2.9.2/include/openssl/pem2.h /usr/local/Cellar/libressl/2.9.2/include/openssl/ssl23.h /usr/local/Cellar/libressl/2.9.2/include/openssl/ssl3.h /usr/local/Cellar/libressl/2.9.2/include/openssl/x509v3.h /usr/local/Cellar/libressl/2.9.2/include/openssl/md5.h /usr/local/Cellar/libressl/2.9.2/include/openssl/pkcs7.h /usr/local/Cellar/libressl/2.9.2/include/openssl/x509.h /usr/local/Cellar/libressl/2.9.2/include/openssl/sha.h /usr/local/Cellar/libressl/2.9.2/include/openssl/dsa.h /usr/local/Cellar/libressl/2.9.2/include/openssl/ecdsa.h /usr/local/Cellar/libressl/2.9.2/include/openssl/rsa.h /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/CNIOZlib/include/CNIOZlib.h /usr/local/Cellar/libressl/2.9.2/include/openssl/obj_mac.h /usr/local/Cellar/libressl/2.9.2/include/openssl/hmac.h /usr/local/Cellar/libressl/2.9.2/include/openssl/ec.h /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/CNIOAtomics/include/cpp_magic.h /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/CNIOLinux/include/ifaddrs-android.h /usr/local/Cellar/libressl/2.9.2/include/openssl/rand.h /usr/local/Cellar/libressl/2.9.2/include/openssl/conf.h /usr/local/Cellar/libressl/2.9.2/include/openssl/opensslconf.h /usr/local/Cellar/libressl/2.9.2/include/openssl/dh.h /usr/local/Cellar/libressl/2.9.2/include/openssl/ecdh.h /usr/local/Cellar/libressl/2.9.2/include/openssl/lhash.h /usr/local/Cellar/libressl/2.9.2/include/openssl/stack.h /usr/local/Cellar/libressl/2.9.2/include/openssl/safestack.h /usr/local/Cellar/libressl/2.9.2/include/openssl/ssl.h /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio-ssl/Sources/CNIOOpenSSL/include/c_nio_openssl.h /usr/local/Cellar/libressl/2.9.2/include/openssl/pem.h /usr/local/Cellar/libressl/2.9.2/include/openssl/bn.h /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/CNIODarwin/include/CNIODarwin.h /usr/local/Cellar/libressl/2.9.2/include/openssl/bio.h /usr/local/Cellar/libressl/2.9.2/include/openssl/crypto.h /usr/local/Cellar/libressl/2.9.2/include/openssl/srtp.h /usr/local/Cellar/libressl/2.9.2/include/openssl/evp.h /usr/local/Cellar/libressl/2.9.2/include/openssl/ossl_typ.h /usr/local/Cellar/libressl/2.9.2/include/openssl/buffer.h /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/CNIOHTTPParser/include/CNIOHTTPParser.h /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/CNIOHTTPParser/include/c_nio_http_parser.h /usr/local/Cellar/libressl/2.9.2/include/openssl/err.h /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/CNIOAtomics/include/CNIOAtomics.h /usr/local/Cellar/libressl/2.9.2/include/openssl/opensslfeatures.h /usr/local/Cellar/libressl/2.9.2/include/openssl/objects.h /usr/local/Cellar/libressl/2.9.2/include/openssl/opensslv.h /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/CNIOLinux/include/CNIOLinux.h /usr/local/Cellar/libressl/2.9.2/include/openssl/x509_vfy.h /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/x86_64-apple-macosx/debug/CNIOSHA1.build/module.modulemap /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/x86_64-apple-macosx/debug/CNIOOpenSSL.build/module.modulemap /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/x86_64-apple-macosx/debug/CCryptoOpenSSL.build/module.modulemap /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/x86_64-apple-macosx/debug/CNIOZlib.build/module.modulemap /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/x86_64-apple-macosx/debug/CNIODarwin.build/module.modulemap /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/x86_64-apple-macosx/debug/CNIOHTTPParser.build/module.modulemap /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/x86_64-apple-macosx/debug/CNIOAtomics.build/module.modulemap /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/x86_64-apple-macosx/debug/CNIOLinux.build/module.modulemap /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio-zlib-support/module.modulemap /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio-ssl-support/module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Dispatch.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/ApplicationServices.framework/Headers/ApplicationServices.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Security.framework/Headers/Security.apinotes
D
module engine; private import derelict.sdl.sdl; private import derelict.sdl.ttf; private import std.stdio; private import std.string; private import std.thread; private import scene; private import listeners; private import sdlexception; private import listeners; private import action; class Engine { protected: Scene[] scene; //ActionPerformer actionPerformer; //EventLoop eventLoop; public: this() { DerelictSDL.load(); DerelictSDLttf.load(); SDL_Init(SDL_INIT_VIDEO | SDL_INIT_TIMER); if (TTF_WasInit() == 0) TTF_Init(); //eventLoop = new EventLoop(); }; this(char[] iconFileName) { this(); SDL_WM_SetIcon(SDL_LoadBMP(toStringz(iconFileName)), null); }; ~this() { //SDL_Quit(); Thread.pauseAll(); DerelictSDLttf.unload(); DerelictSDL.unload(); }; /+Scene createScene(uint w,uint h) { this.scene = new Scene(w,h); return this.scene; };+/ Scene createScene(uint w,uint h) { this.scene.length = this.scene.length + 1; this.scene[this.scene.length - 1] = new Scene(w,h); return this.scene[this.scene.length - 1]; }; uint sceneNum() { return scene.length; }; Scene getScene(uint i) { if (i < scene.length) return scene[i]; else throw new SDLException(); }; void waitForQuit() { SDL_Event event; while (true) { SDL_WaitEvent(&event); if (event.type == SDL_QUIT) break; else { } } }; };
D
module engine.smodules.display_server.win; version( Windows ): public: import engine.smodules.display_server.win.server; import engine.smodules.display_server.win.input_map;
D
import gfm.net; import std.stdio; // Print the result of a GET request void main(string args[]) { if (args.length != 2) { writefln("Usage: simplehttp http://www.myurl.com"); writefln(" Print the result of a GET request."); return; } string url = args[1]; scope auto client = new HTTPClient(); HTTPResponse response = client.GET(new URI(url)); // Write headers writefln("%s returned error code %s", url, response.statusCode ); foreach (string header, value; response.headers) { writefln("%s: %s", header, value); } writefln("Body: \n"); writefln("%s", response.content); }
D
/** * FreeBSD implementation of glibc's $(LINK2 http://www.gnu.org/software/libc/manual/html_node/Backtraces.html backtrace) facility. * * Copyright: Copyright Martin Nowak 2012. * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Authors: Martin Nowak * Source: $(DRUNTIMESRC core/sys/freebsd/_execinfo.d) */ module core.sys.freebsd.execinfo; version (FreeBSD): extern (C): nothrow: version (GNU) version = BacktraceExternal; version (LDC) version = BacktraceExternal; version (BacktraceExternal) { size_t backtrace(void**, size_t); char** backtrace_symbols(const(void*)*, size_t); void backtrace_symbols_fd(const(void*)*, size_t, int); char** backtrace_symbols_fmt(const(void*)*, size_t, const char*); int backtrace_symbols_fd_fmt(const(void*)*, size_t, int, const char*); } else { import core.sys.freebsd.dlfcn; // Use extern (D) so that these functions don't collide with libexecinfo. extern (D) int backtrace(void** buffer, int size) { import core.thread : thread_stackBottom; void** p, pend=cast(void**)thread_stackBottom(); version (D_InlineAsm_X86) asm nothrow @trusted { mov p[EBP], EBP; } else version (D_InlineAsm_X86_64) asm nothrow @trusted { mov p[RBP], RBP; } else version (AArch64) asm nothrow @trusted { "str x29, %0" : "=m" (p); } else static assert(false, "Architecture not supported."); int i; for (; i < size && p < pend; ++i) { buffer[i] = *(p + 1); auto pnext = cast(void**)*p; if (pnext <= p) break; p = pnext; } return i; } extern (D) char** backtrace_symbols(const(void*)* buffer, int size) { static void* realloc(void* p, size_t len) nothrow { static import cstdlib=core.stdc.stdlib; auto res = cstdlib.realloc(p, len); if (res is null) cstdlib.free(p); return res; } if (size <= 0) return null; size_t pos = size * (char*).sizeof; char** p = cast(char**)realloc(null, pos); if (p is null) return null; Dl_info info; foreach (i, addr; buffer[0 .. size]) { if (dladdr(addr, &info) == 0) (cast(ubyte*)&info)[0 .. info.sizeof] = 0; fixupDLInfo(addr, info); immutable len = formatStackFrame(null, 0, addr, info); assert(len > 0); p = cast(char**)realloc(p, pos + len); if (p is null) return null; formatStackFrame(cast(char*)p + pos, len, addr, info) == len || assert(0); p[i] = cast(char*)pos; pos += len; } foreach (i; 0 .. size) { pos = cast(size_t)p[i]; p[i] = cast(char*)p + pos; } return p; } extern (D) void backtrace_symbols_fd(const(void*)* buffer, int size, int fd) { import core.sys.posix.unistd : write; import core.stdc.stdlib : alloca; if (size <= 0) return; Dl_info info; foreach (i, addr; buffer[0 .. size]) { if (dladdr(addr, &info) == 0) (cast(ubyte*)&info)[0 .. info.sizeof] = 0; fixupDLInfo(addr, info); enum maxAlloca = 1024; enum min = (size_t a, size_t b) => a <= b ? a : b; immutable len = min(formatStackFrame(null, 0, addr, info), maxAlloca); assert(len > 0); auto p = cast(char*)alloca(len); if (p is null) return; formatStackFrame(p, len, addr, info) >= len || assert(0); p[len - 1] = '\n'; write(fd, p, len); } } private void fixupDLInfo(const(void)* addr, ref Dl_info info) { if (info.dli_fname is null) info.dli_fname = "???"; if (info.dli_fbase is null) info.dli_fbase = null; if (info.dli_sname is null) info.dli_sname = "???"; if (info.dli_saddr is null) info.dli_saddr = cast(void*)addr; } private size_t formatStackFrame(char* p, size_t plen, const(void)* addr, const ref Dl_info info) { import core.stdc.stdio : snprintf; immutable off = addr - info.dli_saddr; immutable len = snprintf(p, plen, "%p <%s+%zd> at %s", addr, info.dli_sname, off, info.dli_fname); assert(len > 0); return cast(size_t)len + 1; // + '\0' } }
D
/Users/donghyungko/Documents/git-project/rust/the_rust_programming_language/ch19_advanced/target/rls/debug/deps/ch19_advanced-814b36d1b54de2ae.rmeta: src/main.rs /Users/donghyungko/Documents/git-project/rust/the_rust_programming_language/ch19_advanced/target/rls/debug/deps/ch19_advanced-814b36d1b54de2ae.d: src/main.rs src/main.rs:
D
// Written in the D programming language. /** This module defines the notion of a range. Ranges generalize the concept of arrays, lists, or anything that involves sequential access. This abstraction enables the same set of algorithms (see $(LINK2 std_algorithm.html, std.algorithm)) to be used with a vast variety of different concrete types. For example, a linear search algorithm such as $(LINK2 std_algorithm.html#find, std.algorithm.find) works not just for arrays, but for linked-lists, input files, incoming network data, etc. For more detailed information about the conceptual aspect of ranges and the motivation behind them, see Andrei Alexandrescu's article $(LINK2 http://www.informit.com/articles/printerfriendly.aspx?p=1407357&rll=1, $(I On Iteration)). This module defines several templates for testing whether a given object is a _range, and what kind of _range it is: $(BOOKTABLE , $(TR $(TD $(D $(LREF isInputRange))) $(TD Tests if something is an $(I input _range), defined to be something from which one can sequentially read data using the primitives $(D front), $(D popFront), and $(D empty). )) $(TR $(TD $(D $(LREF isOutputRange))) $(TD Tests if something is an $(I output _range), defined to be something to which one can sequentially write data using the $(D $(LREF put)) primitive. )) $(TR $(TD $(D $(LREF isForwardRange))) $(TD Tests if something is a $(I forward _range), defined to be an input _range with the additional capability that one can save one's current position with the $(D save) primitive, thus allowing one to iterate over the same _range multiple times. )) $(TR $(TD $(D $(LREF isBidirectionalRange))) $(TD Tests if something is a $(I bidirectional _range), that is, a forward _range that allows reverse traversal using the primitives $(D back) and $(D popBack). )) $(TR $(TD $(D $(LREF isRandomAccessRange))) $(TD Tests if something is a $(I random access _range), which is a bidirectional _range that also supports the array subscripting operation via the primitive $(D opIndex). )) ) A number of templates are provided that test for various _range capabilities: $(BOOKTABLE , $(TR $(TD $(D $(LREF hasMobileElements))) $(TD Tests if a given _range's elements can be moved around using the primitives $(D moveFront), $(D moveBack), or $(D moveAt). )) $(TR $(TD $(D $(LREF ElementType))) $(TD Returns the element type of a given _range. )) $(TR $(TD $(D $(LREF ElementEncodingType))) $(TD Returns the encoding element type of a given _range. )) $(TR $(TD $(D $(LREF hasSwappableElements))) $(TD Tests if a _range is a forward _range with swappable elements. )) $(TR $(TD $(D $(LREF hasAssignableElements))) $(TD Tests if a _range is a forward _range with mutable elements. )) $(TR $(TD $(D $(LREF hasLvalueElements))) $(TD Tests if a _range is a forward _range with elements that can be passed by reference and have their address taken. )) $(TR $(TD $(D $(LREF hasLength))) $(TD Tests if a given _range has the $(D length) attribute. )) $(TR $(TD $(D $(LREF isInfinite))) $(TD Tests if a given _range is an $(I infinite _range). )) $(TR $(TD $(D $(LREF hasSlicing))) $(TD Tests if a given _range supports the array slicing operation $(D R[x..y]). )) $(TR $(TD $(D $(LREF walkLength))) $(TD Computes the length of any _range in O(n) time. )) ) A rich set of _range creation and composition templates are provided that let you construct new ranges out of existing ranges: $(BOOKTABLE , $(TR $(TD $(D $(LREF retro))) $(TD Iterates a bidirectional _range backwards. )) $(TR $(TD $(D $(LREF stride))) $(TD Iterates a _range with stride $(I n). )) $(TR $(TD $(D $(LREF chain))) $(TD Concatenates several ranges into a single _range. )) $(TR $(TD $(D $(LREF roundRobin))) $(TD Given $(I n) ranges, creates a new _range that return the $(I n) first elements of each _range, in turn, then the second element of each _range, and so on, in a round-robin fashion. )) $(TR $(TD $(D $(LREF radial))) $(TD Given a random-access _range and a starting point, creates a _range that alternately returns the next left and next right element to the starting point. )) $(TR $(TD $(D $(LREF take))) $(TD Creates a sub-_range consisting of only up to the first $(I n) elements of the given _range. )) $(TR $(TD $(D $(LREF takeExactly))) $(TD Like $(D take), but assumes the given _range actually has $(I n) elements, and therefore also defines the $(D length) property. )) $(TR $(TD $(D $(LREF takeOne))) $(TD Creates a random-access _range consisting of exactly the first element of the given _range. )) $(TR $(TD $(D $(LREF takeNone))) $(TD Creates a random-access _range consisting of zero elements of the given _range. )) $(TR $(TD $(D $(LREF drop))) $(TD Creates the _range that results from discarding the first $(I n) elements from the given _range. )) $(TR $(TD $(D $(LREF dropFront))) $(TD Creates the _range that results from discarding the first $(I n) elements from the given _range. )) $(TR $(TD $(D $(LREF dropBack))) $(TD Creates the _range that results from discarding the last $(I n) elements from the given _range. )) $(TR $(TD $(D $(LREF repeat))) $(TD Creates a _range that consists of a single element repeated $(I n) times, or an infinite _range repeating that element indefinitely. )) $(TR $(TD $(D $(LREF cycle))) $(TD Creates an infinite _range that repeats the given forward _range indefinitely. Good for implementing circular buffers. )) $(TR $(TD $(D $(LREF zip))) $(TD Given $(I n) _ranges, creates a _range that successively returns a tuple of all the first elements, a tuple of all the second elements, etc. )) $(TR $(TD $(D $(LREF lockstep))) $(TD Iterates $(I n) _ranges in lockstep, for use in a $(D foreach) loop. Similar to $(D zip), except that $(D lockstep) is designed especially for $(D foreach) loops. )) $(TR $(TD $(D $(LREF recurrence))) $(TD Creates a forward _range whose values are defined by a mathematical recurrence relation. )) $(TR $(TD $(D $(LREF sequence))) $(TD Similar to $(D recurrence), except that a random-access _range is created. )) $(TR $(TD $(D $(LREF iota))) $(TD Creates a _range consisting of numbers between a starting point and ending point, spaced apart by a given interval. )) $(TR $(TD $(D $(LREF frontTransversal))) $(TD Creates a _range that iterates over the first elements of the given ranges. )) $(TR $(TD $(D $(LREF transversal))) $(TD Creates a _range that iterates over the $(I n)'th elements of the given random-access ranges. )) $(TR $(TD $(D $(LREF indexed))) $(TD Creates a _range that offers a view of a given _range as though its elements were reordered according to a given _range of indices. )) $(TR $(TD $(D $(LREF chunks))) $(TD Creates a _range that returns fixed-size chunks of the original _range. )) ) These _range-construction tools are implemented using templates; but sometimes an object-based interface for ranges is needed. For this purpose, this module provides a number of object and $(D interface) definitions that can be used to wrap around _range objects created by the above templates: $(BOOKTABLE , $(TR $(TD $(D $(LREF InputRange))) $(TD Wrapper for input ranges. )) $(TR $(TD $(D $(LREF InputAssignable))) $(TD Wrapper for input ranges with assignable elements. )) $(TR $(TD $(D $(LREF ForwardRange))) $(TD Wrapper for forward ranges. )) $(TR $(TD $(D $(LREF ForwardAssignable))) $(TD Wrapper for forward ranges with assignable elements. )) $(TR $(TD $(D $(LREF BidirectionalRange))) $(TD Wrapper for bidirectional ranges. )) $(TR $(TD $(D $(LREF BidirectionalAssignable))) $(TD Wrapper for bidirectional ranges with assignable elements. )) $(TR $(TD $(D $(LREF RandomAccessFinite))) $(TD Wrapper for finite random-access ranges. )) $(TR $(TD $(D $(LREF RandomAccessAssignable))) $(TD Wrapper for finite random-access ranges with assignable elements. )) $(TR $(TD $(D $(LREF RandomAccessInfinite))) $(TD Wrapper for infinite random-access ranges. )) $(TR $(TD $(D $(LREF OutputRange))) $(TD Wrapper for output ranges. )) $(TR $(TD $(D $(LREF OutputRangeObject))) $(TD Class that implements the $(D OutputRange) interface and wraps the $(D put) methods in virtual functions. )) $(TR $(TD $(D $(LREF InputRangeObject))) $(TD Class that implements the $(D InputRange) interface and wraps the input _range methods in virtual functions. )) ) Ranges whose elements are sorted afford better efficiency with certain operations. For this, the $(D $(LREF assumeSorted)) function can be used to construct a $(D $(LREF SortedRange)) from a pre-sorted _range. The $(D $(LINK2 std_algorithm.html#sort, std.algorithm.sort)) function also conveniently returns a $(D SortedRange). $(D SortedRange) objects provide some additional _range operations that take advantage of the fact that the _range is sorted. Finally, this module also defines some convenience functions for manipulating ranges: $(BOOKTABLE , $(TR $(TD $(D $(LREF popFrontN))) $(TD Advances a given _range by $(I n) elements. )) $(TR $(TD $(D $(LREF popBackN))) $(TD Advances a given bidirectional _range from the right by $(I n) elements. )) $(TR $(TD $(D $(LREF moveFront))) $(TD Removes the front element of a _range. )) $(TR $(TD $(D $(LREF moveBack))) $(TD Removes the back element of a bidirectional _range. )) $(TR $(TD $(D $(LREF moveAt))) $(TD Removes the $(I i)'th element of a random-access _range. )) ) Source: $(PHOBOSSRC std/_range.d) Macros: WIKI = Phobos/StdRange Copyright: Copyright by authors 2008-. License: $(WEB boost.org/LICENSE_1_0.txt, Boost License 1.0). Authors: $(WEB erdani.com, Andrei Alexandrescu), David Simcha, and Jonathan M Davis. Credit for some of the ideas in building this module goes to $(WEB fantascienza.net/leonardo/so/, Leonardo Maffi). */ module std.range; public import std.array; import core.bitop; import std.algorithm, std.conv, std.exception, std.functional, std.traits, std.typecons, std.typetuple; // For testing only. This code is included in a string literal to be included // in whatever module it's needed in, so that each module that uses it can be // tested individually, without needing to link to std.range. enum dummyRanges = q{ // Used with the dummy ranges for testing higher order ranges. enum RangeType { Input, Forward, Bidirectional, Random } enum Length { Yes, No } enum ReturnBy { Reference, Value } // Range that's useful for testing other higher order ranges, // can be parametrized with attributes. It just dumbs down an array of // numbers 1..10. struct DummyRange(ReturnBy _r, Length _l, RangeType _rt) { // These enums are so that the template params are visible outside // this instantiation. enum r = _r; enum l = _l; enum rt = _rt; uint[] arr = [1U, 2U, 3U, 4U, 5U, 6U, 7U, 8U, 9U, 10U]; void reinit() { // Workaround for DMD bug 4378 arr = [1U, 2U, 3U, 4U, 5U, 6U, 7U, 8U, 9U, 10U]; } void popFront() { arr = arr[1..$]; } @property bool empty() const { return arr.length == 0; } static if(r == ReturnBy.Reference) { @property ref inout(uint) front() inout { return arr[0]; } @property void front(uint val) { arr[0] = val; } } else { @property uint front() const { return arr[0]; } } static if(rt >= RangeType.Forward) { @property typeof(this) save() { return this; } } static if(rt >= RangeType.Bidirectional) { void popBack() { arr = arr[0..$ - 1]; } static if(r == ReturnBy.Reference) { @property ref inout(uint) back() inout { return arr[$ - 1]; } @property void back(uint val) { arr[$ - 1] = val; } } else { @property uint back() const { return arr[$ - 1]; } } } static if(rt >= RangeType.Random) { static if(r == ReturnBy.Reference) { ref inout(uint) opIndex(size_t index) inout { return arr[index]; } void opIndexAssign(uint val, size_t index) { arr[index] = val; } } else { @property uint opIndex(size_t index) const { return arr[index]; } } typeof(this) opSlice(size_t lower, size_t upper) { auto ret = this; ret.arr = arr[lower..upper]; return ret; } } static if(l == Length.Yes) { @property size_t length() const { return arr.length; } alias length opDollar; } } enum dummyLength = 10; alias TypeTuple!( DummyRange!(ReturnBy.Reference, Length.Yes, RangeType.Forward), DummyRange!(ReturnBy.Reference, Length.Yes, RangeType.Bidirectional), DummyRange!(ReturnBy.Reference, Length.Yes, RangeType.Random), DummyRange!(ReturnBy.Reference, Length.No, RangeType.Forward), DummyRange!(ReturnBy.Reference, Length.No, RangeType.Bidirectional), DummyRange!(ReturnBy.Value, Length.Yes, RangeType.Input), DummyRange!(ReturnBy.Value, Length.Yes, RangeType.Forward), DummyRange!(ReturnBy.Value, Length.Yes, RangeType.Bidirectional), DummyRange!(ReturnBy.Value, Length.Yes, RangeType.Random), DummyRange!(ReturnBy.Value, Length.No, RangeType.Input), DummyRange!(ReturnBy.Value, Length.No, RangeType.Forward), DummyRange!(ReturnBy.Value, Length.No, RangeType.Bidirectional) ) AllDummyRanges; }; version(unittest) { import std.container, std.conv, std.math, std.stdio; mixin(dummyRanges); // Tests whether forward, bidirectional and random access properties are // propagated properly from the base range(s) R to the higher order range // H. Useful in combination with DummyRange for testing several higher // order ranges. template propagatesRangeType(H, R...) { static if(allSatisfy!(isRandomAccessRange, R)) { enum bool propagatesRangeType = isRandomAccessRange!H; } else static if(allSatisfy!(isBidirectionalRange, R)) { enum bool propagatesRangeType = isBidirectionalRange!H; } else static if(allSatisfy!(isForwardRange, R)) { enum bool propagatesRangeType = isForwardRange!H; } else { enum bool propagatesRangeType = isInputRange!H; } } template propagatesLength(H, R...) { static if(allSatisfy!(hasLength, R)) { enum bool propagatesLength = hasLength!H; } else { enum bool propagatesLength = !hasLength!H; } } } /** Returns $(D true) if $(D R) is an input range. An input range must define the primitives $(D empty), $(D popFront), and $(D front). The following code should compile for any input range. ---- R r; // can define a range object if (r.empty) {} // can test for empty r.popFront(); // can invoke popFront() auto h = r.front; // can get the front of the range of non-void type ---- The semantics of an input range (not checkable during compilation) are assumed to be the following ($(D r) is an object of type $(D R)): $(UL $(LI $(D r.empty) returns $(D false) iff there is more data available in the range.) $(LI $(D r.front) returns the current element in the range. It may return by value or by reference. Calling $(D r.front) is allowed only if calling $(D r.empty) has, or would have, returned $(D false).) $(LI $(D r.popFront) advances to the next element in the range. Calling $(D r.popFront) is allowed only if calling $(D r.empty) has, or would have, returned $(D false).)) */ template isInputRange(R) { enum bool isInputRange = is(typeof( (inout int = 0) { R r = void; // can define a range object if (r.empty) {} // can test for empty r.popFront(); // can invoke popFront() auto h = r.front; // can get the front of the range })); } unittest { struct A {} struct B { void popFront(); @property bool empty(); @property int front(); } static assert(!isInputRange!(A)); static assert( isInputRange!(B)); static assert( isInputRange!(int[])); static assert( isInputRange!(char[])); static assert(!isInputRange!(char[4])); static assert( isInputRange!(inout(int)[])); // bug 7824 } /** Outputs $(D e) to $(D r). The exact effect is dependent upon the two types. Several cases are accepted, as described below. The code snippets are attempted in order, and the first to compile "wins" and gets evaluated. $(BOOKTABLE , $(TR $(TH Code Snippet) $(TH Scenario )) $(TR $(TD $(D r.put(e);)) $(TD $(D R) specifically defines a method $(D put) accepting an $(D E). )) $(TR $(TD $(D r.put([ e ]);)) $(TD $(D R) specifically defines a method $(D put) accepting an $(D E[]). )) $(TR $(TD $(D r.front = e; r.popFront();)) $(TD $(D R) is an input range and $(D e) is assignable to $(D r.front). )) $(TR $(TD $(D for (; !e.empty; e.popFront()) put(r, e.front);)) $(TD Copying range $(D E) to range $(D R). )) $(TR $(TD $(D r(e);)) $(TD $(D R) is e.g. a delegate accepting an $(D E). )) $(TR $(TD $(D r([ e ]);)) $(TD $(D R) is e.g. a $(D delegate) accepting an $(D E[]). )) ) Note that $(D R) does not have to be a range. */ void put(R, E)(ref R r, E e) { static if(is(PointerTarget!R == struct)) enum usingPut = hasMember!(PointerTarget!R, "put"); else enum usingPut = hasMember!(R, "put"); enum usingFront = !usingPut && isInputRange!R; enum usingCall = !usingPut && !usingFront; static if (usingPut && is(typeof(r.put(e)))) { r.put(e); } else static if (usingPut && is(typeof(r.put((E[]).init)))) { r.put((&e)[0..1]); } else static if (usingFront && is(typeof(r.front = e, r.popFront()))) { r.front = e; r.popFront(); } else static if ((usingPut || usingFront) && isInputRange!E && is(typeof(put(r, e.front)))) { for (; !e.empty; e.popFront()) put(r, e.front); } else static if (usingCall && is(typeof(r(e)))) { r(e); } else static if (usingCall && is(typeof(r((E[]).init)))) { r((&e)[0..1]); } else { static assert(false, "Cannot put a "~E.stringof~" into a "~R.stringof); } } unittest { struct A {} static assert(!isInputRange!(A)); struct B { void put(int) {} } B b; put(b, 5); } unittest { int[] a = [1, 2, 3], b = [10, 20]; auto c = a; put(a, b); assert(c == [10, 20, 3]); assert(a == [3]); } unittest { int[] a = new int[10]; int b; static assert(isInputRange!(typeof(a))); put(a, b); } unittest { void myprint(in char[] s) { } auto r = &myprint; put(r, 'a'); } unittest { int[] a = new int[10]; static assert(!__traits(compiles, put(a, 1.0L))); static assert( __traits(compiles, put(a, 1))); /* * a[0] = 65; // OK * a[0] = 'A'; // OK * a[0] = "ABC"[0]; // OK * put(a, "ABC"); // OK */ static assert( __traits(compiles, put(a, "ABC"))); } unittest { char[] a = new char[10]; static assert(!__traits(compiles, put(a, 1.0L))); static assert(!__traits(compiles, put(a, 1))); // char[] is NOT output range. static assert(!__traits(compiles, put(a, 'a'))); static assert(!__traits(compiles, put(a, "ABC"))); } unittest { // Test fix for bug 7476. struct LockingTextWriter { void put(dchar c){} } struct RetroResult { bool end = false; @property bool empty() const { return end; } @property dchar front(){ return 'a'; } void popFront(){ end = true; } } LockingTextWriter w; RetroResult r; put(w, r); } /** Returns $(D true) if $(D R) is an output range for elements of type $(D E). An output range is defined functionally as a range that supports the operation $(D put(r, e)) as defined above. */ template isOutputRange(R, E) { enum bool isOutputRange = is(typeof( (inout int = 0) { R r = void; E e; put(r, e); })); } unittest { void myprint(in char[] s) { writeln('[', s, ']'); } static assert(isOutputRange!(typeof(&myprint), char)); auto app = appender!string(); string s; static assert( isOutputRange!(Appender!string, string)); static assert( isOutputRange!(Appender!string*, string)); static assert(!isOutputRange!(Appender!string, int)); static assert(!isOutputRange!(char[], char)); static assert(!isOutputRange!(wchar[], wchar)); static assert( isOutputRange!(dchar[], char)); static assert( isOutputRange!(dchar[], wchar)); static assert( isOutputRange!(dchar[], dchar)); static assert(!isOutputRange!(const(int)[], int)); static assert(!isOutputRange!(inout(int)[], int)); } /** Returns $(D true) if $(D R) is a forward range. A forward range is an input range $(D r) that can save "checkpoints" by saving $(D r.save) to another value of type $(D R). Notable examples of input ranges that are $(I not) forward ranges are file/socket ranges; copying such a range will not save the position in the stream, and they most likely reuse an internal buffer as the entire stream does not sit in memory. Subsequently, advancing either the original or the copy will advance the stream, so the copies are not independent. The following code should compile for any forward range. ---- static assert(isInputRange!R); R r1; R r2 = r1.save; // can save the current position into another range ---- Saving a range is not duplicating it; in the example above, $(D r1) and $(D r2) still refer to the same underlying data. They just navigate that data independently. The semantics of a forward range (not checkable during compilation) are the same as for an input range, with the additional requirement that backtracking must be possible by saving a copy of the range object with $(D save) and using it later. */ template isForwardRange(R) { enum bool isForwardRange = isInputRange!R && is(typeof( (inout int = 0) { R r1 = void; R r2 = r1.save; // can call "save" against a range object })); } unittest { static assert(!isForwardRange!(int)); static assert( isForwardRange!(int[])); static assert( isForwardRange!(inout(int)[])); } /** Returns $(D true) if $(D R) is a bidirectional range. A bidirectional range is a forward range that also offers the primitives $(D back) and $(D popBack). The following code should compile for any bidirectional range. ---- R r; static assert(isForwardRange!R); // is forward range r.popBack(); // can invoke popBack auto t = r.back; // can get the back of the range auto w = r.front; static assert(is(typeof(t) == typeof(w))); // same type for front and back ---- The semantics of a bidirectional range (not checkable during compilation) are assumed to be the following ($(D r) is an object of type $(D R)): $(UL $(LI $(D r.back) returns (possibly a reference to) the last element in the range. Calling $(D r.back) is allowed only if calling $(D r.empty) has, or would have, returned $(D false).)) */ template isBidirectionalRange(R) { enum bool isBidirectionalRange = isForwardRange!R && is(typeof( (inout int = 0) { R r = void; r.popBack(); auto t = r.back; auto w = r.front; static assert(is(typeof(t) == typeof(w))); })); } unittest { struct A {} struct B { void popFront(); @property bool empty(); @property int front(); } struct C { @property bool empty(); @property C save(); void popFront(); @property int front(); void popBack(); @property int back(); } static assert(!isBidirectionalRange!(A)); static assert(!isBidirectionalRange!(B)); static assert( isBidirectionalRange!(C)); static assert( isBidirectionalRange!(int[])); static assert( isBidirectionalRange!(char[])); static assert( isBidirectionalRange!(inout(int)[])); } /** Returns $(D true) if $(D R) is a random-access range. A random-access range is a bidirectional range that also offers the primitive $(D opIndex), OR an infinite forward range that offers $(D opIndex). In either case, the range must either offer $(D length) or be infinite. The following code should compile for any random-access range. ---- R r; static assert(isForwardRange!R); // range is forward static assert(isBidirectionalRange!R || isInfinite!R); // range is bidirectional or infinite auto e = r[1]; // can index static assert(is(typeof(e) == typeof(r.front))); // same type for indexed and front ---- The semantics of a random-access range (not checkable during compilation) are assumed to be the following ($(D r) is an object of type $(D R)): $(UL $(LI $(D r.opIndex(n)) returns a reference to the $(D n)th element in the range.)) Although $(D char[]) and $(D wchar[]) (as well as their qualified versions including $(D string) and $(D wstring)) are arrays, $(D isRandomAccessRange) yields $(D false) for them because they use variable-length encodings (UTF-8 and UTF-16 respectively). These types are bidirectional ranges only. */ template isRandomAccessRange(R) { enum bool isRandomAccessRange = is(typeof( (inout int = 0) { static assert(isBidirectionalRange!R || isForwardRange!R && isInfinite!R); R r = void; auto e = r[1]; static assert(is(typeof(e) == typeof(r.front))); static assert(!isNarrowString!R); static assert(hasLength!R || isInfinite!R); })); } unittest { struct A {} struct B { void popFront(); @property bool empty(); @property int front(); } struct C { void popFront(); @property bool empty(); @property int front(); void popBack(); @property int back(); } struct D { @property bool empty(); @property D save(); @property int front(); void popFront(); @property int back(); void popBack(); ref int opIndex(uint); @property size_t length(); alias length opDollar; //int opSlice(uint, uint); } static assert(!isRandomAccessRange!(A)); static assert(!isRandomAccessRange!(B)); static assert(!isRandomAccessRange!(C)); static assert( isRandomAccessRange!(D)); static assert( isRandomAccessRange!(int[])); static assert( isRandomAccessRange!(inout(int)[])); } unittest { // Test fix for bug 6935. struct R { @disable this(); @disable static @property R init(); @property bool empty() const { return false; } @property int front() const { return 0; } void popFront() {} @property R save() { return this; } @property int back() const { return 0; } void popBack(){} int opIndex(size_t n) const { return 0; } @property size_t length() const { return 0; } alias length opDollar; void put(int e){ } } static assert(isInputRange!R); static assert(isForwardRange!R); static assert(isBidirectionalRange!R); static assert(isRandomAccessRange!R); static assert(isOutputRange!(R, int)); } /** Returns $(D true) iff $(D R) supports the $(D moveFront) primitive, as well as $(D moveBack) and $(D moveAt) if it's a bidirectional or random access range. These may be explicitly implemented, or may work via the default behavior of the module level functions $(D moveFront) and friends. Note that $(D R) does not have to be a range. */ template hasMobileElements(R) { enum bool hasMobileElements = is(typeof( (inout int = 0) { R r = void; return moveFront(r); })) && (!isBidirectionalRange!R || is(typeof( (inout int = 0) { R r = void; return moveBack(r); }))) && (!isRandomAccessRange!R || is(typeof( (inout int = 0) { R r = void; return moveAt(r, 0); }))); } unittest { static struct HasPostblit { this(this) {} } auto nonMobile = map!"a"(repeat(HasPostblit.init)); static assert(!hasMobileElements!(typeof(nonMobile))); static assert( hasMobileElements!(int[])); static assert( hasMobileElements!(inout(int)[])); static assert( hasMobileElements!(typeof(iota(1000)))); } /** The element type of $(D R). $(D R) does not have to be a range. The element type is determined as the type yielded by $(D r.front) for an object $(D r) of type $(D R). For example, $(D ElementType!(T[])) is $(D T) if $(D T[]) isn't a narrow string; if it is, the element type is $(D dchar). If $(D R) doesn't have $(D front), $(D ElementType!R) is $(D void). Note that $(D R) does not have to be a range. */ template ElementType(R) { static if (is(typeof((inout int = 0){ R r = void; return r.front; }()) T)) alias T ElementType; else alias void ElementType; } unittest { enum XYZ : string { a = "foo" } auto x = XYZ.a.front; immutable char[3] a = "abc"; int[] i; void[] buf; static assert(is(ElementType!(XYZ) : dchar)); static assert(is(ElementType!(typeof(a)) : dchar)); static assert(is(ElementType!(typeof(i)) : int)); static assert(is(ElementType!(typeof(buf)) : void)); static assert(is(ElementType!(inout(int)[]) : inout(int))); } /** The encoding element type of $(D R). For narrow strings ($(D char[]), $(D wchar[]) and their qualified variants including $(D string) and $(D wstring)), $(D ElementEncodingType) is the character type of the string. For all other types, $(D ElementEncodingType) is the same as $(D ElementType). Note that $(D R) does not have to be a range. */ template ElementEncodingType(R) { static if (isNarrowString!R) alias typeof((inout int = 0){ R r = void; return r[0]; }()) ElementEncodingType; else alias ElementType!R ElementEncodingType; } unittest { enum XYZ : string { a = "foo" } auto x = XYZ.a.front; immutable char[3] a = "abc"; int[] i; void[] buf; static assert(is(ElementType!(XYZ) : dchar)); static assert(is(ElementEncodingType!(char[]) == char)); static assert(is(ElementEncodingType!(string) == immutable char)); static assert(is(ElementType!(typeof(a)) : dchar)); static assert(is(ElementType!(typeof(i)) == int)); static assert(is(ElementEncodingType!(typeof(i)) == int)); static assert(is(ElementType!(typeof(buf)) : void)); static assert(is(ElementEncodingType!(inout char[]) : inout(char))); } /** Returns $(D true) if $(D R) is a forward range and has swappable elements. The following code should compile for any range with swappable elements. ---- R r; static assert(isForwardRange!(R)); // range is forward swap(r.front, r.front); // can swap elements of the range ---- */ template hasSwappableElements(R) { enum bool hasSwappableElements = isForwardRange!R && is(typeof( (inout int = 0) { R r = void; swap(r.front, r.front); // can swap elements of the range })); } unittest { static assert(!hasSwappableElements!(const int[])); static assert(!hasSwappableElements!(const(int)[])); static assert(!hasSwappableElements!(inout(int)[])); static assert( hasSwappableElements!(int[])); //static assert( hasSwappableElements!(char[])); } /** Returns $(D true) if $(D R) is a forward range and has mutable elements. The following code should compile for any range with assignable elements. ---- R r; static assert(isForwardRange!R); // range is forward auto e = r.front; r.front = e; // can assign elements of the range ---- */ template hasAssignableElements(R) { enum bool hasAssignableElements = isForwardRange!R && is(typeof( (inout int = 0) { R r = void; static assert(isForwardRange!(R)); // range is forward auto e = r.front; r.front = e; // can assign elements of the range })); } unittest { static assert(!hasAssignableElements!(const int[])); static assert(!hasAssignableElements!(const(int)[])); static assert( hasAssignableElements!(int[])); static assert(!hasAssignableElements!(inout(int)[])); } /** Tests whether $(D R) has lvalue elements. These are defined as elements that can be passed by reference and have their address taken. Note that $(D R) does not have to be a range. */ template hasLvalueElements(R) { enum bool hasLvalueElements = is(typeof( (inout int = 0) { void checkRef(ref ElementType!R stuff) {} R r = void; static assert(is(typeof(checkRef(r.front)))); })); } unittest { static assert( hasLvalueElements!(int[])); static assert( hasLvalueElements!(const(int)[])); static assert( hasLvalueElements!(inout(int)[])); static assert( hasLvalueElements!(immutable(int)[])); static assert(!hasLvalueElements!(typeof(iota(3)))); auto c = chain([1, 2, 3], [4, 5, 6]); static assert( hasLvalueElements!(typeof(c))); // Disabled test by bug 6336 // struct S { immutable int value; } // static assert( hasLvalueElements!(S[])); } /** Returns $(D true) if $(D R) has a $(D length) member that returns an integral type. $(D R) does not have to be a range. Note that $(D length) is an optional primitive as no range must implement it. Some ranges do not store their length explicitly, some cannot compute it without actually exhausting the range (e.g. socket streams), and some other ranges may be infinite. Although narrow string types ($(D char[]), $(D wchar[]), and their qualified derivatives) do define a $(D length) property, $(D hasLength) yields $(D false) for them. This is because a narrow string's length does not reflect the number of characters, but instead the number of encoding units, and as such is not useful with range-oriented algorithms. Note that $(D R) does not have to be a range. */ template hasLength(R) { enum bool hasLength = !isNarrowString!R && is(typeof( (inout int = 0) { R r = void; static assert(is(typeof(r.length) : ulong)); })); } unittest { static assert(!hasLength!(char[])); static assert( hasLength!(int[])); static assert( hasLength!(inout(int)[])); struct A { ulong length; } struct B { size_t length() { return 0; } } struct C { @property size_t length() { return 0; } } static assert( hasLength!(A)); static assert(!hasLength!(B)); static assert( hasLength!(C)); } /** Returns $(D true) if $(D R) is an infinite input range. An infinite input range is an input range that has a statically-defined enumerated member called $(D empty) that is always $(D false), for example: ---- struct MyInfiniteRange { enum bool empty = false; ... } ---- */ template isInfinite(R) { static if (isInputRange!R && __traits(compiles, { enum e = R.empty; })) enum bool isInfinite = !R.empty; else enum bool isInfinite = false; } unittest { static assert(!isInfinite!(int[])); static assert( isInfinite!(Repeat!(int))); } /** Returns $(D true) if $(D R) offers a slicing operator with integral boundaries, that in turn returns an input range type. The following code should compile for $(D hasSlicing) to be $(D true): ---- R r; auto s = r[1 .. 2]; static assert(isInputRange!(typeof(s))); ---- Note that $(D R) does not have to be a range. */ template hasSlicing(R) { enum bool hasSlicing = !isNarrowString!R && is(typeof( (inout int = 0) { R r = void; auto s = r[1 .. 2]; static assert(isInputRange!(typeof(s))); })); } unittest { static assert( hasSlicing!(int[])); static assert( hasSlicing!(inout(int)[])); static assert(!hasSlicing!string); struct A { int opSlice(uint, uint); } struct B { int[] opSlice(uint, uint); } struct C { @disable this(); int[] opSlice(size_t, size_t); } static assert(!hasSlicing!(A)); static assert( hasSlicing!(B)); static assert( hasSlicing!(C)); } /** This is a best-effort implementation of $(D length) for any kind of range. If $(D hasLength!Range), simply returns $(D range.length) without checking $(D upTo) (when specified). Otherwise, walks the range through its length and returns the number of elements seen. Performes $(BIGOH n) evaluations of $(D range.empty) and $(D range.popFront()), where $(D n) is the effective length of $(D range). The $(D upTo) parameter is useful to "cut the losses" in case the interest is in seeing whether the range has at least some number of elements. If the parameter $(D upTo) is specified, stops if $(D upTo) steps have been taken and returns $(D upTo). Infinite ranges are compatible, provided the parameter $(D upTo) is specified, in which case the implementation simply returns upTo. */ auto walkLength(Range)(Range range) if (isInputRange!Range && !isInfinite!Range) { static if (hasLength!Range) return range.length; else { size_t result; for ( ; !range.empty ; range.popFront() ) ++result; return result; } } /// ditto auto walkLength(Range)(Range range, const size_t upTo) if (isInputRange!Range) { static if (hasLength!Range) return range.length; else static if (isInfinite!Range) return upTo; else { size_t result; for ( ; result < upTo && !range.empty ; range.popFront() ) ++result; return result; } } unittest { //hasLength Range int[] a = [ 1, 2, 3 ]; assert(walkLength(a) == 3); assert(walkLength(a, 0) == 3); assert(walkLength(a, 2) == 3); assert(walkLength(a, 4) == 3); //Forward Range auto b = filter!"true"([1, 2, 3, 4]); assert(b.walkLength() == 4); assert(b.walkLength(0) == 0); assert(b.walkLength(2) == 2); assert(b.walkLength(4) == 4); assert(b.walkLength(6) == 4); //Infinite Range auto fibs = recurrence!"a[n-1] + a[n-2]"(1, 1); assert(!__traits(compiles, fibs.walkLength())); assert(fibs.take(10).walkLength() == 10); assert(fibs.walkLength(55) == 55); } /** Iterates a bidirectional range backwards. The original range can be accessed by using the $(D source) property. Applying retro twice to the same range yields the original range. Example: ---- int[] a = [ 1, 2, 3, 4, 5 ]; assert(equal(retro(a), [ 5, 4, 3, 2, 1 ][])); assert(retro(a).source is a); assert(retro(retro(a)) is a); ---- */ auto retro(Range)(Range r) if (isBidirectionalRange!(Unqual!Range)) { // Check for retro(retro(r)) and just return r in that case static if (is(typeof(retro(r.source)) == Range)) { return r.source; } else { static struct Result { private alias Unqual!Range R; // User code can get and set source, too R source; static if (hasLength!R) { private alias CommonType!(size_t, typeof(source.length)) IndexType; IndexType retroIndex(IndexType n) { return source.length - n - 1; } } public: alias R Source; @property bool empty() { return source.empty; } @property auto save() { return Result(source.save); } @property auto ref front() { return source.back; } void popFront() { source.popBack(); } @property auto ref back() { return source.front; } void popBack() { source.popFront(); } static if(is(typeof(.moveBack(source)))) { ElementType!R moveFront() { return .moveBack(source); } } static if(is(typeof(.moveFront(source)))) { ElementType!R moveBack() { return .moveFront(source); } } static if (hasAssignableElements!R) { @property auto front(ElementType!R val) { source.back = val; } @property auto back(ElementType!R val) { source.front = val; } } static if (isRandomAccessRange!(R) && hasLength!(R)) { auto ref opIndex(IndexType n) { return source[retroIndex(n)]; } static if (hasAssignableElements!R) { void opIndexAssign(ElementType!R val, IndexType n) { source[retroIndex(n)] = val; } } static if (is(typeof(.moveAt(source, 0)))) { ElementType!R moveAt(IndexType index) { return .moveAt(source, retroIndex(index)); } } static if (hasSlicing!R) typeof(this) opSlice(IndexType a, IndexType b) { return typeof(this)(source[source.length - b .. source.length - a]); } } static if (hasLength!R) { @property auto length() { return source.length; } alias length opDollar; } } return Result(r); } } unittest { static assert(isBidirectionalRange!(typeof(retro("hello")))); int[] a; static assert(is(typeof(a) == typeof(retro(retro(a))))); assert(retro(retro(a)) is a); static assert(isRandomAccessRange!(typeof(retro([1, 2, 3])))); void test(int[] input, int[] witness) { auto r = retro(input); assert(r.front == witness.front); assert(r.back == witness.back); assert(equal(r, witness)); } test([ 1 ], [ 1 ]); test([ 1, 2 ], [ 2, 1 ]); test([ 1, 2, 3 ], [ 3, 2, 1 ]); test([ 1, 2, 3, 4 ], [ 4, 3, 2, 1 ]); test([ 1, 2, 3, 4, 5 ], [ 5, 4, 3, 2, 1 ]); test([ 1, 2, 3, 4, 5, 6 ], [ 6, 5, 4, 3, 2, 1 ]); // static assert(is(Retro!(immutable int[]))); immutable foo = [1,2,3].idup; retro(foo); foreach(DummyType; AllDummyRanges) { static if (!isBidirectionalRange!DummyType) { static assert(!__traits(compiles, Retro!DummyType)); } else { DummyType dummyRange; dummyRange.reinit(); auto myRetro = retro(dummyRange); static assert(propagatesRangeType!(typeof(myRetro), DummyType)); assert(myRetro.front == 10); assert(myRetro.back == 1); assert(myRetro.moveFront() == 10); assert(myRetro.moveBack() == 1); static if (isRandomAccessRange!DummyType && hasLength!DummyType) { assert(myRetro[0] == myRetro.front); assert(myRetro.moveAt(2) == 8); static if (DummyType.r == ReturnBy.Reference) { { myRetro[9]++; scope(exit) myRetro[9]--; assert(dummyRange[0] == 2); myRetro.front++; scope(exit) myRetro.front--; assert(myRetro.front == 11); myRetro.back++; scope(exit) myRetro.back--; assert(myRetro.back == 3); } { myRetro.front = 0xFF; scope(exit) myRetro.front = 10; assert(dummyRange.back == 0xFF); myRetro.back = 0xBB; scope(exit) myRetro.back = 1; assert(dummyRange.front == 0xBB); myRetro[1] = 11; scope(exit) myRetro[1] = 8; assert(dummyRange[8] == 11); } } } } } } unittest { auto LL = iota(1L, 4L); auto r = retro(LL); assert(equal(r, [3L, 2L, 1L])); } /** Iterates range $(D r) with stride $(D n). If the range is a random-access range, moves by indexing into the range; otehrwise, moves by successive calls to $(D popFront). Applying stride twice to the same range results in a stride that with a step that is the product of the two applications. Throws: $(D Exception) if $(D n == 0). Example: ---- int[] a = [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 ]; assert(equal(stride(a, 3), [ 1, 4, 7, 10 ][])); assert(stride(stride(a, 2), 3) == stride(a, 6)); ---- */ auto stride(Range)(Range r, size_t n) if (isInputRange!(Unqual!Range)) { enforce(n > 0, "Stride cannot have step zero."); static if (is(typeof(stride(r.source, n)) == Range)) { // stride(stride(r, n1), n2) is stride(r, n1 * n2) return stride(r.source, r._n * n); } else { static struct Result { private alias Unqual!Range R; public R source; private size_t _n; // Chop off the slack elements at the end static if (hasLength!R && (isRandomAccessRange!R && hasSlicing!R || isBidirectionalRange!R)) private void eliminateSlackElements() { auto slack = source.length % _n; if (slack) { slack--; } else if (!source.empty) { slack = min(_n, source.length) - 1; } else { slack = 0; } if (!slack) return; static if (isRandomAccessRange!R && hasSlicing!R) { source = source[0 .. source.length - slack]; } else static if (isBidirectionalRange!R) { foreach (i; 0 .. slack) { source.popBack(); } } } static if (isForwardRange!R) { @property auto save() { return Result(source.save, _n); } } static if (isInfinite!R) { enum bool empty = false; } else { @property bool empty() { return source.empty; } } @property auto ref front() { return source.front; } static if (is(typeof(.moveFront(source)))) { ElementType!R moveFront() { return .moveFront(source); } } static if (hasAssignableElements!R) { @property auto front(ElementType!R val) { source.front = val; } } void popFront() { static if (isRandomAccessRange!R && hasLength!R && hasSlicing!R) { source = source[min(_n, source.length) .. source.length]; } else { static if (hasLength!R) { foreach (i; 0 .. min(source.length, _n)) { source.popFront(); } } else { foreach (i; 0 .. _n) { source.popFront(); if (source.empty) break; } } } } static if (isBidirectionalRange!R && hasLength!R) { void popBack() { popBackN(source, _n); } @property auto ref back() { eliminateSlackElements(); return source.back; } static if (is(typeof(.moveBack(source)))) { ElementType!R moveBack() { eliminateSlackElements(); return .moveBack(source); } } static if (hasAssignableElements!R) { @property auto back(ElementType!R val) { eliminateSlackElements(); source.back = val; } } } static if (isRandomAccessRange!R && hasLength!R) { auto ref opIndex(size_t n) { return source[_n * n]; } /** Forwards to $(D moveAt(source, n)). */ static if (is(typeof(.moveAt(source, 0)))) { ElementType!R moveAt(size_t n) { return .moveAt(source, _n * n); } } static if (hasAssignableElements!R) { void opIndexAssign(ElementType!R val, size_t n) { source[_n * n] = val; } } } static if (hasSlicing!R && hasLength!R) typeof(this) opSlice(size_t lower, size_t upper) { assert(upper >= lower && upper <= length); immutable translatedUpper = (upper == 0) ? 0 : (upper * _n - (_n - 1)); immutable translatedLower = min(lower * _n, translatedUpper); assert(translatedLower <= translatedUpper); return typeof(this)(source[translatedLower..translatedUpper], _n); } static if (hasLength!R) { @property auto length() { return (source.length + _n - 1) / _n; } alias length opDollar; } } return Result(r, n); } } unittest { static assert(isRandomAccessRange!(typeof(stride([1, 2, 3], 2)))); void test(size_t n, int[] input, int[] witness) { assert(equal(stride(input, n), witness)); } test(1, [], []); int[] arr = [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ]; assert(stride(stride(arr, 2), 3) is stride(arr, 6)); test(1, arr, arr); test(2, arr, [1, 3, 5, 7, 9]); test(3, arr, [1, 4, 7, 10]); test(4, arr, [1, 5, 9]); // Test slicing. auto s1 = stride(arr, 1); assert(equal(s1[1..4], [2, 3, 4])); assert(s1[1..4].length == 3); assert(equal(s1[1..5], [2, 3, 4, 5])); assert(s1[1..5].length == 4); assert(s1[0..0].empty); assert(s1[3..3].empty); // assert(s1[$ .. $].empty); assert(s1[s1.opDollar() .. s1.opDollar()].empty); auto s2 = stride(arr, 2); assert(equal(s2[0..2], [1,3])); assert(s2[0..2].length == 2); assert(equal(s2[1..5], [3, 5, 7, 9])); assert(s2[1..5].length == 4); assert(s2[0..0].empty); assert(s2[3..3].empty); // assert(s2[$ .. $].empty); assert(s2[s2.opDollar() .. s2.opDollar()].empty); // Test fix for Bug 5035 auto m = [1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4]; // 3 rows, 4 columns auto col = stride(m, 4); assert(equal(col, [1, 1, 1])); assert(equal(retro(col), [1, 1, 1])); immutable int[] immi = [ 1, 2, 3 ]; static assert(isRandomAccessRange!(typeof(stride(immi, 1)))); // Check for infiniteness propagation. static assert(isInfinite!(typeof(stride(repeat(1), 3)))); foreach(DummyType; AllDummyRanges) { DummyType dummyRange; dummyRange.reinit(); auto myStride = stride(dummyRange, 4); // Should fail if no length and bidirectional b/c there's no way // to know how much slack we have. static if (hasLength!DummyType || !isBidirectionalRange!DummyType) { static assert(propagatesRangeType!(typeof(myStride), DummyType)); } assert(myStride.front == 1); assert(myStride.moveFront() == 1); assert(equal(myStride, [1, 5, 9])); static if (hasLength!DummyType) { assert(myStride.length == 3); } static if (isBidirectionalRange!DummyType && hasLength!DummyType) { assert(myStride.back == 9); assert(myStride.moveBack() == 9); } static if (isRandomAccessRange!DummyType && hasLength!DummyType) { assert(myStride[0] == 1); assert(myStride[1] == 5); assert(myStride.moveAt(1) == 5); assert(myStride[2] == 9); static assert(hasSlicing!(typeof(myStride))); } static if (DummyType.r == ReturnBy.Reference) { // Make sure reference is propagated. { myStride.front++; scope(exit) myStride.front--; assert(dummyRange.front == 2); } { myStride.front = 4; scope(exit) myStride.front = 1; assert(dummyRange.front == 4); } static if (isBidirectionalRange!DummyType && hasLength!DummyType) { { myStride.back++; scope(exit) myStride.back--; assert(myStride.back == 10); } { myStride.back = 111; scope(exit) myStride.back = 9; assert(myStride.back == 111); } static if (isRandomAccessRange!DummyType) { { myStride[1]++; scope(exit) myStride[1]--; assert(dummyRange[4] == 6); } { myStride[1] = 55; scope(exit) myStride[1] = 5; assert(dummyRange[4] == 55); } } } } } } unittest { auto LL = iota(1L, 10L); auto s = stride(LL, 3); assert(equal(s, [1L, 4L, 7L])); } /** Spans multiple ranges in sequence. The function $(D chain) takes any number of ranges and returns a $(D Chain!(R1, R2,...)) object. The ranges may be different, but they must have the same element type. The result is a range that offers the $(D front), $(D popFront), and $(D empty) primitives. If all input ranges offer random access and $(D length), $(D Chain) offers them as well. If only one range is offered to $(D Chain) or $(D chain), the $(D Chain) type exits the picture by aliasing itself directly to that range's type. Example: ---- int[] arr1 = [ 1, 2, 3, 4 ]; int[] arr2 = [ 5, 6 ]; int[] arr3 = [ 7 ]; auto s = chain(arr1, arr2, arr3); assert(s.length == 7); assert(s[5] == 6); assert(equal(s, [1, 2, 3, 4, 5, 6, 7][])); ---- */ auto chain(Ranges...)(Ranges rs) if (Ranges.length > 0 && allSatisfy!(isInputRange, staticMap!(Unqual, Ranges))) { static if (Ranges.length == 1) { return rs[0]; } else { static struct Result { private: alias staticMap!(Unqual, Ranges) R; alias CommonType!(staticMap!(.ElementType, R)) RvalueElementType; private template sameET(A) { enum sameET = is(.ElementType!A == RvalueElementType); } enum bool allSameType = allSatisfy!(sameET, R); // This doesn't work yet static if (allSameType) { alias ref RvalueElementType ElementType; } else { alias RvalueElementType ElementType; } static if (allSameType && allSatisfy!(hasLvalueElements, R)) { static ref RvalueElementType fixRef(ref RvalueElementType val) { return val; } } else { static RvalueElementType fixRef(RvalueElementType val) { return val; } } // This is the entire state Tuple!R source; // TODO: use a vtable (or more) instead of linear iteration public: this(R input) { foreach (i, v; input) { source[i] = v; } } static if (anySatisfy!(isInfinite, R)) { // Propagate infiniteness. enum bool empty = false; } else { @property bool empty() { foreach (i, Unused; R) { if (!source[i].empty) return false; } return true; } } static if (allSatisfy!(isForwardRange, R)) @property auto save() { typeof(this) result; foreach (i, Unused; R) { result.source[i] = source[i].save; } return result; } void popFront() { foreach (i, Unused; R) { if (source[i].empty) continue; source[i].popFront(); return; } } @property auto ref front() { foreach (i, Unused; R) { if (source[i].empty) continue; return fixRef(source[i].front); } assert(false); } static if (allSameType && allSatisfy!(hasAssignableElements, R)) { // @@@BUG@@@ //@property void front(T)(T v) if (is(T : RvalueElementType)) // Return type must be auto due to Bug 4706. @property auto front(RvalueElementType v) { foreach (i, Unused; R) { if (source[i].empty) continue; source[i].front = v; return; } assert(false); } } static if (allSatisfy!(hasMobileElements, R)) { RvalueElementType moveFront() { foreach (i, Unused; R) { if (source[i].empty) continue; return .moveFront(source[i]); } assert(false); } } static if (allSatisfy!(isBidirectionalRange, R)) { @property auto ref back() { foreach_reverse (i, Unused; R) { if (source[i].empty) continue; return fixRef(source[i].back); } assert(false); } void popBack() { foreach_reverse (i, Unused; R) { if (source[i].empty) continue; source[i].popBack(); return; } } static if (allSatisfy!(hasMobileElements, R)) { RvalueElementType moveBack() { foreach_reverse (i, Unused; R) { if (source[i].empty) continue; return .moveBack(source[i]); } assert(false); } } static if (allSameType && allSatisfy!(hasAssignableElements, R)) { // Return type must be auto due to extremely strange bug in DMD's // function overloading. @property auto back(RvalueElementType v) { foreach_reverse (i, Unused; R) { if (source[i].empty) continue; source[i].back = v; return; } assert(false); } } } static if (allSatisfy!(hasLength, R)) { @property size_t length() { size_t result; foreach (i, Unused; R) { result += source[i].length; } return result; } alias length opDollar; } static if (allSatisfy!(isRandomAccessRange, R)) { auto ref opIndex(size_t index) { foreach (i, Range; R) { static if (isInfinite!(Range)) { return source[i][index]; } else { immutable length = source[i].length; if (index < length) return fixRef(source[i][index]); index -= length; } } assert(false); } static if (allSatisfy!(hasMobileElements, R)) { RvalueElementType moveAt(size_t index) { foreach (i, Range; R) { static if (isInfinite!(Range)) { return .moveAt(source[i], index); } else { immutable length = source[i].length; if (index < length) return .moveAt(source[i], index); index -= length; } } assert(false); } } static if (allSameType && allSatisfy!(hasAssignableElements, R)) void opIndexAssign(ElementType v, size_t index) { foreach (i, Range; R) { static if (isInfinite!(Range)) { source[i][index] = v; } else { immutable length = source[i].length; if (index < length) { source[i][index] = v; return; } index -= length; } } assert(false); } } static if (allSatisfy!(hasLength, R) && allSatisfy!(hasSlicing, R)) auto opSlice(size_t begin, size_t end) { auto result = this; foreach (i, Unused; R) { immutable len = result.source[i].length; if (len < begin) { result.source[i] = result.source[i] [len .. len]; begin -= len; } else { result.source[i] = result.source[i] [begin .. len]; break; } } auto cut = length; cut = cut <= end ? 0 : cut - end; foreach_reverse (i, Unused; R) { immutable len = result.source[i].length; if (cut > len) { result.source[i] = result.source[i] [0 .. 0]; cut -= len; } else { result.source[i] = result.source[i] [0 .. len - cut]; break; } } return result; } } return Result(rs); } } unittest { { int[] arr1 = [ 1, 2, 3, 4 ]; int[] arr2 = [ 5, 6 ]; int[] arr3 = [ 7 ]; int[] witness = [ 1, 2, 3, 4, 5, 6, 7 ]; auto s1 = chain(arr1); static assert(isRandomAccessRange!(typeof(s1))); auto s2 = chain(arr1, arr2); static assert(isBidirectionalRange!(typeof(s2))); static assert(isRandomAccessRange!(typeof(s2))); s2.front = 1; auto s = chain(arr1, arr2, arr3); assert(s[5] == 6); assert(equal(s, witness)); assert(s[5] == 6); } { int[] arr1 = [ 1, 2, 3, 4 ]; int[] witness = [ 1, 2, 3, 4 ]; assert(equal(chain(arr1), witness)); } { uint[] foo = [1,2,3,4,5]; uint[] bar = [1,2,3,4,5]; auto c = chain(foo, bar); c[3] = 42; assert(c[3] == 42); assert(c.moveFront() == 1); assert(c.moveBack() == 5); assert(c.moveAt(4) == 5); assert(c.moveAt(5) == 1); } // Make sure bug 3311 is fixed. ChainImpl should compile even if not all // elements are mutable. auto c = chain( iota(0, 10), iota(0, 10) ); // Test the case where infinite ranges are present. auto inf = chain([0,1,2][], cycle([4,5,6][]), [7,8,9][]); // infinite range assert(inf[0] == 0); assert(inf[3] == 4); assert(inf[6] == 4); assert(inf[7] == 5); static assert(isInfinite!(typeof(inf))); immutable int[] immi = [ 1, 2, 3 ]; immutable float[] immf = [ 1, 2, 3 ]; static assert(is(typeof(chain(immi, immf)))); // Check that chain at least instantiates and compiles with every possible // pair of DummyRange types, in either order. foreach(DummyType1; AllDummyRanges) { DummyType1 dummy1; foreach(DummyType2; AllDummyRanges) { DummyType2 dummy2; auto myChain = chain(dummy1, dummy2); static assert( propagatesRangeType!(typeof(myChain), DummyType1, DummyType2) ); assert(myChain.front == 1); foreach(i; 0..dummyLength) { myChain.popFront(); } assert(myChain.front == 1); static if (isBidirectionalRange!DummyType1 && isBidirectionalRange!DummyType2) { assert(myChain.back == 10); } static if (isRandomAccessRange!DummyType1 && isRandomAccessRange!DummyType2) { assert(myChain[0] == 1); } static if (hasLvalueElements!DummyType1 && hasLvalueElements!DummyType2) { static assert(hasLvalueElements!(typeof(myChain))); } else { static assert(!hasLvalueElements!(typeof(myChain))); } } } } /** $(D roundRobin(r1, r2, r3)) yields $(D r1.front), then $(D r2.front), then $(D r3.front), after which it pops off one element from each and continues again from $(D r1). For example, if two ranges are involved, it alternately yields elements off the two ranges. $(D roundRobin) stops after it has consumed all ranges (skipping over the ones that finish early). Example: ---- int[] a = [ 1, 2, 3, 4]; int[] b = [ 10, 20 ]; assert(equal(roundRobin(a, b), [1, 10, 2, 20, 3, 4])); ---- */ auto roundRobin(Rs...)(Rs rs) if (Rs.length > 1 && allSatisfy!(isInputRange, staticMap!(Unqual, Rs))) { struct Result { public Rs source; private size_t _current = size_t.max; @property bool empty() { foreach (i, Unused; Rs) { if (!source[i].empty) return false; } return true; } @property auto ref front() { static string makeSwitch() { string result = "switch (_current) {\n"; foreach (i, R; Rs) { auto si = to!string(i); result ~= "case "~si~": "~ "assert(!source["~si~"].empty); return source["~si~"].front;\n"; } return result ~ "default: assert(0); }"; } mixin(makeSwitch()); } void popFront() { static string makeSwitchPopFront() { string result = "switch (_current) {\n"; foreach (i, R; Rs) { auto si = to!string(i); result ~= "case "~si~": source["~si~"].popFront(); break;\n"; } return result ~ "default: assert(0); }"; } static string makeSwitchIncrementCounter() { string result = "auto next = _current == Rs.length - 1 ? 0 : _current + 1;\n" "switch (next) {\n"; foreach (i, R; Rs) { auto si = to!string(i); auto si_1 = to!string(i ? i - 1 : Rs.length - 1); result ~= "case "~si~": " "if (!source["~si~"].empty) { _current = "~si~"; return; }\n" "if ("~si~" == _current) { _current = _current.max; return; }\n" "goto case "~to!string((i + 1) % Rs.length)~";\n"; } return result ~ "default: assert(0); }"; } mixin(makeSwitchPopFront()); mixin(makeSwitchIncrementCounter()); } static if (allSatisfy!(isForwardRange, staticMap!(Unqual, Rs))) @property auto save() { Result result; result._current = _current; foreach (i, Unused; Rs) { result.source[i] = source[i].save; } return result; } static if (allSatisfy!(hasLength, Rs)) { @property size_t length() { size_t result; foreach (i, R; Rs) { result += source[i].length; } return result; } alias length opDollar; } } return Result(rs, 0); } unittest { int[] a = [ 1, 2, 3 ]; int[] b = [ 10, 20, 30, 40 ]; auto r = roundRobin(a, b); assert(equal(r, [ 1, 10, 2, 20, 3, 30, 40 ])); } /** Iterates a random-access range starting from a given point and progressively extending left and right from that point. If no initial point is given, iteration starts from the middle of the range. Iteration spans the entire range. Example: ---- int[] a = [ 1, 2, 3, 4, 5 ]; assert(equal(radial(a), [ 3, 4, 2, 5, 1 ])); a = [ 1, 2, 3, 4 ]; assert(equal(radial(a), [ 2, 3, 1, 4 ])); ---- */ auto radial(Range, I)(Range r, I startingIndex) if (isRandomAccessRange!(Unqual!Range) && hasLength!(Unqual!Range) && isIntegral!I) { if (!r.empty) ++startingIndex; return roundRobin(retro(r[0 .. startingIndex]), r[startingIndex .. r.length]); } /// Ditto auto radial(R)(R r) if (isRandomAccessRange!(Unqual!R) && hasLength!(Unqual!R)) { return .radial(r, (r.length - !r.empty) / 2); } unittest { void test(int[] input, int[] witness) { enforce(equal(radial(input), witness), text(radial(input), " vs. ", witness)); } test([], []); test([ 1 ], [ 1 ]); test([ 1, 2 ], [ 1, 2 ]); test([ 1, 2, 3 ], [ 2, 3, 1 ]); test([ 1, 2, 3, 4 ], [ 2, 3, 1, 4 ]); test([ 1, 2, 3, 4, 5 ], [ 3, 4, 2, 5, 1 ]); test([ 1, 2, 3, 4, 5, 6 ], [ 3, 4, 2, 5, 1, 6 ]); int[] a = [ 1, 2, 3, 4, 5 ]; assert(equal(radial(a, 1), [ 2, 3, 1, 4, 5 ][])); static assert(isForwardRange!(typeof(radial(a, 1)))); auto r = radial([1,2,3,4,5]); for(auto rr = r.save; !rr.empty; rr.popFront()) { assert(rr.front == moveFront(rr)); } r.front = 5; assert(r.front == 5); // Test instantiation without lvalue elements. DummyRange!(ReturnBy.Value, Length.Yes, RangeType.Random) dummy; assert(equal(radial(dummy, 4), [5, 6, 4, 7, 3, 8, 2, 9, 1, 10])); // immutable int[] immi = [ 1, 2 ]; // static assert(is(typeof(radial(immi)))); } unittest { auto LL = iota(1L, 6L); auto r = radial(LL); assert(equal(r, [3L, 4L, 2L, 5L, 1L])); } /** Lazily takes only up to $(D n) elements of a range. This is particularly useful when using with infinite ranges. If the range offers random access and $(D length), $(D Take) offers them as well. Example: ---- int[] arr1 = [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ]; auto s = take(arr1, 5); assert(s.length == 5); assert(s[4] == 5); assert(equal(s, [ 1, 2, 3, 4, 5 ][])); ---- */ struct Take(Range) if (isInputRange!(Unqual!Range) && !(hasSlicing!(Unqual!Range) || is(Range T == Take!T))) { private alias Unqual!Range R; // User accessible in read and write public R source; private size_t _maxAvailable; alias R Source; @property bool empty() { return _maxAvailable == 0 || source.empty; } @property auto ref front() { assert(!empty, "Attempting to fetch the front of an empty " ~ Take.stringof); return source.front; } void popFront() { assert(!empty, "Attempting to popFront() past the end of a " ~ Take.stringof); source.popFront(); --_maxAvailable; } static if (isForwardRange!R) @property Take save() { return Take(source.save, _maxAvailable); } static if (hasAssignableElements!R) @property auto front(ElementType!R v) { assert(!empty, "Attempting to assign to the front of an empty " ~ Take.stringof); // This has to return auto instead of void because of Bug 4706. source.front = v; } static if (hasMobileElements!R) { auto moveFront() { assert(!empty, "Attempting to move the front of an empty " ~ Take.stringof); return .moveFront(source); } } static if (isInfinite!R) { @property size_t length() const { return _maxAvailable; } alias length opDollar; } else static if (hasLength!R) { @property size_t length() { return min(_maxAvailable, source.length); } alias length opDollar; } static if (isRandomAccessRange!R) { void popBack() { assert(!empty, "Attempting to popBack() past the beginning of a " ~ Take.stringof); --_maxAvailable; } @property auto ref back() { assert(!empty, "Attempting to fetch the back of an empty " ~ Take.stringof); return source[this.length - 1]; } auto ref opIndex(size_t index) { assert(index < length, "Attempting to index out of the bounds of a " ~ Take.stringof); return source[index]; } static if (hasAssignableElements!R) { auto back(ElementType!R v) { // This has to return auto instead of void because of Bug 4706. assert(!empty, "Attempting to assign to the back of an empty " ~ Take.stringof); source[this.length - 1] = v; } void opIndexAssign(ElementType!R v, size_t index) { assert(index < length, "Attempting to index out of the bounds of a " ~ Take.stringof); source[index] = v; } } static if (hasMobileElements!R) { auto moveBack() { assert(!empty, "Attempting to move the back of an empty " ~ Take.stringof); return .moveAt(source, this.length - 1); } auto moveAt(size_t index) { assert(index < length, "Attempting to index out of the bounds of a " ~ Take.stringof); return .moveAt(source, index); } } } // Nonstandard @property size_t maxLength() const { return _maxAvailable; } } // This template simply aliases itself to R and is useful for consistency in // generic code. template Take(R) if (isInputRange!(Unqual!R) && (hasSlicing!(Unqual!R) || is(R T == Take!T))) { alias R Take; } // take for ranges with slicing (finite or infinite) /// ditto Take!R take(R)(R input, size_t n) if (isInputRange!(Unqual!R) && hasSlicing!(Unqual!R)) { static if (hasLength!R) { // @@@BUG@@@ //return input[0 .. min(n, $)]; return input[0 .. min(n, input.length)]; } else { static assert(isInfinite!R, "Nonsensical finite range with slicing but no length"); return input[0 .. n]; } } // take(take(r, n1), n2) Take!(R) take(R)(R input, size_t n) if (is(R T == Take!T)) { return R(input.source, min(n, input._maxAvailable)); } // Regular take for input ranges Take!(R) take(R)(R input, size_t n) if (isInputRange!(Unqual!R) && !hasSlicing!(Unqual!R) && !is(R T == Take!T)) { return Take!R(input, n); } unittest { int[] arr1 = [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ]; auto s = take(arr1, 5); assert(s.length == 5); assert(s[4] == 5); assert(equal(s, [ 1, 2, 3, 4, 5 ][])); assert(equal(retro(s), [ 5, 4, 3, 2, 1 ][])); // Test fix for bug 4464. static assert(is(typeof(s) == Take!(int[]))); static assert(is(typeof(s) == int[])); // Test using narrow strings. auto myStr = "This is a string."; auto takeMyStr = take(myStr, 7); assert(equal(takeMyStr, "This is")); // Test fix for bug 5052. auto takeMyStrAgain = take(takeMyStr, 4); assert(equal(takeMyStrAgain, "This")); static assert (is (typeof(takeMyStrAgain) == typeof(takeMyStr))); takeMyStrAgain = take(takeMyStr, 10); assert(equal(takeMyStrAgain, "This is")); foreach(DummyType; AllDummyRanges) { DummyType dummy; auto t = take(dummy, 5); alias typeof(t) T; static if (isRandomAccessRange!DummyType) { static assert(isRandomAccessRange!T); assert(t[4] == 5); assert(moveAt(t, 1) == t[1]); assert(t.back == moveBack(t)); } else static if (isForwardRange!DummyType) { static assert(isForwardRange!T); } for(auto tt = t; !tt.empty; tt.popFront()) { assert(tt.front == moveFront(tt)); } // Bidirectional ranges can't be propagated properly if they don't // also have random access. assert(equal(t, [1,2,3,4,5])); } immutable myRepeat = repeat(1); static assert(is(Take!(typeof(myRepeat)))); } unittest { // Check that one can declare variables of all Take types, // and that they match the return type of the corresponding // take(). (See issue 4464.) int[] r1; Take!(int[]) t1; t1 = take(r1, 1); string r2; Take!string t2; t2 = take(r2, 1); Take!(Take!string) t3; t3 = take(t2, 1); } /** Similar to $(LREF take), but assumes that $(D range) has at least $(D n) elements. Consequently, the result of $(D takeExactly(range, n)) always defines the $(D length) property (and initializes it to $(D n)) even when $(D range) itself does not define $(D length). If $(D R) has slicing and its slice has length, $(D takeExactly) simply returns a slice of $(D range). Otherwise if $(D R) is an input range, the type of the result is an input range with length. Finally, if $(D R) is a forward range (including bidirectional), the type of the result is a forward range with length. Note that $(D R) does not have to be a range in case it has slicing and its slice has length. */ auto takeExactly(R)(R range, size_t n) if (isInputRange!R && !hasSlicing!R) { static if (is(typeof(takeExactly(range._input, n)) == R)) { // takeExactly(takeExactly(r, n1), n2) has the same type as // takeExactly(r, n1) and simply returns takeExactly(r, n2) range._n = n; return range; } else { static struct Result { R _input; private size_t _n; @property bool empty() const { return !_n; } @property auto ref front() { assert(_n > 0, "front() on an empty " ~ Result.stringof); return _input.front; } void popFront() { _input.popFront(); --_n; } @property size_t length() const { return _n; } alias length opDollar; static if (isForwardRange!R) @property auto save() { return Result(_input.save, _n); } } return Result(range, n); } } auto takeExactly(R)(R range, size_t n) if (hasSlicing!R && hasLength!(typeof(range[0 .. n]))) { return range[0 .. n]; } unittest { auto a = [ 1, 2, 3, 4, 5 ]; auto b = takeExactly(a, 3); assert(equal(b, [1, 2, 3])); static assert(is(typeof(b.length) == size_t)); assert(b.length == 3); assert(b.front == 1); assert(b.back == 3); auto c = takeExactly(b, 2); auto d = filter!"a > 0"(a); auto e = takeExactly(d, 3); assert(equal(e, [1, 2, 3])); static assert(is(typeof(e.length) == size_t)); assert(e.length == 3); assert(e.front == 1); assert(equal(takeExactly(e, 4), [1, 2, 3, 4])); // b[1]++; } /** Returns a range with at most one element; for example, $(D takeOne([42, 43, 44])) returns a range consisting of the integer $(D 42). Calling $(D popFront()) off that range renders it empty. ---- auto s = takeOne([42, 43, 44]); static assert(isRandomAccessRange!(typeof(s))); assert(s.length == 1); assert(!s.empty); assert(s.front == 42); s.front() = 43; assert(s.front == 43); assert(s.back == 43); assert(s[0] == 43); s.popFront(); assert(s.length == 0); assert(s.empty); ---- In effect $(D takeOne(r)) is somewhat equivalent to $(D take(r, 1)) but in certain interfaces it is important to know statically that the range may only have at most one element. The type returned by $(D takeOne) is a random-access range with length regardless of $(D R)'s capabilities (another feature that distinguishes $(D takeOne) from $(D take)). */ auto takeOne(R)(R source) if (isInputRange!R) { static if (hasSlicing!R) { return source[0 .. !source.empty]; } else { static struct Result { private R _source; private bool _empty = true; @property bool empty() const { return _empty; } @property auto ref front() { assert(!empty); return _source.front; } void popFront() { assert(!empty); _empty = true; } void popBack() { assert(!empty); _empty = true; } @property auto save() { return Result(_source.save, empty); } @property auto ref back() { assert(!empty); return _source.front; } @property size_t length() const { return !empty; } alias length opDollar; auto ref opIndex(size_t n) { assert(n < length); return _source.front; } auto opSlice(size_t m, size_t n) { assert(m <= n && n < length); return n > m ? this : Result(_source, false); } // Non-standard property @property R source() { return _source; } } return Result(source, source.empty); } } unittest { auto s = takeOne([42, 43, 44]); static assert(isRandomAccessRange!(typeof(s))); assert(s.length == 1); assert(!s.empty); assert(s.front == 42); s.front = 43; assert(s.front == 43); assert(s.back == 43); assert(s[0] == 43); s.popFront(); assert(s.length == 0); assert(s.empty); } /++ Returns an empty range which is statically known to be empty and is guaranteed to have $(D length) and be random access regardless of $(D R)'s capabilities. Examples: -------------------- auto range = takeNone!(int[])(); assert(range.length == 0); assert(range.empty); -------------------- +/ auto takeNone(R)() if(isInputRange!R) { return typeof(takeOne(R.init)).init; } unittest { auto range = takeNone!(int[])(); assert(range.length == 0); assert(range.empty); enum ctfe = takeNone!(int[])(); static assert(ctfe.length == 0); static assert(ctfe.empty); } /++ Creates an empty range from the given range in $(BIGOH 1). If it can, it will return the same range type. If not, it will return $(D takeExactly(range, 0)). Examples: -------------------- assert(takeNone([42, 27, 19]).empty); assert(takeNone("dlang.org").empty); assert(takeNone(filter!"true"([42, 27, 19])).empty); -------------------- +/ auto takeNone(R)(R range) if(isInputRange!R) { //Makes it so that calls to takeNone which don't use UFCS still work with a //member version if it's defined. static if(is(typeof(R.takeNone))) auto retval = range.takeNone(); //@@@BUG@@@ 8339 else static if(isDynamicArray!R)/+ || (is(R == struct) && __traits(compiles, {auto r = R.init;}) && R.init.empty))+/ { auto retval = R.init; } //An infinite range sliced at [0 .. 0] would likely still not be empty... else static if(hasSlicing!R && !isInfinite!R) auto retval = range[0 .. 0]; else auto retval = takeExactly(range, 0); //@@@BUG@@@ 7892 prevents this from being done in an out block. assert(retval.empty); return retval; } //Verify Examples. unittest { assert(takeNone([42, 27, 19]).empty); assert(takeNone("dlang.org").empty); assert(takeNone(filter!"true"([42, 27, 19])).empty); } unittest { import std.metastrings; string genInput() { return "@property bool empty() { return _arr.empty; }" ~ "@property auto front() { return _arr.front; }" ~ "void popFront() { _arr.popFront(); }" ~ "static assert(isInputRange!(typeof(this)));"; } static struct NormalStruct { //Disabled to make sure that the takeExactly version is used. @disable this(); this(int[] arr) { _arr = arr; } mixin(genInput()); int[] _arr; } static struct SliceStruct { @disable this(); this(int[] arr) { _arr = arr; } mixin(genInput()); auto opSlice(size_t i, size_t j) { return typeof(this)(_arr[i .. j]); } int[] _arr; } static struct InitStruct { mixin(genInput()); int[] _arr; } static struct TakeNoneStruct { this(int[] arr) { _arr = arr; } @disable this(); mixin(genInput()); auto takeNone() { return typeof(this)(null); } int[] _arr; } static class NormalClass { this(int[] arr) {_arr = arr;} mixin(genInput()); int[] _arr; } static class SliceClass { this(int[] arr) { _arr = arr; } mixin(genInput()); auto opSlice(size_t i, size_t j) { return new typeof(this)(_arr[i .. j]); } int[] _arr; } static class TakeNoneClass { this(int[] arr) { _arr = arr; } mixin(genInput()); auto takeNone() { return new typeof(this)(null); } int[] _arr; } foreach(range; TypeTuple!(`[1, 2, 3, 4, 5]`, `"hello world"`, `"hello world"w`, `"hello world"d`, `SliceStruct([1, 2, 3])`, //@@@BUG@@@ 8339 forces this to be takeExactly //`InitStruct([1, 2, 3])`, `TakeNoneStruct([1, 2, 3])`)) { mixin(Format!("enum a = takeNone(%s).empty;", range)); assert(a, typeof(range).stringof); mixin(Format!("assert(takeNone(%s).empty);", range)); mixin(Format!("static assert(is(typeof(%s) == typeof(takeNone(%s))), typeof(%s).stringof);", range, range, range)); } foreach(range; TypeTuple!(`NormalStruct([1, 2, 3])`, `InitStruct([1, 2, 3])`)) { mixin(Format!("enum a = takeNone(%s).empty;", range)); assert(a, typeof(range).stringof); mixin(Format!("assert(takeNone(%s).empty);", range)); mixin(Format!("static assert(is(typeof(takeExactly(%s, 0)) == typeof(takeNone(%s))), typeof(%s).stringof);", range, range, range)); } //Don't work in CTFE. auto normal = new NormalClass([1, 2, 3]); assert(takeNone(normal).empty); static assert(is(typeof(takeExactly(normal, 0)) == typeof(takeNone(normal))), typeof(normal).stringof); auto slice = new SliceClass([1, 2, 3]); assert(takeNone(slice).empty); static assert(is(SliceClass == typeof(takeNone(slice))), typeof(slice).stringof); auto taken = new TakeNoneClass([1, 2, 3]); assert(takeNone(taken).empty); static assert(is(TakeNoneClass == typeof(takeNone(taken))), typeof(taken).stringof); auto filtered = filter!"true"([1, 2, 3, 4, 5]); assert(takeNone(filtered).empty); //@@@BUG@@@ 8339 and 5941 force this to be takeExactly //static assert(is(typeof(filtered) == typeof(takeNone(filtered))), typeof(filtered).stringof); } /++ Convenience function which calls $(D $(LREF popFrontN)(range, n)) and returns $(D range). This makes it easier to pop elements from a range and then pass it to another function within a single expression, whereas $(D popFrontN) would require multiple statements. Note: $(D drop) and $(D dropFront) cover the same functionality, and are aliases of each other. Both names are provided for convenience. Examples: -------------------- assert(drop([0, 2, 1, 5, 0, 3], 3) == [5, 0, 3]); assert(drop("hello world", 6) == "world"); assert(drop("hello world", 50).empty); assert(equal(drop(take("hello world", 6), 3), "lo ")); -------------------- -------------------- //Remove all but the first two elements auto a = DList!int(0, 1, 9, 9, 9); a.remove(a[].dropFront(2)); assert(a[].equal(a[].take(2))); -------------------- +/ R drop(R)(R range, size_t n) if(isInputRange!R) { popFrontN(range, n); return range; } /// ditto version(StdDdoc){R dropFront(R)(R range, size_t n);} //Documentation does not need to know who aliases who else {alias drop dropFront;} //Implementation defined alias //Verify Examples unittest { assert(drop([0, 2, 1, 5, 0, 3], 3) == [5, 0, 3]); assert(drop("hello world", 6) == "world"); assert(drop("hello world", 50).empty); assert(equal(drop(take("hello world", 6), 3), "lo ")); } unittest { //Remove all but the first two elements auto a = DList!int(0, 1, 9, 9, 9, 9); a.remove(a[].dropFront(2)); assert(a[].equal(a[].take(2))); } unittest { assert(drop("", 5).empty); assert(equal(drop(filter!"true"([0, 2, 1, 5, 0, 3]), 3), [5, 0, 3])); } /++ Convenience function which calls $(D $(LREF popBackN)(range, n)) and returns $(D range). This makes it easier to pop elements from the back of a range and then pass it to another function within a single expression, whereas $(D popBackN) would require multiple statements. Examples: -------------------- assert([0, 2, 1, 5, 0, 3].dropBack(3) == [0, 2, 1]); assert("hello world".dropBack(6) == "hello"); assert("hello world".dropBack(50).empty); assert("hello world".dropFront(4).dropBack(4).equal("o w")); -------------------- -------------------- //insert before the last two elements auto a = DList!int(0, 1, 2, 5, 6); a.insertAfter(a[].dropBack(2), [3, 4]); assert(a[].equal(iota(0, 7))); -------------------- +/ R dropBack(R)(R range, size_t n) if(isBidirectionalRange!R) { range.popBackN(n); return range; } //Verify Examples unittest { assert([0, 2, 1, 5, 0, 3].dropBack(3) == [0, 2, 1]); assert("hello world".dropBack(6) == "hello"); assert("hello world".dropBack(50).empty); assert("hello world".dropFront(4).dropBack(4).equal("o w")); } unittest { //insert before the last two elements auto a = DList!int(0, 1, 2, 5, 6); a.insertAfter(a[].dropBack(2), [3, 4]); assert(a[].equal(iota(0, 7))); } /** Eagerly advances $(D r) itself (not a copy) up to $(D n) times (by calling $(D r.popFront) at most $(D n) times). The pass of $(D r) into $(D popFrontN) is by reference, so the original range is affected. Completes in $(BIGOH 1) steps for ranges that have both length and support slicing, and in $(BIGOH n) time for all other ranges. Returns: How much $(D r) was actually advanced, which may be less than $(D n) if $(D r) did not have $(D n) element. Example: ---- int[] a = [ 1, 2, 3, 4, 5 ]; a.popFrontN(2); assert(a == [ 3, 4, 5 ]); a.popFrontN(7); assert(a == [ ]); ---- */ size_t popFrontN(Range)(ref Range r, size_t n) if (isInputRange!Range) { static if (hasSlicing!Range && hasLength!Range) { n = min(n, r.length); r = r[n .. r.length]; } else static if (hasSlicing!Range && isInfinite!Range && is(typeof(r = r[n .. $]))) r = r[n .. $]; else { static if (hasLength!Range) { n = min(n, r.length); foreach (i; 0 .. n) { r.popFront(); } } else { foreach (i; 0 .. n) { if (r.empty) return i; r.popFront(); } } } return n; } unittest { int[] a = [ 1, 2, 3, 4, 5 ]; a.popFrontN(2); assert(a == [ 3, 4, 5 ]); a.popFrontN(7); assert(a == [ ]); } unittest { auto LL = iota(1L, 7L); auto r = popFrontN(LL, 2); assert(equal(LL, [3L, 4L, 5L, 6L])); assert(r == 2); } /** Eagerly reduces $(D r) itself (not a copy) up to $(D n) times from its right side (by calling $(D r.popBack) $(D n) times). The pass of $(D r) into $(D popBackN) is by reference, so the original range is affected. Completes in $(BIGOH 1) steps for ranges that have both length and support slicing, and in $(BIGOH n) time for all other ranges. Returns: The actual number of elements popped, which may be less than $(D n) if $(D r) did not have $(D n) element. Example: ---- int[] a = [ 1, 2, 3, 4, 5 ]; a.popBackN(2); assert(a == [ 1, 2, 3 ]); a.popBackN(7); assert(a == [ ]); ---- */ size_t popBackN(Range)(ref Range r, size_t n) if (isBidirectionalRange!Range) { static if (hasSlicing!(Range) && hasLength!(Range)) { n = min(n, r.length); auto newLen = r.length - n; r = r[0 .. newLen]; } else { static if (hasLength!Range) { n = min(n, r.length); foreach (i; 0 .. n) { r.popBack(); } } else { foreach (i; 0 .. n) { if (r.empty) return i; r.popBack(); } } } return n; } unittest { int[] a = [ 1, 2, 3, 4, 5 ]; a.popBackN(2); assert(a == [ 1, 2, 3 ]); a.popBackN(7); assert(a == [ ]); } unittest { auto LL = iota(1L, 7L); auto r = popBackN(LL, 2); assert(equal(LL, [1L, 2L, 3L, 4L])); assert(r == 2); } /** Repeats one value forever. Example: ---- enforce(equal(take(repeat(5), 4), [ 5, 5, 5, 5 ][])); ---- */ struct Repeat(T) { private T _value; /// Range primitive implementations. @property T front() { return _value; } /// Ditto @property T back() { return _value; } /// Ditto enum bool empty = false; /// Ditto void popFront() {} /// Ditto void popBack() {} /// Ditto @property Repeat!T save() { return this; } /// Ditto T opIndex(size_t) { return _value; } } /// Ditto Repeat!(T) repeat(T)(T value) { return Repeat!(T)(value); } unittest { enforce(equal(take(repeat(5), 4), [ 5, 5, 5, 5 ][])); static assert(isForwardRange!(Repeat!(uint))); } /** Repeats $(D value) exactly $(D n) times. Equivalent to $(D take(repeat(value), n)). */ Take!(Repeat!T) repeat(T)(T value, size_t n) { return take(repeat(value), n); } /++ $(RED Deprecated. It will be removed in January 2013. Please use $(LREF repeat) instead.) +/ deprecated("Please use std.range.repeat instead.") Take!(Repeat!T) replicate(T)(T value, size_t n) { return repeat(value, n); } unittest { enforce(equal(repeat(5, 4), [ 5, 5, 5, 5 ][])); } /** Repeats the given forward range ad infinitum. If the original range is infinite (fact that would make $(D Cycle) the identity application), $(D Cycle) detects that and aliases itself to the range type itself. If the original range has random access, $(D Cycle) offers random access and also offers a constructor taking an initial position $(D index). $(D Cycle) is specialized for statically-sized arrays, mostly for performance reasons. Example: ---- assert(equal(take(cycle([1, 2][]), 5), [ 1, 2, 1, 2, 1 ][])); ---- Tip: This is a great way to implement simple circular buffers. Note that $(D Range) does not have to be a range as $(D Cycle) also accepts static arrays which aren't ranges (see $(LREF isInputRange)). */ struct Cycle(Range) if (isForwardRange!(Unqual!Range) && !isInfinite!(Unqual!Range)) { alias Unqual!Range R; static if (isRandomAccessRange!R && hasLength!R) { R _original; size_t _index; this(R input, size_t index = 0) { _original = input; _index = index; } @property auto ref front() { return _original[_index % _original.length]; } static if (is(typeof((cast(const R)_original)[0])) && is(typeof((cast(const R)_original).length))) { @property auto const ref front() const { return _original[_index % _original.length]; } } static if (hasAssignableElements!R) { @property auto front(ElementType!R val) { _original[_index % _original.length] = val; } } enum bool empty = false; void popFront() { ++_index; } auto ref opIndex(size_t n) { return _original[(n + _index) % _original.length]; } static if (is(typeof((cast(const R)_original)[0])) && is(typeof((cast(const R)_original).length))) { const ref opIndex(size_t n) const { return _original[(n + _index) % _original.length]; } } static if (hasAssignableElements!R) { auto opIndexAssign(ElementType!R val, size_t n) { _original[(n + _index) % _original.length] = val; } } @property Cycle save() { return Cycle(this._original.save, this._index); } } else { R _original; R _current; this(R input) { _original = input; _current = input.save; } @property auto ref front() { return _current.front; } static if (is(typeof((cast(const R)_current).front))) @property auto const ref front() const { return _current.front; } static if (hasAssignableElements!R) { @property auto front(ElementType!R val) { return _current.front = val; } } enum bool empty = false; void popFront() { _current.popFront(); if (_current.empty) _current = _original; } @property Cycle save() { Cycle ret; ret._original = this._original.save; ret._current = this._current.save; return ret; } } } template Cycle(R) if (isInfinite!R) { alias R Cycle; } struct Cycle(R) if (isStaticArray!R) { private alias typeof(R[0]) ElementType; private ElementType* _ptr; private size_t _index; this(ref R input, size_t index = 0) { _ptr = input.ptr; _index = index; } @property auto ref inout(ElementType) front() inout { return _ptr[_index % R.length]; } enum bool empty = false; void popFront() { ++_index; } ref inout(ElementType) opIndex(size_t n) inout { return _ptr[(n + _index) % R.length]; } @property Cycle save() { return this; } } /// Ditto Cycle!R cycle(R)(R input) if (isForwardRange!(Unqual!R) && !isInfinite!(Unqual!R)) { return Cycle!R(input); } /// Ditto Cycle!R cycle(R)(R input, size_t index = 0) if (isRandomAccessRange!(Unqual!R) && !isInfinite!(Unqual!R)) { return Cycle!R(input, index); } Cycle!R cycle(R)(R input) if (isInfinite!R) { return input; } Cycle!R cycle(R)(ref R input, size_t index = 0) if (isStaticArray!R) { return Cycle!R(input, index); } unittest { assert(equal(take(cycle([1, 2][]), 5), [ 1, 2, 1, 2, 1 ][])); static assert(isForwardRange!(Cycle!(uint[]))); int[3] a = [ 1, 2, 3 ]; static assert(isStaticArray!(typeof(a))); auto c = cycle(a); assert(a.ptr == c._ptr); assert(equal(take(cycle(a), 5), [ 1, 2, 3, 1, 2 ][])); static assert(isForwardRange!(typeof(c))); // Make sure ref is getting propagated properly. int[] nums = [1,2,3]; auto c2 = cycle(nums); c2[3]++; assert(nums[0] == 2); static assert(is(Cycle!(immutable int[]))); foreach(DummyType; AllDummyRanges) { static if (isForwardRange!DummyType) { DummyType dummy; auto cy = cycle(dummy); static assert(isForwardRange!(typeof(cy))); auto t = take(cy, 20); assert(equal(t, [1,2,3,4,5,6,7,8,9,10,1,2,3,4,5,6,7,8,9,10])); const cRange = cy; assert(cRange.front == 1); static if (hasAssignableElements!DummyType) { { cy.front = 66; scope(exit) cy.front = 1; assert(dummy.front == 66); } static if (isRandomAccessRange!DummyType) { { cy[10] = 66; scope(exit) cy[10] = 1; assert(dummy.front == 66); } assert(cRange[10] == 1); } } } } } unittest // For infinite ranges { struct InfRange { void popFront() { } @property int front() { return 0; } enum empty = false; } InfRange i; auto c = cycle(i); assert (c == i); } private template lengthType(R) { alias typeof((inout int = 0){ R r = void; return r.length; }()) lengthType; } /** Iterate several ranges in lockstep. The element type is a proxy tuple that allows accessing the current element in the $(D n)th range by using $(D e[n]). Example: ---- int[] a = [ 1, 2, 3 ]; string[] b = [ "a", "b", "c" ]; // prints 1:a 2:b 3:c foreach (e; zip(a, b)) { write(e[0], ':', e[1], ' '); } ---- $(D Zip) offers the lowest range facilities of all components, e.g. it offers random access iff all ranges offer random access, and also offers mutation and swapping if all ranges offer it. Due to this, $(D Zip) is extremely powerful because it allows manipulating several ranges in lockstep. For example, the following code sorts two arrays in parallel: ---- int[] a = [ 1, 2, 3 ]; string[] b = [ "a", "b", "c" ]; sort!("a[0] > b[0]")(zip(a, b)); assert(a == [ 3, 2, 1 ]); assert(b == [ "c", "b", "a" ]); ---- */ struct Zip(Ranges...) if(Ranges.length && allSatisfy!(isInputRange, staticMap!(Unqual, Ranges))) { alias staticMap!(Unqual, Ranges) R; Tuple!R ranges; alias Tuple!(staticMap!(.ElementType, R)) ElementType; StoppingPolicy stoppingPolicy = StoppingPolicy.shortest; /** Builds an object. Usually this is invoked indirectly by using the $(LREF zip) function. */ this(R rs, StoppingPolicy s = StoppingPolicy.shortest) { stoppingPolicy = s; foreach (i, Unused; R) { ranges[i] = rs[i]; } } /** Returns $(D true) if the range is at end. The test depends on the stopping policy. */ static if (allSatisfy!(isInfinite, R)) { // BUG: Doesn't propagate infiniteness if only some ranges are infinite // and s == StoppingPolicy.longest. This isn't fixable in the // current design since StoppingPolicy is known only at runtime. enum bool empty = false; } else { @property bool empty() { final switch (stoppingPolicy) { case StoppingPolicy.shortest: foreach (i, Unused; R) { if (ranges[i].empty) return true; } return false; case StoppingPolicy.longest: foreach (i, Unused; R) { if (!ranges[i].empty) return false; } return true; case StoppingPolicy.requireSameLength: foreach (i, Unused; R[1 .. $]) { enforce(ranges[0].empty == ranges.field[i + 1].empty, "Inequal-length ranges passed to Zip"); } return ranges[0].empty; } assert(false); } } static if (allSatisfy!(isForwardRange, R)) @property Zip save() { Zip result; result.stoppingPolicy = stoppingPolicy; foreach (i, Unused; R) { result.ranges[i] = ranges[i].save; } return result; } /** Returns the current iterated element. */ @property ElementType front() { ElementType result = void; foreach (i, Unused; R) { auto addr = cast(Unqual!(typeof(result[i]))*) &result[i]; if (ranges[i].empty) { emplace(addr); } else { emplace(addr, ranges[i].front); } } return result; } static if (allSatisfy!(hasAssignableElements, R)) { /** Sets the front of all iterated ranges. */ @property void front(ElementType v) { foreach (i, Unused; R) { if (!ranges[i].empty) { ranges[i].front = v[i]; } } } } /** Moves out the front. */ static if (allSatisfy!(hasMobileElements, R)) { ElementType moveFront() { ElementType result = void; foreach (i, Unused; R) { auto addr = cast(Unqual!(typeof(result[i]))*) &result[i]; if (!ranges[i].empty) { emplace(addr, .moveFront(ranges[i])); } else { emplace(addr); } } return result; } } /** Returns the rightmost element. */ static if (allSatisfy!(isBidirectionalRange, R)) { @property ElementType back() { ElementType result = void; foreach (i, Unused; R) { auto addr = cast(Unqual!(typeof(result[i]))*) &result[i]; if (!ranges[i].empty) { emplace(addr, ranges[i].back); } else { emplace(addr); } } return result; } /** Moves out the back. */ static if (allSatisfy!(hasMobileElements, R)) { @property ElementType moveBack() { ElementType result = void; foreach (i, Unused; R) { auto addr = cast(Unqual!(typeof(result[i]))*) &result[i]; if (!ranges[i].empty) { emplace(addr, .moveBack(ranges[i])); } else { emplace(addr); } } return result; } } /** Returns the current iterated element. */ static if (allSatisfy!(hasAssignableElements, R)) { @property void back(ElementType v) { foreach (i, Unused; R) { if (!ranges[i].empty) { ranges[i].back = v[i]; } } } } } /** Advances to the next element in all controlled ranges. */ void popFront() { final switch (stoppingPolicy) { case StoppingPolicy.shortest: foreach (i, Unused; R) { assert(!ranges[i].empty); ranges[i].popFront(); } break; case StoppingPolicy.longest: foreach (i, Unused; R) { if (!ranges[i].empty) ranges[i].popFront(); } break; case StoppingPolicy.requireSameLength: foreach (i, Unused; R) { enforce(!ranges[i].empty, "Invalid Zip object"); ranges[i].popFront(); } break; } } static if (allSatisfy!(isBidirectionalRange, R)) /** Calls $(D popBack) for all controlled ranges. */ void popBack() { final switch (stoppingPolicy) { case StoppingPolicy.shortest: foreach (i, Unused; R) { assert(!ranges[i].empty); ranges[i].popBack(); } break; case StoppingPolicy.longest: foreach (i, Unused; R) { if (!ranges[i].empty) ranges[i].popBack(); } break; case StoppingPolicy.requireSameLength: foreach (i, Unused; R) { enforce(!ranges[i].empty, "Invalid Zip object"); ranges[i].popBack(); } break; } } /** Returns the length of this range. Defined only if all ranges define $(D length). */ static if (allSatisfy!(hasLength, R)) { @property auto length() { CommonType!(staticMap!(lengthType, R)) result = ranges[0].length; if (stoppingPolicy == StoppingPolicy.requireSameLength) return result; foreach (i, Unused; R[1 .. $]) { if (stoppingPolicy == StoppingPolicy.shortest) { result = min(ranges.field[i + 1].length, result); } else { assert(stoppingPolicy == StoppingPolicy.longest); result = max(ranges.field[i + 1].length, result); } } return result; } alias length opDollar; } /** Returns a slice of the range. Defined only if all range define slicing. */ static if (allSatisfy!(hasSlicing, R)) Zip opSlice(size_t from, size_t to) { Zip result = void; emplace(&result.stoppingPolicy, stoppingPolicy); foreach (i, Unused; R) { emplace(&result.ranges[i], ranges[i][from .. to]); } return result; } static if (allSatisfy!(isRandomAccessRange, R)) { /** Returns the $(D n)th element in the composite range. Defined if all ranges offer random access. */ ElementType opIndex(size_t n) { ElementType result = void; foreach (i, Range; R) { auto addr = cast(Unqual!(typeof(result[i]))*) &result[i]; emplace(addr, ranges[i][n]); } return result; } static if (allSatisfy!(hasAssignableElements, R)) { /** Assigns to the $(D n)th element in the composite range. Defined if all ranges offer random access. */ void opIndexAssign(ElementType v, size_t n) { foreach (i, Range; R) { ranges[i][n] = v[i]; } } } /** Destructively reads the $(D n)th element in the composite range. Defined if all ranges offer random access. */ static if (allSatisfy!(hasMobileElements, R)) { ElementType moveAt(size_t n) { ElementType result = void; foreach (i, Range; R) { auto addr = cast(Unqual!(typeof(result[i]))*) &result[i]; emplace(addr, .moveAt(ranges[i], n)); } return result; } } } } /// Ditto auto zip(R...)(R ranges) if (allSatisfy!(isInputRange, staticMap!(Unqual, R))) { return Zip!R(ranges); } /// Ditto auto zip(R...)(StoppingPolicy sp, R ranges) if (allSatisfy!(isInputRange, staticMap!(Unqual, R))) { return Zip!R(ranges, sp); } /** Dictates how iteration in a $(D Zip) should stop. By default stop at the end of the shortest of all ranges. */ enum StoppingPolicy { /// Stop when the shortest range is exhausted shortest, /// Stop when the longest range is exhausted longest, /// Require that all ranges are equal requireSameLength, } unittest { int[] a = [ 1, 2, 3 ]; float[] b = [ 1.0, 2.0, 3.0 ]; foreach (e; zip(a, b)) { assert(e[0] == e[1]); } swap(a[0], a[1]); auto z = zip(a, b); //swap(z.front(), z.back()); sort!("a[0] < b[0]")(zip(a, b)); assert(a == [1, 2, 3]); assert(b == [2.0, 1.0, 3.0]); z = zip(StoppingPolicy.requireSameLength, a, b); assertNotThrown((z.popBack(), z.popBack(), z.popBack())); assert(z.empty); assertThrown(z.popBack()); a = [ 1, 2, 3 ]; b = [ 1.0, 2.0, 3.0 ]; sort!("a[0] > b[0]")(zip(StoppingPolicy.requireSameLength, a, b)); assert(a == [3, 2, 1]); assert(b == [3.0, 2.0, 1.0]); a = []; b = []; assert(zip(StoppingPolicy.requireSameLength, a, b).empty); // Test infiniteness propagation. static assert(isInfinite!(typeof(zip(repeat(1), repeat(1))))); // Test stopping policies with both value and reference. auto a1 = [1, 2]; auto a2 = [1, 2, 3]; auto stuff = tuple(tuple(a1, a2), tuple(filter!"a"(a1), filter!"a"(a2))); alias Zip!(immutable int[], immutable float[]) FOO; foreach(t; stuff.expand) { auto arr1 = t[0]; auto arr2 = t[1]; auto zShortest = zip(arr1, arr2); assert(equal(map!"a[0]"(zShortest), [1, 2])); assert(equal(map!"a[1]"(zShortest), [1, 2])); try { auto zSame = zip(StoppingPolicy.requireSameLength, arr1, arr2); foreach(elem; zSame) {} assert(0); } catch { /* It's supposed to throw.*/ } auto zLongest = zip(StoppingPolicy.longest, arr1, arr2); assert(!zLongest.ranges[0].empty); assert(!zLongest.ranges[1].empty); zLongest.popFront(); zLongest.popFront(); assert(!zLongest.empty); assert(zLongest.ranges[0].empty); assert(!zLongest.ranges[1].empty); zLongest.popFront(); assert(zLongest.empty); } // Doesn't work yet. Issues w/ emplace. // static assert(is(Zip!(immutable int[], immutable float[]))); // These unittests pass, but make the compiler consume an absurd amount // of RAM and time. Therefore, they should only be run if explicitly // uncommented when making changes to Zip. Also, running them using // make -fwin32.mak unittest makes the compiler completely run out of RAM. // You need to test just this module. /+ foreach(DummyType1; AllDummyRanges) { DummyType1 d1; foreach(DummyType2; AllDummyRanges) { DummyType2 d2; auto r = zip(d1, d2); assert(equal(map!"a[0]"(r), [1,2,3,4,5,6,7,8,9,10])); assert(equal(map!"a[1]"(r), [1,2,3,4,5,6,7,8,9,10])); static if (isForwardRange!DummyType1 && isForwardRange!DummyType2) { static assert(isForwardRange!(typeof(r))); } static if (isBidirectionalRange!DummyType1 && isBidirectionalRange!DummyType2) { static assert(isBidirectionalRange!(typeof(r))); } static if (isRandomAccessRange!DummyType1 && isRandomAccessRange!DummyType2) { static assert(isRandomAccessRange!(typeof(r))); } } } +/ } unittest { auto a = [5,4,3,2,1]; auto b = [3,1,2,5,6]; auto z = zip(a, b); sort!"a[0] < b[0]"(z); assert(a == [1, 2, 3, 4, 5]); assert(b == [6, 5, 2, 1, 3]); } unittest { auto LL = iota(1L, 1000L); auto z = zip(LL, [4]); assert(equal(z, [tuple(1L,4)])); auto LL2 = iota(0L, 500L); auto z2 = zip([7], LL2); assert(equal(z2, [tuple(7, 0L)])); } /* CTFE function to generate opApply loop for Lockstep.*/ private string lockstepApply(Ranges...)(bool withIndex) if (Ranges.length > 0) { // Since there's basically no way to make this code readable as-is, I've // included formatting to make the generated code look "normal" when // printed out via pragma(msg). string ret = "int opApply(scope int delegate("; if (withIndex) { ret ~= "size_t, "; } foreach (ti, Type; Ranges) { static if(hasLvalueElements!Type) { ret ~= "ref "; } ret ~= "ElementType!(Ranges[" ~ to!string(ti) ~ "]), "; } // Remove trailing , ret = ret[0..$ - 2]; ret ~= ") dg) {\n"; // Shallow copy _ranges to be consistent w/ regular foreach. ret ~= "\tauto ranges = _ranges;\n"; ret ~= "\tint res;\n"; if (withIndex) { ret ~= "\tsize_t index = 0;\n"; } // Check for emptiness. ret ~= "\twhile("; //someEmpty) {\n"; foreach(ti, Unused; Ranges) { ret ~= "!ranges[" ~ to!string(ti) ~ "].empty && "; } // Strip trailing && ret = ret[0..$ - 4]; ret ~= ") {\n"; // Create code to call the delegate. ret ~= "\t\tres = dg("; if (withIndex) { ret ~= "index, "; } foreach(ti, Range; Ranges) { ret ~= "ranges[" ~ to!string(ti) ~ "].front, "; } // Remove trailing , ret = ret[0..$ - 2]; ret ~= ");\n"; ret ~= "\t\tif(res) break;\n"; foreach(ti, Range; Ranges) { ret ~= "\t\tranges[" ~ to!(string)(ti) ~ "].popFront();\n"; } if (withIndex) { ret ~= "\t\tindex++;\n"; } ret ~= "\t}\n"; ret ~= "\tif(_s == StoppingPolicy.requireSameLength) {\n"; ret ~= "\t\tforeach(range; ranges)\n"; ret ~= "\t\t\tenforce(range.empty);\n"; ret ~= "\t}\n"; ret ~= "\treturn res;\n}"; return ret; } /** Iterate multiple ranges in lockstep using a $(D foreach) loop. If only a single range is passed in, the $(D Lockstep) aliases itself away. If the ranges are of different lengths and $(D s) == $(D StoppingPolicy.shortest) stop after the shortest range is empty. If the ranges are of different lengths and $(D s) == $(D StoppingPolicy.requireSameLength), throw an exception. $(D s) may not be $(D StoppingPolicy.longest), and passing this will throw an exception. By default $(D StoppingPolicy) is set to $(D StoppingPolicy.shortest). BUGS: If a range does not offer lvalue access, but $(D ref) is used in the $(D foreach) loop, it will be silently accepted but any modifications to the variable will not be propagated to the underlying range. Examples: --- auto arr1 = [1,2,3,4,5]; auto arr2 = [6,7,8,9,10]; foreach(ref a, ref b; lockstep(arr1, arr2)) { a += b; } assert(arr1 == [7,9,11,13,15]); // Lockstep also supports iterating with an index variable: foreach(index, a, b; lockstep(arr1, arr2)) { writefln("Index %s: a = %s, b = %s", index, a, b); } --- */ struct Lockstep(Ranges...) if(Ranges.length > 1 && allSatisfy!(isInputRange, staticMap!(Unqual, Ranges))) { private: alias staticMap!(Unqual, Ranges) R; R _ranges; StoppingPolicy _s; public: this(R ranges, StoppingPolicy s = StoppingPolicy.shortest) { _ranges = ranges; enforce(s != StoppingPolicy.longest, "Can't use StoppingPolicy.Longest on Lockstep."); this._s = s; } mixin(lockstepApply!(Ranges)(false)); mixin(lockstepApply!(Ranges)(true)); } // For generic programming, make sure Lockstep!(Range) is well defined for a // single range. template Lockstep(Range) { alias Range Lockstep; } version(StdDdoc) { /// Ditto Lockstep!(Ranges) lockstep(Ranges...)(Ranges ranges) { assert(0); } /// Ditto Lockstep!(Ranges) lockstep(Ranges...)(Ranges ranges, StoppingPolicy s) { assert(0); } } else { // Work around DMD bugs 4676, 4652. auto lockstep(Args...)(Args args) if (allSatisfy!(isInputRange, staticMap!(Unqual, Args)) || ( allSatisfy!(isInputRange, staticMap!(Unqual, Args[0..$ - 1])) && is(Args[$ - 1] == StoppingPolicy)) ) { static if (is(Args[$ - 1] == StoppingPolicy)) { alias args[0..$ - 1] ranges; alias Args[0..$ - 1] Ranges; alias args[$ - 1] stoppingPolicy; } else { alias Args Ranges; alias args ranges; auto stoppingPolicy = StoppingPolicy.shortest; } static if (Ranges.length > 1) { return Lockstep!(Ranges)(ranges, stoppingPolicy); } else { return ranges[0]; } } } unittest { // The filters are to make these the lowest common forward denominator ranges, // i.e. w/o ref return, random access, length, etc. auto foo = filter!"a"([1,2,3,4,5]); immutable bar = [6f,7f,8f,9f,10f].idup; auto l = lockstep(foo, bar); // Should work twice. These are forward ranges with implicit save. foreach(i; 0..2) { uint[] res1; float[] res2; foreach(a, ref b; l) { res1 ~= a; res2 ~= b; } assert(res1 == [1,2,3,4,5]); assert(res2 == [6,7,8,9,10]); assert(bar == [6f,7f,8f,9f,10f]); } // Doc example. auto arr1 = [1,2,3,4,5]; auto arr2 = [6,7,8,9,10]; foreach(ref a, ref b; lockstep(arr1, arr2)) { a += b; } assert(arr1 == [7,9,11,13,15]); // Make sure StoppingPolicy.requireSameLength doesn't throw. auto ls = lockstep(arr1, arr2, StoppingPolicy.requireSameLength); foreach(a, b; ls) {} // Make sure StoppingPolicy.requireSameLength throws. arr2.popBack(); ls = lockstep(arr1, arr2, StoppingPolicy.requireSameLength); try { foreach(a, b; ls) {} assert(0); } catch {} // Just make sure 1-range case instantiates. This hangs the compiler // when no explicit stopping policy is specified due to Bug 4652. auto stuff = lockstep([1,2,3,4,5], StoppingPolicy.shortest); // Test with indexing. uint[] res1; float[] res2; size_t[] indices; foreach(i, a, b; lockstep(foo, bar)) { indices ~= i; res1 ~= a; res2 ~= b; } assert(indices == to!(size_t[])([0, 1, 2, 3, 4])); assert(res1 == [1,2,3,4,5]); assert(res2 == [6f,7f,8f,9f,10f]); // Make sure we've worked around the relevant compiler bugs and this at least // compiles w/ >2 ranges. lockstep(foo, foo, foo); // Make sure it works with const. const(int[])[] foo2 = [[1, 2, 3]]; const(int[])[] bar2 = [[4, 5, 6]]; auto c = chain(foo2, bar2); foreach(f, b; lockstep(c, c)) {} } /** Creates a mathematical sequence given the initial values and a recurrence function that computes the next value from the existing values. The sequence comes in the form of an infinite forward range. The type $(D Recurrence) itself is seldom used directly; most often, recurrences are obtained by calling the function $(D recurrence). When calling $(D recurrence), the function that computes the next value is specified as a template argument, and the initial values in the recurrence are passed as regular arguments. For example, in a Fibonacci sequence, there are two initial values (and therefore a state size of 2) because computing the next Fibonacci value needs the past two values. If the function is passed in string form, the state has name $(D "a") and the zero-based index in the recurrence has name $(D "n"). The given string must return the desired value for $(D a[n]) given $(D a[n - 1]), $(D a[n - 2]), $(D a[n - 3]),..., $(D a[n - stateSize]). The state size is dictated by the number of arguments passed to the call to $(D recurrence). The $(D Recurrence) struct itself takes care of managing the recurrence's state and shifting it appropriately. Example: ---- // a[0] = 1, a[1] = 1, and compute a[n+1] = a[n-1] + a[n] auto fib = recurrence!("a[n-1] + a[n-2]")(1, 1); // print the first 10 Fibonacci numbers foreach (e; take(fib, 10)) { writeln(e); } // print the first 10 factorials foreach (e; take(recurrence!("a[n-1] * n")(1), 10)) { writeln(e); } ---- */ struct Recurrence(alias fun, StateType, size_t stateSize) { StateType[stateSize] _state; size_t _n; this(StateType[stateSize] initial) { _state = initial; } void popFront() { // The cast here is reasonable because fun may cause integer // promotion, but needs to return a StateType to make its operation // closed. Therefore, we have no other choice. _state[_n % stateSize] = cast(StateType) binaryFun!(fun, "a", "n")( cycle(_state), _n + stateSize); ++_n; } @property StateType front() { return _state[_n % stateSize]; } @property typeof(this) save() { return this; } enum bool empty = false; } /// Ditto Recurrence!(fun, CommonType!(State), State.length) recurrence(alias fun, State...)(State initial) { CommonType!(State)[State.length] state; foreach (i, Unused; State) { state[i] = initial[i]; } return typeof(return)(state); } unittest { auto fib = recurrence!("a[n-1] + a[n-2]")(1, 1); static assert(isForwardRange!(typeof(fib))); int[] witness = [1, 1, 2, 3, 5, 8, 13, 21, 34, 55 ]; assert(equal(take(fib, 10), witness)); foreach (e; take(fib, 10)) {} auto fact = recurrence!("n * a[n-1]")(1); assert( equal(take(fact, 10), [1, 1, 2, 2*3, 2*3*4, 2*3*4*5, 2*3*4*5*6, 2*3*4*5*6*7, 2*3*4*5*6*7*8, 2*3*4*5*6*7*8*9][]) ); auto piapprox = recurrence!("a[n] + (n & 1 ? 4.0 : -4.0) / (2 * n + 3)")(4.0); foreach (e; take(piapprox, 20)) {} // Thanks to yebblies for this test and the associated fix auto r = recurrence!"a[n-2]"(1, 2); witness = [1, 2, 1, 2, 1]; assert(equal(take(r, 5), witness)); } /** $(D Sequence) is similar to $(D Recurrence) except that iteration is presented in the so-called $(WEB en.wikipedia.org/wiki/Closed_form, closed form). This means that the $(D n)th element in the series is computable directly from the initial values and $(D n) itself. This implies that the interface offered by $(D Sequence) is a random-access range, as opposed to the regular $(D Recurrence), which only offers forward iteration. The state of the sequence is stored as a $(D Tuple) so it can be heterogeneous. Example: ---- // a[0] = 1, a[1] = 2, a[n] = a[0] + n * a[1] auto odds = sequence!("a[0] + n * a[1]")(1, 2); ---- */ struct Sequence(alias fun, State) { private: alias binaryFun!(fun, "a", "n") compute; alias typeof(compute(State.init, cast(size_t) 1)) ElementType; State _state; size_t _n; ElementType _cache; public: this(State initial, size_t n = 0) { this._state = initial; this._n = n; this._cache = compute(this._state, this._n); } @property ElementType front() { //return ElementType.init; return this._cache; } ElementType moveFront() { return move(this._cache); } void popFront() { this._cache = compute(this._state, ++this._n); } auto opSlice(size_t lower, size_t upper) in { assert(upper >= lower); } body { auto s = typeof(this)(this._state, this._n + lower); return takeExactly(s, upper - lower); } ElementType opIndex(size_t n) { //return ElementType.init; return compute(this._state, n + this._n); } enum bool empty = false; @property Sequence save() { return this; } } /// Ditto Sequence!(fun, Tuple!(State)) sequence(alias fun, State...)(State args) { return typeof(return)(tuple(args)); } unittest { auto y = Sequence!("a[0] + n * a[1]", Tuple!(int, int)) (tuple(0, 4)); static assert(isForwardRange!(typeof(y))); //@@BUG //auto y = sequence!("a[0] + n * a[1]")(0, 4); //foreach (e; take(y, 15)) {} //writeln(e); auto odds = Sequence!("a[0] + n * a[1]", Tuple!(int, int))( tuple(1, 2)); for(int currentOdd = 1; currentOdd <= 21; currentOdd += 2) { assert(odds.front == odds[0]); assert(odds[0] == currentOdd); odds.popFront(); } } unittest { // documentation example auto odds = sequence!("a[0] + n * a[1]")(1, 2); assert(odds.front == 1); odds.popFront(); assert(odds.front == 3); odds.popFront(); assert(odds.front == 5); } unittest { auto odds = sequence!("a[0] + n * a[1]")(1, 2); // static slicing tests assert(equal(odds[0 .. 5], take(odds, 5))); assert(equal(odds[3 .. 7], take(drop(odds, 3), 4))); // relative slicing test, testing slicing is NOT agnostic of state auto odds_less5 = drop(odds, 5); assert(equal(odds_less5[0 .. 10], odds[5 .. 15])); } /** Returns a range that goes through the numbers $(D begin), $(D begin + step), $(D begin + 2 * step), $(D ...), up to and excluding $(D end). The range offered is a random access range. The two-arguments version has $(D step = 1). If $(D begin < end && step < 0) or $(D begin > end && step > 0) or $(D begin == end), then an empty range is returned. Throws: $(D Exception) if $(D begin != end && step == 0), an exception is thrown. Example: ---- auto r = iota(0, 10, 1); assert(equal(r, [0, 1, 2, 3, 4, 5, 6, 7, 8, 9][])); r = iota(0, 11, 3); assert(equal(r, [0, 3, 6, 9][])); assert(r[2] == 6); auto rf = iota(0.0, 0.5, 0.1); assert(approxEqual(rf, [0.0, 0.1, 0.2, 0.3, 0.4])); ---- */ auto iota(B, E, S)(B begin, E end, S step) if ((isIntegral!(CommonType!(B, E)) || isPointer!(CommonType!(B, E))) && isIntegral!S) { alias CommonType!(Unqual!B, Unqual!E) Value; alias typeof(unsigned((end - begin) / step)) IndexType; static struct Result { private Value current, pastLast; private S step; this(Value current, Value pastLast, S step) { if ((current < pastLast && step >= 0) || (current > pastLast && step <= 0)) { enforce(step != 0); this.step = step; this.current = current; if (step > 0) { this.pastLast = pastLast - 1; this.pastLast -= (this.pastLast - current) % step; } else { this.pastLast = pastLast + 1; this.pastLast += (current - this.pastLast) % -step; } this.pastLast += step; } else { // Initialize an empty range this.current = this.pastLast = current; this.step = 1; } } @property bool empty() const { return current == pastLast; } @property inout(Value) front() inout { assert(!empty); return current; } alias front moveFront; void popFront() { assert(!empty); current += step; } @property inout(Value) back() inout { assert(!empty); return pastLast - step; } alias back moveBack; void popBack() { assert(!empty); pastLast -= step; } @property auto save() { return this; } inout(Value) opIndex(ulong n) inout { assert(n < this.length); // Just cast to Value here because doing so gives overflow behavior // consistent with calling popFront() n times. return cast(inout Value) (current + step * n); } inout(Result) opSlice() inout { return this; } inout(Result) opSlice(ulong lower, ulong upper) inout { assert(upper >= lower && upper <= this.length); return cast(inout Result)Result(cast(Value)(current + lower * step), cast(Value)(pastLast - (length - upper) * step), step); } @property IndexType length() const { if (step > 0) { return unsigned((pastLast - current) / step); } else { return unsigned((current - pastLast) / -step); } } alias length opDollar; } return Result(begin, end, step); } /// Ditto auto iota(B, E)(B begin, E end) if (isFloatingPoint!(CommonType!(B, E))) { return iota(begin, end, 1.0); } /// Ditto auto iota(B, E)(B begin, E end) if (isIntegral!(CommonType!(B, E)) || isPointer!(CommonType!(B, E))) { alias CommonType!(Unqual!B, Unqual!E) Value; alias typeof(unsigned(end - begin)) IndexType; static struct Result { private Value current, pastLast; this(Value current, Value pastLast) { if (current < pastLast) { this.current = current; this.pastLast = pastLast; } else { // Initialize an empty range this.current = this.pastLast = current; } } @property bool empty() const { return current == pastLast; } @property inout(Value) front() inout { assert(!empty); return current; } alias front moveFront; void popFront() { assert(!empty); ++current; } @property inout(Value) back() inout { assert(!empty); return pastLast - 1; } alias back moveBack; void popBack() { assert(!empty); --pastLast; } @property auto save() { return this; } inout(Value) opIndex(ulong n) inout { assert(n < this.length); // Just cast to Value here because doing so gives overflow behavior // consistent with calling popFront() n times. return cast(inout Value) (current + n); } inout(Result) opSlice() inout { return this; } inout(Result) opSlice(ulong lower, ulong upper) inout { assert(upper >= lower && upper <= this.length); return cast(inout Result)Result(cast(Value)(current + lower), cast(Value)(pastLast - (length - upper))); } @property IndexType length() const { return unsigned(pastLast - current); } alias length opDollar; } return Result(begin, end); } /// Ditto auto iota(E)(E end) { E begin = 0; return iota(begin, end); } // Specialization for floating-point types auto iota(B, E, S)(B begin, E end, S step) if (isFloatingPoint!(CommonType!(B, E, S))) { alias CommonType!(B, E, S) Value; static struct Result { private Value start, step; private size_t index, count; this(Value start, Value end, Value step) { this.start = start; this.step = step; enforce(step != 0); immutable fcount = (end - start) / step; enforce(fcount >= 0, "iota: incorrect startup parameters"); count = to!size_t(fcount); auto pastEnd = start + count * step; if (step > 0) { if (pastEnd < end) ++count; assert(start + count * step >= end); } else { if (pastEnd > end) ++count; assert(start + count * step <= end); } } @property bool empty() const { return index == count; } @property Value front() const { assert(!empty); return start + step * index; } alias front moveFront; void popFront() { assert(!empty); ++index; } @property Value back() const { assert(!empty); return start + step * (count - 1); } alias back moveBack; void popBack() { assert(!empty); --count; } @property auto save() { return this; } Value opIndex(size_t n) const { assert(n < count); return start + step * (n + index); } inout(Result) opSlice() inout { return this; } inout(Result) opSlice(size_t lower, size_t upper) inout { assert(upper >= lower && upper <= count); Result ret = this; ret.index += lower; ret.count = upper - lower + ret.index; return cast(inout Result)ret; } @property size_t length() const { return count - index; } alias length opDollar; } return Result(begin, end, step); } unittest { static assert(hasLength!(typeof(iota(0, 2)))); auto r = iota(0, 10, 1); assert(r[$ - 1] == 9); assert(equal(r, [0, 1, 2, 3, 4, 5, 6, 7, 8, 9][])); auto rSlice = r[2..8]; assert(equal(rSlice, [2, 3, 4, 5, 6, 7])); rSlice.popFront(); assert(rSlice[0] == rSlice.front); assert(rSlice.front == 3); rSlice.popBack(); assert(rSlice[rSlice.length - 1] == rSlice.back); assert(rSlice.back == 6); rSlice = r[0..4]; assert(equal(rSlice, [0, 1, 2, 3])); auto rr = iota(10); assert(equal(rr, [0, 1, 2, 3, 4, 5, 6, 7, 8, 9][])); r = iota(0, -10, -1); assert(equal(r, [0, -1, -2, -3, -4, -5, -6, -7, -8, -9][])); rSlice = r[3..9]; assert(equal(rSlice, [-3, -4, -5, -6, -7, -8])); r = iota(0, -6, -3); assert(equal(r, [0, -3][])); rSlice = r[1..2]; assert(equal(rSlice, [-3])); r = iota(0, -7, -3); assert(equal(r, [0, -3, -6][])); rSlice = r[1..3]; assert(equal(rSlice, [-3, -6])); r = iota(0, 11, 3); assert(equal(r, [0, 3, 6, 9][])); assert(r[2] == 6); rSlice = r[1..3]; assert(equal(rSlice, [3, 6])); int[] a = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; auto r1 = iota(a.ptr, a.ptr + a.length, 1); assert(r1.front == a.ptr); assert(r1.back == a.ptr + a.length - 1); auto rf = iota(0.0, 0.5, 0.1); assert(approxEqual(rf, [0.0, 0.1, 0.2, 0.3, 0.4][])); assert(rf.length == 5); rf.popFront(); assert(rf.length == 4); auto rfSlice = rf[1..4]; assert(rfSlice.length == 3); assert(approxEqual(rfSlice, [0.2, 0.3, 0.4])); rfSlice.popFront(); assert(approxEqual(rfSlice[0], 0.3)); rf.popFront(); assert(rf.length == 3); rfSlice = rf[1..3]; assert(rfSlice.length == 2); assert(approxEqual(rfSlice, [0.3, 0.4])); assert(approxEqual(rfSlice[0], 0.3)); // With something just above 0.5 rf = iota(0.0, nextUp(0.5), 0.1); assert(approxEqual(rf, [0.0, 0.1, 0.2, 0.3, 0.4, 0.5][])); rf.popBack(); assert(rf[rf.length - 1] == rf.back); assert(approxEqual(rf.back, 0.4)); assert(rf.length == 5); // going down rf = iota(0.0, -0.5, -0.1); assert(approxEqual(rf, [0.0, -0.1, -0.2, -0.3, -0.4][])); rfSlice = rf[2..5]; assert(approxEqual(rfSlice, [-0.2, -0.3, -0.4])); rf = iota(0.0, nextDown(-0.5), -0.1); assert(approxEqual(rf, [0.0, -0.1, -0.2, -0.3, -0.4, -0.5][])); // iota of longs auto rl = iota(5_000_000L); assert(rl.length == 5_000_000L); // iota of longs with steps auto iota_of_longs_with_steps = iota(50L, 101L, 10); assert(iota_of_longs_with_steps.length == 6); assert(equal(iota_of_longs_with_steps, [50L, 60L, 70L, 80L, 90L, 100L])); // iota of unsigned zero length (issue 6222, actually trying to consume it // is the only way to find something is wrong because the public // properties are all correct) auto iota_zero_unsigned = iota(0, 0u, 3); assert(count(iota_zero_unsigned) == 0); // unsigned reverse iota can be buggy if .length doesn't take them into // account (issue 7982). assert(iota(10u, 0u, -1).length == 10); assert(iota(10u, 0u, -2).length == 5); assert(iota(uint.max, uint.max-10, -1).length == 10); assert(iota(uint.max, uint.max-10, -2).length == 5); assert(iota(uint.max, 0u, -1).length == uint.max); } unittest { auto idx = new size_t[100]; copy(iota(0, idx.length), idx); } unittest { foreach(range; TypeTuple!(iota(2, 27, 4), iota(3, 9), iota(2.7, 12.3, .1), iota(3.2, 9.7))) { const cRange = range; const e = cRange.empty; const f = cRange.front; const b = cRange.back; const i = cRange[2]; const s1 = cRange[]; const s2 = cRange[0 .. 3]; const l = cRange.length; } //The ptr stuff can't be done at compile time, so we unfortunately end //up with some code duplication here. auto arr = [0, 5, 3, 5, 5, 7, 9, 2, 0, 42, 7, 6]; { const cRange = iota(arr.ptr, arr.ptr + arr.length, 3); const e = cRange.empty; const f = cRange.front; const b = cRange.back; const i = cRange[2]; const s1 = cRange[]; const s2 = cRange[0 .. 3]; const l = cRange.length; } { const cRange = iota(arr.ptr, arr.ptr + arr.length); const e = cRange.empty; const f = cRange.front; const b = cRange.back; const i = cRange[2]; const s1 = cRange[]; const s2 = cRange[0 .. 3]; const l = cRange.length; } } /** Options for the $(LREF FrontTransversal) and $(LREF Transversal) ranges (below). */ enum TransverseOptions { /** When transversed, the elements of a range of ranges are assumed to have different lengths (e.g. a jagged array). */ assumeJagged, //default /** The transversal enforces that the elements of a range of ranges have all the same length (e.g. an array of arrays, all having the same length). Checking is done once upon construction of the transversal range. */ enforceNotJagged, /** The transversal assumes, without verifying, that the elements of a range of ranges have all the same length. This option is useful if checking was already done from the outside of the range. */ assumeNotJagged, } /** Given a range of ranges, iterate transversally through the first elements of each of the enclosed ranges. Example: ---- int[][] x = new int[][2]; x[0] = [1, 2]; x[1] = [3, 4]; auto ror = frontTransversal(x); assert(equal(ror, [ 1, 3 ][])); --- */ struct FrontTransversal(Ror, TransverseOptions opt = TransverseOptions.assumeJagged) { alias Unqual!(Ror) RangeOfRanges; alias .ElementType!RangeOfRanges RangeType; alias .ElementType!RangeType ElementType; private void prime() { static if (opt == TransverseOptions.assumeJagged) { while (!_input.empty && _input.front.empty) { _input.popFront(); } static if (isBidirectionalRange!RangeOfRanges) { while (!_input.empty && _input.back.empty) { _input.popBack(); } } } } /** Construction from an input. */ this(RangeOfRanges input) { _input = input; prime(); static if (opt == TransverseOptions.enforceNotJagged) // (isRandomAccessRange!RangeOfRanges // && hasLength!RangeType) { if (empty) return; immutable commonLength = _input.front.length; foreach (e; _input) { enforce(e.length == commonLength); } } } /** Forward range primitives. */ static if (isInfinite!RangeOfRanges) { enum bool empty = false; } else { @property bool empty() { return _input.empty; } } /// Ditto @property auto ref front() { assert(!empty); return _input.front.front; } /// Ditto static if (hasMobileElements!RangeType) { ElementType moveFront() { return .moveFront(_input.front); } } static if (hasAssignableElements!RangeType) { @property auto front(ElementType val) { _input.front.front = val; } } /// Ditto void popFront() { assert(!empty); _input.popFront(); prime(); } /** Duplicates this $(D frontTransversal). Note that only the encapsulating range of range will be duplicated. Underlying ranges will not be duplicated. */ static if (isForwardRange!RangeOfRanges) { @property FrontTransversal save() { return FrontTransversal(_input.save); } } static if (isBidirectionalRange!RangeOfRanges) { /** Bidirectional primitives. They are offered if $(D isBidirectionalRange!RangeOfRanges). */ @property auto ref back() { assert(!empty); return _input.back.front; } /// Ditto void popBack() { assert(!empty); _input.popBack(); prime(); } /// Ditto static if (hasMobileElements!RangeType) { ElementType moveBack() { return .moveFront(_input.back); } } static if (hasAssignableElements!RangeType) { @property auto back(ElementType val) { _input.back.front = val; } } } static if (isRandomAccessRange!RangeOfRanges && (opt == TransverseOptions.assumeNotJagged || opt == TransverseOptions.enforceNotJagged)) { /** Random-access primitive. It is offered if $(D isRandomAccessRange!RangeOfRanges && (opt == TransverseOptions.assumeNotJagged || opt == TransverseOptions.enforceNotJagged)). */ auto ref opIndex(size_t n) { return _input[n].front; } /// Ditto static if (hasMobileElements!RangeType) { ElementType moveAt(size_t n) { return .moveFront(_input[n]); } } /// Ditto static if (hasAssignableElements!RangeType) { void opIndexAssign(ElementType val, size_t n) { _input[n].front = val; } } /** Slicing if offered if $(D RangeOfRanges) supports slicing and all the conditions for supporting indexing are met. */ static if (hasSlicing!RangeOfRanges) { typeof(this) opSlice(size_t lower, size_t upper) { return typeof(this)(_input[lower..upper]); } } } auto opSlice() { return this; } private: RangeOfRanges _input; } /// Ditto FrontTransversal!(RangeOfRanges, opt) frontTransversal( TransverseOptions opt = TransverseOptions.assumeJagged, RangeOfRanges) (RangeOfRanges rr) { return typeof(return)(rr); } unittest { static assert(is(FrontTransversal!(immutable int[][]))); foreach(DummyType; AllDummyRanges) { auto dummies = [DummyType.init, DummyType.init, DummyType.init, DummyType.init]; foreach(i, ref elem; dummies) { // Just violate the DummyRange abstraction to get what I want. elem.arr = elem.arr[i..$ - (3 - i)]; } auto ft = frontTransversal!(TransverseOptions.assumeNotJagged)(dummies); static if (isForwardRange!DummyType) { static assert(isForwardRange!(typeof(ft))); } assert(equal(ft, [1, 2, 3, 4])); // Test slicing. assert(equal(ft[0..2], [1, 2])); assert(equal(ft[1..3], [2, 3])); assert(ft.front == ft.moveFront()); assert(ft.back == ft.moveBack()); assert(ft.moveAt(1) == ft[1]); // Test infiniteness propagation. static assert(isInfinite!(typeof(frontTransversal(repeat("foo"))))); static if (DummyType.r == ReturnBy.Reference) { { ft.front++; scope(exit) ft.front--; assert(dummies.front.front == 2); } { ft.front = 5; scope(exit) ft.front = 1; assert(dummies[0].front == 5); } { ft.back = 88; scope(exit) ft.back = 4; assert(dummies.back.front == 88); } { ft[1] = 99; scope(exit) ft[1] = 2; assert(dummies[1].front == 99); } } } } /** Given a range of ranges, iterate transversally through the the $(D n)th element of each of the enclosed ranges. All elements of the enclosing range must offer random access. Example: ---- int[][] x = new int[][2]; x[0] = [1, 2]; x[1] = [3, 4]; auto ror = transversal(x, 1); assert(equal(ror, [ 2, 4 ][])); --- */ struct Transversal(Ror, TransverseOptions opt = TransverseOptions.assumeJagged) { private alias Unqual!Ror RangeOfRanges; private alias ElementType!RangeOfRanges InnerRange; private alias ElementType!InnerRange E; private void prime() { static if (opt == TransverseOptions.assumeJagged) { while (!_input.empty && _input.front.length <= _n) { _input.popFront(); } static if (isBidirectionalRange!RangeOfRanges) { while (!_input.empty && _input.back.length <= _n) { _input.popBack(); } } } } /** Construction from an input and an index. */ this(RangeOfRanges input, size_t n) { _input = input; _n = n; prime(); static if (opt == TransverseOptions.enforceNotJagged) { if (empty) return; immutable commonLength = _input.front.length; foreach (e; _input) { enforce(e.length == commonLength); } } } /** Forward range primitives. */ static if (isInfinite!(RangeOfRanges)) { enum bool empty = false; } else { @property bool empty() { return _input.empty; } } /// Ditto @property auto ref front() { assert(!empty); return _input.front[_n]; } /// Ditto static if (hasMobileElements!InnerRange) { E moveFront() { return .moveAt(_input.front, _n); } } /// Ditto static if (hasAssignableElements!InnerRange) { @property auto front(E val) { _input.front[_n] = val; } } /// Ditto void popFront() { assert(!empty); _input.popFront(); prime(); } /// Ditto static if (isForwardRange!RangeOfRanges) { @property typeof(this) save() { auto ret = this; ret._input = _input.save; return ret; } } static if (isBidirectionalRange!RangeOfRanges) { /** Bidirectional primitives. They are offered if $(D isBidirectionalRange!RangeOfRanges). */ @property auto ref back() { return _input.back[_n]; } /// Ditto void popBack() { assert(!empty); _input.popBack(); prime(); } /// Ditto static if (hasMobileElements!InnerRange) { E moveBack() { return .moveAt(_input.back, _n); } } /// Ditto static if (hasAssignableElements!InnerRange) { @property auto back(E val) { _input.back[_n] = val; } } } static if (isRandomAccessRange!RangeOfRanges && (opt == TransverseOptions.assumeNotJagged || opt == TransverseOptions.enforceNotJagged)) { /** Random-access primitive. It is offered if $(D isRandomAccessRange!RangeOfRanges && (opt == TransverseOptions.assumeNotJagged || opt == TransverseOptions.enforceNotJagged)). */ auto ref opIndex(size_t n) { return _input[n][_n]; } /// Ditto static if (hasMobileElements!InnerRange) { E moveAt(size_t n) { return .moveAt(_input[n], _n); } } /// Ditto static if (hasAssignableElements!InnerRange) { void opIndexAssign(E val, size_t n) { _input[n][_n] = val; } } /// Ditto static if(hasLength!RangeOfRanges) { @property size_t length() { return _input.length; } alias length opDollar; } /** Slicing if offered if $(D RangeOfRanges) supports slicing and all the conditions for supporting indexing are met. */ static if (hasSlicing!RangeOfRanges) { typeof(this) opSlice(size_t lower, size_t upper) { return typeof(this)(_input[lower..upper], _n); } } } auto opSlice() { return this; } private: RangeOfRanges _input; size_t _n; } /// Ditto Transversal!(RangeOfRanges, opt) transversal (TransverseOptions opt = TransverseOptions.assumeJagged, RangeOfRanges) (RangeOfRanges rr, size_t n) { return typeof(return)(rr, n); } unittest { int[][] x = new int[][2]; x[0] = [ 1, 2 ]; x[1] = [3, 4]; auto ror = transversal!(TransverseOptions.assumeNotJagged)(x, 1); auto witness = [ 2, 4 ]; uint i; foreach (e; ror) assert(e == witness[i++]); assert(i == 2); assert(ror.length == 2); static assert(is(Transversal!(immutable int[][]))); // Make sure ref, assign is being propagated. { ror.front++; scope(exit) ror.front--; assert(x[0][1] == 3); } { ror.front = 5; scope(exit) ror.front = 2; assert(x[0][1] == 5); assert(ror.moveFront() == 5); } { ror.back = 999; scope(exit) ror.back = 4; assert(x[1][1] == 999); assert(ror.moveBack() == 999); } { ror[0] = 999; scope(exit) ror[0] = 2; assert(x[0][1] == 999); assert(ror.moveAt(0) == 999); } // Test w/o ref return. alias DummyRange!(ReturnBy.Value, Length.Yes, RangeType.Random) D; auto drs = [D.init, D.init]; foreach(num; 0..10) { auto t = transversal!(TransverseOptions.enforceNotJagged)(drs, num); assert(t[0] == t[1]); assert(t[1] == num + 1); } static assert(isInfinite!(typeof(transversal(repeat([1,2,3]), 1)))); // Test slicing. auto mat = [[1, 2, 3, 4], [5, 6, 7, 8], [9, 10, 11, 12], [13, 14, 15, 16]]; auto mat1 = transversal!(TransverseOptions.assumeNotJagged)(mat, 1)[1..3]; assert(mat1[0] == 6); assert(mat1[1] == 10); } struct Transposed(RangeOfRanges) { //alias typeof(map!"a.front"(RangeOfRanges.init)) ElementType; this(RangeOfRanges input) { this._input = input; } @property auto front() { return map!"a.front"(_input); } void popFront() { foreach (ref e; _input) { if (e.empty) continue; e.popFront(); } } // ElementType opIndex(size_t n) // { // return _input[n].front; // } @property bool empty() { foreach (e; _input) if (!e.empty) return false; return true; } @property Transposed save() { return Transposed(_input.save); } auto opSlice() { return this; } private: RangeOfRanges _input; } auto transposed(RangeOfRanges)(RangeOfRanges rr) { return Transposed!RangeOfRanges(rr); } unittest { int[][] x = new int[][2]; x[0] = [1, 2]; x[1] = [3, 4]; auto tr = transposed(x); int[][] witness = [ [ 1, 3 ], [ 2, 4 ] ]; uint i; foreach (e; tr) { assert(array(e) == witness[i++]); } } /** This struct takes two ranges, $(D source) and $(D indices), and creates a view of $(D source) as if its elements were reordered according to $(D indices). $(D indices) may include only a subset of the elements of $(D source) and may also repeat elements. $(D Source) must be a random access range. The returned range will be bidirectional or random-access if $(D Indices) is bidirectional or random-access, respectively. Examples: --- auto source = [1, 2, 3, 4, 5]; auto indices = [4, 3, 1, 2, 0, 4]; auto ind = indexed(source, indices); assert(equal(ind, [5, 4, 2, 3, 1, 5])); // When elements of indices are duplicated and Source has lvalue elements, // these are aliased in ind. ind[0]++; assert(ind[0] == 6); assert(ind[5] == 6); --- */ struct Indexed(Source, Indices) if(isRandomAccessRange!Source && isInputRange!Indices && is(typeof(Source.init[ElementType!(Indices).init]))) { this(Source source, Indices indices) { this._source = source; this._indices = indices; } /// Range primitives @property auto ref front() { assert(!empty); return _source[_indices.front]; } /// Ditto void popFront() { assert(!empty); _indices.popFront(); } static if(isInfinite!Indices) { enum bool empty = false; } else { /// Ditto @property bool empty() { return _indices.empty; } } static if(isForwardRange!Indices) { /// Ditto @property typeof(this) save() { // Don't need to save _source because it's never consumed. return typeof(this)(_source, _indices.save); } } /// Ditto static if(hasAssignableElements!Source) { @property auto ref front(ElementType!Source newVal) { assert(!empty); return _source[_indices.front] = newVal; } } static if(hasMobileElements!Source) { /// Ditto auto moveFront() { assert(!empty); return .moveAt(_source, _indices.front); } } static if(isBidirectionalRange!Indices) { /// Ditto @property auto ref back() { assert(!empty); return _source[_indices.back]; } /// Ditto void popBack() { assert(!empty); _indices.popBack(); } /// Ditto static if(hasAssignableElements!Source) { @property auto ref back(ElementType!Source newVal) { assert(!empty); return _source[_indices.back] = newVal; } } static if(hasMobileElements!Source) { /// Ditto auto moveBack() { assert(!empty); return .moveAt(_source, _indices.back); } } } static if(hasLength!Indices) { /// Ditto @property size_t length() { return _indices.length; } alias length opDollar; } static if(isRandomAccessRange!Indices) { /// Ditto auto ref opIndex(size_t index) { return _source[_indices[index]]; } /// Ditto typeof(this) opSlice(size_t a, size_t b) { return typeof(this)(_source, _indices[a..b]); } static if(hasAssignableElements!Source) { /// Ditto auto opIndexAssign(ElementType!Source newVal, size_t index) { return _source[_indices[index]] = newVal; } } static if(hasMobileElements!Source) { /// Ditto auto moveAt(size_t index) { return .moveAt(_source, _indices[index]); } } } // All this stuff is useful if someone wants to index an Indexed // without adding a layer of indirection. /** Returns the source range. */ @property Source source() { return _source; } /** Returns the indices range. */ @property Indices indices() { return _indices; } static if(isRandomAccessRange!Indices) { /** Returns the physical index into the source range corresponding to a given logical index. This is useful, for example, when indexing an $(D Indexed) without adding another layer of indirection. Examples: --- auto ind = indexed([1, 2, 3, 4, 5], [1, 3, 4]); assert(ind.physicalIndex(0) == 1); --- */ size_t physicalIndex(size_t logicalIndex) { return _indices[logicalIndex]; } } private: Source _source; Indices _indices; } /// Ditto Indexed!(Source, Indices) indexed(Source, Indices)(Source source, Indices indices) { return typeof(return)(source, indices); } unittest { { // Test examples. auto ind = indexed([1, 2, 3, 4, 5], [1, 3, 4]); assert(ind.physicalIndex(0) == 1); } auto source = [1, 2, 3, 4, 5]; auto indices = [4, 3, 1, 2, 0, 4]; auto ind = indexed(source, indices); assert(equal(ind, [5, 4, 2, 3, 1, 5])); assert(equal(retro(ind), [5, 1, 3, 2, 4, 5])); // When elements of indices are duplicated and Source has lvalue elements, // these are aliased in ind. ind[0]++; assert(ind[0] == 6); assert(ind[5] == 6); foreach(DummyType; AllDummyRanges) { auto d = DummyType.init; auto r = indexed([1, 2, 3, 4, 5], d); static assert(propagatesRangeType!(DummyType, typeof(r))); static assert(propagatesLength!(DummyType, typeof(r))); } } /** This range iterates over fixed-sized chunks of size $(D chunkSize) of a $(D source) range. $(D Source) must be an input range with slicing and length. If $(D source.length) is not evenly divisible by $(D chunkSize), the back element of this range will contain fewer than $(D chunkSize) elements. Examples: --- auto source = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]; auto chunks = chunks(source, 4); assert(chunks[0] == [1, 2, 3, 4]); assert(chunks[1] == [5, 6, 7, 8]); assert(chunks[2] == [9, 10]); assert(chunks.back == chunks[2]); assert(chunks.front == chunks[0]); assert(chunks.length == 3); --- */ struct Chunks(Source) if(isInputRange!Source && hasSlicing!Source && hasLength!Source) { /// this(Source source, size_t chunkSize) { this._source = source; this._chunkSize = chunkSize; } /// Range primitives. @property auto front() { assert(!empty); return _source[0..min(_chunkSize, _source.length)]; } /// Ditto void popFront() { assert(!empty); popFrontN(_source, _chunkSize); } /// Ditto @property bool empty() { return _source.empty; } static if(isForwardRange!Source) { /// Ditto @property typeof(this) save() { return typeof(this)(_source.save, _chunkSize); } } /// Ditto auto opIndex(size_t index) { immutable end = min(_source.length, (index + 1) * _chunkSize); return _source[index * _chunkSize..end]; } /// Ditto typeof(this) opSlice(size_t lower, size_t upper) { immutable start = lower * _chunkSize; immutable end = min(_source.length, upper * _chunkSize); return typeof(this)(_source[start..end], _chunkSize); } /// Ditto @property size_t length() { return (_source.length / _chunkSize) + (_source.length % _chunkSize > 0); } alias length opDollar; /// Ditto @property auto back() { assert(!empty); immutable remainder = _source.length % _chunkSize; immutable len = _source.length; if(remainder == 0) { // Return a full chunk. return _source[len - _chunkSize..len]; } else { return _source[len - remainder..len]; } } /// Ditto void popBack() { assert(!empty); immutable remainder = _source.length % _chunkSize; immutable len = _source.length; if(remainder == 0) { _source = _source[0..len - _chunkSize]; } else { _source = _source[0..len - remainder]; } } private: Source _source; size_t _chunkSize; } /// Ditto Chunks!(Source) chunks(Source)(Source source, size_t chunkSize) { return typeof(return)(source, chunkSize); } unittest { auto source = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]; auto chunks = chunks(source, 4); assert(chunks[0] == [1, 2, 3, 4]); assert(chunks[1] == [5, 6, 7, 8]); assert(chunks[2] == [9, 10]); assert(chunks.back == chunks[2]); assert(chunks.front == chunks[0]); assert(chunks.length == 3); assert(equal(retro(array(chunks)), array(retro(chunks)))); auto chunks2 = chunks.save; chunks.popFront(); assert(chunks[0] == [5, 6, 7, 8]); assert(chunks[1] == [9, 10]); chunks2.popBack(); assert(chunks2[1] == [5, 6, 7, 8]); assert(chunks2.length == 2); static assert(isRandomAccessRange!(typeof(chunks))); } /** Moves the front of $(D r) out and returns it. Leaves $(D r.front) in a destroyable state that does not allocate any resources (usually equal to its $(D .init) value). Note that $(D R) does not have to be a range. */ ElementType!R moveFront(R)(R r) { static if (is(typeof(&r.moveFront))) { return r.moveFront(); } else static if (!hasElaborateCopyConstructor!(ElementType!R)) { return r.front; } else static if (is(typeof(&(r.front())) == ElementType!R*)) { return move(r.front); } else { static assert(0, "Cannot move front of a range with a postblit and an rvalue front."); } } unittest { struct R { @property ref int front() { static int x = 42; return x; } this(this){} } R r; assert(moveFront(r) == 42); } /** Moves the back of $(D r) out and returns it. Leaves $(D r.back) in a destroyable state that does not allocate any resources (usually equal to its $(D .init) value). Note that $(D R) does not have to be a range. */ ElementType!R moveBack(R)(R r) { static if (is(typeof(&r.moveBack))) { return r.moveBack(); } else static if (!hasElaborateCopyConstructor!(ElementType!R)) { return r.back; } else static if (is(typeof(&(r.back())) == ElementType!R*)) { return move(r.back); } else { static assert(0, "Cannot move back of a range with a postblit and an rvalue back."); } } unittest { struct TestRange { int payload; @property bool empty() { return false; } @property TestRange save() { return this; } @property ref int front() { return payload; } @property ref int back() { return payload; } void popFront() { } void popBack() { } } static assert(isBidirectionalRange!TestRange); TestRange r; auto x = moveBack(r); } /** Moves element at index $(D i) of $(D r) out and returns it. Leaves $(D r.front) in a destroyable state that does not allocate any resources (usually equal to its $(D .init) value). Note that $(D R) does not have to be a range. */ ElementType!R moveAt(R, I)(R r, I i) if (isIntegral!I) { static if (is(typeof(&r.moveAt))) { return r.moveAt(i); } else static if (!hasElaborateCopyConstructor!(ElementType!(R))) { return r[i]; } else static if (is(typeof(&r[i]) == ElementType!R*)) { return move(r[i]); } else { static assert(0, "Cannot move element of a range with a postblit and rvalue elements."); } } unittest { auto a = [ 1, 2, 3 ]; assert(moveFront(a) == 1); // define a perfunctory input range struct InputRange { @property bool empty() { return false; } @property int front() { return 42; } void popFront() {} int moveFront() { return 43; } } InputRange r; assert(moveFront(r) == 43); foreach(DummyType; AllDummyRanges) { auto d = DummyType.init; assert(moveFront(d) == 1); static if (isBidirectionalRange!DummyType) { assert(moveBack(d) == 10); } static if (isRandomAccessRange!DummyType) { assert(moveAt(d, 2) == 3); } } } /**These interfaces are intended to provide virtual function-based wrappers * around input ranges with element type E. This is useful where a well-defined * binary interface is required, such as when a DLL function or virtual function * needs to accept a generic range as a parameter. Note that * $(LREF isInputRange) and friends check for conformance to structural * interfaces, not for implementation of these $(D interface) types. * * Examples: * --- * void useRange(InputRange!int range) { * // Function body. * } * * // Create a range type. * auto squares = map!"a * a"(iota(10)); * * // Wrap it in an interface. * auto squaresWrapped = inputRangeObject(squares); * * // Use it. * useRange(squaresWrapped); * --- * * Limitations: * * These interfaces are not capable of forwarding $(D ref) access to elements. * * Infiniteness of the wrapped range is not propagated. * * Length is not propagated in the case of non-random access ranges. * * See_Also: * $(LREF inputRangeObject) */ interface InputRange(E) { /// @property E front(); /// E moveFront(); /// void popFront(); /// @property bool empty(); /* Measurements of the benefits of using opApply instead of range primitives * for foreach, using timings for iterating over an iota(100_000_000) range * with an empty loop body, using the same hardware in each case: * * Bare Iota struct, range primitives: 278 milliseconds * InputRangeObject, opApply: 436 milliseconds (1.57x penalty) * InputRangeObject, range primitives: 877 milliseconds (3.15x penalty) */ /**$(D foreach) iteration uses opApply, since one delegate call per loop * iteration is faster than three virtual function calls. */ int opApply(int delegate(E)); /// Ditto int opApply(int delegate(size_t, E)); } /**Interface for a forward range of type $(D E).*/ interface ForwardRange(E) : InputRange!E { /// @property ForwardRange!E save(); } /**Interface for a bidirectional range of type $(D E).*/ interface BidirectionalRange(E) : ForwardRange!(E) { /// @property BidirectionalRange!E save(); /// @property E back(); /// E moveBack(); /// void popBack(); } /**Interface for a finite random access range of type $(D E).*/ interface RandomAccessFinite(E) : BidirectionalRange!(E) { /// @property RandomAccessFinite!E save(); /// E opIndex(size_t); /// E moveAt(size_t); /// @property size_t length(); /// alias length opDollar; // Can't support slicing until issues with requiring slicing for all // finite random access ranges are fully resolved. version(none) { /// RandomAccessFinite!E opSlice(size_t, size_t); } } /**Interface for an infinite random access range of type $(D E).*/ interface RandomAccessInfinite(E) : ForwardRange!E { /// E moveAt(size_t); /// @property RandomAccessInfinite!E save(); /// E opIndex(size_t); } /**Adds assignable elements to InputRange.*/ interface InputAssignable(E) : InputRange!E { /// @property void front(E newVal); } /**Adds assignable elements to ForwardRange.*/ interface ForwardAssignable(E) : InputAssignable!E, ForwardRange!E { /// @property ForwardAssignable!E save(); } /**Adds assignable elements to BidirectionalRange.*/ interface BidirectionalAssignable(E) : ForwardAssignable!E, BidirectionalRange!E { /// @property BidirectionalAssignable!E save(); /// @property void back(E newVal); } /**Adds assignable elements to RandomAccessFinite.*/ interface RandomFiniteAssignable(E) : RandomAccessFinite!E, BidirectionalAssignable!E { /// @property RandomFiniteAssignable!E save(); /// void opIndexAssign(E val, size_t index); } /**Interface for an output range of type $(D E). Usage is similar to the * $(D InputRange) interface and descendants.*/ interface OutputRange(E) { /// void put(E); } // CTFE function that generates mixin code for one put() method for each // type E. private string putMethods(E...)() { string ret; foreach(ti, Unused; E) { ret ~= "void put(E[" ~ to!string(ti) ~ "] e) { .put(_range, e); }"; } return ret; } /**Implements the $(D OutputRange) interface for all types E and wraps the * $(D put) method for each type $(D E) in a virtual function. */ class OutputRangeObject(R, E...) : staticMap!(OutputRange, E) { // @BUG 4689: There should be constraints on this template class, but // DMD won't let me put them in. private R _range; this(R range) { this._range = range; } mixin(putMethods!E()); } /**Returns the interface type that best matches $(D R).*/ template MostDerivedInputRange(R) if (isInputRange!(Unqual!R)) { private alias ElementType!R E; static if (isRandomAccessRange!R) { static if (isInfinite!R) { alias RandomAccessInfinite!E MostDerivedInputRange; } else static if (hasAssignableElements!R) { alias RandomFiniteAssignable!E MostDerivedInputRange; } else { alias RandomAccessFinite!E MostDerivedInputRange; } } else static if (isBidirectionalRange!R) { static if (hasAssignableElements!R) { alias BidirectionalAssignable!E MostDerivedInputRange; } else { alias BidirectionalRange!E MostDerivedInputRange; } } else static if (isForwardRange!R) { static if (hasAssignableElements!R) { alias ForwardAssignable!E MostDerivedInputRange; } else { alias ForwardRange!E MostDerivedInputRange; } } else { static if (hasAssignableElements!R) { alias InputAssignable!E MostDerivedInputRange; } else { alias InputRange!E MostDerivedInputRange; } } } /**Implements the most derived interface that $(D R) works with and wraps * all relevant range primitives in virtual functions. If $(D R) is already * derived from the $(D InputRange) interface, aliases itself away. */ template InputRangeObject(R) if (isInputRange!(Unqual!R)) { static if (is(R : InputRange!(ElementType!R))) { alias R InputRangeObject; } else static if (!is(Unqual!R == R)) { alias InputRangeObject!(Unqual!R) InputRangeObject; } else { /// class InputRangeObject : MostDerivedInputRange!(R) { private R _range; private alias ElementType!R E; this(R range) { this._range = range; } @property E front() { return _range.front; } E moveFront() { return .moveFront(_range); } void popFront() { _range.popFront(); } @property bool empty() { return _range.empty; } static if (isForwardRange!R) { @property typeof(this) save() { return new typeof(this)(_range.save); } } static if (hasAssignableElements!R) { @property void front(E newVal) { _range.front = newVal; } } static if (isBidirectionalRange!R) { @property E back() { return _range.back; } @property E moveBack() { return .moveBack(_range); } @property void popBack() { return _range.popBack(); } static if (hasAssignableElements!R) { @property void back(E newVal) { _range.back = newVal; } } } static if (isRandomAccessRange!R) { E opIndex(size_t index) { return _range[index]; } E moveAt(size_t index) { return .moveAt(_range, index); } static if (hasAssignableElements!R) { void opIndexAssign(E val, size_t index) { _range[index] = val; } } static if (!isInfinite!R) { @property size_t length() { return _range.length; } alias length opDollar; // Can't support slicing until all the issues with // requiring slicing support for finite random access // ranges are resolved. version(none) { typeof(this) opSlice(size_t lower, size_t upper) { return new typeof(this)(_range[lower..upper]); } } } } // Optimization: One delegate call is faster than three virtual // function calls. Use opApply for foreach syntax. int opApply(int delegate(E) dg) { int res; for(auto r = _range; !r.empty; r.popFront()) { res = dg(r.front); if (res) break; } return res; } int opApply(int delegate(size_t, E) dg) { int res; size_t i = 0; for(auto r = _range; !r.empty; r.popFront()) { res = dg(i, r.front); if (res) break; i++; } return res; } } } } /**Convenience function for creating an $(D InputRangeObject) of the proper type. * See $(LREF InputRange) for an example. */ InputRangeObject!R inputRangeObject(R)(R range) if (isInputRange!R) { static if (is(R : InputRange!(ElementType!R))) { return range; } else { return new InputRangeObject!R(range); } } /**Convenience function for creating an $(D OutputRangeObject) with a base range * of type $(D R) that accepts types $(D E). Examples: --- uint[] outputArray; auto app = appender(&outputArray); auto appWrapped = outputRangeObject!(uint, uint[])(app); static assert(is(typeof(appWrapped) : OutputRange!(uint[]))); static assert(is(typeof(appWrapped) : OutputRange!(uint))); --- */ template outputRangeObject(E...) { /// OutputRangeObject!(R, E) outputRangeObject(R)(R range) { return new OutputRangeObject!(R, E)(range); } } unittest { static void testEquality(R)(iInputRange r1, R r2) { assert(equal(r1, r2)); } auto arr = [1,2,3,4]; RandomFiniteAssignable!int arrWrapped = inputRangeObject(arr); static assert(isRandomAccessRange!(typeof(arrWrapped))); // static assert(hasSlicing!(typeof(arrWrapped))); static assert(hasLength!(typeof(arrWrapped))); arrWrapped[0] = 0; assert(arr[0] == 0); assert(arr.moveFront() == 0); assert(arr.moveBack() == 4); assert(arr.moveAt(1) == 2); foreach(elem; arrWrapped) {} foreach(i, elem; arrWrapped) {} assert(inputRangeObject(arrWrapped) is arrWrapped); foreach(DummyType; AllDummyRanges) { auto d = DummyType.init; static assert(propagatesRangeType!(DummyType, typeof(inputRangeObject(d)))); static assert(propagatesRangeType!(DummyType, MostDerivedInputRange!DummyType)); InputRange!uint wrapped = inputRangeObject(d); assert(equal(wrapped, d)); } // Test output range stuff. auto app = appender!(uint[])(); auto appWrapped = outputRangeObject!(uint, uint[])(app); static assert(is(typeof(appWrapped) : OutputRange!(uint[]))); static assert(is(typeof(appWrapped) : OutputRange!(uint))); appWrapped.put(1); appWrapped.put([2, 3]); assert(app.data.length == 3); assert(equal(app.data, [1,2,3])); } /** Returns true if $(D fn) accepts variables of type T1 and T2 in any order. The following code should compile: --- T1 foo(); T2 bar(); fn(foo(), bar()); fn(bar(), foo()); --- */ template isTwoWayCompatible(alias fn, T1, T2) { enum isTwoWayCompatible = is(typeof( (){ T1 foo(); T2 bar(); fn(foo(), bar()); fn(bar(), foo()); } )); } /** Policy used with the searching primitives $(D lowerBound), $(D upperBound), and $(D equalRange) of $(LREF SortedRange) below. */ enum SearchPolicy { /** Searches with a step that is grows linearly (1, 2, 3,...) leading to a quadratic search schedule (indexes tried are 0, 1, 3, 6, 10, 15, 21, 28,...) Once the search overshoots its target, the remaining interval is searched using binary search. The search is completed in $(BIGOH sqrt(n)) time. Use it when you are reasonably confident that the value is around the beginning of the range. */ trot, /** Performs a $(LUCKY galloping search algorithm), i.e. searches with a step that doubles every time, (1, 2, 4, 8, ...) leading to an exponential search schedule (indexes tried are 0, 1, 3, 7, 15, 31, 63,...) Once the search overshoots its target, the remaining interval is searched using binary search. A value is found in $(BIGOH log(n)) time. */ gallop, /** Searches using a classic interval halving policy. The search starts in the middle of the range, and each search step cuts the range in half. This policy finds a value in $(BIGOH log(n)) time but is less cache friendly than $(D gallop) for large ranges. The $(D binarySearch) policy is used as the last step of $(D trot), $(D gallop), $(D trotBackwards), and $(D gallopBackwards) strategies. */ binarySearch, /** Similar to $(D trot) but starts backwards. Use it when confident that the value is around the end of the range. */ trotBackwards, /** Similar to $(D gallop) but starts backwards. Use it when confident that the value is around the end of the range. */ gallopBackwards } /** Represents a sorted random-access range. In addition to the regular range primitives, supports fast operations using binary search. To obtain a $(D SortedRange) from an unsorted range $(D r), use $(XREF algorithm, sort) which sorts $(D r) in place and returns the corresponding $(D SortedRange). To construct a $(D SortedRange) from a range $(D r) that is known to be already sorted, use $(LREF assumeSorted) described below. Example: ---- auto a = [ 1, 2, 3, 42, 52, 64 ]; auto r = assumeSorted(a); assert(r.contains(3)); assert(!r.contains(32)); auto r1 = sort!"a > b"(a); assert(r1.contains(3)); assert(!r1.contains(32)); assert(r1.release() == [ 64, 52, 42, 3, 2, 1 ]); ---- $(D SortedRange) could accept ranges weaker than random-access, but it is unable to provide interesting functionality for them. Therefore, $(D SortedRange) is currently restricted to random-access ranges. No copy of the original range is ever made. If the underlying range is changed concurrently with its corresponding $(D SortedRange) in ways that break its sortedness, $(D SortedRange) will work erratically. Example: ---- auto a = [ 1, 2, 3, 42, 52, 64 ]; auto r = assumeSorted(a); assert(r.contains(42)); swap(a[3], a[5]); // illegal to break sortedness of original range assert(!r.contains(42)); // passes although it shouldn't ---- */ struct SortedRange(Range, alias pred = "a < b") if (isRandomAccessRange!Range && hasLength!Range) { private alias binaryFun!pred predFun; private bool geq(L, R)(L lhs, R rhs) { return !predFun(lhs, rhs); } private bool gt(L, R)(L lhs, R rhs) { return predFun(rhs, lhs); } private Range _input; // Undocummented because a clearer way to invoke is by calling // assumeSorted. this(Range input) { this._input = input; if(!__ctfe) debug { import std.random; // Check the sortedness of the input if (this._input.length < 2) return; immutable size_t msb = bsr(this._input.length) + 1; assert(msb > 0 && msb <= this._input.length); immutable step = this._input.length / msb; static MinstdRand gen; immutable start = uniform(0, step, gen); auto st = stride(this._input, step); assert(isSorted!pred(st), text(st)); } } /// Range primitives. @property bool empty() //const { return this._input.empty; } /// Ditto @property auto save() { // Avoid the constructor typeof(this) result; result._input = _input.save; return result; } /// Ditto @property auto front() { return _input.front; } /// Ditto void popFront() { _input.popFront(); } /// Ditto @property auto back() { return _input.back; } /// Ditto void popBack() { _input.popBack(); } /// Ditto auto opIndex(size_t i) { return _input[i]; } /// Ditto static if (hasSlicing!Range) auto opSlice(size_t a, size_t b) { assert(a <= b); typeof(this) result; result._input = _input[a .. b];// skip checking return result; } /// Ditto @property size_t length() //const { return _input.length; } alias length opDollar; /** Releases the controlled range and returns it. */ auto release() { return move(_input); } // Assuming a predicate "test" that returns 0 for a left portion // of the range and then 1 for the rest, returns the index at // which the first 1 appears. Used internally by the search routines. private size_t getTransitionIndex(SearchPolicy sp, alias test, V)(V v) if (sp == SearchPolicy.binarySearch) { size_t first = 0, count = _input.length; while (count > 0) { immutable step = count / 2, it = first + step; if (!test(_input[it], v)) { first = it + 1; count -= step + 1; } else { count = step; } } return first; } // Specialization for trot and gallop private size_t getTransitionIndex(SearchPolicy sp, alias test, V)(V v) if (sp == SearchPolicy.trot || sp == SearchPolicy.gallop) { if (empty || test(front, v)) return 0; immutable count = length; if (count == 1) return 1; size_t below = 0, above = 1, step = 2; while (!test(_input[above], v)) { // Still too small, update below and increase gait below = above; immutable next = above + step; if (next >= count) { // Overshot - the next step took us beyond the end. So // now adjust next and simply exit the loop to do the // binary search thingie. above = count; break; } // Still in business, increase step and continue above = next; static if (sp == SearchPolicy.trot) ++step; else step <<= 1; } return below + this[below .. above].getTransitionIndex!( SearchPolicy.binarySearch, test, V)(v); } // Specialization for trotBackwards and gallopBackwards private size_t getTransitionIndex(SearchPolicy sp, alias test, V)(V v) if (sp == SearchPolicy.trotBackwards || sp == SearchPolicy.gallopBackwards) { immutable count = length; if (empty || !test(back, v)) return count; if (count == 1) return 0; size_t below = count - 2, above = count - 1, step = 2; while (test(_input[below], v)) { // Still too large, update above and increase gait above = below; if (below < step) { // Overshot - the next step took us beyond the end. So // now adjust next and simply fall through to do the // binary search thingie. below = 0; break; } // Still in business, increase step and continue below -= step; static if (sp == SearchPolicy.trot) ++step; else step <<= 1; } return below + this[below .. above].getTransitionIndex!( SearchPolicy.binarySearch, test, V)(v); } // lowerBound /** This function uses binary search with policy $(D sp) to find the largest left subrange on which $(D pred(x, value)) is $(D true) for all $(D x) (e.g., if $(D pred) is "less than", returns the portion of the range with elements strictly smaller than $(D value)). The search schedule and its complexity are documented in $(LREF SearchPolicy). See also STL's $(WEB sgi.com/tech/stl/lower_bound.html, lower_bound). Example: ---- auto a = assumeSorted([ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 ]); auto p = a.lowerBound(4); assert(equal(p, [ 0, 1, 2, 3 ])); ---- */ auto lowerBound(SearchPolicy sp = SearchPolicy.binarySearch, V)(V value) if (isTwoWayCompatible!(predFun, ElementType!Range, V)) { return this[0 .. getTransitionIndex!(sp, geq)(value)]; } // upperBound /** This function uses binary search with policy $(D sp) to find the largest right subrange on which $(D pred(value, x)) is $(D true) for all $(D x) (e.g., if $(D pred) is "less than", returns the portion of the range with elements strictly greater than $(D value)). The search schedule and its complexity are documented in $(LREF SearchPolicy). See also STL's $(WEB sgi.com/tech/stl/lower_bound.html,upper_bound). Example: ---- auto a = assumeSorted([ 1, 2, 3, 3, 3, 4, 4, 5, 6 ]); auto p = a.upperBound(3); assert(equal(p, [4, 4, 5, 6])); ---- */ auto upperBound(SearchPolicy sp = SearchPolicy.binarySearch, V)(V value) if (isTwoWayCompatible!(predFun, ElementType!Range, V)) { return this[getTransitionIndex!(sp, gt)(value) .. length]; } // equalRange /** Returns the subrange containing all elements $(D e) for which both $(D pred(e, value)) and $(D pred(value, e)) evaluate to $(D false) (e.g., if $(D pred) is "less than", returns the portion of the range with elements equal to $(D value)). Uses a classic binary search with interval halving until it finds a value that satisfies the condition, then uses $(D SearchPolicy.gallopBackwards) to find the left boundary and $(D SearchPolicy.gallop) to find the right boundary. These policies are justified by the fact that the two boundaries are likely to be near the first found value (i.e., equal ranges are relatively small). Completes the entire search in $(BIGOH log(n)) time. See also STL's $(WEB sgi.com/tech/stl/equal_range.html, equal_range). Example: ---- auto a = [ 1, 2, 3, 3, 3, 4, 4, 5, 6 ]; auto r = equalRange(a, 3); assert(equal(r, [ 3, 3, 3 ])); ---- */ auto equalRange(V)(V value) if (isTwoWayCompatible!(predFun, ElementType!Range, V)) { size_t first = 0, count = _input.length; while (count > 0) { immutable step = count / 2; auto it = first + step; if (predFun(_input[it], value)) { // Less than value, bump left bound up first = it + 1; count -= step + 1; } else if (predFun(value, _input[it])) { // Greater than value, chop count count = step; } else { // Equal to value, do binary searches in the // leftover portions // Gallop towards the left end as it's likely nearby immutable left = first + this[first .. it] .lowerBound!(SearchPolicy.gallopBackwards)(value).length; first += count; // Gallop towards the right end as it's likely nearby immutable right = first - this[it + 1 .. first] .upperBound!(SearchPolicy.gallop)(value).length; return this[left .. right]; } } return this.init; } // trisect /** Returns a tuple $(D r) such that $(D r[0]) is the same as the result of $(D lowerBound(value)), $(D r[1]) is the same as the result of $(D equalRange(value)), and $(D r[2]) is the same as the result of $(D upperBound(value)). The call is faster than computing all three separately. Uses a search schedule similar to $(D equalRange). Completes the entire search in $(BIGOH log(n)) time. Example: ---- auto a = [ 1, 2, 3, 3, 3, 4, 4, 5, 6 ]; auto r = assumeSorted(a).trisect(3); assert(equal(r[0], [ 1, 2 ])); assert(equal(r[1], [ 3, 3, 3 ])); assert(equal(r[2], [ 4, 4, 5, 6 ])); ---- */ auto trisect(V)(V value) if (isTwoWayCompatible!(predFun, ElementType!Range, V)) { size_t first = 0, count = _input.length; while (count > 0) { immutable step = count / 2; auto it = first + step; if (predFun(_input[it], value)) { // Less than value, bump left bound up first = it + 1; count -= step + 1; } else if (predFun(value, _input[it])) { // Greater than value, chop count count = step; } else { // Equal to value, do binary searches in the // leftover portions // Gallop towards the left end as it's likely nearby immutable left = first + this[first .. it] .lowerBound!(SearchPolicy.gallopBackwards)(value).length; first += count; // Gallop towards the right end as it's likely nearby immutable right = first - this[it + 1 .. first] .upperBound!(SearchPolicy.gallop)(value).length; return tuple(this[0 .. left], this[left .. right], this[right .. length]); } } // No equal element was found return tuple(this[0 .. first], this.init, this[first .. length]); } // contains /** Returns $(D true) if and only if $(D value) can be found in $(D range), which is assumed to be sorted. Performs $(BIGOH log(r.length)) evaluations of $(D pred). See also STL's $(WEB sgi.com/tech/stl/binary_search.html, binary_search). */ bool contains(V)(V value) { size_t first = 0, count = _input.length; while (count > 0) { immutable step = count / 2, it = first + step; if (predFun(_input[it], value)) { // Less than value, bump left bound up first = it + 1; count -= step + 1; } else if (predFun(value, _input[it])) { // Greater than value, chop count count = step; } else { // Found!!! return true; } } return false; } /++ $(RED Deprecated. It will be removed in January 2013. Please use $(LREF contains) instead.) +/ deprecated("Please use contains instead.") alias contains canFind; } // Doc examples unittest { auto a = [ 1, 2, 3, 42, 52, 64 ]; auto r = assumeSorted(a); assert(r.contains(3)); assert(!r.contains(32)); auto r1 = sort!"a > b"(a); assert(r1.contains(3)); assert(!r1.contains(32)); assert(r1.release() == [ 64, 52, 42, 3, 2, 1 ]); } unittest { auto a = [ 10, 20, 30, 30, 30, 40, 40, 50, 60 ]; auto r = assumeSorted(a).trisect(30); assert(equal(r[0], [ 10, 20 ])); assert(equal(r[1], [ 30, 30, 30 ])); assert(equal(r[2], [ 40, 40, 50, 60 ])); r = assumeSorted(a).trisect(35); assert(equal(r[0], [ 10, 20, 30, 30, 30 ])); assert(r[1].empty); assert(equal(r[2], [ 40, 40, 50, 60 ])); } unittest { auto a = [ "A", "AG", "B", "E", "F" ]; auto r = assumeSorted!"cmp(a,b) < 0"(a).trisect("B"w); assert(equal(r[0], [ "A", "AG" ])); assert(equal(r[1], [ "B" ])); assert(equal(r[2], [ "E", "F" ])); r = assumeSorted!"cmp(a,b) < 0"(a).trisect("A"d); assert(r[0].empty); assert(equal(r[1], [ "A" ])); assert(equal(r[2], [ "AG", "B", "E", "F" ])); } unittest { static void test(SearchPolicy pol)() { auto a = [ 1, 2, 3, 42, 52, 64 ]; auto r = assumeSorted(a); assert(equal(r.lowerBound(42), [1, 2, 3])); assert(equal(r.lowerBound!(pol)(42), [1, 2, 3])); assert(equal(r.lowerBound!(pol)(41), [1, 2, 3])); assert(equal(r.lowerBound!(pol)(43), [1, 2, 3, 42])); assert(equal(r.lowerBound!(pol)(51), [1, 2, 3, 42])); assert(equal(r.lowerBound!(pol)(3), [1, 2])); assert(equal(r.lowerBound!(pol)(55), [1, 2, 3, 42, 52])); assert(equal(r.lowerBound!(pol)(420), a)); assert(equal(r.lowerBound!(pol)(0), a[0 .. 0])); assert(equal(r.upperBound!(pol)(42), [52, 64])); assert(equal(r.upperBound!(pol)(41), [42, 52, 64])); assert(equal(r.upperBound!(pol)(43), [52, 64])); assert(equal(r.upperBound!(pol)(51), [52, 64])); assert(equal(r.upperBound!(pol)(53), [64])); assert(equal(r.upperBound!(pol)(55), [64])); assert(equal(r.upperBound!(pol)(420), a[0 .. 0])); assert(equal(r.upperBound!(pol)(0), a)); } test!(SearchPolicy.trot)(); test!(SearchPolicy.gallop)(); test!(SearchPolicy.trotBackwards)(); test!(SearchPolicy.gallopBackwards)(); test!(SearchPolicy.binarySearch)(); } unittest { // Check for small arrays int[] a; auto r = assumeSorted(a); a = [ 1 ]; r = assumeSorted(a); a = [ 1, 2 ]; r = assumeSorted(a); a = [ 1, 2, 3 ]; r = assumeSorted(a); } unittest { auto a = [ 1, 2, 3, 42, 52, 64 ]; auto r = assumeSorted(a); assert(r.contains(42)); swap(a[3], a[5]); // illegal to break sortedness of original range assert(!r.contains(42)); // passes although it shouldn't } unittest { immutable(int)[] arr = [ 1, 2, 3 ]; auto s = assumeSorted(arr); } /** Assumes $(D r) is sorted by predicate $(D pred) and returns the corresponding $(D SortedRange!(pred, R)) having $(D r) as support. To keep the checking costs low, the cost is $(BIGOH 1) in release mode (no checks for sortedness are performed). In debug mode, a few random elements of $(D r) are checked for sortedness. The size of the sample is proportional $(BIGOH log(r.length)). That way, checking has no effect on the complexity of subsequent operations specific to sorted ranges (such as binary search). The probability of an arbitrary unsorted range failing the test is very high (however, an almost-sorted range is likely to pass it). To check for sortedness at cost $(BIGOH n), use $(XREF algorithm,isSorted). */ auto assumeSorted(alias pred = "a < b", R)(R r) if (isRandomAccessRange!(Unqual!R)) { return SortedRange!(Unqual!R, pred)(r); } unittest { static assert(isRandomAccessRange!(SortedRange!(int[]))); int[] a = [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 ]; auto p = assumeSorted(a).lowerBound(4); assert(equal(p, [0, 1, 2, 3])); p = assumeSorted(a).lowerBound(5); assert(equal(p, [0, 1, 2, 3, 4])); p = assumeSorted(a).lowerBound(6); assert(equal(p, [ 0, 1, 2, 3, 4, 5])); p = assumeSorted(a).lowerBound(6.9); assert(equal(p, [ 0, 1, 2, 3, 4, 5, 6])); } unittest { int[] a = [ 1, 2, 3, 3, 3, 4, 4, 5, 6 ]; auto p = assumeSorted(a).upperBound(3); assert(equal(p, [4, 4, 5, 6 ])); p = assumeSorted(a).upperBound(4.2); assert(equal(p, [ 5, 6 ])); } unittest { int[] a = [ 1, 2, 3, 3, 3, 4, 4, 5, 6 ]; auto p = assumeSorted(a).equalRange(3); assert(equal(p, [ 3, 3, 3 ]), text(p)); p = assumeSorted(a).equalRange(4); assert(equal(p, [ 4, 4 ]), text(p)); p = assumeSorted(a).equalRange(2); assert(equal(p, [ 2 ])); p = assumeSorted(a).equalRange(0); assert(p.empty); p = assumeSorted(a).equalRange(7); assert(p.empty); p = assumeSorted(a).equalRange(3.0); assert(equal(p, [ 3, 3, 3])); } unittest { int[] a = [ 1, 2, 3, 3, 3, 4, 4, 5, 6 ]; if (a.length) { auto b = a[a.length / 2]; //auto r = sort(a); //assert(r.contains(b)); } } unittest { auto a = [ 5, 7, 34, 345, 677 ]; auto r = assumeSorted(a); a = null; r = assumeSorted(a); a = [ 1 ]; r = assumeSorted(a); bool ok = true; try { auto r2 = assumeSorted([ 677, 345, 34, 7, 5 ]); debug ok = false; } catch (Throwable) { } assert(ok); } /++ Wrapper which effectively makes it possible to pass a range by reference. Both the original range and the RefRange will always have the exact same elements. Any operation done on one will affect the other. So, for instance, if it's passed to a function which would implicitly copy the original range if it were passed to it, the original range is $(I not) copied but is consumed as if it were a reference type. Note that $(D save) works as normal and operates on a new range, so if $(D save) is ever called on the RefRange, then no operations on the saved range will affect the original. Examples: -------------------- import std.algorithm; ubyte[] buffer = [1, 9, 45, 12, 22]; auto found1 = find(buffer, 45); assert(found1 == [45, 12, 22]); assert(buffer == [1, 9, 45, 12, 22]); auto wrapped1 = refRange(&buffer); auto found2 = find(wrapped1, 45); assert(*found2.ptr == [45, 12, 22]); assert(buffer == [45, 12, 22]); auto found3 = find(wrapped2.save, 22); assert(*found3.ptr == [22]); assert(buffer == [45, 12, 22]); string str = "hello world"; auto wrappedStr = refRange(&str); assert(str.front == 'h'); str.popFrontN(5); assert(str == " world"); assert(wrappedStr.front == ' '); assert(*wrappedStr.ptr == " world"); -------------------- +/ struct RefRange(R) if(isForwardRange!R) { public: /++ +/ this(R* range) @safe pure nothrow { _range = range; } /++ This does not assign the pointer of $(D rhs) to this $(D RefRange). Rather it assigns the range pointed to by $(D rhs) to the range pointed to by this $(D RefRange). This is because $(I any) operation on a $(D RefRange) is the same is if it occurred to the original range. The one exception is when a $(D RefRange) is assigned $(D null) either directly or because $(D rhs) is $(D null). In that case, $(D RefRange) no longer refers to the original range but is $(D null). Examples: -------------------- ubyte[] buffer1 = [1, 2, 3, 4, 5]; ubyte[] buffer2 = [6, 7, 8, 9, 10]; auto wrapped1 = refRange(&buffer1); auto wrapped2 = refRange(&buffer2); assert(wrapped1.ptr is &buffer1); assert(wrapped2.ptr is &buffer2); assert(wrapped1.ptr !is wrapped2.ptr); assert(buffer1 != buffer2); wrapped1 = wrapped2; //Everything points to the same stuff as before. assert(wrapped1.ptr is &buffer1); assert(wrapped2.ptr is &buffer2); assert(wrapped1.ptr !is wrapped2.ptr); //But buffer1 has changed due to the assignment. assert(buffer1 == [6, 7, 8, 9, 10]); assert(buffer2 == [6, 7, 8, 9, 10]); buffer2 = [11, 12, 13, 14, 15]; //Everything points to the same stuff as before. assert(wrapped1.ptr is &buffer1); assert(wrapped2.ptr is &buffer2); assert(wrapped1.ptr !is wrapped2.ptr); //But buffer2 has changed due to the assignment. assert(buffer1 == [6, 7, 8, 9, 10]); assert(buffer2 == [11, 12, 13, 14, 15]); wrapped2 = null; //The pointer changed for wrapped2 but not wrapped1. assert(wrapped1.ptr is &buffer1); assert(wrapped2.ptr is null); assert(wrapped1.ptr !is wrapped2.ptr); //buffer2 is not affected by the assignment. assert(buffer1 == [6, 7, 8, 9, 10]); assert(buffer2 == [11, 12, 13, 14, 15]); -------------------- +/ auto opAssign(RefRange rhs) { if(_range && rhs._range) *_range = *rhs._range; else _range = rhs._range; return this; } /++ +/ auto opAssign(typeof(null) rhs) { _range = null; } /++ A pointer to the wrapped range. +/ @property inout(R*) ptr() @safe inout pure nothrow { return _range; } version(StdDdoc) { /++ +/ @property auto front() {assert(0);} /++ Ditto +/ @property auto front() const {assert(0);} /++ Ditto +/ @property auto front(ElementType!R value) {assert(0);} } else { @property auto front() { return (*_range).front; } static if(is(typeof((*(cast(const R*)_range)).front))) @property ElementType!R front() const { return (*_range).front; } static if(is(typeof((*_range).front = (*_range).front))) @property auto front(ElementType!R value) { return (*_range).front = value; } } version(StdDdoc) { @property bool empty(); /// @property bool empty() const; ///Ditto } else static if(isInfinite!R) enum empty = false; else { @property bool empty() { return (*_range).empty; } static if(is(typeof((*cast(const R*)_range).empty))) @property bool empty() const { return (*_range).empty; } } /++ +/ @property void popFront() { return (*_range).popFront(); } version(StdDdoc) { /++ +/ @property auto save() {assert(0);} /++ Ditto +/ @property auto save() const {assert(0);} /++ Ditto +/ auto opSlice() {assert(0);} /++ Ditto +/ auto opSlice() const {assert(0);} } else { private static void _testSave(R)(R* range) { (*range).save; } static if(isSafe!(_testSave!R)) { @property auto save() @trusted { mixin(_genSave()); } static if(is(typeof((*cast(const R*)_range).save))) @property auto save() @trusted const { mixin(_genSave()); } } else { @property auto save() { mixin(_genSave()); } static if(is(typeof((*cast(const R*)_range).save))) @property auto save() const { mixin(_genSave()); } } auto opSlice()() { return save; } auto opSlice()() const { return save; } private static string _genSave() @safe pure nothrow { return `import std.conv;` ~ `alias typeof((*_range).save) S;` ~ `static assert(isForwardRange!S, S.stringof ~ " is not a forward range.");` ~ `auto mem = new void[S.sizeof];` ~ `emplace!S(mem, cast(S)(*_range).save);` ~ `return RefRange!S(cast(S*)mem.ptr);`; } static assert(isForwardRange!RefRange); } version(StdDdoc) { /++ Only defined if $(D isBidirectionalRange!R) is $(D true). +/ @property auto back() {assert(0);} /++ Ditto +/ @property auto back() const {assert(0);} /++ Ditto +/ @property auto back(ElementType!R value) {assert(0);} } else static if(isBidirectionalRange!R) { @property auto back() { return (*_range).back; } static if(is(typeof((*(cast(const R*)_range)).back))) @property ElementType!R back() const { return (*_range).back; } static if(is(typeof((*_range).back = (*_range).back))) @property auto back(ElementType!R value) { return (*_range).back = value; } } /++ Ditto +/ static if(isBidirectionalRange!R) @property void popBack() { return (*_range).popBack(); } version(StdDdoc) { /++ Only defined if $(D isRandomAccesRange!R) is $(D true). +/ @property auto ref opIndex(IndexType)(IndexType index) {assert(0);} /++ Ditto +/ @property auto ref opIndex(IndexType)(IndexType index) const {assert(0);} } else static if(isRandomAccessRange!R) { @property auto ref opIndex(IndexType)(IndexType index) if(is(typeof((*_range)[index]))) { return (*_range)[index]; } @property auto ref opIndex(IndexType)(IndexType index) const if(is(typeof((*cast(const R*)_range)[index]))) { return (*_range)[index]; } } /++ Only defined if $(D hasMobileElements!R) and $(D isForwardRange!R) are $(D true). +/ static if(hasMobileElements!R && isForwardRange!R) @property auto moveFront() { return (*_range).moveFront(); } /++ Only defined if $(D hasMobileElements!R) and $(D isBidirectionalRange!R) are $(D true). +/ static if(hasMobileElements!R && isBidirectionalRange!R) @property auto moveBack() { return (*_range).moveBack(); } /++ Only defined if $(D hasMobileElements!R) and $(D isRandomAccessRange!R) are $(D true). +/ static if(hasMobileElements!R && isRandomAccessRange!R) @property auto moveAt(IndexType)(IndexType index) if(is(typeof((*_range).moveAt(index)))) { return (*_range).moveAt(index); } version(StdDdoc) { /++ Only defined if $(D hasLength!R) is $(D true). +/ @property auto length() {assert(0);} /++ Ditto +/ @property auto length() const {assert(0);} } else static if(hasLength!R) { @property auto length() { return (*_range).length; } static if(is(typeof((*cast(const R*)_range).length))) @property auto length() const { return (*_range).length; } } version(StdDdoc) { /++ Only defined if $(D hasSlicing!R) is $(D true). +/ @property auto opSlice(IndexType1, IndexType2) (IndexType1 begin, IndexType2 end) {assert(0);} /++ Ditto +/ @property auto opSlice(IndexType1, IndexType2) (IndexType1 begin, IndexType2 end) const {assert(0);} } else static if(hasSlicing!R) { @property auto opSlice(IndexType1, IndexType2) (IndexType1 begin, IndexType2 end) if(is(typeof((*_range)[begin .. end]))) { mixin(_genOpSlice()); } @property auto opSlice(IndexType1, IndexType2) (IndexType1 begin, IndexType2 end) const if(is(typeof((*cast(const R*)_range)[begin .. end]))) { mixin(_genOpSlice()); } private static string _genOpSlice() @safe pure nothrow { return `import std.conv;` ~ `alias typeof((*_range)[begin .. end]) S;` ~ `static assert(hasSlicing!S, S.stringof ~ " is not sliceable.");` ~ `auto mem = new void[S.sizeof];` ~ `emplace!S(mem, cast(S)(*_range)[begin .. end]);` ~ `return RefRange!S(cast(S*)mem.ptr);`; } } private: R* _range; } //Verify Example. unittest { import std.algorithm; ubyte[] buffer = [1, 9, 45, 12, 22]; auto found1 = find(buffer, 45); assert(found1 == [45, 12, 22]); assert(buffer == [1, 9, 45, 12, 22]); auto wrapped1 = refRange(&buffer); auto found2 = find(wrapped1, 45); assert(*found2.ptr == [45, 12, 22]); assert(buffer == [45, 12, 22]); auto found3 = find(wrapped1.save, 22); assert(*found3.ptr == [22]); assert(buffer == [45, 12, 22]); string str = "hello world"; auto wrappedStr = refRange(&str); assert(str.front == 'h'); str.popFrontN(5); assert(str == " world"); assert(wrappedStr.front == ' '); assert(*wrappedStr.ptr == " world"); } //Verify opAssign Example. unittest { ubyte[] buffer1 = [1, 2, 3, 4, 5]; ubyte[] buffer2 = [6, 7, 8, 9, 10]; auto wrapped1 = refRange(&buffer1); auto wrapped2 = refRange(&buffer2); assert(wrapped1.ptr is &buffer1); assert(wrapped2.ptr is &buffer2); assert(wrapped1.ptr !is wrapped2.ptr); assert(buffer1 != buffer2); wrapped1 = wrapped2; //Everything points to the same stuff as before. assert(wrapped1.ptr is &buffer1); assert(wrapped2.ptr is &buffer2); assert(wrapped1.ptr !is wrapped2.ptr); //But buffer1 has changed due to the assignment. assert(buffer1 == [6, 7, 8, 9, 10]); assert(buffer2 == [6, 7, 8, 9, 10]); buffer2 = [11, 12, 13, 14, 15]; //Everything points to the same stuff as before. assert(wrapped1.ptr is &buffer1); assert(wrapped2.ptr is &buffer2); assert(wrapped1.ptr !is wrapped2.ptr); //But buffer2 has changed due to the assignment. assert(buffer1 == [6, 7, 8, 9, 10]); assert(buffer2 == [11, 12, 13, 14, 15]); wrapped2 = null; //The pointer changed for wrapped2 but not wrapped1. assert(wrapped1.ptr is &buffer1); assert(wrapped2.ptr is null); assert(wrapped1.ptr !is wrapped2.ptr); //buffer2 is not affected by the assignment. assert(buffer1 == [6, 7, 8, 9, 10]); assert(buffer2 == [11, 12, 13, 14, 15]); } unittest { import std.algorithm; { ubyte[] buffer = [1, 2, 3, 4, 5]; auto wrapper = refRange(&buffer); auto p = wrapper.ptr; auto f = wrapper.front; wrapper.front = f; auto e = wrapper.empty; wrapper.popFront(); auto s = wrapper.save; auto b = wrapper.back; wrapper.back = b; wrapper.popBack(); auto i = wrapper[0]; wrapper.moveFront(); wrapper.moveBack(); wrapper.moveAt(0); auto l = wrapper.length; auto sl = wrapper[0 .. 1]; } { ubyte[] buffer = [1, 2, 3, 4, 5]; const wrapper = refRange(&buffer); const p = wrapper.ptr; const f = wrapper.front; const e = wrapper.empty; const s = wrapper.save; const b = wrapper.back; const i = wrapper[0]; const l = wrapper.length; const sl = wrapper[0 .. 1]; } { ubyte[] buffer = [1, 2, 3, 4, 5]; auto filtered = filter!"true"(buffer); auto wrapper = refRange(&filtered); auto p = wrapper.ptr; auto f = wrapper.front; wrapper.front = f; auto e = wrapper.empty; wrapper.popFront(); auto s = wrapper.save; wrapper.moveFront(); } { ubyte[] buffer = [1, 2, 3, 4, 5]; auto filtered = filter!"true"(buffer); const wrapper = refRange(&filtered); const p = wrapper.ptr; //Cannot currently be const. filter needs to be updated to handle const. /+ const f = wrapper.front; const e = wrapper.empty; const s = wrapper.save; +/ } { string str = "hello world"; auto wrapper = refRange(&str); auto p = wrapper.ptr; auto f = wrapper.front; auto e = wrapper.empty; wrapper.popFront(); auto s = wrapper.save; auto b = wrapper.back; wrapper.popBack(); } } //Test assignment. unittest { ubyte[] buffer1 = [1, 2, 3, 4, 5]; ubyte[] buffer2 = [6, 7, 8, 9, 10]; RefRange!(ubyte[]) wrapper1; RefRange!(ubyte[]) wrapper2 = refRange(&buffer2); assert(wrapper1.ptr is null); assert(wrapper2.ptr is &buffer2); wrapper1 = refRange(&buffer1); assert(wrapper1.ptr is &buffer1); wrapper1 = wrapper2; assert(wrapper1.ptr is &buffer1); assert(buffer1 == buffer2); wrapper1 = RefRange!(ubyte[]).init; assert(wrapper1.ptr is null); assert(wrapper2.ptr is &buffer2); assert(buffer1 == buffer2); assert(buffer1 == [6, 7, 8, 9, 10]); wrapper2 = null; assert(wrapper2.ptr is null); assert(buffer2 == [6, 7, 8, 9, 10]); } unittest { import std.algorithm; //Test that ranges are properly consumed. { int[] arr = [1, 42, 2, 41, 3, 40, 4, 42, 9]; auto wrapper = refRange(&arr); assert(*find(wrapper, 41).ptr == [41, 3, 40, 4, 42, 9]); assert(arr == [41, 3, 40, 4, 42, 9]); assert(*drop(wrapper, 2).ptr == [40, 4, 42, 9]); assert(arr == [40, 4, 42, 9]); assert(equal(until(wrapper, 42), [40, 4])); assert(arr == [42, 9]); assert(find(wrapper, 12).empty); assert(arr.empty); } { string str = "Hello, world-like object."; auto wrapper = refRange(&str); assert(*find(wrapper, "l").ptr == "llo, world-like object."); assert(str == "llo, world-like object."); assert(equal(take(wrapper, 5), "llo, ")); assert(str == "world-like object."); } //Test that operating on saved ranges does not consume the original. { int[] arr = [1, 42, 2, 41, 3, 40, 4, 42, 9]; auto wrapper = refRange(&arr); auto saved = wrapper.save; saved.popFrontN(3); assert(*saved.ptr == [41, 3, 40, 4, 42, 9]); assert(arr == [1, 42, 2, 41, 3, 40, 4, 42, 9]); } { string str = "Hello, world-like object."; auto wrapper = refRange(&str); auto saved = wrapper.save; saved.popFrontN(13); assert(*saved.ptr == "like object."); assert(str == "Hello, world-like object."); } //Test that functions which use save work properly. { int[] arr = [1, 42]; auto wrapper = refRange(&arr); assert(equal(commonPrefix(wrapper, [1, 27]), [1])); } { int[] arr = [4, 5, 6, 7, 1, 2, 3]; auto wrapper = refRange(&arr); assert(bringToFront(wrapper[0 .. 4], wrapper[4 .. arr.length]) == 3); assert(arr == [1, 2, 3, 4, 5, 6, 7]); } //Test bidirectional functions. { int[] arr = [1, 42, 2, 41, 3, 40, 4, 42, 9]; auto wrapper = refRange(&arr); assert(wrapper.back == 9); assert(arr == [1, 42, 2, 41, 3, 40, 4, 42, 9]); wrapper.popBack(); assert(arr == [1, 42, 2, 41, 3, 40, 4, 42]); } { string str = "Hello, world-like object."; auto wrapper = refRange(&str); assert(wrapper.back == '.'); assert(str == "Hello, world-like object."); wrapper.popBack(); assert(str == "Hello, world-like object"); } //Test random access functions. { int[] arr = [1, 42, 2, 41, 3, 40, 4, 42, 9]; auto wrapper = refRange(&arr); assert(wrapper[2] == 2); assert(arr == [1, 42, 2, 41, 3, 40, 4, 42, 9]); assert(*wrapper[3 .. 6].ptr, [41, 3, 40]); assert(arr == [1, 42, 2, 41, 3, 40, 4, 42, 9]); } //Test move functions. { int[] arr = [1, 42, 2, 41, 3, 40, 4, 42, 9]; auto wrapper = refRange(&arr); auto t1 = wrapper.moveFront(); auto t2 = wrapper.moveBack(); wrapper.front = t2; wrapper.back = t1; assert(arr == [9, 42, 2, 41, 3, 40, 4, 42, 1]); sort(wrapper.save); assert(arr == [1, 2, 3, 4, 9, 40, 41, 42, 42]); } } unittest { struct S { @property int front() @safe const pure nothrow { return 0; } enum bool empty = false; void popFront() @safe pure nothrow { } @property auto save() @safe pure nothrow { return this; } } S s; auto wrapper = refRange(&s); static assert(isInfinite!(typeof(wrapper))); } unittest { class C { @property int front() @safe const pure nothrow { return 0; } @property bool empty() @safe const pure nothrow { return false; } void popFront() @safe pure nothrow { } @property auto save() @safe pure nothrow { return this; } } static assert(isForwardRange!C); auto c = new C; auto cWrapper = refRange(&c); static assert(is(typeof(cWrapper) == C)); assert(cWrapper is c); struct S { @property int front() @safe const pure nothrow { return 0; } @property bool empty() @safe const pure nothrow { return false; } void popFront() @safe pure nothrow { } int i = 27; } static assert(isInputRange!S); static assert(!isForwardRange!S); auto s = S(42); auto sWrapper = refRange(&s); static assert(is(typeof(sWrapper) == S)); assert(sWrapper == s); } /++ Helper function for constructing a $(LREF RefRange). If the given range is not a forward range or it is a class type (and thus is already a reference type), then the original range is returned rather than a $(LREF RefRange). +/ auto refRange(R)(R* range) if(isForwardRange!R && !is(R == class)) { return RefRange!R(range); } auto refRange(R)(R* range) if((!isForwardRange!R && isInputRange!R) || is(R == class)) { return *range; }
D
/Users/KyleBlazier/Documents/Development/Xcode/ServerSide/Postgres/postgresAPI/.build/debug/Leaf.build/Tag/TagTemplate.swift.o : /Users/KyleBlazier/Documents/Development/Xcode/ServerSide/Postgres/postgresAPI/Packages/Leaf-1.0.5/Sources/Leaf/Argument.swift /Users/KyleBlazier/Documents/Development/Xcode/ServerSide/Postgres/postgresAPI/Packages/Leaf-1.0.5/Sources/Leaf/Byte+Leaf.swift /Users/KyleBlazier/Documents/Development/Xcode/ServerSide/Postgres/postgresAPI/Packages/Leaf-1.0.5/Sources/Leaf/Constants.swift /Users/KyleBlazier/Documents/Development/Xcode/ServerSide/Postgres/postgresAPI/Packages/Leaf-1.0.5/Sources/Leaf/Context.swift /Users/KyleBlazier/Documents/Development/Xcode/ServerSide/Postgres/postgresAPI/Packages/Leaf-1.0.5/Sources/Leaf/HTMLEscape.swift /Users/KyleBlazier/Documents/Development/Xcode/ServerSide/Postgres/postgresAPI/Packages/Leaf-1.0.5/Sources/Leaf/Leaf.swift /Users/KyleBlazier/Documents/Development/Xcode/ServerSide/Postgres/postgresAPI/Packages/Leaf-1.0.5/Sources/Leaf/LeafComponent.swift /Users/KyleBlazier/Documents/Development/Xcode/ServerSide/Postgres/postgresAPI/Packages/Leaf-1.0.5/Sources/Leaf/LeafError.swift /Users/KyleBlazier/Documents/Development/Xcode/ServerSide/Postgres/postgresAPI/Packages/Leaf-1.0.5/Sources/Leaf/Link.swift /Users/KyleBlazier/Documents/Development/Xcode/ServerSide/Postgres/postgresAPI/Packages/Leaf-1.0.5/Sources/Leaf/List.swift /Users/KyleBlazier/Documents/Development/Xcode/ServerSide/Postgres/postgresAPI/Packages/Leaf-1.0.5/Sources/Leaf/Node+Rendered.swift /Users/KyleBlazier/Documents/Development/Xcode/ServerSide/Postgres/postgresAPI/Packages/Leaf-1.0.5/Sources/Leaf/NSData+File.swift /Users/KyleBlazier/Documents/Development/Xcode/ServerSide/Postgres/postgresAPI/Packages/Leaf-1.0.5/Sources/Leaf/Parameter.swift /Users/KyleBlazier/Documents/Development/Xcode/ServerSide/Postgres/postgresAPI/Packages/Leaf-1.0.5/Sources/Leaf/Stem+Render.swift /Users/KyleBlazier/Documents/Development/Xcode/ServerSide/Postgres/postgresAPI/Packages/Leaf-1.0.5/Sources/Leaf/Stem+Spawn.swift /Users/KyleBlazier/Documents/Development/Xcode/ServerSide/Postgres/postgresAPI/Packages/Leaf-1.0.5/Sources/Leaf/Stem.swift /Users/KyleBlazier/Documents/Development/Xcode/ServerSide/Postgres/postgresAPI/Packages/Leaf-1.0.5/Sources/Leaf/Buffer/Buffer+Leaf.swift /Users/KyleBlazier/Documents/Development/Xcode/ServerSide/Postgres/postgresAPI/Packages/Leaf-1.0.5/Sources/Leaf/Buffer/Buffer.swift /Users/KyleBlazier/Documents/Development/Xcode/ServerSide/Postgres/postgresAPI/Packages/Leaf-1.0.5/Sources/Leaf/Buffer/BufferProtocol.swift /Users/KyleBlazier/Documents/Development/Xcode/ServerSide/Postgres/postgresAPI/Packages/Leaf-1.0.5/Sources/Leaf/Tag/BasicTag.swift /Users/KyleBlazier/Documents/Development/Xcode/ServerSide/Postgres/postgresAPI/Packages/Leaf-1.0.5/Sources/Leaf/Tag/Tag.swift /Users/KyleBlazier/Documents/Development/Xcode/ServerSide/Postgres/postgresAPI/Packages/Leaf-1.0.5/Sources/Leaf/Tag/TagTemplate.swift /Users/KyleBlazier/Documents/Development/Xcode/ServerSide/Postgres/postgresAPI/Packages/Leaf-1.0.5/Sources/Leaf/Tag/Models/Else.swift /Users/KyleBlazier/Documents/Development/Xcode/ServerSide/Postgres/postgresAPI/Packages/Leaf-1.0.5/Sources/Leaf/Tag/Models/Embed.swift /Users/KyleBlazier/Documents/Development/Xcode/ServerSide/Postgres/postgresAPI/Packages/Leaf-1.0.5/Sources/Leaf/Tag/Models/Equal.swift /Users/KyleBlazier/Documents/Development/Xcode/ServerSide/Postgres/postgresAPI/Packages/Leaf-1.0.5/Sources/Leaf/Tag/Models/Export.swift /Users/KyleBlazier/Documents/Development/Xcode/ServerSide/Postgres/postgresAPI/Packages/Leaf-1.0.5/Sources/Leaf/Tag/Models/Extend.swift /Users/KyleBlazier/Documents/Development/Xcode/ServerSide/Postgres/postgresAPI/Packages/Leaf-1.0.5/Sources/Leaf/Tag/Models/If.swift /Users/KyleBlazier/Documents/Development/Xcode/ServerSide/Postgres/postgresAPI/Packages/Leaf-1.0.5/Sources/Leaf/Tag/Models/Import.swift /Users/KyleBlazier/Documents/Development/Xcode/ServerSide/Postgres/postgresAPI/Packages/Leaf-1.0.5/Sources/Leaf/Tag/Models/Index.swift /Users/KyleBlazier/Documents/Development/Xcode/ServerSide/Postgres/postgresAPI/Packages/Leaf-1.0.5/Sources/Leaf/Tag/Models/Loop.swift /Users/KyleBlazier/Documents/Development/Xcode/ServerSide/Postgres/postgresAPI/Packages/Leaf-1.0.5/Sources/Leaf/Tag/Models/Raw.swift /Users/KyleBlazier/Documents/Development/Xcode/ServerSide/Postgres/postgresAPI/Packages/Leaf-1.0.5/Sources/Leaf/Tag/Models/Uppercased.swift /Users/KyleBlazier/Documents/Development/Xcode/ServerSide/Postgres/postgresAPI/Packages/Leaf-1.0.5/Sources/Leaf/Tag/Models/Variable.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/SwiftOnoneSupport.swiftmodule /Users/KyleBlazier/Documents/Development/Xcode/ServerSide/Postgres/postgresAPI/.build/debug/Core.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Dispatch.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/ObjectiveC.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/CoreGraphics.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/IOKit.swiftmodule /Users/KyleBlazier/Documents/Development/Xcode/ServerSide/Postgres/postgresAPI/.build/debug/libc.swiftmodule /Users/KyleBlazier/Documents/Development/Xcode/ServerSide/Postgres/postgresAPI/.build/debug/Node.swiftmodule /Users/KyleBlazier/Documents/Development/Xcode/ServerSide/Postgres/postgresAPI/.build/debug/PathIndexable.swiftmodule /Users/KyleBlazier/Documents/Development/Xcode/ServerSide/Postgres/postgresAPI/.build/debug/Polymorphic.swiftmodule /Users/KyleBlazier/Documents/Development/Xcode/ServerSide/Postgres/postgresAPI/.build/debug/Leaf.build/TagTemplate~partial.swiftmodule : /Users/KyleBlazier/Documents/Development/Xcode/ServerSide/Postgres/postgresAPI/Packages/Leaf-1.0.5/Sources/Leaf/Argument.swift /Users/KyleBlazier/Documents/Development/Xcode/ServerSide/Postgres/postgresAPI/Packages/Leaf-1.0.5/Sources/Leaf/Byte+Leaf.swift /Users/KyleBlazier/Documents/Development/Xcode/ServerSide/Postgres/postgresAPI/Packages/Leaf-1.0.5/Sources/Leaf/Constants.swift /Users/KyleBlazier/Documents/Development/Xcode/ServerSide/Postgres/postgresAPI/Packages/Leaf-1.0.5/Sources/Leaf/Context.swift /Users/KyleBlazier/Documents/Development/Xcode/ServerSide/Postgres/postgresAPI/Packages/Leaf-1.0.5/Sources/Leaf/HTMLEscape.swift /Users/KyleBlazier/Documents/Development/Xcode/ServerSide/Postgres/postgresAPI/Packages/Leaf-1.0.5/Sources/Leaf/Leaf.swift /Users/KyleBlazier/Documents/Development/Xcode/ServerSide/Postgres/postgresAPI/Packages/Leaf-1.0.5/Sources/Leaf/LeafComponent.swift /Users/KyleBlazier/Documents/Development/Xcode/ServerSide/Postgres/postgresAPI/Packages/Leaf-1.0.5/Sources/Leaf/LeafError.swift /Users/KyleBlazier/Documents/Development/Xcode/ServerSide/Postgres/postgresAPI/Packages/Leaf-1.0.5/Sources/Leaf/Link.swift /Users/KyleBlazier/Documents/Development/Xcode/ServerSide/Postgres/postgresAPI/Packages/Leaf-1.0.5/Sources/Leaf/List.swift /Users/KyleBlazier/Documents/Development/Xcode/ServerSide/Postgres/postgresAPI/Packages/Leaf-1.0.5/Sources/Leaf/Node+Rendered.swift /Users/KyleBlazier/Documents/Development/Xcode/ServerSide/Postgres/postgresAPI/Packages/Leaf-1.0.5/Sources/Leaf/NSData+File.swift /Users/KyleBlazier/Documents/Development/Xcode/ServerSide/Postgres/postgresAPI/Packages/Leaf-1.0.5/Sources/Leaf/Parameter.swift /Users/KyleBlazier/Documents/Development/Xcode/ServerSide/Postgres/postgresAPI/Packages/Leaf-1.0.5/Sources/Leaf/Stem+Render.swift /Users/KyleBlazier/Documents/Development/Xcode/ServerSide/Postgres/postgresAPI/Packages/Leaf-1.0.5/Sources/Leaf/Stem+Spawn.swift /Users/KyleBlazier/Documents/Development/Xcode/ServerSide/Postgres/postgresAPI/Packages/Leaf-1.0.5/Sources/Leaf/Stem.swift /Users/KyleBlazier/Documents/Development/Xcode/ServerSide/Postgres/postgresAPI/Packages/Leaf-1.0.5/Sources/Leaf/Buffer/Buffer+Leaf.swift /Users/KyleBlazier/Documents/Development/Xcode/ServerSide/Postgres/postgresAPI/Packages/Leaf-1.0.5/Sources/Leaf/Buffer/Buffer.swift /Users/KyleBlazier/Documents/Development/Xcode/ServerSide/Postgres/postgresAPI/Packages/Leaf-1.0.5/Sources/Leaf/Buffer/BufferProtocol.swift /Users/KyleBlazier/Documents/Development/Xcode/ServerSide/Postgres/postgresAPI/Packages/Leaf-1.0.5/Sources/Leaf/Tag/BasicTag.swift /Users/KyleBlazier/Documents/Development/Xcode/ServerSide/Postgres/postgresAPI/Packages/Leaf-1.0.5/Sources/Leaf/Tag/Tag.swift /Users/KyleBlazier/Documents/Development/Xcode/ServerSide/Postgres/postgresAPI/Packages/Leaf-1.0.5/Sources/Leaf/Tag/TagTemplate.swift /Users/KyleBlazier/Documents/Development/Xcode/ServerSide/Postgres/postgresAPI/Packages/Leaf-1.0.5/Sources/Leaf/Tag/Models/Else.swift /Users/KyleBlazier/Documents/Development/Xcode/ServerSide/Postgres/postgresAPI/Packages/Leaf-1.0.5/Sources/Leaf/Tag/Models/Embed.swift /Users/KyleBlazier/Documents/Development/Xcode/ServerSide/Postgres/postgresAPI/Packages/Leaf-1.0.5/Sources/Leaf/Tag/Models/Equal.swift /Users/KyleBlazier/Documents/Development/Xcode/ServerSide/Postgres/postgresAPI/Packages/Leaf-1.0.5/Sources/Leaf/Tag/Models/Export.swift /Users/KyleBlazier/Documents/Development/Xcode/ServerSide/Postgres/postgresAPI/Packages/Leaf-1.0.5/Sources/Leaf/Tag/Models/Extend.swift /Users/KyleBlazier/Documents/Development/Xcode/ServerSide/Postgres/postgresAPI/Packages/Leaf-1.0.5/Sources/Leaf/Tag/Models/If.swift /Users/KyleBlazier/Documents/Development/Xcode/ServerSide/Postgres/postgresAPI/Packages/Leaf-1.0.5/Sources/Leaf/Tag/Models/Import.swift /Users/KyleBlazier/Documents/Development/Xcode/ServerSide/Postgres/postgresAPI/Packages/Leaf-1.0.5/Sources/Leaf/Tag/Models/Index.swift /Users/KyleBlazier/Documents/Development/Xcode/ServerSide/Postgres/postgresAPI/Packages/Leaf-1.0.5/Sources/Leaf/Tag/Models/Loop.swift /Users/KyleBlazier/Documents/Development/Xcode/ServerSide/Postgres/postgresAPI/Packages/Leaf-1.0.5/Sources/Leaf/Tag/Models/Raw.swift /Users/KyleBlazier/Documents/Development/Xcode/ServerSide/Postgres/postgresAPI/Packages/Leaf-1.0.5/Sources/Leaf/Tag/Models/Uppercased.swift /Users/KyleBlazier/Documents/Development/Xcode/ServerSide/Postgres/postgresAPI/Packages/Leaf-1.0.5/Sources/Leaf/Tag/Models/Variable.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/SwiftOnoneSupport.swiftmodule /Users/KyleBlazier/Documents/Development/Xcode/ServerSide/Postgres/postgresAPI/.build/debug/Core.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Dispatch.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/ObjectiveC.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/CoreGraphics.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/IOKit.swiftmodule /Users/KyleBlazier/Documents/Development/Xcode/ServerSide/Postgres/postgresAPI/.build/debug/libc.swiftmodule /Users/KyleBlazier/Documents/Development/Xcode/ServerSide/Postgres/postgresAPI/.build/debug/Node.swiftmodule /Users/KyleBlazier/Documents/Development/Xcode/ServerSide/Postgres/postgresAPI/.build/debug/PathIndexable.swiftmodule /Users/KyleBlazier/Documents/Development/Xcode/ServerSide/Postgres/postgresAPI/.build/debug/Polymorphic.swiftmodule /Users/KyleBlazier/Documents/Development/Xcode/ServerSide/Postgres/postgresAPI/.build/debug/Leaf.build/TagTemplate~partial.swiftdoc : /Users/KyleBlazier/Documents/Development/Xcode/ServerSide/Postgres/postgresAPI/Packages/Leaf-1.0.5/Sources/Leaf/Argument.swift /Users/KyleBlazier/Documents/Development/Xcode/ServerSide/Postgres/postgresAPI/Packages/Leaf-1.0.5/Sources/Leaf/Byte+Leaf.swift /Users/KyleBlazier/Documents/Development/Xcode/ServerSide/Postgres/postgresAPI/Packages/Leaf-1.0.5/Sources/Leaf/Constants.swift /Users/KyleBlazier/Documents/Development/Xcode/ServerSide/Postgres/postgresAPI/Packages/Leaf-1.0.5/Sources/Leaf/Context.swift /Users/KyleBlazier/Documents/Development/Xcode/ServerSide/Postgres/postgresAPI/Packages/Leaf-1.0.5/Sources/Leaf/HTMLEscape.swift /Users/KyleBlazier/Documents/Development/Xcode/ServerSide/Postgres/postgresAPI/Packages/Leaf-1.0.5/Sources/Leaf/Leaf.swift /Users/KyleBlazier/Documents/Development/Xcode/ServerSide/Postgres/postgresAPI/Packages/Leaf-1.0.5/Sources/Leaf/LeafComponent.swift /Users/KyleBlazier/Documents/Development/Xcode/ServerSide/Postgres/postgresAPI/Packages/Leaf-1.0.5/Sources/Leaf/LeafError.swift /Users/KyleBlazier/Documents/Development/Xcode/ServerSide/Postgres/postgresAPI/Packages/Leaf-1.0.5/Sources/Leaf/Link.swift /Users/KyleBlazier/Documents/Development/Xcode/ServerSide/Postgres/postgresAPI/Packages/Leaf-1.0.5/Sources/Leaf/List.swift /Users/KyleBlazier/Documents/Development/Xcode/ServerSide/Postgres/postgresAPI/Packages/Leaf-1.0.5/Sources/Leaf/Node+Rendered.swift /Users/KyleBlazier/Documents/Development/Xcode/ServerSide/Postgres/postgresAPI/Packages/Leaf-1.0.5/Sources/Leaf/NSData+File.swift /Users/KyleBlazier/Documents/Development/Xcode/ServerSide/Postgres/postgresAPI/Packages/Leaf-1.0.5/Sources/Leaf/Parameter.swift /Users/KyleBlazier/Documents/Development/Xcode/ServerSide/Postgres/postgresAPI/Packages/Leaf-1.0.5/Sources/Leaf/Stem+Render.swift /Users/KyleBlazier/Documents/Development/Xcode/ServerSide/Postgres/postgresAPI/Packages/Leaf-1.0.5/Sources/Leaf/Stem+Spawn.swift /Users/KyleBlazier/Documents/Development/Xcode/ServerSide/Postgres/postgresAPI/Packages/Leaf-1.0.5/Sources/Leaf/Stem.swift /Users/KyleBlazier/Documents/Development/Xcode/ServerSide/Postgres/postgresAPI/Packages/Leaf-1.0.5/Sources/Leaf/Buffer/Buffer+Leaf.swift /Users/KyleBlazier/Documents/Development/Xcode/ServerSide/Postgres/postgresAPI/Packages/Leaf-1.0.5/Sources/Leaf/Buffer/Buffer.swift /Users/KyleBlazier/Documents/Development/Xcode/ServerSide/Postgres/postgresAPI/Packages/Leaf-1.0.5/Sources/Leaf/Buffer/BufferProtocol.swift /Users/KyleBlazier/Documents/Development/Xcode/ServerSide/Postgres/postgresAPI/Packages/Leaf-1.0.5/Sources/Leaf/Tag/BasicTag.swift /Users/KyleBlazier/Documents/Development/Xcode/ServerSide/Postgres/postgresAPI/Packages/Leaf-1.0.5/Sources/Leaf/Tag/Tag.swift /Users/KyleBlazier/Documents/Development/Xcode/ServerSide/Postgres/postgresAPI/Packages/Leaf-1.0.5/Sources/Leaf/Tag/TagTemplate.swift /Users/KyleBlazier/Documents/Development/Xcode/ServerSide/Postgres/postgresAPI/Packages/Leaf-1.0.5/Sources/Leaf/Tag/Models/Else.swift /Users/KyleBlazier/Documents/Development/Xcode/ServerSide/Postgres/postgresAPI/Packages/Leaf-1.0.5/Sources/Leaf/Tag/Models/Embed.swift /Users/KyleBlazier/Documents/Development/Xcode/ServerSide/Postgres/postgresAPI/Packages/Leaf-1.0.5/Sources/Leaf/Tag/Models/Equal.swift /Users/KyleBlazier/Documents/Development/Xcode/ServerSide/Postgres/postgresAPI/Packages/Leaf-1.0.5/Sources/Leaf/Tag/Models/Export.swift /Users/KyleBlazier/Documents/Development/Xcode/ServerSide/Postgres/postgresAPI/Packages/Leaf-1.0.5/Sources/Leaf/Tag/Models/Extend.swift /Users/KyleBlazier/Documents/Development/Xcode/ServerSide/Postgres/postgresAPI/Packages/Leaf-1.0.5/Sources/Leaf/Tag/Models/If.swift /Users/KyleBlazier/Documents/Development/Xcode/ServerSide/Postgres/postgresAPI/Packages/Leaf-1.0.5/Sources/Leaf/Tag/Models/Import.swift /Users/KyleBlazier/Documents/Development/Xcode/ServerSide/Postgres/postgresAPI/Packages/Leaf-1.0.5/Sources/Leaf/Tag/Models/Index.swift /Users/KyleBlazier/Documents/Development/Xcode/ServerSide/Postgres/postgresAPI/Packages/Leaf-1.0.5/Sources/Leaf/Tag/Models/Loop.swift /Users/KyleBlazier/Documents/Development/Xcode/ServerSide/Postgres/postgresAPI/Packages/Leaf-1.0.5/Sources/Leaf/Tag/Models/Raw.swift /Users/KyleBlazier/Documents/Development/Xcode/ServerSide/Postgres/postgresAPI/Packages/Leaf-1.0.5/Sources/Leaf/Tag/Models/Uppercased.swift /Users/KyleBlazier/Documents/Development/Xcode/ServerSide/Postgres/postgresAPI/Packages/Leaf-1.0.5/Sources/Leaf/Tag/Models/Variable.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/SwiftOnoneSupport.swiftmodule /Users/KyleBlazier/Documents/Development/Xcode/ServerSide/Postgres/postgresAPI/.build/debug/Core.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Dispatch.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/ObjectiveC.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/CoreGraphics.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/IOKit.swiftmodule /Users/KyleBlazier/Documents/Development/Xcode/ServerSide/Postgres/postgresAPI/.build/debug/libc.swiftmodule /Users/KyleBlazier/Documents/Development/Xcode/ServerSide/Postgres/postgresAPI/.build/debug/Node.swiftmodule /Users/KyleBlazier/Documents/Development/Xcode/ServerSide/Postgres/postgresAPI/.build/debug/PathIndexable.swiftmodule /Users/KyleBlazier/Documents/Development/Xcode/ServerSide/Postgres/postgresAPI/.build/debug/Polymorphic.swiftmodule
D
a New Testament book containing an exposition of the doctrines of Saint Paul a resident of modern Rome an inhabitant of the ancient Roman Empire a typeface used in ancient Roman inscriptions
D
// Written in the D programming language. /** Utility and ancillary artifacts of `std.experimental.allocator`. This module shouldn't be used directly; its functionality will be migrated into more appropriate parts of `std`. Authors: $(HTTP erdani.com, Andrei Alexandrescu), Timon Gehr (`Ternary`) Source: $(PHOBOSSRC std/experimental/allocator/common.d) */ module std.experimental.allocator.common; import std.algorithm.comparison, std.traits; /** Returns the size in bytes of the state that needs to be allocated to hold an object of type `T`. `stateSize!T` is zero for `struct`s that are not nested and have no nonstatic member variables. */ template stateSize(T) { static if (is(T == class) || is(T == interface)) enum stateSize = __traits(classInstanceSize, T); else static if (is(T == struct) || is(T == union)) enum stateSize = Fields!T.length || isNested!T ? T.sizeof : 0; else static if (is(T == void)) enum size_t stateSize = 0; else enum stateSize = T.sizeof; } @safe @nogc nothrow pure unittest { static assert(stateSize!void == 0); struct A {} static assert(stateSize!A == 0); struct B { int x; } static assert(stateSize!B == 4); interface I1 {} //static assert(stateSize!I1 == 2 * size_t.sizeof); class C1 {} static assert(stateSize!C1 == 3 * size_t.sizeof); class C2 { char c; } static assert(stateSize!C2 == 4 * size_t.sizeof); static class C3 { char c; } static assert(stateSize!C3 == 2 * size_t.sizeof + char.sizeof); } /** Returns `true` if the `Allocator` has the alignment known at compile time; otherwise it returns `false`. */ template hasStaticallyKnownAlignment(Allocator) { enum hasStaticallyKnownAlignment = __traits(compiles, {enum x = Allocator.alignment;}); } /** `chooseAtRuntime` is a compile-time constant of type `size_t` that several parameterized structures in this module recognize to mean deferral to runtime of the exact value. For example, $(D BitmappedBlock!(Allocator, 4096)) (described in detail below) defines a block allocator with block size of 4096 bytes, whereas $(D BitmappedBlock!(Allocator, chooseAtRuntime)) defines a block allocator that has a field storing the block size, initialized by the user. */ enum chooseAtRuntime = size_t.max - 1; /** `unbounded` is a compile-time constant of type `size_t` that several parameterized structures in this module recognize to mean "infinite" bounds for the parameter. For example, `Freelist` (described in detail below) accepts a `maxNodes` parameter limiting the number of freelist items. If `unbounded` is passed for `maxNodes`, then there is no limit and no checking for the number of nodes. */ enum unbounded = size_t.max; /** The alignment that is guaranteed to accommodate any D object allocation on the current platform. */ enum uint platformAlignment = std.algorithm.comparison.max(double.alignof, real.alignof); /** The default good size allocation is deduced as `n` rounded up to the allocator's alignment. */ size_t goodAllocSize(A)(auto ref A a, size_t n) { return n.roundUpToMultipleOf(a.alignment); } /* Returns s rounded up to a multiple of base. */ @safe @nogc nothrow pure package size_t roundUpToMultipleOf(size_t s, uint base) { assert(base); auto rem = s % base; return rem ? s + base - rem : s; } @safe @nogc nothrow pure unittest { assert(10.roundUpToMultipleOf(11) == 11); assert(11.roundUpToMultipleOf(11) == 11); assert(12.roundUpToMultipleOf(11) == 22); assert(118.roundUpToMultipleOf(11) == 121); } /* Returns `n` rounded up to a multiple of alignment, which must be a power of 2. */ @safe @nogc nothrow pure package size_t roundUpToAlignment(size_t n, uint alignment) { import std.math : isPowerOf2; assert(alignment.isPowerOf2); immutable uint slack = cast(uint) n & (alignment - 1); const result = slack ? n + alignment - slack : n; assert(result >= n); return result; } @safe @nogc nothrow pure unittest { assert(10.roundUpToAlignment(4) == 12); assert(11.roundUpToAlignment(2) == 12); assert(12.roundUpToAlignment(8) == 16); assert(118.roundUpToAlignment(64) == 128); } /* Returns `n` rounded down to a multiple of alignment, which must be a power of 2. */ @safe @nogc nothrow pure package size_t roundDownToAlignment(size_t n, uint alignment) { import std.math : isPowerOf2; assert(alignment.isPowerOf2); return n & ~size_t(alignment - 1); } @safe @nogc nothrow pure unittest { assert(10.roundDownToAlignment(4) == 8); assert(11.roundDownToAlignment(2) == 10); assert(12.roundDownToAlignment(8) == 8); assert(63.roundDownToAlignment(64) == 0); } /* Advances the beginning of `b` to start at alignment `a`. The resulting buffer may therefore be shorter. Returns the adjusted buffer, or null if obtaining a non-empty buffer is impossible. */ @nogc nothrow pure package void[] roundUpToAlignment(void[] b, uint a) { auto e = b.ptr + b.length; auto p = cast(void*) roundUpToAlignment(cast(size_t) b.ptr, a); if (e <= p) return null; return p[0 .. e - p]; } @nogc nothrow pure @system unittest { void[] empty; assert(roundUpToAlignment(empty, 4) == null); char[128] buf; // At least one pointer inside buf is 128-aligned assert(roundUpToAlignment(buf, 128) !is null); } /* Like `a / b` but rounds the result up, not down. */ @safe @nogc nothrow pure package size_t divideRoundUp(size_t a, size_t b) { assert(b); return (a + b - 1) / b; } /* Returns `s` rounded up to a multiple of `base`. */ @nogc nothrow pure package void[] roundStartToMultipleOf(void[] s, uint base) { assert(base); auto p = cast(void*) roundUpToMultipleOf( cast(size_t) s.ptr, base); auto end = s.ptr + s.length; return p[0 .. end - p]; } nothrow pure @system unittest { void[] p; assert(roundStartToMultipleOf(p, 16) is null); p = new ulong[10]; assert(roundStartToMultipleOf(p, 16) is p); } /* Returns `s` rounded up to the nearest power of 2. */ @safe @nogc nothrow pure package size_t roundUpToPowerOf2(size_t s) { import std.meta : AliasSeq; assert(s <= (size_t.max >> 1) + 1); --s; static if (size_t.sizeof == 4) alias Shifts = AliasSeq!(1, 2, 4, 8, 16); else alias Shifts = AliasSeq!(1, 2, 4, 8, 16, 32); foreach (i; Shifts) { s |= s >> i; } return s + 1; } @safe @nogc nothrow pure unittest { assert(0.roundUpToPowerOf2 == 0); assert(1.roundUpToPowerOf2 == 1); assert(2.roundUpToPowerOf2 == 2); assert(3.roundUpToPowerOf2 == 4); assert(7.roundUpToPowerOf2 == 8); assert(8.roundUpToPowerOf2 == 8); assert(10.roundUpToPowerOf2 == 16); assert(11.roundUpToPowerOf2 == 16); assert(12.roundUpToPowerOf2 == 16); assert(118.roundUpToPowerOf2 == 128); assert((size_t.max >> 1).roundUpToPowerOf2 == (size_t.max >> 1) + 1); assert(((size_t.max >> 1) + 1).roundUpToPowerOf2 == (size_t.max >> 1) + 1); } /* Returns the number of trailing zeros of `x`. */ @safe @nogc nothrow pure package uint trailingZeros(ulong x) { uint result; while (result < 64 && !(x & (1UL << result))) { ++result; } return result; } @safe @nogc nothrow pure unittest { assert(trailingZeros(0) == 64); assert(trailingZeros(1) == 0); assert(trailingZeros(2) == 1); assert(trailingZeros(3) == 0); assert(trailingZeros(4) == 2); } /* Returns `true` if `ptr` is aligned at `alignment`. */ @nogc nothrow pure package bool alignedAt(T)(T* ptr, uint alignment) { return cast(size_t) ptr % alignment == 0; } /* Returns the effective alignment of `ptr`, i.e. the largest power of two that is a divisor of `ptr`. */ @nogc nothrow pure package size_t effectiveAlignment(void* ptr) { return (cast(size_t) 1) << trailingZeros(cast(size_t) ptr); } @nogc nothrow pure @system unittest { int x; assert(effectiveAlignment(&x) >= int.alignof); const max = (cast(size_t) 1) << (size_t.sizeof * 8 - 1); assert(effectiveAlignment(cast(void*) max) == max); } /* Aligns a pointer down to a specified alignment. The resulting pointer is less than or equal to the given pointer. */ @nogc nothrow pure package void* alignDownTo(void* ptr, uint alignment) { import std.math : isPowerOf2; assert(alignment.isPowerOf2); return cast(void*) (cast(size_t) ptr & ~(alignment - 1UL)); } /* Aligns a pointer up to a specified alignment. The resulting pointer is greater than or equal to the given pointer. */ @nogc nothrow pure package void* alignUpTo(void* ptr, uint alignment) { import std.math : isPowerOf2; assert(alignment.isPowerOf2); immutable uint slack = cast(size_t) ptr & (alignment - 1U); return slack ? ptr + alignment - slack : ptr; } @safe @nogc nothrow pure package bool isGoodStaticAlignment(uint x) { import std.math : isPowerOf2; return x.isPowerOf2; } @safe @nogc nothrow pure package bool isGoodDynamicAlignment(uint x) { import std.math : isPowerOf2; return x.isPowerOf2 && x >= (void*).sizeof; } /** The default `reallocate` function first attempts to use `expand`. If $(D Allocator.expand) is not defined or returns `false`, `reallocate` allocates a new block of memory of appropriate size and copies data from the old block to the new block. Finally, if `Allocator` defines `deallocate`, $(D reallocate) uses it to free the old memory block. `reallocate` does not attempt to use `Allocator.reallocate` even if defined. This is deliberate so allocators may use it internally within their own implementation of `reallocate`. */ bool reallocate(Allocator)(ref Allocator a, ref void[] b, size_t s) { if (b.length == s) return true; static if (hasMember!(Allocator, "expand")) { if (b.length <= s && a.expand(b, s - b.length)) return true; } auto newB = a.allocate(s); if (newB.length != s) return false; if (newB.length <= b.length) newB[] = b[0 .. newB.length]; else newB[0 .. b.length] = b[]; static if (hasMember!(Allocator, "deallocate")) a.deallocate(b); b = newB; return true; } /** The default `alignedReallocate` function first attempts to use `expand`. If `Allocator.expand` is not defined or returns `false`, $(D alignedReallocate) allocates a new block of memory of appropriate size and copies data from the old block to the new block. Finally, if `Allocator` defines `deallocate`, `alignedReallocate` uses it to free the old memory block. `alignedReallocate` does not attempt to use `Allocator.reallocate` even if defined. This is deliberate so allocators may use it internally within their own implementation of `reallocate`. */ bool alignedReallocate(Allocator)(ref Allocator alloc, ref void[] b, size_t s, uint a) if (hasMember!(Allocator, "alignedAllocate")) { static if (hasMember!(Allocator, "expand")) { if (b.length <= s && b.ptr.alignedAt(a) && alloc.expand(b, s - b.length)) return true; } else { if (b.length == s && b.ptr.alignedAt(a)) return true; } auto newB = alloc.alignedAllocate(s, a); if (newB.length != s) return false; if (newB.length <= b.length) newB[] = b[0 .. newB.length]; else newB[0 .. b.length] = b[]; static if (hasMember!(Allocator, "deallocate")) alloc.deallocate(b); b = newB; return true; } @system unittest { bool called = false; struct DummyAllocator { void[] alignedAllocate(size_t size, uint alignment) { called = true; return null; } } struct DummyAllocatorExpand { void[] alignedAllocate(size_t size, uint alignment) { return null; } bool expand(ref void[] b, size_t length) { called = true; return true; } } char[128] buf; uint alignment = 32; auto alignedPtr = roundUpToMultipleOf(cast(size_t) buf.ptr, alignment); auto diff = alignedPtr - cast(size_t) buf.ptr; // Align the buffer to 'alignment' void[] b = cast(void[]) (buf.ptr + diff)[0 .. buf.length - diff]; DummyAllocator a1; // Ask for same length and alignment, should not call 'alignedAllocate' assert(alignedReallocate(a1, b, b.length, alignment)); assert(!called); // Ask for same length, different alignment // should call 'alignedAllocate' if not aligned to new value alignedReallocate(a1, b, b.length, alignment + 1); assert(b.ptr.alignedAt(alignment + 1) || called); called = false; DummyAllocatorExpand a2; // Ask for bigger length, same alignment, should call 'expand' assert(alignedReallocate(a2, b, b.length + 1, alignment)); assert(called); called = false; // Ask for bigger length, different alignment // should call 'alignedAllocate' if not aligned to new value alignedReallocate(a2, b, b.length + 1, alignment + 1); assert(b.ptr.alignedAt(alignment + 1) || !called); } /** Forwards each of the methods in `funs` (if defined) to `member`. */ /*package*/ string forwardToMember(string member, string[] funs...) { string result = " import std.traits : hasMember, Parameters;\n"; foreach (fun; funs) { result ~= " static if (hasMember!(typeof("~member~"), `"~fun~"`)) auto ref "~fun~"(Parameters!(typeof("~member~"."~fun~")) args) { return "~member~"."~fun~"(args); }\n"; } return result; } version(unittest) { package void testAllocator(alias make)() { import std.conv : text; import std.math : isPowerOf2; import std.stdio : writeln, stderr; import std.typecons : Ternary; alias A = typeof(make()); scope(failure) stderr.writeln("testAllocator failed for ", A.stringof); auto a = make(); // Test alignment static assert(A.alignment.isPowerOf2); // Test goodAllocSize assert(a.goodAllocSize(1) >= A.alignment, text(a.goodAllocSize(1), " < ", A.alignment)); assert(a.goodAllocSize(11) >= 11.roundUpToMultipleOf(A.alignment)); assert(a.goodAllocSize(111) >= 111.roundUpToMultipleOf(A.alignment)); // Test allocate assert(a.allocate(0) is null); auto b1 = a.allocate(1); assert(b1.length == 1); auto b2 = a.allocate(2); assert(b2.length == 2); assert(b2.ptr + b2.length <= b1.ptr || b1.ptr + b1.length <= b2.ptr); // Test allocateZeroed static if (hasMember!(A, "allocateZeroed")) {{ auto b3 = a.allocateZeroed(8); if (b3 !is null) { assert(b3.length == 8); foreach (e; cast(ubyte[]) b3) assert(e == 0); } }} // Test alignedAllocate static if (hasMember!(A, "alignedAllocate")) {{ auto b3 = a.alignedAllocate(1, 256); assert(b3.length <= 1); assert(b3.ptr.alignedAt(256)); assert(a.alignedReallocate(b3, 2, 512)); assert(b3.ptr.alignedAt(512)); static if (hasMember!(A, "alignedDeallocate")) { a.alignedDeallocate(b3); } }} else { static assert(!hasMember!(A, "alignedDeallocate")); // This seems to be a bug in the compiler: //static assert(!hasMember!(A, "alignedReallocate"), A.stringof); } static if (hasMember!(A, "allocateAll")) {{ auto aa = make(); if (aa.allocateAll().ptr) { // Can't get any more memory assert(!aa.allocate(1).ptr); } auto ab = make(); const b4 = ab.allocateAll(); assert(b4.length); // Can't get any more memory assert(!ab.allocate(1).ptr); }} static if (hasMember!(A, "expand")) {{ assert(a.expand(b1, 0)); auto len = b1.length; if (a.expand(b1, 102)) { assert(b1.length == len + 102, text(b1.length, " != ", len + 102)); } auto aa = make(); void[] b5 = null; assert(aa.expand(b5, 0)); assert(b5 is null); assert(!aa.expand(b5, 1)); assert(b5.length == 0); }} void[] b6 = null; assert(a.reallocate(b6, 0)); assert(b6.length == 0); assert(a.reallocate(b6, 1)); assert(b6.length == 1, text(b6.length)); assert(a.reallocate(b6, 2)); assert(b6.length == 2); // Test owns static if (hasMember!(A, "owns")) {{ assert(a.owns(null) == Ternary.no); assert(a.owns(b1) == Ternary.yes); assert(a.owns(b2) == Ternary.yes); assert(a.owns(b6) == Ternary.yes); }} static if (hasMember!(A, "resolveInternalPointer")) {{ void[] p; assert(a.resolveInternalPointer(null, p) == Ternary.no); Ternary r = a.resolveInternalPointer(b1.ptr, p); assert(p.ptr is b1.ptr && p.length >= b1.length); r = a.resolveInternalPointer(b1.ptr + b1.length / 2, p); assert(p.ptr is b1.ptr && p.length >= b1.length); r = a.resolveInternalPointer(b2.ptr, p); assert(p.ptr is b2.ptr && p.length >= b2.length); r = a.resolveInternalPointer(b2.ptr + b2.length / 2, p); assert(p.ptr is b2.ptr && p.length >= b2.length); r = a.resolveInternalPointer(b6.ptr, p); assert(p.ptr is b6.ptr && p.length >= b6.length); r = a.resolveInternalPointer(b6.ptr + b6.length / 2, p); assert(p.ptr is b6.ptr && p.length >= b6.length); static int[10] b7 = [ 1, 2, 3 ]; assert(a.resolveInternalPointer(b7.ptr, p) == Ternary.no); assert(a.resolveInternalPointer(b7.ptr + b7.length / 2, p) == Ternary.no); assert(a.resolveInternalPointer(b7.ptr + b7.length, p) == Ternary.no); int[3] b8 = [ 1, 2, 3 ]; assert(a.resolveInternalPointer(b8.ptr, p) == Ternary.no); assert(a.resolveInternalPointer(b8.ptr + b8.length / 2, p) == Ternary.no); assert(a.resolveInternalPointer(b8.ptr + b8.length, p) == Ternary.no); }} } package void testAllocatorObject(RCAllocInterface)(RCAllocInterface a) { // this used to be a template constraint, but moving it inside prevents // unnecessary import of std.experimental.allocator import std.experimental.allocator : RCIAllocator, RCISharedAllocator; static assert(is(RCAllocInterface == RCIAllocator) || is (RCAllocInterface == RCISharedAllocator)); import std.conv : text; import std.math : isPowerOf2; import std.stdio : writeln, stderr; import std.typecons : Ternary; scope(failure) stderr.writeln("testAllocatorObject failed for ", RCAllocInterface.stringof); assert(!a.isNull); // Test alignment assert(a.alignment.isPowerOf2); // Test goodAllocSize assert(a.goodAllocSize(1) >= a.alignment, text(a.goodAllocSize(1), " < ", a.alignment)); assert(a.goodAllocSize(11) >= 11.roundUpToMultipleOf(a.alignment)); assert(a.goodAllocSize(111) >= 111.roundUpToMultipleOf(a.alignment)); // Test empty assert(a.empty != Ternary.no); // Test allocate assert(a.allocate(0) is null); auto b1 = a.allocate(1); assert(b1.length == 1); auto b2 = a.allocate(2); assert(b2.length == 2); assert(b2.ptr + b2.length <= b1.ptr || b1.ptr + b1.length <= b2.ptr); // Test alignedAllocate { // If not implemented it will return null, so those should pass auto b3 = a.alignedAllocate(1, 256); assert(b3.length <= 1); assert(b3.ptr.alignedAt(256)); if (a.alignedReallocate(b3, 1, 256)) { // If it is false, then the wrapped allocator did not implement // this assert(a.alignedReallocate(b3, 2, 512)); assert(b3.ptr.alignedAt(512)); } } // Test allocateAll { auto aa = a.allocateAll(); if (aa.ptr) { // Can't get any more memory assert(!a.allocate(1).ptr); a.deallocate(aa); } const b4 = a.allocateAll(); if (b4.ptr) { // Can't get any more memory assert(!a.allocate(1).ptr); } } // Test expand { assert(a.expand(b1, 0)); auto len = b1.length; if (a.expand(b1, 102)) { assert(b1.length == len + 102, text(b1.length, " != ", len + 102)); } } void[] b6 = null; assert(a.reallocate(b6, 0)); assert(b6.length == 0); assert(a.reallocate(b6, 1)); assert(b6.length == 1, text(b6.length)); assert(a.reallocate(b6, 2)); assert(b6.length == 2); // Test owns { if (a.owns(null) != Ternary.unknown) { assert(a.owns(null) == Ternary.no); assert(a.owns(b1) == Ternary.yes); assert(a.owns(b2) == Ternary.yes); assert(a.owns(b6) == Ternary.yes); } } // Test resolveInternalPointer { void[] p; if (a.resolveInternalPointer(null, p) != Ternary.unknown) { assert(a.resolveInternalPointer(null, p) == Ternary.no); Ternary r = a.resolveInternalPointer(b1.ptr, p); assert(p.ptr is b1.ptr && p.length >= b1.length); r = a.resolveInternalPointer(b1.ptr + b1.length / 2, p); assert(p.ptr is b1.ptr && p.length >= b1.length); r = a.resolveInternalPointer(b2.ptr, p); assert(p.ptr is b2.ptr && p.length >= b2.length); r = a.resolveInternalPointer(b2.ptr + b2.length / 2, p); assert(p.ptr is b2.ptr && p.length >= b2.length); r = a.resolveInternalPointer(b6.ptr, p); assert(p.ptr is b6.ptr && p.length >= b6.length); r = a.resolveInternalPointer(b6.ptr + b6.length / 2, p); assert(p.ptr is b6.ptr && p.length >= b6.length); static int[10] b7 = [ 1, 2, 3 ]; assert(a.resolveInternalPointer(b7.ptr, p) == Ternary.no); assert(a.resolveInternalPointer(b7.ptr + b7.length / 2, p) == Ternary.no); assert(a.resolveInternalPointer(b7.ptr + b7.length, p) == Ternary.no); int[3] b8 = [ 1, 2, 3 ]; assert(a.resolveInternalPointer(b8.ptr, p) == Ternary.no); assert(a.resolveInternalPointer(b8.ptr + b8.length / 2, p) == Ternary.no); assert(a.resolveInternalPointer(b8.ptr + b8.length, p) == Ternary.no); } } // Test deallocateAll { if (a.deallocateAll()) { if (a.empty != Ternary.unknown) { assert(a.empty == Ternary.yes); } } } } } /* Basically the `is` operator, but handles static arrays for which `is` is deprecated. For use in CTFE. */ private bool bitwiseIdentical(T)(T a, T b) { static if (isStaticArray!T) { foreach (i, e; a) { if (!.bitwiseIdentical(e, b[i])) return false; } return true; } else return a is b; } @nogc nothrow pure @safe unittest { import std.meta : AliasSeq; static struct NeverEq { int x; bool opEquals(NeverEq other) const { return false; } } static struct AlwaysEq { int x; bool opEquals(AlwaysEq other) const { return true; } } static foreach (x; AliasSeq!(-1, 0, 1, 2, "foo", NeverEq(0))) { assert(bitwiseIdentical(x, x)); static assert(bitwiseIdentical(x, x)); } static foreach (pair; AliasSeq!([0, 1], [-1, 1], [2, 3], ["foo", "bar"], [AlwaysEq(0), AlwaysEq(1)])) { assert(!bitwiseIdentical(pair[0], pair[1])); static assert(!bitwiseIdentical(pair[0], pair[1])); } { int[2][2][2] x = [[[1, 2], [3, 4]], [[5, 6], [7, 8]]]; int[2][2][2] y = [[[1, 2], [3, 4]], [[5, 6], [7, 8]]]; assert(bitwiseIdentical(x, y)); } { enum int[2][2][2] x = [[[1, 2], [3, 4]], [[5, 6], [7, 8]]]; enum int[2][2][2] y = [[[1, 2], [3, 4]], [[5, 6], [7, 8]]]; static assert(bitwiseIdentical(x, y)); } } /+ Can the representation be determined at compile time to consist of nothing but zero bits? Padding between a struct's fields is not considered. +/ private template isAllZeroBits(T, T value) { static if (isDynamicArray!(typeof(value))) enum isAllZeroBits = value is null && value.length == 0; else static if (is(typeof(value is null))) enum isAllZeroBits = value is null; else static if (is(typeof(value is 0))) enum isAllZeroBits = value is 0; else static if (isStaticArray!(typeof(value))) enum isAllZeroBits = () { static if (value.length == 0) return true; else static if (.isAllZeroBits!(typeof(value[0]), value[0])) { foreach (e; value[1 .. $]) { if (!bitwiseIdentical(e, value[0])) return false; } return true; } else return false; }(); else static if (is(typeof(value) == struct) || is(typeof(value) == union)) enum isAllZeroBits = () { bool b = true; static foreach (e; value.tupleof) { b &= isAllZeroBits!(typeof(e), e); if (b == false) return b; } return b; }(); else enum isAllZeroBits = false; } @nogc nothrow pure @safe unittest { import std.meta : AliasSeq; static foreach (Int; AliasSeq!(bool, char, wchar, dchar, byte, ubyte, short, ushort, int, uint, long, ulong)) { static assert(isAllZeroBits!(Int, Int(0))); static assert(!isAllZeroBits!(Int, Int(1))); } foreach (Float; AliasSeq!(float, double, real)) { assert(isAllZeroBits!(Float, 0.0)); assert(!isAllZeroBits!(Float, -0.0)); assert(!isAllZeroBits!(Float, Float.nan)); } static assert(isAllZeroBits!(void*, null)); static assert(isAllZeroBits!(int*, null)); static assert(isAllZeroBits!(Object, null)); } @nogc nothrow pure @safe unittest // large static arrays { import std.meta : Repeat; enum n = 16 * 1024; static assert(isAllZeroBits!(ubyte[n], (ubyte[n]).init)); static assert(!isAllZeroBits!(ubyte[n], [Repeat!(n, 1)])); static assert(!isAllZeroBits!(ubyte[n], [1, Repeat!(n - 1, 0)])); static assert(!isAllZeroBits!(ubyte[n], [Repeat!(n - 1, 0), 1])); static assert(!isAllZeroBits!(char[n], (char[n]).init)); static assert(isAllZeroBits!(char[n], [Repeat!(n, 0)])); } @nogc nothrow pure @safe unittest // nested static arrays { static assert(isAllZeroBits!(int[2][2], [[0, 0], [0, 0]])); static assert(!isAllZeroBits!(int[2][2], [[0, 0], [1, 0]])); } @nogc nothrow pure @safe unittest // funky opEquals { static struct AlwaysEq { int x; bool opEquals(AlwaysEq other) const { return true; } } static assert(AlwaysEq(0) == AlwaysEq(0)); static assert(AlwaysEq(0) == AlwaysEq(1)); static assert(isAllZeroBits!(AlwaysEq, AlwaysEq(0))); static assert(!isAllZeroBits!(AlwaysEq, AlwaysEq(1))); static assert(isAllZeroBits!(AlwaysEq[1], [AlwaysEq(0)])); static assert(!isAllZeroBits!(AlwaysEq[2], [AlwaysEq(0), AlwaysEq(1)])); static struct NeverEq { int x; bool opEquals(NeverEq other) const { return false; } } static assert(NeverEq(0) != NeverEq(1)); static assert(NeverEq(0) != NeverEq(0)); static assert(isAllZeroBits!(NeverEq, NeverEq(0))); static assert(!isAllZeroBits!(NeverEq, NeverEq(1))); static assert(isAllZeroBits!(NeverEq[1], [NeverEq(0)])); static assert(!isAllZeroBits!(NeverEq[2], [NeverEq(0), NeverEq(1)])); } /+ Is the representation of T.init known at compile time to consist of nothing but zero bits? Padding between a struct's fields is not considered. +/ package template isInitAllZeroBits(T) { static if (isStaticArray!T && __traits(compiles, T.init[0])) enum isInitAllZeroBits = __traits(compiles, { static assert(isAllZeroBits!(typeof(T.init[0]), T.init[0])); }); else enum isInitAllZeroBits = __traits(compiles, { static assert(isAllZeroBits!(T, T.init)); }); } @nogc nothrow pure @safe unittest { static assert(isInitAllZeroBits!(Object)); static assert(isInitAllZeroBits!(void*)); static assert(isInitAllZeroBits!uint); static assert(isInitAllZeroBits!(uint[2])); static assert(!isInitAllZeroBits!float); static assert(isInitAllZeroBits!(float[0])); static assert(!isInitAllZeroBits!(float[2])); static struct S1 { int a; } static assert(isInitAllZeroBits!S1); static struct S2 { int a = 1; } static assert(!isInitAllZeroBits!S2); static struct S3 { S1 a; int b; } static assert(isInitAllZeroBits!S3); static assert(isInitAllZeroBits!(S3[2])); static struct S4 { S1 a; S2 b; } static assert(!isInitAllZeroBits!S4); static struct S5 { real r = 0; } static assert(isInitAllZeroBits!S5); static struct S6 { } static assert(isInitAllZeroBits!S6); static struct S7 { float[0] a; } static assert(isInitAllZeroBits!S7); static class C1 { int a = 1; } static assert(isInitAllZeroBits!C1); // Ensure Tuple can be read. import std.typecons : Tuple; static assert(isInitAllZeroBits!(Tuple!(int, int))); static assert(!isInitAllZeroBits!(Tuple!(float, float))); // Ensure private fields of structs from other modules // are taken into account. import std.random : Mt19937; static assert(!isInitAllZeroBits!Mt19937); // Check that it works with const. static assert(isInitAllZeroBits!(const(Mt19937)) == isInitAllZeroBits!Mt19937); static assert(isInitAllZeroBits!(const(S5)) == isInitAllZeroBits!S5); } /+ Can the representation be determined at compile time to consist of nothing but 1 bits? This is reported as $(B false) for structs with padding between their fields because `opEquals` and hashing may rely on those bits being zero. Note: A bool occupies 8 bits so `isAllOneBits!(bool, true) == false` See_Also: https://forum.dlang.org/post/hn11oh$1usk$1@digitalmars.com +/ private template isAllOneBits(T, T value) { static if (isIntegral!T || isSomeChar!T) { import core.bitop : popcnt; static if (T.min < T(0)) enum isAllOneBits = popcnt(cast(Unsigned!T) value) == T.sizeof * 8; else enum isAllOneBits = popcnt(value) == T.sizeof * 8; } else static if (isStaticArray!(typeof(value))) { enum isAllOneBits = () { bool b = true; // Use index so this works when T.length is 0. static foreach (i; 0 .. T.length) { b &= isAllOneBits!(typeof(value[i]), value[i]); if (b == false) return b; } return b; }(); } else static if (is(typeof(value) == struct)) { enum isAllOneBits = () { bool b = true; size_t fieldSizeSum = 0; static foreach (e; value.tupleof) { b &= isAllOneBits!(typeof(e), e); if (b == false) return b; fieldSizeSum += typeof(e).sizeof; } // If fieldSizeSum == T.sizeof then there can be no gaps // between fields. return b && fieldSizeSum == T.sizeof; }(); } else { enum isAllOneBits = false; } } // If `isAllOneBits` becomes public document this unittest. @nogc nothrow pure @safe unittest { static assert(isAllOneBits!(char, 0xff)); static assert(isAllOneBits!(wchar, 0xffff)); static assert(isAllOneBits!(byte, cast(byte) 0xff)); static assert(isAllOneBits!(int, 0xffff_ffff)); static assert(isAllOneBits!(char[4], [0xff, 0xff, 0xff, 0xff])); static assert(!isAllOneBits!(bool, true)); static assert(!isAllOneBits!(wchar, 0xff)); static assert(!isAllOneBits!(Object, Object.init)); } // Don't document this unittest. @nogc nothrow pure @safe unittest { import std.meta : AliasSeq; foreach (Int; AliasSeq!(char, wchar, byte, ubyte, short, ushort, int, uint, long, ulong)) { static assert(isAllOneBits!(Int, cast(Int) 0xffff_ffff_ffff_ffffUL)); static assert(!isAllOneBits!(Int, Int(1))); static if (Int.sizeof > 1) static assert(!isAllOneBits!(Int, cast(Int) 0xff)); } static assert(!isAllOneBits!(dchar, 0xffff)); } /+ Can the representation be determined at compile time to consist of nothing but 1 bits? This is reported as $(B false) for structs with padding between their fields because `opEquals` and hashing may rely on those bits being zero. See_Also: https://forum.dlang.org/post/hn11oh$1usk$1@digitalmars.com +/ package template isInitAllOneBits(T) { static if (isStaticArray!T && __traits(compiles, T.init[0])) enum isInitAllOneBits = __traits(compiles, { static assert(isAllOneBits!(typeof(T.init[0]), T.init[0])); }); else enum isInitAllOneBits = __traits(compiles, { static assert(isAllOneBits!(T, T.init)); }); } @nogc nothrow pure @safe unittest { static assert(isInitAllOneBits!char); static assert(isInitAllOneBits!wchar); static assert(!isInitAllOneBits!dchar); static assert(isInitAllOneBits!(char[4])); static assert(!isInitAllOneBits!(int[4])); static assert(!isInitAllOneBits!Object); static struct S1 { char a; char b; } static assert(isInitAllOneBits!S1); static struct S2 { char a = 1; } static assert(!isInitAllOneBits!S2); static struct S3 { S1 a; char b; } static assert(isInitAllOneBits!S3); static assert(isInitAllOneBits!(S3[2])); static struct S4 { S1 a; S2 b; } static assert(!isInitAllOneBits!S4); static struct S5 { int r = 0xffff_ffff; } static assert(isInitAllOneBits!S5); // Verify that when there is padding between fields isInitAllOneBits is false. static struct S6 { align(4) char a; align(4) char b; } static assert(!isInitAllOneBits!S6); static class C1 { char c; } static assert(!isInitAllOneBits!C1); }
D
module perfontain.shader.defineprocessor; import std.stdio, std.array, std.range, std.regex, std.string, std.algorithm, std.functional, pegged.grammar, perfontain, perfontain.shader.grammar; struct DefineProcessor { auto process(string n) { string[string] res; auto arr = dataOf(n); alias pred = a => a.name == `EXGL.Shader`; foreach(ref p; arr.filter!pred) { auto old = defs.dup; auto t = p.matches.front; defs[t.toUpper ~ `_SHADER`] = null; res[t] = entab(chain(arr.filter!(not!pred), p.children), false); defs = old; } return res; } string[string] defs; private: static dataOf(string n) { if(auto p = n in _shaders) { return *p; } auto r = EXGL(cast(string)PEfs.get(`data/shader/` ~ n ~ `.c`)); r.successful || throwError(`shader %s - %s`, n, r.failMsg); return _shaders[n] = r.children.front.children; } auto entab(R)(R r, bool tab) { return r .map!(a => gen(a)) .join("\n") .splitLines .filter!(a => a.length) .map!(a => (tab ? "\t" : null) ~ a) .join("\n"); } auto expand(string s) { while(true) { auto n = s; defs .byKeyValue .array .sort!((a, b) => a.key.length > b.key.length) .each!(a => n = n.replace(a.key, a.value)); if(n == s) { break; } s = n; } return s; } string gen(ref in ParseTree p, bool tab = true) { switch(p.name) { case `EXGL.Cond`: auto r = !!(p.children.front.matches.front in defs) ^ (p.matches.front == `!`); if(r) { return gen(p.children[1], false); } else if(p.children.length > 2) { return gen(p.children.back, false); } break; case `EXGL.Vsfs`: auto v = !!(`VERTEX_SHADER` in defs); auto s = p.matches.front, d = gen(p.children.front), n = p.matches.back; return format("%s %s\n{\n%s\n} %s;", v ? `out` : `in`, s, d, n); case `EXGL.Import`: return entab(dataOf(p.matches.front), false); case `EXGL.Block`: return entab(p.children, tab); case `EXGL.Data`: return expand(p.matches.front); case `EXGL.Define`: defs[p.matches.front] = null; break; case `EXGL.Assign`: auto n = p.matches.front; auto v = p.matches[1] == `+` ? defs.get(n, null) : null; defs[n] = v ~ p.matches.back; break; case `EXGL.Name`: return expand(defs.get(p.matches.front, null)); default: assert(false, p.name); } return null; } __gshared ParseTree[][string] _shaders; }
D
instance VLK_419_Buerger(Npc_Default) { name[0] = NAME_Buerger; guild = GIL_VLK; id = 419; voice = 1; flags = 0; npcType = NPCTYPE_AMBIENT; B_SetAttributesToChapter(self,1); aivar[AIV_MM_RestStart] = TRUE; level = 1; fight_tactic = FAI_HUMAN_COWARD; EquipItem(self,ItMw_1h_Vlk_Mace); B_CreateAmbientInv(self); B_SetNpcVisual(self,MALE,"Hum_Head_FatBald.",Face_N_NormalBart_Graham,BodyTex_N,ITAR_Vlk_H); Mdl_SetModelFatness(self,1); Mdl_ApplyOverlayMds(self,"Humans_Arrogance.mds"); B_GiveNpcTalents(self); B_SetFightSkills(self,35); daily_routine = Rtn_Start_419; }; func void Rtn_Start_419() { TA_Stand_Drinking(11,0,12,30,"NW_CITY_UPTOWN_HUT_02_ENTRY"); TA_Stand_Eating(12,30,15,0,"NW_CITY_UPTOWN_PATH_17"); TA_Sit_Bench(15,0,18,0,"NW_CITY_UPTOWN_PATH_23"); TA_Stand_Drinking(18,0,20,0,"NW_CITY_UPTOWN_PATH_17"); TA_Sit_Bench(20,0,11,0,"NW_CITY_UPTOWN_PATH_23"); };
D
/* * Hunt - a framework for web and console application based on Collie using Dlang development * * Copyright (C) 2015-2016 Shanghai Putao Technology Co., Ltd * * Developer: putao's Dlang team * * Licensed under the BSD License. * */ module hunt.web.application; public import std.socket; public import std.experimental.logger; import std.uni; import collie.bootstrap.server; import collie.bootstrap.serversslconfig; public import collie.socket.eventloop; public import collie.socket.eventloopgroup; public import collie.channel; public import collie.codec.http.config; import collie.codec.http; public import hunt.web.router; public import hunt.web.http; alias HTTPPipeline = Pipeline!(ubyte[], HTTPResponse); /** */ final class WebApplication { /// default Constructor this() { this(new EventLoop()); } /** Constructor, Set the default EventLoop. Params: loop = the default EventLoop */ this(EventLoop loop) { _router = new HTTPRouterGroup(); _404 = &default404; _server = new ServerBootstrap!HTTPPipeline(loop); _server.childPipeline(new shared HTTPPipelineFactory(this)); _config = new HTTPConfig(); _server.setReusePort(true); _server.heartbeatTimeOut(30); } auto keepAliveTimeOut(uint second) { _server.heartbeatTimeOut(second); return this; } /** Config the Apolication's Router . Params: config = the Config Class. */ WebApplication setRouterConfig(RouterConfigBase config) { setRouterConfigHelper!("__CALLACTION__",IController,HTTPRouterGroup) (_router,config); return this; } /** Add a Router rule Params: domain = the rule's domain group. method = the HTTP method. path = the request path. handle = the delegate that handle the request. before = The PipelineFactory that create the middleware list for the router rules, before the router rule's handled execute. after = The PipelineFactory that create the middleware list for the router rules, after the router rule's handled execute. */ WebApplication addRouter(string domain, string method, string path, DOHandler handle, shared RouterPipelineFactory before = null, shared RouterPipelineFactory after = null) { method = toUpper(method); router.addRouter(domain,method,path,handle,before,after); return this; } /** Add a Router rule Params: method = the HTTP method. path = the request path. handle = the delegate that handle the request. before = The PipelineFactory that create the middleware list for the router rules, before the router rule's handled execute. after = The PipelineFactory that create the middleware list for the router rules, after the router rule's handled execute. */ WebApplication addRouter(string method, string path, DOHandler handle, shared RouterPipelineFactory before = null, shared RouterPipelineFactory after = null) { method = toUpper(method); router.addRouter(method,path,handle,before,after); return this; } /** Set The PipelineFactory that create the middleware list for all router rules, before the router rule's handled execute. */ WebApplication setGlobalBeforePipelineFactory(shared RouterPipelineFactory before) { router.setGlobalBeforePipelineFactory(before); return this; } /** Set The PipelineFactory that create the middleware list for all router rules, after the router rule's handled execute. */ WebApplication setGlobalAfterPipelineFactory(shared RouterPipelineFactory after) { router.setGlobalAfterPipelineFactory(after); return this; } /** Set The delegate that handle 404,when the router don't math the rule. */ WebApplication setNoFoundHandler(DOHandler nofound) in { assert(nofound !is null); } body { _404 = nofound; return this; } /// get the router. @property router() { return _router; } /** set the ssl config. if you set and the config is not null, the Application will used https. */ WebApplication setSSLConfig(ServerSSLConfig config) { _server.setSSLConfig(config); return this; } /** Set the EventLoopGroup to used the multi-thread. */ WebApplication group(EventLoopGroup group) { _server.group(group); return this; } /** Set the accept Pipeline. See_Also: collie.bootstrap.server.ServerBootstrap pipeline */ WebApplication pipeline(shared AcceptPipelineFactory factory) { _server.pipeline(factory); return this; } /** Set the bind address. */ WebApplication bind(Address addr) { _server.bind(addr); return this; } /** Set the bind port, the ip address will be all. */ WebApplication bind(ushort port) { _server.bind(port); return this; } /** Set the bind address. */ WebApplication bind(string ip, ushort port) { _server.bind(ip,port); return this; } /** Set the Http config. See_Also: collie.codec.http.config.HTTPConfig */ @property httpConfig(HTTPConfig config) { _config = config; } /// get the http config. @property httpConfig(){return _config;} /// set the HTTPConfig maxBodySize. WebApplication maxBodySize(uint size) { _config.maxBodySize = size; return this; } /// set the HTTPConfig maxHeaderSize. WebApplication maxHeaderSize(uint size) { _config.maxHeaderSize = size; return this; } /// set the HTTPConfig headerStectionSize. WebApplication headerStectionSize(uint size) { _config.headerStectionSize = size; return this; } /// set the HTTPConfig requestBodyStectionSize. WebApplication requestBodyStectionSize(uint size) { _config.requestBodyStectionSize = size; return this; } /// set the HTTPConfig responseBodyStectionSize. WebApplication responseBodyStectionSize(uint size) { _config.responseBodyStectionSize = size; return this; } /** Start the WebApplication server , and block current thread. */ void run() { router.done(); _server.waitForStop(); } /** Stop the server. */ void stop() { _server.stop(); } private: /// math the router and start handle the middleware and handle. static void doHandle(WebApplication app,Request req, Response res) { trace("macth router : method: ", req.Header.methodString, " path : ",req.Header.path, " host: ", req.Header.host); RouterPipeline pipe = null; pipe = app.router.match(req.Header.host,req.Header.methodString, req.Header.path); if (pipe is null) { app._404(req, res); } else { scope(exit) { import core.memory; pipe.destroy; GC.free(cast(void *)pipe); } if(pipe.matchData().length > 0) { pipe.swapMatchData(req.materef()); } pipe.handleActive(req, res); } } /// the default handle when the router rule don't match. void default404(Request req, Response res) { res.Header.statusCode = 404; res.setContext("No Found"); res.done(); } private: HTTPRouterGroup _router; DOHandler _404; ServerBootstrap!HTTPPipeline _server; HTTPConfig _config; } private: class HttpServer : HTTPHandler { this(shared WebApplication app) { _app = app; } override void requestHandle(HTTPRequest req, HTTPResponse rep) { auto request = new Request(req); auto response = new Response(rep); _app.doHandle(cast(WebApplication)_app,request, response); } override WebSocket newWebSocket(const HTTPHeader header) { return null; } override @property HTTPConfig config() { return cast(HTTPConfig)(_app._config); } private: shared WebApplication _app; } class HTTPPipelineFactory : PipelineFactory!HTTPPipeline { import collie.socket.tcpsocket; this(WebApplication app) { _app = cast(shared WebApplication)app; } override HTTPPipeline newPipeline(TCPSocket sock) { auto pipeline = HTTPPipeline.create(); pipeline.addBack(new TCPSocketHandler(sock)); pipeline.addBack(new HttpServer(_app)); pipeline.finalize(); return pipeline; } private: WebApplication _app; } /*class EchoWebSocket : WebSocket { override void onClose() { writeln("websocket closed"); } override void onTextFrame(Frame frame) { writeln("get a text frame, is finna : ", frame.isFinalFrame, " data is :", cast(string)frame.data); sendText("456789"); // sendBinary(cast(ubyte[])"456123"); // ping(cast(ubyte[])"123"); } override void onPongFrame(Frame frame) { writeln("get a text frame, is finna : ", frame.isFinalFrame, " data is :", cast(string)frame.data); } override void onBinaryFrame(Frame frame) { writeln("get a text frame, is finna : ", frame.isFinalFrame, " data is :", cast(string)frame.data); } } */
D
/home/gambl3r/Rust/telegrambotdev/BotDev/target/debug/deps/string-2a2b67e163c8ebc3.rmeta: /home/gambl3r/.cargo/registry/src/github.com-1ecc6299db9ec823/string-0.2.1/src/lib.rs /home/gambl3r/Rust/telegrambotdev/BotDev/target/debug/deps/libstring-2a2b67e163c8ebc3.rlib: /home/gambl3r/.cargo/registry/src/github.com-1ecc6299db9ec823/string-0.2.1/src/lib.rs /home/gambl3r/Rust/telegrambotdev/BotDev/target/debug/deps/string-2a2b67e163c8ebc3.d: /home/gambl3r/.cargo/registry/src/github.com-1ecc6299db9ec823/string-0.2.1/src/lib.rs /home/gambl3r/.cargo/registry/src/github.com-1ecc6299db9ec823/string-0.2.1/src/lib.rs:
D
/Users/Zhongli/Desktop/NewsDemo/DerivedData/NewsDemo/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/SnapKit.build/Objects-normal/x86_64/ConstraintMakerEditable.o : /Users/Zhongli/Desktop/NewsDemo/Pods/SnapKit/Source/ConstraintLayoutGuideDSL.swift /Users/Zhongli/Desktop/NewsDemo/Pods/SnapKit/Source/ConstraintDSL.swift /Users/Zhongli/Desktop/NewsDemo/Pods/SnapKit/Source/ConstraintLayoutSupportDSL.swift /Users/Zhongli/Desktop/NewsDemo/Pods/SnapKit/Source/ConstraintViewDSL.swift /Users/Zhongli/Desktop/NewsDemo/Pods/SnapKit/Source/ConstraintLayoutGuide.swift /Users/Zhongli/Desktop/NewsDemo/Pods/SnapKit/Source/ConstraintMakerExtendable.swift /Users/Zhongli/Desktop/NewsDemo/Pods/SnapKit/Source/ConstraintMakerRelatable.swift /Users/Zhongli/Desktop/NewsDemo/Pods/SnapKit/Source/ConstraintMakerEditable.swift /Users/Zhongli/Desktop/NewsDemo/Pods/SnapKit/Source/ConstraintMakerFinalizable.swift /Users/Zhongli/Desktop/NewsDemo/Pods/SnapKit/Source/ConstraintMakerPriortizable.swift /Users/Zhongli/Desktop/NewsDemo/Pods/SnapKit/Source/ConstraintConfig.swift /Users/Zhongli/Desktop/NewsDemo/Pods/SnapKit/Source/Debugging.swift /Users/Zhongli/Desktop/NewsDemo/Pods/SnapKit/Source/ConstraintItem.swift /Users/Zhongli/Desktop/NewsDemo/Pods/SnapKit/Source/LayoutConstraintItem.swift /Users/Zhongli/Desktop/NewsDemo/Pods/SnapKit/Source/ConstraintRelation.swift /Users/Zhongli/Desktop/NewsDemo/Pods/SnapKit/Source/ConstraintDescription.swift /Users/Zhongli/Desktop/NewsDemo/Pods/SnapKit/Source/ConstraintMaker.swift /Users/Zhongli/Desktop/NewsDemo/Pods/SnapKit/Source/Typealiases.swift /Users/Zhongli/Desktop/NewsDemo/Pods/SnapKit/Source/ConstraintAttributes.swift /Users/Zhongli/Desktop/NewsDemo/Pods/SnapKit/Source/ConstraintLayoutGuide+Extensions.swift /Users/Zhongli/Desktop/NewsDemo/Pods/SnapKit/Source/UILayoutSupport+Extensions.swift /Users/Zhongli/Desktop/NewsDemo/Pods/SnapKit/Source/ConstraintView+Extensions.swift /Users/Zhongli/Desktop/NewsDemo/Pods/SnapKit/Source/ConstraintInsets.swift /Users/Zhongli/Desktop/NewsDemo/Pods/SnapKit/Source/ConstraintRelatableTarget.swift /Users/Zhongli/Desktop/NewsDemo/Pods/SnapKit/Source/ConstraintMultiplierTarget.swift /Users/Zhongli/Desktop/NewsDemo/Pods/SnapKit/Source/ConstraintOffsetTarget.swift /Users/Zhongli/Desktop/NewsDemo/Pods/SnapKit/Source/ConstraintInsetTarget.swift /Users/Zhongli/Desktop/NewsDemo/Pods/SnapKit/Source/ConstraintConstantTarget.swift /Users/Zhongli/Desktop/NewsDemo/Pods/SnapKit/Source/ConstraintPriorityTarget.swift /Users/Zhongli/Desktop/NewsDemo/Pods/SnapKit/Source/Constraint.swift /Users/Zhongli/Desktop/NewsDemo/Pods/SnapKit/Source/LayoutConstraint.swift /Users/Zhongli/Desktop/NewsDemo/Pods/SnapKit/Source/ConstraintLayoutSupport.swift /Users/Zhongli/Desktop/NewsDemo/Pods/SnapKit/Source/ConstraintView.swift /Users/Zhongli/Desktop/NewsDemo/Pods/SnapKit/Source/ConstraintPriority.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.apinotesc /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/ObjectiveC.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreImage.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/QuartzCore.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Metal.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreFoundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreGraphics.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/UIKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/SwiftOnoneSupport.swiftmodule /Users/Zhongli/Desktop/NewsDemo/Pods/Target\ Support\ Files/SnapKit/SnapKit-umbrella.h /Users/Zhongli/Desktop/NewsDemo/DerivedData/NewsDemo/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/SnapKit.build/unextended-module.modulemap /Users/Zhongli/Desktop/NewsDemo/DerivedData/NewsDemo/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/SnapKit.build/Objects-normal/x86_64/ConstraintMakerEditable~partial.swiftmodule : /Users/Zhongli/Desktop/NewsDemo/Pods/SnapKit/Source/ConstraintLayoutGuideDSL.swift /Users/Zhongli/Desktop/NewsDemo/Pods/SnapKit/Source/ConstraintDSL.swift /Users/Zhongli/Desktop/NewsDemo/Pods/SnapKit/Source/ConstraintLayoutSupportDSL.swift /Users/Zhongli/Desktop/NewsDemo/Pods/SnapKit/Source/ConstraintViewDSL.swift /Users/Zhongli/Desktop/NewsDemo/Pods/SnapKit/Source/ConstraintLayoutGuide.swift /Users/Zhongli/Desktop/NewsDemo/Pods/SnapKit/Source/ConstraintMakerExtendable.swift /Users/Zhongli/Desktop/NewsDemo/Pods/SnapKit/Source/ConstraintMakerRelatable.swift /Users/Zhongli/Desktop/NewsDemo/Pods/SnapKit/Source/ConstraintMakerEditable.swift /Users/Zhongli/Desktop/NewsDemo/Pods/SnapKit/Source/ConstraintMakerFinalizable.swift /Users/Zhongli/Desktop/NewsDemo/Pods/SnapKit/Source/ConstraintMakerPriortizable.swift /Users/Zhongli/Desktop/NewsDemo/Pods/SnapKit/Source/ConstraintConfig.swift /Users/Zhongli/Desktop/NewsDemo/Pods/SnapKit/Source/Debugging.swift /Users/Zhongli/Desktop/NewsDemo/Pods/SnapKit/Source/ConstraintItem.swift /Users/Zhongli/Desktop/NewsDemo/Pods/SnapKit/Source/LayoutConstraintItem.swift /Users/Zhongli/Desktop/NewsDemo/Pods/SnapKit/Source/ConstraintRelation.swift /Users/Zhongli/Desktop/NewsDemo/Pods/SnapKit/Source/ConstraintDescription.swift /Users/Zhongli/Desktop/NewsDemo/Pods/SnapKit/Source/ConstraintMaker.swift /Users/Zhongli/Desktop/NewsDemo/Pods/SnapKit/Source/Typealiases.swift /Users/Zhongli/Desktop/NewsDemo/Pods/SnapKit/Source/ConstraintAttributes.swift /Users/Zhongli/Desktop/NewsDemo/Pods/SnapKit/Source/ConstraintLayoutGuide+Extensions.swift /Users/Zhongli/Desktop/NewsDemo/Pods/SnapKit/Source/UILayoutSupport+Extensions.swift /Users/Zhongli/Desktop/NewsDemo/Pods/SnapKit/Source/ConstraintView+Extensions.swift /Users/Zhongli/Desktop/NewsDemo/Pods/SnapKit/Source/ConstraintInsets.swift /Users/Zhongli/Desktop/NewsDemo/Pods/SnapKit/Source/ConstraintRelatableTarget.swift /Users/Zhongli/Desktop/NewsDemo/Pods/SnapKit/Source/ConstraintMultiplierTarget.swift /Users/Zhongli/Desktop/NewsDemo/Pods/SnapKit/Source/ConstraintOffsetTarget.swift /Users/Zhongli/Desktop/NewsDemo/Pods/SnapKit/Source/ConstraintInsetTarget.swift /Users/Zhongli/Desktop/NewsDemo/Pods/SnapKit/Source/ConstraintConstantTarget.swift /Users/Zhongli/Desktop/NewsDemo/Pods/SnapKit/Source/ConstraintPriorityTarget.swift /Users/Zhongli/Desktop/NewsDemo/Pods/SnapKit/Source/Constraint.swift /Users/Zhongli/Desktop/NewsDemo/Pods/SnapKit/Source/LayoutConstraint.swift /Users/Zhongli/Desktop/NewsDemo/Pods/SnapKit/Source/ConstraintLayoutSupport.swift /Users/Zhongli/Desktop/NewsDemo/Pods/SnapKit/Source/ConstraintView.swift /Users/Zhongli/Desktop/NewsDemo/Pods/SnapKit/Source/ConstraintPriority.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.apinotesc /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/ObjectiveC.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreImage.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/QuartzCore.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Metal.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreFoundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreGraphics.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/UIKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/SwiftOnoneSupport.swiftmodule /Users/Zhongli/Desktop/NewsDemo/Pods/Target\ Support\ Files/SnapKit/SnapKit-umbrella.h /Users/Zhongli/Desktop/NewsDemo/DerivedData/NewsDemo/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/SnapKit.build/unextended-module.modulemap /Users/Zhongli/Desktop/NewsDemo/DerivedData/NewsDemo/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/SnapKit.build/Objects-normal/x86_64/ConstraintMakerEditable~partial.swiftdoc : /Users/Zhongli/Desktop/NewsDemo/Pods/SnapKit/Source/ConstraintLayoutGuideDSL.swift /Users/Zhongli/Desktop/NewsDemo/Pods/SnapKit/Source/ConstraintDSL.swift /Users/Zhongli/Desktop/NewsDemo/Pods/SnapKit/Source/ConstraintLayoutSupportDSL.swift /Users/Zhongli/Desktop/NewsDemo/Pods/SnapKit/Source/ConstraintViewDSL.swift /Users/Zhongli/Desktop/NewsDemo/Pods/SnapKit/Source/ConstraintLayoutGuide.swift /Users/Zhongli/Desktop/NewsDemo/Pods/SnapKit/Source/ConstraintMakerExtendable.swift /Users/Zhongli/Desktop/NewsDemo/Pods/SnapKit/Source/ConstraintMakerRelatable.swift /Users/Zhongli/Desktop/NewsDemo/Pods/SnapKit/Source/ConstraintMakerEditable.swift /Users/Zhongli/Desktop/NewsDemo/Pods/SnapKit/Source/ConstraintMakerFinalizable.swift /Users/Zhongli/Desktop/NewsDemo/Pods/SnapKit/Source/ConstraintMakerPriortizable.swift /Users/Zhongli/Desktop/NewsDemo/Pods/SnapKit/Source/ConstraintConfig.swift /Users/Zhongli/Desktop/NewsDemo/Pods/SnapKit/Source/Debugging.swift /Users/Zhongli/Desktop/NewsDemo/Pods/SnapKit/Source/ConstraintItem.swift /Users/Zhongli/Desktop/NewsDemo/Pods/SnapKit/Source/LayoutConstraintItem.swift /Users/Zhongli/Desktop/NewsDemo/Pods/SnapKit/Source/ConstraintRelation.swift /Users/Zhongli/Desktop/NewsDemo/Pods/SnapKit/Source/ConstraintDescription.swift /Users/Zhongli/Desktop/NewsDemo/Pods/SnapKit/Source/ConstraintMaker.swift /Users/Zhongli/Desktop/NewsDemo/Pods/SnapKit/Source/Typealiases.swift /Users/Zhongli/Desktop/NewsDemo/Pods/SnapKit/Source/ConstraintAttributes.swift /Users/Zhongli/Desktop/NewsDemo/Pods/SnapKit/Source/ConstraintLayoutGuide+Extensions.swift /Users/Zhongli/Desktop/NewsDemo/Pods/SnapKit/Source/UILayoutSupport+Extensions.swift /Users/Zhongli/Desktop/NewsDemo/Pods/SnapKit/Source/ConstraintView+Extensions.swift /Users/Zhongli/Desktop/NewsDemo/Pods/SnapKit/Source/ConstraintInsets.swift /Users/Zhongli/Desktop/NewsDemo/Pods/SnapKit/Source/ConstraintRelatableTarget.swift /Users/Zhongli/Desktop/NewsDemo/Pods/SnapKit/Source/ConstraintMultiplierTarget.swift /Users/Zhongli/Desktop/NewsDemo/Pods/SnapKit/Source/ConstraintOffsetTarget.swift /Users/Zhongli/Desktop/NewsDemo/Pods/SnapKit/Source/ConstraintInsetTarget.swift /Users/Zhongli/Desktop/NewsDemo/Pods/SnapKit/Source/ConstraintConstantTarget.swift /Users/Zhongli/Desktop/NewsDemo/Pods/SnapKit/Source/ConstraintPriorityTarget.swift /Users/Zhongli/Desktop/NewsDemo/Pods/SnapKit/Source/Constraint.swift /Users/Zhongli/Desktop/NewsDemo/Pods/SnapKit/Source/LayoutConstraint.swift /Users/Zhongli/Desktop/NewsDemo/Pods/SnapKit/Source/ConstraintLayoutSupport.swift /Users/Zhongli/Desktop/NewsDemo/Pods/SnapKit/Source/ConstraintView.swift /Users/Zhongli/Desktop/NewsDemo/Pods/SnapKit/Source/ConstraintPriority.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.apinotesc /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/ObjectiveC.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreImage.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/QuartzCore.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Metal.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreFoundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreGraphics.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/UIKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/SwiftOnoneSupport.swiftmodule /Users/Zhongli/Desktop/NewsDemo/Pods/Target\ Support\ Files/SnapKit/SnapKit-umbrella.h /Users/Zhongli/Desktop/NewsDemo/DerivedData/NewsDemo/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/SnapKit.build/unextended-module.modulemap
D
/Users/petercernak/vapor/TILApp/Build/Intermediates.noindex/TILApp.build/Debug/Bits.build/Objects-normal/x86_64/ByteBuffer+binaryFloatingPointOperations.o : /Users/petercernak/vapor/TILApp/.build/checkouts/core.git-5591983016255515332/Sources/Bits/Deprecated.swift /Users/petercernak/vapor/TILApp/.build/checkouts/core.git-5591983016255515332/Sources/Bits/ByteBuffer+require.swift /Users/petercernak/vapor/TILApp/.build/checkouts/core.git-5591983016255515332/Sources/Bits/ByteBuffer+string.swift /Users/petercernak/vapor/TILApp/.build/checkouts/core.git-5591983016255515332/Sources/Bits/ByteBuffer+peek.swift /Users/petercernak/vapor/TILApp/.build/checkouts/core.git-5591983016255515332/Sources/Bits/Byte+Control.swift /Users/petercernak/vapor/TILApp/.build/checkouts/core.git-5591983016255515332/Sources/Bits/BitsError.swift /Users/petercernak/vapor/TILApp/.build/checkouts/core.git-5591983016255515332/Sources/Bits/Data+Bytes.swift /Users/petercernak/vapor/TILApp/.build/checkouts/core.git-5591983016255515332/Sources/Bits/Bytes.swift /Users/petercernak/vapor/TILApp/.build/checkouts/core.git-5591983016255515332/Sources/Bits/Data+Strings.swift /Users/petercernak/vapor/TILApp/.build/checkouts/core.git-5591983016255515332/Sources/Bits/ByteBuffer+binaryFloatingPointOperations.swift /Users/petercernak/vapor/TILApp/.build/checkouts/core.git-5591983016255515332/Sources/Bits/Byte+Alphabet.swift /Users/petercernak/vapor/TILApp/.build/checkouts/core.git-5591983016255515332/Sources/Bits/Byte+Digit.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Dispatch.apinotesc /Users/petercernak/vapor/TILApp/Build/Products/Debug/NIO.framework/Modules/NIO.swiftmodule/x86_64.swiftmodule /Users/petercernak/vapor/TILApp/Build/Products/Debug/Debugging.framework/Modules/Debugging.swiftmodule/x86_64.swiftmodule /Users/petercernak/vapor/TILApp/Build/Products/Debug/NIOConcurrencyHelpers.framework/Modules/NIOConcurrencyHelpers.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/ObjectiveC.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Dispatch.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/CoreFoundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/CoreGraphics.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/IOKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/SwiftOnoneSupport.swiftmodule /Users/petercernak/vapor/TILApp/.build/checkouts/swift-nio.git--2128188973977302459/Sources/CNIOAtomics/include/cpp_magic.h /Users/petercernak/vapor/TILApp/.build/checkouts/swift-nio.git--2128188973977302459/Sources/CNIODarwin/include/c_nio_darwin.h /Users/petercernak/vapor/TILApp/.build/checkouts/swift-nio.git--2128188973977302459/Sources/CNIOAtomics/include/c-atomics.h /Users/petercernak/vapor/TILApp/.build/checkouts/swift-nio.git--2128188973977302459/Sources/CNIOLinux/include/c_nio_linux.h /Users/petercernak/vapor/TILApp/TILApp.xcodeproj/GeneratedModuleMap/CNIOSHA1/module.modulemap /Users/petercernak/vapor/TILApp/.build/checkouts/swift-nio-zlib-support.git--6538424668019974428/module.modulemap /Users/petercernak/vapor/TILApp/TILApp.xcodeproj/GeneratedModuleMap/CNIODarwin/module.modulemap /Users/petercernak/vapor/TILApp/TILApp.xcodeproj/GeneratedModuleMap/CNIOAtomics/module.modulemap /Users/petercernak/vapor/TILApp/TILApp.xcodeproj/GeneratedModuleMap/CNIOLinux/module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/ApplicationServices.framework/Headers/ApplicationServices.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Security.framework/Headers/Security.apinotes /Users/petercernak/vapor/TILApp/Build/Intermediates.noindex/TILApp.build/Debug/Bits.build/Objects-normal/x86_64/ByteBuffer+binaryFloatingPointOperations~partial.swiftmodule : /Users/petercernak/vapor/TILApp/.build/checkouts/core.git-5591983016255515332/Sources/Bits/Deprecated.swift /Users/petercernak/vapor/TILApp/.build/checkouts/core.git-5591983016255515332/Sources/Bits/ByteBuffer+require.swift /Users/petercernak/vapor/TILApp/.build/checkouts/core.git-5591983016255515332/Sources/Bits/ByteBuffer+string.swift /Users/petercernak/vapor/TILApp/.build/checkouts/core.git-5591983016255515332/Sources/Bits/ByteBuffer+peek.swift /Users/petercernak/vapor/TILApp/.build/checkouts/core.git-5591983016255515332/Sources/Bits/Byte+Control.swift /Users/petercernak/vapor/TILApp/.build/checkouts/core.git-5591983016255515332/Sources/Bits/BitsError.swift /Users/petercernak/vapor/TILApp/.build/checkouts/core.git-5591983016255515332/Sources/Bits/Data+Bytes.swift /Users/petercernak/vapor/TILApp/.build/checkouts/core.git-5591983016255515332/Sources/Bits/Bytes.swift /Users/petercernak/vapor/TILApp/.build/checkouts/core.git-5591983016255515332/Sources/Bits/Data+Strings.swift /Users/petercernak/vapor/TILApp/.build/checkouts/core.git-5591983016255515332/Sources/Bits/ByteBuffer+binaryFloatingPointOperations.swift /Users/petercernak/vapor/TILApp/.build/checkouts/core.git-5591983016255515332/Sources/Bits/Byte+Alphabet.swift /Users/petercernak/vapor/TILApp/.build/checkouts/core.git-5591983016255515332/Sources/Bits/Byte+Digit.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Dispatch.apinotesc /Users/petercernak/vapor/TILApp/Build/Products/Debug/NIO.framework/Modules/NIO.swiftmodule/x86_64.swiftmodule /Users/petercernak/vapor/TILApp/Build/Products/Debug/Debugging.framework/Modules/Debugging.swiftmodule/x86_64.swiftmodule /Users/petercernak/vapor/TILApp/Build/Products/Debug/NIOConcurrencyHelpers.framework/Modules/NIOConcurrencyHelpers.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/ObjectiveC.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Dispatch.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/CoreFoundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/CoreGraphics.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/IOKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/SwiftOnoneSupport.swiftmodule /Users/petercernak/vapor/TILApp/.build/checkouts/swift-nio.git--2128188973977302459/Sources/CNIOAtomics/include/cpp_magic.h /Users/petercernak/vapor/TILApp/.build/checkouts/swift-nio.git--2128188973977302459/Sources/CNIODarwin/include/c_nio_darwin.h /Users/petercernak/vapor/TILApp/.build/checkouts/swift-nio.git--2128188973977302459/Sources/CNIOAtomics/include/c-atomics.h /Users/petercernak/vapor/TILApp/.build/checkouts/swift-nio.git--2128188973977302459/Sources/CNIOLinux/include/c_nio_linux.h /Users/petercernak/vapor/TILApp/TILApp.xcodeproj/GeneratedModuleMap/CNIOSHA1/module.modulemap /Users/petercernak/vapor/TILApp/.build/checkouts/swift-nio-zlib-support.git--6538424668019974428/module.modulemap /Users/petercernak/vapor/TILApp/TILApp.xcodeproj/GeneratedModuleMap/CNIODarwin/module.modulemap /Users/petercernak/vapor/TILApp/TILApp.xcodeproj/GeneratedModuleMap/CNIOAtomics/module.modulemap /Users/petercernak/vapor/TILApp/TILApp.xcodeproj/GeneratedModuleMap/CNIOLinux/module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/ApplicationServices.framework/Headers/ApplicationServices.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Security.framework/Headers/Security.apinotes /Users/petercernak/vapor/TILApp/Build/Intermediates.noindex/TILApp.build/Debug/Bits.build/Objects-normal/x86_64/ByteBuffer+binaryFloatingPointOperations~partial.swiftdoc : /Users/petercernak/vapor/TILApp/.build/checkouts/core.git-5591983016255515332/Sources/Bits/Deprecated.swift /Users/petercernak/vapor/TILApp/.build/checkouts/core.git-5591983016255515332/Sources/Bits/ByteBuffer+require.swift /Users/petercernak/vapor/TILApp/.build/checkouts/core.git-5591983016255515332/Sources/Bits/ByteBuffer+string.swift /Users/petercernak/vapor/TILApp/.build/checkouts/core.git-5591983016255515332/Sources/Bits/ByteBuffer+peek.swift /Users/petercernak/vapor/TILApp/.build/checkouts/core.git-5591983016255515332/Sources/Bits/Byte+Control.swift /Users/petercernak/vapor/TILApp/.build/checkouts/core.git-5591983016255515332/Sources/Bits/BitsError.swift /Users/petercernak/vapor/TILApp/.build/checkouts/core.git-5591983016255515332/Sources/Bits/Data+Bytes.swift /Users/petercernak/vapor/TILApp/.build/checkouts/core.git-5591983016255515332/Sources/Bits/Bytes.swift /Users/petercernak/vapor/TILApp/.build/checkouts/core.git-5591983016255515332/Sources/Bits/Data+Strings.swift /Users/petercernak/vapor/TILApp/.build/checkouts/core.git-5591983016255515332/Sources/Bits/ByteBuffer+binaryFloatingPointOperations.swift /Users/petercernak/vapor/TILApp/.build/checkouts/core.git-5591983016255515332/Sources/Bits/Byte+Alphabet.swift /Users/petercernak/vapor/TILApp/.build/checkouts/core.git-5591983016255515332/Sources/Bits/Byte+Digit.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Dispatch.apinotesc /Users/petercernak/vapor/TILApp/Build/Products/Debug/NIO.framework/Modules/NIO.swiftmodule/x86_64.swiftmodule /Users/petercernak/vapor/TILApp/Build/Products/Debug/Debugging.framework/Modules/Debugging.swiftmodule/x86_64.swiftmodule /Users/petercernak/vapor/TILApp/Build/Products/Debug/NIOConcurrencyHelpers.framework/Modules/NIOConcurrencyHelpers.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/ObjectiveC.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Dispatch.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/CoreFoundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/CoreGraphics.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/IOKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/SwiftOnoneSupport.swiftmodule /Users/petercernak/vapor/TILApp/.build/checkouts/swift-nio.git--2128188973977302459/Sources/CNIOAtomics/include/cpp_magic.h /Users/petercernak/vapor/TILApp/.build/checkouts/swift-nio.git--2128188973977302459/Sources/CNIODarwin/include/c_nio_darwin.h /Users/petercernak/vapor/TILApp/.build/checkouts/swift-nio.git--2128188973977302459/Sources/CNIOAtomics/include/c-atomics.h /Users/petercernak/vapor/TILApp/.build/checkouts/swift-nio.git--2128188973977302459/Sources/CNIOLinux/include/c_nio_linux.h /Users/petercernak/vapor/TILApp/TILApp.xcodeproj/GeneratedModuleMap/CNIOSHA1/module.modulemap /Users/petercernak/vapor/TILApp/.build/checkouts/swift-nio-zlib-support.git--6538424668019974428/module.modulemap /Users/petercernak/vapor/TILApp/TILApp.xcodeproj/GeneratedModuleMap/CNIODarwin/module.modulemap /Users/petercernak/vapor/TILApp/TILApp.xcodeproj/GeneratedModuleMap/CNIOAtomics/module.modulemap /Users/petercernak/vapor/TILApp/TILApp.xcodeproj/GeneratedModuleMap/CNIOLinux/module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/ApplicationServices.framework/Headers/ApplicationServices.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Security.framework/Headers/Security.apinotes
D
module jsonserialized.unittests; unittest { import dunit.toolkit : assertEqual; import jsonserialized.serialization : serializeToJSONValue; import jsonserialized.deserialization : deserializeFromJSONValue; import stdx.data.json : toJSONValue; struct TestSubStruct { int anotherInt; string anotherString; } struct TestStruct { struct NestedStruct { int nestedInt; string nestedString; } int singleInt; float singleFloat; int[] intArray; int[][] arrayOfIntArrays; int[string] intStringAssocArray; int[int] intIntAssocArray; char singleChar; char[] charArray; string singleString; string[] stringArray; string[][] arrayOfStringArrays; string[string] stringAssocArray; string[string][string] stringAssocArrayOfAssocArrays; bool trueBool; bool falseBool; TestSubStruct subStruct; NestedStruct nestedStruct; NestedStruct[] arrayOfNestedStructs; NestedStruct[string] nestedStructAssocArray; } // Create test struct and set it up with some test values TestStruct ts; with (ts) { singleInt = 1234; singleFloat = 1.234; intArray = [1, 2, 3, 4]; arrayOfIntArrays = [[1, 2], [3, 4]]; intStringAssocArray = ["one": 1, "two": 2, "three": 3]; intIntAssocArray = [1: 3, 2: 1, 3: 2]; singleChar = 'A'; charArray = ['A', 'B', 'C', 'D']; singleString = "just a string"; stringArray = ["a", "few", "strings"]; arrayOfStringArrays = [["a", "b"], ["c", "d"]]; stringAssocArray = ["a": "A", "b": "B", "c": "C"]; stringAssocArrayOfAssocArrays = ["a": ["a": "A", "b": "B"], "b": ["c": "C", "d": "D"]]; trueBool = true; falseBool = false; subStruct.anotherInt = 42; subStruct.anotherString = "Another string"; nestedStruct.nestedInt = 53; nestedStruct.nestedString = "Nested string"; arrayOfNestedStructs = [NestedStruct(1, "One"), NestedStruct(2, "Two")]; nestedStructAssocArray = ["one": NestedStruct(1, "One"), "two": NestedStruct(2, "Two")]; } // Serialize the struct to JSON auto jv = ts.serializeToJSONValue(); // Create a new empty struct TestStruct ts2; // Deserialize the JSONValue into it ts2.deserializeFromJSONValue(jv); // Assert that both structs are identical assertEqual(ts2.singleInt, ts.singleInt); assertEqual(ts2.singleFloat, ts.singleFloat); assertEqual(ts2.intArray, ts.intArray); assertEqual(ts2.arrayOfIntArrays, ts.arrayOfIntArrays); assertEqual(ts2.intStringAssocArray, ts.intStringAssocArray); assertEqual(ts2.intIntAssocArray, ts.intIntAssocArray); assertEqual(ts2.singleChar, ts.singleChar); assertEqual(ts2.charArray, ts.charArray); assertEqual(ts2.singleString, ts.singleString); assertEqual(ts2.stringArray, ts.stringArray); assertEqual(ts2.arrayOfStringArrays, ts.arrayOfStringArrays); assertEqual(ts2.stringAssocArray, ts.stringAssocArray); assertEqual(ts2.stringAssocArrayOfAssocArrays, ts.stringAssocArrayOfAssocArrays); assertEqual(ts2.trueBool, ts.trueBool); assertEqual(ts2.falseBool, ts.falseBool); assertEqual(ts2.subStruct, ts.subStruct); assertEqual(ts2.subStruct.anotherInt, ts.subStruct.anotherInt); assertEqual(ts2.subStruct.anotherString, ts.subStruct.anotherString); assertEqual(ts2.nestedStruct, ts.nestedStruct); assertEqual(ts2.nestedStruct.nestedInt, ts.nestedStruct.nestedInt); assertEqual(ts2.nestedStruct.nestedString, ts.nestedStruct.nestedString); assertEqual(ts2.arrayOfNestedStructs, ts.arrayOfNestedStructs); assertEqual(ts2.arrayOfNestedStructs[0].nestedInt, ts.arrayOfNestedStructs[0].nestedInt); assertEqual(ts2.arrayOfNestedStructs[0].nestedString, ts.arrayOfNestedStructs[0].nestedString); assertEqual(ts2.arrayOfNestedStructs[1].nestedInt, ts.arrayOfNestedStructs[1].nestedInt); assertEqual(ts2.arrayOfNestedStructs[1].nestedString, ts.arrayOfNestedStructs[1].nestedString); assertEqual(ts2.nestedStructAssocArray, ts.nestedStructAssocArray); assertEqual(ts2.nestedStructAssocArray["one"].nestedInt, ts.nestedStructAssocArray["one"].nestedInt); assertEqual(ts2.nestedStructAssocArray["two"].nestedString, ts.nestedStructAssocArray["two"].nestedString); // Attempt to deserialize partial JSON TestStruct ts3; ts3.deserializeFromJSONValue(`{ "singleInt": 42, "singleString": "Don't panic." }`.toJSONValue()); ts3.singleInt.assertEqual(42); ts3.singleString.assertEqual("Don't panic."); // Attempt to deserialize JSON containing a property that does not exist in the struct TestStruct ts4; ts4.deserializeFromJSONValue(`{ "nonexistentString": "Move along, nothing to see here." }`.toJSONValue()); auto ts5 = deserializeFromJSONValue!TestStruct(`{ "singleInt": 42, "singleString": "Don't panic." }`.toJSONValue()); ts5.singleInt.assertEqual(42); ts5.singleString.assertEqual("Don't panic."); } unittest { import dunit.toolkit : assertEqual; import jsonserialized.serialization : serializeToJSONValue; import jsonserialized.deserialization : deserializeFromJSONValue; import stdx.data.json : toJSONValue; class TestSubClass { int anotherInt; } class TestClass { static class NestedClass { int nestedInt; pure this() { } this(in int initInt) { nestedInt = initInt; } } int singleInt; float singleFloat; int[] intArray; int[][] arrayOfIntArrays; int[string] intStringAssocArray; int[int] intIntAssocArray; char singleChar; char[] charArray; string singleString; string[] stringArray; string[][] arrayOfStringArrays; string[string] stringAssocArray; string[string][string] stringAssocArrayOfAssocArrays; NestedClass[] arrayOfNestedClasses; NestedClass[string] nestedClassAssocArray; auto subClass = new TestSubClass(); auto nestedClass = new NestedClass(53); } // Create test struct and set it up with some test values auto tc = new TestClass(); with (tc) { singleInt = 1234; singleFloat = 1.234; intArray = [1, 2, 3, 4]; arrayOfIntArrays = [[1, 2], [3, 4]]; intStringAssocArray = ["one": 1, "two": 2, "three": 3]; intIntAssocArray = [1: 3, 2: 1, 3: 2]; singleChar = 'A'; charArray = ['A', 'B', 'C', 'D']; singleString = "just a string"; stringArray = ["a", "few", "strings"]; arrayOfStringArrays = [["a", "b"], ["c", "d"]]; stringAssocArray = ["a": "A", "b": "B", "c": "C"]; stringAssocArrayOfAssocArrays = ["a": ["a": "A", "b": "B"], "b": ["c": "C", "d": "D"]]; arrayOfNestedClasses = [new NestedClass(1), new NestedClass(2)]; nestedClassAssocArray = ["one": new NestedClass(1), "two": new NestedClass(2)]; subClass.anotherInt = 42; } // Serialize the struct to JSON auto jv = tc.serializeToJSONValue(); // Create a new empty struct auto tc2 = new TestClass(); // Deserialize the JSONValue into it tc2.deserializeFromJSONValue(jv); // Assert that both structs are identical assertEqual(tc2.singleInt, tc.singleInt); assertEqual(tc2.singleFloat, tc.singleFloat); assertEqual(tc2.intArray, tc.intArray); assertEqual(tc2.arrayOfIntArrays, tc.arrayOfIntArrays); assertEqual(tc2.intStringAssocArray, tc.intStringAssocArray); assertEqual(tc2.intIntAssocArray, tc.intIntAssocArray); assertEqual(tc2.singleChar, tc.singleChar); assertEqual(tc2.charArray, tc.charArray); assertEqual(tc2.singleString, tc.singleString); assertEqual(tc2.stringArray, tc.stringArray); assertEqual(tc2.arrayOfStringArrays, tc.arrayOfStringArrays); assertEqual(tc2.stringAssocArray, tc.stringAssocArray); assertEqual(tc2.stringAssocArrayOfAssocArrays, tc.stringAssocArrayOfAssocArrays); assertEqual(tc2.subClass.anotherInt, tc.subClass.anotherInt); assertEqual(tc2.nestedClass.nestedInt, tc.nestedClass.nestedInt); assertEqual(tc2.arrayOfNestedClasses[0].nestedInt, tc.arrayOfNestedClasses[0].nestedInt); assertEqual(tc2.arrayOfNestedClasses[1].nestedInt, tc.arrayOfNestedClasses[1].nestedInt); assertEqual(tc2.nestedClassAssocArray["one"].nestedInt, tc.nestedClassAssocArray["one"].nestedInt); assertEqual(tc2.nestedClassAssocArray["two"].nestedInt, tc.nestedClassAssocArray["two"].nestedInt); } unittest { import dunit.toolkit : assertEqual; import jsonserialized.deserialization : deserializeFromJSONValue; import stdx.data.json : toJSONValue; string[string] aa; auto jsonValue = `{ "aString": "theString", "anInt": 42 }`.toJSONValue(); aa.deserializeFromJSONValue(jsonValue); assertEqual(aa["aString"], "theString"); assertEqual(aa["anInt"], "42"); } unittest { /* Unit tests for attempting to deserialize mismatching types */ import dunit.toolkit : assertEqual; import jsonserialized.deserialization : deserializeFromJSONValue; import stdx.data.json : toJSONValue; struct TestStruct { int intValue; string stringValue; int notArray; string alsoNotArray; int notAA; string alsoNotAA; } auto jsonValue = `{ "intValue": "aString", "stringValue": 42, "notArray": [], "alsoNotArray": [], "notAA": {}, "alsoNotAA": {} }`.toJSONValue(); TestStruct ts; ts.deserializeFromJSONValue(jsonValue); assertEqual(ts.intValue, 0); assertEqual(ts.stringValue, ""); assertEqual(ts.notArray, 0); assertEqual(ts.alsoNotArray, ""); assertEqual(ts.notAA, 0); assertEqual(ts.alsoNotAA, ""); }
D
/* -------------------- CZ CHANGELOG -------------------- */ /* v1.00: func void DIA_Wolf_AboutCrawler_Info - opravena implementace proměnné (CanDoCrawlwerPlate) */ instance DIA_Wolf_EXIT(C_Info) { npc = SLD_811_Wolf; nr = 999; condition = DIA_Wolf_EXIT_Condition; information = DIA_Wolf_EXIT_Info; permanent = TRUE; description = Dialog_Ende; }; func int DIA_Wolf_EXIT_Condition() { if(Kapitel < 3) { return TRUE; }; }; func void DIA_Wolf_EXIT_Info() { AI_StopProcessInfos(self); }; instance DIA_Wolf_Hallo(C_Info) { npc = SLD_811_Wolf; nr = 4; condition = DIA_Wolf_Hallo_Condition; information = DIA_Wolf_Hallo_Info; permanent = FALSE; description = "Jsi v pořádku?"; }; func int DIA_Wolf_Hallo_Condition() { return TRUE; }; func void DIA_Wolf_Hallo_Info() { AI_Output(other,self,"DIA_Wolf_Hallo_15_00"); //Jsi v pořádku? AI_Output(self,other,"DIA_Wolf_Hallo_08_01"); //Hej, já tě znám! Z kolonie. AI_Output(self,other,"DIA_Wolf_Hallo_08_02"); //Co tady chceš? }; instance DIA_Wolf_AboutSylvio(C_Info) { npc = SLD_811_Wolf; nr = 5; condition = DIA_Wolf_AboutSylvio_Condition; information = DIA_Wolf_AboutSylvio_Info; permanent = FALSE; description = "Co si myslíš o Sylviovi?"; }; func int DIA_Wolf_AboutSylvio_Condition() { if(Npc_KnowsInfo(other,DIA_Wolf_Hallo) && (Kapitel < 2) && (Sylvio_angequatscht >= 1)) { return TRUE; }; }; func void DIA_Wolf_AboutSylvio_Info() { AI_Output(other,self,"DIA_Wolf_AboutSylvio_01_00"); //Co si myslíš o Sylviovi? AI_Output(self,other,"DIA_Wolf_AboutSylvio_01_01"); //Vynikající člověk! On... rozdal by se pro ostatní! Neuvěřitelný... fantastický! Co ti mám povídat... krása. AI_Output(other,self,"DIA_Wolf_AboutSylvio_01_02"); //T-t... to jako co?! AI_Output(self,other,"DIA_Wolf_AboutSylvio_01_03"); //Víš přeci, že jsem přišel s Leem, tak co řešíš. AI_Output(other,self,"DIA_Wolf_AboutSylvio_01_04"); //Jen jsem chtěl... AI_Output(self,other,"DIA_Wolf_AboutSylvio_01_05"); //Poslouchej příteli! Bude lepší, když se vykašleš na ty otázky a začneš něco dělat. }; instance DIA_Wolf_WannaJoin(C_Info) { npc = SLD_811_Wolf; nr = 5; condition = DIA_Wolf_WannaJoin_Condition; information = DIA_Wolf_WannaJoin_Info; permanent = FALSE; description = "Přišel jsem se k vám přidat."; }; func int DIA_Wolf_WannaJoin_Condition() { if(Npc_KnowsInfo(other,DIA_Wolf_Hallo) && (Kapitel < 2)) { return TRUE; }; }; func void DIA_Wolf_WannaJoin_Info() { AI_Output(other,self,"DIA_Wolf_WannaJoin_15_00"); //Přišel jsem se k vám přidat. AI_Output(self,other,"DIA_Wolf_WannaJoin_New_08_01"); //Hmm...(zamyšleně) Chceš se k nám přidat? To je dobře! AI_Output(self,other,"DIA_Wolf_WannaJoin_New_08_02"); //Ale nepočítej s tím, že tě takhle snadno přijmou i ostatní. AI_Output(other,self,"DIA_Wolf_WannaJoin_New_08_03"); //A co ty? AI_Output(self,other,"DIA_Wolf_WannaJoin_New_08_04"); //Jestli na mě chceš udělat dojem - tref všechny tři terče na střelnici. AI_Output(self,other,"DIA_Wolf_WannaJoin_New_08_05"); //Udělej to a já ti dám můj souhlas. MIS_AppleTest = LOG_Running; Log_CreateTopic(TOPIC_AppleTest,LOG_MISSION); Log_SetTopicStatus(TOPIC_AppleTest,LOG_Running); B_LogEntry(TOPIC_AppleTest,"Wolf mi dá svůj hlas pokud trefím všechny tři terče na střelnici."); B_StartOtherRoutine(Sld_805_Cord,"WaitShoot"); }; instance DIA_Wolf_WannaJoin_Done(C_Info) { npc = SLD_811_Wolf; nr = 5; condition = DIA_Wolf_WannaJoin_Done_Condition; information = DIA_Wolf_WannaJoin_Done_Info; permanent = FALSE; description = "Udělal jsem, co jsi chtěl."; }; func int DIA_Wolf_WannaJoin_Done_Condition() { if((MIS_AppleTest == LOG_Running) && (AIMALLISDONE == TRUE)) { return TRUE; }; }; func void DIA_Wolf_WannaJoin_Done_Info() { B_GivePlayerXP(150); AI_Output(other,self,"DIA_Wolf_WannaJoin_Done_15_00"); //Udělal jsem, co jsi chtěl. Přimluvíš se teď za mě? AI_Output(self,other,"DIA_Wolf_WannaJoin_Done_08_01"); //Proč ne...(přátelsky) Potřebujem takový lidi, jako jsi ty! AI_Output(self,other,"DIA_Wolf_WannaJoin_08_02"); //Ale nepočítej s tím, že tě takhle snadno přijmou i ostatní. AI_Output(self,other,"DIA_Wolf_WannaJoin_08_03"); //Poslední dobou sem přišla všelijaká sebranka. A mezi těma staršíma, ne všichni si tě budou pamatovat. AI_Output(self,other,"DIA_Wolf_WannaJoin_08_04"); //Sám jsem tě málem nepoznal, vypadáš strašně sešle. AI_Output(other,self,"DIA_Wolf_WannaJoin_15_05"); //Když padla bariéra, přežil jsem jen zázrakem. AI_Output(self,other,"DIA_Wolf_WannaJoin_08_06"); //Ale zdá se, že jsi měl štěstí. MIS_AppleTest = LOG_Success; Log_SetTopicStatus(TOPIC_AppleTest,LOG_Success); B_LogEntry(TOPIC_AppleTest,"Wolf pro mě bude hlasovat."); B_LogEntry_Quiet(TOPIC_SLDRespekt,"Wolf nemá nic proti tomu abych se přidal k žoldákům."); B_StartOtherRoutine(Sld_805_Cord,"Start"); }; instance DIA_Wolf_WannaBuy(C_Info) { npc = SLD_811_Wolf; nr = 6; condition = DIA_Wolf_WannaBuy_Condition; information = DIA_Wolf_WannaBuy_Info; permanent = FALSE; description = "Nemáš něco na prodej?"; }; func int DIA_Wolf_WannaBuy_Condition() { if(Npc_KnowsInfo(other,DIA_Wolf_Hallo) && (CAPITANORDERDIAWAY == FALSE)) { return TRUE; }; }; func void DIA_Wolf_WannaBuy_Info() { AI_Output(other,self,"DIA_Wolf_WannaBuy_15_00"); //Nemáš něco na prodej? AI_Output(self,other,"DIA_Wolf_WannaBuy_08_01"); //Ále, ani se neptej. AI_Output(self,other,"DIA_Wolf_WannaBuy_08_02"); //O zbraně a zbroj se teď stará Bennet, jeden z těch nových chlápků. AI_Output(self,other,"DIA_Wolf_WannaBuy_08_03"); //V kolonii jsem vedl celou Leeovu zbrojírnu a pak si přijde nějaký školený kovář a bác, jsem bez práce. AI_Output(self,other,"DIA_Wolf_WannaBuy_08_04"); //Zoufale potřebuju novou práci, i když tu nedělám nic jiného, než hlídám polnosti. AI_Output(self,other,"DIA_Wolf_WannaBuy_08_05"); //Ale nevadí mi to, aspoň tu nemusím sedět s rukama v klíně. }; instance DIA_Wolf_WannaLearn(C_Info) { npc = SLD_811_Wolf; nr = 7; condition = DIA_Wolf_WannaLearn_Condition; information = DIA_Wolf_WannaLearn_Info; permanent = FALSE; description = "Můžu se u tebe něčemu přiučit?"; }; func int DIA_Wolf_WannaLearn_Condition() { if(Npc_KnowsInfo(other,DIA_Wolf_Hallo) && ((hero.guild == GIL_SLD) || (hero.guild == GIL_DJG))) { return TRUE; }; }; func void DIA_Wolf_WannaLearn_Info() { AI_Output(other,self,"DIA_Wolf_WannaLearn_15_00"); //Můžu se u tebe něčemu přiučit? AI_Output(self,other,"DIA_Wolf_WannaLearn_08_01"); //Jestli chceš, můžu ti poradit pár triků v zacházení s lukem. Nic lepšího teď stejně dělat nemůžu. Wolf_TeachBow = TRUE; Log_CreateTopic(Topic_SoldierTeacher,LOG_NOTE); B_LogEntry(Topic_SoldierTeacher,"Wolf mě naučí zacházet s luky."); }; var int Wolf_Merke_Bow; instance DIA_Wolf_TEACH(C_Info) { npc = SLD_811_Wolf; nr = 8; condition = DIA_Wolf_TEACH_Condition; information = DIA_Wolf_TEACH_Info; permanent = TRUE; description = "Chtěl bych se trochu vylepšit ve střelbě."; }; func int DIA_Wolf_TEACH_Condition() { if((Wolf_TeachBow == TRUE) && ((hero.guild == GIL_SLD) || (hero.guild == GIL_DJG))) { return TRUE; }; }; func void DIA_Wolf_TEACH_Info() { AI_Output(other,self,"DIA_Wolf_TEACH_15_00"); //Chtěl bych se trochu vylepšit ve střelbě. AI_Output(self,other,"DIA_Wolf_TEACH_08_01"); //Co bych tě měl naučit? Wolf_Merke_Bow = other.HitChance[NPC_TALENT_BOW]; Info_ClearChoices(DIA_Wolf_TEACH); Info_AddChoice(DIA_Wolf_TEACH,Dialog_Back,DIA_Wolf_Teach_Back); Info_AddChoice(DIA_Wolf_TEACH,b_buildlearnstringforfight(PRINT_LearnBow1,B_GetLearnCostTalent(other,NPC_TALENT_BOW,1)),DIA_Wolf_Teach_Bow_1); Info_AddChoice(DIA_Wolf_TEACH,b_buildlearnstringforfight(PRINT_LearnBow5,B_GetLearnCostTalent(other,NPC_TALENT_BOW,5)),DIA_Wolf_Teach_Bow_5); }; func void DIA_Wolf_Teach_Back() { if(Wolf_Merke_Bow < other.HitChance[NPC_TALENT_BOW]) { AI_Output(self,other,"DIA_Wolf_Teach_BACK_08_00"); //A je to. Už máš zase o něco přesnější ruku. }; Info_ClearChoices(DIA_Wolf_TEACH); }; func void DIA_Wolf_Teach_Bow_1() { B_TeachFightTalentPercent(self,other,NPC_TALENT_BOW,1,60); Info_ClearChoices(DIA_Wolf_TEACH); Info_AddChoice(DIA_Wolf_TEACH,Dialog_Back,DIA_Wolf_Teach_Back); Info_AddChoice(DIA_Wolf_TEACH,b_buildlearnstringforfight(PRINT_LearnBow1,B_GetLearnCostTalent(other,NPC_TALENT_BOW,1)),DIA_Wolf_Teach_Bow_1); Info_AddChoice(DIA_Wolf_TEACH,b_buildlearnstringforfight(PRINT_LearnBow5,B_GetLearnCostTalent(other,NPC_TALENT_BOW,5)),DIA_Wolf_Teach_Bow_5); }; func void DIA_Wolf_Teach_Bow_5() { B_TeachFightTalentPercent(self,other,NPC_TALENT_BOW,5,60); Info_ClearChoices(DIA_Wolf_TEACH); Info_AddChoice(DIA_Wolf_TEACH,Dialog_Back,DIA_Wolf_Teach_Back); Info_AddChoice(DIA_Wolf_TEACH,b_buildlearnstringforfight(PRINT_LearnBow1,B_GetLearnCostTalent(other,NPC_TALENT_BOW,1)),DIA_Wolf_Teach_Bow_1); Info_AddChoice(DIA_Wolf_TEACH,b_buildlearnstringforfight(PRINT_LearnBow5,B_GetLearnCostTalent(other,NPC_TALENT_BOW,5)),DIA_Wolf_Teach_Bow_5); }; instance DIA_Wolf_PERM(C_Info) { npc = SLD_811_Wolf; nr = 9; condition = DIA_Wolf_PERM_Condition; information = DIA_Wolf_PERM_Info; permanent = TRUE; description = "Tak co? Už sis našel novou práci?"; }; func int DIA_Wolf_PERM_Condition() { if(Npc_KnowsInfo(other,DIA_Wolf_WannaBuy) && (MIS_BengarsHelpingSLD == 0) && (Wolf_IsOnBoard != LOG_FAILED) && (CAPITANORDERDIAWAY == FALSE) && (WOLFRECRUITEDDT == FALSE)) { return TRUE; }; }; func void DIA_Wolf_PERM_Info() { AI_Output(other,self,"DIA_Wolf_PERM_15_00"); //Tak co? Už sis našel novou práci? AI_Output(self,other,"DIA_Wolf_PERM_08_01"); //Ne, zatím ne. Dej mi vědět, jestli na něco natrefíš. }; instance DIA_Wolf_Stadt(C_Info) { npc = SLD_811_Wolf; nr = 10; condition = DIA_Wolf_Stadt_Condition; information = DIA_Wolf_Stadt_Info; permanent = FALSE; description = "Zkoušel sis něco najít ve městě?"; }; func int DIA_Wolf_Stadt_Condition() { if(Npc_KnowsInfo(other,DIA_Wolf_WannaBuy) && (MIS_BengarsHelpingSLD == 0) && (Wolf_IsOnBoard != LOG_FAILED) && (CAPITANORDERDIAWAY == FALSE) && (WOLFRECRUITEDDT == FALSE)) { return TRUE; }; }; func void DIA_Wolf_Stadt_Info() { AI_Output(other,self,"DIA_Wolf_Stadt_15_00"); //Zkoušel sis něco najít ve městě? AI_Output(self,other,"DIA_Wolf_Stadt_08_01"); //Ve městě? (směje se) Tam by mě nedostali ani párem volů. AI_Output(self,other,"DIA_Wolf_Stadt_08_02"); //Nebo si myslíš, že bych tam měl dělat nějakého vojáka z domobrany? Nedovedu si představit, že bych nosil uniformu jak nějaký dvořan. AI_Output(self,other,"DIA_Wolf_Stadt_08_03"); //A pak ta slepá poslušnost. Ne, zapomeň na to - možná tady na farmě nemám moc co na práci, ale aspoň si můžu dělat, co chci. }; var int MIS_Wolf_BringCrawlerPlates; var int Wolf_MakeArmor; var int Player_GotCrawlerArmor; instance DIA_Wolf_AboutCrawler(C_Info) { npc = SLD_811_Wolf; nr = 1; condition = DIA_Wolf_AboutCrawler_Condition; information = DIA_Wolf_AboutCrawler_Info; permanent = FALSE; description = "Slyšel jsem, že umíš vykovat zbroj z červích krunýřů."; }; func int DIA_Wolf_AboutCrawler_Condition() { if(Wolf_ProduceCrawlerArmor == TRUE) { return TRUE; }; }; func void DIA_Wolf_AboutCrawler_Info() { AI_Output(other,self,"DIA_Wolf_AboutCrawler_15_00"); //Slyšel jsem, že umíš vykovat zbroj z červích krunýřů. AI_Output(self,other,"DIA_Wolf_AboutCrawler_08_01"); //To je fakt. Od koho ses to dozvěděl? if(HOKURN_ARMOR == TRUE) { AI_Output(other,self,"DIA_Wolf_AboutCrawler_15_01A"); //Barem z táboru lovců mi to řekl. } else { AI_Output(other,self,"DIA_Wolf_AboutCrawler_15_02"); //Řekl mi to lovec jménem Gestath. }; AI_Output(other,self,"DIA_Wolf_AboutCrawler_15_03"); //Dokázal bys takovou zbroj vyrobit? AI_Output(self,other,"DIA_Wolf_AboutCrawler_08_04"); //Jasně. Přines mi 10 červích krunýřů a já ti ji vyrobím. AI_Output(other,self,"DIA_Wolf_AboutCrawler_15_05"); //A kolik za ni budeš chtít? AI_Output(self,other,"DIA_Wolf_AboutCrawler_08_06"); //Na placení zapomeň, udělám ti ji grátis, na památku starých dobrých časů. MIS_Wolf_BringCrawlerPlates = LOG_Running; Log_CreateTopic(TOPIC_Wolf_BringCrawlerPlates,LOG_MISSION); Log_SetTopicStatus(TOPIC_Wolf_BringCrawlerPlates,LOG_Running); B_LogEntry(TOPIC_Wolf_BringCrawlerPlates,"Wolf mi z 10 červích krunýřů vyková zbroj."); CanDoCrawlwerPlate = TRUE; }; instance DIA_Wolf_TeachCrawlerPlates(C_Info) { npc = SLD_811_Wolf; nr = 2; condition = DIA_Wolf_TeachCrawlerPlates_Condition; information = DIA_Wolf_TeachCrawlerPlates_Info; permanent = TRUE; description = "Můžeš mě naučit, jak červí krunýře oddělit?"; }; func int DIA_Wolf_TeachCrawlerPlates_Condition() { if(Npc_KnowsInfo(other,DIA_Wolf_AboutCrawler) && (PLAYER_TALENT_TAKEANIMALTROPHY[TROPHY_CrawlerPlate] == FALSE)) { return TRUE; }; }; func void DIA_Wolf_TeachCrawlerPlates_Info() { AI_Output(other,self,"DIA_Wolf_TeachCrawlerPlates_15_00"); //Můžeš mě naučit, jak červí krunýře oddělit? Info_ClearChoices(DIA_Wolf_TeachCrawlerPlates); Info_AddChoice(DIA_Wolf_TeachCrawlerPlates,Dialog_Back,DIA_Wolf_TeachCrawlerPlates_Back); Info_AddChoice(DIA_Wolf_TeachCrawlerPlates,b_buildlearnstringforsmithhunt("Vyjímání krunýřů",B_GetLearnCostTalent(other,NPC_TALENT_TAKEANIMALTROPHY,TROPHY_CrawlerPlate)),DIA_Wolf_TeachCrawlerPlates_Chest); }; func void DIA_Wolf_TeachCrawlerPlates_Back() { Info_ClearChoices(DIA_Wolf_TeachCrawlerPlates); }; func void DIA_Wolf_TeachCrawlerPlates_Chest() { if(B_TeachPlayerTalentTakeAnimalTrophy(self,other,TROPHY_CrawlerPlate)) { AI_Output(self,other,"DIA_Wolf_TeachCrawlerPlates_08_01"); //To je jednoduché. Zadní krunýře jsou totiž na těle pevně přichyceny pouze na okrajích. Stačí je ostrým nožem odříznout a je to. AI_Output(self,other,"DIA_Wolf_TeachCrawlerPlates_08_02"); //Chápeš? AI_Output(other,self,"DIA_Wolf_TeachCrawlerPlates_15_03"); //To je jednoduché. AI_Output(self,other,"DIA_Wolf_TeachCrawlerPlates_08_04"); //Vždyť to povídám. }; Info_ClearChoices(DIA_Wolf_TeachCrawlerPlates); }; instance DIA_Wolf_BringPlates(C_Info) { npc = SLD_811_Wolf; nr = 3; condition = DIA_Wolf_BringPlates_Condition; information = DIA_Wolf_BringPlates_Info; permanent = TRUE; description = "Sehnal jsem ty červí krunýře na zbroj."; }; func int DIA_Wolf_BringPlates_Condition() { if((MIS_Wolf_BringCrawlerPlates == LOG_Running) && (Npc_HasItems(other,ItAt_CrawlerPlate) >= 10)) { return TRUE; }; }; func void DIA_Wolf_BringPlates_Info() { AI_Output(other,self,"DIA_Wolf_BringPlates_15_00"); //Sehnal jsem ty červí krunýře na zbroj. B_GiveInvItems(other,self,ItAt_CrawlerPlate,10); AI_Output(self,other,"DIA_Wolf_BringPlates_08_01"); //Skvělé, tak je sem dej. MIS_Wolf_BringCrawlerPlates = LOG_SUCCESS; }; var int Wolf_Armor_Day; instance DIA_Wolf_ArmorReady(C_Info) { npc = SLD_811_Wolf; nr = 4; condition = DIA_Wolf_ArmorReady_Condition; information = DIA_Wolf_ArmorReady_Info; permanent = TRUE; description = "Prima, a kdy ta zbroj bude?"; }; func int DIA_Wolf_ArmorReady_Condition() { if(Npc_KnowsInfo(other,DIA_Wolf_AboutCrawler) && (Player_GotCrawlerArmor == FALSE)) { return TRUE; }; }; func void DIA_Wolf_ArmorReady_Info() { AI_Output(other,self,"DIA_Wolf_ArmorReady_15_00"); //Prima, a kdy ta zbroj bude? if(Npc_HasItems(self,ItAt_CrawlerPlate) >= 10) { if(Wolf_MakeArmor == FALSE) { Wolf_Armor_Day = Wld_GetDay() + 1; Wolf_MakeArmor = TRUE; }; if((Wolf_MakeArmor == TRUE) && (Wolf_Armor_Day > Wld_GetDay())) { AI_Output(self,other,"DIA_Wolf_ArmorReady_08_01"); //Jen co ji dám dohromady. Vrať se zítra. } else { CreateInvItems(self,ITAR_DJG_Crawler,1); Npc_RemoveInvItems(self,ItAt_CrawlerPlate,10); AI_Output(self,other,"DIA_Wolf_ArmorReady_08_02"); //Už jsem ji dokončil, tady je! B_GiveInvItems(self,other,ITAR_DJG_Crawler,1); AI_Output(self,other,"DIA_Wolf_ArmorReady_08_03"); //A docela dobře myslím. AI_Output(other,self,"DIA_Wolf_ArmorReady_15_04"); //Díky! AI_Output(self,other,"DIA_Wolf_ArmorReady_08_05"); //Není zač. Player_GotCrawlerArmor = TRUE; }; } else { AI_Output(self,other,"DIA_Wolf_ArmorReady_08_06"); //Ty vtipálku, nejdřív potřebuju ty červí krunýře... Wolf_MakeArmor = FALSE; MIS_Wolf_BringCrawlerPlates = LOG_Running; }; }; instance DIA_Wolf_KAP3_EXIT(C_Info) { npc = SLD_811_Wolf; nr = 999; condition = DIA_Wolf_KAP3_EXIT_Condition; information = DIA_Wolf_KAP3_EXIT_Info; permanent = TRUE; description = Dialog_Ende; }; func int DIA_Wolf_KAP3_EXIT_Condition() { if(Kapitel == 3) { return TRUE; }; }; func void DIA_Wolf_KAP3_EXIT_Info() { AI_StopProcessInfos(self); }; instance DIA_Wolf_BENGAR(C_Info) { npc = SLD_811_Wolf; nr = 31; condition = DIA_Wolf_BENGAR_Condition; information = DIA_Wolf_BENGAR_Info; permanent = TRUE; description = "Možná jsem ti našel práci u Bengara na statku."; }; func int DIA_Wolf_BENGAR_Condition() { if(Npc_KnowsInfo(other,DIA_Wolf_Hallo) && (MIS_BengarsHelpingSLD == LOG_Running) && (Kapitel >= 3) && (Wolf_IsOnBoard != LOG_SUCCESS) && (CAPITANORDERDIAWAY == FALSE) && (ConcertLoaBonus == TRUE)) { return TRUE; }; }; var int DIA_Wolf_BENGAR_oneTime; var int Wolf_BENGAR_geld; func void DIA_Wolf_BENGAR_Info() { if(WOLFRECRUITEDDT == FALSE) { AI_Output(other,self,"DIA_Wolf_BENGAR_15_00"); //Možná jsem ti našel práci u Bengara na statku. if(DIA_Wolf_BENGAR_oneTime == FALSE) { AI_Output(self,other,"DIA_Wolf_BENGAR_08_01"); //Tak povídej. AI_Output(other,self,"DIA_Wolf_BENGAR_15_02"); //Přímo u Bengarova statku ústí průsmyk do Hornického údolí, kterým se pořád snaží prodrat nějaké obludy. Nemusím ani dodávat, že z nich má ten farmář pěkně těžkou hlavu. AI_Output(other,self,"DIA_Wolf_BENGAR_15_03"); //Proto je třeba, aby Bengarův statek někdo střežil. AI_Output(self,other,"DIA_Wolf_BENGAR_08_04"); //Na tom by mohlo něco být. Aspoň budu venku na poli a nebudu muset pořád okounět tady u kovárny. DIA_Wolf_BENGAR_oneTime = TRUE; }; if((hero.guild == GIL_SLD) || (hero.guild == GIL_DJG) || (RhetorikSkillValue[1] >= 25)) { if((hero.guild == GIL_SLD) || (hero.guild == GIL_DJG)) { AI_Output(self,other,"DIA_Wolf_BENGAR_08_05"); //Souhlasím. A když jsi teď jedním z nás, udělám ti dobrou cenu. Dej mi 300 zlatých a já tam hned vyrazím. Wolf_BENGAR_geld = 300; } else if(RhetorikSkillValue[1] >= 25) { AI_Output(self,other,"DIA_Wolf_BENGAR_New_08_05"); //Souhlasím. A protože se známe tak dlouho, udělám ti dobrou cenu. Dej mi 300 zlatých a já tam hned vyrazím. Wolf_BENGAR_geld = 300; }; } else { AI_Output(self,other,"DIA_Wolf_BENGAR_08_06"); //Dobře. Dělá to 800 zlatých. AI_Output(other,self,"DIA_Wolf_BENGAR_15_07"); //To je pořádný balík. AI_Output(self,other,"DIA_Wolf_BENGAR_08_08"); //No, pro někoho z nás bych to udělal za babku, ale ty nejsi žoldák... Wolf_BENGAR_geld = 800; }; Info_ClearChoices(DIA_Wolf_BENGAR); Info_AddChoice(DIA_Wolf_BENGAR,"Budu o tom přemýšlet.",DIA_Wolf_BENGAR_nochnicht); Info_AddChoice(DIA_Wolf_BENGAR,"Tady je to zlato.",DIA_Wolf_BENGAR_geld); } else { B_GivePlayerXP(XP_BengarsHelpingSLD); AI_Output(other,self,"DIA_Wolf_BENGAR_15_00"); //Možná jsem ti našel práci u Bengara na statku. AI_Output(self,other,"DIA_Wolf_BENGAR_08_01"); //Tak povídej. AI_Output(other,self,"DIA_Wolf_BENGAR_15_02"); //Přímo u Bengarova statku ústí průsmyk do Hornického údolí, kterým se pořád snaží prodrat nějaké obludy. Nemusím ani dodávat, že z nich má ten farmář pěkně těžkou hlavu. AI_Output(other,self,"DIA_Wolf_BENGAR_15_03"); //Proto je třeba, aby Bengarův statek někdo střežil. AI_Output(self,other,"DIA_Wolf_BENGAR_geld_08_01"); //Fajn, a teď půjdu dohlídnout na ty nestvůry. AI_Output(self,other,"DIA_Wolf_BENGAR_geld_08_02"); //Tak se zatím měj. MIS_BengarsHelpingSLD = LOG_SUCCESS; AI_StopProcessInfos(self); }; }; func void DIA_Wolf_BENGAR_geld() { AI_Output(other,self,"DIA_Wolf_BENGAR_geld_15_00"); //Tady je zlato if(B_GiveInvItems(other,self,ItMi_Gold,Wolf_BENGAR_geld)) { AI_Output(self,other,"DIA_Wolf_BENGAR_geld_08_01"); //Fajn, a teď půjdu dohlídnout na ty nestvůry. Uvidíme, jestli se mi na té farmě podaří ještě někoho naverbovat. AI_Output(self,other,"DIA_Wolf_BENGAR_geld_08_02"); //Tak se zatím měj. MIS_BengarsHelpingSLD = LOG_SUCCESS; B_GivePlayerXP(XP_BengarsHelpingSLD); AI_StopProcessInfos(self); AI_UseMob(self,"BENCH",-1); Npc_ExchangeRoutine(self,"BengarsFarm"); B_StartOtherRoutine(SLD_815_Soeldner,"BengarsFarm"); B_StartOtherRoutine(SLD_817_Soeldner,"BengarsFarm"); } else { AI_Output(self,other,"DIA_Wolf_BENGAR_geld_08_03"); //No, kdybys měl dost peněz, už bych byl dávno na cestě. }; Info_ClearChoices(DIA_Wolf_BENGAR); }; func void DIA_Wolf_BENGAR_nochnicht() { AI_Output(other,self,"DIA_Wolf_BENGAR_nochnicht_15_00"); //Budu o tom přemýšlet. AI_Output(self,other,"DIA_Wolf_BENGAR_nochnicht_08_01"); //Fajn, ale ne abys mě shodil. Info_ClearChoices(DIA_Wolf_BENGAR); }; instance DIA_Wolf_PERMKAP3(C_Info) { npc = SLD_811_Wolf; nr = 80; condition = DIA_Wolf_PERMKAP3_Condition; information = DIA_Wolf_PERMKAP3_Info; permanent = TRUE; description = "Tak co, všechno v cajku?"; }; func int DIA_Wolf_PERMKAP3_Condition() { if((Kapitel >= 3) && (Npc_GetDistToWP(self,"FARM3") < 3000) && (MIS_BengarsHelpingSLD == LOG_SUCCESS) && (Wolf_IsOnBoard != LOG_SUCCESS)) { return TRUE; }; }; var int DIA_Wolf_PERMKAP3_onetime; func void DIA_Wolf_PERMKAP3_Info() { AI_Output(other,self,"DIA_Wolf_PERMKAP3_15_00"); //Tak co, všechno v cajku? if(Npc_IsDead(Bengar) && (DIA_Wolf_PERMKAP3_onetime == FALSE)) { AI_Output(self,other,"DIA_Wolf_PERMKAP3_08_01"); //Můj zaměstnavatel je mrtvý! No, a já si vždycky přál mít vlastní statek. if(MIS_ORсGREATWAR == LOG_Running) { AI_Output(self,other,"DIA_Wolf_PERMKAP3_08_03"); //S těmi skřety je to tu vo hubu! }; AI_StopProcessInfos(self); Npc_ExchangeRoutine(self,"BengarDead"); DIA_Wolf_PERMKAP3_onetime = TRUE; } else { AI_Output(self,other,"DIA_Wolf_PERMKAP3_08_02"); //No jasně! Všude ticho jako v chrámu!. if(MIS_ORсGREATWAR == LOG_Running) { AI_Output(self,other,"DIA_Wolf_PERMKAP3_08_04"); //Jen kdyby okolo nebyli skřeti! }; }; AI_StopProcessInfos(self); }; instance DIA_Wolf_KAP4_EXIT(C_Info) { npc = SLD_811_Wolf; nr = 999; condition = DIA_Wolf_KAP4_EXIT_Condition; information = DIA_Wolf_KAP4_EXIT_Info; permanent = TRUE; description = Dialog_Ende; }; func int DIA_Wolf_KAP4_EXIT_Condition() { if(Kapitel == 4) { return TRUE; }; }; func void DIA_Wolf_KAP4_EXIT_Info() { AI_StopProcessInfos(self); }; instance DIA_Wolf_KAP5_EXIT(C_Info) { npc = SLD_811_Wolf; nr = 999; condition = DIA_Wolf_KAP5_EXIT_Condition; information = DIA_Wolf_KAP5_EXIT_Info; permanent = TRUE; description = Dialog_Ende; }; func int DIA_Wolf_KAP5_EXIT_Condition() { if(Kapitel == 5) { return TRUE; }; }; func void DIA_Wolf_KAP5_EXIT_Info() { AI_StopProcessInfos(self); }; var int wolf_SaidNo; instance DIA_Wolf_SHIP(C_Info) { npc = SLD_811_Wolf; nr = 2; condition = DIA_Wolf_SHIP_Condition; information = DIA_Wolf_SHIP_Info; description = "Nelíbilo by se ti odsud vyplout na lodi?"; }; func int DIA_Wolf_SHIP_Condition() { if((MIS_SCKnowsWayToIrdorath == TRUE) && Npc_KnowsInfo(other,DIA_Wolf_Hallo) && (CAPITANORDERDIAWAY == FALSE) && (SCGotCaptain == TRUE) && (WOLFRECRUITEDDT == FALSE)) { return TRUE; }; }; func void DIA_Wolf_SHIP_Info() { AI_Output(other,self,"DIA_Wolf_SHIP_15_00"); //Nelíbilo by se ti odsud vyplout na lodi? if((MIS_BengarsHelpingSLD == LOG_SUCCESS) && !Npc_IsDead(Bengar)) { AI_Output(self,other,"DIA_Wolf_SHIP_08_01"); //Ne, už ne. Konečně jsem si našel práci. Možná někdy jindy. wolf_SaidNo = TRUE; } else { AI_Output(self,other,"DIA_Wolf_SHIP_08_02"); //No jasně, pojďme odsud. Můžu ti pomoct s obranou lodi. A kam máme namířeno? MIS_BengarsHelpingSLD = LOG_OBSOLETE; Log_CreateTopic(Topic_Crew,LOG_MISSION); Log_SetTopicStatus(Topic_Crew,LOG_Running); B_LogEntry(Topic_Crew,"Wolf už má tohoto ostrova plné zuby a udělal by cokoliv, jen aby se odsud dostal. Je to dobrý bojovník."); }; }; instance DIA_Wolf_KnowWhereEnemy(C_Info) { npc = SLD_811_Wolf; nr = 2; condition = DIA_Wolf_KnowWhereEnemy_Condition; information = DIA_Wolf_KnowWhereEnemy_Info; permanent = TRUE; description = "Chci se dostat na ostrov nedaleko odsud."; }; func int DIA_Wolf_KnowWhereEnemy_Condition() { if(Npc_KnowsInfo(other,DIA_Wolf_SHIP) && (wolf_SaidNo == FALSE) && (MIS_SCKnowsWayToIrdorath == TRUE) && (Wolf_IsOnBoard == FALSE) && (CAPITANORDERDIAWAY == FALSE) && (WOLFRECRUITEDDT == FALSE)) { return TRUE; }; }; func void DIA_Wolf_KnowWhereEnemy_Info() { AI_Output(other,self,"DIA_Wolf_KnowWhereEnemy_15_00"); //Chci se dostat na ostrov nedaleko odsud. AI_Output(self,other,"DIA_Wolf_KnowWhereEnemy_08_01"); //No tak na co ještě čekáme? Na moři tě můžu trochu pocvičit ve střelbě z luku a kuše. if(Crewmember_Count >= Max_Crew) { AI_Output(other,self,"DIA_Wolf_KnowWhereEnemy_15_02"); //Vlastně jsem si zrovna uvědomil, že už mám dost lidí. AI_Output(self,other,"DIA_Wolf_KnowWhereEnemy_08_03"); //(naštvaně) Tak TAKHLE to je! Nejdřív prudíš, ať se pohnu, a pak z toho nic není, co? AI_Output(self,other,"DIA_Wolf_KnowWhereEnemy_08_04"); //Jdi do hajzlu! Doufám, že se ta tvoje kocábka brzo potopí. AI_StopProcessInfos(self); } else { Info_ClearChoices(DIA_Wolf_KnowWhereEnemy); Info_AddChoice(DIA_Wolf_KnowWhereEnemy,"Musím o tom ještě trochu popřemýšlet.",DIA_Wolf_KnowWhereEnemy_No); Info_AddChoice(DIA_Wolf_KnowWhereEnemy,"Vítej na palubě!",DIA_Wolf_KnowWhereEnemy_Yes); }; }; func void DIA_Wolf_KnowWhereEnemy_Yes() { AI_Output(other,self,"DIA_Wolf_KnowWhereEnemy_Yes_15_00"); //Vítej na palubě! AI_Output(other,self,"DIA_Wolf_KnowWhereEnemy_Yes_15_01"); //Přijď dolů do přístavu, už brzo vyplujeme. AI_Output(self,other,"DIA_Wolf_KnowWhereEnemy_Yes_08_02"); //Už jdu. B_GivePlayerXP(XP_Crewmember_Success); Wolf_IsOnBoard = LOG_SUCCESS; Crewmember_Count = Crewmember_Count + 1; AI_StopProcessInfos(self); if(MIS_ReadyforChapter6 == TRUE) { Npc_ExchangeRoutine(self,"SHIP"); } else { Npc_ExchangeRoutine(self,"WAITFORSHIP"); }; }; func void DIA_Wolf_KnowWhereEnemy_No() { AI_Output(other,self,"DIA_Wolf_KnowWhereEnemy_No_15_00"); //Musím o tom ještě trochu popřemýšlet. AI_Output(self,other,"DIA_Wolf_KnowWhereEnemy_No_08_01"); //Hele, víš co si myslím? Že se jenom tak vytahuješ. Nevěřím ti ani slovo, vysmahni. Wolf_IsOnBoard = LOG_OBSOLETE; Info_ClearChoices(DIA_Wolf_KnowWhereEnemy); }; instance DIA_Wolf_LeaveMyShip(C_Info) { npc = SLD_811_Wolf; nr = 55; condition = DIA_Wolf_LeaveMyShip_Condition; information = DIA_Wolf_LeaveMyShip_Info; permanent = TRUE; description = "Stejně už mi nejsi k ničemu."; }; func int DIA_Wolf_LeaveMyShip_Condition() { if((Wolf_IsOnBoard == LOG_SUCCESS) && (MIS_ReadyforChapter6 == FALSE) && (WOLFRECRUITEDDT == FALSE)) { return TRUE; }; }; func void DIA_Wolf_LeaveMyShip_Info() { AI_Output(other,self,"DIA_Wolf_LeaveMyShip_15_00"); //Stejně už mi nejsi k ničemu. AI_Output(self,other,"DIA_Wolf_LeaveMyShip_08_01"); //Nejprve mi dáš naději a pak mě takhle odmítneš. Ty svině, za tohle zaplatíš! Wolf_IsOnBoard = LOG_FAILED; Crewmember_Count = Crewmember_Count - 1; AI_StopProcessInfos(self); B_Attack(self,other,AR_NONE,1); Npc_ExchangeRoutine(self,"Start"); }; instance DIA_Wolf_SHIPOFF(C_Info) { npc = SLD_811_Wolf; nr = 56; condition = DIA_Wolf_SHIPOFF_Condition; information = DIA_Wolf_SHIPOFF_Info; permanent = TRUE; description = "Poslouchej."; }; func int DIA_Wolf_SHIPOFF_Condition() { if((Wolf_IsOnBoard == LOG_FAILED) && (CAPITANORDERDIAWAY == FALSE) && (WOLFRECRUITEDDT == FALSE)) { return TRUE; }; }; func void DIA_Wolf_SHIPOFF_Info() { AI_Output(other,self,"DIA_Wolf_SHIPOFF_15_00"); //Poslouchej. AI_Output(self,other,"DIA_Wolf_SHIPOFF_08_01"); //Jdi do prdele, ty hajzle. AI_StopProcessInfos(self); B_Attack(self,other,AR_NONE,1); }; instance DIA_Wolf_KAP6_EXIT(C_Info) { npc = SLD_811_Wolf; nr = 999; condition = DIA_Wolf_KAP6_EXIT_Condition; information = DIA_Wolf_KAP6_EXIT_Info; permanent = TRUE; description = Dialog_Ende; }; func int DIA_Wolf_KAP6_EXIT_Condition() { if(Kapitel >= 6) { return TRUE; }; }; func void DIA_Wolf_KAP6_EXIT_Info() { AI_StopProcessInfos(self); }; instance DIA_Wolf_PICKPOCKET(C_Info) { npc = SLD_811_Wolf; nr = 900; condition = DIA_Wolf_PICKPOCKET_Condition; information = DIA_Wolf_PICKPOCKET_Info; permanent = TRUE; description = PICKPOCKET_COMM; }; func int DIA_Wolf_PICKPOCKET_Condition() { return C_Beklauen(32,35); }; func void DIA_Wolf_PICKPOCKET_Info() { Info_ClearChoices(DIA_Wolf_PICKPOCKET); Info_AddChoice(DIA_Wolf_PICKPOCKET,Dialog_Back,DIA_Wolf_PICKPOCKET_BACK); Info_AddChoice(DIA_Wolf_PICKPOCKET,DIALOG_PICKPOCKET,DIA_Wolf_PICKPOCKET_DoIt); }; func void DIA_Wolf_PICKPOCKET_DoIt() { B_Beklauen(); Info_ClearChoices(DIA_Wolf_PICKPOCKET); }; func void DIA_Wolf_PICKPOCKET_BACK() { Info_ClearChoices(DIA_Wolf_PICKPOCKET); }; instance DIA_WOLF_BONUSMINECRAWLERPLATES(C_Info) { npc = SLD_811_Wolf; nr = 2; condition = dia_wolf_bonusminecrawlerplates_condition; information = dia_wolf_bonusminecrawlerplates_info; permanent = FALSE; description = "Mám jednu otázku."; }; func int dia_wolf_bonusminecrawlerplates_condition() { if(Npc_KnowsInfo(hero,DIA_Wolf_AboutCrawler) && (BONUSMINECRAWLERARMOR == FALSE)) { return TRUE; }; }; func void dia_wolf_bonusminecrawlerplates_info() { B_GivePlayerXP(50); AI_Output(other,self,"DIA_Wolf_BonusMineCrawlerPlates_01_00"); //Mám jednu otázku. AI_Output(self,other,"DIA_Wolf_BonusMineCrawlerPlates_01_01"); //Tak mě nenapínej! AI_Output(other,self,"DIA_Wolf_BonusMineCrawlerPlates_01_02"); //Slyšel jsem, že pláty červů se dají získávat účinněji, je to pravda? AI_Output(self,other,"DIA_Wolf_BonusMineCrawlerPlates_01_03"); //Ne, chlape - to jsou jen pohádky! (směje se) Staré bajky od starých lovců. AI_Output(self,other,"DIA_Wolf_BonusMineCrawlerPlates_01_04"); //Na tvém místě bych tomu moc nevěřil. }; instance DIA_WOLF_ABOUTCRAWLERAGAIN(C_Info) { npc = SLD_811_Wolf; nr = 1; condition = dia_wolf_aboutcrawleragain_condition; information = dia_wolf_aboutcrawleragain_info; permanent = FALSE; description = "Potřebuji další zbroj z důlního červa."; }; func int dia_wolf_aboutcrawleragain_condition() { if((Player_GotCrawlerArmor == TRUE) && (GIVECRAWLERARMOR == FALSE) && ((MIS_BAREMCRAWLERARMOR == LOG_Running) || (MIS_BAREMCRAWLERARMOR == LOG_SUCCESS))) { return TRUE; }; }; func void dia_wolf_aboutcrawleragain_info() { AI_Output(other,self,"DIA_Wolf_AboutCrawlerAgain_01_00"); //Potřebuji další zbroj z důlního červa. AI_Output(self,other,"DIA_Wolf_AboutCrawlerAgain_01_01"); //To jich potřebuješ tolik? (překvapeně)No, mě je to jedno, ale znáš pravidla - nejdříve mi musíš přinést jejich krunýře. AI_Output(self,other,"DIA_Wolf_AboutCrawlerAgain_01_02"); //Pak ti ji udělám. }; instance DIA_WOLF_BRINGPLATESAGAIN(C_Info) { npc = SLD_811_Wolf; nr = 3; condition = dia_wolf_bringplatesagain_condition; information = dia_wolf_bringplatesagain_info; permanent = FALSE; description = "Sehnal jsem ty červí krunýře na zbroj."; }; func int dia_wolf_bringplatesagain_condition() { if(Npc_KnowsInfo(hero,dia_wolf_aboutcrawleragain) && (Npc_HasItems(other,ItAt_CrawlerPlate) >= 10) && (GIVECRAWLERPLATE == FALSE) && (GIVECRAWLERARMOR == FALSE)) { return TRUE; }; }; func void dia_wolf_bringplatesagain_info() { AI_Output(other,self,"DIA_Wolf_BringPlates_15_00"); //Sehnal jsem ty červí krunýře na zbroj. AI_Output(self,other,"DIA_Wolf_BringPlates_08_01"); //Skvělé, tak je sem dej. B_GiveInvItems(other,self,ItAt_CrawlerPlate,10); GIVECRAWLERPLATE = TRUE; WOLF_ARMOR_DAY_AGAIN = Wld_GetDay(); }; instance DIA_WOLF_ARMORREADYAGAIN(C_Info) { npc = SLD_811_Wolf; nr = 1; condition = dia_wolf_armorreadyagain_condition; information = dia_wolf_armorreadyagain_info; permanent = TRUE; description = "Prima, a kdy ta zbroj bude?"; }; func int dia_wolf_armorreadyagain_condition() { if((GIVECRAWLERPLATE == TRUE) && (GIVECRAWLERARMOR == FALSE)) { return TRUE; }; }; func void dia_wolf_armorreadyagain_info() { var int currentday; currentday = Wld_GetDay(); AI_Output(other,self,"DIA_Wolf_ArmorReady_15_00"); //Prima, a kdy ta zbroj bude? if(WOLF_ARMOR_DAY_AGAIN <= (currentday - 1)) { Npc_RemoveInvItems(self,ItAt_CrawlerPlate,10); AI_Output(self,other,"DIA_Wolf_ArmorReady_08_02"); //Už jsem ji dokončil, tady je. B_GiveInvItems(self,other,ITAR_DJG_Crawler,1); AI_Output(self,other,"DIA_Wolf_ArmorReady_08_03"); //Snad ti dobře padne... AI_Output(other,self,"DIA_Wolf_ArmorReady_15_04"); //Díky! AI_Output(self,other,"DIA_Wolf_ArmorReady_08_05"); //Není zač. GIVECRAWLERARMOR = TRUE; } else { AI_Output(self,other,"DIA_Wolf_ArmorReady_08_01"); //Jen co ji dám dohromady. Vrať se zítra. }; }; instance DIA_WOLF_NW_KAPITELORCATTACK(C_Info) { npc = SLD_811_Wolf; nr = 1; condition = dia_wolf_nw_kapitelorcattack_condition; information = dia_wolf_nw_kapitelorcattack_info; permanent = FALSE; description = "Co budeš dělat?"; }; func int dia_wolf_nw_kapitelorcattack_condition() { if((MIS_HELPCREW == LOG_Running) && (MOVECREWTOHOME == FALSE) && (WOLFBACKNW == TRUE)) { return TRUE; }; }; func void dia_wolf_nw_kapitelorcattack_info() { AI_Output(other,self,"DIA_Wolf_NW_KapitelOrcAttack_01_00"); //Co budeš dělat? AI_Output(self,other,"DIA_Wolf_NW_KapitelOrcAttack_01_01"); //Zmizím odsud jakmile to bude možné! AI_Output(self,other,"DIA_Wolf_NW_KapitelOrcAttack_01_02"); //Nevím jak to udělám, ale každopádně nezůstanu zde! Info_ClearChoices(dia_wolf_nw_kapitelorcattack); if(Npc_HasItems(other,ItMi_TeleportFarm) >= 1) { Info_AddChoice(dia_wolf_nw_kapitelorcattack,"Nabídnout runu na Onarovu farmu.",dia_wolf_nw_kapitelorcattack_farm); }; Info_AddChoice(dia_wolf_nw_kapitelorcattack,"Já také ne.",dia_wolf_nw_kapitelorcattack_nogiverune); }; func void dia_wolf_nw_kapitelorcattack_farm() { B_GivePlayerXP(200); AI_Output(other,self,"DIA_Wolf_NW_KapitelOrcAttack_Farm_01_01"); //Mám tu runu na Onarovu farmu. AI_Output(other,self,"DIA_Wolf_NW_KapitelOrcAttack_Farm_01_02"); //Jestli chceš, použij ji. AI_Output(self,other,"DIA_Wolf_NW_KapitelOrcAttack_Farm_01_03"); //Runu?! AI_Output(self,other,"DIA_Wolf_NW_KapitelOrcAttack_Farm_01_05"); //Dobrá, dej mi ji. AI_Output(other,self,"DIA_Wolf_NW_KapitelOrcAttack_Farm_01_06"); //Tu máš. B_GiveInvItems(other,self,ItMi_TeleportFarm,1); Npc_RemoveInvItems(self,ItMi_TeleportFarm,1); AI_Output(self,other,"DIA_Wolf_NW_KapitelOrcAttack_Farm_01_07"); //Eh! Doufám, že se ještě uvidíme. AI_Output(self,other,"DIA_Wolf_NW_KapitelOrcAttack_Farm_01_11"); //Kdyžtak budu na farmě! AI_Output(other,self,"DIA_Wolf_NW_KapitelOrcAttack_Farm_01_12"); //Samozřejmě. WOLFNOBATTLETHROUGTH = TRUE; B_LogEntry(TOPIC_HELPCREW,"Dal jsem Wolfovi runu na Onarovu farmu!"); PERMCOUNTBACKNW = PERMCOUNTBACKNW + 1; b_countbackcrew(); AI_StopProcessInfos(self); }; func void dia_wolf_nw_kapitelorcattack_nogiverune() { B_GivePlayerXP(50); AI_Output(other,self,"DIA_Wolf_NW_KapitelOrcAttack_NoGiveRune_01_01"); //Já také ne. AI_Output(self,other,"DIA_Wolf_NW_KapitelOrcAttack_NoGiveRune_01_02"); //(povzdech) Pokusíme se prosekat městem. AI_Output(self,other,"DIA_Wolf_NW_KapitelOrcAttack_NoGiveRune_01_04"); //Asi je to ejdiná šance na přežití! B_LogEntry(TOPIC_HELPCREW,"Wolf se pokusí dostat z města, ale nemyslím, že má moc velké šance."); WOLFBATTLETHROUGTH = TRUE; PERMCOUNTBACKNW = PERMCOUNTBACKNW + 1; b_countbackcrew(); AI_StopProcessInfos(self); }; instance DIA_SLD_811_WOLF_FUCKOFF(C_Info) { npc = SLD_811_Wolf; nr = 2; condition = dia_sld_811_wolf_fuckoff_condition; information = dia_sld_811_wolf_fuckoff_info; permanent = TRUE; important = TRUE; }; func int dia_sld_811_wolf_fuckoff_condition() { if(Npc_IsInState(self,ZS_Talk) && (WOLFCAPTURED == TRUE) && (MIS_HUNTERSARMOR != LOG_Running) && (HORINISISFREE == FALSE)) { return TRUE; }; }; func void dia_sld_811_wolf_fuckoff_info() { B_Say(self,other,"$NOTNOW"); AI_StopProcessInfos(self); Npc_SetRefuseTalk(self,300); }; instance DIA_SLD_811_WOLF_YOURFREE(C_Info) { npc = SLD_811_Wolf; nr = 1; condition = dia_sld_811_wolf_yourfree_condition; information = dia_sld_811_wolf_yourfree_info; permanent = FALSE; important = TRUE; }; func int dia_sld_811_wolf_yourfree_condition() { if(Npc_IsInState(self,ZS_Talk) && (WOLFCAPTURED == TRUE) && (HORINISISFREE == TRUE) && (CAPTUREDMANSISFREE == FALSE)) { return TRUE; }; }; func void dia_sld_811_wolf_yourfree_info() { AI_Output(self,other,"DIA_SLD_811_Wolf_YourFree_01_08"); //Co tu děláš? AI_Output(other,self,"DIA_SLD_811_Wolf_YourFree_01_00"); //Jsi volný! AI_Output(self,other,"DIA_SLD_811_Wolf_YourFree_01_01"); //Hmm... (udiveně) Takže jsi skřety vyhnal z města?! AI_Output(other,self,"DIA_SLD_811_Wolf_YourFree_01_02"); //Už to tak bude. if(COUNTCAPTURED > 1) { AI_Output(self,other,"DIA_SLD_811_Wolf_YourFree_01_03"); //Výborně příteli! Už jsem myslel že se odsud nedostanu. AI_Output(self,other,"DIA_SLD_811_Wolf_YourFree_01_04"); //Otevři prosím ty mříže. } else { AI_Output(self,other,"DIA_SLD_811_Wolf_YourFree_01_05"); //Výborně příteli! Už jsem myslel že se odsud nedostanu. AI_Output(self,other,"DIA_SLD_811_Wolf_YourFree_01_06"); //Otevři prosím ty mříže. }; CAPTUREDMANSISFREE = TRUE; AI_StopProcessInfos(self); }; instance DIA_SLD_811_WOLF_OPENGATENOW(C_Info) { npc = SLD_811_Wolf; nr = 1; condition = dia_sld_811_wolf_opengatenow_condition; information = dia_sld_811_wolf_opengatenow_info; permanent = TRUE; important = TRUE; }; func int dia_sld_811_wolf_opengatenow_condition() { if(Npc_IsInState(self,ZS_Talk) && (WOLFCAPTURED == TRUE) && (HORINISISFREE == TRUE) && (CAPTUREDMANSISFREE == TRUE) && (WOLFISFREE == FALSE) && (WOLFRECRUITEDDT == FALSE)) { return TRUE; }; }; func void dia_sld_811_wolf_opengatenow_info() { AI_Output(self,other,"DIA_SLD_811_Wolf_OpenGateNow_01_00"); //No tak, kamaráde...(prosí) Pusť mě ven! AI_StopProcessInfos(self); }; instance DIA_WOLF_NW_WOLFNOTCAPTURED(C_Info) { npc = SLD_811_Wolf; nr = 1; condition = dia_wolf_nw_wolfnotcaptured_condition; information = dia_wolf_nw_wolfnotcaptured_info; permanent = FALSE; description = "Mám pro tebe prácičku."; }; func int dia_wolf_nw_wolfnotcaptured_condition() { if((MIS_HUNTERSARMOR == LOG_Running) && (WOLFCAPTURED == FALSE)) { return TRUE; }; }; func void dia_wolf_nw_wolfnotcaptured_info() { AI_Output(other,self,"DIA_Wolf_NW_WolfNotCaptured_01_00"); //Mám pro tebe prácičku. AI_Output(self,other,"DIA_Wolf_NW_WolfNotCaptured_01_01"); //Prácičku?! Hmm...(se zájmem) O co jde? AI_Output(other,self,"DIA_Wolf_NW_WolfNotCaptured_01_02"); //Nezbytně potřebuji zbroje z důlního červa. AI_Output(self,other,"DIA_Wolf_NW_WolfNotCaptured_01_03"); //Dobrá, přines další pláty a ještě jednu bych ti udělal. AI_Output(other,self,"DIA_Wolf_NW_WolfNotCaptured_01_04"); //Ale já potřebuji alespoň deset... AI_Output(self,other,"DIA_Wolf_NW_WolfNotCaptured_01_05"); //Deset?!... (udiveně) Ale na co tolik? AI_Output(other,self,"DIA_Wolf_NW_WolfNotCaptured_01_06"); //To je na dlouho. Uděláš to pro mě? AI_Output(self,other,"DIA_Wolf_NW_WolfNotCaptured_01_07"); //Hmm...(zamyšleně) No, tak asi ano, ale potřebuji materiál a hlavně hodně času. AI_Output(self,other,"DIA_Wolf_NW_WolfNotCaptured_01_09"); //Alespoň jeden měsíc. AI_Output(other,self,"DIA_Wolf_NW_WolfNotCaptured_01_10"); //To je moc, potřebuji je rychle. AI_Output(self,other,"DIA_Wolf_NW_WolfNotCaptured_01_11"); //V tom případě... Ti nemohu pomoci! AI_Output(other,self,"DIA_Wolf_NW_WolfNotCaptured_01_12"); //Nemůžeš mě alepoň naučit, jak se dělají? AI_Output(self,other,"DIA_Wolf_NW_WolfNotCaptured_01_13"); //Naučit tě to?! Hmm...(zamyšleně) Dobrá ale toto tajemství bude velmi drahé! AI_Output(other,self,"DIA_Wolf_NW_WolfNotCaptured_01_14"); //Kolik? AI_Output(self,other,"DIA_Wolf_NW_WolfNotCaptured_01_15"); //Alespoň 5000 a podělím se o něj. B_LogEntry(TOPIC_HUNTERSARMOR,"Wolfovi by výroba zbrojí trvala celý měsíc! Požádal jsem ho, jestli by mě to nenaučil. Souhlasil, ale chce 5000 zlatých!"); Info_ClearChoices(dia_wolf_nw_wolfnotcaptured); Info_AddChoice(dia_wolf_nw_wolfnotcaptured,"Nemám tolik zlata.",dia_wolf_nw_wolfnotcaptured_nomoney); if(Npc_HasItems(other,ItMi_Gold) >= 5000) { Info_AddChoice(dia_wolf_nw_wolfnotcaptured,"Dobře! Tady ho máš.",dia_wolf_nw_wolfnotcaptured_heremoney); }; }; func void dia_wolf_nw_wolfnotcaptured_nomoney() { AI_Output(other,self,"DIA_Wolf_NW_WolfNotCaptured_NoMoney_01_00"); //Nemám tolik zlata. AI_Output(self,other,"DIA_Wolf_NW_WolfNotCaptured_NoMoney_01_01"); //Tak si nějaké najdi a pak si promluvíme! AI_Output(other,self,"DIA_Wolf_NW_WolfNotCaptured_NoMoney_01_02"); //Dobrá. WOLFNOTTEACHMEARMOR = TRUE; Info_ClearChoices(dia_wolf_nw_wolfnotcaptured); }; func void dia_wolf_nw_wolfnotcaptured_heremoney() { B_GivePlayerXP(200); AI_Output(other,self,"DIA_Wolf_NW_WolfNotCaptured_HereMoney_01_00"); //Tady ho máš. B_GiveInvItems(other,self,ItMi_Gold,5000); AI_Output(self,other,"DIA_Wolf_NW_WolfNotCaptured_HereMoney_01_01"); //Dobrá... (úsměv) Tady máš klíč. B_GiveInvItems(self,other,itke_wolfarmor,1); AI_Output(self,other,"DIA_Wolf_NW_WolfNotCaptured_HereMoney_01_02"); //Je od mé staré truhly, kde jsem schovával postupy výroby. AI_Output(other,self,"DIA_Wolf_NW_WolfNotCaptured_HereMoney_01_04"); //A kde je? AI_Output(self,other,"DIA_Wolf_NW_WolfNotCaptured_HereMoney_01_05"); //V mé staré chatce v Hornickém údolí. AI_Output(self,other,"DIA_Wolf_NW_WolfNotCaptured_HereMoney_01_06"); //Snad se s ní nic nestalo. B_LogEntry(TOPIC_HUNTERSARMOR,"Wolf mi dal klíč od jeho staré truhly v Hornickém údolí. Měl bych zajít do starého Nového tábora a najít ji!"); WOLFTEACHMEARMOR = TRUE; Info_ClearChoices(dia_wolf_nw_wolfnotcaptured); }; instance DIA_WOLF_NW_WOLFNOTCAPTUREDPERM(C_Info) { npc = SLD_811_Wolf; nr = 1; condition = dia_wolf_nw_wolfnotcapturedperm_condition; information = dia_wolf_nw_wolfnotcapturedperm_info; permanent = TRUE; description = "Prodej mi to tajmeství."; }; func int dia_wolf_nw_wolfnotcapturedperm_condition() { if((MIS_HUNTERSARMOR == LOG_Running) && (WOLFNOTTEACHMEARMOR == TRUE) && (WOLFTEACHMEARMOR == FALSE)) { return TRUE; }; }; func void dia_wolf_nw_wolfnotcapturedperm_info() { AI_Output(other,self,"DIA_Wolf_NW_WolfNotCapturedPerm_01_00"); //Prodej mi to tajmeství. AI_Output(self,other,"DIA_Wolf_NW_WolfNotCapturedPerm_01_01"); //Jak sem řekl za 5000, jasné? Info_ClearChoices(dia_wolf_nw_wolfnotcapturedperm); Info_AddChoice(dia_wolf_nw_wolfnotcapturedperm,"Tolik nemám.",dia_wolf_nw_wolfnotcapturedperm_nomoney); if(Npc_HasItems(other,ItMi_Gold) >= 5000) { Info_AddChoice(dia_wolf_nw_wolfnotcapturedperm,"Dobře! Tady ho máš.",dia_wolf_nw_wolfnotcapturedperm_heremoney); }; }; func void dia_wolf_nw_wolfnotcapturedperm_nomoney() { AI_Output(other,self,"DIA_Wolf_NW_WolfNotCapturedPerm_NoMoney_01_00"); //Tolik nemám. AI_Output(self,other,"DIA_Wolf_NW_WolfNotCapturedPerm_NoMoney_01_01"); //Tak ti nic neřeknu. AI_Output(other,self,"DIA_Wolf_NW_WolfNotCapturedPerm_NoMoney_01_02"); //Dobře. Info_ClearChoices(dia_wolf_nw_wolfnotcapturedperm); }; func void dia_wolf_nw_wolfnotcapturedperm_heremoney() { B_GivePlayerXP(100); AI_Output(other,self,"DIA_Wolf_NW_WolfNotCapturedPerm_HereMoney_01_00"); //Tady ho máš. B_GiveInvItems(other,self,ItMi_Gold,5000); AI_Output(self,other,"DIA_Wolf_NW_WolfNotCapturedPerm_HereMoney_01_01"); //Dobrá... (úsměv) Tu máš klíč. B_GiveInvItems(self,other,itke_wolfarmor,1); AI_Output(self,other,"DIA_Wolf_NW_WolfNotCapturedPerm_HereMoney_01_02"); //Je od mé staré truhly, kde jsem schovával postupy výroby. AI_Output(other,self,"DIA_Wolf_NW_WolfNotCapturedPerm_HereMoney_01_04"); //A kde je? AI_Output(self,other,"DIA_Wolf_NW_WolfNotCapturedPerm_HereMoney_01_05"); //V mé staré chatce v Hornickém údolí. AI_Output(self,other,"DIA_Wolf_NW_WolfNotCapturedPerm_HereMoney_01_06"); //Snad se s ní nic nestalo. B_LogEntry(TOPIC_HUNTERSARMOR,"Wolf mi dal klíč od jeho staré truhly v Hornickém údolí. Měl bych zajít do starého Nového tábora a najít ji."); WOLFTEACHMEARMOR = TRUE; Info_ClearChoices(dia_wolf_nw_wolfnotcapturedperm); }; instance DIA_WOLF_NW_WOLFCAPTURED(C_Info) { npc = SLD_811_Wolf; nr = 1; condition = dia_wolf_nw_wolfcaptured_condition; information = dia_wolf_nw_wolfcaptured_info; permanent = FALSE; description = "Kde se tu bereš?"; }; func int dia_wolf_nw_wolfcaptured_condition() { if((MIS_HUNTERSARMOR == LOG_Running) && (WOLFCAPTURED == TRUE) && (WOLFRECRUITEDDT == FALSE)) { return TRUE; }; }; func void dia_wolf_nw_wolfcaptured_info() { B_GivePlayerXP(300); AI_Output(other,self,"DIA_Wolf_NW_WolfCaptured_01_00"); //Kde se tu bereš? AI_Output(self,other,"DIA_Wolf_NW_WolfCaptured_01_01"); //Skřeti mě zajali, když jsem se snažil probít městem s ostatními. AI_Output(self,other,"DIA_Wolf_NW_WolfCaptured_01_02"); //Nevím, proč mě nezabili. K čemu jim jsem? AI_Output(self,other,"DIA_Wolf_NW_WolfCaptured_01_04"); //Jaktože si tady? AI_Output(other,self,"DIA_Wolf_NW_WolfCaptured_01_05"); //Mám pro tebe práci. AI_Output(self,other,"DIA_Wolf_NW_WolfCaptured_01_06"); //Práci?! Hmm...(se zájmem) O co jde? AI_Output(self,other,"DIA_Wolf_NW_WolfCaptured_01_07"); //O co přesně jde? AI_Output(other,self,"DIA_Wolf_NW_WolfCaptured_01_08"); //Potřebuji další zbroj z červů. AI_Output(self,other,"DIA_Wolf_NW_WolfCaptured_01_09"); //Aha... Ale jak ji mohu udělat zde?! AI_Output(self,other,"DIA_Wolf_NW_WolfCaptured_01_10"); //Skřeti mě nepustí na čestné slovo. AI_Output(other,self,"DIA_Wolf_NW_WolfCaptured_01_11"); //A řekneš mi jak to mohu udělat? AI_Output(self,other,"DIA_Wolf_NW_WolfCaptured_01_15"); //Tady, vem si tento klíč. B_GiveInvItems(self,other,itke_wolfarmor,1); AI_Output(self,other,"DIA_Wolf_NW_WolfCaptured_01_16"); //Je od mé staré truhly, kde jsem schovával postupy výroby. AI_Output(other,self,"DIA_Wolf_NW_WolfCaptured_01_17"); //Kde přesně je? AI_Output(self,other,"DIA_Wolf_NW_WolfCaptured_01_18"); //V mé staré chatce v Hornickém údolí. AI_Output(self,other,"DIA_Wolf_NW_WolfCaptured_01_19"); //Snad se s ní nic nestalo. WOLFMEETINPRISON = TRUE; WOLFTEACHMEARMOR = TRUE; B_LogEntry(TOPIC_HUNTERSARMOR,"Našel jsem Wolfa! Řekl mi jak se dostanu k nákresům zbroje. Dal mi klíč od jeho staré truhly v Hornickém údolí. Měl bych zajít do starého Nového tábora a najít ji."); }; var int CanDoCrawlwerPlateDay; var int Player_GotCrawlerShield; instance DIA_Wolf_CaracustPlate(C_Info) { npc = SLD_811_Wolf; nr = 3; condition = DIA_Wolf_CaracustPlate_Condition; information = DIA_Wolf_CaracustPlate_Info; permanent = FALSE; description = "Mám tady jeden neobvyklej krunýř."; }; func int DIA_Wolf_CaracustPlate_Condition() { if((CanDoCrawlwerPlate == TRUE) && (Npc_HasItems(other,ItAt_ZaracustPlate) >= 1)) { return TRUE; }; }; func void DIA_Wolf_CaracustPlate_Info() { B_GivePlayerXP(500); AI_Output(other,self,"DIA_Wolf_CaracustPlate_01_00"); //Mám tady jeden neobvyklej krunýř. AI_Output(self,other,"DIA_Wolf_CaracustPlate_01_01"); //(se smíchem) A proč si myslíš, že je neobvyklej? AI_Output(other,self,"DIA_Wolf_CaracustPlate_01_02"); //Tady, sám se podívej. B_GiveInvItems(other,self,ItAt_ZaracustPlate,1); Npc_RemoveInvItems(self,ItAt_ZaracustPlate,1); if(Trophy_CaracustPlate == TRUE) { Ext_RemoveFromSlot(other,"BIP01 PELVIS"); Npc_RemoveInvItems(other,ItUt_CaracustPlate,Npc_HasItems(other,ItUt_CaracustPlate)); Trophy_CaracustPlate = FALSE; }; AI_Output(self,other,"DIA_Wolf_CaracustPlate_01_03"); //Spravedlivý Innosi! (ohromený) Je úžasnej! AI_Output(other,self,"DIA_Wolf_CaracustPlate_01_04"); //Co překvapil jsem tě? AI_Output(self,other,"DIA_Wolf_CaracustPlate_01_05"); //To je slabé slovo kamaráde, něco takového jsem ještě neviděl! AI_Output(self,other,"DIA_Wolf_CaracustPlate_01_06"); //Jen se můžu dohadovat, jak velká bylo to monstrum, co ho nosilo. AI_Output(other,self,"DIA_Wolf_CaracustPlate_01_07"); //Věř mi, nechtěl bys to potkat. AI_Output(other,self,"DIA_Wolf_CaracustPlate_01_08"); //Ale chtěl jsem se zeptat na něco jiného. Dá se z toho vyrobit něco užitečného? AI_Output(self,other,"DIA_Wolf_CaracustPlate_01_09"); //Hmm... (zamyšleně) Na zbroj to moc vhodný není, ale štít by z toho mohl být dobrej. AI_Output(other,self,"DIA_Wolf_CaracustPlate_01_11"); //To zní dobře a dokázal bys to? AI_Output(self,other,"DIA_Wolf_CaracustPlate_01_12"); //Samozřejmě. Ale musím si s tím pohrát, abych krunýř opracoval správným způsobem. AI_Output(other,self,"DIA_Wolf_CaracustPlate_01_13"); //A kolik času potřebuješ, abys z něho vytvořil štít? AI_Output(self,other,"DIA_Wolf_CaracustPlate_01_14"); //Když mě nic nebude rozptylovat, může to být za pár dní. AI_Output(other,self,"DIA_Wolf_CaracustPlate_01_15"); //Dobře, tak se vrátím později. CanDoCrawlwerPlateDay = Wld_GetDay(); }; instance DIA_Wolf_CaracustPlate_Ready(C_Info) { npc = SLD_811_Wolf; nr = 4; condition = DIA_Wolf_CaracustPlate_Ready_Condition; information = DIA_Wolf_CaracustPlate_Ready_Info; permanent = TRUE; description = "Jak je na tom můj štít?"; }; func int DIA_Wolf_CaracustPlate_Ready_Condition() { if(Npc_KnowsInfo(other,DIA_Wolf_CaracustPlate) && (Player_GotCrawlerShield == FALSE)) { return TRUE; }; }; func void DIA_Wolf_CaracustPlate_Ready_Info() { var int DayNow; DayNow = Wld_GetDay(); AI_Output(other,self,"DIA_Wolf_CaracustPlate_Ready_01_00"); //Jak je na tom můj štít? if(CanDoCrawlwerPlateDay >= (DayNow - 2)) { AI_Output(self,other,"DIA_Wolf_CaracustPlate_Ready_01_01"); //Zatím není hotov, tak mě nezdržuj jestli ho chceš mít co nejdřív. } else { AI_Output(self,other,"DIA_Wolf_CaracustPlate_Ready_01_02"); //Je hotový! Tady ho máš. B_GiveInvItems(self,other,ItAr_Shield_Caracust,1); AI_Output(self,other,"DIA_Wolf_CaracustPlate_Ready_01_03"); //Podle mě - se to celkem povedlo...(zvažuje) Nade vší pochybnost, samozřejmě, musíš ho prověřit v boji! AI_Output(other,self,"DIA_Wolf_CaracustPlate_Ready_01_04"); //Paráda, co jsem dlužen za práci? AI_Output(self,other,"DIA_Wolf_CaracustPlate_Ready_01_05"); //Ne - peníze od tebe za tu práci nechci. AI_Output(self,other,"DIA_Wolf_CaracustPlate_Ready_01_06"); //Stačí, že jsem strávil čas něčím užitečným, když jsem to pro tebe vyráběl. Player_GotCrawlerShield = TRUE; }; }; instance DIA_WOLF_NW_RECRDT(C_Info) { npc = SLD_811_Wolf; nr = 23; condition = dia_wolf_nw_recrdt_condition; information = dia_wolf_nw_recrdt_info; permanent = FALSE; description = "Vzpomínam si, že jsi hledal práci."; }; func int dia_wolf_nw_recrdt_condition() { if((HURRAYICANHIRE == TRUE) && Npc_KnowsInfo(other,DIA_Wolf_WannaBuy) && (MIS_BengarsHelpingSLD != LOG_SUCCESS) && !Npc_KnowsInfo(other,DIA_Wolf_SHIP) && (ConcertLoaBonus == TRUE)) { return TRUE; }; }; func void dia_wolf_nw_recrdt_info() { AI_Output(other,self,"DIA_WOLF_NW_RecrDT_15_00"); //Vzpomínam si, že jsi hledal práci. AI_Output(other,self,"DIA_WOLF_NW_RecrDT_15_01"); //A uspokojí tě zaměstnavatel jako já? AI_Output(self,other,"DIA_WOLF_NW_RecrDT_01_02"); //Všichni platí jedním a tím samým zlatem, otazka ale zní kolik, takže mě je jedno pro koho pracuji. Ale vás ja trochu znám. Má to něco společného s tvým přistěhováním k nám do okolí? AI_Output(other,self,"DIA_WOLF_NW_RecrDT_15_03"); //Přímo. Potřebuji strážce do věže v době mé nepřítomnosti. Co myslíš? AI_Output(self,other,"DIA_WOLF_NW_RecrDT_01_04"); //Fajn. Souhlasím. Ale já potřebuji zaplatit dopředu za pár měsíců. AI_Output(other,self,"DIA_WOLF_NW_RecrDT_01_05"); //Kolik? AI_Output(self,other,"DIA_WOLF_NW_RecrDT_15_06"); //Dva tisíce zlatých mincí! }; instance DIA_WOLF_NW_RECRDTFINALLY(C_Info) { npc = SLD_811_Wolf; nr = 23; condition = dia_wolf_nw_recrdtfinally_condition; information = dia_wolf_nw_recrdtfinally_info; permanent = FALSE; description = "Tady máš prachy!"; }; func int dia_wolf_nw_recrdtfinally_condition() { if((HURRAYICANHIRE == TRUE) && Npc_KnowsInfo(other,dia_wolf_nw_recrdt) && (MIS_BengarsHelpingSLD != LOG_SUCCESS) && !Npc_KnowsInfo(other,DIA_Wolf_SHIP) && (Npc_HasItems(other,ItMi_Gold) >= 2000)) { return TRUE; }; }; func void dia_wolf_nw_recrdtfinally_info() { B_GivePlayerXP(300); AI_Output(other,self,"DIA_WOLF_NW_RecrDTFinally_15_00"); //Tady máš prachy! A teď zvedni prdel a praskej makat! B_GiveInvItems(other,self,ItMi_Gold,2000); Npc_RemoveInvItems(self,ItMi_Gold,2000); AI_Output(self,other,"DIA_WOLF_NW_RecrDTFinally_01_01"); //Och, zapnul šéfa! Mě se líbi! Ano šéfe, už běžím! AI_Output(self,other,"DIA_WOLF_NW_RecrDTFinally_01_02"); //Jo, mimochodem... budeš proti, když naverbuju pro ochranu pár bojovníku? AI_Output(other,self,"DIA_WOLF_NW_RecrDTFinally_01_03"); //Jasně, že ne. Ochrana navíc ještě nikdy nikomu neublížila. Tedy jen pokud mě nebude stát jako několik dalších Wolfů, a taky jestli ti budou pomahat v práci a ne v pití. AI_Output(other,self,"DIA_WOLF_NW_RecrDTFinally_01_04"); //Aha, ano, heslo k průchodu do tábora je fráze 'dračí poklad'. Nezapomeň! AI_Output(self,other,"DIA_WOLF_NW_RecrDTFinally_01_05"); //Och, tak originální heslo nikdy nezapomenu. Uvidime se v táboře! B_LogEntry(TOPIC_PPL_FOR_TOWER,"Naverboval jsem Wolfa na ochranu věže."); self.npcType = NPCTYPE_FRIEND; self.aivar[AIV_ToughGuy] = TRUE; self.aivar[AIV_IGNORE_Theft] = TRUE; self.aivar[AIV_IGNORE_Sheepkiller] = TRUE; self.aivar[AIV_IgnoresArmor] = TRUE; WOLFRECRUITEDDT = TRUE; WolfDayHire = Wld_GetDay(); AI_StopProcessInfos(self); Npc_ExchangeRoutine(self,"InTower"); Wld_InsertNpc(SLD_8111_Soeldner,"NW_CASTLEMINE_TOWER_NAVIGATION"); Wld_InsertNpc(SLD_8112_Soeldner,"NW_CASTLEMINE_TOWER_NAVIGATION2"); }; instance DIA_Wolf_Bonus(C_Info) { npc = SLD_811_Wolf; nr = 2; condition = DIA_Wolf_Bonus_Condition; information = DIA_Wolf_Bonus_Info; permanent = FALSE; important = TRUE; }; func int DIA_Wolf_Bonus_Condition() { if(Npc_IsInState(self,ZS_Talk) && Wld_IsTime(5,10,7,54) && (WOLFRECRUITEDDT == FALSE)) { return TRUE; }; }; func void DIA_Wolf_Bonus_Info() { B_RaiseFightTalent_Bonus(other,NPC_TALENT_BOW,1); AI_Output(self,other,"ORG_855_Wolf_TRAIN_Info_09_02"); //Přesnost střelby závisí na tvé obratnosti. Čím větší je tvá obratnost, tím přesněji doletí šíp do cíle. AI_Output(self,other,"ORG_855_Wolf_TRAIN_Info_09_03"); //Tvoje schopnost určuje vzdálenost, vekteré je možné cíl zasahnout. Aby ses stal dobrým střelcem, musíš zlepšovat to a i to. AI_StopProcessInfos(self); };
D
/* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). * Version 3.0.0 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. * ----------------------------------------------------------------------------- */ module vtkGeoFileTerrainSource; static import vtkd_im; static import core.stdc.config; static import std.conv; static import std.string; static import std.conv; static import std.string; static import vtkObjectBase; static import vtkGeoSource; class vtkGeoFileTerrainSource : vtkGeoSource.vtkGeoSource { private void* swigCPtr; public this(void* cObject, bool ownCObject) { super(vtkd_im.vtkGeoFileTerrainSource_Upcast(cObject), ownCObject); swigCPtr = cObject; } public static void* swigGetCPtr(vtkGeoFileTerrainSource obj) { return (obj is null) ? null : obj.swigCPtr; } mixin vtkd_im.SwigOperatorDefinitions; ~this() { dispose(); } public override void dispose() { synchronized(this) { if (swigCPtr !is null) { if (swigCMemOwn) { swigCMemOwn = false; vtkd_im.delete_vtkGeoFileTerrainSource(cast(void*)swigCPtr); } swigCPtr = null; super.dispose(); } } } public static vtkGeoFileTerrainSource New() { void* cPtr = vtkd_im.vtkGeoFileTerrainSource_New(); vtkGeoFileTerrainSource ret = (cPtr is null) ? null : new vtkGeoFileTerrainSource(cPtr, false); return ret; } public static int IsTypeOf(string type) { auto ret = vtkd_im.vtkGeoFileTerrainSource_IsTypeOf((type ? std.string.toStringz(type) : null)); return ret; } public static vtkGeoFileTerrainSource SafeDownCast(vtkObjectBase.vtkObjectBase o) { void* cPtr = vtkd_im.vtkGeoFileTerrainSource_SafeDownCast(vtkObjectBase.vtkObjectBase.swigGetCPtr(o)); vtkGeoFileTerrainSource ret = (cPtr is null) ? null : new vtkGeoFileTerrainSource(cPtr, false); return ret; } public vtkGeoFileTerrainSource NewInstance() const { void* cPtr = vtkd_im.vtkGeoFileTerrainSource_NewInstance(cast(void*)swigCPtr); vtkGeoFileTerrainSource ret = (cPtr is null) ? null : new vtkGeoFileTerrainSource(cPtr, false); return ret; } alias vtkGeoSource.vtkGeoSource.NewInstance NewInstance; public this() { this(vtkd_im.new_vtkGeoFileTerrainSource(), true); } public void SetPath(string _arg) { vtkd_im.vtkGeoFileTerrainSource_SetPath(cast(void*)swigCPtr, (_arg ? std.string.toStringz(_arg) : null)); } public string GetPath() { string ret = std.conv.to!string(vtkd_im.vtkGeoFileTerrainSource_GetPath(cast(void*)swigCPtr)); return ret; } }
D
private enum string a = "asdfgh"; private enum { b = "asdfgh" } struct S { private enum string c = "qwerty"; } class C { private enum string d = "qwerty"; }
D
const int SPL_Cost_SuckEnergy = 30; const int SPL_SuckEnergy_Damage = 100; const int SPL_TIME_SuckEnergy = 9; instance Spell_SuckEnergy(C_Spell_Proto) { time_per_mana = 50; targetCollectAlgo = TARGET_COLLECT_FOCUS; targetCollectRange = 1000; }; func int Spell_Logic_SuckEnergy(var int manaInvested) { if(manaInvested == 0) { return SPL_RECEIVEINVEST; }; if(Npc_GetActiveSpellIsScroll(self) && (self.attribute[ATR_MANA] >= SPL_Cost_Scroll_Circle4)) { return SPL_SENDCAST; } else if(self.attribute[ATR_MANA] >= SPL_Cost_SuckEnergy) { return SPL_SENDCAST; } else { return SPL_SENDSTOP; }; }; func void Spell_Cast_SuckEnergy() { if(Npc_GetActiveSpellIsScroll(self)) { self.attribute[ATR_MANA] = self.attribute[ATR_MANA] - SPL_Cost_Scroll_Circle4; } else { self.attribute[ATR_MANA] = self.attribute[ATR_MANA] - SPL_Cost_SuckEnergy; }; self.aivar[AIV_SelectSpell] += 1; };
D
# FIXED ICallBLE/ble_dispatch_lite.obj: C:/ti/simplelink_cc2640r2_sdk_3_40_00_10/source/ti/ble5stack/icall/stack/ble_dispatch_lite.c ICallBLE/ble_dispatch_lite.obj: C:/ti/simplelink_cc2640r2_sdk_3_40_00_10/source/ti/ble5stack/osal/src/inc/osal_snv.h ICallBLE/ble_dispatch_lite.obj: C:/ti/simplelink_cc2640r2_sdk_3_40_00_10/source/ti/ble5stack/hal/src/target/_common/hal_types.h ICallBLE/ble_dispatch_lite.obj: C:/ti/simplelink_cc2640r2_sdk_3_40_00_10/source/ti/ble5stack/hal/src/target/_common/../_common/cc26xx/_hal_types.h ICallBLE/ble_dispatch_lite.obj: C:/ti/ccs930/ccs/tools/compiler/ti-cgt-arm_18.12.4.LTS/include/stdint.h ICallBLE/ble_dispatch_lite.obj: C:/ti/ccs930/ccs/tools/compiler/ti-cgt-arm_18.12.4.LTS/include/_stdint40.h ICallBLE/ble_dispatch_lite.obj: C:/ti/ccs930/ccs/tools/compiler/ti-cgt-arm_18.12.4.LTS/include/sys/stdint.h ICallBLE/ble_dispatch_lite.obj: C:/ti/ccs930/ccs/tools/compiler/ti-cgt-arm_18.12.4.LTS/include/sys/cdefs.h ICallBLE/ble_dispatch_lite.obj: C:/ti/ccs930/ccs/tools/compiler/ti-cgt-arm_18.12.4.LTS/include/sys/_types.h ICallBLE/ble_dispatch_lite.obj: C:/ti/ccs930/ccs/tools/compiler/ti-cgt-arm_18.12.4.LTS/include/machine/_types.h ICallBLE/ble_dispatch_lite.obj: C:/ti/ccs930/ccs/tools/compiler/ti-cgt-arm_18.12.4.LTS/include/machine/_stdint.h ICallBLE/ble_dispatch_lite.obj: C:/ti/ccs930/ccs/tools/compiler/ti-cgt-arm_18.12.4.LTS/include/sys/_stdint.h ICallBLE/ble_dispatch_lite.obj: C:/ti/ccs930/ccs/tools/compiler/ti-cgt-arm_18.12.4.LTS/include/stdbool.h ICallBLE/ble_dispatch_lite.obj: C:/ti/simplelink_cc2640r2_sdk_3_40_00_10/source/ti/ble5stack/hal/src/target/_common/hal_board_cfg.h ICallBLE/ble_dispatch_lite.obj: C:/ti/simplelink_cc2640r2_sdk_3_40_00_10/source/ti/ble5stack/hal/src/target/_common/hal_mcu.h ICallBLE/ble_dispatch_lite.obj: C:/ti/simplelink_cc2640r2_sdk_3_40_00_10/source/ti/ble5stack/hal/src/inc/hal_defs.h ICallBLE/ble_dispatch_lite.obj: C:/ti/simplelink_cc2640r2_sdk_3_40_00_10/source/ti/ble5stack/hal/src/target/_common/hal_types.h ICallBLE/ble_dispatch_lite.obj: C:/ti/simplelink_cc2640r2_sdk_3_40_00_10/source/ti/devices/cc26x0r2/inc/hw_nvic.h ICallBLE/ble_dispatch_lite.obj: C:/ti/simplelink_cc2640r2_sdk_3_40_00_10/source/ti/devices/cc26x0r2/inc/hw_ints.h ICallBLE/ble_dispatch_lite.obj: C:/ti/simplelink_cc2640r2_sdk_3_40_00_10/source/ti/devices/cc26x0r2/inc/hw_types.h ICallBLE/ble_dispatch_lite.obj: C:/ti/simplelink_cc2640r2_sdk_3_40_00_10/source/ti/devices/cc26x0r2/inc/../inc/hw_chip_def.h ICallBLE/ble_dispatch_lite.obj: C:/ti/simplelink_cc2640r2_sdk_3_40_00_10/source/ti/devices/cc26x0r2/inc/hw_gpio.h ICallBLE/ble_dispatch_lite.obj: C:/ti/simplelink_cc2640r2_sdk_3_40_00_10/source/ti/devices/cc26x0r2/inc/hw_memmap.h ICallBLE/ble_dispatch_lite.obj: C:/ti/simplelink_cc2640r2_sdk_3_40_00_10/source/ti/devices/cc26x0r2/driverlib/systick.h ICallBLE/ble_dispatch_lite.obj: C:/ti/simplelink_cc2640r2_sdk_3_40_00_10/source/ti/devices/cc26x0r2/driverlib/debug.h ICallBLE/ble_dispatch_lite.obj: C:/ti/simplelink_cc2640r2_sdk_3_40_00_10/source/ti/devices/cc26x0r2/driverlib/interrupt.h ICallBLE/ble_dispatch_lite.obj: C:/ti/simplelink_cc2640r2_sdk_3_40_00_10/source/ti/devices/cc26x0r2/driverlib/cpu.h ICallBLE/ble_dispatch_lite.obj: C:/ti/simplelink_cc2640r2_sdk_3_40_00_10/source/ti/devices/cc26x0r2/driverlib/../inc/hw_cpu_scs.h ICallBLE/ble_dispatch_lite.obj: C:/ti/simplelink_cc2640r2_sdk_3_40_00_10/source/ti/devices/cc26x0r2/driverlib/../driverlib/rom.h ICallBLE/ble_dispatch_lite.obj: C:/ti/simplelink_cc2640r2_sdk_3_40_00_10/source/ti/devices/cc26x0r2/driverlib/uart.h ICallBLE/ble_dispatch_lite.obj: C:/ti/simplelink_cc2640r2_sdk_3_40_00_10/source/ti/devices/cc26x0r2/driverlib/../inc/hw_uart.h ICallBLE/ble_dispatch_lite.obj: C:/ti/simplelink_cc2640r2_sdk_3_40_00_10/source/ti/devices/cc26x0r2/driverlib/gpio.h ICallBLE/ble_dispatch_lite.obj: C:/ti/simplelink_cc2640r2_sdk_3_40_00_10/source/ti/devices/cc26x0r2/driverlib/flash.h ICallBLE/ble_dispatch_lite.obj: C:/ti/simplelink_cc2640r2_sdk_3_40_00_10/source/ti/devices/cc26x0r2/driverlib/../inc/hw_flash.h ICallBLE/ble_dispatch_lite.obj: C:/ti/simplelink_cc2640r2_sdk_3_40_00_10/source/ti/devices/cc26x0r2/driverlib/../inc/hw_aon_sysctl.h ICallBLE/ble_dispatch_lite.obj: C:/ti/simplelink_cc2640r2_sdk_3_40_00_10/source/ti/devices/cc26x0r2/driverlib/../inc/hw_fcfg1.h ICallBLE/ble_dispatch_lite.obj: C:/ti/simplelink_cc2640r2_sdk_3_40_00_10/source/ti/devices/cc26x0r2/driverlib/ioc.h ICallBLE/ble_dispatch_lite.obj: C:/ti/simplelink_cc2640r2_sdk_3_40_00_10/source/ti/devices/cc26x0r2/driverlib/../inc/hw_ioc.h ICallBLE/ble_dispatch_lite.obj: C:/ti/simplelink_cc2640r2_sdk_3_40_00_10/source/ti/ble5stack/icall/src/inc/icall.h ICallBLE/ble_dispatch_lite.obj: C:/ti/ccs930/ccs/tools/compiler/ti-cgt-arm_18.12.4.LTS/include/stdlib.h ICallBLE/ble_dispatch_lite.obj: C:/ti/ccs930/ccs/tools/compiler/ti-cgt-arm_18.12.4.LTS/include/_ti_config.h ICallBLE/ble_dispatch_lite.obj: C:/ti/ccs930/ccs/tools/compiler/ti-cgt-arm_18.12.4.LTS/include/linkage.h ICallBLE/ble_dispatch_lite.obj: C:/ti/simplelink_cc2640r2_sdk_3_40_00_10/source/ti/ble5stack/hal/src/inc/hal_assert.h ICallBLE/ble_dispatch_lite.obj: C:/ti/simplelink_cc2640r2_sdk_3_40_00_10/source/ti/ble5stack/hal/src/target/_common/hal_types.h ICallBLE/ble_dispatch_lite.obj: C:/ti/simplelink_cc2640r2_sdk_3_40_00_10/source/ti/ble5stack/hal/src/target/_common/hal_types.h ICallBLE/ble_dispatch_lite.obj: C:/ti/simplelink_cc2640r2_sdk_3_40_00_10/source/ti/ble5stack/osal/src/inc/osal_bufmgr.h ICallBLE/ble_dispatch_lite.obj: C:/ti/simplelink_cc2640r2_sdk_3_40_00_10/source/ti/ble5stack/icall/inc/ble_dispatch.h ICallBLE/ble_dispatch_lite.obj: C:/ti/simplelink_cc2640r2_sdk_3_40_00_10/source/ti/ble5stack/icall/inc/ble_dispatch_lite.h ICallBLE/ble_dispatch_lite.obj: C:/ti/simplelink_cc2640r2_sdk_3_40_00_10/source/ti/ble5stack/inc/sm.h ICallBLE/ble_dispatch_lite.obj: C:/ti/simplelink_cc2640r2_sdk_3_40_00_10/source/ti/ble5stack/inc/bcomdef.h ICallBLE/ble_dispatch_lite.obj: C:/ti/simplelink_cc2640r2_sdk_3_40_00_10/source/ti/ble5stack/osal/src/inc/comdef.h ICallBLE/ble_dispatch_lite.obj: C:/ti/simplelink_cc2640r2_sdk_3_40_00_10/source/ti/ble5stack/hal/src/target/_common/hal_types.h ICallBLE/ble_dispatch_lite.obj: C:/ti/simplelink_cc2640r2_sdk_3_40_00_10/source/ti/ble5stack/osal/src/inc/osal.h ICallBLE/ble_dispatch_lite.obj: C:/ti/ccs930/ccs/tools/compiler/ti-cgt-arm_18.12.4.LTS/include/limits.h ICallBLE/ble_dispatch_lite.obj: C:/ti/simplelink_cc2640r2_sdk_3_40_00_10/source/ti/ble5stack/osal/src/inc/osal_memory.h ICallBLE/ble_dispatch_lite.obj: C:/ti/simplelink_cc2640r2_sdk_3_40_00_10/source/ti/ble5stack/osal/src/inc/osal_timers.h ICallBLE/ble_dispatch_lite.obj: C:/ti/simplelink_cc2640r2_sdk_3_40_00_10/source/ti/ble5stack/inc/hci.h ICallBLE/ble_dispatch_lite.obj: C:/ti/simplelink_cc2640r2_sdk_3_40_00_10/source/ti/ble5stack/controller/cc26xx/inc/ll.h ICallBLE/ble_dispatch_lite.obj: C:/ti/simplelink_cc2640r2_sdk_3_40_00_10/source/ti/ble5stack/inc/gap.h ICallBLE/ble_dispatch_lite.obj: C:/ti/simplelink_cc2640r2_sdk_3_40_00_10/source/ti/ble5stack/controller/cc26xx/inc/ll_ae.h ICallBLE/ble_dispatch_lite.obj: C:/ti/simplelink_cc2640r2_sdk_3_40_00_10/source/ti/ble5stack/hal/src/target/_common/cc26xx/rf_hal.h ICallBLE/ble_dispatch_lite.obj: C:/ti/simplelink_cc2640r2_sdk_3_40_00_10/source/ti/ble5stack/hal/src/target/_common/hal_types.h ICallBLE/ble_dispatch_lite.obj: C:/ti/simplelink_cc2640r2_sdk_3_40_00_10/source/ti/ble5stack/controller/cc26xx/inc/ble.h ICallBLE/ble_dispatch_lite.obj: C:/ti/simplelink_cc2640r2_sdk_3_40_00_10/source/ti/ble5stack/controller/cc26xx/inc/ll_wl.h ICallBLE/ble_dispatch_lite.obj: C:/ti/simplelink_cc2640r2_sdk_3_40_00_10/source/ti/ble5stack/controller/cc26xx/inc/ll_common.h ICallBLE/ble_dispatch_lite.obj: C:/ti/simplelink_cc2640r2_sdk_3_40_00_10/source/ti/drivers/rf/RF.h ICallBLE/ble_dispatch_lite.obj: C:/ti/simplelink_cc2640r2_sdk_3_40_00_10/source/ti/drivers/dpl/ClockP.h ICallBLE/ble_dispatch_lite.obj: C:/ti/ccs930/ccs/tools/compiler/ti-cgt-arm_18.12.4.LTS/include/stddef.h ICallBLE/ble_dispatch_lite.obj: C:/ti/simplelink_cc2640r2_sdk_3_40_00_10/source/ti/drivers/dpl/SemaphoreP.h ICallBLE/ble_dispatch_lite.obj: C:/ti/simplelink_cc2640r2_sdk_3_40_00_10/source/ti/drivers/utils/List.h ICallBLE/ble_dispatch_lite.obj: C:/ti/simplelink_cc2640r2_sdk_3_40_00_10/source/ti/devices/DeviceFamily.h ICallBLE/ble_dispatch_lite.obj: C:/ti/simplelink_cc2640r2_sdk_3_40_00_10/source/ti/devices/cc26x0r2/driverlib/rf_common_cmd.h ICallBLE/ble_dispatch_lite.obj: C:/ti/simplelink_cc2640r2_sdk_3_40_00_10/source/ti/devices/cc26x0r2/driverlib/rf_mailbox.h ICallBLE/ble_dispatch_lite.obj: C:/ti/ccs930/ccs/tools/compiler/ti-cgt-arm_18.12.4.LTS/include/string.h ICallBLE/ble_dispatch_lite.obj: C:/ti/simplelink_cc2640r2_sdk_3_40_00_10/source/ti/devices/cc26x0r2/driverlib/rf_prop_cmd.h ICallBLE/ble_dispatch_lite.obj: C:/ti/simplelink_cc2640r2_sdk_3_40_00_10/source/ti/devices/cc26x0r2/driverlib/rf_ble_cmd.h ICallBLE/ble_dispatch_lite.obj: C:/ti/simplelink_cc2640r2_sdk_3_40_00_10/source/ti/ble5stack/controller/cc26xx/inc/ll_scheduler.h ICallBLE/ble_dispatch_lite.obj: C:/ti/simplelink_cc2640r2_sdk_3_40_00_10/source/ti/ble5stack/controller/cc26xx/inc/ll_config.h ICallBLE/ble_dispatch_lite.obj: C:/ti/simplelink_cc2640r2_sdk_3_40_00_10/source/ti/ble5stack/controller/cc26xx/inc/ll_user_config.h ICallBLE/ble_dispatch_lite.obj: C:/ti/simplelink_cc2640r2_sdk_3_40_00_10/source/ti/ble5stack/icall/inc/ble_user_config.h ICallBLE/ble_dispatch_lite.obj: C:/ti/simplelink_cc2640r2_sdk_3_40_00_10/source/ti/ble5stack/icall/src/inc/icall_user_config.h ICallBLE/ble_dispatch_lite.obj: C:/ti/simplelink_cc2640r2_sdk_3_40_00_10/source/ti/ble5stack/inc/gatt.h ICallBLE/ble_dispatch_lite.obj: C:/ti/simplelink_cc2640r2_sdk_3_40_00_10/source/ti/ble5stack/inc/att.h ICallBLE/ble_dispatch_lite.obj: C:/ti/simplelink_cc2640r2_sdk_3_40_00_10/source/ti/ble5stack/inc/l2cap.h ICallBLE/ble_dispatch_lite.obj: C:/ti/simplelink_cc2640r2_sdk_3_40_00_10/source/ti/ble5stack/inc/gatt_uuid.h ICallBLE/ble_dispatch_lite.obj: C:/ti/simplelink_cc2640r2_sdk_3_40_00_10/source/ti/ble5stack/inc/gattservapp.h ICallBLE/ble_dispatch_lite.obj: C:/ti/simplelink_cc2640r2_sdk_3_40_00_10/source/ti/ble5stack/inc/gapbondmgr.h ICallBLE/ble_dispatch_lite.obj: C:/ti/simplelink_cc2640r2_sdk_3_40_00_10/source/ti/ble5stack/icall/inc/icall_ble_apimsg.h ICallBLE/ble_dispatch_lite.obj: C:/ti/simplelink_cc2640r2_sdk_3_40_00_10/source/ti/ble5stack/inc/hci_ext.h ICallBLE/ble_dispatch_lite.obj: C:/ti/simplelink_cc2640r2_sdk_3_40_00_10/source/ti/ble5stack/inc/hci_tl.h ICallBLE/ble_dispatch_lite.obj: C:/ti/simplelink_cc2640r2_sdk_3_40_00_10/source/ti/ble5stack/inc/hci_data.h ICallBLE/ble_dispatch_lite.obj: C:/ti/simplelink_cc2640r2_sdk_3_40_00_10/source/ti/ble5stack/inc/hci_event.h ICallBLE/ble_dispatch_lite.obj: C:/ti/simplelink_cc2640r2_sdk_3_40_00_10/source/ti/ble5stack/inc/hci_tl.h ICallBLE/ble_dispatch_lite.obj: C:/ti/simplelink_cc2640r2_sdk_3_40_00_10/source/ti/ble5stack/inc/gapgattserver.h ICallBLE/ble_dispatch_lite.obj: C:/ti/simplelink_cc2640r2_sdk_3_40_00_10/source/ti/ble5stack/inc/linkdb.h ICallBLE/ble_dispatch_lite.obj: C:/ti/simplelink_cc2640r2_sdk_3_40_00_10/source/ti/ble5stack/inc/linkdb_internal.h ICallBLE/ble_dispatch_lite.obj: C:/ti/simplelink_cc2640r2_sdk_3_40_00_10/source/ti/ble5stack/inc/gap_advertiser.h ICallBLE/ble_dispatch_lite.obj: C:/ti/simplelink_cc2640r2_sdk_3_40_00_10/source/ti/ble5stack/inc/gap_scanner.h ICallBLE/ble_dispatch_lite.obj: C:/ti/simplelink_cc2640r2_sdk_3_40_00_10/source/ti/ble5stack/inc/gap_initiator.h ICallBLE/ble_dispatch_lite.obj: C:/ti/simplelink_cc2640r2_sdk_3_40_00_10/source/ti/ble5stack/inc/gatt_profile_uuid.h ICallBLE/ble_dispatch_lite.obj: C:/ti/simplelink_cc2640r2_sdk_3_40_00_10/source/ti/ble5stack/inc/../rom/rom_jt.h ICallBLE/ble_dispatch_lite.obj: C:/ti/simplelink_cc2640r2_sdk_3_40_00_10/source/ti/ble5stack/inc/../rom/map_direct.h ICallBLE/ble_dispatch_lite.obj: C:/ti/simplelink_cc2640r2_sdk_3_40_00_10/source/ti/ble5stack/icall/src/inc/icall_lite_translation.h C:/ti/simplelink_cc2640r2_sdk_3_40_00_10/source/ti/ble5stack/icall/stack/ble_dispatch_lite.c: C:/ti/simplelink_cc2640r2_sdk_3_40_00_10/source/ti/ble5stack/osal/src/inc/osal_snv.h: C:/ti/simplelink_cc2640r2_sdk_3_40_00_10/source/ti/ble5stack/hal/src/target/_common/hal_types.h: C:/ti/simplelink_cc2640r2_sdk_3_40_00_10/source/ti/ble5stack/hal/src/target/_common/../_common/cc26xx/_hal_types.h: C:/ti/ccs930/ccs/tools/compiler/ti-cgt-arm_18.12.4.LTS/include/stdint.h: C:/ti/ccs930/ccs/tools/compiler/ti-cgt-arm_18.12.4.LTS/include/_stdint40.h: C:/ti/ccs930/ccs/tools/compiler/ti-cgt-arm_18.12.4.LTS/include/sys/stdint.h: C:/ti/ccs930/ccs/tools/compiler/ti-cgt-arm_18.12.4.LTS/include/sys/cdefs.h: C:/ti/ccs930/ccs/tools/compiler/ti-cgt-arm_18.12.4.LTS/include/sys/_types.h: C:/ti/ccs930/ccs/tools/compiler/ti-cgt-arm_18.12.4.LTS/include/machine/_types.h: C:/ti/ccs930/ccs/tools/compiler/ti-cgt-arm_18.12.4.LTS/include/machine/_stdint.h: C:/ti/ccs930/ccs/tools/compiler/ti-cgt-arm_18.12.4.LTS/include/sys/_stdint.h: C:/ti/ccs930/ccs/tools/compiler/ti-cgt-arm_18.12.4.LTS/include/stdbool.h: C:/ti/simplelink_cc2640r2_sdk_3_40_00_10/source/ti/ble5stack/hal/src/target/_common/hal_board_cfg.h: C:/ti/simplelink_cc2640r2_sdk_3_40_00_10/source/ti/ble5stack/hal/src/target/_common/hal_mcu.h: C:/ti/simplelink_cc2640r2_sdk_3_40_00_10/source/ti/ble5stack/hal/src/inc/hal_defs.h: C:/ti/simplelink_cc2640r2_sdk_3_40_00_10/source/ti/ble5stack/hal/src/target/_common/hal_types.h: C:/ti/simplelink_cc2640r2_sdk_3_40_00_10/source/ti/devices/cc26x0r2/inc/hw_nvic.h: C:/ti/simplelink_cc2640r2_sdk_3_40_00_10/source/ti/devices/cc26x0r2/inc/hw_ints.h: C:/ti/simplelink_cc2640r2_sdk_3_40_00_10/source/ti/devices/cc26x0r2/inc/hw_types.h: C:/ti/simplelink_cc2640r2_sdk_3_40_00_10/source/ti/devices/cc26x0r2/inc/../inc/hw_chip_def.h: C:/ti/simplelink_cc2640r2_sdk_3_40_00_10/source/ti/devices/cc26x0r2/inc/hw_gpio.h: C:/ti/simplelink_cc2640r2_sdk_3_40_00_10/source/ti/devices/cc26x0r2/inc/hw_memmap.h: C:/ti/simplelink_cc2640r2_sdk_3_40_00_10/source/ti/devices/cc26x0r2/driverlib/systick.h: C:/ti/simplelink_cc2640r2_sdk_3_40_00_10/source/ti/devices/cc26x0r2/driverlib/debug.h: C:/ti/simplelink_cc2640r2_sdk_3_40_00_10/source/ti/devices/cc26x0r2/driverlib/interrupt.h: C:/ti/simplelink_cc2640r2_sdk_3_40_00_10/source/ti/devices/cc26x0r2/driverlib/cpu.h: C:/ti/simplelink_cc2640r2_sdk_3_40_00_10/source/ti/devices/cc26x0r2/driverlib/../inc/hw_cpu_scs.h: C:/ti/simplelink_cc2640r2_sdk_3_40_00_10/source/ti/devices/cc26x0r2/driverlib/../driverlib/rom.h: C:/ti/simplelink_cc2640r2_sdk_3_40_00_10/source/ti/devices/cc26x0r2/driverlib/uart.h: C:/ti/simplelink_cc2640r2_sdk_3_40_00_10/source/ti/devices/cc26x0r2/driverlib/../inc/hw_uart.h: C:/ti/simplelink_cc2640r2_sdk_3_40_00_10/source/ti/devices/cc26x0r2/driverlib/gpio.h: C:/ti/simplelink_cc2640r2_sdk_3_40_00_10/source/ti/devices/cc26x0r2/driverlib/flash.h: C:/ti/simplelink_cc2640r2_sdk_3_40_00_10/source/ti/devices/cc26x0r2/driverlib/../inc/hw_flash.h: C:/ti/simplelink_cc2640r2_sdk_3_40_00_10/source/ti/devices/cc26x0r2/driverlib/../inc/hw_aon_sysctl.h: C:/ti/simplelink_cc2640r2_sdk_3_40_00_10/source/ti/devices/cc26x0r2/driverlib/../inc/hw_fcfg1.h: C:/ti/simplelink_cc2640r2_sdk_3_40_00_10/source/ti/devices/cc26x0r2/driverlib/ioc.h: C:/ti/simplelink_cc2640r2_sdk_3_40_00_10/source/ti/devices/cc26x0r2/driverlib/../inc/hw_ioc.h: C:/ti/simplelink_cc2640r2_sdk_3_40_00_10/source/ti/ble5stack/icall/src/inc/icall.h: C:/ti/ccs930/ccs/tools/compiler/ti-cgt-arm_18.12.4.LTS/include/stdlib.h: C:/ti/ccs930/ccs/tools/compiler/ti-cgt-arm_18.12.4.LTS/include/_ti_config.h: C:/ti/ccs930/ccs/tools/compiler/ti-cgt-arm_18.12.4.LTS/include/linkage.h: C:/ti/simplelink_cc2640r2_sdk_3_40_00_10/source/ti/ble5stack/hal/src/inc/hal_assert.h: C:/ti/simplelink_cc2640r2_sdk_3_40_00_10/source/ti/ble5stack/hal/src/target/_common/hal_types.h: C:/ti/simplelink_cc2640r2_sdk_3_40_00_10/source/ti/ble5stack/hal/src/target/_common/hal_types.h: C:/ti/simplelink_cc2640r2_sdk_3_40_00_10/source/ti/ble5stack/osal/src/inc/osal_bufmgr.h: C:/ti/simplelink_cc2640r2_sdk_3_40_00_10/source/ti/ble5stack/icall/inc/ble_dispatch.h: C:/ti/simplelink_cc2640r2_sdk_3_40_00_10/source/ti/ble5stack/icall/inc/ble_dispatch_lite.h: C:/ti/simplelink_cc2640r2_sdk_3_40_00_10/source/ti/ble5stack/inc/sm.h: C:/ti/simplelink_cc2640r2_sdk_3_40_00_10/source/ti/ble5stack/inc/bcomdef.h: C:/ti/simplelink_cc2640r2_sdk_3_40_00_10/source/ti/ble5stack/osal/src/inc/comdef.h: C:/ti/simplelink_cc2640r2_sdk_3_40_00_10/source/ti/ble5stack/hal/src/target/_common/hal_types.h: C:/ti/simplelink_cc2640r2_sdk_3_40_00_10/source/ti/ble5stack/osal/src/inc/osal.h: C:/ti/ccs930/ccs/tools/compiler/ti-cgt-arm_18.12.4.LTS/include/limits.h: C:/ti/simplelink_cc2640r2_sdk_3_40_00_10/source/ti/ble5stack/osal/src/inc/osal_memory.h: C:/ti/simplelink_cc2640r2_sdk_3_40_00_10/source/ti/ble5stack/osal/src/inc/osal_timers.h: C:/ti/simplelink_cc2640r2_sdk_3_40_00_10/source/ti/ble5stack/inc/hci.h: C:/ti/simplelink_cc2640r2_sdk_3_40_00_10/source/ti/ble5stack/controller/cc26xx/inc/ll.h: C:/ti/simplelink_cc2640r2_sdk_3_40_00_10/source/ti/ble5stack/inc/gap.h: C:/ti/simplelink_cc2640r2_sdk_3_40_00_10/source/ti/ble5stack/controller/cc26xx/inc/ll_ae.h: C:/ti/simplelink_cc2640r2_sdk_3_40_00_10/source/ti/ble5stack/hal/src/target/_common/cc26xx/rf_hal.h: C:/ti/simplelink_cc2640r2_sdk_3_40_00_10/source/ti/ble5stack/hal/src/target/_common/hal_types.h: C:/ti/simplelink_cc2640r2_sdk_3_40_00_10/source/ti/ble5stack/controller/cc26xx/inc/ble.h: C:/ti/simplelink_cc2640r2_sdk_3_40_00_10/source/ti/ble5stack/controller/cc26xx/inc/ll_wl.h: C:/ti/simplelink_cc2640r2_sdk_3_40_00_10/source/ti/ble5stack/controller/cc26xx/inc/ll_common.h: C:/ti/simplelink_cc2640r2_sdk_3_40_00_10/source/ti/drivers/rf/RF.h: C:/ti/simplelink_cc2640r2_sdk_3_40_00_10/source/ti/drivers/dpl/ClockP.h: C:/ti/ccs930/ccs/tools/compiler/ti-cgt-arm_18.12.4.LTS/include/stddef.h: C:/ti/simplelink_cc2640r2_sdk_3_40_00_10/source/ti/drivers/dpl/SemaphoreP.h: C:/ti/simplelink_cc2640r2_sdk_3_40_00_10/source/ti/drivers/utils/List.h: C:/ti/simplelink_cc2640r2_sdk_3_40_00_10/source/ti/devices/DeviceFamily.h: C:/ti/simplelink_cc2640r2_sdk_3_40_00_10/source/ti/devices/cc26x0r2/driverlib/rf_common_cmd.h: C:/ti/simplelink_cc2640r2_sdk_3_40_00_10/source/ti/devices/cc26x0r2/driverlib/rf_mailbox.h: C:/ti/ccs930/ccs/tools/compiler/ti-cgt-arm_18.12.4.LTS/include/string.h: C:/ti/simplelink_cc2640r2_sdk_3_40_00_10/source/ti/devices/cc26x0r2/driverlib/rf_prop_cmd.h: C:/ti/simplelink_cc2640r2_sdk_3_40_00_10/source/ti/devices/cc26x0r2/driverlib/rf_ble_cmd.h: C:/ti/simplelink_cc2640r2_sdk_3_40_00_10/source/ti/ble5stack/controller/cc26xx/inc/ll_scheduler.h: C:/ti/simplelink_cc2640r2_sdk_3_40_00_10/source/ti/ble5stack/controller/cc26xx/inc/ll_config.h: C:/ti/simplelink_cc2640r2_sdk_3_40_00_10/source/ti/ble5stack/controller/cc26xx/inc/ll_user_config.h: C:/ti/simplelink_cc2640r2_sdk_3_40_00_10/source/ti/ble5stack/icall/inc/ble_user_config.h: C:/ti/simplelink_cc2640r2_sdk_3_40_00_10/source/ti/ble5stack/icall/src/inc/icall_user_config.h: C:/ti/simplelink_cc2640r2_sdk_3_40_00_10/source/ti/ble5stack/inc/gatt.h: C:/ti/simplelink_cc2640r2_sdk_3_40_00_10/source/ti/ble5stack/inc/att.h: C:/ti/simplelink_cc2640r2_sdk_3_40_00_10/source/ti/ble5stack/inc/l2cap.h: C:/ti/simplelink_cc2640r2_sdk_3_40_00_10/source/ti/ble5stack/inc/gatt_uuid.h: C:/ti/simplelink_cc2640r2_sdk_3_40_00_10/source/ti/ble5stack/inc/gattservapp.h: C:/ti/simplelink_cc2640r2_sdk_3_40_00_10/source/ti/ble5stack/inc/gapbondmgr.h: C:/ti/simplelink_cc2640r2_sdk_3_40_00_10/source/ti/ble5stack/icall/inc/icall_ble_apimsg.h: C:/ti/simplelink_cc2640r2_sdk_3_40_00_10/source/ti/ble5stack/inc/hci_ext.h: C:/ti/simplelink_cc2640r2_sdk_3_40_00_10/source/ti/ble5stack/inc/hci_tl.h: C:/ti/simplelink_cc2640r2_sdk_3_40_00_10/source/ti/ble5stack/inc/hci_data.h: C:/ti/simplelink_cc2640r2_sdk_3_40_00_10/source/ti/ble5stack/inc/hci_event.h: C:/ti/simplelink_cc2640r2_sdk_3_40_00_10/source/ti/ble5stack/inc/hci_tl.h: C:/ti/simplelink_cc2640r2_sdk_3_40_00_10/source/ti/ble5stack/inc/gapgattserver.h: C:/ti/simplelink_cc2640r2_sdk_3_40_00_10/source/ti/ble5stack/inc/linkdb.h: C:/ti/simplelink_cc2640r2_sdk_3_40_00_10/source/ti/ble5stack/inc/linkdb_internal.h: C:/ti/simplelink_cc2640r2_sdk_3_40_00_10/source/ti/ble5stack/inc/gap_advertiser.h: C:/ti/simplelink_cc2640r2_sdk_3_40_00_10/source/ti/ble5stack/inc/gap_scanner.h: C:/ti/simplelink_cc2640r2_sdk_3_40_00_10/source/ti/ble5stack/inc/gap_initiator.h: C:/ti/simplelink_cc2640r2_sdk_3_40_00_10/source/ti/ble5stack/inc/gatt_profile_uuid.h: C:/ti/simplelink_cc2640r2_sdk_3_40_00_10/source/ti/ble5stack/inc/../rom/rom_jt.h: C:/ti/simplelink_cc2640r2_sdk_3_40_00_10/source/ti/ble5stack/inc/../rom/map_direct.h: C:/ti/simplelink_cc2640r2_sdk_3_40_00_10/source/ti/ble5stack/icall/src/inc/icall_lite_translation.h:
D
module scene; import dagon; class MyScene: Scene { Game game; this(Game game) { super(game); this.game = game; } override void beforeLoad() { // Create assets // aModel = addOBJAsset("data/model.obj"); // aTexture = addTextureAsset("data/texture.png"); } override void onLoad(Time t, float progress) { } override void afterLoad() { auto camera = addCamera(); auto freeview = New!FreeviewComponent(eventManager, camera); freeview.zoom(10); freeview.pitch(-30.0f); freeview.turn(10.0f); game.renderer.activeCamera = camera; auto sun = addLight(LightType.Sun); sun.shadowEnabled = true; sun.energy = 10.0f; sun.pitch(-45.0f); auto matRed = addMaterial(); matRed.diffuse = Color4f(1.0, 0.2, 0.2, 1.0); auto eCube = addEntity(); eCube.drawable = New!ShapeBox(Vector3f(1, 1, 1), assetManager); eCube.material = matRed; eCube.position = Vector3f(0, 1, 0); auto ePlane = addEntity(); ePlane.drawable = New!ShapePlane(10, 10, 1, assetManager); game.deferredRenderer.ssaoEnabled = true; game.deferredRenderer.ssaoPower = 6.0; game.postProcessingRenderer.fxaaEnabled = true; } override void onUpdate(Time t) { } override void onKeyDown(int key) { } override void onKeyUp(int key) { } override void onMouseButtonDown(int button) { } override void onMouseButtonUp(int button) { } }
D
module day10; import io = std.stdio, std.file, std.algorithm, std.range, std.typecons; import std.conv, std.math, std.string : splitLines; int main() { bool[int][int] map; auto lines = io.stdin.byLineCopy.array; foreach (j, line; lines) { foreach (i, c; line) { if (c == '#') { map.require(j.to!int).require(i.to!int, true); } } } /* io.stdin.byLineCopy.array.each!((j, line) => line.each!((i, c) { if (c == '#') { map.require(j).require(i, true); }})); */ int total = map.values .map!(line => line.length) .sum .to!int; // io.writeln(total); int[int][int] xyToNumSeen; alias Point = Tuple!(int, "x", int, "y"); alias Vector = Tuple!(double, "angle", int, "direction"); alias VectorToPoints = Point[][Vector]; VectorToPoints[Point] PointsToTheirPointsOnLines; foreach (kv1; map.byKeyValue) { int y1 = kv1.key; foreach (int x1; kv1.value.keys) { // For part 1. "a" as in the coefficient of a linear equation representing line of sight. int[int][double] aToDirectionToNumOnLine; VectorToPoints vdp; foreach (kv2; map.byKeyValue) { int y2 = kv2.key; foreach (int x2; kv2.value.keys) { if (x1 == x2 && y1 == y2) continue; // A->B calc a,b // A->C calc a,b // If they are the same a,b, then distance dx1 (x axis) between A,B and dx2 between A,C // (unless they are on a vertical line) // Keep the minimum between dx's. Compare distance to each other checked point, that has the same a,b // to the minimum, replace it if it's less. // y1=ax1+b // y2=ax2+b // y1-y2=a(x1-x2) // a=y1-y2 / x1-x2 // b=ax1-y1 int dx = x1 - x2; int dy = y1 - y2; double a = dy.to!double / dx; // if dx==0 can be +INF or -INF // double b = (dx != 0) ? (a * x1 - y1) ? 0; int direction = (dx > 0) ? 1 : ((dx < 0) ? -1 : 0); // For part 1 // Add to the number of points on the same line+heading aToDirectionToNumOnLine.require(a).require(direction, 0) += 1; // For part 2: Calculate the angle auto ang = atan(a); if (direction == 0) { ang = -ang; direction = -1; } vdp[Vector(ang, direction)] ~= Point(y2, x2); } // foreach } // foreach int numHidden = aToDirectionToNumOnLine.values.map!( dirs => dirs.values.map!(// Number of points the same line -1 is the number that is hidden. pointsOnSameLine => pointsOnSameLine - 1).array.sum).sum; // -1 because we exclude the current point xyToNumSeen.require(x1).require(y1, total - numHidden - 1); // For part 2: PointsToTheirPointsOnLines[Point(x1, y1)] = vdp; } // foreach } // foreach auto maxSeen = 0; Point maxSeenPoint; foreach (xs; xyToNumSeen.byKeyValue) { foreach (ys; xs.value.byKeyValue) { if (ys.value > maxSeen) { maxSeen = ys.value; maxSeenPoint = Point(xs.key, ys.key); } } } auto result1 = maxSeen; io.writeln(result1); // io.writeln(maxSeenPoint); VectorToPoints vdp = PointsToTheirPointsOnLines[maxSeenPoint]; // Sort points in each vector by their distance from the point // Then prepare an array of the vectors sorted by their angle foreach (points; vdp.values) { points.sort!((p1, p2) { auto dx1 = abs(p1.x - maxSeenPoint.x); auto dx2 = abs(p2.x - maxSeenPoint.x); auto dy1 = abs(p1.y - maxSeenPoint.y); auto dy2 = abs(p2.y - maxSeenPoint.y); if (dx1 == dx2) return dy1 < dy2; return dx1 < dx2; }); } auto vectors = vdp.keys.array; vectors.sort!((v1, v2) { if (v1.direction == v2.direction) return v1.angle < v2.angle; return v1.direction < v2.direction; }); // io.writeln("Vectors:"); // foreach(v; vectors) { // io.writeln(v); // io.writeln(vdp[v]); // } int shot = 200 - 1; Point result2; while (shot > 0) { foreach (v; vectors) { Point[] astros = vdp[v]; if (astros.length > 0) { if (shot == 0) { result2 = astros.front; } astros.popFront; shot -= 1; } } } // io.writeln(result2); io.writeln(result2.x * 100 + result2.y); return 0; }
D
# FIXED PROFILES/gapbondmgr.obj: C:/ti/simplelink_cc2640r2_sdk_2_40_00_32/source/ti/blestack/profiles/roles/gapbondmgr.c PROFILES/gapbondmgr.obj: C:/ti/simplelink_cc2640r2_sdk_2_40_00_32/source/ti/blestack/inc/bcomdef.h PROFILES/gapbondmgr.obj: C:/ti/simplelink_cc2640r2_sdk_2_40_00_32/source/ti/blestack/osal/src/inc/comdef.h PROFILES/gapbondmgr.obj: C:/ti/simplelink_cc2640r2_sdk_2_40_00_32/source/ti/blestack/hal/src/target/_common/hal_types.h PROFILES/gapbondmgr.obj: C:/ti/simplelink_cc2640r2_sdk_2_40_00_32/source/ti/blestack/hal/src/target/_common/../_common/cc26xx/_hal_types.h PROFILES/gapbondmgr.obj: C:/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.4.LTS/include/stdint.h PROFILES/gapbondmgr.obj: C:/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.4.LTS/include/sys/stdint.h PROFILES/gapbondmgr.obj: C:/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.4.LTS/include/sys/cdefs.h PROFILES/gapbondmgr.obj: C:/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.4.LTS/include/sys/_types.h PROFILES/gapbondmgr.obj: C:/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.4.LTS/include/machine/_types.h PROFILES/gapbondmgr.obj: C:/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.4.LTS/include/machine/_stdint.h PROFILES/gapbondmgr.obj: C:/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.4.LTS/include/sys/_stdint.h PROFILES/gapbondmgr.obj: C:/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.4.LTS/include/stdbool.h PROFILES/gapbondmgr.obj: C:/ti/simplelink_cc2640r2_sdk_2_40_00_32/source/ti/blestack/hal/src/inc/hal_defs.h PROFILES/gapbondmgr.obj: C:/ti/simplelink_cc2640r2_sdk_2_40_00_32/source/ti/blestack/osal/src/inc/osal.h PROFILES/gapbondmgr.obj: C:/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.4.LTS/include/limits.h PROFILES/gapbondmgr.obj: C:/ti/simplelink_cc2640r2_sdk_2_40_00_32/source/ti/blestack/osal/src/inc/osal_memory.h PROFILES/gapbondmgr.obj: C:/ti/simplelink_cc2640r2_sdk_2_40_00_32/source/ti/blestack/osal/src/inc/osal_timers.h PROFILES/gapbondmgr.obj: C:/ti/simplelink_cc2640r2_sdk_2_40_00_32/source/ti/blestack/icall/src/inc/icall.h PROFILES/gapbondmgr.obj: C:/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.4.LTS/include/stdlib.h PROFILES/gapbondmgr.obj: C:/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.4.LTS/include/_ti_config.h PROFILES/gapbondmgr.obj: C:/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.4.LTS/include/linkage.h PROFILES/gapbondmgr.obj: C:/ti/simplelink_cc2640r2_sdk_2_40_00_32/source/ti/blestack/hal/src/inc/hal_assert.h PROFILES/gapbondmgr.obj: C:/ti/simplelink_cc2640r2_sdk_2_40_00_32/source/ti/blestack/hal/src/target/_common/hal_types.h PROFILES/gapbondmgr.obj: C:/ti/simplelink_cc2640r2_sdk_2_40_00_32/source/ti/blestack/osal/src/inc/osal_snv.h PROFILES/gapbondmgr.obj: C:/ti/simplelink_cc2640r2_sdk_2_40_00_32/source/ti/blestack/hal/src/target/_common/hal_types.h PROFILES/gapbondmgr.obj: C:/ti/simplelink_cc2640r2_sdk_2_40_00_32/source/ti/blestack/inc/l2cap.h PROFILES/gapbondmgr.obj: C:/ti/simplelink_cc2640r2_sdk_2_40_00_32/source/ti/blestack/inc/sm.h PROFILES/gapbondmgr.obj: C:/ti/simplelink_cc2640r2_sdk_2_40_00_32/source/ti/blestack/inc/hci.h PROFILES/gapbondmgr.obj: C:/ti/simplelink_cc2640r2_sdk_2_40_00_32/source/ti/blestack/controller/cc26xx_r2/inc/ll_common.h PROFILES/gapbondmgr.obj: C:/ti/simplelink_cc2640r2_sdk_2_40_00_32/source/ti/drivers/rf/RF.h PROFILES/gapbondmgr.obj: C:/ti/simplelink_cc2640r2_sdk_2_40_00_32/source/ti/drivers/dpl/ClockP.h PROFILES/gapbondmgr.obj: C:/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.4.LTS/include/stddef.h PROFILES/gapbondmgr.obj: C:/ti/simplelink_cc2640r2_sdk_2_40_00_32/source/ti/drivers/dpl/SemaphoreP.h PROFILES/gapbondmgr.obj: C:/ti/simplelink_cc2640r2_sdk_2_40_00_32/source/ti/drivers/utils/List.h PROFILES/gapbondmgr.obj: C:/ti/simplelink_cc2640r2_sdk_2_40_00_32/source/ti/devices/DeviceFamily.h PROFILES/gapbondmgr.obj: C:/ti/simplelink_cc2640r2_sdk_2_40_00_32/source/ti/devices/cc26x0r2/driverlib/rf_common_cmd.h PROFILES/gapbondmgr.obj: C:/ti/simplelink_cc2640r2_sdk_2_40_00_32/source/ti/devices/cc26x0r2/driverlib/rf_mailbox.h PROFILES/gapbondmgr.obj: C:/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.4.LTS/include/string.h PROFILES/gapbondmgr.obj: C:/ti/simplelink_cc2640r2_sdk_2_40_00_32/source/ti/devices/cc26x0r2/driverlib/rf_prop_cmd.h PROFILES/gapbondmgr.obj: C:/ti/simplelink_cc2640r2_sdk_2_40_00_32/source/ti/devices/cc26x0r2/driverlib/rf_ble_cmd.h PROFILES/gapbondmgr.obj: C:/ti/simplelink_cc2640r2_sdk_2_40_00_32/source/ti/blestack/hal/src/target/_common/cc26xx/rf_hal.h PROFILES/gapbondmgr.obj: C:/ti/simplelink_cc2640r2_sdk_2_40_00_32/source/ti/blestack/hal/src/target/_common/hal_types.h PROFILES/gapbondmgr.obj: C:/ti/simplelink_cc2640r2_sdk_2_40_00_32/source/ti/blestack/controller/cc26xx_r2/inc/ll.h PROFILES/gapbondmgr.obj: C:/ti/simplelink_cc2640r2_sdk_2_40_00_32/source/ti/blestack/controller/cc26xx_r2/inc/ll_scheduler.h PROFILES/gapbondmgr.obj: C:/ti/simplelink_cc2640r2_sdk_2_40_00_32/source/ti/blestack/inc/linkdb.h PROFILES/gapbondmgr.obj: C:/ti/simplelink_cc2640r2_sdk_2_40_00_32/source/ti/blestack/inc/gatt.h PROFILES/gapbondmgr.obj: C:/ti/simplelink_cc2640r2_sdk_2_40_00_32/source/ti/blestack/inc/att.h PROFILES/gapbondmgr.obj: C:/ti/simplelink_cc2640r2_sdk_2_40_00_32/source/ti/blestack/inc/gatt_uuid.h PROFILES/gapbondmgr.obj: C:/ti/simplelink_cc2640r2_sdk_2_40_00_32/source/ti/blestack/inc/gattservapp.h PROFILES/gapbondmgr.obj: C:/ti/simplelink_cc2640r2_sdk_2_40_00_32/source/ti/blestack/inc/gapgattserver.h PROFILES/gapbondmgr.obj: C:/ti/simplelink_cc2640r2_sdk_2_40_00_32/source/ti/blestack/profiles/roles/gapbondmgr.h PROFILES/gapbondmgr.obj: C:/ti/simplelink_cc2640r2_sdk_2_40_00_32/source/ti/blestack/inc/gap.h C:/ti/simplelink_cc2640r2_sdk_2_40_00_32/source/ti/blestack/profiles/roles/gapbondmgr.c: C:/ti/simplelink_cc2640r2_sdk_2_40_00_32/source/ti/blestack/inc/bcomdef.h: C:/ti/simplelink_cc2640r2_sdk_2_40_00_32/source/ti/blestack/osal/src/inc/comdef.h: C:/ti/simplelink_cc2640r2_sdk_2_40_00_32/source/ti/blestack/hal/src/target/_common/hal_types.h: C:/ti/simplelink_cc2640r2_sdk_2_40_00_32/source/ti/blestack/hal/src/target/_common/../_common/cc26xx/_hal_types.h: C:/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.4.LTS/include/stdint.h: C:/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.4.LTS/include/sys/stdint.h: C:/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.4.LTS/include/sys/cdefs.h: C:/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.4.LTS/include/sys/_types.h: C:/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.4.LTS/include/machine/_types.h: C:/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.4.LTS/include/machine/_stdint.h: C:/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.4.LTS/include/sys/_stdint.h: C:/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.4.LTS/include/stdbool.h: C:/ti/simplelink_cc2640r2_sdk_2_40_00_32/source/ti/blestack/hal/src/inc/hal_defs.h: C:/ti/simplelink_cc2640r2_sdk_2_40_00_32/source/ti/blestack/osal/src/inc/osal.h: C:/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.4.LTS/include/limits.h: C:/ti/simplelink_cc2640r2_sdk_2_40_00_32/source/ti/blestack/osal/src/inc/osal_memory.h: C:/ti/simplelink_cc2640r2_sdk_2_40_00_32/source/ti/blestack/osal/src/inc/osal_timers.h: C:/ti/simplelink_cc2640r2_sdk_2_40_00_32/source/ti/blestack/icall/src/inc/icall.h: C:/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.4.LTS/include/stdlib.h: C:/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.4.LTS/include/_ti_config.h: C:/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.4.LTS/include/linkage.h: C:/ti/simplelink_cc2640r2_sdk_2_40_00_32/source/ti/blestack/hal/src/inc/hal_assert.h: C:/ti/simplelink_cc2640r2_sdk_2_40_00_32/source/ti/blestack/hal/src/target/_common/hal_types.h: C:/ti/simplelink_cc2640r2_sdk_2_40_00_32/source/ti/blestack/osal/src/inc/osal_snv.h: C:/ti/simplelink_cc2640r2_sdk_2_40_00_32/source/ti/blestack/hal/src/target/_common/hal_types.h: C:/ti/simplelink_cc2640r2_sdk_2_40_00_32/source/ti/blestack/inc/l2cap.h: C:/ti/simplelink_cc2640r2_sdk_2_40_00_32/source/ti/blestack/inc/sm.h: C:/ti/simplelink_cc2640r2_sdk_2_40_00_32/source/ti/blestack/inc/hci.h: C:/ti/simplelink_cc2640r2_sdk_2_40_00_32/source/ti/blestack/controller/cc26xx_r2/inc/ll_common.h: C:/ti/simplelink_cc2640r2_sdk_2_40_00_32/source/ti/drivers/rf/RF.h: C:/ti/simplelink_cc2640r2_sdk_2_40_00_32/source/ti/drivers/dpl/ClockP.h: C:/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.4.LTS/include/stddef.h: C:/ti/simplelink_cc2640r2_sdk_2_40_00_32/source/ti/drivers/dpl/SemaphoreP.h: C:/ti/simplelink_cc2640r2_sdk_2_40_00_32/source/ti/drivers/utils/List.h: C:/ti/simplelink_cc2640r2_sdk_2_40_00_32/source/ti/devices/DeviceFamily.h: C:/ti/simplelink_cc2640r2_sdk_2_40_00_32/source/ti/devices/cc26x0r2/driverlib/rf_common_cmd.h: C:/ti/simplelink_cc2640r2_sdk_2_40_00_32/source/ti/devices/cc26x0r2/driverlib/rf_mailbox.h: C:/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.4.LTS/include/string.h: C:/ti/simplelink_cc2640r2_sdk_2_40_00_32/source/ti/devices/cc26x0r2/driverlib/rf_prop_cmd.h: C:/ti/simplelink_cc2640r2_sdk_2_40_00_32/source/ti/devices/cc26x0r2/driverlib/rf_ble_cmd.h: C:/ti/simplelink_cc2640r2_sdk_2_40_00_32/source/ti/blestack/hal/src/target/_common/cc26xx/rf_hal.h: C:/ti/simplelink_cc2640r2_sdk_2_40_00_32/source/ti/blestack/hal/src/target/_common/hal_types.h: C:/ti/simplelink_cc2640r2_sdk_2_40_00_32/source/ti/blestack/controller/cc26xx_r2/inc/ll.h: C:/ti/simplelink_cc2640r2_sdk_2_40_00_32/source/ti/blestack/controller/cc26xx_r2/inc/ll_scheduler.h: C:/ti/simplelink_cc2640r2_sdk_2_40_00_32/source/ti/blestack/inc/linkdb.h: C:/ti/simplelink_cc2640r2_sdk_2_40_00_32/source/ti/blestack/inc/gatt.h: C:/ti/simplelink_cc2640r2_sdk_2_40_00_32/source/ti/blestack/inc/att.h: C:/ti/simplelink_cc2640r2_sdk_2_40_00_32/source/ti/blestack/inc/gatt_uuid.h: C:/ti/simplelink_cc2640r2_sdk_2_40_00_32/source/ti/blestack/inc/gattservapp.h: C:/ti/simplelink_cc2640r2_sdk_2_40_00_32/source/ti/blestack/inc/gapgattserver.h: C:/ti/simplelink_cc2640r2_sdk_2_40_00_32/source/ti/blestack/profiles/roles/gapbondmgr.h: C:/ti/simplelink_cc2640r2_sdk_2_40_00_32/source/ti/blestack/inc/gap.h:
D