code
stringlengths
3
10M
language
stringclasses
31 values
module sendero.session.Render; void render_(SessionT)(IRenderable view) { SessionT.req.render(view); }
D
/** Token Stream. This provides a high-level interface to a stream of Tokens being generated by a callback function. Authors: Daniel Keep <daniel.keep@gmail.com> Copyright: See LICENSE. */ module eval.TokenStream; import eval.Location; import eval.Source; import eval.Tokens; final class TokenStream { alias bool function(Source, LocErr, out Token) NextToken; Source src; NextToken next; LocErr err; uint skipEolCounter = 0; this(Source src, NextToken next, LocErr err) { this.src = src; this.next = next; this.err = err; this.cache = new Token[](BaseCacheSize); this.cached = 0; } void pushSkipEol() { assert( skipEolCounter < skipEolCounter.max ); ++ skipEolCounter; } void popSkipEol() { assert( skipEolCounter > 0 ); -- skipEolCounter; } void skipEolDo(void delegate() dg) { pushSkipEol; dg(); popSkipEol; } void unskipEolDo(void delegate() dg) { auto oldCounter = skipEolCounter; skipEolCounter = 0; dg(); skipEolCounter = oldCounter; } bool skipEol() { return skipEolCounter > 0; } Token peek() { return peek(0); } Token peek(size_t n) { if( skipEol ) { size_t i = 0, j = 0; Token t; unskipEolDo ({ do { t = peek(i++); if( t.type == TOKeos ) return; else if( t.type != TOKeol ) ++ j; if( j == n+1 ) return; } while(true); }); return t; } if( cached > n ) return cache[n]; assert( cached <= n ); if( next is null ) return Token.init; assert( next !is null ); if( cache.length <= n ) { size_t newSize = cache.length*2; while( newSize <= n ) newSize *= 2; auto newCache = new Token[](newSize); newCache[0..cache.length] = cache; delete cache; cache = newCache; } assert( cache.length > n ); foreach( ref cacheEl ; cache[cached..n+1] ) { auto f = next(src, err, cacheEl); if( !f ) err(src.loc, "unexpected '{}'", src[0]); ++ cached; if( cacheEl.type == TOKeos ) { next = null; break; } } if( cached > n ) return cache[n]; else return Token.init; } Token pop() { if( skipEol ) { Token t; unskipEolDo ({ t = pop; while( t.type == TOKeol ) t = pop; }); return t; } if( cached > 0 ) { auto r = cache[0]; foreach( i, ref dst ; cache[0..$-1] ) dst = cache[i+1]; -- cached; return r; } else if( next !is null ) { Token token; auto f = next(src, err, token); if( !f ) err(src.loc, "unexpected '{}'", src[0]); if( token.type == TOKeos ) next = null; return token; } else err(src.loc, "expected something, got end of source"); } Token popExpect(TOK type, char[] msg = null) { auto actual = pop(); if( actual.type == type ) return actual; err(actual.loc, (msg !is null ? msg : "expected {0}, got {1}"), tokToName(type), tokToName(actual.type)); } Token popExpectAny(TOK[] types...) { auto actual = pop(); foreach( type ; types ) if( actual.type == type ) return actual; char[] exp; foreach( type ; types ) exp ~= (exp.length == 0 ? "" : ", ") ~ tokToName(type); err(actual.loc, "expected one of {0}; got {1}", exp, tokToName(actual.type)); } private: enum { BaseCacheSize = 2 } Token[] cache; size_t cached; }
D
/Users/oslo/code/swift_vapor_server/.build/debug/Turnstile.build/Realm/MemoryRealm.swift.o : /Users/oslo/code/swift_vapor_server/Packages/Turnstile-1.0.6/Sources/Turnstile/TurnstileError.swift /Users/oslo/code/swift_vapor_server/Packages/Turnstile-1.0.6/Sources/Turnstile/Core/Subject.swift /Users/oslo/code/swift_vapor_server/Packages/Turnstile-1.0.6/Sources/Turnstile/Core/Turnstile.swift /Users/oslo/code/swift_vapor_server/Packages/Turnstile-1.0.6/Sources/Turnstile/Credentials/APIKey.swift /Users/oslo/code/swift_vapor_server/Packages/Turnstile-1.0.6/Sources/Turnstile/Credentials/Credentials.swift /Users/oslo/code/swift_vapor_server/Packages/Turnstile-1.0.6/Sources/Turnstile/Credentials/CredentialsError.swift /Users/oslo/code/swift_vapor_server/Packages/Turnstile-1.0.6/Sources/Turnstile/Credentials/Token.swift /Users/oslo/code/swift_vapor_server/Packages/Turnstile-1.0.6/Sources/Turnstile/Credentials/UsernamePassword.swift /Users/oslo/code/swift_vapor_server/Packages/Turnstile-1.0.6/Sources/Turnstile/Realm/Account.swift /Users/oslo/code/swift_vapor_server/Packages/Turnstile-1.0.6/Sources/Turnstile/Realm/MemoryRealm.swift /Users/oslo/code/swift_vapor_server/Packages/Turnstile-1.0.6/Sources/Turnstile/Realm/Realm.swift /Users/oslo/code/swift_vapor_server/Packages/Turnstile-1.0.6/Sources/Turnstile/SessionManager/MemorySessionManager.swift /Users/oslo/code/swift_vapor_server/Packages/Turnstile-1.0.6/Sources/Turnstile/SessionManager/SessionManager.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/Foundation.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 /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/oslo/code/swift_vapor_server/.build/debug/TurnstileCrypto.swiftmodule /Users/oslo/code/swift_vapor_server/.build/debug/Turnstile.build/MemoryRealm~partial.swiftmodule : /Users/oslo/code/swift_vapor_server/Packages/Turnstile-1.0.6/Sources/Turnstile/TurnstileError.swift /Users/oslo/code/swift_vapor_server/Packages/Turnstile-1.0.6/Sources/Turnstile/Core/Subject.swift /Users/oslo/code/swift_vapor_server/Packages/Turnstile-1.0.6/Sources/Turnstile/Core/Turnstile.swift /Users/oslo/code/swift_vapor_server/Packages/Turnstile-1.0.6/Sources/Turnstile/Credentials/APIKey.swift /Users/oslo/code/swift_vapor_server/Packages/Turnstile-1.0.6/Sources/Turnstile/Credentials/Credentials.swift /Users/oslo/code/swift_vapor_server/Packages/Turnstile-1.0.6/Sources/Turnstile/Credentials/CredentialsError.swift /Users/oslo/code/swift_vapor_server/Packages/Turnstile-1.0.6/Sources/Turnstile/Credentials/Token.swift /Users/oslo/code/swift_vapor_server/Packages/Turnstile-1.0.6/Sources/Turnstile/Credentials/UsernamePassword.swift /Users/oslo/code/swift_vapor_server/Packages/Turnstile-1.0.6/Sources/Turnstile/Realm/Account.swift /Users/oslo/code/swift_vapor_server/Packages/Turnstile-1.0.6/Sources/Turnstile/Realm/MemoryRealm.swift /Users/oslo/code/swift_vapor_server/Packages/Turnstile-1.0.6/Sources/Turnstile/Realm/Realm.swift /Users/oslo/code/swift_vapor_server/Packages/Turnstile-1.0.6/Sources/Turnstile/SessionManager/MemorySessionManager.swift /Users/oslo/code/swift_vapor_server/Packages/Turnstile-1.0.6/Sources/Turnstile/SessionManager/SessionManager.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/Foundation.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 /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/oslo/code/swift_vapor_server/.build/debug/TurnstileCrypto.swiftmodule /Users/oslo/code/swift_vapor_server/.build/debug/Turnstile.build/MemoryRealm~partial.swiftdoc : /Users/oslo/code/swift_vapor_server/Packages/Turnstile-1.0.6/Sources/Turnstile/TurnstileError.swift /Users/oslo/code/swift_vapor_server/Packages/Turnstile-1.0.6/Sources/Turnstile/Core/Subject.swift /Users/oslo/code/swift_vapor_server/Packages/Turnstile-1.0.6/Sources/Turnstile/Core/Turnstile.swift /Users/oslo/code/swift_vapor_server/Packages/Turnstile-1.0.6/Sources/Turnstile/Credentials/APIKey.swift /Users/oslo/code/swift_vapor_server/Packages/Turnstile-1.0.6/Sources/Turnstile/Credentials/Credentials.swift /Users/oslo/code/swift_vapor_server/Packages/Turnstile-1.0.6/Sources/Turnstile/Credentials/CredentialsError.swift /Users/oslo/code/swift_vapor_server/Packages/Turnstile-1.0.6/Sources/Turnstile/Credentials/Token.swift /Users/oslo/code/swift_vapor_server/Packages/Turnstile-1.0.6/Sources/Turnstile/Credentials/UsernamePassword.swift /Users/oslo/code/swift_vapor_server/Packages/Turnstile-1.0.6/Sources/Turnstile/Realm/Account.swift /Users/oslo/code/swift_vapor_server/Packages/Turnstile-1.0.6/Sources/Turnstile/Realm/MemoryRealm.swift /Users/oslo/code/swift_vapor_server/Packages/Turnstile-1.0.6/Sources/Turnstile/Realm/Realm.swift /Users/oslo/code/swift_vapor_server/Packages/Turnstile-1.0.6/Sources/Turnstile/SessionManager/MemorySessionManager.swift /Users/oslo/code/swift_vapor_server/Packages/Turnstile-1.0.6/Sources/Turnstile/SessionManager/SessionManager.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/Foundation.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 /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/oslo/code/swift_vapor_server/.build/debug/TurnstileCrypto.swiftmodule
D
/* * 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 pango.c.item; import pango.c.types; import pango.c.font; import pango.c.engine; import glib; import gobject; extern (C): /** * PANGO_ANALYSIS_FLAG_CENTERED_BASELINE: * * Whether the segment should be shifted to center around the baseline. * Used in vertical writing directions mostly. * * Since: 1.16 */ enum PANGO_ANALYSIS_FLAG_CENTERED_BASELINE = (1 << 0); /** * PANGO_ANALYSIS_FLAG_IS_ELLIPSIS: * * This flag is used to mark runs that hold ellipsized text, * in an ellipsized layout. * * Since: 1.36.7 */ enum PANGO_ANALYSIS_FLAG_IS_ELLIPSIS = (1 << 1); /** * PangoAnalysis: * @shape_engine: the engine for doing rendering-system-dependent processing. * @lang_engine: the engine for doing rendering-system-independent processing. * @font: the font for this segment. * @level: the bidirectional level for this segment. * @gravity: the glyph orientation for this segment (A #PangoGravity). * @flags: boolean flags for this segment (currently only one) (Since: 1.16). * @script: the detected script for this segment (A #PangoScript) (Since: 1.18). * @language: the detected language for this segment. * @extra_attrs: extra attributes for this segment. * * The #PangoAnalysis structure stores information about * the properties of a segment of text. */ struct PangoAnalysis { PangoEngineShape *shape_engine; PangoEngineLang *lang_engine; PangoFont *font; guint8 level; guint8 gravity; /* PangoGravity */ guint8 flags; guint8 script; /* PangoScript */ PangoLanguage *language; GSList *extra_attrs; } /** * PangoItem: * * The #PangoItem structure stores information about a segment of text. */ struct PangoItem { gint offset; gint length; gint num_chars; PangoAnalysis analysis; } pure GType pango_item_get_type (); PangoItem *pango_item_new (); PangoItem *pango_item_copy (PangoItem *item); void pango_item_free (PangoItem *item); PangoItem *pango_item_split (PangoItem *orig, int split_index, int split_offset);
D
void main() { auto S = rs; auto T = rs; if(S.length + 1 == T.length && T[0..$-1] == S) { writeln("Yes"); } else writeln("No"); } // =================================== import std.stdio; import std.string; import std.functional; import std.algorithm; import std.range; import std.traits; import std.math; import std.container; import std.bigint; import std.numeric; import std.conv; import std.typecons; import std.uni; import std.ascii; import std.bitmanip; import core.bitop; T readAs(T)() if (isBasicType!T) { return readln.chomp.to!T; } T readAs(T)() if (isArray!T) { return readln.split.to!T; } T[][] readMatrix(T)(uint height, uint width) if (!isSomeChar!T) { auto res = new T[][](height, width); foreach(i; 0..height) { res[i] = readAs!(T[]); } return res; } T[][] readMatrix(T)(uint height, uint width) if (isSomeChar!T) { auto res = new T[][](height, width); foreach(i; 0..height) { auto s = rs; foreach(j; 0..width) res[i][j] = s[j].to!T; } return res; } int ri() { return readAs!int; } long rl() { return readAs!long; } double rd() { return readAs!double; } string rs() { return readln.chomp; }
D
module gtkD.gtk.UIManager; public import gtkD.gtkc.gtktypes; private import gtkD.gtkc.gtk; private import gtkD.glib.ConstructionException; private import gtkD.gobject.Signals; public import gtkD.gtkc.gdktypes; private import gtkD.glib.Str; private import gtkD.glib.ErrorG; private import gtkD.glib.GException; private import gtkD.gtk.ActionGroup; private import gtkD.glib.ListG; private import gtkD.gtk.AccelGroup; private import gtkD.gtk.Widget; private import gtkD.glib.ListSG; private import gtkD.gtk.Action; private import gtkD.gtk.BuildableIF; private import gtkD.gtk.BuildableT; private import gtkD.gobject.ObjectG; /** * Description * A GtkUIManager constructs a user interface (menus and toolbars) from * one or more UI definitions, which reference actions from one or more * action groups. * UI Definitions * The UI definitions are specified in an XML format which can be * roughly described by the following DTD. * Do not confuse the GtkUIManager UI Definitions described here with * the similarly named GtkBuilder UI * Definitions. * <!ELEMENT ui (menubar|toolbar|popup|accelerator)* > * <!ELEMENT menubar (menuitem|separator|placeholder|menu)* > * <!ELEMENT menu (menuitem|separator|placeholder|menu)* > * <!ELEMENT popup (menuitem|separator|placeholder|menu)* > * <!ELEMENT toolbar (toolitem|separator|placeholder)* > * <!ELEMENT placeholder (menuitem|toolitem|separator|placeholder|menu)* > * <!ELEMENT menuitem EMPTY > * <!ELEMENT toolitem (menu?) > * <!ELEMENT separator EMPTY > * <!ELEMENT accelerator EMPTY > * <!ATTLIST menubar name num;IMPLIED * action num;IMPLIED > * <!ATTLIST toolbar name num;IMPLIED * action num;IMPLIED > * <!ATTLIST popup name num;IMPLIED * action num;IMPLIED * accelerators (true|false) num;IMPLIED > * <!ATTLIST placeholder name num;IMPLIED * action num;IMPLIED > * <!ATTLIST separator name num;IMPLIED * action num;IMPLIED * expand (true|false) num;IMPLIED > * <!ATTLIST menu name num;IMPLIED * action num;REQUIRED * position (top|bot) num;IMPLIED > * <!ATTLIST menuitem name num;IMPLIED * action num;REQUIRED * position (top|bot) num;IMPLIED > * <!ATTLIST toolitem name num;IMPLIED * action num;REQUIRED * position (top|bot) num;IMPLIED > * <!ATTLIST accelerator name num;IMPLIED * action num;REQUIRED > * There are some additional restrictions beyond those specified in the * DTD, e.g. every toolitem must have a toolbar in its anchestry and * every menuitem must have a menubar or popup in its anchestry. Since * a GMarkup parser is used to parse the UI description, it must not only * be valid XML, but valid GMarkup. * If a name is not specified, it defaults to the action. If an action is * not specified either, the element name is used. The name and action * attributes must not contain '/' characters after parsing (since that * would mess up path lookup) and must be usable as XML attributes when * enclosed in doublequotes, thus they must not '"' characters or references * to the quot; entity. * Example 33. A UI definition * <ui> * <menubar> * <menu name="FileMenu" action="FileMenuAction"> * <menuitem name="New" action="New2Action" /> * <placeholder name="FileMenuAdditions" /> * </menu> * <menu name="JustifyMenu" action="JustifyMenuAction"> * <menuitem name="Left" action="justify-left"/> * <menuitem name="Centre" action="justify-center"/> * <menuitem name="Right" action="justify-right"/> * <menuitem name="Fill" action="justify-fill"/> * </menu> * </menubar> * <toolbar action="toolbar1"> * <placeholder name="JustifyToolItems"> * <separator/> * <toolitem name="Left" action="justify-left"/> * <toolitem name="Centre" action="justify-center"/> * <toolitem name="Right" action="justify-right"/> * <toolitem name="Fill" action="justify-fill"/> * <separator/> * </placeholder> * </toolbar> * </ui> * The constructed widget hierarchy is very similar to the element tree * of the XML, with the exception that placeholders are merged into their * parents. The correspondence of XML elements to widgets should be * almost obvious: * menubar * a GtkMenuBar * toolbar * a GtkToolbar * popup * a toplevel GtkMenu * menu * a GtkMenu attached to a menuitem * menuitem * a GtkMenuItem subclass, the exact type depends on the * action * toolitem * a GtkToolItem subclass, the exact type depends on the * action. Note that toolitem elements may contain a menu element, but only * if their associated action specifies a GtkMenuToolButton as proxy. * separator * a GtkSeparatorMenuItem or * GtkSeparatorToolItem * accelerator * a keyboard accelerator * The "position" attribute determines where a constructed widget is positioned * wrt. to its siblings in the partially constructed tree. If it is * "top", the widget is prepended, otherwise it is appended. * <hr> * UI Merging * The most remarkable feature of GtkUIManager is that it can overlay a set * of menuitems and toolitems over another one, and demerge them later. * Merging is done based on the names of the XML elements. Each element is * identified by a path which consists of the names of its anchestors, separated * by slashes. For example, the menuitem named "Left" in the example above * has the path /ui/menubar/JustifyMenu/Left and the * toolitem with the same name has path * /ui/toolbar1/JustifyToolItems/Left. * <hr> * Accelerators * Every action has an accelerator path. Accelerators are installed together with * menuitem proxies, but they can also be explicitly added with <accelerator> * elements in the UI definition. This makes it possible to have accelerators for * actions even if they have no visible proxies. * <hr> * Smart Separators * The separators created by GtkUIManager are "smart", i.e. they do not show up * in the UI unless they end up between two visible menu or tool items. Separators * which are located at the very beginning or end of the menu or toolbar * containing them, or multiple separators next to each other, are hidden. This * is a useful feature, since the merging of UI elements from multiple sources * can make it hard or impossible to determine in advance whether a separator * will end up in such an unfortunate position. * For separators in toolbars, you can set expand="true" to * turn them from a small, visible separator to an expanding, invisible one. * Toolitems following an expanding separator are effectively right-aligned. * <hr> * Empty Menus * Submenus pose similar problems to separators inconnection with merging. It is * impossible to know in advance whether they will end up empty after merging. * GtkUIManager offers two ways to treat empty submenus: * make them disappear by hiding the menu item they're attached to * add an insensitive "Empty" item * The behaviour is chosen based on the "hide_if_empty" property of the action * to which the submenu is associated. * <hr> * GtkUIManager as GtkBuildable * The GtkUIManager implementation of the GtkBuildable interface accepts * GtkActionGroup objects as <child> elements in UI definitions. * A GtkUIManager UI definition as described above can be embedded in * an GtkUIManager <object> element in a GtkBuilder UI definition. * The widgets that are constructed by a GtkUIManager can be embedded in * other parts of the constructed user interface with the help of the * "constructor" attribute. See the example below. * Example 34. An embedded GtkUIManager UI definition * <object class="GtkUIManager" id="uiman"> * <child> * <object class="GtkActionGroup" id="actiongroup"> * <child> * <object class="GtkAction" id="file"> * <property name="label">_File</property> * </object> * </child> * </object> * </child> * <ui> * <menubar name="menubar1"> * <menu action="file"> * </menu> * </menubar> * </ui> * </object> * <object class="GtkWindow" id="main-window"> * <child> * <object class="GtkMenuBar" id="menubar1" constructor="uiman"/> * </child> * </object> */ public class UIManager : ObjectG, BuildableIF { /** the main Gtk struct */ protected GtkUIManager* gtkUIManager; public GtkUIManager* getUIManagerStruct(); /** the main Gtk struct as a void* */ protected override void* getStruct(); /** * Sets our main struct and passes it to the parent class */ public this (GtkUIManager* gtkUIManager); // add the Buildable capabilities mixin BuildableT!(GtkUIManager); /** */ int[char[]] connectedSignals; void delegate(UIManager)[] onActionsChangedListeners; /** * The "actions-changed" signal is emitted whenever the set of actions * changes. * Since 2.4 */ void addOnActionsChanged(void delegate(UIManager) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0); extern(C) static void callBackActionsChanged(GtkUIManager* mergeStruct, UIManager uIManager); void delegate(Widget, UIManager)[] onAddWidgetListeners; /** * The add_widget signal is emitted for each generated menubar and toolbar. * It is not emitted for generated popup menus, which can be obtained by * gtk_ui_manager_get_widget(). * Since 2.4 */ void addOnAddWidget(void delegate(Widget, UIManager) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0); extern(C) static void callBackAddWidget(GtkUIManager* mergeStruct, GtkWidget* widget, UIManager uIManager); void delegate(Action, Widget, UIManager)[] onConnectProxyListeners; /** * The connect_proxy signal is emitted after connecting a proxy to * an action in the group. * This is intended for simple customizations for which a custom action * class would be too clumsy, e.g. showing tooltips for menuitems in the * statusbar. * Since 2.4 */ void addOnConnectProxy(void delegate(Action, Widget, UIManager) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0); extern(C) static void callBackConnectProxy(GtkUIManager* uimanagerStruct, GtkAction* action, GtkWidget* proxy, UIManager uIManager); void delegate(Action, Widget, UIManager)[] onDisconnectProxyListeners; /** * The disconnect_proxy signal is emitted after disconnecting a proxy * from an action in the group. * Since 2.4 */ void addOnDisconnectProxy(void delegate(Action, Widget, UIManager) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0); extern(C) static void callBackDisconnectProxy(GtkUIManager* uimanagerStruct, GtkAction* action, GtkWidget* proxy, UIManager uIManager); void delegate(Action, UIManager)[] onPostActivateListeners; /** * The post_activate signal is emitted just after the action * is activated. * This is intended for applications to get notification * just after any action is activated. * Since 2.4 */ void addOnPostActivate(void delegate(Action, UIManager) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0); extern(C) static void callBackPostActivate(GtkUIManager* uimanagerStruct, GtkAction* action, UIManager uIManager); void delegate(Action, UIManager)[] onPreActivateListeners; /** * The pre_activate signal is emitted just before the action * is activated. * This is intended for applications to get notification * just before any action is activated. * Since 2.4 * See Also * GtkBuilder */ void addOnPreActivate(void delegate(Action, UIManager) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0); extern(C) static void callBackPreActivate(GtkUIManager* uimanagerStruct, GtkAction* action, UIManager uIManager); /** * Creates a new ui manager object. * Since 2.4 * Throws: ConstructionException GTK+ fails to create the object. */ public this (); /** * Sets the "add_tearoffs" property, which controls whether menus * generated by this GtkUIManager will have tearoff menu items. * Note that this only affects regular menus. Generated popup * menus never have tearoff menu items. * Since 2.4 * Params: * addTearoffs = whether tearoff menu items are added */ public void setAddTearoffs(int addTearoffs); /** * Returns whether menus generated by this GtkUIManager * will have tearoff menu items. * Since 2.4 * Returns: whether tearoff menu items are added */ public int getAddTearoffs(); /** * Inserts an action group into the list of action groups associated * with self. Actions in earlier groups hide actions with the same * name in later groups. * Since 2.4 * Params: * actionGroup = the action group to be inserted * pos = the position at which the group will be inserted. */ public void insertActionGroup(ActionGroup actionGroup, int pos); /** * Removes an action group from the list of action groups associated * with self. * Since 2.4 * Params: * actionGroup = the action group to be removed */ public void removeActionGroup(ActionGroup actionGroup); /** * Returns the list of action groups associated with self. * Since 2.4 * Returns: a GList of action groups. The list is owned by GTK+ and should not be modified. */ public ListG getActionGroups(); /** * Returns the GtkAccelGroup associated with self. * Since 2.4 * Returns: the GtkAccelGroup. */ public AccelGroup getAccelGroup(); /** * Looks up a widget by following a path. * The path consists of the names specified in the XML description of the UI. * separated by '/'. Elements which don't have a name or action attribute in * the XML (e.g. <popup>) can be addressed by their XML element name * (e.g. "popup"). The root element ("/ui") can be omitted in the path. * Note that the widget found by following a path that ends in a <menu> * element is the menuitem to which the menu is attached, not the menu itself. * Also note that the widgets constructed by a ui manager are not tied to * the lifecycle of the ui manager. If you add the widgets returned by this * function to some container or explicitly ref them, they will survive the * destruction of the ui manager. * Since 2.4 * Params: * path = a path * Returns: the widget found by following the path, or NULL if no widget was found. */ public Widget getWidget(string path); /** * Obtains a list of all toplevel widgets of the requested types. * Since 2.4 * Params: * types = specifies the types of toplevel widgets to include. Allowed * types are GTK_UI_MANAGER_MENUBAR, GTK_UI_MANAGER_TOOLBAR and * GTK_UI_MANAGER_POPUP. * Returns: a newly-allocated GSList of all toplevel widgets of therequested types. Free the returned list with g_slist_free(). */ public ListSG getToplevels(GtkUIManagerItemType types); /** * Looks up an action by following a path. See gtk_ui_manager_get_widget() * for more information about paths. * Since 2.4 * Params: * path = a path * Returns: the action whose proxy widget is found by following the path, or NULL if no widget was found. */ public Action getAction(string path); /** * Parses a string containing a UI definition and * merges it with the current contents of self. An enclosing <ui> * element is added if it is missing. * Since 2.4 * Params: * buffer = the string to parse * length = the length of buffer (may be -1 if buffer is nul-terminated) * Returns: The merge id for the merged UI. The merge id can be used to unmerge the UI with gtk_ui_manager_remove_ui(). If an error occurred, the return value is 0. * Throws: GException on failure. */ public uint addUiFromString(string buffer, int length); /** * Parses a file containing a UI definition and * merges it with the current contents of self. * Since 2.4 * Params: * filename = the name of the file to parse * Returns: The merge id for the merged UI. The merge id can be used to unmerge the UI with gtk_ui_manager_remove_ui(). If an error occurred, the return value is 0. * Throws: GException on failure. */ public uint addUiFromFile(string filename); /** * Returns an unused merge id, suitable for use with * gtk_ui_manager_add_ui(). * Since 2.4 * Returns: an unused merge id. */ public uint newMergeId(); /** * Adds a UI element to the current contents of self. * If type is GTK_UI_MANAGER_AUTO, GTK+ inserts a menuitem, toolitem or * separator if such an element can be inserted at the place determined by * path. Otherwise type must indicate an element that can be inserted at * the place determined by path. * If path points to a menuitem or toolitem, the new element will be inserted * before or after this item, depending on top. * Since 2.4 * Params: * mergeId = the merge id for the merged UI, see gtk_ui_manager_new_merge_id() * path = a path * name = the name for the added UI element * action = the name of the action to be proxied, or NULL to add a separator * type = the type of UI element to add. * top = if TRUE, the UI element is added before its siblings, otherwise it * is added after its siblings. */ public void addUi(uint mergeId, string path, string name, string action, GtkUIManagerItemType type, int top); /** * Unmerges the part of selfs content identified by merge_id. * Since 2.4 * Params: * mergeId = a merge id as returned by gtk_ui_manager_add_ui_from_string() */ public void removeUi(uint mergeId); /** * Creates a UI definition of the merged UI. * Since 2.4 * Returns: A newly allocated string containing an XML representation of the merged UI. */ public string getUi(); /** * Makes sure that all pending updates to the UI have been completed. * This may occasionally be necessary, since GtkUIManager updates the * UI in an idle function. A typical example where this function is * useful is to enforce that the menubar and toolbar have been added to * Since 2.4 */ public void ensureUpdate(); }
D
// REQUIRED_ARGS: -vgc -o- // PERMUTE_ARGS: /* TEST_OUTPUT: --- compilable/vgc1.d(93): Deprecation: The `delete` keyword has been deprecated. Use `object.destroy()` (and `core.memory.GC.free()` if applicable) instead. compilable/vgc1.d(94): Deprecation: The `delete` keyword has been deprecated. Use `object.destroy()` (and `core.memory.GC.free()` if applicable) instead. compilable/vgc1.d(95): Deprecation: The `delete` keyword has been deprecated. Use `object.destroy()` (and `core.memory.GC.free()` if applicable) instead. --- */ /***************** NewExp *******************/ struct S1 { } struct S2 { this(int); } struct S3 { this(int) @nogc; } struct S4 { new(size_t); } struct S5 { @nogc new(size_t); } /* TEST_OUTPUT: --- compilable/vgc1.d(36): vgc: `new` causes a GC allocation compilable/vgc1.d(38): vgc: `new` causes a GC allocation compilable/vgc1.d(39): vgc: `new` causes a GC allocation compilable/vgc1.d(41): vgc: `new` causes a GC allocation compilable/vgc1.d(42): vgc: `new` causes a GC allocation compilable/vgc1.d(43): vgc: `new` causes a GC allocation compilable/vgc1.d(47): vgc: `new` causes a GC allocation --- */ void testNew() { int* p1 = new int; int[] a1 = new int[3]; int[][] a2 = new int[][](2, 3); S1* ps1 = new S1(); S2* ps2 = new S2(1); S3* ps3 = new S3(1); S4* ps4 = new S4; // no error S5* ps5 = new S5; // no error Object o1 = new Object(); } /* TEST_OUTPUT: --- compilable/vgc1.d(64): vgc: `new` causes a GC allocation compilable/vgc1.d(66): vgc: `new` causes a GC allocation compilable/vgc1.d(67): vgc: `new` causes a GC allocation compilable/vgc1.d(69): vgc: `new` causes a GC allocation compilable/vgc1.d(70): vgc: `new` causes a GC allocation compilable/vgc1.d(71): vgc: `new` causes a GC allocation --- */ void testNewScope() { scope int* p1 = new int; scope int[] a1 = new int[3]; scope int[][] a2 = new int[][](2, 3); scope S1* ps1 = new S1(); scope S2* ps2 = new S2(1); scope S3* ps3 = new S3(1); scope S4* ps4 = new S4; // no error scope S5* ps5 = new S5; // no error scope Object o1 = new Object(); // no error scope o2 = new Object(); // no error scope Object o3; o3 = o2; // no error } /***************** DeleteExp *******************/ /* TEST_OUTPUT: --- compilable/vgc1.d(93): vgc: `delete` requires the GC compilable/vgc1.d(94): vgc: `delete` requires the GC compilable/vgc1.d(95): vgc: `delete` requires the GC --- */ void testDelete(int* p, Object o, S1* s) { delete p; delete o; delete s; }
D
/* Copyright (c) 2019 Ferhat Kurtulmuş 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. */ module opencvd.calib3d; import std.conv; import opencvd.cvcore; private extern (C){ void Fisheye_UndistortImage(Mat distorted, Mat undistorted, Mat k, Mat d); void Fisheye_UndistortImageWithParams(Mat distorted, Mat undistorted, Mat k, Mat d, Mat knew, Size size); void InitUndistortRectifyMap(Mat cameraMatrix,Mat distCoeffs,Mat r,Mat newCameraMatrix,Size size,int m1type,Mat map1,Mat map2); Mat GetOptimalNewCameraMatrixWithParams(Mat cameraMatrix,Mat distCoeffs,Size size,double alpha,Size newImgSize,Rect* validPixROI,bool centerPrincipalPoint); Mat FindHomography1(Point2fs srcPoints, Point2fs dstPoints, int method, double ransacReprojThreshold, Mat mask, int maxIters, double confidence); } void fisheye_UndistortImage(Mat distorted, Mat undistorted, Mat k, Mat d){ Fisheye_UndistortImage(distorted, undistorted, k, d); } void fisheye_UndistortImageWithParams(Mat distorted, Mat undistorted, Mat k, Mat d, Mat knew, Size size){ Fisheye_UndistortImageWithParams(distorted, undistorted, k, d, knew, size); } void initUndistortRectifyMap(Mat cameraMatrix,Mat distCoeffs, Mat r, Mat newCameraMatrix, Size size, int m1type, Mat map1, Mat map2){ InitUndistortRectifyMap(cameraMatrix, distCoeffs, r, newCameraMatrix, size, m1type, map1, map2); } Mat getOptimalNewCameraMatrixWithParams(Mat cameraMatrix,Mat distCoeffs,Size size,double alpha,Size newImgSize,Rect* validPixROI,bool centerPrincipalPoint){ return GetOptimalNewCameraMatrixWithParams(cameraMatrix, distCoeffs, size, alpha, newImgSize, validPixROI, centerPrincipalPoint); } enum: int{ LMEDS = 4, RANSAC = 8, RHO = 16 } Mat findHomography(Point2f[] srcPoints, Point2f[] dstPoints, int method=0, double ransacReprojThreshold=3, Mat mask=Mat(), int maxIters=2000, double confidence=0.995){ return FindHomography1(Point2fs(srcPoints.ptr, srcPoints.length.to!int), Point2fs(dstPoints.ptr, dstPoints.length.to!int), method, ransacReprojThreshold, mask, maxIters, confidence); }
D
/Users/william/Projects/studySocial/studySocial/build/Pods.build/Debug-iphonesimulator/FacebookCore.build/Objects-normal/x86_64/UserProfile.FetchResult.o : /Users/william/Projects/studySocial/studySocial/Pods/FacebookCore/Sources/Core/GraphRequest/GraphRequestProtocol.Bridge.swift /Users/william/Projects/studySocial/studySocial/Pods/FacebookCore/Sources/Core/UserProfile/UserProfile.swift /Users/william/Projects/studySocial/studySocial/Pods/FacebookCore/Sources/Core/AppEvents/AppEventParameterName.swift /Users/william/Projects/studySocial/studySocial/Pods/FacebookCore/Sources/Core/AppEvents/AppEventName.swift /Users/william/Projects/studySocial/studySocial/Pods/FacebookCore/Sources/Core/Internal/Extensions/Optional+OnSome.swift /Users/william/Projects/studySocial/studySocial/Pods/FacebookCore/Sources/Core/GraphRequest/GraphResponse.swift /Users/william/Projects/studySocial/studySocial/Pods/FacebookCore/Sources/Core/GraphRequest/GraphRequestConnection.Delegate.swift /Users/william/Projects/studySocial/studySocial/Pods/FacebookCore/Sources/Core/Common/SDKApplicationDelegate.swift /Users/william/Projects/studySocial/studySocial/Pods/FacebookCore/Sources/Core/GraphRequest/GraphResponseProtocol.swift /Users/william/Projects/studySocial/studySocial/Pods/FacebookCore/Sources/Core/GraphRequest/GraphRequestProtocol.swift /Users/william/Projects/studySocial/studySocial/Pods/FacebookCore/Sources/Core/Common/AccessToken.swift /Users/william/Projects/studySocial/studySocial/Pods/FacebookCore/Sources/Core/AppEvents/AppEvent.Builtin.swift /Users/william/Projects/studySocial/studySocial/Pods/FacebookCore/Sources/Core/GraphRequest/GraphAPIVersion.swift /Users/william/Projects/studySocial/studySocial/Pods/FacebookCore/Sources/Core/Permissions/Permission.swift /Users/william/Projects/studySocial/studySocial/Pods/FacebookCore/Sources/Core/Permissions/ReadPermission.swift /Users/william/Projects/studySocial/studySocial/Pods/FacebookCore/Sources/Core/Permissions/PublishPermission.swift /Users/william/Projects/studySocial/studySocial/Pods/FacebookCore/Sources/Core/GraphRequest/GraphRequestConnection.swift /Users/william/Projects/studySocial/studySocial/Pods/FacebookCore/Sources/Core/Internal/Extensions/Dictionary+KeyValueMap.swift /Users/william/Projects/studySocial/studySocial/Pods/FacebookCore/Sources/Core/AppEvents/AppEventsLogger.swift /Users/william/Projects/studySocial/studySocial/Pods/FacebookCore/Sources/Core/Common/SDKLoggingBehavior.swift /Users/william/Projects/studySocial/studySocial/Pods/FacebookCore/Sources/Core/AppEvents/AppEventsLogger.FlushBehavior.swift /Users/william/Projects/studySocial/studySocial/Pods/FacebookCore/Sources/Core/Common/SDKSettings.swift /Users/william/Projects/studySocial/studySocial/Pods/FacebookCore/Sources/Core/UserProfile/UserProfile.FetchResult.swift /Users/william/Projects/studySocial/studySocial/Pods/FacebookCore/Sources/Core/GraphRequest/GraphRequestResult.swift /Users/william/Projects/studySocial/studySocial/Pods/FacebookCore/Sources/Core/GraphRequest/GraphRequestDataAttachment.swift /Users/william/Projects/studySocial/studySocial/Pods/FacebookCore/Sources/Core/AppEvents/AppEvent.swift /Users/william/Projects/studySocial/studySocial/Pods/FacebookCore/Sources/Core/GraphRequest/GraphRequest.swift /Users/william/Projects/studySocial/studySocial/Pods/FacebookCore/Sources/Core/UserProfile/UserProfile.PictureView.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/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/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/william/Projects/studySocial/studySocial/Pods/Bolts/Bolts/iOS/BFURL.h /Users/william/Projects/studySocial/studySocial/Pods/Target\ Support\ Files/FacebookCore/FacebookCore-umbrella.h /Users/william/Projects/studySocial/studySocial/Pods/Target\ Support\ Files/Bolts/Bolts-umbrella.h /Users/william/Projects/studySocial/studySocial/Pods/Target\ Support\ Files/FBSDKCoreKit/FBSDKCoreKit-umbrella.h /Users/william/Projects/studySocial/studySocial/Pods/Bolts/Bolts/Common/BFCancellationTokenSource.h /Users/william/Projects/studySocial/studySocial/Pods/Bolts/Bolts/Common/BFTaskCompletionSource.h /Users/william/Projects/studySocial/studySocial/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKProfile.h /Users/william/Projects/studySocial/studySocial/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKApplicationDelegate.h /Users/william/Projects/studySocial/studySocial/Pods/Bolts/Bolts/iOS/BFAppLinkResolving.h /Users/william/Projects/studySocial/studySocial/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKCopying.h /Users/william/Projects/studySocial/studySocial/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKMutableCopying.h /Users/william/Projects/studySocial/studySocial/Pods/Bolts/Bolts/iOS/BFAppLink.h /Users/william/Projects/studySocial/studySocial/Pods/Bolts/Bolts/Common/BFTask.h /Users/william/Projects/studySocial/studySocial/Pods/Bolts/Bolts/Common/BFCancellationToken.h /Users/william/Projects/studySocial/studySocial/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKAccessToken.h /Users/william/Projects/studySocial/studySocial/Pods/Bolts/Bolts/iOS/BFAppLinkNavigation.h /Users/william/Projects/studySocial/studySocial/Pods/Bolts/Bolts/Common/BFCancellationTokenRegistration.h /Users/william/Projects/studySocial/studySocial/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKGraphRequestConnection.h /Users/william/Projects/studySocial/studySocial/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKButton.h /Users/william/Projects/studySocial/studySocial/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKTestUsersManager.h /Users/william/Projects/studySocial/studySocial/Pods/Bolts/Bolts/iOS/BFAppLinkReturnToRefererController.h /Users/william/Projects/studySocial/studySocial/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKAppLinkResolver.h /Users/william/Projects/studySocial/studySocial/Pods/Bolts/Bolts/iOS/BFWebViewAppLinkResolver.h /Users/william/Projects/studySocial/studySocial/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKGraphErrorRecoveryProcessor.h /Users/william/Projects/studySocial/studySocial/Pods/Bolts/Bolts/Common/BFExecutor.h /Users/william/Projects/studySocial/studySocial/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKSettings.h /Users/william/Projects/studySocial/studySocial/Pods/Bolts/Bolts/Common/BFTask+Exceptions.h /Users/william/Projects/studySocial/studySocial/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKMacros.h /Users/william/Projects/studySocial/studySocial/Pods/Bolts/Bolts/Common/Bolts.h /Users/william/Projects/studySocial/studySocial/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKConstants.h /Users/william/Projects/studySocial/studySocial/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKAppEvents.h /Users/william/Projects/studySocial/studySocial/Pods/Bolts/Bolts/iOS/BFAppLinkTarget.h /Users/william/Projects/studySocial/studySocial/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit.h /Users/william/Projects/studySocial/studySocial/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKGraphRequestDataAttachment.h /Users/william/Projects/studySocial/studySocial/Pods/Bolts/Bolts/iOS/BFMeasurementEvent.h /Users/william/Projects/studySocial/studySocial/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKGraphRequest.h /Users/william/Projects/studySocial/studySocial/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKProfilePictureView.h /Users/william/Projects/studySocial/studySocial/Pods/Bolts/Bolts/iOS/BFAppLinkReturnToRefererView.h /Users/william/Projects/studySocial/studySocial/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKUtility.h /Users/william/Projects/studySocial/studySocial/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKAppLinkUtility.h /Users/william/Projects/studySocial/studySocial/build/Pods.build/Debug-iphonesimulator/FacebookCore.build/unextended-module.modulemap /Users/william/Projects/studySocial/studySocial/build/Pods.build/Debug-iphonesimulator/Bolts.build/module.modulemap /Users/william/Projects/studySocial/studySocial/build/Pods.build/Debug-iphonesimulator/FBSDKCoreKit.build/module.modulemap /Users/william/Projects/studySocial/studySocial/build/Pods.build/Debug-iphonesimulator/FacebookCore.build/Objects-normal/x86_64/UserProfile.FetchResult~partial.swiftmodule : /Users/william/Projects/studySocial/studySocial/Pods/FacebookCore/Sources/Core/GraphRequest/GraphRequestProtocol.Bridge.swift /Users/william/Projects/studySocial/studySocial/Pods/FacebookCore/Sources/Core/UserProfile/UserProfile.swift /Users/william/Projects/studySocial/studySocial/Pods/FacebookCore/Sources/Core/AppEvents/AppEventParameterName.swift /Users/william/Projects/studySocial/studySocial/Pods/FacebookCore/Sources/Core/AppEvents/AppEventName.swift /Users/william/Projects/studySocial/studySocial/Pods/FacebookCore/Sources/Core/Internal/Extensions/Optional+OnSome.swift /Users/william/Projects/studySocial/studySocial/Pods/FacebookCore/Sources/Core/GraphRequest/GraphResponse.swift /Users/william/Projects/studySocial/studySocial/Pods/FacebookCore/Sources/Core/GraphRequest/GraphRequestConnection.Delegate.swift /Users/william/Projects/studySocial/studySocial/Pods/FacebookCore/Sources/Core/Common/SDKApplicationDelegate.swift /Users/william/Projects/studySocial/studySocial/Pods/FacebookCore/Sources/Core/GraphRequest/GraphResponseProtocol.swift /Users/william/Projects/studySocial/studySocial/Pods/FacebookCore/Sources/Core/GraphRequest/GraphRequestProtocol.swift /Users/william/Projects/studySocial/studySocial/Pods/FacebookCore/Sources/Core/Common/AccessToken.swift /Users/william/Projects/studySocial/studySocial/Pods/FacebookCore/Sources/Core/AppEvents/AppEvent.Builtin.swift /Users/william/Projects/studySocial/studySocial/Pods/FacebookCore/Sources/Core/GraphRequest/GraphAPIVersion.swift /Users/william/Projects/studySocial/studySocial/Pods/FacebookCore/Sources/Core/Permissions/Permission.swift /Users/william/Projects/studySocial/studySocial/Pods/FacebookCore/Sources/Core/Permissions/ReadPermission.swift /Users/william/Projects/studySocial/studySocial/Pods/FacebookCore/Sources/Core/Permissions/PublishPermission.swift /Users/william/Projects/studySocial/studySocial/Pods/FacebookCore/Sources/Core/GraphRequest/GraphRequestConnection.swift /Users/william/Projects/studySocial/studySocial/Pods/FacebookCore/Sources/Core/Internal/Extensions/Dictionary+KeyValueMap.swift /Users/william/Projects/studySocial/studySocial/Pods/FacebookCore/Sources/Core/AppEvents/AppEventsLogger.swift /Users/william/Projects/studySocial/studySocial/Pods/FacebookCore/Sources/Core/Common/SDKLoggingBehavior.swift /Users/william/Projects/studySocial/studySocial/Pods/FacebookCore/Sources/Core/AppEvents/AppEventsLogger.FlushBehavior.swift /Users/william/Projects/studySocial/studySocial/Pods/FacebookCore/Sources/Core/Common/SDKSettings.swift /Users/william/Projects/studySocial/studySocial/Pods/FacebookCore/Sources/Core/UserProfile/UserProfile.FetchResult.swift /Users/william/Projects/studySocial/studySocial/Pods/FacebookCore/Sources/Core/GraphRequest/GraphRequestResult.swift /Users/william/Projects/studySocial/studySocial/Pods/FacebookCore/Sources/Core/GraphRequest/GraphRequestDataAttachment.swift /Users/william/Projects/studySocial/studySocial/Pods/FacebookCore/Sources/Core/AppEvents/AppEvent.swift /Users/william/Projects/studySocial/studySocial/Pods/FacebookCore/Sources/Core/GraphRequest/GraphRequest.swift /Users/william/Projects/studySocial/studySocial/Pods/FacebookCore/Sources/Core/UserProfile/UserProfile.PictureView.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/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/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/william/Projects/studySocial/studySocial/Pods/Bolts/Bolts/iOS/BFURL.h /Users/william/Projects/studySocial/studySocial/Pods/Target\ Support\ Files/FacebookCore/FacebookCore-umbrella.h /Users/william/Projects/studySocial/studySocial/Pods/Target\ Support\ Files/Bolts/Bolts-umbrella.h /Users/william/Projects/studySocial/studySocial/Pods/Target\ Support\ Files/FBSDKCoreKit/FBSDKCoreKit-umbrella.h /Users/william/Projects/studySocial/studySocial/Pods/Bolts/Bolts/Common/BFCancellationTokenSource.h /Users/william/Projects/studySocial/studySocial/Pods/Bolts/Bolts/Common/BFTaskCompletionSource.h /Users/william/Projects/studySocial/studySocial/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKProfile.h /Users/william/Projects/studySocial/studySocial/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKApplicationDelegate.h /Users/william/Projects/studySocial/studySocial/Pods/Bolts/Bolts/iOS/BFAppLinkResolving.h /Users/william/Projects/studySocial/studySocial/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKCopying.h /Users/william/Projects/studySocial/studySocial/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKMutableCopying.h /Users/william/Projects/studySocial/studySocial/Pods/Bolts/Bolts/iOS/BFAppLink.h /Users/william/Projects/studySocial/studySocial/Pods/Bolts/Bolts/Common/BFTask.h /Users/william/Projects/studySocial/studySocial/Pods/Bolts/Bolts/Common/BFCancellationToken.h /Users/william/Projects/studySocial/studySocial/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKAccessToken.h /Users/william/Projects/studySocial/studySocial/Pods/Bolts/Bolts/iOS/BFAppLinkNavigation.h /Users/william/Projects/studySocial/studySocial/Pods/Bolts/Bolts/Common/BFCancellationTokenRegistration.h /Users/william/Projects/studySocial/studySocial/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKGraphRequestConnection.h /Users/william/Projects/studySocial/studySocial/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKButton.h /Users/william/Projects/studySocial/studySocial/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKTestUsersManager.h /Users/william/Projects/studySocial/studySocial/Pods/Bolts/Bolts/iOS/BFAppLinkReturnToRefererController.h /Users/william/Projects/studySocial/studySocial/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKAppLinkResolver.h /Users/william/Projects/studySocial/studySocial/Pods/Bolts/Bolts/iOS/BFWebViewAppLinkResolver.h /Users/william/Projects/studySocial/studySocial/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKGraphErrorRecoveryProcessor.h /Users/william/Projects/studySocial/studySocial/Pods/Bolts/Bolts/Common/BFExecutor.h /Users/william/Projects/studySocial/studySocial/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKSettings.h /Users/william/Projects/studySocial/studySocial/Pods/Bolts/Bolts/Common/BFTask+Exceptions.h /Users/william/Projects/studySocial/studySocial/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKMacros.h /Users/william/Projects/studySocial/studySocial/Pods/Bolts/Bolts/Common/Bolts.h /Users/william/Projects/studySocial/studySocial/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKConstants.h /Users/william/Projects/studySocial/studySocial/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKAppEvents.h /Users/william/Projects/studySocial/studySocial/Pods/Bolts/Bolts/iOS/BFAppLinkTarget.h /Users/william/Projects/studySocial/studySocial/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit.h /Users/william/Projects/studySocial/studySocial/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKGraphRequestDataAttachment.h /Users/william/Projects/studySocial/studySocial/Pods/Bolts/Bolts/iOS/BFMeasurementEvent.h /Users/william/Projects/studySocial/studySocial/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKGraphRequest.h /Users/william/Projects/studySocial/studySocial/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKProfilePictureView.h /Users/william/Projects/studySocial/studySocial/Pods/Bolts/Bolts/iOS/BFAppLinkReturnToRefererView.h /Users/william/Projects/studySocial/studySocial/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKUtility.h /Users/william/Projects/studySocial/studySocial/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKAppLinkUtility.h /Users/william/Projects/studySocial/studySocial/build/Pods.build/Debug-iphonesimulator/FacebookCore.build/unextended-module.modulemap /Users/william/Projects/studySocial/studySocial/build/Pods.build/Debug-iphonesimulator/Bolts.build/module.modulemap /Users/william/Projects/studySocial/studySocial/build/Pods.build/Debug-iphonesimulator/FBSDKCoreKit.build/module.modulemap /Users/william/Projects/studySocial/studySocial/build/Pods.build/Debug-iphonesimulator/FacebookCore.build/Objects-normal/x86_64/UserProfile.FetchResult~partial.swiftdoc : /Users/william/Projects/studySocial/studySocial/Pods/FacebookCore/Sources/Core/GraphRequest/GraphRequestProtocol.Bridge.swift /Users/william/Projects/studySocial/studySocial/Pods/FacebookCore/Sources/Core/UserProfile/UserProfile.swift /Users/william/Projects/studySocial/studySocial/Pods/FacebookCore/Sources/Core/AppEvents/AppEventParameterName.swift /Users/william/Projects/studySocial/studySocial/Pods/FacebookCore/Sources/Core/AppEvents/AppEventName.swift /Users/william/Projects/studySocial/studySocial/Pods/FacebookCore/Sources/Core/Internal/Extensions/Optional+OnSome.swift /Users/william/Projects/studySocial/studySocial/Pods/FacebookCore/Sources/Core/GraphRequest/GraphResponse.swift /Users/william/Projects/studySocial/studySocial/Pods/FacebookCore/Sources/Core/GraphRequest/GraphRequestConnection.Delegate.swift /Users/william/Projects/studySocial/studySocial/Pods/FacebookCore/Sources/Core/Common/SDKApplicationDelegate.swift /Users/william/Projects/studySocial/studySocial/Pods/FacebookCore/Sources/Core/GraphRequest/GraphResponseProtocol.swift /Users/william/Projects/studySocial/studySocial/Pods/FacebookCore/Sources/Core/GraphRequest/GraphRequestProtocol.swift /Users/william/Projects/studySocial/studySocial/Pods/FacebookCore/Sources/Core/Common/AccessToken.swift /Users/william/Projects/studySocial/studySocial/Pods/FacebookCore/Sources/Core/AppEvents/AppEvent.Builtin.swift /Users/william/Projects/studySocial/studySocial/Pods/FacebookCore/Sources/Core/GraphRequest/GraphAPIVersion.swift /Users/william/Projects/studySocial/studySocial/Pods/FacebookCore/Sources/Core/Permissions/Permission.swift /Users/william/Projects/studySocial/studySocial/Pods/FacebookCore/Sources/Core/Permissions/ReadPermission.swift /Users/william/Projects/studySocial/studySocial/Pods/FacebookCore/Sources/Core/Permissions/PublishPermission.swift /Users/william/Projects/studySocial/studySocial/Pods/FacebookCore/Sources/Core/GraphRequest/GraphRequestConnection.swift /Users/william/Projects/studySocial/studySocial/Pods/FacebookCore/Sources/Core/Internal/Extensions/Dictionary+KeyValueMap.swift /Users/william/Projects/studySocial/studySocial/Pods/FacebookCore/Sources/Core/AppEvents/AppEventsLogger.swift /Users/william/Projects/studySocial/studySocial/Pods/FacebookCore/Sources/Core/Common/SDKLoggingBehavior.swift /Users/william/Projects/studySocial/studySocial/Pods/FacebookCore/Sources/Core/AppEvents/AppEventsLogger.FlushBehavior.swift /Users/william/Projects/studySocial/studySocial/Pods/FacebookCore/Sources/Core/Common/SDKSettings.swift /Users/william/Projects/studySocial/studySocial/Pods/FacebookCore/Sources/Core/UserProfile/UserProfile.FetchResult.swift /Users/william/Projects/studySocial/studySocial/Pods/FacebookCore/Sources/Core/GraphRequest/GraphRequestResult.swift /Users/william/Projects/studySocial/studySocial/Pods/FacebookCore/Sources/Core/GraphRequest/GraphRequestDataAttachment.swift /Users/william/Projects/studySocial/studySocial/Pods/FacebookCore/Sources/Core/AppEvents/AppEvent.swift /Users/william/Projects/studySocial/studySocial/Pods/FacebookCore/Sources/Core/GraphRequest/GraphRequest.swift /Users/william/Projects/studySocial/studySocial/Pods/FacebookCore/Sources/Core/UserProfile/UserProfile.PictureView.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/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/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/william/Projects/studySocial/studySocial/Pods/Bolts/Bolts/iOS/BFURL.h /Users/william/Projects/studySocial/studySocial/Pods/Target\ Support\ Files/FacebookCore/FacebookCore-umbrella.h /Users/william/Projects/studySocial/studySocial/Pods/Target\ Support\ Files/Bolts/Bolts-umbrella.h /Users/william/Projects/studySocial/studySocial/Pods/Target\ Support\ Files/FBSDKCoreKit/FBSDKCoreKit-umbrella.h /Users/william/Projects/studySocial/studySocial/Pods/Bolts/Bolts/Common/BFCancellationTokenSource.h /Users/william/Projects/studySocial/studySocial/Pods/Bolts/Bolts/Common/BFTaskCompletionSource.h /Users/william/Projects/studySocial/studySocial/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKProfile.h /Users/william/Projects/studySocial/studySocial/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKApplicationDelegate.h /Users/william/Projects/studySocial/studySocial/Pods/Bolts/Bolts/iOS/BFAppLinkResolving.h /Users/william/Projects/studySocial/studySocial/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKCopying.h /Users/william/Projects/studySocial/studySocial/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKMutableCopying.h /Users/william/Projects/studySocial/studySocial/Pods/Bolts/Bolts/iOS/BFAppLink.h /Users/william/Projects/studySocial/studySocial/Pods/Bolts/Bolts/Common/BFTask.h /Users/william/Projects/studySocial/studySocial/Pods/Bolts/Bolts/Common/BFCancellationToken.h /Users/william/Projects/studySocial/studySocial/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKAccessToken.h /Users/william/Projects/studySocial/studySocial/Pods/Bolts/Bolts/iOS/BFAppLinkNavigation.h /Users/william/Projects/studySocial/studySocial/Pods/Bolts/Bolts/Common/BFCancellationTokenRegistration.h /Users/william/Projects/studySocial/studySocial/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKGraphRequestConnection.h /Users/william/Projects/studySocial/studySocial/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKButton.h /Users/william/Projects/studySocial/studySocial/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKTestUsersManager.h /Users/william/Projects/studySocial/studySocial/Pods/Bolts/Bolts/iOS/BFAppLinkReturnToRefererController.h /Users/william/Projects/studySocial/studySocial/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKAppLinkResolver.h /Users/william/Projects/studySocial/studySocial/Pods/Bolts/Bolts/iOS/BFWebViewAppLinkResolver.h /Users/william/Projects/studySocial/studySocial/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKGraphErrorRecoveryProcessor.h /Users/william/Projects/studySocial/studySocial/Pods/Bolts/Bolts/Common/BFExecutor.h /Users/william/Projects/studySocial/studySocial/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKSettings.h /Users/william/Projects/studySocial/studySocial/Pods/Bolts/Bolts/Common/BFTask+Exceptions.h /Users/william/Projects/studySocial/studySocial/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKMacros.h /Users/william/Projects/studySocial/studySocial/Pods/Bolts/Bolts/Common/Bolts.h /Users/william/Projects/studySocial/studySocial/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKConstants.h /Users/william/Projects/studySocial/studySocial/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKAppEvents.h /Users/william/Projects/studySocial/studySocial/Pods/Bolts/Bolts/iOS/BFAppLinkTarget.h /Users/william/Projects/studySocial/studySocial/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit.h /Users/william/Projects/studySocial/studySocial/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKGraphRequestDataAttachment.h /Users/william/Projects/studySocial/studySocial/Pods/Bolts/Bolts/iOS/BFMeasurementEvent.h /Users/william/Projects/studySocial/studySocial/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKGraphRequest.h /Users/william/Projects/studySocial/studySocial/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKProfilePictureView.h /Users/william/Projects/studySocial/studySocial/Pods/Bolts/Bolts/iOS/BFAppLinkReturnToRefererView.h /Users/william/Projects/studySocial/studySocial/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKUtility.h /Users/william/Projects/studySocial/studySocial/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKAppLinkUtility.h /Users/william/Projects/studySocial/studySocial/build/Pods.build/Debug-iphonesimulator/FacebookCore.build/unextended-module.modulemap /Users/william/Projects/studySocial/studySocial/build/Pods.build/Debug-iphonesimulator/Bolts.build/module.modulemap /Users/william/Projects/studySocial/studySocial/build/Pods.build/Debug-iphonesimulator/FBSDKCoreKit.build/module.modulemap
D
module org.eclipse.swt.internal.mozilla.nsIServiceManager; import org.eclipse.swt.internal.mozilla.Common; import org.eclipse.swt.internal.mozilla.nsID; import org.eclipse.swt.internal.mozilla.nsISupports; const char[] NS_ISERVICEMANAGER_IID_STR = "8bb35ed9-e332-462d-9155-4a002ab5c958"; const nsIID NS_ISERVICEMANAGER_IID= {0x8bb35ed9, 0xe332, 0x462d, [ 0x91, 0x55, 0x4a, 0x00, 0x2a, 0xb5, 0xc9, 0x58 ]}; interface nsIServiceManager : nsISupports { static const char[] IID_STR = NS_ISERVICEMANAGER_IID_STR; static const nsIID IID = NS_ISERVICEMANAGER_IID; extern(System): nsresult GetService(nsCID * aClass, nsIID * aIID, void * *result); nsresult GetServiceByContractID(char *aContractID, nsIID * aIID, void * *result); nsresult IsServiceInstantiated(nsCID * aClass, nsIID * aIID, PRBool *_retval); nsresult IsServiceInstantiatedByContractID(char *aContractID, nsIID * aIID, PRBool *_retval); }
D
/afs/cern.ch/user/a/abrennan/testarea/CxAODTestFramework/RootCoreBin/obj/x86_64-slc6-gcc48-opt/JetCalibTools/obj/NPVBeamspotCorrection.o /afs/cern.ch/user/a/abrennan/testarea/CxAODTestFramework/RootCoreBin/obj/x86_64-slc6-gcc48-opt/JetCalibTools/obj/NPVBeamspotCorrection.d : /afs/cern.ch/user/a/abrennan/testarea/CxAODTestFramework/JetCalibTools/Root/NPVBeamspotCorrection.cxx /afs/cern.ch/user/a/abrennan/testarea/CxAODTestFramework/JetCalibTools/JetCalibTools/CalibrationMethods/NPVBeamspotCorrection.h /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.02.05-x86_64-slc6-gcc48-opt/include/TROOT.h /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.02.05-x86_64-slc6-gcc48-opt/include/TDirectory.h /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.02.05-x86_64-slc6-gcc48-opt/include/TNamed.h /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.02.05-x86_64-slc6-gcc48-opt/include/TObject.h /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.02.05-x86_64-slc6-gcc48-opt/include/Rtypes.h /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.02.05-x86_64-slc6-gcc48-opt/include/RtypesCore.h /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.02.05-x86_64-slc6-gcc48-opt/include/RConfig.h /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.02.05-x86_64-slc6-gcc48-opt/include/RVersion.h /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.02.05-x86_64-slc6-gcc48-opt/include/DllImport.h /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.02.05-x86_64-slc6-gcc48-opt/include/Rtypeinfo.h /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.02.05-x86_64-slc6-gcc48-opt/include/snprintf.h /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.02.05-x86_64-slc6-gcc48-opt/include/strlcpy.h /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.02.05-x86_64-slc6-gcc48-opt/include/TGenericClassInfo.h /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.02.05-x86_64-slc6-gcc48-opt/include/TSchemaHelper.h /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.02.05-x86_64-slc6-gcc48-opt/include/TStorage.h /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.02.05-x86_64-slc6-gcc48-opt/include/TVersionCheck.h /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.02.05-x86_64-slc6-gcc48-opt/include/Riosfwd.h /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.02.05-x86_64-slc6-gcc48-opt/include/TBuffer.h /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.02.05-x86_64-slc6-gcc48-opt/include/TString.h /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.02.05-x86_64-slc6-gcc48-opt/include/TMathBase.h /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.02.05-x86_64-slc6-gcc48-opt/include/TList.h /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.02.05-x86_64-slc6-gcc48-opt/include/TSeqCollection.h /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.02.05-x86_64-slc6-gcc48-opt/include/TCollection.h /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.02.05-x86_64-slc6-gcc48-opt/include/TIterator.h /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.02.05-x86_64-slc6-gcc48-opt/include/TDatime.h /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.02.05-x86_64-slc6-gcc48-opt/include/TUUID.h /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.02.05-x86_64-slc6-gcc48-opt/include/RConfigure.h /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.02.05-x86_64-slc6-gcc48-opt/include/TFile.h /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.02.05-x86_64-slc6-gcc48-opt/include/TDirectoryFile.h /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.02.05-x86_64-slc6-gcc48-opt/include/TMap.h /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.02.05-x86_64-slc6-gcc48-opt/include/THashTable.h /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.02.05-x86_64-slc6-gcc48-opt/include/TUrl.h /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.02.05-x86_64-slc6-gcc48-opt/include/TMath.h /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.02.05-x86_64-slc6-gcc48-opt/include/TError.h /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.02.05-x86_64-slc6-gcc48-opt/include/TGraph.h /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.02.05-x86_64-slc6-gcc48-opt/include/TAttLine.h /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.02.05-x86_64-slc6-gcc48-opt/include/TAttFill.h /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.02.05-x86_64-slc6-gcc48-opt/include/TAttMarker.h /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.02.05-x86_64-slc6-gcc48-opt/include/TVectorFfwd.h /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.02.05-x86_64-slc6-gcc48-opt/include/TVectorDfwd.h /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.02.05-x86_64-slc6-gcc48-opt/include/TFitResultPtr.h
D
import std.stdio; void main() { int[] arr = [7, 12, 34, 41]; // Slice starts at index 1 and excludes from index 3 int[] newArr = arr[1..3]; writeln(newArr); // [12, 34] }
D
module purr.fs.disk; import purr.io; import std.file; import purr.fs.files; import purr.fs.memory; import purr.srcloc; import core.thread; import std.parallelism; import std.concurrency; import std.functional; import std.container; import std.datetime.stopwatch; import std.datetime.systime; __gshared StopWatch watch; shared static this() { watch = StopWatch(AutoStart.yes); } void dumpToFile(string filename, string data) { File file = File(filename, "w"); file.write(data); file.close(); } bool fsexists(string path) { return !(path !in fileSystem) || exists(path); } Location readFile(string path) { // if (MemoryFile* file = path in fileSystem) // { // if (MemoryTextFile textFile = cast(MemoryTextFile)*file) // { // return path.readMemFile.location; // } // } return Location(1, 1, path, path.readText); }
D
import std.stdio, std.array, std.string, std.conv, std.algorithm; import std.typecons, std.range, std.random, std.math, std.container; import std.numeric, std.bigint, core.bitop, core.stdc.string; immutable long MOD = 998244353; void main() { auto N = readln.chomp.to!int; auto dp = new long[][](N*2+1, N+1); dp[0][0] = 1; foreach (i; 0..2*N) { foreach (j; 0..N+1) { if (j > 0) dp[i+1][j-1] += dp[i][j]; if (j < N) dp[i+1][j+1] += dp[i][j]; } } dp[2*N][0].writeln; }
D
/Users/ozgun/Desktop/IOSCase/build/Pods.build/Debug-iphonesimulator/Kingfisher.build/Objects-normal/x86_64/RequestModifier.o : /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/Utility/String+MD5.swift /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/General/Deprecated.swift /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/General/ImageSource/Source.swift /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/General/ImageSource/Resource.swift /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/Image/Image.swift /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/Image/GIFAnimatedImage.swift /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/Cache/Storage.swift /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/Cache/DiskStorage.swift /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/Cache/MemoryStorage.swift /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/Cache/ImageCache.swift /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/Networking/AuthenticationChallengeResponsable.swift /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/Utility/Runtime.swift /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/Utility/Delegate.swift /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/Networking/SessionDelegate.swift /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/Networking/ImageDownloaderDelegate.swift /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/Utility/CallbackQueue.swift /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/Image/ImageProgressive.swift /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/Image/ImageDrawing.swift /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/Networking/SessionDataTask.swift /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/Image/ImageTransition.swift /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/General/KingfisherOptionsInfo.swift /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/Networking/ImageDownloader.swift /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/General/ImageSource/ImageDataProvider.swift /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/General/ImageSource/AVAssetImageDataProvider.swift /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/Image/Placeholder.swift /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/General/KingfisherManager.swift /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/Networking/ImagePrefetcher.swift /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/Extensions/WKInterfaceImage+Kingfisher.swift /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/Extensions/UIButton+Kingfisher.swift /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/Extensions/NSButton+Kingfisher.swift /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/Extensions/NSTextAttachment+Kingfisher.swift /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/Extensions/ImageView+Kingfisher.swift /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/General/Kingfisher.swift /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/Networking/ImageModifier.swift /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/Networking/RequestModifier.swift /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/Networking/RedirectHandler.swift /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/Image/Filter.swift /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/Cache/CacheSerializer.swift /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/Cache/FormatIndicatedCacheSerializer.swift /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/General/KingfisherError.swift /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/Networking/ImageDataProcessor.swift /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/Image/ImageProcessor.swift /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/Views/Indicator.swift /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/Utility/SizeExtensions.swift /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/Utility/ExtensionHelpers.swift /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/Image/ImageFormat.swift /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/Utility/Result.swift /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/Views/AnimatedImageView.swift /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/Utility/Box.swift /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/Networking/RetryStrategy.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/CoreMIDI.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/CoreMedia.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/simd.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/Accelerate.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/AVFoundation.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/CoreAudio.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/os.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/ozgun/Desktop/IOSCase/Pods/Target\ Support\ Files/Kingfisher/Kingfisher-umbrella.h /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/Kingfisher.h /Users/ozgun/Desktop/IOSCase/build/Pods.build/Debug-iphonesimulator/Kingfisher.build/unextended-module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.6.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.6.sdk/System/Library/Frameworks/OpenGLES.framework/Headers/OpenGLES.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.6.sdk/System/Library/Frameworks/CoreMedia.framework/Headers/CoreMedia.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.6.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImage.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.6.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/QuartzCore.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.6.sdk/System/Library/Frameworks/Accelerate.framework/Headers/Accelerate.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.6.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.6.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.6.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.6.sdk/System/Library/Frameworks/AVFoundation.framework/Headers/AVFoundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.6.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.6.sdk/System/Library/Frameworks/CoreAudioTypes.framework/Headers/CoreAudioTypes.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.6.sdk/System/Library/Frameworks/UserNotifications.framework/Headers/UserNotifications.apinotes /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/apinotes/os.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.6.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.6.sdk/System/Library/Frameworks/AVKit.framework/Headers/AVKit.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.6.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.6.sdk/System/Library/Frameworks/MediaToolbox.framework/Headers/MediaToolbox.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.6.sdk/System/Library/Frameworks/AudioToolbox.framework/Headers/AudioToolbox.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.6.sdk/System/Library/Frameworks/Security.framework/Headers/Security.apinotes /Users/ozgun/Desktop/IOSCase/build/Pods.build/Debug-iphonesimulator/Kingfisher.build/Objects-normal/x86_64/RequestModifier~partial.swiftmodule : /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/Utility/String+MD5.swift /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/General/Deprecated.swift /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/General/ImageSource/Source.swift /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/General/ImageSource/Resource.swift /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/Image/Image.swift /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/Image/GIFAnimatedImage.swift /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/Cache/Storage.swift /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/Cache/DiskStorage.swift /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/Cache/MemoryStorage.swift /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/Cache/ImageCache.swift /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/Networking/AuthenticationChallengeResponsable.swift /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/Utility/Runtime.swift /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/Utility/Delegate.swift /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/Networking/SessionDelegate.swift /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/Networking/ImageDownloaderDelegate.swift /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/Utility/CallbackQueue.swift /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/Image/ImageProgressive.swift /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/Image/ImageDrawing.swift /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/Networking/SessionDataTask.swift /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/Image/ImageTransition.swift /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/General/KingfisherOptionsInfo.swift /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/Networking/ImageDownloader.swift /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/General/ImageSource/ImageDataProvider.swift /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/General/ImageSource/AVAssetImageDataProvider.swift /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/Image/Placeholder.swift /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/General/KingfisherManager.swift /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/Networking/ImagePrefetcher.swift /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/Extensions/WKInterfaceImage+Kingfisher.swift /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/Extensions/UIButton+Kingfisher.swift /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/Extensions/NSButton+Kingfisher.swift /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/Extensions/NSTextAttachment+Kingfisher.swift /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/Extensions/ImageView+Kingfisher.swift /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/General/Kingfisher.swift /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/Networking/ImageModifier.swift /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/Networking/RequestModifier.swift /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/Networking/RedirectHandler.swift /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/Image/Filter.swift /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/Cache/CacheSerializer.swift /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/Cache/FormatIndicatedCacheSerializer.swift /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/General/KingfisherError.swift /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/Networking/ImageDataProcessor.swift /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/Image/ImageProcessor.swift /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/Views/Indicator.swift /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/Utility/SizeExtensions.swift /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/Utility/ExtensionHelpers.swift /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/Image/ImageFormat.swift /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/Utility/Result.swift /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/Views/AnimatedImageView.swift /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/Utility/Box.swift /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/Networking/RetryStrategy.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/CoreMIDI.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/CoreMedia.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/simd.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/Accelerate.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/AVFoundation.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/CoreAudio.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/os.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/ozgun/Desktop/IOSCase/Pods/Target\ Support\ Files/Kingfisher/Kingfisher-umbrella.h /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/Kingfisher.h /Users/ozgun/Desktop/IOSCase/build/Pods.build/Debug-iphonesimulator/Kingfisher.build/unextended-module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.6.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.6.sdk/System/Library/Frameworks/OpenGLES.framework/Headers/OpenGLES.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.6.sdk/System/Library/Frameworks/CoreMedia.framework/Headers/CoreMedia.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.6.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImage.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.6.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/QuartzCore.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.6.sdk/System/Library/Frameworks/Accelerate.framework/Headers/Accelerate.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.6.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.6.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.6.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.6.sdk/System/Library/Frameworks/AVFoundation.framework/Headers/AVFoundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.6.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.6.sdk/System/Library/Frameworks/CoreAudioTypes.framework/Headers/CoreAudioTypes.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.6.sdk/System/Library/Frameworks/UserNotifications.framework/Headers/UserNotifications.apinotes /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/apinotes/os.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.6.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.6.sdk/System/Library/Frameworks/AVKit.framework/Headers/AVKit.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.6.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.6.sdk/System/Library/Frameworks/MediaToolbox.framework/Headers/MediaToolbox.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.6.sdk/System/Library/Frameworks/AudioToolbox.framework/Headers/AudioToolbox.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.6.sdk/System/Library/Frameworks/Security.framework/Headers/Security.apinotes /Users/ozgun/Desktop/IOSCase/build/Pods.build/Debug-iphonesimulator/Kingfisher.build/Objects-normal/x86_64/RequestModifier~partial.swiftdoc : /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/Utility/String+MD5.swift /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/General/Deprecated.swift /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/General/ImageSource/Source.swift /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/General/ImageSource/Resource.swift /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/Image/Image.swift /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/Image/GIFAnimatedImage.swift /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/Cache/Storage.swift /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/Cache/DiskStorage.swift /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/Cache/MemoryStorage.swift /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/Cache/ImageCache.swift /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/Networking/AuthenticationChallengeResponsable.swift /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/Utility/Runtime.swift /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/Utility/Delegate.swift /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/Networking/SessionDelegate.swift /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/Networking/ImageDownloaderDelegate.swift /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/Utility/CallbackQueue.swift /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/Image/ImageProgressive.swift /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/Image/ImageDrawing.swift /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/Networking/SessionDataTask.swift /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/Image/ImageTransition.swift /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/General/KingfisherOptionsInfo.swift /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/Networking/ImageDownloader.swift /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/General/ImageSource/ImageDataProvider.swift /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/General/ImageSource/AVAssetImageDataProvider.swift /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/Image/Placeholder.swift /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/General/KingfisherManager.swift /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/Networking/ImagePrefetcher.swift /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/Extensions/WKInterfaceImage+Kingfisher.swift /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/Extensions/UIButton+Kingfisher.swift /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/Extensions/NSButton+Kingfisher.swift /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/Extensions/NSTextAttachment+Kingfisher.swift /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/Extensions/ImageView+Kingfisher.swift /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/General/Kingfisher.swift /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/Networking/ImageModifier.swift /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/Networking/RequestModifier.swift /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/Networking/RedirectHandler.swift /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/Image/Filter.swift /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/Cache/CacheSerializer.swift /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/Cache/FormatIndicatedCacheSerializer.swift /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/General/KingfisherError.swift /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/Networking/ImageDataProcessor.swift /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/Image/ImageProcessor.swift /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/Views/Indicator.swift /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/Utility/SizeExtensions.swift /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/Utility/ExtensionHelpers.swift /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/Image/ImageFormat.swift /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/Utility/Result.swift /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/Views/AnimatedImageView.swift /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/Utility/Box.swift /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/Networking/RetryStrategy.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/CoreMIDI.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/CoreMedia.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/simd.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/Accelerate.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/AVFoundation.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/CoreAudio.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/os.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/ozgun/Desktop/IOSCase/Pods/Target\ Support\ Files/Kingfisher/Kingfisher-umbrella.h /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/Kingfisher.h /Users/ozgun/Desktop/IOSCase/build/Pods.build/Debug-iphonesimulator/Kingfisher.build/unextended-module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.6.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.6.sdk/System/Library/Frameworks/OpenGLES.framework/Headers/OpenGLES.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.6.sdk/System/Library/Frameworks/CoreMedia.framework/Headers/CoreMedia.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.6.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImage.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.6.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/QuartzCore.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.6.sdk/System/Library/Frameworks/Accelerate.framework/Headers/Accelerate.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.6.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.6.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.6.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.6.sdk/System/Library/Frameworks/AVFoundation.framework/Headers/AVFoundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.6.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.6.sdk/System/Library/Frameworks/CoreAudioTypes.framework/Headers/CoreAudioTypes.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.6.sdk/System/Library/Frameworks/UserNotifications.framework/Headers/UserNotifications.apinotes /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/apinotes/os.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.6.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.6.sdk/System/Library/Frameworks/AVKit.framework/Headers/AVKit.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.6.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.6.sdk/System/Library/Frameworks/MediaToolbox.framework/Headers/MediaToolbox.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.6.sdk/System/Library/Frameworks/AudioToolbox.framework/Headers/AudioToolbox.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.6.sdk/System/Library/Frameworks/Security.framework/Headers/Security.apinotes /Users/ozgun/Desktop/IOSCase/build/Pods.build/Debug-iphonesimulator/Kingfisher.build/Objects-normal/x86_64/RequestModifier~partial.swiftsourceinfo : /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/Utility/String+MD5.swift /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/General/Deprecated.swift /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/General/ImageSource/Source.swift /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/General/ImageSource/Resource.swift /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/Image/Image.swift /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/Image/GIFAnimatedImage.swift /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/Cache/Storage.swift /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/Cache/DiskStorage.swift /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/Cache/MemoryStorage.swift /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/Cache/ImageCache.swift /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/Networking/AuthenticationChallengeResponsable.swift /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/Utility/Runtime.swift /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/Utility/Delegate.swift /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/Networking/SessionDelegate.swift /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/Networking/ImageDownloaderDelegate.swift /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/Utility/CallbackQueue.swift /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/Image/ImageProgressive.swift /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/Image/ImageDrawing.swift /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/Networking/SessionDataTask.swift /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/Image/ImageTransition.swift /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/General/KingfisherOptionsInfo.swift /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/Networking/ImageDownloader.swift /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/General/ImageSource/ImageDataProvider.swift /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/General/ImageSource/AVAssetImageDataProvider.swift /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/Image/Placeholder.swift /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/General/KingfisherManager.swift /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/Networking/ImagePrefetcher.swift /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/Extensions/WKInterfaceImage+Kingfisher.swift /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/Extensions/UIButton+Kingfisher.swift /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/Extensions/NSButton+Kingfisher.swift /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/Extensions/NSTextAttachment+Kingfisher.swift /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/Extensions/ImageView+Kingfisher.swift /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/General/Kingfisher.swift /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/Networking/ImageModifier.swift /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/Networking/RequestModifier.swift /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/Networking/RedirectHandler.swift /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/Image/Filter.swift /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/Cache/CacheSerializer.swift /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/Cache/FormatIndicatedCacheSerializer.swift /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/General/KingfisherError.swift /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/Networking/ImageDataProcessor.swift /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/Image/ImageProcessor.swift /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/Views/Indicator.swift /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/Utility/SizeExtensions.swift /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/Utility/ExtensionHelpers.swift /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/Image/ImageFormat.swift /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/Utility/Result.swift /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/Views/AnimatedImageView.swift /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/Utility/Box.swift /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/Networking/RetryStrategy.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/CoreMIDI.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/CoreMedia.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/simd.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/Accelerate.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/AVFoundation.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/CoreAudio.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/os.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/ozgun/Desktop/IOSCase/Pods/Target\ Support\ Files/Kingfisher/Kingfisher-umbrella.h /Users/ozgun/Desktop/IOSCase/Pods/Kingfisher/Sources/Kingfisher.h /Users/ozgun/Desktop/IOSCase/build/Pods.build/Debug-iphonesimulator/Kingfisher.build/unextended-module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.6.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.6.sdk/System/Library/Frameworks/OpenGLES.framework/Headers/OpenGLES.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.6.sdk/System/Library/Frameworks/CoreMedia.framework/Headers/CoreMedia.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.6.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImage.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.6.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/QuartzCore.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.6.sdk/System/Library/Frameworks/Accelerate.framework/Headers/Accelerate.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.6.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.6.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.6.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.6.sdk/System/Library/Frameworks/AVFoundation.framework/Headers/AVFoundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.6.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.6.sdk/System/Library/Frameworks/CoreAudioTypes.framework/Headers/CoreAudioTypes.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.6.sdk/System/Library/Frameworks/UserNotifications.framework/Headers/UserNotifications.apinotes /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/apinotes/os.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.6.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.6.sdk/System/Library/Frameworks/AVKit.framework/Headers/AVKit.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.6.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.6.sdk/System/Library/Frameworks/MediaToolbox.framework/Headers/MediaToolbox.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.6.sdk/System/Library/Frameworks/AudioToolbox.framework/Headers/AudioToolbox.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.6.sdk/System/Library/Frameworks/Security.framework/Headers/Security.apinotes
D
module ast.fp; import parseBase, ast.base, ast.types, ast.literals; Object gotFloatProperty(ref string text, ParseCb cont, ParseCb rest) { auto t2 = text; if (!t2.accept(".")) return null; if (t2.accept("infinity"[])) { text = t2; return fastalloc!(FloatExpr)(float.infinity); } if (t2.accept("max"[])) { text = t2; return fastalloc!(FloatExpr)(float.max); } if (t2.accept("min"[])) { text = t2; return fastalloc!(FloatExpr)(float.min); } if (t2.accept("nan"[])) { text = t2; return fastalloc!(FloatExpr)(float.nan); } if (t2.accept("epsilon"[])) { text = t2; return fastalloc!(FloatExpr)(float.epsilon); } return null; } mixin DefaultParser!(gotFloatProperty, "tree.expr.fprop", "23030", "float"); Object gotIntProperty(ref string text, ParseCb cont, ParseCb rest) { auto t2 = text; if (!t2.accept(".")) return null; if (t2.accept("max"[])) { text = t2; return fastalloc!(IntExpr)(int.max); } return null; } mixin DefaultParser!(gotIntProperty, "tree.expr.iprop", "23031", "int");
D
module hunt.http.codec.http.model.HttpFields; import hunt.http.codec.http.model.HttpField; import hunt.http.codec.http.model.HttpHeader; import hunt.http.codec.http.model.HttpHeaderValue; import hunt.http.codec.http.model.QuotedCSV; import hunt.collection; import hunt.util.Common; import hunt.Exceptions; import hunt.logging; import hunt.text.Common; import hunt.text.QuotedStringTokenizer; import hunt.text.StringBuilder; import hunt.text.StringTokenizer; import hunt.text.StringUtils; import std.array; import std.container.array; import std.conv; import std.datetime; import std.string; import std.range; /** * HTTP Fields. A collection of HTTP header and or Trailer fields. * * <p> * This class is not synchronized as it is expected that modifications will only * be performed by a single thread. * * <p> * The cookie handling provided by this class is guided by the Servlet * specification and RFC6265. * */ class HttpFields : Iterable!HttpField { // static string __separators = ", \t"; private HttpField[] _fields; private int _size; /** * Initialize an empty HttpFields. */ this() { _fields = new HttpField[20]; } /** * Initialize an empty HttpFields. * * @param capacity * the capacity of the http fields */ this(int capacity) { _fields = new HttpField[capacity]; } /** * Initialize HttpFields from copy. * * @param fields * the fields to copy data from */ this(HttpFields fields) { _fields = fields._fields.dup ~ new HttpField[10]; _size = fields.size(); } int size() { return _size; } InputRange!HttpField iterator() { return inputRangeObject(_fields[0 .. _size]); } int opApply(scope int delegate(ref HttpField) dg) { int result = 0; foreach (HttpField v; _fields[0 .. _size]) { result = dg(v); if (result != 0) return result; } return result; } /** * Get Collection of header names. * * @return the unique set of field names. */ Set!string getFieldNamesCollection() { Set!string set = new HashSet!string(_size); foreach (HttpField f; _fields[0 .. _size]) { if (f !is null) set.add(f.getName()); } return set; } /** * Get enumeration of header _names. Returns an enumeration of strings * representing the header _names for this request. * * @return an enumeration of field names */ InputRange!string getFieldNames() { bool[string] set; foreach (HttpField f; _fields[0 .. _size]) { if (f !is null) set[f.getName()] = true; } return inputRangeObject(set.keys); } // InputRange!string getFieldNames() { // // return Collections.enumeration(getFieldNamesCollection()); // // return getFieldNamesCollection().toArray(); // Array!string set; // foreach (HttpField f ; _fields[0.._size]) { // if (f !is null) // set.insertBack(f.getName()); // } // // Enumeration!string r = new RangeEnumeration!string(inputRangeObject(set[].array)); // return inputRangeObject(set[].array); // } /** * Get a Field by index. * * @param index * the field index * @return A Field value or null if the Field value has not been set */ HttpField getField(int index) { if (index >= _size) throw new NoSuchElementException(""); return _fields[index]; } HttpField getField(HttpHeader header) { for (int i = 0; i < _size; i++) { HttpField f = _fields[i]; if (f.getHeader() == header) return f; } return null; } HttpField getField(string name) { for (int i = 0; i < _size; i++) { HttpField f = _fields[i]; if (f.getName().equalsIgnoreCase(name)) return f; } return null; } bool contains(HttpField field) { for (int i = _size; i-- > 0;) { HttpField f = _fields[i]; if (f.isSameName(field) && (f.opEquals(field) || f.contains(field.getValue()))) return true; } return false; } bool contains(HttpHeader header, string value) { for (int i = _size; i-- > 0;) { HttpField f = _fields[i]; if (f.getHeader() == header && f.contains(value)) return true; } return false; } bool contains(string name, string value) { for (int i = _size; i-- > 0;) { HttpField f = _fields[i]; if (f.getName().equalsIgnoreCase(name) && f.contains(value)) return true; } return false; } bool contains(HttpHeader header) { for (int i = _size; i-- > 0;) { HttpField f = _fields[i]; if (f.getHeader() == header) return true; } return false; } bool containsKey(string name) { for (int i = _size; i-- > 0;) { HttpField f = _fields[i]; if (std.string.icmp(f.getName(), name) == 0) return true; } return false; } string get(HttpHeader header) { for (int i = 0; i < _size; i++) { HttpField f = _fields[i]; if (f.getHeader() == header) return f.getValue(); } return null; } string get(string header) { for (int i = 0; i < _size; i++) { HttpField f = _fields[i]; if (f.getName().equalsIgnoreCase(header)) return f.getValue(); } return null; } /** * Get multiple header of the same name * * @return List the values * @param header * the header */ string[] getValuesList(HttpHeader header) { Array!(string) list; foreach (HttpField f; this) if (f.getHeader() == header) list.insertBack(f.getValue()); return list.array(); } /** * Get multiple header of the same name * * @return List the header values * @param name * the case-insensitive field name */ string[] getValuesList(string name) { Array!(string) list; foreach (HttpField f; this) if (f.getName().equalsIgnoreCase(name)) list.insertBack(f.getValue()); return list.array(); } /** * Add comma separated values, but only if not already present. * * @param header * The header to add the value(s) to * @param values * The value(s) to add * @return True if headers were modified */ // bool addCSV(HttpHeader header, string... values) { // QuotedCSV existing = null; // for (HttpField f : this) { // if (f.getHeader() == header) { // if (existing == null) // existing = new QuotedCSV(false); // existing.addValue(f.getValue()); // } // } // string value = addCSV(existing, values); // if (value != null) { // add(header, value); // return true; // } // return false; // } /** * Add comma separated values, but only if not already present. * * @param name * The header to add the value(s) to * @param values * The value(s) to add * @return True if headers were modified */ bool addCSV(string name, string[] values...) { QuotedCSV existing = null; foreach (HttpField f; this) { if (f.getName().equalsIgnoreCase(name)) { if (existing is null) existing = new QuotedCSV(false); existing.addValue(f.getValue()); } } string value = addCSV(existing, values); if (value != null) { add(name, value); return true; } return false; } protected string addCSV(QuotedCSV existing, string[] values...) { // remove any existing values from the new values bool add = true; if (existing !is null && !existing.isEmpty()) { add = false; for (size_t i = values.length; i-- > 0;) { string unquoted = QuotedCSV.unquote(values[i]); if (existing.getValues().contains(unquoted)) values[i] = null; else add = true; } } if (add) { StringBuilder value = new StringBuilder(); foreach (string v; values) { if (v == null) continue; if (value.length > 0) value.append(", "); value.append(v); } if (value.length > 0) return value.toString(); } return null; } /** * Get multiple field values of the same name, split as a {@link QuotedCSV} * * @return List the values with OWS stripped * @param header * The header * @param keepQuotes * True if the fields are kept quoted */ string[] getCSV(HttpHeader header, bool keepQuotes) { QuotedCSV values = null; foreach (HttpField f; _fields[0 .. _size]) { if (f.getHeader() == header) { if (values is null) values = new QuotedCSV(keepQuotes); values.addValue(f.getValue()); } } // Array!string ar = values.getValues(); // return inputRangeObject(values.getValues()[].array); return values is null ? cast(string[]) null : values.getValues().array; } /** * Get multiple field values of the same name as a {@link QuotedCSV} * * @return List the values with OWS stripped * @param name * the case-insensitive field name * @param keepQuotes * True if the fields are kept quoted */ List!string getCSV(string name, bool keepQuotes) { QuotedCSV values = null; foreach (HttpField f; _fields[0 .. _size]) { if (f.getName().equalsIgnoreCase(name)) { if (values is null) values = new QuotedCSV(keepQuotes); values.addValue(f.getValue()); } } return values is null ? null : new ArrayList!string(values.getValues().array); // return inputRangeObject(values.getValues()[].array); } string[] getCsvAsArray(string name, bool keepQuotes) { QuotedCSV values = null; foreach (HttpField f; _fields[0 .. _size]) { if (f.getName().equalsIgnoreCase(name)) { if (values is null) values = new QuotedCSV(keepQuotes); values.addValue(f.getValue()); } } return values is null ? null : values.getValues().array; // return inputRangeObject(values.getValues()[].array); } /** * Get multiple field values of the same name, split and sorted as a * {@link QuotedQualityCSV} * * @return List the values in quality order with the q param and OWS * stripped * @param header * The header */ // List!string getQualityCSV(HttpHeader header) { // QuotedQualityCSV values = null; // for (HttpField f : this) { // if (f.getHeader() == header) { // if (values == null) // values = new QuotedQualityCSV(); // values.addValue(f.getValue()); // } // } // return values == null ? Collections.emptyList() : values.getValues(); // } /** * Get multiple field values of the same name, split and sorted as a * {@link QuotedQualityCSV} * * @return List the values in quality order with the q param and OWS * stripped * @param name * the case-insensitive field name */ // List!string getQualityCSV(string name) { // QuotedQualityCSV values = null; // for (HttpField f : this) { // if (f.getName().equalsIgnoreCase(name)) { // if (values == null) // values = new QuotedQualityCSV(); // values.addValue(f.getValue()); // } // } // return values == null ? Collections.emptyList() : values.getValues(); // } /** * Get multi headers * * @return Enumeration of the values * @param name * the case-insensitive field name */ InputRange!string getValues(string name) { Array!string r; for (int i = 0; i < _size; i++) { HttpField f = _fields[i]; if (f.getName().equalsIgnoreCase(name)) { string v = f.getValue(); if (!v.empty) r.insertBack(v); } } return inputRangeObject(r[].array); } void put(HttpField field) { bool put = false; for (int i = _size; i-- > 0;) { HttpField f = _fields[i]; if (f.isSameName(field)) { if (put) { --_size; _fields[i + 1 .. _size + 1] = _fields[i .. _size]; } else { _fields[i] = field; put = true; } } } if (!put) add(field); } /** * Set a field. * * @param name * the name of the field * @param value * the value of the field. If null the field is cleared. */ void put(string name, string value) { if (value == null) remove(name); else put(new HttpField(name, value)); } void put(HttpHeader header, HttpHeaderValue value) { put(header, value.toString()); } /** * Set a field. * * @param header * the header name of the field * @param value * the value of the field. If null the field is cleared. */ void put(HttpHeader header, string value) { if (value == null) remove(header); else put(new HttpField(header, value)); } /** * Set a field. * * @param name * the name of the field * @param list * the List value of the field. If null the field is cleared. */ void put(string name, List!string list) { remove(name); foreach (string v; list) if (!v.empty) add(name, v); } /** * Add to or set a field. If the field is allowed to have multiple values, * add will add multiple headers of the same name. * * @param name * the name of the field * @param value * the value of the field. */ void add(string name, string value) { HttpField field = new HttpField(name, value); add(field); } void add(HttpHeader header, HttpHeaderValue value) { add(header, value.toString()); } /** * Add to or set a field. If the field is allowed to have multiple values, * add will add multiple headers of the same name. * * @param header * the header * @param value * the value of the field. */ void add(HttpHeader header, string value) { if (value.empty) throw new IllegalArgumentException("null value"); HttpField field = new HttpField(header, value); add(field); } /** * Remove a field. * * @param name * the field to remove * @return the header that was removed */ HttpField remove(HttpHeader name) { HttpField removed = null; for (int i = _size; i-- > 0;) { HttpField f = _fields[i]; if (f.getHeader() == name) { removed = f; --_size; for (int j = i; j < size; j++) _fields[j] = _fields[j + 1]; } } return removed; } /** * Remove a field. * * @param name * the field to remove * @return the header that was removed */ HttpField remove(string name) { HttpField removed = null; for (int i = _size; i-- > 0;) { HttpField f = _fields[i]; if (f.getName().equalsIgnoreCase(name)) { removed = f; --_size; for (int j = i; j < size; j++) _fields[j] = _fields[j + 1]; } } return removed; } /** * Get a header as an long value. Returns the value of an integer field or * -1 if not found. The case of the field name is ignored. * * @param name * the case-insensitive field name * @return the value of the field as a long * @exception NumberFormatException * If bad long found */ long getLongField(string name) { HttpField field = getField(name); return field is null ? -1L : field.getLongValue(); } /** * Get a header as a date value. Returns the value of a date field, or -1 if * not found. The case of the field name is ignored. * * @param name * the case-insensitive field name * @return the value of the field as a number of milliseconds since unix * epoch */ long getDateField(string name) { HttpField field = getField(name); if (field is null) return -1; string val = valueParameters(field.getValue(), null); if (val.empty) return -1; // TODO: Tasks pending completion -@zxp at 6/21/2018, 10:59:24 AM // long date = SysTime.fromISOExtString(val).stdTime(); // DateParser.parseDate(val); if (date == -1) throw new IllegalArgumentException("Cannot convert date: " ~ val); return date; } /** * Sets the value of an long field. * * @param name * the field name * @param value * the field long value */ void putLongField(HttpHeader name, long value) { string v = to!string(value); put(name, v); } /** * Sets the value of an long field. * * @param name * the field name * @param value * the field long value */ void putLongField(string name, long value) { string v = to!string(value); put(name, v); } /** * Sets the value of a date field. * * @param name * the field name * @param date * the field date value */ void putDateField(HttpHeader name, long date) { // TODO: Tasks pending completion -@zxp at 6/21/2018, 10:42:44 AM // // string d = DateGenerator.formatDate(date); string d = SysTime(date).toISOExtString(); put(name, d); } /** * Sets the value of a date field. * * @param name * the field name * @param date * the field date value */ void putDateField(string name, long date) { // TODO: Tasks pending completion -@zxp at 6/21/2018, 11:04:46 AM // // string d = DateGenerator.formatDate(date); string d = SysTime(date).toISOExtString(); put(name, d); } /** * Sets the value of a date field. * * @param name * the field name * @param date * the field date value */ void addDateField(string name, long date) { // string d = DateGenerator.formatDate(date); string d = SysTime(date).toISOExtString(); add(name, d); } override size_t toHash() @trusted nothrow { int hash = 0; foreach (HttpField field; _fields[0 .. _size]) hash += field.toHash(); return hash; } override bool opEquals(Object o) { if (o is this) return true; if (!object.opEquals(this, o)) return false; HttpFields that = cast(HttpFields) o; if (that is null) return false; // Order is not important, so we cannot rely on List.equals(). if (size() != that.size()) return false; foreach (HttpField fi; this) { bool isContinue = false; foreach (HttpField fa; that) { if (fi == fa) { isContinue = true; break; } } if (!isContinue) return false; } return true; } override string toString() { try { StringBuilder buffer = new StringBuilder(); foreach (HttpField field; this) { if (field !is null) { string tmp = field.getName(); if (tmp != null) buffer.append(tmp); buffer.append(": "); tmp = field.getValue(); if (tmp != null) buffer.append(tmp); buffer.append("\r\n"); } } buffer.append("\r\n"); return buffer.toString(); } catch (Exception e) { warningf("http fields toString exception", e); return e.toString(); } } void clear() { _size = 0; } void add(HttpField field) { if (field !is null) { if (_size == _fields.length) _fields = _fields.dup ~ new HttpField[_size]; _fields[_size++] = field; } } void addAll(HttpFields fields) { for (int i = 0; i < fields._size; i++) add(fields._fields[i]); } /** * Add fields from another HttpFields instance. Single valued fields are * replaced, while all others are added. * * @param fields * the fields to add */ void add(HttpFields fields) { if (fields is null) return; // Enumeration<string> e = fields.getFieldNames(); // while (e.hasMoreElements()) { // string name = e.nextElement(); // Enumeration<string> values = fields.getValues(name); // while (values.hasMoreElements()) // add(name, values.nextElement()); // } auto fieldNames = fields.getFieldNames(); foreach (string n; fieldNames) { auto values = fields.getValues(n); foreach (string v; values) add(n, v); } } /** * Get field value without parameters. Some field values can have * parameters. This method separates the value from the parameters and * optionally populates a map with the parameters. For example: * * <PRE> * * FieldName : Value ; param1=val1 ; param2=val2 * * </PRE> * * @param value * The Field value, possibly with parameters. * @return The value. */ static string stripParameters(string value) { if (value == null) return null; int i = cast(int) value.indexOf(';'); if (i < 0) return value; return value.substring(0, i).strip(); } /** * Get field value parameters. Some field values can have parameters. This * method separates the value from the parameters and optionally populates a * map with the parameters. For example: * * <PRE> * * FieldName : Value ; param1=val1 ; param2=val2 * * </PRE> * * @param value * The Field value, possibly with parameters. * @param parameters * A map to populate with the parameters, or null * @return The value. */ static string valueParameters(string value, Map!(string, string) parameters) { if (value is null) return null; int i = cast(int) value.indexOf(';'); if (i < 0) return value; if (parameters is null) return value.substring(0, i).strip(); StringTokenizer tok1 = new QuotedStringTokenizer(value.substring(i), ";", false, true); while (tok1.hasMoreTokens()) { string token = tok1.nextToken(); StringTokenizer tok2 = new QuotedStringTokenizer(token, "= "); if (tok2.hasMoreTokens()) { string paramName = tok2.nextToken(); string paramVal = null; if (tok2.hasMoreTokens()) paramVal = tok2.nextToken(); parameters.put(paramName, paramVal); } } return value.substring(0, i).strip(); } }
D
/+ + Copyright 2022 – 2023 Aya Partridge + Copyright 2018 - 2022 Michael D. Parker + 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 sdl.error; import bindbc.sdl.config; import bindbc.sdl.codegen; pragma(inline, true) nothrow @nogc{ int SDL_OutOfMemory(){ return SDL_Error(SDL_ENOMEM); } int SDL_Unsupported(){ return SDL_Error(SDL_UNSUPPORTED); } void SDL_InvalidParamError(T)(param){ SDL_SetError("Parameter '%s' is invalid", param); } } alias SDL_errorcode = uint; enum: SDL_errorcode{ SDL_ENOMEM = 0, SDL_EFREAD = 1, SDL_EFWRITE = 2, SDL_EFSEEK = 3, SDL_UNSUPPORTED = 4, SDL_LASTERROR = 5, } mixin(joinFnBinds((){ string[][] ret; ret ~= makeFnBinds([ [q{void}, q{SDL_SetError}, q{const(char)* fmt, ...}], [q{const(char)*}, q{SDL_GetError}, q{}], [q{void}, q{SDL_ClearError}, q{}], [q{int}, q{SDL_Error}, q{SDL_errorcode code}], ]); static if(sdlSupport >= SDLSupport.v2_0_14){ ret ~= makeFnBinds([ [q{char*}, q{SDL_GetErrorMsg}, q{char* errstr, int maxlen}], ]); } return ret; }()));
D
module ppl.ast.stmt.Loop; import ppl.internal; /** * Loop * Composite init_stmts // 0 or more * Composite cond_expr // 0 or 1 * Composite post_exprs // 0 or more * Composite body_stmts // 0 or more * * While loop: * * loop_expr ::= "loop" "(" init_stmts ";" cond_expr ";" post_exprs ")" "{" { body_stmts } "}" * init_exprs ::= [ statement { "," statement } ] * post_exprs ::= [ expression { "," expression } ] * */ final class Loop : Statement { LLVMBasicBlockRef continueBB; LLVMBasicBlockRef breakBB; /// ASTNode override bool isResolved() { return true; } override NodeID id() const { return NodeID.LOOP; } override Type getType() { return TYPE_VOID; } Composite initStmts() { return children[0].as!Composite; } Composite condExpr() { return children[1].as!Composite; } Composite postExprs() { return children[2].as!Composite; } Composite bodyStmts() { return children[3].as!Composite; } bool hasInitStmts() { return initStmts().hasChildren(); } bool hasCondExpr() { return condExpr().hasChildren(); } bool hasBodyStmts() { return bodyStmts().hasChildren(); } bool hasPostExprs() { return postExprs().hasChildren(); } override string toString() { return "Loop"; } }
D
module icu.icu; import std.algorithm; import std.conv : to; import std.exception : assumeUnique; import std.stdio; import std.string : toStringz, indexOf; import std.traits; import std.typecons : scoped; import icu.c.ucnv; class ICU { private string _encoding; private UErrorCode _error; private UConverter* _conv; private size_t _minCharSize; private size_t _maxCharSize; invariant() { assert(_error == UErrorCode.U_ZERO_ERROR, "_error = " ~ _error.to!string); assert(_conv !is null); assert(_minCharSize != 0); assert(_maxCharSize != 0); } this(string encoding) { _error = UErrorCode.U_ZERO_ERROR; _encoding = encoding; _conv = ucnv_open(encoding.toStringz, &_error); if (_conv is null) { return; } _minCharSize = ucnv_getMinCharSize(_conv); _maxCharSize = ucnv_getMaxCharSize(_conv); } ~this() { ucnv_close(_conv); } auto encoding() @property @safe nothrow pure const { return _encoding; } wstring decode(immutable(ubyte)[] str) @trusted { auto sourceLength = str.length; auto source = cast(const(ubyte)*)str.ptr; auto targetLength = sourceLength / _minCharSize; auto utf16 = new wchar[targetLength]; utf16[] = '\u0000'; auto target = utf16.ptr; ucnv_toUnicode(_conv, &target, target + targetLength, &source, source + sourceLength, null, true, &_error); auto len = utf16.indexOf('\u0000'); if (len == -1) len = utf16.length; return assumeUnique(utf16[0 .. len]); } immutable(ubyte)[] encode(wstring str) @trusted nothrow { auto sourceLength = str.length; auto source = cast(const(wchar)*)str.ptr; auto targetLength = sourceLength * _maxCharSize; auto bytes = new ubyte[targetLength]; auto target = bytes.ptr; ucnv_fromUnicode(_conv, &target, target + targetLength, &source, source + sourceLength, null, true, &_error); return assumeUnique(bytes.findSplitBefore([0x00, 0x00])[0]); } void write(S...)(S args) { foreach (arg; args) { alias T = typeof(arg); static if (is(T == wstring)) { std.stdio.write(cast(string)encode(arg)); } else { std.stdio.write(arg); } } } void writeln(S...)(S args) { write(args, '\n'); } } wstring decode(immutable(ubyte)[] str, string encoding) { return scoped!ICU(encoding).decode(str); } immutable(ubyte)[] encode(wstring str, string encoding) { return scoped!ICU(encoding).encode(str); } version (unittest) void main() {} unittest { auto conv = new ICU("sjis"); immutable(ubyte)[] sjis = [ 0x82, 0xB1, // こ 0x82, 0xF1, // ん 0x82, 0xC9, // に 0x82, 0xBF, // ち 0x82, 0xCD, // は 0x81, 0x41, // 、 0x44, // D 0x8C, 0xBE, // 言 0x8C, 0xEA, // 語 0x21 // ! ]; assert(conv.decode(sjis) == "こんにちは、D言語!"w); assert(sjis.decode("sjis") == "こんにちは、D言語!"w); assert(sjis.decode("sjis").encode("sjis") == sjis); conv.writeln(conv.decode(sjis)); }
D
/Users/chenzuncheng/Desktop/vaporTest/.build/x86_64-apple-macosx10.10/debug/Multipart.build/HeaderParser.swift.o : /Users/chenzuncheng/Desktop/vaporTest/.build/checkouts/multipart.git-4210556629793786970/Sources/Multipart/Multipart+BytesConvertible.swift /Users/chenzuncheng/Desktop/vaporTest/.build/checkouts/multipart.git-4210556629793786970/Sources/Multipart/Parser.swift /Users/chenzuncheng/Desktop/vaporTest/.build/checkouts/multipart.git-4210556629793786970/Sources/Multipart/HeaderParser.swift /Users/chenzuncheng/Desktop/vaporTest/.build/checkouts/multipart.git-4210556629793786970/Sources/Multipart/BoundaryParser.swift /Users/chenzuncheng/Desktop/vaporTest/.build/checkouts/multipart.git-4210556629793786970/Sources/Multipart/Serializer.swift /Users/chenzuncheng/Desktop/vaporTest/.build/checkouts/multipart.git-4210556629793786970/Sources/Multipart/Part.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/chenzuncheng/Desktop/vaporTest/.build/x86_64-apple-macosx10.10/debug/URI.swiftmodule /Users/chenzuncheng/Desktop/vaporTest/.build/x86_64-apple-macosx10.10/debug/HTTP.swiftmodule /Users/chenzuncheng/Desktop/vaporTest/.build/x86_64-apple-macosx10.10/debug/TLS.swiftmodule /Users/chenzuncheng/Desktop/vaporTest/.build/x86_64-apple-macosx10.10/debug/libc.swiftmodule /Users/chenzuncheng/Desktop/vaporTest/.build/x86_64-apple-macosx10.10/debug/Core.swiftmodule /Users/chenzuncheng/Desktop/vaporTest/.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/chenzuncheng/Desktop/vaporTest/.build/x86_64-apple-macosx10.10/debug/Random.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/chenzuncheng/Desktop/vaporTest/.build/x86_64-apple-macosx10.10/debug/Sockets.swiftmodule /Users/chenzuncheng/Desktop/vaporTest/.build/x86_64-apple-macosx10.10/debug/Bits.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/chenzuncheng/Desktop/vaporTest/.build/x86_64-apple-macosx10.10/debug/Transport.swiftmodule /Users/chenzuncheng/Desktop/vaporTest/.build/checkouts/engine.git-3311994267206676365/Sources/CHTTP/include/http_parser.h /Users/chenzuncheng/Desktop/vaporTest/.build/checkouts/ctls.git-9210868160426949823/module.modulemap /Users/chenzuncheng/Desktop/vaporTest/.build/x86_64-apple-macosx10.10/debug/CHTTP.build/module.modulemap /Users/chenzuncheng/Desktop/vaporTest/.build/x86_64-apple-macosx10.10/debug/CSQLite.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/chenzuncheng/Desktop/vaporTest/.build/x86_64-apple-macosx10.10/debug/Multipart.build/HeaderParser~partial.swiftmodule : /Users/chenzuncheng/Desktop/vaporTest/.build/checkouts/multipart.git-4210556629793786970/Sources/Multipart/Multipart+BytesConvertible.swift /Users/chenzuncheng/Desktop/vaporTest/.build/checkouts/multipart.git-4210556629793786970/Sources/Multipart/Parser.swift /Users/chenzuncheng/Desktop/vaporTest/.build/checkouts/multipart.git-4210556629793786970/Sources/Multipart/HeaderParser.swift /Users/chenzuncheng/Desktop/vaporTest/.build/checkouts/multipart.git-4210556629793786970/Sources/Multipart/BoundaryParser.swift /Users/chenzuncheng/Desktop/vaporTest/.build/checkouts/multipart.git-4210556629793786970/Sources/Multipart/Serializer.swift /Users/chenzuncheng/Desktop/vaporTest/.build/checkouts/multipart.git-4210556629793786970/Sources/Multipart/Part.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/chenzuncheng/Desktop/vaporTest/.build/x86_64-apple-macosx10.10/debug/URI.swiftmodule /Users/chenzuncheng/Desktop/vaporTest/.build/x86_64-apple-macosx10.10/debug/HTTP.swiftmodule /Users/chenzuncheng/Desktop/vaporTest/.build/x86_64-apple-macosx10.10/debug/TLS.swiftmodule /Users/chenzuncheng/Desktop/vaporTest/.build/x86_64-apple-macosx10.10/debug/libc.swiftmodule /Users/chenzuncheng/Desktop/vaporTest/.build/x86_64-apple-macosx10.10/debug/Core.swiftmodule /Users/chenzuncheng/Desktop/vaporTest/.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/chenzuncheng/Desktop/vaporTest/.build/x86_64-apple-macosx10.10/debug/Random.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/chenzuncheng/Desktop/vaporTest/.build/x86_64-apple-macosx10.10/debug/Sockets.swiftmodule /Users/chenzuncheng/Desktop/vaporTest/.build/x86_64-apple-macosx10.10/debug/Bits.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/chenzuncheng/Desktop/vaporTest/.build/x86_64-apple-macosx10.10/debug/Transport.swiftmodule /Users/chenzuncheng/Desktop/vaporTest/.build/checkouts/engine.git-3311994267206676365/Sources/CHTTP/include/http_parser.h /Users/chenzuncheng/Desktop/vaporTest/.build/checkouts/ctls.git-9210868160426949823/module.modulemap /Users/chenzuncheng/Desktop/vaporTest/.build/x86_64-apple-macosx10.10/debug/CHTTP.build/module.modulemap /Users/chenzuncheng/Desktop/vaporTest/.build/x86_64-apple-macosx10.10/debug/CSQLite.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/chenzuncheng/Desktop/vaporTest/.build/x86_64-apple-macosx10.10/debug/Multipart.build/HeaderParser~partial.swiftdoc : /Users/chenzuncheng/Desktop/vaporTest/.build/checkouts/multipart.git-4210556629793786970/Sources/Multipart/Multipart+BytesConvertible.swift /Users/chenzuncheng/Desktop/vaporTest/.build/checkouts/multipart.git-4210556629793786970/Sources/Multipart/Parser.swift /Users/chenzuncheng/Desktop/vaporTest/.build/checkouts/multipart.git-4210556629793786970/Sources/Multipart/HeaderParser.swift /Users/chenzuncheng/Desktop/vaporTest/.build/checkouts/multipart.git-4210556629793786970/Sources/Multipart/BoundaryParser.swift /Users/chenzuncheng/Desktop/vaporTest/.build/checkouts/multipart.git-4210556629793786970/Sources/Multipart/Serializer.swift /Users/chenzuncheng/Desktop/vaporTest/.build/checkouts/multipart.git-4210556629793786970/Sources/Multipart/Part.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/chenzuncheng/Desktop/vaporTest/.build/x86_64-apple-macosx10.10/debug/URI.swiftmodule /Users/chenzuncheng/Desktop/vaporTest/.build/x86_64-apple-macosx10.10/debug/HTTP.swiftmodule /Users/chenzuncheng/Desktop/vaporTest/.build/x86_64-apple-macosx10.10/debug/TLS.swiftmodule /Users/chenzuncheng/Desktop/vaporTest/.build/x86_64-apple-macosx10.10/debug/libc.swiftmodule /Users/chenzuncheng/Desktop/vaporTest/.build/x86_64-apple-macosx10.10/debug/Core.swiftmodule /Users/chenzuncheng/Desktop/vaporTest/.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/chenzuncheng/Desktop/vaporTest/.build/x86_64-apple-macosx10.10/debug/Random.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/chenzuncheng/Desktop/vaporTest/.build/x86_64-apple-macosx10.10/debug/Sockets.swiftmodule /Users/chenzuncheng/Desktop/vaporTest/.build/x86_64-apple-macosx10.10/debug/Bits.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/chenzuncheng/Desktop/vaporTest/.build/x86_64-apple-macosx10.10/debug/Transport.swiftmodule /Users/chenzuncheng/Desktop/vaporTest/.build/checkouts/engine.git-3311994267206676365/Sources/CHTTP/include/http_parser.h /Users/chenzuncheng/Desktop/vaporTest/.build/checkouts/ctls.git-9210868160426949823/module.modulemap /Users/chenzuncheng/Desktop/vaporTest/.build/x86_64-apple-macosx10.10/debug/CHTTP.build/module.modulemap /Users/chenzuncheng/Desktop/vaporTest/.build/x86_64-apple-macosx10.10/debug/CSQLite.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
/home/cyobero/rust/examples/cookies/target/debug/build/rocket-e359ddd6b9fab8e4/build_script_build-e359ddd6b9fab8e4: /home/cyobero/.cargo/registry/src/github.com-1ecc6299db9ec823/rocket-0.4.2/build.rs /home/cyobero/rust/examples/cookies/target/debug/build/rocket-e359ddd6b9fab8e4/build_script_build-e359ddd6b9fab8e4.d: /home/cyobero/.cargo/registry/src/github.com-1ecc6299db9ec823/rocket-0.4.2/build.rs /home/cyobero/.cargo/registry/src/github.com-1ecc6299db9ec823/rocket-0.4.2/build.rs:
D
/Users/michael/Desktop/Buildcoin/ChartTest/build/Pods.build/Debug-iphonesimulator/Charts.build/Objects-normal/x86_64/CombinedChartDataProvider.o : /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Data/Implementations/Standard/ChartData.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Data/Implementations/Standard/CombinedChartData.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Data/Implementations/Standard/PieChartData.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Data/Implementations/Standard/BubbleChartData.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Data/Implementations/Standard/BarLineScatterCandleBubbleChartData.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Data/Implementations/Standard/CandleChartData.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Data/Implementations/Standard/LineChartData.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Data/Implementations/Standard/BarChartData.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Data/Implementations/Standard/RadarChartData.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Data/Implementations/Standard/ScatterChartData.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Jobs/ViewPortJob.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Jobs/AnimatedViewPortJob.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Jobs/MoveViewJob.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Jobs/AnimatedMoveViewJob.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Jobs/ZoomViewJob.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Jobs/AnimatedZoomViewJob.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Components/Legend.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Components/MarkerImage.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Highlight/Range.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Components/ChartLimitLine.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Renderers/ChartDataRendererBase.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Renderers/AxisRendererBase.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Components/AxisBase.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Components/ComponentBase.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Charts/ChartViewBase.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Charts/BarLineChartViewBase.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Charts/PieRadarChartViewBase.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Data/Implementations/Standard/ChartDataEntryBase.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Animation/ChartAnimationEasing.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Utils/Fill.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Utils/Platform.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Components/Description.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Interfaces/ChartDataProvider.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Interfaces/CombinedChartDataProvider.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Interfaces/BubbleChartDataProvider.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Interfaces/BarLineScatterCandleBubbleChartDataProvider.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Interfaces/CandleChartDataProvider.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Interfaces/LineChartDataProvider.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Interfaces/BarChartDataProvider.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Interfaces/ScatterChartDataProvider.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Components/IMarker.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Utils/ViewPortHandler.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Utils/Transformer.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Renderers/Renderer.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Renderers/LegendRenderer.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Renderers/BarLineScatterCandleBubbleRenderer.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Renderers/Scatter/IShapeRenderer.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Renderers/Scatter/XShapeRenderer.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Renderers/Scatter/CircleShapeRenderer.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Renderers/Scatter/TriangleShapeRenderer.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Renderers/Scatter/SquareShapeRenderer.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Renderers/Scatter/ChevronDownShapeRenderer.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Renderers/Scatter/ChevronUpShapeRenderer.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Renderers/Scatter/CrossShapeRenderer.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Renderers/LineScatterCandleRadarRenderer.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Renderers/LineRadarRenderer.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Renderers/XAxisRenderer.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Renderers/YAxisRenderer.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Renderers/CombinedChartRenderer.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Renderers/PieChartRenderer.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Renderers/BubbleChartRenderer.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Renderers/LineChartRenderer.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Renderers/CandleStickChartRenderer.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Renderers/BarChartRenderer.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Renderers/HorizontalBarChartRenderer.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Renderers/RadarChartRenderer.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Renderers/ScatterChartRenderer.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Highlight/IHighlighter.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Highlight/CombinedHighlighter.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Highlight/PieHighlighter.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Highlight/BarHighlighter.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Highlight/HorizontalBarHighlighter.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Highlight/RadarHighlighter.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Highlight/PieRadarHighlighter.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Highlight/ChartHighlighter.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Formatters/IValueFormatter.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Formatters/IAxisValueFormatter.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Formatters/DefaultAxisValueFormatter.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Formatters/IndexAxisValueFormatter.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Formatters/DefaultValueFormatter.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Formatters/IFillFormatter.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Formatters/DefaultFillFormatter.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Animation/Animator.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Filters/DataApproximator.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Utils/ChartColorTemplates.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Components/XAxis.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Components/YAxis.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Utils/ChartUtils.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Data/Implementations/ChartBaseDataSet.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Data/Implementations/Standard/ChartDataSet.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Data/Interfaces/IChartDataSet.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Data/Implementations/Standard/PieChartDataSet.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Data/Interfaces/IPieChartDataSet.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Data/Implementations/Standard/BubbleChartDataSet.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Data/Interfaces/IBubbleChartDataSet.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Data/Implementations/Standard/BarLineScatterCandleBubbleChartDataSet.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Data/Interfaces/IBarLineScatterCandleBubbleChartDataSet.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Data/Implementations/Standard/CandleChartDataSet.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Data/Interfaces/ICandleChartDataSet.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Data/Implementations/Standard/LineChartDataSet.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Data/Interfaces/ILineChartDataSet.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Data/Implementations/Standard/BarChartDataSet.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Data/Interfaces/IBarChartDataSet.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Data/Implementations/Standard/RadarChartDataSet.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Data/Interfaces/IRadarChartDataSet.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Data/Implementations/Standard/LineScatterCandleRadarChartDataSet.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Data/Interfaces/ILineScatterCandleRadarChartDataSet.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Data/Implementations/Standard/LineRadarChartDataSet.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Data/Interfaces/ILineRadarChartDataSet.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Data/Implementations/Standard/ScatterChartDataSet.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Data/Interfaces/IScatterChartDataSet.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Highlight/Highlight.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Utils/TransformerHorizontalBarChart.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Renderers/XAxisRendererHorizontalBarChart.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Renderers/YAxisRendererHorizontalBarChart.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Renderers/XAxisRendererRadarChart.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Renderers/YAxisRendererRadarChart.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Components/MarkerView.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Charts/CombinedChartView.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Charts/PieChartView.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Charts/BubbleChartView.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Charts/LineChartView.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Charts/CandleStickChartView.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Charts/BarChartView.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Charts/HorizontalBarChartView.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Charts/RadarChartView.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Charts/ScatterChartView.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Data/Implementations/Standard/ChartDataEntry.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Data/Implementations/Standard/PieChartDataEntry.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Data/Implementations/Standard/BubbleChartDataEntry.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Data/Implementations/Standard/CandleChartDataEntry.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Data/Implementations/Standard/BarChartDataEntry.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Data/Implementations/Standard/RadarChartDataEntry.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Components/LegendEntry.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/michael/Desktop/Buildcoin/ChartTest/Pods/Target\ Support\ Files/Charts/Charts-umbrella.h /Users/michael/Desktop/Buildcoin/ChartTest/build/Pods.build/Debug-iphonesimulator/Charts.build/unextended-module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.0.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.0.sdk/System/Library/Frameworks/OpenGLES.framework/Headers/OpenGLES.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.0.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImage.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.0.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/QuartzCore.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.0.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.0.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.0.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.0.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Users/michael/Desktop/Buildcoin/ChartTest/build/Pods.build/Debug-iphonesimulator/Charts.build/Objects-normal/x86_64/CombinedChartDataProvider~partial.swiftmodule : /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Data/Implementations/Standard/ChartData.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Data/Implementations/Standard/CombinedChartData.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Data/Implementations/Standard/PieChartData.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Data/Implementations/Standard/BubbleChartData.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Data/Implementations/Standard/BarLineScatterCandleBubbleChartData.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Data/Implementations/Standard/CandleChartData.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Data/Implementations/Standard/LineChartData.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Data/Implementations/Standard/BarChartData.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Data/Implementations/Standard/RadarChartData.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Data/Implementations/Standard/ScatterChartData.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Jobs/ViewPortJob.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Jobs/AnimatedViewPortJob.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Jobs/MoveViewJob.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Jobs/AnimatedMoveViewJob.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Jobs/ZoomViewJob.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Jobs/AnimatedZoomViewJob.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Components/Legend.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Components/MarkerImage.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Highlight/Range.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Components/ChartLimitLine.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Renderers/ChartDataRendererBase.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Renderers/AxisRendererBase.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Components/AxisBase.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Components/ComponentBase.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Charts/ChartViewBase.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Charts/BarLineChartViewBase.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Charts/PieRadarChartViewBase.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Data/Implementations/Standard/ChartDataEntryBase.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Animation/ChartAnimationEasing.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Utils/Fill.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Utils/Platform.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Components/Description.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Interfaces/ChartDataProvider.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Interfaces/CombinedChartDataProvider.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Interfaces/BubbleChartDataProvider.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Interfaces/BarLineScatterCandleBubbleChartDataProvider.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Interfaces/CandleChartDataProvider.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Interfaces/LineChartDataProvider.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Interfaces/BarChartDataProvider.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Interfaces/ScatterChartDataProvider.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Components/IMarker.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Utils/ViewPortHandler.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Utils/Transformer.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Renderers/Renderer.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Renderers/LegendRenderer.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Renderers/BarLineScatterCandleBubbleRenderer.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Renderers/Scatter/IShapeRenderer.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Renderers/Scatter/XShapeRenderer.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Renderers/Scatter/CircleShapeRenderer.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Renderers/Scatter/TriangleShapeRenderer.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Renderers/Scatter/SquareShapeRenderer.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Renderers/Scatter/ChevronDownShapeRenderer.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Renderers/Scatter/ChevronUpShapeRenderer.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Renderers/Scatter/CrossShapeRenderer.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Renderers/LineScatterCandleRadarRenderer.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Renderers/LineRadarRenderer.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Renderers/XAxisRenderer.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Renderers/YAxisRenderer.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Renderers/CombinedChartRenderer.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Renderers/PieChartRenderer.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Renderers/BubbleChartRenderer.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Renderers/LineChartRenderer.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Renderers/CandleStickChartRenderer.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Renderers/BarChartRenderer.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Renderers/HorizontalBarChartRenderer.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Renderers/RadarChartRenderer.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Renderers/ScatterChartRenderer.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Highlight/IHighlighter.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Highlight/CombinedHighlighter.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Highlight/PieHighlighter.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Highlight/BarHighlighter.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Highlight/HorizontalBarHighlighter.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Highlight/RadarHighlighter.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Highlight/PieRadarHighlighter.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Highlight/ChartHighlighter.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Formatters/IValueFormatter.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Formatters/IAxisValueFormatter.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Formatters/DefaultAxisValueFormatter.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Formatters/IndexAxisValueFormatter.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Formatters/DefaultValueFormatter.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Formatters/IFillFormatter.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Formatters/DefaultFillFormatter.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Animation/Animator.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Filters/DataApproximator.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Utils/ChartColorTemplates.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Components/XAxis.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Components/YAxis.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Utils/ChartUtils.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Data/Implementations/ChartBaseDataSet.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Data/Implementations/Standard/ChartDataSet.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Data/Interfaces/IChartDataSet.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Data/Implementations/Standard/PieChartDataSet.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Data/Interfaces/IPieChartDataSet.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Data/Implementations/Standard/BubbleChartDataSet.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Data/Interfaces/IBubbleChartDataSet.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Data/Implementations/Standard/BarLineScatterCandleBubbleChartDataSet.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Data/Interfaces/IBarLineScatterCandleBubbleChartDataSet.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Data/Implementations/Standard/CandleChartDataSet.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Data/Interfaces/ICandleChartDataSet.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Data/Implementations/Standard/LineChartDataSet.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Data/Interfaces/ILineChartDataSet.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Data/Implementations/Standard/BarChartDataSet.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Data/Interfaces/IBarChartDataSet.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Data/Implementations/Standard/RadarChartDataSet.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Data/Interfaces/IRadarChartDataSet.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Data/Implementations/Standard/LineScatterCandleRadarChartDataSet.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Data/Interfaces/ILineScatterCandleRadarChartDataSet.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Data/Implementations/Standard/LineRadarChartDataSet.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Data/Interfaces/ILineRadarChartDataSet.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Data/Implementations/Standard/ScatterChartDataSet.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Data/Interfaces/IScatterChartDataSet.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Highlight/Highlight.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Utils/TransformerHorizontalBarChart.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Renderers/XAxisRendererHorizontalBarChart.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Renderers/YAxisRendererHorizontalBarChart.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Renderers/XAxisRendererRadarChart.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Renderers/YAxisRendererRadarChart.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Components/MarkerView.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Charts/CombinedChartView.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Charts/PieChartView.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Charts/BubbleChartView.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Charts/LineChartView.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Charts/CandleStickChartView.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Charts/BarChartView.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Charts/HorizontalBarChartView.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Charts/RadarChartView.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Charts/ScatterChartView.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Data/Implementations/Standard/ChartDataEntry.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Data/Implementations/Standard/PieChartDataEntry.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Data/Implementations/Standard/BubbleChartDataEntry.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Data/Implementations/Standard/CandleChartDataEntry.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Data/Implementations/Standard/BarChartDataEntry.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Data/Implementations/Standard/RadarChartDataEntry.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Components/LegendEntry.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/michael/Desktop/Buildcoin/ChartTest/Pods/Target\ Support\ Files/Charts/Charts-umbrella.h /Users/michael/Desktop/Buildcoin/ChartTest/build/Pods.build/Debug-iphonesimulator/Charts.build/unextended-module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.0.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.0.sdk/System/Library/Frameworks/OpenGLES.framework/Headers/OpenGLES.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.0.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImage.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.0.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/QuartzCore.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.0.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.0.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.0.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.0.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Users/michael/Desktop/Buildcoin/ChartTest/build/Pods.build/Debug-iphonesimulator/Charts.build/Objects-normal/x86_64/CombinedChartDataProvider~partial.swiftdoc : /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Data/Implementations/Standard/ChartData.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Data/Implementations/Standard/CombinedChartData.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Data/Implementations/Standard/PieChartData.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Data/Implementations/Standard/BubbleChartData.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Data/Implementations/Standard/BarLineScatterCandleBubbleChartData.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Data/Implementations/Standard/CandleChartData.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Data/Implementations/Standard/LineChartData.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Data/Implementations/Standard/BarChartData.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Data/Implementations/Standard/RadarChartData.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Data/Implementations/Standard/ScatterChartData.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Jobs/ViewPortJob.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Jobs/AnimatedViewPortJob.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Jobs/MoveViewJob.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Jobs/AnimatedMoveViewJob.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Jobs/ZoomViewJob.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Jobs/AnimatedZoomViewJob.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Components/Legend.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Components/MarkerImage.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Highlight/Range.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Components/ChartLimitLine.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Renderers/ChartDataRendererBase.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Renderers/AxisRendererBase.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Components/AxisBase.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Components/ComponentBase.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Charts/ChartViewBase.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Charts/BarLineChartViewBase.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Charts/PieRadarChartViewBase.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Data/Implementations/Standard/ChartDataEntryBase.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Animation/ChartAnimationEasing.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Utils/Fill.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Utils/Platform.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Components/Description.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Interfaces/ChartDataProvider.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Interfaces/CombinedChartDataProvider.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Interfaces/BubbleChartDataProvider.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Interfaces/BarLineScatterCandleBubbleChartDataProvider.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Interfaces/CandleChartDataProvider.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Interfaces/LineChartDataProvider.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Interfaces/BarChartDataProvider.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Interfaces/ScatterChartDataProvider.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Components/IMarker.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Utils/ViewPortHandler.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Utils/Transformer.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Renderers/Renderer.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Renderers/LegendRenderer.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Renderers/BarLineScatterCandleBubbleRenderer.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Renderers/Scatter/IShapeRenderer.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Renderers/Scatter/XShapeRenderer.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Renderers/Scatter/CircleShapeRenderer.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Renderers/Scatter/TriangleShapeRenderer.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Renderers/Scatter/SquareShapeRenderer.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Renderers/Scatter/ChevronDownShapeRenderer.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Renderers/Scatter/ChevronUpShapeRenderer.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Renderers/Scatter/CrossShapeRenderer.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Renderers/LineScatterCandleRadarRenderer.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Renderers/LineRadarRenderer.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Renderers/XAxisRenderer.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Renderers/YAxisRenderer.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Renderers/CombinedChartRenderer.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Renderers/PieChartRenderer.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Renderers/BubbleChartRenderer.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Renderers/LineChartRenderer.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Renderers/CandleStickChartRenderer.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Renderers/BarChartRenderer.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Renderers/HorizontalBarChartRenderer.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Renderers/RadarChartRenderer.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Renderers/ScatterChartRenderer.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Highlight/IHighlighter.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Highlight/CombinedHighlighter.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Highlight/PieHighlighter.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Highlight/BarHighlighter.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Highlight/HorizontalBarHighlighter.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Highlight/RadarHighlighter.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Highlight/PieRadarHighlighter.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Highlight/ChartHighlighter.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Formatters/IValueFormatter.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Formatters/IAxisValueFormatter.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Formatters/DefaultAxisValueFormatter.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Formatters/IndexAxisValueFormatter.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Formatters/DefaultValueFormatter.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Formatters/IFillFormatter.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Formatters/DefaultFillFormatter.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Animation/Animator.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Filters/DataApproximator.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Utils/ChartColorTemplates.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Components/XAxis.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Components/YAxis.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Utils/ChartUtils.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Data/Implementations/ChartBaseDataSet.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Data/Implementations/Standard/ChartDataSet.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Data/Interfaces/IChartDataSet.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Data/Implementations/Standard/PieChartDataSet.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Data/Interfaces/IPieChartDataSet.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Data/Implementations/Standard/BubbleChartDataSet.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Data/Interfaces/IBubbleChartDataSet.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Data/Implementations/Standard/BarLineScatterCandleBubbleChartDataSet.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Data/Interfaces/IBarLineScatterCandleBubbleChartDataSet.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Data/Implementations/Standard/CandleChartDataSet.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Data/Interfaces/ICandleChartDataSet.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Data/Implementations/Standard/LineChartDataSet.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Data/Interfaces/ILineChartDataSet.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Data/Implementations/Standard/BarChartDataSet.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Data/Interfaces/IBarChartDataSet.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Data/Implementations/Standard/RadarChartDataSet.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Data/Interfaces/IRadarChartDataSet.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Data/Implementations/Standard/LineScatterCandleRadarChartDataSet.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Data/Interfaces/ILineScatterCandleRadarChartDataSet.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Data/Implementations/Standard/LineRadarChartDataSet.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Data/Interfaces/ILineRadarChartDataSet.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Data/Implementations/Standard/ScatterChartDataSet.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Data/Interfaces/IScatterChartDataSet.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Highlight/Highlight.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Utils/TransformerHorizontalBarChart.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Renderers/XAxisRendererHorizontalBarChart.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Renderers/YAxisRendererHorizontalBarChart.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Renderers/XAxisRendererRadarChart.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Renderers/YAxisRendererRadarChart.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Components/MarkerView.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Charts/CombinedChartView.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Charts/PieChartView.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Charts/BubbleChartView.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Charts/LineChartView.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Charts/CandleStickChartView.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Charts/BarChartView.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Charts/HorizontalBarChartView.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Charts/RadarChartView.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Charts/ScatterChartView.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Data/Implementations/Standard/ChartDataEntry.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Data/Implementations/Standard/PieChartDataEntry.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Data/Implementations/Standard/BubbleChartDataEntry.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Data/Implementations/Standard/CandleChartDataEntry.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Data/Implementations/Standard/BarChartDataEntry.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Data/Implementations/Standard/RadarChartDataEntry.swift /Users/michael/Desktop/Buildcoin/ChartTest/Pods/Charts/Source/Charts/Components/LegendEntry.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/michael/Desktop/Buildcoin/ChartTest/Pods/Target\ Support\ Files/Charts/Charts-umbrella.h /Users/michael/Desktop/Buildcoin/ChartTest/build/Pods.build/Debug-iphonesimulator/Charts.build/unextended-module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.0.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.0.sdk/System/Library/Frameworks/OpenGLES.framework/Headers/OpenGLES.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.0.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImage.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.0.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/QuartzCore.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.0.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.0.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.0.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.0.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes
D
/Users/kerwinlim/SpaceTogether/Build/Intermediates.noindex/SpaceTogether.build/Debug-iphonesimulator/SpaceTogether.build/Objects-normal/x86_64/ViewController.o : /Users/kerwinlim/SpaceTogether/SpaceTogether/SceneDelegate.swift /Users/kerwinlim/SpaceTogether/SpaceTogether/AppDelegate.swift /Users/kerwinlim/SpaceTogether/SpaceTogether/ViewController.swift /Users/kerwinlim/SpaceTogether/SpaceTogether/RecordedViewController.swift /Users/kerwinlim/SpaceTogether/SpaceTogether/RecordViewController.swift /Users/kerwinlim/SpaceTogether/SpaceTogether/SafeViewController.swift /Users/kerwinlim/SpaceTogether/SpaceTogether/RecordingViewController.swift /Users/kerwinlim/SpaceTogether/SpaceTogether/AlarmViewController.swift /Users/kerwinlim/SpaceTogether/SpaceTogether/SelectAlarmViewController.swift /Users/kerwinlim/SpaceTogether/SpaceTogether/BluetoothDetector.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/ObjectiveC.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/CoreData.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/CoreImage.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Combine.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/QuartzCore.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Dispatch.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Metal.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Darwin.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/CoreLocation.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Foundation.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/CoreFoundation.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/CoreGraphics.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Swift.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/UIKit.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/CloudKit.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/SwiftOnoneSupport.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.2.sdk/usr/include/mach-o/dyld.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.2.sdk/usr/include/mach-o/compact_unwind_encoding.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.2.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.2.sdk/System/Library/Frameworks/OpenGLES.framework/Headers/OpenGLES.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.2.sdk/System/Library/Frameworks/CoreData.framework/Headers/CoreData.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.2.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImage.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.2.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/iPhoneSimulator14.2.sdk/System/Library/Frameworks/CoreBluetooth.framework/Headers/CoreBluetooth.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.2.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.2.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.2.sdk/System/Library/Frameworks/CoreLocation.framework/Headers/CoreLocation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.2.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.2.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.2.sdk/System/Library/Frameworks/UserNotifications.framework/Headers/UserNotifications.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.2.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.2.sdk/System/Library/Frameworks/CloudKit.framework/Headers/CloudKit.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.2.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.2.sdk/System/Library/Frameworks/Security.framework/Headers/Security.apinotes /Users/kerwinlim/SpaceTogether/Build/Intermediates.noindex/SpaceTogether.build/Debug-iphonesimulator/SpaceTogether.build/Objects-normal/x86_64/ViewController~partial.swiftmodule : /Users/kerwinlim/SpaceTogether/SpaceTogether/SceneDelegate.swift /Users/kerwinlim/SpaceTogether/SpaceTogether/AppDelegate.swift /Users/kerwinlim/SpaceTogether/SpaceTogether/ViewController.swift /Users/kerwinlim/SpaceTogether/SpaceTogether/RecordedViewController.swift /Users/kerwinlim/SpaceTogether/SpaceTogether/RecordViewController.swift /Users/kerwinlim/SpaceTogether/SpaceTogether/SafeViewController.swift /Users/kerwinlim/SpaceTogether/SpaceTogether/RecordingViewController.swift /Users/kerwinlim/SpaceTogether/SpaceTogether/AlarmViewController.swift /Users/kerwinlim/SpaceTogether/SpaceTogether/SelectAlarmViewController.swift /Users/kerwinlim/SpaceTogether/SpaceTogether/BluetoothDetector.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/ObjectiveC.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/CoreData.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/CoreImage.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Combine.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/QuartzCore.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Dispatch.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Metal.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Darwin.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/CoreLocation.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Foundation.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/CoreFoundation.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/CoreGraphics.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Swift.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/UIKit.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/CloudKit.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/SwiftOnoneSupport.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.2.sdk/usr/include/mach-o/dyld.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.2.sdk/usr/include/mach-o/compact_unwind_encoding.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.2.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.2.sdk/System/Library/Frameworks/OpenGLES.framework/Headers/OpenGLES.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.2.sdk/System/Library/Frameworks/CoreData.framework/Headers/CoreData.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.2.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImage.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.2.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/iPhoneSimulator14.2.sdk/System/Library/Frameworks/CoreBluetooth.framework/Headers/CoreBluetooth.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.2.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.2.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.2.sdk/System/Library/Frameworks/CoreLocation.framework/Headers/CoreLocation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.2.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.2.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.2.sdk/System/Library/Frameworks/UserNotifications.framework/Headers/UserNotifications.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.2.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.2.sdk/System/Library/Frameworks/CloudKit.framework/Headers/CloudKit.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.2.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.2.sdk/System/Library/Frameworks/Security.framework/Headers/Security.apinotes /Users/kerwinlim/SpaceTogether/Build/Intermediates.noindex/SpaceTogether.build/Debug-iphonesimulator/SpaceTogether.build/Objects-normal/x86_64/ViewController~partial.swiftdoc : /Users/kerwinlim/SpaceTogether/SpaceTogether/SceneDelegate.swift /Users/kerwinlim/SpaceTogether/SpaceTogether/AppDelegate.swift /Users/kerwinlim/SpaceTogether/SpaceTogether/ViewController.swift /Users/kerwinlim/SpaceTogether/SpaceTogether/RecordedViewController.swift /Users/kerwinlim/SpaceTogether/SpaceTogether/RecordViewController.swift /Users/kerwinlim/SpaceTogether/SpaceTogether/SafeViewController.swift /Users/kerwinlim/SpaceTogether/SpaceTogether/RecordingViewController.swift /Users/kerwinlim/SpaceTogether/SpaceTogether/AlarmViewController.swift /Users/kerwinlim/SpaceTogether/SpaceTogether/SelectAlarmViewController.swift /Users/kerwinlim/SpaceTogether/SpaceTogether/BluetoothDetector.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/ObjectiveC.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/CoreData.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/CoreImage.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Combine.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/QuartzCore.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Dispatch.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Metal.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Darwin.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/CoreLocation.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Foundation.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/CoreFoundation.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/CoreGraphics.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Swift.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/UIKit.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/CloudKit.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/SwiftOnoneSupport.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.2.sdk/usr/include/mach-o/dyld.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.2.sdk/usr/include/mach-o/compact_unwind_encoding.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.2.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.2.sdk/System/Library/Frameworks/OpenGLES.framework/Headers/OpenGLES.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.2.sdk/System/Library/Frameworks/CoreData.framework/Headers/CoreData.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.2.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImage.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.2.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/iPhoneSimulator14.2.sdk/System/Library/Frameworks/CoreBluetooth.framework/Headers/CoreBluetooth.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.2.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.2.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.2.sdk/System/Library/Frameworks/CoreLocation.framework/Headers/CoreLocation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.2.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.2.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.2.sdk/System/Library/Frameworks/UserNotifications.framework/Headers/UserNotifications.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.2.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.2.sdk/System/Library/Frameworks/CloudKit.framework/Headers/CloudKit.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.2.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.2.sdk/System/Library/Frameworks/Security.framework/Headers/Security.apinotes /Users/kerwinlim/SpaceTogether/Build/Intermediates.noindex/SpaceTogether.build/Debug-iphonesimulator/SpaceTogether.build/Objects-normal/x86_64/ViewController~partial.swiftsourceinfo : /Users/kerwinlim/SpaceTogether/SpaceTogether/SceneDelegate.swift /Users/kerwinlim/SpaceTogether/SpaceTogether/AppDelegate.swift /Users/kerwinlim/SpaceTogether/SpaceTogether/ViewController.swift /Users/kerwinlim/SpaceTogether/SpaceTogether/RecordedViewController.swift /Users/kerwinlim/SpaceTogether/SpaceTogether/RecordViewController.swift /Users/kerwinlim/SpaceTogether/SpaceTogether/SafeViewController.swift /Users/kerwinlim/SpaceTogether/SpaceTogether/RecordingViewController.swift /Users/kerwinlim/SpaceTogether/SpaceTogether/AlarmViewController.swift /Users/kerwinlim/SpaceTogether/SpaceTogether/SelectAlarmViewController.swift /Users/kerwinlim/SpaceTogether/SpaceTogether/BluetoothDetector.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/ObjectiveC.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/CoreData.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/CoreImage.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Combine.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/QuartzCore.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Dispatch.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Metal.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Darwin.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/CoreLocation.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Foundation.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/CoreFoundation.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/CoreGraphics.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Swift.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/UIKit.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/CloudKit.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/SwiftOnoneSupport.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.2.sdk/usr/include/mach-o/dyld.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.2.sdk/usr/include/mach-o/compact_unwind_encoding.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.2.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.2.sdk/System/Library/Frameworks/OpenGLES.framework/Headers/OpenGLES.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.2.sdk/System/Library/Frameworks/CoreData.framework/Headers/CoreData.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.2.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImage.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.2.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/iPhoneSimulator14.2.sdk/System/Library/Frameworks/CoreBluetooth.framework/Headers/CoreBluetooth.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.2.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.2.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.2.sdk/System/Library/Frameworks/CoreLocation.framework/Headers/CoreLocation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.2.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.2.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.2.sdk/System/Library/Frameworks/UserNotifications.framework/Headers/UserNotifications.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.2.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.2.sdk/System/Library/Frameworks/CloudKit.framework/Headers/CloudKit.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.2.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.2.sdk/System/Library/Frameworks/Security.framework/Headers/Security.apinotes
D
/Users/Roxi/Desktop/LaraMobile/DerivedData/LaraMobile/Build/Intermediates.noindex/LaraMobile.build/Debug-iphonesimulator/LaraMobile.build/Objects-normal/x86_64/ViewController.o : /Users/Roxi/Desktop/LaraMobile/LaraMobile/AppDelegate.swift /Users/Roxi/Desktop/LaraMobile/LaraMobile/ViewController.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/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/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 /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/OpenGLES.framework/Headers/OpenGLES.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/CoreData.framework/Headers/CoreData.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImage.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/QuartzCore.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/Security.framework/Headers/Security.apinotes /Users/Roxi/Desktop/LaraMobile/DerivedData/LaraMobile/Build/Intermediates.noindex/LaraMobile.build/Debug-iphonesimulator/LaraMobile.build/Objects-normal/x86_64/ViewController~partial.swiftmodule : /Users/Roxi/Desktop/LaraMobile/LaraMobile/AppDelegate.swift /Users/Roxi/Desktop/LaraMobile/LaraMobile/ViewController.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/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/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 /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/OpenGLES.framework/Headers/OpenGLES.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/CoreData.framework/Headers/CoreData.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImage.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/QuartzCore.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/Security.framework/Headers/Security.apinotes /Users/Roxi/Desktop/LaraMobile/DerivedData/LaraMobile/Build/Intermediates.noindex/LaraMobile.build/Debug-iphonesimulator/LaraMobile.build/Objects-normal/x86_64/ViewController~partial.swiftdoc : /Users/Roxi/Desktop/LaraMobile/LaraMobile/AppDelegate.swift /Users/Roxi/Desktop/LaraMobile/LaraMobile/ViewController.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/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/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 /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/OpenGLES.framework/Headers/OpenGLES.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/CoreData.framework/Headers/CoreData.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImage.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/QuartzCore.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/Security.framework/Headers/Security.apinotes
D
/* TEST_OUTPUT: --- fail_compilation/fail268.d(12): Error: constructor fail268.test.T!().this constructors are only for class or struct definitions fail_compilation/fail268.d(13): Error: destructor fail268.test.T!().~this destructors are only for class/struct/union definitions, not function test fail_compilation/fail268.d(17): Error: mixin fail268.test.T!() error instantiating --- */ template T() { this(){} // 14G ICE ~this() {} // 14H ICE } void test() { mixin T!(); }
D
void main() { import std.stdio : writeln; int[] test = [3, 9, 11, 7, 2, 76, 90, 6]; test.writeln(); writeln("First element: ", test[0]); writeln("Last element: ", test[$ - 1]); writeln("Exclude the first two elements: ", test[2 .. $]); writeln("Slices are views on the memory: "); auto const test2 = test; auto const test3 = test.dup; test[] += 1; // increment each element by 1 test.writeln; test2.writeln; test3.writeln; assert(test[2 .. 2].length == 0); }
D
module schemed.object; @safe: /// symbol: 'a struct Atom { string name; string toString() { return name; } } /// proper list: (a b c) struct _List(T) { T car; _List!T* cdr; this(T[] values...) { if (values.length == 0) return; this.car = values[0]; if (values.length < 1) return; this.cdr = new typeof(this)(values[1 .. $]); } T front() { return this.car; } void popFront() { this.car = this.cdr.car; this.cdr = this.cdr.cdr; } bool empty() { return this.car == null; } auto save() { return this; } // NOTE: this trusted is need for text(*x) @trusted string toString() { import std.conv : text, to; if (this.empty) return "()"; string ret = "("; foreach (x; this) { // NOTE: don't know why I need this... static if (__traits(compiles, text(*x))) { ret ~= text(*x) ~ " "; } else { ret ~= text(x) ~ " "; } } return ret[0 .. $-1] ~ ")"; } } /// i.e., improper list: (a b . c) struct _DottedList(T) { _List!T list; T tail; // NOTE: this trusted is need for text(*x) @trusted string toString() { import std.conv : text; static if (__traits(compiles, text(*tail))) { auto s = text(*tail); } else { auto s = text(tail); } return list.toString[0 .. $-1] ~ " . " ~ s ~ ")"; } } /// string wrapper struct String { string data; string toString() { import std.string : replace; return "\"" ~ this.data .replace("\b", "\\b") .replace("\f", "\\f") .replace("\n", "\\n") .replace("\r", "\\r") .replace("\t", "\\t") ~ "\""; } } /// bool wrapper struct Bool { bool data; alias data this; string toString() { return data ? "#t" : "#f"; } } alias Integer = long; alias Float = double; version (USE_SUMTYPE) { import sumtype : SumType, This; alias SumT = SumType; } else { import std.variant : Algebraic, This; alias SumT = Algebraic; } alias LispVal = SumT!( Atom, _List!(This*), _DottedList!(This*), Integer, Float, String, Bool); alias List = _List!(LispVal*); alias DottedList = _DottedList!(LispVal*); version (USE_SUMTYPE) unittest { import sumtype; import std.traits; alias T = SumType!(int, This*); static assert(isCopyable!T); static assert(isCopyable!LispVal); }
D
/** Standard I/O streams Copyright: © 2014 Sönke Ludwig License: Subject to the terms of the MIT license, as written in the included LICENSE.txt file. Authors: Sönke Ludwig, Eric Cornelius */ module vibe.stream.stdio; import vibe.core.core; import vibe.core.log; import vibe.core.stream; import vibe.stream.taskpipe; import std.stdio; import core.thread; import std.exception; class StdFileStream : ConnectionStream { private { std.stdio.File m_file; TaskPipe m_readPipe; TaskPipe m_writePipe; Thread m_readThread; Thread m_writeThread; } this(bool read, bool write) { if (read) m_readPipe = new TaskPipe; if (write) m_writePipe = new TaskPipe; } void setup(std.stdio.File file) { m_file = file; if (m_readPipe) { m_readThread = new Thread(&readThreadFunc); m_readThread.name = "StdFileStream reader"; m_readThread.start(); } if (m_writePipe) { m_writeThread = new Thread(&writeThreadFunc); m_writeThread.name = "StdFileStream writer"; m_writeThread.start(); } } @property std.stdio.File stdFile() { return m_file; } override @property bool empty() { enforceReadable(); return m_readPipe.empty; } override @property ulong leastSize() { enforceReadable(); return m_readPipe.leastSize; } override @property bool dataAvailableForRead() { enforceReadable(); return m_readPipe.dataAvailableForRead; } override @property bool connected() const { return m_readPipe.connected; } override void close() { m_writePipe.close(); } override bool waitForData(Duration timeout) { return m_readPipe.waitForData(timeout); } override const(ubyte)[] peek() { enforceReadable(); return m_readPipe.peek(); } override size_t read(scope ubyte[] dst, IOMode mode) { enforceReadable(); return m_readPipe.read(dst, mode); } alias read = ConnectionStream.read; static if (is(typeof(.OutputStream.outputStreamVersion)) && .OutputStream.outputStreamVersion > 1) { override size_t write(scope const(ubyte)[] bytes_, IOMode mode) { return doWrite(bytes_, mode); } } else { override size_t write(in ubyte[] bytes_, IOMode mode) { return doWrite(bytes_, mode); } } alias write = ConnectionStream.write; private size_t doWrite(scope const(ubyte)[] bytes_, IOMode mode) @safe { enforceWritable(); return m_writePipe.write(bytes_, mode); } override void flush() { enforceWritable(); m_writePipe.flush(); } override void finalize() { enforceWritable(); if (!m_writePipe.connected) return; flush(); m_writePipe.finalize(); } void enforceReadable() @safe { enforce(m_readPipe, "Stream is not readable!"); } void enforceWritable() @safe { enforce(m_writePipe, "Stream is not writable!"); } private void readThreadFunc() { bool loop_flag = false; runTask(() nothrow { ubyte[1] buf; try while (!m_file.eof) { auto data = m_file.rawRead(buf); if (!data.length) break; m_readPipe.write(data, IOMode.all); vibe.core.core.yield(); } catch (Exception e) logException!(LogLevel.diagnostic)(e, "Failed to read from File"); try { if (m_file.isOpen) m_file.close(); } catch (Exception e) logException(e, "Failed to close File"); try m_readPipe.finalize(); catch (Exception e) assert(false, e.msg); if (loop_flag) exitEventLoop(); else loop_flag = true; }); if (!loop_flag) { loop_flag = true; runEventLoop(); } } private void writeThreadFunc() { import std.algorithm : min; bool loop_flag = false; runTask(() nothrow { ubyte[1024] buf; try while (m_file.isOpen && !m_writePipe.empty) { auto len = min(buf.length, m_writePipe.leastSize); if (!len) break; m_writePipe.read(buf[0 .. len], IOMode.all); m_file.rawWrite(buf[0 .. len]); vibe.core.core.yield(); } catch (Exception e) logException!(LogLevel.diagnostic)(e, "Failed to write to File"); try { if (m_file.isOpen) m_file.close(); } catch (Exception e) logException(e, "Failed to close File"); if (loop_flag) exitEventLoop(); else loop_flag = true; }); if (!loop_flag) { loop_flag = true; runEventLoop(); } } } /** OutputStream that writes to stdout */ final class StdoutStream : StdFileStream { this() { super(false, true); setup(stdout); } } /** OutputStream that writes to stderr */ final class StderrStream : StdFileStream { this() { super(false, true); setup(stderr); } } /** InputStream that reads from stdin */ final class StdinStream : StdFileStream { this() { super(true, false); setup(stdin); } }
D
import core.stdc.stdio : fprintf, printf, stderr; void test(string comp = "==", A, B)(A a, B b, string msg, size_t line = __LINE__) { int ret = () { import core.exception : AssertError; try { assert(mixin("a " ~ comp ~ " b")); } catch(AssertError e) { // don't use assert here for better debugging if (e.msg != msg) { printf("Line %d: '%.*s' != '%.*s'\n", line, e.msg.length, e.msg.ptr, msg.length, msg.ptr); return 1; } return 0; } printf("Line %d: No assert triggered\n", line); return 1; }(); // don't use assert here for better debugging if (ret != 0) { import core.stdc.stdlib : exit; exit(1); } } void testIntegers()() { test(1, 2, "1 != 2"); test(-10, 8, "-10 != 8"); test(byte.min, byte.max, "-128 != 127"); test(ubyte.min, ubyte.max, "0 != 255"); test(short.min, short.max, "-32768 != 32767"); test(ushort.min, ushort.max, "0 != 65535"); test(int.min, int.max, "-2147483648 != 2147483647"); test(uint.min, uint.max, "0 != 4294967295"); test(long.min, long.max, "-9223372036854775808 != 9223372036854775807"); test(ulong.min, ulong.max, "0 != 18446744073709551615"); int testFun() { return 1; } test(testFun(), 2, "1 != 2"); } void testIntegerComparisons()() { test!"!="(2, 2, "2 == 2"); test!"<"(2, 1, "2 >= 1"); test!"<="(2, 1, "2 > 1"); test!">"(1, 2, "1 <= 2"); test!">="(1, 2, "1 < 2"); } void testFloatingPoint()() { test(1.5, 2.5, "1.5 != 2.5"); test(float.max, -float.max, "3.40282e+38 != -3.40282e+38"); test(double.max, -double.max, "1.79769e+308 != -1.79769e+308"); } void testStrings() { test("foo", "bar", `"foo" != "bar"`); test("", "bar", `"" != "bar"`); char[] dlang = "dlang".dup; const(char)[] rust = "rust"; test(dlang, rust, `"dlang" != "rust"`); } void testToString()() { class Foo { this(string payload) { this.payload = payload; } string payload; override string toString() { return "Foo(" ~ payload ~ ")"; } } test(new Foo("a"), new Foo("b"), "Foo(a) != Foo(b)"); } void testArray()() { test([1], [0], "[1] != [0]"); test([1, 2, 3], [0], "[1, 2, 3] != [0]"); // test with long arrays int[] arr; foreach (i; 0 .. 100) arr ~= i; test(arr, [0], "[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, ...] != [0]"); } void testStruct()() { struct S { int s; } test(S(0), S(1), "S(0) !is S(1)"); } void testAA()() { test([1:"one"], [2: "two"], `[1: "one"] != [2: "two"]`); test!"in"(1, [2: 3], "1 !in [2: 3]"); test!"in"("foo", ["bar": true], `"foo" !in ["bar": true]`); } void main() { testIntegers(); testIntegerComparisons(); testFloatingPoint(); testStrings(); testToString(); testArray(); testStruct(); testAA(); fprintf(stderr, "success.\n"); }
D
/* Copyright (c) 2011-2020 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. */ /** * Tuple + struct hybrid * * Description: * This template can be used to construct data types on-the-fly * and return them from functions, which cannot be done with pure tuples. * One possible use case for such types is returning result and error message * from function instead of throwing an exception. * * Copyright: Timur Gafarov 2011-2020. * License: $(LINK2 htpps://boost.org/LICENSE_1_0.txt, Boost License 1.0). * Authors: Timur Gafarov */ module dlib.core.compound; /** * A struct that consists of a tuple T. Allows square bracket access to the members of a tuple */ struct Compound(T...) { T tuple; alias tuple this; } /** * Returns a Compound consisting of args */ Compound!(T) compound(T...)(T args) { return Compound!(T)(args); } /// unittest { auto c = compound(true, 0.5f, "hello"); assert(c[0] == true); assert(c[1] == 0.5f); assert(c[2] == "hello"); }
D
/Users/macosx/Desktop/TestNetWorkLayer/build/Pods.build/Debug-iphonesimulator/Quick.build/Objects-normal/x86_64/ExampleMetadata.o : /Users/macosx/Desktop/TestNetWorkLayer/Pods/Quick/Sources/Quick/DSL/World+DSL.swift /Users/macosx/Desktop/TestNetWorkLayer/Pods/Quick/Sources/Quick/DSL/DSL.swift /Users/macosx/Desktop/TestNetWorkLayer/Pods/Quick/Sources/Quick/ExampleMetadata.swift /Users/macosx/Desktop/TestNetWorkLayer/Pods/Quick/Sources/Quick/World.swift /Users/macosx/Desktop/TestNetWorkLayer/Pods/Quick/Sources/Quick/NSBundle+CurrentTestBundle.swift /Users/macosx/Desktop/TestNetWorkLayer/Pods/Quick/Sources/Quick/Example.swift /Users/macosx/Desktop/TestNetWorkLayer/Pods/Quick/Sources/Quick/URL+FileName.swift /Users/macosx/Desktop/TestNetWorkLayer/Pods/Quick/Sources/Quick/Hooks/HooksPhase.swift /Users/macosx/Desktop/TestNetWorkLayer/Pods/Quick/Sources/Quick/Callsite.swift /Users/macosx/Desktop/TestNetWorkLayer/Pods/Quick/Sources/Quick/QuickTestSuite.swift /Users/macosx/Desktop/TestNetWorkLayer/Pods/Quick/Sources/Quick/Configuration/Configuration.swift /Users/macosx/Desktop/TestNetWorkLayer/Pods/Quick/Sources/Quick/Configuration/QuickConfiguration.swift /Users/macosx/Desktop/TestNetWorkLayer/Pods/Quick/Sources/Quick/ExampleGroup.swift /Users/macosx/Desktop/TestNetWorkLayer/Pods/Quick/Sources/Quick/QuickSelectedTestSuiteBuilder.swift /Users/macosx/Desktop/TestNetWorkLayer/Pods/Quick/Sources/Quick/String+C99ExtendedIdentifier.swift /Users/macosx/Desktop/TestNetWorkLayer/Pods/Quick/Sources/Quick/Filter.swift /Users/macosx/Desktop/TestNetWorkLayer/Pods/Quick/Sources/Quick/Behavior.swift /Users/macosx/Desktop/TestNetWorkLayer/Pods/Quick/Sources/Quick/Hooks/Closures.swift /Users/macosx/Desktop/TestNetWorkLayer/Pods/Quick/Sources/Quick/Hooks/ExampleHooks.swift /Users/macosx/Desktop/TestNetWorkLayer/Pods/Quick/Sources/Quick/Hooks/SuiteHooks.swift /Users/macosx/Desktop/TestNetWorkLayer/Pods/Quick/Sources/Quick/ErrorUtility.swift /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/usr/lib/swift/ObjectiveC.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/usr/lib/swift/CoreImage.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/usr/lib/swift/QuartzCore.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/usr/lib/swift/Dispatch.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/usr/lib/swift/Metal.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/usr/lib/swift/Darwin.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/usr/lib/swift/Foundation.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/usr/lib/swift/CoreFoundation.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/usr/lib/swift/CoreGraphics.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/usr/lib/swift/Swift.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/usr/lib/swift/UIKit.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/usr/lib/swift/SwiftOnoneSupport.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/System/Library/Frameworks/Combine.framework/Modules/Combine.swiftmodule/x86_64-apple-ios-simulator.swiftinterface /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/macosx/Desktop/TestNetWorkLayer/Pods/Quick/Sources/QuickObjectiveC/DSL/QCKDSL.h /Users/macosx/Desktop/TestNetWorkLayer/Pods/Target\ Support\ Files/Quick/Quick-umbrella.h /Users/macosx/Desktop/TestNetWorkLayer/Pods/Quick/Sources/QuickObjectiveC/QuickSpec.h /Users/macosx/Desktop/TestNetWorkLayer/Pods/Quick/Sources/QuickObjectiveC/Quick.h /Users/macosx/Desktop/TestNetWorkLayer/Pods/Quick/Sources/QuickObjectiveC/Configuration/QuickConfiguration.h /Users/macosx/Desktop/TestNetWorkLayer/build/Pods.build/Debug-iphonesimulator/Quick.build/unextended-module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/Frameworks/XCTest.framework/Modules/module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/System/Library/Frameworks/OpenGLES.framework/Headers/OpenGLES.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImage.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.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.2.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/System/Library/Frameworks/UserNotifications.framework/Headers/UserNotifications.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/Frameworks/XCTest.framework/Headers/XCTest.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/System/Library/Frameworks/Security.framework/Headers/Security.apinotes /Users/macosx/Desktop/TestNetWorkLayer/build/Pods.build/Debug-iphonesimulator/Quick.build/Objects-normal/x86_64/ExampleMetadata~partial.swiftmodule : /Users/macosx/Desktop/TestNetWorkLayer/Pods/Quick/Sources/Quick/DSL/World+DSL.swift /Users/macosx/Desktop/TestNetWorkLayer/Pods/Quick/Sources/Quick/DSL/DSL.swift /Users/macosx/Desktop/TestNetWorkLayer/Pods/Quick/Sources/Quick/ExampleMetadata.swift /Users/macosx/Desktop/TestNetWorkLayer/Pods/Quick/Sources/Quick/World.swift /Users/macosx/Desktop/TestNetWorkLayer/Pods/Quick/Sources/Quick/NSBundle+CurrentTestBundle.swift /Users/macosx/Desktop/TestNetWorkLayer/Pods/Quick/Sources/Quick/Example.swift /Users/macosx/Desktop/TestNetWorkLayer/Pods/Quick/Sources/Quick/URL+FileName.swift /Users/macosx/Desktop/TestNetWorkLayer/Pods/Quick/Sources/Quick/Hooks/HooksPhase.swift /Users/macosx/Desktop/TestNetWorkLayer/Pods/Quick/Sources/Quick/Callsite.swift /Users/macosx/Desktop/TestNetWorkLayer/Pods/Quick/Sources/Quick/QuickTestSuite.swift /Users/macosx/Desktop/TestNetWorkLayer/Pods/Quick/Sources/Quick/Configuration/Configuration.swift /Users/macosx/Desktop/TestNetWorkLayer/Pods/Quick/Sources/Quick/Configuration/QuickConfiguration.swift /Users/macosx/Desktop/TestNetWorkLayer/Pods/Quick/Sources/Quick/ExampleGroup.swift /Users/macosx/Desktop/TestNetWorkLayer/Pods/Quick/Sources/Quick/QuickSelectedTestSuiteBuilder.swift /Users/macosx/Desktop/TestNetWorkLayer/Pods/Quick/Sources/Quick/String+C99ExtendedIdentifier.swift /Users/macosx/Desktop/TestNetWorkLayer/Pods/Quick/Sources/Quick/Filter.swift /Users/macosx/Desktop/TestNetWorkLayer/Pods/Quick/Sources/Quick/Behavior.swift /Users/macosx/Desktop/TestNetWorkLayer/Pods/Quick/Sources/Quick/Hooks/Closures.swift /Users/macosx/Desktop/TestNetWorkLayer/Pods/Quick/Sources/Quick/Hooks/ExampleHooks.swift /Users/macosx/Desktop/TestNetWorkLayer/Pods/Quick/Sources/Quick/Hooks/SuiteHooks.swift /Users/macosx/Desktop/TestNetWorkLayer/Pods/Quick/Sources/Quick/ErrorUtility.swift /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/usr/lib/swift/ObjectiveC.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/usr/lib/swift/CoreImage.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/usr/lib/swift/QuartzCore.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/usr/lib/swift/Dispatch.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/usr/lib/swift/Metal.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/usr/lib/swift/Darwin.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/usr/lib/swift/Foundation.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/usr/lib/swift/CoreFoundation.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/usr/lib/swift/CoreGraphics.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/usr/lib/swift/Swift.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/usr/lib/swift/UIKit.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/usr/lib/swift/SwiftOnoneSupport.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/System/Library/Frameworks/Combine.framework/Modules/Combine.swiftmodule/x86_64-apple-ios-simulator.swiftinterface /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/macosx/Desktop/TestNetWorkLayer/Pods/Quick/Sources/QuickObjectiveC/DSL/QCKDSL.h /Users/macosx/Desktop/TestNetWorkLayer/Pods/Target\ Support\ Files/Quick/Quick-umbrella.h /Users/macosx/Desktop/TestNetWorkLayer/Pods/Quick/Sources/QuickObjectiveC/QuickSpec.h /Users/macosx/Desktop/TestNetWorkLayer/Pods/Quick/Sources/QuickObjectiveC/Quick.h /Users/macosx/Desktop/TestNetWorkLayer/Pods/Quick/Sources/QuickObjectiveC/Configuration/QuickConfiguration.h /Users/macosx/Desktop/TestNetWorkLayer/build/Pods.build/Debug-iphonesimulator/Quick.build/unextended-module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/Frameworks/XCTest.framework/Modules/module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/System/Library/Frameworks/OpenGLES.framework/Headers/OpenGLES.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImage.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.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.2.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/System/Library/Frameworks/UserNotifications.framework/Headers/UserNotifications.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/Frameworks/XCTest.framework/Headers/XCTest.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/System/Library/Frameworks/Security.framework/Headers/Security.apinotes /Users/macosx/Desktop/TestNetWorkLayer/build/Pods.build/Debug-iphonesimulator/Quick.build/Objects-normal/x86_64/ExampleMetadata~partial.swiftdoc : /Users/macosx/Desktop/TestNetWorkLayer/Pods/Quick/Sources/Quick/DSL/World+DSL.swift /Users/macosx/Desktop/TestNetWorkLayer/Pods/Quick/Sources/Quick/DSL/DSL.swift /Users/macosx/Desktop/TestNetWorkLayer/Pods/Quick/Sources/Quick/ExampleMetadata.swift /Users/macosx/Desktop/TestNetWorkLayer/Pods/Quick/Sources/Quick/World.swift /Users/macosx/Desktop/TestNetWorkLayer/Pods/Quick/Sources/Quick/NSBundle+CurrentTestBundle.swift /Users/macosx/Desktop/TestNetWorkLayer/Pods/Quick/Sources/Quick/Example.swift /Users/macosx/Desktop/TestNetWorkLayer/Pods/Quick/Sources/Quick/URL+FileName.swift /Users/macosx/Desktop/TestNetWorkLayer/Pods/Quick/Sources/Quick/Hooks/HooksPhase.swift /Users/macosx/Desktop/TestNetWorkLayer/Pods/Quick/Sources/Quick/Callsite.swift /Users/macosx/Desktop/TestNetWorkLayer/Pods/Quick/Sources/Quick/QuickTestSuite.swift /Users/macosx/Desktop/TestNetWorkLayer/Pods/Quick/Sources/Quick/Configuration/Configuration.swift /Users/macosx/Desktop/TestNetWorkLayer/Pods/Quick/Sources/Quick/Configuration/QuickConfiguration.swift /Users/macosx/Desktop/TestNetWorkLayer/Pods/Quick/Sources/Quick/ExampleGroup.swift /Users/macosx/Desktop/TestNetWorkLayer/Pods/Quick/Sources/Quick/QuickSelectedTestSuiteBuilder.swift /Users/macosx/Desktop/TestNetWorkLayer/Pods/Quick/Sources/Quick/String+C99ExtendedIdentifier.swift /Users/macosx/Desktop/TestNetWorkLayer/Pods/Quick/Sources/Quick/Filter.swift /Users/macosx/Desktop/TestNetWorkLayer/Pods/Quick/Sources/Quick/Behavior.swift /Users/macosx/Desktop/TestNetWorkLayer/Pods/Quick/Sources/Quick/Hooks/Closures.swift /Users/macosx/Desktop/TestNetWorkLayer/Pods/Quick/Sources/Quick/Hooks/ExampleHooks.swift /Users/macosx/Desktop/TestNetWorkLayer/Pods/Quick/Sources/Quick/Hooks/SuiteHooks.swift /Users/macosx/Desktop/TestNetWorkLayer/Pods/Quick/Sources/Quick/ErrorUtility.swift /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/usr/lib/swift/ObjectiveC.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/usr/lib/swift/CoreImage.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/usr/lib/swift/QuartzCore.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/usr/lib/swift/Dispatch.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/usr/lib/swift/Metal.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/usr/lib/swift/Darwin.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/usr/lib/swift/Foundation.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/usr/lib/swift/CoreFoundation.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/usr/lib/swift/CoreGraphics.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/usr/lib/swift/Swift.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/usr/lib/swift/UIKit.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/usr/lib/swift/SwiftOnoneSupport.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/System/Library/Frameworks/Combine.framework/Modules/Combine.swiftmodule/x86_64-apple-ios-simulator.swiftinterface /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/macosx/Desktop/TestNetWorkLayer/Pods/Quick/Sources/QuickObjectiveC/DSL/QCKDSL.h /Users/macosx/Desktop/TestNetWorkLayer/Pods/Target\ Support\ Files/Quick/Quick-umbrella.h /Users/macosx/Desktop/TestNetWorkLayer/Pods/Quick/Sources/QuickObjectiveC/QuickSpec.h /Users/macosx/Desktop/TestNetWorkLayer/Pods/Quick/Sources/QuickObjectiveC/Quick.h /Users/macosx/Desktop/TestNetWorkLayer/Pods/Quick/Sources/QuickObjectiveC/Configuration/QuickConfiguration.h /Users/macosx/Desktop/TestNetWorkLayer/build/Pods.build/Debug-iphonesimulator/Quick.build/unextended-module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/Frameworks/XCTest.framework/Modules/module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/System/Library/Frameworks/OpenGLES.framework/Headers/OpenGLES.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImage.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.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.2.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/System/Library/Frameworks/UserNotifications.framework/Headers/UserNotifications.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/Frameworks/XCTest.framework/Headers/XCTest.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/System/Library/Frameworks/Security.framework/Headers/Security.apinotes
D
/** * Author: Aramande <aramande@hackular.com> * Version: 0.2 */ module dhe.window; import std.stdio; import std.string; import derelict.sdl.sdl; import derelict.sdl.image; /** * Represents a window in which your game runs, you can only have one instance. */ final class Window { private: static Window self; static bool inited; private SDL_Surface* window; private SDL_Surface* icon; /** * Generates an SDL window using the height, width and depth. * * Params: * w = width of the window * h = height of the window * d = colorbyte depthcount * flags = bitsensitive integer for window settings */ this(int w, int h, int d, int flags){ window = SDL_SetVideoMode(w, h, d, flags); } public: /** * Initializes a window with parameter options, this should be the first function called. * If window was already initialized, this function will just return the previous window. * Enables init() to run if succeeded and returns the instance, and returns null otherwise * * Params: * w = width of the window * h = height of the window * d = colorbyte depthcount * flags = bitsensitive integer for window settings * Returns: The instance of Window. * See_Also: addFlags(int), resize(int, int), init() */ static Window init(int w, int h, int d, int flags){ if (self is null) self = new Window(w, h, d, flags); return self; } /** * Cannot run before window was initialized, see init(int, int, int, int). * * Returns: The instance of Window. * See_Also: init(int, int, int, int) */ static Window init(){ return self; } /** * Get the surface of the Window. * * Returns: The SDL_Surface of window. */ SDL_Surface* getSurface() { return window; } /** * Set the title of the Window. * * Params: * title = title of the Window. */ void setTitle(string title) { SDL_WM_SetCaption(toStringz(title), null); } /** * Set the icon of the Window. * * Params: * icon = path to the icon. */ void setIcon(string path) { icon = IMG_Load(toStringz(path)); SDL_WM_SetIcon(icon, null); } /** */ void resize(int x, int y){ } /** Add flags to the window settings. */ void addFlags(int flags){ } }
D
// ************************************************** // EXIT // ************************************************** instance DIA_Fortuno_EXIT (C_INFO) { npc = NOV_1357_Fortuno; nr = 999; condition = DIA_Fortuno_EXIT_Condition; information = DIA_Fortuno_EXIT_Info; permanent = 1; description = DIALOG_ENDE; }; FUNC int DIA_Fortuno_EXIT_Condition() { return 1; }; FUNC VOID DIA_Fortuno_EXIT_Info() { AI_StopProcessInfos ( self ); }; // ************************************************** // Erste Begrüssung // ************************************************** instance DIA_Fortuno_Greet (C_INFO) { npc = NOV_1357_Fortuno; nr = 1; condition = DIA_Fortuno_Greet_Condition; information = DIA_Fortuno_Greet_Info; permanent = 0; important = 1; }; FUNC int DIA_Fortuno_Greet_Condition() { if (Npc_GetDistToNpc(self,other)<=ZivilAnquatschDist) { return 1; }; }; FUNC VOID DIA_Fortuno_Greet_Info() { AI_Output (self, other,"DIA_Fortuno_Greet_05_00"); //Come closer! Every newcomer to this place receives a gift of welcome! }; // ************************************************** // Was ist das Geschenk? // ************************************************** var int Fortuno_RationDay; // ************************************************** instance DIA_Fortuno_GetGeschenk (C_INFO) { npc = NOV_1357_Fortuno; nr = 1; condition = DIA_Fortuno_GetGeschenk_Condition; information = DIA_Fortuno_GetGeschenk_Info; permanent = 0; description = "What have you got for me?"; }; FUNC int DIA_Fortuno_GetGeschenk_Condition() { return 1; }; FUNC VOID DIA_Fortuno_GetGeschenk_Info() { AI_Output (other, self,"DIA_Fortuno_GetGeschenk_15_00"); //What have you got for me? AI_Output (self, other,"DIA_Fortuno_GetGeschenk_05_01"); //Here, take three rolls of swampweed. It's Northern Dark. Good stuff. AI_Output (self, other,"DIA_Fortuno_GetGeschenk_05_02"); //You can have more of it every day, but if you want more than your daily ration, you need to pay. AI_Output (self, other,"DIA_Fortuno_GetGeschenk_05_03"); //If you find berries and herbs on the paths between the camps, you can bring them to me. I'll buy them off you. CreateInvItems(self, itmijoint_2, 3); B_GiveInvItems(self, other, itmijoint_2, 3); Fortuno_RationDay = Wld_GetDay(); Log_CreateTopic (GE_TraderPSI, LOG_NOTE); B_LogEntry (GE_TraderPSI,"Fortuno deals with herbs underneath the alchemy lab."); }; // ************************************************** // Tägliche Ration // ************************************************** instance DIA_Fortuno_DailyRation (C_INFO) { npc = NOV_1357_Fortuno; nr = 3; condition = DIA_Fortuno_DailyRation_Condition; information = DIA_Fortuno_DailyRation_Info; permanent = 1; description = "I've come to collect my daily ration."; }; FUNC int DIA_Fortuno_DailyRation_Condition() { if (Npc_KnowsInfo(hero,DIA_Fortuno_GetGeschenk)) { return 1; }; }; FUNC VOID DIA_Fortuno_DailyRation_Info() { AI_Output (other, self,"DIA_Fortuno_DailyRation_15_00"); //I've come to collect my daily ration. if (Fortuno_RationDay!=Wld_GetDay()) { AI_Output (self, other,"DIA_Fortuno_DailyRation_05_01"); //Here, take it. Three of the Northern Dark - but don't smoke them all at once. CreateInvItems(self, itmijoint_2, 3); B_GiveInvItems(self, other, itmijoint_2, 3); Fortuno_RationDay = Wld_GetDay(); } else { AI_Output (self, other,"DIA_Fortuno_DailyRation_05_02"); //You've already had your daily ration. If you want more, come back tomorrow or buy something. }; }; // ************************************************** // TRADE // ************************************************** instance DIA_Fortuno_BuyJoints (C_INFO) { npc = NOV_1357_Fortuno; nr = 4; condition = DIA_Fortuno_BuyJoints_Condition; information = DIA_Fortuno_BuyJoints_Info; permanent = 1; description = "I want to trade."; Trade = 1; }; FUNC int DIA_Fortuno_BuyJoints_Condition() { if (Npc_KnowsInfo(hero,DIA_Fortuno_GetGeschenk)) { return 1; }; }; FUNC VOID DIA_Fortuno_BuyJoints_Info() { AI_Output (other, self,"DIA_Fortuno_BuyJoints_15_00"); //I want to trade. AI_Output (self, other,"DIA_Fortuno_BuyJoints_05_01"); //What do you want from me? Or do you want to sell something? };
D
module dwt.internal.mozilla.nsISHistory; import dwt.internal.mozilla.Common; import dwt.internal.mozilla.nsID; import dwt.internal.mozilla.nsISupports; import dwt.internal.mozilla.nsIHistoryEntry; import dwt.internal.mozilla.nsISHistoryListener; import dwt.internal.mozilla.nsISimpleEnumerator; const char[] NS_ISHISTORY_IID_STR = "7294fe9b-14d8-11d5-9882-00c04fa02f40"; const nsIID NS_ISHISTORY_IID= {0x7294fe9b, 0x14d8, 0x11d5, [ 0x98, 0x82, 0x00, 0xc0, 0x4f, 0xa0, 0x2f, 0x40 ]}; interface nsISHistory : nsISupports { static const char[] IID_STR = NS_ISHISTORY_IID_STR; static const nsIID IID = NS_ISHISTORY_IID; extern(System): nsresult GetCount(PRInt32 *aCount); nsresult GetIndex(PRInt32 *aIndex); nsresult GetMaxLength(PRInt32 *aMaxLength); nsresult SetMaxLength(PRInt32 aMaxLength); nsresult GetEntryAtIndex(PRInt32 index, PRBool modifyIndex, nsIHistoryEntry *_retval); nsresult PurgeHistory(PRInt32 numEntries); nsresult AddSHistoryListener(nsISHistoryListener aListener); nsresult RemoveSHistoryListener(nsISHistoryListener aListener); nsresult GetSHistoryEnumerator(nsISimpleEnumerator *aSHistoryEnumerator); }
D
module hunt.framework.auth.SimpleUserService; import hunt.framework.auth.UserDetails; import hunt.framework.auth.UserService; import hunt.framework.config.AuthUserConfig; import hunt.framework.provider.ServiceProvider; import hunt.logging; import std.digest.sha; /** * Retrieve user details from a local config file. */ class SimpleUserService : UserService { private AuthUserConfig _userConfig; this() { _userConfig = serviceContainer.resolve!(AuthUserConfig)(); } private AuthUserConfig.Role getRole(string name) { foreach(AuthUserConfig.Role r; _userConfig.roles) { if(r.name == name) return r; } return null; } UserDetails authenticate(string name, string password) { foreach(AuthUserConfig.User user; _userConfig.users) { if(user.name != name || user.password != password) continue; UserDetails userDetails = new UserDetails(); userDetails.name = name; // userDetails.password = password; userDetails.salt = getSalt(name, user.password); // roles foreach(string roleName; user.roles) { AuthUserConfig.Role role = getRole(roleName); if(role !is null) { userDetails.roles ~= role.name; userDetails.permissions ~= role.permissions; } else { warning("The role is not defined: %s", roleName); } } return userDetails; } return null; } UserDetails getByName(string name) { foreach(AuthUserConfig.User user; _userConfig.users) { if(user.name != name) continue; UserDetails userDetails = new UserDetails(); userDetails.name = name; // userDetails.password = user.password; userDetails.salt = getSalt(name, user.password); // roles foreach(string roleName; user.roles) { AuthUserConfig.Role role = getRole(roleName); if(role !is null) { userDetails.roles ~= role.name; userDetails.permissions ~= role.permissions; } else { warning("The role is not defined: %s", roleName); } } return userDetails; } return null; } UserDetails getById(ulong id) { return null; } string getSalt(string name, string password) { string userSalt = name; auto sha256 = new SHA256Digest(); ubyte[] hash256 = sha256.digest(password~userSalt); return toHexString(hash256); } }
D
module agj.ui; public import agj.ui.utils: lighten; public import agj.ui.mouse: MouseUI; public import agj.ui.guipanel: GUIPanel;
D
instance DIA_RAOUL_EXIT(C_INFO) { npc = sld_822_raoul; nr = 999; condition = dia_raoul_exit_condition; information = dia_raoul_exit_info; permanent = TRUE; description = DIALOG_ENDE; }; func int dia_raoul_exit_condition() { if(KAPITEL < 3) { return TRUE; }; }; func void dia_raoul_exit_info() { AI_StopProcessInfos(self); }; instance DIA_RAOUL_NOSENTENZA(C_INFO) { npc = sld_822_raoul; nr = 1; condition = dia_raoul_nosentenza_condition; information = dia_raoul_nosentenza_info; permanent = FALSE; important = TRUE; }; func int dia_raoul_nosentenza_condition() { if(!Npc_KnowsInfo(other,dia_sentenza_hello) && (other.guild == GIL_NONE)) { return TRUE; }; }; func void dia_raoul_nosentenza_info() { AI_Output(self,other,"DIA_Raoul_NoSentenza_01_00"); //Минутку, приятель! AI_Output(self,other,"DIA_Raoul_NoSentenza_01_01"); //Я не видел, чтобы Сентенза обыскивал тебя. if(Hlp_IsValidNpc(sentenza) && !c_npcisdown(sentenza)) { AI_Output(self,other,"DIA_Raoul_NoSentenza_01_02"); //СЕНТЕНЗА! Иди сюда! AI_Output(self,other,"DIA_Raoul_NoSentenza_01_03"); //(фальшиво вежливо) Подожди секундочку, сейчас он подойдет! AI_Output(self,other,"DIA_Raoul_NoSentenza_01_04"); //И тогда тебя ждет неприятный сюрприз! b_attack(sentenza,other,AR_NONE,0); } else { AI_Output(self,other,"DIA_Raoul_NoSentenza_01_05"); //Где же он? А, ладно, не важно, тебе повезло... }; AI_StopProcessInfos(self); }; instance DIA_RAOUL_HELLO(C_INFO) { npc = sld_822_raoul; nr = 1; condition = dia_raoul_hello_condition; information = dia_raoul_hello_info; permanent = TRUE; important = TRUE; }; func int dia_raoul_hello_condition() { if((other.guild == GIL_NONE) && Npc_IsInState(self,zs_talk)) { return TRUE; }; }; func void dia_raoul_hello_info() { if(self.aivar[AIV_TALKEDTOPLAYER] == FALSE) { AI_Output(self,other,"DIA_Raoul_Hello_01_00"); //(скучающе) Чего тебе нужно? } else { AI_Output(self,other,"DIA_Raoul_Hello_01_01"); //(раздраженно) Что тебе нужно на этот раз? }; }; var int raoul_gesagt; instance DIA_RAOUL_PERMNONE(C_INFO) { npc = sld_822_raoul; nr = 1; condition = dia_raoul_permnone_condition; information = dia_raoul_permnone_info; permanent = TRUE; description = "Я хочу осмотреться на этой ферме!"; }; func int dia_raoul_permnone_condition() { if(other.guild == GIL_NONE) { return TRUE; }; }; func void dia_raoul_permnone_info() { if(RAOUL_GESAGT == FALSE) { AI_Output(other,self,"DIA_Raoul_PERMNone_15_00"); //Я хочу осмотреться на этой ферме! AI_Output(self,other,"DIA_Raoul_PERMNone_01_01"); //Не заходи в здание слева. Там Сильвио. Он сейчас не в самом лучшем расположении духа. AI_Output(self,other,"DIA_Raoul_PERMNone_01_02"); //Если он увидит слабака, не работающего на этой ферме, он может решить выместить на нем свою злобу. RAOUL_GESAGT = TRUE; } else { AI_Output(self,other,"DIA_Raoul_PERMNone_01_03"); //Удачи! AI_StopProcessInfos(self); }; }; instance DIA_RAOUL_WANNAJOIN(C_INFO) { npc = sld_822_raoul; nr = 2; condition = dia_raoul_wannajoin_condition; information = dia_raoul_wannajoin_info; permanent = FALSE; description = "Я хочу присоединиться к Ли!"; }; func int dia_raoul_wannajoin_condition() { if(other.guild == GIL_NONE) { return TRUE; }; }; func void dia_raoul_wannajoin_info() { AI_Output(other,self,"DIA_Raoul_WannaJoin_15_00"); //Я хочу присоединиться к Ли! AI_Output(self,other,"DIA_Raoul_WannaJoin_01_01"); //Если Ли будет продолжать в том же духе, ему скоро некем будет командовать! AI_Output(other,self,"DIA_Raoul_WannaJoin_15_02"); //Что ты хочешь этим сказать? AI_Output(self,other,"DIA_Raoul_WannaJoin_01_03"); //Он хочет, чтобы мы сидели здесь и били баклуши. Иногда приходится задавать взбучку фермерам - и это все. AI_Output(self,other,"DIA_Raoul_WannaJoin_01_04"); //Сильвио всегда говорил, что нападение - это лучшая оборона, и, черт возьми, он прав. }; instance DIA_RAOUL_ABOUTSYLVIO(C_INFO) { npc = sld_822_raoul; nr = 2; condition = dia_raoul_aboutsylvio_condition; information = dia_raoul_aboutsylvio_info; permanent = FALSE; description = "Кто такой Сильвио?"; }; func int dia_raoul_aboutsylvio_condition() { if((RAOUL_GESAGT == TRUE) || Npc_KnowsInfo(other,dia_raoul_wannajoin)) { return TRUE; }; }; func void dia_raoul_aboutsylvio_info() { AI_Output(other,self,"DIA_Raoul_AboutSylvio_15_00"); //Кто такой Сильвио? AI_Output(self,other,"DIA_Raoul_AboutSylvio_01_01"); //Наш следующий предводитель, если тебе интересно мое мнение. Если ты собираешься просить его, чтобы он позволил тебе присоединиться к нашим рядам, забудь об этом! AI_Output(self,other,"DIA_Raoul_AboutSylvio_01_02"); //Судя по твоему виду, ты не подходишь даже для того, чтобы пасти овец. }; instance DIA_RAOUL_STIMME(C_INFO) { npc = sld_822_raoul; nr = 2; condition = dia_raoul_stimme_condition; information = dia_raoul_stimme_info; permanent = FALSE; description = "Я бы хотел стать наемником. Ты не возражаешь?"; }; func int dia_raoul_stimme_condition() { if(self.aivar[AIV_DEFEATEDBYPLAYER] == TRUE) { return TRUE; }; }; func void dia_raoul_stimme_info() { AI_Output(other,self,"DIA_Raoul_Stimme_15_00"); //Я бы хотел стать наемником. Ты не возражаешь? AI_Output(self,other,"DIA_Raoul_Stimme_01_01"); //Ааа, делай, что хочешь... Log_CreateTopic(TOPIC_SLDRESPEKT,LOG_MISSION); Log_SetTopicStatus(TOPIC_SLDRESPEKT,LOG_RUNNING); b_logentry(TOPIC_SLDRESPEKT,"Рауль не возражает против моего вступления в ряды наемников."); }; instance DIA_RAOUL_DUELL(C_INFO) { npc = sld_822_raoul; nr = 2; condition = dia_raoul_duell_condition; information = dia_raoul_duell_info; permanent = TRUE; description = "Я думаю, тебе стоит дать по морде..."; }; func int dia_raoul_duell_condition() { if((RAOUL_GESAGT == TRUE) || Npc_KnowsInfo(other,dia_raoul_aboutsylvio) || Npc_KnowsInfo(other,dia_jarvis_missionko)) { return TRUE; }; }; func void dia_raoul_duell_info() { AI_Output(other,self,"DIA_Raoul_Duell_15_00"); //Я думаю, тебе стоит дать по морде... AI_Output(self,other,"DIA_Raoul_Duell_01_01"); //Что? AI_Output(other,self,"DIA_Raoul_Duell_15_02"); //Это именно то, что тебе сейчас нужно... AI_Output(self,other,"DIA_Raoul_Duell_01_03"); //По-моему, я был с тобой слишком вежлив! AI_StopProcessInfos(self); b_attack(self,other,AR_NONE,1); }; instance DIA_RAOUL_PERM(C_INFO) { npc = sld_822_raoul; nr = 900; condition = dia_raoul_perm_condition; information = dia_raoul_perm_info; permanent = TRUE; description = "Все в порядке?"; }; func int dia_raoul_perm_condition() { if(other.guild != GIL_NONE) { return TRUE; }; }; func void dia_raoul_perm_info() { AI_Output(other,self,"DIA_Raoul_PERM_15_00"); //Все в порядке? if(MIS_RAOUL_KILLTROLLBLACK == LOG_RUNNING) { AI_Output(self,other,"DIA_Raoul_PERM_01_01"); //Не болтай попусту. Или и принеси шкуру черного тролля. } else { AI_Output(self,other,"DIA_Raoul_PERM_01_02"); //Ты пытаешься подлизаться ко мне? Забудь об этом! if(self.aivar[AIV_LASTFIGHTAGAINSTPLAYER] == FIGHT_LOST) { AI_Output(self,other,"DIA_Raoul_PERM_01_03"); //Я не забыл, что ты сделал со мной. }; }; }; instance DIA_RAOUL_TROLL(C_INFO) { npc = sld_822_raoul; nr = 2; condition = dia_raoul_troll_condition; information = dia_raoul_troll_info; important = TRUE; }; func int dia_raoul_troll_condition() { if(hero.guild != GIL_NONE) { return TRUE; }; }; func void dia_raoul_troll_info() { AI_Output(self,other,"DIA_Raoul_TROLL_01_00"); //(цинично) Только посмотрите на это! AI_Output(other,self,"DIA_Raoul_TROLL_15_01"); //Чего тебе нужно? if((hero.guild == GIL_MIL) || (hero.guild == GIL_PAL)) { AI_Output(self,other,"DIA_Raoul_TROLL_01_02"); //Ты присоединился к городским нищим? Похоже на то. }; if((hero.guild == GIL_SLD) || (hero.guild == GIL_DJG)) { AI_Output(self,other,"DIA_Raoul_TROLL_01_03"); //Не думай, что я стану уважать тебя только за то, что ты стал одним из нас. }; if(hero.guild == GIL_KDF) { AI_Output(self,other,"DIA_Raoul_TROLL_01_04"); //Разыгрываешь из себя великого мага, ха? }; AI_Output(self,other,"DIA_Raoul_TROLL_01_05"); //Я скажу тебе одну вещь. Не важно, что ты носишь, я вижу тебя насквозь. AI_Output(self,other,"DIA_Raoul_TROLL_01_06"); //По мне, так ты просто скользкий маленький бездельник и ничего больше. Info_ClearChoices(dia_raoul_troll); Info_AddChoice(dia_raoul_troll,"Я должен идти.",dia_raoul_troll_weg); Info_AddChoice(dia_raoul_troll,"В чем твоя проблема?",dia_raoul_troll_rechnung); }; func void dia_raoul_troll_weg() { AI_Output(other,self,"DIA_Raoul_TROLL_weg_15_00"); //Я должен идти. AI_Output(self,other,"DIA_Raoul_TROLL_weg_01_01"); //Да, проваливай. AI_StopProcessInfos(self); }; func void dia_raoul_troll_rechnung() { AI_Output(other,self,"DIA_Raoul_TROLL_rechnung_15_00"); //В чем твоя проблема? AI_Output(self,other,"DIA_Raoul_TROLL_rechnung_01_01"); //Я вижу таких людей, как ты, насквозь. Способны только на слова, а когда доходит до дела - в кусты. AI_Output(self,other,"DIA_Raoul_TROLL_rechnung_01_02"); //Я ненавижу тех, кто одевается как вельможа и повсюду хвастает своими героическими делами. AI_Output(self,other,"DIA_Raoul_TROLL_rechnung_01_03"); //Не далее как вчера я набил морду одному такому. Он утверждал, что может завалить черного тролля одной левой. AI_Output(other,self,"DIA_Raoul_TROLL_rechnung_15_04"); //И что? AI_Output(self,other,"DIA_Raoul_TROLL_rechnung_01_05"); //(язвительно) Что ты хочешь сказать этим 'и что'? AI_Output(self,other,"DIA_Raoul_TROLL_rechnung_01_06"); //Ты хоть раз в своей жизни видел черного тролля, болтун? Ты хотя бы представляешь себе, насколько велики эти монстры? AI_Output(self,other,"DIA_Raoul_TROLL_rechnung_01_07"); //Если ты подойдешь к ним слишком близко, они разорвут тебя на куски. Info_ClearChoices(dia_raoul_troll); Info_AddChoice(dia_raoul_troll,"Мне это не интересно.",dia_raoul_troll_rechnung_hastrecht); if(Npc_IsDead(troll_black)) { Info_AddChoice(dia_raoul_troll,"Я уже убил черного тролля.",dia_raoul_troll_rechnung_ich); } else { Info_AddChoice(dia_raoul_troll,"Черного тролля? Нет проблем.",dia_raoul_troll_rechnung_noprob); }; }; func void b_raoul_blame() { AI_Output(self,other,"DIA_Raoul_TROLL_rechnung_B_Raoul_Blame_01_00"); //Ты напрашиваешься, да? Я должен был уже оторвать тебе голову. Но у меня есть идея получше. AI_Output(self,other,"DIA_Raoul_TROLL_rechnung_B_Raoul_Blame_01_01"); //Если ты такой великий боец, докажи это. AI_Output(other,self,"DIA_Raoul_TROLL_rechnung_B_Raoul_Blame_15_02"); //А что мне с этого будет? AI_Output(self,other,"DIA_Raoul_TROLL_rechnung_B_Raoul_Blame_01_03"); //Глупый вопрос. Почет, и твоя челюсть останется не сломанной. AI_Output(other,self,"DIA_Raoul_TROLL_rechnung_B_Raoul_Blame_15_04"); //Не так уж много. AI_Output(self,other,"DIA_Raoul_TROLL_rechnung_B_Raoul_Blame_01_05"); //Ммм. Скажем, я заплачу тебе целую кучу денег, если ты принесешь мне шкуру черного тролля. Как тебе? AI_Output(other,self,"DIA_Raoul_TROLL_rechnung_B_Raoul_Blame_15_06"); //Уже лучше. AI_Output(self,other,"DIA_Raoul_TROLL_rechnung_B_Raoul_Blame_01_07"); //Тогда чего ты ждешь? Log_CreateTopic(TOPIC_KILLTROLLBLACK,LOG_MISSION); Log_SetTopicStatus(TOPIC_KILLTROLLBLACK,LOG_RUNNING); b_logentry(TOPIC_KILLTROLLBLACK,"Рауль хочет, чтобы я принес ему шкуру черного тролля."); MIS_RAOUL_KILLTROLLBLACK = LOG_RUNNING; Info_ClearChoices(dia_raoul_troll); }; func void dia_raoul_troll_rechnung_hastrecht() { AI_Output(other,self,"DIA_Raoul_TROLL_rechnung_hastrecht_15_00"); //Мне это не интересно. AI_Output(self,other,"DIA_Raoul_TROLL_rechnung_hastrecht_01_01"); //Ну, как знаешь. Info_ClearChoices(dia_raoul_troll); }; func void dia_raoul_troll_rechnung_ich() { AI_Output(other,self,"DIA_Raoul_TROLL_rechnung_ich_15_00"); //Я уже убил черного тролля. b_raoul_blame(); }; func void dia_raoul_troll_rechnung_noprob() { AI_Output(other,self,"DIA_Raoul_TROLL_rechnung_noProb_15_00"); //Черного тролля? Нет проблем. b_raoul_blame(); }; instance DIA_RAOUL_TROPHYFUR(C_INFO) { npc = sld_822_raoul; nr = 3; condition = dia_raoul_trophyfur_condition; information = dia_raoul_trophyfur_info; permanent = TRUE; description = "Сначала скажи мне, как снять шкуру с черного тролля."; }; func int dia_raoul_trophyfur_condition() { if((PLAYER_TALENT_TAKEANIMALTROPHY[TROPHY_FUR] == FALSE) && (MIS_RAOUL_KILLTROLLBLACK == LOG_RUNNING)) { return TRUE; }; }; func void dia_raoul_trophyfur_info() { AI_Output(other,self,"DIA_Raoul_TrophyFur_15_00"); //Сначала скажи мне, как снять шкуру с черного тролля. if(b_teachplayertalenttakeanimaltrophy(self,other,TROPHY_FUR)) { AI_Output(self,other,"DIA_Raoul_TrophyFur_01_01"); //Тогда прочисть свои уши. Этот совет бесплатный. AI_Output(self,other,"DIA_Raoul_TrophyFur_01_02"); //Ты хватаешь этого зверя и делаешь надрез на каждой из его лап. AI_Output(self,other,"DIA_Raoul_TrophyFur_01_03"); //Затем снимаешь с него шкуру через голову. Разве это так сложно? }; }; instance DIA_RAOUL_TROLLFELL(C_INFO) { npc = sld_822_raoul; nr = 3; condition = dia_raoul_trollfell_condition; information = dia_raoul_trollfell_info; description = "Я принес шкуру черного тролля."; }; func int dia_raoul_trollfell_condition() { if(Npc_HasItems(other,itat_trollblackfur) && Npc_KnowsInfo(other,dia_raoul_troll)) { return TRUE; }; }; func void dia_raoul_trollfell_info() { AI_Output(other,self,"DIA_Raoul_TROLLFELL_15_00"); //Я принес шкуру черного тролля. AI_Output(self,other,"DIA_Raoul_TROLLFELL_01_01"); //Невероятно. Покажи. b_giveinvitems(other,self,itat_trollblackfur,1); MIS_RAOUL_KILLTROLLBLACK = LOG_SUCCESS; b_giveplayerxp(XP_RAOUL_KILLTROLLBLACK); AI_Output(self,other,"DIA_Raoul_TROLLFELL_01_02"); //Невероятно. Что ты хочешь за нее? AI_Output(other,self,"DIA_Raoul_TROLLFELL_15_03"); //Отдай мне все, что у тебя есть. AI_Output(self,other,"DIA_Raoul_TROLLFELL_01_04"); //Хорошо. Я дам тебе 500 золотых монет и три сильных лечебных зелья. Что скажешь? Info_ClearChoices(dia_raoul_trollfell); Info_AddChoice(dia_raoul_trollfell,"Этого недостаточно.",dia_raoul_trollfell_nein); Info_AddChoice(dia_raoul_trollfell,"Продано.",dia_raoul_trollfell_ja); }; func void dia_raoul_trollfell_ja() { AI_Output(other,self,"DIA_Raoul_TROLLFELL_ja_15_00"); //Продано. AI_Output(self,other,"DIA_Raoul_TROLLFELL_ja_01_01"); //Отличная сделка. CreateInvItems(other,ItPo_Health_03,3); CreateInvItems(other,ItMi_Gold,500); AI_PrintScreen("3 предметов получено (Лечебный эликсир)",-1,40,FONT_ScreenSmall,4); AI_PrintScreen("500 золотых получено",-1,43,FONT_ScreenSmall,4); Info_ClearChoices(dia_raoul_trollfell); }; func void dia_raoul_trollfell_nein() { AI_Output(other,self,"DIA_Raoul_TROLLFELL_nein_15_00"); //Этого недостаточно. AI_Output(self,other,"DIA_Raoul_TROLLFELL_nein_01_01"); //Как знаешь. Я все равно заберу эту шкуру. AI_Output(self,other,"DIA_Raoul_TROLLFELL_nein_01_02"); //Я не прощу себе, если упущу такую возможность. MIS_RAOUL_DOESNTPAYTROLLFUR = LOG_RUNNING; AI_StopProcessInfos(self); }; instance DIA_RAOUL_FELLZURUECK(C_INFO) { npc = sld_822_raoul; nr = 3; condition = dia_raoul_fellzurueck_condition; information = dia_raoul_fellzurueck_info; permanent = TRUE; description = "Верни мне мою шкуру черного тролля."; }; func int dia_raoul_fellzurueck_condition() { if((MIS_RAOUL_DOESNTPAYTROLLFUR == LOG_RUNNING) && Npc_HasItems(self,itat_trollblackfur)) { return TRUE; }; }; func void dia_raoul_fellzurueck_info() { AI_Output(other,self,"DIA_Raoul_FELLZURUECK_15_00"); //Верни мне мою шкуру черного тролля. AI_Output(self,other,"DIA_Raoul_FELLZURUECK_01_01"); //Нет. AI_StopProcessInfos(self); }; instance DIA_RAOUL_GOTTROLLFURBACK(C_INFO) { npc = sld_822_raoul; nr = 3; condition = dia_raoul_gottrollfurback_condition; information = dia_raoul_gottrollfurback_info; description = "Никогда больше не пытайся обмануть меня, понятно?"; }; func int dia_raoul_gottrollfurback_condition() { if((MIS_RAOUL_DOESNTPAYTROLLFUR == LOG_RUNNING) && (Npc_HasItems(self,itat_trollblackfur) == FALSE) && (self.aivar[AIV_LASTFIGHTAGAINSTPLAYER] == FIGHT_LOST)) { return TRUE; }; }; func void dia_raoul_gottrollfurback_info() { AI_Output(other,self,"DIA_Raoul_GotTrollFurBack_15_00"); //Никогда больше не пытайся обмануть меня, понятно? AI_Output(self,other,"DIA_Raoul_GotTrollFurBack_01_01"); //Хорошо. Ты знаешь здешние законы. Так что успокойся. MIS_RAOUL_DOESNTPAYTROLLFUR = LOG_SUCCESS; AI_StopProcessInfos(self); }; instance DIA_RAOUL_KAP3_EXIT(C_INFO) { npc = sld_822_raoul; nr = 999; condition = dia_raoul_kap3_exit_condition; information = dia_raoul_kap3_exit_info; permanent = TRUE; description = DIALOG_ENDE; }; func int dia_raoul_kap3_exit_condition() { if(KAPITEL == 3) { return TRUE; }; }; func void dia_raoul_kap3_exit_info() { AI_StopProcessInfos(self); }; instance DIA_RAOUL_KAP4_EXIT(C_INFO) { npc = sld_822_raoul; nr = 999; condition = dia_raoul_kap4_exit_condition; information = dia_raoul_kap4_exit_info; permanent = TRUE; description = DIALOG_ENDE; }; func int dia_raoul_kap4_exit_condition() { if(KAPITEL == 4) { return TRUE; }; }; func void dia_raoul_kap4_exit_info() { AI_StopProcessInfos(self); }; instance DIA_RAOUL_KAP5_EXIT(C_INFO) { npc = sld_822_raoul; nr = 999; condition = dia_raoul_kap5_exit_condition; information = dia_raoul_kap5_exit_info; permanent = TRUE; description = DIALOG_ENDE; }; func int dia_raoul_kap5_exit_condition() { if(KAPITEL == 5) { return TRUE; }; }; func void dia_raoul_kap5_exit_info() { AI_StopProcessInfos(self); }; instance DIA_RAOUL_SHIP(C_INFO) { npc = sld_822_raoul; nr = 2; condition = dia_raoul_ship_condition; information = dia_raoul_ship_info; description = "Ты не отказался бы от океанского круиза?"; }; func int dia_raoul_ship_condition() { if((KAPITEL >= 5) && (MIS_SCKNOWSWAYTOIRDORATH == TRUE)) { return TRUE; }; }; func void dia_raoul_ship_info() { AI_Output(other,self,"DIA_Raoul_Ship_15_00"); //Ты не отказался бы от океанского круиза? AI_Output(self,other,"DIA_Raoul_Ship_01_01"); //Что ты замышляешь? Ты хочешь захватить корабль паладинов? (смеется) AI_Output(other,self,"DIA_Raoul_Ship_15_02"); //А что если и так? AI_Output(self,other,"DIA_Raoul_Ship_01_03"); //(серьезно) У тебя совсем крыша поехала. Нет, спасибо. Это не для меня. AI_Output(self,other,"DIA_Raoul_Ship_01_04"); //Я не вижу причин покидать Хоринис. Мне все равно, где зарабатывать деньги, здесь или на материке. AI_Output(self,other,"DIA_Raoul_Ship_01_05"); //Найди кого-нибудь еще. if(Npc_IsDead(torlof) == FALSE) { AI_Output(self,other,"DIA_Raoul_Ship_01_06"); //Спроси Торлофа. Он ходил по морям, насколько я знаю. }; }; instance DIA_RAOUL_KAP6_EXIT(C_INFO) { npc = sld_822_raoul; nr = 999; condition = dia_raoul_kap6_exit_condition; information = dia_raoul_kap6_exit_info; permanent = TRUE; description = DIALOG_ENDE; }; func int dia_raoul_kap6_exit_condition() { if(KAPITEL == 6) { return TRUE; }; }; func void dia_raoul_kap6_exit_info() { AI_StopProcessInfos(self); }; instance DIA_RAOUL_PICKPOCKET(C_INFO) { npc = sld_822_raoul; nr = 900; condition = dia_raoul_pickpocket_condition; information = dia_raoul_pickpocket_info; permanent = TRUE; description = PICKPOCKET_60; }; func int dia_raoul_pickpocket_condition() { return c_beklauen(45,85); }; func void dia_raoul_pickpocket_info() { Info_ClearChoices(dia_raoul_pickpocket); Info_AddChoice(dia_raoul_pickpocket,DIALOG_BACK,dia_raoul_pickpocket_back); Info_AddChoice(dia_raoul_pickpocket,DIALOG_PICKPOCKET,dia_raoul_pickpocket_doit); }; func void dia_raoul_pickpocket_doit() { b_beklauen(); Info_ClearChoices(dia_raoul_pickpocket); }; func void dia_raoul_pickpocket_back() { Info_ClearChoices(dia_raoul_pickpocket); };
D
module executors.deleteuser; import std.stdio; import std.variant; import command.all; import relationaldb.all; import commands.deleteuser; class DeleteUserExecutor : AbstractExecutor!(DeleteUserCommand,DeleteUserCommandMetadata) { // Mysql connection private RelationalDBInterface relationalDb; private DeleteUserCommandMetadata meta; this( RelationalDBInterface relationalDb, CommandInterface command ) { this.relationalDb = relationalDb; this.meta = this.getMetadataFromCommandInterface(command); } void executeCommand() { this.deleteUser(); } private void deleteUser() { if (this.meta.hardDelete) { string sql = " DELETE FROM usr WHERE usrId = ? "; this.relationalDb.execute(sql, variantArray( this.meta.usrId )); } else { string sql = " UPDATE usr SET deleted = 1 WHERE usrId = ? "; this.relationalDb.execute(sql, variantArray( this.meta.usrId )); } } }
D
/* TEST_OUTPUT: --- fail_compilation/diag13942.d(18): Error: template instance `isRawStaticArray!()` does not match template declaration `isRawStaticArray(T, A...)` fail_compilation/diag13942.d(26): Error: template `diag13942.to!double.to` cannot deduce function from argument types `!()()`, candidates are: fail_compilation/diag13942.d(17): `to(A...)(A args)` --- */ template isRawStaticArray(T, A...) { enum isRawStaticArray = false; } template to(T) { T to(A...)(A args) if (!isRawStaticArray!A) { return 0; } } void main(string[] args) { auto t = to!double(); }
D
module diesel.linux.keyboard; version(raspberry) { import core.sys.posix.sys.ioctl; import core.sys.posix.fcntl; import core.sys.posix.unistd; import core.sys.posix.sys.time; import core.sys.posix.sys.ioctl; import std.string : toz = toStringz; import diesel.linux.input_event_codes; import std.stdio; static auto _IOC(int dir, int type, int nr, int size) { return (((dir) << _IOC_DIRSHIFT) | ((type) << _IOC_TYPESHIFT) | ((nr) << _IOC_NRSHIFT) | ((size) << _IOC_SIZESHIFT)); } int EVIOCGBIT(int ev, int len) { return _IOC(_IOC_READ, 'E', 0x20 + (ev), len); } struct input_event { timeval time; ushort type; ushort code; int value; } static const int EVIOCGRAB = _IOW!int('E', 0x90); class LinuxKeyboard { ubyte[512] pressed_keys; uint[] key_events; int[] fdv; bool haveKeys() { return key_events.length > 0; } uint nextKey() { if(key_events.length == 0) return 0; uint code = key_events[0]; key_events = key_events[1..$]; return code; } bool isPressed(int key) { if(key < 512) return pressed_keys[key] != 0; return false; } static bool test_bit(ubyte[] v, int n) { return (v[n/8] & (1<<(n%8))) != 0; } this() { import std.file; ubyte[(EV_MAX+7)/8] evbit; ubyte[(KEY_MAX+7)/8] keybit; writeln("Init keyboard"); // Find all input devices generating keys we are interested in foreach(f ; dirEntries("/dev/input", SpanMode.breadth)) { if(!f.isDir) { writeln("Checking ", f.name); int fd = .open(toz(f.name), O_RDONLY, 0); if(fd >= 0) { ioctl(fd, EVIOCGBIT(0, evbit.length), evbit.ptr); if(test_bit(evbit, EV_KEY)) { ioctl(fd, EVIOCGBIT(EV_KEY, keybit.length), keybit.ptr); if(test_bit(keybit, KEY_LEFT) || test_bit(keybit, BTN_LEFT)) { writeln("Has input"); ioctl(fd, EVIOCGRAB, 1); fdv ~= fd; continue; } } .close(fd); } } } } void pollKeyboard(uint usec) { int maxfd = -1; fd_set readset; timeval tv; ubyte[256] buf; FD_ZERO(&readset); foreach(fd ; fdv) { FD_SET(fd, &readset); if(fd > maxfd) maxfd = fd; } tv.tv_sec = usec / 1000_000; tv.tv_usec = usec % 1000_000; if(select(maxfd+1, &readset, null, null, &tv) <= 0) return; foreach(fd ; fdv) { if(FD_ISSET(fd, &readset)) { auto rc = .read(fd, buf.ptr, input_event.sizeof * 4); auto ptr = cast(input_event*)buf.ptr; while(rc >= input_event.sizeof) { if(ptr.type == EV_KEY) { //writeln("Got key ", ptr.code); if(ptr.value) { key_events ~= ptr.code; } if(ptr.code < 512) pressed_keys[ptr.code] = cast(ubyte)ptr.value; } ptr++; rc -= input_event.sizeof; } } } } } }
D
module android.java.java.util.zip.ZipOutputStream; public import android.java.java.util.zip.ZipOutputStream_d_interface; import arsd.jni : ImportExportImpl; mixin ImportExportImpl!ZipOutputStream; import import3 = android.java.java.lang.Class;
D
/Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/x86_64-apple-macosx/debug/TemplateKit.build/Pipeline/TemplateRenderer.swift.o : /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/template-kit/Sources/TemplateKit/Data/TemplateData.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/template-kit/Sources/TemplateKit/AST/TemplateEmbed.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/template-kit/Sources/TemplateKit/Deprecated.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/template-kit/Sources/TemplateKit/AST/TemplateSource.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/template-kit/Sources/TemplateKit/Data/TemplateDataStorage.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/template-kit/Sources/TemplateKit/Pipeline/ASTCache.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/template-kit/Sources/TemplateKit/Data/TemplateDataRepresentable.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/template-kit/Sources/TemplateKit/Utilities/HTMLEscape.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/template-kit/Sources/TemplateKit/AST/TemplateSyntaxType.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/template-kit/Sources/TemplateKit/Tag/Uppercase.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/template-kit/Sources/TemplateKit/Tag/Lowercase.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/template-kit/Sources/TemplateKit/Tag/Capitalize.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/template-kit/Sources/TemplateKit/AST/TemplateTag.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/template-kit/Sources/TemplateKit/AST/TemplateConditional.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/template-kit/Sources/TemplateKit/AST/TemplateCustom.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/template-kit/Sources/TemplateKit/AST/TemplateExpression.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/template-kit/Sources/TemplateKit/Tag/Var.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/template-kit/Sources/TemplateKit/Data/TemplateDataEncoder.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/template-kit/Sources/TemplateKit/AST/TemplateIdentifier.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/template-kit/Sources/TemplateKit/Pipeline/TemplateByteScanner.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/template-kit/Sources/TemplateKit/Pipeline/TemplateRenderer.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/template-kit/Sources/TemplateKit/Tag/TagRenderer.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/template-kit/Sources/TemplateKit/Pipeline/PlaintextRenderer.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/template-kit/Sources/TemplateKit/ViewRenderer.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/template-kit/Sources/TemplateKit/Pipeline/TemplateParser.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/template-kit/Sources/TemplateKit/Pipeline/TemplateSerializer.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/template-kit/Sources/TemplateKit/Utilities/TemplateError.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/template-kit/Sources/TemplateKit/AST/TemplateIterator.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/template-kit/Sources/TemplateKit/Tag/Contains.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/template-kit/Sources/TemplateKit/Utilities/Exports.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/template-kit/Sources/TemplateKit/Tag/DateFormat.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/template-kit/Sources/TemplateKit/AST/TemplateConstant.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/template-kit/Sources/TemplateKit/Tag/Comment.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/template-kit/Sources/TemplateKit/Tag/Print.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/template-kit/Sources/TemplateKit/Tag/Count.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/template-kit/Sources/TemplateKit/AST/TemplateDataContext.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/template-kit/Sources/TemplateKit/Tag/TagContext.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/template-kit/Sources/TemplateKit/Tag/Raw.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/template-kit/Sources/TemplateKit/AST/TemplateRaw.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/template-kit/Sources/TemplateKit/View.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/template-kit/Sources/TemplateKit/AST/TemplateSyntax.swift /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/NIO.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/Service.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 /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 /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/CNIODarwin/include/CNIODarwin.h /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/CNIOAtomics/include/CNIOAtomics.h /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/CNIOLinux/include/CNIOLinux.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 /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/TemplateKit.build/Pipeline/TemplateRenderer~partial.swiftmodule : /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/template-kit/Sources/TemplateKit/Data/TemplateData.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/template-kit/Sources/TemplateKit/AST/TemplateEmbed.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/template-kit/Sources/TemplateKit/Deprecated.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/template-kit/Sources/TemplateKit/AST/TemplateSource.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/template-kit/Sources/TemplateKit/Data/TemplateDataStorage.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/template-kit/Sources/TemplateKit/Pipeline/ASTCache.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/template-kit/Sources/TemplateKit/Data/TemplateDataRepresentable.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/template-kit/Sources/TemplateKit/Utilities/HTMLEscape.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/template-kit/Sources/TemplateKit/AST/TemplateSyntaxType.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/template-kit/Sources/TemplateKit/Tag/Uppercase.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/template-kit/Sources/TemplateKit/Tag/Lowercase.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/template-kit/Sources/TemplateKit/Tag/Capitalize.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/template-kit/Sources/TemplateKit/AST/TemplateTag.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/template-kit/Sources/TemplateKit/AST/TemplateConditional.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/template-kit/Sources/TemplateKit/AST/TemplateCustom.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/template-kit/Sources/TemplateKit/AST/TemplateExpression.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/template-kit/Sources/TemplateKit/Tag/Var.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/template-kit/Sources/TemplateKit/Data/TemplateDataEncoder.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/template-kit/Sources/TemplateKit/AST/TemplateIdentifier.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/template-kit/Sources/TemplateKit/Pipeline/TemplateByteScanner.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/template-kit/Sources/TemplateKit/Pipeline/TemplateRenderer.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/template-kit/Sources/TemplateKit/Tag/TagRenderer.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/template-kit/Sources/TemplateKit/Pipeline/PlaintextRenderer.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/template-kit/Sources/TemplateKit/ViewRenderer.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/template-kit/Sources/TemplateKit/Pipeline/TemplateParser.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/template-kit/Sources/TemplateKit/Pipeline/TemplateSerializer.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/template-kit/Sources/TemplateKit/Utilities/TemplateError.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/template-kit/Sources/TemplateKit/AST/TemplateIterator.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/template-kit/Sources/TemplateKit/Tag/Contains.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/template-kit/Sources/TemplateKit/Utilities/Exports.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/template-kit/Sources/TemplateKit/Tag/DateFormat.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/template-kit/Sources/TemplateKit/AST/TemplateConstant.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/template-kit/Sources/TemplateKit/Tag/Comment.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/template-kit/Sources/TemplateKit/Tag/Print.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/template-kit/Sources/TemplateKit/Tag/Count.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/template-kit/Sources/TemplateKit/AST/TemplateDataContext.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/template-kit/Sources/TemplateKit/Tag/TagContext.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/template-kit/Sources/TemplateKit/Tag/Raw.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/template-kit/Sources/TemplateKit/AST/TemplateRaw.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/template-kit/Sources/TemplateKit/View.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/template-kit/Sources/TemplateKit/AST/TemplateSyntax.swift /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/NIO.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/Service.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 /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 /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/CNIODarwin/include/CNIODarwin.h /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/CNIOAtomics/include/CNIOAtomics.h /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/CNIOLinux/include/CNIOLinux.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 /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/TemplateKit.build/Pipeline/TemplateRenderer~partial.swiftdoc : /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/template-kit/Sources/TemplateKit/Data/TemplateData.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/template-kit/Sources/TemplateKit/AST/TemplateEmbed.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/template-kit/Sources/TemplateKit/Deprecated.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/template-kit/Sources/TemplateKit/AST/TemplateSource.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/template-kit/Sources/TemplateKit/Data/TemplateDataStorage.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/template-kit/Sources/TemplateKit/Pipeline/ASTCache.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/template-kit/Sources/TemplateKit/Data/TemplateDataRepresentable.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/template-kit/Sources/TemplateKit/Utilities/HTMLEscape.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/template-kit/Sources/TemplateKit/AST/TemplateSyntaxType.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/template-kit/Sources/TemplateKit/Tag/Uppercase.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/template-kit/Sources/TemplateKit/Tag/Lowercase.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/template-kit/Sources/TemplateKit/Tag/Capitalize.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/template-kit/Sources/TemplateKit/AST/TemplateTag.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/template-kit/Sources/TemplateKit/AST/TemplateConditional.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/template-kit/Sources/TemplateKit/AST/TemplateCustom.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/template-kit/Sources/TemplateKit/AST/TemplateExpression.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/template-kit/Sources/TemplateKit/Tag/Var.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/template-kit/Sources/TemplateKit/Data/TemplateDataEncoder.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/template-kit/Sources/TemplateKit/AST/TemplateIdentifier.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/template-kit/Sources/TemplateKit/Pipeline/TemplateByteScanner.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/template-kit/Sources/TemplateKit/Pipeline/TemplateRenderer.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/template-kit/Sources/TemplateKit/Tag/TagRenderer.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/template-kit/Sources/TemplateKit/Pipeline/PlaintextRenderer.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/template-kit/Sources/TemplateKit/ViewRenderer.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/template-kit/Sources/TemplateKit/Pipeline/TemplateParser.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/template-kit/Sources/TemplateKit/Pipeline/TemplateSerializer.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/template-kit/Sources/TemplateKit/Utilities/TemplateError.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/template-kit/Sources/TemplateKit/AST/TemplateIterator.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/template-kit/Sources/TemplateKit/Tag/Contains.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/template-kit/Sources/TemplateKit/Utilities/Exports.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/template-kit/Sources/TemplateKit/Tag/DateFormat.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/template-kit/Sources/TemplateKit/AST/TemplateConstant.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/template-kit/Sources/TemplateKit/Tag/Comment.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/template-kit/Sources/TemplateKit/Tag/Print.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/template-kit/Sources/TemplateKit/Tag/Count.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/template-kit/Sources/TemplateKit/AST/TemplateDataContext.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/template-kit/Sources/TemplateKit/Tag/TagContext.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/template-kit/Sources/TemplateKit/Tag/Raw.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/template-kit/Sources/TemplateKit/AST/TemplateRaw.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/template-kit/Sources/TemplateKit/View.swift /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/template-kit/Sources/TemplateKit/AST/TemplateSyntax.swift /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/NIO.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/Service.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 /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 /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/CNIODarwin/include/CNIODarwin.h /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/CNIOAtomics/include/CNIOAtomics.h /Users/Jorge/Desktop/Projects/Web/Swift/kisiBootcamp/.build/checkouts/swift-nio/Sources/CNIOLinux/include/CNIOLinux.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 /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
struct A { } void map(alias dg)(A r) { } struct TTT { static auto yyy(A a) { map!(b => 0)(a); } } void bar() { }
D
module std.container.array; import std.range.constraints; import std.traits; public import std.container.util; /** Array type with deterministic control of memory. The memory allocated for the array is reclaimed as soon as possible; there is no reliance on the garbage collector. $(D Array) uses $(D malloc) and $(D free) for managing its own memory. */ struct Array(T) if (!is(Unqual!T == bool)) { import core.stdc.stdlib; import core.stdc.string; import core.memory; import core.exception : RangeError; import std.algorithm : initializeAll, move, copy; import std.exception : enforce; import std.typecons : RefCounted, RefCountedAutoInitialize; // This structure is not copyable. private struct Payload { size_t _capacity; T[] _payload; // Convenience constructor this(T[] p) { _capacity = p.length; _payload = p; } // Destructor releases array memory ~this() { //Warning: destroy will also destroy class instances. //The hasElaborateDestructor protects us here. static if (hasElaborateDestructor!T) foreach (ref e; _payload) .destroy(e); static if (hasIndirections!T) GC.removeRange(_payload.ptr); free(_payload.ptr); } this(this) { assert(0); } void opAssign(Payload rhs) { assert(false); } // Duplicate data // @property Payload dup() // { // Payload result; // result._payload = _payload.dup; // // Conservatively assume initial capacity == length // result._capacity = result._payload.length; // return result; // } // length @property size_t length() const { return _payload.length; } // length @property void length(size_t newLength) { if (length >= newLength) { // shorten static if (hasElaborateDestructor!T) foreach (ref e; _payload.ptr[newLength .. _payload.length]) .destroy(e); _payload = _payload.ptr[0 .. newLength]; return; } // enlarge auto startEmplace = length; _payload = (cast(T*) realloc(_payload.ptr, T.sizeof * newLength))[0 .. newLength]; initializeAll(_payload.ptr[startEmplace .. length]); } // capacity @property size_t capacity() const { return _capacity; } // reserve void reserve(size_t elements) { if (elements <= capacity) return; immutable sz = elements * T.sizeof; static if (hasIndirections!T) // should use hasPointers instead { /* Because of the transactional nature of this * relative to the garbage collector, ensure no * threading bugs by using malloc/copy/free rather * than realloc. */ immutable oldLength = length; auto newPayload = enforce(cast(T*) malloc(sz))[0 .. oldLength]; // copy old data over to new array memcpy(newPayload.ptr, _payload.ptr, T.sizeof * oldLength); // Zero out unused capacity to prevent gc from seeing // false pointers memset(newPayload.ptr + oldLength, 0, (elements - oldLength) * T.sizeof); GC.addRange(newPayload.ptr, sz); GC.removeRange(_payload.ptr); free(_payload.ptr); _payload = newPayload; } else { /* These can't have pointers, so no need to zero * unused region */ auto newPayload = enforce(cast(T*) realloc(_payload.ptr, sz))[0 .. length]; _payload = newPayload; } _capacity = elements; } // Insert one item size_t insertBack(Stuff)(Stuff stuff) if (isImplicitlyConvertible!(Stuff, T)) { import std.conv : emplace; if (_capacity == length) { reserve(1 + capacity * 3 / 2); } assert(capacity > length && _payload.ptr); emplace(_payload.ptr + _payload.length, stuff); _payload = _payload.ptr[0 .. _payload.length + 1]; return 1; } /// Insert a range of items size_t insertBack(Stuff)(Stuff stuff) if (isInputRange!Stuff && isImplicitlyConvertible!(ElementType!Stuff, T)) { static if (hasLength!Stuff) { immutable oldLength = length; reserve(oldLength + stuff.length); } size_t result; foreach (item; stuff) { insertBack(item); ++result; } static if (hasLength!Stuff) { assert(length == oldLength + stuff.length); } return result; } } private alias Data = RefCounted!(Payload, RefCountedAutoInitialize.no); private Data _data; /** Constructor taking a number of items */ this(U)(U[] values...) if (isImplicitlyConvertible!(U, T)) { import std.conv : emplace; auto p = cast(T*) malloc(T.sizeof * values.length); static if (hasIndirections!T) { if (p) GC.addRange(p, T.sizeof * values.length); } foreach (i, e; values) { emplace(p + i, e); assert(p[i] == e); } _data = Data(p[0 .. values.length]); } /** Constructor taking an input range */ this(Stuff)(Stuff stuff) if (isInputRange!Stuff && isImplicitlyConvertible!(ElementType!Stuff, T) && !is(Stuff == T[])) { insertBack(stuff); } /** Comparison for equality. */ bool opEquals(const Array rhs) const { return opEquals(rhs); } /// ditto bool opEquals(ref const Array rhs) const { if (empty) return rhs.empty; if (rhs.empty) return false; return _data._payload == rhs._data._payload; } /** Defines the container's primary range, which is a random-access range. */ static struct Range { private Array _outer; private size_t _a, _b; private this(ref Array data, size_t a, size_t b) { _outer = data; _a = a; _b = b; } @property Range save() { return this; } @property bool empty() @safe pure nothrow const { return _a >= _b; } @property size_t length() @safe pure nothrow const { return _b - _a; } alias opDollar = length; @property ref T front() { version (assert) if (empty) throw new RangeError(); return _outer[_a]; } @property ref T back() { version (assert) if (empty) throw new RangeError(); return _outer[_b - 1]; } void popFront() @safe pure nothrow { version (assert) if (empty) throw new RangeError(); ++_a; } void popBack() @safe pure nothrow { version (assert) if (empty) throw new RangeError(); --_b; } T moveFront() { version (assert) if (empty || _a >= _outer.length) throw new RangeError(); return move(_outer._data._payload[_a]); } T moveBack() { version (assert) if (empty || _b > _outer.length) throw new RangeError(); return move(_outer._data._payload[_b - 1]); } T moveAt(size_t i) { version (assert) if (_a + i >= _b || _a + i >= _outer.length) throw new RangeError(); return move(_outer._data._payload[_a + i]); } ref T opIndex(size_t i) { version (assert) if (_a + i >= _b) throw new RangeError(); return _outer[_a + i]; } typeof(this) opSlice() { return typeof(this)(_outer, _a, _b); } typeof(this) opSlice(size_t i, size_t j) { version (assert) if (i > j || _a + j > _b) throw new RangeError(); return typeof(this)(_outer, _a + i, _a + j); } void opSliceAssign(T value) { version (assert) if (_b > _outer.length) throw new RangeError(); _outer[_a .. _b] = value; } void opSliceAssign(T value, size_t i, size_t j) { version (assert) if (_a + j > _b) throw new RangeError(); _outer[_a + i .. _a + j] = value; } void opSliceUnary(string op)() if(op == "++" || op == "--") { version (assert) if (_b > _outer.length) throw new RangeError(); mixin(op~"_outer[_a .. _b];"); } void opSliceUnary(string op)(size_t i, size_t j) if(op == "++" || op == "--") { version (assert) if (_a + j > _b) throw new RangeError(); mixin(op~"_outer[_a + i .. _a + j];"); } void opSliceOpAssign(string op)(T value) { version (assert) if (_b > _outer.length) throw new RangeError(); mixin("_outer[_a .. _b] "~op~"= value;"); } void opSliceOpAssign(string op)(T value, size_t i, size_t j) { version (assert) if (_a + j > _b) throw new RangeError(); mixin("_outer[_a + i .. _a + j] "~op~"= value;"); } } /** Duplicates the container. The elements themselves are not transitively duplicated. Complexity: $(BIGOH n). */ @property Array dup() { if (!_data.refCountedStore.isInitialized) return this; return Array(_data._payload); } /** Property returning $(D true) if and only if the container has no elements. Complexity: $(BIGOH 1) */ @property bool empty() const { return !_data.refCountedStore.isInitialized || _data._payload.empty; } /** Returns the number of elements in the container. Complexity: $(BIGOH 1). */ @property size_t length() const { return _data.refCountedStore.isInitialized ? _data._payload.length : 0; } /// ditto size_t opDollar() const { return length; } /** Returns the maximum number of elements the container can store without (a) allocating memory, (b) invalidating iterators upon insertion. Complexity: $(BIGOH 1) */ @property size_t capacity() { return _data.refCountedStore.isInitialized ? _data._capacity : 0; } /** Ensures sufficient capacity to accommodate $(D e) elements. Postcondition: $(D capacity >= e) Complexity: $(BIGOH 1) */ void reserve(size_t elements) { if (!_data.refCountedStore.isInitialized) { if (!elements) return; immutable sz = elements * T.sizeof; auto p = enforce(malloc(sz)); static if (hasIndirections!T) { GC.addRange(p, sz); } _data = Data(cast(T[]) p[0 .. 0]); _data._capacity = elements; } else { _data.reserve(elements); } } /** Returns a range that iterates over elements of the container, in forward order. Complexity: $(BIGOH 1) */ Range opSlice() { return Range(this, 0, length); } /** Returns a range that iterates over elements of the container from index $(D a) up to (excluding) index $(D b). Precondition: $(D a <= b && b <= length) Complexity: $(BIGOH 1) */ Range opSlice(size_t i, size_t j) { version (assert) if (i > j || j > length) throw new RangeError(); return Range(this, i, j); } /** Forward to $(D opSlice().front) and $(D opSlice().back), respectively. Precondition: $(D !empty) Complexity: $(BIGOH 1) */ @property ref T front() { version (assert) if (!_data.refCountedStore.isInitialized) throw new RangeError(); return _data._payload[0]; } /// ditto @property ref T back() { version (assert) if (!_data.refCountedStore.isInitialized) throw new RangeError(); return _data._payload[$ - 1]; } /** Indexing operators yield or modify the value at a specified index. Precondition: $(D i < length) Complexity: $(BIGOH 1) */ ref T opIndex(size_t i) { version (assert) if (!_data.refCountedStore.isInitialized) throw new RangeError(); return _data._payload[i]; } /** Slicing operations execute an operation on an entire slice. Precondition: $(D i < j && j < length) Complexity: $(BIGOH slice.length) */ void opSliceAssign(T value) { if (!_data.refCountedStore.isInitialized) return; _data._payload[] = value; } /// ditto void opSliceAssign(T value, size_t i, size_t j) { auto slice = _data.refCountedStore.isInitialized ? _data._payload : T[].init; slice[i .. j] = value; } /// ditto void opSliceUnary(string op)() if(op == "++" || op == "--") { if(!_data.refCountedStore.isInitialized) return; mixin(op~"_data._payload[];"); } /// ditto void opSliceUnary(string op)(size_t i, size_t j) if(op == "++" || op == "--") { auto slice = _data.refCountedStore.isInitialized ? _data._payload : T[].init; mixin(op~"slice[i .. j];"); } /// ditto void opSliceOpAssign(string op)(T value) { if(!_data.refCountedStore.isInitialized) return; mixin("_data._payload[] "~op~"= value;"); } /// ditto void opSliceOpAssign(string op)(T value, size_t i, size_t j) { auto slice = _data.refCountedStore.isInitialized ? _data._payload : T[].init; mixin("slice[i .. j] "~op~"= value;"); } /** Returns a new container that's the concatenation of $(D this) and its argument. $(D opBinaryRight) is only defined if $(D Stuff) does not define $(D opBinary). Complexity: $(BIGOH n + m), where m is the number of elements in $(D stuff) */ Array opBinary(string op, Stuff)(Stuff stuff) if (op == "~") { // TODO: optimize Array result; // @@@BUG@@ result ~= this[] doesn't work auto r = this[]; result ~= r; assert(result.length == length); result ~= stuff[]; return result; } /** Forwards to $(D insertBack(stuff)). */ void opOpAssign(string op, Stuff)(Stuff stuff) if (op == "~") { static if (is(typeof(stuff[]))) { insertBack(stuff[]); } else { insertBack(stuff); } } /** Removes all contents from the container. The container decides how $(D capacity) is affected. Postcondition: $(D empty) Complexity: $(BIGOH n) */ void clear() { _data = Data.init; } /** Sets the number of elements in the container to $(D newSize). If $(D newSize) is greater than $(D length), the added elements are added to unspecified positions in the container and initialized with $(D T.init). Complexity: $(BIGOH abs(n - newLength)) Postcondition: $(D length == newLength) */ @property void length(size_t newLength) { _data.refCountedStore.ensureInitialized(); _data.length = newLength; } /** Picks one value in an unspecified position in the container, removes it from the container, and returns it. The stable version behaves the same, but guarantees that ranges iterating over the container are never invalidated. Precondition: $(D !empty) Returns: The element removed. Complexity: $(BIGOH log(n)). */ T removeAny() { auto result = back; removeBack(); return result; } /// ditto alias stableRemoveAny = removeAny; /** Inserts $(D value) to the front or back of the container. $(D stuff) can be a value convertible to $(D T) or a range of objects convertible to $(D T). The stable version behaves the same, but guarantees that ranges iterating over the container are never invalidated. Returns: The number of elements inserted Complexity: $(BIGOH m * log(n)), where $(D m) is the number of elements in $(D stuff) */ size_t insertBack(Stuff)(Stuff stuff) if (isImplicitlyConvertible!(Stuff, T) || isInputRange!Stuff && isImplicitlyConvertible!(ElementType!Stuff, T)) { _data.refCountedStore.ensureInitialized(); return _data.insertBack(stuff); } /// ditto alias insert = insertBack; /** Removes the value at the back of the container. The stable version behaves the same, but guarantees that ranges iterating over the container are never invalidated. Precondition: $(D !empty) Complexity: $(BIGOH log(n)). */ void removeBack() { enforce(!empty); static if (hasElaborateDestructor!T) .destroy(_data._payload[$ - 1]); _data._payload = _data._payload[0 .. $ - 1]; } /// ditto alias stableRemoveBack = removeBack; /** Removes $(D howMany) values at the front or back of the container. Unlike the unparameterized versions above, these functions do not throw if they could not remove $(D howMany) elements. Instead, if $(D howMany > n), all elements are removed. The returned value is the effective number of elements removed. The stable version behaves the same, but guarantees that ranges iterating over the container are never invalidated. Returns: The number of elements removed Complexity: $(BIGOH howMany). */ size_t removeBack(size_t howMany) { if (howMany > length) howMany = length; static if (hasElaborateDestructor!T) foreach (ref e; _data._payload[$ - howMany .. $]) .destroy(e); _data._payload = _data._payload[0 .. $ - howMany]; return howMany; } /// ditto alias stableRemoveBack = removeBack; /** Inserts $(D stuff) before, after, or instead range $(D r), which must be a valid range previously extracted from this container. $(D stuff) can be a value convertible to $(D T) or a range of objects convertible to $(D T). The stable version behaves the same, but guarantees that ranges iterating over the container are never invalidated. Returns: The number of values inserted. Complexity: $(BIGOH n + m), where $(D m) is the length of $(D stuff) */ size_t insertBefore(Stuff)(Range r, Stuff stuff) if (isImplicitlyConvertible!(Stuff, T)) { import std.conv : emplace; enforce(r._outer._data is _data && r._a <= length); reserve(length + 1); assert(_data.refCountedStore.isInitialized); // Move elements over by one slot memmove(_data._payload.ptr + r._a + 1, _data._payload.ptr + r._a, T.sizeof * (length - r._a)); emplace(_data._payload.ptr + r._a, stuff); _data._payload = _data._payload.ptr[0 .. _data._payload.length + 1]; return 1; } /// ditto size_t insertBefore(Stuff)(Range r, Stuff stuff) if (isInputRange!Stuff && isImplicitlyConvertible!(ElementType!Stuff, T)) { import std.conv : emplace; enforce(r._outer._data is _data && r._a <= length); static if (isForwardRange!Stuff) { // Can find the length in advance auto extra = walkLength(stuff); if (!extra) return 0; reserve(length + extra); assert(_data.refCountedStore.isInitialized); // Move elements over by extra slots memmove(_data._payload.ptr + r._a + extra, _data._payload.ptr + r._a, T.sizeof * (length - r._a)); foreach (p; _data._payload.ptr + r._a .. _data._payload.ptr + r._a + extra) { emplace(p, stuff.front); stuff.popFront(); } _data._payload = _data._payload.ptr[0 .. _data._payload.length + extra]; return extra; } else { import std.algorithm : bringToFront; enforce(_data); immutable offset = r._a; enforce(offset <= length); auto result = insertBack(stuff); bringToFront(this[offset .. length - result], this[length - result .. length]); return result; } } /// ditto size_t insertAfter(Stuff)(Range r, Stuff stuff) { import std.algorithm : bringToFront; enforce(r._outer._data is _data); // TODO: optimize immutable offset = r._b; enforce(offset <= length); auto result = insertBack(stuff); bringToFront(this[offset .. length - result], this[length - result .. length]); return result; } /// ditto size_t replace(Stuff)(Range r, Stuff stuff) if (isInputRange!Stuff && isImplicitlyConvertible!(ElementType!Stuff, T)) { enforce(r._outer._data is _data); size_t result; for (; !stuff.empty; stuff.popFront()) { if (r.empty) { // insert the rest return result + insertBefore(r, stuff); } r.front = stuff.front; r.popFront(); ++result; } // Remove remaining stuff in r linearRemove(r); return result; } /// ditto size_t replace(Stuff)(Range r, Stuff stuff) if (isImplicitlyConvertible!(Stuff, T)) { enforce(r._outer._data is _data); if (r.empty) { insertBefore(r, stuff); } else { r.front = stuff; r.popFront(); linearRemove(r); } return 1; } /** Removes all elements belonging to $(D r), which must be a range obtained originally from this container. The stable version behaves the same, but guarantees that ranges iterating over the container are never invalidated. Returns: A range spanning the remaining elements in the container that initially were right after $(D r). Complexity: $(BIGOH n - m), where $(D m) is the number of elements in $(D r) */ Range linearRemove(Range r) { enforce(r._outer._data is _data); enforce(_data.refCountedStore.isInitialized); enforce(r._a <= r._b && r._b <= length); immutable offset1 = r._a; immutable offset2 = r._b; immutable tailLength = length - offset2; // Use copy here, not a[] = b[] because the ranges may overlap copy(this[offset2 .. length], this[offset1 .. offset1 + tailLength]); length = offset1 + tailLength; return this[length - tailLength .. length]; } } unittest { Array!int a; assert(a.empty); } unittest { Array!int a = Array!int(1, 2, 3); //a._data._refCountedDebug = true; auto b = a.dup; assert(b == Array!int(1, 2, 3)); b.front = 42; assert(b == Array!int(42, 2, 3)); assert(a == Array!int(1, 2, 3)); } unittest { auto a = Array!int(1, 2, 3); assert(a.length == 3); } unittest { // REG https://issues.dlang.org/show_bug.cgi?id=13621 import std.container : Array, BinaryHeap; alias Heap = BinaryHeap!(Array!int); } unittest { Array!int a; a.reserve(1000); assert(a.length == 0); assert(a.empty); assert(a.capacity >= 1000); auto p = a._data._payload.ptr; foreach (i; 0 .. 1000) { a.insertBack(i); } assert(p == a._data._payload.ptr); } unittest { auto a = Array!int(1, 2, 3); a[1] *= 42; assert(a[1] == 84); } unittest { auto a = Array!int(1, 2, 3); auto b = Array!int(11, 12, 13); auto c = a ~ b; //foreach (e; c) writeln(e); assert(c == Array!int(1, 2, 3, 11, 12, 13)); //assert(a ~ b[] == Array!int(1, 2, 3, 11, 12, 13)); } unittest { auto a = Array!int(1, 2, 3); auto b = Array!int(11, 12, 13); a ~= b; assert(a == Array!int(1, 2, 3, 11, 12, 13)); } unittest { auto a = Array!int(1, 2, 3, 4); assert(a.removeAny() == 4); assert(a == Array!int(1, 2, 3)); } unittest { auto a = Array!int(1, 2, 3, 4, 5); auto r = a[2 .. a.length]; assert(a.insertBefore(r, 42) == 1); assert(a == Array!int(1, 2, 42, 3, 4, 5)); r = a[2 .. 2]; assert(a.insertBefore(r, [8, 9]) == 2); assert(a == Array!int(1, 2, 8, 9, 42, 3, 4, 5)); } unittest { auto a = Array!int(0, 1, 2, 3, 4, 5, 6, 7, 8); a.linearRemove(a[4 .. 6]); assert(a == Array!int(0, 1, 2, 3, 6, 7, 8)); } // Give the Range object some testing. unittest { import std.algorithm : equal; import std.range : retro; auto a = Array!int(0, 1, 2, 3, 4, 5, 6)[]; auto b = Array!int(6, 5, 4, 3, 2, 1, 0)[]; alias A = typeof(a); static assert(isRandomAccessRange!A); static assert(hasSlicing!A); static assert(hasAssignableElements!A); static assert(hasMobileElements!A); assert(equal(retro(b), a)); assert(a.length == 7); assert(equal(a[1..4], [1, 2, 3])); } // Test issue 5920 unittest { struct structBug5920 { int order; uint* pDestructionMask; ~this() { if (pDestructionMask) *pDestructionMask += 1 << order; } } alias S = structBug5920; uint dMask; auto arr = Array!S(cast(S[])[]); foreach (i; 0..8) arr.insertBack(S(i, &dMask)); // don't check dMask now as S may be copied multiple times (it's ok?) { assert(arr.length == 8); dMask = 0; arr.length = 6; assert(arr.length == 6); // make sure shrinking calls the d'tor assert(dMask == 0b1100_0000); arr.removeBack(); assert(arr.length == 5); // make sure removeBack() calls the d'tor assert(dMask == 0b1110_0000); arr.removeBack(3); assert(arr.length == 2); // ditto assert(dMask == 0b1111_1100); arr.clear(); assert(arr.length == 0); // make sure clear() calls the d'tor assert(dMask == 0b1111_1111); } assert(dMask == 0b1111_1111); // make sure the d'tor is called once only. } // Test issue 5792 (mainly just to check if this piece of code is compilable) unittest { auto a = Array!(int[])([[1,2],[3,4]]); a.reserve(4); assert(a.capacity >= 4); assert(a.length == 2); assert(a[0] == [1,2]); assert(a[1] == [3,4]); a.reserve(16); assert(a.capacity >= 16); assert(a.length == 2); assert(a[0] == [1,2]); assert(a[1] == [3,4]); } // test replace!Stuff with range Stuff unittest { import std.algorithm : equal; auto a = Array!int([1, 42, 5]); a.replace(a[1 .. 2], [2, 3, 4]); assert(equal(a[], [1, 2, 3, 4, 5])); } // test insertBefore and replace with empty Arrays unittest { import std.algorithm : equal; auto a = Array!int(); a.insertBefore(a[], 1); assert(equal(a[], [1])); } unittest { import std.algorithm : equal; auto a = Array!int(); a.insertBefore(a[], [1, 2]); assert(equal(a[], [1, 2])); } unittest { import std.algorithm : equal; auto a = Array!int(); a.replace(a[], [1, 2]); assert(equal(a[], [1, 2])); } unittest { import std.algorithm : equal; auto a = Array!int(); a.replace(a[], 1); assert(equal(a[], [1])); } // make sure that Array instances refuse ranges that don't belong to them unittest { import std.exception; Array!int a = [1, 2, 3]; auto r = a.dup[]; assertThrown(a.insertBefore(r, 42)); assertThrown(a.insertBefore(r, [42])); assertThrown(a.insertAfter(r, 42)); assertThrown(a.replace(r, 42)); assertThrown(a.replace(r, [42])); assertThrown(a.linearRemove(r)); } unittest { auto a = Array!int([1, 1]); a[1] = 0; //Check Array.opIndexAssign assert(a[1] == 0); a[1] += 1; //Check Array.opIndexOpAssign assert(a[1] == 1); //Check Array.opIndexUnary ++a[0]; //a[0]++ //op++ doesn't return, so this shouldn't work, even with 5044 fixed assert(a[0] == 2); assert(+a[0] == +2); assert(-a[0] == -2); assert(~a[0] == ~2); auto r = a[]; r[1] = 0; //Check Array.Range.opIndexAssign assert(r[1] == 0); r[1] += 1; //Check Array.Range.opIndexOpAssign assert(r[1] == 1); //Check Array.Range.opIndexUnary ++r[0]; //r[0]++ //op++ doesn't return, so this shouldn't work, even with 5044 fixed assert(r[0] == 3); assert(+r[0] == +3); assert(-r[0] == -3); assert(~r[0] == ~3); } unittest { import std.algorithm : equal; //Test "array-wide" operations auto a = Array!int([0, 1, 2]); //Array a[] += 5; assert(a[].equal([5, 6, 7])); ++a[]; assert(a[].equal([6, 7, 8])); a[1 .. 3] *= 5; assert(a[].equal([6, 35, 40])); a[0 .. 2] = 0; assert(a[].equal([0, 0, 40])); //Test empty array auto a2 = Array!int.init; ++a2[]; ++a2[0 .. 0]; a2[] = 0; a2[0 .. 0] = 0; a2[] += 0; a2[0 .. 0] += 0; //Test "range-wide" operations auto r = Array!int([0, 1, 2])[]; //Array.Range r[] += 5; assert(r.equal([5, 6, 7])); ++r[]; assert(r.equal([6, 7, 8])); r[1 .. 3] *= 5; assert(r.equal([6, 35, 40])); r[0 .. 2] = 0; assert(r.equal([0, 0, 40])); //Test empty Range auto r2 = Array!int.init[]; ++r2[]; ++r2[0 .. 0]; r2[] = 0; r2[0 .. 0] = 0; r2[] += 0; r2[0 .. 0] += 0; } // Test issue 11194 unittest { static struct S { int i = 1337; void* p; this(this) { assert(i == 1337); } ~this() { assert(i == 1337); } } Array!S arr; S s; arr ~= s; arr ~= s; } unittest //11459 { static struct S { bool b; alias b this; } alias A = Array!S; alias B = Array!(shared bool); } unittest //11884 { import std.algorithm : filter; auto a = Array!int([1, 2, 2].filter!"true"()); } unittest //8282 { auto arr = new Array!int; } unittest //6998 { static int i = 0; class C { int dummy = 1; this(){++i;} ~this(){--i;} } assert(i == 0); auto c = new C(); assert(i == 1); //scope { auto arr = Array!C(c); assert(i == 1); } //Array should not have destroyed the class instance assert(i == 1); //Just to make sure the GC doesn't collect before the above test. assert(c.dummy ==1); } unittest //6998-2 { static class C {int i;} auto c = new C; c.i = 42; Array!C a; a ~= c; a.clear; assert(c.i == 42); //fails } //////////////////////////////////////////////////////////////////////////////// // Array!bool //////////////////////////////////////////////////////////////////////////////// /** _Array specialized for $(D bool). Packs together values efficiently by allocating one bit per element. */ struct Array(T) if (is(Unqual!T == bool)) { import std.exception : enforce; import std.typecons : RefCounted, RefCountedAutoInitialize; static immutable uint bitsPerWord = size_t.sizeof * 8; private static struct Data { Array!size_t.Payload _backend; size_t _length; } private RefCounted!(Data, RefCountedAutoInitialize.no) _store; private @property ref size_t[] data() { assert(_store.refCountedStore.isInitialized); return _store._backend._payload; } /** Defines the container's primary range. */ struct Range { private Array _outer; private size_t _a, _b; /// Range primitives @property Range save() { version (bug4437) { return this; } else { auto copy = this; return copy; } } /// Ditto @property bool empty() { return _a >= _b || _outer.length < _b; } /// Ditto @property T front() { enforce(!empty); return _outer[_a]; } /// Ditto @property void front(bool value) { enforce(!empty); _outer[_a] = value; } /// Ditto T moveFront() { enforce(!empty); return _outer.moveAt(_a); } /// Ditto void popFront() { enforce(!empty); ++_a; } /// Ditto @property T back() { enforce(!empty); return _outer[_b - 1]; } /// Ditto @property void back(bool value) { enforce(!empty); _outer[_b - 1] = value; } /// Ditto T moveBack() { enforce(!empty); return _outer.moveAt(_b - 1); } /// Ditto void popBack() { enforce(!empty); --_b; } /// Ditto T opIndex(size_t i) { return _outer[_a + i]; } /// Ditto void opIndexAssign(T value, size_t i) { _outer[_a + i] = value; } /// Ditto T moveAt(size_t i) { return _outer.moveAt(_a + i); } /// Ditto @property size_t length() const { assert(_a <= _b); return _b - _a; } alias opDollar = length; /// ditto Range opSlice(size_t low, size_t high) { assert(_a <= low && low <= high && high <= _b); return Range(_outer, _a + low, _a + high); } } /** Property returning $(D true) if and only if the container has no elements. Complexity: $(BIGOH 1) */ @property bool empty() { return !length; } unittest { Array!bool a; //a._store._refCountedDebug = true; assert(a.empty); a.insertBack(false); assert(!a.empty); } /** Returns a duplicate of the container. The elements themselves are not transitively duplicated. Complexity: $(BIGOH n). */ @property Array dup() { Array result; result.insertBack(this[]); return result; } unittest { Array!bool a; assert(a.empty); auto b = a.dup; assert(b.empty); a.insertBack(true); assert(b.empty); } /** Returns the number of elements in the container. Complexity: $(BIGOH log(n)). */ @property size_t length() const { return _store.refCountedStore.isInitialized ? _store._length : 0; } size_t opDollar() const { return length; } unittest { import std.conv : to; Array!bool a; assert(a.length == 0); a.insert(true); assert(a.length == 1, to!string(a.length)); } /** Returns the maximum number of elements the container can store without (a) allocating memory, (b) invalidating iterators upon insertion. Complexity: $(BIGOH log(n)). */ @property size_t capacity() { return _store.refCountedStore.isInitialized ? cast(size_t) bitsPerWord * _store._backend.capacity : 0; } unittest { import std.conv : to; Array!bool a; assert(a.capacity == 0); foreach (i; 0 .. 100) { a.insert(true); assert(a.capacity >= a.length, to!string(a.capacity)); } } /** Ensures sufficient capacity to accommodate $(D n) elements. Postcondition: $(D capacity >= n) Complexity: $(BIGOH log(e - capacity)) if $(D e > capacity), otherwise $(BIGOH 1). */ void reserve(size_t e) { import std.conv : to; _store.refCountedStore.ensureInitialized(); _store._backend.reserve(to!size_t((e + bitsPerWord - 1) / bitsPerWord)); } unittest { Array!bool a; assert(a.capacity == 0); a.reserve(15657); assert(a.capacity >= 15657); } /** Returns a range that iterates over all elements of the container, in a container-defined order. The container should choose the most convenient and fast method of iteration for $(D opSlice()). Complexity: $(BIGOH log(n)) */ Range opSlice() { return Range(this, 0, length); } unittest { Array!bool a; a.insertBack([true, false, true, true]); assert(a[].length == 4); } /** Returns a range that iterates the container between two specified positions. Complexity: $(BIGOH log(n)) */ Range opSlice(size_t a, size_t b) { enforce(a <= b && b <= length); return Range(this, a, b); } unittest { Array!bool a; a.insertBack([true, false, true, true]); assert(a[0 .. 2].length == 2); } /** Equivalent to $(D opSlice().front) and $(D opSlice().back), respectively. Complexity: $(BIGOH log(n)) */ @property bool front() { enforce(!empty); return data.ptr[0] & 1; } /// Ditto @property void front(bool value) { enforce(!empty); if (value) data.ptr[0] |= 1; else data.ptr[0] &= ~cast(size_t) 1; } unittest { Array!bool a; a.insertBack([true, false, true, true]); assert(a.front); a.front = false; assert(!a.front); } /// Ditto @property bool back() { enforce(!empty); return cast(bool)(data.back & (cast(size_t)1 << ((_store._length - 1) % bitsPerWord))); } /// Ditto @property void back(bool value) { enforce(!empty); if (value) { data.back |= (cast(size_t)1 << ((_store._length - 1) % bitsPerWord)); } else { data.back &= ~(cast(size_t)1 << ((_store._length - 1) % bitsPerWord)); } } unittest { Array!bool a; a.insertBack([true, false, true, true]); assert(a.back); a.back = false; assert(!a.back); } /** Indexing operators yield or modify the value at a specified index. */ bool opIndex(size_t i) { auto div = cast(size_t) (i / bitsPerWord); auto rem = i % bitsPerWord; enforce(div < data.length); return cast(bool)(data.ptr[div] & (cast(size_t)1 << rem)); } /// ditto void opIndexAssign(bool value, size_t i) { auto div = cast(size_t) (i / bitsPerWord); auto rem = i % bitsPerWord; enforce(div < data.length); if (value) data.ptr[div] |= (cast(size_t)1 << rem); else data.ptr[div] &= ~(cast(size_t)1 << rem); } /// ditto void opIndexOpAssign(string op)(bool value, size_t i) { auto div = cast(size_t) (i / bitsPerWord); auto rem = i % bitsPerWord; enforce(div < data.length); auto oldValue = cast(bool) (data.ptr[div] & (cast(size_t)1 << rem)); // Do the deed auto newValue = mixin("oldValue "~op~" value"); // Write back the value if (newValue != oldValue) { if (newValue) data.ptr[div] |= (cast(size_t)1 << rem); else data.ptr[div] &= ~(cast(size_t)1 << rem); } } /// Ditto T moveAt(size_t i) { return this[i]; } unittest { Array!bool a; a.insertBack([true, false, true, true]); assert(a[0] && !a[1]); a[0] &= a[1]; assert(!a[0]); } /** Returns a new container that's the concatenation of $(D this) and its argument. Complexity: $(BIGOH n + m), where m is the number of elements in $(D stuff) */ Array!bool opBinary(string op, Stuff)(Stuff rhs) if (op == "~") { auto result = this; return result ~= rhs; } unittest { import std.algorithm : equal; Array!bool a; a.insertBack([true, false, true, true]); Array!bool b; b.insertBack([true, true, false, true]); assert(equal((a ~ b)[], [true, false, true, true, true, true, false, true])); } // /// ditto // TotalContainer opBinaryRight(Stuff, string op)(Stuff lhs) if (op == "~") // { // assert(0); // } /** Forwards to $(D insertAfter(this[], stuff)). */ // @@@BUG@@@ //ref Array!bool opOpAssign(string op, Stuff)(Stuff stuff) if (op == "~") Array!bool opOpAssign(string op, Stuff)(Stuff stuff) if (op == "~") { static if (is(typeof(stuff[]))) insertBack(stuff[]); else insertBack(stuff); return this; } unittest { import std.algorithm : equal; Array!bool a; a.insertBack([true, false, true, true]); Array!bool b; a.insertBack([false, true, false, true, true]); a ~= b; assert(equal( a[], [true, false, true, true, false, true, false, true, true])); } /** Removes all contents from the container. The container decides how $(D capacity) is affected. Postcondition: $(D empty) Complexity: $(BIGOH n) */ void clear() { this = Array(); } unittest { Array!bool a; a.insertBack([true, false, true, true]); a.clear(); assert(a.capacity == 0); } /** Sets the number of elements in the container to $(D newSize). If $(D newSize) is greater than $(D length), the added elements are added to the container and initialized with $(D ElementType.init). Complexity: $(BIGOH abs(n - newLength)) Postcondition: $(D _length == newLength) */ @property void length(size_t newLength) { import std.conv : to; _store.refCountedStore.ensureInitialized(); auto newDataLength = to!size_t((newLength + bitsPerWord - 1) / bitsPerWord); _store._backend.length = newDataLength; _store._length = newLength; } unittest { Array!bool a; a.length = 1057; assert(a.length == 1057); foreach (e; a) { assert(!e); } } /** Inserts $(D stuff) in the container. $(D stuff) can be a value convertible to $(D ElementType) or a range of objects convertible to $(D ElementType). The $(D stable) version guarantees that ranges iterating over the container are never invalidated. Client code that counts on non-invalidating insertion should use $(D stableInsert). Returns: The number of elements added. Complexity: $(BIGOH m * log(n)), where $(D m) is the number of elements in $(D stuff) */ alias insert = insertBack; ///ditto alias stableInsert = insertBack; /** Same as $(D insert(stuff)) and $(D stableInsert(stuff)) respectively, but relax the complexity constraint to linear. */ alias linearInsert = insertBack; ///ditto alias stableLinearInsert = insertBack; /** Picks one value in the container, removes it from the container, and returns it. The stable version behaves the same, but guarantees that ranges iterating over the container are never invalidated. Precondition: $(D !empty) Returns: The element removed. Complexity: $(BIGOH log(n)) */ T removeAny() { auto result = back; removeBack(); return result; } /// ditto alias stableRemoveAny = removeAny; unittest { Array!bool a; a.length = 1057; assert(!a.removeAny()); assert(a.length == 1056); foreach (e; a) { assert(!e); } } /** Inserts $(D value) to the back of the container. $(D stuff) can be a value convertible to $(D ElementType) or a range of objects convertible to $(D ElementType). The stable version behaves the same, but guarantees that ranges iterating over the container are never invalidated. Returns: The number of elements inserted Complexity: $(BIGOH log(n)) */ size_t insertBack(Stuff)(Stuff stuff) if (is(Stuff : bool)) { _store.refCountedStore.ensureInitialized(); auto rem = _store._length % bitsPerWord; if (rem) { // Fits within the current array if (stuff) { data[$ - 1] |= (1u << rem); } else { data[$ - 1] &= ~(1u << rem); } } else { // Need to add more data _store._backend.insertBack(stuff); } ++_store._length; return 1; } /// Ditto size_t insertBack(Stuff)(Stuff stuff) if (isInputRange!Stuff && is(ElementType!Stuff : bool)) { static if (!hasLength!Stuff) size_t result; for (; !stuff.empty; stuff.popFront()) { insertBack(stuff.front); static if (!hasLength!Stuff) ++result; } static if (!hasLength!Stuff) return result; else return stuff.length; } /// ditto alias stableInsertBack = insertBack; /** Removes the value at the front or back of the container. The stable version behaves the same, but guarantees that ranges iterating over the container are never invalidated. The optional parameter $(D howMany) instructs removal of that many elements. If $(D howMany > n), all elements are removed and no exception is thrown. Precondition: $(D !empty) Complexity: $(BIGOH log(n)). */ void removeBack() { enforce(_store._length); if (_store._length % bitsPerWord) { // Cool, just decrease the length --_store._length; } else { // Reduce the allocated space --_store._length; _store._backend.length = _store._backend.length - 1; } } /// ditto alias stableRemoveBack = removeBack; /** Removes $(D howMany) values at the front or back of the container. Unlike the unparameterized versions above, these functions do not throw if they could not remove $(D howMany) elements. Instead, if $(D howMany > n), all elements are removed. The returned value is the effective number of elements removed. The stable version behaves the same, but guarantees that ranges iterating over the container are never invalidated. Returns: The number of elements removed Complexity: $(BIGOH howMany * log(n)). */ /// ditto size_t removeBack(size_t howMany) { if (howMany >= length) { howMany = length; clear(); } else { length = length - howMany; } return howMany; } unittest { Array!bool a; a.length = 1057; assert(a.removeBack(1000) == 1000); assert(a.length == 57); foreach (e; a) { assert(!e); } } /** Inserts $(D stuff) before, after, or instead range $(D r), which must be a valid range previously extracted from this container. $(D stuff) can be a value convertible to $(D ElementType) or a range of objects convertible to $(D ElementType). The stable version behaves the same, but guarantees that ranges iterating over the container are never invalidated. Returns: The number of values inserted. Complexity: $(BIGOH n + m), where $(D m) is the length of $(D stuff) */ size_t insertBefore(Stuff)(Range r, Stuff stuff) { import std.algorithm : bringToFront; // TODO: make this faster, it moves one bit at a time immutable inserted = stableInsertBack(stuff); immutable tailLength = length - inserted; bringToFront( this[r._a .. tailLength], this[tailLength .. length]); return inserted; } /// ditto alias stableInsertBefore = insertBefore; unittest { import std.conv : to; Array!bool a; version (bugxxxx) { a._store.refCountedDebug = true; } a.insertBefore(a[], true); assert(a.length == 1, to!string(a.length)); a.insertBefore(a[], false); assert(a.length == 2, to!string(a.length)); } /// ditto size_t insertAfter(Stuff)(Range r, Stuff stuff) { import std.algorithm : bringToFront; // TODO: make this faster, it moves one bit at a time immutable inserted = stableInsertBack(stuff); immutable tailLength = length - inserted; bringToFront( this[r._b .. tailLength], this[tailLength .. length]); return inserted; } /// ditto alias stableInsertAfter = insertAfter; unittest { import std.conv : to; Array!bool a; a.length = 10; a.insertAfter(a[0 .. 5], true); assert(a.length == 11, to!string(a.length)); assert(a[5]); } /// ditto size_t replace(Stuff)(Range r, Stuff stuff) if (is(Stuff : bool)) { if (!r.empty) { // There is room r.front = stuff; r.popFront(); linearRemove(r); } else { // No room, must insert insertBefore(r, stuff); } return 1; } /// ditto alias stableReplace = replace; unittest { import std.conv : to; Array!bool a; a.length = 10; a.replace(a[3 .. 5], true); assert(a.length == 9, to!string(a.length)); assert(a[3]); } /** Removes all elements belonging to $(D r), which must be a range obtained originally from this container. The stable version behaves the same, but guarantees that ranges iterating over the container are never invalidated. Returns: A range spanning the remaining elements in the container that initially were right after $(D r). Complexity: $(BIGOH n) */ Range linearRemove(Range r) { import std.algorithm : copy; copy(this[r._b .. length], this[r._a .. length]); length = length - r.length; return this[r._a .. length]; } } unittest { Array!bool a; assert(a.empty); } unittest { Array!bool arr; arr.insert([false, false, false, false]); assert(arr.front == false); assert(arr.back == false); assert(arr[1] == false); auto slice = arr[]; slice = arr[0 .. $]; slice = slice[1 .. $]; slice.front = true; slice.back = true; slice[1] = true; assert(slice.front == true); assert(slice.back == true); assert(slice[1] == true); assert(slice.moveFront == true); assert(slice.moveBack == true); assert(slice.moveAt(1) == true); }
D
lib/parse.pp.ml: Array Filename Fstream List Matrix Printf Str Sys
D
/*************************************************************** matrix.h ***************************************************************/ module derelict.allegro.matrix; public import derelict.allegro.inline.matrix_inl; import derelict.allegro.fixed : fixed; import derelict.allegro.internal._export; struct MATRIX /* transformation matrix (fixed point) */ { fixed v[3][3]; /* scaling and rotation */ fixed t[3]; /* translation */ } struct MATRIX_f /* transformation matrix (floating point) */ { float v[3][3]; /* scaling and rotation */ float t[3]; /* translation */ } mixin(_export!( "extern (C) {" "extern MATRIX identity_matrix;" "extern MATRIX_f identity_matrix_f;" "}" )); extern (C) { void get_translation_matrix (MATRIX *m, fixed x, fixed y, fixed z); void get_translation_matrix_f (MATRIX_f *m, float x, float y, float z); void get_scaling_matrix (MATRIX *m, fixed x, fixed y, fixed z); void get_scaling_matrix_f (MATRIX_f *m, float x, float y, float z); void get_x_rotate_matrix (MATRIX *m, fixed r); void get_x_rotate_matrix_f (MATRIX_f *m, float r); void get_y_rotate_matrix (MATRIX *m, fixed r); void get_y_rotate_matrix_f (MATRIX_f *m, float r); void get_z_rotate_matrix (MATRIX *m, fixed r); void get_z_rotate_matrix_f (MATRIX_f *m, float r); void get_rotation_matrix (MATRIX *m, fixed x, fixed y, fixed z); void get_rotation_matrix_f (MATRIX_f *m, float x, float y, float z); void get_align_matrix (MATRIX *m, fixed xfront, fixed yfront, fixed zfront, fixed xup, fixed yup, fixed zup); void get_align_matrix_f (MATRIX_f *m, float xfront, float yfront, float zfront, float xup, float yup, float zup); void get_vector_rotation_matrix (MATRIX *m, fixed x, fixed y, fixed z, fixed a); void get_vector_rotation_matrix_f (MATRIX_f *m, float x, float y, float z, float a); void get_transformation_matrix (MATRIX *m, fixed scale, fixed xrot, fixed yrot, fixed zrot, fixed x, fixed y, fixed z); void get_transformation_matrix_f (MATRIX_f *m, float scale, float xrot, float yrot, float zrot, float x, float y, float z); void get_camera_matrix (MATRIX *m, fixed x, fixed y, fixed z, fixed xfront, fixed yfront, fixed zfront, fixed xup, fixed yup, fixed zup, fixed fov, fixed aspect); void get_camera_matrix_f (MATRIX_f *m, float x, float y, float z, float xfront, float yfront, float zfront, float xup, float yup, float zup, float fov, float aspect); void qtranslate_matrix (MATRIX *m, fixed x, fixed y, fixed z); void qtranslate_matrix_f (MATRIX_f *m, float x, float y, float z); void qscale_matrix (MATRIX *m, fixed scale); void qscale_matrix_f (MATRIX_f *m, float scale); void matrix_mul (in MATRIX *m1, in MATRIX *m2, MATRIX *_out); void matrix_mul_f (in MATRIX_f *m1, in MATRIX_f *m2, MATRIX_f *_out); void apply_matrix_f (MATRIX_f *m, float x, float y, float z, float *xout, float *yout, float *zout); } // extern (C)
D
module source.helper.prettyjson; import std.json; import std.conv; import std.range:repeat; string prettyPrint(JSONValue json, int indentLevel=0, string prefix="") { import std.range:appender; auto ret=appender!string; ret.put('\t'.repeat(indentLevel)); ret.put(prefix); //ret.put(' '.repeat(indentLevel*8)); final switch(json.type) { alias string_ = immutable(char)[]; case JSONType.null_: ret.put("<null>\n"); return ret.data; case JSONType.string: ret.put(json.str~"\n"); return ret.data; case JSONType.integer: ret.put(json.integer.to!string_~"\n"); return ret.data; case JSONType.uinteger: ret.put(json.uinteger.to!string_~"\n"); return ret.data; case JSONType.float_: ret.put(json.floating.to!string_~"\n"); return ret.data; case JSONType.true_: ret.put("true\n"); return ret.data; case JSONType.false_: ret.put("false\n"); return ret.data; case JSONType.object: ret.put("{\n"); foreach(key,value;json.object) ret.put(value.prettyPrint(indentLevel+1,key~" : ")); ret.put('\t'.repeat(indentLevel)); ret.put("}\n"); return ret.data; case JSONType.array: ret.put("[\n"); foreach(key;json.array) ret.put(prettyPrint(key,indentLevel+1)); ret.put('\t'.repeat(indentLevel)); ret.put("]\n"); return ret.data; } assert(0); }
D
module erlogtrisy2k.component; import erlogtrisy2k.gameobject; import derelict.sdl2.sdl; class Component { } class CPosition: Component { int x, y; this(int a, int b) { x = a; y = b; } this() { } }
D
/** * Compiler implementation of the * $(LINK2 http://www.dlang.org, D programming language). * * Copyright: Copyright (C) 1999-2018 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/dclass.d, _dclass.d) * Documentation: https://dlang.org/phobos/dmd_dclass.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/dclass.d */ module dmd.dclass; import core.stdc.stdio; import core.stdc.string; import dmd.aggregate; import dmd.arraytypes; import dmd.gluelayer; import dmd.declaration; import dmd.dscope; import dmd.dsymbol; import dmd.dsymbolsem; import dmd.func; import dmd.globals; import dmd.id; import dmd.identifier; import dmd.mtype; import dmd.root.rmem; import dmd.target; import dmd.visitor; enum Abstract : int { fwdref = 0, // whether an abstract class is not yet computed yes, // is abstract class no, // is not abstract class } /*********************************************************** */ struct BaseClass { Type type; // (before semantic processing) ClassDeclaration sym; uint offset; // 'this' pointer offset // for interfaces: Array of FuncDeclaration's making up the vtbl[] FuncDeclarations vtbl; // if BaseClass is an interface, these // are a copy of the InterfaceDeclaration.interfaces BaseClass[] baseInterfaces; extern (D) this(Type type) { //printf("BaseClass(this = %p, '%s')\n", this, type.toChars()); this.type = type; } /**************************************** * Fill in vtbl[] for base class based on member functions of class cd. * Input: * vtbl if !=NULL, fill it in * newinstance !=0 means all entries must be filled in by members * of cd, not members of any base classes of cd. * Returns: * true if any entries were filled in by members of cd (not exclusively * by base classes) */ extern (C++) bool fillVtbl(ClassDeclaration cd, FuncDeclarations* vtbl, int newinstance) { bool result = false; //printf("BaseClass.fillVtbl(this='%s', cd='%s')\n", sym.toChars(), cd.toChars()); if (vtbl) vtbl.setDim(sym.vtbl.dim); // first entry is ClassInfo reference for (size_t j = sym.vtblOffset(); j < sym.vtbl.dim; j++) { FuncDeclaration ifd = sym.vtbl[j].isFuncDeclaration(); FuncDeclaration fd; TypeFunction tf; //printf(" vtbl[%d] is '%s'\n", j, ifd ? ifd.toChars() : "null"); assert(ifd); // Find corresponding function in this class tf = ifd.type.toTypeFunction(); fd = cd.findFunc(ifd.ident, tf); if (fd && !fd.isAbstract()) { //printf(" found\n"); // Check that calling conventions match if (fd.linkage != ifd.linkage) fd.error("linkage doesn't match interface function"); // Check that it is current //printf("newinstance = %d fd.toParent() = %s ifd.toParent() = %s\n", //newinstance, fd.toParent().toChars(), ifd.toParent().toChars()); if (newinstance && fd.toParent() != cd && ifd.toParent() == sym) cd.error("interface function `%s` is not implemented", ifd.toFullSignature()); if (fd.toParent() == cd) result = true; } else { //printf(" not found %p\n", fd); // BUG: should mark this class as abstract? if (!cd.isAbstract()) cd.error("interface function `%s` is not implemented", ifd.toFullSignature()); fd = null; } if (vtbl) (*vtbl)[j] = fd; } return result; } extern (C++) void copyBaseInterfaces(BaseClasses* vtblInterfaces) { //printf("+copyBaseInterfaces(), %s\n", sym.toChars()); // if (baseInterfaces.length) // return; auto bc = cast(BaseClass*)mem.xcalloc(sym.interfaces.length, BaseClass.sizeof); baseInterfaces = bc[0 .. sym.interfaces.length]; //printf("%s.copyBaseInterfaces()\n", sym.toChars()); for (size_t i = 0; i < baseInterfaces.length; i++) { BaseClass* b = &baseInterfaces[i]; BaseClass* b2 = sym.interfaces[i]; assert(b2.vtbl.dim == 0); // should not be filled yet memcpy(b, b2, BaseClass.sizeof); if (i) // single inheritance is i==0 vtblInterfaces.push(b); // only need for M.I. b.copyBaseInterfaces(vtblInterfaces); } //printf("-copyBaseInterfaces\n"); } } struct ClassFlags { alias Type = uint; enum Enum : int { isCOMclass = 0x1, noPointers = 0x2, hasOffTi = 0x4, hasCtor = 0x8, hasGetMembers = 0x10, hasTypeInfo = 0x20, isAbstract = 0x40, isCPPclass = 0x80, hasDtor = 0x100, } alias isCOMclass = Enum.isCOMclass; alias noPointers = Enum.noPointers; alias hasOffTi = Enum.hasOffTi; alias hasCtor = Enum.hasCtor; alias hasGetMembers = Enum.hasGetMembers; alias hasTypeInfo = Enum.hasTypeInfo; alias isAbstract = Enum.isAbstract; alias isCPPclass = Enum.isCPPclass; alias hasDtor = Enum.hasDtor; } /** * The ClassKind enum is used in ClassDeclaration AST nodes * to specify the linkage type of the class or if it is an * anonymous class. If the class is anonymous it is also * considered to be a D class. */ enum ClassKind : int { /// the class is a d(efault) class d, /// the class is a C++ interface cpp, /// the class is an Objective-C class/interface objc, } /*********************************************************** */ extern (C++) class ClassDeclaration : AggregateDeclaration { extern (C++) __gshared { // Names found by reading object.d in druntime ClassDeclaration object; ClassDeclaration throwable; ClassDeclaration exception; ClassDeclaration errorException; ClassDeclaration cpp_type_info_ptr; // Object.__cpp_type_info_ptr } ClassDeclaration baseClass; // NULL only if this is Object FuncDeclaration staticCtor; FuncDeclaration staticDtor; Dsymbols vtbl; // Array of FuncDeclaration's making up the vtbl[] Dsymbols vtblFinal; // More FuncDeclaration's that aren't in vtbl[] // Array of BaseClass's; first is super, rest are Interface's BaseClasses* baseclasses; /* Slice of baseclasses[] that does not include baseClass */ BaseClass*[] interfaces; // array of base interfaces that have their own vtbl[] BaseClasses* vtblInterfaces; // the ClassInfo object for this ClassDeclaration TypeInfoClassDeclaration vclassinfo; // true if this is a COM class bool com; /// true if this is a scope class bool stack; /// specifies whether this is a D, C++, Objective-C or anonymous class/interface ClassKind classKind; /// to prevent recursive attempts private bool inuse; /// true if this class has an identifier, but was originally declared anonymous /// used in support of https://issues.dlang.org/show_bug.cgi?id=17371 private bool isActuallyAnonymous; Abstract isabstract; /// set the progress of base classes resolving Baseok baseok; Symbol* cpp_type_info_ptr_sym; // cached instance of class Id.cpp_type_info_ptr final extern (D) this(Loc loc, Identifier id, BaseClasses* baseclasses, Dsymbols* members, bool inObject) { if (!id) { id = Identifier.generateId("__anonclass"); isActuallyAnonymous = true; } assert(id); super(loc, id); static __gshared const(char)* msg = "only object.d can define this reserved class name"; if (baseclasses) { // Actually, this is a transfer this.baseclasses = baseclasses; } else this.baseclasses = new BaseClasses(); this.members = members; //printf("ClassDeclaration(%s), dim = %d\n", id.toChars(), this.baseclasses.dim); // For forward references type = new TypeClass(this); if (id) { // Look for special class names if (id == Id.__sizeof || id == Id.__xalignof || id == Id._mangleof) error("illegal class name"); // BUG: What if this is the wrong TypeInfo, i.e. it is nested? if (id.toChars()[0] == 'T') { if (id == Id.TypeInfo) { if (!inObject) error("%s", msg); Type.dtypeinfo = this; } if (id == Id.TypeInfo_Class) { if (!inObject) error("%s", msg); Type.typeinfoclass = this; } if (id == Id.TypeInfo_Interface) { if (!inObject) error("%s", msg); Type.typeinfointerface = this; } if (id == Id.TypeInfo_Struct) { if (!inObject) error("%s", msg); Type.typeinfostruct = this; } if (id == Id.TypeInfo_Pointer) { if (!inObject) error("%s", msg); Type.typeinfopointer = this; } if (id == Id.TypeInfo_Array) { if (!inObject) error("%s", msg); Type.typeinfoarray = this; } if (id == Id.TypeInfo_StaticArray) { //if (!inObject) // Type.typeinfostaticarray.error("%s", msg); Type.typeinfostaticarray = this; } if (id == Id.TypeInfo_AssociativeArray) { if (!inObject) error("%s", msg); Type.typeinfoassociativearray = this; } if (id == Id.TypeInfo_Enum) { if (!inObject) error("%s", msg); Type.typeinfoenum = this; } if (id == Id.TypeInfo_Function) { if (!inObject) error("%s", msg); Type.typeinfofunction = this; } if (id == Id.TypeInfo_Delegate) { if (!inObject) error("%s", msg); Type.typeinfodelegate = this; } if (id == Id.TypeInfo_Tuple) { if (!inObject) error("%s", msg); Type.typeinfotypelist = this; } if (id == Id.TypeInfo_Const) { if (!inObject) error("%s", msg); Type.typeinfoconst = this; } if (id == Id.TypeInfo_Invariant) { if (!inObject) error("%s", msg); Type.typeinfoinvariant = this; } if (id == Id.TypeInfo_Shared) { if (!inObject) error("%s", msg); Type.typeinfoshared = this; } if (id == Id.TypeInfo_Wild) { if (!inObject) error("%s", msg); Type.typeinfowild = this; } if (id == Id.TypeInfo_Vector) { if (!inObject) error("%s", msg); Type.typeinfovector = this; } } if (id == Id.Object) { if (!inObject) error("%s", msg); object = this; } if (id == Id.Throwable) { if (!inObject) error("%s", msg); throwable = this; } if (id == Id.Exception) { if (!inObject) error("%s", msg); exception = this; } if (id == Id.Error) { if (!inObject) error("%s", msg); errorException = this; } if (id == Id.cpp_type_info_ptr) { if (!inObject) error("%s", msg); cpp_type_info_ptr = this; } } baseok = Baseok.none; } static ClassDeclaration create(Loc loc, Identifier id, BaseClasses* baseclasses, Dsymbols* members, bool inObject) { return new ClassDeclaration(loc, id, baseclasses, members, inObject); } override Dsymbol syntaxCopy(Dsymbol s) { //printf("ClassDeclaration.syntaxCopy('%s')\n", toChars()); ClassDeclaration cd = s ? cast(ClassDeclaration)s : new ClassDeclaration(loc, ident, null, null, false); cd.storage_class |= storage_class; cd.baseclasses.setDim(this.baseclasses.dim); for (size_t i = 0; i < cd.baseclasses.dim; i++) { BaseClass* b = (*this.baseclasses)[i]; auto b2 = new BaseClass(b.type.syntaxCopy()); (*cd.baseclasses)[i] = b2; } return ScopeDsymbol.syntaxCopy(cd); } override Scope* newScope(Scope* sc) { auto sc2 = super.newScope(sc); if (isCOMclass()) { /* This enables us to use COM objects under Linux and * work with things like XPCOM */ sc2.linkage = Target.systemLinkage(); } return sc2; } /********************************************* * Determine if 'this' is a base class of cd. * This is used to detect circular inheritance only. */ final bool isBaseOf2(ClassDeclaration cd) { if (!cd) return false; //printf("ClassDeclaration.isBaseOf2(this = '%s', cd = '%s')\n", toChars(), cd.toChars()); for (size_t i = 0; i < cd.baseclasses.dim; i++) { BaseClass* b = (*cd.baseclasses)[i]; if (b.sym == this || isBaseOf2(b.sym)) return true; } return false; } enum OFFSET_RUNTIME = 0x76543210; enum OFFSET_FWDREF = 0x76543211; /******************************************* * Determine if 'this' is a base class of cd. */ bool isBaseOf(ClassDeclaration cd, int* poffset) { //printf("ClassDeclaration.isBaseOf(this = '%s', cd = '%s')\n", toChars(), cd.toChars()); if (poffset) *poffset = 0; while (cd) { /* cd.baseClass might not be set if cd is forward referenced. */ if (!cd.baseClass && cd.semanticRun < PASSsemanticdone && !cd.isInterfaceDeclaration()) { cd.dsymbolSemantic(null); if (!cd.baseClass && cd.semanticRun < PASSsemanticdone) cd.error("base class is forward referenced by `%s`", toChars()); } if (this == cd.baseClass) return true; cd = cd.baseClass; } return false; } /********************************************* * Determine if 'this' has complete base class information. * This is used to detect forward references in covariant overloads. */ final bool isBaseInfoComplete() const { return baseok >= Baseok.done; } override final Dsymbol search(Loc loc, Identifier ident, int flags = SearchLocalsOnly) { //printf("%s.ClassDeclaration.search('%s', flags=x%x)\n", toChars(), ident.toChars(), flags); //if (_scope) printf("%s baseok = %d\n", toChars(), baseok); if (_scope && baseok < Baseok.done) { if (!inuse) { // must semantic on base class/interfaces inuse = true; dsymbolSemantic(this, null); inuse = false; } } if (!members || !symtab) // opaque or addMember is not yet done { error("is forward referenced when looking for `%s`", ident.toChars()); //*(char*)0=0; return null; } auto s = ScopeDsymbol.search(loc, ident, flags); // don't search imports of base classes if (flags & SearchImportsOnly) return s; if (!s) { // Search bases classes in depth-first, left to right order for (size_t i = 0; i < baseclasses.dim; i++) { BaseClass* b = (*baseclasses)[i]; if (b.sym) { if (!b.sym.symtab) error("base `%s` is forward referenced", b.sym.ident.toChars()); else { import dmd.access : symbolIsVisible; s = b.sym.search(loc, ident, flags); if (!s) continue; else if (s == this) // happens if s is nested in this and derives from this s = null; else if (!(flags & IgnoreSymbolVisibility) && !(s.prot().kind == Prot.Kind.protected_) && !symbolIsVisible(this, s)) s = null; else break; } } } } return s; } /************************************ * Search base classes in depth-first, left-to-right order for * a class or interface named 'ident'. * Stops at first found. Does not look for additional matches. * Params: * ident = identifier to search for * Returns: * ClassDeclaration if found, null if not */ final ClassDeclaration searchBase(Identifier ident) { foreach (b; *baseclasses) { auto cdb = b.type.isClassHandle(); if (!cdb) // https://issues.dlang.org/show_bug.cgi?id=10616 return null; if (cdb.ident.equals(ident)) return cdb; auto result = cdb.searchBase(ident); if (result) return result; } return null; } final override void finalizeSize() { assert(sizeok != Sizeok.done); // Set the offsets of the fields and determine the size of the class if (baseClass) { assert(baseClass.sizeok == Sizeok.done); alignsize = baseClass.alignsize; structsize = baseClass.structsize; if (classKind == ClassKind.cpp && global.params.isWindows) structsize = (structsize + alignsize - 1) & ~(alignsize - 1); } else if (isInterfaceDeclaration()) { if (interfaces.length == 0) { alignsize = Target.ptrsize; structsize = Target.ptrsize; // allow room for __vptr } } else { alignsize = Target.ptrsize; structsize = Target.ptrsize; // allow room for __vptr if (classKind != ClassKind.cpp) structsize += Target.ptrsize; // allow room for __monitor } //printf("finalizeSize() %s, sizeok = %d\n", toChars(), sizeok); size_t bi = 0; // index into vtblInterfaces[] /**** * Runs through the inheritance graph to set the BaseClass.offset fields. * Recursive in order to account for the size of the interface classes, if they are * more than just interfaces. * Params: * cd = interface to look at * baseOffset = offset of where cd will be placed * Returns: * subset of instantiated size used by cd for interfaces */ uint membersPlace(ClassDeclaration cd, uint baseOffset) { //printf(" membersPlace(%s, %d)\n", cd.toChars(), baseOffset); uint offset = baseOffset; foreach (BaseClass* b; cd.interfaces) { if (b.sym.sizeok != Sizeok.done) b.sym.finalizeSize(); assert(b.sym.sizeok == Sizeok.done); if (!b.sym.alignsize) b.sym.alignsize = Target.ptrsize; alignmember(b.sym.alignsize, b.sym.alignsize, &offset); assert(bi < vtblInterfaces.dim); BaseClass* bv = (*vtblInterfaces)[bi]; if (b.sym.interfaces.length == 0) { //printf("\tvtblInterfaces[%d] b=%p b.sym = %s, offset = %d\n", bi, bv, bv.sym.toChars(), offset); bv.offset = offset; ++bi; // All the base interfaces down the left side share the same offset for (BaseClass* b2 = bv; b2.baseInterfaces.length; ) { b2 = &b2.baseInterfaces[0]; b2.offset = offset; //printf("\tvtblInterfaces[%d] b=%p sym = %s, offset = %d\n", bi, b2, b2.sym.toChars(), b2.offset); } } membersPlace(b.sym, offset); //printf(" %s size = %d\n", b.sym.toChars(), b.sym.structsize); offset += b.sym.structsize; if (alignsize < b.sym.alignsize) alignsize = b.sym.alignsize; } return offset - baseOffset; } structsize += membersPlace(this, structsize); if (isInterfaceDeclaration()) { sizeok = Sizeok.done; return; } // FIXME: Currently setFieldOffset functions need to increase fields // to calculate each variable offsets. It can be improved later. fields.setDim(0); uint offset = structsize; foreach (s; *members) { s.setFieldOffset(this, &offset, false); } sizeok = Sizeok.done; // Calculate fields[i].overlapped checkOverlappedFields(); } override bool isAnonymous() { return isActuallyAnonymous; } final bool isFuncHidden(FuncDeclaration fd) { //printf("ClassDeclaration.isFuncHidden(class = %s, fd = %s)\n", toChars(), fd.toPrettyChars()); Dsymbol s = search(Loc(), fd.ident, IgnoreAmbiguous | IgnoreErrors); if (!s) { //printf("not found\n"); /* Because, due to a hack, if there are multiple definitions * of fd.ident, NULL is returned. */ return false; } s = s.toAlias(); if (auto os = s.isOverloadSet()) { foreach (sm; os.a) { auto fm = sm.isFuncDeclaration(); if (overloadApply(fm, s => fd == s.isFuncDeclaration())) return false; } return true; } else { auto f = s.isFuncDeclaration(); //printf("%s fdstart = %p\n", s.kind(), fdstart); if (overloadApply(f, s => fd == s.isFuncDeclaration())) return false; return !fd.parent.isTemplateMixin(); } } /**************** * Find virtual function matching identifier and type. * Used to build virtual function tables for interface implementations. * Params: * ident = function's identifier * tf = function's type * Returns: * function symbol if found, null if not * Errors: * prints error message if more than one match */ final FuncDeclaration findFunc(Identifier ident, TypeFunction tf) { //printf("ClassDeclaration.findFunc(%s, %s) %s\n", ident.toChars(), tf.toChars(), toChars()); FuncDeclaration fdmatch = null; FuncDeclaration fdambig = null; void searchVtbl(ref Dsymbols vtbl) { foreach (s; vtbl) { auto fd = s.isFuncDeclaration(); if (!fd) continue; // the first entry might be a ClassInfo //printf("\t[%d] = %s\n", i, fd.toChars()); if (ident == fd.ident && fd.type.covariant(tf) == 1) { //printf("fd.parent.isClassDeclaration() = %p\n", fd.parent.isClassDeclaration()); if (!fdmatch) goto Lfd; if (fd == fdmatch) goto Lfdmatch; { // Function type matching: exact > covariant MATCH m1 = tf.equals(fd.type) ? MATCH.exact : MATCH.nomatch; MATCH m2 = tf.equals(fdmatch.type) ? MATCH.exact : MATCH.nomatch; if (m1 > m2) goto Lfd; else if (m1 < m2) goto Lfdmatch; } { MATCH m1 = (tf.mod == fd.type.mod) ? MATCH.exact : MATCH.nomatch; MATCH m2 = (tf.mod == fdmatch.type.mod) ? MATCH.exact : MATCH.nomatch; if (m1 > m2) goto Lfd; else if (m1 < m2) goto Lfdmatch; } { // The way of definition: non-mixin > mixin MATCH m1 = fd.parent.isClassDeclaration() ? MATCH.exact : MATCH.nomatch; MATCH m2 = fdmatch.parent.isClassDeclaration() ? MATCH.exact : MATCH.nomatch; if (m1 > m2) goto Lfd; else if (m1 < m2) goto Lfdmatch; } fdambig = fd; //printf("Lambig fdambig = %s %s [%s]\n", fdambig.toChars(), fdambig.type.toChars(), fdambig.loc.toChars()); continue; Lfd: fdmatch = fd; fdambig = null; //printf("Lfd fdmatch = %s %s [%s]\n", fdmatch.toChars(), fdmatch.type.toChars(), fdmatch.loc.toChars()); continue; Lfdmatch: continue; } //else printf("\t\t%d\n", fd.type.covariant(tf)); } } searchVtbl(vtbl); for (auto cd = this; cd; cd = cd.baseClass) { searchVtbl(cd.vtblFinal); } if (fdambig) error("ambiguous virtual function `%s`", fdambig.toChars()); return fdmatch; } /**************************************** */ final bool isCOMclass() const { return com; } bool isCOMinterface() const { return false; } final bool isCPPclass() const { return classKind == ClassKind.cpp; } bool isCPPinterface() const { return false; } /**************************************** */ final bool isAbstract() { enum log = false; if (isabstract != Abstract.fwdref) return isabstract == Abstract.yes; if (log) printf("isAbstract(%s)\n", toChars()); bool no() { if (log) printf("no\n"); isabstract = Abstract.no; return false; } bool yes() { if (log) printf("yes\n"); isabstract = Abstract.yes; return true; } if (storage_class & STC.abstract_ || _scope && _scope.stc & STC.abstract_) return yes(); if (errors) return no(); /* https://issues.dlang.org/show_bug.cgi?id=11169 * Resolve forward references to all class member functions, * and determine whether this class is abstract. */ extern (C++) static int func(Dsymbol s, void* param) { auto fd = s.isFuncDeclaration(); if (!fd) return 0; if (fd.storage_class & STC.static_) return 0; if (fd.isAbstract()) return 1; return 0; } for (size_t i = 0; i < members.dim; i++) { auto s = (*members)[i]; if (s.apply(&func, cast(void*)this)) { return yes(); } } /* If the base class is not abstract, then this class cannot * be abstract. */ if (!isInterfaceDeclaration() && (!baseClass || !baseClass.isAbstract())) return no(); /* If any abstract functions are inherited, but not overridden, * then the class is abstract. Do this by checking the vtbl[]. * Need to do semantic() on class to fill the vtbl[]. */ this.dsymbolSemantic(null); /* The next line should work, but does not because when ClassDeclaration.dsymbolSemantic() * is called recursively it can set PASSsemanticdone without finishing it. */ //if (semanticRun < PASSsemanticdone) { /* Could not complete semantic(). Try running semantic() on * each of the virtual functions, * which will fill in the vtbl[] overrides. */ extern (C++) static int virtualSemantic(Dsymbol s, void* param) { auto fd = s.isFuncDeclaration(); if (fd && !(fd.storage_class & STC.static_) && !fd.isUnitTestDeclaration()) fd.dsymbolSemantic(null); return 0; } for (size_t i = 0; i < members.dim; i++) { auto s = (*members)[i]; s.apply(&virtualSemantic, cast(void*)this); } } /* Finally, check the vtbl[] */ foreach (i; 1 .. vtbl.dim) { auto fd = vtbl[i].isFuncDeclaration(); //if (fd) printf("\tvtbl[%d] = [%s] %s\n", i, fd.loc.toChars(), fd.toPrettyChars()); if (!fd || fd.isAbstract()) { return yes(); } } return no(); } /**************************************** * Determine if slot 0 of the vtbl[] is reserved for something else. * For class objects, yes, this is where the classinfo ptr goes. * For COM interfaces, no. * For non-COM interfaces, yes, this is where the Interface ptr goes. * Returns: * 0 vtbl[0] is first virtual function pointer * 1 vtbl[0] is classinfo/interfaceinfo pointer */ int vtblOffset() const { return classKind == ClassKind.cpp ? 0 : 1; } /**************************************** */ override const(char)* kind() const { return "class"; } /**************************************** */ override final void addLocalClass(ClassDeclarations* aclasses) { aclasses.push(this); } // Back end Symbol* vtblsym; override final inout(ClassDeclaration) isClassDeclaration() inout { return this; } override void accept(Visitor v) { v.visit(this); } } /*********************************************************** */ extern (C++) final class InterfaceDeclaration : ClassDeclaration { extern (D) this(Loc loc, Identifier id, BaseClasses* baseclasses) { super(loc, id, baseclasses, null, false); if (id == Id.IUnknown) // IUnknown is the root of all COM interfaces { com = true; classKind = ClassKind.cpp; // IUnknown is also a C++ interface } } override Dsymbol syntaxCopy(Dsymbol s) { InterfaceDeclaration id = s ? cast(InterfaceDeclaration)s : new InterfaceDeclaration(loc, ident, null); return ClassDeclaration.syntaxCopy(id); } override Scope* newScope(Scope* sc) { auto sc2 = super.newScope(sc); if (com) sc2.linkage = LINKwindows; else if (classKind == ClassKind.cpp) sc2.linkage = LINKcpp; else if (classKind == ClassKind.objc) sc2.linkage = LINKobjc; return sc2; } /******************************************* * Determine if 'this' is a base class of cd. * (Actually, if it is an interface supported by cd) * Output: * *poffset offset to start of class * OFFSET_RUNTIME must determine offset at runtime * Returns: * false not a base * true is a base */ override bool isBaseOf(ClassDeclaration cd, int* poffset) { //printf("%s.InterfaceDeclaration.isBaseOf(cd = '%s')\n", toChars(), cd.toChars()); assert(!baseClass); foreach (j, b; cd.interfaces) { //printf("\tX base %s\n", b.sym.toChars()); if (this == b.sym) { //printf("\tfound at offset %d\n", b.offset); if (poffset) { // don't return incorrect offsets // https://issues.dlang.org/show_bug.cgi?id=16980 *poffset = cd.sizeok == Sizeok.done ? b.offset : OFFSET_FWDREF; } // printf("\tfound at offset %d\n", b.offset); return true; } if (isBaseOf(b, poffset)) return true; } if (cd.baseClass && isBaseOf(cd.baseClass, poffset)) return true; if (poffset) *poffset = 0; return false; } bool isBaseOf(BaseClass* bc, int* poffset) { //printf("%s.InterfaceDeclaration.isBaseOf(bc = '%s')\n", toChars(), bc.sym.toChars()); for (size_t j = 0; j < bc.baseInterfaces.length; j++) { BaseClass* b = &bc.baseInterfaces[j]; //printf("\tY base %s\n", b.sym.toChars()); if (this == b.sym) { //printf("\tfound at offset %d\n", b.offset); if (poffset) { *poffset = b.offset; } return true; } if (isBaseOf(b, poffset)) { return true; } } if (poffset) *poffset = 0; return false; } /******************************************* */ override const(char)* kind() const { return "interface"; } /**************************************** * Determine if slot 0 of the vtbl[] is reserved for something else. * For class objects, yes, this is where the ClassInfo ptr goes. * For COM interfaces, no. * For non-COM interfaces, yes, this is where the Interface ptr goes. */ override int vtblOffset() const { if (isCOMinterface() || isCPPinterface()) return 0; return 1; } override bool isCPPinterface() const { return classKind == ClassKind.cpp; } override bool isCOMinterface() const { return com; } override inout(InterfaceDeclaration) isInterfaceDeclaration() inout { return this; } override void accept(Visitor v) { v.visit(this); } }
D
// Written in the D programming language. /++ This module defines functions related to exceptions and general error handling. It also defines functions intended to aid in unit testing. Synopsis of some of std.exception's functions: -------------------- string synopsis() { FILE* f = enforce(fopen("some/file")); // f is not null from here on FILE* g = enforceEx!WriteException(fopen("some/other/file", "w")); // g is not null from here on Exception e = collectException(write(g, readln(f))); if (e) { ... an exception occurred... ... We have the exception to play around with... } string msg = collectExceptionMsg(write(g, readln(f))); if (msg) { ... an exception occurred... ... We have the message from the exception but not the exception... } char[] line; enforce(readln(f, line)); return assumeUnique(line); } -------------------- Macros: WIKI = Phobos/StdException Copyright: Copyright Andrei Alexandrescu 2008-, 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/_exception.d) +/ module std.exception; import std.array, std.c.string, std.conv, std.range, std.string, std.traits; import core.exception, core.stdc.errno; /++ Asserts that the given expression does $(I not) throw the given type of $(D Throwable). If a $(D Throwable) of the given type is thrown, it is caught and does not escape assertNotThrown. Rather, an $(D AssertError) is thrown. However, any other $(D Throwable)s will escape. Params: T = The $(D Throwable) to test for. expression = The expression to test. msg = Optional message to output on test failure. If msg is empty, and the thrown exception has a non-empty msg field, the exception's msg field will be output on test failure. file = The file where the error occurred. Defaults to $(D __FILE__). line = The line where the error occurred. Defaults to $(D __LINE__). Throws: $(D AssertError) if the given $(D Throwable) is thrown. +/ void assertNotThrown(T : Throwable = Exception, E) (lazy E expression, string msg = null, string file = __FILE__, size_t line = __LINE__) { try { expression(); } catch (T t) { immutable message = msg.empty ? t.msg : msg; immutable tail = message.empty ? "." : ": " ~ message; throw new AssertError(format("assertNotThrown failed: %s was thrown%s", T.stringof, tail), file, line, t); } } /// unittest { assertNotThrown!StringException(enforceEx!StringException(true, "Error!")); //Exception is the default. assertNotThrown(enforceEx!StringException(true, "Error!")); assert(collectExceptionMsg!AssertError(assertNotThrown!StringException( enforceEx!StringException(false, "Error!"))) == `assertNotThrown failed: StringException was thrown: Error!`); } unittest { assert(collectExceptionMsg!AssertError(assertNotThrown!StringException( enforceEx!StringException(false, ""), "Error!")) == `assertNotThrown failed: StringException was thrown: Error!`); assert(collectExceptionMsg!AssertError(assertNotThrown!StringException( enforceEx!StringException(false, ""))) == `assertNotThrown failed: StringException was thrown.`); assert(collectExceptionMsg!AssertError(assertNotThrown!StringException( enforceEx!StringException(false, ""), "")) == `assertNotThrown failed: StringException was thrown.`); } unittest { void throwEx(Throwable t) { throw t; } void nothrowEx() { } try { assertNotThrown!Exception(nothrowEx()); } catch (AssertError) assert(0); try { assertNotThrown!Exception(nothrowEx(), "It's a message"); } catch (AssertError) assert(0); try { assertNotThrown!AssertError(nothrowEx()); } catch (AssertError) assert(0); try { assertNotThrown!AssertError(nothrowEx(), "It's a message"); } catch (AssertError) assert(0); { bool thrown = false; try { assertNotThrown!Exception( throwEx(new Exception("It's an Exception"))); } catch (AssertError) thrown = true; assert(thrown); } { bool thrown = false; try { assertNotThrown!Exception( throwEx(new Exception("It's an Exception")), "It's a message"); } catch (AssertError) thrown = true; assert(thrown); } { bool thrown = false; try { assertNotThrown!AssertError( throwEx(new AssertError("It's an AssertError", __FILE__, __LINE__))); } catch (AssertError) thrown = true; assert(thrown); } { bool thrown = false; try { assertNotThrown!AssertError( throwEx(new AssertError("It's an AssertError", __FILE__, __LINE__)), "It's a message"); } catch (AssertError) thrown = true; assert(thrown); } } /++ Asserts that the given expression throws the given type of $(D Throwable). The $(D Throwable) is caught and does not escape assertThrown. However, any other $(D Throwable)s $(I will) escape, and if no $(D Throwable) of the given type is thrown, then an $(D AssertError) is thrown. Params: T = The $(D Throwable) to test for. expression = The expression to test. msg = Optional message to output on test failure. file = The file where the error occurred. Defaults to $(D __FILE__). line = The line where the error occurred. Defaults to $(D __LINE__). Throws: $(D AssertError) if the given $(D Throwable) is not thrown. +/ void assertThrown(T : Throwable = Exception, E) (lazy E expression, string msg = null, string file = __FILE__, size_t line = __LINE__) { try expression(); catch (T) return; throw new AssertError(format("assertThrown failed: No %s was thrown%s%s", T.stringof, msg.empty ? "." : ": ", msg), file, line); } /// unittest { assertThrown!StringException(enforceEx!StringException(false, "Error!")); //Exception is the default. assertThrown(enforceEx!StringException(false, "Error!")); assert(collectExceptionMsg!AssertError(assertThrown!StringException( enforceEx!StringException(true, "Error!"))) == `assertThrown failed: No StringException was thrown.`); } unittest { void throwEx(Throwable t) { throw t; } void nothrowEx() { } try { assertThrown!Exception(throwEx(new Exception("It's an Exception"))); } catch (AssertError) assert(0); try { assertThrown!Exception(throwEx(new Exception("It's an Exception")), "It's a message"); } catch(AssertError) assert(0); try { assertThrown!AssertError(throwEx(new AssertError("It's an AssertError", __FILE__, __LINE__))); } catch (AssertError) assert(0); try { assertThrown!AssertError(throwEx(new AssertError("It's an AssertError", __FILE__, __LINE__)), "It's a message"); } catch (AssertError) assert(0); { bool thrown = false; try assertThrown!Exception(nothrowEx()); catch(AssertError) thrown = true; assert(thrown); } { bool thrown = false; try assertThrown!Exception(nothrowEx(), "It's a message"); catch(AssertError) thrown = true; assert(thrown); } { bool thrown = false; try assertThrown!AssertError(nothrowEx()); catch(AssertError) thrown = true; assert(thrown); } { bool thrown = false; try assertThrown!AssertError(nothrowEx(), "It's a message"); catch(AssertError) thrown = true; assert(thrown); } } /++ If $(D !!value) is true, $(D value) is returned. Otherwise, $(D new Exception(msg)) is thrown. Note: $(D enforce) is used to throw exceptions and is therefore intended to aid in error handling. It is $(I not) intended for verifying the logic of your program. That is what $(D assert) is for. Also, do not use $(D enforce) inside of contracts (i.e. inside of $(D in) and $(D out) blocks and $(D invariant)s), because they will be compiled out when compiling with $(I -release). Use $(D assert) in contracts. Example: -------------------- auto f = enforce(fopen("data.txt")); auto line = readln(f); enforce(line.length, "Expected a non-empty line."); -------------------- +/ T enforce(T)(T value, lazy const(char)[] msg = null, string file = __FILE__, size_t line = __LINE__) if (is(typeof({ if (!value) {} }))) { if (!value) bailOut(file, line, msg); return value; } /++ $(RED Scheduled for deprecation in January 2013. If passing the file or line number explicitly, please use the version of enforce which takes them as function arguments. Taking them as template arguments causes unnecessary template bloat.) +/ T enforce(T, string file, size_t line = __LINE__) (T value, lazy const(char)[] msg = null) if (is(typeof({ if (!value) {} }))) { if (!value) bailOut(file, line, msg); return value; } /++ If $(D !!value) is true, $(D value) is returned. Otherwise, the given delegate is called. The whole safety and purity are inferred from $(D Dg)'s safety and purity. +/ T enforce(T, Dg, string file = __FILE__, size_t line = __LINE__) (T value, scope Dg dg) if (isSomeFunction!Dg && is(typeof( dg() )) && is(typeof({ if (!value) {} }))) { if (!value) dg(); return value; } private void bailOut(string file, size_t line, in char[] msg) @safe pure { throw new Exception(msg.ptr ? msg.idup : "Enforcement failed", file, line); } unittest { assert (enforce(123) == 123); try { enforce(false, "error"); assert (false); } catch (Exception e) { assert (e.msg == "error"); assert (e.file == __FILE__); assert (e.line == __LINE__-7); } } unittest { // Issue 10510 extern(C) void cFoo() { } enforce(false, &cFoo); } // purity and safety inference test unittest { import std.typetuple; foreach (EncloseSafe; TypeTuple!(false, true)) foreach (EnclosePure; TypeTuple!(false, true)) { foreach (BodySafe; TypeTuple!(false, true)) foreach (BodyPure; TypeTuple!(false, true)) { enum code = "delegate void() " ~ (EncloseSafe ? "@safe " : "") ~ (EnclosePure ? "pure " : "") ~ "{ enforce(true, { " ~ "int n; " ~ (BodySafe ? "" : "auto p = &n + 10; " ) ~ // unsafe code (BodyPure ? "" : "static int g; g = 10; ") ~ // impure code "}); " ~ "}"; enum expect = (BodySafe || !EncloseSafe) && (!EnclosePure || BodyPure); version(none) pragma(msg, "safe = ", EncloseSafe?1:0, "/", BodySafe?1:0, ", ", "pure = ", EnclosePure?1:0, "/", BodyPure?1:0, ", ", "expect = ", expect?"OK":"NG", ", ", "code = ", code); static assert(__traits(compiles, mixin(code)()) == expect); } } } // Test for bugzilla 8637 unittest { struct S { static int g; ~this() {} // impure & unsafe destructor bool opCast(T:bool)() { int* p = cast(int*)0; // unsafe operation int n = g; // impure operation return true; } } S s; enforce(s); enforce!(S, __FILE__, __LINE__)(s, ""); // scheduled for deprecation enforce(s, {}); enforce(s, new Exception("")); errnoEnforce(s); alias Exception E1; static class E2 : Exception { this(string fn, size_t ln) { super("", fn, ln); } } static class E3 : Exception { this(string msg) { super(msg, __FILE__, __LINE__); } } enforceEx!E1(s); enforceEx!E2(s); } /++ If $(D !!value) is true, $(D value) is returned. Otherwise, $(D ex) is thrown. Example: -------------------- auto f = enforce(fopen("data.txt")); auto line = readln(f); enforce(line.length, new IOException); // expect a non-empty line -------------------- +/ T enforce(T)(T value, lazy Throwable ex) { if (!value) throw ex(); return value; } unittest { assertNotThrown(enforce(true, new Exception("this should not be thrown"))); assertThrown(enforce(false, new Exception("this should be thrown"))); } /++ If $(D !!value) is true, $(D value) is returned. Otherwise, $(D new ErrnoException(msg)) is thrown. $(D ErrnoException) assumes that the last operation set $(D errno) to an error code. Example: -------------------- auto f = errnoEnforce(fopen("data.txt")); auto line = readln(f); enforce(line.length); // expect a non-empty line -------------------- +/ T errnoEnforce(T, string file = __FILE__, size_t line = __LINE__) (T value, lazy string msg = null) { if (!value) throw new ErrnoException(msg, file, line); return value; } /++ If $(D !!value) is $(D true), $(D value) is returned. Otherwise, $(D new E(msg, file, line)) is thrown. Or if $(D E) doesn't take a message and can be constructed with $(D new E(file, line)), then $(D new E(file, line)) will be thrown. Example: -------------------- auto f = enforceEx!FileMissingException(fopen("data.txt")); auto line = readln(f); enforceEx!DataCorruptionException(line.length); -------------------- +/ template enforceEx(E) if (is(typeof(new E("", __FILE__, __LINE__)))) { T enforceEx(T)(T value, lazy string msg = "", string file = __FILE__, size_t line = __LINE__) { if (!value) throw new E(msg, file, line); return value; } } template enforceEx(E) if (is(typeof(new E(__FILE__, __LINE__))) && !is(typeof(new E("", __FILE__, __LINE__)))) { T enforceEx(T)(T value, string file = __FILE__, size_t line = __LINE__) { if (!value) throw new E(file, line); return value; } } unittest { assertNotThrown(enforceEx!Exception(true)); assertNotThrown(enforceEx!Exception(true, "blah")); assertNotThrown(enforceEx!OutOfMemoryError(true)); { auto e = collectException(enforceEx!Exception(false)); assert(e !is null); assert(e.msg.empty); assert(e.file == __FILE__); assert(e.line == __LINE__ - 4); } { auto e = collectException(enforceEx!Exception(false, "hello", "file", 42)); assert(e !is null); assert(e.msg == "hello"); assert(e.file == "file"); assert(e.line == 42); } } unittest { alias enforceEx!Exception enf; assertNotThrown(enf(true)); assertThrown(enf(false, "blah")); } /++ Catches and returns the exception thrown from the given expression. If no exception is thrown, then null is returned and $(D result) is set to the result of the expression. Note that while $(D collectException) $(I can) be used to collect any $(D Throwable) and not just $(D Exception)s, it is generally ill-advised to catch anything that is neither an $(D Exception) nor a type derived from $(D Exception). So, do not use $(D collectException) to collect non-$(D Exception)s unless you're sure that that's what you really want to do. Params: T = The type of exception to catch. expression = The expression which may throw an exception. result = The result of the expression if no exception is thrown. +/ T collectException(T = Exception, E)(lazy E expression, ref E result) { try { result = expression(); } catch (T e) { return e; } return null; } /// unittest { int b; int foo() { throw new Exception("blah"); } assert(collectException(foo(), b)); int[] a = new int[3]; import core.exception : RangeError; assert(collectException!RangeError(a[4], b)); } /++ Catches and returns the exception thrown from the given expression. If no exception is thrown, then null is returned. $(D E) can be $(D void). Note that while $(D collectException) $(I can) be used to collect any $(D Throwable) and not just $(D Exception)s, it is generally ill-advised to catch anything that is neither an $(D Exception) nor a type derived from $(D Exception). So, do not use $(D collectException) to collect non-$(D Exception)s unless you're sure that that's what you really want to do. Params: T = The type of exception to catch. expression = The expression which may throw an exception. +/ T collectException(T : Throwable = Exception, E)(lazy E expression) { try { expression(); } catch (T t) { return t; } return null; } unittest { int foo() { throw new Exception("blah"); } assert(collectException(foo())); } /++ Catches the exception thrown from the given expression and returns the msg property of that exception. If no exception is thrown, then null is returned. $(D E) can be $(D void). If an exception is thrown but it has an empty message, then $(D emptyExceptionMsg) is returned. Note that while $(D collectExceptionMsg) $(I can) be used to collect any $(D Throwable) and not just $(D Exception)s, it is generally ill-advised to catch anything that is neither an $(D Exception) nor a type derived from $(D Exception). So, do not use $(D collectExceptionMsg) to collect non-$(D Exception)s unless you're sure that that's what you really want to do. Params: T = The type of exception to catch. expression = The expression which may throw an exception. +/ string collectExceptionMsg(T = Exception, E)(lazy E expression) { try { expression(); return cast(string)null; } catch(T e) return e.msg.empty ? emptyExceptionMsg : e.msg; } /// unittest { void throwFunc() { throw new Exception("My Message."); } assert(collectExceptionMsg(throwFunc()) == "My Message."); void nothrowFunc() {} assert(collectExceptionMsg(nothrowFunc()) is null); void throwEmptyFunc() { throw new Exception(""); } assert(collectExceptionMsg(throwEmptyFunc()) == emptyExceptionMsg); } /++ Value that collectExceptionMsg returns when it catches an exception with an empty exception message. +/ enum emptyExceptionMsg = "<Empty Exception Message>"; /** * Casts a mutable array to an immutable array in an idiomatic * manner. Technically, $(D assumeUnique) just inserts a cast, * but its name documents assumptions on the part of the * caller. $(D assumeUnique(arr)) should only be called when * there are no more active mutable aliases to elements of $(D * arr). To strenghten this assumption, $(D assumeUnique(arr)) * also clears $(D arr) before returning. Essentially $(D * assumeUnique(arr)) indicates commitment from the caller that there * is no more mutable access to any of $(D arr)'s elements * (transitively), and that all future accesses will be done through * the immutable array returned by $(D assumeUnique). * * Typically, $(D assumeUnique) is used to return arrays from * functions that have allocated and built them. * * Example: * * ---- * string letters() * { * char[] result = new char['z' - 'a' + 1]; * foreach (i, ref e; result) * { * e = 'a' + i; * } * return assumeUnique(result); * } * ---- * * The use in the example above is correct because $(D result) * was private to $(D letters) and is unaccessible in writing * after the function returns. The following example shows an * incorrect use of $(D assumeUnique). * * Bad: * * ---- * private char[] buffer; * string letters(char first, char last) * { * if (first >= last) return null; // fine * auto sneaky = buffer; * sneaky.length = last - first + 1; * foreach (i, ref e; sneaky) * { * e = 'a' + i; * } * return assumeUnique(sneaky); // BAD * } * ---- * * The example above wreaks havoc on client code because it is * modifying arrays that callers considered immutable. To obtain an * immutable array from the writable array $(D buffer), replace * the last line with: * ---- * return to!(string)(sneaky); // not that sneaky anymore * ---- * * The call will duplicate the array appropriately. * * Checking for uniqueness during compilation is possible in certain * cases (see the $(D unique) and $(D lent) keywords in * the $(WEB archjava.fluid.cs.cmu.edu/papers/oopsla02.pdf, ArchJava) * language), but complicates the language considerably. The downside * of $(D assumeUnique)'s convention-based usage is that at this * time there is no formal checking of the correctness of the * assumption; on the upside, the idiomatic use of $(D * assumeUnique) is simple and rare enough to be tolerable. * */ immutable(T)[] assumeUnique(T)(T[] array) pure nothrow { return .assumeUnique(array); // call ref version } /// ditto immutable(T)[] assumeUnique(T)(ref T[] array) pure nothrow { auto result = cast(immutable(T)[]) array; array = null; return result; } unittest { int[] arr = new int[1]; auto arr1 = assumeUnique(arr); assert(is(typeof(arr1) == immutable(int)[]) && arr == null); } immutable(T[U]) assumeUnique(T, U)(ref T[U] array) pure nothrow { auto result = cast(immutable(T[U])) array; array = null; return result; } // @@@BUG@@@ version(none) unittest { int[string] arr = ["a":1]; auto arr1 = assumeUnique(arr); assert(is(typeof(arr1) == immutable(int[string])) && arr == null); } /** * Wraps a possibly-throwing expression in a $(D nothrow) wrapper so that it * can be called by a $(D nothrow) function. * * This wrapper function documents commitment on the part of the caller that * the appropriate steps have been taken to avoid whatever conditions may * trigger an exception during the evaluation of $(D expr). If it turns out * that the expression $(I does) throw at runtime, the wrapper will throw an * $(D AssertError). * * (Note that $(D Throwable) objects such as $(D AssertError) that do not * subclass $(D Exception) may be thrown even from $(D nothrow) functions, * since they are considered to be serious runtime problems that cannot be * recovered from.) */ T assumeWontThrow(T)(lazy T expr, string msg = null, string file = __FILE__, size_t line = __LINE__) nothrow { try { return expr; } catch(Exception e) { immutable tail = msg.empty ? "." : ": " ~ msg; throw new AssertError("assumeWontThrow failed: Expression did throw" ~ tail, file, line); } } /// unittest { import std.math : sqrt; // This function may throw. int squareRoot(int x) { if (x < 0) throw new Exception("Tried to take root of negative number"); return cast(int)sqrt(cast(double)x); } // This function never throws. int computeLength(int x, int y) nothrow { // Since x*x + y*y is always positive, we can safely assume squareRoot // won't throw, and use it to implement this nothrow function. If it // does throw (e.g., if x*x + y*y overflows a 32-bit value), then the // program will terminate. return assumeWontThrow(squareRoot(x*x + y*y)); } assert(computeLength(3, 4) == 5); } unittest { void alwaysThrows() { throw new Exception("I threw up"); } void bad() nothrow { assumeWontThrow(alwaysThrows()); } assertThrown!AssertError(bad()); } /** Returns $(D true) if $(D source)'s representation embeds a pointer that points to $(D target)'s representation or somewhere inside it. If $(D source) is or contains a dynamic array, then, then pointsTo will check if there is overlap between the dynamic array and $(D target)'s representation. If $(D source) is or contains a union, then every member of the union is checked for embedded pointers. This may lead to false positives, depending on which should be considered the "active" member of the union. If $(D source) is a class, then pointsTo will handle it as a pointer. If $(D target) is a pointer, a dynamic array or a class, then pointsTo will only check if $(D source) points to $(D target), $(I not) what $(D target) references. Note: Evaluating $(D pointsTo(x, x)) checks whether $(D x) has internal pointers. This should only be done as an assertive test, as the language is free to assume objects don't have internal pointers (TDPL 7.1.3.5). */ bool pointsTo(S, T, Tdummy=void)(auto ref const S source, ref const T target) @trusted pure nothrow if (__traits(isRef, source) || isDynamicArray!S || isPointer!S || is(S == class)) { static if (isPointer!S || is(S == class)) { const m = cast(void*) source, b = cast(void*) &target, e = b + target.sizeof; return b <= m && m < e; } else static if (is(S == struct) || is(S == union)) { foreach (i, Subobj; typeof(source.tupleof)) if (pointsTo(source.tupleof[i], target)) return true; return false; } else static if (isStaticArray!S) { foreach (size_t i; 0 .. S.length) if (pointsTo(source[i], target)) return true; return false; } else static if (isDynamicArray!S) { return overlap(cast(void[])source, cast(void[])(&target)[0 .. 1]).length != 0; } else { return false; } } // for shared objects bool pointsTo(S, T)(auto ref const shared S source, ref const shared T target) @trusted pure nothrow { return pointsTo!(shared S, shared T, void)(source, target); } /// Pointers unittest { int i = 0; int* p = null; assert(!p.pointsTo(i)); p = &i; assert( p.pointsTo(i)); } /// Structs and Unions unittest { struct S { int v; int* p; } int i; auto s = S(0, &i); //structs and unions "own" their members //pointsTo will answer true if one of the members pointsTo. assert(!s.pointsTo(s.v)); //s.v is just v member of s, so not pointed. assert( s.p.pointsTo(i)); //i is pointed by s.p. assert( s .pointsTo(i)); //which means i is pointed by s itself. //Unions will behave exactly the same. Points to will check each "member" //individually, even if they share the same memory } /// Arrays (dynamic and static) unittest { int i; int[] slice = [0, 1, 2, 3, 4]; int[5] arr = [0, 1, 2, 3, 4]; int*[] slicep = [&i]; int*[1] arrp = [&i]; //A slice points to all of its members: assert( slice.pointsTo(slice[3])); assert(!slice[0 .. 2].pointsTo(slice[3])); //Object 3 is outside of the slice [0 .. 2] //Note that a slice will not take into account what its members point to. assert( slicep[0].pointsTo(i)); assert(!slicep .pointsTo(i)); //static arrays are objects that own their members, just like structs: assert(!arr.pointsTo(arr[0])); //arr[0] is just a member of arr, so not pointed. assert( arrp[0].pointsTo(i)); //i is pointed by arrp[0]. assert( arrp .pointsTo(i)); //which means i is pointed by arrp itslef. //Notice the difference between static and dynamic arrays: assert(!arr .pointsTo(arr[0])); assert( arr[].pointsTo(arr[0])); assert( arrp .pointsTo(i)); assert(!arrp[].pointsTo(i)); } /// Classes unittest { class C { this(int* p){this.p = p;} int* p; } int i; C a = new C(&i); C b = a; //Classes are a bit particular, as they are treated like simple pointers //to a class payload. assert( a.p.pointsTo(i)); //a.p points to i. assert(!a .pointsTo(i)); //Yet a itself does not point i. //To check the class payload itself, iterate on its members: () { foreach (index, _; FieldTypeTuple!C) if (pointsTo(a.tupleof[index], i)) return; assert(0); }(); //To check if a class points a specific payload, a direct memmory check can be done: auto aLoc = cast(ubyte[__traits(classInstanceSize, C)]*) a; assert(b.pointsTo(*aLoc)); //b points to where a is pointing } unittest { struct S1 { int a; S1 * b; } S1 a1; S1 * p = &a1; assert(pointsTo(p, a1)); S1 a2; a2.b = &a1; assert(pointsTo(a2, a1)); struct S3 { int[10] a; } S3 a3; auto a4 = a3.a[2 .. 3]; assert(pointsTo(a4, a3)); auto a5 = new double[4]; auto a6 = a5[1 .. 2]; assert(!pointsTo(a5, a6)); auto a7 = new double[3]; auto a8 = new double[][1]; a8[0] = a7; assert(!pointsTo(a8[0], a8[0])); // don't invoke postblit on subobjects { static struct NoCopy { this(this) { assert(0); } } static struct Holder { NoCopy a, b, c; } Holder h; pointsTo(h, h); } shared S3 sh3; shared sh3sub = sh3.a[]; assert(pointsTo(sh3sub, sh3)); int[] darr = [1, 2, 3, 4]; //dynamic arrays don't point to each other, or slices of themselves assert(!pointsTo(darr, darr)); assert(!pointsTo(darr[0 .. 1], darr)); //But they do point their elements foreach(i; 0 .. 4) assert(pointsTo(darr, darr[i])); assert(pointsTo(darr[0..3], darr[2])); assert(!pointsTo(darr[0..3], darr[3])); } unittest { //tests with static arrays //Static arrays themselves are just objects, and don't really *point* to anything. //They aggregate their contents, much the same way a structure aggregates its attributes. //*However* The elements inside the static array may themselves point to stuff. //Standard array int[2] k; assert(!pointsTo(k, k)); //an array doesn't point to itself //Technically, k doesn't point its elements, although it does alias them assert(!pointsTo(k, k[0])); assert(!pointsTo(k, k[1])); //But an extracted slice will point to the same array. assert(pointsTo(k[], k)); assert(pointsTo(k[], k[1])); //An array of pointers int*[2] pp; int a; int b; pp[0] = &a; assert( pointsTo(pp, a)); //The array contains a pointer to a assert(!pointsTo(pp, b)); //The array does NOT contain a pointer to b assert(!pointsTo(pp, pp)); //The array does not point itslef //A struct containing a static array of pointers static struct S { int*[2] p; } S s; s.p[0] = &a; assert( pointsTo(s, a)); //The struct contains an array that points a assert(!pointsTo(s, b)); //But doesn't point b assert(!pointsTo(s, s)); //The struct doesn't actually point itslef. //An array containing structs that have pointers static struct SS { int* p; } SS[2] ss = [SS(&a), SS(null)]; assert( pointsTo(ss, a)); //The array contains a struct that points to a assert(!pointsTo(ss, b)); //The array doesn't contains a struct that points to b assert(!pointsTo(ss, ss)); //The array doesn't point itself. } unittest //Unions { int i; union U //Named union { size_t asInt = 0; int* asPointer; } struct S { union //Anonymous union { size_t asInt = 0; int* asPointer; } } U u; S s; assert(!pointsTo(u, i)); assert(!pointsTo(s, i)); u.asPointer = &i; s.asPointer = &i; assert( pointsTo(u, i)); assert( pointsTo(s, i)); u.asInt = cast(size_t)&i; s.asInt = cast(size_t)&i; assert( pointsTo(u, i)); //logical false positive assert( pointsTo(s, i)); //logical false positive } unittest //Classes { int i; static class A { int* p; } A a = new A, b = a; assert(!pointsTo(a, b)); //a does not point to b a.p = &i; assert(!pointsTo(a, i)); //a does not point to i } unittest //alias this test { static int i; static int j; struct S { int* p; @property int* foo(){return &i;} alias foo this; } assert(is(S : int*)); S s = S(&j); assert(!pointsTo(s, i)); assert( pointsTo(s, j)); assert( pointsTo(cast(int*)s, i)); assert(!pointsTo(cast(int*)s, j)); } /********************* * Thrown if errors that set $(D errno) occur. */ class ErrnoException : Exception { uint errno; // operating system error code this(string msg, string file = null, size_t line = 0) { errno = .errno; version (linux) { char[1024] buf = void; auto s = std.c.string.strerror_r(errno, buf.ptr, buf.length); } else { auto s = std.c.string.strerror(errno); } super(msg~" ("~to!string(s)~")", file, line); } } /++ ML-style functional exception handling. Runs the supplied expression and returns its result. If the expression throws a $(D Throwable), runs the supplied error handler instead and return its result. The error handler's type must be the same as the expression's type. Params: E = The type of $(D Throwable)s to catch. Defaults to $(D Exception) T1 = The type of the expression. T2 = The return type of the error handler. expression = The expression to run and return its result. errorHandler = The handler to run if the expression throwed. Examples: -------------------- //Revert to a default value upon an error: assert("x".to!int().ifThrown(0) == 0); -------------------- You can also chain multiple calls to ifThrown, each capturing errors from the entire preceding expression. Example: -------------------- //Chaining multiple calls to ifThrown to attempt multiple things in a row: string s="true"; assert(s.to!int(). ifThrown(cast(int)s.to!double()). ifThrown(cast(int)s.to!bool()) == 1); //Respond differently to different types of errors assert(enforce("x".to!int() < 1).to!string() .ifThrown!ConvException("not a number") .ifThrown!Exception("number too small") == "not a number"); -------------------- The expression and the errorHandler must have a common type they can both be implicitly casted to, and that type will be the type of the compound expression. Examples: -------------------- //null and new Object have a common type(Object). static assert(is(typeof(null.ifThrown(new Object())) == Object)); static assert(is(typeof((new Object()).ifThrown(null)) == Object)); //1 and new Object do not have a common type. static assert(!__traits(compiles, 1.ifThrown(new Object()))); static assert(!__traits(compiles, (new Object()).ifThrown(1))); -------------------- If you need to use the actual thrown expection, you can use a delegate. Example: -------------------- //Use a lambda to get the thrown object. assert("%s".format().ifThrown!Exception(e => e.classinfo.name) == "std.format.FormatException"); -------------------- +/ //lazy version CommonType!(T1, T2) ifThrown(E : Throwable = Exception, T1, T2)(lazy scope T1 expression, lazy scope T2 errorHandler) { static assert(!is(typeof(return) == void), "The error handler's return value("~T2.stringof~") does not have a common type with the expression("~T1.stringof~")."); try { return expression(); } catch(E) { return errorHandler(); } } ///ditto //delegate version CommonType!(T1, T2) ifThrown(E : Throwable, T1, T2)(lazy scope T1 expression, scope T2 delegate(E) errorHandler) { static assert(!is(typeof(return) == void), "The error handler's return value("~T2.stringof~") does not have a common type with the expression("~T1.stringof~")."); try { return expression(); } catch(E e) { return errorHandler(e); } } ///ditto //delegate version, general overload to catch any Exception CommonType!(T1, T2) ifThrown(T1, T2)(lazy scope T1 expression, scope T2 delegate(Exception) errorHandler) { static assert(!is(typeof(return) == void), "The error handler's return value("~T2.stringof~") does not have a common type with the expression("~T1.stringof~")."); try { return expression(); } catch(Exception e) { return errorHandler(e); } } //Verify Examples unittest { //Revert to a default value upon an error: assert("x".to!int().ifThrown(0) == 0); //Chaining multiple calls to ifThrown to attempt multiple things in a row: string s="true"; assert(s.to!int(). ifThrown(cast(int)s.to!double()). ifThrown(cast(int)s.to!bool()) == 1); //Respond differently to different types of errors assert(enforce("x".to!int() < 1).to!string() .ifThrown!ConvException("not a number") .ifThrown!Exception("number too small") == "not a number"); //null and new Object have a common type(Object). static assert(is(typeof(null.ifThrown(new Object())) == Object)); static assert(is(typeof((new Object()).ifThrown(null)) == Object)); //1 and new Object do not have a common type. static assert(!__traits(compiles, 1.ifThrown(new Object()))); static assert(!__traits(compiles, (new Object()).ifThrown(1))); //Use a lambda to get the thrown object. assert("%s".format().ifThrown(e => e.classinfo.name) == "std.format.FormatException"); } unittest { //Basic behaviour - all versions. assert("1".to!int().ifThrown(0) == 1); assert("x".to!int().ifThrown(0) == 0); assert("1".to!int().ifThrown!ConvException(0) == 1); assert("x".to!int().ifThrown!ConvException(0) == 0); assert("1".to!int().ifThrown(e=>0) == 1); assert("x".to!int().ifThrown(e=>0) == 0); static if (__traits(compiles, 0.ifThrown!Exception(e => 0))) //This will only work with a fix that was not yet pulled { assert("1".to!int().ifThrown!ConvException(e=>0) == 1); assert("x".to!int().ifThrown!ConvException(e=>0) == 0); } //Exceptions other than stated not caught. assert("x".to!int().ifThrown!StringException(0).collectException!ConvException() !is null); static if (__traits(compiles, 0.ifThrown!Exception(e => 0))) //This will only work with a fix that was not yet pulled { assert("x".to!int().ifThrown!StringException(e=>0).collectException!ConvException() !is null); } //Default does not include errors. int throwRangeError() { throw new RangeError; } assert(throwRangeError().ifThrown(0).collectException!RangeError() !is null); assert(throwRangeError().ifThrown(e=>0).collectException!RangeError() !is null); //Incompatible types are not accepted. static assert(!__traits(compiles, 1.ifThrown(new Object()))); static assert(!__traits(compiles, (new Object()).ifThrown(1))); static assert(!__traits(compiles, 1.ifThrown(e=>new Object()))); static assert(!__traits(compiles, (new Object()).ifThrown(e=>1))); } version(unittest) package @property void assertCTFEable(alias dg)() { static assert({ dg(); return true; }()); dg(); }
D
module android.java.android.hardware.camera2.params.LensShadingMap_d_interface; import arsd.jni : IJavaObjectImplementation, JavaPackageId, JavaName, IJavaObject, ImportExportImpl, JavaInterfaceMembers; static import arsd.jni; import import1 = android.java.java.lang.Class_d_interface; import import0 = android.java.android.hardware.camera2.params.RggbChannelVector_d_interface; final class LensShadingMap : IJavaObject { static immutable string[] _d_canCastTo = [ ]; @Import int getRowCount(); @Import int getColumnCount(); @Import int getGainFactorCount(); @Import float getGainFactor(int, int, int); @Import import0.RggbChannelVector getGainFactorVector(int, int); @Import void copyGainFactors(float, int[]); @Import bool equals(IJavaObject); @Import int hashCode(); @Import @JavaName("toString") string toString_(); override string toString() { return arsd.jni.javaObjectToString(this); } @Import import1.Class getClass(); @Import void notify(); @Import void notifyAll(); @Import void wait(long); @Import void wait(long, int); @Import void wait(); mixin IJavaObjectImplementation!(false); public static immutable string _javaParameterString = "Landroid/hardware/camera2/params/LensShadingMap;"; }
D
/Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/HTTP.build/Cookies/HTTPCookies.swift.o : /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/http/Sources/HTTP/Utilities/RFC1123.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/http/Sources/HTTP/Message/URL+HTTP.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/http/Sources/HTTP/Utilities/HTTPHeaders+Basic.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/http/Sources/HTTP/Message/Forwarded.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/http/Sources/HTTP/Message/MediaTypePreference.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/http/Sources/HTTP/Body/HTTPBodyStorage.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/http/Sources/HTTP/Message/HTTPMessage.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/http/Sources/HTTP/Body/HTTPBodyRepresentable.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/http/Sources/HTTP/Message/HTTPHeaderName.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/http/Sources/HTTP/Responder/HTTPScheme.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/http/Sources/HTTP/Message/HTTPResponse.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/http/Sources/HTTP/Cookies/HTTPCookieValue.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/http/Sources/HTTP/Body/HTTPChunkedStream.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/http/Sources/HTTP/Responder/HTTPClientProtocolUpgrader.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/http/Sources/HTTP/Responder/HTTPServerResponder.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/http/Sources/HTTP/Codable/HTTPMessageCoder.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/http/Sources/HTTP/Utilities/HTTPHeaders+Bearer.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/http/Sources/HTTP/Responder/HTTPServer.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/http/Sources/HTTP/Utilities/HTTPError.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/http/Sources/HTTP/Cookies/HTTPCookies.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/http/Sources/HTTP/Message/HTTPHeaders.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/http/Sources/HTTP/Utilities/String+IsIPAddress.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/http/Sources/HTTP/Exports.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/http/Sources/HTTP/Responder/HTTPClient.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/http/Sources/HTTP/Message/HTTPRequest.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/http/Sources/HTTP/Body/HTTPBody.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/NIOHTTP1.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/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 /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 /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 /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/CNIOZlib/include/CNIOZlib.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 /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 /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/CNIOHTTPParser/include/CNIOHTTPParser.h /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/CNIOHTTPParser/include/c_nio_http_parser.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/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/HTTP.build/Cookies/HTTPCookies~partial.swiftmodule : /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/http/Sources/HTTP/Utilities/RFC1123.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/http/Sources/HTTP/Message/URL+HTTP.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/http/Sources/HTTP/Utilities/HTTPHeaders+Basic.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/http/Sources/HTTP/Message/Forwarded.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/http/Sources/HTTP/Message/MediaTypePreference.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/http/Sources/HTTP/Body/HTTPBodyStorage.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/http/Sources/HTTP/Message/HTTPMessage.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/http/Sources/HTTP/Body/HTTPBodyRepresentable.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/http/Sources/HTTP/Message/HTTPHeaderName.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/http/Sources/HTTP/Responder/HTTPScheme.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/http/Sources/HTTP/Message/HTTPResponse.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/http/Sources/HTTP/Cookies/HTTPCookieValue.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/http/Sources/HTTP/Body/HTTPChunkedStream.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/http/Sources/HTTP/Responder/HTTPClientProtocolUpgrader.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/http/Sources/HTTP/Responder/HTTPServerResponder.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/http/Sources/HTTP/Codable/HTTPMessageCoder.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/http/Sources/HTTP/Utilities/HTTPHeaders+Bearer.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/http/Sources/HTTP/Responder/HTTPServer.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/http/Sources/HTTP/Utilities/HTTPError.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/http/Sources/HTTP/Cookies/HTTPCookies.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/http/Sources/HTTP/Message/HTTPHeaders.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/http/Sources/HTTP/Utilities/String+IsIPAddress.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/http/Sources/HTTP/Exports.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/http/Sources/HTTP/Responder/HTTPClient.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/http/Sources/HTTP/Message/HTTPRequest.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/http/Sources/HTTP/Body/HTTPBody.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/NIOHTTP1.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/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 /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 /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 /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/CNIOZlib/include/CNIOZlib.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 /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 /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/CNIOHTTPParser/include/CNIOHTTPParser.h /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/CNIOHTTPParser/include/c_nio_http_parser.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/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/HTTP.build/Cookies/HTTPCookies~partial.swiftdoc : /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/http/Sources/HTTP/Utilities/RFC1123.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/http/Sources/HTTP/Message/URL+HTTP.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/http/Sources/HTTP/Utilities/HTTPHeaders+Basic.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/http/Sources/HTTP/Message/Forwarded.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/http/Sources/HTTP/Message/MediaTypePreference.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/http/Sources/HTTP/Body/HTTPBodyStorage.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/http/Sources/HTTP/Message/HTTPMessage.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/http/Sources/HTTP/Body/HTTPBodyRepresentable.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/http/Sources/HTTP/Message/HTTPHeaderName.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/http/Sources/HTTP/Responder/HTTPScheme.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/http/Sources/HTTP/Message/HTTPResponse.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/http/Sources/HTTP/Cookies/HTTPCookieValue.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/http/Sources/HTTP/Body/HTTPChunkedStream.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/http/Sources/HTTP/Responder/HTTPClientProtocolUpgrader.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/http/Sources/HTTP/Responder/HTTPServerResponder.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/http/Sources/HTTP/Codable/HTTPMessageCoder.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/http/Sources/HTTP/Utilities/HTTPHeaders+Bearer.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/http/Sources/HTTP/Responder/HTTPServer.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/http/Sources/HTTP/Utilities/HTTPError.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/http/Sources/HTTP/Cookies/HTTPCookies.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/http/Sources/HTTP/Message/HTTPHeaders.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/http/Sources/HTTP/Utilities/String+IsIPAddress.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/http/Sources/HTTP/Exports.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/http/Sources/HTTP/Responder/HTTPClient.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/http/Sources/HTTP/Message/HTTPRequest.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/http/Sources/HTTP/Body/HTTPBody.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/NIOHTTP1.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/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 /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 /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 /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/CNIOZlib/include/CNIOZlib.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 /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 /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/CNIOHTTPParser/include/CNIOHTTPParser.h /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/CNIOHTTPParser/include/c_nio_http_parser.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/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/HTTP.build/Cookies/HTTPCookies~partial.swiftsourceinfo : /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/http/Sources/HTTP/Utilities/RFC1123.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/http/Sources/HTTP/Message/URL+HTTP.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/http/Sources/HTTP/Utilities/HTTPHeaders+Basic.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/http/Sources/HTTP/Message/Forwarded.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/http/Sources/HTTP/Message/MediaTypePreference.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/http/Sources/HTTP/Body/HTTPBodyStorage.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/http/Sources/HTTP/Message/HTTPMessage.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/http/Sources/HTTP/Body/HTTPBodyRepresentable.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/http/Sources/HTTP/Message/HTTPHeaderName.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/http/Sources/HTTP/Responder/HTTPScheme.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/http/Sources/HTTP/Message/HTTPResponse.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/http/Sources/HTTP/Cookies/HTTPCookieValue.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/http/Sources/HTTP/Body/HTTPChunkedStream.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/http/Sources/HTTP/Responder/HTTPClientProtocolUpgrader.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/http/Sources/HTTP/Responder/HTTPServerResponder.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/http/Sources/HTTP/Codable/HTTPMessageCoder.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/http/Sources/HTTP/Utilities/HTTPHeaders+Bearer.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/http/Sources/HTTP/Responder/HTTPServer.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/http/Sources/HTTP/Utilities/HTTPError.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/http/Sources/HTTP/Cookies/HTTPCookies.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/http/Sources/HTTP/Message/HTTPHeaders.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/http/Sources/HTTP/Utilities/String+IsIPAddress.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/http/Sources/HTTP/Exports.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/http/Sources/HTTP/Responder/HTTPClient.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/http/Sources/HTTP/Message/HTTPRequest.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/http/Sources/HTTP/Body/HTTPBody.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/NIOHTTP1.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/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 /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 /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 /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/CNIOZlib/include/CNIOZlib.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 /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 /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/CNIOHTTPParser/include/CNIOHTTPParser.h /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/CNIOHTTPParser/include/c_nio_http_parser.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/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
/** JSON serialization and value handling. This module provides the Json struct for reading, writing and manipulating JSON values. De(serialization) of arbitrary D types is also supported and is recommended for handling JSON in performance sensitive applications. Copyright: © 2012-2015 RejectedSoftware e.K. License: Subject to the terms of the MIT license, as written in the included LICENSE.txt file. Authors: Sönke Ludwig */ module vibe.data.json; /// @safe unittest { void manipulateJson(Json j) { import std.stdio; // retrieving the values is done using get() assert(j["name"].get!string == "Example"); assert(j["id"].get!int == 1); // semantic conversions can be done using to() assert(j["id"].to!string == "1"); // prints: // name: "Example" // id: 1 foreach (key, value; j.byKeyValue) writefln("%s: %s", key, value); // print out as JSON: {"name": "Example", "id": 1} writefln("JSON: %s", j.toString()); // DEPRECATED: object members can be accessed using member syntax, just like in JavaScript //j = Json.emptyObject; //j.name = "Example"; //j.id = 1; } } /// Constructing `Json` objects @safe unittest { // construct a JSON object {"field1": "foo", "field2": 42, "field3": true} // using the constructor Json j1 = Json(["field1": Json("foo"), "field2": Json(42), "field3": Json(true)]); // using piecewise construction Json j2 = Json.emptyObject; j2["field1"] = "foo"; j2["field2"] = 42.0; j2["field3"] = true; // using serialization struct S { string field1; double field2; bool field3; } Json j3 = S("foo", 42, true).serializeToJson(); // using serialization, converting directly to a JSON string string j4 = S("foo", 32, true).serializeToJsonString(); } public import vibe.data.serialization; public import std.json : JSONException; import std.algorithm; import std.array; import std.conv; import std.datetime; import std.exception; import std.format; import std.string; import std.range; import std.traits; import std.typecons : Tuple; import std.bigint; /******************************************************************************/ /* public types */ /******************************************************************************/ /** Represents a single JSON value. Json values can have one of the types defined in the Json.Type enum. They behave mostly like values in ECMA script in the way that you can transparently perform operations on them. However, strict typechecking is done, so that operations between differently typed JSON values will throw a JSONException. Additionally, an explicit cast or using get!() or to!() is required to convert a JSON value to the corresponding static D type. */ align(8) // ensures that pointers stay on 64-bit boundaries on x64 so that they get scanned by the GC struct Json { @safe: static assert(!hasElaborateDestructor!BigInt && !hasElaborateCopyConstructor!BigInt, "struct Json is missing required ~this and/or this(this) members for BigInt."); private { // putting all fields in a union results in many false pointers leading to // memory leaks and, worse, std.algorithm.swap triggering an assertion // because of internal pointers. This crude workaround seems to fix // the issues. enum m_size = max((BigInt.sizeof+(void*).sizeof), 2); // NOTE : DMD 2.067.1 doesn't seem to init void[] correctly on its own. // Explicity initializing it works around this issue. Using a void[] // array here to guarantee that it's scanned by the GC. void[m_size] m_data = (void[m_size]).init; static assert(m_data.offsetof == 0, "m_data must be the first struct member."); static assert(BigInt.alignof <= 8, "Json struct alignment of 8 isn't sufficient to store BigInt."); ref inout(T) getDataAs(T)() inout @trusted { static assert(T.sizeof <= m_data.sizeof); return (cast(inout(T)[1])m_data[0 .. T.sizeof])[0]; } @property ref inout(BigInt) m_bigInt() inout { return getDataAs!BigInt(); } @property ref inout(long) m_int() inout { return getDataAs!long(); } @property ref inout(double) m_float() inout { return getDataAs!double(); } @property ref inout(bool) m_bool() inout { return getDataAs!bool(); } @property ref inout(string) m_string() inout { return getDataAs!string(); } @property ref inout(Json[string]) m_object() inout { return getDataAs!(Json[string])(); } @property ref inout(Json[]) m_array() inout { return getDataAs!(Json[])(); } Type m_type = Type.undefined; version (VibeJsonFieldNames) { uint m_magic = 0x1337f00d; // works around Appender bug (DMD BUG 10690/10859/11357) string m_name; } } /** Represents the run time type of a JSON value. */ enum Type { undefined, /// A non-existent value in a JSON object null_, /// Null value bool_, /// Boolean value int_, /// 64-bit integer value bigInt, /// BigInt values float_, /// 64-bit floating point value string, /// UTF-8 string array, /// Array of JSON values object, /// JSON object aka. dictionary from string to Json Undefined = undefined, /// Compatibility alias - will be deprecated soon Null = null_, /// Compatibility alias - will be deprecated soon Bool = bool_, /// Compatibility alias - will be deprecated soon Int = int_, /// Compatibility alias - will be deprecated soon Float = float_, /// Compatibility alias - will be deprecated soon String = string, /// Compatibility alias - will be deprecated soon Array = array, /// Compatibility alias - will be deprecated soon Object = object /// Compatibility alias - will be deprecated soon } /// New JSON value of Type.Undefined static @property Json undefined() { return Json(); } /// New JSON value of Type.Object static @property Json emptyObject() { return Json(cast(Json[string])null); } /// New JSON value of Type.Array static @property Json emptyArray() { return Json(cast(Json[])null); } version(JsonLineNumbers) int line; /** Constructor for a JSON object. */ this(typeof(null)) @trusted { m_type = Type.null_; } /// ditto this(bool v) @trusted { m_type = Type.bool_; m_bool = v; } /// ditto this(byte v) { this(cast(long)v); } /// ditto this(ubyte v) { this(cast(long)v); } /// ditto this(short v) { this(cast(long)v); } /// ditto this(ushort v) { this(cast(long)v); } /// ditto this(int v) { this(cast(long)v); } /// ditto this(uint v) { this(cast(long)v); } /// ditto this(long v) @trusted { m_type = Type.int_; m_int = v; } /// ditto this(BigInt v) @trusted { m_type = Type.bigInt; initBigInt(); m_bigInt = v; } /// ditto this(double v) @trusted { m_type = Type.float_; m_float = v; } /// ditto this(string v) @trusted { m_type = Type.string; m_string = v; } /// ditto this(Json[] v) @trusted { m_type = Type.array; m_array = v; } /// ditto this(Json[string] v) @trusted { m_type = Type.object; m_object = v; } /** Allows assignment of D values to a JSON value. */ ref Json opAssign(Json v) { if (v.type != Type.bigInt) runDestructors(); auto old_type = m_type; m_type = v.m_type; final switch(m_type){ case Type.undefined: m_string = null; break; case Type.null_: m_string = null; break; case Type.bool_: m_bool = v.m_bool; break; case Type.int_: m_int = v.m_int; break; case Type.bigInt: if (old_type != Type.bigInt) initBigInt(); m_bigInt = v.m_bigInt; break; case Type.float_: m_float = v.m_float; break; case Type.string: m_string = v.m_string; break; case Type.array: opAssign(v.m_array); break; case Type.object: opAssign(v.m_object); break; } return this; } /// ditto void opAssign(typeof(null)) { runDestructors(); m_type = Type.null_; m_string = null; } /// ditto bool opAssign(bool v) { runDestructors(); m_type = Type.bool_; m_bool = v; return v; } /// ditto int opAssign(int v) { runDestructors(); m_type = Type.int_; m_int = v; return v; } /// ditto long opAssign(long v) { runDestructors(); m_type = Type.int_; m_int = v; return v; } /// ditto BigInt opAssign(BigInt v) { if (m_type != Type.bigInt) initBigInt(); m_type = Type.bigInt; m_bigInt = v; return v; } /// ditto double opAssign(double v) { runDestructors(); m_type = Type.float_; m_float = v; return v; } /// ditto string opAssign(string v) { runDestructors(); m_type = Type.string; m_string = v; return v; } /// ditto Json[] opAssign(Json[] v) { runDestructors(); m_type = Type.array; m_array = v; version (VibeJsonFieldNames) { if (m_magic == 0x1337f00d) { foreach (idx, ref av; m_array) av.m_name = format("%s[%s]", m_name, idx); } else m_name = null; } return v; } /// ditto Json[string] opAssign(Json[string] v) { runDestructors(); m_type = Type.object; m_object = v; version (VibeJsonFieldNames) { if (m_magic == 0x1337f00d) { foreach (key, ref av; m_object) av.m_name = format("%s.%s", m_name, key); } else m_name = null; } return v; } /** Allows removal of values from Type.Object Json objects. */ void remove(string item) { checkType!(Json[string])(); m_object.remove(item); } /** The current type id of this JSON object. */ @property Type type() const @safe { return m_type; } /** Clones a JSON value recursively. */ Json clone() const { final switch (m_type) { case Type.undefined: return Json.undefined; case Type.null_: return Json(null); case Type.bool_: return Json(m_bool); case Type.int_: return Json(m_int); case Type.bigInt: return Json(m_bigInt); case Type.float_: return Json(m_float); case Type.string: return Json(m_string); case Type.array: auto ret = Json.emptyArray; foreach (v; this.byValue) ret ~= v.clone(); return ret; case Type.object: auto ret = Json.emptyObject; foreach (name, v; this.byKeyValue) ret[name] = v.clone(); return ret; } } /** Allows direct indexing of array typed JSON values. */ ref inout(Json) opIndex(size_t idx) inout { checkType!(Json[])(); return m_array[idx]; } /// unittest { Json value = Json.emptyArray; value ~= 1; value ~= true; value ~= "foo"; assert(value[0] == 1); assert(value[1] == true); assert(value[2] == "foo"); } /** Allows direct indexing of object typed JSON values using a string as the key. */ const(Json) opIndex(string key) const { checkType!(Json[string])(); if( auto pv = key in m_object ) return *pv; Json ret = Json.undefined; ret.m_string = key; version (VibeJsonFieldNames) ret.m_name = format("%s.%s", m_name, key); return ret; } /// ditto ref Json opIndex(string key) { checkType!(Json[string])(); if( auto pv = key in m_object ) return *pv; if (m_object is null) { m_object = ["": Json.init]; m_object.remove(""); } m_object[key] = Json.init; assert(m_object !is null); assert(key in m_object, "Failed to insert key '"~key~"' into AA!?"); m_object[key].m_type = Type.undefined; // DMDBUG: AAs are teh $H1T!!!11 assert(m_object[key].type == Type.undefined); m_object[key].m_string = key; version (VibeJsonFieldNames) m_object[key].m_name = format("%s.%s", m_name, key); return m_object[key]; } /// unittest { Json value = Json.emptyObject; value["a"] = 1; value["b"] = true; value["c"] = "foo"; assert(value["a"] == 1); assert(value["b"] == true); assert(value["c"] == "foo"); } /** Returns a slice of a JSON array. */ inout(Json[]) opSlice() inout { checkType!(Json[])(); return m_array; } /// inout(Json[]) opSlice(size_t from, size_t to) inout { checkType!(Json[])(); return m_array[from .. to]; } /** Returns the number of entries of string, array or object typed JSON values. */ @property size_t length() const @trusted { checkType!(string, Json[], Json[string])("property length"); switch(m_type){ case Type.string: return m_string.length; case Type.array: return m_array.length; case Type.object: return m_object.length; default: assert(false); } } /** Allows foreach iterating over JSON objects and arrays. */ int opApply(scope int delegate(ref Json obj) del) @system { checkType!(Json[], Json[string])("opApply"); if( m_type == Type.array ){ foreach( ref v; m_array ) if( auto ret = del(v) ) return ret; return 0; } else { foreach( ref v; m_object ) if( v.type != Type.undefined ) if( auto ret = del(v) ) return ret; return 0; } } /// ditto int opApply(scope int delegate(ref const Json obj) del) const @system { checkType!(Json[], Json[string])("opApply"); if( m_type == Type.array ){ foreach( ref v; m_array ) if( auto ret = del(v) ) return ret; return 0; } else { foreach( ref v; m_object ) if( v.type != Type.undefined ) if( auto ret = del(v) ) return ret; return 0; } } /// ditto int opApply(scope int delegate(ref size_t idx, ref Json obj) del) @system { checkType!(Json[])("opApply"); foreach( idx, ref v; m_array ) if( auto ret = del(idx, v) ) return ret; return 0; } /// ditto int opApply(scope int delegate(ref size_t idx, ref const Json obj) del) const @system { checkType!(Json[])("opApply"); foreach( idx, ref v; m_array ) if( auto ret = del(idx, v) ) return ret; return 0; } /// ditto int opApply(scope int delegate(ref string idx, ref Json obj) del) @system { checkType!(Json[string])("opApply"); foreach( idx, ref v; m_object ) if( v.type != Type.undefined ) if( auto ret = del(idx, v) ) return ret; return 0; } /// ditto int opApply(scope int delegate(ref string idx, ref const Json obj) del) const @system { checkType!(Json[string])("opApply"); foreach( idx, ref v; m_object ) if( v.type != Type.undefined ) if( auto ret = del(idx, v) ) return ret; return 0; } private alias KeyValue = Tuple!(string, "key", Json, "value"); /// Iterates over all key/value pairs of an object. @property auto byKeyValue() @trusted { checkType!(Json[string])("byKeyValue"); return m_object.byKeyValue.map!(kv => KeyValue(kv.key, kv.value)).trustedRange; } /// ditto @property auto byKeyValue() const @trusted { checkType!(Json[string])("byKeyValue"); return m_object.byKeyValue.map!(kv => const(KeyValue)(kv.key, kv.value)).trustedRange; } /// Iterates over all index/value pairs of an array. @property auto byIndexValue() { checkType!(Json[])("byIndexValue"); return zip(iota(0, m_array.length), m_array); } /// ditto @property auto byIndexValue() const { checkType!(Json[])("byIndexValue"); return zip(iota(0, m_array.length), m_array); } /// Iterates over all values of an object or array. @property auto byValue() @trusted { checkType!(Json[], Json[string])("byValue"); static struct Rng { private { bool isArray; Json[] array; typeof(Json.init.m_object.byValue) object; } bool empty() @trusted { if (isArray) return array.length == 0; else return object.empty; } auto front() @trusted { if (isArray) return array[0]; else return object.front; } void popFront() @trusted { if (isArray) array = array[1 .. $]; else object.popFront(); } } if (m_type == Type.array) return Rng(true, m_array); else return Rng(false, null, m_object.byValue); } /// ditto @property auto byValue() const @trusted { checkType!(Json[], Json[string])("byValue"); static struct Rng { @safe: private { bool isArray; const(Json)[] array; typeof(const(Json).init.m_object.byValue) object; } bool empty() @trusted { if (isArray) return array.length == 0; else return object.empty; } auto front() @trusted { if (isArray) return array[0]; else return object.front; } void popFront() @trusted { if (isArray) array = array[1 .. $]; else object.popFront(); } } if (m_type == Type.array) return Rng(true, m_array); else return Rng(false, null, m_object.byValue); } /** Converts the JSON value to the corresponding D type - types must match exactly. Available_Types: $(UL $(LI `bool` (`Type.bool_`)) $(LI `double` (`Type.float_`)) $(LI `float` (Converted from `double`)) $(LI `long` (`Type.int_`)) $(LI `ulong`, `int`, `uint`, `short`, `ushort`, `byte`, `ubyte` (Converted from `long`)) $(LI `string` (`Type.string`)) $(LI `Json[]` (`Type.array`)) $(LI `Json[string]` (`Type.object`)) ) See_Also: `opt`, `to`, `deserializeJson` */ inout(T) opCast(T)() inout { return get!T; } /// ditto @property inout(T) get(T)() inout @trusted { static if (!is(T : bool) && is(T : long)) checkType!(long, BigInt)(); else checkType!T(); static if (is(T == bool)) return m_bool; else static if (is(T == double)) return m_float; else static if (is(T == float)) return cast(T)m_float; else static if (is(T == string)) return m_string; else static if (is(T == Json[])) return m_array; else static if (is(T == Json[string])) return m_object; else static if (is(T == BigInt)) return m_type == Type.bigInt ? m_bigInt : BigInt(m_int); else static if (is(T : long)) { if (m_type == Type.bigInt) { enforceJson(m_bigInt <= T.max && m_bigInt >= T.min, "Integer conversion out of bounds error"); return cast(T)m_bigInt.toLong(); } else { enforceJson(m_int <= T.max && m_int >= T.min, "Integer conversion out of bounds error"); return cast(T)m_int; } } else static assert(0, "JSON can only be cast to (bool, long, std.bigint.BigInt, double, string, Json[] or Json[string]. Not "~T.stringof~"."); } /** Returns the native type for this JSON if it matches the current runtime type. If the runtime type does not match the given native type, the 'def' parameter is returned instead. See_Also: `get` */ @property const(T) opt(T)(const(T) def = T.init) const { if( typeId!T != m_type ) return def; return get!T; } /// ditto @property T opt(T)(T def = T.init) { if( typeId!T != m_type ) return def; return get!T; } /** Converts the JSON value to the corresponding D type - types are converted as necessary. Automatically performs conversions between strings and numbers. See `get` for the list of available types. For converting/deserializing JSON to complex data types see `deserializeJson`. See_Also: `get`, `deserializeJson` */ @property inout(T) to(T)() inout { static if( is(T == bool) ){ final switch( m_type ){ case Type.undefined: return false; case Type.null_: return false; case Type.bool_: return m_bool; case Type.int_: return m_int != 0; case Type.bigInt: return m_bigInt != 0; case Type.float_: return m_float != 0; case Type.string: return m_string.length > 0; case Type.array: return m_array.length > 0; case Type.object: return m_object.length > 0; } } else static if( is(T == double) ){ final switch( m_type ){ case Type.undefined: return T.init; case Type.null_: return 0; case Type.bool_: return m_bool ? 1 : 0; case Type.int_: return m_int; case Type.bigInt: return bigIntToLong(); case Type.float_: return m_float; case Type.string: return .to!double(cast(string)m_string); case Type.array: return double.init; case Type.object: return double.init; } } else static if( is(T == float) ){ final switch( m_type ){ case Type.undefined: return T.init; case Type.null_: return 0; case Type.bool_: return m_bool ? 1 : 0; case Type.int_: return m_int; case Type.bigInt: return bigIntToLong(); case Type.float_: return m_float; case Type.string: return .to!float(cast(string)m_string); case Type.array: return float.init; case Type.object: return float.init; } } else static if( is(T == long) ){ final switch( m_type ){ case Type.undefined: return 0; case Type.null_: return 0; case Type.bool_: return m_bool ? 1 : 0; case Type.int_: return m_int; case Type.bigInt: return cast(long)bigIntToLong(); case Type.float_: return cast(long)m_float; case Type.string: return .to!long(m_string); case Type.array: return 0; case Type.object: return 0; } } else static if( is(T : long) ){ final switch( m_type ){ case Type.undefined: return 0; case Type.null_: return 0; case Type.bool_: return m_bool ? 1 : 0; case Type.int_: return cast(T)m_int; case Type.bigInt: return cast(T)bigIntToLong(); case Type.float_: return cast(T)m_float; case Type.string: return cast(T).to!long(cast(string)m_string); case Type.array: return 0; case Type.object: return 0; } } else static if( is(T == string) ){ switch( m_type ){ default: return toString(); case Type.string: return m_string; } } else static if( is(T == Json[]) ){ switch( m_type ){ default: return Json([this]); case Type.array: return m_array; } } else static if( is(T == Json[string]) ){ switch( m_type ){ default: return Json(["value": this]); case Type.object: return m_object; } } else static if( is(T == BigInt) ){ final switch( m_type ){ case Type.undefined: return BigInt(0); case Type.null_: return BigInt(0); case Type.bool_: return BigInt(m_bool ? 1 : 0); case Type.int_: return BigInt(m_int); case Type.bigInt: return m_bigInt; case Type.float_: return BigInt(cast(long)m_float); case Type.string: return BigInt(.to!long(m_string)); case Type.array: return BigInt(0); case Type.object: return BigInt(0); } } else static assert(0, "JSON can only be cast to (bool, long, std.bigint.BigInt, double, string, Json[] or Json[string]. Not "~T.stringof~"."); } /** Performs unary operations on the JSON value. The following operations are supported for each type: $(DL $(DT Null) $(DD none) $(DT Bool) $(DD ~) $(DT Int) $(DD +, -, ++, --) $(DT Float) $(DD +, -, ++, --) $(DT String) $(DD none) $(DT Array) $(DD none) $(DT Object) $(DD none) ) */ Json opUnary(string op)() const { static if( op == "~" ){ checkType!bool(); return Json(~m_bool); } else static if( op == "+" || op == "-" || op == "++" || op == "--" ){ checkType!(BigInt, long, double)("unary "~op); if( m_type == Type.int_ ) mixin("return Json("~op~"m_int);"); else if( m_type == Type.bigInt ) mixin("return Json("~op~"m_bigInt);"); else if( m_type == Type.float_ ) mixin("return Json("~op~"m_float);"); else assert(false); } else static assert(0, "Unsupported operator '"~op~"' for type JSON."); } /** Performs binary operations between JSON values. The two JSON values must be of the same run time type or a JSONException will be thrown. Only the operations listed are allowed for each of the types. $(DL $(DT Null) $(DD none) $(DT Bool) $(DD &&, ||) $(DT Int) $(DD +, -, *, /, %) $(DT Float) $(DD +, -, *, /, %) $(DT String) $(DD ~) $(DT Array) $(DD ~) $(DT Object) $(DD in) ) */ Json opBinary(string op)(ref const(Json) other) const { enforceJson(m_type == other.m_type, "Binary operation '"~op~"' between "~.to!string(m_type)~" and "~.to!string(other.m_type)~" JSON objects."); static if( op == "&&" ){ checkType!(bool)(op); return Json(m_bool && other.m_bool); } else static if( op == "||" ){ checkType!(bool)(op); return Json(m_bool || other.m_bool); } else static if( op == "+" ){ checkType!(BigInt, long, double)(op); if( m_type == Type.int_ ) return Json(m_int + other.m_int); else if( m_type == Type.bigInt ) return Json(() @trusted { return m_bigInt + other.m_bigInt; } ()); else if( m_type == Type.float_ ) return Json(m_float + other.m_float); else assert(false); } else static if( op == "-" ){ checkType!(BigInt, long, double)(op); if( m_type == Type.int_ ) return Json(m_int - other.m_int); else if( m_type == Type.bigInt ) return Json(() @trusted { return m_bigInt - other.m_bigInt; } ()); else if( m_type == Type.float_ ) return Json(m_float - other.m_float); else assert(false); } else static if( op == "*" ){ checkType!(BigInt, long, double)(op); if( m_type == Type.int_ ) return Json(m_int * other.m_int); else if( m_type == Type.bigInt ) return Json(() @trusted { return m_bigInt * other.m_bigInt; } ()); else if( m_type == Type.float_ ) return Json(m_float * other.m_float); else assert(false); } else static if( op == "/" ){ checkType!(BigInt, long, double)(op); if( m_type == Type.int_ ) return Json(m_int / other.m_int); else if( m_type == Type.bigInt ) return Json(() @trusted { return m_bigInt / other.m_bigInt; } ()); else if( m_type == Type.float_ ) return Json(m_float / other.m_float); else assert(false); } else static if( op == "%" ){ checkType!(BigInt, long, double)(op); if( m_type == Type.int_ ) return Json(m_int % other.m_int); else if( m_type == Type.bigInt ) return Json(() @trusted { return m_bigInt % other.m_bigInt; } ()); else if( m_type == Type.float_ ) return Json(m_float % other.m_float); else assert(false); } else static if( op == "~" ){ checkType!(string, Json[])(op); if( m_type == Type.string ) return Json(m_string ~ other.m_string); else if (m_type == Type.array) return Json(m_array ~ other.m_array); else assert(false); } else static assert(0, "Unsupported operator '"~op~"' for type JSON."); } /// ditto Json opBinary(string op)(Json other) if( op == "~" ) { static if( op == "~" ){ checkType!(string, Json[])(op); if( m_type == Type.string ) return Json(m_string ~ other.m_string); else if( m_type == Type.array ) return Json(m_array ~ other.m_array); else assert(false); } else static assert(0, "Unsupported operator '"~op~"' for type JSON."); } /// ditto void opOpAssign(string op)(Json other) if (op == "+" || op == "-" || op == "*" || op == "/" || op == "%" || op =="~") { enforceJson(m_type == other.m_type || op == "~" && m_type == Type.array, "Binary operation '"~op~"=' between "~.to!string(m_type)~" and "~.to!string(other.m_type)~" JSON objects."); static if( op == "+" ){ if( m_type == Type.int_ ) m_int += other.m_int; else if( m_type == Type.bigInt ) m_bigInt += other.m_bigInt; else if( m_type == Type.float_ ) m_float += other.m_float; else enforceJson(false, "'+=' only allowed for scalar types, not "~.to!string(m_type)~"."); } else static if( op == "-" ){ if( m_type == Type.int_ ) m_int -= other.m_int; else if( m_type == Type.bigInt ) m_bigInt -= other.m_bigInt; else if( m_type == Type.float_ ) m_float -= other.m_float; else enforceJson(false, "'-=' only allowed for scalar types, not "~.to!string(m_type)~"."); } else static if( op == "*" ){ if( m_type == Type.int_ ) m_int *= other.m_int; else if( m_type == Type.bigInt ) m_bigInt *= other.m_bigInt; else if( m_type == Type.float_ ) m_float *= other.m_float; else enforceJson(false, "'*=' only allowed for scalar types, not "~.to!string(m_type)~"."); } else static if( op == "/" ){ if( m_type == Type.int_ ) m_int /= other.m_int; else if( m_type == Type.bigInt ) m_bigInt /= other.m_bigInt; else if( m_type == Type.float_ ) m_float /= other.m_float; else enforceJson(false, "'/=' only allowed for scalar types, not "~.to!string(m_type)~"."); } else static if( op == "%" ){ if( m_type == Type.int_ ) m_int %= other.m_int; else if( m_type == Type.bigInt ) m_bigInt %= other.m_bigInt; else if( m_type == Type.float_ ) m_float %= other.m_float; else enforceJson(false, "'%=' only allowed for scalar types, not "~.to!string(m_type)~"."); } else static if( op == "~" ){ if (m_type == Type.string) m_string ~= other.m_string; else if (m_type == Type.array) { if (other.m_type == Type.array) m_array ~= other.m_array; else appendArrayElement(other); } else enforceJson(false, "'~=' only allowed for string and array types, not "~.to!string(m_type)~"."); } else static assert(0, "Unsupported operator '"~op~"=' for type JSON."); } /// ditto void opOpAssign(string op, T)(T other) if (!is(T == Json) && is(typeof(Json(other)))) { opOpAssign!op(Json(other)); } /// ditto Json opBinary(string op)(bool other) const { checkType!bool(); mixin("return Json(m_bool "~op~" other);"); } /// ditto Json opBinary(string op)(long other) const { checkType!(long, BigInt)(); if (m_type == Type.bigInt) mixin("return Json(m_bigInt "~op~" other);"); else mixin("return Json(m_int "~op~" other);"); } /// ditto Json opBinary(string op)(BigInt other) const { checkType!(long, BigInt)(); if (m_type == Type.bigInt) mixin("return Json(m_bigInt "~op~" other);"); else mixin("return Json(m_int "~op~" other);"); } /// ditto Json opBinary(string op)(double other) const { checkType!double(); mixin("return Json(m_float "~op~" other);"); } /// ditto Json opBinary(string op)(string other) const { checkType!string(); mixin("return Json(m_string "~op~" other);"); } /// ditto Json opBinary(string op)(Json[] other) { checkType!(Json[])(); mixin("return Json(m_array "~op~" other);"); } /// ditto Json opBinaryRight(string op)(bool other) const { checkType!bool(); mixin("return Json(other "~op~" m_bool);"); } /// ditto Json opBinaryRight(string op)(long other) const { checkType!(long, BigInt)(); if (m_type == Type.bigInt) mixin("return Json(other "~op~" m_bigInt);"); else mixin("return Json(other "~op~" m_int);"); } /// ditto Json opBinaryRight(string op)(BigInt other) const { checkType!(long, BigInt)(); if (m_type == Type.bigInt) mixin("return Json(other "~op~" m_bigInt);"); else mixin("return Json(other "~op~" m_int);"); } /// ditto Json opBinaryRight(string op)(double other) const { checkType!double(); mixin("return Json(other "~op~" m_float);"); } /// ditto Json opBinaryRight(string op)(string other) const if(op == "~") { checkType!string(); return Json(other ~ m_string); } /// ditto Json opBinaryRight(string op)(Json[] other) { checkType!(Json[])(); mixin("return Json(other "~op~" m_array);"); } /** Checks wheter a particular key is set and returns a pointer to it. For field that don't exist or have a type of `Type.undefined`, the `in` operator will return `null`. */ inout(Json)* opBinaryRight(string op)(string other) inout if(op == "in") { checkType!(Json[string])(); auto pv = other in m_object; if (!pv) return null; if (pv.type == Type.undefined) return null; return pv; } /// unittest { auto j = Json.emptyObject; j["a"] = "foo"; j["b"] = Json.undefined; assert("a" in j); assert(("a" in j).get!string == "foo"); assert("b" !in j); assert("c" !in j); } /** * The append operator will append arrays. This method always appends it's argument as an array element, so nested arrays can be created. */ void appendArrayElement(Json element) { enforceJson(m_type == Type.array, "'appendArrayElement' only allowed for array types, not "~.to!string(m_type)~"."); m_array ~= element; } /** Compares two JSON values for equality. If the two values have different types, they are considered unequal. This differs with ECMA script, which performs a type conversion before comparing the values. */ bool opEquals(ref const Json other) const { if( m_type != other.m_type ) return false; final switch(m_type){ case Type.undefined: return false; case Type.null_: return true; case Type.bool_: return m_bool == other.m_bool; case Type.int_: return m_int == other.m_int; case Type.bigInt: return m_bigInt == other.m_bigInt; case Type.float_: return m_float == other.m_float; case Type.string: return m_string == other.m_string; case Type.array: return m_array == other.m_array; case Type.object: return m_object == other.m_object; } } /// ditto bool opEquals(const Json other) const { return opEquals(other); } /// ditto bool opEquals(typeof(null)) const { return m_type == Type.null_; } /// ditto bool opEquals(bool v) const { return m_type == Type.bool_ && m_bool == v; } /// ditto bool opEquals(int v) const { return (m_type == Type.int_ && m_int == v) || (m_type == Type.bigInt && m_bigInt == v); } /// ditto bool opEquals(long v) const { return (m_type == Type.int_ && m_int == v) || (m_type == Type.bigInt && m_bigInt == v); } /// ditto bool opEquals(BigInt v) const { return (m_type == Type.int_ && m_int == v) || (m_type == Type.bigInt && m_bigInt == v); } /// ditto bool opEquals(double v) const { return m_type == Type.float_ && m_float == v; } /// ditto bool opEquals(string v) const { return m_type == Type.string && m_string == v; } /** Compares two JSON values. If the types of the two values differ, the value with the smaller type id is considered the smaller value. This differs from ECMA script, which performs a type conversion before comparing the values. JSON values of type Object cannot be compared and will throw an exception. */ int opCmp(ref const Json other) const { if( m_type != other.m_type ) return m_type < other.m_type ? -1 : 1; final switch(m_type){ case Type.undefined: return 0; case Type.null_: return 0; case Type.bool_: return m_bool < other.m_bool ? -1 : m_bool == other.m_bool ? 0 : 1; case Type.int_: return m_int < other.m_int ? -1 : m_int == other.m_int ? 0 : 1; case Type.bigInt: return () @trusted { return m_bigInt < other.m_bigInt; } () ? -1 : m_bigInt == other.m_bigInt ? 0 : 1; case Type.float_: return m_float < other.m_float ? -1 : m_float == other.m_float ? 0 : 1; case Type.string: return m_string < other.m_string ? -1 : m_string == other.m_string ? 0 : 1; case Type.array: return m_array < other.m_array ? -1 : m_array == other.m_array ? 0 : 1; case Type.object: enforceJson(false, "JSON objects cannot be compared."); assert(false); } } alias opDollar = length; /** Returns the type id corresponding to the given D type. */ static @property Type typeId(T)() { static if( is(T == typeof(null)) ) return Type.null_; else static if( is(T == bool) ) return Type.bool_; else static if( is(T == double) ) return Type.float_; else static if( is(T == float) ) return Type.float_; else static if( is(T : long) ) return Type.int_; else static if( is(T == string) ) return Type.string; else static if( is(T == Json[]) ) return Type.array; else static if( is(T == Json[string]) ) return Type.object; else static if( is(T == BigInt) ) return Type.bigInt; else static assert(false, "Unsupported JSON type '"~T.stringof~"'. Only bool, long, std.bigint.BigInt, double, string, Json[] and Json[string] are allowed."); } /** Returns the JSON object as a string. For large JSON values use writeJsonString instead as this function will store the whole string in memory, whereas writeJsonString writes it out bit for bit. See_Also: writeJsonString, toPrettyString */ string toString() const @trusted { // DMD BUG: this should actually be all @safe, but for some reason // @safe inference for writeJsonString doesn't work. auto ret = appender!string(); writeJsonString(ret, this); return ret.data; } /// ditto void toString(scope void delegate(const(char)[]) @safe sink, FormatSpec!char fmt) @trusted { // DMD BUG: this should actually be all @safe, but for some reason // @safe inference for writeJsonString doesn't work. static struct DummyRangeS { void delegate(const(char)[]) @safe sink; void put(const(char)[] str) @safe { sink(str); } void put(char ch) @trusted { sink((&ch)[0 .. 1]); } } auto r = DummyRangeS(sink); writeJsonString(r, this); } /// ditto void toString(scope void delegate(const(char)[]) @system sink, FormatSpec!char fmt) @system { // DMD BUG: this should actually be all @safe, but for some reason // @safe inference for writeJsonString doesn't work. static struct DummyRange { void delegate(const(char)[]) sink; @trusted: void put(const(char)[] str) { sink(str); } void put(char ch) { sink((&ch)[0 .. 1]); } } auto r = DummyRange(sink); writeJsonString(r, this); } /** Returns the JSON object as a "pretty" string. --- auto json = Json(["foo": Json("bar")]); writeln(json.toPrettyString()); // output: // { // "foo": "bar" // } --- Params: level = Specifies the base amount of indentation for the output. Indentation is always done using tab characters. See_Also: writePrettyJsonString, toString */ string toPrettyString(int level = 0) const @trusted { auto ret = appender!string(); writePrettyJsonString(ret, this, level); return ret.data; } private void checkType(TYPES...)(string op = null) const { bool matched = false; foreach (T; TYPES) if (m_type == typeId!T) matched = true; if (matched) return; string name; version (VibeJsonFieldNames) { if (m_name.length) name = m_name ~ " of type " ~ m_type.to!string; else name = "JSON of type " ~ m_type.to!string; } else name = "JSON of type " ~ m_type.to!string; string expected; static if (TYPES.length == 1) expected = typeId!(TYPES[0]).to!string; else { foreach (T; TYPES) { if (expected.length > 0) expected ~= ", "; expected ~= typeId!T.to!string; } } if (!op.length) throw new JSONException(format("Got %s, expected %s.", name, expected)); else throw new JSONException(format("Got %s, expected %s for %s.", name, expected, op)); } private void initBigInt() @trusted { BigInt[1] init_; // BigInt is a struct, and it has a special BigInt.init value, which differs from null. // m_data has no special initializer and when it tries to first access to BigInt // via m_bigInt(), we should explicitly initialize m_data with BigInt.init m_data[0 .. BigInt.sizeof] = cast(void[])init_; } private void runDestructors() { if (m_type != Type.bigInt) return; BigInt init_; // After swaping, init_ contains the real number from Json, and it // will be destroyed when this function is finished. // m_bigInt now contains static BigInt.init value and destruction may // be ommited for it. swap(init_, m_bigInt); } private long bigIntToLong() inout { assert(m_type == Type.bigInt, format("Converting non-bigInt type with bitIntToLong!?: %s", cast(Type)m_type)); enforceJson(m_bigInt >= long.min && m_bigInt <= long.max, "Number out of range while converting BigInt("~format("%d", m_bigInt)~") to long."); return m_bigInt.toLong(); } /*invariant() { assert(m_type >= Type.Undefined && m_type <= Type.Object); }*/ } @safe unittest { // issue #1234 - @safe toString auto j = Json(true); j.toString((str) @safe {}, FormatSpec!char("s")); assert(j.toString() == "true"); } /******************************************************************************/ /* public functions */ /******************************************************************************/ /** Parses the given range as a JSON string and returns the corresponding Json object. The range is shrunk during parsing, leaving any remaining text that is not part of the JSON contents. Throws a JSONException if any parsing error occured. */ Json parseJson(R)(ref R range, int* line = null, string filename = null) if( is(R == string) ) { Json ret; enforceJson(!range.empty, "JSON string is empty.", filename, 0); skipWhitespace(range, line); enforceJson(!range.empty, "JSON string contains only whitespaces.", filename, 0); version(JsonLineNumbers) { int curline = line ? *line : 0; } bool minus = false; switch( range.front ){ case 'f': enforceJson(range[1 .. $].startsWith("alse"), "Expected 'false', got '"~range[0 .. min(5, $)]~"'.", filename, line); range.popFrontN(5); ret = false; break; case 'n': enforceJson(range[1 .. $].startsWith("ull"), "Expected 'null', got '"~range[0 .. min(4, $)]~"'.", filename, line); range.popFrontN(4); ret = null; break; case 't': enforceJson(range[1 .. $].startsWith("rue"), "Expected 'true', got '"~range[0 .. min(4, $)]~"'.", filename, line); range.popFrontN(4); ret = true; break; case '-': case '0': .. case '9': bool is_long_overflow; bool is_float; auto num = skipNumber(range, is_float, is_long_overflow); if( is_float ) { ret = to!double(num); } else if (is_long_overflow) { ret = () @trusted { return BigInt(num); } (); } else { ret = to!long(num); } break; case '\"': ret = skipJsonString(range); break; case '[': auto arr = appender!(Json[]); range.popFront(); while (true) { skipWhitespace(range, line); enforceJson(!range.empty, "Missing ']' before EOF.", filename, line); if(range.front == ']') break; arr ~= parseJson(range, line, filename); skipWhitespace(range, line); enforceJson(!range.empty, "Missing ']' before EOF.", filename, line); enforceJson(range.front == ',' || range.front == ']', format("Expected ']' or ',' - got '%s'.", range.front), filename, line); if( range.front == ']' ) break; else range.popFront(); } range.popFront(); ret = arr.data; break; case '{': Json[string] obj; range.popFront(); while (true) { skipWhitespace(range, line); enforceJson(!range.empty, "Missing '}' before EOF.", filename, line); if(range.front == '}') break; string key = skipJsonString(range); skipWhitespace(range, line); enforceJson(range.startsWith(":"), "Expected ':' for key '" ~ key ~ "'", filename, line); range.popFront(); skipWhitespace(range, line); Json itm = parseJson(range, line, filename); obj[key] = itm; skipWhitespace(range, line); enforceJson(!range.empty, "Missing '}' before EOF.", filename, line); enforceJson(range.front == ',' || range.front == '}', format("Expected '}' or ',' - got '%s'.", range.front), filename, line); if (range.front == '}') break; else range.popFront(); } range.popFront(); ret = obj; break; default: enforceJson(false, format("Expected valid JSON token, got '%s'.", range[0 .. min(12, $)]), filename, line); assert(false); } assert(ret.type != Json.Type.undefined); version(JsonLineNumbers) ret.line = curline; return ret; } /** Parses the given JSON string and returns the corresponding Json object. Throws a JSONException if any parsing error occurs. */ Json parseJsonString(string str, string filename = null) @safe { auto strcopy = str; int line = 0; auto ret = parseJson(strcopy, () @trusted { return &line; } (), filename); enforceJson(strcopy.strip().length == 0, "Expected end of string after JSON value.", filename, line); return ret; } @safe unittest { assert(parseJsonString("null") == Json(null)); assert(parseJsonString("true") == Json(true)); assert(parseJsonString("false") == Json(false)); assert(parseJsonString("1") == Json(1)); assert(parseJsonString("17559991181826658461") == Json(BigInt(17559991181826658461UL))); assert(parseJsonString("99999999999999999999999999") == () @trusted { return Json(BigInt("99999999999999999999999999")); } ()); assert(parseJsonString("2.0") == Json(2.0)); assert(parseJsonString("\"test\"") == Json("test")); assert(parseJsonString("[1, 2, 3]") == Json([Json(1), Json(2), Json(3)])); assert(parseJsonString("{\"a\": 1}") == Json(["a": Json(1)])); assert(parseJsonString(`"\\\/\b\f\n\r\t\u1234"`).get!string == "\\/\b\f\n\r\t\u1234"); auto json = parseJsonString(`{"hey": "This is @à test éhééhhéhéé !%/??*&?\ud83d\udcec"}`); assert(json.toPrettyString() == parseJsonString(json.toPrettyString()).toPrettyString()); } @safe unittest { try parseJsonString(" \t\n "); catch (Exception e) assert(e.msg.endsWith("JSON string contains only whitespaces.")); try parseJsonString(`{"a": 1`); catch (Exception e) assert(e.msg.endsWith("Missing '}' before EOF.")); try parseJsonString(`{"a": 1 x`); catch (Exception e) assert(e.msg.endsWith("Expected '}' or ',' - got 'x'.")); try parseJsonString(`[1`); catch (Exception e) assert(e.msg.endsWith("Missing ']' before EOF.")); try parseJsonString(`[1 x`); catch (Exception e) assert(e.msg.endsWith("Expected ']' or ',' - got 'x'.")); } /** Serializes the given value to JSON. The following types of values are supported: $(DL $(DT `Json`) $(DD Used as-is) $(DT `null`) $(DD Converted to `Json.Type.null_`) $(DT `bool`) $(DD Converted to `Json.Type.bool_`) $(DT `float`, `double`) $(DD Converted to `Json.Type.float_`) $(DT `short`, `ushort`, `int`, `uint`, `long`, `ulong`) $(DD Converted to `Json.Type.int_`) $(DT `BigInt`) $(DD Converted to `Json.Type.bigInt`) $(DT `string`) $(DD Converted to `Json.Type.string`) $(DT `T[]`) $(DD Converted to `Json.Type.array`) $(DT `T[string]`) $(DD Converted to `Json.Type.object`) $(DT `struct`) $(DD Converted to `Json.Type.object`) $(DT `class`) $(DD Converted to `Json.Type.object` or `Json.Type.null_`) ) All entries of an array or an associative array, as well as all R/W properties and all public fields of a struct/class are recursively serialized using the same rules. Fields ending with an underscore will have the last underscore stripped in the serialized output. This makes it possible to use fields with D keywords as their name by simply appending an underscore. The following methods can be used to customize the serialization of structs/classes: --- Json toJson() const; static T fromJson(Json src); string toString() const; static T fromString(string src); --- The methods will have to be defined in pairs. The first pair that is implemented by the type will be used for serialization (i.e. `toJson` overrides `toString`). See_Also: `deserializeJson`, `vibe.data.serialization` */ Json serializeToJson(T)(T value) { return serialize!JsonSerializer(value); } /// ditto void serializeToJson(R, T)(R destination, T value) if (isOutputRange!(R, char) || isOutputRange!(R, ubyte)) { serialize!(JsonStringSerializer!R)(value, destination); } /// ditto string serializeToJsonString(T)(T value) { auto ret = appender!string; serializeToJson(ret, value); return ret.data; } /// @safe unittest { struct Foo { int number; string str; } Foo f; f.number = 12; f.str = "hello"; string json = serializeToJsonString(f); assert(json == `{"number":12,"str":"hello"}`); Json jsonval = serializeToJson(f); assert(jsonval.type == Json.Type.object); assert(jsonval["number"] == Json(12)); assert(jsonval["str"] == Json("hello")); } /** Serializes the given value to a pretty printed JSON string. See_also: `serializeToJson`, `vibe.data.serialization` */ void serializeToPrettyJson(R, T)(R destination, T value) if (isOutputRange!(R, char) || isOutputRange!(R, ubyte)) { serialize!(JsonStringSerializer!(R, true))(value, destination); } /// ditto string serializeToPrettyJson(T)(T value) { auto ret = appender!string; serializeToPrettyJson(ret, value); return ret.data; } /// @safe unittest { struct Foo { int number; string str; } Foo f; f.number = 12; f.str = "hello"; string json = serializeToPrettyJson(f); assert(json == `{ "number": 12, "str": "hello" }`); } /** Deserializes a JSON value into the destination variable. The same types as for `serializeToJson()` are supported and handled inversely. See_Also: `serializeToJson`, `serializeToJsonString`, `vibe.data.serialization` */ void deserializeJson(T)(ref T dst, Json src) { dst = deserializeJson!T(src); } /// ditto T deserializeJson(T)(Json src) { return deserialize!(JsonSerializer, T)(src); } /// ditto T deserializeJson(T, R)(R input) if (!is(R == Json) && isInputRange!R) { return deserialize!(JsonStringSerializer!R, T)(input); } /// @safe unittest { struct Foo { int number; string str; } Foo f = deserializeJson!Foo(`{"number": 12, "str": "hello"}`); assert(f.number == 12); assert(f.str == "hello"); } @safe unittest { import std.stdio; enum Foo : string { k = "test" } enum Boo : int { l = 5 } static struct S { float a; double b; bool c; int d; string e; byte f; ubyte g; long h; ulong i; float[] j; Foo k; Boo l; } immutable S t = {1.5, -3.0, true, int.min, "Test", -128, 255, long.min, ulong.max, [1.1, 1.2, 1.3], Foo.k, Boo.l}; S u; deserializeJson(u, serializeToJson(t)); assert(t.a == u.a); assert(t.b == u.b); assert(t.c == u.c); assert(t.d == u.d); assert(t.e == u.e); assert(t.f == u.f); assert(t.g == u.g); assert(t.h == u.h); assert(t.i == u.i); assert(t.j == u.j); assert(t.k == u.k); assert(t.l == u.l); } @safe unittest { assert(uint.max == serializeToJson(uint.max).deserializeJson!uint); assert(ulong.max == serializeToJson(ulong.max).deserializeJson!ulong); } unittest { static struct A { int value; static A fromJson(Json val) @safe { return A(val.get!int); } Json toJson() const @safe { return Json(value); } } static struct C { int value; static C fromString(string val) @safe { return C(val.to!int); } string toString() const @safe { return value.to!string; } } static struct D { int value; } assert(serializeToJson(const A(123)) == Json(123)); assert(serializeToJson(A(123)) == Json(123)); assert(serializeToJson(const C(123)) == Json("123")); assert(serializeToJson(C(123)) == Json("123")); assert(serializeToJson(const D(123)) == serializeToJson(["value": 123])); assert(serializeToJson(D(123)) == serializeToJson(["value": 123])); } unittest { auto d = Date(2001,1,1); deserializeJson(d, serializeToJson(Date.init)); assert(d == Date.init); deserializeJson(d, serializeToJson(Date(2001,1,1))); assert(d == Date(2001,1,1)); struct S { immutable(int)[] x; } S s; deserializeJson(s, serializeToJson(S([1,2,3]))); assert(s == S([1,2,3])); struct T { @optional S s; @optional int i; @optional float f_; // underscore strip feature @optional double d; @optional string str; } auto t = T(S([1,2,3])); deserializeJson(t, parseJsonString(`{ "s" : null, "i" : null, "f" : null, "d" : null, "str" : null }`)); assert(text(t) == text(T())); } unittest { static class C { @safe: int a; private int _b; @property int b() const { return _b; } @property void b(int v) { _b = v; } @property int test() const { return 10; } void test2() {} } C c = new C; c.a = 1; c.b = 2; C d; deserializeJson(d, serializeToJson(c)); assert(c.a == d.a); assert(c.b == d.b); } unittest { static struct C { @safe: int value; static C fromString(string val) { return C(val.to!int); } string toString() const { return value.to!string; } } enum Color { Red, Green, Blue } { static class T { @safe: string[Color] enumIndexedMap; string[C] stringableIndexedMap; this() { enumIndexedMap = [ Color.Red : "magenta", Color.Blue : "deep blue" ]; stringableIndexedMap = [ C(42) : "forty-two" ]; } } T original = new T; original.enumIndexedMap[Color.Green] = "olive"; T other; deserializeJson(other, serializeToJson(original)); assert(serializeToJson(other) == serializeToJson(original)); } { static struct S { string[Color] enumIndexedMap; string[C] stringableIndexedMap; } S *original = new S; original.enumIndexedMap = [ Color.Red : "magenta", Color.Blue : "deep blue" ]; original.enumIndexedMap[Color.Green] = "olive"; original.stringableIndexedMap = [ C(42) : "forty-two" ]; S other; deserializeJson(other, serializeToJson(original)); assert(serializeToJson(other) == serializeToJson(original)); } } unittest { import std.typecons : Nullable; struct S { Nullable!int a, b; } S s; s.a = 2; auto j = serializeToJson(s); assert(j["a"].type == Json.Type.int_); assert(j["b"].type == Json.Type.null_); auto t = deserializeJson!S(j); assert(!t.a.isNull() && t.a == 2); assert(t.b.isNull()); } unittest { // #840 int[2][2] nestedArray = 1; assert(nestedArray.serializeToJson.deserializeJson!(typeof(nestedArray)) == nestedArray); } unittest { // #1109 static class C { @safe: int mem; this(int m) { mem = m; } static C fromJson(Json j) { return new C(j.get!int-1); } Json toJson() const { return Json(mem+1); } } const c = new C(13); assert(serializeToJson(c) == Json(14)); assert(deserializeJson!C(Json(14)).mem == 13); } unittest { // const and mutable json Json j = Json(1); const k = Json(2); assert(serializeToJson(j) == Json(1)); assert(serializeToJson(k) == Json(2)); } unittest { // issue #1660 - deserialize AA whose key type is string-based enum enum Foo: string { Bar = "bar", Buzz = "buzz" } struct S { int[Foo] f; } const s = S([Foo.Bar: 2000]); assert(serializeToJson(s)["f"] == Json([Foo.Bar: Json(2000)])); auto j = Json.emptyObject; j["f"] = [Foo.Bar: Json(2000)]; assert(deserializeJson!S(j).f == [Foo.Bar: 2000]); } /** Serializer for a plain Json representation. See_Also: vibe.data.serialization.serialize, vibe.data.serialization.deserialize, serializeToJson, deserializeJson */ struct JsonSerializer { template isJsonBasicType(T) { enum isJsonBasicType = std.traits.isNumeric!T || isBoolean!T || is(T == string) || is(T == typeof(null)) || isJsonSerializable!T; } template isSupportedValueType(T) { enum isSupportedValueType = isJsonBasicType!T || is(T == Json); } private { Json m_current; Json[] m_compositeStack; } this(Json data) @safe { m_current = data; } @disable this(this); // // serialization // Json getSerializedResult() @safe { return m_current; } void beginWriteDictionary(Traits)() { m_compositeStack ~= Json.emptyObject; } void endWriteDictionary(Traits)() { m_current = m_compositeStack[$-1]; m_compositeStack.length--; } void beginWriteDictionaryEntry(Traits)(string name) {} void endWriteDictionaryEntry(Traits)(string name) { m_compositeStack[$-1][name] = m_current; } void beginWriteArray(Traits)(size_t) { m_compositeStack ~= Json.emptyArray; } void endWriteArray(Traits)() { m_current = m_compositeStack[$-1]; m_compositeStack.length--; } void beginWriteArrayEntry(Traits)(size_t) {} void endWriteArrayEntry(Traits)(size_t) { m_compositeStack[$-1].appendArrayElement(m_current); } void writeValue(Traits, T)(in T value) if (!is(T == Json)) { static if (isJsonSerializable!T) { static if (!__traits(compiles, () @safe { return value.toJson(); } ())) pragma(msg, "Non-@safe toJson/fromJson methods are deprecated - annotate "~T.stringof~".toJson() with @safe."); m_current = () @trusted { return value.toJson(); } (); } else m_current = Json(value); } void writeValue(Traits, T)(Json value) if (is(T == Json)) { m_current = value; } void writeValue(Traits, T)(in Json value) if (is(T == Json)) { m_current = value.clone; } // // deserialization // void readDictionary(Traits)(scope void delegate(string) @safe field_handler) { enforceJson(m_current.type == Json.Type.object, "Expected JSON object, got "~m_current.type.to!string); auto old = m_current; foreach (string key, value; m_current.get!(Json[string])) { m_current = value; field_handler(key); } m_current = old; } void beginReadDictionaryEntry(Traits)(string name) {} void endReadDictionaryEntry(Traits)(string name) {} void readArray(Traits)(scope void delegate(size_t) @safe size_callback, scope void delegate() @safe entry_callback) { enforceJson(m_current.type == Json.Type.array, "Expected JSON array, got "~m_current.type.to!string); auto old = m_current; size_callback(m_current.length); foreach (ent; old.get!(Json[])) { m_current = ent; entry_callback(); } m_current = old; } void beginReadArrayEntry(Traits)(size_t index) {} void endReadArrayEntry(Traits)(size_t index) {} T readValue(Traits, T)() @safe { static if (is(T == Json)) return m_current; else static if (isJsonSerializable!T) { static if (!__traits(compiles, () @safe { return T.fromJson(m_current); } ())) pragma(msg, "Non-@safe toJson/fromJson methods are deprecated - annotate "~T.stringof~".fromJson() with @safe."); return () @trusted { return T.fromJson(m_current); } (); } else static if (is(T == float) || is(T == double)) { switch (m_current.type) { default: return cast(T)m_current.get!long; case Json.Type.null_: goto case; case Json.Type.undefined: return T.nan; case Json.Type.float_: return cast(T)m_current.get!double; case Json.Type.bigInt: return cast(T)m_current.bigIntToLong(); } } else { return m_current.get!T(); } } bool tryReadNull(Traits)() { return m_current.type == Json.Type.null_; } } /** Serializer for a range based plain JSON string representation. See_Also: vibe.data.serialization.serialize, vibe.data.serialization.deserialize, serializeToJson, deserializeJson */ struct JsonStringSerializer(R, bool pretty = false) if (isInputRange!R || isOutputRange!(R, char)) { private { R m_range; size_t m_level = 0; } template isJsonBasicType(T) { enum isJsonBasicType = std.traits.isNumeric!T || isBoolean!T || is(T == string) || is(T == typeof(null)) || isJsonSerializable!T; } template isSupportedValueType(T) { enum isSupportedValueType = isJsonBasicType!T || is(T == Json); } this(R range) { m_range = range; } @disable this(this); // // serialization // static if (isOutputRange!(R, char)) { private { bool m_firstInComposite; } void getSerializedResult() {} void beginWriteDictionary(Traits)() { startComposite(); m_range.put('{'); } void endWriteDictionary(Traits)() { endComposite(); m_range.put("}"); } void beginWriteDictionaryEntry(Traits)(string name) { startCompositeEntry(); m_range.put('"'); m_range.jsonEscape(name); static if (pretty) m_range.put(`": `); else m_range.put(`":`); } void endWriteDictionaryEntry(Traits)(string name) {} void beginWriteArray(Traits)(size_t) { startComposite(); m_range.put('['); } void endWriteArray(Traits)() { endComposite(); m_range.put(']'); } void beginWriteArrayEntry(Traits)(size_t) { startCompositeEntry(); } void endWriteArrayEntry(Traits)(size_t) {} void writeValue(Traits, T)(in T value) { static if (is(T == typeof(null))) m_range.put("null"); else static if (is(T == bool)) m_range.put(value ? "true" : "false"); else static if (is(T : long)) m_range.formattedWrite("%s", value); else static if (is(T == BigInt)) () @trusted { m_range.formattedWrite("%d", value); } (); else static if (is(T : real)) value == value ? m_range.formattedWrite("%.16g", value) : m_range.put("null"); else static if (is(T == string)) { m_range.put('"'); m_range.jsonEscape(value); m_range.put('"'); } else static if (is(T == Json)) m_range.writeJsonString(value); else static if (isJsonSerializable!T) { static if (!__traits(compiles, () @safe { return value.toJson(); } ())) pragma(msg, "Non-@safe toJson/fromJson methods are deprecated - annotate "~T.stringof~".toJson() with @safe."); m_range.writeJsonString!(R, pretty)(() @trusted { return value.toJson(); } (), m_level); } else static assert(false, "Unsupported type: " ~ T.stringof); } private void startComposite() { static if (pretty) m_level++; m_firstInComposite = true; } private void startCompositeEntry() { if (!m_firstInComposite) { m_range.put(','); } else { m_firstInComposite = false; } static if (pretty) indent(); } private void endComposite() { static if (pretty) { m_level--; if (!m_firstInComposite) indent(); } m_firstInComposite = false; } private void indent() { m_range.put('\n'); foreach (i; 0 .. m_level) m_range.put('\t'); } } // // deserialization // static if (isInputRange!(R)) { private { int m_line = 0; } void readDictionary(Traits)(scope void delegate(string) @safe entry_callback) { m_range.skipWhitespace(&m_line); enforceJson(!m_range.empty && m_range.front == '{', "Expecting object."); m_range.popFront(); bool first = true; while(true) { m_range.skipWhitespace(&m_line); enforceJson(!m_range.empty, "Missing '}'."); if (m_range.front == '}') { m_range.popFront(); break; } else if (!first) { enforceJson(m_range.front == ',', "Expecting ',' or '}', not '"~m_range.front.to!string~"'."); m_range.popFront(); m_range.skipWhitespace(&m_line); } else first = false; auto name = m_range.skipJsonString(&m_line); m_range.skipWhitespace(&m_line); enforceJson(!m_range.empty && m_range.front == ':', "Expecting ':', not '"~m_range.front.to!string~"'."); m_range.popFront(); entry_callback(name); } } void beginReadDictionaryEntry(Traits)(string name) {} void endReadDictionaryEntry(Traits)(string name) {} void readArray(Traits)(scope void delegate(size_t) @safe size_callback, scope void delegate() @safe entry_callback) { m_range.skipWhitespace(&m_line); enforceJson(!m_range.empty && m_range.front == '[', "Expecting array."); m_range.popFront(); bool first = true; while(true) { m_range.skipWhitespace(&m_line); enforceJson(!m_range.empty, "Missing ']'."); if (m_range.front == ']') { m_range.popFront(); break; } else if (!first) { enforceJson(m_range.front == ',', "Expecting ',' or ']'."); m_range.popFront(); } else first = false; entry_callback(); } } void beginReadArrayEntry(Traits)(size_t index) {} void endReadArrayEntry(Traits)(size_t index) {} T readValue(Traits, T)() { m_range.skipWhitespace(&m_line); static if (is(T == typeof(null))) { enforceJson(m_range.take(4).equal("null"), "Expecting 'null'."); return null; } else static if (is(T == bool)) { bool ret = m_range.front == 't'; string expected = ret ? "true" : "false"; foreach (ch; expected) { enforceJson(m_range.front == ch, "Expecting 'true' or 'false'."); m_range.popFront(); } return ret; } else static if (is(T : long)) { bool is_float; bool is_long_overflow; auto num = m_range.skipNumber(is_float, is_long_overflow); enforceJson(!is_float, "Expecting integer number."); enforceJson(!is_long_overflow, num~" is too big for long."); return to!T(num); } else static if (is(T : BigInt)) { bool is_float; bool is_long_overflow; auto num = m_range.skipNumber(is_float, is_long_overflow); enforceJson(!is_float, "Expecting integer number."); return BigInt(num); } else static if (is(T : real)) { bool is_float; bool is_long_overflow; auto num = m_range.skipNumber(is_float, is_long_overflow); return to!T(num); } else static if (is(T == string)) return m_range.skipJsonString(&m_line); else static if (is(T == Json)) return m_range.parseJson(&m_line); else static if (isJsonSerializable!T) { static if (!__traits(compiles, () @safe { return T.fromJson(Json.init); } ())) pragma(msg, "Non-@safe toJson/fromJson methods are deprecated - annotate "~T.stringof~".fromJson() with @safe."); return () @trusted { return T.fromJson(m_range.parseJson(&m_line)); } (); } else static assert(false, "Unsupported type: " ~ T.stringof); } bool tryReadNull(Traits)() { m_range.skipWhitespace(&m_line); if (m_range.front != 'n') return false; foreach (ch; "null") { enforceJson(m_range.front == ch, "Expecting 'null'."); m_range.popFront(); } assert(m_range.empty || m_range.front != 'l'); return true; } } } unittest { assert(serializeToJsonString(double.nan) == "null"); assert(serializeToJsonString(Json()) == "null"); assert(serializeToJsonString(Json(["bar":Json("baz"),"foo":Json()])) == `{"bar":"baz"}`); struct Foo{Json bar = Json();} Foo f; assert(serializeToJsonString(f) == `{"bar":null}`); } /** Writes the given JSON object as a JSON string into the destination range. This function will convert the given JSON value to a string without adding any white space between tokens (no newlines, no indentation and no padding). The output size is thus minimized, at the cost of bad human readability. Params: dst = References the string output range to which the result is written. json = Specifies the JSON value that is to be stringified. See_Also: Json.toString, writePrettyJsonString */ void writeJsonString(R, bool pretty = false)(ref R dst, in Json json, size_t level = 0) @safe // if( isOutputRange!R && is(ElementEncodingType!R == char) ) { final switch( json.type ){ case Json.Type.undefined: dst.put("null"); break; case Json.Type.null_: dst.put("null"); break; case Json.Type.bool_: dst.put(json.get!bool ? "true" : "false"); break; case Json.Type.int_: formattedWrite(dst, "%d", json.get!long); break; case Json.Type.bigInt: () @trusted { formattedWrite(dst, "%d", json.get!BigInt); } (); break; case Json.Type.float_: auto d = json.get!double; if (d != d) dst.put("null"); // JSON has no NaN value so set null else formattedWrite(dst, "%.16g", json.get!double); break; case Json.Type.string: dst.put('\"'); jsonEscape(dst, json.get!string); dst.put('\"'); break; case Json.Type.array: dst.put('['); bool first = true; foreach (ref const Json e; json.byValue) { if( !first ) dst.put(","); first = false; static if (pretty) { dst.put('\n'); foreach (tab; 0 .. level+1) dst.put('\t'); } if (e.type == Json.Type.undefined) dst.put("null"); else writeJsonString!(R, pretty)(dst, e, level+1); } static if (pretty) { if (json.length > 0) { dst.put('\n'); foreach (tab; 0 .. level) dst.put('\t'); } } dst.put(']'); break; case Json.Type.object: dst.put('{'); bool first = true; foreach (string k, ref const Json e; json.byKeyValue) { if( e.type == Json.Type.undefined ) continue; if( !first ) dst.put(','); first = false; static if (pretty) { dst.put('\n'); foreach (tab; 0 .. level+1) dst.put('\t'); } dst.put('\"'); jsonEscape(dst, k); dst.put(pretty ? `": ` : `":`); writeJsonString!(R, pretty)(dst, e, level+1); } static if (pretty) { if (json.length > 0) { dst.put('\n'); foreach (tab; 0 .. level) dst.put('\t'); } } dst.put('}'); break; } } unittest { auto a = Json.emptyObject; a["a"] = Json.emptyArray; a["b"] = Json.emptyArray; a["b"] ~= Json(1); a["b"] ~= Json.emptyObject; assert(a.toString() == `{"a":[],"b":[1,{}]}` || a.toString() == `{"b":[1,{}],"a":[]}`); assert(a.toPrettyString() == `{ "a": [], "b": [ 1, {} ] }` || a.toPrettyString() == `{ "b": [ 1, {} ], "a": [] }`); } unittest { // #735 auto a = Json.emptyArray; a ~= "a"; a ~= Json(); a ~= "b"; a ~= null; a ~= "c"; assert(a.toString() == `["a",null,"b",null,"c"]`); } unittest { auto a = Json.emptyArray; a ~= Json(1); a ~= Json(2); a ~= Json(3); a ~= Json(4); a ~= Json(5); auto b = Json(a[0..a.length]); assert(a == b); auto c = Json(a[0..$]); assert(a == c); assert(b == c); auto d = [Json(1),Json(2),Json(3)]; assert(d == a[0..a.length-2]); assert(d == a[0..$-2]); } unittest { auto j = Json(double.init); assert(j.toString == "null"); // A double nan should serialize to null j = 17.04f; assert(j.toString == "17.04"); // A proper double should serialize correctly double d; deserializeJson(d, Json.undefined); // Json.undefined should deserialize to nan assert(d != d); deserializeJson(d, Json(null)); // Json.undefined should deserialize to nan assert(d != d); } /** Writes the given JSON object as a prettified JSON string into the destination range. The output will contain newlines and indents to make the output human readable. Params: dst = References the string output range to which the result is written. json = Specifies the JSON value that is to be stringified. level = Specifies the base amount of indentation for the output. Indentation is always done using tab characters. See_Also: Json.toPrettyString, writeJsonString */ void writePrettyJsonString(R)(ref R dst, in Json json, int level = 0) // if( isOutputRange!R && is(ElementEncodingType!R == char) ) { writeJsonString!(R, true)(dst, json, level); } /** Helper function that escapes all Unicode characters in a JSON string. */ string convertJsonToASCII(string json) { auto ret = appender!string; jsonEscape!true(ret, json); return ret.data; } /// private private void jsonEscape(bool escape_unicode = false, R)(ref R dst, string s) { char lastch; for (size_t pos = 0; pos < s.length; pos++) { immutable(char) ch = s[pos]; switch (ch) { default: static if (escape_unicode) { if (ch > 0x20 && ch < 0x80) dst.put(ch); else { import std.utf : decode; int len; dchar codepoint = decode(s, pos); /* codepoint is in BMP */ if(codepoint < 0x10000) { dst.formattedWrite("\\u%04X", codepoint); } /* not in BMP -> construct a UTF-16 surrogate pair */ else { int first, last; codepoint -= 0x10000; first = 0xD800 | ((codepoint & 0xffc00) >> 10); last = 0xDC00 | (codepoint & 0x003ff); dst.formattedWrite("\\u%04X\\u%04X", first, last); } pos -= 1; } } else { if (ch < 0x20) dst.formattedWrite("\\u%04X", ch); else dst.put(ch); } break; case '\\': dst.put("\\\\"); break; case '\r': dst.put("\\r"); break; case '\n': dst.put("\\n"); break; case '\t': dst.put("\\t"); break; case '\"': dst.put("\\\""); break; case '/': // this avoids the sequence "</" in the output, which is prone // to cross site scripting attacks when inserted into web pages if (lastch == '<') dst.put("\\/"); else dst.put(ch); break; } lastch = ch; } } /// private private string jsonUnescape(R)(ref R range) { auto ret = appender!string(); while(!range.empty){ auto ch = range.front; switch( ch ){ case '"': return ret.data; case '\\': range.popFront(); enforceJson(!range.empty, "Unterminated string escape sequence."); switch(range.front){ default: enforceJson(false, "Invalid string escape sequence."); break; case '"': ret.put('\"'); range.popFront(); break; case '\\': ret.put('\\'); range.popFront(); break; case '/': ret.put('/'); range.popFront(); break; case 'b': ret.put('\b'); range.popFront(); break; case 'f': ret.put('\f'); range.popFront(); break; case 'n': ret.put('\n'); range.popFront(); break; case 'r': ret.put('\r'); range.popFront(); break; case 't': ret.put('\t'); range.popFront(); break; case 'u': dchar decode_unicode_escape() { enforceJson(range.front == 'u'); range.popFront(); dchar uch = 0; foreach( i; 0 .. 4 ){ uch *= 16; enforceJson(!range.empty, "Unicode sequence must be '\\uXXXX'."); auto dc = range.front; range.popFront(); if( dc >= '0' && dc <= '9' ) uch += dc - '0'; else if( dc >= 'a' && dc <= 'f' ) uch += dc - 'a' + 10; else if( dc >= 'A' && dc <= 'F' ) uch += dc - 'A' + 10; else enforceJson(false, "Unicode sequence must be '\\uXXXX'."); } return uch; } auto uch = decode_unicode_escape(); if(0xD800 <= uch && uch <= 0xDBFF) { /* surrogate pair */ range.popFront(); // backslash '\' auto uch2 = decode_unicode_escape(); enforceJson(0xDC00 <= uch2 && uch2 <= 0xDFFF, "invalid Unicode"); { /* valid second surrogate */ uch = ((uch - 0xD800) << 10) + (uch2 - 0xDC00) + 0x10000; } } ret.put(uch); break; } break; default: ret.put(ch); range.popFront(); break; } } return ret.data; } /// private private string skipNumber(R)(ref R s, out bool is_float, out bool is_long_overflow) { // TODO: make this work with input ranges size_t idx = 0; is_float = false; is_long_overflow = false; ulong int_part = 0; if (s[idx] == '-') idx++; if (s[idx] == '0') idx++; else { enforceJson(isDigit(s[idx]), "Digit expected at beginning of number."); int_part = s[idx++] - '0'; while( idx < s.length && isDigit(s[idx]) ) { if (!is_long_overflow) { auto dig = s[idx] - '0'; if ((long.max / 10) > int_part || ((long.max / 10) == int_part && (long.max % 10) >= dig)) { int_part *= 10; int_part += dig; } else { is_long_overflow = true; } } idx++; } } if( idx < s.length && s[idx] == '.' ){ idx++; is_float = true; while( idx < s.length && isDigit(s[idx]) ) idx++; } if( idx < s.length && (s[idx] == 'e' || s[idx] == 'E') ){ idx++; is_float = true; if( idx < s.length && (s[idx] == '+' || s[idx] == '-') ) idx++; enforceJson( idx < s.length && isDigit(s[idx]), "Expected exponent." ~ s[0 .. idx]); idx++; while( idx < s.length && isDigit(s[idx]) ) idx++; } string ret = s[0 .. idx]; s = s[idx .. $]; return ret; } unittest { string test_1 = "9223372036854775806"; // lower then long.max string test_2 = "9223372036854775807"; // long.max string test_3 = "9223372036854775808"; // greater then long.max bool is_float; bool is_long_overflow; test_1.skipNumber(is_float, is_long_overflow); assert(!is_long_overflow); test_2.skipNumber(is_float, is_long_overflow); assert(!is_long_overflow); test_3.skipNumber(is_float, is_long_overflow); assert(is_long_overflow); } /// private private string skipJsonString(R)(ref R s, int* line = null) { // TODO: count or disallow any newlines inside of the string enforceJson(!s.empty && s.front == '"', "Expected '\"' to start string."); s.popFront(); string ret = jsonUnescape(s); enforceJson(!s.empty && s.front == '"', "Expected '\"' to terminate string."); s.popFront(); return ret; } /// private private void skipWhitespace(R)(ref R s, int* line = null) { while (!s.empty) { switch (s.front) { default: return; case ' ', '\t': s.popFront(); break; case '\n': s.popFront(); if (!s.empty && s.front == '\r') s.popFront(); if (line) (*line)++; break; case '\r': s.popFront(); if (!s.empty && s.front == '\n') s.popFront(); if (line) (*line)++; break; } } } private bool isDigit(dchar ch) @safe nothrow pure { return ch >= '0' && ch <= '9'; } private string underscoreStrip(string field_name) @safe nothrow pure { if( field_name.length < 1 || field_name[$-1] != '_' ) return field_name; else return field_name[0 .. $-1]; } /// private package template isJsonSerializable(T) { enum isJsonSerializable = is(typeof(T.init.toJson()) == Json) && is(typeof(T.fromJson(Json())) == T); } private void enforceJson(string file = __FILE__, size_t line = __LINE__)(bool cond, lazy string message = "JSON exception") { enforceEx!JSONException(cond, message, file, line); } private void enforceJson(string file = __FILE__, size_t line = __LINE__)(bool cond, lazy string message, string err_file, int err_line) { enforceEx!JSONException(cond, format("%s(%s): Error: %s", err_file, err_line+1, message), file, line); } private void enforceJson(string file = __FILE__, size_t line = __LINE__)(bool cond, lazy string message, string err_file, int* err_line) { enforceJson!(file, line)(cond, message, err_file, err_line ? *err_line : -1); } private auto trustedRange(R)(R range) { static struct Rng { private R range; @property bool empty() @trusted { return range.empty; } @property auto front() @trusted { return range.front; } void popFront() @trusted { range.popFront(); } } return Rng(range); } // test for vibe.utils.DictionaryList @safe unittest { import vibe.utils.dictionarylist; static assert(isCustomSerializable!(DictionaryList!int)); DictionaryList!(int, false) b; b.addField("a", 1); b.addField("A", 2); auto app = appender!string(); serializeToJson(app, b); assert(app.data == `[{"key":"a","value":1},{"key":"A","value":2}]`, app.data); DictionaryList!(int, true, 2) c; c.addField("a", 1); c.addField("b", 2); c.addField("a", 3); c.remove("b"); auto appc = appender!string(); serializeToJson(appc, c); assert(appc.data == `[{"key":"a","value":1},{"key":"a","value":3}]`, appc.data); } // make sure Json is usable for CTFE @safe unittest { static assert(is(typeof({ struct Test { Json object_ = Json.emptyObject; Json array = Json.emptyArray; } })), "CTFE for Json type failed."); static Json test() { Json j; j = Json(42); j = Json([Json(true)]); j = Json(["foo": Json(null)]); j = Json("foo"); return j; } enum j = test(); static assert(j == Json("foo")); } @safe unittest { // XSS prevention assert(Json("</script>some/path").toString() == `"<\/script>some/path"`); assert(serializeToJsonString("</script>some/path") == `"<\/script>some/path"`); }
D
module wrapper.sodium.crypto_verify_32; import wrapper.sodium.core; // assure sodium got initialized public import deimos.sodium.crypto_verify_32 : crypto_verify_32_BYTES, crypto_verify_32_bytes; // crypto_verify_32; // overloading a functions between module deimos.sodium.crypto_verify_32 and this module alias crypto_verify_32 = deimos.sodium.crypto_verify_32.crypto_verify_32; /** Secrets are always compared in constant time using sodium_memcmp() or crypto_verify_(16|32|64)() * @returns true, if the content of array `x` matches the content of array `y`. * Otherwise, it returns false. */ pragma(inline, true) bool crypto_verify_32(const ubyte[crypto_verify_32_BYTES] x, const ubyte[crypto_verify_32_BYTES] y) @nogc nothrow pure @trusted { return crypto_verify_32(x.ptr, y.ptr) == 0; // __attribute__ ((warn_unused_result)) __attribute__ ((nonnull)); } pure @system unittest { import std.stdio : writeln; import std.range : iota, array; debug writeln("unittest block 1 from sodium.crypto_verify_32.d"); //crypto_verify_32 ubyte[] buf1 = array(iota(ubyte(1), cast(ubyte)(1+crypto_verify_32_BYTES))); // [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32]; ubyte[] buf2 = buf1.dup; assert(crypto_verify_32(buf1.ptr, buf2.ptr) == 0); buf2[$-1] = 33; assert(crypto_verify_32(buf1.ptr, buf2.ptr) == -1); } @nogc nothrow pure @safe unittest { import std.range : iota, enumerate; //crypto_verify_32_bytes assert(crypto_verify_32_bytes() == crypto_verify_32_BYTES); //crypto_verify_32 overload ubyte[crypto_verify_32_BYTES] buf1 = void; // = array(iota(ubyte(1), cast(ubyte)(1+crypto_verify_32_BYTES)))[]; version(GNU) // GDC (GNU D Compiler) is the compiler ; there, enumerate is not @nogc { size_t idx; foreach (e; iota(ubyte(1), cast(ubyte)(1+crypto_verify_32_BYTES))) buf1[idx++] = e; } else { foreach (i, e; iota(ubyte(1), cast(ubyte)(1+crypto_verify_32_BYTES)).enumerate) buf1[i] = e; } ubyte[crypto_verify_32_BYTES] buf2 = buf1; assert( crypto_verify_32(buf1, buf2)); buf2[$-1] = 33; assert(!crypto_verify_32(buf1, buf2)); }
D
/** Numeric related utilities used by TSV Utilities. Utilities in this file: $(LIST * [formatNumber] - An alternate print format for numbers, especially useful when doubles are being used to represent integer and float values. * [rangeMedian] - Finds the median value of a range. * [quantile] - Generates quantile values for a data set. ) Copyright (c) 2016-2019, eBay Software Foundation Initially written by Jon Degenhardt License: Boost Licence 1.0 (http://boost.org/LICENSE_1_0.txt) */ module tsv_utils.common.numerics; import std.traits : isFloatingPoint, isIntegral, Unqual; /** formatNumber is an alternate way to print numbers. It is especially useful when representing both integral and floating point values with float point data types. formatNumber was created for tsv-summarize, where all calculations are done as doubles, but may be integers by nature. In addition, output may be either for human consumption or for additional machine processing. Integers are printed normally. Floating point is printed as follows: $(LIST * Values that are exact integral values are printed as integers, as long as they are within the range of where all integers are represented exactly by the floating point type. The practical effect is to avoid switching to exponential notion. * If the specified floatPrecision is between 0 and readablePrecisionMax, then floatPrecision is used to set the significant digits following the decimal point. Otherwise, it is used to set total significant digits. This does not apply to really large numbers, for doubles, those larger than 2^53. Trailing zeros are chopped in all cases. ) */ auto formatNumber(T, size_t readablePrecisionMax = 6)(T num, const size_t floatPrecision = 12) if (isFloatingPoint!T || isIntegral!T) { alias UT = Unqual!T; import std.conv : to; import std.format : format; static if (isIntegral!T) { return format("%d", num); // The easy case. } else { static assert(isFloatingPoint!T); static if (!is(UT == float) && !is(UT == double)) { /* Not a double or float, but a floating point. Punt on refinements. */ return format("%.*g", floatPrecision, num); } else { static assert(is(UT == float) || is(UT == double)); if (floatPrecision <= readablePrecisionMax) { /* Print with a fixed precision beyond the decimal point (%.*f), but * remove trailing zeros. Notes: * - This handles integer values stored in floating point types. * - Values like NaN and infinity also handled. */ immutable str = format("%.*f", floatPrecision, num); size_t trimToLength = str.length; if (floatPrecision != 0 && str.length > floatPrecision + 1) { import std.ascii : isDigit; assert(str.length - floatPrecision - 1 > 0); size_t decimalIndex = str.length - floatPrecision - 1; if (str[decimalIndex] == '.' && str[decimalIndex - 1].isDigit) { size_t lastNonZeroDigit = str.length - 1; assert(decimalIndex < lastNonZeroDigit); while (str[lastNonZeroDigit] == '0') lastNonZeroDigit--; trimToLength = (decimalIndex < lastNonZeroDigit) ? lastNonZeroDigit + 1 : decimalIndex; } } return str[0 .. trimToLength]; } else { /* Determine if the number is subject to special integer value printing. * Goal is to avoid exponential notion for integer values that '%.*g' * generates. Numbers within the significant digit range of floatPrecision * will print as desired with '%.*g', whether there is a fractional part * or not. The '%.*g' format, with exponential notation, is also used for * really large numbers. "Really large" being numbers outside the range * of integers exactly representable by the floating point type. */ enum UT maxConsecutiveUTInteger = 2.0^^UT.mant_dig; enum bool maxUTIntFitsInLong = (maxConsecutiveUTInteger <= long.max); import std.math : fabs; immutable UT absNum = num.fabs; if (!maxUTIntFitsInLong || absNum < 10.0^^floatPrecision || absNum > maxConsecutiveUTInteger) { /* Within signficant digits range or very large. */ return format("%.*g", floatPrecision, num); } else { /* Check for integral values needing to be printed in decimal format. * modf/modff are used to determine if the value has a non-zero * fractional component. */ import core.stdc.math : modf, modff; static if (is(UT == float)) alias modfUT = modff; else static if (is(UT == double)) alias modfUT = modf; else static assert(0); UT integerPart; if (modfUT(num, &integerPart) == 0.0) return format("%d", num.to!long); else return format("%.*g", floatPrecision, num); } } } } assert(0); } unittest // formatNumber unit tests { import std.conv : to; import std.format : format; /* Integers */ assert(formatNumber(0) == "0"); assert(formatNumber(1) == "1"); assert(formatNumber(-1) == "-1"); assert(formatNumber(999) == "999"); assert(formatNumber(12345678912345) == "12345678912345"); assert(formatNumber(-12345678912345) == "-12345678912345"); size_t a1 = 10; assert(a1.formatNumber == "10"); const int a2 = -33234; assert(a2.formatNumber == "-33234"); immutable long a3 = -12345678912345; assert(a3.formatNumber == "-12345678912345"); // Specifying precision should never matter for integer values. assert(formatNumber(0, 0) == "0"); assert(formatNumber(1, 0) == "1"); assert(formatNumber(-1, 0) == "-1"); assert(formatNumber(999, 0) == "999"); assert(formatNumber(12345678912345, 0) == "12345678912345"); assert(formatNumber(-12345678912345, 0) == "-12345678912345"); assert(formatNumber(0, 3) == "0"); assert(formatNumber(1, 3) == "1"); assert(formatNumber(-1, 3 ) == "-1"); assert(formatNumber(999, 3) == "999"); assert(formatNumber(12345678912345, 3) == "12345678912345"); assert(formatNumber(-12345678912345, 3) == "-12345678912345"); assert(formatNumber(0, 9) == "0"); assert(formatNumber(1, 9) == "1"); assert(formatNumber(-1, 9 ) == "-1"); assert(formatNumber(999, 9) == "999"); assert(formatNumber(12345678912345, 9) == "12345678912345"); assert(formatNumber(-12345678912345, 9) == "-12345678912345"); /* Doubles */ assert(formatNumber(0.0) == "0"); assert(formatNumber(0.2) == "0.2"); assert(formatNumber(0.123412, 0) == "0"); assert(formatNumber(0.123412, 1) == "0.1"); assert(formatNumber(0.123412, 2) == "0.12"); assert(formatNumber(0.123412, 5) == "0.12341"); assert(formatNumber(0.123412, 6) == "0.123412"); assert(formatNumber(0.123412, 7) == "0.123412"); assert(formatNumber(9.123412, 5) == "9.12341"); assert(formatNumber(9.123412, 6) == "9.123412"); assert(formatNumber(99.123412, 5) == "99.12341"); assert(formatNumber(99.123412, 6) == "99.123412"); assert(formatNumber(99.123412, 7) == "99.12341"); assert(formatNumber(999.123412, 0) == "999"); assert(formatNumber(999.123412, 1) == "999.1"); assert(formatNumber(999.123412, 2) == "999.12"); assert(formatNumber(999.123412, 3) == "999.123"); assert(formatNumber(999.123412, 4) == "999.1234"); assert(formatNumber(999.123412, 5) == "999.12341"); assert(formatNumber(999.123412, 6) == "999.123412"); assert(formatNumber(999.123412, 7) == "999.1234"); assert(formatNumber!(double, 9)(999.12341234, 7) == "999.1234123"); assert(formatNumber(9001.0) == "9001"); assert(formatNumber(1234567891234.0) == "1234567891234"); assert(formatNumber(1234567891234.0, 0) == "1234567891234"); assert(formatNumber(1234567891234.0, 1) == "1234567891234"); // Test round off cases assert(formatNumber(0.6, 0) == "1"); assert(formatNumber(0.6, 1) == "0.6"); assert(formatNumber(0.06, 0) == "0"); assert(formatNumber(0.06, 1) == "0.1"); assert(formatNumber(0.06, 2) == "0.06"); assert(formatNumber(0.06, 3) == "0.06"); assert(formatNumber(9.49999, 0) == "9"); assert(formatNumber(9.49999, 1) == "9.5"); assert(formatNumber(9.6, 0) == "10"); assert(formatNumber(9.6, 1) == "9.6"); assert(formatNumber(99.99, 0) == "100"); assert(formatNumber(99.99, 1) == "100"); assert(formatNumber(99.99, 2) == "99.99"); assert(formatNumber(9999.9996, 3) == "10000"); assert(formatNumber(9999.9996, 4) == "9999.9996"); assert(formatNumber(99999.99996, 4) == "100000"); assert(formatNumber(99999.99996, 5) == "99999.99996"); assert(formatNumber(999999.999996, 5) == "1000000"); assert(formatNumber(999999.999996, 6) == "999999.999996"); /* Turn off precision, the 'human readable' style. * Note: Remains o if both are zero (first test). If it becomes desirable to support * turning it off when for the precision equal zero case the simple extension is to * allow the 'human readable' precision template parameter to be negative. */ assert(formatNumber!(double, 0)(999.123412, 0) == "999"); assert(formatNumber!(double, 0)(999.123412, 1) == "1e+03"); assert(formatNumber!(double, 0)(999.123412, 2) == "1e+03"); assert(formatNumber!(double, 0)(999.123412, 3) == "999"); assert(formatNumber!(double, 0)(999.123412, 4) == "999.1"); // Default number printing assert(formatNumber(1.2) == "1.2"); assert(formatNumber(12.3) == "12.3"); assert(formatNumber(12.34) == "12.34"); assert(formatNumber(123.45) == "123.45"); assert(formatNumber(123.456) == "123.456"); assert(formatNumber(1234.567) == "1234.567"); assert(formatNumber(1234.5678) == "1234.5678"); assert(formatNumber(12345.6789) == "12345.6789"); assert(formatNumber(12345.67891) == "12345.67891"); assert(formatNumber(123456.78912) == "123456.78912"); assert(formatNumber(123456.789123) == "123456.789123"); assert(formatNumber(1234567.891234) == "1234567.89123"); assert(formatNumber(12345678.912345) == "12345678.9123"); assert(formatNumber(123456789.12345) == "123456789.123"); assert(formatNumber(1234567891.2345) == "1234567891.23"); assert(formatNumber(12345678912.345) == "12345678912.3"); assert(formatNumber(123456789123.45) == "123456789123"); assert(formatNumber(1234567891234.5) == "1.23456789123e+12"); assert(formatNumber(12345678912345.6) == "1.23456789123e+13"); assert(formatNumber(123456789123456.0) == "123456789123456"); assert(formatNumber(0.3) == "0.3"); assert(formatNumber(0.03) == "0.03"); assert(formatNumber(0.003) == "0.003"); assert(formatNumber(0.0003) == "0.0003"); assert(formatNumber(0.00003) == "3e-05" || formatNumber(0.00003) == "3e-5"); assert(formatNumber(0.000003) == "3e-06" || formatNumber(0.000003) == "3e-6"); assert(formatNumber(0.0000003) == "3e-07" || formatNumber(0.0000003) == "3e-7"); // Large number inside and outside the contiguous integer representation range double dlarge = 2.0^^(double.mant_dig - 2) - 10.0; double dhuge = 2.0^^(double.mant_dig + 1) + 1000.0; assert(dlarge.formatNumber == format("%d", dlarge.to!long)); assert(dhuge.formatNumber!(double) == format("%.12g", dhuge)); // Negative values - Repeat most of above tests. assert(formatNumber(-0.0) == "-0" || formatNumber(-0.0) == "0"); assert(formatNumber(-0.2) == "-0.2"); assert(formatNumber(-0.123412, 0) == "-0"); assert(formatNumber(-0.123412, 1) == "-0.1"); assert(formatNumber(-0.123412, 2) == "-0.12"); assert(formatNumber(-0.123412, 5) == "-0.12341"); assert(formatNumber(-0.123412, 6) == "-0.123412"); assert(formatNumber(-0.123412, 7) == "-0.123412"); assert(formatNumber(-9.123412, 5) == "-9.12341"); assert(formatNumber(-9.123412, 6) == "-9.123412"); assert(formatNumber(-99.123412, 5) == "-99.12341"); assert(formatNumber(-99.123412, 6) == "-99.123412"); assert(formatNumber(-99.123412, 7) == "-99.12341"); assert(formatNumber(-999.123412, 0) == "-999"); assert(formatNumber(-999.123412, 1) == "-999.1"); assert(formatNumber(-999.123412, 2) == "-999.12"); assert(formatNumber(-999.123412, 3) == "-999.123"); assert(formatNumber(-999.123412, 4) == "-999.1234"); assert(formatNumber(-999.123412, 5) == "-999.12341"); assert(formatNumber(-999.123412, 6) == "-999.123412"); assert(formatNumber(-999.123412, 7) == "-999.1234"); assert(formatNumber!(double, 9)(-999.12341234, 7) == "-999.1234123"); assert(formatNumber(-9001.0) == "-9001"); assert(formatNumber(-1234567891234.0) == "-1234567891234"); assert(formatNumber(-1234567891234.0, 0) == "-1234567891234"); assert(formatNumber(-1234567891234.0, 1) == "-1234567891234"); // Test round off cases assert(formatNumber(-0.6, 0) == "-1"); assert(formatNumber(-0.6, 1) == "-0.6"); assert(formatNumber(-0.06, 0) == "-0"); assert(formatNumber(-0.06, 1) == "-0.1"); assert(formatNumber(-0.06, 2) == "-0.06"); assert(formatNumber(-0.06, 3) == "-0.06"); assert(formatNumber(-9.49999, 0) == "-9"); assert(formatNumber(-9.49999, 1) == "-9.5"); assert(formatNumber(-9.6, 0) == "-10"); assert(formatNumber(-9.6, 1) == "-9.6"); assert(formatNumber(-99.99, 0) == "-100"); assert(formatNumber(-99.99, 1) == "-100"); assert(formatNumber(-99.99, 2) == "-99.99"); assert(formatNumber(-9999.9996, 3) == "-10000"); assert(formatNumber(-9999.9996, 4) == "-9999.9996"); assert(formatNumber(-99999.99996, 4) == "-100000"); assert(formatNumber(-99999.99996, 5) == "-99999.99996"); assert(formatNumber(-999999.999996, 5) == "-1000000"); assert(formatNumber(-999999.999996, 6) == "-999999.999996"); assert(formatNumber!(double, 0)(-999.123412, 0) == "-999"); assert(formatNumber!(double, 0)(-999.123412, 1) == "-1e+03"); assert(formatNumber!(double, 0)(-999.123412, 2) == "-1e+03"); assert(formatNumber!(double, 0)(-999.123412, 3) == "-999"); assert(formatNumber!(double, 0)(-999.123412, 4) == "-999.1"); // Default number printing assert(formatNumber(-1.2) == "-1.2"); assert(formatNumber(-12.3) == "-12.3"); assert(formatNumber(-12.34) == "-12.34"); assert(formatNumber(-123.45) == "-123.45"); assert(formatNumber(-123.456) == "-123.456"); assert(formatNumber(-1234.567) == "-1234.567"); assert(formatNumber(-1234.5678) == "-1234.5678"); assert(formatNumber(-12345.6789) == "-12345.6789"); assert(formatNumber(-12345.67891) == "-12345.67891"); assert(formatNumber(-123456.78912) == "-123456.78912"); assert(formatNumber(-123456.789123) == "-123456.789123"); assert(formatNumber(-1234567.891234) == "-1234567.89123"); assert(formatNumber(-12345678.912345) == "-12345678.9123"); assert(formatNumber(-123456789.12345) == "-123456789.123"); assert(formatNumber(-1234567891.2345) == "-1234567891.23"); assert(formatNumber(-12345678912.345) == "-12345678912.3"); assert(formatNumber(-123456789123.45) == "-123456789123"); assert(formatNumber(-1234567891234.5) == "-1.23456789123e+12"); assert(formatNumber(-12345678912345.6) == "-1.23456789123e+13"); assert(formatNumber(-123456789123456.0) == "-123456789123456"); assert(formatNumber(-0.3) == "-0.3"); assert(formatNumber(-0.03) == "-0.03"); assert(formatNumber(-0.003) == "-0.003"); assert(formatNumber(-0.0003) == "-0.0003"); assert(formatNumber(-0.00003) == "-3e-05" || formatNumber(-0.00003) == "-3e-5"); assert(formatNumber(-0.000003) == "-3e-06" || formatNumber(-0.000003) == "-3e-6"); assert(formatNumber(-0.0000003) == "-3e-07" || formatNumber(-0.0000003) == "-3e-7"); const double dlargeNeg = -2.0^^(double.mant_dig - 2) + 10.0; immutable double dhugeNeg = -2.0^^(double.mant_dig + 1) - 1000.0; assert(dlargeNeg.formatNumber == format("%d", dlargeNeg.to!long)); assert(dhugeNeg.formatNumber!(double) == format("%.12g", dhugeNeg)); // Type qualifiers const double b1 = 0.0; assert(formatNumber(b1) == "0"); const double b2 = 0.2; assert(formatNumber(b2) == "0.2"); const double b3 = 0.123412; assert(formatNumber(b3, 2) == "0.12"); immutable double b4 = 99.123412; assert(formatNumber(b4, 5) == "99.12341"); immutable double b5 = 99.123412; assert(formatNumber(b5, 7) == "99.12341"); // Special values assert(formatNumber(double.nan) == "nan"); assert(formatNumber(double.nan, 0) == "nan"); assert(formatNumber(double.nan, 1) == "nan"); assert(formatNumber(double.nan, 9) == "nan"); assert(formatNumber(double.infinity) == "inf"); assert(formatNumber(double.infinity, 0) == "inf"); assert(formatNumber(double.infinity, 1) == "inf"); assert(formatNumber(double.infinity, 9) == "inf"); // Float. Mix negative and type qualifiers in. assert(formatNumber(0.0f) == "0"); assert(formatNumber(0.5f) == "0.5"); assert(formatNumber(0.123412f, 0) == "0"); assert(formatNumber(0.123412f, 1) == "0.1"); assert(formatNumber(-0.123412f, 2) == "-0.12"); assert(formatNumber(9.123412f, 5) == "9.12341"); assert(formatNumber(9.123412f, 6) == "9.123412"); assert(formatNumber(-99.123412f, 5) == "-99.12341"); assert(formatNumber(99.123412f, 7) == "99.12341"); assert(formatNumber(-999.123412f, 5) == "-999.12341"); float c1 = 999.123412f; assert(formatNumber(c1, 7) == "999.1234"); float c2 = 999.1234f; assert(formatNumber!(float, 9)(c2, 3) == "999.123"); const float c3 = 9001.0f; assert(formatNumber(c3) == "9001"); const float c4 = -12345678.0f; assert(formatNumber(c4) == "-12345678"); immutable float c5 = 12345678.0f; assert(formatNumber(c5, 0) == "12345678"); immutable float c6 = 12345678.0f; assert(formatNumber(c6, 1) == "12345678"); float flarge = 2.0^^(float.mant_dig - 2) - 10.0; float fhuge = 2.0^^(float.mant_dig + 1) + 1000.0; assert(flarge.formatNumber == format("%d", flarge.to!long)); assert(fhuge.formatNumber!(float, 12) == format("%.12g", fhuge)); // Reals - No special formatting real d1 = 2.0^^(double.mant_dig) - 1000.0; assert(formatNumber(d1) == format("%.12g", d1)); real d2 = 123456789.12341234L; assert(formatNumber(d2, 12) == format("%.12g", d2)); } /** rangeMedian. Finds the median. Modifies the range via topN or sort in the process. Note: topN is the preferred algorithm, but the version prior to Phobos 2.073 is pathologically slow on certain data sets. Use topN in 2.073 and later, sort in earlier versions. See: https://issues.dlang.org/show_bug.cgi?id=16517 https://github.com/dlang/phobos/pull/4815 http://forum.dlang.org/post/ujuugklmbibuheptdwcn@forum.dlang.org */ static if (__VERSION__ >= 2073) { version = rangeMedianViaTopN; } else { version = rangeMedianViaSort; } auto rangeMedian (Range) (Range r) if (isRandomAccessRange!Range && hasLength!Range && hasSlicing!Range) { version(rangeMedianViaSort) { version(rangeMedianViaTopN) { assert(0, "Both rangeMedianViaSort and rangeMedianViaTopN assigned as versions. Assign only one."); } } else version(rangeMedianViaTopN) { } else { static assert(0, "A version of rangeMedianViaSort or rangeMedianViaTopN must be assigned."); } import std.traits : isFloatingPoint; ElementType!Range median; if (r.length > 0) { size_t medianIndex = r.length / 2; version(rangeMedianViaSort) { import std.algorithm : sort; sort(r); median = r[medianIndex]; static if (isFloatingPoint!(ElementType!Range)) { if (r.length % 2 == 0) { /* Even number of values. Split the difference. */ median = (median + r[medianIndex - 1]) / 2.0; } } } else version(rangeMedianViaTopN) { import std.algorithm : maxElement, topN; topN(r, medianIndex); median = r[medianIndex]; static if (isFloatingPoint!(ElementType!Range)) { if (r.length % 2 == 0) { /* Even number of values. Split the difference. */ if (r[medianIndex - 1] < median) { median = (median + r[0..medianIndex].maxElement) / 2.0; } } } } else { static assert(0, "A version of rangeMedianViaSort or rangeMedianViaTopN must be assigned."); } } return median; } /* rangeMedian unit tests. */ unittest { import std.math : isNaN; import std.algorithm : all, permutations; // Median of empty range is (type).init. Zero for int, nan for floats/doubles assert(rangeMedian(new int[0]) == int.init); assert(rangeMedian(new double[0]).isNaN && double.init.isNaN); assert(rangeMedian(new string[0]) == ""); assert(rangeMedian([3]) == 3); assert(rangeMedian([3.0]) == 3.0); assert(rangeMedian([3.5]) == 3.5); assert(rangeMedian(["aaa"]) == "aaa"); /* Even number of elements: Split the difference for floating point, but not other types. */ assert(rangeMedian([3, 4]) == 4); assert(rangeMedian([3.0, 4.0]) == 3.5); assert(rangeMedian([3, 6, 12]) == 6); assert(rangeMedian([3.0, 6.5, 12.5]) == 6.5); // Do the rest with permutations assert([4, 7].permutations.all!(x => (x.rangeMedian == 7))); assert([4.0, 7.0].permutations.all!(x => (x.rangeMedian == 5.5))); assert(["aaa", "bbb"].permutations.all!(x => (x.rangeMedian == "bbb"))); assert([4, 7, 19].permutations.all!(x => (x.rangeMedian == 7))); assert([4.5, 7.5, 19.5].permutations.all!(x => (x.rangeMedian == 7.5))); assert(["aaa", "bbb", "ccc"].permutations.all!(x => (x.rangeMedian == "bbb"))); assert([4.5, 7.5, 19.5, 21.0].permutations.all!(x => (x.rangeMedian == 13.5))); assert([4.5, 7.5, 19.5, 20.5, 36.0].permutations.all!(x => (x.rangeMedian == 19.5))); assert([4.5, 7.5, 19.5, 24.0, 24.5, 25.0].permutations.all!(x => (x.rangeMedian == 21.75))); assert([1.5, 3.25, 3.55, 4.5, 24.5, 25.0, 25.6].permutations.all!(x => (x.rangeMedian == 4.5))); } /// Quantiles /** The different quantile interpolation methods. * See: https://stat.ethz.ch/R-manual/R-devel/library/stats/html/quantile.html */ enum QuantileInterpolation { R1 = 1, /// R quantile type 1 R2 = 2, /// R quantile type 2 R3 = 3, /// R quantile type 3 R4 = 4, /// R quantile type 4 R5 = 5, /// R quantile type 5 R6 = 6, /// R quantile type 6 R7 = 7, /// R quantile type 7 R8 = 8, /// R quantile type 8 R9 = 9, /// R quantile type 9 } import std.traits : isFloatingPoint, isNumeric, Unqual; import std.range; /** Returns the quantile in a data vector for a cumulative probability. Takes a data vector and a probability and returns the quantile cut point for the probability. The vector must be sorted and the probability in the range [0.0, 1.0]. The interpolation methods available are the same as in R and available in a number of statistical packages. See the R documentation or wikipedia for details (https://en.wikipedia.org/wiki/Quantile). Examples: ---- double data = [22, 57, 73, 97, 113]; double median = quantile(0.5, data); // 73 auto q1 = [0.25, 0.5, 0.75].map!(p => p.quantile(data)); // 57, 73, 97 auto q2 = [0.25, 0.5, 0.75].map!(p => p.quantile(data), QuantileInterpolation.R8); //45.3333, 73, 102.333 ---- */ double quantile(ProbType, Range) (const ProbType prob, Range data, QuantileInterpolation method = QuantileInterpolation.R7) if (isRandomAccessRange!Range && hasLength!Range && isNumeric!(ElementType!Range) && isFloatingPoint!ProbType) in { import std.algorithm : isSorted; assert(0.0 <= prob && prob <= 1.0); assert(method >= QuantileInterpolation.min && method <= QuantileInterpolation.max); assert(data.isSorted); } body { import core.stdc.math : modf; import std.algorithm : max, min; import std.conv : to; import std.math : ceil, lrint; /* Note: In the implementation below, 'h1' is the 1-based index into the data vector. * This follows the wikipedia notation for the interpolation methods. One will be * subtracted before the vector is accessed. */ double q = double.nan; // The return value. if (data.length == 1) q = data[0].to!double; else if (data.length > 1) { if (method == QuantileInterpolation.R1) { q = data[((data.length * prob).ceil - 1.0).to!long.max(0)].to!double; } else if (method == QuantileInterpolation.R2) { immutable double h1 = data.length * prob + 0.5; immutable size_t lo = ((h1 - 0.5).ceil.to!long - 1).max(0); immutable size_t hi = ((h1 + 0.5).to!size_t - 1).min(data.length - 1); q = (data[lo].to!double + data[hi].to!double) / 2.0; } else if (method == QuantileInterpolation.R3) { /* Implementation notes: * - R3 uses 'banker's rounding', where 0.5 is rounded to the nearest even * value. The 'lrint' routine does this. * - DMD will sometimes choose the incorrect 0.5 rounding if the calculation * is done as a single step. The separate calculation of 'h1' avoids this. */ immutable double h1 = data.length * prob; q = data[h1.lrint.max(1) - 1].to!double; } else if ((method == QuantileInterpolation.R4) || (method == QuantileInterpolation.R5) || (method == QuantileInterpolation.R6) || (method == QuantileInterpolation.R7) || (method == QuantileInterpolation.R8) || (method == QuantileInterpolation.R9)) { /* Methods 4-9 have different formulas for generating the real-valued index, * but work the same after that, choosing the final value by linear interpolation. */ double h1; switch (method) { case QuantileInterpolation.R4: h1 = data.length * prob; break; case QuantileInterpolation.R5: h1 = data.length * prob + 0.5; break; case QuantileInterpolation.R6: h1 = (data.length + 1) * prob; break; case QuantileInterpolation.R7: h1 = (data.length - 1) * prob + 1.0; break; case QuantileInterpolation.R8: h1 = (data.length.to!double + 1.0/3.0) * prob + 1.0/3.0; break; case QuantileInterpolation.R9: h1 = (data.length + 0.25) * prob + 3.0/8.0; break; default: assert(0); } double h1IntegerPart; immutable double h1FractionPart = modf(h1, &h1IntegerPart); immutable size_t lo = (h1IntegerPart - 1.0).to!long.max(0).min(data.length - 1); q = data[lo]; if (h1FractionPart > 0.0) { immutable size_t hi = h1IntegerPart.to!long.min(data.length - 1); q += h1FractionPart * (data[hi].to!double - data[lo].to!double); } } else assert(0); } return q; } unittest { import std.algorithm : equal, map; import std.array : array; import std.traits : EnumMembers; /* A couple simple tests. */ assert(quantile(0.5, [22, 57, 73, 97, 113]) == 73); assert(quantile(0.5, [22.5, 57.5, 73.5, 97.5, 113.5]) == 73.5); assert([0.25, 0.5, 0.75].map!(p => p.quantile([22, 57, 73, 97, 113])).array == [57.0, 73.0, 97.0]); assert([0.25, 0.5, 0.75].map!(p => p.quantile([22, 57, 73, 97, 113], QuantileInterpolation.R1)).array == [57.0, 73.0, 97.0]); /* Data arrays. */ double[] d1 = []; double[] d2 = [5.5]; double[] d3 = [0.0, 1.0]; double[] d4 = [-1.0, 1.0]; double[] d5 = [0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0]; double[] d6 = [0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0]; double[] d7 = [ 31.79, 64.19, 81.77]; double[] d8 = [-94.43, -74.55, -50.81, 27.45, 78.79]; double[] d9 = [-89.17, 20.93, 38.51, 48.03, 76.43, 77.02]; double[] d10 = [-99.53, -76.87, -76.69, -67.81, -40.26, -11.29, 21.02]; double[] d11 = [-78.32, -52.22, -50.86, 13.45, 15.96, 17.25, 46.35, 85.00]; double[] d12 = [-81.36, -70.87, -53.56, -42.14, -9.18, 7.23, 49.52, 80.43, 98.50]; double[] d13 = [ 38.37, 44.36, 45.70, 50.69, 51.36, 55.66, 56.91, 58.95, 62.01, 65.25]; /* Spot check a few other data types. Same expected outputs.*/ int[] d3Int = [0, 1]; int[] d4Int = [-1, 1]; int[] d5Int = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]; size_t[] d6Size_t = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]; float[] d7Float = [ 31.79f, 64.19f, 81.77f]; float[] d8Float = [-94.43f, -74.55f, -50.81f, 27.45f, 78.79f]; float[] d9Float = [-89.17f, 20.93f, 38.51f, 48.03f, 76.43f, 77.02f]; float[] d10Float = [-99.53f, -76.87f, -76.69f, -67.81f, -40.26f, -11.29f, 21.02f]; /* Probability values. */ double[] probs = [0.0, 0.05, 0.1, 0.25, 0.4, 0.49, 0.5, 0.51, 0.75, 0.9, 0.95, 0.98, 1.0]; /* Expected values for each data array, for 'probs'. One expected result for each of the nine methods. * The expected values were generated by R and Octave. */ double[13][9] d1_expected; // All values double.nan, the default. double[13][9] d2_expected = [ [5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5], [5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5], [5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5], [5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5], [5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5], [5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5], [5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5], [5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5], [5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5], ]; double[13][9] d3_expected = [ [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0], [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.5, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0], [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 1.0, 1.0, 1.0, 1.0], [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.02, 0.5, 0.8, 0.9, 0.96, 1.0], [0.0, 0.0, 0.0, 0.0, 0.3, 0.48, 0.5, 0.52, 1.0, 1.0, 1.0, 1.0, 1.0], [0.0, 0.0, 0.0, 0.0, 0.2, 0.47, 0.5, 0.53, 1.0, 1.0, 1.0, 1.0, 1.0], [0.0, 0.05, 0.1, 0.25, 0.4, 0.49, 0.5, 0.51, 0.75, 0.9, 0.95, 0.98, 1.0], [0.0, 0.0, 0.0, 0.0, 0.2666667, 0.4766667, 0.5, 0.5233333, 1.0, 1.0, 1.0, 1.0, 1.0], [0.0, 0.0, 0.0, 0.0, 0.275, 0.4775, 0.5, 0.5225, 1.0, 1.0, 1.0, 1.0, 1.0], ]; double[13][9] d4_expected = [ [-1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0], [-1.0, -1.0, -1.0, -1.0, -1.0, -1.0, 0.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0], [-1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, 1.0, 1.0, 1.0, 1.0, 1.0], [-1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -0.96, 0.0, 0.6, 0.8, 0.92, 1.0], [-1.0, -1.0, -1.0, -1.0, -0.4, -0.04, 0.0, 0.04, 1.0, 1.0, 1.0, 1.0, 1.0], [-1.0, -1.0, -1.0, -1.0, -0.6, -0.06, 0.0, 0.06, 1.0, 1.0, 1.0, 1.0, 1.0], [-1.0, -0.9, -0.8, -0.5, -0.2, -0.02, 0.0, 0.02, 0.5, 0.8, 0.9, 0.96, 1.0], [-1.0, -1.0, -1.0, -1.0, -0.4666667, -0.04666667, -4.440892e-16, 0.04666667, 1.0, 1.0, 1.0, 1.0, 1.0], [-1.0, -1.0, -1.0, -1.0, -0.45, -0.045, 0.0, 0.045, 1.0, 1.0, 1.0, 1.0, 1.0], ]; double[13][9] d5_expected = [ [0.0, 0.0, 1.0, 2.0, 4.0, 5.0, 5.0, 5.0, 8.0, 9.0, 10.0, 10.0, 10.0], [0.0, 0.0, 1.0, 2.0, 4.0, 5.0, 5.0, 5.0, 8.0, 9.0, 10.0, 10.0, 10.0], [0.0, 0.0, 0.0, 2.0, 3.0, 4.0, 5.0, 5.0, 7.0, 9.0, 9.0, 10.0, 10.0], [0.0, 0.0, 0.1, 1.75, 3.4, 4.39, 4.5, 4.61, 7.25, 8.9, 9.45, 9.78, 10.0], [0.0, 0.05, 0.6, 2.25, 3.9, 4.89, 5.0, 5.11, 7.75, 9.4, 9.95, 10.0, 10.0], [0.0, 0.0, 0.2, 2.0, 3.8, 4.88, 5.0, 5.12, 8.0, 9.8, 10.0, 10.0, 10.0], [0.0, 0.5, 1.0, 2.5, 4.0, 4.9, 5.0, 5.1, 7.5, 9.0, 9.5, 9.8, 10.0], [0.0, 0.0, 0.4666667, 2.166667, 3.866667, 4.886667, 5.0, 5.113333, 7.833333, 9.533333, 10.0, 10.0, 10.0], [0.0, 0.0, 0.5, 2.1875, 3.875, 4.8875, 5.0, 5.1125, 7.8125, 9.5, 10.0, 10.0, 10.0], ]; double[13][9] d6_expected = [ [0.0, 0.0, 1.0, 2.0, 4.0, 5.0, 5.0, 6.0, 8.0, 10.0, 11.0, 11.0, 11.0], [0.0, 0.0, 1.0, 2.5, 4.0, 5.0, 5.5, 6.0, 8.5, 10.0, 11.0, 11.0, 11.0], [0.0, 0.0, 0.0, 2.0, 4.0, 5.0, 5.0, 5.0, 8.0, 10.0, 10.0, 11.0, 11.0], [0.0, 0.0, 0.2, 2.0, 3.8, 4.88, 5.0, 5.12, 8.0, 9.8, 10.4, 10.76, 11.0], [0.0, 0.1, 0.7, 2.5, 4.3, 5.38, 5.5, 5.62, 8.5, 10.3, 10.9, 11.0, 11.0], [0.0, 0.0, 0.3, 2.25, 4.2, 5.37, 5.5, 5.63, 8.75, 10.7, 11.0, 11.0, 11.0], [0.0, 0.55, 1.1, 2.75, 4.4, 5.39, 5.5, 5.61, 8.25, 9.9, 10.45, 10.78, 11.0], [0.0, 0.0, 0.5666667, 2.416667, 4.266667, 5.376667, 5.5, 5.623333, 8.583333, 10.43333, 11.0, 11.0, 11.0], [0.0, 0.0, 0.6, 2.4375, 4.275, 5.3775, 5.5, 5.6225, 8.5625, 10.4, 11.0, 11.0, 11.0], ]; double[13][9] d7_expected = [ [31.79, 31.79, 31.79, 31.79, 64.19, 64.19, 64.19, 64.19, 81.77, 81.77, 81.77, 81.77, 81.77], [31.79, 31.79, 31.79, 31.79, 64.19, 64.19, 64.19, 64.19, 81.77, 81.77, 81.77, 81.77, 81.77], [31.79, 31.79, 31.79, 31.79, 31.79, 31.79, 64.19, 64.19, 64.19, 81.77, 81.77, 81.77, 81.77], [31.79, 31.79, 31.79, 31.79, 38.27, 47.018, 47.99, 48.962, 68.585, 76.496, 79.133, 80.7152, 81.77], [31.79, 31.79, 31.79, 39.89, 54.47, 63.218, 64.19, 64.7174, 77.375, 81.77, 81.77, 81.77, 81.77], [31.79, 31.79, 31.79, 31.79, 51.23, 62.894, 64.19, 64.8932, 81.77, 81.77, 81.77, 81.77, 81.77], [31.79, 35.03, 38.27, 47.99, 57.71, 63.542, 64.19, 64.5416, 72.98, 78.254, 80.012, 81.0668, 81.77], [31.79, 31.79, 31.79, 37.19, 53.39, 63.11, 64.19, 64.776, 78.84, 81.77, 81.77, 81.77, 81.77], [31.79, 31.79, 31.79, 37.865, 53.66, 63.137, 64.19, 64.76135, 78.47375, 81.77, 81.77, 81.77, 81.77], ]; double[13][9] d8_expected = [ [-94.43, -94.43, -94.43, -74.55, -74.55, -50.81, -50.81, -50.81, 27.45, 78.79, 78.79, 78.79, 78.79], [-94.43, -94.43, -94.43, -74.55, -62.68, -50.81, -50.81, -50.81, 27.45, 78.79, 78.79, 78.79, 78.79], [-94.43, -94.43, -94.43, -94.43, -74.55, -74.55, -74.55, -50.81, 27.45, 27.45, 78.79, 78.79, 78.79], [-94.43, -94.43, -94.43, -89.46, -74.55, -63.867, -62.68, -61.493, 7.885, 53.12, 65.955, 73.656, 78.79], [-94.43, -94.43, -94.43, -79.52, -62.68, -51.997, -50.81, -46.897, 40.285, 78.79, 78.79, 78.79, 78.79], [-94.43, -94.43, -94.43, -84.49, -65.054, -52.2344, -50.81, -46.1144, 53.12, 78.79, 78.79, 78.79, 78.79], [-94.43, -90.454, -86.478, -74.55, -60.306, -51.7596, -50.81, -47.6796, 27.45, 58.254, 68.522, 74.6828, 78.79], [-94.43, -94.43, -94.43, -81.17667, -63.47133, -52.07613, -50.81, -46.63613, 44.56333, 78.79, 78.79, 78.79, 78.79], [-94.43, -94.43, -94.43, -80.7625, -63.2735, -52.05635, -50.81, -46.70135, 43.49375, 78.79, 78.79, 78.79, 78.79], ]; double[13][9] d9_expected = [ [-89.17, -89.17, -89.17, 20.93, 38.51, 38.51, 38.51, 48.03, 76.43, 77.02, 77.02, 77.02, 77.02], [-89.17, -89.17, -89.17, 20.93, 38.51, 38.51, 43.27, 48.03, 76.43, 77.02, 77.02, 77.02, 77.02], [-89.17, -89.17, -89.17, 20.93, 20.93, 38.51, 38.51, 38.51, 48.03, 76.43, 77.02, 77.02, 77.02], [-89.17, -89.17, -89.17, -34.12, 27.962, 37.4552, 38.51, 39.0812, 62.23, 76.666, 76.843, 76.9492, 77.02], [-89.17, -89.17, -78.16, 20.93, 36.752, 42.6988, 43.27, 43.8412, 76.43, 76.961, 77.02, 77.02, 77.02], [-89.17, -89.17, -89.17, -6.595, 34.994, 42.6036, 43.27, 43.9364, 76.5775, 77.02, 77.02, 77.02, 77.02], [-89.17, -61.645, -34.12, 25.325, 38.51, 42.794, 43.27, 43.746, 69.33, 76.725, 76.8725, 76.961, 77.02], [-89.17, -89.17, -89.17, 11.755, 36.166, 42.66707, 43.27, 43.87293, 76.47917, 77.02, 77.02, 77.02, 77.02], [-89.17, -89.17, -89.17, 14.04875, 36.3125, 42.675, 43.27, 43.865, 76.46688, 77.02, 77.02, 77.02, 77.02], ]; double[13][9] d10_expected = [ [-99.53, -99.53, -99.53, -76.87, -76.69, -67.81, -67.81, -67.81, -11.29, 21.02, 21.02, 21.02, 21.02], [-99.53, -99.53, -99.53, -76.87, -76.69, -67.81, -67.81, -67.81, -11.29, 21.02, 21.02, 21.02, 21.02], [-99.53, -99.53, -99.53, -76.87, -76.69, -76.69, -67.81, -67.81, -40.26, -11.29, 21.02, 21.02, 21.02], [-99.53, -99.53, -99.53, -82.535, -76.726, -72.8716, -72.25, -71.6284, -33.0175, -1.597, 9.7115, 16.4966, 21.02], [-99.53, -99.53, -94.998, -76.825, -74.026, -68.4316, -67.81, -65.8815, -18.5325, 14.558, 21.02, 21.02, 21.02], [-99.53, -99.53, -99.53, -76.87, -74.914, -68.5204, -67.81, -65.606, -11.29, 21.02, 21.02, 21.02, 21.02], [-99.53, -92.732, -85.934, -76.78, -73.138, -68.3428, -67.81, -66.157, -25.775, 1.634, 11.327, 17.1428, 21.02], [-99.53, -99.53, -98.01933, -76.84, -74.322, -68.4612, -67.81, -65.78967, -16.11833, 18.866, 21.02, 21.02, 21.02], [-99.53, -99.53, -97.264, -76.83625, -74.248, -68.4538, -67.81, -65.81263, -16.72187, 17.789, 21.02, 21.02, 21.02], ]; double[13][9] d11_expected = [ [-78.32, -78.32, -78.32, -52.22, 13.45, 13.45, 13.45, 15.96, 17.25, 85.0, 85.0, 85.0, 85.0], [-78.32, -78.32, -78.32, -51.54, 13.45, 13.45, 14.705, 15.96, 31.8, 85.0, 85.0, 85.0, 85.0], [-78.32, -78.32, -78.32, -52.22, -50.86, 13.45, 13.45, 13.45, 17.25, 46.35, 85.0, 85.0, 85.0], [-78.32, -78.32, -78.32, -52.22, -37.998, 8.3052, 13.45, 13.6508, 17.25, 54.08, 69.54, 78.816, 85.0], [-78.32, -78.32, -70.49, -51.54, -5.843, 14.5042, 14.705, 14.9058, 31.8, 73.405, 85.0, 85.0, 85.0], [-78.32, -78.32, -78.32, -51.88, -12.274, 14.4791, 14.705, 14.9309, 39.075, 85.0, 85.0, 85.0, 85.0], [-78.32, -69.185, -60.05, -51.2, 0.588, 14.5293, 14.705, 14.8807, 24.525, 57.945, 71.4725, 79.589, 85.0], [-78.32, -78.32, -73.97, -51.65333, -7.986667, 14.49583, 14.705, 14.91417, 34.225, 78.55833, 85.0, 85.0, 85.0], [-78.32, -78.32, -73.1, -51.625, -7.45075, 14.49792, 14.705, 14.91208, 33.61875, 77.27, 85.0, 85.0, 85.0], ]; double[13][9] d12_expected = [ [-81.36, -81.36, -81.36, -53.56, -42.14, -9.18, -9.18, -9.18, 49.52, 98.5, 98.5, 98.5, 98.5], [-81.36, -81.36, -81.36, -53.56, -42.14, -9.18, -9.18, -9.18, 49.52, 98.5, 98.5, 98.5, 98.5], [-81.36, -81.36, -81.36, -70.87, -42.14, -42.14, -42.14, -9.18, 49.52, 80.43, 98.5, 98.5, 98.5], [-81.36, -81.36, -81.36, -66.5425, -46.708, -28.6264, -25.66, -22.6936, 38.9475, 82.237, 90.3685, 95.2474, 98.5], [-81.36, -81.36, -77.164, -57.8875, -38.844, -12.1464, -9.18, -7.7031, 57.2475, 91.272, 98.5, 98.5, 98.5], [-81.36, -81.36, -81.36, -62.215, -42.14, -12.476, -9.18, -7.539, 64.975, 98.5, 98.5, 98.5, 98.5], [-81.36, -77.164, -72.968, -53.56, -35.548, -11.8168, -9.18, -7.8672, 49.52, 84.044, 91.272, 95.6088, 98.5], [-81.36, -81.36, -78.56267, -59.33, -39.94267, -12.25627, -9.18, -7.6484, 59.82333, 93.68133, 98.5, 98.5, 98.5], [-81.36, -81.36, -78.213, -58.96938, -39.668, -12.2288, -9.18, -7.662075, 59.17938, 93.079, 98.5, 98.5, 98.5], ]; double[13][9] d13_expected = [ [38.37, 38.37, 38.37, 45.7, 50.69, 51.36, 51.36, 55.66, 58.95, 62.01, 65.25, 65.25, 65.25], [38.37, 38.37, 41.365, 45.7, 51.025, 51.36, 53.51, 55.66, 58.95, 63.63, 65.25, 65.25, 65.25], [38.37, 38.37, 38.37, 44.36, 50.69, 51.36, 51.36, 51.36, 58.95, 62.01, 65.25, 65.25, 65.25], [38.37, 38.37, 38.37, 45.03, 50.69, 51.293, 51.36, 51.79, 57.93, 62.01, 63.63, 64.602, 65.25], [38.37, 38.37, 41.365, 45.7, 51.025, 53.08, 53.51, 53.94, 58.95, 63.63, 65.25, 65.25, 65.25], [38.37, 38.37, 38.969, 45.365, 50.958, 53.037, 53.51, 53.983, 59.715, 64.926, 65.25, 65.25, 65.25], [38.37, 41.0655, 43.761, 46.9475, 51.092, 53.123, 53.51, 53.897, 58.44, 62.334, 63.792, 64.6668, 65.25], [38.37, 38.37, 40.56633, 45.58833, 51.00267, 53.06567, 53.51, 53.95433, 59.205, 64.062, 65.25, 65.25, 65.25], [38.37, 38.37, 40.766, 45.61625, 51.00825, 53.06925, 53.51, 53.95075, 59.14125, 63.954, 65.25, 65.25, 65.25], ]; void compareResults(const double[] actual, const double[] expected, string dataset, QuantileInterpolation method) { import std.conv : to; import std.format : format; import std.math : approxEqual, isNaN; import std.range : lockstep; foreach (i, actualValue, expectedValue; lockstep(actual, expected)) { assert(actualValue.approxEqual(expectedValue) || (actualValue.isNaN && expectedValue.isNaN), format("Quantile unit test failure, dataset %s, method: %s, index: %d, expected: %g, actual: %g", dataset, method.to!string, i, expectedValue, actualValue)); } } foreach(methodIndex, method; EnumMembers!QuantileInterpolation) { compareResults(probs.map!(p => p.quantile(d1, method)).array, d1_expected[methodIndex], "d1", method); compareResults(probs.map!(p => p.quantile(d2, method)).array, d2_expected[methodIndex], "d2", method); compareResults(probs.map!(p => p.quantile(d3, method)).array, d3_expected[methodIndex], "d3", method); compareResults(probs.map!(p => p.quantile(d3Int, method)).array, d3_expected[methodIndex], "d3Int", method); compareResults(probs.map!(p => p.quantile(d4, method)).array, d4_expected[methodIndex], "d4", method); compareResults(probs.map!(p => p.quantile(d4Int, method)).array, d4_expected[methodIndex], "d4Int", method); compareResults(probs.map!(p => p.quantile(d5, method)).array, d5_expected[methodIndex], "d5", method); compareResults(probs.map!(p => p.quantile(d5Int, method)).array, d5_expected[methodIndex], "d5Int", method); compareResults(probs.map!(p => p.quantile(d6, method)).array, d6_expected[methodIndex], "d6", method); compareResults(probs.map!(p => p.quantile(d6Size_t, method)).array, d6_expected[methodIndex], "d6Size_t", method); compareResults(probs.map!(p => p.quantile(d7, method)).array, d7_expected[methodIndex], "d7", method); compareResults(probs.map!(p => p.quantile(d7Float, method)).array, d7_expected[methodIndex], "d7Float", method); compareResults(probs.map!(p => p.quantile(d8, method)).array, d8_expected[methodIndex], "d8", method); compareResults(probs.map!(p => p.quantile(d8Float, method)).array, d8_expected[methodIndex], "d8Float", method); compareResults(probs.map!(p => p.quantile(d9, method)).array, d9_expected[methodIndex], "d9", method); compareResults(probs.map!(p => p.quantile(d9Float, method)).array, d9_expected[methodIndex], "d9Float", method); compareResults(probs.map!(p => p.quantile(d10, method)).array, d10_expected[methodIndex], "d10", method); compareResults(probs.map!(p => p.quantile(d10Float, method)).array, d10_expected[methodIndex], "d10Float", method); compareResults(probs.map!(p => p.quantile(d11, method)).array, d11_expected[methodIndex], "d11", method); compareResults(probs.map!(p => p.quantile(d12, method)).array, d12_expected[methodIndex], "d12", method); compareResults(probs.map!(p => p.quantile(d13, method)).array, d13_expected[methodIndex], "d13", method); } }
D
/Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/SQLite.build/SQL/SQLiteDefaultLiteral.swift.o : /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/sqlite/Sources/SQLite/Row/SQLiteData.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/sqlite/Sources/SQLite/SQL/SQLiteGeneric.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/sqlite/Sources/SQLite/Utilities/Deprecated.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/sqlite/Sources/SQLite/SQL/SQLiteBind.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/sqlite/Sources/SQLite/Database/SQLiteStorage.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/sqlite/Sources/SQLite/SQL/SQLiteCreateTable.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/sqlite/Sources/SQLite/SQL/SQLiteTable.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/sqlite/Sources/SQLite/SQL/SQLiteAlterTable.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/sqlite/Sources/SQLite/SQL/SQLiteDataTypeStaticRepresentable.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/sqlite/Sources/SQLite/SQL/SQLiteQueryExpressionRepresentable.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/sqlite/Sources/SQLite/Row/SQLiteDataConvertible.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/sqlite/Sources/SQLite/Row/SQLiteDataType.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/sqlite/Sources/SQLite/Database/SQLiteDatabase.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/sqlite/Sources/SQLite/Database/DatabaseIdentifier+SQLite.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/sqlite/Sources/SQLite/SQL/SQLiteBoolLiteral.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/sqlite/Sources/SQLite/SQL/SQLiteDefaultLiteral.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/sqlite/Sources/SQLite/Row/SQLiteColumn.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/sqlite/Sources/SQLite/SQL/SQLiteCollation.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/sqlite/Sources/SQLite/Database/SQLiteConnection.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/sqlite/Sources/SQLite/SQL/SQLiteFunction.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/sqlite/Sources/SQLite/SQL/SQLiteAlterTableBuilder.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/sqlite/Sources/SQLite/Codable/SQLiteDataDecoder.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/sqlite/Sources/SQLite/Codable/SQLiteRowDecoder.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/sqlite/Sources/SQLite/Codable/SQLiteDataEncoder.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/sqlite/Sources/SQLite/Utilities/SQLiteError.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/sqlite/Sources/SQLite/Utilities/Exports.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/sqlite/Sources/SQLite/Database/SQLiteStatement.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/sqlite/Sources/SQLite/SQL/SQLiteDropIndex.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/sqlite/Sources/SQLite/SQL/SQLitePrimaryKey.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/sqlite/Sources/SQLite/SQL/SQLiteQuery.swift /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/lib/swift/XPC.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/lib/swift/ObjectiveC.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/lib/swift/Dispatch.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/lib/swift/Darwin.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/lib/swift/Foundation.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/lib/swift/CoreFoundation.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/lib/swift/CoreGraphics.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/lib/swift/Swift.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/lib/swift/IOKit.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/lib/swift/SwiftOnoneSupport.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/Combine.framework/Modules/Combine.swiftmodule/x86_64-apple-macos.swiftinterface /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/SQL.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/NIO.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/Async.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/Service.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/Core.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/Debugging.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/COperatingSystem.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/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/NIOConcurrencyHelpers.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/Bits.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/NIOFoundationCompat.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/DatabaseKit.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/swift-nio/Sources/CNIOAtomics/include/cpp_magic.h /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/swift-nio/Sources/CNIOLinux/include/ifaddrs-android.h /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/swift-nio/Sources/CNIODarwin/include/CNIODarwin.h /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/swift-nio/Sources/CNIOAtomics/include/CNIOAtomics.h /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/swift-nio/Sources/CNIOLinux/include/CNIOLinux.h /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/CNIOSHA1.build/module.modulemap /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/CNIOOpenSSL.build/module.modulemap /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/CCryptoOpenSSL.build/module.modulemap /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/CNIOZlib.build/module.modulemap /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/CNIODarwin.build/module.modulemap /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/CNIOHTTPParser.build/module.modulemap /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/CNIOAtomics.build/module.modulemap /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/CNIOLinux.build/module.modulemap /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/swift-nio-zlib-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/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/SQLite.build/SQL/SQLiteDefaultLiteral~partial.swiftmodule : /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/sqlite/Sources/SQLite/Row/SQLiteData.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/sqlite/Sources/SQLite/SQL/SQLiteGeneric.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/sqlite/Sources/SQLite/Utilities/Deprecated.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/sqlite/Sources/SQLite/SQL/SQLiteBind.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/sqlite/Sources/SQLite/Database/SQLiteStorage.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/sqlite/Sources/SQLite/SQL/SQLiteCreateTable.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/sqlite/Sources/SQLite/SQL/SQLiteTable.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/sqlite/Sources/SQLite/SQL/SQLiteAlterTable.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/sqlite/Sources/SQLite/SQL/SQLiteDataTypeStaticRepresentable.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/sqlite/Sources/SQLite/SQL/SQLiteQueryExpressionRepresentable.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/sqlite/Sources/SQLite/Row/SQLiteDataConvertible.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/sqlite/Sources/SQLite/Row/SQLiteDataType.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/sqlite/Sources/SQLite/Database/SQLiteDatabase.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/sqlite/Sources/SQLite/Database/DatabaseIdentifier+SQLite.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/sqlite/Sources/SQLite/SQL/SQLiteBoolLiteral.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/sqlite/Sources/SQLite/SQL/SQLiteDefaultLiteral.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/sqlite/Sources/SQLite/Row/SQLiteColumn.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/sqlite/Sources/SQLite/SQL/SQLiteCollation.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/sqlite/Sources/SQLite/Database/SQLiteConnection.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/sqlite/Sources/SQLite/SQL/SQLiteFunction.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/sqlite/Sources/SQLite/SQL/SQLiteAlterTableBuilder.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/sqlite/Sources/SQLite/Codable/SQLiteDataDecoder.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/sqlite/Sources/SQLite/Codable/SQLiteRowDecoder.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/sqlite/Sources/SQLite/Codable/SQLiteDataEncoder.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/sqlite/Sources/SQLite/Utilities/SQLiteError.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/sqlite/Sources/SQLite/Utilities/Exports.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/sqlite/Sources/SQLite/Database/SQLiteStatement.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/sqlite/Sources/SQLite/SQL/SQLiteDropIndex.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/sqlite/Sources/SQLite/SQL/SQLitePrimaryKey.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/sqlite/Sources/SQLite/SQL/SQLiteQuery.swift /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/lib/swift/XPC.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/lib/swift/ObjectiveC.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/lib/swift/Dispatch.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/lib/swift/Darwin.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/lib/swift/Foundation.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/lib/swift/CoreFoundation.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/lib/swift/CoreGraphics.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/lib/swift/Swift.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/lib/swift/IOKit.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/lib/swift/SwiftOnoneSupport.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/Combine.framework/Modules/Combine.swiftmodule/x86_64-apple-macos.swiftinterface /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/SQL.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/NIO.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/Async.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/Service.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/Core.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/Debugging.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/COperatingSystem.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/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/NIOConcurrencyHelpers.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/Bits.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/NIOFoundationCompat.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/DatabaseKit.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/swift-nio/Sources/CNIOAtomics/include/cpp_magic.h /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/swift-nio/Sources/CNIOLinux/include/ifaddrs-android.h /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/swift-nio/Sources/CNIODarwin/include/CNIODarwin.h /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/swift-nio/Sources/CNIOAtomics/include/CNIOAtomics.h /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/swift-nio/Sources/CNIOLinux/include/CNIOLinux.h /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/CNIOSHA1.build/module.modulemap /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/CNIOOpenSSL.build/module.modulemap /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/CCryptoOpenSSL.build/module.modulemap /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/CNIOZlib.build/module.modulemap /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/CNIODarwin.build/module.modulemap /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/CNIOHTTPParser.build/module.modulemap /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/CNIOAtomics.build/module.modulemap /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/CNIOLinux.build/module.modulemap /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/swift-nio-zlib-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/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/SQLite.build/SQL/SQLiteDefaultLiteral~partial.swiftdoc : /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/sqlite/Sources/SQLite/Row/SQLiteData.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/sqlite/Sources/SQLite/SQL/SQLiteGeneric.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/sqlite/Sources/SQLite/Utilities/Deprecated.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/sqlite/Sources/SQLite/SQL/SQLiteBind.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/sqlite/Sources/SQLite/Database/SQLiteStorage.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/sqlite/Sources/SQLite/SQL/SQLiteCreateTable.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/sqlite/Sources/SQLite/SQL/SQLiteTable.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/sqlite/Sources/SQLite/SQL/SQLiteAlterTable.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/sqlite/Sources/SQLite/SQL/SQLiteDataTypeStaticRepresentable.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/sqlite/Sources/SQLite/SQL/SQLiteQueryExpressionRepresentable.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/sqlite/Sources/SQLite/Row/SQLiteDataConvertible.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/sqlite/Sources/SQLite/Row/SQLiteDataType.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/sqlite/Sources/SQLite/Database/SQLiteDatabase.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/sqlite/Sources/SQLite/Database/DatabaseIdentifier+SQLite.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/sqlite/Sources/SQLite/SQL/SQLiteBoolLiteral.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/sqlite/Sources/SQLite/SQL/SQLiteDefaultLiteral.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/sqlite/Sources/SQLite/Row/SQLiteColumn.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/sqlite/Sources/SQLite/SQL/SQLiteCollation.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/sqlite/Sources/SQLite/Database/SQLiteConnection.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/sqlite/Sources/SQLite/SQL/SQLiteFunction.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/sqlite/Sources/SQLite/SQL/SQLiteAlterTableBuilder.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/sqlite/Sources/SQLite/Codable/SQLiteDataDecoder.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/sqlite/Sources/SQLite/Codable/SQLiteRowDecoder.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/sqlite/Sources/SQLite/Codable/SQLiteDataEncoder.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/sqlite/Sources/SQLite/Utilities/SQLiteError.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/sqlite/Sources/SQLite/Utilities/Exports.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/sqlite/Sources/SQLite/Database/SQLiteStatement.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/sqlite/Sources/SQLite/SQL/SQLiteDropIndex.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/sqlite/Sources/SQLite/SQL/SQLitePrimaryKey.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/sqlite/Sources/SQLite/SQL/SQLiteQuery.swift /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/lib/swift/XPC.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/lib/swift/ObjectiveC.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/lib/swift/Dispatch.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/lib/swift/Darwin.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/lib/swift/Foundation.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/lib/swift/CoreFoundation.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/lib/swift/CoreGraphics.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/lib/swift/Swift.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/lib/swift/IOKit.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/lib/swift/SwiftOnoneSupport.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/Combine.framework/Modules/Combine.swiftmodule/x86_64-apple-macos.swiftinterface /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/SQL.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/NIO.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/Async.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/Service.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/Core.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/Debugging.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/COperatingSystem.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/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/NIOConcurrencyHelpers.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/Bits.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/NIOFoundationCompat.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/DatabaseKit.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/swift-nio/Sources/CNIOAtomics/include/cpp_magic.h /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/swift-nio/Sources/CNIOLinux/include/ifaddrs-android.h /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/swift-nio/Sources/CNIODarwin/include/CNIODarwin.h /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/swift-nio/Sources/CNIOAtomics/include/CNIOAtomics.h /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/swift-nio/Sources/CNIOLinux/include/CNIOLinux.h /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/CNIOSHA1.build/module.modulemap /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/CNIOOpenSSL.build/module.modulemap /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/CCryptoOpenSSL.build/module.modulemap /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/CNIOZlib.build/module.modulemap /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/CNIODarwin.build/module.modulemap /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/CNIOHTTPParser.build/module.modulemap /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/CNIOAtomics.build/module.modulemap /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/CNIOLinux.build/module.modulemap /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/swift-nio-zlib-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
module utilities.inputparser; import std.conv, std.string, std.range, std.stdio, std.format, std.ascii; import std.algorithm; import core.stdc.string : strlen; /// subRange will return a sub part of a string auto subRange(R)(R s, size_t beg, size_t end) { return s.dropExactly(beg).take(end - beg); } unittest { assert("abcçdef".subRange(2, 4).equal("cç")); } auto slice(T)(T a, size_t u, size_t v) if(is(T==string)) { import std.exception; enforce(u <= v); size_t i; auto m = a.length; import std.utf; while(u-- && i<m) { auto si = stride(a,i); i += si; v--; } // assert(u == -1); // enforce(u == -1); size_t i2 = i; while(v-- && i2<m) { auto si = stride(a,i2); i2+=si; } // assert(v == -1); enforce(v == -1); return a[i..i2]; } unittest { import std.range; auto a="≈açç√ef"; auto b=a.slice(2,6); assert(a.slice(2,6)=="çç√e"); assert(a.slice(2,6).ptr==a.slice(2,3).ptr); assert(a.slice(0,a.walkLength) is a); import std.exception; assertThrown(a.slice(2,8)); assertThrown(a.slice(2,1)); } /// isWhiteSpace returns true if char is ' ' or '\t' bool isWhiteSpace(char c) { return c == ' ' || c == '\t'; } bool isAlpha(char c) { return (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z'); } enum eHexParse { UpperCase=1, LowerCase=2, IgnoreCase=3 } bool isHex(char c, eHexParse s) { bool ishex = false; if ((s & eHexParse.UpperCase) == eHexParse.UpperCase) ishex = ishex || (c >= 'A' && c <= 'F'); if (!ishex && ((s & eHexParse.LowerCase) == eHexParse.LowerCase)) ishex = ishex || (c >= 'a' && c <= 'f'); return ishex; } /// isSignChar returns true if char is minus or positive sign character bool isSignChar(char c) { return c == '+' || c == '-'; } /// isIntegerChar returns true if char is any of '0'-'9' bool isIntegerChar(char c) { return isDigit(c); } /// bool isFloatChar(char c) { return isDigit(c) || c == '.' || c == 'e' || isSignChar(c); } /// size_t eatChar(string str, size_t i, char c) { if (i < str.length && str[i] == c) return 1; return 0; } /// size_t eatChars(string str, size_t cursor) { size_t i = cursor; while (i < str.length && !isWhiteSpace(str[i])) i += 1; return i - cursor; } /// size_t eatCharsUntil(string str, size_t cursor, char until) { size_t i = cursor; while (i < str.length && (str[i] != until)) i += 1; return i - cursor; } /// size_t eatLetters(string str, size_t cursor) { size_t i = cursor; while (i < str.length && isAlpha(str[i])) i += 1; return i - cursor; } /// size_t eatAlphaNumeric(string str, size_t cursor) { size_t i = cursor; while (i < str.length && (isAlpha(str[i]) || isDigit(str[i]))) i += 1; return i - cursor; } size_t match(string str, size_t cursor, string m) { if (m.length == 0) return 0; if ((cursor + m.length) < str.length) { if (str.slice(cursor, cursor + m.length) == m) return m.length; } return 0; } bool isWord(string str, size_t cursor, string word) { return match(str, cursor, word) > 0; } bool isWordOfLength(string str, size_t cursor, size_t len) { size_t n = eatLetters(str, cursor); return n == len; } /// size_t eatWhiteSpace(string str, size_t cursor) { size_t i = cursor; while (i < str.length && isWhiteSpace(str[i])) i += 1; return i - cursor; } /// size_t eatIntegerChars(string str, size_t cursor) { size_t i = cursor; while (i < str.length && isDigit(str[i])) i += 1; return i - cursor; } bool areIntegerChars(string str, size_t cursor, size_t len) { size_t n = eatIntegerChars(str, cursor); return n == len; } /// size_t eatHexChars(string str, size_t cursor) { size_t i = cursor; while (i < str.length && (isDigit(str[i]) || isHex(str[i], eHexParse.IgnoreCase))) i += 1; return i - cursor; } /// size_t eatFloatChars(string str, size_t cursor) { size_t i = cursor; while (i < str.length && isFloatChar(str[i])) i += 1; return i - cursor; } /// size_t eatSignChar(string str, size_t cursor) { if (cursor < str.length && isSignChar(str[cursor])) return 1; return 0; } /// size_t eatSeparator(string str, size_t cursor, char c) { size_t i = cursor; i += eatWhiteSpace(str, i); i += eatChar(str, i, c); i += eatWhiteSpace(str, i); return i - cursor; } /// size_t parse(string str, size_t cursor, ref char v) { size_t i = cursor; i += eatWhiteSpace(str, i); size_t b = i; i += 1; i += eatWhiteSpace(str, i); if (i > b) { string s = str.subRange(b, i).text; v = to!char(s); } return i - cursor; } /// size_t parse(string str, size_t cursor, ref char[] v) { size_t i = cursor; i += eatWhiteSpace(str, i); size_t b = i; i += eatAlphaNumeric(str, i); i += eatWhiteSpace(str, i); if (i > b) { auto txt = str.subRange(b, i).text; foreach(char c; txt) { v ~= c; } } return i - cursor; } /// size_t parse(string str, size_t cursor, ref int v) { size_t i = cursor; i += eatWhiteSpace(str, i); size_t b = i; i += eatSignChar(str, i); i += eatIntegerChars(str, i); if (i > b) { string s = str.subRange(b, i).text; v = to!int(s); } return i - cursor; } /// size_t parse(string str, size_t cursor, ref ulong v) { size_t i = cursor; i += eatWhiteSpace(str, i); size_t b = i; i += eatSignChar(str, i); i += eatIntegerChars(str, i); if (i > b) { string s = str.subRange(b, i).text; v = to!ulong(s); } return i - cursor; } /// size_t parse(string str, size_t cursor, ref float v) { size_t i = cursor; i += eatWhiteSpace(str, i); size_t b = i; i += eatFloatChars(str, i); if (i > b) { string s = str.subRange(b, i).text; v = to!float(s); } return i - cursor; } /// size_t parse(string str, size_t cursor, ref double v) { size_t i = cursor; i += eatWhiteSpace(str, i); size_t b = i; i += eatFloatChars(str, i); if (i > b) { string s = str.subRange(b, i).text; v = to!double(s); } return i - cursor; } /// class InputParser { public: /// this() { m_cursor = 0; m_str = ""; } /// void reset(string s) { m_cursor = 0; m_str = s; } bool at_end() { return m_cursor >= m_str.length; } /// InputParser consume() // Consume whitespace { size_t i = m_cursor; m_cursor += eatWhiteSpace(m_str, i); return this; } /// InputParser consume(size_t len) // Consume certain amount of characters { m_cursor += len; if (m_cursor > m_str.length) m_cursor = m_str.length; return this; } /// InputParser consume(string str) { consume(); match(str); return consume(); } /// InputParser output() { string s = m_str.subRange(m_cursor, m_str.length).text; writeln(s); return this; } /// bool is_match(string str) { size_t i = .match(m_str, m_cursor, str); m_cursor += i; return i > 0; } /// InputParser match(string str) { size_t i = .match(m_str, m_cursor, str); m_cursor += i; return this; } InputParser read(ref char p) { if (!at_end()) { p = m_str[m_cursor++]; } else { p = '?'; } return this; } InputParser readWord(ref string w) { if (!at_end()) { m_cursor += eatWhiteSpace(m_str, m_cursor); size_t wordlen = eatLetters(m_str, m_cursor); w = m_str.subRange(m_cursor, m_cursor + wordlen).text; m_cursor += wordlen; } else { w = "?"; } return this; } /// parse can parse a custom type InputParser parse(T)(ref T p) { size_t len = .parse(m_str, m_cursor, p); return consume(len); } private: size_t m_cursor; string m_str; } /// struct Point2(T) { T m_x; T m_y; } /// size_t parse(string str, size_t cursor, ref Point2!float p) { float x, y; size_t i = cursor; i += parse(str, i, x); i += eatSeparator(str, i, ','); i += parse(str, i, y); p.m_x = x; p.m_y = y; return i - cursor; } /// size_t parse(string str, size_t cursor, ref Point2!int p) { int x = 0; int y = 0; size_t i = cursor; i += parse(str, i, x); i += eatSeparator(str, i, ','); i += parse(str, i, y); p.m_x = x; p.m_y = y; return i - cursor; } struct KeyValue { char seperator = ':'; string key; string value; } /// size_t parse(string str, size_t cursor, ref KeyValue kv) { size_t i = cursor; if (i < str.length) { size_t b = i; i += eatCharsUntil(str, i, kv.seperator); { kv.key = str.subRange(b, i).text; } if (i < str.length && str[i] == kv.seperator) { i += 1; b = i; i += eatChars(str, i); { kv.value = str.subRange(b, i).text; } } } return i - cursor; } /// struct Point3(T) { T m_x; T m_y; T m_z; } /// size_t parse(string str, size_t cursor, ref Point3!float p) { float x, y, z; size_t i = cursor; i += parse(str, i, x); i += eatSeparator(str, i, ','); i += parse(str, i, y); i += eatSeparator(str, i, ','); i += parse(str, i, z); p.m_x = x; p.m_y = y; p.m_z = z; return i - cursor; } /// size_t parse(string str, size_t cursor, ref Point3!int p) { int x, y, z; size_t i = cursor; i += parse(str, i, x); i += eatSeparator(str, i, ','); i += parse(str, i, y); i += eatSeparator(str, i, ','); i += parse(str, i, z); p.m_x = x; p.m_y = y; p.m_z = z; return i - cursor; } /// void readFileLineByLine(string filename, void delegate(string line) cb) { auto file = File(filename); auto range = file.byLine(); foreach (l; range) { string line = strip(l.text); cb(line); } cb(""); } void test_parser() { auto parser = new InputParser(); auto line = "point< 1.5 , 2.7 >15"; Point2!float point; int i; parser.reset(line); parser.match("point").match("<").parse(point).consume(">").parse(i); writeln("x:", point.m_x, ", y:", point.m_y); writeln("i:", i); auto line2 = "Point3< 1.4 , 2.7, 3.9 >"; Point3!float Point3; parser.reset(line2); parser.match("Point3").match("<").parse(Point3).consume(">"); writeln("x:", Point3.m_x, ", y:", Point3.m_y, ", z:", Point3.m_z); Point2!int[] aposition; Point2!int[] avelocity; readFileLineByLine("input/input_1_1.text", (string line) { //writeln(line); parser.reset(line); Point2!int position; Point2!int velocity; // Example: position=< 54347, -32361> velocity=<-5, 3> parser.match("position=").match("<").parse(position).consume(">") .match("velocity=").match("<").parse(velocity).consume(">"); writeln(" -> position=", position, " velocity=", velocity); aposition ~= position; avelocity ~= velocity; }); writeln("number of positions: ", aposition.length); writeln("number of velocities: ", avelocity.length); }
D
/* REQUIRED_ARGS: -m32 PERMUTE_ARGS: TEST_OUTPUT: --- fail_compilation/test15703.d(17): Error: cast from Object[] to uint[] not allowed in safe code fail_compilation/test15703.d(19): Error: cast from object.Object to const(uint)* not allowed in safe code fail_compilation/test15703.d(22): Error: cast from uint[] to Object[] not allowed in safe code --- */ // https://issues.dlang.org/show_bug.cgi?id=15703 void test() @safe { auto objs = [ new Object() ]; auto longs = cast(size_t[]) objs; // error auto longc = cast(const(size_t)[]) objs; // ok auto longp = cast(const(size_t)*) objs[0]; // error size_t[] al; objs = cast(Object[]) al; // error auto am = cast(int[])[]; } void test2() @safe { const(ubyte)[] a; auto b = cast(const(uint[])) a; }
D
/home/chandio/Desktop/rust practice/Structs/structs/target/debug/deps/structs-3f71f0dca4a2b471: src/main.rs /home/chandio/Desktop/rust practice/Structs/structs/target/debug/deps/structs-3f71f0dca4a2b471.d: src/main.rs src/main.rs:
D
<HTML> <!-- Created by HTTrack Website Copier/3.49-2 [XR&CO'2014] --> <!-- Mirrored from mareenfischinger.com/pretty-faces/markus-t/js/libs/jquery-1.9.1.min.js/js/libs/jquery-1.9.1.min.js/js/libs/jquery-1.9.1.min.js/js/libs/jquery-1.9.1.min.js/js/libs/jquery-1.9.1.min.js/js/libs/jquery-1.9.1.min.js/js/libs/jquery-1.9.1.min.js/js/libs/jquery-1.9.1.min.js/js/libs/jquery-1.9.1.min.js/js/libs/jquery-1.9.1.min.js/js/libs/jquery-1.9.1.min.js/js/libs/jquery-1.9.1.min.js/js/libs/jquery-1.9.1.min.js/js/libs/jquery-1.9.1.min.js/js/libs/jquery-1.9.1.min.js/js/libs/jquery-1.9.1.min.js/js/libs/jquery-1.9.1.min.js/js/libs/jquery-1.9.1.min.js/js/libs/jquery-1.9.1.min.js/js/libs/jquery-1.9.1.min.js/js/libs/jquery-1.9.1.min.js/js/libs/jquery-1.9.1.min.js/js/libs/jquery-1.9.1.min.js/js/libs/jquery-1.9.1.min.js/js/libs/jquery-1.9.1.min.js/js/libs/jquery-1.9.1.min.js/js/libs/jquery-1.9.1.min.js/js/libs/jquery-1.9.1.min.js/js/libs/jquery-1.9.1.min.js/js/libs/jquery-1.9.1.min.js/js/libs/jquery-1.9.1.min.js/js/libs/jquery-1.9.1.min.js/js/libs/jquery-1.9.1.min.js/js/libs/jquery-1.9.1.min.js/js/libs/jquery-1.9.1.min.js by HTTrack Website Copier/3.x [XR&CO'2014], Sat, 27 Jan 2018 16:59:32 GMT --> <!-- Added by HTTrack --><meta http-equiv="content-type" content="text/html;charset=UTF-8" /><!-- /Added by HTTrack --> <HEAD> <META HTTP-EQUIV="Content-Type" CONTENT="text/html;charset=UTF-8"><META HTTP-EQUIV="Refresh" CONTENT="0; URL=#"><TITLE>Page has moved</TITLE> </HEAD> <BODY> <A HREF="#"><h3>Click here...</h3></A> </BODY> <!-- Created by HTTrack Website Copier/3.49-2 [XR&CO'2014] --> <!-- Mirrored from mareenfischinger.com/pretty-faces/markus-t/js/libs/jquery-1.9.1.min.js/js/libs/jquery-1.9.1.min.js/js/libs/jquery-1.9.1.min.js/js/libs/jquery-1.9.1.min.js/js/libs/jquery-1.9.1.min.js/js/libs/jquery-1.9.1.min.js/js/libs/jquery-1.9.1.min.js/js/libs/jquery-1.9.1.min.js/js/libs/jquery-1.9.1.min.js/js/libs/jquery-1.9.1.min.js/js/libs/jquery-1.9.1.min.js/js/libs/jquery-1.9.1.min.js/js/libs/jquery-1.9.1.min.js/js/libs/jquery-1.9.1.min.js/js/libs/jquery-1.9.1.min.js/js/libs/jquery-1.9.1.min.js/js/libs/jquery-1.9.1.min.js/js/libs/jquery-1.9.1.min.js/js/libs/jquery-1.9.1.min.js/js/libs/jquery-1.9.1.min.js/js/libs/jquery-1.9.1.min.js/js/libs/jquery-1.9.1.min.js/js/libs/jquery-1.9.1.min.js/js/libs/jquery-1.9.1.min.js/js/libs/jquery-1.9.1.min.js/js/libs/jquery-1.9.1.min.js/js/libs/jquery-1.9.1.min.js/js/libs/jquery-1.9.1.min.js/js/libs/jquery-1.9.1.min.js/js/libs/jquery-1.9.1.min.js/js/libs/jquery-1.9.1.min.js/js/libs/jquery-1.9.1.min.js/js/libs/jquery-1.9.1.min.js/js/libs/jquery-1.9.1.min.js/js/libs/jquery-1.9.1.min.js by HTTrack Website Copier/3.x [XR&CO'2014], Sat, 27 Jan 2018 16:59:32 GMT --> </HTML>
D
module logging.facade; public import logging.formatters; public import logging.levels; public import logging.sinks; private import std.datetime; private import std.string; private import logging.utils; public struct log { public static void log(LogLevel loglevel, string m = __MODULE__, string func = __FUNCTION__, size_t line = __LINE__, Args...)(string fmt, Args args) { _facade.log(loglevel, m, func, line, Clock.currTime(), fmt.format(args), abbr_thread_id()); } public static void error(string m = __MODULE__, string func = __FUNCTION__, size_t line = __LINE__, Args...)(string fmt, Args args) { log!(LogLevel.Error,m,func,line,Args)(fmt, args); } public static void warning(string m = __MODULE__, string func = __FUNCTION__, size_t line = __LINE__, Args...)(string fmt, Args args) { log!(LogLevel.Warning,m,func,line,Args)(fmt, args); } public alias warning warn; public static void info(string m = __MODULE__, string func = __FUNCTION__, size_t line = __LINE__, Args...)(string fmt, Args args) { log!(LogLevel.Info,m,func,line,Args)(fmt, args); } public static void debg(string m = __MODULE__, string func = __FUNCTION__, size_t line = __LINE__, Args...)(string fmt, Args args) { log!(LogLevel.Debug,m,func,line,Args)(fmt, args); } public static void trace(string m = __MODULE__, string func = __FUNCTION__, size_t line = __LINE__, Args...)(string fmt, Args args) { debug log!(LogLevel.Trace,m,func,line,Args)(fmt, args); } public static void trace(string m = __MODULE__, string func = __FUNCTION__, size_t line = __LINE__)() { debug log!(LogLevel.Trace,m,func,line)("trace"); } public static void add_sink(LogSink s) { _facade.add_sink(s); } public static void remove_all_sinks() { _facade.remove_all_sinks(); } shared static this() { _facade = new FacadeImpl(); } __gshared FacadeImpl _facade; } // not quite beautiful: couldnt overcome type system for synchronized class private class FacadeImpl { public void log(LogLevel loglevel, string m, string func, size_t line, SysTime time, lazy string msg, uint thread_id) { synchronized(this) { foreach(l; _sinks) { l.log(loglevel, m, func, line, Clock.currTime(), msg, abbr_thread_id()); } } } public void add_sink(LogSink sink) { synchronized(this) { _sinks ~= sink; } } public void remove_all_sinks() { synchronized(this) { _sinks = null; } } private LogSink[] _sinks; } unittest { import std.concurrency; import std.stdio; import std.file; import std.uuid; static class ThreadedFormatter : Formatter { override string format(LogLevel loglevel, string m, string func, size_t line, SysTime st, string msg, uint thread_id) { return "T#%02s %s %s".format(abbr_thread_id(), LOGLEVEL_STR[loglevel], msg); } } static void worker(int i) { log.info("worker %s", i); send(ownerTid(),1); } log.remove_all_sinks(); log.info("should not be logged"); string tmpnam = randomUUID().toString(); log.add_sink(new FileLogSink(tmpnam, new ThreadedFormatter)); log.info("should be logged from main thread"); auto tid = spawn(&worker, 1); receiveOnly!int(); log.remove_all_sinks(); auto text = readText(tmpnam); auto expected_text = `T#00 INFO should be logged from main thread T#01 INFO worker 1 `; assert(text == expected_text); }
D
/Users/gem/Desktop/MovieMoya/the-movie-db/DerivedData/TheNewMovie/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/Alamofire.build/Objects-normal/x86_64/DispatchQueue+Alamofire.o : /Users/gem/Desktop/MovieMoya/the-movie-db/Pods/Alamofire/Source/MultipartFormData.swift /Users/gem/Desktop/MovieMoya/the-movie-db/Pods/Alamofire/Source/Timeline.swift /Users/gem/Desktop/MovieMoya/the-movie-db/Pods/Alamofire/Source/DispatchQueue+Alamofire.swift /Users/gem/Desktop/MovieMoya/the-movie-db/Pods/Alamofire/Source/Alamofire.swift /Users/gem/Desktop/MovieMoya/the-movie-db/Pods/Alamofire/Source/Response.swift /Users/gem/Desktop/MovieMoya/the-movie-db/Pods/Alamofire/Source/TaskDelegate.swift /Users/gem/Desktop/MovieMoya/the-movie-db/Pods/Alamofire/Source/SessionDelegate.swift /Users/gem/Desktop/MovieMoya/the-movie-db/Pods/Alamofire/Source/ParameterEncoding.swift /Users/gem/Desktop/MovieMoya/the-movie-db/Pods/Alamofire/Source/Validation.swift /Users/gem/Desktop/MovieMoya/the-movie-db/Pods/Alamofire/Source/ResponseSerialization.swift /Users/gem/Desktop/MovieMoya/the-movie-db/Pods/Alamofire/Source/SessionManager.swift /Users/gem/Desktop/MovieMoya/the-movie-db/Pods/Alamofire/Source/NetworkReachabilityManager.swift /Users/gem/Desktop/MovieMoya/the-movie-db/Pods/Alamofire/Source/AFError.swift /Users/gem/Desktop/MovieMoya/the-movie-db/Pods/Alamofire/Source/Notifications.swift /Users/gem/Desktop/MovieMoya/the-movie-db/Pods/Alamofire/Source/Result.swift /Users/gem/Desktop/MovieMoya/the-movie-db/Pods/Alamofire/Source/Request.swift /Users/gem/Desktop/MovieMoya/the-movie-db/Pods/Alamofire/Source/ServerTrustPolicy.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/gem/Desktop/MovieMoya/the-movie-db/Pods/Target\ Support\ Files/Alamofire/Alamofire-umbrella.h /Users/gem/Desktop/MovieMoya/the-movie-db/DerivedData/TheNewMovie/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/Alamofire.build/unextended-module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/OpenGLES.framework/Headers/OpenGLES.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImage.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/QuartzCore.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/Security.framework/Headers/Security.apinotes /Users/gem/Desktop/MovieMoya/the-movie-db/DerivedData/TheNewMovie/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/Alamofire.build/Objects-normal/x86_64/DispatchQueue+Alamofire~partial.swiftmodule : /Users/gem/Desktop/MovieMoya/the-movie-db/Pods/Alamofire/Source/MultipartFormData.swift /Users/gem/Desktop/MovieMoya/the-movie-db/Pods/Alamofire/Source/Timeline.swift /Users/gem/Desktop/MovieMoya/the-movie-db/Pods/Alamofire/Source/DispatchQueue+Alamofire.swift /Users/gem/Desktop/MovieMoya/the-movie-db/Pods/Alamofire/Source/Alamofire.swift /Users/gem/Desktop/MovieMoya/the-movie-db/Pods/Alamofire/Source/Response.swift /Users/gem/Desktop/MovieMoya/the-movie-db/Pods/Alamofire/Source/TaskDelegate.swift /Users/gem/Desktop/MovieMoya/the-movie-db/Pods/Alamofire/Source/SessionDelegate.swift /Users/gem/Desktop/MovieMoya/the-movie-db/Pods/Alamofire/Source/ParameterEncoding.swift /Users/gem/Desktop/MovieMoya/the-movie-db/Pods/Alamofire/Source/Validation.swift /Users/gem/Desktop/MovieMoya/the-movie-db/Pods/Alamofire/Source/ResponseSerialization.swift /Users/gem/Desktop/MovieMoya/the-movie-db/Pods/Alamofire/Source/SessionManager.swift /Users/gem/Desktop/MovieMoya/the-movie-db/Pods/Alamofire/Source/NetworkReachabilityManager.swift /Users/gem/Desktop/MovieMoya/the-movie-db/Pods/Alamofire/Source/AFError.swift /Users/gem/Desktop/MovieMoya/the-movie-db/Pods/Alamofire/Source/Notifications.swift /Users/gem/Desktop/MovieMoya/the-movie-db/Pods/Alamofire/Source/Result.swift /Users/gem/Desktop/MovieMoya/the-movie-db/Pods/Alamofire/Source/Request.swift /Users/gem/Desktop/MovieMoya/the-movie-db/Pods/Alamofire/Source/ServerTrustPolicy.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/gem/Desktop/MovieMoya/the-movie-db/Pods/Target\ Support\ Files/Alamofire/Alamofire-umbrella.h /Users/gem/Desktop/MovieMoya/the-movie-db/DerivedData/TheNewMovie/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/Alamofire.build/unextended-module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/OpenGLES.framework/Headers/OpenGLES.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImage.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/QuartzCore.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/Security.framework/Headers/Security.apinotes /Users/gem/Desktop/MovieMoya/the-movie-db/DerivedData/TheNewMovie/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/Alamofire.build/Objects-normal/x86_64/DispatchQueue+Alamofire~partial.swiftdoc : /Users/gem/Desktop/MovieMoya/the-movie-db/Pods/Alamofire/Source/MultipartFormData.swift /Users/gem/Desktop/MovieMoya/the-movie-db/Pods/Alamofire/Source/Timeline.swift /Users/gem/Desktop/MovieMoya/the-movie-db/Pods/Alamofire/Source/DispatchQueue+Alamofire.swift /Users/gem/Desktop/MovieMoya/the-movie-db/Pods/Alamofire/Source/Alamofire.swift /Users/gem/Desktop/MovieMoya/the-movie-db/Pods/Alamofire/Source/Response.swift /Users/gem/Desktop/MovieMoya/the-movie-db/Pods/Alamofire/Source/TaskDelegate.swift /Users/gem/Desktop/MovieMoya/the-movie-db/Pods/Alamofire/Source/SessionDelegate.swift /Users/gem/Desktop/MovieMoya/the-movie-db/Pods/Alamofire/Source/ParameterEncoding.swift /Users/gem/Desktop/MovieMoya/the-movie-db/Pods/Alamofire/Source/Validation.swift /Users/gem/Desktop/MovieMoya/the-movie-db/Pods/Alamofire/Source/ResponseSerialization.swift /Users/gem/Desktop/MovieMoya/the-movie-db/Pods/Alamofire/Source/SessionManager.swift /Users/gem/Desktop/MovieMoya/the-movie-db/Pods/Alamofire/Source/NetworkReachabilityManager.swift /Users/gem/Desktop/MovieMoya/the-movie-db/Pods/Alamofire/Source/AFError.swift /Users/gem/Desktop/MovieMoya/the-movie-db/Pods/Alamofire/Source/Notifications.swift /Users/gem/Desktop/MovieMoya/the-movie-db/Pods/Alamofire/Source/Result.swift /Users/gem/Desktop/MovieMoya/the-movie-db/Pods/Alamofire/Source/Request.swift /Users/gem/Desktop/MovieMoya/the-movie-db/Pods/Alamofire/Source/ServerTrustPolicy.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/gem/Desktop/MovieMoya/the-movie-db/Pods/Target\ Support\ Files/Alamofire/Alamofire-umbrella.h /Users/gem/Desktop/MovieMoya/the-movie-db/DerivedData/TheNewMovie/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/Alamofire.build/unextended-module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/OpenGLES.framework/Headers/OpenGLES.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImage.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/QuartzCore.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/Security.framework/Headers/Security.apinotes
D
instance DIA_Ruga_EXIT(C_Info) { npc = Mil_317_Ruga; nr = 999; condition = DIA_Ruga_EXIT_Condition; information = DIA_Ruga_EXIT_Info; permanent = TRUE; description = Dialog_Ende; }; func int DIA_Ruga_EXIT_Condition() { return TRUE; }; func void DIA_Ruga_EXIT_Info() { AI_StopProcessInfos(self); }; instance DIA_Ruga_PICKPOCKET(C_Info) { npc = Mil_317_Ruga; nr = 900; condition = DIA_Ruga_PICKPOCKET_Condition; information = DIA_Ruga_PICKPOCKET_Info; permanent = TRUE; description = "(Украсть этот ключ будет легко)"; }; func int DIA_Ruga_PICKPOCKET_Condition() { if((Npc_GetTalentSkill(other,NPC_TALENT_PICKPOCKET) == 1) && (self.aivar[AIV_PlayerHasPickedMyPocket] == FALSE) && (Npc_HasItems(self,ItKe_City_Tower_03) >= 1) && (other.attribute[ATR_DEXTERITY] >= (40 - Theftdiff))) { return TRUE; }; }; func void DIA_Ruga_PICKPOCKET_Info() { Info_ClearChoices(DIA_Ruga_PICKPOCKET); Info_AddChoice(DIA_Ruga_PICKPOCKET,Dialog_Back,DIA_Ruga_PICKPOCKET_BACK); Info_AddChoice(DIA_Ruga_PICKPOCKET,DIALOG_PICKPOCKET,DIA_Ruga_PICKPOCKET_DoIt); }; func void DIA_Ruga_PICKPOCKET_DoIt() { if(other.attribute[ATR_DEXTERITY] >= 40) { B_GiveInvItems(self,other,ItKe_City_Tower_03,1); self.aivar[AIV_PlayerHasPickedMyPocket] = TRUE; B_GiveThiefXP(); Info_ClearChoices(DIA_Ruga_PICKPOCKET); } else { B_ResetThiefLevel(); AI_StopProcessInfos(self); B_Attack(self,other,AR_Theft,1); }; }; func void DIA_Ruga_PICKPOCKET_BACK() { Info_ClearChoices(DIA_Ruga_PICKPOCKET); }; instance DIA_Ruga_Hallo(C_Info) { npc = Mil_317_Ruga; nr = 2; condition = DIA_Ruga_Hallo_Condition; information = DIA_Ruga_Hallo_Info; permanent = FALSE; important = TRUE; }; func int DIA_Ruga_Hallo_Condition() { if(Npc_IsInState(self,ZS_Talk)) { return TRUE; }; }; func void DIA_Ruga_Hallo_Info() { AI_Output(other,self,"DIA_Ruga_Hallo_15_00"); //Что ты делаешь здесь? AI_Output(self,other,"DIA_Ruga_Hallo_11_01"); //Я обучаю парней стрельбе из арбалета и помогаю им стать более ловкими. Log_CreateTopic(TOPIC_CityTeacher,LOG_NOTE); B_LogEntry(TOPIC_CityTeacher,"Руга, городской гвардеец, может помочь мне повысить мою ловкость и научить меня пользоваться арбалетом. Но для этого я должен служить королю."); }; instance DIA_Ruga_Train(C_Info) { npc = Mil_317_Ruga; nr = 5; condition = DIA_Ruga_Train_Condition; information = DIA_Ruga_Train_Info; permanent = TRUE; description = "Ты не мог бы потренировать меня?"; }; func int DIA_Ruga_Train_Condition() { if(Ruga_TeachCrossbow == FALSE) { return TRUE; }; }; func void DIA_Ruga_Train_Info() { AI_Output(other,self,"DIA_Ruga_Train_15_00"); //Ты можешь потренировать меня? if((hero.guild == GIL_MIL) || (hero.guild == GIL_PAL) || (hero.guild == GIL_KDF)) { AI_Output(self,other,"DIA_Ruga_Train_11_01"); //Конечно. Если у тебя достаточно опыта, я готов помочь тебе. AI_Output(self,other,"DIA_Ruga_Train_11_02"); //Но нужно понимать, что ловкость и стрельба неотделимы друг от друга, как арбалет и стрела. Одно... AI_Output(other,self,"DIA_Ruga_Train_15_03"); //... ничего не стоит без другого. Я понял. Ruga_TeachCrossbow = TRUE; Ruga_TeachDEX = TRUE; } else if((hero.guild == GIL_SLD) || (hero.guild == GIL_DJG)) { AI_Output(self,other,"DIA_Ruga_Train_11_04"); //Убирайся с глаз моих, наемник. AI_StopProcessInfos(self); } else { AI_Output(self,other,"DIA_Ruga_Train_11_05"); //Нет. Я тренирую только людей, состоящих на службе у короля. Больше никого. AI_Output(self,other,"DIA_Ruga_Train_11_06"); //Но нам всегда нужны хорошие люди. Так что, если хочешь поступить в ополчение, поговори с лордом Андрэ. }; }; instance DIA_Ruga_Teach(C_Info) { npc = Mil_317_Ruga; nr = 100; condition = DIA_Ruga_Teach_Condition; information = DIA_Ruga_Teach_Info; permanent = TRUE; description = "Покажи мне, как стрелять из арбалета."; }; var int DIA_Ruga_Teach_permanent; func int DIA_Ruga_Teach_Condition() { if((Ruga_TeachCrossbow == TRUE) && (DIA_Ruga_Teach_permanent == FALSE)) { return TRUE; }; }; func void DIA_Ruga_Teach_Info() { AI_Output(other,self,"DIA_Ruga_Teach_15_00"); //Покажи мне, как стрелять из арбалета. Info_ClearChoices(DIA_Ruga_Teach); Info_AddChoice(DIA_Ruga_Teach,Dialog_Back,DIA_Ruga_Teach_Back); Info_AddChoice(DIA_Ruga_Teach,B_BuildLearnString(PRINT_LearnCrossBow1,B_GetLearnCostTalent(other,NPC_TALENT_CROSSBOW,1)),DIA_Ruga_Teach_1H_1); Info_AddChoice(DIA_Ruga_Teach,B_BuildLearnString(PRINT_LearnCrossBow5,B_GetLearnCostTalent(other,NPC_TALENT_CROSSBOW,5)),DIA_Ruga_Teach_1H_5); }; func void DIA_Ruga_Teach_Back() { if(other.HitChance[NPC_TALENT_CROSSBOW] >= 90) { AI_Output(self,other,"DIA_Ruga_Teach_11_00"); //Мне больше нечему учить тебя. Тебе лучше поискать другого учителя. DIA_Ruga_Teach_permanent = TRUE; }; Info_ClearChoices(DIA_Ruga_Teach); }; func void DIA_Ruga_Teach_1H_1() { B_TeachFightTalentPercent(self,other,NPC_TALENT_CROSSBOW,1,90); Info_ClearChoices(DIA_Ruga_Teach); Info_AddChoice(DIA_Ruga_Teach,Dialog_Back,DIA_Ruga_Teach_Back); Info_AddChoice(DIA_Ruga_Teach,B_BuildLearnString(PRINT_LearnCrossBow1,B_GetLearnCostTalent(other,NPC_TALENT_CROSSBOW,1)),DIA_Ruga_Teach_1H_1); Info_AddChoice(DIA_Ruga_Teach,B_BuildLearnString(PRINT_LearnCrossBow5,B_GetLearnCostTalent(other,NPC_TALENT_CROSSBOW,5)),DIA_Ruga_Teach_1H_5); }; func void DIA_Ruga_Teach_1H_5() { B_TeachFightTalentPercent(self,other,NPC_TALENT_CROSSBOW,5,90); Info_ClearChoices(DIA_Ruga_Teach); Info_AddChoice(DIA_Ruga_Teach,Dialog_Back,DIA_Ruga_Teach_Back); Info_AddChoice(DIA_Ruga_Teach,B_BuildLearnString(PRINT_LearnCrossBow1,B_GetLearnCostTalent(other,NPC_TALENT_CROSSBOW,1)),DIA_Ruga_Teach_1H_1); Info_AddChoice(DIA_Ruga_Teach,B_BuildLearnString(PRINT_LearnCrossBow5,B_GetLearnCostTalent(other,NPC_TALENT_CROSSBOW,5)),DIA_Ruga_Teach_1H_5); }; instance DIA_Ruga_TEACHDEX(C_Info) { npc = Mil_317_Ruga; nr = 101; condition = DIA_Ruga_TEACHDEX_Condition; information = DIA_Ruga_TEACHDEX_Info; permanent = TRUE; description = "Я хочу стать более ловким."; }; var int DIA_Ruga_TEACHDEX_permanent; func int DIA_Ruga_TEACHDEX_Condition() { if((Ruga_TeachDEX == TRUE) && (DIA_Ruga_TEACHDEX_permanent == FALSE)) { return TRUE; }; }; func void DIA_Ruga_TEACHDEX_Info() { AI_Output(other,self,"DIA_Ruga_TEACHDEX_15_00"); //Я хочу стать более ловким. Info_ClearChoices(DIA_Ruga_TEACHDEX); Info_AddChoice(DIA_Ruga_TEACHDEX,Dialog_Back,DIA_Ruga_TEACHDEX_BACK); Info_AddChoice(DIA_Ruga_TEACHDEX,B_BuildLearnString(PRINT_LearnDEX1,B_GetLearnCostAttribute(other,ATR_DEXTERITY)),DIA_Ruga_TEACHDEX_1); Info_AddChoice(DIA_Ruga_TEACHDEX,B_BuildLearnString(PRINT_LearnDEX5,B_GetLearnCostAttribute(other,ATR_DEXTERITY) * 5),DIA_Ruga_TEACHDEX_5); }; func void DIA_Ruga_TEACHDEX_BACK() { if(other.attribute[ATR_DEXTERITY] >= T_LOW) { AI_Output(self,other,"DIA_Ruga_TEACHDEX_11_00"); //Это все, чему я мог обучить тебя. Если ты хочешь стать еще более ловким, тебе лучше поискать другого учителя. DIA_Ruga_TEACHDEX_permanent = TRUE; }; Info_ClearChoices(DIA_Ruga_TEACHDEX); }; func void DIA_Ruga_TEACHDEX_1() { B_TeachAttributePoints(self,other,ATR_DEXTERITY,1,T_LOW); Info_ClearChoices(DIA_Ruga_TEACHDEX); Info_AddChoice(DIA_Ruga_TEACHDEX,Dialog_Back,DIA_Ruga_TEACHDEX_BACK); Info_AddChoice(DIA_Ruga_TEACHDEX,B_BuildLearnString(PRINT_LearnDEX1,B_GetLearnCostAttribute(other,ATR_DEXTERITY)),DIA_Ruga_TEACHDEX_1); Info_AddChoice(DIA_Ruga_TEACHDEX,B_BuildLearnString(PRINT_LearnDEX5,B_GetLearnCostAttribute(other,ATR_DEXTERITY) * 5),DIA_Ruga_TEACHDEX_5); }; func void DIA_Ruga_TEACHDEX_5() { B_TeachAttributePoints(self,other,ATR_DEXTERITY,5,T_LOW); Info_ClearChoices(DIA_Ruga_TEACHDEX); Info_AddChoice(DIA_Ruga_TEACHDEX,Dialog_Back,DIA_Ruga_TEACHDEX_BACK); Info_AddChoice(DIA_Ruga_TEACHDEX,B_BuildLearnString(PRINT_LearnDEX1,B_GetLearnCostAttribute(other,ATR_DEXTERITY)),DIA_Ruga_TEACHDEX_1); Info_AddChoice(DIA_Ruga_TEACHDEX,B_BuildLearnString(PRINT_LearnDEX5,B_GetLearnCostAttribute(other,ATR_DEXTERITY) * 5),DIA_Ruga_TEACHDEX_5); };
D
module appbase.listener; import core.thread; import std.socket; import std.file; import std.path; import std.exception; import std.parallelism : totalCPUs; import async; import appbase.utils.log; alias RequestCallback = void function(TcpClient, const scope ubyte[]); private __gshared EventLoop _loop; private __gshared ushort _protocolMagic; private __gshared RequestCallback _request; private __gshared OnSendCompleted _onSendCompleted; private __gshared ThreadPool _businessPool; deprecated("Will be removed in the next release.") void startServer(const ushort port, const int businessThreads, const ushort protocolMagic, RequestCallback onRequest, OnSendCompleted onSendCompleted) { startServer(port, protocolMagic, onRequest, onSendCompleted, businessThreads, 0); } void startServer(const ushort port, const ushort protocolMagic, RequestCallback onRequest, OnSendCompleted onSendCompleted, const int businessThreads = 0, const int workerThreads = 0) { startServer("0.0.0.0", port, protocolMagic, onRequest, onSendCompleted, businessThreads, workerThreads); } void startServer(const string host, const ushort port, const ushort protocolMagic, RequestCallback onRequest, OnSendCompleted onSendCompleted, const int businessThreads = 0, const int workerThreads = 0) { _businessPool = new ThreadPool((businessThreads < 1) ? (totalCPUs * 2 + 2) : businessThreads); _protocolMagic = protocolMagic; _request = onRequest; _onSendCompleted = onSendCompleted; TcpListener listener = new TcpListener(); listener.bind(new InternetAddress(host, port)); listener.listen(1024); Codec codec = new Codec(CodecType.SizeGuide, protocolMagic); _loop = new EventLoop(listener, &onConnected, &onDisConnected, &onReceive, _onSendCompleted, &onSocketError, codec, workerThreads); _loop.run(); } void stopServer() { if (_loop !is null) { _loop.stop(); } } private: void onConnected(TcpClient client) nothrow @trusted { // collectException({ // writeln("New connection: ", client.remoteAddress().toString()); // }()); } void onDisConnected(const int fd, string remoteAddress) nothrow @trusted { // collectException({ // }()); } void onReceive(TcpClient client, const scope ubyte[] data) nothrow @trusted { collectException({ _businessPool.run!_request(client, data); }()); } void onSocketError(const int fd, string remoteAddress, string msg) nothrow @trusted { // collectException({ // logger.write(baseName(thisExePath) ~ " Socket Error: " ~ remoteAddress ~ ", " ~ msg); // }()); }
D
/* Copyright (c) 2014-2019 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. */ module dagon.ext.physics.shape; import dlib.core.ownership; import dlib.core.memory; import dlib.math.vector; import dlib.math.matrix; import dlib.math.transformation; import dlib.geometry.aabb; import dlib.geometry.sphere; import dagon.ext.physics.world; import dagon.ext.physics.geometry; /* * ShapeComponent is a proxy object between RigidBody and Geometry. * It stores non-geometric information such as mass contribution, * position in body space and a unique identifier for indexing in * contact cache. * One Geometry can be shared between multiple ShapeComponents. */ class ShapeComponent: Owner { Geometry geometry; // geometry Vector3f centroid; // position in body space float mass; // mass contribution uint id = 0; // global identifier Matrix4x4f _transformation; bool locked = false; bool active = true; bool solve = true; bool raycastable = true; int numCollisions = 0; @property { Matrix4x4f transformation() { while(locked) {} return _transformation; } void transformation(Matrix4x4f m) { locked = true; _transformation = m; locked = false; } } this(PhysicsWorld world, Geometry g, Vector3f c, float m) { super(world); geometry = g; centroid = c; mass = m; _transformation = Matrix4x4f.identity; } // position in world space @property Vector3f position() { return _transformation.translation; } @property AABB boundingBox() { return geometry.boundingBox( _transformation.translation); } @property Sphere boundingSphere() { AABB aabb = geometry.boundingBox( _transformation.translation); return Sphere(aabb.center, aabb.size.length); } Vector3f supportPointGlobal(Vector3f dir) { Vector3f result; Matrix4x4f* m = &_transformation; result.x = ((dir.x * m.a11) + (dir.y * m.a21)) + (dir.z * m.a31); result.y = ((dir.x * m.a12) + (dir.y * m.a22)) + (dir.z * m.a32); result.z = ((dir.x * m.a13) + (dir.y * m.a23)) + (dir.z * m.a33); result = geometry.supportPoint(result); float x = ((result.x * m.a11) + (result.y * m.a12)) + (result.z * m.a13); float y = ((result.x * m.a21) + (result.y * m.a22)) + (result.z * m.a23); float z = ((result.x * m.a31) + (result.y * m.a32)) + (result.z * m.a33); result.x = m.a14 + x; result.y = m.a24 + y; result.z = m.a34 + z; return result; } }
D
/Users/amir/Desktop/EasyChat/build/EasyChat.build/Debug-iphonesimulator/EasyChat.build/Objects-normal/x86_64/ConversationCell.o : /Users/amir/Desktop/EasyChat/EasyChat/Auths/LoginVC.swift /Users/amir/Desktop/EasyChat/EasyChat/Home/ConversationVC.swift /Users/amir/Desktop/EasyChat/EasyChat/Auths/SignUpVC.swift /Users/amir/Desktop/EasyChat/EasyChat/AppDelegate.swift /Users/amir/Desktop/EasyChat/EasyChat/Home/ConversationCell.swift /Users/amir/Desktop/EasyChat/EasyChat/Home/NavBar.swift /Users/amir/Downloads/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.apinotesc /Users/amir/Downloads/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/ObjectiveC.swiftmodule /Users/amir/Downloads/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreMedia.swiftmodule /Users/amir/Downloads/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/simd.swiftmodule /Users/amir/Downloads/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreImage.swiftmodule /Users/amir/Downloads/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/QuartzCore.swiftmodule /Users/amir/Downloads/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.swiftmodule /Users/amir/Downloads/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Metal.swiftmodule /Users/amir/Downloads/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Darwin.swiftmodule /Users/amir/Downloads/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Foundation.swiftmodule /Users/amir/Downloads/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/AVFoundation.swiftmodule /Users/amir/Downloads/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreFoundation.swiftmodule /Users/amir/Downloads/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreAudio.swiftmodule /Users/amir/Downloads/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreGraphics.swiftmodule /Users/amir/Downloads/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Swift.swiftmodule /Users/amir/Downloads/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/UIKit.swiftmodule /Users/amir/Downloads/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/SwiftOnoneSupport.swiftmodule /Users/amir/Desktop/EasyChat/build/Debug-iphonesimulator/FirebaseInstanceID/FirebaseInstanceID.framework/Headers/FIRInstanceID.h /Users/amir/Desktop/EasyChat/build/Debug-iphonesimulator/FirebaseInstanceID/FirebaseInstanceID.framework/Headers/FirebaseInstanceID.h /Users/amir/Desktop/EasyChat/build/Debug-iphonesimulator/FirebaseInstanceID/FirebaseInstanceID.framework/Headers/FirebaseInstanceID-umbrella.h /Users/amir/Desktop/EasyChat/build/Debug-iphonesimulator/FirebaseStorage/FirebaseStorage.framework/Headers/FirebaseStorage-umbrella.h /Users/amir/Desktop/EasyChat/build/Debug-iphonesimulator/FirebaseCore/FirebaseCore.framework/Headers/FirebaseCore-umbrella.h /Users/amir/Desktop/EasyChat/build/Debug-iphonesimulator/FirebaseDatabase/FirebaseDatabase.framework/Headers/FirebaseDatabase-umbrella.h /Users/amir/Desktop/EasyChat/build/Debug-iphonesimulator/FirebaseAuth/FirebaseAuth.framework/Headers/FirebaseAuth-umbrella.h /Users/amir/Desktop/EasyChat/build/Debug-iphonesimulator/FirebaseDatabase/FirebaseDatabase.framework/Headers/FIRMutableData.h /Users/amir/Desktop/EasyChat/build/Debug-iphonesimulator/FirebaseStorage/FirebaseStorage.framework/Headers/FIRStorageMetadata.h /Users/amir/Desktop/EasyChat/build/Debug-iphonesimulator/FirebaseAuth/FirebaseAuth.framework/Headers/FIRUserMetadata.h /Users/amir/Desktop/EasyChat/build/Debug-iphonesimulator/FirebaseStorage/FirebaseStorage.framework/Headers/FIRStorageReference.h /Users/amir/Desktop/EasyChat/build/Debug-iphonesimulator/FirebaseDatabase/FirebaseDatabase.framework/Headers/FIRDatabaseReference.h /Users/amir/Desktop/EasyChat/build/Debug-iphonesimulator/FirebaseStorage/FirebaseStorage.framework/Headers/FIRStorage.h /Users/amir/Desktop/EasyChat/build/Debug-iphonesimulator/FirebaseStorage/FirebaseStorage.framework/Headers/FirebaseStorage.h /Users/amir/Desktop/EasyChat/build/Debug-iphonesimulator/FirebaseAuth/FirebaseAuth.framework/Headers/FIRAuthAPNSTokenType.h /Users/amir/Desktop/EasyChat/build/Debug-iphonesimulator/FirebaseDatabase/FirebaseDatabase.framework/Headers/FIRDataEventType.h /Users/amir/Desktop/EasyChat/build/Debug-iphonesimulator/FirebaseCore/FirebaseCore.framework/Headers/FirebaseCore.h /Users/amir/Desktop/EasyChat/build/Debug-iphonesimulator/FirebaseDatabase/FirebaseDatabase.framework/Headers/FIRDatabase.h /Users/amir/Desktop/EasyChat/build/Debug-iphonesimulator/FirebaseDatabase/FirebaseDatabase.framework/Headers/FirebaseDatabase.h /Users/amir/Desktop/EasyChat/Pods/Firebase/CoreOnly/Sources/Firebase.h /Users/amir/Desktop/EasyChat/build/Debug-iphonesimulator/FirebaseAuth/FirebaseAuth.framework/Headers/FIRAuthUIDelegate.h /Users/amir/Desktop/EasyChat/Pods/FirebaseAnalytics/Frameworks/FirebaseAnalytics.framework/Headers/FIRAnalytics+AppDelegate.h /Users/amir/Desktop/EasyChat/build/Debug-iphonesimulator/FirebaseDatabase/FirebaseDatabase.framework/Headers/FIRServerValue.h /Users/amir/Desktop/EasyChat/build/Debug-iphonesimulator/FirebaseAuth/FirebaseAuth.framework/Headers/FIRAuth.h /Users/amir/Desktop/EasyChat/build/Debug-iphonesimulator/FirebaseAuth/FirebaseAuth.framework/Headers/FirebaseAuth.h /Users/amir/Desktop/EasyChat/build/Debug-iphonesimulator/FirebaseStorage/FirebaseStorage.framework/Headers/FIRStorageDownloadTask.h /Users/amir/Desktop/EasyChat/build/Debug-iphonesimulator/FirebaseStorage/FirebaseStorage.framework/Headers/FIRStorageUploadTask.h /Users/amir/Desktop/EasyChat/build/Debug-iphonesimulator/FirebaseStorage/FirebaseStorage.framework/Headers/FIRStorageTask.h /Users/amir/Desktop/EasyChat/build/Debug-iphonesimulator/FirebaseStorage/FirebaseStorage.framework/Headers/FIRStorageObservableTask.h /Users/amir/Desktop/EasyChat/build/Debug-iphonesimulator/FirebaseAuth/FirebaseAuth.framework/Headers/FIROAuthCredential.h /Users/amir/Desktop/EasyChat/build/Debug-iphonesimulator/FirebaseAuth/FirebaseAuth.framework/Headers/FIRAuthCredential.h /Users/amir/Desktop/EasyChat/build/Debug-iphonesimulator/FirebaseAuth/FirebaseAuth.framework/Headers/FIRPhoneAuthCredential.h /Users/amir/Desktop/EasyChat/build/Debug-iphonesimulator/FirebaseCore/FirebaseCore.framework/Headers/FIRLoggerLevel.h /Users/amir/Desktop/EasyChat/build/Debug-iphonesimulator/FirebaseAuth/FirebaseAuth.framework/Headers/FirebaseAuthVersion.h /Users/amir/Desktop/EasyChat/build/Debug-iphonesimulator/FirebaseCore/FirebaseCore.framework/Headers/FIRConfiguration.h /Users/amir/Desktop/EasyChat/build/Debug-iphonesimulator/FirebaseAuth/FirebaseAuth.framework/Headers/FIRUserInfo.h /Users/amir/Desktop/EasyChat/build/Debug-iphonesimulator/FirebaseAuth/FirebaseAuth.framework/Headers/FIRAdditionalUserInfo.h /Users/amir/Desktop/EasyChat/build/Debug-iphonesimulator/FirebaseCore/FirebaseCore.framework/Headers/FIRApp.h /Users/amir/Desktop/EasyChat/build/Debug-iphonesimulator/FirebaseAuth/FirebaseAuth.framework/Headers/FIROAuthProvider.h /Users/amir/Desktop/EasyChat/build/Debug-iphonesimulator/FirebaseAuth/FirebaseAuth.framework/Headers/FIRGitHubAuthProvider.h /Users/amir/Desktop/EasyChat/build/Debug-iphonesimulator/FirebaseAuth/FirebaseAuth.framework/Headers/FIRFederatedAuthProvider.h /Users/amir/Desktop/EasyChat/build/Debug-iphonesimulator/FirebaseAuth/FirebaseAuth.framework/Headers/FIRGoogleAuthProvider.h /Users/amir/Desktop/EasyChat/build/Debug-iphonesimulator/FirebaseAuth/FirebaseAuth.framework/Headers/FIRPhoneAuthProvider.h /Users/amir/Desktop/EasyChat/build/Debug-iphonesimulator/FirebaseAuth/FirebaseAuth.framework/Headers/FIRFacebookAuthProvider.h /Users/amir/Desktop/EasyChat/build/Debug-iphonesimulator/FirebaseAuth/FirebaseAuth.framework/Headers/FIREmailAuthProvider.h /Users/amir/Desktop/EasyChat/build/Debug-iphonesimulator/FirebaseAuth/FirebaseAuth.framework/Headers/FIRGameCenterAuthProvider.h /Users/amir/Desktop/EasyChat/build/Debug-iphonesimulator/FirebaseAuth/FirebaseAuth.framework/Headers/FIRTwitterAuthProvider.h /Users/amir/Desktop/EasyChat/build/Debug-iphonesimulator/FirebaseAuth/FirebaseAuth.framework/Headers/FIRUser.h /Users/amir/Desktop/EasyChat/Pods/FirebaseAnalytics/Frameworks/FirebaseAnalytics.framework/Headers/FIRAnalytics.h /Users/amir/Desktop/EasyChat/Pods/FirebaseAnalytics/Frameworks/FirebaseAnalytics.framework/Headers/FirebaseAnalytics.h /Users/amir/Desktop/EasyChat/Pods/FirebaseAnalytics/Frameworks/FirebaseAnalytics.framework/Headers/FIRParameterNames.h /Users/amir/Desktop/EasyChat/Pods/FirebaseAnalytics/Frameworks/FirebaseAnalytics.framework/Headers/FIREventNames.h /Users/amir/Desktop/EasyChat/Pods/FirebaseAnalytics/Frameworks/FirebaseAnalytics.framework/Headers/FIRUserPropertyNames.h /Users/amir/Desktop/EasyChat/build/Debug-iphonesimulator/FirebaseAuth/FirebaseAuth.framework/Headers/FIRActionCodeSettings.h /Users/amir/Desktop/EasyChat/build/Debug-iphonesimulator/FirebaseAuth/FirebaseAuth.framework/Headers/FIRAuthSettings.h /Users/amir/Desktop/EasyChat/build/Debug-iphonesimulator/FirebaseCore/FirebaseCore.framework/Headers/FIROptions.h /Users/amir/Desktop/EasyChat/build/Debug-iphonesimulator/FirebaseAuth/FirebaseAuth.framework/Headers/FIRAuthErrors.h /Users/amir/Desktop/EasyChat/build/Debug-iphonesimulator/FirebaseStorage/FirebaseStorage.framework/Headers/FIRStorageConstants.h /Users/amir/Desktop/EasyChat/build/Debug-iphonesimulator/FirebaseAuth/FirebaseAuth.framework/Headers/FIRAuthDataResult.h /Users/amir/Desktop/EasyChat/build/Debug-iphonesimulator/FirebaseAuth/FirebaseAuth.framework/Headers/FIRAuthTokenResult.h /Users/amir/Desktop/EasyChat/build/Debug-iphonesimulator/FirebaseDatabase/FirebaseDatabase.framework/Headers/FIRTransactionResult.h /Users/amir/Desktop/EasyChat/build/Debug-iphonesimulator/FirebaseStorage/FirebaseStorage.framework/Headers/FIRStorageListResult.h /Users/amir/Desktop/EasyChat/build/Debug-iphonesimulator/FirebaseDatabase/FirebaseDatabase.framework/Headers/FIRDataSnapshot.h /Users/amir/Desktop/EasyChat/build/Debug-iphonesimulator/FirebaseStorage/FirebaseStorage.framework/Headers/FIRStorageTaskSnapshot.h /Users/amir/Desktop/EasyChat/build/Debug-iphonesimulator/FirebaseDatabase/FirebaseDatabase.framework/Headers/FIRDatabaseQuery.h /Users/amir/Desktop/EasyChat/Pods/Firebase/CoreOnly/Sources/module.modulemap /Users/amir/Desktop/InstgramCopy/Pods/Firebase/CoreOnly/Sources/module.modulemap /Users/amir/Desktop/EasyChat/build/Debug-iphonesimulator/FirebaseInstanceID/FirebaseInstanceID.framework/Modules/module.modulemap /Users/amir/Desktop/EasyChat/build/Debug-iphonesimulator/FirebaseStorage/FirebaseStorage.framework/Modules/module.modulemap /Users/amir/Desktop/EasyChat/build/Debug-iphonesimulator/FirebaseCore/FirebaseCore.framework/Modules/module.modulemap /Users/amir/Desktop/EasyChat/build/Debug-iphonesimulator/FirebaseDatabase/FirebaseDatabase.framework/Modules/module.modulemap /Users/amir/Desktop/EasyChat/build/Debug-iphonesimulator/FirebaseAuth/FirebaseAuth.framework/Modules/module.modulemap /Users/amir/Desktop/EasyChat/Pods/FirebaseAnalytics/Frameworks/FirebaseAnalytics.framework/Modules/module.modulemap /Users/amir/Downloads/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/usr/include/objc/ObjectiveC.apinotes /Users/amir/Downloads/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/OpenGLES.framework/Headers/OpenGLES.apinotes /Users/amir/Downloads/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/CoreMedia.framework/Headers/CoreMedia.apinotes /Users/amir/Downloads/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImage.apinotes /Users/amir/Downloads/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/QuartzCore.apinotes /Users/amir/Downloads/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.apinotes /Users/amir/Downloads/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/usr/include/Darwin.apinotes /Users/amir/Downloads/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Users/amir/Downloads/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/AVFoundation.framework/Headers/AVFoundation.apinotes /Users/amir/Downloads/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Users/amir/Downloads/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.apinotes /Users/amir/Downloads/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Users/amir/Downloads/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/MediaToolbox.framework/Headers/MediaToolbox.apinotes /Users/amir/Downloads/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/AudioToolbox.framework/Headers/AudioToolbox.apinotes /Users/amir/Downloads/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/Security.framework/Headers/Security.apinotes /Users/amir/Desktop/EasyChat/build/EasyChat.build/Debug-iphonesimulator/EasyChat.build/Objects-normal/x86_64/ConversationCell~partial.swiftmodule : /Users/amir/Desktop/EasyChat/EasyChat/Auths/LoginVC.swift /Users/amir/Desktop/EasyChat/EasyChat/Home/ConversationVC.swift /Users/amir/Desktop/EasyChat/EasyChat/Auths/SignUpVC.swift /Users/amir/Desktop/EasyChat/EasyChat/AppDelegate.swift /Users/amir/Desktop/EasyChat/EasyChat/Home/ConversationCell.swift /Users/amir/Desktop/EasyChat/EasyChat/Home/NavBar.swift /Users/amir/Downloads/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.apinotesc /Users/amir/Downloads/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/ObjectiveC.swiftmodule /Users/amir/Downloads/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreMedia.swiftmodule /Users/amir/Downloads/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/simd.swiftmodule /Users/amir/Downloads/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreImage.swiftmodule /Users/amir/Downloads/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/QuartzCore.swiftmodule /Users/amir/Downloads/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.swiftmodule /Users/amir/Downloads/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Metal.swiftmodule /Users/amir/Downloads/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Darwin.swiftmodule /Users/amir/Downloads/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Foundation.swiftmodule /Users/amir/Downloads/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/AVFoundation.swiftmodule /Users/amir/Downloads/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreFoundation.swiftmodule /Users/amir/Downloads/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreAudio.swiftmodule /Users/amir/Downloads/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreGraphics.swiftmodule /Users/amir/Downloads/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Swift.swiftmodule /Users/amir/Downloads/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/UIKit.swiftmodule /Users/amir/Downloads/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/SwiftOnoneSupport.swiftmodule /Users/amir/Desktop/EasyChat/build/Debug-iphonesimulator/FirebaseInstanceID/FirebaseInstanceID.framework/Headers/FIRInstanceID.h /Users/amir/Desktop/EasyChat/build/Debug-iphonesimulator/FirebaseInstanceID/FirebaseInstanceID.framework/Headers/FirebaseInstanceID.h /Users/amir/Desktop/EasyChat/build/Debug-iphonesimulator/FirebaseInstanceID/FirebaseInstanceID.framework/Headers/FirebaseInstanceID-umbrella.h /Users/amir/Desktop/EasyChat/build/Debug-iphonesimulator/FirebaseStorage/FirebaseStorage.framework/Headers/FirebaseStorage-umbrella.h /Users/amir/Desktop/EasyChat/build/Debug-iphonesimulator/FirebaseCore/FirebaseCore.framework/Headers/FirebaseCore-umbrella.h /Users/amir/Desktop/EasyChat/build/Debug-iphonesimulator/FirebaseDatabase/FirebaseDatabase.framework/Headers/FirebaseDatabase-umbrella.h /Users/amir/Desktop/EasyChat/build/Debug-iphonesimulator/FirebaseAuth/FirebaseAuth.framework/Headers/FirebaseAuth-umbrella.h /Users/amir/Desktop/EasyChat/build/Debug-iphonesimulator/FirebaseDatabase/FirebaseDatabase.framework/Headers/FIRMutableData.h /Users/amir/Desktop/EasyChat/build/Debug-iphonesimulator/FirebaseStorage/FirebaseStorage.framework/Headers/FIRStorageMetadata.h /Users/amir/Desktop/EasyChat/build/Debug-iphonesimulator/FirebaseAuth/FirebaseAuth.framework/Headers/FIRUserMetadata.h /Users/amir/Desktop/EasyChat/build/Debug-iphonesimulator/FirebaseStorage/FirebaseStorage.framework/Headers/FIRStorageReference.h /Users/amir/Desktop/EasyChat/build/Debug-iphonesimulator/FirebaseDatabase/FirebaseDatabase.framework/Headers/FIRDatabaseReference.h /Users/amir/Desktop/EasyChat/build/Debug-iphonesimulator/FirebaseStorage/FirebaseStorage.framework/Headers/FIRStorage.h /Users/amir/Desktop/EasyChat/build/Debug-iphonesimulator/FirebaseStorage/FirebaseStorage.framework/Headers/FirebaseStorage.h /Users/amir/Desktop/EasyChat/build/Debug-iphonesimulator/FirebaseAuth/FirebaseAuth.framework/Headers/FIRAuthAPNSTokenType.h /Users/amir/Desktop/EasyChat/build/Debug-iphonesimulator/FirebaseDatabase/FirebaseDatabase.framework/Headers/FIRDataEventType.h /Users/amir/Desktop/EasyChat/build/Debug-iphonesimulator/FirebaseCore/FirebaseCore.framework/Headers/FirebaseCore.h /Users/amir/Desktop/EasyChat/build/Debug-iphonesimulator/FirebaseDatabase/FirebaseDatabase.framework/Headers/FIRDatabase.h /Users/amir/Desktop/EasyChat/build/Debug-iphonesimulator/FirebaseDatabase/FirebaseDatabase.framework/Headers/FirebaseDatabase.h /Users/amir/Desktop/EasyChat/Pods/Firebase/CoreOnly/Sources/Firebase.h /Users/amir/Desktop/EasyChat/build/Debug-iphonesimulator/FirebaseAuth/FirebaseAuth.framework/Headers/FIRAuthUIDelegate.h /Users/amir/Desktop/EasyChat/Pods/FirebaseAnalytics/Frameworks/FirebaseAnalytics.framework/Headers/FIRAnalytics+AppDelegate.h /Users/amir/Desktop/EasyChat/build/Debug-iphonesimulator/FirebaseDatabase/FirebaseDatabase.framework/Headers/FIRServerValue.h /Users/amir/Desktop/EasyChat/build/Debug-iphonesimulator/FirebaseAuth/FirebaseAuth.framework/Headers/FIRAuth.h /Users/amir/Desktop/EasyChat/build/Debug-iphonesimulator/FirebaseAuth/FirebaseAuth.framework/Headers/FirebaseAuth.h /Users/amir/Desktop/EasyChat/build/Debug-iphonesimulator/FirebaseStorage/FirebaseStorage.framework/Headers/FIRStorageDownloadTask.h /Users/amir/Desktop/EasyChat/build/Debug-iphonesimulator/FirebaseStorage/FirebaseStorage.framework/Headers/FIRStorageUploadTask.h /Users/amir/Desktop/EasyChat/build/Debug-iphonesimulator/FirebaseStorage/FirebaseStorage.framework/Headers/FIRStorageTask.h /Users/amir/Desktop/EasyChat/build/Debug-iphonesimulator/FirebaseStorage/FirebaseStorage.framework/Headers/FIRStorageObservableTask.h /Users/amir/Desktop/EasyChat/build/Debug-iphonesimulator/FirebaseAuth/FirebaseAuth.framework/Headers/FIROAuthCredential.h /Users/amir/Desktop/EasyChat/build/Debug-iphonesimulator/FirebaseAuth/FirebaseAuth.framework/Headers/FIRAuthCredential.h /Users/amir/Desktop/EasyChat/build/Debug-iphonesimulator/FirebaseAuth/FirebaseAuth.framework/Headers/FIRPhoneAuthCredential.h /Users/amir/Desktop/EasyChat/build/Debug-iphonesimulator/FirebaseCore/FirebaseCore.framework/Headers/FIRLoggerLevel.h /Users/amir/Desktop/EasyChat/build/Debug-iphonesimulator/FirebaseAuth/FirebaseAuth.framework/Headers/FirebaseAuthVersion.h /Users/amir/Desktop/EasyChat/build/Debug-iphonesimulator/FirebaseCore/FirebaseCore.framework/Headers/FIRConfiguration.h /Users/amir/Desktop/EasyChat/build/Debug-iphonesimulator/FirebaseAuth/FirebaseAuth.framework/Headers/FIRUserInfo.h /Users/amir/Desktop/EasyChat/build/Debug-iphonesimulator/FirebaseAuth/FirebaseAuth.framework/Headers/FIRAdditionalUserInfo.h /Users/amir/Desktop/EasyChat/build/Debug-iphonesimulator/FirebaseCore/FirebaseCore.framework/Headers/FIRApp.h /Users/amir/Desktop/EasyChat/build/Debug-iphonesimulator/FirebaseAuth/FirebaseAuth.framework/Headers/FIROAuthProvider.h /Users/amir/Desktop/EasyChat/build/Debug-iphonesimulator/FirebaseAuth/FirebaseAuth.framework/Headers/FIRGitHubAuthProvider.h /Users/amir/Desktop/EasyChat/build/Debug-iphonesimulator/FirebaseAuth/FirebaseAuth.framework/Headers/FIRFederatedAuthProvider.h /Users/amir/Desktop/EasyChat/build/Debug-iphonesimulator/FirebaseAuth/FirebaseAuth.framework/Headers/FIRGoogleAuthProvider.h /Users/amir/Desktop/EasyChat/build/Debug-iphonesimulator/FirebaseAuth/FirebaseAuth.framework/Headers/FIRPhoneAuthProvider.h /Users/amir/Desktop/EasyChat/build/Debug-iphonesimulator/FirebaseAuth/FirebaseAuth.framework/Headers/FIRFacebookAuthProvider.h /Users/amir/Desktop/EasyChat/build/Debug-iphonesimulator/FirebaseAuth/FirebaseAuth.framework/Headers/FIREmailAuthProvider.h /Users/amir/Desktop/EasyChat/build/Debug-iphonesimulator/FirebaseAuth/FirebaseAuth.framework/Headers/FIRGameCenterAuthProvider.h /Users/amir/Desktop/EasyChat/build/Debug-iphonesimulator/FirebaseAuth/FirebaseAuth.framework/Headers/FIRTwitterAuthProvider.h /Users/amir/Desktop/EasyChat/build/Debug-iphonesimulator/FirebaseAuth/FirebaseAuth.framework/Headers/FIRUser.h /Users/amir/Desktop/EasyChat/Pods/FirebaseAnalytics/Frameworks/FirebaseAnalytics.framework/Headers/FIRAnalytics.h /Users/amir/Desktop/EasyChat/Pods/FirebaseAnalytics/Frameworks/FirebaseAnalytics.framework/Headers/FirebaseAnalytics.h /Users/amir/Desktop/EasyChat/Pods/FirebaseAnalytics/Frameworks/FirebaseAnalytics.framework/Headers/FIRParameterNames.h /Users/amir/Desktop/EasyChat/Pods/FirebaseAnalytics/Frameworks/FirebaseAnalytics.framework/Headers/FIREventNames.h /Users/amir/Desktop/EasyChat/Pods/FirebaseAnalytics/Frameworks/FirebaseAnalytics.framework/Headers/FIRUserPropertyNames.h /Users/amir/Desktop/EasyChat/build/Debug-iphonesimulator/FirebaseAuth/FirebaseAuth.framework/Headers/FIRActionCodeSettings.h /Users/amir/Desktop/EasyChat/build/Debug-iphonesimulator/FirebaseAuth/FirebaseAuth.framework/Headers/FIRAuthSettings.h /Users/amir/Desktop/EasyChat/build/Debug-iphonesimulator/FirebaseCore/FirebaseCore.framework/Headers/FIROptions.h /Users/amir/Desktop/EasyChat/build/Debug-iphonesimulator/FirebaseAuth/FirebaseAuth.framework/Headers/FIRAuthErrors.h /Users/amir/Desktop/EasyChat/build/Debug-iphonesimulator/FirebaseStorage/FirebaseStorage.framework/Headers/FIRStorageConstants.h /Users/amir/Desktop/EasyChat/build/Debug-iphonesimulator/FirebaseAuth/FirebaseAuth.framework/Headers/FIRAuthDataResult.h /Users/amir/Desktop/EasyChat/build/Debug-iphonesimulator/FirebaseAuth/FirebaseAuth.framework/Headers/FIRAuthTokenResult.h /Users/amir/Desktop/EasyChat/build/Debug-iphonesimulator/FirebaseDatabase/FirebaseDatabase.framework/Headers/FIRTransactionResult.h /Users/amir/Desktop/EasyChat/build/Debug-iphonesimulator/FirebaseStorage/FirebaseStorage.framework/Headers/FIRStorageListResult.h /Users/amir/Desktop/EasyChat/build/Debug-iphonesimulator/FirebaseDatabase/FirebaseDatabase.framework/Headers/FIRDataSnapshot.h /Users/amir/Desktop/EasyChat/build/Debug-iphonesimulator/FirebaseStorage/FirebaseStorage.framework/Headers/FIRStorageTaskSnapshot.h /Users/amir/Desktop/EasyChat/build/Debug-iphonesimulator/FirebaseDatabase/FirebaseDatabase.framework/Headers/FIRDatabaseQuery.h /Users/amir/Desktop/EasyChat/Pods/Firebase/CoreOnly/Sources/module.modulemap /Users/amir/Desktop/InstgramCopy/Pods/Firebase/CoreOnly/Sources/module.modulemap /Users/amir/Desktop/EasyChat/build/Debug-iphonesimulator/FirebaseInstanceID/FirebaseInstanceID.framework/Modules/module.modulemap /Users/amir/Desktop/EasyChat/build/Debug-iphonesimulator/FirebaseStorage/FirebaseStorage.framework/Modules/module.modulemap /Users/amir/Desktop/EasyChat/build/Debug-iphonesimulator/FirebaseCore/FirebaseCore.framework/Modules/module.modulemap /Users/amir/Desktop/EasyChat/build/Debug-iphonesimulator/FirebaseDatabase/FirebaseDatabase.framework/Modules/module.modulemap /Users/amir/Desktop/EasyChat/build/Debug-iphonesimulator/FirebaseAuth/FirebaseAuth.framework/Modules/module.modulemap /Users/amir/Desktop/EasyChat/Pods/FirebaseAnalytics/Frameworks/FirebaseAnalytics.framework/Modules/module.modulemap /Users/amir/Downloads/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/usr/include/objc/ObjectiveC.apinotes /Users/amir/Downloads/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/OpenGLES.framework/Headers/OpenGLES.apinotes /Users/amir/Downloads/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/CoreMedia.framework/Headers/CoreMedia.apinotes /Users/amir/Downloads/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImage.apinotes /Users/amir/Downloads/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/QuartzCore.apinotes /Users/amir/Downloads/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.apinotes /Users/amir/Downloads/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/usr/include/Darwin.apinotes /Users/amir/Downloads/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Users/amir/Downloads/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/AVFoundation.framework/Headers/AVFoundation.apinotes /Users/amir/Downloads/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Users/amir/Downloads/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.apinotes /Users/amir/Downloads/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Users/amir/Downloads/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/MediaToolbox.framework/Headers/MediaToolbox.apinotes /Users/amir/Downloads/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/AudioToolbox.framework/Headers/AudioToolbox.apinotes /Users/amir/Downloads/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/Security.framework/Headers/Security.apinotes /Users/amir/Desktop/EasyChat/build/EasyChat.build/Debug-iphonesimulator/EasyChat.build/Objects-normal/x86_64/ConversationCell~partial.swiftdoc : /Users/amir/Desktop/EasyChat/EasyChat/Auths/LoginVC.swift /Users/amir/Desktop/EasyChat/EasyChat/Home/ConversationVC.swift /Users/amir/Desktop/EasyChat/EasyChat/Auths/SignUpVC.swift /Users/amir/Desktop/EasyChat/EasyChat/AppDelegate.swift /Users/amir/Desktop/EasyChat/EasyChat/Home/ConversationCell.swift /Users/amir/Desktop/EasyChat/EasyChat/Home/NavBar.swift /Users/amir/Downloads/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.apinotesc /Users/amir/Downloads/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/ObjectiveC.swiftmodule /Users/amir/Downloads/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreMedia.swiftmodule /Users/amir/Downloads/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/simd.swiftmodule /Users/amir/Downloads/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreImage.swiftmodule /Users/amir/Downloads/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/QuartzCore.swiftmodule /Users/amir/Downloads/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.swiftmodule /Users/amir/Downloads/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Metal.swiftmodule /Users/amir/Downloads/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Darwin.swiftmodule /Users/amir/Downloads/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Foundation.swiftmodule /Users/amir/Downloads/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/AVFoundation.swiftmodule /Users/amir/Downloads/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreFoundation.swiftmodule /Users/amir/Downloads/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreAudio.swiftmodule /Users/amir/Downloads/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreGraphics.swiftmodule /Users/amir/Downloads/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Swift.swiftmodule /Users/amir/Downloads/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/UIKit.swiftmodule /Users/amir/Downloads/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/SwiftOnoneSupport.swiftmodule /Users/amir/Desktop/EasyChat/build/Debug-iphonesimulator/FirebaseInstanceID/FirebaseInstanceID.framework/Headers/FIRInstanceID.h /Users/amir/Desktop/EasyChat/build/Debug-iphonesimulator/FirebaseInstanceID/FirebaseInstanceID.framework/Headers/FirebaseInstanceID.h /Users/amir/Desktop/EasyChat/build/Debug-iphonesimulator/FirebaseInstanceID/FirebaseInstanceID.framework/Headers/FirebaseInstanceID-umbrella.h /Users/amir/Desktop/EasyChat/build/Debug-iphonesimulator/FirebaseStorage/FirebaseStorage.framework/Headers/FirebaseStorage-umbrella.h /Users/amir/Desktop/EasyChat/build/Debug-iphonesimulator/FirebaseCore/FirebaseCore.framework/Headers/FirebaseCore-umbrella.h /Users/amir/Desktop/EasyChat/build/Debug-iphonesimulator/FirebaseDatabase/FirebaseDatabase.framework/Headers/FirebaseDatabase-umbrella.h /Users/amir/Desktop/EasyChat/build/Debug-iphonesimulator/FirebaseAuth/FirebaseAuth.framework/Headers/FirebaseAuth-umbrella.h /Users/amir/Desktop/EasyChat/build/Debug-iphonesimulator/FirebaseDatabase/FirebaseDatabase.framework/Headers/FIRMutableData.h /Users/amir/Desktop/EasyChat/build/Debug-iphonesimulator/FirebaseStorage/FirebaseStorage.framework/Headers/FIRStorageMetadata.h /Users/amir/Desktop/EasyChat/build/Debug-iphonesimulator/FirebaseAuth/FirebaseAuth.framework/Headers/FIRUserMetadata.h /Users/amir/Desktop/EasyChat/build/Debug-iphonesimulator/FirebaseStorage/FirebaseStorage.framework/Headers/FIRStorageReference.h /Users/amir/Desktop/EasyChat/build/Debug-iphonesimulator/FirebaseDatabase/FirebaseDatabase.framework/Headers/FIRDatabaseReference.h /Users/amir/Desktop/EasyChat/build/Debug-iphonesimulator/FirebaseStorage/FirebaseStorage.framework/Headers/FIRStorage.h /Users/amir/Desktop/EasyChat/build/Debug-iphonesimulator/FirebaseStorage/FirebaseStorage.framework/Headers/FirebaseStorage.h /Users/amir/Desktop/EasyChat/build/Debug-iphonesimulator/FirebaseAuth/FirebaseAuth.framework/Headers/FIRAuthAPNSTokenType.h /Users/amir/Desktop/EasyChat/build/Debug-iphonesimulator/FirebaseDatabase/FirebaseDatabase.framework/Headers/FIRDataEventType.h /Users/amir/Desktop/EasyChat/build/Debug-iphonesimulator/FirebaseCore/FirebaseCore.framework/Headers/FirebaseCore.h /Users/amir/Desktop/EasyChat/build/Debug-iphonesimulator/FirebaseDatabase/FirebaseDatabase.framework/Headers/FIRDatabase.h /Users/amir/Desktop/EasyChat/build/Debug-iphonesimulator/FirebaseDatabase/FirebaseDatabase.framework/Headers/FirebaseDatabase.h /Users/amir/Desktop/EasyChat/Pods/Firebase/CoreOnly/Sources/Firebase.h /Users/amir/Desktop/EasyChat/build/Debug-iphonesimulator/FirebaseAuth/FirebaseAuth.framework/Headers/FIRAuthUIDelegate.h /Users/amir/Desktop/EasyChat/Pods/FirebaseAnalytics/Frameworks/FirebaseAnalytics.framework/Headers/FIRAnalytics+AppDelegate.h /Users/amir/Desktop/EasyChat/build/Debug-iphonesimulator/FirebaseDatabase/FirebaseDatabase.framework/Headers/FIRServerValue.h /Users/amir/Desktop/EasyChat/build/Debug-iphonesimulator/FirebaseAuth/FirebaseAuth.framework/Headers/FIRAuth.h /Users/amir/Desktop/EasyChat/build/Debug-iphonesimulator/FirebaseAuth/FirebaseAuth.framework/Headers/FirebaseAuth.h /Users/amir/Desktop/EasyChat/build/Debug-iphonesimulator/FirebaseStorage/FirebaseStorage.framework/Headers/FIRStorageDownloadTask.h /Users/amir/Desktop/EasyChat/build/Debug-iphonesimulator/FirebaseStorage/FirebaseStorage.framework/Headers/FIRStorageUploadTask.h /Users/amir/Desktop/EasyChat/build/Debug-iphonesimulator/FirebaseStorage/FirebaseStorage.framework/Headers/FIRStorageTask.h /Users/amir/Desktop/EasyChat/build/Debug-iphonesimulator/FirebaseStorage/FirebaseStorage.framework/Headers/FIRStorageObservableTask.h /Users/amir/Desktop/EasyChat/build/Debug-iphonesimulator/FirebaseAuth/FirebaseAuth.framework/Headers/FIROAuthCredential.h /Users/amir/Desktop/EasyChat/build/Debug-iphonesimulator/FirebaseAuth/FirebaseAuth.framework/Headers/FIRAuthCredential.h /Users/amir/Desktop/EasyChat/build/Debug-iphonesimulator/FirebaseAuth/FirebaseAuth.framework/Headers/FIRPhoneAuthCredential.h /Users/amir/Desktop/EasyChat/build/Debug-iphonesimulator/FirebaseCore/FirebaseCore.framework/Headers/FIRLoggerLevel.h /Users/amir/Desktop/EasyChat/build/Debug-iphonesimulator/FirebaseAuth/FirebaseAuth.framework/Headers/FirebaseAuthVersion.h /Users/amir/Desktop/EasyChat/build/Debug-iphonesimulator/FirebaseCore/FirebaseCore.framework/Headers/FIRConfiguration.h /Users/amir/Desktop/EasyChat/build/Debug-iphonesimulator/FirebaseAuth/FirebaseAuth.framework/Headers/FIRUserInfo.h /Users/amir/Desktop/EasyChat/build/Debug-iphonesimulator/FirebaseAuth/FirebaseAuth.framework/Headers/FIRAdditionalUserInfo.h /Users/amir/Desktop/EasyChat/build/Debug-iphonesimulator/FirebaseCore/FirebaseCore.framework/Headers/FIRApp.h /Users/amir/Desktop/EasyChat/build/Debug-iphonesimulator/FirebaseAuth/FirebaseAuth.framework/Headers/FIROAuthProvider.h /Users/amir/Desktop/EasyChat/build/Debug-iphonesimulator/FirebaseAuth/FirebaseAuth.framework/Headers/FIRGitHubAuthProvider.h /Users/amir/Desktop/EasyChat/build/Debug-iphonesimulator/FirebaseAuth/FirebaseAuth.framework/Headers/FIRFederatedAuthProvider.h /Users/amir/Desktop/EasyChat/build/Debug-iphonesimulator/FirebaseAuth/FirebaseAuth.framework/Headers/FIRGoogleAuthProvider.h /Users/amir/Desktop/EasyChat/build/Debug-iphonesimulator/FirebaseAuth/FirebaseAuth.framework/Headers/FIRPhoneAuthProvider.h /Users/amir/Desktop/EasyChat/build/Debug-iphonesimulator/FirebaseAuth/FirebaseAuth.framework/Headers/FIRFacebookAuthProvider.h /Users/amir/Desktop/EasyChat/build/Debug-iphonesimulator/FirebaseAuth/FirebaseAuth.framework/Headers/FIREmailAuthProvider.h /Users/amir/Desktop/EasyChat/build/Debug-iphonesimulator/FirebaseAuth/FirebaseAuth.framework/Headers/FIRGameCenterAuthProvider.h /Users/amir/Desktop/EasyChat/build/Debug-iphonesimulator/FirebaseAuth/FirebaseAuth.framework/Headers/FIRTwitterAuthProvider.h /Users/amir/Desktop/EasyChat/build/Debug-iphonesimulator/FirebaseAuth/FirebaseAuth.framework/Headers/FIRUser.h /Users/amir/Desktop/EasyChat/Pods/FirebaseAnalytics/Frameworks/FirebaseAnalytics.framework/Headers/FIRAnalytics.h /Users/amir/Desktop/EasyChat/Pods/FirebaseAnalytics/Frameworks/FirebaseAnalytics.framework/Headers/FirebaseAnalytics.h /Users/amir/Desktop/EasyChat/Pods/FirebaseAnalytics/Frameworks/FirebaseAnalytics.framework/Headers/FIRParameterNames.h /Users/amir/Desktop/EasyChat/Pods/FirebaseAnalytics/Frameworks/FirebaseAnalytics.framework/Headers/FIREventNames.h /Users/amir/Desktop/EasyChat/Pods/FirebaseAnalytics/Frameworks/FirebaseAnalytics.framework/Headers/FIRUserPropertyNames.h /Users/amir/Desktop/EasyChat/build/Debug-iphonesimulator/FirebaseAuth/FirebaseAuth.framework/Headers/FIRActionCodeSettings.h /Users/amir/Desktop/EasyChat/build/Debug-iphonesimulator/FirebaseAuth/FirebaseAuth.framework/Headers/FIRAuthSettings.h /Users/amir/Desktop/EasyChat/build/Debug-iphonesimulator/FirebaseCore/FirebaseCore.framework/Headers/FIROptions.h /Users/amir/Desktop/EasyChat/build/Debug-iphonesimulator/FirebaseAuth/FirebaseAuth.framework/Headers/FIRAuthErrors.h /Users/amir/Desktop/EasyChat/build/Debug-iphonesimulator/FirebaseStorage/FirebaseStorage.framework/Headers/FIRStorageConstants.h /Users/amir/Desktop/EasyChat/build/Debug-iphonesimulator/FirebaseAuth/FirebaseAuth.framework/Headers/FIRAuthDataResult.h /Users/amir/Desktop/EasyChat/build/Debug-iphonesimulator/FirebaseAuth/FirebaseAuth.framework/Headers/FIRAuthTokenResult.h /Users/amir/Desktop/EasyChat/build/Debug-iphonesimulator/FirebaseDatabase/FirebaseDatabase.framework/Headers/FIRTransactionResult.h /Users/amir/Desktop/EasyChat/build/Debug-iphonesimulator/FirebaseStorage/FirebaseStorage.framework/Headers/FIRStorageListResult.h /Users/amir/Desktop/EasyChat/build/Debug-iphonesimulator/FirebaseDatabase/FirebaseDatabase.framework/Headers/FIRDataSnapshot.h /Users/amir/Desktop/EasyChat/build/Debug-iphonesimulator/FirebaseStorage/FirebaseStorage.framework/Headers/FIRStorageTaskSnapshot.h /Users/amir/Desktop/EasyChat/build/Debug-iphonesimulator/FirebaseDatabase/FirebaseDatabase.framework/Headers/FIRDatabaseQuery.h /Users/amir/Desktop/EasyChat/Pods/Firebase/CoreOnly/Sources/module.modulemap /Users/amir/Desktop/InstgramCopy/Pods/Firebase/CoreOnly/Sources/module.modulemap /Users/amir/Desktop/EasyChat/build/Debug-iphonesimulator/FirebaseInstanceID/FirebaseInstanceID.framework/Modules/module.modulemap /Users/amir/Desktop/EasyChat/build/Debug-iphonesimulator/FirebaseStorage/FirebaseStorage.framework/Modules/module.modulemap /Users/amir/Desktop/EasyChat/build/Debug-iphonesimulator/FirebaseCore/FirebaseCore.framework/Modules/module.modulemap /Users/amir/Desktop/EasyChat/build/Debug-iphonesimulator/FirebaseDatabase/FirebaseDatabase.framework/Modules/module.modulemap /Users/amir/Desktop/EasyChat/build/Debug-iphonesimulator/FirebaseAuth/FirebaseAuth.framework/Modules/module.modulemap /Users/amir/Desktop/EasyChat/Pods/FirebaseAnalytics/Frameworks/FirebaseAnalytics.framework/Modules/module.modulemap /Users/amir/Downloads/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/usr/include/objc/ObjectiveC.apinotes /Users/amir/Downloads/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/OpenGLES.framework/Headers/OpenGLES.apinotes /Users/amir/Downloads/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/CoreMedia.framework/Headers/CoreMedia.apinotes /Users/amir/Downloads/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImage.apinotes /Users/amir/Downloads/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/QuartzCore.apinotes /Users/amir/Downloads/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.apinotes /Users/amir/Downloads/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/usr/include/Darwin.apinotes /Users/amir/Downloads/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Users/amir/Downloads/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/AVFoundation.framework/Headers/AVFoundation.apinotes /Users/amir/Downloads/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Users/amir/Downloads/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.apinotes /Users/amir/Downloads/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Users/amir/Downloads/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/MediaToolbox.framework/Headers/MediaToolbox.apinotes /Users/amir/Downloads/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/AudioToolbox.framework/Headers/AudioToolbox.apinotes /Users/amir/Downloads/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/Security.framework/Headers/Security.apinotes
D
a carnival performer who does disgusting acts a person with an unusual or odd personality
D
module webkit2webextension.DOMEventTargetIF; private import glib.ErrorG; private import glib.GException; private import glib.Str; private import gobject.Closure; private import webkit2webextension.DOMEvent; private import webkit2webextension.c.functions; public import webkit2webextension.c.types; /** */ public interface DOMEventTargetIF{ /** Get the main Gtk struct */ public WebKitDOMEventTarget* getDOMEventTargetStruct(bool transferOwnership = false); /** the main Gtk struct as a void* */ protected void* getStruct(); /** */ public static GType getType() { return webkit_dom_event_target_get_type(); } /** * * * Deprecated: Use JavaScriptCore API instead * * Params: * eventName = A #gchar * handler = A #GCallback * useCapture = A #gboolean * userData = A #gpointer * * Returns: a #gboolean */ public bool addEventListener(string eventName, GCallback handler, bool useCapture, void* userData); /** * Version of webkit_dom_event_target_add_event_listener() using a closure * instead of a callbacks for easier binding in other languages. * * Deprecated: Use JavaScriptCore API instead * * Params: * eventName = A #gchar * handler = A #GClosure * useCapture = A #gboolean * * Returns: a #gboolean */ public bool addEventListenerWithClosure(string eventName, Closure handler, bool useCapture); /** * * * Deprecated: Use JavaScriptCore API instead * * Params: * event = A #WebKitDOMEvent * * Returns: a #gboolean * * Throws: GException on failure. */ public bool dispatchEvent(DOMEvent event); /** * * * Deprecated: Use JavaScriptCore API instead * * Params: * eventName = A #gchar * handler = A #GCallback * useCapture = A #gboolean * * Returns: a #gboolean */ public bool removeEventListener(string eventName, GCallback handler, bool useCapture); /** * Version of webkit_dom_event_target_remove_event_listener() using a closure * instead of a callbacks for easier binding in other languages. * * Deprecated: Use JavaScriptCore API instead * * Params: * eventName = A #gchar * handler = A #GClosure * useCapture = A #gboolean * * Returns: a #gboolean */ public bool removeEventListenerWithClosure(string eventName, Closure handler, bool useCapture); }
D
/** Mirror _bytesobject.h Note _bytesobject.h did not exist before python 2.6; however for python 2, it simply provides aliases to contents of stringobject.h, so we provide them anyways to make it easier to write portable extension modules. */ module deimos.python.bytesobject; import deimos.python.pyport; import deimos.python.object; import deimos.python.stringobject; import core.stdc.stdarg; version(Python_3_0_Or_Later) { /** * subclass of PyVarObject. * * Invariants: * ob_sval contains space for 'ob_size+1' elements. * ob_sval[ob_size] == 0. * ob_shash is the hash of the string or -1 if not computed yet. * */ extern(C): struct PyBytesObject{ mixin PyObject_VAR_HEAD; /// _ Py_hash_t ob_shash; char[1] _ob_sval; /// _ @property char* ob_sval()() { return _ob_sval.ptr; } } /// mixin(PyAPI_DATA!"PyTypeObject PyBytes_Type"); /// mixin(PyAPI_DATA!"PyTypeObject PyBytesIter_Type"); // D translation of C macro: /// int PyBytes_Check()(PyObject* op) { return PyType_FastSubclass(Py_TYPE(op), Py_TPFLAGS_BYTES_SUBCLASS); } /// int PyBytes_CheckExact()(PyObject* op) { return Py_TYPE(op) is &PyBytes_Type; } /// PyObject* PyBytes_FromStringAndSize(const(char)*, Py_ssize_t); /// PyObject* PyBytes_FromString(const(char)*); /// PyObject* PyBytes_FromObject(PyObject*); /// PyObject* PyBytes_FromFormatV(const(char)*, va_list); /// PyObject* PyBytes_FromFormat(const(char)*, ...); /// Py_ssize_t PyBytes_Size(PyObject*); /// const(char)* PyBytes_AsString(PyObject*); /// PyObject* PyBytes_Repr(PyObject*, int); /// void PyBytes_Concat(PyObject**, PyObject*); /// void PyBytes_ConcatAndDel(PyObject**, PyObject*); /// int _PyBytes_Resize(PyObject**, Py_ssize_t); /// PyObject* _PyBytes_FormatLong(PyObject*, int, int, int, char**, int*); /// PyObject* PyBytes_DecodeEscape(const(char)*, Py_ssize_t, const(char)*, Py_ssize_t, const(char)*); // D translation of C macro: /// const(char)* PyBytes_AS_STRING()(PyObject* op) { assert(PyBytes_Check(op)); return (cast(PyBytesObject*) op).ob_sval; } /// auto PyBytes_GET_SIZE()(PyObject* op) { assert(PyBytes_Check(op)); return Py_SIZE(op); } /// PyObject* _PyBytes_Join(PyObject* sep, PyObject* x); /** Params: obj = string or Unicode object s = pointer to buffer variable len = pointer to length variable or NULL (only possible for 0-terminated strings) */ int PyBytes_AsStringAndSize( PyObject* obj, char** s, Py_ssize_t* len ); /// Py_ssize_t _PyBytes_InsertThousandsGroupingLocale( char* buffer, Py_ssize_t n_buffer, char* digits, Py_ssize_t n_digits, Py_ssize_t min_width); /** Using explicit passed-in values, insert the thousands grouping into the string pointed to by buffer. For the argument descriptions, see Objects/stringlib/localeutil.h */ Py_ssize_t _PyBytes_InsertThousandsGrouping( char* buffer, Py_ssize_t n_buffer, char* digits, Py_ssize_t n_digits, Py_ssize_t min_width, const(char)* grouping, const char* thousands_sep); /// enum F_LJUST = (1<<0); /// enum F_SIGN = (1<<1); /// enum F_BLANK = (1<<2); /// enum F_ALT = (1<<3); /// enum F_ZERO = (1<<4); }else { /// alias PyStringObject PyBytesObject; /// alias PyString_Type PyBytes_Type; /// alias PyString_Check PyBytes_Check; /// alias PyString_CheckExact PyBytes_CheckExact; /// alias PyString_CHECK_INTERNED PyBytes_CHECK_INTERNED; /// alias PyString_AS_STRING PyBytes_AS_STRING; /// alias PyString_GET_SIZE PyBytes_GET_SIZE; version(Python_2_6_Or_Later) { /// Availability: >= 2.6 alias Py_TPFLAGS_STRING_SUBCLASS Py_TPFLAGS_BYTES_SUBCLASS; } /// alias PyString_FromStringAndSize PyBytes_FromStringAndSize; /// alias PyString_FromString PyBytes_FromString; /// alias PyString_FromFormatV PyBytes_FromFormatV; /// alias PyString_FromFormat PyBytes_FromFormat; /// alias PyString_Size PyBytes_Size; /// alias PyString_AsString PyBytes_AsString; /// alias PyString_Repr PyBytes_Repr; /// alias PyString_Concat PyBytes_Concat; /// alias PyString_ConcatAndDel PyBytes_ConcatAndDel; /// alias _PyString_Resize _PyBytes_Resize; /// alias _PyString_Eq _PyBytes_Eq; /// alias PyString_Format PyBytes_Format; /// alias _PyString_FormatLong _PyBytes_FormatLong; /// alias PyString_DecodeEscape PyBytes_DecodeEscape; /// alias _PyString_Join _PyBytes_Join; version(Python_2_7_Or_Later) { // went away in python 2.7 }else { /// Availability: <= 2.6 alias PyString_Decode PyBytes_Decode; /// Availability: <= 2.6 alias PyString_Encode PyBytes_Encode; /// Availability: <= 2.6 alias PyString_AsEncodedObject PyBytes_AsEncodedObject; /// Availability: <= 2.6 alias PyString_AsDecodedObject PyBytes_AsDecodedObject; /* alias PyString_AsEncodedString PyBytes_AsEncodedString; alias PyString_AsDecodedString PyBytes_AsDecodedString; */ } /// alias PyString_AsStringAndSize PyBytes_AsStringAndSize; version(Python_2_6_Or_Later) { /// Availability: >= 2.6 alias _PyString_InsertThousandsGrouping _PyBytes_InsertThousandsGrouping; } }
D
/++ Copyright (C) 2012 Nick Sabalausky <http://semitwist.com/contact> This program is free software. It comes without any warranty, to the extent permitted by applicable law. You can redistribute it and/or modify it under the terms of the Do What The Fuck You Want To Public License, Version 2, as published by Sam Hocevar. See http://www.wtfpl.net/ for more details. DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE Version 2, December 2004 Copyright (C) 2004 Sam Hocevar <sam@hocevar.net> Everyone is permitted to copy and distribute verbatim or modified copies of this license document, and changing it is allowed as long as the name is changed. DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. You just DO WHAT THE FUCK YOU WANT TO. +/ /++ Should work with DMD 2.059 and up For more info on this, see: http://semitwist.com/articles/article/view/combine-coroutines-and-input-ranges-for-dead-simple-d-iteration +/ import core.thread; class InputVisitor(Obj, Elem) : Fiber { bool started = false; Obj obj; this(Obj obj) { this.obj = obj; version(Windows) // Issue #1 { import core.sys.windows.windows : SYSTEM_INFO, GetSystemInfo; SYSTEM_INFO info; GetSystemInfo(&info); auto PAGESIZE = info.dwPageSize; super(&run, PAGESIZE * 16); } else super(&run); } this(Obj obj, size_t stackSize) { this.obj = obj; super(&run, stackSize); } private void run() { obj.visit(this); } private void ensureStarted() { if(!started) { call(); started = true; } } // Member 'front' must be a function due to DMD Issue #5403 private Elem _front = Elem.init; // Default initing here avoids "Error: field _front must be initialized in constructor" @property Elem front() { ensureStarted(); return _front; } void popFront() { ensureStarted(); call(); } @property bool empty() { ensureStarted(); return state == Fiber.State.TERM; } void yield(Elem elem) { _front = elem; Fiber.yield(); } } template inputVisitor(Elem) { @property InputVisitor!(Obj, Elem) inputVisitor(Obj)(Obj obj) { return new InputVisitor!(Obj, Elem)(obj); } @property InputVisitor!(Obj, Elem) inputVisitor(Obj)(Obj obj, size_t stackSize) { return new InputVisitor!(Obj, Elem)(obj, stackSize); } }
D
import std.stdio; import std.traits; class C { final void foo() {} void goo() { foo(); } } void main() { foreach(i, f; MemberFunctionsTuple!(C, "foo")) writeln(__traits(identifier, MemberFunctionsTuple!(C, "foo")[i])); foreach(i, f; MemberFunctionsTuple!(C, "goo")) writeln(__traits(identifier, MemberFunctionsTuple!(C, "goo")[i])); }
D
/Users/hannesvandenberghe/projectMovies/Build/Intermediates/ProjectFilms.build/Debug-iphonesimulator/ProjectFilms.build/Objects-normal/x86_64/MovieService.o : /Users/hannesvandenberghe/projectMovies/ProjectFilms/AppDelegate.swift /Users/hannesvandenberghe/projectMovies/ProjectFilms/SearchViewController.swift /Users/hannesvandenberghe/projectMovies/ProjectFilms/TopMoviesViewControllerTableViewController.swift /Users/hannesvandenberghe/projectMovies/ProjectFilms/Movie.swift /Users/hannesvandenberghe/projectMovies/ProjectFilms/MovieDetailsViewController.swift /Users/hannesvandenberghe/projectMovies/ProjectFilms/MovieService.swift /Users/hannesvandenberghe/projectMovies/ProjectFilms/CosmosDistrib.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/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/hannesvandenberghe/projectMovies/Build/Intermediates/ProjectFilms.build/Debug-iphonesimulator/ProjectFilms.build/Objects-normal/x86_64/MovieService~partial.swiftmodule : /Users/hannesvandenberghe/projectMovies/ProjectFilms/AppDelegate.swift /Users/hannesvandenberghe/projectMovies/ProjectFilms/SearchViewController.swift /Users/hannesvandenberghe/projectMovies/ProjectFilms/TopMoviesViewControllerTableViewController.swift /Users/hannesvandenberghe/projectMovies/ProjectFilms/Movie.swift /Users/hannesvandenberghe/projectMovies/ProjectFilms/MovieDetailsViewController.swift /Users/hannesvandenberghe/projectMovies/ProjectFilms/MovieService.swift /Users/hannesvandenberghe/projectMovies/ProjectFilms/CosmosDistrib.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/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/hannesvandenberghe/projectMovies/Build/Intermediates/ProjectFilms.build/Debug-iphonesimulator/ProjectFilms.build/Objects-normal/x86_64/MovieService~partial.swiftdoc : /Users/hannesvandenberghe/projectMovies/ProjectFilms/AppDelegate.swift /Users/hannesvandenberghe/projectMovies/ProjectFilms/SearchViewController.swift /Users/hannesvandenberghe/projectMovies/ProjectFilms/TopMoviesViewControllerTableViewController.swift /Users/hannesvandenberghe/projectMovies/ProjectFilms/Movie.swift /Users/hannesvandenberghe/projectMovies/ProjectFilms/MovieDetailsViewController.swift /Users/hannesvandenberghe/projectMovies/ProjectFilms/MovieService.swift /Users/hannesvandenberghe/projectMovies/ProjectFilms/CosmosDistrib.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/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
module xf.net.Log; private { import xf.utils.Log; import xf.utils.Error; } mixin(createLoggerMixin("netLog")); mixin(createErrorMixin("NetException", "netError"));
D
/* Copyright © 2020, Luna Nielsen Distributed under the 2-Clause BSD License, see LICENSE file. Authors: Luna Nielsen */ module engine.core.state; /** Manager of game states */ class GameStateManager { private static: GameState[] states; public static: /** Update the current game state */ void update() { if (states.length == 0) return; states[$-1].update(); } /** Draw the current game state Offset sets the offset from the top of the stack to draw */ void draw(size_t offset = 1) { if (states.length == 0) return; // Handle drawing passthrough, this allows us to draw game boards with game over screen overlayed. if (states[$-offset].drawPassthrough && states.length > offset) { states[$-offset].draw(); } // Draw the current state states[$-offset].draw(); } /** Push a game state on to the stack */ void push(GameState state) { states ~= state; states[$-1].onActivate(); } /** Pop a game state from the stack */ void pop() { if (canPop) { states[$-1].onDeactivate(); states.length--; } } /** Gets whether an element can be popped from the game state stack */ bool canPop() { return states.length > 0; } /** Pop a game state from the stack */ void popAll() { while (canPop) pop(); } } /** A game state */ abstract class GameState { public: /** Wether drawing should pass-through to the previous game state (if any) This allows overlaying a gamr state over an other */ bool drawPassthrough; /** Update the game state */ abstract void update(); /** Draw the game state */ abstract void draw(); /** When a state is pushed */ void onActivate() { } /** Called when a state is popped */ void onDeactivate() { } }
D
/Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/NIO.build/SocketChannel.swift.o : /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/IO.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/NonBlockingFileIO.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/IOData.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/Codec.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/Thread.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/Embedded.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/Selectable.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/FileHandle.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/ChannelPipeline.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/AddressedEnvelope.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/ByteBuffer-core.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/EventLoopFuture.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/PriorityQueue.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/Channel.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/DeadChannel.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/SocketChannel.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/BaseSocketChannel.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/MulticastChannel.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/BlockingIOThreadPool.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/System.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/FileRegion.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/ContiguousCollection.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/ChannelOption.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/Heap.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/Bootstrap.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/EventLoop.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/SocketOptionProvider.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/CircularBuffer.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/MarkedCircularBuffer.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/PendingWritesManager.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/PendingDatagramWritesManager.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/ChannelInvoker.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/ChannelHandler.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/TypeAssistedChannelHandler.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/Resolver.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/GetaddrinfoResolver.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/CompositeError.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/RecvByteBufferAllocator.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/Selector.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/FileDescriptor.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/Interfaces.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/Utilities.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/IntegerTypes.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/SocketAddresses.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/HappyEyeballs.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/ChannelHandlers.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/ByteBuffer-views.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/LinuxCPUSet.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/Socket.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/BaseSocket.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/ServerSocket.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/ByteBuffer-int.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/ByteBuffer-aux.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/Linux.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/NIOAny.swift /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/Swift.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/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 /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/CNIODarwin/include/CNIODarwin.h /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/CNIOAtomics/include/CNIOAtomics.h /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/CNIOLinux/include/CNIOLinux.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/swift-nio-zlib-support/module.modulemap /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 /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/NIO.build/SocketChannel~partial.swiftmodule : /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/IO.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/NonBlockingFileIO.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/IOData.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/Codec.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/Thread.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/Embedded.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/Selectable.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/FileHandle.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/ChannelPipeline.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/AddressedEnvelope.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/ByteBuffer-core.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/EventLoopFuture.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/PriorityQueue.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/Channel.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/DeadChannel.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/SocketChannel.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/BaseSocketChannel.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/MulticastChannel.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/BlockingIOThreadPool.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/System.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/FileRegion.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/ContiguousCollection.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/ChannelOption.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/Heap.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/Bootstrap.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/EventLoop.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/SocketOptionProvider.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/CircularBuffer.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/MarkedCircularBuffer.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/PendingWritesManager.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/PendingDatagramWritesManager.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/ChannelInvoker.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/ChannelHandler.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/TypeAssistedChannelHandler.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/Resolver.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/GetaddrinfoResolver.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/CompositeError.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/RecvByteBufferAllocator.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/Selector.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/FileDescriptor.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/Interfaces.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/Utilities.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/IntegerTypes.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/SocketAddresses.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/HappyEyeballs.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/ChannelHandlers.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/ByteBuffer-views.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/LinuxCPUSet.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/Socket.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/BaseSocket.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/ServerSocket.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/ByteBuffer-int.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/ByteBuffer-aux.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/Linux.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/NIOAny.swift /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/Swift.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/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 /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/CNIODarwin/include/CNIODarwin.h /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/CNIOAtomics/include/CNIOAtomics.h /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/CNIOLinux/include/CNIOLinux.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/swift-nio-zlib-support/module.modulemap /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 /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/NIO.build/SocketChannel~partial.swiftdoc : /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/IO.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/NonBlockingFileIO.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/IOData.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/Codec.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/Thread.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/Embedded.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/Selectable.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/FileHandle.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/ChannelPipeline.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/AddressedEnvelope.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/ByteBuffer-core.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/EventLoopFuture.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/PriorityQueue.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/Channel.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/DeadChannel.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/SocketChannel.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/BaseSocketChannel.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/MulticastChannel.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/BlockingIOThreadPool.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/System.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/FileRegion.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/ContiguousCollection.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/ChannelOption.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/Heap.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/Bootstrap.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/EventLoop.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/SocketOptionProvider.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/CircularBuffer.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/MarkedCircularBuffer.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/PendingWritesManager.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/PendingDatagramWritesManager.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/ChannelInvoker.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/ChannelHandler.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/TypeAssistedChannelHandler.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/Resolver.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/GetaddrinfoResolver.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/CompositeError.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/RecvByteBufferAllocator.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/Selector.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/FileDescriptor.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/Interfaces.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/Utilities.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/IntegerTypes.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/SocketAddresses.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/HappyEyeballs.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/ChannelHandlers.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/ByteBuffer-views.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/LinuxCPUSet.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/Socket.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/BaseSocket.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/ServerSocket.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/ByteBuffer-int.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/ByteBuffer-aux.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/Linux.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/NIOAny.swift /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/Swift.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/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 /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/CNIODarwin/include/CNIODarwin.h /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/CNIOAtomics/include/CNIOAtomics.h /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/CNIOLinux/include/CNIOLinux.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/swift-nio-zlib-support/module.modulemap /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 /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/x86_64-apple-macosx/debug/NIO.build/SocketChannel~partial.swiftsourceinfo : /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/IO.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/NonBlockingFileIO.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/IOData.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/Codec.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/Thread.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/Embedded.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/Selectable.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/FileHandle.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/ChannelPipeline.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/AddressedEnvelope.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/ByteBuffer-core.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/EventLoopFuture.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/PriorityQueue.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/Channel.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/DeadChannel.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/SocketChannel.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/BaseSocketChannel.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/MulticastChannel.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/BlockingIOThreadPool.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/System.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/FileRegion.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/ContiguousCollection.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/ChannelOption.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/Heap.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/Bootstrap.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/EventLoop.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/SocketOptionProvider.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/CircularBuffer.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/MarkedCircularBuffer.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/PendingWritesManager.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/PendingDatagramWritesManager.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/ChannelInvoker.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/ChannelHandler.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/TypeAssistedChannelHandler.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/Resolver.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/GetaddrinfoResolver.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/CompositeError.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/RecvByteBufferAllocator.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/Selector.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/FileDescriptor.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/Interfaces.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/Utilities.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/IntegerTypes.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/SocketAddresses.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/HappyEyeballs.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/ChannelHandlers.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/ByteBuffer-views.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/LinuxCPUSet.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/Socket.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/BaseSocket.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/ServerSocket.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/ByteBuffer-int.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/ByteBuffer-aux.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/Linux.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/NIO/NIOAny.swift /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/Swift.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/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 /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/CNIODarwin/include/CNIODarwin.h /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/CNIOAtomics/include/CNIOAtomics.h /Users/panartem/Developer/Study/Microservices-vapor/TILAppUsers/.build/checkouts/swift-nio/Sources/CNIOLinux/include/CNIOLinux.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/swift-nio-zlib-support/module.modulemap /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
D
module s3; import std.array; import std.datetime : SysTime; import std.net.curl; import aws; class S3 { const AWS aws; this(const AWS a) { aws = a; } } string urlEncode(string url, bool all = false) { static string encode(char c) { enum h = "0123456789ABCDEF"; return "%" ~ h[c / 16] ~ h[c % 16]; } string result; if (all) { foreach(c; url) result ~= encode(c); } else { foreach(c; url) { if ( (c >= 'A' && c <= 'Z') || (c >= 'a' && c <= 'z') || (c >= '0' && c <= '9') || c == '-' || c == '_' || c == '.' || c == '~') { result ~= c; } else { result ~= encode(c); } } } return result; } string canonicalizedAmzHeaders(string[string] headers) { import std.string : toLower, startsWith, strip; string[string] interesting_headers; foreach(key, value; headers) { string lk = key.toLower(); if (lk.startsWith("x-amz-")) interesting_headers[lk] = value.strip(); } string result; foreach(key; interesting_headers.keys.sort) result ~= key ~ ":" ~ headers[key] ~ "\n"; return result; } string canonicalizedResource(string[string] queryArgs, string bucket, string key) { string result; if (bucket.length) result ~= "/" ~ bucket; result ~= "/" ~ key; foreach (h; ["acl", "torrent", "location", "logging"]) { if (h in queryArgs) { result ~= "?" ~ h; break; } } return result; } string canonicalizedQueryString( string method, string bucket, string key, string[string] queryArgs, string[string] headers, string expires) { string* tmp; tmp = ("content-type" in headers); string type = (tmp ? *tmp : ""); tmp = ("content-md5" in headers); string md5 = (tmp ? *tmp : ""); return method ~ "\n" ~ // VERB type ~ "\n" ~ // CONTENT-TYPE md5 ~ "\n" ~ // CONTENT-MD5 expires ~ "\n" ~ // time since epoch canonicalizedAmzHeaders(headers) ~ // always ends in an \n, so don't add another canonicalizedResource(queryArgs, bucket, key); } string concatQueryArgs(string[string] queryArgs) { string result; foreach(k, v; queryArgs) { if (v.length) result ~= k ~ "=" ~ v; else result ~= k; result ~= "&"; } return result; } ubyte[] makeRequest( const AWS a, string method, const S3Bucket bucket, string key, string[string] queryArgs, string[string] headers) { HTTP client; return makeRequest(a, method, bucket, key, queryArgs, headers, client); } ubyte[] makeRequest( const AWS a, string method, const S3Bucket bucket, string key, string[string] queryArgs, string[string] headers, ref HTTP client) { import std.base64; import std.conv; import std.datetime; import std.stdio; auto expires = to!string(Clock.currTime(UTC()).toUnixTime() + 600); auto toSign = canonicalizedQueryString(method, bucket.name, key, queryArgs, headers, expires); auto signed = calculateHmacSHA1(a.secretKey, toSign); auto b64enc = to!string(Base64.encode(to!(ubyte[])(signed))); auto urlenc = urlEncode(b64enc); string queryStr = concatQueryArgs(queryArgs) ~ "AWSAccessKeyId=" ~ a.accessKey ~ "&Expires=" ~ expires ~ "&Signature=" ~ urlenc; string url = "http://" ~ a.endpoint ~ "/"; if (bucket.name.length) url ~= bucket.name ~ "/"; if (key.length) url ~= key; url ~= "?" ~ queryStr; //writeln("url: ", url); ubyte[] results; client = HTTP(); foreach (k, v; headers) client.addRequestHeader(wrap_curl_escape(k), wrap_curl_escape(v)); try { switch (method) { case "GET": results = get!(HTTP, ubyte)(url, client); break; case "DELETE": del!HTTP(url, client); break; default: assert(false, "need to deal with other method types"); } } catch(Exception e) { // TODO: do better! writefln("exception caught: %s", e); } return results; } class S3ListResults { const S3Bucket bucket; string name; string prefix; string delimiter; string maxkeys; string marker; bool isTruncated; string nextMarker; S3Object[] contents; string[] commonPrefixes; this(const S3Bucket b) { bucket = b; } void followNextMarker() { string[string] queryArgs; if (maxkeys.length) queryArgs["max-keys"] = maxkeys; if (prefix.length) queryArgs["prefix"] = prefix; if (delimiter.length) queryArgs["delimiter"] = delimiter; if (nextMarker.length) queryArgs["marker"] = nextMarker; else if (contents.length) queryArgs["marker"] = contents[$-1].key; import std.file; auto results = cast(string)makeRequest(bucket.s3.aws, "GET", bucket, "", queryArgs, null).idup; write("/tmp/debug.xml", results); // clear out previous state nextMarker = null; contents = null; commonPrefixes = null; isTruncated = false; parse(results); } // <ListBucketResult xmlns="http://s3.amazonaws.com/doc/2006-03-01/"> // <Name>puremagic-logs</Name> // <Prefix></Prefix> // <Marker></Marker> // <MaxKeys>1000</MaxKeys> // <Delimiter>/</Delimiter> // <IsTruncated>false</IsTruncated> // <Contents> // <Key>amanda/2012-12-15-21-21-30-C0AD6E37B4C2002B</Key> // <LastModified>2012-12-15T21:21:31.000Z</LastModified> // <ETag>&quot;faea710e9c02ace414a1fbaf5ae4a80e&quot;</ETag> // <Size>194684</Size> // <Owner> // <ID>3272ee65a908a7677109fedda345db8d9554ba26398b2ca10581de88777e2b61</ID> // <DisplayName>s3-log-service</DisplayName> // </Owner> // <StorageClass>STANDARD</StorageClass> // </Contents> // </ListBucketResult> void parse(string input) { import std.conv; import std.stdio; import std.xml; auto xml = new DocumentParser(input); xml.onEndTag["Name"] = (in Element e) { name = e.text(); }; xml.onEndTag["Prefix"] = (in Element e) { prefix = e.text(); }; xml.onEndTag["Delimiter"] = (in Element e) { delimiter = e.text(); }; xml.onEndTag["Marker"] = (in Element e) { marker = e.text(); }; xml.onEndTag["NextMarker"] = (in Element e) { nextMarker = e.text(); }; xml.onEndTag["MaxKeys"] = (in Element e) { maxkeys = e.text(); }; xml.onEndTag["IsTruncated"] = (in Element e) { auto trunc = e.text(); isTruncated = (trunc && trunc == "true"); }; xml.onStartTag["Contents"] = (ElementParser xml) { auto obj = new S3Object(bucket); xml.onEndTag["Key"] = (in Element e) { obj.key = e.text(); }; xml.onEndTag["LastModified"] = (in Element e) { obj.lastModified = SysTime.fromISOExtString(e.text()); }; xml.onEndTag["ETag"] = (in Element e) { obj.etag = e.text(); }; xml.onEndTag["Size"] = (in Element e) { obj.size = to!long(e.text()); }; xml.parse(); contents ~= obj; }; xml.onStartTag["CommonPrefixes"] = (ElementParser xml) { string prefix; xml.onEndTag["Prefix"] = (in Element e) { prefix = e.text(); }; xml.parse(); commonPrefixes ~= prefix; }; xml.parse(); } } struct S3ListResultsContentsRange { S3ListResults results; S3Object[] contents; this(S3ListResults r) { results = r; contents = r.contents; } S3Object front() { return contents.front; } bool empty() { return contents.empty; } void popFront() { contents.popFront; if (contents.empty && results.isTruncated) { results.followNextMarker; contents = results.contents; } } } class S3Object { const S3Bucket bucket; string key; SysTime lastModified; string etag; long size = -1; bool loaded = false; ubyte[] data = []; this(const S3Bucket b) { bucket = b; } ubyte[] get() { if (!loaded) { import std.conv; HTTP client; data = makeRequest(bucket.s3.aws, "GET", bucket, key, null, null, client); if (auto hdr = "content-length" in client.responseHeaders) size = to!long(*hdr); if (auto hdr = "etag" in client.responseHeaders) etag = *hdr; loaded = true; } return data; } void del() { import std.conv; HTTP client; ubyte[] results = makeRequest(bucket.s3.aws, "DELETE", bucket, key, null, null, client); assert(client.statusLine.code >= 200 && client.statusLine.code <= 299, text("delete status: ", client.statusLine)); } } S3ListResultsContentsRange listBucketContents(const S3Bucket bucket, string prefix = null, string delimiter = null) { auto results = new S3ListResults(bucket); results.prefix = prefix; results.delimiter = delimiter; results.maxkeys = "100"; results.followNextMarker; return S3ListResultsContentsRange(results); } class S3Bucket { const S3 s3; string name; SysTime creationDate; this (const S3 s) { s3 = s; } } S3Bucket[] listBuckets(const S3 s) { import std.xml; auto contents = cast(string)makeRequest(s.aws, "GET", null, "", null, null).idup; S3Bucket[] buckets; auto xml = new DocumentParser(contents); xml.onStartTag["Buckets"] = (ElementParser xml) { xml.onStartTag["Bucket"] = (ElementParser xml) { auto bucket = new S3Bucket(s); xml.onEndTag["Name"] = (in Element e) { bucket.name = e.text(); }; xml.onEndTag["CreationDate"] = (in Element e) { bucket.creationDate = SysTime.fromISOExtString(e.text()); }; xml.parse(); buckets ~= bucket; }; xml.parse(); }; xml.parse(); return buckets; }
D
/** * Base floating point routines. * * Macros: * TABLE_SV = <table border="1" cellpadding="4" cellspacing="0"> * <caption>Special Values</caption> * $0</table> * SVH = $(TR $(TH $1) $(TH $2)) * SV = $(TR $(TD $1) $(TD $2)) * TH3 = $(TR $(TH $1) $(TH $2) $(TH $3)) * TD3 = $(TR $(TD $1) $(TD $2) $(TD $3)) * TABLE_DOMRG = <table border="1" cellpadding="4" cellspacing="0"> * $(SVH Domain X, Range Y) $(SV $1, $2) * </table> * DOMAIN=$1 * RANGE=$1 * NAN = $(RED NAN) * SUP = <span style="vertical-align:super;font-size:smaller">$0</span> * GAMMA = &#915; * THETA = &theta; * INTEGRAL = &#8747; * INTEGRATE = $(BIG &#8747;<sub>$(SMALL $1)</sub><sup>$2</sup>) * POWER = $1<sup>$2</sup> * SUB = $1<sub>$2</sub> * BIGSUM = $(BIG &Sigma; <sup>$2</sup><sub>$(SMALL $1)</sub>) * CHOOSE = $(BIG &#40;) <sup>$(SMALL $1)</sup><sub>$(SMALL $2)</sub> $(BIG &#41;) * PLUSMN = &plusmn; * INFIN = &infin; * PLUSMNINF = &plusmn;&infin; * PI = &pi; * LT = &lt; * GT = &gt; * SQRT = &radic; * HALF = &frac12; * * License: $(HTTP www.apache.org/licenses/LICENSE-2.0, Apache-2.0) * Authors: $(HTTP digitalmars.com, Walter Bright), Don Clugston, Ilia Ki */ module mir.math.ieee; import mir.internal.utility: isFloatingPoint; /********************************* * Return `true` if sign bit of e is set, `false` if not. */ bool signbit(T)(const T x) @nogc @trusted pure nothrow { if (__ctfe) { double dval = cast(double) x; // Precision can increase or decrease but sign won't change (even NaN). return 0 > *cast(long*) &dval; } mixin floatTraits!T; static if (realFormat == RealFormat.ieeeSingle) { return 0 > *cast(int*) &x; } else static if (realFormat == RealFormat.ieeeDouble) { return 0 > *cast(long*) &x; } else static if (realFormat == RealFormat.ieeeQuadruple) { return 0 > ((cast(long*)&x)[MANTISSA_MSB]); } else static if (realFormat == RealFormat.ieeeExtended) { version (LittleEndian) auto mp = cast(ubyte*)&x + 9; else auto mp = cast(ubyte*)&x; return (*mp & 0x80) != 0; } else static assert(0, "signbit is not implemented."); } /// @nogc @safe pure nothrow version(mir_core_test) unittest { assert(!signbit(float.nan)); assert(signbit(-float.nan)); assert(!signbit(168.1234f)); assert(signbit(-168.1234f)); assert(!signbit(0.0f)); assert(signbit(-0.0f)); assert(signbit(-float.max)); assert(!signbit(float.max)); assert(!signbit(double.nan)); assert(signbit(-double.nan)); assert(!signbit(168.1234)); assert(signbit(-168.1234)); assert(!signbit(0.0)); assert(signbit(-0.0)); assert(signbit(-double.max)); assert(!signbit(double.max)); assert(!signbit(real.nan)); assert(signbit(-real.nan)); assert(!signbit(168.1234L)); assert(signbit(-168.1234L)); assert(!signbit(0.0L)); assert(signbit(-0.0L)); assert(signbit(-real.max)); assert(!signbit(real.max)); } /************************************** * To what precision is x equal to y? * * Returns: the number of mantissa bits which are equal in x and y. * eg, 0x1.F8p+60 and 0x1.F1p+60 are equal to 5 bits of precision. * * $(TABLE_SV * $(TR $(TH x) $(TH y) $(TH feqrel(x, y))) * $(TR $(TD x) $(TD x) $(TD real.mant_dig)) * $(TR $(TD x) $(TD $(GT)= 2*x) $(TD 0)) * $(TR $(TD x) $(TD $(LT)= x/2) $(TD 0)) * $(TR $(TD $(NAN)) $(TD any) $(TD 0)) * $(TR $(TD any) $(TD $(NAN)) $(TD 0)) * ) */ int feqrel(T)(const T x, const T y) @trusted pure nothrow @nogc if (isFloatingPoint!T) { /* Public Domain. Author: Don Clugston, 18 Aug 2005. */ mixin floatTraits!T; static if (realFormat == RealFormat.ieeeSingle || realFormat == RealFormat.ieeeDouble || realFormat == RealFormat.ieeeExtended || realFormat == RealFormat.ieeeQuadruple) { import mir.math.common: fabs; if (x == y) return T.mant_dig; // ensure diff != 0, cope with IN auto diff = fabs(x - y); int a = ((cast(U*)& x)[idx] & exp_mask) >>> exp_shft; int b = ((cast(U*)& y)[idx] & exp_mask) >>> exp_shft; int d = ((cast(U*)&diff)[idx] & exp_mask) >>> exp_shft; // The difference in abs(exponent) between x or y and abs(x-y) // is equal to the number of significand bits of x which are // equal to y. If negative, x and y have different exponents. // If positive, x and y are equal to 'bitsdiff' bits. // AND with 0x7FFF to form the absolute value. // To avoid out-by-1 errors, we subtract 1 so it rounds down // if the exponents were different. This means 'bitsdiff' is // always 1 lower than we want, except that if bitsdiff == 0, // they could have 0 or 1 bits in common. int bitsdiff = ((a + b - 1) >> 1) - d; if (d == 0) { // Difference is subnormal // For subnormals, we need to add the number of zeros that // lie at the start of diff's significand. // We do this by multiplying by 2^^real.mant_dig diff *= norm_factor; return bitsdiff + T.mant_dig - int(((cast(U*)&diff)[idx] & exp_mask) >>> exp_shft); } if (bitsdiff > 0) return bitsdiff + 1; // add the 1 we subtracted before // Avoid out-by-1 errors when factor is almost 2. if (bitsdiff == 0 && (a ^ b) == 0) return 1; else return 0; } else { static assert(false, "Not implemented for this architecture"); } } /// @safe pure version(mir_core_test) unittest { assert(feqrel(2.0, 2.0) == 53); assert(feqrel(2.0f, 2.0f) == 24); assert(feqrel(2.0, double.nan) == 0); // Test that numbers are within n digits of each // other by testing if feqrel > n * log2(10) // five digits assert(feqrel(2.0, 2.00001) > 16); // ten digits assert(feqrel(2.0, 2.00000000001) > 33); } @safe pure nothrow @nogc version(mir_core_test) unittest { void testFeqrel(F)() { // Exact equality assert(feqrel(F.max, F.max) == F.mant_dig); assert(feqrel!(F)(0.0, 0.0) == F.mant_dig); assert(feqrel(F.infinity, F.infinity) == F.mant_dig); // a few bits away from exact equality F w=1; for (int i = 1; i < F.mant_dig - 1; ++i) { assert(feqrel!(F)(1.0 + w * F.epsilon, 1.0) == F.mant_dig-i); assert(feqrel!(F)(1.0 - w * F.epsilon, 1.0) == F.mant_dig-i); assert(feqrel!(F)(1.0, 1 + (w-1) * F.epsilon) == F.mant_dig - i + 1); w*=2; } assert(feqrel!(F)(1.5+F.epsilon, 1.5) == F.mant_dig-1); assert(feqrel!(F)(1.5-F.epsilon, 1.5) == F.mant_dig-1); assert(feqrel!(F)(1.5-F.epsilon, 1.5+F.epsilon) == F.mant_dig-2); // Numbers that are close assert(feqrel!(F)(0x1.Bp+84, 0x1.B8p+84) == 5); assert(feqrel!(F)(0x1.8p+10, 0x1.Cp+10) == 2); assert(feqrel!(F)(1.5 * (1 - F.epsilon), 1.0L) == 2); assert(feqrel!(F)(1.5, 1.0) == 1); assert(feqrel!(F)(2 * (1 - F.epsilon), 1.0L) == 1); // Factors of 2 assert(feqrel(F.max, F.infinity) == 0); assert(feqrel!(F)(2 * (1 - F.epsilon), 1.0L) == 1); assert(feqrel!(F)(1.0, 2.0) == 0); assert(feqrel!(F)(4.0, 1.0) == 0); // Extreme inequality assert(feqrel(F.nan, F.nan) == 0); assert(feqrel!(F)(0.0L, -F.nan) == 0); assert(feqrel(F.nan, F.infinity) == 0); assert(feqrel(F.infinity, -F.infinity) == 0); assert(feqrel(F.max, -F.max) == 0); assert(feqrel(F.min_normal / 8, F.min_normal / 17) == 3); const F Const = 2; immutable F Immutable = 2; auto Compiles = feqrel(Const, Immutable); } assert(feqrel(7.1824L, 7.1824L) == real.mant_dig); testFeqrel!(float)(); testFeqrel!(double)(); testFeqrel!(real)(); } /++ +/ enum RealFormat { /// ieeeHalf, /// ieeeSingle, /// ieeeDouble, /// x87 80-bit real ieeeExtended, /// x87 real rounded to precision of double. ieeeExtended53, /// IBM 128-bit extended ibmExtended, /// ieeeQuadruple, } /** * Calculate the next largest floating point value after x. * * Return the least number greater than x that is representable as a real; * thus, it gives the next point on the IEEE number line. * * $(TABLE_SV * $(SVH x, nextUp(x) ) * $(SV -$(INFIN), -real.max ) * $(SV $(PLUSMN)0.0, real.min_normal*real.epsilon ) * $(SV real.max, $(INFIN) ) * $(SV $(INFIN), $(INFIN) ) * $(SV $(NAN), $(NAN) ) * ) */ T nextUp(T)(const T x) @trusted pure nothrow @nogc if (isFloatingPoint!T) { mixin floatTraits!T; static if (realFormat == RealFormat.ieeeSingle) { uint s = *cast(uint*)&x; if ((s & 0x7F80_0000) == 0x7F80_0000) { // First, deal with NANs and infinity if (x == -x.infinity) return -x.max; return x; // +INF and NAN are unchanged. } if (s > 0x8000_0000) // Negative number { --s; } else if (s == 0x8000_0000) // it was negative zero { s = 0x0000_0001; // change to smallest subnormal } else { // Positive number ++s; } R: return *cast(T*)&s; } else static if (realFormat == RealFormat.ieeeDouble) { ulong s = *cast(ulong*)&x; if ((s & 0x7FF0_0000_0000_0000) == 0x7FF0_0000_0000_0000) { // First, deal with NANs and infinity if (x == -x.infinity) return -x.max; return x; // +INF and NAN are unchanged. } if (s > 0x8000_0000_0000_0000) // Negative number { --s; } else if (s == 0x8000_0000_0000_0000) // it was negative zero { s = 0x0000_0000_0000_0001; // change to smallest subnormal } else { // Positive number ++s; } R: return *cast(T*)&s; } else static if (realFormat == RealFormat.ieeeQuadruple) { auto e = exp_mask & (cast(U *)&x)[idx]; if (e == exp_mask) { // NaN or Infinity if (x == -real.infinity) return -real.max; return x; // +Inf and NaN are unchanged. } auto ps = cast(ulong *)&x; if (ps[MANTISSA_MSB] & 0x8000_0000_0000_0000) { // Negative number if (ps[MANTISSA_LSB] == 0 && ps[MANTISSA_MSB] == 0x8000_0000_0000_0000) { // it was negative zero, change to smallest subnormal ps[MANTISSA_LSB] = 1; ps[MANTISSA_MSB] = 0; return x; } if (ps[MANTISSA_LSB] == 0) --ps[MANTISSA_MSB]; --ps[MANTISSA_LSB]; } else { // Positive number ++ps[MANTISSA_LSB]; if (ps[MANTISSA_LSB] == 0) ++ps[MANTISSA_MSB]; } return x; } else static if (realFormat == RealFormat.ieeeExtended) { // For 80-bit reals, the "implied bit" is a nuisance... auto pe = cast(U*)&x + idx; version (LittleEndian) auto ps = cast(ulong*)&x; else auto ps = cast(ulong*)((cast(ushort*)&x) + 1); if ((*pe & exp_mask) == exp_mask) { // First, deal with NANs and infinity if (x == -real.infinity) return -real.max; return x; // +Inf and NaN are unchanged. } if (*pe & 0x8000) { // Negative number -- need to decrease the significand --*ps; // Need to mask with 0x7FF.. so subnormals are treated correctly. if ((*ps & 0x7FFF_FFFF_FFFF_FFFF) == 0x7FFF_FFFF_FFFF_FFFF) { if (*pe == 0x8000) // it was negative zero { *ps = 1; *pe = 0; // smallest subnormal. return x; } --*pe; if (*pe == 0x8000) return x; // it's become a subnormal, implied bit stays low. *ps = 0xFFFF_FFFF_FFFF_FFFF; // set the implied bit return x; } return x; } else { // Positive number -- need to increase the significand. // Works automatically for positive zero. ++*ps; if ((*ps & 0x7FFF_FFFF_FFFF_FFFF) == 0) { // change in exponent ++*pe; *ps = 0x8000_0000_0000_0000; // set the high bit } } return x; } else // static if (realFormat == RealFormat.ibmExtended) { assert(0, "nextUp not implemented"); } } /// @safe @nogc pure nothrow version(mir_core_test) unittest { assert(nextUp(1.0 - 1.0e-6).feqrel(0.999999) > 16); assert(nextUp(1.0 - real.epsilon).feqrel(1.0) > 16); } /** * Calculate the next smallest floating point value before x. * * Return the greatest number less than x that is representable as a real; * thus, it gives the previous point on the IEEE number line. * * $(TABLE_SV * $(SVH x, nextDown(x) ) * $(SV $(INFIN), real.max ) * $(SV $(PLUSMN)0.0, -real.min_normal*real.epsilon ) * $(SV -real.max, -$(INFIN) ) * $(SV -$(INFIN), -$(INFIN) ) * $(SV $(NAN), $(NAN) ) * ) */ T nextDown(T)(const T x) @safe pure nothrow @nogc { return -nextUp(-x); } /// @safe pure nothrow @nogc version(mir_core_test) unittest { assert( nextDown(1.0 + real.epsilon) == 1.0); } @safe pure nothrow @nogc version(mir_core_test) unittest { import std.math: NaN, isIdentical; static if (floatTraits!(real).realFormat == RealFormat.ieeeExtended) { // Tests for 80-bit reals assert(isIdentical(nextUp(NaN(0xABC)), NaN(0xABC))); // negative numbers assert( nextUp(-real.infinity) == -real.max ); assert( nextUp(-1.0L-real.epsilon) == -1.0 ); assert( nextUp(-2.0L) == -2.0 + real.epsilon); // subnormals and zero assert( nextUp(-real.min_normal) == -real.min_normal*(1-real.epsilon) ); assert( nextUp(-real.min_normal*(1-real.epsilon)) == -real.min_normal*(1-2*real.epsilon) ); assert( isIdentical(-0.0L, nextUp(-real.min_normal*real.epsilon)) ); assert( nextUp(-0.0L) == real.min_normal*real.epsilon ); assert( nextUp(0.0L) == real.min_normal*real.epsilon ); assert( nextUp(real.min_normal*(1-real.epsilon)) == real.min_normal ); assert( nextUp(real.min_normal) == real.min_normal*(1+real.epsilon) ); // positive numbers assert( nextUp(1.0L) == 1.0 + real.epsilon ); assert( nextUp(2.0L-real.epsilon) == 2.0 ); assert( nextUp(real.max) == real.infinity ); assert( nextUp(real.infinity)==real.infinity ); } double n = NaN(0xABC); assert(isIdentical(nextUp(n), n)); // negative numbers assert( nextUp(-double.infinity) == -double.max ); assert( nextUp(-1-double.epsilon) == -1.0 ); assert( nextUp(-2.0) == -2.0 + double.epsilon); // subnormals and zero assert( nextUp(-double.min_normal) == -double.min_normal*(1-double.epsilon) ); assert( nextUp(-double.min_normal*(1-double.epsilon)) == -double.min_normal*(1-2*double.epsilon) ); assert( isIdentical(-0.0, nextUp(-double.min_normal*double.epsilon)) ); assert( nextUp(0.0) == double.min_normal*double.epsilon ); assert( nextUp(-0.0) == double.min_normal*double.epsilon ); assert( nextUp(double.min_normal*(1-double.epsilon)) == double.min_normal ); assert( nextUp(double.min_normal) == double.min_normal*(1+double.epsilon) ); // positive numbers assert( nextUp(1.0) == 1.0 + double.epsilon ); assert( nextUp(2.0-double.epsilon) == 2.0 ); assert( nextUp(double.max) == double.infinity ); float fn = NaN(0xABC); assert(isIdentical(nextUp(fn), fn)); float f = -float.min_normal*(1-float.epsilon); float f1 = -float.min_normal; assert( nextUp(f1) == f); f = 1.0f+float.epsilon; f1 = 1.0f; assert( nextUp(f1) == f ); f1 = -0.0f; assert( nextUp(f1) == float.min_normal*float.epsilon); assert( nextUp(float.infinity)==float.infinity ); assert(nextDown(1.0L+real.epsilon)==1.0); assert(nextDown(1.0+double.epsilon)==1.0); f = 1.0f+float.epsilon; assert(nextDown(f)==1.0); } /++ Return the value that lies halfway between x and y on the IEEE number line. Formally, the result is the arithmetic mean of the binary significands of x and y, multiplied by the geometric mean of the binary exponents of x and y. x and y must not be NaN. Note: this function is useful for ensuring O(log n) behaviour in algorithms involving a 'binary chop'. Params: xx = x value yy = y value Special cases: If x and y not null and have opposite sign bits, then `copysign(T(0), y)` is returned. If x and y are within a factor of 2 and have the same sign, (ie, feqrel(x, y) > 0), the return value is the arithmetic mean (x + y) / 2. If x and y are even powers of 2 and have the same sign, the return value is the geometric mean, ieeeMean(x, y) = sgn(x) * sqrt(fabs(x * y)). +/ T ieeeMean(T)(const T xx, const T yy) @trusted pure nothrow @nogc in { assert(xx == xx && yy == yy); } do { import mir.math.common: copysign; T x = xx; T y = yy; if (x == 0) { x = copysign(T(0), y); } else if (y == 0) { y = copysign(T(0), x); } else if (signbit(x) != signbit(y)) { return copysign(T(0), y); } // The implementation is simple: cast x and y to integers, // average them (avoiding overflow), and cast the result back to a floating-point number. mixin floatTraits!(T); T u = 0; static if (realFormat == RealFormat.ieeeExtended) { // There's slight additional complexity because they are actually // 79-bit reals... ushort *ue = cast(ushort *)&u + idx; int ye = (cast(ushort *)&y)[idx]; int xe = (cast(ushort *)&x)[idx]; version (LittleEndian) { ulong *ul = cast(ulong *)&u; ulong xl = *cast(ulong *)&x; ulong yl = *cast(ulong *)&y; } else { ulong *ul = cast(ulong *)(cast(short *)&u + 1); ulong xl = *cast(ulong *)(cast(short *)&x + 1); ulong yl = *cast(ulong *)(cast(short *)&y + 1); } // Ignore the useless implicit bit. (Bonus: this prevents overflows) ulong m = (xl & 0x7FFF_FFFF_FFFF_FFFFL) + (yl & 0x7FFF_FFFF_FFFF_FFFFL); int e = ((xe & exp_mask) + (ye & exp_mask)); if (m & 0x8000_0000_0000_0000L) { ++e; m &= 0x7FFF_FFFF_FFFF_FFFFL; } // Now do a multi-byte right shift const uint c = e & 1; // carry e >>= 1; m >>>= 1; if (c) m |= 0x4000_0000_0000_0000L; // shift carry into significand if (e) *ul = m | 0x8000_0000_0000_0000L; // set implicit bit... else *ul = m; // ... unless exponent is 0 (subnormal or zero). *ue = cast(ushort) (e | (xe & 0x8000)); // restore sign bit } else static if (realFormat == RealFormat.ieeeQuadruple) { // This would be trivial if 'ucent' were implemented... ulong *ul = cast(ulong *)&u; ulong *xl = cast(ulong *)&x; ulong *yl = cast(ulong *)&y; // Multi-byte add, then multi-byte right shift. import core.checkedint: addu; bool carry; ulong ml = addu(xl[MANTISSA_LSB], yl[MANTISSA_LSB], carry); ulong mh = carry + (xl[MANTISSA_MSB] & 0x7FFF_FFFF_FFFF_FFFFL) + (yl[MANTISSA_MSB] & 0x7FFF_FFFF_FFFF_FFFFL); ul[MANTISSA_MSB] = (mh >>> 1) | (xl[MANTISSA_MSB] & 0x8000_0000_0000_0000); ul[MANTISSA_LSB] = (ml >>> 1) | (mh & 1) << 63; } else static if (realFormat == RealFormat.ieeeDouble) { ulong *ul = cast(ulong *)&u; ulong *xl = cast(ulong *)&x; ulong *yl = cast(ulong *)&y; ulong m = (((*xl) & 0x7FFF_FFFF_FFFF_FFFFL) + ((*yl) & 0x7FFF_FFFF_FFFF_FFFFL)) >>> 1; m |= ((*xl) & 0x8000_0000_0000_0000L); *ul = m; } else static if (realFormat == RealFormat.ieeeSingle) { uint *ul = cast(uint *)&u; uint *xl = cast(uint *)&x; uint *yl = cast(uint *)&y; uint m = (((*xl) & 0x7FFF_FFFF) + ((*yl) & 0x7FFF_FFFF)) >>> 1; m |= ((*xl) & 0x8000_0000); *ul = m; } else { assert(0, "Not implemented"); } return u; } @safe pure nothrow @nogc version(mir_core_test) unittest { assert(ieeeMean(-0.0,-1e-20)<0); assert(ieeeMean(0.0,1e-20)>0); assert(ieeeMean(1.0L,4.0L)==2L); assert(ieeeMean(2.0*1.013,8.0*1.013)==4*1.013); assert(ieeeMean(-1.0L,-4.0L)==-2L); assert(ieeeMean(-1.0,-4.0)==-2); assert(ieeeMean(-1.0f,-4.0f)==-2f); assert(ieeeMean(-1.0,-2.0)==-1.5); assert(ieeeMean(-1*(1+8*real.epsilon),-2*(1+8*real.epsilon)) ==-1.5*(1+5*real.epsilon)); assert(ieeeMean(0x1p60,0x1p-10)==0x1p25); static if (floatTraits!(real).realFormat == RealFormat.ieeeExtended) { assert(ieeeMean(1.0L,real.infinity)==0x1p8192L); assert(ieeeMean(0.0L,real.infinity)==1.5); } assert(ieeeMean(0.5*real.min_normal*(1-4*real.epsilon),0.5*real.min_normal) == 0.5*real.min_normal*(1-2*real.epsilon)); } /********************************************************************* * Separate floating point value into significand and exponent. * * Returns: * Calculate and return $(I x) and $(I exp) such that * value =$(I x)*2$(SUPERSCRIPT exp) and * .5 $(LT)= |$(I x)| $(LT) 1.0 * * $(I x) has same sign as value. * * $(TABLE_SV * $(TR $(TH value) $(TH returns) $(TH exp)) * $(TR $(TD $(PLUSMN)0.0) $(TD $(PLUSMN)0.0) $(TD 0)) * $(TR $(TD +$(INFIN)) $(TD +$(INFIN)) $(TD unchenged)) * $(TR $(TD -$(INFIN)) $(TD -$(INFIN)) $(TD unchenged)) * $(TR $(TD $(PLUSMN)$(NAN)) $(TD $(PLUSMN)$(NAN)) $(TD unchenged)) * ) */ T frexp(T)(const T value, ref int exp) @trusted pure nothrow @nogc if (isFloatingPoint!T) { import mir.utility: _expect; import mir.math.common: fabs; if (__ctfe) { // Handle special cases. if (value == 0) { exp = 0; return value; } if (value != value || fabs(value) == T.infinity) { return value; } // Handle ordinary cases. // In CTFE there is no performance advantage for having separate // paths for different floating point types. T absValue = value < 0 ? -value : value; int expCount; static if (T.mant_dig > double.mant_dig) { for (; absValue >= 0x1.0p+1024L; absValue *= 0x1.0p-1024L) expCount += 1024; for (; absValue < 0x1.0p-1021L; absValue *= 0x1.0p+1021L) expCount -= 1021; } const double dval = cast(double) absValue; int dexp = cast(int) (((*cast(const long*) &dval) >>> 52) & 0x7FF) + double.min_exp - 2; dexp++; expCount += dexp; absValue *= 2.0 ^^ -dexp; // If the original value was subnormal or if it was a real // then absValue can still be outside the [0.5, 1.0) range. if (absValue < 0.5) { assert(T.mant_dig > double.mant_dig || -T.min_normal < value && value < T.min_normal); do { absValue += absValue; expCount--; } while (absValue < 0.5); } else { assert(absValue < 1 || T.mant_dig > double.mant_dig); for (; absValue >= 1; absValue *= T(0.5)) expCount++; } exp = expCount; return value < 0 ? -absValue : absValue; } with(floatTraits!T) static if ( realFormat == RealFormat.ieeeExtended || realFormat == RealFormat.ieeeQuadruple || realFormat == RealFormat.ieeeDouble || realFormat == RealFormat.ieeeSingle) { T vf = value; S u = (cast(U*)&vf)[idx]; int e = (u & exp_mask) >>> exp_shft; if (_expect(e, true)) // If exponent is non-zero { if (_expect(e == exp_msh, false)) goto R; exp = e + (T.min_exp - 1); P: u &= ~exp_mask; u ^= exp_nrm; (cast(U*)&vf)[idx] = cast(U)u; R: return vf; } else { static if (realFormat == RealFormat.ieeeExtended) { version (LittleEndian) auto mp = cast(ulong*)&vf; else auto mp = cast(ulong*)((cast(ushort*)&vf) + 1); auto m = u & man_mask | *mp; } else { auto m = u & man_mask; static if (T.sizeof > U.sizeof) m |= (cast(U*)&vf)[MANTISSA_LSB]; } if (!m) { exp = 0; goto R; } vf *= norm_factor; u = (cast(U*)&vf)[idx]; e = (u & exp_mask) >>> exp_shft; exp = e + (T.min_exp - T.mant_dig); goto P; } } else // static if (realFormat == RealFormat.ibmExtended) { static assert(0, "frexp not implemented"); } } /// @safe version(mir_core_test) unittest { import mir.math.common: pow, approxEqual; alias isNaN = x => x != x; int exp; real mantissa = frexp(123.456L, exp); assert(approxEqual(mantissa * pow(2.0L, cast(real) exp), 123.456L)); // special cases, zero assert(frexp(-0.0, exp) == -0.0 && exp == 0); assert(frexp(0.0, exp) == 0.0 && exp == 0); // special cases, NaNs and INFs exp = 1234; // random number assert(isNaN(frexp(-real.nan, exp)) && exp == 1234); assert(isNaN(frexp(real.nan, exp)) && exp == 1234); assert(frexp(-real.infinity, exp) == -real.infinity && exp == 1234); assert(frexp(real.infinity, exp) == real.infinity && exp == 1234); } @safe @nogc nothrow version(mir_core_test) unittest { import mir.math.common: pow; int exp; real mantissa = frexp(123.456L, exp); assert(mantissa * pow(2.0L, cast(real) exp) == 123.456L); } @safe version(mir_core_test) unittest { import std.meta : AliasSeq; import std.typecons : tuple, Tuple; static foreach (T; AliasSeq!(float, double, real)) {{ enum randomNumber = 12345; Tuple!(T, T, int)[] vals = // x,frexp,exp [ tuple(T(0.0), T( 0.0 ), 0), tuple(T(-0.0), T( -0.0), 0), tuple(T(1.0), T( .5 ), 1), tuple(T(-1.0), T( -.5 ), 1), tuple(T(2.0), T( .5 ), 2), tuple(T(float.min_normal/2.0f), T(.5), -126), tuple(T.infinity, T.infinity, randomNumber), tuple(-T.infinity, -T.infinity, randomNumber), tuple(T.nan, T.nan, randomNumber), tuple(-T.nan, -T.nan, randomNumber), // Phobos issue #16026: tuple(3 * (T.min_normal * T.epsilon), T( .75), (T.min_exp - T.mant_dig) + 2) ]; foreach (i, elem; vals) { T x = elem[0]; T e = elem[1]; int exp = elem[2]; int eptr = randomNumber; T v = frexp(x, eptr); assert(e == v || (e != e && v != v)); assert(exp == eptr); } static if (floatTraits!(T).realFormat == RealFormat.ieeeExtended) { static T[3][] extendedvals = [ // x,frexp,exp [0x1.a5f1c2eb3fe4efp+73L, 0x1.A5F1C2EB3FE4EFp-1L, 74], // normal [0x1.fa01712e8f0471ap-1064L, 0x1.fa01712e8f0471ap-1L, -1063], [T.min_normal, .5, -16381], [T.min_normal/2.0L, .5, -16382] // subnormal ]; foreach (elem; extendedvals) { T x = elem[0]; T e = elem[1]; int exp = cast(int) elem[2]; int eptr; T v = frexp(x, eptr); assert(e == v); assert(exp == eptr); } } }} } @safe version(mir_core_test) unittest { import std.meta : AliasSeq; void foo() { static foreach (T; AliasSeq!(real, double, float)) {{ int exp; const T a = 1; immutable T b = 2; auto c = frexp(a, exp); auto d = frexp(b, exp); }} } } /******************************************* * Returns: n * 2$(SUPERSCRIPT exp) * See_Also: $(LERF frexp) */ T ldexp(T)(const T n, int exp) @nogc @trusted pure nothrow if (isFloatingPoint!T) { import core.math: ldexp; return ldexp(n, exp); } /// @nogc @safe pure nothrow version(mir_core_test) unittest { import std.meta : AliasSeq; static foreach (T; AliasSeq!(float, double, real)) {{ T r = ldexp(cast(T) 3.0, cast(int) 3); assert(r == 24); T n = 3.0; int exp = 3; r = ldexp(n, exp); assert(r == 24); }} } @safe pure nothrow @nogc version(mir_core_test) unittest { import mir.math.common; { assert(ldexp(1.0, -1024) == 0x1p-1024); assert(ldexp(1.0, -1022) == 0x1p-1022); int x; double n = frexp(0x1p-1024L, x); assert(n == 0.5); assert(x==-1023); assert(ldexp(n, x)==0x1p-1024); } static if (floatTraits!(real).realFormat == RealFormat.ieeeExtended || floatTraits!(real).realFormat == RealFormat.ieeeQuadruple) { assert(ldexp(1.0L, -16384) == 0x1p-16384L); assert(ldexp(1.0L, -16382) == 0x1p-16382L); int x; real n = frexp(0x1p-16384L, x); assert(n == 0.5L); assert(x==-16383); assert(ldexp(n, x)==0x1p-16384L); } } /* workaround Issue 14718, float parsing depends on platform strtold @safe pure nothrow @nogc version(mir_core_test) unittest { assert(ldexp(1.0, -1024) == 0x1p-1024); assert(ldexp(1.0, -1022) == 0x1p-1022); int x; double n = frexp(0x1p-1024, x); assert(n == 0.5); assert(x==-1023); assert(ldexp(n, x)==0x1p-1024); } @safe pure nothrow @nogc version(mir_core_test) unittest { assert(ldexp(1.0f, -128) == 0x1p-128f); assert(ldexp(1.0f, -126) == 0x1p-126f); int x; float n = frexp(0x1p-128f, x); assert(n == 0.5f); assert(x==-127); assert(ldexp(n, x)==0x1p-128f); } */ @safe @nogc nothrow version(mir_core_test) unittest { import std.meta: AliasSeq; static F[3][] vals(F) = // value,exp,ldexp [ [ 0, 0, 0], [ 1, 0, 1], [ -1, 0, -1], [ 1, 1, 2], [ 123, 10, 125952], [ F.max, int.max, F.infinity], [ F.max, -int.max, 0], [ F.min_normal, -int.max, 0], ]; static foreach(F; AliasSeq!(double, real)) {{ int i; for (i = 0; i < vals!F.length; i++) { F x = vals!F[i][0]; int exp = cast(int) vals!F[i][1]; F z = vals!F[i][2]; F l = ldexp(x, exp); assert(feqrel(z, l) >= 23); } }} } package(mir): // Constants used for extracting the components of the representation. // They supplement the built-in floating point properties. template floatTraits(T) { // EXPMASK is a ushort mask to select the exponent portion (without sign) // EXPSHIFT is the number of bits the exponent is left-shifted by in its ushort // EXPBIAS is the exponent bias - 1 (exp == EXPBIAS yields ×2^-1). // EXPPOS_SHORT is the index of the exponent when represented as a ushort array. // SIGNPOS_BYTE is the index of the sign when represented as a ubyte array. // RECIP_EPSILON is the value such that (smallest_subnormal) * RECIP_EPSILON == T.min_normal enum norm_factor = 1 / T.epsilon; static if (T.mant_dig == 24) { enum realFormat = RealFormat.ieeeSingle; } else static if (T.mant_dig == 53) { static if (T.sizeof == 8) { enum realFormat = RealFormat.ieeeDouble; } else static assert(false, "No traits support for " ~ T.stringof); } else static if (T.mant_dig == 64) { enum realFormat = RealFormat.ieeeExtended; } else static if (T.mant_dig == 113) { enum realFormat = RealFormat.ieeeQuadruple; } else static assert(false, "No traits support for " ~ T.stringof); static if (realFormat == RealFormat.ieeeExtended) { alias S = int; alias U = ushort; enum sig_mask = U(1) << (U.sizeof * 8 - 1); enum exp_shft = 0; enum man_mask = 0; version (LittleEndian) enum idx = 4; else enum idx = 0; } else { static if (realFormat == RealFormat.ieeeQuadruple || realFormat == RealFormat.ieeeDouble && double.sizeof == size_t.sizeof) { alias S = long; alias U = ulong; } else { alias S = int; alias U = uint; } static if (realFormat == RealFormat.ieeeQuadruple) alias M = ulong; else alias M = U; enum sig_mask = U(1) << (U.sizeof * 8 - 1); enum uint exp_shft = T.mant_dig - 1 - (T.sizeof > U.sizeof ? U.sizeof * 8 : 0); enum man_mask = (U(1) << exp_shft) - 1; enum idx = T.sizeof > U.sizeof ? MANTISSA_MSB : 0; } enum exp_mask = (U.max >> (exp_shft + 1)) << exp_shft; enum int exp_msh = exp_mask >> exp_shft; enum intPartMask = man_mask + 1; enum exp_nrm = S(exp_msh - T.max_exp - 1) << exp_shft; } // These apply to all floating-point types version (LittleEndian) { enum MANTISSA_LSB = 0; enum MANTISSA_MSB = 1; } else { enum MANTISSA_LSB = 1; enum MANTISSA_MSB = 0; }
D
module UnrealScript.TribesGame.TrGame_TrDaD; import ScriptClasses; import UnrealScript.Helpers; import UnrealScript.Engine.Controller; import UnrealScript.Engine.PlayerReplicationInfo; import UnrealScript.TribesGame.TrGame; import UnrealScript.UTGame.UTTeamInfo; import UnrealScript.TribesGame.TrPowerGenerator; extern(C++) interface TrGame_TrDaD : TrGame { public extern(D): private static __gshared ScriptClass mStaticClass; @property final static ScriptClass StaticClass() { mixin(MGSCC("Class TribesGame.TrGame_TrDaD")); } private static __gshared TrGame_TrDaD mDefaultProperties; @property final static TrGame_TrDaD DefaultProperties() { mixin(MGDPC("TrGame_TrDaD", "TrGame_TrDaD TribesGame.Default__TrGame_TrDaD")); } static struct Functions { private static __gshared { ScriptFunction mResetScores; ScriptFunction mSetTeam; ScriptFunction mLogout; ScriptFunction mPostBeginPlay; ScriptFunction mResetLevel; ScriptFunction mRespawnPlayers; ScriptFunction mResetRound; ScriptFunction mScoreKill; ScriptFunction mCheckScore; ScriptFunction mDetermineWinningTeam; ScriptFunction mGotoPendingRoundStartTimer; ScriptFunction mCheckEndGame; ScriptFunction mOnCoreBlownUp; ScriptFunction mSendMatchCountdown; ScriptFunction mRestartPlayer; ScriptFunction mGetGameTypeId; ScriptFunction mOnGeneratorPowerChange; } public @property static final { ScriptFunction ResetScores() { mixin(MGF("mResetScores", "Function TribesGame.TrGame_TrDaD.ResetScores")); } ScriptFunction SetTeam() { mixin(MGF("mSetTeam", "Function TribesGame.TrGame_TrDaD.SetTeam")); } ScriptFunction Logout() { mixin(MGF("mLogout", "Function TribesGame.TrGame_TrDaD.Logout")); } ScriptFunction PostBeginPlay() { mixin(MGF("mPostBeginPlay", "Function TribesGame.TrGame_TrDaD.PostBeginPlay")); } ScriptFunction ResetLevel() { mixin(MGF("mResetLevel", "Function TribesGame.TrGame_TrDaD.ResetLevel")); } ScriptFunction RespawnPlayers() { mixin(MGF("mRespawnPlayers", "Function TribesGame.TrGame_TrDaD.RespawnPlayers")); } ScriptFunction ResetRound() { mixin(MGF("mResetRound", "Function TribesGame.TrGame_TrDaD.ResetRound")); } ScriptFunction ScoreKill() { mixin(MGF("mScoreKill", "Function TribesGame.TrGame_TrDaD.ScoreKill")); } ScriptFunction CheckScore() { mixin(MGF("mCheckScore", "Function TribesGame.TrGame_TrDaD.CheckScore")); } ScriptFunction DetermineWinningTeam() { mixin(MGF("mDetermineWinningTeam", "Function TribesGame.TrGame_TrDaD.DetermineWinningTeam")); } ScriptFunction GotoPendingRoundStartTimer() { mixin(MGF("mGotoPendingRoundStartTimer", "Function TribesGame.TrGame_TrDaD.GotoPendingRoundStartTimer")); } ScriptFunction CheckEndGame() { mixin(MGF("mCheckEndGame", "Function TribesGame.TrGame_TrDaD.CheckEndGame")); } ScriptFunction OnCoreBlownUp() { mixin(MGF("mOnCoreBlownUp", "Function TribesGame.TrGame_TrDaD.OnCoreBlownUp")); } ScriptFunction SendMatchCountdown() { mixin(MGF("mSendMatchCountdown", "Function TribesGame.TrGame_TrDaD.SendMatchCountdown")); } ScriptFunction RestartPlayer() { mixin(MGF("mRestartPlayer", "Function TribesGame.TrGame_TrDaD.RestartPlayer")); } ScriptFunction GetGameTypeId() { mixin(MGF("mGetGameTypeId", "Function TribesGame.TrGame_TrDaD.GetGameTypeId")); } ScriptFunction OnGeneratorPowerChange() { mixin(MGF("mOnGeneratorPowerChange", "Function TribesGame.TrGame_TrDaD.OnGeneratorPowerChange")); } } } static struct MatchInProgress { private static __gshared ScriptState mStaticClass; @property final static ScriptState StaticClass() { mixin(MGSCSA("State TribesGame.TrGame_TrDaD.MatchInProgress")); } } static struct PendingRoundStart { private static __gshared ScriptState mStaticClass; @property final static ScriptState StaticClass() { mixin(MGSCSA("State TribesGame.TrGame_TrDaD.PendingRoundStart")); } } final: void ResetScores() { (cast(ScriptObject)this).ProcessEvent(Functions.ResetScores, cast(void*)0, cast(void*)0); } void SetTeam(Controller Other, UTTeamInfo NewTeam, bool bNewTeam) { ubyte params[12]; params[] = 0; *cast(Controller*)params.ptr = Other; *cast(UTTeamInfo*)&params[4] = NewTeam; *cast(bool*)&params[8] = bNewTeam; (cast(ScriptObject)this).ProcessEvent(Functions.SetTeam, params.ptr, cast(void*)0); } void Logout(Controller Exiting) { ubyte params[4]; params[] = 0; *cast(Controller*)params.ptr = Exiting; (cast(ScriptObject)this).ProcessEvent(Functions.Logout, params.ptr, cast(void*)0); } void PostBeginPlay() { (cast(ScriptObject)this).ProcessEvent(Functions.PostBeginPlay, cast(void*)0, cast(void*)0); } void ResetLevel() { (cast(ScriptObject)this).ProcessEvent(Functions.ResetLevel, cast(void*)0, cast(void*)0); } void RespawnPlayers() { (cast(ScriptObject)this).ProcessEvent(Functions.RespawnPlayers, cast(void*)0, cast(void*)0); } void ResetRound() { (cast(ScriptObject)this).ProcessEvent(Functions.ResetRound, cast(void*)0, cast(void*)0); } void ScoreKill(Controller Killer, Controller Other) { ubyte params[8]; params[] = 0; *cast(Controller*)params.ptr = Killer; *cast(Controller*)&params[4] = Other; (cast(ScriptObject)this).ProcessEvent(Functions.ScoreKill, params.ptr, cast(void*)0); } bool CheckScore(PlayerReplicationInfo Scorer) { ubyte params[8]; params[] = 0; *cast(PlayerReplicationInfo*)params.ptr = Scorer; (cast(ScriptObject)this).ProcessEvent(Functions.CheckScore, params.ptr, cast(void*)0); return *cast(bool*)&params[4]; } int DetermineWinningTeam() { ubyte params[4]; params[] = 0; (cast(ScriptObject)this).ProcessEvent(Functions.DetermineWinningTeam, params.ptr, cast(void*)0); return *cast(int*)params.ptr; } void GotoPendingRoundStartTimer() { (cast(ScriptObject)this).ProcessEvent(Functions.GotoPendingRoundStartTimer, cast(void*)0, cast(void*)0); } bool CheckEndGame(PlayerReplicationInfo Winner, ScriptString Reason) { ubyte params[20]; params[] = 0; *cast(PlayerReplicationInfo*)params.ptr = Winner; *cast(ScriptString*)&params[4] = Reason; (cast(ScriptObject)this).ProcessEvent(Functions.CheckEndGame, params.ptr, cast(void*)0); return *cast(bool*)&params[16]; } void OnCoreBlownUp(ubyte Team) { ubyte params[1]; params[] = 0; params[0] = Team; (cast(ScriptObject)this).ProcessEvent(Functions.OnCoreBlownUp, params.ptr, cast(void*)0); } void SendMatchCountdown(int Seconds) { ubyte params[4]; params[] = 0; *cast(int*)params.ptr = Seconds; (cast(ScriptObject)this).ProcessEvent(Functions.SendMatchCountdown, params.ptr, cast(void*)0); } void RestartPlayer(Controller NewPlayer) { ubyte params[4]; params[] = 0; *cast(Controller*)params.ptr = NewPlayer; (cast(ScriptObject)this).ProcessEvent(Functions.RestartPlayer, params.ptr, cast(void*)0); } int GetGameTypeId() { ubyte params[4]; params[] = 0; (cast(ScriptObject)this).ProcessEvent(Functions.GetGameTypeId, params.ptr, cast(void*)0); return *cast(int*)params.ptr; } void OnGeneratorPowerChange(TrPowerGenerator G) { ubyte params[4]; params[] = 0; *cast(TrPowerGenerator*)params.ptr = G; (cast(ScriptObject)this).ProcessEvent(Functions.OnGeneratorPowerChange, params.ptr, cast(void*)0); } }
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 vtkImageAppendComponents; 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 vtkAlgorithmOutput; static import vtkDataObject; static import vtkThreadedImageAlgorithm; class vtkImageAppendComponents : vtkThreadedImageAlgorithm.vtkThreadedImageAlgorithm { private void* swigCPtr; public this(void* cObject, bool ownCObject) { super(vtkd_im.vtkImageAppendComponents_Upcast(cObject), ownCObject); swigCPtr = cObject; } public static void* swigGetCPtr(vtkImageAppendComponents 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 vtkImageAppendComponents New() { void* cPtr = vtkd_im.vtkImageAppendComponents_New(); vtkImageAppendComponents ret = (cPtr is null) ? null : new vtkImageAppendComponents(cPtr, false); return ret; } public static int IsTypeOf(string type) { auto ret = vtkd_im.vtkImageAppendComponents_IsTypeOf((type ? std.string.toStringz(type) : null)); return ret; } public static vtkImageAppendComponents SafeDownCast(vtkObjectBase.vtkObjectBase o) { void* cPtr = vtkd_im.vtkImageAppendComponents_SafeDownCast(vtkObjectBase.vtkObjectBase.swigGetCPtr(o)); vtkImageAppendComponents ret = (cPtr is null) ? null : new vtkImageAppendComponents(cPtr, false); return ret; } public vtkImageAppendComponents NewInstance() const { void* cPtr = vtkd_im.vtkImageAppendComponents_NewInstance(cast(void*)swigCPtr); vtkImageAppendComponents ret = (cPtr is null) ? null : new vtkImageAppendComponents(cPtr, false); return ret; } alias vtkThreadedImageAlgorithm.vtkThreadedImageAlgorithm.NewInstance NewInstance; public void ReplaceNthInputConnection(int idx, vtkAlgorithmOutput.vtkAlgorithmOutput input) { vtkd_im.vtkImageAppendComponents_ReplaceNthInputConnection(cast(void*)swigCPtr, idx, vtkAlgorithmOutput.vtkAlgorithmOutput.swigGetCPtr(input)); } public void SetInputData(int num, vtkDataObject.vtkDataObject input) { vtkd_im.vtkImageAppendComponents_SetInputData__SWIG_0(cast(void*)swigCPtr, num, vtkDataObject.vtkDataObject.swigGetCPtr(input)); } public void SetInputData(vtkDataObject.vtkDataObject input) { vtkd_im.vtkImageAppendComponents_SetInputData__SWIG_1(cast(void*)swigCPtr, vtkDataObject.vtkDataObject.swigGetCPtr(input)); } public vtkDataObject.vtkDataObject GetInput(int num) { void* cPtr = vtkd_im.vtkImageAppendComponents_GetInput__SWIG_0(cast(void*)swigCPtr, num); vtkDataObject.vtkDataObject ret = (cPtr is null) ? null : new vtkDataObject.vtkDataObject(cPtr, false); return ret; } public vtkDataObject.vtkDataObject GetInput() { void* cPtr = vtkd_im.vtkImageAppendComponents_GetInput__SWIG_1(cast(void*)swigCPtr); vtkDataObject.vtkDataObject ret = (cPtr is null) ? null : new vtkDataObject.vtkDataObject(cPtr, false); return ret; } public int GetNumberOfInputs() { auto ret = vtkd_im.vtkImageAppendComponents_GetNumberOfInputs(cast(void*)swigCPtr); return ret; } }
D
// Written in the D programming language. /++ $(SECTION Overview) $(P The $(D std.uni) module provides an implementation of fundamental Unicode algorithms and data structures. This doesn't include UTF encoding and decoding primitives, see $(XREF _utf, decode) and $(XREF _utf, encode) in std.utf for this functionality. ) $(P All primitives listed operate on Unicode characters and sets of characters. For functions which operate on ASCII characters and ignore Unicode $(CHARACTERS), see $(LINK2 std_ascii.html, std.ascii). For definitions of Unicode $(CHARACTER), $(CODEPOINT) and other terms used throughout this module see the $(S_LINK Terminology, terminology) section below. ) $(P The focus of this module is the core needs of developing Unicode-aware applications. To that effect it provides the following optimized primitives: ) $(UL $(LI Character classification by category and common properties: $(LREF isAlpha), $(LREF isWhite) and others. ) $(LI Case-insensitive string comparison ($(LREF sicmp), $(LREF icmp)). ) $(LI Converting text to any of the four normalization forms via $(LREF normalize). ) $(LI Decoding ($(LREF decodeGrapheme)) and iteration ($(LREF graphemeStride)) by user-perceived characters, that is by $(LREF Grapheme) clusters. ) $(LI Decomposing and composing of individual character(s) according to canonical or compatibility rules, see $(LREF compose) and $(LREF decompose), including the specific version for Hangul syllables $(LREF composeJamo) and $(LREF decomposeHangul). ) ) $(P It's recognized that an application may need further enhancements and extensions, such as less commonly known algorithms, or tailoring existing ones for region specific needs. To help users with building any extra functionality beyond the core primitives, the module provides: ) $(UL $(LI $(LREF CodepointSet), a type for easy manipulation of sets of characters. Besides the typical set algebra it provides an unusual feature: a D source code generator for detection of $(CODEPOINTS) in this set. This is a boon for meta-programming parser frameworks, and is used internally to power classification in small sets like $(LREF isWhite). ) $(LI A way to construct optimal packed multi-stage tables also known as a special case of $(LUCKY Trie). The functions $(LREF codepointTrie), $(LREF codepointSetTrie) construct custom tries that map dchar to value. The end result is a fast and predictable $(BIGOH 1) lookup that powers functions like $(LREF isAlpha) and $(LREF combiningClass), but for user-defined data sets. ) $(LI Generally useful building blocks for customized normalization: $(LREF combiningClass) for querying combining class and $(LREF allowedIn) for testing the Quick_Check property of a given normalization form. ) $(LI Access to a large selection of commonly used sets of $(CODEPOINTS). $(S_LINK Unicode properties, Supported sets) include Script, Block and General Category. The exact contents of a set can be observed in the CLDR utility, on the $(WEB www.unicode.org/cldr/utility/properties.jsp, property index) page of the Unicode website. See $(LREF unicode) for easy and (optionally) compile-time checked set queries. ) ) $(SECTION Synopsis) --- import std.uni; void main() { // initialize code point sets using script/block or property name // now 'set' contains code points from both scripts. auto set = unicode("Cyrillic") | unicode("Armenian"); // same thing but simpler and checked at compile-time auto ascii = unicode.ASCII; auto currency = unicode.Currency_Symbol; // easy set ops auto a = set & ascii; assert(a.empty); // as it has no intersection with ascii a = set | ascii; auto b = currency - a; // subtract all ASCII, Cyrillic and Armenian // some properties of code point sets assert(b.length > 45); // 46 items in Unicode 6.1, even more in 6.2 // testing presence of a code point in a set // is just fine, it is O(logN) assert(!b['$']); assert(!b['\u058F']); // Armenian dram sign assert(b['¥']); // building fast lookup tables, these guarantee O(1) complexity // 1-level Trie lookup table essentially a huge bit-set ~262Kb auto oneTrie = toTrie!1(b); // 2-level far more compact but typically slightly slower auto twoTrie = toTrie!2(b); // 3-level even smaller, and a bit slower yet auto threeTrie = toTrie!3(b); assert(oneTrie['£']); assert(twoTrie['£']); assert(threeTrie['£']); // build the trie with the most sensible trie level // and bind it as a functor auto cyrilicOrArmenian = toDelegate(set); auto balance = find!(cyrilicOrArmenian)("Hello ընկեր!"); assert(balance == "ընկեր!"); // compatible with bool delegate(dchar) bool delegate(dchar) bindIt = cyrilicOrArmenian; // Normalization string s = "Plain ascii (and not only), is always normalized!"; assert(s is normalize(s));// is the same string string nonS = "A\u0308ffin"; // A ligature auto nS = normalize(nonS); // to NFC, the W3C endorsed standard assert(nS == "Äffin"); assert(nS != nonS); string composed = "Äffin"; assert(normalize!NFD(composed) == "A\u0308ffin"); // to NFKD, compatibility decomposition useful for fuzzy matching/searching assert(normalize!NFKD("2¹⁰") == "210"); } --- $(SECTION Terminology) $(P The following is a list of important Unicode notions and definitions. Any conventions used specifically in this module alone are marked as such. The descriptions are based on the formal definition as found in ($WEB http://www.unicode.org/versions/Unicode6.2.0/ch03.pdf, chapter three of The Unicode Standard Core Specification.) ) $(P $(DEF Abstract character) A unit of information used for the organization, control, or representation of textual data. Note that: $(UL $(LI When representing data, the nature of that data is generally symbolic as opposed to some other kind of data (for example, visual).) $(LI An abstract character has no concrete form and should not be confused with a $(S_LINK Glyph, glyph).) $(LI An abstract character does not necessarily correspond to what a user thinks of as a “character” and should not be confused with a $(LREF Grapheme).) $(LI The abstract characters encoded (see Encoded character) are known as Unicode abstract characters.) $(LI Abstract characters not directly encoded by the Unicode Standard can often be represented by the use of combining character sequences.) ) ) $(P $(DEF Canonical decomposition) The decomposition of a character or character sequence that results from recursively applying the canonical mappings found in the Unicode Character Database and these described in Conjoining Jamo Behavior (section 12 of $(WEB www.unicode.org/uni2book/ch03.pdf, Unicode Conformance)). ) $(P $(DEF Canonical composition) The precise definition of the Canonical composition is the algorithm as specified in $(WEB www.unicode.org/uni2book/ch03.pdf, Unicode Conformance) section 11. Informally it's the process that does the reverse of the canonical decomposition with the addition of certain rules that e.g. prevent legacy characters from appearing in the composed result. ) $(P $(DEF Canonical equivalent) Two character sequences are said to be canonical equivalents if their full canonical decompositions are identical. ) $(P $(DEF Character) Typically differs by context. For the purpose of this documentation the term $(I character) implies $(I encoded character), that is, a code point having an assigned abstract character (a symbolic meaning). ) $(P $(DEF Code point) Any value in the Unicode codespace; that is, the range of integers from 0 to 10FFFF (hex). Not all code points are assigned to encoded characters. ) $(P $(DEF Code unit) The minimal bit combination that can represent a unit of encoded text for processing or interchange. Depending on the encoding this could be: 8-bit code units in the UTF-8 ($(D char)), 16-bit code units in the UTF-16 ($(D wchar)), and 32-bit code units in the UTF-32 ($(D dchar)). $(I Note that in UTF-32, a code unit is a code point and is represented by the D $(D dchar) type.) ) $(P $(DEF Combining character) A character with the General Category of Combining Mark(M). $(UL $(LI All characters with non-zero canonical combining class are combining characters, but the reverse is not the case: there are combining characters with a zero combining class. ) $(LI These characters are not normally used in isolation unless they are being described. They include such characters as accents, diacritics, Hebrew points, Arabic vowel signs, and Indic matras. ) ) ) $(P $(DEF Combining class) A numerical value used by the Unicode Canonical Ordering Algorithm to determine which sequences of combining marks are to be considered canonically equivalent and which are not. ) $(P $(DEF Compatibility decomposition) The decomposition of a character or character sequence that results from recursively applying both the compatibility mappings and the canonical mappings found in the Unicode Character Database, and those described in Conjoining Jamo Behavior no characters can be further decomposed. ) $(P $(DEF Compatibility equivalent) Two character sequences are said to be compatibility equivalents if their full compatibility decompositions are identical. ) $(P $(DEF Encoded character) An association (or mapping) between an abstract character and a code point. ) $(P $(DEF Glyph) The actual, concrete image of a glyph representation having been rasterized or otherwise imaged onto some display surface. ) $(P $(DEF Grapheme base) A character with the property Grapheme_Base, or any standard Korean syllable block. ) $(P $(DEF Grapheme cluster) Defined as the text between grapheme boundaries as specified by Unicode Standard Annex #29, $(WEB www.unicode.org/reports/tr29/, Unicode text segmentation). Important general properties of a grapheme: $(UL $(LI The grapheme cluster represents a horizontally segmentable unit of text, consisting of some grapheme base (which may consist of a Korean syllable) together with any number of nonspacing marks applied to it. ) $(LI A grapheme cluster typically starts with a grapheme base and then extends across any subsequent sequence of nonspacing marks. A grapheme cluster is most directly relevant to text rendering and processes such as cursor placement and text selection in editing, but may also be relevant to comparison and searching. ) $(LI For many processes, a grapheme cluster behaves as if it was a single character with the same properties as its grapheme base. Effectively, nonspacing marks apply $(I graphically) to the base, but do not change its properties. ) ) $(P This module defines a number of primitives that work with graphemes: $(LREF Grapheme), $(LREF decodeGrapheme) and $(LREF graphemeStride). All of them are using $(I extended grapheme) boundaries as defined in the aforementioned standard annex. ) ) $(P $(DEF Nonspacing mark) A combining character with the General Category of Nonspacing Mark (Mn) or Enclosing Mark (Me). ) $(P $(DEF Spacing mark) A combining character that is not a nonspacing mark.) $(SECTION Normalization) $(P The concepts of $(S_LINK Canonical equivalent, canonical equivalent) or $(S_LINK Compatibility equivalent, compatibility equivalent) characters in the Unicode Standard make it necessary to have a full, formal definition of equivalence for Unicode strings. String equivalence is determined by a process called normalization, whereby strings are converted into forms which are compared directly for identity. This is the primary goal of the normalization process, see the function $(LREF normalize) to convert into any of the four defined forms. ) $(P A very important attribute of the Unicode Normalization Forms is that they must remain stable between versions of the Unicode Standard. A Unicode string normalized to a particular Unicode Normalization Form in one version of the standard is guaranteed to remain in that Normalization Form for implementations of future versions of the standard. ) $(P The Unicode Standard specifies four normalization forms. Informally, two of these forms are defined by maximal decomposition of equivalent sequences, and two of these forms are defined by maximal $(I composition) of equivalent sequences. $(UL $(LI Normalization Form D (NFD): The $(S_LINK Canonical decomposition, canonical decomposition) of a character sequence.) $(LI Normalization Form KD (NFKD): The $(S_LINK Compatibility decomposition, compatibility decomposition) of a character sequence.) $(LI Normalization Form C (NFC): The canonical composition of the $(S_LINK Canonical decomposition, canonical decomposition) of a coded character sequence.) $(LI Normalization Form KC (NFKC): The canonical composition of the $(S_LINK Compatibility decomposition, compatibility decomposition) of a character sequence) ) ) $(P The choice of the normalization form depends on the particular use case. NFC is the best form for general text, since it's more compatible with strings converted from legacy encodings. NFKC is the preferred form for identifiers, especially where there are security concerns. NFD and NFKD are the most useful for internal processing. ) $(SECTION Construction of lookup tables) $(P The Unicode standard describes a set of algorithms that depend on having the ability to quickly look up various properties of a code point. Given the the codespace of about 1 million $(CODEPOINTS), it is not a trivial task to provide a space-efficient solution for the multitude of properties.) $(P Common approaches such as hash-tables or binary search over sorted code point intervals (as in $(LREF InversionList)) are insufficient. Hash-tables have enormous memory footprint and binary search over intervals is not fast enough for some heavy-duty algorithms. ) $(P The recommended solution (see Unicode Implementation Guidelines) is using multi-stage tables that are an implementation of the $(WEB http://en.wikipedia.org/wiki/Trie, Trie) data structure with integer keys and a fixed number of stages. For the remainder of the section this will be called a fixed trie. The following describes a particular implementation that is aimed for the speed of access at the expense of ideal size savings. ) $(P Taking a 2-level Trie as an example the principle of operation is as follows. Split the number of bits in a key (code point, 21 bits) into 2 components (e.g. 15 and 8). The first is the number of bits in the index of the trie and the other is number of bits in each page of the trie. The layout of the trie is then an array of size 2^^bits-of-index followed an array of memory chunks of size 2^^bits-of-page/bits-per-element. ) $(P The number of pages is variable (but not less then 1) unlike the number of entries in the index. The slots of the index all have to contain a number of a page that is present. The lookup is then just a couple of operations - slice the upper bits, lookup an index for these, take a page at this index and use the lower bits as an offset within this page. Assuming that pages are laid out consequently in one array at $(D pages), the pseudo-code is: ) --- auto elemsPerPage = (2 ^^ bits_per_page) / Value.sizeOfInBits; pages[index[n >> bits_per_page]][n & (elemsPerPage - 1)]; --- $(P Where if $(D elemsPerPage) is a power of 2 the whole process is a handful of simple instructions and 2 array reads. Subsequent levels of the trie are introduced by recursing on this notion - the index array is treated as values. The number of bits in index is then again split into 2 parts, with pages over 'current-index' and the new 'upper-index'. ) $(P For completeness a level 1 trie is simply an array. The current implementation takes advantage of bit-packing values when the range is known to be limited in advance (such as $(D bool)). See also $(LREF BitPacked) for enforcing it manually. The major size advantage however comes from the fact that multiple $(B identical pages on every level are merged) by construction. ) $(P The process of constructing a trie is more involved and is hidden from the user in a form of the convenience functions $(LREF codepointTrie), $(LREF codepointSetTrie) and the even more convenient $(LREF toTrie). In general a set or built-in AA with $(D dchar) type can be turned into a trie. The trie object in this module is read-only (immutable); it's effectively frozen after construction. ) $(SECTION Unicode properties) $(P This is a full list of Unicode properties accessible through $(LREF unicode) with specific helpers per category nested within. Consult the $(WEB www.unicode.org/cldr/utility/properties.jsp, CLDR utility) when in doubt about the contents of a particular set.) $(P General category sets listed below are only accessible with the $(LREF unicode) shorthand accessor.) $(BOOKTABLE $(B General category ), $(TR $(TH Abb.) $(TH Long form) $(TH Abb.) $(TH Long form)$(TH Abb.) $(TH Long form)) $(TR $(TD L) $(TD Letter) $(TD Cn) $(TD Unassigned) $(TD Po) $(TD Other_Punctuation)) $(TR $(TD Ll) $(TD Lowercase_Letter) $(TD Co) $(TD Private_Use) $(TD Ps) $(TD Open_Punctuation)) $(TR $(TD Lm) $(TD Modifier_Letter) $(TD Cs) $(TD Surrogate) $(TD S) $(TD Symbol)) $(TR $(TD Lo) $(TD Other_Letter) $(TD N) $(TD Number) $(TD Sc) $(TD Currency_Symbol)) $(TR $(TD Lt) $(TD Titlecase_Letter) $(TD Nd) $(TD Decimal_Number) $(TD Sk) $(TD Modifier_Symbol)) $(TR $(TD Lu) $(TD Uppercase_Letter) $(TD Nl) $(TD Letter_Number) $(TD Sm) $(TD Math_Symbol)) $(TR $(TD M) $(TD Mark) $(TD No) $(TD Other_Number) $(TD So) $(TD Other_Symbol)) $(TR $(TD Mc) $(TD Spacing_Mark) $(TD P) $(TD Punctuation) $(TD Z) $(TD Separator)) $(TR $(TD Me) $(TD Enclosing_Mark) $(TD Pc) $(TD Connector_Punctuation) $(TD Zl) $(TD Line_Separator)) $(TR $(TD Mn) $(TD Nonspacing_Mark) $(TD Pd) $(TD Dash_Punctuation) $(TD Zp) $(TD Paragraph_Separator)) $(TR $(TD C) $(TD Other) $(TD Pe) $(TD Close_Punctuation) $(TD Zs) $(TD Space_Separator)) $(TR $(TD Cc) $(TD Control) $(TD Pf) $(TD Final_Punctuation) $(TD -) $(TD Any)) $(TR $(TD Cf) $(TD Format) $(TD Pi) $(TD Initial_Punctuation) $(TD -) $(TD ASCII)) ) $(P Sets for other commonly useful properties that are accessible with $(LREF unicode):) $(BOOKTABLE $(B Common binary properties), $(TR $(TH Name) $(TH Name) $(TH Name)) $(TR $(TD Alphabetic) $(TD Ideographic) $(TD Other_Uppercase)) $(TR $(TD ASCII_Hex_Digit) $(TD IDS_Binary_Operator) $(TD Pattern_Syntax)) $(TR $(TD Bidi_Control) $(TD ID_Start) $(TD Pattern_White_Space)) $(TR $(TD Cased) $(TD IDS_Trinary_Operator) $(TD Quotation_Mark)) $(TR $(TD Case_Ignorable) $(TD Join_Control) $(TD Radical)) $(TR $(TD Dash) $(TD Logical_Order_Exception) $(TD Soft_Dotted)) $(TR $(TD Default_Ignorable_Code_Point) $(TD Lowercase) $(TD STerm)) $(TR $(TD Deprecated) $(TD Math) $(TD Terminal_Punctuation)) $(TR $(TD Diacritic) $(TD Noncharacter_Code_Point) $(TD Unified_Ideograph)) $(TR $(TD Extender) $(TD Other_Alphabetic) $(TD Uppercase)) $(TR $(TD Grapheme_Base) $(TD Other_Default_Ignorable_Code_Point) $(TD Variation_Selector)) $(TR $(TD Grapheme_Extend) $(TD Other_Grapheme_Extend) $(TD White_Space)) $(TR $(TD Grapheme_Link) $(TD Other_ID_Continue) $(TD XID_Continue)) $(TR $(TD Hex_Digit) $(TD Other_ID_Start) $(TD XID_Start)) $(TR $(TD Hyphen) $(TD Other_Lowercase) ) $(TR $(TD ID_Continue) $(TD Other_Math) ) ) $(P Bellow is the table with block names accepted by $(LREF unicode.block). Note that the shorthand version $(LREF unicode) requires "In" to be prepended to the names of blocks so as to disambiguate scripts and blocks.) $(BOOKTABLE $(B Blocks), $(TR $(TD Aegean Numbers) $(TD Ethiopic Extended) $(TD Mongolian)) $(TR $(TD Alchemical Symbols) $(TD Ethiopic Extended-A) $(TD Musical Symbols)) $(TR $(TD Alphabetic Presentation Forms) $(TD Ethiopic Supplement) $(TD Myanmar)) $(TR $(TD Ancient Greek Musical Notation) $(TD General Punctuation) $(TD Myanmar Extended-A)) $(TR $(TD Ancient Greek Numbers) $(TD Geometric Shapes) $(TD New Tai Lue)) $(TR $(TD Ancient Symbols) $(TD Georgian) $(TD NKo)) $(TR $(TD Arabic) $(TD Georgian Supplement) $(TD Number Forms)) $(TR $(TD Arabic Extended-A) $(TD Glagolitic) $(TD Ogham)) $(TR $(TD Arabic Mathematical Alphabetic Symbols) $(TD Gothic) $(TD Ol Chiki)) $(TR $(TD Arabic Presentation Forms-A) $(TD Greek and Coptic) $(TD Old Italic)) $(TR $(TD Arabic Presentation Forms-B) $(TD Greek Extended) $(TD Old Persian)) $(TR $(TD Arabic Supplement) $(TD Gujarati) $(TD Old South Arabian)) $(TR $(TD Armenian) $(TD Gurmukhi) $(TD Old Turkic)) $(TR $(TD Arrows) $(TD Halfwidth and Fullwidth Forms) $(TD Optical Character Recognition)) $(TR $(TD Avestan) $(TD Hangul Compatibility Jamo) $(TD Oriya)) $(TR $(TD Balinese) $(TD Hangul Jamo) $(TD Osmanya)) $(TR $(TD Bamum) $(TD Hangul Jamo Extended-A) $(TD Phags-pa)) $(TR $(TD Bamum Supplement) $(TD Hangul Jamo Extended-B) $(TD Phaistos Disc)) $(TR $(TD Basic Latin) $(TD Hangul Syllables) $(TD Phoenician)) $(TR $(TD Batak) $(TD Hanunoo) $(TD Phonetic Extensions)) $(TR $(TD Bengali) $(TD Hebrew) $(TD Phonetic Extensions Supplement)) $(TR $(TD Block Elements) $(TD High Private Use Surrogates) $(TD Playing Cards)) $(TR $(TD Bopomofo) $(TD High Surrogates) $(TD Private Use Area)) $(TR $(TD Bopomofo Extended) $(TD Hiragana) $(TD Rejang)) $(TR $(TD Box Drawing) $(TD Ideographic Description Characters) $(TD Rumi Numeral Symbols)) $(TR $(TD Brahmi) $(TD Imperial Aramaic) $(TD Runic)) $(TR $(TD Braille Patterns) $(TD Inscriptional Pahlavi) $(TD Samaritan)) $(TR $(TD Buginese) $(TD Inscriptional Parthian) $(TD Saurashtra)) $(TR $(TD Buhid) $(TD IPA Extensions) $(TD Sharada)) $(TR $(TD Byzantine Musical Symbols) $(TD Javanese) $(TD Shavian)) $(TR $(TD Carian) $(TD Kaithi) $(TD Sinhala)) $(TR $(TD Chakma) $(TD Kana Supplement) $(TD Small Form Variants)) $(TR $(TD Cham) $(TD Kanbun) $(TD Sora Sompeng)) $(TR $(TD Cherokee) $(TD Kangxi Radicals) $(TD Spacing Modifier Letters)) $(TR $(TD CJK Compatibility) $(TD Kannada) $(TD Specials)) $(TR $(TD CJK Compatibility Forms) $(TD Katakana) $(TD Sundanese)) $(TR $(TD CJK Compatibility Ideographs) $(TD Katakana Phonetic Extensions) $(TD Sundanese Supplement)) $(TR $(TD CJK Compatibility Ideographs Supplement) $(TD Kayah Li) $(TD Superscripts and Subscripts)) $(TR $(TD CJK Radicals Supplement) $(TD Kharoshthi) $(TD Supplemental Arrows-A)) $(TR $(TD CJK Strokes) $(TD Khmer) $(TD Supplemental Arrows-B)) $(TR $(TD CJK Symbols and Punctuation) $(TD Khmer Symbols) $(TD Supplemental Mathematical Operators)) $(TR $(TD CJK Unified Ideographs) $(TD Lao) $(TD Supplemental Punctuation)) $(TR $(TD CJK Unified Ideographs Extension A) $(TD Latin-1 Supplement) $(TD Supplementary Private Use Area-A)) $(TR $(TD CJK Unified Ideographs Extension B) $(TD Latin Extended-A) $(TD Supplementary Private Use Area-B)) $(TR $(TD CJK Unified Ideographs Extension C) $(TD Latin Extended Additional) $(TD Syloti Nagri)) $(TR $(TD CJK Unified Ideographs Extension D) $(TD Latin Extended-B) $(TD Syriac)) $(TR $(TD Combining Diacritical Marks) $(TD Latin Extended-C) $(TD Tagalog)) $(TR $(TD Combining Diacritical Marks for Symbols) $(TD Latin Extended-D) $(TD Tagbanwa)) $(TR $(TD Combining Diacritical Marks Supplement) $(TD Lepcha) $(TD Tags)) $(TR $(TD Combining Half Marks) $(TD Letterlike Symbols) $(TD Tai Le)) $(TR $(TD Common Indic Number Forms) $(TD Limbu) $(TD Tai Tham)) $(TR $(TD Control Pictures) $(TD Linear B Ideograms) $(TD Tai Viet)) $(TR $(TD Coptic) $(TD Linear B Syllabary) $(TD Tai Xuan Jing Symbols)) $(TR $(TD Counting Rod Numerals) $(TD Lisu) $(TD Takri)) $(TR $(TD Cuneiform) $(TD Low Surrogates) $(TD Tamil)) $(TR $(TD Cuneiform Numbers and Punctuation) $(TD Lycian) $(TD Telugu)) $(TR $(TD Currency Symbols) $(TD Lydian) $(TD Thaana)) $(TR $(TD Cypriot Syllabary) $(TD Mahjong Tiles) $(TD Thai)) $(TR $(TD Cyrillic) $(TD Malayalam) $(TD Tibetan)) $(TR $(TD Cyrillic Extended-A) $(TD Mandaic) $(TD Tifinagh)) $(TR $(TD Cyrillic Extended-B) $(TD Mathematical Alphanumeric Symbols) $(TD Transport And Map Symbols)) $(TR $(TD Cyrillic Supplement) $(TD Mathematical Operators) $(TD Ugaritic)) $(TR $(TD Deseret) $(TD Meetei Mayek) $(TD Unified Canadian Aboriginal Syllabics)) $(TR $(TD Devanagari) $(TD Meetei Mayek Extensions) $(TD Unified Canadian Aboriginal Syllabics Extended)) $(TR $(TD Devanagari Extended) $(TD Meroitic Cursive) $(TD Vai)) $(TR $(TD Dingbats) $(TD Meroitic Hieroglyphs) $(TD Variation Selectors)) $(TR $(TD Domino Tiles) $(TD Miao) $(TD Variation Selectors Supplement)) $(TR $(TD Egyptian Hieroglyphs) $(TD Miscellaneous Mathematical Symbols-A) $(TD Vedic Extensions)) $(TR $(TD Emoticons) $(TD Miscellaneous Mathematical Symbols-B) $(TD Vertical Forms)) $(TR $(TD Enclosed Alphanumerics) $(TD Miscellaneous Symbols) $(TD Yijing Hexagram Symbols)) $(TR $(TD Enclosed Alphanumeric Supplement) $(TD Miscellaneous Symbols and Arrows) $(TD Yi Radicals)) $(TR $(TD Enclosed CJK Letters and Months) $(TD Miscellaneous Symbols And Pictographs) $(TD Yi Syllables)) $(TR $(TD Enclosed Ideographic Supplement) $(TD Miscellaneous Technical) ) $(TR $(TD Ethiopic) $(TD Modifier Tone Letters) ) ) $(P Bellow is the table with script names accepted by $(LREF unicode.script) and by the shorthand version $(LREF unicode):) $(BOOKTABLE $(B Scripts), $(TR $(TD Arabic) $(TD Hanunoo) $(TD Old_Italic)) $(TR $(TD Armenian) $(TD Hebrew) $(TD Old_Persian)) $(TR $(TD Avestan) $(TD Hiragana) $(TD Old_South_Arabian)) $(TR $(TD Balinese) $(TD Imperial_Aramaic) $(TD Old_Turkic)) $(TR $(TD Bamum) $(TD Inherited) $(TD Oriya)) $(TR $(TD Batak) $(TD Inscriptional_Pahlavi) $(TD Osmanya)) $(TR $(TD Bengali) $(TD Inscriptional_Parthian) $(TD Phags_Pa)) $(TR $(TD Bopomofo) $(TD Javanese) $(TD Phoenician)) $(TR $(TD Brahmi) $(TD Kaithi) $(TD Rejang)) $(TR $(TD Braille) $(TD Kannada) $(TD Runic)) $(TR $(TD Buginese) $(TD Katakana) $(TD Samaritan)) $(TR $(TD Buhid) $(TD Kayah_Li) $(TD Saurashtra)) $(TR $(TD Canadian_Aboriginal) $(TD Kharoshthi) $(TD Sharada)) $(TR $(TD Carian) $(TD Khmer) $(TD Shavian)) $(TR $(TD Chakma) $(TD Lao) $(TD Sinhala)) $(TR $(TD Cham) $(TD Latin) $(TD Sora_Sompeng)) $(TR $(TD Cherokee) $(TD Lepcha) $(TD Sundanese)) $(TR $(TD Common) $(TD Limbu) $(TD Syloti_Nagri)) $(TR $(TD Coptic) $(TD Linear_B) $(TD Syriac)) $(TR $(TD Cuneiform) $(TD Lisu) $(TD Tagalog)) $(TR $(TD Cypriot) $(TD Lycian) $(TD Tagbanwa)) $(TR $(TD Cyrillic) $(TD Lydian) $(TD Tai_Le)) $(TR $(TD Deseret) $(TD Malayalam) $(TD Tai_Tham)) $(TR $(TD Devanagari) $(TD Mandaic) $(TD Tai_Viet)) $(TR $(TD Egyptian_Hieroglyphs) $(TD Meetei_Mayek) $(TD Takri)) $(TR $(TD Ethiopic) $(TD Meroitic_Cursive) $(TD Tamil)) $(TR $(TD Georgian) $(TD Meroitic_Hieroglyphs) $(TD Telugu)) $(TR $(TD Glagolitic) $(TD Miao) $(TD Thaana)) $(TR $(TD Gothic) $(TD Mongolian) $(TD Thai)) $(TR $(TD Greek) $(TD Myanmar) $(TD Tibetan)) $(TR $(TD Gujarati) $(TD New_Tai_Lue) $(TD Tifinagh)) $(TR $(TD Gurmukhi) $(TD Nko) $(TD Ugaritic)) $(TR $(TD Han) $(TD Ogham) $(TD Vai)) $(TR $(TD Hangul) $(TD Ol_Chiki) $(TD Yi)) ) $(P Bellow is the table of names accepted by $(LREF unicode.hangulSyllableType).) $(BOOKTABLE $(B Hangul syllable type), $(TR $(TH Abb.) $(TH Long form)) $(TR $(TD L) $(TD Leading_Jamo)) $(TR $(TD LV) $(TD LV_Syllable)) $(TR $(TD LVT) $(TD LVT_Syllable) ) $(TR $(TD T) $(TD Trailing_Jamo)) $(TR $(TD V) $(TD Vowel_Jamo)) ) References: $(WEB www.digitalmars.com/d/ascii-table.html, ASCII Table), $(WEB en.wikipedia.org/wiki/Unicode, Wikipedia), $(WEB www.unicode.org, The Unicode Consortium), $(WEB www.unicode.org/reports/tr15/, Unicode normalization forms), $(WEB www.unicode.org/reports/tr29/, Unicode text segmentation) $(WEB www.unicode.org/uni2book/ch05.pdf, Unicode Implementation Guidelines) $(WEB www.unicode.org/uni2book/ch03.pdf, Unicode Conformance) Trademarks: Unicode(tm) is a trademark of Unicode, Inc. Macros: WIKI=Phobos/StdUni Copyright: Copyright 2013 - License: $(WEB www.boost.org/LICENSE_1_0.txt, Boost License 1.0). Authors: Dmitry Olshansky Source: $(PHOBOSSRC std/_uni.d) Standards: $(WEB www.unicode.org/versions/Unicode6.2.0/, Unicode v6.2) Macros: SECTION = <h3><a id="$1">$0</a></h3> DEF = <div><a id="$1"><i>$0</i></a></div> S_LINK = <a href="#$1">$+</a> CODEPOINT = $(S_LINK Code point, code point) CODEPOINTS = $(S_LINK Code point, code points) CHARACTER = $(S_LINK Character, character) CHARACTERS = $(S_LINK Character, characters) CLUSTER = $(S_LINK Grapheme cluster, grapheme cluster) +/ module std.uni; static import std.ascii; import std.traits, std.range, std.algorithm, std.typecons, std.format, std.conv, std.typetuple, std.exception, core.stdc.stdlib; import std.array; //@@BUG UFCS doesn't work with 'local' imports import core.bitop; // debug = std_uni; debug(std_uni) import std.stdio; private: version(std_uni_bootstrap){} else { import std.internal.unicode_tables; // generated file } void copyBackwards(T)(T[] src, T[] dest) { assert(src.length == dest.length); for(size_t i=src.length; i-- > 0; ) dest[i] = src[i]; } void copyForward(T)(T[] src, T[] dest) { assert(src.length == dest.length); for(size_t i=0; i<src.length; i++) dest[i] = src[i]; } // TODO: update to reflect all major CPUs supporting unaligned reads version(X86) enum hasUnalignedReads = true; else version(X86_64) enum hasUnalignedReads = true; else enum hasUnalignedReads = false; // better be safe then sorry public enum dchar lineSep = '\u2028'; /// Constant $(CODEPOINT) (0x2028) - line separator. public enum dchar paraSep = '\u2029'; /// Constant $(CODEPOINT) (0x2029) - paragraph separator. // test the intro example unittest { // initialize code point sets using script/block or property name // set contains code points from both scripts. auto set = unicode("Cyrillic") | unicode("Armenian"); // or simpler and statically-checked look auto ascii = unicode.ASCII; auto currency = unicode.Currency_Symbol; // easy set ops auto a = set & ascii; assert(a.empty); // as it has no intersection with ascii a = set | ascii; auto b = currency - a; // subtract all ASCII, Cyrillic and Armenian // some properties of code point sets assert(b.length > 45); // 46 items in Unicode 6.1, even more in 6.2 // testing presence of a code point in a set // is just fine, it is O(logN) assert(!b['$']); assert(!b['\u058F']); // Armenian dram sign assert(b['¥']); // building fast lookup tables, these guarantee O(1) complexity // 1-level Trie lookup table essentially a huge bit-set ~262Kb auto oneTrie = toTrie!1(b); // 2-level far more compact but typically slightly slower auto twoTrie = toTrie!2(b); // 3-level even smaller, and a bit slower yet auto threeTrie = toTrie!3(b); assert(oneTrie['£']); assert(twoTrie['£']); assert(threeTrie['£']); // build the trie with the most sensible trie level // and bind it as a functor auto cyrilicOrArmenian = toDelegate(set); auto balance = find!(cyrilicOrArmenian)("Hello ընկեր!"); assert(balance == "ընկեր!"); // compatible with bool delegate(dchar) bool delegate(dchar) bindIt = cyrilicOrArmenian; // Normalization string s = "Plain ascii (and not only), is always normalized!"; assert(s is normalize(s));// is the same string string nonS = "A\u0308ffin"; // A ligature auto nS = normalize(nonS); // to NFC, the W3C endorsed standard assert(nS == "Äffin"); assert(nS != nonS); string composed = "Äffin"; assert(normalize!NFD(composed) == "A\u0308ffin"); // to NFKD, compatibility decomposition useful for fuzzy matching/searching assert(normalize!NFKD("2¹⁰") == "210"); } enum lastDchar = 0x10FFFF; auto force(T, F)(F from) if(isIntegral!T && !is(T == F)) { assert(from <= T.max && from >= T.min); return cast(T)from; } auto force(T, F)(F from) if(isBitPacked!T && !is(T == F)) { assert(from <= 2^^bitSizeOf!T-1); return T(cast(TypeOfBitPacked!T)from); } auto force(T, F)(F from) if(is(T == F)) { return from; } // cheap algorithm grease ;) auto adaptIntRange(T, F)(F[] src) { //@@@BUG when in the 9 hells will map be copyable again?! static struct ConvertIntegers { private F[] data; @property T front() { return force!T(data.front); } void popFront(){ data.popFront(); } @property bool empty()const { return data.empty; } @property size_t length()const { return data.length; } auto opSlice(size_t s, size_t e) { return ConvertIntegers(data[s..e]); } @property size_t opDollar(){ return data.length; } } return ConvertIntegers(src); } // repeat X times the bit-pattern in val assuming it's length is 'bits' size_t replicateBits(size_t times, size_t bits)(size_t val) { static if(times == 1) return val; else static if(times % 2) return (replicateBits!(times-1, bits)(val)<<bits) | val; else return replicateBits!(times/2, bits*2)((val<<bits) | val); } unittest // for replicate { size_t m = 0b111; size_t m2 = 0b01; foreach(i; TypeTuple!(1, 2, 3, 4, 5, 6, 7, 8, 9, 10)) { assert(replicateBits!(i, 3)(m)+1 == (1<<(3*i))); assert(replicateBits!(i, 2)(m2) == iota(0, i).map!"2^^(2*a)"().reduce!"a+b"()); } } // multiple arrays squashed into one memory block struct MultiArray(Types...) { this(size_t[] sizes...) { size_t full_size; foreach(i, v; Types) { full_size += spaceFor!(bitSizeOf!v)(sizes[i]); sz[i] = sizes[i]; static if(i >= 1) offsets[i] = offsets[i-1] + spaceFor!(bitSizeOf!(Types[i-1]))(sizes[i-1]); } storage = new size_t[full_size]; } this(const(size_t)[] raw_offsets, const(size_t)[] raw_sizes, const(size_t)[] data)const { offsets[] = raw_offsets[]; sz[] = raw_sizes[]; storage = data; } @property auto slice(size_t n)()inout pure nothrow { auto ptr = raw_ptr!n; return packedArrayView!(Types[n])(ptr, sz[n]); } @property auto ptr(size_t n)()inout pure nothrow { auto ptr = raw_ptr!n; return inout(PackedPtr!(Types[n]))(ptr); } template length(size_t n) { @property size_t length()const{ return sz[n]; } @property void length(size_t new_size) { if(new_size > sz[n]) {// extend size_t delta = (new_size - sz[n]); sz[n] += delta; delta = spaceFor!(bitSizeOf!(Types[n]))(delta); storage.length += delta;// extend space at end // raw_slice!x must follow resize as it could be moved! // next stmts move all data past this array, last-one-goes-first static if(n != dim-1) { auto start = raw_ptr!(n+1); // len includes delta size_t len = (storage.ptr+storage.length-start); copyBackwards(start[0..len-delta], start[delta..len]); start[0..delta] = 0; // offsets are used for raw_slice, ptr etc. foreach(i; n+1..dim) offsets[i] += delta; } } else if(new_size < sz[n]) {// shrink size_t delta = (sz[n] - new_size); sz[n] -= delta; delta = spaceFor!(bitSizeOf!(Types[n]))(delta); // move all data past this array, forward direction static if(n != dim-1) { auto start = raw_ptr!(n+1); size_t len = storage.length; copyForward(start[0..len-delta], start[delta..len]); // adjust offsets last, they affect raw_slice foreach(i; n+1..dim) offsets[i] -= delta; } storage.length -= delta; } // else - NOP } } @property size_t bytes(size_t n=size_t.max)() const { static if(n == size_t.max) return storage.length*size_t.sizeof; else static if(n != Types.length-1) return (raw_ptr!(n+1)-raw_ptr!n)*size_t.sizeof; else return (storage.ptr+storage.length - raw_ptr!n)*size_t.sizeof; } void store(OutRange)(scope OutRange sink) const if(isOutputRange!(OutRange, char)) { formattedWrite(sink, "[%( 0x%x, %)]", offsets[]); formattedWrite(sink, ", [%( 0x%x, %)]", sz[]); formattedWrite(sink, ", [%( 0x%x, %)]", storage); } private: @property auto raw_ptr(size_t n)()inout { static if(n == 0) return storage.ptr; else { return storage.ptr+offsets[n]; } } enum dim = Types.length; size_t[dim] offsets;// offset for level x size_t[dim] sz;// size of level x alias staticMap!(bitSizeOf, Types) bitWidth; size_t[] storage; } unittest { // sizes are: // lvl0: 3, lvl1 : 2, lvl2: 1 auto m = MultiArray!(int, ubyte, int)(3,2,1); static void check(size_t k, T)(ref T m, int n) { foreach(i; 0..n) assert(m.slice!(k)[i] == i+1, text("level:",i," : ",m.slice!(k)[0..n])); } static void checkB(size_t k, T)(ref T m, int n) { foreach(i; 0..n) assert(m.slice!(k)[i] == n-i, text("level:",i," : ",m.slice!(k)[0..n])); } static void fill(size_t k, T)(ref T m, int n) { foreach(i; 0..n) m.slice!(k)[i] = force!ubyte(i+1); } static void fillB(size_t k, T)(ref T m, int n) { foreach(i; 0..n) m.slice!(k)[i] = force!ubyte(n-i); } m.length!1 = 100; fill!1(m, 100); check!1(m, 100); m.length!0 = 220; fill!0(m, 220); check!1(m, 100); check!0(m, 220); m.length!2 = 17; fillB!2(m, 17); checkB!2(m, 17); check!0(m, 220); check!1(m, 100); m.length!2 = 33; checkB!2(m, 17); fillB!2(m, 33); checkB!2(m, 33); check!0(m, 220); check!1(m, 100); m.length!1 = 195; fillB!1(m, 195); checkB!1(m, 195); checkB!2(m, 33); check!0(m, 220); auto marr = MultiArray!(BitPacked!(uint, 4), BitPacked!(uint, 6))(20, 10); marr.length!0 = 15; marr.length!1 = 30; fill!1(marr, 30); fill!0(marr, 15); check!1(marr, 30); check!0(marr, 15); } unittest {// more bitpacking tests alias MultiArray!(BitPacked!(size_t, 3) , BitPacked!(size_t, 4) , BitPacked!(size_t, 3) , BitPacked!(size_t, 6) , bool) Bitty; alias sliceBits!(13, 16) fn1; alias sliceBits!( 9, 13) fn2; alias sliceBits!( 6, 9) fn3; alias sliceBits!( 0, 6) fn4; static void check(size_t lvl, MA)(ref MA arr){ for(size_t i = 0; i< arr.length!lvl; i++) assert(arr.slice!(lvl)[i] == i, text("Mismatch on lvl ", lvl, " idx ", i, " value: ", arr.slice!(lvl)[i])); } static void fillIdx(size_t lvl, MA)(ref MA arr){ for(size_t i = 0; i< arr.length!lvl; i++) arr.slice!(lvl)[i] = i; } Bitty m1; m1.length!4 = 10; m1.length!3 = 2^^6; m1.length!2 = 2^^3; m1.length!1 = 2^^4; m1.length!0 = 2^^3; m1.length!4 = 2^^16; for(size_t i = 0; i< m1.length!4; i++) m1.slice!(4)[i] = i % 2; fillIdx!1(m1); check!1(m1); fillIdx!2(m1); check!2(m1); fillIdx!3(m1); check!3(m1); fillIdx!0(m1); check!0(m1); check!3(m1); check!2(m1); check!1(m1); for(size_t i=0; i < 2^^16; i++) { m1.slice!(4)[i] = i % 2; m1.slice!(0)[fn1(i)] = fn1(i); m1.slice!(1)[fn2(i)] = fn2(i); m1.slice!(2)[fn3(i)] = fn3(i); m1.slice!(3)[fn4(i)] = fn4(i); } for(size_t i=0; i < 2^^16; i++) { assert(m1.slice!(4)[i] == i % 2); assert(m1.slice!(0)[fn1(i)] == fn1(i)); assert(m1.slice!(1)[fn2(i)] == fn2(i)); assert(m1.slice!(2)[fn3(i)] == fn3(i)); assert(m1.slice!(3)[fn4(i)] == fn4(i)); } } size_t spaceFor(size_t _bits)(size_t new_len) pure nothrow { enum bits = _bits == 1 ? 1 : ceilPowerOf2(_bits);// see PackedArrayView static if(bits > 8*size_t.sizeof) { static assert(bits % (size_t.sizeof*8) == 0); return new_len * bits/(8*size_t.sizeof); } else { enum factor = size_t.sizeof*8/bits; return (new_len+factor-1)/factor; // rounded up } } template isBitPackableType(T) { enum isBitPackableType = isBitPacked!T || isIntegral!T || is(T == bool) || isSomeChar!T; } //============================================================================ template PackedArrayView(T) if((is(T dummy == BitPacked!(U, sz), U, size_t sz) && isBitPackableType!U) || isBitPackableType!T) { private enum bits = bitSizeOf!T; alias PackedArrayView = PackedArrayViewImpl!(T, bits > 1 ? ceilPowerOf2(bits) : 1); } //unsafe and fast access to a chunk of RAM as if it contains packed values template PackedPtr(T) if((is(T dummy == BitPacked!(U, sz), U, size_t sz) && isBitPackableType!U) || isBitPackableType!T) { private enum bits = bitSizeOf!T; alias PackedPtr = PackedPtrImpl!(T, bits > 1 ? ceilPowerOf2(bits) : 1); } @trusted struct PackedPtrImpl(T, size_t bits) { pure nothrow: static assert(isPowerOf2(bits)); this(inout(size_t)* ptr)inout { origin = ptr; } private T simpleIndex(size_t n) inout { static if(factor == bytesPerWord*8) { // a re-write with less data dependency auto q = n / factor; auto r = n % factor; return cast(T)(origin[q] & (mask<<r) ? 1 : 0); } else { auto q = n / factor; auto r = n % factor; return cast(T)((origin[q] >> bits*r) & mask); } } static if(factor == bytesPerWord// can safely pack by byte || factor == 1 // a whole word at a time || ((factor == bytesPerWord/2 || factor == bytesPerWord/4) && hasUnalignedReads)) // this needs unaligned reads { static if(factor == bytesPerWord) alias U = ubyte; else static if(factor == bytesPerWord/2) alias U = ushort; else static if(factor == bytesPerWord/4) alias U = uint; else static if(size_t.sizeof == 8 && factor == bytesPerWord/8) alias U = ulong; T opIndex(size_t idx) inout { return __ctfe ? simpleIndex(idx) : cast(inout(T))(cast(U*)origin)[idx]; } static if(isBitPacked!T) // lack of user-defined implicit conversion { void opIndexAssign(T val, size_t idx) { return opIndexAssign(cast(TypeOfBitPacked!T)val, idx); } } void opIndexAssign(TypeOfBitPacked!T val, size_t idx) { (cast(U*)origin)[idx] = cast(U)val; } } else { T opIndex(size_t n) inout { return simpleIndex(n); } static if(isBitPacked!T) // lack of user-defined implicit conversion { void opIndexAssign(T val, size_t idx) { return opIndexAssign(cast(TypeOfBitPacked!T)val, idx); } } void opIndexAssign(TypeOfBitPacked!T val, size_t n) in { static if(isIntegral!T) assert(val <= mask); } body { auto q = n / factor; auto r = n % factor; size_t tgt_shift = bits*r; size_t word = origin[q]; origin[q] = (word & ~(mask<<tgt_shift)) | (cast(size_t)val << tgt_shift); } } private: // factor - number of elements in one machine word enum factor = size_t.sizeof*8/bits, mask = 2^^bits-1; enum bytesPerWord = size_t.sizeof; size_t* origin; } // data is packed only by power of two sized packs per word, // thus avoiding mul/div overhead at the cost of ultimate packing // this construct doesn't own memory, only provides access, see MultiArray for usage @trusted struct PackedArrayViewImpl(T, size_t bits) { pure nothrow: this(inout(size_t)* origin, size_t items)inout { ptr = inout(PackedPtr!(T))(origin); limit = items; } T opIndex(size_t idx) inout in { assert(idx < limit); } body { return ptr[idx]; } static if(isBitPacked!T) // lack of user-defined implicit conversion { void opIndexAssign(T val, size_t idx) { return opIndexAssign(cast(TypeOfBitPacked!T)val, idx); } } void opIndexAssign(TypeOfBitPacked!T val, size_t idx) in { assert(idx < limit); } body { ptr[idx] = val; } static if(isBitPacked!T) // lack of user-defined implicit conversions { void opSliceAssign(T val, size_t start, size_t end) { opSliceAssign(cast(TypeOfBitPacked!T)val, start, end); } } void opSliceAssign(TypeOfBitPacked!T val, size_t start, size_t end) in { assert(start <= end); assert(end <= limit); } body { // rounded to factor granularity size_t pad_start = (start+factor-1)/factor*factor;// rounded up if(pad_start >= end) //rounded up >= then end of slice { //nothing to gain, use per element assignment foreach(i; start..end) ptr[i] = val; return; } size_t pad_end = end/factor*factor; // rounded down size_t i; for(i=start; i<pad_start; i++) ptr[i] = val; // all in between is x*factor elements if(pad_start != pad_end) { size_t repval = replicateBits!(factor, bits)(val); for(size_t j=i/factor; i<pad_end; i+=factor, j++) ptr.origin[j] = repval;// so speed it up by factor } for(; i<end; i++) ptr[i] = val; } auto opSlice(size_t from, size_t to) { return sliceOverIndexed(from, to, &this); } auto opSlice(){ return opSlice(0, length); } bool opEquals(T)(auto ref T arr) const { if(length != arr.length) return false; for(size_t i=0;i<length; i++) if(this[i] != arr[i]) return false; return true; } @property size_t length()const{ return limit; } private: // factor - number of elements in one machine word enum factor = size_t.sizeof*8/bits; PackedPtr!(T) ptr; size_t limit; } private struct SliceOverIndexed(T) { enum assignableIndex = is(typeof((){ T.init[0] = Item.init; })); enum assignableSlice = is(typeof((){ T.init[0..0] = Item.init; })); auto opIndex(size_t idx)const in { assert(idx < to - from); } body { return (*arr)[from+idx]; } static if(assignableIndex) void opIndexAssign(Item val, size_t idx) in { assert(idx < to - from); } body { (*arr)[from+idx] = val; } auto opSlice(size_t a, size_t b) { return typeof(this)(from+a, from+b, arr); } // static if(assignableSlice) void opSliceAssign(T)(T val, size_t start, size_t end) { (*arr)[start+from .. end+from] = val; } auto opSlice() { return typeof(this)(from, to, arr); } @property size_t length()const { return to-from;} auto opDollar()const { return length; } @property bool empty()const { return from == to; } @property auto front()const { return (*arr)[from]; } static if(assignableIndex) @property void front(Item val) { (*arr)[from] = val; } @property auto back()const { return (*arr)[to-1]; } static if(assignableIndex) @property void back(Item val) { (*arr)[to-1] = val; } @property auto save() inout { return this; } void popFront() { from++; } void popBack() { to--; } bool opEquals(T)(auto ref T arr) const { if(arr.length != length) return false; for(size_t i=0; i <length; i++) if(this[i] != arr[i]) return false; return true; } private: alias typeof(T.init[0]) Item; size_t from, to; T* arr; } static assert(isRandomAccessRange!(SliceOverIndexed!(int[]))); // BUG? forward reference to return type of sliceOverIndexed!Grapheme SliceOverIndexed!(const(T)) sliceOverIndexed(T)(size_t a, size_t b, const(T)* x) if(is(Unqual!T == T)) { return SliceOverIndexed!(const(T))(a, b, x); } // BUG? inout is out of reach //...SliceOverIndexed.arr only parameters or stack based variables can be inout SliceOverIndexed!T sliceOverIndexed(T)(size_t a, size_t b, T* x) if(is(Unqual!T == T)) { return SliceOverIndexed!T(a, b, x); } unittest { int[] idxArray = [2, 3, 5, 8, 13]; auto sliced = sliceOverIndexed(0, idxArray.length, &idxArray); assert(!sliced.empty); assert(sliced.front == 2); sliced.front = 1; assert(sliced.front == 1); assert(sliced.back == 13); sliced.popFront(); assert(sliced.front == 3); assert(sliced.back == 13); sliced.back = 11; assert(sliced.back == 11); sliced.popBack(); assert(sliced.front == 3); assert(sliced[$-1] == 8); sliced = sliced[]; assert(sliced[0] == 3); assert(sliced.back == 8); sliced = sliced[1..$]; assert(sliced.front == 5); sliced = sliced[0..$-1]; assert(sliced[$-1] == 5); int[] other = [2, 5]; assert(sliced[] == sliceOverIndexed(1, 2, &other)); sliceOverIndexed(0, 2, &idxArray)[0..2] = -1; assert(idxArray[0..2] == [-1, -1]); uint[] nullArr = null; auto nullSlice = sliceOverIndexed(0, 0, &idxArray); assert(nullSlice.empty); } private auto packedArrayView(T)(inout(size_t)* ptr, size_t items) @trusted pure nothrow { return inout(PackedArrayView!T)(ptr, items); } //============================================================================ // Partially unrolled binary search using Shar's method //============================================================================ string genUnrolledSwitchSearch(size_t size) { assert(isPowerOf2(size)); string code = `auto power = bsr(m)+1; switch(power){`; size_t i = bsr(size); foreach_reverse(val; 0..bsr(size)) { auto v = 2^^val; code ~= ` case pow: if(pred(range[idx+m], needle)) idx += m; goto case; `.replace("m", to!string(v)) .replace("pow", to!string(i)); i--; } code ~= ` case 0: if(pred(range[idx], needle)) idx += 1; goto default; `; code ~= ` default: }`; return code; } bool isPowerOf2(size_t sz) @safe pure nothrow { return (sz & (sz-1)) == 0; } size_t uniformLowerBound(alias pred, Range, T)(Range range, T needle) if(is(T : ElementType!Range)) { assert(isPowerOf2(range.length)); size_t idx = 0, m = range.length/2; while(m != 0) { if(pred(range[idx+m], needle)) idx += m; m /= 2; } if(pred(range[idx], needle)) idx += 1; return idx; } size_t switchUniformLowerBound(alias pred, Range, T)(Range range, T needle) if(is(T : ElementType!Range)) { assert(isPowerOf2(range.length)); size_t idx = 0, m = range.length/2; enum max = 1<<10; while(m >= max) { if(pred(range[idx+m], needle)) idx += m; m /= 2; } mixin(genUnrolledSwitchSearch(max)); return idx; } // size_t floorPowerOf2(size_t arg) @safe pure nothrow { assert(arg > 1); // else bsr is undefined return 1<<bsr(arg-1); } size_t ceilPowerOf2(size_t arg) @safe pure nothrow { assert(arg > 1); // else bsr is undefined return 1<<bsr(arg-1)+1; } template sharMethod(alias uniLowerBound) { size_t sharMethod(alias _pred="a<b", Range, T)(Range range, T needle) if(is(T : ElementType!Range)) { import std.functional; alias binaryFun!_pred pred; if(range.length == 0) return 0; if(isPowerOf2(range.length)) return uniLowerBound!pred(range, needle); size_t n = floorPowerOf2(range.length); if(pred(range[n-1], needle)) {// search in another 2^^k area that fully covers the tail of range size_t k = ceilPowerOf2(range.length - n + 1); return range.length - k + uniLowerBound!pred(range[$-k..$], needle); } else return uniLowerBound!pred(range[0..n], needle); } } alias sharMethod!uniformLowerBound sharLowerBound; alias sharMethod!switchUniformLowerBound sharSwitchLowerBound; unittest { auto stdLowerBound(T)(T[] range, T needle) { return assumeSorted(range).lowerBound(needle).length; } immutable MAX = 5*1173; auto arr = array(iota(5, MAX, 5)); assert(arr.length == MAX/5-1); foreach(i; 0..MAX+5) { auto std = stdLowerBound(arr, i); assert(std == sharLowerBound(arr, i)); assert(std == sharSwitchLowerBound(arr, i)); } arr = []; auto std = stdLowerBound(arr, 33); assert(std == sharLowerBound(arr, 33)); assert(std == sharSwitchLowerBound(arr, 33)); } //============================================================================ @safe: // hope to see simillar stuff in public interface... once Allocators are out //@@@BUG moveFront and friends? dunno, for now it's POD-only @trusted size_t genericReplace(Policy=void, T, Range) (ref T dest, size_t from, size_t to, Range stuff) { size_t delta = to - from; size_t stuff_end = from+stuff.length; if(stuff.length > delta) {// replace increases length delta = stuff.length - delta;// now, new is > old by delta static if(is(Policy == void)) dest.length = dest.length+delta;//@@@BUG lame @property else dest = Policy.realloc(dest, dest.length+delta); auto rem = copy(retro(dest[to..dest.length-delta]) , retro(dest[to+delta..dest.length])); assert(rem.empty); copy(stuff, dest[from..stuff_end]); } else if(stuff.length == delta) { copy(stuff, dest[from..to]); } else {// replace decreases length by delta delta = delta - stuff.length; copy(stuff, dest[from..stuff_end]); auto rem = copy(dest[to..dest.length] , dest[stuff_end..dest.length-delta]); static if(is(Policy == void)) dest.length = dest.length - delta;//@@@BUG lame @property else dest = Policy.realloc(dest, dest.length-delta); assert(rem.empty); } return stuff_end; } // Simple storage manipulation policy @trusted public struct GcPolicy { static T[] dup(T)(const T[] arr) { return arr.dup; } static T[] alloc(T)(size_t size) { return new T[size]; } static T[] realloc(T)(T[] arr, size_t sz) { arr.length = sz; return arr; } static void replaceImpl(T, Range)(ref T[] dest, size_t from, size_t to, Range stuff) { replaceInPlace(dest, from, to, stuff); } static void append(T, V)(ref T[] arr, V value) if(!isInputRange!V) { arr ~= force!T(value); } static void append(T, V)(ref T[] arr, V value) if(isInputRange!V) { insertInPlace(arr, arr.length, value); } static void destroy(T)(ref T arr) if(isDynamicArray!T && is(Unqual!T == T)) { debug { arr[] = cast(typeof(T.init[0]))(0xdead_beef); } arr = null; } static void destroy(T)(ref T arr) if(isDynamicArray!T && !is(Unqual!T == T)) { arr = null; } } // ditto @trusted struct ReallocPolicy { static T[] dup(T)(const T[] arr) { auto result = alloc!T(arr.length); result[] = arr[]; return result; } static T[] alloc(T)(size_t size) { auto ptr = cast(T*)enforce(malloc(T.sizeof*size), "out of memory on C heap"); return ptr[0..size]; } static T[] realloc(T)(T[] arr, size_t size) { if(!size) { destroy(arr); return null; } auto ptr = cast(T*)enforce(core.stdc.stdlib.realloc( arr.ptr, T.sizeof*size), "out of memory on C heap"); return ptr[0..size]; } static void replaceImpl(T, Range)(ref T[] dest, size_t from, size_t to, Range stuff) { genericReplace!(ReallocPolicy)(dest, from, to, stuff); } static void append(T, V)(ref T[] arr, V value) if(!isInputRange!V) { arr = realloc(arr, arr.length+1); arr[$-1] = force!T(value); } static void append(T, V)(ref T[] arr, V value) if(isInputRange!V && hasLength!V) { arr = realloc(arr, arr.length+value.length); copy(value, arr[$-value.length..$]); } static void destroy(T)(ref T[] arr) { if(arr.ptr) free(arr.ptr); arr = null; } } //build hack alias Uint24Array!ReallocPolicy _RealArray; unittest { with(ReallocPolicy) { bool test(T, U, V)(T orig, size_t from, size_t to, U toReplace, V result, string file = __FILE__, size_t line = __LINE__) { { replaceImpl(orig, from, to, toReplace); scope(exit) destroy(orig); if(!equalS(orig, result)) return false; } return true; } static T[] arr(T)(T[] args... ) { return dup(args); } assert(test(arr([1, 2, 3, 4]), 0, 0, [5, 6, 7], [5, 6, 7, 1, 2, 3, 4])); assert(test(arr([1, 2, 3, 4]), 0, 2, cast(int[])[], [3, 4])); assert(test(arr([1, 2, 3, 4]), 0, 4, [5, 6, 7], [5, 6, 7])); assert(test(arr([1, 2, 3, 4]), 0, 2, [5, 6, 7], [5, 6, 7, 3, 4])); assert(test(arr([1, 2, 3, 4]), 2, 3, [5, 6, 7], [1, 2, 5, 6, 7, 4])); } } /** Tests if T is some kind a set of code points. Intended for template constraints. */ public template isCodepointSet(T) { static if(is(T dummy == InversionList!(Args), Args...)) enum isCodepointSet = true; else enum isCodepointSet = false; } /** Tests if $(D T) is a pair of integers that implicitly convert to $(D V). The following code must compile for any pair $(D T): --- (T x){ V a = x[0]; V b = x[1];} --- The following must not compile: --- (T x){ V c = x[2];} --- */ public template isIntegralPair(T, V=uint) { enum isIntegralPair = is(typeof((T x){ V a = x[0]; V b = x[1];})) && !is(typeof((T x){ V c = x[2]; })); } /** The recommended default type for set of $(CODEPOINTS). For details, see the current implementation: $(LREF InversionList). */ public alias InversionList!GcPolicy CodepointSet; //@@@BUG: std.typecons tuples depend on std.format to produce fields mixin // which relies on std.uni.isGraphical and this chain blows up with Forward reference error // hence below doesn't seem to work // public alias Tuple!(uint, "a", uint, "b") CodepointInterval; /** The recommended type of $(XREF _typecons, Tuple) to represent [a, b$(RPAREN) intervals of $(CODEPOINTS). As used in $(LREF InversionList). Any interval type should pass $(LREF isIntegralPair) trait. */ public struct CodepointInterval { uint[2] _tuple; alias _tuple this; this(uint low, uint high){ _tuple[0] = low; _tuple[1] = high; } bool opEquals(T)(T val){ return this[0] == val[0] && this[1] == val[1]; } @property ref uint a(){ return _tuple[0]; } @property ref uint b(){ return _tuple[1]; } } //@@@BUG another forward reference workaround @trusted bool equalS(R1, R2)(R1 lhs, R2 rhs) { for(;;){ if(lhs.empty) return rhs.empty; if(rhs.empty) return false; if(lhs.front != rhs.front) return false; lhs.popFront(); rhs.popFront(); } } /** $(P $(D InversionList) is a set of $(CODEPOINTS) represented as an array of open-right [a, b$(RPAREN) intervals (see $(LREF CodepointInterval) above). The name comes from the way the representation reads left to right. For instance a set of all values [10, 50$(RPAREN), [80, 90$(RPAREN), plus a singular value 60 looks like this: ) --- 10, 50, 60, 61, 80, 90 --- $(P The way to read this is: start with negative meaning that all numbers smaller then the next one are not present in this set (and positive - the contrary). Then switch positive/negative after each number passed from left to right. ) $(P This way negative spans until 10, then positive until 50, then negative until 60, then positive until 61, and so on. As seen this provides a space-efficient storage of highly redundant data that comes in long runs. A description which Unicode $(CHARACTER) properties fit nicely. The technique itself could be seen as a variation on $(LUCKY RLE encoding). ) $(P Sets are value types (just like $(D int) is) thus they are never aliased. ) Example: --- auto a = CodepointSet('a', 'z'+1); auto b = CodepointSet('A', 'Z'+1); auto c = a; a = a | b; assert(a == CodepointSet('A', 'Z'+1, 'a', 'z'+1)); assert(a != c); --- $(P See also $(LREF unicode) for simpler construction of sets from predefined ones. ) $(P Memory usage is 6 bytes per each contiguous interval in a set. The value semantics are achieved by using the ($WEB http://en.wikipedia.org/wiki/Copy-on-write, COW) technique and thus it's $(RED not) safe to cast this type to $(D_KEYWORD shared). ) Note: $(P It's not recommended to rely on the template parameters or the exact type of a current $(CODEPOINT) set in $(D std.uni). The type and parameters may change when the standard allocators design is finalized. Use $(LREF isCodepointSet) with templates or just stick with the default alias $(LREF CodepointSet) throughout the whole code base. ) */ @trusted public struct InversionList(SP=GcPolicy) { public: /** Construct from another code point set of any type. */ this(Set)(Set set) if(isCodepointSet!Set) { uint[] arr; foreach(v; set.byInterval) { arr ~= v.a; arr ~= v.b; } data = Uint24Array!(SP)(arr); } /** Construct a set from a range of sorted code point intervals. */ this(Range)(Range intervals) if(isForwardRange!Range && isIntegralPair!(ElementType!Range)) { auto flattened = roundRobin(intervals.save.map!"a[0]"(), intervals.save.map!"a[1]"()); data = Uint24Array!(SP)(flattened); } /** Construct a set from plain values of sorted code point intervals. Example: --- auto set = CodepointSet('a', 'z'+1, 'а', 'я'+1); foreach(v; 'a'..'z'+1) assert(set[v]); // Cyrillic lowercase interval foreach(v; 'а'..'я'+1) assert(set[v]); --- */ this()(uint[] intervals...) in { assert(intervals.length % 2 == 0, "Odd number of interval bounds [a, b)!"); for(uint i=1; i<intervals.length; i++) assert(intervals[i-1] < intervals[i]); } body { data = Uint24Array!(SP)(intervals); } /** Get range that spans all of the $(CODEPOINT) intervals in this $(LREF InversionList). Example: --- import std.algorithm, std.typecons; auto set = CodepointSet('A', 'D'+1, 'a', 'd'+1); set.byInterval.equal([tuple('A', 'E'), tuple('a', 'e')]); --- */ @property auto byInterval() { static struct Intervals { this(Uint24Array!SP sp) { slice = sp; start = 0; end = sp.length; } @property auto front()const { uint a = slice[start]; uint b = slice[start+1]; return CodepointInterval(a, b); } @property auto back()const { uint a = slice[end-2]; uint b = slice[end-1]; return CodepointInterval(a, b); } void popFront() { start += 2; } void popBack() { end -= 2; } @property bool empty()const { return start == end; } @property auto save(){ return this; } private: size_t start, end; Uint24Array!SP slice; } return Intervals(data); } /** Tests the presence of code point $(D val) in this set. Example: --- auto gothic = unicode.Gothic; // Gothic letter ahsa assert(gothic['\U00010330']); // no ascii in Gothic obviously assert(!gothic['$']); --- */ bool opIndex(uint val) const { // the <= ensures that searching in interval of [a, b) for 'a' you get .length == 1 // return assumeSorted!((a,b) => a<=b)(data[]).lowerBound(val).length & 1; return sharSwitchLowerBound!"a<=b"(data[], val) & 1; } /// Number of $(CODEPOINTS) in this set @property size_t length() { size_t sum = 0; foreach(iv; byInterval) { sum += iv.b - iv.a; } return sum; } // bootstrap full set operations from 4 primitives (suitable as a template mixin): // addInterval, skipUpTo, dropUpTo & byInterval iteration //============================================================================ public: /** $(P Sets support natural syntax for set algebra, namely: ) $(BOOKTABLE , $(TR $(TH Operator) $(TH Math notation) $(TH Description) ) $(TR $(TD &) $(TD a ∩ b) $(TD intersection) ) $(TR $(TD |) $(TD a ∪ b) $(TD union) ) $(TR $(TD -) $(TD a ∖ b) $(TD subtraction) ) $(TR $(TD ~) $(TD a ~ b) $(TD symmetric set difference i.e. (a ∪ b) \ (a ∩ b)) ) ) Example: --- auto lower = unicode.LowerCase; auto upper = unicode.UpperCase; auto ascii = unicode.ASCII; assert((lower & upper).empty); // no intersection auto lowerASCII = lower & ascii; assert(lowerASCII.byCodepoint.equal(iota('a', 'z'+1))); // throw away all of the lowercase ASCII assert((ascii - lower).length == 128 - 26); auto onlyOneOf = lower ~ ascii; assert(!onlyOneOf['Δ']); // not ASCII and not lowercase assert(onlyOneOf['$']); // ASCII and not lowercase assert(!onlyOneOf['a']); // ASCII and lowercase assert(onlyOneOf['я']); // not ASCII but lowercase // throw away all cased letters from ASCII auto noLetters = ascii - (lower | upper); assert(noLetters.length == 128 - 26*2); --- */ This opBinary(string op, U)(U rhs) if(isCodepointSet!U || is(U:dchar)) { static if(op == "&" || op == "|" || op == "~") {// symmetric ops thus can swap arguments to reuse r-value static if(is(U:dchar)) { auto tmp = this; mixin("tmp "~op~"= rhs; "); return tmp; } else { static if(is(Unqual!U == U)) { // try hard to reuse r-value mixin("rhs "~op~"= this;"); return rhs; } else { auto tmp = this; mixin("tmp "~op~"= rhs;"); return tmp; } } } else static if(op == "-") // anti-symmetric { auto tmp = this; tmp -= rhs; return tmp; } else static assert(0, "no operator "~op~" defined for Set"); } /// The 'op=' versions of the above overloaded operators. ref This opOpAssign(string op, U)(U rhs) if(isCodepointSet!U || is(U:dchar)) { static if(op == "|") // union { static if(is(U:dchar)) { this.addInterval(rhs, rhs+1); return this; } else return this.add(rhs); } else static if(op == "&") // intersection return this.intersect(rhs);// overloaded else static if(op == "-") // set difference return this.sub(rhs);// overloaded else static if(op == "~") // symmetric set difference { auto copy = this & rhs; this |= rhs; this -= copy; return this; } else static assert(0, "no operator "~op~" defined for Set"); } /** Tests the presence of codepoint $(D ch) in this set, the same as $(LREF opIndex). */ bool opBinaryRight(string op: "in", U)(U ch) if(is(U : dchar)) { return this[ch]; } /// Obtains a set that is the inversion of this set. See also $(LREF inverted). auto opUnary(string op: "!")() { return this.inverted; } /** A range that spans each $(CODEPOINT) in this set. Example: --- import std.algorithm; auto set = unicode.ASCII; set.byCodepoint.equal(iota(0, 0x80)); --- */ @property auto byCodepoint() { @trusted static struct CodepointRange { this(This set) { r = set.byInterval; if(!r.empty) cur = r.front.a; } @property dchar front() const { return cast(dchar)cur; } @property bool empty() const { return r.empty; } void popFront() { cur++; while(cur >= r.front.b) { r.popFront(); if(r.empty) break; cur = r.front.a; } } private: uint cur; typeof(This.init.byInterval) r; } return CodepointRange(this); } /** $(P Obtain textual representation of this set in from of open-right intervals and feed it to $(D sink). ) $(P Used by various standard formatting facilities such as $(XREF _format, formattedWrite), $(XREF _stdio, write), $(XREF _stdio, writef), $(XREF _conv, to) and others. ) Example: --- import std.conv; assert(unicode.ASCII.to!string == "[0..128$(RPAREN)"); --- */ void toString(scope void delegate (const(char)[]) sink) { import std.format; auto range = byInterval; if(range.empty) return; auto val = range.front; formattedWrite(sink, "[%d..%d)", val.a, val.b); range.popFront(); foreach(i; range) formattedWrite(sink, " [%d..%d)", i.a, i.b); } /** Add an interval [a, b$(RPAREN) to this set. Example: --- CodepointSet someSet; someSet.add('0', '5').add('A','Z'+1); someSet.add('5', '9'+1); assert(someSet['0']); assert(someSet['5']); assert(someSet['9']); assert(someSet['Z']); --- */ ref add()(uint a, uint b) { addInterval(a, b); return this; } private: ref intersect(U)(U rhs) if(isCodepointSet!U) { Marker mark; foreach( i; rhs.byInterval) { mark = this.dropUpTo(i.a, mark); mark = this.skipUpTo(i.b, mark); } this.dropUpTo(uint.max, mark); return this; } ref intersect()(dchar ch) { foreach(i; byInterval) if(i.a >= ch && ch < i.b) return this = This.init.add(ch, ch+1); this = This.init; return this; } ref sub()(dchar ch) { return subChar(ch); } // same as the above except that skip & drop parts are swapped ref sub(U)(U rhs) if(isCodepointSet!U) { uint top; Marker mark; foreach(i; rhs.byInterval) { mark = this.skipUpTo(i.a, mark); mark = this.dropUpTo(i.b, mark); } return this; } ref add(U)(U rhs) if(isCodepointSet!U) { Marker start; foreach(i; rhs.byInterval) { start = addInterval(i.a, i.b, start); } return this; } // end of mixin-able part //============================================================================ public: /** Obtains a set that is the inversion of this set. See the '!' $(LREF opUnary) for the same but using operators. Example: --- set = unicode.ASCII; // union with the inverse gets all of the code points in the Unicode assert((set | set.inverted).length == 0x110000); // no intersection with the inverse assert((set & set.inverted).empty); --- */ @property auto inverted() { InversionList inversion = this; if(inversion.data.length == 0) { inversion.addInterval(0, lastDchar+1); return inversion; } if(inversion.data[0] != 0) genericReplace(inversion.data, 0, 0, [0]); else genericReplace(inversion.data, 0, 1, cast(uint[])null); if(data[data.length-1] != lastDchar+1) genericReplace(inversion.data, inversion.data.length, inversion.data.length, [lastDchar+1]); else genericReplace(inversion.data, inversion.data.length-1, inversion.data.length, cast(uint[])null); return inversion; } /** Generates string with D source code of unary function with name of $(D funcName) taking a single $(D dchar) argument. If $(D funcName) is empty the code is adjusted to be a lambda function. The function generated tests if the $(CODEPOINT) passed belongs to this set or not. The result is to be used with string mixin. The intended usage area is aggressive optimization via meta programming in parser generators and the like. Note: Use with care for relatively small or regular sets. It could end up being slower then just using multi-staged tables. Example: --- import std.stdio; // construct set directly from [a, b) intervals auto set = CodepointSet(10, 12, 45, 65, 100, 200); writeln(set); writeln(set.toSourceCode("func")); --- The above outputs something along the lines of: --- bool func(dchar ch) { if(ch < 45) { if(ch == 10 || ch == 11) return true; return false; } else if (ch < 65) return true; else { if(ch < 100) return false; if(ch < 200) return true; return false; } } --- */ string toSourceCode(string funcName="") { import std.string; enum maxBinary = 3; static string linearScope(R)(R ivals, string indent) { string result = indent~"{\n"; string deeper = indent~" "; foreach(ival; ivals) { auto span = ival[1] - ival[0]; assert(span != 0); if(span == 1) { result ~= format("%sif(ch == %s) return true;\n", deeper, ival[0]); } else if(span == 2) { result ~= format("%sif(ch == %s || ch == %s) return true;\n", deeper, ival[0], ival[0]+1); } else { if(ival[0] != 0) // dchar is unsigned and < 0 is useless result ~= format("%sif(ch < %s) return false;\n", deeper, ival[0]); result ~= format("%sif(ch < %s) return true;\n", deeper, ival[1]); } } result ~= format("%sreturn false;\n%s}\n", deeper, indent); // including empty range of intervals return result; } static string binaryScope(R)(R ivals, string indent) { // time to do unrolled comparisons? if(ivals.length < maxBinary) return linearScope(ivals, indent); else return bisect(ivals, ivals.length/2, indent); } // not used yet if/elsebinary search is far better with DMD as of 2.061 // and GDC is doing fine job either way static string switchScope(R)(R ivals, string indent) { string result = indent~"switch(ch){\n"; string deeper = indent~" "; foreach(ival; ivals) { if(ival[0]+1 == ival[1]) { result ~= format("%scase %s: return true;\n", deeper, ival[0]); } else { result ~= format("%scase %s: .. case %s: return true;\n", deeper, ival[0], ival[1]-1); } } result ~= deeper~"default: return false;\n"~indent~"}\n"; return result; } static string bisect(R)(R range, size_t idx, string indent) { string deeper = indent ~ " "; // bisect on one [a, b) interval at idx string result = indent~"{\n"; // less branch, < a result ~= format("%sif(ch < %s)\n%s", deeper, range[idx][0], binaryScope(range[0..idx], deeper)); // middle point, >= a && < b result ~= format("%selse if (ch < %s) return true;\n", deeper, range[idx][1]); // greater or equal branch, >= b result ~= format("%selse\n%s", deeper, binaryScope(range[idx+1..$], deeper)); return result~indent~"}\n"; } string code = format("bool %s(dchar ch) @safe pure nothrow\n", funcName.empty ? "function" : funcName); auto range = byInterval.array(); // special case first bisection to be on ASCII vs beyond auto tillAscii = countUntil!"a[0] > 0x80"(range); if(tillAscii <= 0) // everything is ASCII or nothing is ascii (-1 & 0) code ~= binaryScope(range, ""); else code ~= bisect(range, tillAscii, ""); return code; } /** True if this set doesn't contain any $(CODEPOINTS). Example: --- CodepointSet emptySet; assert(emptySet.length == 0); assert(emptySet.empty); --- */ @property bool empty() const { return data.length == 0; } private: alias typeof(this) This; alias size_t Marker; // special case for normal InversionList ref subChar(dchar ch) { auto mark = skipUpTo(ch); if(mark != data.length && data[mark] == ch && data[mark-1] == ch) { // it has split, meaning that ch happens to be in one of intervals data[mark] = data[mark]+1; } return this; } // Marker addInterval(int a, int b, Marker hint=Marker.init) in { assert(a <= b, text(a, " > ", b)); } body { auto range = assumeSorted(data[]); size_t pos; size_t a_idx = range.lowerBound(a).length; if(a_idx == range.length) { // [---+++----++++----++++++] // [ a b] data.append([a, b]); return data.length-1; } size_t b_idx = range[a_idx..range.length].lowerBound(b).length+a_idx; uint[] to_insert; debug(std_uni) { writefln("a_idx=%d; b_idx=%d;", a_idx, b_idx); } if(b_idx == range.length) { // [-------++++++++----++++++-] // [ s a b] if(a_idx & 1)// a in positive { to_insert = [ b ]; } else// a in negative { to_insert = [a, b]; } genericReplace(data, a_idx, b_idx, to_insert); return a_idx+to_insert.length-1; } uint top = data[b_idx]; debug(std_uni) { writefln("a_idx=%d; b_idx=%d;", a_idx, b_idx); writefln("a=%s; b=%s; top=%s;", a, b, top); } if(a_idx & 1) {// a in positive if(b_idx & 1)// b in positive { // [-------++++++++----++++++-] // [ s a b ] to_insert = [top]; } else // b in negative { // [-------++++++++----++++++-] // [ s a b ] if(top == b) { assert(b_idx+1 < data.length); pos = genericReplace(data, a_idx, b_idx+2, [data[b_idx+1]]); return pos; } to_insert = [b, top ]; } } else { // a in negative if(b_idx & 1) // b in positive { // [----------+++++----++++++-] // [ a b ] to_insert = [a, top]; } else// b in negative { // [----------+++++----++++++-] // [ a s b ] if(top == b) { assert(b_idx+1 < data.length); pos = genericReplace(data, a_idx, b_idx+2, [a, data[b_idx+1] ]); return pos; } to_insert = [a, b, top]; } } pos = genericReplace(data, a_idx, b_idx+1, to_insert); debug(std_uni) { writefln("marker idx: %d; length=%d", pos, data[pos], data.length); writeln("inserting ", to_insert); } return pos; } // Marker dropUpTo(uint a, Marker pos=Marker.init) in { assert(pos % 2 == 0); // at start of interval } body { auto range = assumeSorted!"a<=b"(data[pos..data.length]); if(range.empty) return pos; size_t idx = pos; idx += range.lowerBound(a).length; debug(std_uni) { writeln("dropUpTo full length=", data.length); writeln(pos,"~~~", idx); } if(idx == data.length) return genericReplace(data, pos, idx, cast(uint[])[]); if(idx & 1) { // a in positive //[--+++----++++++----+++++++------...] // |<---si s a t genericReplace(data, pos, idx, [a]); } else { // a in negative //[--+++----++++++----+++++++-------+++...] // |<---si s a t genericReplace(data, pos, idx, cast(uint[])[]); } return pos; } // Marker skipUpTo(uint a, Marker pos=Marker.init) out(result) { assert(result % 2 == 0);// always start of interval //(may be 0-width after-split) } body { assert(data.length % 2 == 0); auto range = assumeSorted!"a<=b"(data[pos..data.length]); size_t idx = pos+range.lowerBound(a).length; if(idx >= data.length) // could have Marker point to recently removed stuff return data.length; if(idx & 1)// inside of interval, check for split { uint top = data[idx]; if(top == a)// no need to split, it's end return idx+1; uint start = data[idx-1]; if(a == start) return idx-1; // split it up genericReplace(data, idx, idx+1, [a, a, top]); return idx+1; // avoid odd index } return idx; } Uint24Array!SP data; }; @system unittest { // test examples import std.algorithm, std.typecons; auto set = CodepointSet('A', 'D'+1, 'a', 'd'+1); set.byInterval.equalS([tuple('A', 'E'), tuple('a', 'e')]); set = unicode.ASCII; assert(set.byCodepoint.equalS(iota(0, 0x80))); set = CodepointSet('a', 'z'+1, 'а', 'я'+1); foreach(v; 'a'..'z'+1) assert(set[v]); // Cyrillic lowercase interval foreach(v; 'а'..'я'+1) assert(set[v]); auto gothic = unicode.Gothic; // Gothic letter ahsa assert(gothic['\U00010330']); // no ascii in Gothic obviously assert(!gothic['$']); CodepointSet emptySet; assert(emptySet.length == 0); assert(emptySet.empty); set = unicode.ASCII; // union with the inverse gets all of code points in the Unicode assert((set | set.inverted).length == 0x110000); // no intersection with inverse assert((set & set.inverted).empty); CodepointSet someSet; someSet.add('0', '5').add('A','Z'+1); someSet.add('5', '9'+1); assert(someSet['0']); assert(someSet['5']); assert(someSet['9']); assert(someSet['Z']); auto lower = unicode.LowerCase; auto upper = unicode.UpperCase; auto ascii = unicode.ASCII; assert((lower & upper).empty); // no intersection auto lowerASCII = lower & ascii; assert(lowerASCII.byCodepoint.equalS(iota('a', 'z'+1))); // throw away all of the lowercase ASCII assert((ascii - lower).length == 128 - 26); auto onlyOneOf = lower ~ ascii; assert(!onlyOneOf['Δ']); // not ASCII and not lowercase assert(onlyOneOf['$']); // ASCII and not lowercase assert(!onlyOneOf['a']); // ASCII and lowercase assert(onlyOneOf['я']); // not ASCII but lowercase auto noLetters = ascii - (lower | upper); assert(noLetters.length == 128 - 26*2); import std.conv; assert(unicode.ASCII.to!string() == "[0..128)"); } // pedantic version for ctfe, and aligned-access only architectures @trusted uint safeRead24(const ubyte* ptr, size_t idx) pure nothrow { idx *= 3; version(LittleEndian) return ptr[idx] + (cast(uint)ptr[idx+1]<<8) + (cast(uint)ptr[idx+2]<<16); else return (cast(uint)ptr[idx]<<16) + (cast(uint)ptr[idx+1]<<8) + ptr[idx+2]; } // ditto @trusted void safeWrite24(ubyte* ptr, uint val, size_t idx) pure nothrow { idx *= 3; version(LittleEndian) { ptr[idx] = val & 0xFF; ptr[idx+1] = (val>>8) & 0xFF; ptr[idx+2] = (val>>16) & 0xFF; } else { ptr[idx] = (val>>16) & 0xFF; ptr[idx+1] = (val>>8) & 0xFF; ptr[idx+2] = val & 0xFF; } } // unaligned x86-like read/write functions @trusted uint unalignedRead24(const ubyte* ptr, size_t idx) pure nothrow { uint* src = cast(uint*)(ptr+3*idx); version(LittleEndian) return *src & 0xFF_FFFF; else return *src >> 8; } // ditto @trusted void unalignedWrite24(ubyte* ptr, uint val, size_t idx) pure nothrow { uint* dest = cast(uint*)(cast(ubyte*)ptr + 3*idx); version(LittleEndian) *dest = val | (*dest & 0xFF00_0000); else *dest = (val<<8) | (*dest & 0xFF); } uint read24(const ubyte* ptr, size_t idx) pure nothrow { static if(hasUnalignedReads) return __ctfe ? safeRead24(ptr, idx) : unalignedRead24(ptr, idx); else return safeRead24(ptr, idx); } void write24(ubyte* ptr, uint val, size_t idx) pure nothrow { static if(hasUnalignedReads) return __ctfe ? safeWrite24(ptr, val, idx) : unalignedWrite24(ptr, val, idx); else return safeWrite24(ptr, val, idx); } // Packed array of 24-bit integers, COW semantics. @trusted struct Uint24Array(SP=GcPolicy) { this(Range)(Range range) if(isInputRange!Range && hasLength!Range) { length = range.length; copy(range, this[]); } this(Range)(Range range) if(isForwardRange!Range && !hasLength!Range) { auto len = walkLength(range.save); length = len; copy(range, this[]); } this(this) { if(!empty) { refCount = refCount + 1; } } ~this() { if(!empty) { auto cnt = refCount; if(cnt == 1) SP.destroy(data); else refCount = cnt - 1; } } // no ref-count for empty U24 array @property bool empty() const { return data.length == 0; } // report one less then actual size @property size_t length() const { return data.length ? (data.length-4)/3 : 0; } //+ an extra slot for ref-count @property void length(size_t len) { if(len == 0) { if(!empty) freeThisReference(); return; } immutable bytes = len*3+4; // including ref-count if(empty) { data = SP.alloc!ubyte(bytes); refCount = 1; return; } auto cur_cnt = refCount; if(cur_cnt != 1) // have more references to this memory { refCount = cur_cnt - 1; auto new_data = SP.alloc!ubyte(bytes); // take shrinking into account auto to_copy = min(bytes, data.length)-4; copy(data[0..to_copy], new_data[0..to_copy]); data = new_data; // before setting refCount! refCount = 1; } else // 'this' is the only reference { // use the realloc (hopefully in-place operation) data = SP.realloc(data, bytes); refCount = 1; // setup a ref-count in the new end of the array } } alias opDollar = length; // Read 24-bit packed integer uint opIndex(size_t idx)const { return read24(data.ptr, idx); } // Write 24-bit packed integer void opIndexAssign(uint val, size_t idx) in { assert(!empty && val <= 0xFF_FFFF); } body { auto cnt = refCount; if(cnt != 1) dupThisReference(cnt); write24(data.ptr, val, idx); } // auto opSlice(size_t from, size_t to) { return sliceOverIndexed(from, to, &this); } /// auto opSlice(size_t from, size_t to) const { return sliceOverIndexed(from, to, &this); } // length slices before the ref count auto opSlice() { return opSlice(0, length); } // length slices before the ref count auto opSlice() const { return opSlice(0, length); } void append(Range)(Range range) if(isInputRange!Range && hasLength!Range && is(ElementType!Range : uint)) { size_t nl = length + range.length; length = nl; copy(range, this[nl-range.length..nl]); } void append()(uint val) { length = length + 1; this[$-1] = val; } bool opEquals()(auto const ref Uint24Array rhs)const { if(empty ^ rhs.empty) return false; // one is empty and the other isn't return empty || data[0..$-4] == rhs.data[0..$-4]; } private: // ref-count is right after the data @property uint refCount() const { return read24(data.ptr, length); } @property void refCount(uint cnt) in { assert(cnt <= 0xFF_FFFF); } body { write24(data.ptr, cnt, length); } void freeThisReference() { auto count = refCount; if(count != 1) // have more references to this memory { // dec shared ref-count refCount = count - 1; data = []; } else SP.destroy(data); assert(!data.ptr); } void dupThisReference(uint count) in { assert(!empty && count != 1 && count == refCount); } body { // dec shared ref-count refCount = count - 1; // copy to the new chunk of RAM auto new_data = SP.alloc!ubyte(data.length); // bit-blit old stuff except the counter copy(data[0..$-4], new_data[0..$-4]); data = new_data; // before setting refCount! refCount = 1; // so that this updates the right one } ubyte[] data; } @trusted unittest// Uint24 tests //@@@BUG@@ iota is system ?! { void funcRef(T)(ref T u24) { u24.length = 2; u24[1] = 1024; T u24_c = u24; assert(u24[1] == 1024); u24.length = 0; assert(u24.empty); u24.append([1, 2]); assert(equalS(u24[], [1, 2])); u24.append(111); assert(equalS(u24[], [1, 2, 111])); assert(!u24_c.empty && u24_c[1] == 1024); u24.length = 3; copy(iota(0, 3), u24[]); assert(equalS(u24[], iota(0, 3))); assert(u24_c[1] == 1024); } void func2(T)(T u24) { T u24_2 = u24; T u24_3; u24_3 = u24_2; assert(u24_2 == u24_3); assert(equalS(u24[], u24_2[])); assert(equalS(u24_2[], u24_3[])); funcRef(u24_3); assert(equalS(u24_3[], iota(0, 3))); assert(!equalS(u24_2[], u24_3[])); assert(equalS(u24_2[], u24[])); u24_2 = u24_3; assert(equalS(u24_2[], iota(0, 3))); // to test that passed arg is intact outside // plus try out opEquals u24 = u24_3; u24 = T.init; u24_3 = T.init; assert(u24.empty); assert(u24 == u24_3); assert(u24 != u24_2); } foreach(Policy; TypeTuple!(GcPolicy, ReallocPolicy)) { alias typeof(Uint24Array!Policy.init[]) Range; alias Uint24Array!Policy U24A; static assert(isForwardRange!Range); static assert(isBidirectionalRange!Range); static assert(isOutputRange!(Range, uint)); static assert(isRandomAccessRange!(Range)); auto arr = U24A([42u, 36, 100]); assert(arr[0] == 42); assert(arr[1] == 36); arr[0] = 72; arr[1] = 0xFE_FEFE; assert(arr[0] == 72); assert(arr[1] == 0xFE_FEFE); assert(arr[2] == 100); U24A arr2 = arr; assert(arr2[0] == 72); arr2[0] = 11; // test COW-ness assert(arr[0] == 72); assert(arr2[0] == 11); // set this to about 100M to stress-test COW memory management foreach(v; 0..10_000) func2(arr); assert(equalS(arr[], [72, 0xFE_FEFE, 100])); auto r2 = U24A(iota(0, 100)); assert(equalS(r2[], iota(0, 100)), text(r2[])); copy(iota(10, 170, 2), r2[10..90]); assert(equalS(r2[], chain(iota(0, 10), iota(10, 170, 2), iota(90, 100))) , text(r2[])); } } version(unittest) { private alias TypeTuple!(InversionList!GcPolicy, InversionList!ReallocPolicy) AllSets; } @trusted unittest// core set primitives test { foreach(CodeList; AllSets) { CodeList a; //"plug a hole" test a.add(10, 20).add(25, 30).add(15, 27); assert(a == CodeList(10, 30), text(a)); auto x = CodeList.init; x.add(10, 20).add(30, 40).add(50, 60); a = x; a.add(20, 49);//[10, 49) [50, 60) assert(a == CodeList(10, 49, 50 ,60)); a = x; a.add(20, 50); assert(a == CodeList(10, 60), text(a)); // simple unions, mostly edge effects x = CodeList.init; x.add(10, 20).add(40, 60); a = x; a.add(10, 25); //[10, 25) [40, 60) assert(a == CodeList(10, 25, 40, 60)); a = x; a.add(5, 15); //[5, 20) [40, 60) assert(a == CodeList(5, 20, 40, 60)); a = x; a.add(0, 10); // [0, 20) [40, 60) assert(a == CodeList(0, 20, 40, 60)); a = x; a.add(0, 5); // prepand assert(a == CodeList(0, 5, 10, 20, 40, 60), text(a)); a = x; a.add(5, 20); assert(a == CodeList(5, 20, 40, 60)); a = x; a.add(3, 37); assert(a == CodeList(3, 37, 40, 60)); a = x; a.add(37, 65); assert(a == CodeList(10, 20, 37, 65)); // some tests on helpers for set intersection x = CodeList.init.add(10, 20).add(40, 60).add(100, 120); a = x; auto m = a.skipUpTo(60); a.dropUpTo(110, m); assert(a == CodeList(10, 20, 40, 60, 110, 120), text(a.data[])); a = x; a.dropUpTo(100); assert(a == CodeList(100, 120), text(a.data[])); a = x; m = a.skipUpTo(50); a.dropUpTo(140, m); assert(a == CodeList(10, 20, 40, 50), text(a.data[])); a = x; a.dropUpTo(60); assert(a == CodeList(100, 120), text(a.data[])); } } @trusted unittest { // full set operations foreach(CodeList; AllSets) { CodeList a, b, c, d; //"plug a hole" a.add(20, 40).add(60, 80).add(100, 140).add(150, 200); b.add(40, 60).add(80, 100).add(140, 150); c = a | b; d = b | a; assert(c == CodeList(20, 200), text(CodeList.stringof," ", c)); assert(c == d, text(c," vs ", d)); b = CodeList.init.add(25, 45).add(65, 85).add(95,110).add(150, 210); c = a | b; //[20,45) [60, 85) [95, 140) [150, 210) d = b | a; assert(c == CodeList(20, 45, 60, 85, 95, 140, 150, 210), text(c)); assert(c == d, text(c," vs ", d)); b = CodeList.init.add(10, 20).add(30,100).add(145,200); c = a | b;//[10, 140) [145, 200) d = b | a; assert(c == CodeList(10, 140, 145, 200)); assert(c == d, text(c," vs ", d)); b = CodeList.init.add(0, 10).add(15, 100).add(10, 20).add(200, 220); c = a | b;//[0, 140) [150, 220) d = b | a; assert(c == CodeList(0, 140, 150, 220)); assert(c == d, text(c," vs ", d)); a = CodeList.init.add(20, 40).add(60, 80); b = CodeList.init.add(25, 35).add(65, 75); c = a & b; d = b & a; assert(c == CodeList(25, 35, 65, 75), text(c)); assert(c == d, text(c," vs ", d)); a = CodeList.init.add(20, 40).add(60, 80).add(100, 140).add(150, 200); b = CodeList.init.add(25, 35).add(65, 75).add(110, 130).add(160, 180); c = a & b; d = b & a; assert(c == CodeList(25, 35, 65, 75, 110, 130, 160, 180), text(c)); assert(c == d, text(c," vs ", d)); a = CodeList.init.add(20, 40).add(60, 80).add(100, 140).add(150, 200); b = CodeList.init.add(10, 30).add(60, 120).add(135, 160); c = a & b;//[20, 30)[60, 80) [100, 120) [135, 140) [150, 160) d = b & a; assert(c == CodeList(20, 30, 60, 80, 100, 120, 135, 140, 150, 160),text(c)); assert(c == d, text(c, " vs ",d)); assert((c & a) == c); assert((d & b) == d); assert((c & d) == d); b = CodeList.init.add(40, 60).add(80, 100).add(140, 200); c = a & b; d = b & a; assert(c == CodeList(150, 200), text(c)); assert(c == d, text(c, " vs ",d)); assert((c & a) == c); assert((d & b) == d); assert((c & d) == d); assert((a & a) == a); assert((b & b) == b); a = CodeList.init.add(20, 40).add(60, 80).add(100, 140).add(150, 200); b = CodeList.init.add(30, 60).add(75, 120).add(190, 300); c = a - b;// [30, 40) [60, 75) [120, 140) [150, 190) d = b - a;// [40, 60) [80, 100) [200, 300) assert(c == CodeList(20, 30, 60, 75, 120, 140, 150, 190), text(c)); assert(d == CodeList(40, 60, 80, 100, 200, 300), text(d)); assert(c - d == c, text(c-d, " vs ", c)); assert(d - c == d, text(d-c, " vs ", d)); assert(c - c == CodeList.init); assert(d - d == CodeList.init); a = CodeList.init.add(20, 40).add( 60, 80).add(100, 140).add(150, 200); b = CodeList.init.add(10, 50).add(60, 160).add(190, 300); c = a - b;// [160, 190) d = b - a;// [10, 20) [40, 50) [80, 100) [140, 150) [200, 300) assert(c == CodeList(160, 190), text(c)); assert(d == CodeList(10, 20, 40, 50, 80, 100, 140, 150, 200, 300), text(d)); assert(c - d == c, text(c-d, " vs ", c)); assert(d - c == d, text(d-c, " vs ", d)); assert(c - c == CodeList.init); assert(d - d == CodeList.init); a = CodeList.init.add(20, 40).add(60, 80).add(100, 140).add(150, 200); b = CodeList.init.add(10, 30).add(45, 100).add(130, 190); c = a ~ b; // [10, 20) [30, 40) [45, 60) [80, 130) [140, 150) [190, 200) d = b ~ a; assert(c == CodeList(10, 20, 30, 40, 45, 60, 80, 130, 140, 150, 190, 200), text(c)); assert(c == d, text(c, " vs ", d)); } } @system: unittest// vs single dchar { CodepointSet a = CodepointSet(10, 100, 120, 200); assert(a - 'A' == CodepointSet(10, 65, 66, 100, 120, 200), text(a - 'A')); assert((a & 'B') == CodepointSet(66, 67)); } unittest// iteration & opIndex { import std.typecons; foreach(CodeList; TypeTuple!(InversionList!(ReallocPolicy))) { auto arr = "ABCDEFGHIJKLMabcdefghijklm"d; auto a = CodeList('A','N','a', 'n'); assert(equalS(a.byInterval, [tuple(cast(uint)'A', cast(uint)'N'), tuple(cast(uint)'a', cast(uint)'n')] ), text(a.byInterval)); // same @@@BUG as in issue 8949 ? version(bug8949) { assert(equalS(retro(a.byInterval), [tuple(cast(uint)'a', cast(uint)'n'), tuple(cast(uint)'A', cast(uint)'N')] ), text(retro(a.byInterval))); } auto achr = a.byCodepoint; assert(equalS(achr, arr), text(a.byCodepoint)); foreach(ch; a.byCodepoint) assert(a[ch]); auto x = CodeList(100, 500, 600, 900, 1200, 1500); assert(equalS(x.byInterval, [ tuple(100, 500), tuple(600, 900), tuple(1200, 1500)]), text(x.byInterval)); foreach(ch; x.byCodepoint) assert(x[ch]); static if(is(CodeList == CodepointSet)) { auto y = CodeList(x.byInterval); assert(equalS(x.byInterval, y.byInterval)); } assert(equalS(CodepointSet.init.byInterval, cast(Tuple!(uint, uint)[])[])); assert(equalS(CodepointSet.init.byCodepoint, cast(dchar[])[])); } } //============================================================================ // Generic Trie template and various ways to build it //============================================================================ // debug helper to get a shortened array dump auto arrayRepr(T)(T x) { if(x.length > 32) { return text(x[0..16],"~...~", x[x.length-16..x.length]); } else return text(x); } /** Maps $(D Key) to a suitable integer index within the range of $(D size_t). The mapping is constructed by applying predicates from $(D Prefix) left to right and concatenating the resulting bits. The first (leftmost) predicate defines the most significant bits of the resulting index. */ template mapTrieIndex(Prefix...) { size_t mapTrieIndex(Key)(Key key) if(isValidPrefixForTrie!(Key, Prefix)) { alias Prefix p; size_t idx; foreach(i, v; p[0..$-1]) { idx |= p[i](key); idx <<= p[i+1].bitSize; } idx |= p[$-1](key); return idx; } } /* $(D TrieBuilder) is a type used for incremental construction of $(LREF Trie)s. See $(LREF buildTrie) for generic helpers built on top of it. */ @trusted struct TrieBuilder(Value, Key, Args...) if(isBitPackableType!Value && isValidArgsForTrie!(Key, Args)) { private: // last index is not stored in table, it is used as an offset to values in a block. static if(is(Value == bool))// always pack bool alias V = BitPacked!(Value, 1); else alias V = Value; static auto deduceMaxIndex(Preds...)() { size_t idx = 1; foreach(v; Preds) idx *= 2^^v.bitSize; return idx; } static if(is(typeof(Args[0]) : Key)) // Args start with upper bound on Key { alias Prefix = Args[1..$]; enum lastPageSize = 2^^Prefix[$-1].bitSize; enum translatedMaxIndex = mapTrieIndex!(Prefix)(Args[0]); enum roughedMaxIndex = (translatedMaxIndex + lastPageSize-1)/lastPageSize*lastPageSize; // check warp around - if wrapped, use the default deduction rule enum maxIndex = roughedMaxIndex < translatedMaxIndex ? deduceMaxIndex!(Prefix)() : roughedMaxIndex; } else { alias Prefix = Args; enum maxIndex = deduceMaxIndex!(Prefix)(); } alias getIndex = mapTrieIndex!(Prefix); enum lastLevel = Prefix.length-1; struct ConstructState { bool zeros, ones; // current page is zeros? ones? uint idx_zeros, idx_ones; } // iteration over levels of Trie, each indexes its own level and thus a shortened domain size_t[Prefix.length] indices; // default filler value to use Value defValue; // this is a full-width index of next item size_t curIndex; // all-zeros page index, all-ones page index (+ indicator if there is such a page) ConstructState[Prefix.length] state; // the table being constructed MultiArray!(idxTypes!(Key, fullBitSize!(Prefix), Prefix[0..$]), V) table; @disable this(); // this function assumes no holes in the input so // indices are going one by one void addValue(size_t level, T)(T val, size_t numVals) { enum pageSize = 1<<Prefix[level].bitSize; if(numVals == 0) return; do { // need to take pointer again, memory block may move on resize auto ptr = table.slice!(level); static if(is(T : bool)) { if(val) state[level].zeros = false; else state[level].ones = false; } if(numVals == 1) { static if(level == Prefix.length-1) ptr[indices[level]] = val; else{// can incur narrowing conversion assert(indices[level] < ptr.length); ptr[indices[level]] = force!(typeof(ptr[indices[level]]))(val); } indices[level]++; numVals = 0; } else { // where is the next page boundary size_t nextPB = (indices[level]+pageSize)/pageSize*pageSize; size_t j = indices[level]; size_t n = nextPB-j;// can fill right in this page if(numVals > n) numVals -= n; else { n = numVals; numVals = 0; } static if(level < Prefix.length-1) assert(indices[level] <= 2^^Prefix[level+1].bitSize); ptr[j..j+n] = val; j += n; indices[level] = j; } // last level (i.e. topmost) has 1 "page" // thus it need not to add a new page on upper level static if(level != 0) { if(indices[level] % pageSize == 0) spillToNextPage!level(ptr); } } while(numVals); } // this can re-use the current page if duplicate or allocate a new one // it also makes sure that previous levels point to the correct page in this level void spillToNextPage(size_t level, Slice)(ref Slice ptr) { alias typeof(table.slice!(level-1)[0]) NextIdx; NextIdx next_lvl_index; enum pageSize = 1<<Prefix[level].bitSize; static if(is(T : bool)) { if(state[level].zeros) { if(state[level].idx_empty == uint.max) { state[level].idx_empty = cast(uint)(indices[level]/pageSize - 1); goto L_allocate_page; } else { next_lvl_index = force!NextIdx(state[level].idx_empty); indices[level] -= pageSize;// it is a duplicate goto L_know_index; } } } auto last = indices[level]-pageSize; auto slice = ptr[indices[level] - pageSize..indices[level]]; size_t j; for(j=0; j<last; j+=pageSize) { if(equalS(ptr[j..j+pageSize], slice[0..pageSize])) { // get index to it, reuse ptr space for the next block next_lvl_index = force!NextIdx(j/pageSize); version(none) { writefln("LEVEL(%s) page maped idx: %s: 0..%s ---> [%s..%s]" ,level ,indices[level-1], pageSize, j, j+pageSize); writeln("LEVEL(", level , ") mapped page is: ", slice, ": ", arrayRepr(ptr[j..j+pageSize])); writeln("LEVEL(", level , ") src page is :", ptr, ": ", arrayRepr(slice[0..pageSize])); } indices[level] -= pageSize; // reuse this page, it is duplicate break; } } if(j == last) { L_allocate_page: next_lvl_index = force!NextIdx(indices[level]/pageSize - 1); // allocate next page version(none) { writefln("LEVEL(%s) page allocated: %s" , level, arrayRepr(slice[0..pageSize])); writefln("LEVEL(%s) index: %s ; page at this index %s" , level , next_lvl_index , arrayRepr( table.slice!(level) [pageSize*next_lvl_index..(next_lvl_index+1)*pageSize] )); } table.length!level = table.length!level + pageSize; } L_know_index: // reset all zero/ones tracking variables static if(is(TypeOfBitPacked!T : bool)) { state[level].zeros = true; state[level].ones = true; } // for the previous level, values are indices to the pages in the current level addValue!(level-1)(next_lvl_index, 1); } // idx - full-width index to fill with v (full-width index != key) // fills everything in the range of [curIndex, idx) with filler void putAt(size_t idx, Value v) { assert(idx >= curIndex); size_t numFillers = idx - curIndex; addValue!lastLevel(defValue, numFillers); addValue!lastLevel(v, 1); curIndex = idx + 1; } // ditto, but sets the range of [idxA, idxB) to v void putRangeAt(size_t idxA, size_t idxB, Value v) { assert(idxA >= curIndex); assert(idxB >= idxA); size_t numFillers = idxA - curIndex; addValue!lastLevel(defValue, numFillers); addValue!lastLevel(v, idxB - idxA); curIndex = idxB; // open-right } enum errMsg = "non-monotonic prefix function(s), an unsorted range or " "duplicate key->value mapping"; public: /** Construct a builder, where $(D filler) is a value to indicate empty slots (or "not found" condition). */ this(Value filler) { curIndex = 0; defValue = filler; // zeros-page index, ones-page index foreach(ref v; state) v = ConstructState(true, true, uint.max, uint.max); table = typeof(table)(indices); // one page per level is a bootstrap minimum foreach(i; Sequence!(0, Prefix.length)) table.length!i = (1<<Prefix[i].bitSize); } /** Put a value $(D v) into interval as mapped by keys from $(D a) to $(D b). All slots prior to $(D a) are filled with the default filler. */ void putRange(Key a, Key b, Value v) { auto idxA = getIndex(a), idxB = getIndex(b); // indexes of key should always grow enforce(idxB >= idxA && idxA >= curIndex, errMsg); putRangeAt(idxA, idxB, v); } /** Put a value $(D v) into slot mapped by $(D key). All slots prior to $(D key) are filled with the default filler. */ void putValue(Key key, Value v) { auto idx = getIndex(key); enforce(idx >= curIndex, text(errMsg, " ", idx)); putAt(idx, v); } /// Finishes construction of Trie, yielding an immutable Trie instance. auto build() { static if(maxIndex != 0) // doesn't cover full range of size_t { assert(curIndex <= maxIndex); addValue!lastLevel(defValue, maxIndex - curIndex); } else { if(curIndex != 0 // couldn't wrap around || (Prefix.length != 1 && indices[lastLevel] == 0)) // can be just empty { addValue!lastLevel(defValue, size_t.max - curIndex); addValue!lastLevel(defValue, 1); } // else curIndex already completed the full range of size_t by wrapping around } return Trie!(V, Key, maxIndex, Prefix)(table); } } /* $(P A generic Trie data-structure for a fixed number of stages. The design goal is optimal speed with smallest footprint size. ) $(P It's intentionally read-only and doesn't provide constructors. To construct one use a special builder, see $(LREF TrieBuilder) and $(LREF buildTrie). ) */ @trusted public struct Trie(Value, Key, Args...) if(isValidPrefixForTrie!(Key, Args) || (isValidPrefixForTrie!(Key, Args[1..$]) && is(typeof(Args[0]) : size_t))) { static if(is(typeof(Args[0]) : size_t)) { enum maxIndex = Args[0]; enum hasBoundsCheck = true; alias Prefix = Args[1..$]; } else { enum hasBoundsCheck = false; alias Prefix = Args; } private this()(typeof(_table) table) { _table = table; } // only for constant Tries constructed from precompiled tables private this()(const(size_t)[] offsets, const(size_t)[] sizes, const(size_t)[] data) const { _table = typeof(_table)(offsets, sizes, data); } /* $(P Lookup the $(D key) in this $(D Trie). ) $(P The lookup always succeeds if key fits the domain provided during construction. The whole domain defined is covered so instead of not found condition the sentinel (filler) value could be used. ) $(P See $(LREF buildTrie), $(LREF TrieBuilder) for how to define a domain of $(D Trie) keys and the sentinel value. ) Note: Domain range-checking is only enabled in debug builds and results in assertion failure. */ // templated to auto-detect pure, @safe and nothrow TypeOfBitPacked!Value opIndex()(Key key) const { static if(hasBoundsCheck) assert(mapTrieIndex!Prefix(key) < maxIndex); size_t idx; alias p = Prefix; idx = cast(size_t)p[0](key); foreach(i, v; p[0..$-1]) idx = cast(size_t)((_table.ptr!i[idx]<<p[i+1].bitSize) + p[i+1](key)); auto val = _table.ptr!(p.length-1)[idx]; return val; } @property size_t bytes(size_t n=size_t.max)() const { return _table.bytes!n; } @property size_t pages(size_t n)() const { return (bytes!n+2^^(Prefix[n].bitSize-1)) /2^^Prefix[n].bitSize; } void store(OutRange)(scope OutRange sink) const if(isOutputRange!(OutRange, char)) { _table.store(sink); } private: MultiArray!(idxTypes!(Key, fullBitSize!(Prefix), Prefix[0..$]), Value) _table; } // create a tuple of 'sliceBits' that slice the 'top' of bits into pieces of sizes 'sizes' // left-to-right, the most significant bits first template GetBitSlicing(size_t top, sizes...) { static if(sizes.length > 0) alias TypeTuple!(sliceBits!(top - sizes[0], top) , GetBitSlicing!(top - sizes[0], sizes[1..$])) GetBitSlicing; else alias TypeTuple!() GetBitSlicing; } template callableWith(T) { template callableWith(alias Pred) { static if(!is(typeof(Pred(T.init)))) enum callableWith = false; else { alias Result = typeof(Pred(T.init)); enum callableWith = isBitPackableType!(TypeOfBitPacked!(Result)); } } } /* Check if $(D Prefix) is a valid set of predicates for $(D Trie) template having $(D Key) as the type of keys. This requires all predicates to be callable, take single argument of type $(D Key) and return unsigned value. */ template isValidPrefixForTrie(Key, Prefix...) { enum isValidPrefixForTrie = allSatisfy!(callableWith!Key, Prefix); // TODO: tighten the screws } /* Check if $(D Args) is a set of maximum key value followed by valid predicates for $(D Trie) template having $(D Key) as the type of keys. */ template isValidArgsForTrie(Key, Args...) { static if(Args.length > 1) { enum isValidArgsForTrie = isValidPrefixForTrie!(Key, Args) || (isValidPrefixForTrie!(Key, Args[1..$]) && is(typeof(Args[0]) : Key)); } else enum isValidArgsForTrie = isValidPrefixForTrie!Args; } @property size_t sumOfIntegerTuple(ints...)() { size_t count=0; foreach(v; ints) count += v; return count; } /** A shorthand for creating a custom multi-level fixed Trie from a $(D CodepointSet). $(D sizes) are numbers of bits per level, with the most significant bits used first. Note: The sum of $(D sizes) must be equal 21. See_Also: $(LREF toTrie), which is even simpler. Example: --- { import std.stdio; auto set = unicode("Number"); auto trie = codepointSetTrie!(8, 5, 8)(set); writeln("Input code points to test:"); foreach(line; stdin.byLine) { int count=0; foreach(dchar ch; line) if(trie[ch])// is number count++; writefln("Contains %d number code points.", count); } } --- */ public template codepointSetTrie(sizes...) if(sumOfIntegerTuple!sizes == 21) { auto codepointSetTrie(Set)(Set set) if(isCodepointSet!Set) { auto builder = TrieBuilder!(bool, dchar, lastDchar+1, GetBitSlicing!(21, sizes))(false); foreach(ival; set.byInterval) builder.putRange(ival[0], ival[1], true); return builder.build(); } } /// Type of Trie generated by codepointSetTrie function. public template CodepointSetTrie(sizes...) if(sumOfIntegerTuple!sizes == 21) { alias Prefix = GetBitSlicing!(21, sizes); alias CodepointSetTrie = typeof(TrieBuilder!(bool, dchar, lastDchar+1, Prefix)(false).build()); } /** A slightly more general tool for building fixed $(D Trie) for the Unicode data. Specifically unlike $(D codepointSetTrie) it's allows creating mappings of $(D dchar) to an arbitrary type $(D T). Note: Overload taking $(D CodepointSet)s will naturally convert only to bool mapping $(D Trie)s. Example: --- // pick characters from the Greek script auto set = unicode.Greek; // a user-defined property (or an expensive function) // that we want to look up static uint luckFactor(dchar ch) { // here we consider a character lucky // if its code point has a lot of identical hex-digits // e.g. arabic letter DDAL (\u0688) has a "luck factor" of 2 ubyte[6] nibbles; // 6 4-bit chunks of code point uint value = ch; foreach(i; 0..6) { nibbles[i] = value & 0xF; value >>= 4; } uint luck; foreach(n; nibbles) luck = cast(uint)max(luck, count(nibbles[], n)); return luck; } // only unsigned built-ins are supported at the moment alias LuckFactor = BitPacked!(uint, 3); // create a temporary associative array (AA) LuckFactor[dchar] map; foreach(ch; set.byCodepoint) map[ch] = luckFactor(ch); // bits per stage are chosen randomly, fell free to optimize auto trie = codepointTrie!(LuckFactor, 8, 5, 8)(map); // from now on the AA is not needed foreach(ch; set.byCodepoint) assert(trie[ch] == luckFactor(ch)); // verify // CJK is not Greek, thus it has the default value assert(trie['\u4444'] == 0); // and here is a couple of quite lucky Greek characters: // Greek small letter epsilon with dasia assert(trie['\u1F11'] == 3); // Ancient Greek metretes sign assert(trie['\U00010181'] == 3); --- */ public template codepointTrie(T, sizes...) if(sumOfIntegerTuple!sizes == 21) { alias Prefix = GetBitSlicing!(21, sizes); static if(is(TypeOfBitPacked!T == bool)) { auto codepointTrie(Set)(in Set set) if(isCodepointSet!Set) { return codepointSetTrie(set); } } auto codepointTrie()(T[dchar] map, T defValue=T.init) { return buildTrie!(T, dchar, Prefix)(map, defValue); } // unsorted range of pairs auto codepointTrie(R)(R range, T defValue=T.init) if(isInputRange!R && is(typeof(ElementType!R.init[0]) : T) && is(typeof(ElementType!R.init[1]) : dchar)) { // build from unsorted array of pairs // TODO: expose index sorting functions for Trie return buildTrie!(T, dchar, Prefix)(range, defValue, true); } } unittest // codepointTrie example { // pick characters from the Greek script auto set = unicode.Greek; // a user-defined property (or an expensive function) // that we want to look up static uint luckFactor(dchar ch) { // here we consider a character lucky // if its code point has a lot of identical hex-digits // e.g. arabic letter DDAL (\u0688) has a "luck factor" of 2 ubyte[6] nibbles; // 6 4-bit chunks of code point uint value = ch; foreach(i; 0..6) { nibbles[i] = value & 0xF; value >>= 4; } uint luck; foreach(n; nibbles) luck = cast(uint)max(luck, count(nibbles[], n)); return luck; } // only unsigned built-ins are supported at the moment alias LuckFactor = BitPacked!(uint, 3); // create a temporary associative array (AA) LuckFactor[dchar] map; foreach(ch; set.byCodepoint) map[ch] = LuckFactor(luckFactor(ch)); // bits per stage are chosen randomly, fell free to optimize auto trie = codepointTrie!(LuckFactor, 8, 5, 8)(map); // from now on the AA is not needed foreach(ch; set.byCodepoint) assert(trie[ch] == luckFactor(ch)); // verify // CJK is not Greek, thus it has the default value assert(trie['\u4444'] == 0); // and here is a couple of quite lucky Greek characters: // Greek small letter epsilon with dasia assert(trie['\u1F11'] == 3); // Ancient Greek metretes sign assert(trie['\U00010181'] == 3); } /// Type of Trie as generated by codepointTrie function. public template CodepointTrie(T, sizes...) if(sumOfIntegerTuple!sizes == 21) { alias Prefix = GetBitSlicing!(21, sizes); alias CodepointTrie = typeof(TrieBuilder!(T, dchar, lastDchar+1, Prefix)(T.init).build()); } // @@@BUG multiSort can's access private symbols from uni public template cmpK0(alias Pred) { static bool cmpK0(Value, Key) (Tuple!(Value, Key) a, Tuple!(Value, Key) b) { return Pred(a[1]) < Pred(b[1]); } } /* The most general utility for construction of $(D Trie)s short of using $(D TrieBuilder) directly. Provides a number of convenience overloads. $(D Args) is tuple of maximum key value followed by predicates to construct index from key. Alternatively if the first argument is not a value convertible to $(D Key) then the whole tuple of $(D Args) is treated as predicates and the maximum Key is deduced from predicates. */ public template buildTrie(Value, Key, Args...) if(isValidArgsForTrie!(Key, Args)) { static if(is(typeof(Args[0]) : Key)) // prefix starts with upper bound on Key { alias Prefix = Args[1..$]; } else alias Prefix = Args; alias getIndex = mapTrieIndex!(Prefix); // for multi-sort template GetComparators(size_t n) { static if(n > 0) alias GetComparators = TypeTuple!(GetComparators!(n-1), cmpK0!(Prefix[n-1])); else alias GetComparators = TypeTuple!(); } /* Build $(D Trie) from a range of a Key-Value pairs, assuming it is sorted by Key as defined by the following lambda: ------ (a, b) => mapTrieIndex!(Prefix)(a) < mapTrieIndex!(Prefix)(b) ------ Exception is thrown if it's detected that the above order doesn't hold. In other words $(LREF mapTrieIndex) should be a monotonically increasing function that maps $(D Key) to an integer. See also: $(XREF _algorithm, sort), $(XREF _range, SortedRange), $(XREF _algorithm, setUnion). */ auto buildTrie(Range)(Range range, Value filler=Value.init) if(isInputRange!Range && is(typeof(Range.init.front[0]) : Value) && is(typeof(Range.init.front[1]) : Key)) { auto builder = TrieBuilder!(Value, Key, Prefix)(filler); foreach(v; range) builder.putValue(v[1], v[0]); return builder.build(); } /* If $(D Value) is bool (or BitPacked!(bool, x)) then it's possible to build $(D Trie) from a range of open-right intervals of $(D Key)s. The requirement on the ordering of keys (and the behavior on the violation of it) is the same as for Key-Value range overload. Intervals denote ranges of !$(D filler) i.e. the opposite of filler. If no filler provided keys inside of the intervals map to true, and $(D filler) is false. */ auto buildTrie(Range)(Range range, Value filler=Value.init) if(is(TypeOfBitPacked!Value == bool) && isInputRange!Range && is(typeof(Range.init.front[0]) : Key) && is(typeof(Range.init.front[1]) : Key)) { auto builder = TrieBuilder!(Value, Key, Prefix)(filler); foreach(ival; range) builder.putRange(ival[0], ival[1], !filler); return builder.build(); } auto buildTrie(Range)(Range range, Value filler, bool unsorted) if(isInputRange!Range && is(typeof(Range.init.front[0]) : Value) && is(typeof(Range.init.front[1]) : Key)) { alias Comps = GetComparators!(Prefix.length); if(unsorted) multiSort!(Comps)(range); return buildTrie(range, filler); } /* If $(D Value) is bool (or BitPacked!(bool, x)) then it's possible to build $(D Trie) simply from an input range of $(D Key)s. The requirement on the ordering of keys (and the behavior on the violation of it) is the same as for Key-Value range overload. Keys found in range denote !$(D filler) i.e. the opposite of filler. If no filler provided keys map to true, and $(D filler) is false. */ auto buildTrie(Range)(Range range, Value filler=Value.init) if(is(TypeOfBitPacked!Value == bool) && isInputRange!Range && is(typeof(Range.init.front) : Key)) { auto builder = TrieBuilder!(Value, Key, Prefix)(filler); foreach(v; range) builder.putValue(v, !filler); return builder.build(); } /* If $(D Key) is unsigned integer $(D Trie) could be constructed from array of values where array index serves as key. */ auto buildTrie()(Value[] array, Value filler=Value.init) if(isUnsigned!Key) { auto builder = TrieBuilder!(Value, Key, Prefix)(filler); foreach(idx, v; array) builder.putValue(idx, v); return builder.build(); } /* Builds $(D Trie) from associative array. */ auto buildTrie(Key, Value)(Value[Key] map, Value filler=Value.init) { auto range = array(zip(map.values, map.keys)); return buildTrie(range, filler, true); // sort it } } /++ Convenience function to construct optimal configurations for packed Trie from any $(D set) of $(CODEPOINTS). The parameter $(D level) indicates the number of trie levels to use, allowed values are: 1, 2, 3 or 4. Levels represent different trade-offs speed-size wise. $(P Level 1 is fastest and the most memory hungry (a bit array). ) $(P Level 4 is the slowest and has the smallest footprint. ) See the $(S_LINK Synopsis, Synopsis) section for example. Note: Level 4 stays very practical (being faster and more predictable) compared to using direct lookup on the $(D set) itself. +/ public auto toTrie(size_t level, Set)(Set set) if(isCodepointSet!Set) { static if(level == 1) return codepointSetTrie!(21)(set); else static if(level == 2) return codepointSetTrie!(10, 11)(set); else static if(level == 3) return codepointSetTrie!(8, 5, 8)(set); else static if(level == 4) return codepointSetTrie!(6, 4, 4, 7)(set); else static assert(false, "Sorry, toTrie doesn't support levels > 4, use codepointSetTrie directly"); } /** $(P Builds a $(D Trie) with typically optimal speed-size trade-off and wraps it into a delegate of the following type: $(D bool delegate(dchar ch)). ) $(P Effectively this creates a 'tester' lambda suitable for algorithms like std.algorithm.find that take unary predicates. ) See the $(S_LINK Synopsis, Synopsis) section for example. */ public auto toDelegate(Set)(Set set) if(isCodepointSet!Set) { // 3 is very small and is almost as fast as 2-level (due to CPU caches?) auto t = toTrie!3(set); return (dchar ch) => t[ch]; } /** $(P Opaque wrapper around unsigned built-in integers and code unit (char/wchar/dchar) types. Parameter $(D sz) indicates that the value is confined to the range of [0, 2^^sz$(RPAREN). With this knowledge it can be packed more tightly when stored in certain data-structures like trie. ) Note: $(P The $(D BitPacked!(T, sz)) is implicitly convertible to $(D T) but not vise-versa. Users have to ensure the value fits in the range required and use the $(D cast) operator to perform the conversion.) */ struct BitPacked(T, size_t sz) if(isIntegral!T || is(T:dchar)) { enum bitSize = sz; T _value; alias _value this; } /* Depending on the form of the passed argument $(D bitSizeOf) returns the amount of bits required to represent a given type or a return type of a given functor. */ template bitSizeOf(Args...) if(Args.length == 1) { alias T = Args[0]; static if(__traits(compiles, { size_t val = T.bitSize; })) //(is(typeof(T.bitSize) : size_t)) { enum bitSizeOf = T.bitSize; } else static if(is(ReturnType!T dummy == BitPacked!(U, bits), U, size_t bits)) { enum bitSizeOf = bitSizeOf!(ReturnType!T); } else { enum bitSizeOf = T.sizeof*8; } } /** Tests if $(D T) is some instantiation of $(LREF BitPacked)!(U, x) and thus suitable for packing. */ template isBitPacked(T) { static if(is(T dummy == BitPacked!(U, bits), U, size_t bits)) enum isBitPacked = true; else enum isBitPacked = false; } /** Gives the type $(D U) from $(LREF BitPacked)!(U, x) or $(D T) itself for every other type. */ template TypeOfBitPacked(T) { static if(is(T dummy == BitPacked!(U, bits), U, size_t bits)) alias TypeOfBitPacked = U; else alias TypeOfBitPacked = T; } /* Wrapper, used in definition of custom data structures from $(D Trie) template. Applying it to a unary lambda function indicates that the returned value always fits within $(D bits) of bits. */ struct assumeSize(alias Fn, size_t bits) { enum bitSize = bits; static auto ref opCall(T)(auto ref T arg) { return Fn(arg); } } /* A helper for defining lambda function that yields a slice of certain bits from an unsigned integral value. The resulting lambda is wrapped in assumeSize and can be used directly with $(D Trie) template. */ struct sliceBits(size_t from, size_t to) { //for now bypass assumeSize, DMD has trouble inlining it enum bitSize = to-from; static auto opCall(T)(T x) out(result) { assert(result < (1<<to-from)); } body { static assert(from < to); return (x >> from) & ((1<<(to-from))-1); } } uint low_8(uint x) { return x&0xFF; } @safe pure nothrow uint midlow_8(uint x){ return (x&0xFF00)>>8; } alias assumeSize!(low_8, 8) lo8; alias assumeSize!(midlow_8, 8) mlo8; static assert(bitSizeOf!lo8 == 8); static assert(bitSizeOf!(sliceBits!(4, 7)) == 3); static assert(bitSizeOf!(BitPacked!(uint, 2)) == 2); template Sequence(size_t start, size_t end) { static if(start < end) alias TypeTuple!(start, Sequence!(start+1, end)) Sequence; else alias TypeTuple!() Sequence; } //---- TRIE TESTS ---- unittest { static trieStats(TRIE)(TRIE t) { version(std_uni_stats) { import std.stdio; writeln("---TRIE FOOTPRINT STATS---"); foreach(i; Sequence!(0, t.table.dim) ) { writefln("lvl%s = %s bytes; %s pages" , i, t.bytes!i, t.pages!i); } writefln("TOTAL: %s bytes", t.bytes); version(none) { writeln("INDEX (excluding value level):"); foreach(i; Sequence!(0, t.table.dim-1) ) writeln(t.table.slice!(i)[0..t.table.length!i]); } writeln("---------------------------"); } } //@@@BUG link failure, lambdas not found by linker somehow (in case of trie2) // alias assumeSize!(8, function (uint x) { return x&0xFF; }) lo8; // alias assumeSize!(7, function (uint x) { return (x&0x7F00)>>8; }) next8; alias CodepointSet Set; auto set = Set('A','Z','a','z'); auto trie = buildTrie!(bool, uint, 256, lo8)(set.byInterval);// simple bool array for(int a='a'; a<'z';a++) assert(trie[a]); for(int a='A'; a<'Z';a++) assert(trie[a]); for(int a=0; a<'A'; a++) assert(!trie[a]); for(int a ='Z'; a<'a'; a++) assert(!trie[a]); trieStats(trie); auto redundant2 = Set( 1, 18, 256+2, 256+111, 512+1, 512+18, 768+2, 768+111); auto trie2 = buildTrie!(bool, uint, 1024, mlo8, lo8)(redundant2.byInterval); trieStats(trie2); foreach(e; redundant2.byCodepoint) assert(trie2[e], text(cast(uint)e, " - ", trie2[e])); foreach(i; 0..1024) { assert(trie2[i] == (i in redundant2)); } auto redundant3 = Set( 2, 4, 6, 8, 16, 2+16, 4+16, 16+6, 16+8, 16+16, 2+32, 4+32, 32+6, 32+8, ); enum max3 = 256; // sliceBits auto trie3 = buildTrie!(bool, uint, max3, sliceBits!(6,8), sliceBits!(4,6), sliceBits!(0,4) )(redundant3.byInterval); trieStats(trie3); foreach(i; 0..max3) assert(trie3[i] == (i in redundant3), text(cast(uint)i)); auto redundant4 = Set( 10, 64, 64+10, 128, 128+10, 256, 256+10, 512, 1000, 2000, 3000, 4000, 5000, 6000 ); enum max4 = 2^^16; auto trie4 = buildTrie!(bool, size_t, max4, sliceBits!(13, 16), sliceBits!(9, 13), sliceBits!(6, 9) , sliceBits!(0, 6) )(redundant4.byInterval); foreach(i; 0..max4){ if(i in redundant4) assert(trie4[i], text(cast(uint)i)); } trieStats(trie4); alias mapToS = mapTrieIndex!(useItemAt!(0, char)); string[] redundantS = ["tea", "start", "orange"]; redundantS.sort!((a,b) => mapToS(a) < mapToS(b))(); auto strie = buildTrie!(bool, string, useItemAt!(0, char))(redundantS); // using first char only assert(redundantS == ["orange", "start", "tea"]); assert(strie["test"], text(strie["test"])); assert(!strie["aea"]); assert(strie["s"]); // a bit size test auto a = array(map!(x => to!ubyte(x))(iota(0, 256))); auto bt = buildTrie!(bool, ubyte, sliceBits!(7, 8), sliceBits!(5, 7), sliceBits!(0, 5))(a); trieStats(bt); foreach(i; 0..256) assert(bt[cast(ubyte)i]); } template useItemAt(size_t idx, T) if(isIntegral!T || is(T: dchar)) { size_t impl(in T[] arr){ return arr[idx]; } alias useItemAt = assumeSize!(impl, 8*T.sizeof); } template useLastItem(T) { size_t impl(in T[] arr){ return arr[$-1]; } alias useLastItem = assumeSize!(impl, 8*T.sizeof); } template fullBitSize(Prefix...) { static if(Prefix.length > 0) enum fullBitSize = bitSizeOf!(Prefix[0])+fullBitSize!(Prefix[1..$]); else enum fullBitSize = 0; } template idxTypes(Key, size_t fullBits, Prefix...) { static if(Prefix.length == 1) {// the last level is value level, so no index once reduced to 1-level alias TypeTuple!() idxTypes; } else { // Important note on bit packing // Each level has to hold enough of bits to address the next one // The bottom level is known to hold full bit width // thus it's size in pages is full_bit_width - size_of_last_prefix // Recourse on this notion alias TypeTuple!( idxTypes!(Key, fullBits - bitSizeOf!(Prefix[$-1]), Prefix[0..$-1]), BitPacked!(typeof(Prefix[$-2](Key.init)), fullBits - bitSizeOf!(Prefix[$-1])) ) idxTypes; } } //============================================================================ @trusted int comparePropertyName(Char1, Char2)(const(Char1)[] a, const(Char2)[] b) { alias low = std.ascii.toLower; return cmp( a.map!(x => low(x))() .filter!(x => !isWhite(x) && x != '-' && x != '_')(), b.map!(x => low(x))() .filter!(x => !isWhite(x) && x != '-' && x != '_')() ); } bool propertyNameLess(Char1, Char2)(const(Char1)[] a, const(Char2)[] b) { return comparePropertyName(a, b) < 0; } //============================================================================ // Utilities for compression of Unicode code point sets //============================================================================ @safe void compressTo(uint val, ref ubyte[] arr) pure nothrow { // not optimized as usually done 1 time (and not public interface) if(val < 128) arr ~= cast(ubyte)val; else if(val < (1<<13)) { arr ~= (0b1_00<<5) | cast(ubyte)(val>>8); arr ~= val & 0xFF; } else { assert(val < (1<<21)); arr ~= (0b1_01<<5) | cast(ubyte)(val>>16); arr ~= (val >> 8) & 0xFF; arr ~= val & 0xFF; } } @safe uint decompressFrom(const(ubyte)[] arr, ref size_t idx) pure { uint first = arr[idx++]; if(!(first & 0x80)) // no top bit -> [0..127] return first; uint extra = ((first>>5) & 1) + 1; // [1, 2] uint val = (first & 0x1F); enforce(idx + extra <= arr.length, "bad code point interval encoding"); foreach(j; 0..extra) val = (val<<8) | arr[idx+j]; idx += extra; return val; } package ubyte[] compressIntervals(Range)(Range intervals) if(isInputRange!Range && isIntegralPair!(ElementType!Range)) { ubyte[] storage; uint base = 0; // RLE encode foreach(val; intervals) { compressTo(val[0]-base, storage); base = val[0]; if(val[1] != lastDchar+1) // till the end of the domain so don't store it { compressTo(val[1]-base, storage); base = val[1]; } } return storage; } unittest { auto run = [tuple(80, 127), tuple(128, (1<<10)+128)]; ubyte[] enc = [cast(ubyte)80, 47, 1, (0b1_00<<5) | (1<<2), 0]; assert(compressIntervals(run) == enc); auto run2 = [tuple(0, (1<<20)+512+1), tuple((1<<20)+512+4, lastDchar+1)]; ubyte[] enc2 = [cast(ubyte)0, (0b1_01<<5) | (1<<4), 2, 1, 3]; // odd length-ed assert(compressIntervals(run2) == enc2); size_t idx = 0; assert(decompressFrom(enc, idx) == 80); assert(decompressFrom(enc, idx) == 47); assert(decompressFrom(enc, idx) == 1); assert(decompressFrom(enc, idx) == (1<<10)); idx = 0; assert(decompressFrom(enc2, idx) == 0); assert(decompressFrom(enc2, idx) == (1<<20)+512+1); assert(equalS(decompressIntervals(compressIntervals(run)), run)); assert(equalS(decompressIntervals(compressIntervals(run2)), run2)); } // Creates a range of $(D CodepointInterval) that lazily decodes compressed data. @safe package auto decompressIntervals(const(ubyte)[] data) { return DecompressedIntervals(data); } @trusted struct DecompressedIntervals { const(ubyte)[] _stream; size_t _idx; CodepointInterval _front; this(const(ubyte)[] stream) { _stream = stream; popFront(); } @property CodepointInterval front() { assert(!empty); return _front; } void popFront() { if(_idx == _stream.length) { _idx = size_t.max; return; } uint base = _front[1]; _front[0] = base + decompressFrom(_stream, _idx); if(_idx == _stream.length)// odd length ---> till the end _front[1] = lastDchar+1; else { base = _front[0]; _front[1] = base + decompressFrom(_stream, _idx); } } @property bool empty() const { return _idx == size_t.max; } @property DecompressedIntervals save() { return this; } } static assert(isInputRange!DecompressedIntervals); static assert(isForwardRange!DecompressedIntervals); //============================================================================ version(std_uni_bootstrap){} else { // helper for looking up code point sets @trusted ptrdiff_t findUnicodeSet(alias table, C)(in C[] name) { auto range = assumeSorted!((a,b) => propertyNameLess(a,b)) (table.map!"a.name"()); size_t idx = range.lowerBound(name).length; if(idx < range.length && comparePropertyName(range[idx], name) == 0) return idx; return -1; } // another one that loads it @trusted bool loadUnicodeSet(alias table, Set, C)(in C[] name, ref Set dest) { auto idx = findUnicodeSet!table(name); if(idx >= 0) { dest = Set(asSet(table[idx].compressed)); return true; } return false; } @trusted bool loadProperty(Set=CodepointSet, C) (in C[] name, ref Set target) { alias comparePropertyName ucmp; // conjure cumulative properties by hand if(ucmp(name, "L") == 0 || ucmp(name, "Letter") == 0) { target |= asSet(uniPropLu); target |= asSet(uniPropLl); target |= asSet(uniPropLt); target |= asSet(uniPropLo); target |= asSet(uniPropLm); } else if(ucmp(name,"LC") == 0 || ucmp(name,"Cased Letter")==0) { target |= asSet(uniPropLl); target |= asSet(uniPropLu); target |= asSet(uniPropLt);// Title case } else if(ucmp(name, "M") == 0 || ucmp(name, "Mark") == 0) { target |= asSet(uniPropMn); target |= asSet(uniPropMc); target |= asSet(uniPropMe); } else if(ucmp(name, "N") == 0 || ucmp(name, "Number") == 0) { target |= asSet(uniPropNd); target |= asSet(uniPropNl); target |= asSet(uniPropNo); } else if(ucmp(name, "P") == 0 || ucmp(name, "Punctuation") == 0) { target |= asSet(uniPropPc); target |= asSet(uniPropPd); target |= asSet(uniPropPs); target |= asSet(uniPropPe); target |= asSet(uniPropPi); target |= asSet(uniPropPf); target |= asSet(uniPropPo); } else if(ucmp(name, "S") == 0 || ucmp(name, "Symbol") == 0) { target |= asSet(uniPropSm); target |= asSet(uniPropSc); target |= asSet(uniPropSk); target |= asSet(uniPropSo); } else if(ucmp(name, "Z") == 0 || ucmp(name, "Separator") == 0) { target |= asSet(uniPropZs); target |= asSet(uniPropZl); target |= asSet(uniPropZp); } else if(ucmp(name, "C") == 0 || ucmp(name, "Other") == 0) { target |= asSet(uniPropCo); target |= asSet(uniPropLo); target |= asSet(uniPropNo); target |= asSet(uniPropSo); target |= asSet(uniPropPo); } else if(ucmp(name, "graphical") == 0){ target |= asSet(uniPropAlphabetic); target |= asSet(uniPropMn); target |= asSet(uniPropMc); target |= asSet(uniPropMe); target |= asSet(uniPropNd); target |= asSet(uniPropNl); target |= asSet(uniPropNo); target |= asSet(uniPropPc); target |= asSet(uniPropPd); target |= asSet(uniPropPs); target |= asSet(uniPropPe); target |= asSet(uniPropPi); target |= asSet(uniPropPf); target |= asSet(uniPropPo); target |= asSet(uniPropZs); target |= asSet(uniPropSm); target |= asSet(uniPropSc); target |= asSet(uniPropSk); target |= asSet(uniPropSo); } else if(ucmp(name, "any") == 0) target = Set(0,0x110000); else if(ucmp(name, "ascii") == 0) target = Set(0,0x80); else return loadUnicodeSet!propsTab(name, target); return true; } // CTFE-only helper for checking property names at compile-time @safe bool isPrettyPropertyName(C)(in C[] name) { auto names = [ "L", "Letters", "LC", "Cased Letter", "M", "Mark", "N", "Number", "P", "Punctuation", "S", "Symbol", "Z", "Separator" "Graphical", "any", "ascii" ]; auto x = find!(x => comparePropertyName(x, name) == 0)(names); return !x.empty; } // ditto, CTFE-only, not optimized @safe private static bool findSetName(alias table, C)(in C[] name) { return findUnicodeSet!table(name) >= 0; } template SetSearcher(alias table, string kind) { /// Run-time checked search. static auto opCall(C)(in C[] name) if(is(C : dchar)) { CodepointSet set; if(loadUnicodeSet!table(name, set)) return set; throw new Exception("No unicode set for "~kind~" by name " ~name.to!string()~" was found."); } /// Compile-time checked search. static @property auto opDispatch(string name)() { static if(findSetName!table(name)) { CodepointSet set; loadUnicodeSet!table(name, set); return set; } else static assert(false, "No unicode set for "~kind~" by name " ~name~" was found."); } } /** A single entry point to lookup Unicode $(CODEPOINT) sets by name or alias of a block, script or general category. It uses well defined standard rules of property name lookup. This includes fuzzy matching of names, so that 'White_Space', 'white-SpAce' and 'whitespace' are all considered equal and yield the same set of white space $(CHARACTERS). */ @safe public struct unicode { /** Performs the lookup of set of $(CODEPOINTS) with compile-time correctness checking. This short-cut version combines 3 searches: across blocks, scripts, and common binary properties. Note that since scripts and blocks overlap the usual trick to disambiguate is used - to get a block use $(D unicode.InBlockName), to search a script use $(D unicode.ScriptName). See also $(LREF block), $(LREF script) and (not included in this search) $(LREF hangulSyllableType). Example: --- auto ascii = unicode.ASCII; assert(ascii['A']); assert(ascii['~']); assert(!ascii['\u00e0']); // matching is case-insensitive assert(ascii == unicode.ascII); assert(!ascii['à']); // underscores, '-' and whitespace in names are ignored too auto latin = unicode.in_latin1_Supplement; assert(latin['à']); assert(!latin['$']); // BTW Latin 1 Supplement is a block, hence "In" prefix assert(latin == unicode("In Latin 1 Supplement")); import std.exception; // run-time look up throws if no such set is found assert(collectException(unicode("InCyrilliac"))); --- */ static @property auto opDispatch(string name)() { static if(findAny(name)) return loadAny(name); else static assert(false, "No unicode set by name "~name~" was found."); } /** The same lookup across blocks, scripts, or binary properties, but performed at run-time. This version is provided for cases where $(D name) is not known beforehand; otherwise compile-time checked $(LREF opDispatch) is typically a better choice. See the $(S_LINK Unicode properties, table of properties) for available sets. */ static auto opCall(C)(in C[] name) if(is(C : dchar)) { return loadAny(name); } /** Narrows down the search for sets of $(CODEPOINTS) to all Unicode blocks. See also $(S_LINK Unicode properties, table of properties). Note: Here block names are unambiguous as no scripts are searched and thus to search use simply $(D unicode.block.BlockName) notation. See $(S_LINK Unicode properties, table of properties) for available sets. Example: --- // use .block for explicitness assert(unicode.block.Greek_and_Coptic == unicode.InGreek_and_Coptic); --- */ struct block { mixin SetSearcher!(blocksTab, "block"); } /** Narrows down the search for sets of $(CODEPOINTS) to all Unicode scripts. See the $(S_LINK Unicode properties, table of properties) for available sets. Example: --- auto arabicScript = unicode.script.arabic; auto arabicBlock = unicode.block.arabic; // there is an intersection between script and block assert(arabicBlock['؁']); assert(arabicScript['؁']); // but they are different assert(arabicBlock != arabicScript); assert(arabicBlock == unicode.inArabic); assert(arabicScript == unicode.arabic); --- */ struct script { mixin SetSearcher!(scriptsTab, "script"); } /** Fetch a set of $(CODEPOINTS) that have the given hangul syllable type. Other non-binary properties (once supported) follow the same notation - $(D unicode.propertyName.propertyValue) for compile-time checked access and $(D unicode.propertyName(propertyValue)) for run-time checked one. See the $(S_LINK Unicode properties, table of properties) for available sets. Example: --- // L here is syllable type not Letter as in unicode.L short-cut auto leadingVowel = unicode.hangulSyllableType("L"); // check that some leading vowels are present foreach(vowel; '\u1110'..'\u115F') assert(leadingVowel[vowel]); assert(leadingVowel == unicode.hangulSyllableType.L); --- */ struct hangulSyllableType { mixin SetSearcher!(hangulTab, "hangul syllable type"); } private: alias ucmp = comparePropertyName; static bool findAny(string name) { return isPrettyPropertyName(name) || findSetName!propsTab(name) || findSetName!scriptsTab(name) || (ucmp(name[0..2],"In") == 0 && findSetName!blocksTab(name[2..$])); } static auto loadAny(Set=CodepointSet, C)(in C[] name) { Set set; bool loaded = loadProperty(name, set) || loadUnicodeSet!scriptsTab(name, set) || (ucmp(name[0..2],"In") == 0 && loadUnicodeSet!blocksTab(name[2..$], set)); if(loaded) return set; throw new Exception("No unicode set by name "~name.to!string()~" was found."); } // FIXME: re-disable once the compiler is fixed // Disabled to prevent the mistake of creating instances of this pseudo-struct. //@disable ~this(); } unittest { auto ascii = unicode.ASCII; assert(ascii['A']); assert(ascii['~']); assert(!ascii['\u00e0']); // matching is case-insensitive assert(ascii == unicode.ascII); assert(!ascii['à']); // underscores, '-' and whitespace in names are ignored too auto latin = unicode.Inlatin1_Supplement; assert(latin['à']); assert(!latin['$']); // BTW Latin 1 Supplement is a block, hence "In" prefix assert(latin == unicode("In Latin 1 Supplement")); import std.exception; // R-T look up throws if no such set is found assert(collectException(unicode("InCyrilliac"))); assert(unicode.block.Greek_and_Coptic == unicode.InGreek_and_Coptic); // L here is explicitly syllable type not "Letter" as in unicode.L auto leadingVowel = unicode.hangulSyllableType("L"); // check that some leading vowels are present foreach(vowel; '\u1110'..'\u115F'+1) assert(leadingVowel[vowel]); assert(leadingVowel == unicode.hangulSyllableType.L); auto arabicScript = unicode.script.arabic; auto arabicBlock = unicode.block.arabic; // there is an intersection between script and block assert(arabicBlock['؁']); assert(arabicScript['؁']); // but they are different assert(arabicBlock != arabicScript); assert(arabicBlock == unicode.inArabic); assert(arabicScript == unicode.arabic); } unittest { assert(unicode("InHebrew") == asSet(blockHebrew)); assert(unicode("separator") == (asSet(uniPropZs) | asSet(uniPropZl) | asSet(uniPropZp))); assert(unicode("In-Kharoshthi") == asSet(blockKharoshthi)); } enum EMPTY_CASE_TRIE = ushort.max;// from what gen_uni uses internally // control - '\r' enum controlSwitch = ` case '\u0000':..case '\u0008':case '\u000E':..case '\u001F':case '\u007F':..case '\u0084':case '\u0086':..case '\u009F': case '\u0009':..case '\u000C': case '\u0085': `; // TODO: redo the most of hangul stuff algorithmically in case of Graphemes too // kill unrolled switches private static bool isRegionalIndicator(dchar ch) { return ch >= '\U0001F1E6' && ch <= '\U0001F1FF'; } template genericDecodeGrapheme(bool getValue) { static immutable graphemeExtend = asTrie(graphemeExtendTrieEntries); static immutable spacingMark = asTrie(mcTrieEntries); static if(getValue) alias Grapheme Value; else alias void Value; Value genericDecodeGrapheme(Input)(ref Input range) { enum GraphemeState { Start, CR, RI, L, V, LVT } static if(getValue) Grapheme grapheme; auto state = GraphemeState.Start; enum eat = q{ static if(getValue) grapheme ~= ch; range.popFront(); }; dchar ch; assert(!range.empty, "Attempting to decode grapheme from an empty " ~ Input.stringof); while(!range.empty) { ch = range.front; final switch(state) with(GraphemeState) { case Start: mixin(eat); if(ch == '\r') state = CR; else if(isRegionalIndicator(ch)) state = RI; else if(isHangL(ch)) state = L; else if(hangLV[ch] || isHangV(ch)) state = V; else if(hangLVT[ch]) state = LVT; else if(isHangT(ch)) state = LVT; else { switch(ch) { mixin(controlSwitch); goto L_End; default: goto L_End_Extend; } } break; case CR: if(ch == '\n') mixin(eat); goto L_End_Extend; case RI: if(isRegionalIndicator(ch)) mixin(eat); else goto L_End_Extend; break; case L: if(isHangL(ch)) mixin(eat); else if(isHangV(ch) || hangLV[ch]) { state = V; mixin(eat); } else if(hangLVT[ch]) { state = LVT; mixin(eat); } else goto L_End_Extend; break; case V: if(isHangV(ch)) mixin(eat); else if(isHangT(ch)) { state = LVT; mixin(eat); } else goto L_End_Extend; break; case LVT: if(isHangT(ch)) { mixin(eat); } else goto L_End_Extend; break; } } L_End_Extend: while(!range.empty) { ch = range.front; // extend & spacing marks if(!graphemeExtend[ch] && !spacingMark[ch]) break; mixin(eat); } L_End: static if(getValue) return grapheme; } } @trusted: public: // Public API continues /++ Returns the length of grapheme cluster starting at $(D index). Both the resulting length and the $(D index) are measured in $(S_LINK Code unit, code units). Example: --- // ASCII as usual is 1 code unit, 1 code point etc. assert(graphemeStride(" ", 1) == 1); // A + combing ring above string city = "A\u030Arhus"; size_t first = graphemeStride(city, 0); assert(first == 3); //\u030A has 2 UTF-8 code units assert(city[0..first] == "A\u030A"); assert(city[first..$] == "rhus"); --- +/ size_t graphemeStride(C)(in C[] input, size_t index) if(is(C : dchar)) { auto src = input[index..$]; auto n = src.length; genericDecodeGrapheme!(false)(src); return n - src.length; } // for now tested separately see test_grapheme.d unittest { assert(graphemeStride(" ", 1) == 1); // A + combing ring above string city = "A\u030Arhus"; size_t first = graphemeStride(city, 0); assert(first == 3); //\u030A has 2 UTF-8 code units assert(city[0..first] == "A\u030A"); assert(city[first..$] == "rhus"); } /++ Reads one full grapheme cluster from an input range of dchar $(D inp). For examples see the $(LREF Grapheme) below. Note: This function modifies $(D inp) and thus $(D inp) must be an L-value. +/ Grapheme decodeGrapheme(Input)(ref Input inp) if(isInputRange!Input && is(Unqual!(ElementType!Input) == dchar)) { return genericDecodeGrapheme!true(inp); } unittest { Grapheme gr; string s = " \u0020\u0308 "; gr = decodeGrapheme(s); assert(gr.length == 1 && gr[0] == ' '); gr = decodeGrapheme(s); assert(gr.length == 2 && equalS(gr[0..2], " \u0308")); s = "\u0300\u0308\u1100"; assert(equalS(decodeGrapheme(s)[], "\u0300\u0308")); assert(equalS(decodeGrapheme(s)[], "\u1100")); s = "\u11A8\u0308\uAC01"; assert(equalS(decodeGrapheme(s)[], "\u11A8\u0308")); assert(equalS(decodeGrapheme(s)[], "\uAC01")); } /++ $(P A structure designed to effectively pack $(CHARACTERS) of a $(CLUSTER). ) $(P $(D Grapheme) has value semantics so 2 copies of a $(D Grapheme) always refer to distinct objects. In most actual scenarios a $(D Grapheme) fits on the stack and avoids memory allocation overhead for all but quite long clusters. ) Example: --- import std.algorithm; string bold = "ku\u0308hn"; // note that decodeGrapheme takes parameter by ref // slicing a grapheme yields a range of dchar assert(decodeGrapheme(bold)[].equal("k")); // the next grapheme is 2 characters long auto wideOne = decodeGrapheme(bold); assert(wideOne.length == 2); assert(wideOne[].equal("u\u0308")); // the usual range manipulation is possible assert(wideOne[].filter!isMark.equal("\u0308")); --- $(P See also $(LREF decodeGrapheme), $(LREF graphemeStride). ) +/ @trusted struct Grapheme { public: this(C)(in C[] chars...) if(is(C : dchar)) { this ~= chars; } this(Input)(Input seq) if(!isDynamicArray!Input && isInputRange!Input && is(ElementType!Input : dchar)) { this ~= seq; } /// Gets a $(CODEPOINT) at the given index in this cluster. dchar opIndex(size_t index) const pure nothrow { assert(index < length); return read24(isBig ? ptr_ : small_.ptr, index); } /++ Writes a $(CODEPOINT) $(D ch) at given index in this cluster. Warning: Use of this facility may invalidate grapheme cluster, see also $(LREF Grapheme.valid). Example: --- auto g = Grapheme("A\u0302"); assert(g[0] == 'A'); assert(g.valid); g[1] = '~'; // ASCII tilda is not a combining mark assert(g[1] == '~'); assert(!g.valid); --- +/ void opIndexAssign(dchar ch, size_t index) pure nothrow { assert(index < length); write24(isBig ? ptr_ : small_.ptr, ch, index); } /++ Random-access range over Grapheme's $(CHARACTERS). Warning: Invalidates when this Grapheme leaves the scope, attempts to use it then would lead to memory corruption. +/ @system auto opSlice(size_t a, size_t b) pure nothrow { return sliceOverIndexed(a, b, &this); } /// ditto @system auto opSlice() pure nothrow { return sliceOverIndexed(0, length, &this); } /// Grapheme cluster length in $(CODEPOINTS). @property size_t length() const pure nothrow { return isBig ? len_ : slen_ & 0x7F; } /++ Append $(CHARACTER) $(D ch) to this grapheme. Warning: Use of this facility may invalidate grapheme cluster, see also $(D valid). Example: --- auto g = Grapheme("A"); assert(g.valid); g ~= '\u0301'; assert(g[].equal("A\u0301")); assert(g.valid); g ~= "B"; // not a valid grapheme cluster anymore assert(!g.valid); // still could be useful though assert(g[].equal("A\u0301B")); --- See also $(LREF Grapheme.valid) below. +/ ref opOpAssign(string op)(dchar ch) { static if(op == "~") { if(!isBig) { if(slen_ + 1 > small_cap) convertToBig();// & fallthrough to "big" branch else { write24(small_.ptr, ch, smallLength); slen_++; return this; } } assert(isBig); if(len_ + 1 > cap_) { cap_ += grow; ptr_ = cast(ubyte*)enforce(realloc(ptr_, 3*(cap_+1))); } write24(ptr_, ch, len_++); return this; } else static assert(false, "No operation "~op~" defined for Grapheme"); } /// Append all $(CHARACTERS) from the input range $(D inp) to this Grapheme. ref opOpAssign(string op, Input)(Input inp) if(isInputRange!Input && is(ElementType!Input : dchar)) { static if(op == "~") { foreach(dchar ch; inp) this ~= ch; return this; } else static assert(false, "No operation "~op~" defined for Grapheme"); } /++ True if this object contains valid extended grapheme cluster. Decoding primitives of this module always return a valid $(D Grapheme). Appending to and direct manipulation of grapheme's $(CHARACTERS) may render it no longer valid. Certain applications may chose to use Grapheme as a "small string" of any $(CODEPOINTS) and ignore this property entirely. +/ @property bool valid()() /*const*/ { auto r = this[]; genericDecodeGrapheme!false(r); return r.length == 0; } this(this) { if(isBig) {// dup it auto raw_cap = 3*(cap_+1); auto p = cast(ubyte*)enforce(malloc(raw_cap)); p[0..raw_cap] = ptr_[0..raw_cap]; ptr_ = p; } } ~this() { if(isBig) { free(ptr_); } } private: enum small_bytes = ((ubyte*).sizeof+3*size_t.sizeof-1); // "out of the blue" grow rate, needs testing // (though graphemes are typically small < 9) enum grow = 20; enum small_cap = small_bytes/3; enum small_flag = 0x80, small_mask = 0x7F; // 16 bytes in 32bits, should be enough for the majority of cases union { struct { ubyte* ptr_; size_t cap_; size_t len_; size_t padding_; } struct { ubyte[small_bytes] small_; ubyte slen_; } } void convertToBig() { size_t k = smallLength; ubyte* p = cast(ubyte*)enforce(malloc(3*(grow+1))); for(int i=0; i<k; i++) write24(p, read24(small_.ptr, i), i); // now we can overwrite small array data ptr_ = p; len_ = slen_; assert(grow > len_); cap_ = grow; setBig(); } void setBig(){ slen_ |= small_flag; } @property size_t smallLength() pure nothrow { return slen_ & small_mask; } @property ubyte isBig() const pure nothrow { return slen_ & small_flag; } } static assert(Grapheme.sizeof == size_t.sizeof*4); // verify the example unittest { import std.algorithm; string bold = "ku\u0308hn"; // note that decodeGrapheme takes parameter by ref auto first = decodeGrapheme(bold); assert(first.length == 1); assert(first[0] == 'k'); // the next grapheme is 2 characters long auto wideOne = decodeGrapheme(bold); // slicing a grapheme yields a random-access range of dchar assert(wideOne[].equalS("u\u0308")); assert(wideOne.length == 2); static assert(isRandomAccessRange!(typeof(wideOne[]))); // all of the usual range manipulation is possible assert(wideOne[].filter!isMark().equalS("\u0308")); auto g = Grapheme("A"); assert(g.valid); g ~= '\u0301'; assert(g[].equalS("A\u0301")); assert(g.valid); g ~= "B"; // not a valid grapheme cluster anymore assert(!g.valid); // still could be useful though assert(g[].equalS("A\u0301B")); } unittest { auto g = Grapheme("A\u0302"); assert(g[0] == 'A'); assert(g.valid); g[1] = '~'; // ASCII tilda is not a combining mark assert(g[1] == '~'); assert(!g.valid); } unittest { // not valid clusters (but it just a test) auto g = Grapheme('a', 'b', 'c', 'd', 'e'); assert(g[0] == 'a'); assert(g[1] == 'b'); assert(g[2] == 'c'); assert(g[3] == 'd'); assert(g[4] == 'e'); g[3] = 'Й'; assert(g[2] == 'c'); assert(g[3] == 'Й', text(g[3], " vs ", 'Й')); assert(g[4] == 'e'); assert(!g.valid); g ~= 'ц'; g ~= '~'; assert(g[0] == 'a'); assert(g[1] == 'b'); assert(g[2] == 'c'); assert(g[3] == 'Й'); assert(g[4] == 'e'); assert(g[5] == 'ц'); assert(g[6] == '~'); assert(!g.valid); Grapheme copy = g; copy[0] = 'X'; copy[1] = '-'; assert(g[0] == 'a' && copy[0] == 'X'); assert(g[1] == 'b' && copy[1] == '-'); assert(equalS(g[2..g.length], copy[2..copy.length])); copy = Grapheme("АБВГДЕЁЖЗИКЛМ"); assert(equalS(copy[0..8], "АБВГДЕЁЖ"), text(copy[0..8])); copy ~= "xyz"; assert(equalS(copy[13..15], "xy"), text(copy[13..15])); assert(!copy.valid); Grapheme h; foreach(dchar v; iota(cast(int)'A', cast(int)'Z'+1).map!"cast(dchar)a"()) h ~= v; assert(equalS(h[], iota(cast(int)'A', cast(int)'Z'+1))); } /++ $(P Does basic case-insensitive comparison of strings $(D str1) and $(D str2). This function uses simpler comparison rule thus achieving better performance then $(LREF icmp). However keep in mind the warning below.) Warning: This function only handles 1:1 $(CODEPOINT) mapping and thus is not sufficient for certain alphabets like German, Greek and few others. Example: --- assert(sicmp("Август", "авгусТ") == 0); // Greek also works as long as there is no 1:M mapping in sight assert(sicmp("ΌΎ", "όύ") == 0); // things like the following won't get matched as equal // Greek small letter iota with dialytika and tonos assert(sicmp("ΐ", "\u03B9\u0308\u0301") != 0); // while icmp has no problem with that assert(icmp("ΐ", "\u03B9\u0308\u0301") == 0); assert(icmp("ΌΎ", "όύ") == 0); --- +/ int sicmp(C1, C2)(const(C1)[] str1, const(C2)[] str2) { static immutable simpleCaseTrie = asTrie(simpleCaseTrieEntries); static immutable sTable = simpleCaseTable; size_t ridx=0; foreach(dchar lhs; str1) { if(ridx == str2.length) return 1; dchar rhs = std.utf.decode(str2, ridx); int diff = lhs - rhs; if(!diff) continue; size_t idx = simpleCaseTrie[lhs]; size_t idx2 = simpleCaseTrie[rhs]; // simpleCaseTrie is packed index table if(idx != EMPTY_CASE_TRIE) { if(idx2 != EMPTY_CASE_TRIE) {// both cased chars // adjust idx --> start of bucket idx = idx - sTable[idx].n; idx2 = idx2 - sTable[idx2].n; if(idx == idx2)// one bucket, equivalent chars continue; else// not the same bucket diff = sTable[idx].ch - sTable[idx2].ch; } else diff = sTable[idx - sTable[idx].n].ch - rhs; } else if(idx2 != EMPTY_CASE_TRIE) { diff = lhs - sTable[idx2 - sTable[idx2].n].ch; } // one of chars is not cased at all return diff; } return ridx == str2.length ? 0 : -1; } private int fullCasedCmp(Range)(dchar lhs, dchar rhs, ref Range rtail) { static immutable fullCaseTrie = asTrie(fullCaseTrieEntries); static immutable fTable = fullCaseTable; size_t idx = fullCaseTrie[lhs]; // fullCaseTrie is packed index table if(idx == EMPTY_CASE_TRIE) return lhs; size_t start = idx - fTable[idx].n; size_t end = fTable[idx].size + start; assert(fTable[start].entry_len == 1); for(idx=start; idx<end; idx++) { if(fTable[idx].entry_len == 1) { if(fTable[idx].ch == rhs) { return 0; } } else {// OK it's a long chunk, like 'ss' for German dstring seq = fTable[idx].seq; if(rhs == seq[0] && rtail.skipOver(seq[1..$])) { // note that this path modifies rtail // iff we managed to get there return 0; } } } return fTable[start].ch; // new remapped character for accurate diffs } /++ $(P Does case insensitive comparison of $(D str1) and $(D str2). Follows the rules of full case-folding mapping. This includes matching as equal german ß with "ss" and other 1:M $(CODEPOINT) mappings unlike $(LREF sicmp). The cost of $(D icmp) being pedantically correct is slightly worse performance. ) Example: --- assert(icmp("Rußland", "Russland") == 0); assert(icmp("ᾩ -> \u1F70\u03B9", "\u1F61\u03B9 -> ᾲ") == 0); --- +/ int icmp(S1, S2)(S1 str1, S2 str2) if(isForwardRange!S1 && is(Unqual!(ElementType!S1) == dchar) && isForwardRange!S2 && is(Unqual!(ElementType!S2) == dchar)) { for(;;) { if(str1.empty) return str2.empty ? 0 : -1; dchar lhs = str1.front; if(str2.empty) return 1; dchar rhs = str2.front; str1.popFront(); str2.popFront(); int diff = lhs - rhs; if(!diff) continue; // first try to match lhs to <rhs,right-tail> sequence int cmpLR = fullCasedCmp(lhs, rhs, str2); if(!cmpLR) continue; // then rhs to <lhs,left-tail> sequence int cmpRL = fullCasedCmp(rhs, lhs, str1); if(!cmpRL) continue; // cmpXX contain remapped codepoints // to obtain stable ordering of icmp diff = cmpLR - cmpRL; return diff; } } unittest { assertCTFEable!( { foreach(cfunc; TypeTuple!(icmp, sicmp)) { foreach(S1; TypeTuple!(string, wstring, dstring)) foreach(S2; TypeTuple!(string, wstring, dstring)) { assert(cfunc("".to!S1(), "".to!S2()) == 0); assert(cfunc("A".to!S1(), "".to!S2()) > 0); assert(cfunc("".to!S1(), "0".to!S2()) < 0); assert(cfunc("abc".to!S1(), "abc".to!S2()) == 0); assert(cfunc("abcd".to!S1(), "abc".to!S2()) > 0); assert(cfunc("abc".to!S1(), "abcd".to!S2()) < 0); assert(cfunc("Abc".to!S1(), "aBc".to!S2()) == 0); assert(cfunc("авГуст".to!S1(), "АВгУСТ".to!S2()) == 0); // Check example: assert(cfunc("Август".to!S1(), "авгусТ".to!S2()) == 0); assert(cfunc("ΌΎ".to!S1(), "όύ".to!S2()) == 0); } // check that the order is properly agnostic to the case auto strs = [ "Apple", "ORANGE", "orAcle", "amp", "banana"]; sort!((a,b) => cfunc(a,b) < 0)(strs); assert(strs == ["amp", "Apple", "banana", "orAcle", "ORANGE"]); } assert(icmp("ßb", "ssa") > 0); // Check example: assert(icmp("Russland", "Rußland") == 0); assert(icmp("ᾩ -> \u1F70\u03B9", "\u1F61\u03B9 -> ᾲ") == 0); assert(icmp("ΐ"w, "\u03B9\u0308\u0301") == 0); assert(sicmp("ΐ", "\u03B9\u0308\u0301") != 0); }); } /++ $(P Returns the $(S_LINK Combining class, combining class) of $(D ch).) Example: --- // shorten the code alias CC = combiningClass; // combining tilda assert(CC('\u0303') == 230); // combining ring below assert(CC('\u0325') == 220); // the simple consequence is that "tilda" should be // placed after a "ring below" in a sequence --- +/ ubyte combiningClass(dchar ch) { static immutable combiningClassTrie = asTrie(combiningClassTrieEntries); return combiningClassTrie[ch]; } unittest { foreach(ch; 0..0x80) assert(combiningClass(ch) == 0); assert(combiningClass('\u05BD') == 22); assert(combiningClass('\u0300') == 230); assert(combiningClass('\u0317') == 220); assert(combiningClass('\u1939') == 222); } /// Unicode character decomposition type. enum UnicodeDecomposition { /// Canonical decomposition. The result is canonically equivalent sequence. Canonical, /** Compatibility decomposition. The result is compatibility equivalent sequence. Note: Compatibility decomposition is a $(B lossy) conversion, typically suitable only for fuzzy matching and internal processing. */ Compatibility }; /** Shorthand aliases for character decomposition type, passed as a template parameter to $(LREF decompose). */ enum { Canonical = UnicodeDecomposition.Canonical, Compatibility = UnicodeDecomposition.Compatibility }; /++ Try to canonically compose 2 $(CHARACTERS). Returns the composed $(CHARACTER) if they do compose and dchar.init otherwise. The assumption is that $(D first) comes before $(D second) in the original text, usually meaning that the first is a starter. Note: Hangul syllables are not covered by this function. See $(D composeJamo) below. Example: --- assert(compose('A','\u0308') == '\u00C4'); assert(compose('A', 'B') == dchar.init); assert(compose('C', '\u0301') == '\u0106'); // note that the starter is the first one // thus the following doesn't compose assert(compose('\u0308', 'A') == dchar.init); --- +/ public dchar compose(dchar first, dchar second) { static immutable compositionJumpTrie = asTrie(compositionJumpTrieEntries); size_t packed = compositionJumpTrie[first]; if(packed == ushort.max) return dchar.init; // unpack offset and length size_t idx = packed & composeIdxMask, cnt = packed >> composeCntShift; // TODO: optimize this micro binary search (no more then 4-5 steps) auto r = compositionTable[idx..idx+cnt].map!"a.rhs"().assumeSorted(); auto target = r.lowerBound(second).length; if(target == cnt) return dchar.init; auto entry = compositionTable[idx+target]; if(entry.rhs != second) return dchar.init; return entry.composed; } /++ Returns a full $(S_LINK Canonical decomposition, Canonical) (by default) or $(S_LINK Compatibility decomposition, Compatibility) decomposition of $(CHARACTER) $(D ch). If no decomposition is available returns a $(LREF Grapheme) with the $(D ch) itself. Note: This function also decomposes hangul syllables as prescribed by the standard. See also $(LREF decomposeHangul) for a restricted version that takes into account only hangul syllables but no other decompositions. Example: --- import std.algorithm; assert(decompose('Ĉ')[].equal("C\u0302")); assert(decompose('D')[].equal("D")); assert(decompose('\uD4DC')[].equal("\u1111\u1171\u11B7")); assert(decompose!Compatibility('¹').equal("1")); --- +/ public Grapheme decompose(UnicodeDecomposition decompType=Canonical)(dchar ch) { static if(decompType == Canonical) { static immutable table = decompCanonTable; static immutable mapping = asTrie(canonMappingTrieEntries); } else static if(decompType == Compatibility) { static immutable table = decompCompatTable; static immutable mapping = asTrie(compatMappingTrieEntries); } ushort idx = mapping[ch]; if(!idx) // not found, check hangul arithmetic decomposition return decomposeHangul(ch); auto decomp = table[idx..$].until(0); return Grapheme(decomp); } unittest { // verify examples assert(compose('A','\u0308') == '\u00C4'); assert(compose('A', 'B') == dchar.init); assert(compose('C', '\u0301') == '\u0106'); // note that the starter is the first one // thus the following doesn't compose assert(compose('\u0308', 'A') == dchar.init); import std.algorithm; assert(decompose('Ĉ')[].equalS("C\u0302")); assert(decompose('D')[].equalS("D")); assert(decompose('\uD4DC')[].equalS("\u1111\u1171\u11B7")); assert(decompose!Compatibility('¹')[].equalS("1")); } //---------------------------------------------------------------------------- // Hangul specific composition/decomposition enum jamoSBase = 0xAC00; enum jamoLBase = 0x1100; enum jamoVBase = 0x1161; enum jamoTBase = 0x11A7; enum jamoLCount = 19, jamoVCount = 21, jamoTCount = 28; enum jamoNCount = jamoVCount * jamoTCount; enum jamoSCount = jamoLCount * jamoNCount; // Tests if $(D ch) is a Hangul leading consonant jamo. bool isJamoL(dchar ch) { // first cmp rejects ~ 1M code points above leading jamo range return ch < jamoLBase+jamoLCount && ch >= jamoLBase; } // Tests if $(D ch) is a Hangul vowel jamo. bool isJamoT(dchar ch) { // first cmp rejects ~ 1M code points above trailing jamo range // Note: ch == jamoTBase doesn't indicate trailing jamo (TIndex must be > 0) return ch < jamoTBase+jamoTCount && ch > jamoTBase; } // Tests if $(D ch) is a Hangul trailnig consonant jamo. bool isJamoV(dchar ch) { // first cmp rejects ~ 1M code points above vowel range return ch < jamoVBase+jamoVCount && ch >= jamoVBase; } int hangulSyllableIndex(dchar ch) { int idxS = cast(int)ch - jamoSBase; return idxS >= 0 && idxS < jamoSCount ? idxS : -1; } // internal helper: compose hangul syllables leaving dchar.init in holes void hangulRecompose(dchar[] seq) { for(size_t idx = 0; idx + 1 < seq.length; ) { if(isJamoL(seq[idx]) && isJamoV(seq[idx+1])) { int indexL = seq[idx] - jamoLBase; int indexV = seq[idx+1] - jamoVBase; int indexLV = indexL * jamoNCount + indexV * jamoTCount; if(idx + 2 < seq.length && isJamoT(seq[idx+2])) { seq[idx] = jamoSBase + indexLV + seq[idx+2] - jamoTBase; seq[idx+1] = dchar.init; seq[idx+2] = dchar.init; idx += 3; } else { seq[idx] = jamoSBase + indexLV; seq[idx+1] = dchar.init; idx += 2; } } else idx++; } } //---------------------------------------------------------------------------- public: /** Decomposes a Hangul syllable. If $(D ch) is not a composed syllable then this function returns $(LREF Grapheme) containing only $(D ch) as is. Example: --- import std.algorithm; assert(decomposeHangul('\uD4DB')[].equal("\u1111\u1171\u11B6")); --- */ Grapheme decomposeHangul(dchar ch) { int idxS = cast(int)ch - jamoSBase; if(idxS < 0 || idxS >= jamoSCount) return Grapheme(ch); int idxL = idxS / jamoNCount; int idxV = (idxS % jamoNCount) / jamoTCount; int idxT = idxS % jamoTCount; int partL = jamoLBase + idxL; int partV = jamoVBase + idxV; if(idxT > 0) // there is a trailling consonant (T); <L,V,T> decomposition return Grapheme(partL, partV, jamoTBase + idxT); else // <L, V> decomposition return Grapheme(partL, partV); } /++ Try to compose hangul syllable out of a leading consonant ($(D lead)), a $(D vowel) and optional $(D trailing) consonant jamos. On success returns the composed LV or LVT hangul syllable. If any of $(D lead) and $(D vowel) are not a valid hangul jamo of the respective $(CHARACTER) class returns dchar.init. Example: --- assert(composeJamo('\u1111', '\u1171', '\u11B6') == '\uD4DB'); // leaving out T-vowel, or passing any codepoint // that is not trailing consonant composes an LV-syllable assert(composeJamo('\u1111', '\u1171') == '\uD4CC'); assert(composeJamo('\u1111', '\u1171', ' ') == '\uD4CC'); assert(composeJamo('\u1111', 'A') == dchar.init); assert(composeJamo('A', '\u1171') == dchar.init); --- +/ dchar composeJamo(dchar lead, dchar vowel, dchar trailing=dchar.init) { if(!isJamoL(lead)) return dchar.init; int indexL = lead - jamoLBase; if(!isJamoV(vowel)) return dchar.init; int indexV = vowel - jamoVBase; int indexLV = indexL * jamoNCount + indexV * jamoTCount; dchar syllable = jamoSBase + indexLV; return isJamoT(trailing) ? syllable + (trailing - jamoTBase) : syllable; } unittest { static void testDecomp(UnicodeDecomposition T)(dchar ch, string r) { Grapheme g = decompose!T(ch); assert(equalS(g[], r), text(g[], " vs ", r)); } testDecomp!Canonical('\u1FF4', "\u03C9\u0301\u0345"); testDecomp!Canonical('\uF907', "\u9F9C"); testDecomp!Compatibility('\u33FF', "\u0067\u0061\u006C"); testDecomp!Compatibility('\uA7F9', "\u0153"); // check examples assert(decomposeHangul('\uD4DB')[].equalS("\u1111\u1171\u11B6")); assert(composeJamo('\u1111', '\u1171', '\u11B6') == '\uD4DB'); assert(composeJamo('\u1111', '\u1171') == '\uD4CC'); // leave out T-vowel assert(composeJamo('\u1111', '\u1171', ' ') == '\uD4CC'); assert(composeJamo('\u1111', 'A') == dchar.init); assert(composeJamo('A', '\u1171') == dchar.init); } /** Enumeration type for normalization forms, passed as template parameter for functions like $(LREF normalize). */ enum NormalizationForm { NFC, NFD, NFKC, NFKD } enum { /** Shorthand aliases from values indicating normalization forms. */ NFC = NormalizationForm.NFC, ///ditto NFD = NormalizationForm.NFD, ///ditto NFKC = NormalizationForm.NFKC, ///ditto NFKD = NormalizationForm.NFKD }; /++ Returns $(D input) string normalized to the chosen form. Form C is used by default. For more information on normalization forms see the $(S_LINK Normalization, normalization section). Note: In cases where the string in question is already normalized, it is returned unmodified and no memory allocation happens. Example: --- // any encoding works wstring greet = "Hello world"; assert(normalize(greet) is greet); // the same exact slice // An example of a character with all 4 forms being different: // Greek upsilon with acute and hook symbol (code point 0x03D3) assert(normalize!NFC("ϓ") == "\u03D3"); assert(normalize!NFD("ϓ") == "\u03D2\u0301"); assert(normalize!NFKC("ϓ") == "\u038E"); assert(normalize!NFKD("ϓ") == "\u03A5\u0301"); --- +/ inout(C)[] normalize(NormalizationForm norm=NFC, C)(inout(C)[] input) { auto anchors = splitNormalized!norm(input); if(anchors[0] == input.length && anchors[1] == input.length) return input; dchar[] decomposed; decomposed.reserve(31); ubyte[] ccc; ccc.reserve(31); auto app = appender!(C[])(); do { app.put(input[0..anchors[0]]); foreach(dchar ch; input[anchors[0]..anchors[1]]) static if(norm == NFD || norm == NFC) { foreach(dchar c; decompose!Canonical(ch)[]) decomposed ~= c; } else // NFKD & NFKC { foreach(dchar c; decompose!Compatibility(ch)[]) decomposed ~= c; } ccc.length = decomposed.length; size_t firstNonStable = 0; ubyte lastClazz = 0; foreach(idx, dchar ch; decomposed) { auto clazz = combiningClass(ch); ccc[idx] = clazz; if(clazz == 0 && lastClazz != 0) { // found a stable code point after unstable ones sort!("a[0] < b[0]", SwapStrategy.stable) (zip(ccc[firstNonStable..idx], decomposed[firstNonStable..idx])); firstNonStable = decomposed.length; } else if(clazz != 0 && lastClazz == 0) { // found first unstable code point after stable ones firstNonStable = idx; } lastClazz = clazz; } sort!("a[0] < b[0]", SwapStrategy.stable) (zip(ccc[firstNonStable..$], decomposed[firstNonStable..$])); static if(norm == NFC || norm == NFKC) { size_t idx = 0; auto first = countUntil(ccc, 0); if(first >= 0) // no starters?? no recomposition { for(;;) { auto second = recompose(first, decomposed, ccc); if(second == decomposed.length) break; first = second; } // 2nd pass for hangul syllables hangulRecompose(decomposed); } } static if(norm == NFD || norm == NFKD) app.put(decomposed); else { auto clean = remove!("a == dchar.init", SwapStrategy.stable)(decomposed); app.put(decomposed[0 .. clean.length]); } // reset variables decomposed.length = 0; decomposed.assumeSafeAppend(); ccc.length = 0; ccc.assumeSafeAppend(); input = input[anchors[1]..$]; // and move on anchors = splitNormalized!norm(input); }while(anchors[0] != input.length); app.put(input[0..anchors[0]]); return cast(inout(C)[])app.data; } unittest { assert(normalize!NFD("abc\uF904def") == "abc\u6ED1def", text(normalize!NFD("abc\uF904def"))); assert(normalize!NFKD("2¹⁰") == "210", normalize!NFKD("2¹⁰")); assert(normalize!NFD("Äffin") == "A\u0308ffin"); // check example // any encoding works wstring greet = "Hello world"; assert(normalize(greet) is greet); // the same exact slice // An example of a character with all 4 forms being different: // Greek upsilon with acute and hook symbol (code point 0x03D3) assert(normalize!NFC("ϓ") == "\u03D3"); assert(normalize!NFD("ϓ") == "\u03D2\u0301"); assert(normalize!NFKC("ϓ") == "\u038E"); assert(normalize!NFKD("ϓ") == "\u03A5\u0301"); } // canonically recompose given slice of code points, works in-place and mutates data private size_t recompose(size_t start, dchar[] input, ubyte[] ccc) { assert(input.length == ccc.length); int accumCC = -1;// so that it's out of 0..255 range bool foundSolidStarter = false; // writefln("recomposing %( %04x %)", input); // first one is always a starter thus we start at i == 1 size_t i = start+1; for(; ; ) { if(i == input.length) break; int curCC = ccc[i]; // In any character sequence beginning with a starter S // a character C is blocked from S if and only if there // is some character B between S and C, and either B // is a starter or it has the same or higher combining class as C. //------------------------ // Applying to our case: // S is input[0] // accumCC is the maximum CCC of characters between C and S, // as ccc are sorted // C is input[i] if(curCC > accumCC) { dchar comp = compose(input[start], input[i]); if(comp != dchar.init) { input[start] = comp; input[i] = dchar.init;// put a sentinel // current was merged so its CCC shouldn't affect // composing with the next one } else { // if it was a starter then accumCC is now 0, end of loop accumCC = curCC; if(accumCC == 0) break; } } else{ // ditto here accumCC = curCC; if(accumCC == 0) break; } i++; } return i; } // returns tuple of 2 indexes that delimit: // normalized text, piece that needs normalization and // the rest of input starting with stable code point private auto splitNormalized(NormalizationForm norm, C)(const(C)[] input) { auto result = input; ubyte lastCC = 0; foreach(idx, dchar ch; input) { static if(norm == NFC) if(ch < 0x0300) { lastCC = 0; continue; } ubyte CC = combiningClass(ch); if(lastCC > CC && CC != 0) { return seekStable!norm(idx, input); } if(notAllowedIn!norm(ch)) { return seekStable!norm(idx, input); } lastCC = CC; } return tuple(input.length, input.length); } private auto seekStable(NormalizationForm norm, C)(size_t idx, in C[] input) { auto br = input[0..idx]; size_t region_start = 0;// default for(;;) { if(br.empty)// start is 0 break; dchar ch = br.back; if(combiningClass(ch) == 0 && allowedIn!norm(ch)) { region_start = br.length - std.utf.codeLength!C(ch); break; } br.popFront(); } ///@@@BUG@@@ can't use find: " find is a nested function and can't be used..." size_t region_end=input.length;// end is $ by default foreach(i, dchar ch; input[idx..$]) { if(combiningClass(ch) == 0 && allowedIn!norm(ch)) { region_end = i+idx; break; } } // writeln("Region to normalize: ", input[region_start..region_end]); return tuple(region_start, region_end); } /** Tests if dchar $(D ch) is always allowed (Quick_Check=YES) in normalization form $(D norm). --- // e.g. Cyrillic is always allowed, so is ASCII assert(allowedIn!NFC('я')); assert(allowedIn!NFD('я')); assert(allowedIn!NFKC('я')); assert(allowedIn!NFKD('я')); assert(allowedIn!NFC('Z')); --- */ public bool allowedIn(NormalizationForm norm)(dchar ch) { return !notAllowedIn!norm(ch); } // not user friendly name but more direct private bool notAllowedIn(NormalizationForm norm)(dchar ch) { static if(norm == NFC) static immutable qcTrie = asTrie(nfcQCTrieEntries); else static if(norm == NFD) static immutable qcTrie = asTrie(nfdQCTrieEntries); else static if(norm == NFKC) static immutable qcTrie = asTrie(nfkcQCTrieEntries); else static if(norm == NFKD) static immutable qcTrie = asTrie(nfkdQCTrieEntries); else static assert("Unknown normalization form "~norm); return qcTrie[ch]; } unittest { assert(allowedIn!NFC('я')); assert(allowedIn!NFD('я')); assert(allowedIn!NFKC('я')); assert(allowedIn!NFKD('я')); assert(allowedIn!NFC('Z')); } } version(std_uni_bootstrap) { // old version used for bootstrapping of gen_uni.d that generates // up to date optimal versions of all of isXXX functions @safe pure nothrow public bool isWhite(dchar c) { return std.ascii.isWhite(c) || c == lineSep || c == paraSep || c == '\u0085' || c == '\u00A0' || c == '\u1680' || c == '\u180E' || (c >= '\u2000' && c <= '\u200A') || c == '\u202F' || c == '\u205F' || c == '\u3000'; } } else { // trusted -> avoid bounds check @trusted pure nothrow ushort toLowerIndex(dchar c) { static immutable trie = asTrie(toLowerIndexTrieEntries); return trie[c]; } // trusted -> avoid bounds check @trusted pure nothrow dchar toLowerTab(size_t idx) { static immutable tab = toLowerTable; return tab[idx]; } // trusted -> avoid bounds check @trusted pure nothrow ushort toTitleIndex(dchar c) { static immutable trie = asTrie(toTitleIndexTrieEntries); return trie[c]; } // trusted -> avoid bounds check @trusted pure nothrow dchar toTitleTab(size_t idx) { static immutable tab = toTitleTable; return tab[idx]; } // trusted -> avoid bounds check @trusted pure nothrow ushort toUpperIndex(dchar c) { static immutable trie = asTrie(toUpperIndexTrieEntries); return trie[c]; } // trusted -> avoid bounds check @trusted pure nothrow dchar toUpperTab(size_t idx) { static immutable tab = toUpperTable; return tab[idx]; } public: /++ Whether or not $(D c) is a Unicode whitespace $(CHARACTER). (general Unicode category: Part of C0(tab, vertical tab, form feed, carriage return, and linefeed characters), Zs, Zl, Zp, and NEL(U+0085)) +/ @safe pure nothrow public bool isWhite(dchar c) { return isWhiteGen(c); // call pregenerated binary search } deprecated ("Please use std.uni.isLower instead") bool isUniLower(dchar c) @safe pure nothrow { return isLower(c); } /++ Return whether $(D c) is a Unicode lowercase $(CHARACTER). +/ @safe pure nothrow bool isLower(dchar c) { if(std.ascii.isASCII(c)) return std.ascii.isLower(c); static immutable lowerCaseTrie = asTrie(lowerCaseTrieEntries); return lowerCaseTrie[c]; } @safe unittest { foreach(v; 0..0x80) assert(std.ascii.isLower(v) == isLower(v)); assert(isLower('я')); assert(isLower('й')); assert(!isLower('Ж')); // Greek HETA assert(!isLower('\u0370')); assert(isLower('\u0371')); assert(!isLower('\u039C')); // capital MU assert(isLower('\u03B2')); // beta // from extended Greek assert(!isLower('\u1F18')); assert(isLower('\u1F00')); foreach(v; unicode.lowerCase.byCodepoint) assert(isLower(v) && !isUpper(v)); } deprecated ("Please use std.uni.isUpper instead") @safe pure nothrow bool isUniUpper(dchar c) { return isUpper(c); } /++ Return whether $(D c) is a Unicode uppercase $(CHARACTER). +/ @safe pure nothrow bool isUpper(dchar c) { if(std.ascii.isASCII(c)) return std.ascii.isUpper(c); static immutable upperCaseTrie = asTrie(upperCaseTrieEntries); return upperCaseTrie[c]; } @safe unittest { foreach(v; 0..0x80) assert(std.ascii.isLower(v) == isLower(v)); assert(!isUpper('й')); assert(isUpper('Ж')); // Greek HETA assert(isUpper('\u0370')); assert(!isUpper('\u0371')); assert(isUpper('\u039C')); // capital MU assert(!isUpper('\u03B2')); // beta // from extended Greek assert(!isUpper('\u1F00')); assert(isUpper('\u1F18')); foreach(v; unicode.upperCase.byCodepoint) assert(isUpper(v) && !isLower(v)); } deprecated ("Please use std.uni.toLower instead") @safe pure nothrow dchar toUniLower(dchar c) { return toLower(c); } /++ If $(D c) is a Unicode uppercase $(CHARACTER), then its lowercase equivalent is returned. Otherwise $(D c) is returned. Warning: certain alphabets like German and Greek have no 1:1 upper-lower mapping. Use overload of toLower which takes full string instead. +/ @safe pure nothrow dchar toLower()(dchar c) { // optimize ASCII case if(c < 0xAA) { if(c < 'A') return c; if(c <= 'Z') return c + 32; return c; } size_t idx = toLowerIndex(c); if(idx < MAX_SIMPLE_LOWER) { return toLowerTab(idx); } return c; } //TODO: Hidden for now, needs better API. //Other transforms could use better API as well, but this one is a new primitive. @safe pure nothrow private dchar toTitlecase(dchar c) { // optimize ASCII case if(c < 0xAA) { if(c < 'a') return c; if(c <= 'z') return c - 32; return c; } size_t idx = toTitleIndex(c); if(idx < MAX_SIMPLE_TITLE) { return toTitleTab(idx); } return c; } private alias UpperTriple = TypeTuple!(toUpperIndex, MAX_SIMPLE_UPPER, toUpperTab); private alias LowerTriple = TypeTuple!(toLowerIndex, MAX_SIMPLE_LOWER, toLowerTab); // generic toUpper/toLower on whole string, creates new or returns as is private S toCase(alias indexFn, uint maxIdx, alias tableFn, S)(S s) @trusted pure if(isSomeString!S) { foreach(i, dchar cOuter; s) { ushort idx = indexFn(cOuter); if(idx == ushort.max) continue; auto result = s[0 .. i].dup; foreach(dchar c; s[i .. $]) { idx = indexFn(c); if(idx == ushort.max) result ~= c; else if(idx < maxIdx) { c = tableFn(idx); result ~= c; } else { auto val = tableFn(idx); // unpack length + codepoint uint len = val>>24; result ~= cast(dchar)(val & 0xFF_FFFF); foreach(j; idx+1..idx+len) result ~= tableFn(j); } } return cast(S) result; } return s; } // TODO: helper, I wish std.utf was more flexible (and stright) private size_t encodeTo(char[] buf, size_t idx, dchar c) @trusted pure { if (c <= 0x7F) { buf[idx] = cast(char)c; idx++; } else if (c <= 0x7FF) { buf[idx] = cast(char)(0xC0 | (c >> 6)); buf[idx+1] = cast(char)(0x80 | (c & 0x3F)); idx += 2; } else if (c <= 0xFFFF) { buf[idx] = cast(char)(0xE0 | (c >> 12)); buf[idx+1] = cast(char)(0x80 | ((c >> 6) & 0x3F)); buf[idx+2] = cast(char)(0x80 | (c & 0x3F)); idx += 3; } else if (c <= 0x10FFFF) { buf[idx] = cast(char)(0xF0 | (c >> 18)); buf[idx+1] = cast(char)(0x80 | ((c >> 12) & 0x3F)); buf[idx+2] = cast(char)(0x80 | ((c >> 6) & 0x3F)); buf[idx+3] = cast(char)(0x80 | (c & 0x3F)); idx += 4; } else assert(0); return idx; } unittest { char[] s = "abcd".dup; size_t i = 0; i = encodeTo(s, i, 'X'); assert(s == "Xbcd"); i = encodeTo(s, i, cast(dchar)'\u00A9'); assert(s == "X\xC2\xA9d"); } // TODO: helper, I wish std.utf was more flexible (and stright) private size_t encodeTo(wchar[] buf, size_t idx, dchar c) @trusted pure { import std.utf; if (c <= 0xFFFF) { if (0xD800 <= c && c <= 0xDFFF) throw (new UTFException("Encoding an isolated surrogate code point in UTF-16")).setSequence(c); buf[idx] = cast(wchar)c; idx++; } else if (c <= 0x10FFFF) { buf[idx] = cast(wchar)((((c - 0x10000) >> 10) & 0x3FF) + 0xD800); buf[idx+1] = cast(wchar)(((c - 0x10000) & 0x3FF) + 0xDC00); idx += 2; } else assert(0); return idx; } private size_t encodeTo(dchar[] buf, size_t idx, dchar c) @trusted pure { buf[idx] = c; idx++; return idx; } private void toCaseInPlace(alias indexFn, uint maxIdx, alias tableFn, C)(ref C[] s) @trusted pure if (is(C == char) || is(C == wchar) || is(C == dchar)) { import std.utf; size_t curIdx = 0; size_t destIdx = 0; alias slowToCase = toCaseInPlaceAlloc!(indexFn, maxIdx, tableFn); size_t lastUnchanged = 0; // in-buffer move of bytes to a new start index // the trick is that it may not need to copy at all static size_t moveTo(C[] str, size_t dest, size_t from, size_t to) { // Interestingly we may just bump pointer for a while // then have to copy if a re-cased char was smaller the original // later we may regain pace with char that got bigger // In the end it sometimes flip-flops between the 2 cases below if(dest == from) return to; // got to copy foreach(C c; str[from..to]) str[dest++] = c; return dest; } while(curIdx != s.length) { size_t startIdx = curIdx; dchar ch = decode(s, curIdx); // TODO: special case for ASCII auto caseIndex = indexFn(ch); if(caseIndex == ushort.max) // unchanged, skip over { continue; } else if(caseIndex < maxIdx) // 1:1 codepoint mapping { // previous cased chars had the same length as uncased ones // thus can just adjust pointer destIdx = moveTo(s, destIdx, lastUnchanged, startIdx); lastUnchanged = curIdx; dchar cased = tableFn(caseIndex); auto casedLen = codeLength!C(cased); if(casedLen + destIdx > curIdx) // no place to fit cased char { // switch to slow codepath, where we allocate return slowToCase(s, startIdx, destIdx); } else { destIdx = encodeTo(s, destIdx, cased); } } else // 1:m codepoint mapping, slow codepath { destIdx = moveTo(s, destIdx, lastUnchanged, startIdx); lastUnchanged = curIdx; return slowToCase(s, startIdx, destIdx); } assert(destIdx <= curIdx); } if(lastUnchanged != s.length) { destIdx = moveTo(s, destIdx, lastUnchanged, s.length); } s = s[0..destIdx]; } // helper to precalculate size of case-converted string private template toCaseLength(alias indexFn, uint maxIdx, alias tableFn) { size_t toCaseLength(C)(in C[] str) { import std.utf; size_t codeLen = 0; size_t lastNonTrivial = 0; size_t curIdx = 0; while(curIdx != str.length) { size_t startIdx = curIdx; dchar ch = decode(str, curIdx); ushort caseIndex = indexFn(ch); if(caseIndex == ushort.max) continue; else if(caseIndex < MAX_SIMPLE_LOWER) { codeLen += startIdx - lastNonTrivial; lastNonTrivial = curIdx; dchar cased = tableFn(caseIndex); codeLen += codeLength!C(cased); } else { codeLen += startIdx - lastNonTrivial; lastNonTrivial = curIdx; auto val = tableFn(caseIndex); auto len = val>>24; dchar cased = val & 0xFF_FFFF; codeLen += codeLength!C(cased); foreach(j; caseIndex+1..caseIndex+len) codeLen += codeLength!C(tableFn(j)); } } if(lastNonTrivial != str.length) codeLen += str.length - lastNonTrivial; return codeLen; } } unittest { import std.conv; alias toLowerLength = toCaseLength!(LowerTriple); assert(toLowerLength("abcd") == 4); assert(toLowerLength("аБВгд456") == 10+3); } // slower code path that preallocates and then copies // case-converted stuf to the new string private template toCaseInPlaceAlloc(alias indexFn, uint maxIdx, alias tableFn) { void toCaseInPlaceAlloc(C)(ref C[] s, size_t curIdx, size_t destIdx) @trusted pure if (is(C == char) || is(C == wchar) || is(C == dchar)) { import std.utf : decode; alias caseLength = toCaseLength!(indexFn, maxIdx, tableFn); auto trueLength = destIdx + caseLength(s[curIdx..$]); C[] ns = new C[trueLength]; ns[0..destIdx] = s[0..destIdx]; size_t lastUnchanged = curIdx; while(curIdx != s.length) { size_t startIdx = curIdx; // start of current codepoint dchar ch = decode(s, curIdx); auto caseIndex = indexFn(ch); if(caseIndex == ushort.max) // skip over { continue; } else if(caseIndex < maxIdx) // 1:1 codepoint mapping { dchar cased = tableFn(caseIndex); auto toCopy = startIdx - lastUnchanged; ns[destIdx .. destIdx+toCopy] = s[lastUnchanged .. startIdx]; lastUnchanged = curIdx; destIdx += toCopy; destIdx = encodeTo(ns, destIdx, cased); } else // 1:m codepoint mapping, slow codepath { auto toCopy = startIdx - lastUnchanged; ns[destIdx .. destIdx+toCopy] = s[lastUnchanged .. startIdx]; lastUnchanged = curIdx; destIdx += toCopy; auto val = tableFn(caseIndex); // unpack length + codepoint uint len = val>>24; destIdx = encodeTo(ns, destIdx, cast(dchar)(val & 0xFF_FFFF)); foreach(j; caseIndex+1..caseIndex+len) destIdx = encodeTo(ns, destIdx, tableFn(j)); } } if(lastUnchanged != s.length) { auto toCopy = s.length - lastUnchanged; ns[destIdx..destIdx+toCopy] = s[lastUnchanged..$]; destIdx += toCopy; } assert(ns.length == destIdx); s = ns; } } /++ Converts $(D s) to lowercase (by performing Unicode lowercase mapping) in place. For a few characters string length may increase after the transformation, in such a case the function reallocates exactly once. If $(D s) does not have any uppercase characters, then $(D s) is unaltered. +/ void toLowerInPlace(C)(ref C[] s) @trusted pure if (is(C == char) || is(C == wchar) || is(C == dchar)) { toCaseInPlace!(LowerTriple)(s); } /++ Converts $(D s) to uppercase (by performing Unicode uppercase mapping) in place. For a few characters string length may increase after the transformation, in such a case the function reallocates exactly once. If $(D s) does not have any lowercase characters, then $(D s) is unaltered. +/ void toUpperInPlace(C)(ref C[] s) @trusted pure if (is(C == char) || is(C == wchar) || is(C == dchar)) { toCaseInPlace!(UpperTriple)(s); } /++ Returns a string which is identical to $(D s) except that all of its characters are converted to lowercase (by preforming Unicode lowercase mapping). If none of $(D s) characters were affected, then $(D s) itself is returned. +/ S toLower(S)(S s) @trusted pure if(isSomeString!S) { return toCase!(LowerTriple)(s); } @trusted unittest //@@@BUG std.format is not @safe { import std.string : format; foreach(ch; 0..0x80) assert(std.ascii.toLower(ch) == toLower(ch)); assert(toLower('Я') == 'я'); assert(toLower('Δ') == 'δ'); foreach(ch; unicode.upperCase.byCodepoint) { dchar low = ch.toLower(); assert(low == ch || isLower(low), format("%s -> %s", ch, low)); } assert(toLower("АЯ") == "ая"); } unittest { string s1 = "FoL"; string s2 = toLower(s1); assert(cmp(s2, "fol") == 0, s2); assert(s2 != s1); char[] s3 = s1.dup; toLowerInPlace(s3); assert(s3 == s2); s1 = "A\u0100B\u0101d"; s2 = toLower(s1); s3 = s1.dup; assert(cmp(s2, "a\u0101b\u0101d") == 0); assert(s2 !is s1); toLowerInPlace(s3); assert(s3 == s2); s1 = "A\u0460B\u0461d"; s2 = toLower(s1); s3 = s1.dup; assert(cmp(s2, "a\u0461b\u0461d") == 0); assert(s2 !is s1); toLowerInPlace(s3); assert(s3 == s2); s1 = "\u0130"; s2 = toLower(s1); s3 = s1.dup; assert(s2 == "i\u0307"); assert(s2 !is s1); toLowerInPlace(s3); assert(s3 == s2); // Test on wchar and dchar strings. assert(toLower("Some String"w) == "some string"w); assert(toLower("Some String"d) == "some string"d); } deprecated("Please use std.uni.toUpper instead") @safe pure nothrow dchar toUniUpper(dchar c) { return toUpper(c); } /++ If $(D c) is a Unicode lowercase $(CHARACTER), then its uppercase equivalent is returned. Otherwise $(D c) is returned. Warning: Certain alphabets like German and Greek have no 1:1 upper-lower mapping. Use overload of toUpper which takes full string instead. +/ @safe pure nothrow dchar toUpper()(dchar c) { // optimize ASCII case if(c < 0xAA) { if(c < 'a') return c; if(c <= 'z') return c - 32; return c; } size_t idx = toUpperIndex(c); if(idx < MAX_SIMPLE_UPPER) { return toUpperTab(idx); } return c; } @trusted unittest { import std.string : format; foreach(ch; 0..0x80) assert(std.ascii.toUpper(ch) == toUpper(ch)); assert(toUpper('я') == 'Я'); assert(toUpper('δ') == 'Δ'); foreach(ch; unicode.lowerCase.byCodepoint) { dchar up = ch.toUpper(); assert(up == ch || isUpper(up), format("%s -> %s", ch, up)); } } /++ Returns a string which is identical to $(D s) except that all of its characters are converted to uppercase (by preforming Unicode uppercase mapping). If none of $(D s) characters were affected, then $(D s) itself is returned. +/ S toUpper(S)(S s) @trusted pure if(isSomeString!S) { return toCase!(UpperTriple)(s); } unittest { string s1 = "FoL"; string s2; char[] s3; s2 = toUpper(s1); s3 = s1.dup; toUpperInPlace(s3); assert(s3 == s2, s3); assert(cmp(s2, "FOL") == 0); assert(s2 !is s1); s1 = "a\u0100B\u0101d"; s2 = toUpper(s1); s3 = s1.dup; toUpperInPlace(s3); assert(s3 == s2); assert(cmp(s2, "A\u0100B\u0100D") == 0); assert(s2 !is s1); s1 = "a\u0460B\u0461d"; s2 = toUpper(s1); s3 = s1.dup; toUpperInPlace(s3); assert(s3 == s2); assert(cmp(s2, "A\u0460B\u0460D") == 0); assert(s2 !is s1); } unittest { static void doTest(C)(const(C)[] s, const(C)[] trueUp, const(C)[] trueLow) { import std.string : format; string diff = "src: %( %x %)\nres: %( %x %)\ntru: %( %x %)"; auto low = s.toLower() , up = s.toUpper(); auto lowInp = s.dup, upInp = s.dup; lowInp.toLowerInPlace(); upInp.toUpperInPlace(); assert(low == trueLow, format(diff, low, trueLow)); assert(up == trueUp, format(diff, up, trueUp)); assert(lowInp == trueLow, format(diff, cast(ubyte[])s, cast(ubyte[])lowInp, cast(ubyte[])trueLow)); assert(upInp == trueUp, format(diff, cast(ubyte[])s, cast(ubyte[])upInp, cast(ubyte[])trueUp)); } foreach(S; TypeTuple!(dstring, wstring, string)) { S easy = "123"; S good = "abCФеж"; S awful = "\u0131\u023f\u2126"; S wicked = "\u0130\u1FE2"; auto options = [easy, good, awful, wicked]; S[] lower = ["123", "abcфеж", "\u0131\u023f\u03c9", "i\u0307\u1Fe2"]; S[] upper = ["123", "ABCФЕЖ", "I\u2c7e\u2126", "\u0130\u03A5\u0308\u0300"]; foreach(val; TypeTuple!(easy, good)) { auto e = val.dup; auto g = e; e.toUpperInPlace(); assert(e is g); e.toLowerInPlace(); assert(e is g); } foreach(i, v; options) { doTest(v, upper[i], lower[i]); } // a few combinatorial runs foreach(i; 0..options.length) foreach(j; i..options.length) foreach(k; j..options.length) { auto sample = options[i] ~ options[j] ~ options[k]; auto sample2 = options[k] ~ options[j] ~ options[i]; doTest(sample, upper[i] ~ upper[j] ~ upper[k], lower[i] ~ lower[j] ~ lower[k]); doTest(sample2, upper[k] ~ upper[j] ~ upper[i], lower[k] ~ lower[j] ~ lower[i]); } } } deprecated("Please use std.uni.isAlpha instead.") @safe pure nothrow bool isUniAlpha(dchar c) { return isAlpha(c); } /++ Returns whether $(D c) is a Unicode alphabetic $(CHARACTER) (general Unicode category: Alphabetic). +/ @safe pure nothrow bool isAlpha(dchar c) { // optimization if(c < 0xAA) { size_t x = c - 'A'; if(x <= 'Z' - 'A') return true; else { x = c - 'a'; if(x <= 'z'-'a') return true; } return false; } static immutable alphaTrie = asTrie(alphaTrieEntries); return alphaTrie[c]; } @safe unittest { auto alpha = unicode("Alphabetic"); foreach(ch; alpha.byCodepoint) assert(isAlpha(ch)); foreach(ch; 0..0x4000) assert((ch in alpha) == isAlpha(ch)); } /++ Returns whether $(D c) is a Unicode mark (general Unicode category: Mn, Me, Mc). +/ @safe pure nothrow bool isMark(dchar c) { static immutable markTrie = asTrie(markTrieEntries); return markTrie[c]; } @safe unittest { auto mark = unicode("Mark"); foreach(ch; mark.byCodepoint) assert(isMark(ch)); foreach(ch; 0..0x4000) assert((ch in mark) == isMark(ch)); } /++ Returns whether $(D c) is a Unicode numerical $(CHARACTER) (general Unicode category: Nd, Nl, No). +/ @safe pure nothrow bool isNumber(dchar c) { static immutable numberTrie = asTrie(numberTrieEntries); return numberTrie[c]; } @safe unittest { auto n = unicode("N"); foreach(ch; n.byCodepoint) assert(isNumber(ch)); foreach(ch; 0..0x4000) assert((ch in n) == isNumber(ch)); } /++ Returns whether $(D c) is a Unicode punctuation $(CHARACTER) (general Unicode category: Pd, Ps, Pe, Pc, Po, Pi, Pf). +/ @safe pure nothrow bool isPunctuation(dchar c) { static immutable punctuationTrie = asTrie(punctuationTrieEntries); return punctuationTrie[c]; } unittest { assert(isPunctuation('\u0021')); assert(isPunctuation('\u0028')); assert(isPunctuation('\u0029')); assert(isPunctuation('\u002D')); assert(isPunctuation('\u005F')); assert(isPunctuation('\u00AB')); assert(isPunctuation('\u00BB')); foreach(ch; unicode("P").byCodepoint) assert(isPunctuation(ch)); } /++ Returns whether $(D c) is a Unicode symbol $(CHARACTER) (general Unicode category: Sm, Sc, Sk, So). +/ @safe pure nothrow bool isSymbol(dchar c) { static immutable symbolTrie = asTrie(symbolTrieEntries); return symbolTrie[c]; } unittest { import std.string; assert(isSymbol('\u0024')); assert(isSymbol('\u002B')); assert(isSymbol('\u005E')); assert(isSymbol('\u00A6')); foreach(ch; unicode("S").byCodepoint) assert(isSymbol(ch), format("%04x", ch)); } /++ Returns whether $(D c) is a Unicode space $(CHARACTER) (general Unicode category: Zs) Note: This doesn't include '\n', '\r', \t' and other non-space $(CHARACTER). For commonly used less strict semantics see $(LREF isWhite). +/ @safe pure nothrow bool isSpace(dchar c) { return isSpaceGen(c); } unittest { assert(isSpace('\u0020')); auto space = unicode.Zs; foreach(ch; space.byCodepoint) assert(isSpace(ch)); foreach(ch; 0..0x1000) assert(isSpace(ch) == space[ch]); } /++ Returns whether $(D c) is a Unicode graphical $(CHARACTER) (general Unicode category: L, M, N, P, S, Zs). +/ @safe pure nothrow bool isGraphical(dchar c) { static immutable graphicalTrie = asTrie(graphicalTrieEntries); return graphicalTrie[c]; } unittest { auto set = unicode("Graphical"); import std.string; foreach(ch; set.byCodepoint) assert(isGraphical(ch), format("%4x", ch)); foreach(ch; 0..0x4000) assert((ch in set) == isGraphical(ch)); } /++ Returns whether $(D c) is a Unicode control $(CHARACTER) (general Unicode category: Cc). +/ @safe pure nothrow bool isControl(dchar c) { return isControlGen(c); } unittest { assert(isControl('\u0000')); assert(isControl('\u0081')); assert(!isControl('\u0100')); auto cc = unicode.Cc; foreach(ch; cc.byCodepoint) assert(isControl(ch)); foreach(ch; 0..0x1000) assert(isControl(ch) == cc[ch]); } /++ Returns whether $(D c) is a Unicode formatting $(CHARACTER) (general Unicode category: Cf). +/ @safe pure nothrow bool isFormat(dchar c) { return isFormatGen(c); } unittest { assert(isFormat('\u00AD')); foreach(ch; unicode("Format").byCodepoint) assert(isFormat(ch)); } // code points for private use, surrogates are not likely to change in near feature // if need be they can be generated from unicode data as well /++ Returns whether $(D c) is a Unicode Private Use $(CODEPOINT) (general Unicode category: Co). +/ @safe pure nothrow bool isPrivateUse(dchar c) { return (0x00_E000 <= c && c <= 0x00_F8FF) || (0x0F_0000 <= c && c <= 0x0F_FFFD) || (0x10_0000 <= c && c <= 0x10_FFFD); } /++ Returns whether $(D c) is a Unicode surrogate $(CODEPOINT) (general Unicode category: Cs). +/ @safe pure nothrow bool isSurrogate(dchar c) { return (0xD800 <= c && c <= 0xDFFF); } /++ Returns whether $(D c) is a Unicode high surrogate (lead surrogate). +/ @safe pure nothrow bool isSurrogateHi(dchar c) { return (0xD800 <= c && c <= 0xDBFF); } /++ Returns whether $(D c) is a Unicode low surrogate (trail surrogate). +/ @safe pure nothrow bool isSurrogateLo(dchar c) { return (0xDC00 <= c && c <= 0xDFFF); } /++ Returns whether $(D c) is a Unicode non-character i.e. a $(CODEPOINT) with no assigned abstract character. (general Unicode category: Cn) +/ @safe pure nothrow bool isNonCharacter(dchar c) { static immutable nonCharacterTrie = asTrie(nonCharacterTrieEntries); return nonCharacterTrie[c]; } unittest { auto set = unicode("Cn"); foreach(ch; set.byCodepoint) assert(isNonCharacter(ch)); } private: // load static data from pre-generated tables into usable datastructures @safe auto asSet(const (ubyte)[] compressed) { return CodepointSet(decompressIntervals(compressed)); } auto asTrie(T...)(in TrieEntry!T e) { return const(CodepointTrie!T)(e.offsets, e.sizes, e.data); } // TODO: move sets below to Tries __gshared CodepointSet hangLV; __gshared CodepointSet hangLVT; shared static this() { hangLV = asSet(hangulLV); hangLVT = asSet(hangulLVT); } }// version(!std_uni_bootstrap)
D
module java.io.BufferedReader; import java.lang.all; import java.io.Reader; class BufferedReader : Reader { this(Reader reader){ implMissing(__FILE__,__LINE__); } public override int read(char[] cbuf, int off, int len){ implMissing(__FILE__,__LINE__); return 0; } public override void close(){ implMissing(__FILE__,__LINE__); } public String readLine() { implMissing(__FILE__,__LINE__); return null; } }
D
/** A module for a variable used as a node in autograd computation graph TODO: - support shape ops */ module grain.autograd; import std.traits : isArray, isBasicType; import std.typecons : RefCounted, RefCountedAutoInitialize; import mir.ndslice : isSlice; import std.range : ElementType; import grain.cuda; import grain.utility : castArray; /// CPU storage (i.e., GC dynamic array) alias HostStorage(T) = T[]; /// fill CPU array with zero auto zero_(T)(T[] s) { // if (!isBasicType!T) { import std.algorithm.mutation : fill; fill(s, 0); return s; } /// create new CPU array filled with zero auto zeros(T)(size_t n) if (isArray!T) { auto s = new ElementType!T[n]; return s.zero_(); } /// unittest { float[] h = [1f, 2f, 3f]; h.zero_(); assert(h == [0f, 0f, 0f]); assert(zeros!(HostStorage!float)(3) == [0f, 0f, 0f]); } /// create new variable with uninitialized array and the same shape/strides to v on CPU auto uninit(T, size_t dim)(Variable!(T, dim, HostStorage) v) { RefCounted!(T[]) data = new T[v.length]; return Variable!(T, dim, HostStorage)(v.requiresGrad, v.shape, v.strides, data); } /// create new variable with uninitialized array of shape on CPU/CUDA auto uninitVariable(T, alias S = HostStorage, size_t dim)(uint[dim] shape, bool requiresGrad = false) { import std.algorithm :reduce; const length = shape.reduce!"a * b"; static if (is(S!T == HostStorage!T)) { RefCounted!(T[]) data = new T[length]; } version(grain_cuda) { static if (is(S!T == DeviceStorage!T)) { RefCounted!(CuPtr!T) data = CuPtr!T(length); } } int[dim] strides; foreach (i; 0 .. dim-1) { assert(shape[i+1] < int.max); strides[i] = cast(int) shape[i+1]; } strides[dim-1] = 1; return Variable!(T, dim, S)(requiresGrad, shape, strides, data); } version(grain_cuda) { /// create new variable with uninitialized array and the same shape/strides to v on CUDA auto uninit(T, size_t dim)(Variable!(T, dim, DeviceStorage) v) { RefCounted!(CuPtr!T) data = CuPtr!T(v.length); return Variable!(T, dim, DeviceStorage)(v.requiresGrad, v.shape, v.strides, data); } alias DeviceStorage(T) = CuPtr!T; // enum bool isDevice(T) = isDeviceMemory(typeof(T.data)); // is(typeof({T.init.toHost();})); alias isDevice = isDeviceMemory; /// CUDA -> CPU memory conversion auto to(alias S : DeviceStorage, T)(T[] src) { import std.array : empty; return src.empty ? DeviceStorage!T() : DeviceStorage!T(src); } /// CPU -> CUDA memory conversion auto to(alias S : HostStorage, Src)(Src src) if (isDevice!Src) { return src.toHost(); } // /// CUDA -> CPU memory conversion // auto to(alias S : DeviceStorage, T)(T[] src) { // import std.array : empty; // return src.empty ? DeviceStorage!T() : DeviceStorage!T(src); // } // /// CPU -> CUDA memory conversion // auto to(alias S : HostStorage, Src)(Src src) if (is(S!T == HostStorage!T)) { // return src.toHost(); // } // auto to(alias S : HostStorage, Src)(Src src) if (!isDevice!Src) { // return src; // } // auto to(alias S : DeviceStorage, Src)(Src src) if (isDevice!Src) { // return src; // } /// unittest { auto h = [[0.1f, 0.2f, 0.3f], [0.4f, 0.5f, 0.6f]].variable; auto d = h.to!DeviceStorage; assert(h.data == d.to!HostStorage.data); } } /// type-erased variable used in BackProp object struct UntypedVariable { import std.variant; bool requiresGrad; size_t dim; // size_t[] uint[] shape; // ptrdiff_t[] int[] strides; TypeInfo elem; Variant data, grad; size_t outPosition = 0; // RefCounted! BackProp bprop; this(T, size_t dim, alias Storage)(Variable!(T, dim, Storage) v) { this.elem = typeid(T); this.requiresGrad = v.requiresGrad; this.shape = v.shape.dup; this.strides = v.strides.dup; this.dim = dim; this.data = v.data; this.grad = v.grad; } auto get(T)() { return this.data.get!(RefCounted!T); } auto to(V : Variable!(T, dim, Storage), T, size_t dim, alias Storage)() { auto d = this.data.get!(RefCounted!(Storage!T)); return Variable!(T, dim, Storage)( this.requiresGrad, this.shape[0..dim], this.strides[0..dim], d); } string toString() const { import std.format : format; return "UntypedVariable(%s, dim=%d, data=%s, shape=%s, strides=%s)".format( elem, dim, data, shape, strides); } auto gradSlice(V)() if (isVariable!V && isHost!V) { import mir.ndslice.slice : sliced; return grad.get!(typeof(V.init.data)).ptr.sliced(this.shape[0 .. Ndim!V].castArray!size_t); } } auto gradSlice(V)(V v) if (isVariable!V && isHost!V) { import mir.ndslice.slice : sliced; return v.grad.ptr.sliced(v.shape.castArray!size_t); } /// FIXME maybe singleton? shared bool backprop = false; /// stores information for backpropagation struct BackProp { alias Proc = void delegate(UntypedVariable[], UntypedVariable[]); Proc proc; UntypedVariable[] inputs; UntypedVariable[] gradOutputs; size_t nGrad = 0; void backward(UntypedVariable* grad=null, size_t pos=0) { import std.exception : enforce; import std.range : empty; // enforce(!this.inputs.empty, "nothing to backprop"); if (this.inputs.empty) return; ++this.nGrad; if (grad is null) { enforce(this.gradOutputs.length == 1, "this variable is not loss"); } else { this.gradOutputs[pos] = *grad; // FIXME?? } if (grad is null || this.nGrad == this.gradOutputs.length) { proc(this.gradOutputs, this.inputs); } // FIXME: reconsider this maybe // import core.memory : GC; // destroy(gradOutputs); // GC.free(&gradOutputs); // destroy(this); // GC.free(&this); } } /// unittest { import std.stdio; UntypedVariable u; { auto v = [[0f, 1f], [2f, 3f]].variable; u = UntypedVariable(v); } assert(u.get!(HostStorage!float) == [0, 1, 2, 3]); } /** A variable has autograd ability with mir.ndslice.Slice like data TODO: add SliceKind */ struct Variable(T, size_t dim, alias Storage = HostStorage) { bool requiresGrad = true; // size_t[dim] uint[dim] shape; // ptrdiff_t[dim] int[dim] strides; RefCounted!(Storage!T) data; RefCounted!(Storage!T) grad; // RefCounted! BackProp bprop; enum isHost = is(Storage!T == HostStorage!T); uint offset = 0; this(bool requiresGrad, uint[dim] shape, int[dim] strides, RefCounted!(Storage!T) data) { this.requiresGrad = requiresGrad; this.shape = shape; this.strides = strides; this.data = data; // this.grad.isHost = is(Storage!T == HostStorage!T); // if (this.requiresGrad) { // TODO enable this static if (is(Storage!T == HostStorage!T)) { this.grad = zeros!(Storage!T)(this.data.length); } else version (grain_cuda) { // TODO why is grain.cuda. required? this.grad = grain.cuda.zeros!(CuPtr!T)(this.data.length); } // } } @property auto ptr() { return this.data.ptr + offset; } @property bool defined() { return cast(size_t) data.ptr != 0; } auto dup() { static if (is(Storage!T == HostStorage!T)) { RefCounted!(Storage!T) d = new T[data.length]; d[] = data[]; } else { RefCounted!(Storage!T) d = data.dup; } auto y = Variable(this.requiresGrad, this.shape, this.strides, d); return y; } static if (is(Storage!T == HostStorage!T)) { auto sliced() { import mir.ndslice; // .slice : Slice, Universal; static if (dim == 0) { return [this.data[0]].sliced.universal; } else { return Slice!(Universal, [dim], T*)( this.shape.castArray!size_t, this.strides.castArray!ptrdiff_t, data.ptr); } } auto gradSliced() { import mir.ndslice; // .slice : Slice, Universal; static if (dim == 0) { return [this.grad[0]].sliced.universal; } else { return Slice!(Universal, [dim], T*)( this.shape.castArray!size_t, this.strides.castArray!ptrdiff_t, grad.ptr); } } } /// computes gradients of creator variables w.r.t. the arg grad void backward(UntypedVariable* grad, size_t pos=0) { this.bprop.backward(grad, pos); } /// computes gradients of creator variables w.r.t. this variable static if (dim == 0) void backward() { auto grad = UntypedVariable(1.0f.variable.to!Storage); this.bprop.backward(&grad, 0); } string toString() const { import std.format : format; return "Variable!(%s, dim=%d, %s)(data=%s, shape=%s, strides=%s)" .format(T.stringof, dim, Storage.stringof, data, shape, strides); } /// TODO implement contiguous with mir.ndslice and cudnnTransformTensor auto opBinary(string op)(Variable!(T, dim, Storage) b) { import grain.chain : opBinaryFunc, reciprocal; static if (op == "+" || op == "*") { return opBinaryFunc!op(this, b); } else static if (op == "-") { return opBinaryFunc!"+"(this, b, 1, -1); } else static if (op == "/") { return opBinaryFunc!"*"(this, reciprocal(b)); } else { static assert(false, "unsupported op: " ~ op); } } } /// test opBinary(string op)(Variable ...) unittest { import mir.ndslice; import numir; import std.stdio; static foreach (op; ["+", "*", "-", "/"]) { { auto a = uniform!float(3, 2).slice.variable(true); auto b = uniform!float(3, 2).slice.variable(true); // this is equivalent to `a + b` if op == "+" auto c = a.opBinary!op(b); // this is equivalent to `a.sliced.slice + b.sliced.slice` if op == "+" auto e = a.sliced.slice.opBinary!op(b.sliced.slice); assert(approxEqual(c.sliced, e)); auto gc = uniform!float(3, 2).slice.variable(true); auto ugc = UntypedVariable(gc); c.backward(&ugc); version (grain_cuda) { auto da = a.to!DeviceStorage; auto db = b.to!DeviceStorage; auto dc = da.opBinary!op(db); assert(approxEqual(dc.to!HostStorage.sliced, c.sliced)); import grain.cuda : zero_; da.grad.zero_(); db.grad.zero_(); auto dugc = UntypedVariable(gc.to!DeviceStorage); dc.backward(&dugc); assert(approxEqual(da.to!HostStorage.gradSliced, a.gradSliced)); } } } } /// test Variable.defined unittest { Variable!(float, 1, HostStorage) h; assert(!h.defined); assert(0.variable.defined); assert(0.1f.variable.defined); assert([0].variable.defined); assert([0.1f].variable.defined); version (grain_cuda) { Variable!(float, 1, DeviceStorage) d; assert(!d.defined); assert(!h.to!DeviceStorage.defined); assert(0.variable.to!DeviceStorage.defined); assert(0.1f.variable.to!DeviceStorage.defined); assert([0].variable.to!DeviceStorage.defined); assert([0.1f].variable.to!DeviceStorage.defined); } } /// a trait to identify variable object enum bool isVariable(T) = is(T : Variable!(Elem, dim, Storage), Elem, size_t dim, alias Storage); /// a trait to identify variable stored in CPU memory enum bool isHost(V : Variable!(Elem, dim, Storage), Elem, size_t dim, alias Storage) = is(Storage!Elem == HostStorage!Elem); /// a function to get the number of dimensions of variable enum size_t Ndim(V : Variable!(Elem, dim, Storage), Elem, size_t dim, alias Storage) = dim; /// an alias of element type (e.g., float, double and int) of variable alias ElementType(V : Variable!(Elem, dim, Storage), Elem, size_t dim, alias Storage) = Elem; /// total number of elements in variable auto length(V)(V v) if (isVariable!V) { import std.algorithm : reduce; return v.shape.reduce!"a * b"; } /// a helper function to create variable object from slice auto variable(Sl)(Sl sl, bool requiresGrad = false) if (isSlice!Sl) { import mir.ndslice : universal, DeepElementType; import std.algorithm : reduce; import numir : Ndim; auto s = sl.universal; alias S = typeof(s); alias E = DeepElementType!S; auto size = s._lengths.reduce!"a * b"; RefCounted!(E[]) data = s._iterator[0..size]; uint[Ndim!S] shape; int[Ndim!S] strides; static foreach (i; 0 .. Ndim!S) { assert(s._lengths[i] < int.max); assert(s._strides[i] < int.max); shape[i] = cast(uint) s.length!i; strides[i] = cast(int) s._strides[i]; } return Variable!(E, Ndim!S, HostStorage)( requiresGrad, shape, strides, data); } import std.traits : isNumeric; /// a helper function to create variable object from CPU/CUDA array auto variable(alias Storage=HostStorage, bool requiresGrad=false, T)(T x) if (isNumeric!T) { RefCounted!(T[]) data = [x]; return Variable!(T, 0, Storage)(requiresGrad, [], [], data); } /// ditto auto variable(A)(A a, bool requiresGrad=false) if (isArray!A) { import numir.core : nparray; return a.nparray.variable(requiresGrad); } /// version (grain_cuda) unittest { auto h = 0.5f.variable; auto d = h.to!DeviceStorage; assert(d.to!HostStorage.data == h.data); } /// copy variable into the other device (e.g., CPU -> CUDA or CUDA -> CPU) Variable!(T, dim, Dst) to(alias Dst, T, size_t dim, alias Src)(Variable!(T, dim, Src) src) { static if (is(Dst!T == Src!T)) return src; else { import std.range :empty; RefCounted!(Dst!T) d = src.data.to!Dst; RefCounted!(Dst!T) g = src.grad.to!Dst; // FIXME: consider grad auto ret = typeof(return)(src.requiresGrad, src.shape, src.strides, d); ret.grad = g; return ret; } } /// unittest { import std.stdio; { // Variable!(float, 1) x; auto x = [-1f, -2f, -3f].variable; auto y = x.dup; x.data[0] = 1.0; static assert(isVariable!(typeof(x))); static assert(!isVariable!void); static assert(isHost!(typeof(x))); assert(y.data[0] == -1); } version (grain_cuda) { { auto x = [[1f, 3f], [5f, 7f], [9f, 11f]].variable; assert(x.data.length == 6); static assert(!isHost!(typeof(x.to!DeviceStorage))); auto xx = x.dup; assert(x.to!DeviceStorage.to!HostStorage.sliced == x.sliced); } } }
D
func void ZS_SitCampfireSmalltalkHC_1() { GuardPerception (); Npc_PercEnable (self, PERC_ASSESSPLAYER, B_AssessSC); if (!C_BodyStateContains(self, BS_SIT)) { AI_StandUp (self); AI_SetWalkmode (self,NPC_WALK); AI_GotoWP (self, self.wp); if (Wld_IsFPAvailable(self,"FP_CAMPFIREST")) { AI_GotoFP (self, "FP_CAMPFIREST"); } else { AI_StartState(self, ZS_Stand, 0, ""); }; Npc_SetAivar(self,AIV_HANGAROUNDSTATUS, 1); AI_PlayAniBS (self,"T_STAND_2_SIT",BS_SIT); }; AI_AlignToFP( self ); //Richte Dich aus }; func void ZS_SitCampfireSmalltalkHC_1_loop() { Npc_PerceiveAll (self); Wld_DetectNpc(self, -1, ZS_SitCampfireSmalltalkHC_1, -1); //PRINTGlobals(PD_TA_CHECK); if (Wld_DetectNpc(self,-1,ZS_SitCampfireSmalltalkHC_1, -1)&& Npc_GetDistToNpc(self, other)<600) { var int talktime; talktime = Hlp_Random (200); if (talktime < 5) { AI_Output (self,NULL,"ZS_SmallTalkSitHC_1_Text01");//To miejsce jest piekne. } else if (talktime < 10) { AI_Output (self,NULL,"ZS_SmallTalkSitHC_Text02");//Naprawde jest tutaj spokojnie. } else if (talktime < 15) { AI_Output (self,NULL,"ZS_SmallTalkSitHC_Text03");//I jak ci idzie polowanie. } else if (talktime < 20) { AI_Output (self,NULL,"ZS_SmallTalkSitHC_Text04");//Własnie dostałem łuk i strzały całkowicie za darmo. } else if (talktime < 25) { AI_Output (self,NULL,"ZS_SmallTalkSitHC_Text05");//Upolowałem dwa ścierwojady zapraszam cie na pieczone mięso! } else if (talktime < 30) { AI_Output (self,NULL,"ZS_SmallTalkSitHC_Text06");//Świetnie tego mi teraz właśnie trzeba trzeba. } else if (talktime < 35) { AI_Output (self,NULL,"ZS_SmallTalkSitHC_Text07");//Nie cierpie tych strażników,wczoraj jednen mi się napatoczył jeszcze do tego mnie zdenerwował,już wyjmowałem broń a tu quentin go zdejmuje,jednak qentin dobry facet pozwolił mi obszukać tego strażnika. } else if (talktime < 40) { AI_Output (self,NULL,"ZS_SmallTalkSitHC_Text08");//A właśnie Quentin powiedział mi coś o goblinach podobno istnieją goblińscy wojownicy,on może daje z nimi rade ale ja... } else if (talktime < 45) { AI_Output (self,NULL,"ZS_SmallTalkSitHC_Text09");//Mam piękny róg Cieniostwora chcesz kupić?ten Cieniostwór to niezły okaz chyba jakiś inny gatunek... } else if (talktime < 50) { AI_Output (self,NULL,"ZS_SmallTalkSitHC_Text10");//To interesujące.Hej a może ty wiesz co się ostatnio działo w obozie. } else if (talktime < 55) { AI_Output (self,NULL,"ZS_SmallTalkSitHC_Text11");//W obozie zero rozrywki powinna być jakaś arena albo... } else if (talktime < 60) { AI_Output (self,NULL,"ZS_SmallTalkSitHC_Text12");//Coś w tym stylu,tak mnie też to dręczy. } else if (talktime < 65) { AI_Output (self,NULL,"ZS_SmallTalkSitHC_Text13");//Jutro polowanie na cieniostwora chyba idziesz? Bo ja tak. } else if (talktime < 70) { AI_Output (self,NULL,"ZS_SmallTalkSitHC_Text14");//pewnie i tak nie mam nic do roboty. } else if (talktime < 75) { AI_Output (self,NULL,"ZS_SmallTalkSitHC_Text15");//A ty co myślisz o obozach który edług ciebie jest najlepszy? } else if (talktime < 80) { AI_Output (self,NULL,"ZS_SmallTalkSitHC_Text16");//Stary obóz to groźny przeciwnik ale nigdy nie wstąpił bym do niego. } else if (talktime < 85) { AI_Output (self,NULL,"ZS_SmallTalkSitHC_Text17");//Ty jesteś w lepszej sytuacji. } else if (talktime < 90) { AI_Output (self,NULL,"ZS_SmallTalkSitHC_Text18");//Nasz obóz nie ma rudy może gdybyśmy sprzedawali trofea królowi... } else if (talktime < 95) { AI_Output (self,NULL,"ZS_SmallTalkSitHC_Text19");//To się na pewno nie uda. } else if (talktime < 100) { AI_Output (self,NULL,"ZS_SmallTalkSitHC_Text20");//Ja mam inne zdanie na ten temat. }; AI_Wait (self, 3); Npc_SetStateTime(self, 0); } else if (Npc_GetStateTime(self) >= 25) { ////PrintDebugNpc (PD_TA_CHECK, "... kein Gesprächspartner gefunden!"); AI_StartState (self, ZS_SitCampfireSmalltalk, 1, ""); }; AI_Wait (self, 1); }; func void ZS_SitCampfireSmalltalkHC_1_end() { AI_PlayAni(self,"T_SIT_2_STAND"); };
D
/** Base class for BSD socket based driver implementations. See_also: `eventcore.drivers.select`, `eventcore.drivers.epoll`, `eventcore.drivers.kqueue` */ module eventcore.drivers.posix.driver; @safe: /*@nogc:*/ nothrow: public import eventcore.driver; import eventcore.drivers.posix.dns; import eventcore.drivers.posix.events; import eventcore.drivers.posix.signals; import eventcore.drivers.posix.sockets; import eventcore.drivers.posix.watchers; import eventcore.drivers.timer; import eventcore.drivers.threadedfile; import eventcore.internal.consumablequeue : ConsumableQueue; import eventcore.internal.utils; import std.algorithm.comparison : among, min, max; version (Posix) { package alias sock_t = int; } version (Windows) { package alias sock_t = size_t; } private long currStdTime() { import std.datetime : Clock; scope (failure) assert(false); return Clock.currStdTime; } final class PosixEventDriver(Loop : PosixEventLoop) : EventDriver { @safe: /*@nogc:*/ nothrow: private { alias CoreDriver = PosixEventDriverCore!(Loop, TimerDriver, EventsDriver); alias EventsDriver = PosixEventDriverEvents!(Loop, SocketsDriver); version (linux) alias SignalsDriver = SignalFDEventDriverSignals!Loop; else alias SignalsDriver = DummyEventDriverSignals!Loop; alias TimerDriver = LoopTimeoutTimerDriver; alias SocketsDriver = PosixEventDriverSockets!Loop; version (Windows) alias DNSDriver = EventDriverDNS_GHBN!(EventsDriver, SignalsDriver); //version (linux) alias DNSDriver = EventDriverDNS_GAIA!(EventsDriver, SignalsDriver); else alias DNSDriver = EventDriverDNS_GAI!(EventsDriver, SignalsDriver); alias FileDriver = ThreadedFileEventDriver!EventsDriver; version (linux) alias WatcherDriver = InotifyEventDriverWatchers!Loop; else version (OSX) alias WatcherDriver = FSEventsEventDriverWatchers!Loop; else alias WatcherDriver = PosixEventDriverWatchers!Loop; Loop m_loop; CoreDriver m_core; EventsDriver m_events; SignalsDriver m_signals; LoopTimeoutTimerDriver m_timers; SocketsDriver m_sockets; DNSDriver m_dns; FileDriver m_files; WatcherDriver m_watchers; } this() { m_loop = new Loop; m_sockets = new SocketsDriver(m_loop); m_events = new EventsDriver(m_loop, m_sockets); m_signals = new SignalsDriver(m_loop); m_timers = new TimerDriver; m_core = new CoreDriver(m_loop, m_timers, m_events); m_dns = new DNSDriver(m_events, m_signals); m_files = new FileDriver(m_events); m_watchers = new WatcherDriver(m_loop); } // force overriding these in the (final) sub classes to avoid virtual calls final override @property CoreDriver core() { return m_core; } final override @property EventsDriver events() { return m_events; } final override @property shared(EventsDriver) events() shared { return m_events; } final override @property SignalsDriver signals() { return m_signals; } final override @property TimerDriver timers() { return m_timers; } final override @property SocketsDriver sockets() { return m_sockets; } final override @property DNSDriver dns() { return m_dns; } final override @property FileDriver files() { return m_files; } final override @property WatcherDriver watchers() { return m_watchers; } final override void dispose() { m_files.dispose(); m_dns.dispose(); m_loop.dispose(); } } final class PosixEventDriverCore(Loop : PosixEventLoop, Timers : EventDriverTimers, Events : EventDriverEvents) : EventDriverCore { @safe: nothrow: import core.time : Duration; protected alias ExtraEventsCallback = bool delegate(long); private { Loop m_loop; Timers m_timers; Events m_events; bool m_exit = false; EventID m_wakeupEvent; } protected this(Loop loop, Timers timers, Events events) { m_loop = loop; m_timers = timers; m_events = events; m_wakeupEvent = events.createInternal(); } @property size_t waiterCount() const { return m_loop.m_waiterCount + m_timers.pendingCount; } final override ExitReason processEvents(Duration timeout) { import core.time : hnsecs, seconds; if (m_exit) { m_exit = false; return ExitReason.exited; } if (!waiterCount) { return ExitReason.outOfWaiters; } bool got_events; if (timeout <= 0.seconds) { got_events = m_loop.doProcessEvents(0.seconds); m_timers.process(currStdTime); } else { long now = currStdTime; do { auto nextto = max(min(m_timers.getNextTimeout(now), timeout), 0.seconds); got_events = m_loop.doProcessEvents(nextto); long prev_step = now; now = currStdTime; got_events |= m_timers.process(now); if (timeout != Duration.max) timeout -= (now - prev_step).hnsecs; } while (timeout > 0.seconds && !m_exit && !got_events); } if (m_exit) { m_exit = false; return ExitReason.exited; } if (!waiterCount) { return ExitReason.outOfWaiters; } if (got_events) return ExitReason.idle; return ExitReason.timeout; } final override void exit() { m_exit = true; () @trusted { (cast(shared)m_events).trigger(m_wakeupEvent, true); } (); } final override void clearExitFlag() { m_exit = false; } final protected override void* rawUserData(StreamSocketFD descriptor, size_t size, DataInitializer initialize, DataInitializer destroy) @system { return rawUserDataImpl(descriptor, size, initialize, destroy); } final protected override void* rawUserData(DatagramSocketFD descriptor, size_t size, DataInitializer initialize, DataInitializer destroy) @system { return rawUserDataImpl(descriptor, size, initialize, destroy); } private void* rawUserDataImpl(FD descriptor, size_t size, DataInitializer initialize, DataInitializer destroy) @system { FDSlot* fds = &m_loop.m_fds[descriptor].common; assert(fds.userDataDestructor is null || fds.userDataDestructor is destroy, "Requesting user data with differing type (destructor)."); assert(size <= FDSlot.userData.length, "Requested user data is too large."); if (size > FDSlot.userData.length) assert(false); if (!fds.userDataDestructor) { initialize(fds.userData.ptr); fds.userDataDestructor = destroy; } return m_loop.m_fds[descriptor].common.userData.ptr; } } package class PosixEventLoop { @safe: nothrow: import core.time : Duration; package { AlgebraicChoppedVector!(FDSlot, StreamSocketSlot, StreamListenSocketSlot, DgramSocketSlot, DNSSlot, WatcherSlot, EventSlot, SignalSlot) m_fds; size_t m_waiterCount = 0; } protected @property int maxFD() const { return cast(int)m_fds.length; } protected abstract void dispose(); protected abstract bool doProcessEvents(Duration dur); /// Registers the FD for general notification reception. protected abstract void registerFD(FD fd, EventMask mask); /// Unregisters the FD for general notification reception. protected abstract void unregisterFD(FD fd, EventMask mask); /// Updates the event mask to use for listening for notifications. protected abstract void updateFD(FD fd, EventMask old_mask, EventMask new_mask); final protected void notify(EventType evt)(FD fd) { //assert(m_fds[fd].callback[evt] !is null, "Notifying FD which is not listening for event."); if (m_fds[fd.value].common.callback[evt]) m_fds[fd.value].common.callback[evt](fd); } final protected void enumerateFDs(EventType evt)(scope FDEnumerateCallback del) { // TODO: optimize! foreach (i; 0 .. cast(int)m_fds.length) if (m_fds[i].common.callback[evt]) del(cast(FD)i); } package void setNotifyCallback(EventType evt)(FD fd, FDSlotCallback callback) { assert((callback !is null) != (m_fds[fd.value].common.callback[evt] !is null), "Overwriting notification callback."); // ensure that the FD doesn't get closed before the callback gets called. with (m_fds[fd.value]) { if (callback !is null) { if (!(common.flags & FDFlags.internal)) m_waiterCount++; common.refCount++; } else { common.refCount--; if (!(common.flags & FDFlags.internal)) m_waiterCount--; } common.callback[evt] = callback; } } package void initFD(FD fd, FDFlags flags) { with (m_fds[fd.value]) { common.refCount = 1; common.flags = flags; } } package void clearFD(FD fd) { if (m_fds[fd.value].common.userDataDestructor) () @trusted { m_fds[fd.value].common.userDataDestructor(m_fds[fd.value].common.userData.ptr); } (); if (!(m_fds[fd.value].common.flags & FDFlags.internal)) foreach (cb; m_fds[fd.value].common.callback) if (cb !is null) m_waiterCount--; m_fds[fd.value] = m_fds.FullField.init; } } alias FDEnumerateCallback = void delegate(FD); alias FDSlotCallback = void delegate(FD); private struct FDSlot { FDSlotCallback[EventType.max+1] callback; uint refCount; FDFlags flags; DataInitializer userDataDestructor; ubyte[16*size_t.sizeof] userData; @property EventMask eventMask() const nothrow { EventMask ret = cast(EventMask)0; if (callback[EventType.read] !is null) ret |= EventMask.read; if (callback[EventType.write] !is null) ret |= EventMask.write; if (callback[EventType.status] !is null) ret |= EventMask.status; return ret; } } enum FDFlags { none = 0, internal = 1<<0, } enum EventType { read, write, status } enum EventMask { read = 1<<0, write = 1<<1, status = 1<<2 } void log(ARGS...)(string fmt, ARGS args) @trusted { import std.stdio : writef, writefln; import core.thread : Thread; try { writef("[%s]: ", Thread.getThis().name); writefln(fmt, args); } catch (Exception) {} } /*version (Windows) { import std.c.windows.windows; import std.c.windows.winsock; alias EWOULDBLOCK = WSAEWOULDBLOCK; extern(System) DWORD FormatMessageW(DWORD dwFlags, const(void)* lpSource, DWORD dwMessageId, DWORD dwLanguageId, LPWSTR lpBuffer, DWORD nSize, void* Arguments); class WSAErrorException : Exception { int error; this(string message, string file = __FILE__, size_t line = __LINE__) { error = WSAGetLastError(); this(message, error, file, line); } this(string message, int error, string file = __FILE__, size_t line = __LINE__) { import std.string : format; ushort* errmsg; FormatMessageW(FORMAT_MESSAGE_ALLOCATE_BUFFER|FORMAT_MESSAGE_FROM_SYSTEM|FORMAT_MESSAGE_IGNORE_INSERTS, null, error, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), cast(LPWSTR)&errmsg, 0, null); size_t len = 0; while (errmsg[len]) len++; auto errmsgd = (cast(wchar[])errmsg[0 .. len]).idup; LocalFree(errmsg); super(format("%s: %s (%s)", message, errmsgd, error), file, line); } } alias SystemSocketException = WSAErrorException; } else { import std.exception : ErrnoException; alias SystemSocketException = ErrnoException; } T socketEnforce(T)(T value, lazy string msg = null, string file = __FILE__, size_t line = __LINE__) { import std.exception : enforceEx; return enforceEx!SystemSocketException(value, msg, file, line); }*/
D
/Users/kidnapper/Documents/25sprout/practice/DerivedData2/practice/Build/Intermediates/IBDesignables/Intermediates/practice.build/Debug-iphonesimulator/practice.build/Objects-normal/x86_64/SquareCategoryCollectionView.o : /Users/kidnapper/Documents/25sprout/practice/practice/Search_TPVC.swift /Users/kidnapper/Documents/25sprout/practice/practice/Article_TVC.swift /Users/kidnapper/Documents/25sprout/practice/practice/Search_TVC.swift /Users/kidnapper/Documents/25sprout/practice/practice/TabPage2_VC.swift /Users/kidnapper/Documents/25sprout/practice/practice/TabPage_VC.swift /Users/kidnapper/Documents/25sprout/practice/practice/CongressUpdate_VC.swift /Users/kidnapper/Documents/25sprout/practice/practice/Search_VC.swift /Users/kidnapper/Documents/25sprout/practice/practice/Bookmark_VC.swift /Users/kidnapper/Documents/25sprout/practice/practice/Main_VC.swift /Users/kidnapper/Documents/25sprout/practice/practice/TrailFactSheet_VC.swift /Users/kidnapper/Documents/25sprout/practice/practice/Event_VC.swift /Users/kidnapper/Documents/25sprout/practice/practice/ExpertCommentary_VC.swift /Users/kidnapper/Documents/25sprout/practice/practice/ThumbnailHeader_CRV.swift /Users/kidnapper/Downloads/RocheCIT_iOS/RocheCIT_iOS/PHCheckableTextfield.swift /Users/kidnapper/Documents/25sprout/practice/practice/AppDelegate.swift /Users/kidnapper/Downloads/RocheCIT_iOS/RocheCIT_iOS/ReferenceLabel.swift /Users/kidnapper/Downloads/RocheCIT_iOS/RocheCIT_iOS/BulletPointLabel.swift /Users/kidnapper/Downloads/RocheCIT_iOS/RocheCIT_iOS/PHMustLabel.swift /Users/kidnapper/Documents/25sprout/practice/practice/SearchTab_CVCell.swift /Users/kidnapper/Documents/25sprout/practice/practice/Reference_TVCell.swift /Users/kidnapper/Documents/25sprout/practice/practice/MayLike_TVCell.swift /Users/kidnapper/Documents/25sprout/practice/practice/ThumbnailHeader_TVCell.swift /Users/kidnapper/Documents/25sprout/practice/practice/SearchResultHeader_TVCell.swift /Users/kidnapper/Documents/25sprout/practice/practice/TrailFactSheet_TVCell.swift /Users/kidnapper/Documents/25sprout/practice/practice/SearchResult_TVCell.swift /Users/kidnapper/Documents/25sprout/practice/practice/Content_TVCell.swift /Users/kidnapper/Documents/25sprout/practice/practice/Quiz_TVCell.swift /Users/kidnapper/Documents/25sprout/practice/practice/TableViewCell.swift /Users/kidnapper/Documents/25sprout/practice/practice/SquareCollectionViewCell.swift /Users/kidnapper/Documents/25sprout/practice/practice/BannerCollectionViewCell.swift /Users/kidnapper/Documents/25sprout/practice/practice/SquareCategoryCell.swift /Users/kidnapper/Documents/25sprout/practice/practice/BannerCategoryCell.swift /Users/kidnapper/Documents/25sprout/practice/practice/TVC_extension.swift /Users/kidnapper/Documents/25sprout/practice/practice/NavigationBar.swift /Users/kidnapper/Downloads/RocheCIT_iOS/RocheCIT_iOS/NetworkManager.swift /Users/kidnapper/Downloads/RocheCIT_iOS/RocheCIT_iOS/RequestDidSendViewController.swift /Users/kidnapper/Downloads/RocheCIT_iOS/RocheCIT_iOS/LoginInvitationCodeViewController.swift /Users/kidnapper/Downloads/RocheCIT_iOS/RocheCIT_iOS/RequestInvitationCodeViewController.swift /Users/kidnapper/Downloads/RocheCIT_iOS/RocheCIT_iOS/ArticleViewController.swift /Users/kidnapper/Downloads/RocheCIT_iOS/RocheCIT_iOS/ConfirmUserDetailViewController.swift /Users/kidnapper/Documents/25sprout/practice/practice/SeeAllViewController.swift /Users/kidnapper/Downloads/RocheCIT_iOS/RocheCIT_iOS/EmailLoginViewController.swift /Users/kidnapper/Downloads/RocheCIT_iOS/RocheCIT_iOS/FirstMeetViewController.swift /Users/kidnapper/Downloads/RocheCIT_iOS/RocheCIT_iOS/ArticleContentViewController.swift /Users/kidnapper/Downloads/RocheCIT_iOS/RocheCIT_iOS/AppUtilities.swift /Users/kidnapper/Downloads/RocheCIT_iOS/RocheCIT_iOS/Extensions.swift /Users/kidnapper/Documents/25sprout/practice/practice/SearchBarVIew.swift /Users/kidnapper/Downloads/RocheCIT_iOS/RocheCIT_iOS/ArticleQuoteView.swift /Users/kidnapper/Documents/25sprout/practice/practice/selectionView.swift /Users/kidnapper/Documents/25sprout/practice/practice/SquareCategoryCollectionView.swift /Users/kidnapper/Documents/25sprout/practice/practice/BannerCategoryCollectionView.swift /Users/kidnapper/Downloads/RocheCIT_iOS/RocheCIT_iOS/ArticleIntroView.swift /Users/kidnapper/Documents/25sprout/practice/practice/SearchTabBarView.swift /Users/kidnapper/Documents/25sprout/practice/practice/pickerView.swift /Applications/Xcode_8.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/ObjectiveC.apinotesc /Applications/Xcode_8.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.apinotesc /Applications/Xcode_8.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Foundation.apinotesc /Applications/Xcode_8.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreGraphics.apinotesc /Applications/Xcode_8.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/UIKit.apinotesc /Applications/Xcode_8.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreText.apinotesc /Users/kidnapper/Documents/25sprout/practice/DerivedData2/practice/Build/Intermediates/IBDesignables/Products/Debug-iphonesimulator/TabPageViewController.framework/Modules/TabPageViewController.swiftmodule/x86_64.swiftmodule /Applications/Xcode_8.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/ObjectiveC.swiftmodule /Applications/Xcode_8.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreImage.swiftmodule /Applications/Xcode_8.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/QuartzCore.swiftmodule /Applications/Xcode_8.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.swiftmodule /Applications/Xcode_8.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Darwin.swiftmodule /Applications/Xcode_8.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Foundation.swiftmodule /Applications/Xcode_8.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreGraphics.swiftmodule /Applications/Xcode_8.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Swift.swiftmodule /Applications/Xcode_8.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/UIKit.swiftmodule /Applications/Xcode_8.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/SwiftOnoneSupport.swiftmodule /Users/kidnapper/Documents/25sprout/practice/Pods/FirebaseInstanceID/Frameworks/FirebaseInstanceID.framework/Headers/FIRInstanceID.h /Users/kidnapper/Documents/25sprout/practice/Pods/FirebaseInstanceID/Frameworks/FirebaseInstanceID.framework/Headers/FirebaseInstanceID.h /Users/kidnapper/Documents/25sprout/practice/Pods/FirebaseCore/Frameworks/FirebaseCore.framework/Headers/FirebaseCore.h /Users/kidnapper/Documents/25sprout/practice/Pods/Firebase/Core/Sources/Firebase.h /Users/kidnapper/Documents/25sprout/practice/Pods/FirebaseAnalytics/Frameworks/FirebaseAnalytics.framework/Headers/FIRAnalytics+AppDelegate.h /Users/kidnapper/Documents/25sprout/practice/Pods/FirebaseCore/Frameworks/FirebaseCore.framework/Headers/FIRLoggerLevel.h /Users/kidnapper/Documents/25sprout/practice/Pods/FirebaseCore/Frameworks/FirebaseCore.framework/Headers/FIRConfiguration.h /Users/kidnapper/Documents/25sprout/practice/Pods/FirebaseAnalytics/Frameworks/FirebaseAnalytics.framework/Headers/FIRConfiguration.h /Users/kidnapper/Documents/25sprout/practice/Pods/FirebaseCore/Frameworks/FirebaseCore.framework/Headers/FIRAnalyticsConfiguration.h /Users/kidnapper/Documents/25sprout/practice/Pods/FirebaseAnalytics/Frameworks/FirebaseAnalytics.framework/Headers/FIRAnalyticsConfiguration.h /Users/kidnapper/Documents/25sprout/practice/Pods/FirebaseCore/Frameworks/FirebaseCore.framework/Headers/FIRApp.h /Users/kidnapper/Documents/25sprout/practice/Pods/FirebaseAnalytics/Frameworks/FirebaseAnalytics.framework/Headers/FIRApp.h /Users/kidnapper/Documents/25sprout/practice/Pods/FirebaseAnalytics/Frameworks/FirebaseAnalytics.framework/Headers/FIRAnalytics.h /Users/kidnapper/Documents/25sprout/practice/Pods/FirebaseAnalytics/Frameworks/FirebaseAnalytics.framework/Headers/FirebaseAnalytics.h /Users/kidnapper/Documents/25sprout/practice/Pods/FirebaseAnalytics/Frameworks/FirebaseAnalytics.framework/Headers/FIRParameterNames.h /Users/kidnapper/Documents/25sprout/practice/Pods/FirebaseAnalytics/Frameworks/FirebaseAnalytics.framework/Headers/FIREventNames.h /Users/kidnapper/Documents/25sprout/practice/Pods/FirebaseAnalytics/Frameworks/FirebaseAnalytics.framework/Headers/FIRUserPropertyNames.h /Users/kidnapper/Documents/25sprout/practice/Pods/FirebaseCore/Frameworks/FirebaseCore.framework/Headers/FIROptions.h /Users/kidnapper/Documents/25sprout/practice/Pods/FirebaseAnalytics/Frameworks/FirebaseAnalytics.framework/Headers/FIROptions.h /Users/kidnapper/Documents/25sprout/practice/Pods/FirebaseCore/Frameworks/FirebaseCore.framework/Headers/FIRCoreSwiftNameSupport.h /Users/kidnapper/Documents/25sprout/practice/Pods/FirebaseAnalytics/Frameworks/FirebaseAnalytics.framework/Headers/FIRAnalyticsSwiftNameSupport.h /Users/kidnapper/Documents/25sprout/practice/Pods/Firebase/Core/Sources/module.modulemap /Users/kidnapper/Documents/25sprout/practice/Pods/FirebaseInstanceID/Frameworks/FirebaseInstanceID.framework/Modules/module.modulemap /Users/kidnapper/Documents/25sprout/practice/Pods/FirebaseCore/Frameworks/FirebaseCore.framework/Modules/module.modulemap /Users/kidnapper/Documents/25sprout/practice/Pods/FirebaseAnalytics/Frameworks/FirebaseAnalytics.framework/Modules/module.modulemap /Users/kidnapper/Documents/25sprout/practice/DerivedData2/practice/Build/Intermediates/IBDesignables/Intermediates/practice.build/Debug-iphonesimulator/practice.build/Objects-normal/x86_64/SquareCategoryCollectionView~partial.swiftmodule : /Users/kidnapper/Documents/25sprout/practice/practice/Search_TPVC.swift /Users/kidnapper/Documents/25sprout/practice/practice/Article_TVC.swift /Users/kidnapper/Documents/25sprout/practice/practice/Search_TVC.swift /Users/kidnapper/Documents/25sprout/practice/practice/TabPage2_VC.swift /Users/kidnapper/Documents/25sprout/practice/practice/TabPage_VC.swift /Users/kidnapper/Documents/25sprout/practice/practice/CongressUpdate_VC.swift /Users/kidnapper/Documents/25sprout/practice/practice/Search_VC.swift /Users/kidnapper/Documents/25sprout/practice/practice/Bookmark_VC.swift /Users/kidnapper/Documents/25sprout/practice/practice/Main_VC.swift /Users/kidnapper/Documents/25sprout/practice/practice/TrailFactSheet_VC.swift /Users/kidnapper/Documents/25sprout/practice/practice/Event_VC.swift /Users/kidnapper/Documents/25sprout/practice/practice/ExpertCommentary_VC.swift /Users/kidnapper/Documents/25sprout/practice/practice/ThumbnailHeader_CRV.swift /Users/kidnapper/Downloads/RocheCIT_iOS/RocheCIT_iOS/PHCheckableTextfield.swift /Users/kidnapper/Documents/25sprout/practice/practice/AppDelegate.swift /Users/kidnapper/Downloads/RocheCIT_iOS/RocheCIT_iOS/ReferenceLabel.swift /Users/kidnapper/Downloads/RocheCIT_iOS/RocheCIT_iOS/BulletPointLabel.swift /Users/kidnapper/Downloads/RocheCIT_iOS/RocheCIT_iOS/PHMustLabel.swift /Users/kidnapper/Documents/25sprout/practice/practice/SearchTab_CVCell.swift /Users/kidnapper/Documents/25sprout/practice/practice/Reference_TVCell.swift /Users/kidnapper/Documents/25sprout/practice/practice/MayLike_TVCell.swift /Users/kidnapper/Documents/25sprout/practice/practice/ThumbnailHeader_TVCell.swift /Users/kidnapper/Documents/25sprout/practice/practice/SearchResultHeader_TVCell.swift /Users/kidnapper/Documents/25sprout/practice/practice/TrailFactSheet_TVCell.swift /Users/kidnapper/Documents/25sprout/practice/practice/SearchResult_TVCell.swift /Users/kidnapper/Documents/25sprout/practice/practice/Content_TVCell.swift /Users/kidnapper/Documents/25sprout/practice/practice/Quiz_TVCell.swift /Users/kidnapper/Documents/25sprout/practice/practice/TableViewCell.swift /Users/kidnapper/Documents/25sprout/practice/practice/SquareCollectionViewCell.swift /Users/kidnapper/Documents/25sprout/practice/practice/BannerCollectionViewCell.swift /Users/kidnapper/Documents/25sprout/practice/practice/SquareCategoryCell.swift /Users/kidnapper/Documents/25sprout/practice/practice/BannerCategoryCell.swift /Users/kidnapper/Documents/25sprout/practice/practice/TVC_extension.swift /Users/kidnapper/Documents/25sprout/practice/practice/NavigationBar.swift /Users/kidnapper/Downloads/RocheCIT_iOS/RocheCIT_iOS/NetworkManager.swift /Users/kidnapper/Downloads/RocheCIT_iOS/RocheCIT_iOS/RequestDidSendViewController.swift /Users/kidnapper/Downloads/RocheCIT_iOS/RocheCIT_iOS/LoginInvitationCodeViewController.swift /Users/kidnapper/Downloads/RocheCIT_iOS/RocheCIT_iOS/RequestInvitationCodeViewController.swift /Users/kidnapper/Downloads/RocheCIT_iOS/RocheCIT_iOS/ArticleViewController.swift /Users/kidnapper/Downloads/RocheCIT_iOS/RocheCIT_iOS/ConfirmUserDetailViewController.swift /Users/kidnapper/Documents/25sprout/practice/practice/SeeAllViewController.swift /Users/kidnapper/Downloads/RocheCIT_iOS/RocheCIT_iOS/EmailLoginViewController.swift /Users/kidnapper/Downloads/RocheCIT_iOS/RocheCIT_iOS/FirstMeetViewController.swift /Users/kidnapper/Downloads/RocheCIT_iOS/RocheCIT_iOS/ArticleContentViewController.swift /Users/kidnapper/Downloads/RocheCIT_iOS/RocheCIT_iOS/AppUtilities.swift /Users/kidnapper/Downloads/RocheCIT_iOS/RocheCIT_iOS/Extensions.swift /Users/kidnapper/Documents/25sprout/practice/practice/SearchBarVIew.swift /Users/kidnapper/Downloads/RocheCIT_iOS/RocheCIT_iOS/ArticleQuoteView.swift /Users/kidnapper/Documents/25sprout/practice/practice/selectionView.swift /Users/kidnapper/Documents/25sprout/practice/practice/SquareCategoryCollectionView.swift /Users/kidnapper/Documents/25sprout/practice/practice/BannerCategoryCollectionView.swift /Users/kidnapper/Downloads/RocheCIT_iOS/RocheCIT_iOS/ArticleIntroView.swift /Users/kidnapper/Documents/25sprout/practice/practice/SearchTabBarView.swift /Users/kidnapper/Documents/25sprout/practice/practice/pickerView.swift /Applications/Xcode_8.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/ObjectiveC.apinotesc /Applications/Xcode_8.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.apinotesc /Applications/Xcode_8.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Foundation.apinotesc /Applications/Xcode_8.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreGraphics.apinotesc /Applications/Xcode_8.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/UIKit.apinotesc /Applications/Xcode_8.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreText.apinotesc /Users/kidnapper/Documents/25sprout/practice/DerivedData2/practice/Build/Intermediates/IBDesignables/Products/Debug-iphonesimulator/TabPageViewController.framework/Modules/TabPageViewController.swiftmodule/x86_64.swiftmodule /Applications/Xcode_8.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/ObjectiveC.swiftmodule /Applications/Xcode_8.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreImage.swiftmodule /Applications/Xcode_8.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/QuartzCore.swiftmodule /Applications/Xcode_8.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.swiftmodule /Applications/Xcode_8.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Darwin.swiftmodule /Applications/Xcode_8.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Foundation.swiftmodule /Applications/Xcode_8.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreGraphics.swiftmodule /Applications/Xcode_8.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Swift.swiftmodule /Applications/Xcode_8.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/UIKit.swiftmodule /Applications/Xcode_8.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/SwiftOnoneSupport.swiftmodule /Users/kidnapper/Documents/25sprout/practice/Pods/FirebaseInstanceID/Frameworks/FirebaseInstanceID.framework/Headers/FIRInstanceID.h /Users/kidnapper/Documents/25sprout/practice/Pods/FirebaseInstanceID/Frameworks/FirebaseInstanceID.framework/Headers/FirebaseInstanceID.h /Users/kidnapper/Documents/25sprout/practice/Pods/FirebaseCore/Frameworks/FirebaseCore.framework/Headers/FirebaseCore.h /Users/kidnapper/Documents/25sprout/practice/Pods/Firebase/Core/Sources/Firebase.h /Users/kidnapper/Documents/25sprout/practice/Pods/FirebaseAnalytics/Frameworks/FirebaseAnalytics.framework/Headers/FIRAnalytics+AppDelegate.h /Users/kidnapper/Documents/25sprout/practice/Pods/FirebaseCore/Frameworks/FirebaseCore.framework/Headers/FIRLoggerLevel.h /Users/kidnapper/Documents/25sprout/practice/Pods/FirebaseCore/Frameworks/FirebaseCore.framework/Headers/FIRConfiguration.h /Users/kidnapper/Documents/25sprout/practice/Pods/FirebaseAnalytics/Frameworks/FirebaseAnalytics.framework/Headers/FIRConfiguration.h /Users/kidnapper/Documents/25sprout/practice/Pods/FirebaseCore/Frameworks/FirebaseCore.framework/Headers/FIRAnalyticsConfiguration.h /Users/kidnapper/Documents/25sprout/practice/Pods/FirebaseAnalytics/Frameworks/FirebaseAnalytics.framework/Headers/FIRAnalyticsConfiguration.h /Users/kidnapper/Documents/25sprout/practice/Pods/FirebaseCore/Frameworks/FirebaseCore.framework/Headers/FIRApp.h /Users/kidnapper/Documents/25sprout/practice/Pods/FirebaseAnalytics/Frameworks/FirebaseAnalytics.framework/Headers/FIRApp.h /Users/kidnapper/Documents/25sprout/practice/Pods/FirebaseAnalytics/Frameworks/FirebaseAnalytics.framework/Headers/FIRAnalytics.h /Users/kidnapper/Documents/25sprout/practice/Pods/FirebaseAnalytics/Frameworks/FirebaseAnalytics.framework/Headers/FirebaseAnalytics.h /Users/kidnapper/Documents/25sprout/practice/Pods/FirebaseAnalytics/Frameworks/FirebaseAnalytics.framework/Headers/FIRParameterNames.h /Users/kidnapper/Documents/25sprout/practice/Pods/FirebaseAnalytics/Frameworks/FirebaseAnalytics.framework/Headers/FIREventNames.h /Users/kidnapper/Documents/25sprout/practice/Pods/FirebaseAnalytics/Frameworks/FirebaseAnalytics.framework/Headers/FIRUserPropertyNames.h /Users/kidnapper/Documents/25sprout/practice/Pods/FirebaseCore/Frameworks/FirebaseCore.framework/Headers/FIROptions.h /Users/kidnapper/Documents/25sprout/practice/Pods/FirebaseAnalytics/Frameworks/FirebaseAnalytics.framework/Headers/FIROptions.h /Users/kidnapper/Documents/25sprout/practice/Pods/FirebaseCore/Frameworks/FirebaseCore.framework/Headers/FIRCoreSwiftNameSupport.h /Users/kidnapper/Documents/25sprout/practice/Pods/FirebaseAnalytics/Frameworks/FirebaseAnalytics.framework/Headers/FIRAnalyticsSwiftNameSupport.h /Users/kidnapper/Documents/25sprout/practice/Pods/Firebase/Core/Sources/module.modulemap /Users/kidnapper/Documents/25sprout/practice/Pods/FirebaseInstanceID/Frameworks/FirebaseInstanceID.framework/Modules/module.modulemap /Users/kidnapper/Documents/25sprout/practice/Pods/FirebaseCore/Frameworks/FirebaseCore.framework/Modules/module.modulemap /Users/kidnapper/Documents/25sprout/practice/Pods/FirebaseAnalytics/Frameworks/FirebaseAnalytics.framework/Modules/module.modulemap /Users/kidnapper/Documents/25sprout/practice/DerivedData2/practice/Build/Intermediates/IBDesignables/Intermediates/practice.build/Debug-iphonesimulator/practice.build/Objects-normal/x86_64/SquareCategoryCollectionView~partial.swiftdoc : /Users/kidnapper/Documents/25sprout/practice/practice/Search_TPVC.swift /Users/kidnapper/Documents/25sprout/practice/practice/Article_TVC.swift /Users/kidnapper/Documents/25sprout/practice/practice/Search_TVC.swift /Users/kidnapper/Documents/25sprout/practice/practice/TabPage2_VC.swift /Users/kidnapper/Documents/25sprout/practice/practice/TabPage_VC.swift /Users/kidnapper/Documents/25sprout/practice/practice/CongressUpdate_VC.swift /Users/kidnapper/Documents/25sprout/practice/practice/Search_VC.swift /Users/kidnapper/Documents/25sprout/practice/practice/Bookmark_VC.swift /Users/kidnapper/Documents/25sprout/practice/practice/Main_VC.swift /Users/kidnapper/Documents/25sprout/practice/practice/TrailFactSheet_VC.swift /Users/kidnapper/Documents/25sprout/practice/practice/Event_VC.swift /Users/kidnapper/Documents/25sprout/practice/practice/ExpertCommentary_VC.swift /Users/kidnapper/Documents/25sprout/practice/practice/ThumbnailHeader_CRV.swift /Users/kidnapper/Downloads/RocheCIT_iOS/RocheCIT_iOS/PHCheckableTextfield.swift /Users/kidnapper/Documents/25sprout/practice/practice/AppDelegate.swift /Users/kidnapper/Downloads/RocheCIT_iOS/RocheCIT_iOS/ReferenceLabel.swift /Users/kidnapper/Downloads/RocheCIT_iOS/RocheCIT_iOS/BulletPointLabel.swift /Users/kidnapper/Downloads/RocheCIT_iOS/RocheCIT_iOS/PHMustLabel.swift /Users/kidnapper/Documents/25sprout/practice/practice/SearchTab_CVCell.swift /Users/kidnapper/Documents/25sprout/practice/practice/Reference_TVCell.swift /Users/kidnapper/Documents/25sprout/practice/practice/MayLike_TVCell.swift /Users/kidnapper/Documents/25sprout/practice/practice/ThumbnailHeader_TVCell.swift /Users/kidnapper/Documents/25sprout/practice/practice/SearchResultHeader_TVCell.swift /Users/kidnapper/Documents/25sprout/practice/practice/TrailFactSheet_TVCell.swift /Users/kidnapper/Documents/25sprout/practice/practice/SearchResult_TVCell.swift /Users/kidnapper/Documents/25sprout/practice/practice/Content_TVCell.swift /Users/kidnapper/Documents/25sprout/practice/practice/Quiz_TVCell.swift /Users/kidnapper/Documents/25sprout/practice/practice/TableViewCell.swift /Users/kidnapper/Documents/25sprout/practice/practice/SquareCollectionViewCell.swift /Users/kidnapper/Documents/25sprout/practice/practice/BannerCollectionViewCell.swift /Users/kidnapper/Documents/25sprout/practice/practice/SquareCategoryCell.swift /Users/kidnapper/Documents/25sprout/practice/practice/BannerCategoryCell.swift /Users/kidnapper/Documents/25sprout/practice/practice/TVC_extension.swift /Users/kidnapper/Documents/25sprout/practice/practice/NavigationBar.swift /Users/kidnapper/Downloads/RocheCIT_iOS/RocheCIT_iOS/NetworkManager.swift /Users/kidnapper/Downloads/RocheCIT_iOS/RocheCIT_iOS/RequestDidSendViewController.swift /Users/kidnapper/Downloads/RocheCIT_iOS/RocheCIT_iOS/LoginInvitationCodeViewController.swift /Users/kidnapper/Downloads/RocheCIT_iOS/RocheCIT_iOS/RequestInvitationCodeViewController.swift /Users/kidnapper/Downloads/RocheCIT_iOS/RocheCIT_iOS/ArticleViewController.swift /Users/kidnapper/Downloads/RocheCIT_iOS/RocheCIT_iOS/ConfirmUserDetailViewController.swift /Users/kidnapper/Documents/25sprout/practice/practice/SeeAllViewController.swift /Users/kidnapper/Downloads/RocheCIT_iOS/RocheCIT_iOS/EmailLoginViewController.swift /Users/kidnapper/Downloads/RocheCIT_iOS/RocheCIT_iOS/FirstMeetViewController.swift /Users/kidnapper/Downloads/RocheCIT_iOS/RocheCIT_iOS/ArticleContentViewController.swift /Users/kidnapper/Downloads/RocheCIT_iOS/RocheCIT_iOS/AppUtilities.swift /Users/kidnapper/Downloads/RocheCIT_iOS/RocheCIT_iOS/Extensions.swift /Users/kidnapper/Documents/25sprout/practice/practice/SearchBarVIew.swift /Users/kidnapper/Downloads/RocheCIT_iOS/RocheCIT_iOS/ArticleQuoteView.swift /Users/kidnapper/Documents/25sprout/practice/practice/selectionView.swift /Users/kidnapper/Documents/25sprout/practice/practice/SquareCategoryCollectionView.swift /Users/kidnapper/Documents/25sprout/practice/practice/BannerCategoryCollectionView.swift /Users/kidnapper/Downloads/RocheCIT_iOS/RocheCIT_iOS/ArticleIntroView.swift /Users/kidnapper/Documents/25sprout/practice/practice/SearchTabBarView.swift /Users/kidnapper/Documents/25sprout/practice/practice/pickerView.swift /Applications/Xcode_8.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/ObjectiveC.apinotesc /Applications/Xcode_8.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.apinotesc /Applications/Xcode_8.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Foundation.apinotesc /Applications/Xcode_8.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreGraphics.apinotesc /Applications/Xcode_8.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/UIKit.apinotesc /Applications/Xcode_8.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreText.apinotesc /Users/kidnapper/Documents/25sprout/practice/DerivedData2/practice/Build/Intermediates/IBDesignables/Products/Debug-iphonesimulator/TabPageViewController.framework/Modules/TabPageViewController.swiftmodule/x86_64.swiftmodule /Applications/Xcode_8.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/ObjectiveC.swiftmodule /Applications/Xcode_8.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreImage.swiftmodule /Applications/Xcode_8.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/QuartzCore.swiftmodule /Applications/Xcode_8.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.swiftmodule /Applications/Xcode_8.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Darwin.swiftmodule /Applications/Xcode_8.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Foundation.swiftmodule /Applications/Xcode_8.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreGraphics.swiftmodule /Applications/Xcode_8.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Swift.swiftmodule /Applications/Xcode_8.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/UIKit.swiftmodule /Applications/Xcode_8.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/SwiftOnoneSupport.swiftmodule /Users/kidnapper/Documents/25sprout/practice/Pods/FirebaseInstanceID/Frameworks/FirebaseInstanceID.framework/Headers/FIRInstanceID.h /Users/kidnapper/Documents/25sprout/practice/Pods/FirebaseInstanceID/Frameworks/FirebaseInstanceID.framework/Headers/FirebaseInstanceID.h /Users/kidnapper/Documents/25sprout/practice/Pods/FirebaseCore/Frameworks/FirebaseCore.framework/Headers/FirebaseCore.h /Users/kidnapper/Documents/25sprout/practice/Pods/Firebase/Core/Sources/Firebase.h /Users/kidnapper/Documents/25sprout/practice/Pods/FirebaseAnalytics/Frameworks/FirebaseAnalytics.framework/Headers/FIRAnalytics+AppDelegate.h /Users/kidnapper/Documents/25sprout/practice/Pods/FirebaseCore/Frameworks/FirebaseCore.framework/Headers/FIRLoggerLevel.h /Users/kidnapper/Documents/25sprout/practice/Pods/FirebaseCore/Frameworks/FirebaseCore.framework/Headers/FIRConfiguration.h /Users/kidnapper/Documents/25sprout/practice/Pods/FirebaseAnalytics/Frameworks/FirebaseAnalytics.framework/Headers/FIRConfiguration.h /Users/kidnapper/Documents/25sprout/practice/Pods/FirebaseCore/Frameworks/FirebaseCore.framework/Headers/FIRAnalyticsConfiguration.h /Users/kidnapper/Documents/25sprout/practice/Pods/FirebaseAnalytics/Frameworks/FirebaseAnalytics.framework/Headers/FIRAnalyticsConfiguration.h /Users/kidnapper/Documents/25sprout/practice/Pods/FirebaseCore/Frameworks/FirebaseCore.framework/Headers/FIRApp.h /Users/kidnapper/Documents/25sprout/practice/Pods/FirebaseAnalytics/Frameworks/FirebaseAnalytics.framework/Headers/FIRApp.h /Users/kidnapper/Documents/25sprout/practice/Pods/FirebaseAnalytics/Frameworks/FirebaseAnalytics.framework/Headers/FIRAnalytics.h /Users/kidnapper/Documents/25sprout/practice/Pods/FirebaseAnalytics/Frameworks/FirebaseAnalytics.framework/Headers/FirebaseAnalytics.h /Users/kidnapper/Documents/25sprout/practice/Pods/FirebaseAnalytics/Frameworks/FirebaseAnalytics.framework/Headers/FIRParameterNames.h /Users/kidnapper/Documents/25sprout/practice/Pods/FirebaseAnalytics/Frameworks/FirebaseAnalytics.framework/Headers/FIREventNames.h /Users/kidnapper/Documents/25sprout/practice/Pods/FirebaseAnalytics/Frameworks/FirebaseAnalytics.framework/Headers/FIRUserPropertyNames.h /Users/kidnapper/Documents/25sprout/practice/Pods/FirebaseCore/Frameworks/FirebaseCore.framework/Headers/FIROptions.h /Users/kidnapper/Documents/25sprout/practice/Pods/FirebaseAnalytics/Frameworks/FirebaseAnalytics.framework/Headers/FIROptions.h /Users/kidnapper/Documents/25sprout/practice/Pods/FirebaseCore/Frameworks/FirebaseCore.framework/Headers/FIRCoreSwiftNameSupport.h /Users/kidnapper/Documents/25sprout/practice/Pods/FirebaseAnalytics/Frameworks/FirebaseAnalytics.framework/Headers/FIRAnalyticsSwiftNameSupport.h /Users/kidnapper/Documents/25sprout/practice/Pods/Firebase/Core/Sources/module.modulemap /Users/kidnapper/Documents/25sprout/practice/Pods/FirebaseInstanceID/Frameworks/FirebaseInstanceID.framework/Modules/module.modulemap /Users/kidnapper/Documents/25sprout/practice/Pods/FirebaseCore/Frameworks/FirebaseCore.framework/Modules/module.modulemap /Users/kidnapper/Documents/25sprout/practice/Pods/FirebaseAnalytics/Frameworks/FirebaseAnalytics.framework/Modules/module.modulemap
D
/Users/karl/Projects/Private/Backend/kiturabuildserver/.build/debug/Kitura.build/RouterHTTPVerbs+Error.swift.o : /Users/karl/Projects/Private/Backend/kiturabuildserver/.build/checkouts/Kitura.git-6522211175291160341/Sources/Kitura/Kitura.swift /Users/karl/Projects/Private/Backend/kiturabuildserver/.build/checkouts/Kitura.git-6522211175291160341/Sources/Kitura/RouterHTTPVerbs_generated.swift /Users/karl/Projects/Private/Backend/kiturabuildserver/.build/checkouts/Kitura.git-6522211175291160341/Sources/Kitura/RouterMethod.swift /Users/karl/Projects/Private/Backend/kiturabuildserver/.build/checkouts/Kitura.git-6522211175291160341/Sources/Kitura/contentType/ContentType.swift /Users/karl/Projects/Private/Backend/kiturabuildserver/.build/checkouts/Kitura.git-6522211175291160341/Sources/Kitura/RouterMiddleware.swift /Users/karl/Projects/Private/Backend/kiturabuildserver/.build/checkouts/Kitura.git-6522211175291160341/Sources/Kitura/RouterResponse.swift /Users/karl/Projects/Private/Backend/kiturabuildserver/.build/checkouts/Kitura.git-6522211175291160341/Sources/Kitura/SSLConfig.swift /Users/karl/Projects/Private/Backend/kiturabuildserver/.build/checkouts/Kitura.git-6522211175291160341/Sources/Kitura/bodyParser/BodyParserProtocol.swift /Users/karl/Projects/Private/Backend/kiturabuildserver/.build/checkouts/Kitura.git-6522211175291160341/Sources/Kitura/HTTPVersion.swift /Users/karl/Projects/Private/Backend/kiturabuildserver/.build/checkouts/Kitura.git-6522211175291160341/Sources/Kitura/RouterMiddlewareWalker.swift /Users/karl/Projects/Private/Backend/kiturabuildserver/.build/checkouts/Kitura.git-6522211175291160341/Sources/Kitura/RouterParameterWalker.swift /Users/karl/Projects/Private/Backend/kiturabuildserver/.build/checkouts/Kitura.git-6522211175291160341/Sources/Kitura/RouterElementWalker.swift /Users/karl/Projects/Private/Backend/kiturabuildserver/.build/checkouts/Kitura.git-6522211175291160341/Sources/Kitura/staticFileServer/ResourcePathHandler.swift /Users/karl/Projects/Private/Backend/kiturabuildserver/.build/checkouts/Kitura.git-6522211175291160341/Sources/Kitura/RouterHandler.swift /Users/karl/Projects/Private/Backend/kiturabuildserver/.build/checkouts/Kitura.git-6522211175291160341/Sources/Kitura/bodyParser/BodyParser.swift /Users/karl/Projects/Private/Backend/kiturabuildserver/.build/checkouts/Kitura.git-6522211175291160341/Sources/Kitura/bodyParser/JSONBodyParser.swift /Users/karl/Projects/Private/Backend/kiturabuildserver/.build/checkouts/Kitura.git-6522211175291160341/Sources/Kitura/bodyParser/URLEncodedBodyParser.swift /Users/karl/Projects/Private/Backend/kiturabuildserver/.build/checkouts/Kitura.git-6522211175291160341/Sources/Kitura/bodyParser/MultiPartBodyParser.swift /Users/karl/Projects/Private/Backend/kiturabuildserver/.build/checkouts/Kitura.git-6522211175291160341/Sources/Kitura/bodyParser/TextBodyParser.swift /Users/karl/Projects/Private/Backend/kiturabuildserver/.build/checkouts/Kitura.git-6522211175291160341/Sources/Kitura/bodyParser/RawBodyParser.swift /Users/karl/Projects/Private/Backend/kiturabuildserver/.build/checkouts/Kitura.git-6522211175291160341/Sources/Kitura/LinkParameter.swift /Users/karl/Projects/Private/Backend/kiturabuildserver/.build/checkouts/Kitura.git-6522211175291160341/Sources/Kitura/staticFileServer/CacheRelatedHeadersSetter.swift /Users/karl/Projects/Private/Backend/kiturabuildserver/.build/checkouts/Kitura.git-6522211175291160341/Sources/Kitura/staticFileServer/ResponseHeadersSetter.swift /Users/karl/Projects/Private/Backend/kiturabuildserver/.build/checkouts/Kitura.git-6522211175291160341/Sources/Kitura/staticFileServer/CompositeHeadersSetter.swift /Users/karl/Projects/Private/Backend/kiturabuildserver/.build/checkouts/Kitura.git-6522211175291160341/Sources/Kitura/Router.swift /Users/karl/Projects/Private/Backend/kiturabuildserver/.build/checkouts/Kitura.git-6522211175291160341/Sources/Kitura/FileResourceServer.swift /Users/karl/Projects/Private/Backend/kiturabuildserver/.build/checkouts/Kitura.git-6522211175291160341/Sources/Kitura/staticFileServer/FileServer.swift /Users/karl/Projects/Private/Backend/kiturabuildserver/.build/checkouts/Kitura.git-6522211175291160341/Sources/Kitura/staticFileServer/StaticFileServer.swift /Users/karl/Projects/Private/Backend/kiturabuildserver/.build/checkouts/Kitura.git-6522211175291160341/Sources/Kitura/RouterHTTPVerbs+Error.swift /Users/karl/Projects/Private/Backend/kiturabuildserver/.build/checkouts/Kitura.git-6522211175291160341/Sources/Kitura/Error.swift /Users/karl/Projects/Private/Backend/kiturabuildserver/.build/checkouts/Kitura.git-6522211175291160341/Sources/Kitura/JSONPError.swift /Users/karl/Projects/Private/Backend/kiturabuildserver/.build/checkouts/Kitura.git-6522211175291160341/Sources/Kitura/TemplatingError.swift /Users/karl/Projects/Private/Backend/kiturabuildserver/.build/checkouts/Kitura.git-6522211175291160341/Sources/Kitura/InternalError.swift /Users/karl/Projects/Private/Backend/kiturabuildserver/.build/checkouts/Kitura.git-6522211175291160341/Sources/Kitura/RouterMiddlewareGenerator.swift /Users/karl/Projects/Private/Backend/kiturabuildserver/.build/checkouts/Kitura.git-6522211175291160341/Sources/Kitura/MimeTypeAcceptor.swift /Users/karl/Projects/Private/Backend/kiturabuildserver/.build/checkouts/Kitura.git-6522211175291160341/Sources/Kitura/contentType/types.swift /Users/karl/Projects/Private/Backend/kiturabuildserver/.build/checkouts/Kitura.git-6522211175291160341/Sources/Kitura/String+Extensions.swift /Users/karl/Projects/Private/Backend/kiturabuildserver/.build/checkouts/Kitura.git-6522211175291160341/Sources/Kitura/Headers.swift /Users/karl/Projects/Private/Backend/kiturabuildserver/.build/checkouts/Kitura.git-6522211175291160341/Sources/Kitura/RouterElement.swift /Users/karl/Projects/Private/Backend/kiturabuildserver/.build/checkouts/Kitura.git-6522211175291160341/Sources/Kitura/bodyParser/Part.swift /Users/karl/Projects/Private/Backend/kiturabuildserver/.build/checkouts/Kitura.git-6522211175291160341/Sources/Kitura/RouterRequest.swift /Users/karl/Projects/Private/Backend/kiturabuildserver/.build/checkouts/Kitura.git-6522211175291160341/Sources/Kitura/RouteRegex.swift /Users/karl/Projects/Private/Backend/kiturabuildserver/.build/checkouts/Kitura.git-6522211175291160341/Sources/Kitura/bodyParser/ParsedBody.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/ObjectiveC.apinotesc /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/Foundation.apinotesc /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/CoreGraphics.apinotesc /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/CoreText.apinotesc /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/ObjectiveC.swiftmodule /Users/karl/Projects/Private/Backend/kiturabuildserver/.build/debug/LoggerAPI.swiftmodule /Users/karl/Projects/Private/Backend/kiturabuildserver/.build/debug/SwiftyJSON.swiftmodule /Users/karl/Projects/Private/Backend/kiturabuildserver/.build/debug/SSLService.swiftmodule /Users/karl/Projects/Private/Backend/kiturabuildserver/.build/debug/KituraTemplateEngine.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/CoreGraphics.swiftmodule /Users/karl/Projects/Private/Backend/kiturabuildserver/.build/debug/KituraNet.swiftmodule /Users/karl/Projects/Private/Backend/kiturabuildserver/.build/debug/Socket.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/karl/Projects/Private/Backend/kiturabuildserver/.build/checkouts/Kitura-net.git--7410958935072501107/Sources/CHTTPParser/include/CHTTPParser.h /Users/karl/Projects/Private/Backend/kiturabuildserver/.build/checkouts/Kitura-net.git--7410958935072501107/Sources/CHTTPParser/include/http_parser.h /Users/karl/Projects/Private/Backend/kiturabuildserver/.build/checkouts/Kitura-net.git--7410958935072501107/Sources/CHTTPParser/include/utils.h /Users/karl/Projects/Private/Backend/kiturabuildserver/.build/checkouts/CCurl.git-8026296523752779197/module.modulemap /Users/karl/Projects/Private/Backend/kiturabuildserver/.build/debug/CHTTPParser.build/module.modulemap /Users/karl/Projects/Private/Backend/kiturabuildserver/.build/debug/Kitura.build/RouterHTTPVerbs+Error~partial.swiftmodule : /Users/karl/Projects/Private/Backend/kiturabuildserver/.build/checkouts/Kitura.git-6522211175291160341/Sources/Kitura/Kitura.swift /Users/karl/Projects/Private/Backend/kiturabuildserver/.build/checkouts/Kitura.git-6522211175291160341/Sources/Kitura/RouterHTTPVerbs_generated.swift /Users/karl/Projects/Private/Backend/kiturabuildserver/.build/checkouts/Kitura.git-6522211175291160341/Sources/Kitura/RouterMethod.swift /Users/karl/Projects/Private/Backend/kiturabuildserver/.build/checkouts/Kitura.git-6522211175291160341/Sources/Kitura/contentType/ContentType.swift /Users/karl/Projects/Private/Backend/kiturabuildserver/.build/checkouts/Kitura.git-6522211175291160341/Sources/Kitura/RouterMiddleware.swift /Users/karl/Projects/Private/Backend/kiturabuildserver/.build/checkouts/Kitura.git-6522211175291160341/Sources/Kitura/RouterResponse.swift /Users/karl/Projects/Private/Backend/kiturabuildserver/.build/checkouts/Kitura.git-6522211175291160341/Sources/Kitura/SSLConfig.swift /Users/karl/Projects/Private/Backend/kiturabuildserver/.build/checkouts/Kitura.git-6522211175291160341/Sources/Kitura/bodyParser/BodyParserProtocol.swift /Users/karl/Projects/Private/Backend/kiturabuildserver/.build/checkouts/Kitura.git-6522211175291160341/Sources/Kitura/HTTPVersion.swift /Users/karl/Projects/Private/Backend/kiturabuildserver/.build/checkouts/Kitura.git-6522211175291160341/Sources/Kitura/RouterMiddlewareWalker.swift /Users/karl/Projects/Private/Backend/kiturabuildserver/.build/checkouts/Kitura.git-6522211175291160341/Sources/Kitura/RouterParameterWalker.swift /Users/karl/Projects/Private/Backend/kiturabuildserver/.build/checkouts/Kitura.git-6522211175291160341/Sources/Kitura/RouterElementWalker.swift /Users/karl/Projects/Private/Backend/kiturabuildserver/.build/checkouts/Kitura.git-6522211175291160341/Sources/Kitura/staticFileServer/ResourcePathHandler.swift /Users/karl/Projects/Private/Backend/kiturabuildserver/.build/checkouts/Kitura.git-6522211175291160341/Sources/Kitura/RouterHandler.swift /Users/karl/Projects/Private/Backend/kiturabuildserver/.build/checkouts/Kitura.git-6522211175291160341/Sources/Kitura/bodyParser/BodyParser.swift /Users/karl/Projects/Private/Backend/kiturabuildserver/.build/checkouts/Kitura.git-6522211175291160341/Sources/Kitura/bodyParser/JSONBodyParser.swift /Users/karl/Projects/Private/Backend/kiturabuildserver/.build/checkouts/Kitura.git-6522211175291160341/Sources/Kitura/bodyParser/URLEncodedBodyParser.swift /Users/karl/Projects/Private/Backend/kiturabuildserver/.build/checkouts/Kitura.git-6522211175291160341/Sources/Kitura/bodyParser/MultiPartBodyParser.swift /Users/karl/Projects/Private/Backend/kiturabuildserver/.build/checkouts/Kitura.git-6522211175291160341/Sources/Kitura/bodyParser/TextBodyParser.swift /Users/karl/Projects/Private/Backend/kiturabuildserver/.build/checkouts/Kitura.git-6522211175291160341/Sources/Kitura/bodyParser/RawBodyParser.swift /Users/karl/Projects/Private/Backend/kiturabuildserver/.build/checkouts/Kitura.git-6522211175291160341/Sources/Kitura/LinkParameter.swift /Users/karl/Projects/Private/Backend/kiturabuildserver/.build/checkouts/Kitura.git-6522211175291160341/Sources/Kitura/staticFileServer/CacheRelatedHeadersSetter.swift /Users/karl/Projects/Private/Backend/kiturabuildserver/.build/checkouts/Kitura.git-6522211175291160341/Sources/Kitura/staticFileServer/ResponseHeadersSetter.swift /Users/karl/Projects/Private/Backend/kiturabuildserver/.build/checkouts/Kitura.git-6522211175291160341/Sources/Kitura/staticFileServer/CompositeHeadersSetter.swift /Users/karl/Projects/Private/Backend/kiturabuildserver/.build/checkouts/Kitura.git-6522211175291160341/Sources/Kitura/Router.swift /Users/karl/Projects/Private/Backend/kiturabuildserver/.build/checkouts/Kitura.git-6522211175291160341/Sources/Kitura/FileResourceServer.swift /Users/karl/Projects/Private/Backend/kiturabuildserver/.build/checkouts/Kitura.git-6522211175291160341/Sources/Kitura/staticFileServer/FileServer.swift /Users/karl/Projects/Private/Backend/kiturabuildserver/.build/checkouts/Kitura.git-6522211175291160341/Sources/Kitura/staticFileServer/StaticFileServer.swift /Users/karl/Projects/Private/Backend/kiturabuildserver/.build/checkouts/Kitura.git-6522211175291160341/Sources/Kitura/RouterHTTPVerbs+Error.swift /Users/karl/Projects/Private/Backend/kiturabuildserver/.build/checkouts/Kitura.git-6522211175291160341/Sources/Kitura/Error.swift /Users/karl/Projects/Private/Backend/kiturabuildserver/.build/checkouts/Kitura.git-6522211175291160341/Sources/Kitura/JSONPError.swift /Users/karl/Projects/Private/Backend/kiturabuildserver/.build/checkouts/Kitura.git-6522211175291160341/Sources/Kitura/TemplatingError.swift /Users/karl/Projects/Private/Backend/kiturabuildserver/.build/checkouts/Kitura.git-6522211175291160341/Sources/Kitura/InternalError.swift /Users/karl/Projects/Private/Backend/kiturabuildserver/.build/checkouts/Kitura.git-6522211175291160341/Sources/Kitura/RouterMiddlewareGenerator.swift /Users/karl/Projects/Private/Backend/kiturabuildserver/.build/checkouts/Kitura.git-6522211175291160341/Sources/Kitura/MimeTypeAcceptor.swift /Users/karl/Projects/Private/Backend/kiturabuildserver/.build/checkouts/Kitura.git-6522211175291160341/Sources/Kitura/contentType/types.swift /Users/karl/Projects/Private/Backend/kiturabuildserver/.build/checkouts/Kitura.git-6522211175291160341/Sources/Kitura/String+Extensions.swift /Users/karl/Projects/Private/Backend/kiturabuildserver/.build/checkouts/Kitura.git-6522211175291160341/Sources/Kitura/Headers.swift /Users/karl/Projects/Private/Backend/kiturabuildserver/.build/checkouts/Kitura.git-6522211175291160341/Sources/Kitura/RouterElement.swift /Users/karl/Projects/Private/Backend/kiturabuildserver/.build/checkouts/Kitura.git-6522211175291160341/Sources/Kitura/bodyParser/Part.swift /Users/karl/Projects/Private/Backend/kiturabuildserver/.build/checkouts/Kitura.git-6522211175291160341/Sources/Kitura/RouterRequest.swift /Users/karl/Projects/Private/Backend/kiturabuildserver/.build/checkouts/Kitura.git-6522211175291160341/Sources/Kitura/RouteRegex.swift /Users/karl/Projects/Private/Backend/kiturabuildserver/.build/checkouts/Kitura.git-6522211175291160341/Sources/Kitura/bodyParser/ParsedBody.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/ObjectiveC.apinotesc /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/Foundation.apinotesc /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/CoreGraphics.apinotesc /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/CoreText.apinotesc /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/ObjectiveC.swiftmodule /Users/karl/Projects/Private/Backend/kiturabuildserver/.build/debug/LoggerAPI.swiftmodule /Users/karl/Projects/Private/Backend/kiturabuildserver/.build/debug/SwiftyJSON.swiftmodule /Users/karl/Projects/Private/Backend/kiturabuildserver/.build/debug/SSLService.swiftmodule /Users/karl/Projects/Private/Backend/kiturabuildserver/.build/debug/KituraTemplateEngine.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/CoreGraphics.swiftmodule /Users/karl/Projects/Private/Backend/kiturabuildserver/.build/debug/KituraNet.swiftmodule /Users/karl/Projects/Private/Backend/kiturabuildserver/.build/debug/Socket.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/karl/Projects/Private/Backend/kiturabuildserver/.build/checkouts/Kitura-net.git--7410958935072501107/Sources/CHTTPParser/include/CHTTPParser.h /Users/karl/Projects/Private/Backend/kiturabuildserver/.build/checkouts/Kitura-net.git--7410958935072501107/Sources/CHTTPParser/include/http_parser.h /Users/karl/Projects/Private/Backend/kiturabuildserver/.build/checkouts/Kitura-net.git--7410958935072501107/Sources/CHTTPParser/include/utils.h /Users/karl/Projects/Private/Backend/kiturabuildserver/.build/checkouts/CCurl.git-8026296523752779197/module.modulemap /Users/karl/Projects/Private/Backend/kiturabuildserver/.build/debug/CHTTPParser.build/module.modulemap /Users/karl/Projects/Private/Backend/kiturabuildserver/.build/debug/Kitura.build/RouterHTTPVerbs+Error~partial.swiftdoc : /Users/karl/Projects/Private/Backend/kiturabuildserver/.build/checkouts/Kitura.git-6522211175291160341/Sources/Kitura/Kitura.swift /Users/karl/Projects/Private/Backend/kiturabuildserver/.build/checkouts/Kitura.git-6522211175291160341/Sources/Kitura/RouterHTTPVerbs_generated.swift /Users/karl/Projects/Private/Backend/kiturabuildserver/.build/checkouts/Kitura.git-6522211175291160341/Sources/Kitura/RouterMethod.swift /Users/karl/Projects/Private/Backend/kiturabuildserver/.build/checkouts/Kitura.git-6522211175291160341/Sources/Kitura/contentType/ContentType.swift /Users/karl/Projects/Private/Backend/kiturabuildserver/.build/checkouts/Kitura.git-6522211175291160341/Sources/Kitura/RouterMiddleware.swift /Users/karl/Projects/Private/Backend/kiturabuildserver/.build/checkouts/Kitura.git-6522211175291160341/Sources/Kitura/RouterResponse.swift /Users/karl/Projects/Private/Backend/kiturabuildserver/.build/checkouts/Kitura.git-6522211175291160341/Sources/Kitura/SSLConfig.swift /Users/karl/Projects/Private/Backend/kiturabuildserver/.build/checkouts/Kitura.git-6522211175291160341/Sources/Kitura/bodyParser/BodyParserProtocol.swift /Users/karl/Projects/Private/Backend/kiturabuildserver/.build/checkouts/Kitura.git-6522211175291160341/Sources/Kitura/HTTPVersion.swift /Users/karl/Projects/Private/Backend/kiturabuildserver/.build/checkouts/Kitura.git-6522211175291160341/Sources/Kitura/RouterMiddlewareWalker.swift /Users/karl/Projects/Private/Backend/kiturabuildserver/.build/checkouts/Kitura.git-6522211175291160341/Sources/Kitura/RouterParameterWalker.swift /Users/karl/Projects/Private/Backend/kiturabuildserver/.build/checkouts/Kitura.git-6522211175291160341/Sources/Kitura/RouterElementWalker.swift /Users/karl/Projects/Private/Backend/kiturabuildserver/.build/checkouts/Kitura.git-6522211175291160341/Sources/Kitura/staticFileServer/ResourcePathHandler.swift /Users/karl/Projects/Private/Backend/kiturabuildserver/.build/checkouts/Kitura.git-6522211175291160341/Sources/Kitura/RouterHandler.swift /Users/karl/Projects/Private/Backend/kiturabuildserver/.build/checkouts/Kitura.git-6522211175291160341/Sources/Kitura/bodyParser/BodyParser.swift /Users/karl/Projects/Private/Backend/kiturabuildserver/.build/checkouts/Kitura.git-6522211175291160341/Sources/Kitura/bodyParser/JSONBodyParser.swift /Users/karl/Projects/Private/Backend/kiturabuildserver/.build/checkouts/Kitura.git-6522211175291160341/Sources/Kitura/bodyParser/URLEncodedBodyParser.swift /Users/karl/Projects/Private/Backend/kiturabuildserver/.build/checkouts/Kitura.git-6522211175291160341/Sources/Kitura/bodyParser/MultiPartBodyParser.swift /Users/karl/Projects/Private/Backend/kiturabuildserver/.build/checkouts/Kitura.git-6522211175291160341/Sources/Kitura/bodyParser/TextBodyParser.swift /Users/karl/Projects/Private/Backend/kiturabuildserver/.build/checkouts/Kitura.git-6522211175291160341/Sources/Kitura/bodyParser/RawBodyParser.swift /Users/karl/Projects/Private/Backend/kiturabuildserver/.build/checkouts/Kitura.git-6522211175291160341/Sources/Kitura/LinkParameter.swift /Users/karl/Projects/Private/Backend/kiturabuildserver/.build/checkouts/Kitura.git-6522211175291160341/Sources/Kitura/staticFileServer/CacheRelatedHeadersSetter.swift /Users/karl/Projects/Private/Backend/kiturabuildserver/.build/checkouts/Kitura.git-6522211175291160341/Sources/Kitura/staticFileServer/ResponseHeadersSetter.swift /Users/karl/Projects/Private/Backend/kiturabuildserver/.build/checkouts/Kitura.git-6522211175291160341/Sources/Kitura/staticFileServer/CompositeHeadersSetter.swift /Users/karl/Projects/Private/Backend/kiturabuildserver/.build/checkouts/Kitura.git-6522211175291160341/Sources/Kitura/Router.swift /Users/karl/Projects/Private/Backend/kiturabuildserver/.build/checkouts/Kitura.git-6522211175291160341/Sources/Kitura/FileResourceServer.swift /Users/karl/Projects/Private/Backend/kiturabuildserver/.build/checkouts/Kitura.git-6522211175291160341/Sources/Kitura/staticFileServer/FileServer.swift /Users/karl/Projects/Private/Backend/kiturabuildserver/.build/checkouts/Kitura.git-6522211175291160341/Sources/Kitura/staticFileServer/StaticFileServer.swift /Users/karl/Projects/Private/Backend/kiturabuildserver/.build/checkouts/Kitura.git-6522211175291160341/Sources/Kitura/RouterHTTPVerbs+Error.swift /Users/karl/Projects/Private/Backend/kiturabuildserver/.build/checkouts/Kitura.git-6522211175291160341/Sources/Kitura/Error.swift /Users/karl/Projects/Private/Backend/kiturabuildserver/.build/checkouts/Kitura.git-6522211175291160341/Sources/Kitura/JSONPError.swift /Users/karl/Projects/Private/Backend/kiturabuildserver/.build/checkouts/Kitura.git-6522211175291160341/Sources/Kitura/TemplatingError.swift /Users/karl/Projects/Private/Backend/kiturabuildserver/.build/checkouts/Kitura.git-6522211175291160341/Sources/Kitura/InternalError.swift /Users/karl/Projects/Private/Backend/kiturabuildserver/.build/checkouts/Kitura.git-6522211175291160341/Sources/Kitura/RouterMiddlewareGenerator.swift /Users/karl/Projects/Private/Backend/kiturabuildserver/.build/checkouts/Kitura.git-6522211175291160341/Sources/Kitura/MimeTypeAcceptor.swift /Users/karl/Projects/Private/Backend/kiturabuildserver/.build/checkouts/Kitura.git-6522211175291160341/Sources/Kitura/contentType/types.swift /Users/karl/Projects/Private/Backend/kiturabuildserver/.build/checkouts/Kitura.git-6522211175291160341/Sources/Kitura/String+Extensions.swift /Users/karl/Projects/Private/Backend/kiturabuildserver/.build/checkouts/Kitura.git-6522211175291160341/Sources/Kitura/Headers.swift /Users/karl/Projects/Private/Backend/kiturabuildserver/.build/checkouts/Kitura.git-6522211175291160341/Sources/Kitura/RouterElement.swift /Users/karl/Projects/Private/Backend/kiturabuildserver/.build/checkouts/Kitura.git-6522211175291160341/Sources/Kitura/bodyParser/Part.swift /Users/karl/Projects/Private/Backend/kiturabuildserver/.build/checkouts/Kitura.git-6522211175291160341/Sources/Kitura/RouterRequest.swift /Users/karl/Projects/Private/Backend/kiturabuildserver/.build/checkouts/Kitura.git-6522211175291160341/Sources/Kitura/RouteRegex.swift /Users/karl/Projects/Private/Backend/kiturabuildserver/.build/checkouts/Kitura.git-6522211175291160341/Sources/Kitura/bodyParser/ParsedBody.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/ObjectiveC.apinotesc /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/Foundation.apinotesc /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/CoreGraphics.apinotesc /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/CoreText.apinotesc /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/ObjectiveC.swiftmodule /Users/karl/Projects/Private/Backend/kiturabuildserver/.build/debug/LoggerAPI.swiftmodule /Users/karl/Projects/Private/Backend/kiturabuildserver/.build/debug/SwiftyJSON.swiftmodule /Users/karl/Projects/Private/Backend/kiturabuildserver/.build/debug/SSLService.swiftmodule /Users/karl/Projects/Private/Backend/kiturabuildserver/.build/debug/KituraTemplateEngine.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/CoreGraphics.swiftmodule /Users/karl/Projects/Private/Backend/kiturabuildserver/.build/debug/KituraNet.swiftmodule /Users/karl/Projects/Private/Backend/kiturabuildserver/.build/debug/Socket.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/karl/Projects/Private/Backend/kiturabuildserver/.build/checkouts/Kitura-net.git--7410958935072501107/Sources/CHTTPParser/include/CHTTPParser.h /Users/karl/Projects/Private/Backend/kiturabuildserver/.build/checkouts/Kitura-net.git--7410958935072501107/Sources/CHTTPParser/include/http_parser.h /Users/karl/Projects/Private/Backend/kiturabuildserver/.build/checkouts/Kitura-net.git--7410958935072501107/Sources/CHTTPParser/include/utils.h /Users/karl/Projects/Private/Backend/kiturabuildserver/.build/checkouts/CCurl.git-8026296523752779197/module.modulemap /Users/karl/Projects/Private/Backend/kiturabuildserver/.build/debug/CHTTPParser.build/module.modulemap
D
a cultural unit (an idea or value or pattern of behavior) that is passed from one person to another by non-genetic means (as by imitation
D
/Users/Khanh/vapor/TILApp/.build/x86_64-apple-macosx10.10/debug/Command.build/Run/Output+Autocomplete.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/Output+Autocomplete~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/Output+Autocomplete~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
var int Brahim_ItemsGiven_Chapter_1; var int Brahim_ItemsGiven_Chapter_2; var int Brahim_ItemsGiven_Chapter_3; var int Brahim_ItemsGiven_Chapter_4; var int Brahim_ItemsGiven_Chapter_5; func void B_GiveTradeInv_Brahim(var C_Npc slf) { if((Kapitel >= 1) && (Brahim_ItemsGiven_Chapter_1 == FALSE)) { CreateInvItems(slf,ItMi_Gold,50); CreateInvItems(slf,ItWr_Map_NewWorld,1); CreateInvItems(slf,ItWr_Map_NewWorld_City,2); Brahim_ItemsGiven_Chapter_1 = TRUE; }; if((Kapitel >= 2) && (Brahim_ItemsGiven_Chapter_2 == FALSE)) { CreateInvItems(slf,ItMi_Gold,50); CreateInvItems(slf,ItWr_Map_Shrine_MIS,1); CreateInvItems(slf,ItWr_Map_NewWorld,1); Brahim_ItemsGiven_Chapter_2 = TRUE; }; if((Kapitel >= 3) && (Brahim_ItemsGiven_Chapter_3 == FALSE)) { CreateInvItems(slf,ItWr_ShatteredGolem_MIS,1); CreateInvItems(slf,ItWr_Map_NewWorld,1); CreateInvItems(slf,ItWr_Map_OldWorld,1); CreateInvItems(slf,ItMi_Gold,50); Brahim_ItemsGiven_Chapter_3 = TRUE; }; if((Kapitel >= 4) && (Brahim_ItemsGiven_Chapter_4 == FALSE)) { CreateInvItems(slf,ItMi_Gold,100); CreateInvItems(slf,ItWr_Map_Caves_MIS,1); Brahim_ItemsGiven_Chapter_4 = TRUE; }; if((Kapitel >= 5) && (Brahim_ItemsGiven_Chapter_5 == FALSE)) { CreateInvItems(slf,ItMi_Gold,100); Brahim_ItemsGiven_Chapter_5 = TRUE; }; };
D
// REQUIRED_ARGS: -c -o- /* TEST_OUTPUT: --- fail_compilation/gag4269b.d(10): Error: undefined identifier Y --- */ static if(is(typeof(X2.init))) {} struct X2 { Y y; }
D
/** Aedi, a dependency injection library. Aedi is a dependency injection library. It does provide a set of containers that do IoC, and an interface to configure application components (structs, objects, etc.) Aim: The aim of library is to provide a dependency injection solution that is feature rich, easy to use, easy to learn, and easy to extend up to your needs. Usage: This tutorial will show how to register a component with custom identity in container, and how to reference components with custom identities. The tutorial is based on car simulation presented in previous example, and will continue to improve it. Except of a single implementation of a component, in some occurrences of an application, multiple instances of same type of component, but with varying dependencies, are required. In case of car simulation application, the simulator should not be limited to only a single car, it should be able to have multiple cars with varying parameters, like cars of sedan or smart sizes with blue and green colors. Previous section showed how to register only one version for each component including the car itself. Attempting to add another car to container like in example below, will fail due to simple problem: Both cars are identified in container by their type. ----------------- register!Car .construct(lref!Size) .set!"color"(lref!Color); register!Car .construct(lref!Size) .set!"color"(Color(0, 0, 0)); ----------------- Running in modified container configuration in context of previous tutorial's example will end in output from below, were last registered instance of Car component overrides the previously defined. ----------------- You bought a new car with following specs: Size: Size(200, 150, 500) Color: Color(0, 0, 0) ----------------- Each registered component in a container is associated with an identity in it. In case with car for previous examples, the Car component is associated with identity representing it’s Type. To avoid associating a component by it’s type during registration, pass it’s identity as an argument to $(D_INLINECODE register) method, like in example below. A component can also be associated with an interface it implements by inserting desired interface before the type of registered component. ----------------- with (container.configure) { register!Color("color.green") // Register "green" color into container. .set!"r"(cast(ubyte) 0) .set!"g"(cast(ubyte) 255) .set!"b"(cast(ubyte) 0); register!Color("color.blue") // Register "blue" color into container. .set!"r"(cast(ubyte) 0) .set!"g"(cast(ubyte) 0) .set!"b"(cast(ubyte) 255); register!Size("size.sedan") // Register a size of a generic "sedan" into container .set!"width"(200UL) .set!"height"(150UL) .set!"length"(500UL); register!Size("size.smart_car") // Register a size of a generic smart car into container .set!"width"(200UL) .set!"height"(150UL) .set!"length"(300UL); register!Car("sedan.green") // Register a car with sedan sizes and of green color. .construct("size.sedan".lref) .set!"color"("color.green".lref); register!Car("smarty.blue") // Register a car with smart car sizes and of a blue color. .construct("size.smart_car".lref) .set!"color"("color.blue".lref); register!Car("sedan.blue") // Register a car with sedan car sizes and of a blue color. .construct("size.sedan".lref) .set!"color"("color.blue".lref); } ----------------- To reference a component that has custom identity, in a configuration or reliant component, use $(D_INLINECODE lref("custom-associated-identity")) notation. Seeing this type of reference, framework will attempt to search component by this identity, and serve it to component that is in con- struction. Thanks to unified function call syntax (UFCS) available in D programming language, lref("custom-associated-identity") can be rewritten into a more pleasant view $(D_INLINECODE "custom-associated-identity".lref). To extract manually a component with custom identity pass the identity to $(D_INLINECODE locate) method as first argument, along with type of component. Running fixed version of configuration, will yield in printing all three cars from code above into stdout in output below. To be sure that all modifications done in this tutorial are working, run the application to see following output: ----------------- You bough a new car sedan green with following specs: Size: Size(200, 150, 500) Color: Color(0, 255, 0) You bough a new car sedan blue with following specs: Size: Size(200, 150, 500) Color: Color(0, 0, 255) You bough a new car smarty blue with following specs: Size: Size(200, 150, 300) Color: Color(0, 0, 255) ----------------- Check example below. Play with it, to get the gist of named components. License: 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. Authors: aermicioi **/ module named_dependencies; import aermicioi.aedi; import std.stdio; /** A struct that should be managed by container. **/ struct Color { ubyte r; ubyte g; ubyte b; } /** Size of a car. **/ struct Size { ulong width; ulong height; ulong length; } /** A class representing a car. **/ class Car { private { Color color_; // Car color Size size_; // Car size } public { /** Constructor of car. Constructs a car with a set of sizes. A car cannot of course have undefined sizes, so we should provide it during construction. Params: size = size of a car. **/ this(Size size) { this.size_ = size; } @property { /** Set color of car Set color of car. A car can live with undefined color (physics allow it). Params: color = color of a car. Returns: Car **/ Car color(Color color) @safe nothrow { this.color_ = color; return this; } Color color() @safe nothrow { return this.color_; } Size size() @safe nothrow { return this.size_; } } } } void print(Car car, string name) { writeln("You bought a new car ", name," with following specs:"); writeln("Size:\t", car.size()); writeln("Color:\t", car.color()); } void main() { SingletonContainer container = singleton(); // Creating container that will manage a color scope(exit) container.terminate(); with (container.configure) { register!Color("color.green") // Register "green" color into container. .set!"r"(cast(ubyte) 0) .set!"g"(cast(ubyte) 255) .set!"b"(cast(ubyte) 0); register!Color("color.blue") // Register "blue" color into container. .set!"r"(cast(ubyte) 0) .set!"g"(cast(ubyte) 0) .set!"b"(cast(ubyte) 255); register!Size("size.sedan") // Register a size of a generic "sedan" into container .set!"width"(200UL) .set!"height"(150UL) .set!"length"(500UL); register!Size("size.smart_car") // Register a size of a generic smart car into container .set!"width"(200UL) .set!"height"(150UL) .set!"length"(300UL); register!Car("sedan.green") // Register a car with sedan sizes and of green color. .construct("size.sedan".lref) .set!"color"("color.green".lref); register!Car("smarty.blue") // Register a car with smart car sizes and of a blue color. .construct("size.smart_car".lref) .set!"color"("color.blue".lref); register!Car("sedan.blue") // Register a car with sedan car sizes and of a blue color. .construct("size.sedan".lref) .set!"color"("color.blue".lref); } container.instantiate(); // Boot container (or prepare managed code/data). container.locate!Car("sedan.green").print("sedan green"); container.locate!Car("sedan.blue").print("sedan blue"); container.locate!Car("smarty.blue").print("smarty blue"); }
D
/home/syed/Desktop/practice/quater3/hello world from rocket/target/debug/deps/aes-014f404b6991da2b.rmeta: /home/syed/.cargo/registry/src/github.com-1ecc6299db9ec823/aes-0.3.2/src/lib.rs /home/syed/Desktop/practice/quater3/hello world from rocket/target/debug/deps/libaes-014f404b6991da2b.rlib: /home/syed/.cargo/registry/src/github.com-1ecc6299db9ec823/aes-0.3.2/src/lib.rs /home/syed/Desktop/practice/quater3/hello world from rocket/target/debug/deps/aes-014f404b6991da2b.d: /home/syed/.cargo/registry/src/github.com-1ecc6299db9ec823/aes-0.3.2/src/lib.rs /home/syed/.cargo/registry/src/github.com-1ecc6299db9ec823/aes-0.3.2/src/lib.rs:
D
instance KDW_1400_Addon_Saturas_NW(Npc_Default) { name[0] = "Saturas"; guild = GIL_KDW; id = 1400; voice = 14; flags = 0; npcType = npctype_main; aivar[93] = TRUE; aivar[AIV_IgnoresFakeGuild] = TRUE; aivar[AIV_IgnoresArmor] = TRUE; B_SetAttributesToChapter(self,5); fight_tactic = FAI_HUMAN_MASTER; B_CreateAmbientInv(self); B_SetNpcVisual(self,MALE,"Hum_Head_Bald",Face_B_Saturas,BodyTex_B,ItAr_KDW_H_NPC); Mdl_SetModelFatness(self,0); Mdl_ApplyOverlayMds(self,"Humans_Mage.mds"); B_GiveNpcTalents(self); B_SetFightSkills(self,30); bodyStateInterruptableOverride = TRUE; EquipItem(self,ItMW_Addon_Stab02_NPC); aivar[AIV_MagicUser] = MAGIC_ALWAYS; daily_routine = Rtn_Start_1400; }; func void Rtn_Start_1400() { TA_Study_WP(8,0,20,0,"NW_TROLLAREA_PORTALTEMPEL_STUDY_01"); TA_Study_WP(20,0,8,0,"NW_TROLLAREA_PORTALTEMPEL_STUDY_01"); }; func void Rtn_Ringritual_1400() { TA_Circle(8,0,20,0,"NW_TROLLAREA_PORTALTEMPEL_RITUAL_01"); TA_Circle(20,0,8,0,"NW_TROLLAREA_PORTALTEMPEL_RITUAL_01"); }; func void Rtn_PreRingritual_1400() { TA_Study_WP(8,0,20,0,"NW_TROLLAREA_PORTALTEMPEL_RITUAL_01"); TA_Study_WP(20,0,8,0,"NW_TROLLAREA_PORTALTEMPEL_RITUAL_01"); }; func void Rtn_OpenPortal_1400() { TA_Study_WP(8,0,20,0,"NW_TROLLAREA_PORTAL_KDWWAIT_01"); TA_Study_WP(20,0,8,0,"NW_TROLLAREA_PORTAL_KDWWAIT_01"); }; func void Rtn_TOT_1400() { TA_Stand_ArmsCrossed(8,0,20,0,"TOT"); TA_Stand_ArmsCrossed(20,0,8,0,"TOT"); }; func void Rtn_TOTNW_1400() { TA_Stand_ArmsCrossed(8,0,20,0,"TOT_NW"); TA_Stand_ArmsCrossed(20,0,8,0,"TOT_NW"); }; func void rtn_campon_1400() { TA_Stand_ArmsCrossed(9,0,23,0,"NW_BIGFARM_CAMPON_KDW_01"); TA_Stand_ArmsCrossed(23,0,9,0,"NW_BIGFARM_CAMPON_KDW_01"); }; func void rtn_inbattle_1400() { ta_bigfight(8,0,22,0,"NW_BIGFIGHT_8692"); ta_bigfight(22,0,8,0,"NW_BIGFIGHT_8692"); }; func void rtn_fleefrombattle_1400() { TA_FleeToWp(8,0,22,0,"NW_BIGFARM_PATH_04"); TA_FleeToWp(22,0,8,0,"NW_BIGFARM_PATH_04"); }; func void rtn_monastery_1400() { TA_Stand_ArmsCrossed(9,0,23,0,"NW_MONASTERY_WTMG_01"); TA_Stand_ArmsCrossed(23,0,9,0,"NW_MONASTERY_WTMG_01"); };
D
var i := 1; while i <= 9 loop i := i + 1; print i; end; var j; for j in 1 .. 3 * 3 loop j := j - 1; print j; end;
D
instance TPL_1440_TEMPLER(NPC_DEFAULT) { name[0] = NAME_TEMPLER; npctype = NPCTYPE_GUARD; guild = GIL_TPL; level = 17; flags = 0; voice = 13; id = 1440; attribute[ATR_STRENGTH] = 85; attribute[ATR_DEXTERITY] = 65; attribute[ATR_MANA_MAX] = 0; attribute[ATR_MANA] = 0; attribute[ATR_HITPOINTS_MAX] = 244; attribute[ATR_HITPOINTS] = 244; Mdl_SetVisual(self,"HUMANS.MDS"); Mdl_ApplyOverlayMds(self,"Humans_Mage.mds"); Mdl_SetVisualBody(self,"hum_body_Naked0",1,1,"Hum_Head_Psionic",64,1,tpl_armor_m); b_scale(self); Mdl_SetModelFatness(self,-1); fight_tactic = FAI_HUMAN_STRONG; Npc_SetTalentSkill(self,NPC_TALENT_2H,1); EquipItem(self,itmw_2h_sword_light_01); CreateInvItem(self,itfosoup); CreateInvItem(self,itmijoint_1); daily_routine = rtn_start_1440; }; func void rtn_start_1440() { ta_smalltalk(6,0,14,0,"PSI_SWAMP_MOVEMENT"); ta_smalltalk(14,0,6,0,"OW_OM_ENTRANCE02"); }; func void rtn_gc_1440() { ta_smalltalk(6,0,14,0,"PSI_SWAMP_MOVEMENT"); ta_smalltalk(14,0,6,0,"PSI_SWAMP_MOVEMENT"); };
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 dropExactly))) $(TD Creates the _range that results from discarding exactly $(I n) of the first elements from the given _range. )) $(TR $(TD $(D $(LREF dropOne))) $(TD Creates the _range that results from discarding the first 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. )) $(TR $(TD $(D $(LREF only))) $(TD Creates a _range that iterates over the given arguments. )) ) 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. )) $(TR $(TD $(D $(LREF RefRange))) $(TD Wrapper around a forward _range that gives it reference semantics. )) ) 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 $(LINK2 std_algorithm.html#sort, $(D 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 up to $(I n) elements. )) $(TR $(TD $(D $(LREF popBackN))) $(TD Advances a given bidirectional _range from the right by up to $(I n) elements. )) $(TR $(TD $(D $(LREF popFrontExactly))) $(TD Advances a given _range by up exactly $(I n) elements. )) $(TR $(TD $(D $(LREF popBackExactly))) $(TD Advances a given bidirectional _range from the right by exactly $(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 std.algorithm : copy, count, equal, filter, filterBidirectional, findSplitBefore, group, isSorted, joiner, move, map, max, min, sort, swap, until; import std.traits; import std.typecons : Tuple, tuple; import std.typetuple : allSatisfy, staticMap, 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 { 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) { 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 } /+ puts the whole raw element $(D t) into $(D r). doPut will not attempt to iterate, slice or transcode $(D t) in any way shape or form. It will $(B only) call the correct primitive ($(D r.put(t)), $(D r.front = t) or $(D r(0)) once. This can be important when $(D t) needs to be placed in $(D r) unchanged. Furthermore, it can be useful when working with $(D InputRange)s, as doPut guarantees that no more than a single element will be placed. +/ package void doPut(R, E)(ref R r, auto ref E e) { static if(is(PointerTarget!R == struct)) enum usingPut = hasMember!(PointerTarget!R, "put"); else enum usingPut = hasMember!(R, "put"); static if (usingPut) { static assert(is(typeof(r.put(e))), format("Cannot nativaly put a %s into a %s.", E.stringof, R.stringof)); r.put(e); } else static if (isInputRange!R) { static assert(is(typeof(r.front = e)), format("Cannot nativaly put a %s into a %s.", E.stringof, R.stringof)); r.front = e; r.popFront(); } else { static assert(is(typeof(r(e))), format("Cannot nativaly put a %s into a %s.", E.stringof, R.stringof)); r(e); } } unittest { static assert (!isNativeOutputRange!(int, int)); static assert ( isNativeOutputRange!(int[], int)); static assert (!isNativeOutputRange!(int[][], int)); static assert (!isNativeOutputRange!(int, int[])); static assert (!isNativeOutputRange!(int[], int[])); static assert ( isNativeOutputRange!(int[][], int[])); static assert (!isNativeOutputRange!(int, int[][])); static assert (!isNativeOutputRange!(int[], int[][])); static assert (!isNativeOutputRange!(int[][], int[][])); static assert (!isNativeOutputRange!(int[4], int)); static assert ( isNativeOutputRange!(int[4][], int)); //Scary! static assert ( isNativeOutputRange!(int[4][], int[4])); static assert (!isNativeOutputRange!( char[], char)); static assert (!isNativeOutputRange!( char[], dchar)); static assert ( isNativeOutputRange!(dchar[], char)); static assert ( isNativeOutputRange!(dchar[], dchar)); } /++ 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. In this table "doPut" is a method that places $(D e) into $(D r), using the correct primitive: $(D r.put(e)) if $(D R) defines $(D put), $(D r.front = e) if $(D r) is an input range (followed by $(D r.popFront())), or $(D r(e)) otherwise. $(BOOKTABLE , $(TR $(TH Code Snippet) $(TH Scenario) ) $(TR $(TD $(D r.doPut(e);)) $(TD $(D R) specifically accepts an $(D E).) ) $(TR $(TD $(D r.doPut([ e ]);)) $(TD $(D R) specifically accepts an $(D E[]).) ) $(TR $(TD $(D r.putChar(e);)) $(TD $(D R) accepts some form of string or character. put will transcode the character $(D e) accordingly.) ) $(TR $(TD $(D for (; !e.empty; e.popFront()) put(r, e.front);)) $(TD Copying range $(D E) into $(D R).) ) ) Tip: $(D put) should $(I not) be used "UFCS-style", eg $(D r.put(e)). Doing this may call $(D R.put) directly, by-passing any transformation feature provided by $(D Range.put). $(D put(r, e)) is prefered. +/ void put(R, E)(ref R r, E e) { @property ref E[] EArrayInit(); //@@@9186@@@: Can't use (E[]).init //First level: simply straight up put. static if (is(typeof(doPut(r, e)))) { doPut(r, e); } //Optional optimization block for straight up array to array copy. else static if (isDynamicArray!R && !isNarrowString!R && isDynamicArray!E && is(typeof(r[] = e[]))) { immutable len = e.length; r[0 .. len] = e[]; r = r[len .. $]; } //Accepts E[] ? else static if (is(typeof(doPut(r, [e]))) && !isDynamicArray!R) { if (__ctfe) doPut(r, [e]); else doPut(r, (&e)[0..1]); } //special case for char to string. else static if (isSomeChar!E && is(typeof(putChar(r, e)))) { putChar(r, e); } //Extract each element from the range //We can use "put" here, so we can recursively test a RoR of E. else static if (isInputRange!E && is(typeof(put(r, e.front)))) { //Special optimization: If E is a narrow string, and r accepts characters no-wider than the string's //Then simply feed the characters 1 by 1. static if (isNarrowString!E && ( (is(E : const char[]) && is(typeof(doPut(r, char.max))) && !is(typeof(doPut(r, dchar.max))) && !is(typeof(doPut(r, wchar.max)))) || (is(E : const wchar[]) && is(typeof(doPut(r, wchar.max))) && !is(typeof(doPut(r, dchar.max)))) ) ) { foreach(c; e) doPut(r, c); } else { for (; !e.empty; e.popFront()) put(r, e.front); } } else static assert (false, format("Cannot put a %s into a %s.", E.stringof, R.stringof)); } //Helper function to handle chars as quickly and as elegantly as possible //Assumes r.put(e)/r(e) has already been tested private void putChar(R, E)(ref R r, E e) if (isSomeChar!E) { ////@@@9186@@@: Can't use (E[]).init ref const( char)[] cstringInit(); ref const(wchar)[] wstringInit(); ref const(dchar)[] dstringInit(); enum csCond = !isDynamicArray!R && is(typeof(doPut(r, cstringInit()))); enum wsCond = !isDynamicArray!R && is(typeof(doPut(r, wstringInit()))); enum dsCond = !isDynamicArray!R && is(typeof(doPut(r, dstringInit()))); //Use "max" to avoid static type demotion enum ccCond = is(typeof(doPut(r, char.max))); enum wcCond = is(typeof(doPut(r, wchar.max))); //enum dcCond = is(typeof(doPut(r, dchar.max))); //Fast transform a narrow char into a wider string static if ((wsCond && E.sizeof < wchar.sizeof) || (dsCond && E.sizeof < dchar.sizeof)) { enum w = wsCond && E.sizeof < wchar.sizeof; Select!(w, wchar, dchar) c = e; if (__ctfe) doPut(r, [c]); else doPut(r, (&c)[0..1]); } //Encode a wide char into a narrower string else static if (wsCond || csCond) { import std.utf; /+static+/ Select!(wsCond, wchar[2], char[4]) buf; //static prevents purity. doPut(r, buf.ptr[0 .. encode(buf, e)]); //the word ".ptr" added to enforce un-safety. } //Slowly encode a wide char into a series of narrower chars else static if (wcCond || ccCond) { import std.encoding; alias C = Select!(wcCond, wchar, char); encode!(C, R)(e, r); } else static assert (false, format("Cannot put a %s into a %s.", E.stringof, R.stringof)); } pure unittest { auto f = delegate (const(char)[]) {}; putChar(f, cast(dchar)'a'); } 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 { int[][] a; int[] b; int c; static assert( __traits(compiles, put(b, c))); static assert( __traits(compiles, put(a, b))); static assert(!__traits(compiles, put(a, c))); } unittest { int[][] a = new int[][](3); int[] b = [1]; auto aa = a; put(aa, b); assert(aa == [[], []]); assert(a == [[1], [], []]); int[][3] c = [2]; aa = a; put(aa, c[]); assert(aa.empty); assert(a == [[2], [2], [2]]); } 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); } unittest { import std.conv : to; static struct PutC(C) { string result; void put(const(C) c) { result ~= to!string((&c)[0..1]); } } static struct PutS(C) { string result; void put(const(C)[] s) { result ~= to!string(s); } } static struct PutSS(C) { string result; void put(const(C)[][] ss) { foreach(s; ss) result ~= to!string(s); } } PutS!char p; putChar(p, cast(dchar)'a'); //Source Char foreach (SC; TypeTuple!(char, wchar, dchar)) { SC ch = 'I'; dchar dh = '♥'; immutable(SC)[] s = "日本語!"; immutable(SC)[][] ss = ["日本語", "が", "好き", "ですか", "?"]; //Target Char foreach (TC; TypeTuple!(char, wchar, dchar)) { //Testing PutC and PutS foreach (Type; TypeTuple!(PutC!TC, PutS!TC)) { Type type; auto sink = new Type(); //Testing put and sink foreach (value ; tuple(type, sink)) { put(value, ch); assert(value.result == "I"); put(value, dh); assert(value.result == "I♥"); put(value, s); assert(value.result == "I♥日本語!"); put(value, ss); assert(value.result == "I♥日本語!日本語が好きですか?"); } } } } } unittest { static struct CharRange { char c; enum empty = false; void popFront(){}; ref char front() @property { return c; } } CharRange c; put(c, cast(dchar)'H'); put(c, "hello"d); } unittest { // issue 9823 const(char)[] r; void delegate(const(char)[]) dg = (s) { r = s; }; put(dg, ["ABC"]); assert(r == "ABC"); } unittest { // issue 10571 import std.format; string buf; formattedWrite((in char[] s) { buf ~= s; }, "%s", "hello"); assert(buf == "hello"); } unittest { import std.format; struct PutC(C) { void put(C){} } struct PutS(C) { void put(const(C)[]){} } struct CallC(C) { void opCall(C){} } struct CallS(C) { void opCall(const(C)[]){} } struct FrontC(C) { enum empty = false; auto front()@property{return C.init;} void front(C)@property{} void popFront(){} } struct FrontS(C) { enum empty = false; auto front()@property{return C[].init;} void front(const(C)[])@property{} void popFront(){} } void foo() { foreach(C; TypeTuple!(char, wchar, dchar)) { formattedWrite((C c){}, "", 1, 'a', cast(wchar)'a', cast(dchar)'a', "a"c, "a"w, "a"d); formattedWrite((const(C)[]){}, "", 1, 'a', cast(wchar)'a', cast(dchar)'a', "a"c, "a"w, "a"d); formattedWrite(PutC!C(), "", 1, 'a', cast(wchar)'a', cast(dchar)'a', "a"c, "a"w, "a"d); formattedWrite(PutS!C(), "", 1, 'a', cast(wchar)'a', cast(dchar)'a', "a"c, "a"w, "a"d); CallC!C callC; CallS!C callS; formattedWrite(callC, "", 1, 'a', cast(wchar)'a', cast(dchar)'a', "a"c, "a"w, "a"d); formattedWrite(callS, "", 1, 'a', cast(wchar)'a', cast(dchar)'a', "a"c, "a"w, "a"d); formattedWrite(FrontC!C(), "", 1, 'a', cast(wchar)'a', cast(dchar)'a', "a"c, "a"w, "a"d); formattedWrite(FrontS!C(), "", 1, 'a', cast(wchar)'a', cast(dchar)'a', "a"c, "a"w, "a"d); } formattedWrite((dchar[]).init, "", 1, 'a', cast(wchar)'a', cast(dchar)'a', "a"c, "a"w, "a"d); } } /+ Returns $(D true) if $(D R) is a native output range for elements of type $(D E). An output range is defined functionally as a range that supports the operation $(D doPut(r, e)) as defined above. if $(D doPut(r, e)) is valid, then $(D put(r,e)) will have the same behavior. The two guarantees isNativeOutputRange gives over the larger $(D isOutputRange) are: 1: $(D e) is $(B exactly) what will be placed (not $(D [e]), for example). 2: if $(D E) is a non $(empty) $(D InputRange), then placing $(D e) is guaranteed to not overflow the range. +/ package template isNativeOutputRange(R, E) { enum bool isNativeOutputRange = is(typeof( (inout int = 0) { R r = void; E e; doPut(r, e); })); } // unittest { int[] r = new int[](4); static assert(isInputRange!(int[])); static assert( isNativeOutputRange!(int[], int)); static assert(!isNativeOutputRange!(int[], int[])); static assert( isOutputRange!(int[], int[])); if (!r.empty) put(r, 1); //guaranteed to succeed if (!r.empty) put(r, [1, 2]); //May actually error out. } /++ 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 = void; put(r, e); })); } unittest { import std.stdio : writeln; 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!(dchar[], string)); static assert( isOutputRange!(dchar[], wstring)); static assert( isOutputRange!(dchar[], dstring)); static assert(!isOutputRange!(const(int)[], int)); static assert(!isOutputRange!(inout(int)[], int)); } unittest { // 6973 static assert(isOutputRange!(OutputRange!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; static assert (is(typeof(r1.save) == R)); ---- 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; static assert (is(typeof(r1.save) == R)); })); } 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. ---- // range is finite and bidirectional or infinite and forward. static assert(isBidirectionalRange!R || isForwardRange!R && isInfinite!R); R r = void; auto e = r[1]; // can index static assert(is(typeof(e) == typeof(r.front))); // same type for indexed and front static assert(!isNarrowString!R); // narrow strings cannot be indexed as ranges static assert(hasLength!R || isInfinite!R); // must have length or be infinite // $ must work as it does with arrays if opIndex works with $ static if(is(typeof(r[$]))) { static assert(is(typeof(r.front) == typeof(r[$]))); // $ - 1 doesn't make sense with infinite ranges but needs to work // with finite ones. static if(!isInfinite!R) static assert(is(typeof(r.front) == typeof(r[$ - 1]))); } ---- 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); static if(is(typeof(r[$]))) { static assert(is(typeof(r.front) == typeof(r[$]))); static if(!isInfinite!R) static assert(is(typeof(r.front) == typeof(r[$ - 1]))); } })); } 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. */ 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). */ template ElementType(R) { static if (is(typeof(R.init.front.init) T)) alias T ElementType; else alias void ElementType; } /// unittest { // Standard arrays: returns the type of the elements of the array static assert(is(ElementType!(byte[]) == byte)); static assert(is(ElementType!(int[]) == int)); // Accessing .front retrieves the decoded dchar static assert(is(ElementType!(char[]) == dchar)); // rvalue static assert(is(ElementType!(wchar[]) == dchar)); // rvalue static assert(is(ElementType!(dchar[]) == dchar)); // lvalue // Ditto static assert(is(ElementType!(string) == dchar)); static assert(is(ElementType!(wstring) == dchar)); static assert(is(ElementType!(dstring) == immutable(dchar))); // For ranges it gets the type of .front. auto range = iota(0, 10); static assert(is(ElementType!(typeof(range)) == int)); } 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))); static assert(is(ElementType!(inout(int[])) == inout(int))); } unittest { static assert(is(ElementType!(int[5]) == int)); static assert(is(ElementType!(int[0]) == int)); static assert(is(ElementType!(char[5]) == dchar)); static assert(is(ElementType!(char[0]) == dchar)); } unittest //11336 { static struct S { this(this) @disable; } static assert(is(ElementType!(S[]) == S)); } unittest // 11401 { // ElementType should also work for non-@propety 'front' struct E { ushort id; } struct R { E front() { return E.init; } } static assert(is(ElementType!R == E)); } /** 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). */ template ElementEncodingType(R) { static if (isNarrowString!R) alias typeof(*lvalueOf!R.ptr) ElementEncodingType; else alias ElementType!R ElementEncodingType; } /// unittest { // internally the range stores the encoded type static assert(is(ElementEncodingType!(char[]) == char)); static assert(is(ElementEncodingType!(wchar[]) == wchar)); static assert(is(ElementEncodingType!(dchar[]) == dchar)); // ditto static assert(is(ElementEncodingType!(string) == immutable(char))); static assert(is(ElementEncodingType!(wstring) == immutable(wchar))); static assert(is(ElementEncodingType!(dstring) == immutable(dchar))); static assert(is(ElementEncodingType!(byte[]) == byte)); static assert(is(ElementEncodingType!(int[]) == int)); auto range = iota(0, 10); static assert(is(ElementEncodingType!(typeof(range)) == int)); } 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))); } unittest { static assert(is(ElementEncodingType!(int[5]) == int)); static assert(is(ElementEncodingType!(int[0]) == int)); static assert(is(ElementEncodingType!(char[5]) == char)); static assert(is(ElementEncodingType!(char[0]) == 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. */ 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))); // bugfix 6336 struct S { immutable int value; } static assert( isInputRange!(S[])); 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. */ 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 returns a forward range type. For finite ranges, the result of $(D opSlice) must be of the same type as the original range type. If the range defines $(D opDollar), then it must support subtraction. For infinite ranges, when $(I not) using $(D opDollar), the result of $(D opSlice) must be the result of $(LREF take) or $(LREF takeExactly) on the original range (they both return the same type for infinite ranges). However, when using $(D opDollar), the result of $(D opSlice) must be that of the original range type. The following code must compile for $(D hasSlicing) to be $(D true): ---- R r = void; static if(isInfinite!R) typeof(take(r, 1)) s = r[1 .. 2]; else { static assert(is(typeof(r[1 .. 2]) == R)); R s = r[1 .. 2]; } s = r[1 .. 2]; static if(is(typeof(r[0 .. $]))) { static assert(is(typeof(r[0 .. $]) == R)); R t = r[0 .. $]; t = r[0 .. $]; static if(!isInfinite!R) { static assert(is(typeof(r[0 .. $ - 1]) == R)); R u = r[0 .. $ - 1]; u = r[0 .. $ - 1]; } } static assert(isForwardRange!(typeof(r[1 .. 2]))); static assert(hasLength!(typeof(r[1 .. 2]))); ---- */ template hasSlicing(R) { enum bool hasSlicing = isForwardRange!R && !isNarrowString!R && is(typeof( (inout int = 0) { R r = void; static if(isInfinite!R) typeof(take(r, 1)) s = r[1 .. 2]; else { static assert(is(typeof(r[1 .. 2]) == R)); R s = r[1 .. 2]; } s = r[1 .. 2]; static if(is(typeof(r[0 .. $]))) { static assert(is(typeof(r[0 .. $]) == R)); R t = r[0 .. $]; t = r[0 .. $]; static if(!isInfinite!R) { static assert(is(typeof(r[0 .. $ - 1]) == R)); R u = r[0 .. $ - 1]; u = r[0 .. $ - 1]; } } static assert(isForwardRange!(typeof(r[1 .. 2]))); static assert(hasLength!(typeof(r[1 .. 2]))); })); } unittest { static assert( hasSlicing!(int[])); static assert( hasSlicing!(const(int)[])); static assert(!hasSlicing!(const int[])); static assert( hasSlicing!(inout(int)[])); static assert(!hasSlicing!(inout int [])); static assert( hasSlicing!(immutable(int)[])); static assert(!hasSlicing!(immutable int[])); static assert(!hasSlicing!string); static assert( hasSlicing!dstring); enum rangeFuncs = "@property int front();" ~ "void popFront();" ~ "@property bool empty();" ~ "@property auto save() { return this; }" ~ "@property size_t length();"; struct A { mixin(rangeFuncs); int opSlice(size_t, size_t); } struct B { mixin(rangeFuncs); B opSlice(size_t, size_t); } struct C { mixin(rangeFuncs); @disable this(); C opSlice(size_t, size_t); } struct D { mixin(rangeFuncs); int[] opSlice(size_t, size_t); } static assert(!hasSlicing!(A)); static assert( hasSlicing!(B)); static assert( hasSlicing!(C)); static assert(!hasSlicing!(D)); struct InfOnes { enum empty = false; void popFront() {} @property int front() { return 1; } @property InfOnes save() { return this; } auto opSlice(size_t i, size_t j) { return takeExactly(this, j - i); } auto opSlice(size_t i, Dollar d) { return this; } struct Dollar {} Dollar opDollar() const { return Dollar.init; } } static assert(hasSlicing!InfOnes); } /** 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; otherwise, moves by successive calls to $(D popFront). Applying stride twice to the same range results in a stride 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)) { import std.exception : enforce; 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)) && !is(CommonType!(staticMap!(ElementType, staticMap!(Unqual, Ranges))) == void)) { 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 R source; // TODO: use a vtable (or more) instead of linear iteration public: this(R input) { foreach (i, v; input) { source[i] = v; } } import std.typetuple : anySatisfy; 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 = this; foreach (i, Unused; R) { result.source[i] = result.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))); } } } } unittest { class Foo{} immutable(Foo)[] a; immutable(Foo)[] b; auto c = chain(a, b); } /** $(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 { import std.conv : to; 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 = this; foreach (i, Unused; Rs) { result.source[i] = result.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 { import std.conv : text; import std.exception : enforce; 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) && //take _cannot_ test hasSlicing on infinite ranges, because hasSlicing uses //take for slicing infinite ranges. !((!isInfinite!(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) { @property 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) && ((!isInfinite!(Unqual!R) && hasSlicing!(Unqual!R)) || is(R T == Take!T))) { alias R Take; } // take for finite ranges with slicing /// ditto Take!R take(R)(R input, size_t n) if (isInputRange!(Unqual!R) && !isInfinite!(Unqual!R) && hasSlicing!(Unqual!R)) { // @@@BUG@@@ //return input[0 .. min(n, $)]; return input[0 .. min(n, input.length)]; } // 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) && (isInfinite!(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])); //Test that take doesn't wrap the result of take. assert(take(t, 4) == take(dummy, 4)); } 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); } unittest { alias R1 = typeof(repeat(1)); alias R2 = typeof(cycle([1])); alias TR1 = Take!R1; alias TR2 = Take!R2; static assert(isBidirectionalRange!TR1); static assert(isBidirectionalRange!TR2); } /** 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). The result of $(D takeExactly) is identical to that of $(LREF take) in cases where the original range defines $(D length) or is infinite. */ auto takeExactly(R)(R range, size_t n) if (isInputRange!R) { static if (is(typeof(takeExactly(range._input, n)) == R)) { assert(n <= range._n, "Attempted to take more than the length of the range with takeExactly."); // takeExactly(takeExactly(r, n1), n2) has the same type as // takeExactly(r, n1) and simply returns takeExactly(r, n2) range._n = n; return range; } //Also covers hasSlicing!R for finite ranges. else static if (hasLength!R) { assert(n <= range.length, "Attempted to take more than the length of the range with takeExactly."); return take(range, n); } else static if (isInfinite!R) return Take!R(range, n); 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); } static if (hasMobileElements!R) { auto moveFront() { assert(!empty, "Attempting to move the front of an empty " ~ typeof(this).stringof); return .moveFront(_input); } } static if (hasAssignableElements!R) { @property auto ref front(ElementType!R v) { assert(!empty, "Attempting to assign to the front of an empty " ~ typeof(this).stringof); return _input.front = v; } } } return Result(range, 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, 3), [1, 2, 3])); //Test that take and takeExactly are the same for ranges which define length //but aren't sliceable. struct L { @property auto front() { return _arr[0]; } @property bool empty() { return _arr.empty; } void popFront() { _arr.popFront(); } @property size_t length() { return _arr.length; } int[] _arr; } static assert(is(typeof(take(L(a), 3)) == typeof(takeExactly(L(a), 3)))); assert(take(L(a), 3) == takeExactly(L(a), 3)); //Test that take and takeExactly are the same for ranges which are sliceable. static assert(is(typeof(take(a, 3)) == typeof(takeExactly(a, 3)))); assert(take(a, 3) == takeExactly(a, 3)); //Test that take and takeExactly are the same for infinite ranges. auto inf = repeat(1); static assert(is(typeof(take(inf, 5)) == Take!(typeof(inf)))); assert(take(inf, 5) == takeExactly(inf, 5)); //Test that take and takeExactly are _not_ the same for ranges which don't //define length. static assert(!is(typeof(take(filter!"true"(a), 3)) == typeof(takeExactly(filter!"true"(a), 3)))); foreach(DummyType; AllDummyRanges) { { DummyType dummy; auto t = takeExactly(dummy, 5); //Test that takeExactly doesn't wrap the result of takeExactly. assert(takeExactly(t, 4) == takeExactly(dummy, 4)); } static if(hasMobileElements!DummyType) { { auto t = takeExactly(DummyType.init, 4); assert(t.moveFront() == 1); assert(equal(t, [1, 2, 3, 4])); } } static if(hasAssignableElements!DummyType) { { auto t = takeExactly(DummyType.init, 4); t.front = 9; assert(equal(t, [9, 2, 3, 4])); } } } } /** 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 { 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()); @property auto save() { return this; } auto opSlice(size_t i, size_t j) { return typeof(this)(_arr[i .. j]); } @property size_t length() { return _arr.length; } 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()); @property auto save() { return new typeof(this)(_arr); } auto opSlice(size_t i, size_t j) { return new typeof(this)(_arr[i .. j]); } @property size_t length() { return _arr.length; } int[] _arr; } static class TakeNoneClass { this(int[] arr) { _arr = arr; } mixin(genInput()); auto takeNone() { return new typeof(this)(null); } int[] _arr; } import std.string : format; 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 range.$(LREF popFrontN)(n)) and returns $(D range). $(D drop) 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. $(D dropBack) provides the same functionality but instead calls $(D range.popBackN(n)). Note: $(D drop) and $(D dropBack) will only pop $(I up to) $(D n) elements but will stop if the range is empty first. Examples: -------------------- assert([0, 2, 1, 5, 0, 3].drop(3) == [5, 0, 3]); assert("hello world".drop(6) == "world"); assert("hello world".drop(50).empty); assert("hello world".take(6).drop(3).equal("lo ")); -------------------- -------------------- //Remove all but the first two elements auto a = DList!int(0, 1, 9, 9, 9); a.remove(a[].drop(2)); assert(a[].equal(a[].take(2))); -------------------- -------------------- 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".drop(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 drop(R)(R range, size_t n) if(isInputRange!R) { range.popFrontN(n); return range; } /// ditto 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].drop(3) == [5, 0, 3]); assert("hello world".drop(6) == "world"); assert("hello world".drop(50).empty); assert("hello world".take(6).drop(3).equal("lo ")); } unittest { import std.container : DList; //Remove all but the first two elements auto a = DList!int(0, 1, 9, 9, 9, 9); a.remove(a[].drop(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])); } 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".drop(4).dropBack(4).equal("o w")); } unittest { import std.container : DList; //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))); } /++ Similar to $(LREF drop) and $(D dropBack) but they call $(D range.$(LREF popFrontExactly)(n)) and $(D range.popBackExactly(n)) instead. Note: Unlike $(D drop), $(D dropExactly) will assume that the range holds at least $(D n) elements. This makes $(D dropExactly) faster than $(D drop), but it also means that if $(D range) does not contain at least $(D n) elements, it will attempt to call $(D popFront) on an empty range, which is undefined behavior. So, only use $(D popFrontExactly) when it is guaranteed that $(D range) holds at least $(D n) elements. +/ R dropExactly(R)(R range, size_t n) if(isInputRange!R) { popFrontExactly(range, n); return range; } /// ditto R dropBackExactly(R)(R range, size_t n) if(isBidirectionalRange!R) { popBackExactly(range, n); return range; } unittest { //RA+slicing auto a = [1, 2, 3]; assert(a.dropExactly(1) == [2, 3]); assert(a.dropBackExactly(1) == [1, 2]); //UTF string string s = "日本語"; assert(s.dropExactly(1) == "本語"); assert(s.dropBackExactly(1) == "日本"); //Bidirectional auto bd = filterBidirectional!"true"([1, 2, 3]); assert(bd.dropExactly(1).equal([2, 3])); assert(bd.dropBackExactly(1).equal([1, 2])); } /++ Convenience function which calls $(D range.popFront()) and returns $(D range). $(D dropOne) makes it easier to pop an element from a range and then pass it to another function within a single expression, whereas $(D popFront) would require multiple statements. $(D dropBackOne) provides the same functionality but instead calls $(D range.popBack()). Example: ---- auto dl = DList!int(9, 1, 2, 3, 9); assert(dl[].dropOne().dropBackOne().equal([1, 2, 3])); ---- +/ R dropOne(R)(R range) if (isInputRange!R) { range.popFront(); return range; } /// ditto R dropBackOne(R)(R range) if (isBidirectionalRange!R) { range.popBack(); return range; } unittest { import std.container : DList; auto dl = DList!int(9, 1, 2, 3, 9); assert(dl[].dropOne().dropBackOne().equal([1, 2, 3])); } unittest { //RA+slicing auto a = [1, 2, 3]; assert(a.dropOne() == [2, 3]); assert(a.dropBackOne() == [1, 2]); //UTF string string s = "日本語"; assert(s.dropOne() == "本語"); assert(s.dropBackOne() == "日本"); //Bidirectional auto bd = filterBidirectional!"true"([1, 2, 3]); assert(bd.dropOne().equal([2, 3])); assert(bd.dropBackOne().equal([1, 2])); } /** Eagerly advances $(D r) itself (not a copy) up to $(D n) times (by calling $(D r.popFront)). $(D popFrontN) takes $(D r) by $(D ref), so it mutates the original range. Completes in $(BIGOH 1) steps for ranges that support slicing and have length. Completes 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 at least $(D n) elements. $(D popBackN) will behave the same but instead removes elements from the back of the (bidirectional) range instead of the front. Example: ---- int[] a = [ 1, 2, 3, 4, 5 ]; a.popFrontN(2); assert(a == [ 3, 4, 5 ]); a.popFrontN(7); assert(a == [ ]); ---- ---- int[] a = [ 1, 2, 3, 4, 5 ]; a.popBackN(2); assert(a == [ 1, 2, 3 ]); a.popBackN(7); assert(a == [ ]); ---- */ size_t popFrontN(Range)(ref Range r, size_t n) if (isInputRange!Range) { static if (hasLength!Range) n = min(n, r.length); static if (hasSlicing!Range && is(typeof(r = r[n .. $]))) { r = r[n .. $]; } else static if (hasSlicing!Range && hasLength!Range) //TODO: Remove once hasSlicing forces opDollar. { r = r[n .. r.length]; } else { static if (hasLength!Range) { foreach (i; 0 .. n) r.popFront(); } else { foreach (i; 0 .. n) { if (r.empty) return i; r.popFront(); } } } return n; } /// ditto size_t popBackN(Range)(ref Range r, size_t n) if (isBidirectionalRange!Range) { static if (hasLength!Range) n = min(n, r.length); static if (hasSlicing!Range && is(typeof(r = r[0 .. $ - n]))) { r = r[0 .. $ - n]; } else static if (hasSlicing!Range && hasLength!Range) //TODO: Remove once hasSlicing forces opDollar. { r = r[0 .. r.length - n]; } else { static if (hasLength!Range) { 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.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); } 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); } /** Eagerly advances $(D r) itself (not a copy) exactly $(D n) times (by calling $(D r.popFront)). $(D popFrontExactly) takes $(D r) by $(D ref), so it mutates the original range. Completes in $(BIGOH 1) steps for ranges that support slicing, and have either length or are infinite. Completes in $(BIGOH n) time for all other ranges. Note: Unlike $(LREF popFrontN), $(D popFrontExactly) will assume that the range holds at least $(D n) elements. This makes $(D popFrontExactly) faster than $(D popFrontN), but it also means that if $(D range) does not contain at least $(D n) elements, it will attempt to call $(D popFront) on an empty range, which is undefined behavior. So, only use $(D popFrontExactly) when it is guaranteed that $(D range) holds at least $(D n) elements. $(D popBackExactly) will behave the same but instead removes elements from the back of the (bidirectional) range instead of the front. */ void popFrontExactly(Range)(ref Range r, size_t n) if (isInputRange!Range) { static if (hasLength!Range) assert(n <= r.length, "range is smaller than amount of items to pop"); static if (hasSlicing!Range && is(typeof(r = r[n .. $]))) r = r[n .. $]; else static if (hasSlicing!Range && hasLength!Range) //TODO: Remove once hasSlicing forces opDollar. r = r[n .. r.length]; else foreach (i; 0 .. n) r.popFront(); } /// ditto void popBackExactly(Range)(ref Range r, size_t n) if (isBidirectionalRange!Range) { static if (hasLength!Range) assert(n <= r.length, "range is smaller than amount of items to pop"); static if (hasSlicing!Range && is(typeof(r = r[0 .. $ - n]))) r = r[0 .. $ - n]; else static if (hasSlicing!Range && hasLength!Range) //TODO: Remove once hasSlicing forces opDollar. r = r[0 .. r.length - n]; else foreach (i; 0 .. n) r.popBack(); } unittest { //RA+slicing auto a = [1, 2, 3]; a.popFrontExactly(1); assert(a == [2, 3]); a.popBackExactly(1); assert(a == [2]); //UTF string string s = "日本語"; s.popFrontExactly(1); assert(s == "本語"); s.popBackExactly(1); assert(s == "本"); //Bidirectional auto bd = filterBidirectional!"true"([1, 2, 3]); bd.popFrontExactly(1); assert(bd.equal([2, 3])); bd.popBackExactly(1); assert(bd.equal([2])); } /** Repeats one value forever. Models an infinite bidirectional and random access range, with slicing. */ struct Repeat(T) { private T _value; @property inout(T) front() inout { return _value; } @property inout(T) back() inout { return _value; } enum bool empty = false; void popFront() {} void popBack() {} @property auto save() inout { return this; } inout(T) opIndex(size_t) inout { return _value; } auto opSlice(size_t i, size_t j) in { import core.exception : RangeError; if (i > j) throw new RangeError(); } body { return this.takeExactly(j - i); } private static struct DollarToken {} enum opDollar = DollarToken.init; auto opSlice(size_t, DollarToken) inout { return this; } } /// Ditto Repeat!T repeat(T)(T value) { return Repeat!T(value); } /// unittest { assert(equal(5.repeat().take(4), [ 5, 5, 5, 5 ])); } unittest { auto r = repeat(5); alias R = typeof(r); static assert(isBidirectionalRange!R); static assert(isForwardRange!R); static assert(isInfinite!R); static assert(hasSlicing!R); assert(r.back == 5); assert(r.front == 5); assert(r.take(4).equal([ 5, 5, 5, 5 ])); assert(r[0 .. 4].equal([ 5, 5, 5, 5 ])); R r2 = r[5 .. $]; } /** 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); } /// unittest { assert(equal(5.repeat(4), 5.repeat().take(4))); } /** 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) works with static arrays in addition to ranges, 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. */ struct Cycle(R) if (isForwardRange!R && !isInfinite!R) { static if (isRandomAccessRange!R && hasLength!R) { private R _original; private 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 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))) { auto 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() { //No need to call _original.save, because Cycle never actually modifies _original return Cycle(_original, _index); } private static struct DollarToken {} enum opDollar = DollarToken.init; auto opSlice(size_t i, size_t j) in { import core.exception : RangeError; if (i > j) throw new RangeError(); } body { return this[i .. $].takeExactly(j - i); } auto opSlice(size_t i, DollarToken) { return typeof(this)(_original, _index + i); } } else { private R _original; private 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 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() { //No need to call _original.save, because Cycle never actually modifies _original Cycle ret = this; ret._original = _original; ret._current = _current.save; return ret; } } } template Cycle(R) if (isInfinite!R) { alias Cycle = R; } struct Cycle(R) if (isStaticArray!R) { private alias ElementType = typeof(R.init[0]); private ElementType* _ptr; private size_t _index; nothrow: this(ref R input, size_t index = 0) { _ptr = input.ptr; _index = index; } @property 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 inout(Cycle) save() inout { return this; } private static struct DollarToken {} enum opDollar = DollarToken.init; auto opSlice(size_t i, size_t j) in { import core.exception : RangeError; if (i > j) throw new RangeError(); } body { return this[i .. $].takeExactly(j - i); } inout(typeof(this)) opSlice(size_t i, DollarToken) inout { return Cycle(*cast(R*)_ptr, _index + i); } } /// Ditto Cycle!R cycle(R)(R input) if (isForwardRange!R && !isInfinite!R) { return Cycle!R(input); } /// Ditto Cycle!R cycle(R)(R input, size_t index = 0) if (isRandomAccessRange!R && !isInfinite!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[]))); // Make sure ref is getting propagated properly. int[] nums = [1,2,3]; auto c2 = cycle(nums); c2[3]++; assert(nums[0] == 2); immutable int[] immarr = [1, 2, 3]; auto cycleimm = cycle(immarr); 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) { import core.exception : RangeError; import std.exception : assertThrown; { cy[10] = 66; scope(exit) cy[10] = 1; assert(dummy.front == 66); } assert(cRange[10] == 1); } } static if(hasSlicing!DummyType) { auto slice = cy[5 .. 15]; assert(equal(slice, [6, 7, 8, 9, 10, 1, 2, 3, 4, 5])); static assert(is(typeof(slice) == typeof(takeExactly(cy, 5)))); auto infSlice = cy[7 .. $]; assert(equal(take(infSlice, 5), [8, 9, 10, 1, 2])); static assert(isInfinite!(typeof(infSlice))); } } } } unittest // For static arrays. { 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))); // Test qualifiers on slicing. alias C = typeof(c); static assert(is(typeof(c[1 .. $]) == C)); const cConst = c; static assert(is(typeof(cConst[1 .. $]) == const(C))); } 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, Ranges)) { alias R = Ranges; 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() { import std.exception : enforce; 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[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 = this; foreach (i, Unused; R) { result.ranges[i] = result.ranges[i].save; } return result; } private void emplaceIfCan(T)(T* addr) { import std.conv : emplace; static if(__traits(compiles, emplace(addr))) emplace(addr); else throw new Exception("Range with non-default constructable elements exhausted."); } /** Returns the current iterated element. */ @property ElementType front() { import std.conv : emplace; ElementType result = void; foreach (i, Unused; R) { auto addr = cast(Unqual!(typeof(result[i]))*) &result[i]; if (ranges[i].empty) { emplaceIfCan(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() { import std.conv : emplace; 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 { emplaceIfCan(addr); } } return result; } } /** Returns the rightmost element. */ static if (allSatisfy!(isBidirectionalRange, R)) { @property ElementType back() { import std.conv : emplace; 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 { emplaceIfCan(addr); } } return result; } /** Moves out the back. */ static if (allSatisfy!(hasMobileElements, R)) { ElementType moveBack() { import std.conv : emplace; 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 { emplaceIfCan(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() { import std.exception : enforce; 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() { import std.exception : enforce; 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[i + 1].length, result); } else { assert(stoppingPolicy == StoppingPolicy.longest); result = max(ranges[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)) auto opSlice(size_t from, size_t to) { import std.conv : emplace; //Slicing an infinite range yields the type Take!R //For finite ranges, the type Take!R aliases to R Zip!(staticMap!(Take, R)) 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) { import std.conv : emplace; 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) { import std.conv : emplace; 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(Ranges...)(Ranges ranges) if (Ranges.length && allSatisfy!(isInputRange, Ranges)) { return Zip!Ranges(ranges); } /// Ditto auto zip(Ranges...)(StoppingPolicy sp, Ranges ranges) if (Ranges.length && allSatisfy!(isInputRange, Ranges)) { return Zip!Ranges(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 { import std.exception : assertThrown, assertNotThrown; 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); } // BUG 8900 static assert(__traits(compiles, zip([1, 2], repeat('a')))); static assert(__traits(compiles, zip(repeat('a'), [1, 2]))); // 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)])); } // Text for Issue 11196 unittest { import std.exception : assertThrown; static struct S { @disable this(); } static assert(__traits(compiles, zip((S[5]).init[]))); auto z = zip(StoppingPolicy.longest, cast(S[]) null, new int[1]); assertThrown(zip(StoppingPolicy.longest, cast(S[]) null, new int[1]).front); } /* Generate lockstep's opApply function as a mixin string. If withIndex is true prepend a size_t index to the delegate. */ private string lockstepMixin(Ranges...)(bool withIndex) { import std.string : format, outdent; string[] params; string[] emptyChecks; string[] dgArgs; string[] popFronts; if (withIndex) { params ~= "size_t"; dgArgs ~= "index"; } foreach (idx, Range; Ranges) { params ~= format("%sElementType!(Ranges[%s])", hasLvalueElements!Range ? "ref " : "", idx); emptyChecks ~= format("!ranges[%s].empty", idx); dgArgs ~= format("ranges[%s].front", idx); popFronts ~= format("ranges[%s].popFront();", idx); } return format( q{ int opApply(scope int delegate(%s) dg) { import std.exception : enforce; auto ranges = _ranges; int res; %s while (%s) { res = dg(%s); if (res) break; %s %s } if (_stoppingPolicy == StoppingPolicy.requireSameLength) { foreach(range; ranges) enforce(range.empty); } return res; } }, params.join(", "), withIndex ? "size_t index = 0;" : "", emptyChecks.join(" && "), dgArgs.join(", "), popFronts.join("\n "), withIndex ? "index++;" : "").outdent(); } /** 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, Ranges)) { this(R ranges, StoppingPolicy sp = StoppingPolicy.shortest) { import std.exception : enforce; _ranges = ranges; enforce(sp != StoppingPolicy.longest, "Can't use StoppingPolicy.Longest on Lockstep."); _stoppingPolicy = sp; } mixin(lockstepMixin!Ranges(false)); mixin(lockstepMixin!Ranges(true)); private: alias R = Ranges; R _ranges; StoppingPolicy _stoppingPolicy; } // For generic programming, make sure Lockstep!(Range) is well defined for a // single range. template Lockstep(Range) { alias Range Lockstep; } /// Ditto Lockstep!(Ranges) lockstep(Ranges...)(Ranges ranges) if (allSatisfy!(isInputRange, Ranges)) { return Lockstep!(Ranges)(ranges); } /// Ditto Lockstep!(Ranges) lockstep(Ranges...)(Ranges ranges, StoppingPolicy s) if (allSatisfy!(isInputRange, Ranges)) { static if (Ranges.length > 1) return Lockstep!Ranges(ranges, s); else return ranges[0]; } unittest { import std.conv : to; // 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)) {} // Regression 10468 foreach (x, y; lockstep(iota(0, 10), iota(0, 10))) { } } /** 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) { private import std.functional : binaryFun; 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: import std.functional : binaryFun; alias binaryFun!(fun, "a", "n") compute; alias typeof(compute(State.init, cast(size_t) 1)) ElementType; State _state; size_t _n; ElementType _cache; static struct DollarToken{} public: this(State initial, size_t n = 0) { _state = initial; _n = n; _cache = compute(_state, _n); } @property ElementType front() { return _cache; } ElementType moveFront() { return move(this._cache); } void popFront() { _cache = compute(_state, ++_n); } enum opDollar = DollarToken(); auto opSlice(size_t lower, size_t upper) in { assert(upper >= lower); } body { return typeof(this)(_state, _n + lower).take(upper - lower); } auto opSlice(size_t lower, DollarToken) { return typeof(this)(_state, _n + lower); } ElementType opIndex(size_t n) { return compute(_state, n + _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 assert(hasSlicing!(typeof(odds))); //Note: don't use drop or take as the target of an equal, //since they'll both just forward to opSlice, making the tests irrelevant // static slicing tests assert(equal(odds[0 .. 5], [1, 3, 5, 7, 9])); assert(equal(odds[3 .. 7], [7, 9, 11, 13])); // relative slicing test, testing slicing is NOT agnostic of state auto odds_less5 = odds.drop(5); //this should actually call odds[5 .. $] assert(equal(odds_less5[0 .. 3], [11, 13, 15])); assert(equal(odds_less5[0 .. 10], odds[5 .. 15])); //Infinite slicing tests odds = odds[10 .. $]; assert(equal(odds.take(3), [21, 23, 25])); } /** 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) { import std.conv : unsigned; alias CommonType!(Unqual!B, Unqual!E) Value; alias Unqual!S StepType; alias typeof(unsigned((end - begin) / step)) IndexType; static struct Result { private Value current, pastLast; private StepType step; this(Value current, Value pastLast, StepType step) { import std.exception : enforce; 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; } void popFront() { assert(!empty); current += step; } @property inout(Value) back() inout { assert(!empty); return pastLast - step; } 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))) { import std.conv : unsigned; 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; } void popFront() { assert(!empty); ++current; } @property inout(Value) back() inout { assert(!empty); return cast(inout(Value))(pastLast - 1); } 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 Unqual!(CommonType!(B, E, S)) Value; static struct Result { private Value start, step; private size_t index, count; this(Value start, Value end, Value step) { import std.conv : to; import std.exception : enforce; 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; } void popFront() { assert(!empty); ++index; } @property Value back() const { assert(!empty); return start + step * (count - 1); } 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 { import std.math : approxEqual, nextUp, nextDown; 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); // Issue 8920 foreach (Type; TypeTuple!(byte, ubyte, short, ushort, int, uint, long, ulong)) { Type val; foreach (i; iota(cast(Type)0, cast(Type)10)) { val++; } assert(val == 10); } } 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) { import std.exception : enforce; 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) { import std.exception : enforce; 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 a forward range. If $(D !isInfinite!Source) and $(D source.walkLength) 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 (isForwardRange!Source) { /// Standard constructor this(Source source, size_t chunkSize) { assert(chunkSize != 0, "Cannot create a Chunk with an empty chunkSize"); _source = source; _chunkSize = chunkSize; } /// Forward range primitives. Always present. @property auto front() { assert(!empty); return _source.save.take(_chunkSize); } /// Ditto void popFront() { assert(!empty); _source.popFrontN(_chunkSize); } static if (!isInfinite!Source) /// Ditto @property bool empty() { return _source.empty; } else // undocumented enum empty = false; /// Ditto @property typeof(this) save() { return typeof(this)(_source.save, _chunkSize); } static if (hasLength!Source) { /// Length. Only if $(D hasLength!Source) is $(D true) @property size_t length() { // Note: _source.length + _chunkSize may actually overflow. // We cast to ulong to mitigate the problem on x86 machines. // For x64 machines, we just suppose we'll never overflow. // The "safe" code would require either an extra branch, or a // modulo operation, which is too expensive for such a rare case return cast(size_t)((cast(ulong)(_source.length) + _chunkSize - 1) / _chunkSize); } //Note: No point in defining opDollar here without slicing. //opDollar is defined below in the hasSlicing!Source section } static if (hasSlicing!Source) { //Used for various purposes private enum hasSliceToEnd = is(typeof(Source.init[_chunkSize .. $]) == Source); /** Indexing and slicing operations. Provided only if $(D hasSlicing!Source) is $(D true). */ auto opIndex(size_t index) { immutable start = index * _chunkSize; immutable end = start + _chunkSize; static if (isInfinite!Source) return _source[start .. end]; else { immutable len = _source.length; assert(start < len, "chunks index out of bounds"); return _source[start .. min(end, len)]; } } /// Ditto static if (hasLength!Source) typeof(this) opSlice(size_t lower, size_t upper) { assert(lower <= upper && upper <= length, "chunks slicing index out of bounds"); immutable len = _source.length; return chunks(_source[min(lower * _chunkSize, len) .. min(upper * _chunkSize, len)], _chunkSize); } else static if (hasSliceToEnd) //For slicing an infinite chunk, we need to slice the source to the end. typeof(takeExactly(this, 0)) opSlice(size_t lower, size_t upper) { assert(lower <= upper, "chunks slicing index out of bounds"); return chunks(_source[lower * _chunkSize .. $], _chunkSize).takeExactly(upper - lower); } static if (isInfinite!Source) { static if (hasSliceToEnd) { private static struct DollarToken{} DollarToken opDollar() { return DollarToken(); } //Slice to dollar typeof(this) opSlice(size_t lower, DollarToken) { return typeof(this)(_source[lower * _chunkSize .. $], _chunkSize); } } } else { //Dollar token carries a static type, with no extra information. //It can lazily transform into _source.length on algorithmic //operations such as : chunks[$/2, $-1]; private static struct DollarToken { Chunks!Source* mom; @property size_t momLength() { return mom.length; } alias momLength this; } DollarToken opDollar() { return DollarToken(&this); } //Slice overloads optimized for using dollar. Without this, to slice to end, we would... //1. Evaluate chunks.length //2. Multiply by _chunksSize //3. To finally just compare it (with min) to the original length of source (!) //These overloads avoid that. typeof(this) opSlice(DollarToken, DollarToken) { static if (hasSliceToEnd) return chunks(_source[$ .. $], _chunkSize); else { immutable len = _source.length; return chunks(_source[len .. len], _chunkSize); } } typeof(this) opSlice(size_t lower, DollarToken) { assert(lower <= length, "chunks slicing index out of bounds"); static if (hasSliceToEnd) return chunks(_source[min(lower * _chunkSize, _source.length) .. $], _chunkSize); else { immutable len = _source.length; return chunks(_source[min(lower * _chunkSize, len) .. len], _chunkSize); } } typeof(this) opSlice(DollarToken, size_t upper) { assert(upper == length, "chunks slicing index out of bounds"); return this[$ .. $]; } } } //Bidirectional range primitives static if (hasSlicing!Source && hasLength!Source) { /** Bidirectional range primitives. Provided only if both $(D hasSlicing!Source) and $(D hasLength!Source) are $(D true). */ @property auto back() { assert(!empty, "back called on empty chunks"); immutable len = _source.length; immutable start = (len - 1) / _chunkSize * _chunkSize; return _source[start .. len]; } /// Ditto void popBack() { assert(!empty, "popBack() called on empty chunks"); immutable end = (_source.length - 1) / _chunkSize * _chunkSize; _source = _source[0 .. end]; } } private: Source _source; size_t _chunkSize; } /// Ditto Chunks!Source chunks(Source)(Source source, size_t chunkSize) if (isForwardRange!Source) { 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))); } unittest { //Extra toying with slicing and indexing. auto chunks1 = [0, 0, 1, 1, 2, 2, 3, 3, 4].chunks(2); auto chunks2 = [0, 0, 1, 1, 2, 2, 3, 3, 4, 4].chunks(2); assert (chunks1.length == 5); assert (chunks2.length == 5); assert (chunks1[4] == [4]); assert (chunks2[4] == [4, 4]); assert (chunks1.back == [4]); assert (chunks2.back == [4, 4]); assert (chunks1[0 .. 1].equal([[0, 0]])); assert (chunks1[0 .. 2].equal([[0, 0], [1, 1]])); assert (chunks1[4 .. 5].equal([[4]])); assert (chunks2[4 .. 5].equal([[4, 4]])); assert (chunks1[0 .. 0].equal((int[][]).init)); assert (chunks1[5 .. 5].equal((int[][]).init)); assert (chunks2[5 .. 5].equal((int[][]).init)); //Fun with opDollar assert (chunks1[$ .. $].equal((int[][]).init)); //Quick assert (chunks2[$ .. $].equal((int[][]).init)); //Quick assert (chunks1[$ - 1 .. $].equal([[4]])); //Semiquick assert (chunks2[$ - 1 .. $].equal([[4, 4]])); //Semiquick assert (chunks1[$ .. 5].equal((int[][]).init)); //Semiquick assert (chunks2[$ .. 5].equal((int[][]).init)); //Semiquick assert (chunks1[$ / 2 .. $ - 1].equal([[2, 2], [3, 3]])); //Slow } unittest { //ForwardRange auto r = filter!"true"([1, 2, 3, 4, 5]).chunks(2); assert(equal!"equal(a, b)"(r, [[1, 2], [3, 4], [5]])); //InfiniteRange w/o RA auto fibsByPairs = recurrence!"a[n-1] + a[n-2]"(1, 1).chunks(2); assert(equal!`equal(a, b)`(fibsByPairs.take(2), [[ 1, 1], [ 2, 3]])); //InfiniteRange w/ RA and slicing auto odds = sequence!("a[0] + n * a[1]")(1, 2); auto oddsByPairs = odds.chunks(2); assert(equal!`equal(a, b)`(oddsByPairs.take(2), [[ 1, 3], [ 5, 7]])); //Requires phobos#991 for Sequence to have slice to end static assert(hasSlicing!(typeof(odds))); assert(equal!`equal(a, b)`(oddsByPairs[3 .. 5], [[13, 15], [17, 19]])); assert(equal!`equal(a, b)`(oddsByPairs[3 .. $].take(2), [[13, 15], [17, 19]])); } private struct OnlyResult(T, size_t arity) { private this(Values...)(auto ref Values values) { this.data = [values]; } bool empty() @property { return frontIndex >= backIndex; } T front() @property { assert(!empty); return data[frontIndex]; } void popFront() { assert(!empty); ++frontIndex; } T back() @property { assert(!empty); return data[backIndex - 1]; } void popBack() { assert(!empty); --backIndex; } OnlyResult save() @property { return this; } size_t length() @property { return backIndex - frontIndex; } alias opDollar = length; T opIndex(size_t idx) { // data[i + idx] will not throw a RangeError // when i + idx points to elements popped // with popBack version(assert) { import core.exception : RangeError; if (idx >= length) throw new RangeError; } return data[frontIndex + idx]; } OnlyResult opSlice() { return this; } OnlyResult opSlice(size_t from, size_t to) { OnlyResult result = this; result.frontIndex += from; result.backIndex = this.frontIndex + to; version(assert) { import core.exception : RangeError; if (to < from || to > length) throw new RangeError; } return result; } private size_t frontIndex = 0; private size_t backIndex = arity; // @@@BUG@@@ 10643 version(none) { static if(hasElaborateAssign!T) private T[arity] data; else private T[arity] data = void; } else private T[arity] data; } // Specialize for single-element results private struct OnlyResult(T, size_t arity : 1) { @property T front() { assert(!_empty); return _value; } @property T back() { assert(!_empty); return _value; } @property bool empty() const { return _empty; } @property size_t length() const { return !_empty; } @property auto save() { return this; } void popFront() { assert(!_empty); _empty = true; } void popBack() { assert(!_empty); _empty = true; } alias opDollar = length; T opIndex(size_t i) { version (assert) { import core.exception : RangeError; if (_empty || i != 0) throw new RangeError; } return _value; } OnlyResult opSlice() { return this; } OnlyResult opSlice(size_t from, size_t to) { version (assert) { import core.exception : RangeError; if (from > to || to > length) throw new RangeError; } OnlyResult copy = this; copy._empty = _empty || from == to; return copy; } private Unqual!T _value; private bool _empty = false; } // Specialize for the empty range private struct OnlyResult(T, size_t arity : 0) { private static struct EmptyElementType {} bool empty() @property { return true; } size_t length() @property { return 0; } alias opDollar = length; EmptyElementType front() @property { assert(false); } void popFront() { assert(false); } EmptyElementType back() @property { assert(false); } void popBack() { assert(false); } OnlyResult save() @property { return this; } EmptyElementType opIndex(size_t i) { version(assert) { import core.exception : RangeError; throw new RangeError; } assert(false); } OnlyResult opSlice() { return this; } OnlyResult opSlice(size_t from, size_t to) { version(assert) { import core.exception : RangeError; if (from != 0 || to != 0) throw new RangeError; } return this; } } /** Assemble $(D values) into a range that carries all its elements in-situ. Useful when a single value or multiple disconnected values must be passed to an algorithm expecting a range, without having to perform dynamic memory allocation. As copying the range means copying all elements, it can be safely returned from functions. For the same reason, copying the returned range may be expensive for a large number of arguments. */ auto only(Values...)(auto ref Values values) if(!is(CommonType!Values == void) || Values.length == 0) { return OnlyResult!(CommonType!Values, Values.length)(values); } /// unittest { assert(equal(only('♡'), "♡")); assert([1, 2, 3, 4].findSplitBefore(only(3))[0] == [1, 2]); assert(only("one", "two", "three").joiner(" ").equal("one two three")); import std.uni; string title = "The D Programming Language"; assert(filter!isUpper(title).map!only().join(".") == "T.D.P.L"); } version(unittest) { // Verify that the same common type and same arity // results in the same template instantiation static assert(is(typeof(only(byte.init, int.init)) == typeof(only(int.init, byte.init)))); static assert(is(typeof(only((const(char)[]).init, string.init)) == typeof(only((const(char)[]).init, (const(char)[]).init)))); } // Tests the zero-element result unittest { auto emptyRange = only(); alias EmptyRange = typeof(emptyRange); static assert(isInputRange!EmptyRange); static assert(isForwardRange!EmptyRange); static assert(isBidirectionalRange!EmptyRange); static assert(isRandomAccessRange!EmptyRange); static assert(hasLength!EmptyRange); static assert(hasSlicing!EmptyRange); assert(emptyRange.empty); assert(emptyRange.length == 0); assert(emptyRange.equal(emptyRange[])); assert(emptyRange.equal(emptyRange.save)); assert(emptyRange[0 .. 0].equal(emptyRange)); } // Tests the single-element result unittest { foreach (x; tuple(1, '1', 1.0, "1", [1])) { auto a = only(x); typeof(x)[] e = []; assert(a.front == x); assert(a.back == x); assert(!a.empty); assert(a.length == 1); assert(equal(a, a[])); assert(equal(a, a[0..1])); assert(equal(a[0..0], e)); assert(equal(a[1..1], e)); assert(a[0] == x); auto b = a.save; assert(equal(a, b)); a.popFront(); assert(a.empty && a.length == 0 && a[].empty); b.popBack(); assert(b.empty && b.length == 0 && b[].empty); alias typeof(a) A; static assert(isInputRange!A); static assert(isForwardRange!A); static assert(isBidirectionalRange!A); static assert(isRandomAccessRange!A); static assert(hasLength!A); static assert(hasSlicing!A); } auto imm = only!(immutable int)(1); immutable int[] imme = []; assert(imm.front == 1); assert(imm.back == 1); assert(!imm.empty); assert(imm.length == 1); assert(equal(imm, imm[])); assert(equal(imm, imm[0..1])); assert(equal(imm[0..0], imme)); assert(equal(imm[1..1], imme)); assert(imm[0] == 1); } // Tests multiple-element results unittest { static assert(!__traits(compiles, only(1, "1"))); auto nums = only!(byte, uint, long)(1, 2, 3); static assert(is(ElementType!(typeof(nums)) == long)); assert(nums.length == 3); foreach(i; 0 .. 3) assert(nums[i] == i + 1); auto saved = nums.save; foreach(i; 1 .. 4) { assert(nums.front == nums[0]); assert(nums.front == i); nums.popFront(); assert(nums.length == 3 - i); } assert(nums.empty); assert(saved.equal(only(1, 2, 3))); assert(saved.equal(saved[])); assert(saved[0 .. 1].equal(only(1))); assert(saved[0 .. 2].equal(only(1, 2))); assert(saved[0 .. 3].equal(saved)); assert(saved[1 .. 3].equal(only(2, 3))); assert(saved[2 .. 3].equal(only(3))); assert(saved[0 .. 0].empty); assert(saved[3 .. 3].empty); alias data = TypeTuple!("one", "two", "three", "four"); static joined = ["one two", "one two three", "one two three four"]; string[] joinedRange = joined; foreach(argCount; TypeTuple!(2, 3, 4)) { auto values = only(data[0 .. argCount]); alias Values = typeof(values); static assert(is(ElementType!Values == string)); static assert(isInputRange!Values); static assert(isForwardRange!Values); static assert(isBidirectionalRange!Values); static assert(isRandomAccessRange!Values); static assert(hasSlicing!Values); static assert(hasLength!Values); assert(values.length == argCount); assert(values[0 .. $].equal(values[0 .. values.length])); assert(values.joiner(" ").equal(joinedRange.front)); joinedRange.popFront(); } assert(saved.retro.equal(only(3, 2, 1))); assert(saved.length == 3); assert(saved.back == 3); saved.popBack(); assert(saved.length == 2); assert(saved.back == 2); assert(saved.front == 1); saved.popFront(); assert(saved.length == 1); assert(saved.front == 2); saved.popBack(); assert(saved.empty); auto imm = only!(immutable int, immutable int)(42, 24); alias Imm = typeof(imm); static assert(is(ElementType!Imm == immutable(int))); assert(imm.front == 42); imm.popFront(); assert(imm.front == 24); imm.popFront(); assert(imm.empty); static struct Test { int* a; } immutable(Test) test; only(test, test); // Works with mutable indirection } /** 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). */ 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). */ 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). */ 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...)() { import std.conv : to; 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; } E moveBack() { return .moveBack(_range); } 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 import std.functional : binaryFun; 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 core.bitop : bsr; import std.conv : text; import std.random : MinstdRand, uniform; // 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 = this; 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 = this; 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; } } // 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 { import std.conv : text; 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; } } /++ +/ 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) void popBack() { return (*_range).popBack(); } version(StdDdoc) { /++ Only defined if $(D isRandomAccesRange!R) is $(D true). +/ auto ref opIndex(IndexType)(IndexType index) {assert(0);} /++ Ditto +/ auto ref opIndex(IndexType)(IndexType index) const {assert(0);} } else static if(isRandomAccessRange!R) { auto ref opIndex(IndexType)(IndexType index) if(is(typeof((*_range)[index]))) { return (*_range)[index]; } 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) auto moveFront() { return (*_range).moveFront(); } /++ Only defined if $(D hasMobileElements!R) and $(D isBidirectionalRange!R) are $(D true). +/ static if(hasMobileElements!R && isBidirectionalRange!R) auto moveBack() { return (*_range).moveBack(); } /++ Only defined if $(D hasMobileElements!R) and $(D isRandomAccessRange!R) are $(D true). +/ static if(hasMobileElements!R && isRandomAccessRange!R) 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). +/ auto opSlice(IndexType1, IndexType2) (IndexType1 begin, IndexType2 end) {assert(0);} /++ Ditto +/ auto opSlice(IndexType1, IndexType2) (IndexType1 begin, IndexType2 end) const {assert(0);} } else static if(hasSlicing!R) { auto opSlice(IndexType1, IndexType2) (IndexType1 begin, IndexType2 end) if(is(typeof((*_range)[begin .. end]))) { mixin(_genOpSlice()); } 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; } /*****************************************************************************/ unittest // bug 9060 { // fix for std.algorithm auto r = map!(x => 0)([1]); chain(r, r); zip(r, r); roundRobin(r, r); struct NRAR { typeof(r) input; @property empty() { return input.empty; } @property front() { return input.front; } void popFront() { input.popFront(); } @property save() { return NRAR(input.save); } } auto n1 = NRAR(r); cycle(n1); // non random access range version assumeSorted(r); // fix for std.range joiner([r], [9]); struct NRAR2 { NRAR input; @property empty() { return true; } @property front() { return input; } void popFront() { } @property save() { return NRAR2(input.save); } } auto n2 = NRAR2(n1); joiner(n2); group(r); until(r, 7); static void foo(R)(R r) { until!(x => x > 7)(r); } foo(r); }
D
/Users/cansoykarafakili/Desktop/Hello/build/Intermediates/Hello.build/Debug/Core.build/Objects-normal/x86_64/String+CaseInsensitiveCompare.o : /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/core.git-9210800844849382486/Sources/Core/RFC1123.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/core.git-9210800844849382486/Sources/Core/String+Polymorphic.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/core.git-9210800844849382486/Sources/Core/Sequence.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/core.git-9210800844849382486/Sources/Core/Collection+Safe.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/core.git-9210800844849382486/Sources/Core/Cache.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/core.git-9210800844849382486/Sources/Core/Extendable.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/core.git-9210800844849382486/Sources/Core/EmptyInitializable.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/core.git-9210800844849382486/Sources/Core/DataFile.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/core.git-9210800844849382486/Sources/Core/String+CaseInsensitiveCompare.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/core.git-9210800844849382486/Sources/Core/Semaphore.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/core.git-9210800844849382486/Sources/Core/String.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/core.git-9210800844849382486/Sources/Core/Dispatch.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/core.git-9210800844849382486/Sources/Core/Lock.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/core.git-9210800844849382486/Sources/Core/Portal.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/core.git-9210800844849382486/Sources/Core/FileProtocol.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/core.git-9210800844849382486/Sources/Core/StaticDataBuffer.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/core.git-9210800844849382486/Sources/Core/DispatchTime+Utilities.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/core.git-9210800844849382486/Sources/Core/Bits.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/core.git-9210800844849382486/Sources/Core/Exports.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/core.git-9210800844849382486/Sources/Core/Result.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/core.git-9210800844849382486/Sources/Core/Int+Hex.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/core.git-9210800844849382486/Sources/Core/Array.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/core.git-9210800844849382486/Sources/Core/WorkingDirectory.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Dispatch.apinotesc /Users/cansoykarafakili/Desktop/Hello/build/Products/Debug/libc.framework/Modules/libc.swiftmodule/x86_64.swiftmodule /Users/cansoykarafakili/Desktop/Hello/build/Products/Debug/Debugging.framework/Modules/Debugging.swiftmodule/x86_64.swiftmodule /Users/cansoykarafakili/Desktop/Hello/build/Products/Debug/Bits.framework/Modules/Bits.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 /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/cansoykarafakili/Desktop/Hello/build/Intermediates/Hello.build/Debug/Core.build/Objects-normal/x86_64/String+CaseInsensitiveCompare~partial.swiftmodule : /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/core.git-9210800844849382486/Sources/Core/RFC1123.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/core.git-9210800844849382486/Sources/Core/String+Polymorphic.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/core.git-9210800844849382486/Sources/Core/Sequence.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/core.git-9210800844849382486/Sources/Core/Collection+Safe.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/core.git-9210800844849382486/Sources/Core/Cache.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/core.git-9210800844849382486/Sources/Core/Extendable.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/core.git-9210800844849382486/Sources/Core/EmptyInitializable.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/core.git-9210800844849382486/Sources/Core/DataFile.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/core.git-9210800844849382486/Sources/Core/String+CaseInsensitiveCompare.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/core.git-9210800844849382486/Sources/Core/Semaphore.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/core.git-9210800844849382486/Sources/Core/String.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/core.git-9210800844849382486/Sources/Core/Dispatch.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/core.git-9210800844849382486/Sources/Core/Lock.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/core.git-9210800844849382486/Sources/Core/Portal.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/core.git-9210800844849382486/Sources/Core/FileProtocol.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/core.git-9210800844849382486/Sources/Core/StaticDataBuffer.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/core.git-9210800844849382486/Sources/Core/DispatchTime+Utilities.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/core.git-9210800844849382486/Sources/Core/Bits.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/core.git-9210800844849382486/Sources/Core/Exports.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/core.git-9210800844849382486/Sources/Core/Result.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/core.git-9210800844849382486/Sources/Core/Int+Hex.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/core.git-9210800844849382486/Sources/Core/Array.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/core.git-9210800844849382486/Sources/Core/WorkingDirectory.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Dispatch.apinotesc /Users/cansoykarafakili/Desktop/Hello/build/Products/Debug/libc.framework/Modules/libc.swiftmodule/x86_64.swiftmodule /Users/cansoykarafakili/Desktop/Hello/build/Products/Debug/Debugging.framework/Modules/Debugging.swiftmodule/x86_64.swiftmodule /Users/cansoykarafakili/Desktop/Hello/build/Products/Debug/Bits.framework/Modules/Bits.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 /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/cansoykarafakili/Desktop/Hello/build/Intermediates/Hello.build/Debug/Core.build/Objects-normal/x86_64/String+CaseInsensitiveCompare~partial.swiftdoc : /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/core.git-9210800844849382486/Sources/Core/RFC1123.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/core.git-9210800844849382486/Sources/Core/String+Polymorphic.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/core.git-9210800844849382486/Sources/Core/Sequence.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/core.git-9210800844849382486/Sources/Core/Collection+Safe.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/core.git-9210800844849382486/Sources/Core/Cache.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/core.git-9210800844849382486/Sources/Core/Extendable.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/core.git-9210800844849382486/Sources/Core/EmptyInitializable.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/core.git-9210800844849382486/Sources/Core/DataFile.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/core.git-9210800844849382486/Sources/Core/String+CaseInsensitiveCompare.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/core.git-9210800844849382486/Sources/Core/Semaphore.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/core.git-9210800844849382486/Sources/Core/String.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/core.git-9210800844849382486/Sources/Core/Dispatch.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/core.git-9210800844849382486/Sources/Core/Lock.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/core.git-9210800844849382486/Sources/Core/Portal.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/core.git-9210800844849382486/Sources/Core/FileProtocol.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/core.git-9210800844849382486/Sources/Core/StaticDataBuffer.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/core.git-9210800844849382486/Sources/Core/DispatchTime+Utilities.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/core.git-9210800844849382486/Sources/Core/Bits.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/core.git-9210800844849382486/Sources/Core/Exports.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/core.git-9210800844849382486/Sources/Core/Result.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/core.git-9210800844849382486/Sources/Core/Int+Hex.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/core.git-9210800844849382486/Sources/Core/Array.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/core.git-9210800844849382486/Sources/Core/WorkingDirectory.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Dispatch.apinotesc /Users/cansoykarafakili/Desktop/Hello/build/Products/Debug/libc.framework/Modules/libc.swiftmodule/x86_64.swiftmodule /Users/cansoykarafakili/Desktop/Hello/build/Products/Debug/Debugging.framework/Modules/Debugging.swiftmodule/x86_64.swiftmodule /Users/cansoykarafakili/Desktop/Hello/build/Products/Debug/Bits.framework/Modules/Bits.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 /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
// PERMUTE_ARGS: // EXTRA_SOURCES: imports/mangle10077.d // EXTRA_FILES: imports/testmangle.d /* TEST_OUTPUT: --- _D7imports10testmangle12detectMangleFPSQBlQBg6DetectZQq _D7imports10testmangle__T10DetectTmplTiZQpFNaNbNiNfZv true false --- */ import imports.testmangle; /***************************************************/ // https://issues.dlang.org/show_bug.cgi?id=10077 // pragma(mangle) pragma(mangle, "_test10077a_") int test10077a; static assert(test10077a.mangleof == "_test10077a_"); __gshared pragma(mangle, "_test10077b_") ubyte test10077b; static assert(test10077b.mangleof == "_test10077b_"); pragma(mangle, "_test10077c_") void test10077c() {} static assert(test10077c.mangleof == "_test10077c_"); pragma(mangle, "_test10077f_") __gshared char test10077f; static assert(test10077f.mangleof == "_test10077f_"); pragma(mangle, "_test10077g_") @system { void test10077g() {} } static assert(test10077g.mangleof == "_test10077g_"); template getModuleInfo(alias mod) { pragma(mangle, "_D"~mod.mangleof~"12__ModuleInfoZ") static __gshared extern ModuleInfo mi; enum getModuleInfo = &mi; } void test10077h() { assert(getModuleInfo!(object).name == "object"); } //UTF-8 chars __gshared extern pragma(mangle, "test_эльфийские_письмена_9") ubyte test10077i_evar; void test10077i() { import imports.mangle10077; setTest10077i(); assert(test10077i_evar == 42); } /***************************************************/ // https://issues.dlang.org/show_bug.cgi?id=13050 void func13050(int); template decl13050(Arg) { void decl13050(Arg); } template problem13050(Arg) { pragma(mangle, "foobar") void problem13050(Arg); } template workaround13050(Arg) { pragma(mangle, "foobar") void func(Arg); alias workaround13050 = func; } static assert(is(typeof(&func13050) == void function(int))); static assert(is(typeof(&decl13050!int) == void function(int))); static assert(is(typeof(&problem13050!int) == void function(int))); static assert(is(typeof(&workaround13050!int) == void function(int))); /***************************************************/ // https://issues.dlang.org/show_bug.cgi?id=2774 int foo2774(int n) { return 0; } static assert(foo2774.mangleof == "_D6mangle7foo2774FiZi"); class C2774 { int foo2774() { return 0; } } static assert(C2774.foo2774.mangleof == "_D6mangle5C27747foo2774MFZi"); template TFoo2774(T) {} static assert(TFoo2774!int.mangleof == "6mangle"~tl!"15"~"__T8TFoo2774TiZ"); void test2774() { int foo2774(int n) { return 0; } static assert(foo2774.mangleof == "_D6mangle8test2774FZ7foo2774MFNaNbNiNfiZi"); } /*******************************************/ // https://issues.dlang.org/show_bug.cgi?id=8847 auto S8847() { static struct Result { inout(Result) get() inout { return this; } } return Result(); } void test8847a() { auto a = S8847(); auto b = a.get(); alias typeof(a) A; alias typeof(b) B; assert(is(A == B), A.stringof~ " is different from "~B.stringof); } // -------- enum result8847a = "S6mangle9iota8847aFZ6Result"; enum result8847b = "S6mangle9iota8847bFZ4iotaMFZ6Result"; enum result8847c = "C6mangle9iota8847cFZ6Result"; enum result8847d = "C6mangle9iota8847dFZ4iotaMFZ6Result"; auto iota8847a() { static struct Result { this(int) {} inout(Result) test() inout { return cast(inout)Result(0); } } static assert(Result.mangleof == result8847a); return Result.init; } auto iota8847b() { auto iota() { static struct Result { this(int) {} inout(Result) test() inout { return cast(inout)Result(0); } } static assert(Result.mangleof == result8847b); return Result.init; } return iota(); } auto iota8847c() { static class Result { this(int) {} inout(Result) test() inout { return cast(inout)new Result(0); } } static assert(Result.mangleof == result8847c); return Result.init; } auto iota8847d() { auto iota() { static class Result { this(int) {} inout(Result) test() inout { return cast(inout)new Result(0); } } static assert(Result.mangleof == result8847d); return Result.init; } return iota(); } void test8847b() { static assert(typeof(iota8847a().test()).mangleof == result8847a); static assert(typeof(iota8847b().test()).mangleof == result8847b); static assert(typeof(iota8847c().test()).mangleof == result8847c); static assert(typeof(iota8847d().test()).mangleof == result8847d); } // -------- struct Test8847 { enum result1 = "S6mangle8Test8847"~tl!("8")~"__T3fooZ"~id!("3foo","Qf")~"MFZ6Result"; enum result2 = "S6mangle8Test8847"~tl!("8")~"__T3fooZ"~id!("3foo","Qf")~"MxFiZ6Result"; auto foo()() { static struct Result { inout(Result) get() inout { return this; } } static assert(Result.mangleof == Test8847.result1); return Result(); } auto foo()(int n) const { static struct Result { inout(Result) get() inout { return this; } } static assert(Result.mangleof == Test8847.result2); return Result(); } } void test8847c() { static assert(typeof(Test8847().foo( ).get()).mangleof == Test8847.result1); static assert(typeof(Test8847().foo(1).get()).mangleof == Test8847.result2); } // -------- void test8847d() { enum resultS = "S6mangle9test8847dFZ3fooMFZ3barMFZ3bazMFZ1S"; enum resultX = "S6mangle9test8847dFZ3fooMFZ1X"; // Return types for test8847d and bar are mangled correctly, // and return types for foo and baz are not mangled correctly. auto foo() { struct X { inout(X) get() inout { return inout(X)(); } } string bar() { auto baz() { struct S { inout(S) get() inout { return inout(S)(); } } return S(); } static assert(typeof(baz() ).mangleof == resultS); static assert(typeof(baz().get()).mangleof == resultS); return ""; } return X(); } static assert(typeof(foo() ).mangleof == resultX); static assert(typeof(foo().get()).mangleof == resultX); } // -------- void test8847e() { enum resultHere = "6mangle"~"9test8847eFZ"~tl!"8"~"__T3fooZ"~id!("3foo","Qf"); enum resultBar = "S"~resultHere~"MFNaNfNgiZ3Bar"; static if(BackRefs) {} else enum resultFoo = "_D"~resultHere~"MFNaNbNiNfNgiZNg"~resultBar; // added 'Nb' // Make template function to infer 'nothrow' attributes auto foo()(inout int) pure @safe { struct Bar {} static assert(Bar.mangleof == resultBar); return inout(Bar)(); } import core.demangle : demangle, demangleType; auto bar = foo(0); static assert(typeof(bar).stringof == "Bar"); static assert(typeof(bar).mangleof == resultBar); enum fooDemangled = "pure nothrow @nogc @safe inout(mangle.test8847e().foo!().foo(inout(int)).Bar) mangle.test8847e().foo!().foo(inout(int))"; static if (BackRefs) static assert(demangle(foo!().mangleof) == fooDemangled); else static assert(foo!().mangleof == resultFoo); } // -------- pure f8847a() { struct S {} return S(); } pure { auto f8847b() { struct S {} return S(); } } static assert(typeof(f8847a()).mangleof == "S6mangle6f8847aFNaZ1S"); static assert(typeof(f8847b()).mangleof == "S6mangle6f8847bFNaZ1S"); /*******************************************/ // https://issues.dlang.org/show_bug.cgi?id=12352 auto bar12352() { struct S { int var; void func() {} } static assert(!__traits(compiles, bar12352.mangleof)); // forward reference to bar static assert(S .mangleof == "S6mangle8bar12352FZ1S"); static assert(S.func.mangleof == "_D6mangle8bar12352FZ1S4funcMFZv"); return S(); } static assert( bar12352 .mangleof == "_D6mangle8bar12352FNaNbNiNfZS"~id!("6mangle8bar12352FZ","QBbQxFZ","QL2H")~"1S"); static assert(typeof(bar12352()) .mangleof == "S6mangle8bar12352FZ1S"); static assert(typeof(bar12352()).func.mangleof == "_D6mangle8bar12352FZ1S4funcMFZv"); auto baz12352() { class C { int var; void func() {} } static assert(!__traits(compiles, baz12352.mangleof)); // forward reference to baz static assert(C .mangleof == "C6mangle8baz12352FZ1C"); static assert(C.func.mangleof == "_D6mangle8baz12352FZ1C4funcMFZv"); return new C(); } static assert( baz12352 .mangleof == "_D6mangle8baz12352FNaNbNfZC"~id!("6mangle8baz12352FZ","QzQuFZ","QL2F")~"1C"); static assert(typeof(baz12352()) .mangleof == "C6mangle8baz12352FZ1C"); static assert(typeof(baz12352()).func.mangleof == "_D6mangle8baz12352FZ1C4funcMFZv"); /*******************************************/ // https://issues.dlang.org/show_bug.cgi?id=9525 void f9525(T)(in T*) { } void test9525() { enum result1 = "S6mangle8test9525FZ"~tl!"26"~"__T5test1S"~tl!"13"~id!("6mangle","QBc")~"5f9525Z"~id!("5test1","Qr")~"MFZ1S"; enum result2 = "S6mangle8test9525FZ"~tl!"26"~"__T5test2S"~tl!"13"~id!("6mangle","QBc")~"5f9525Z"~id!("5test2","Qr")~"MFNaNbZ1S"; bool test1(alias a)() { static struct S {} static assert(S.mangleof == result1); S s; a(&s); // Error: Cannot convert &S to const(S*) at compile time return true; } enum evalTest1 = test1!f9525(); bool test2(alias a)() pure nothrow { static struct S {} static assert(S.mangleof == result2); S s; a(&s); // Error: Cannot convert &S to const(S*) at compile time return true; } enum evalTest2 = test2!f9525(); } /******************************************/ // https://issues.dlang.org/show_bug.cgi?id=10249 template Seq10249(T...) { alias Seq10249 = T; } mixin template Func10249(T) { void func10249(T) {} } mixin Func10249!long; mixin Func10249!string; void f10249(long) {} class C10249 { mixin Func10249!long; mixin Func10249!string; static assert(Seq10249!(.func10249)[0].mangleof == "6mangle9func10249"); // <- 9func10249 static assert(Seq10249!( func10249)[0].mangleof == "6mangle6C102499func10249"); // <- 9func10249 static: // necessary to make overloaded symbols accessible via __traits(getOverloads, C10249) void foo(long) {} void foo(string) {} static assert(Seq10249!(foo)[0].mangleof == "6mangle6C102493foo"); // <- _D6mangle6C102493fooFlZv static assert(Seq10249!(__traits(getOverloads, C10249, "foo"))[0].mangleof == "_D6mangle6C102493fooFlZv"); // <- static assert(Seq10249!(__traits(getOverloads, C10249, "foo"))[1].mangleof == "_D6mangle6C102493fooFAyaZv"); // <- void g(string) {} alias bar = .f10249; alias bar = g; static assert(Seq10249!(bar)[0].mangleof == "6mangle6C102493bar"); // <- _D6mangle1fFlZv static assert(Seq10249!(__traits(getOverloads, C10249, "bar"))[0].mangleof == "_D6mangle6f10249FlZv"); // <- static assert(Seq10249!(__traits(getOverloads, C10249, "bar"))[1].mangleof == "_D6mangle6C102491gFAyaZv"); // <- } /*******************************************/ // https://issues.dlang.org/show_bug.cgi?id=11718 struct Ty11718(alias sym) {} auto fn11718(T)(T a) { return Ty11718!(a).mangleof; } auto fn11718(T)() { T a; return Ty11718!(a).mangleof; } void test11718() { string TyName(string tail)() { enum s = "__T7Ty11718" ~ tail; enum len = unsignedToString(s.length); return "S6mangle" ~ tl!(len) ~ s; } string fnName(string paramPart)() { enum s = "_D6mangle"~tl!("35")~"__T7fn11718T"~ "S6mangle9test11718FZ1AZ7fn11718"~paramPart~"1a"~ "S6mangle9test11718FZ1A"; enum len = unsignedToString(s.length); return tl!len ~ s; } enum result1 = TyName!("S" ~ fnName!("F"~"S6mangle9test11718FZ1A"~"Z") ~ "Z") ~ "7Ty11718"; enum result2 = TyName!("S" ~ fnName!("F"~"" ~"Z") ~ "Z") ~ "7Ty11718"; struct A {} static if (BackRefs) { static assert(fn11718(A.init) == "S6mangle__T7Ty11718S_DQv__T7fn11718TSQBk9test11718FZ1AZQBcFQxZ1aQBcZQCf"); static assert(fn11718!A() == "S6mangle__T7Ty11718S_DQv__T7fn11718TSQBk9test11718FZ1AZQBcFZ1aQBaZQCd"); } else { pragma(msg, fn11718(A.init)); static assert(fn11718(A.init) == result1); static assert(fn11718!A() == result2); } } /*******************************************/ // https://issues.dlang.org/show_bug.cgi?id=11776 struct S11776(alias fun) { } void test11776() { auto g = () { if (1) return; // fill tf->next if (1) { auto s = S11776!(a => 1)(); static assert(typeof(s).mangleof == "S"~"6mangle"~tl!("56")~ ("__T"~"6S11776"~"S"~tl!("42")~ (id!("6mangle","Qs")~"9test11776"~"FZ"~"9__lambda1MFZ"~id!("9__lambda1","Qn"))~"Z" )~id!("6S11776", "QBm")); } }; } /***************************************************/ // https://issues.dlang.org/show_bug.cgi?id=12044 struct S12044(T) { void f()() { new T[1]; } bool opEquals(O)(O) { f(); } } void test12044() { () { enum E { e } auto arr = [E.e]; S12044!E s; } (); } /*******************************************/ // https://issues.dlang.org/show_bug.cgi?id=12217 void test12217(int) { static struct S {} void bar() {} int var; template X(T) {} static assert( S.mangleof == "S6mangle9test12217FiZ1S"); static assert( bar.mangleof == "_D6mangle9test12217FiZ3barMFNaNbNiNfZv"); static assert( var.mangleof == "_D6mangle9test12217FiZ3vari"); static assert(X!int.mangleof == "6mangle9test12217FiZ"~tl!("8")~"__T1XTiZ"); } void test12217() {} /***************************************************/ // https://issues.dlang.org/show_bug.cgi?id=12231 void func12231a()() if (is(typeof({ class C {} static assert(C.mangleof == "C6mangle"~tl!("16")~"__U10func12231aZ"~id!("10func12231a","Qn")~"FZ9__lambda1MFZ1C"); // ### L # }))) {} void func12231b()() if (is(typeof({ class C {} static assert(C.mangleof == "C6mangle"~tl!("16")~"__U10func12231bZ"~id!("10func12231b","Qn")~"FZ9__lambda1MFZ1C"); // L__L L LL })) && is(typeof({ class C {} static assert(C.mangleof == "C6mangle"~tl!("16")~"__U10func12231bZ"~id!("10func12231b","Qn")~"FZ9__lambda2MFZ1C"); // L__L L LL }))) {} void func12231c()() if (is(typeof({ class C {} static assert(C.mangleof == "C6mangle"~tl!("16")~"__U10func12231cZ"~id!("10func12231c","Qn")~"FZ9__lambda1MFZ1C"); // L__L L LL }))) { (){ class C {} static assert(C.mangleof == "C6mangle"~tl!("16")~"__T10func12231cZ"~id!("10func12231c","Qn")~"FZ9__lambda1MFZ1C"); // L__L L LL }(); } void func12231c(X)() if (is(typeof({ class C {} static assert(C.mangleof == "C6mangle"~tl!("20")~"__U10func12231cTAyaZ"~id!("10func12231c","Qr")~"FZ9__lambda1MFZ1C"); // L__L L___L LL }))) { (){ class C {} static assert(C.mangleof == "C6mangle"~tl!("20")~"__T10func12231cTAyaZ"~id!("10func12231c","Qr")~"FZ9__lambda1MFZ1C"); // L__L L___L LL }(); } void test12231() { func12231a(); func12231b(); func12231c(); func12231c!string(); } /***************************************************/ int test2a(scope int a) { return a; } static assert(test2a.mangleof == "_D6mangle6test2aFiZi"); /***************************************************/ class CC { int* p; int* member() scope { return p; } } static assert(CC.member.mangleof == "_D6mangle2CC6memberMFNlZPi"); /***************************************************/ void fooA(void delegate (scope void delegate()) dg) { } void fooB(void delegate (void delegate()) scope dg) { } //pragma(msg, fooA.mangleof); //pragma(msg, fooB.mangleof); static assert(typeof(fooA).mangleof != typeof(fooB).mangleof); /***************************************************/ @live int testLive() { return 42; } static assert(testLive.mangleof == "_D6mangle8testLiveFNmZi"); /***************************************************/ alias noreturn = typeof(*null); alias fpd = noreturn function(); int funcd(fpd); static assert(funcd.mangleof == "_D6mangle5funcdFPFZNnZi"); /***************************************************/ void main() { test10077h(); test10077i(); test12044(); }
D
module engine.core.reference; import engine.core.memory; import engine.core.object : CObject, NewObject, DestroyObject; public import engine.core.ref_count; alias Ref = SReference; struct SReference( T ) { T obj; alias obj this; this( this ) { incRef(); } this( T iobj ) { obj = iobj; incRef(); } pragma( inline, true ): auto instance( Args... )( Args args ) { static if ( !__traits( isAbstractClass, T ) ) { static if ( is( T : CObject ) ) { obj = NewObject!T( args ); } else { obj = allocate!T( args ); } incRef(); } else { assert( false, "Cannot instance abstract class: " ~ T.stringof ); } } size_t incRef() { if ( obj is null ) { return 0; } return RC.incRef( obj ); } size_t decRef() { if ( obj is null ) { return 0; } size_t refCnt = RC.decRef( obj ); if ( refCnt == 0 ) { static if ( is( T : CObject ) ) { DestroyObject( obj ); } else { deallocate( obj ); } } return refCnt; } size_t refCount() const { if ( obj is null ) { return 0; } return RC.refCount( obj ); } void opAssign( X = typeof( this ) )( auto ref SReference!T r ) { decRef(); obj = r.obj; incRef(); } void opAssign( X = typeof( this ) )( auto ref T r ) { decRef(); obj = r; incRef(); } bool isValid() { static if ( is( T == class ) || is( T == interface ) ) { return obj !is null; } else { return true; } } alias reference = incRef; alias unreference = decRef; } struct SRCHandler { private: void* lhandler; public: void* initialize() { if ( !lhandler ) { lhandler = allocate( 1 ); RC.incRef( lhandler ); } return lhandler; } void deinitialize() { deallocate( lhandler ); } size_t incRef() { return RC.incRef( handler ); } size_t decRef() { return RC.decRef( handler ); } size_t refCount() { return RC.refCount( handler ); } private: alias handler = initialize; }
D