code
stringlengths
3
10M
language
stringclasses
31 values
module distGraph.utils.syntax.Lexer; public import distGraph.utils.syntax.Word; public import distGraph.utils.syntax.Tokens; import std.container, std.traits; import std.stdio, std.file, std.string; class SyntaxError : Exception { this (Word word, string [] expected) { super (""); import std.outbuffer; auto buf = new OutBuffer; buf.writef ("Erreur de syntaxe(%d, %d) : %s, Attendue : [", word.locus.line, word.locus.column, word.str); foreach (it ; expected) { buf.writef ("%s", it); } buf.writefln ("] : "); buf.writefln (word.locus.mixLines); foreach (it ; 1 .. word.locus.column) buf.write (" "); foreach (it ; 0 .. word.locus.length) buf.write ("^"); super.msg = buf.toString; } } class LexerError : Exception { this (string filename) { super (filename ~ " n'est pas un fichier"); } } /** Classe de decoupage de fichier par token T doit etres un enum */ class Lexer { this (Token [] skips, Token[2][] comments) { this._line = 1; this._column = 1; this._tokens = Tokens.alls; foreach (it ; skips) this._skips[it] = true; this._comments = comments; this._current = -1; this._enableComment = true; } this (string filename, Token [] skips, Token[2][] comments) { this._line = 1; this._column = 1; this._tokens = Tokens.alls; foreach (it ; skips) this._skips[it] = true; this._comments = comments; this._current = -1; this._enableComment = true; this._filename = filename; try { if (filename.isDir) throw new LexerError (filename); this._file = File (filename, "r"); } catch (Throwable o) { throw new LexerError (filename); } } /** Le nom du fichier courant */ string filename () const { return this._filename; } /** Active un token skip Params: elem = le token a passe on = active ou non */ void skipEnable (Token elem, bool on = true) { this._skips [elem] = on; } /** Active la suppression des commentaire Params: on = active ou desactive */ void commentEnable (bool on = true) { this._enableComment = on; } /** Recupere le mot suivant Params: word = le mot a retourner par reference Return le lexer */ Lexer next (ref Word word) { if (this._current >= cast(long) (this._reads.length - 1)) { return this.get (word); } else { this._current ++; word = this._reads [this._current]; return this; } } /** Recupere le mot suivant Return: le mot lu */ Word next () { Word word; this.next (word); return word; } /** Recupere le mot Return: le mot lu Throws: SyntaxError, si le mot n'est pas un de ceux passé en param */ Word next (T...) (T params) { Word word; this.next (word); if (word.isEof) return word; foreach (Token it ; params) if (word == it.descr) return word; string [] need = new string [params.length]; foreach (i, it ; params) need [i] = it.descr; throw new SyntaxError (word, need); } /** Retour en arriere dans le fichier */ void rewind (ulong nb = 1) { this._current -= nb; } ulong tell () { return this._current; } void seek (ulong where) { this._current = where; } protected Lexer get (ref Word word) { do { if (!getWord (word)) { word.setEof (); break; } else { Token com; while (isComment (word, com) && _enableComment) { do { getWord (word); } while (word != com && !word.isEof); getWord (word); } } } while (isSkip (word) && !word.isEof); this._reads.insertBack (word); this._current ++; return this; } protected bool isComment (Word elem, ref Token retour) { foreach (it ; this._comments) { if (it[0].descr == elem.str) { retour = it [1]; return true; } } return false; } protected bool isSkip (Word elem) { foreach (key, value ; this._skips) { if (key.descr == elem.str && value) return true; } return false; } protected bool getWord (ref Word word) { if (this._file.eof ()) return false; auto where = this._file.tell (); auto line = this._file.readln (); if (line is null) return false; ulong max = 0, beg = line.length; foreach (it ; this._tokens) { auto id = indexOf (line, it.descr); if (id != -1) { if (id == beg && it.descr.length > max) max = it.descr.length; else if (id < beg) { beg = id; max = it.descr.length; } } } constructWord (word, beg, max, line, where); if (word.str == "\n" || word.str == "\r") { this._line ++; this._column = 1; } else { this._column += word.str.length; } return true; } protected ulong min(ulong u1, ulong u2) { return u1 < u2 ? u1 : u2; } protected void constructWord (ref Word word, ulong beg, ulong _max, string line, ulong where) { if (beg == line.length + 1) word.str = line; else if (beg == 0) { word.str = line [0 .. min(_max, line.length)]; this._file.seek (where + _max); } else if (beg > 0) { word.str = line [0 .. min(beg, line.length)]; this._file.seek (where + beg); } word.locus = Location (this._line, this._column, word.str.length, this._filename); } bool isMixinContext () { return false; } ~this () { this._file.close (); } protected Token [] _tokens; protected bool [Token] _skips; protected Token [2][] _comments; protected string _filename; protected bool _enableComment; protected Array!(Word) _reads; protected long _current; protected File _file; protected ulong _line; protected ulong _column; } class StringLexer : Lexer { private string _content; private ulong _beg = 0; this (string content, Token [] skips) { Token [2][] comments; super (skips, comments); this._content = content; } this (string content, Token [] skips, Token[2][] comments) { super (skips, comments); this._content = content; } protected override bool getWord (ref Word word) { if (this._beg >= this._content.length) return false; auto where = this._beg; auto line = this._content [this._beg .. $]; ulong max = 0, beg = line.length; foreach (it ; this._tokens) { auto id = indexOf (line, it.descr); if (id != -1) { if (id == beg && it.descr.length > max) max = it.descr.length; else if (id < beg) { beg = id; max = it.descr.length; } } } constructWord (word, beg, max, line, where); if (word.str == "\n" || word.str == "\r") { this._line ++; this._column = 1; } else { this._column += word.str.length; } return true; } protected override void constructWord (ref Word word, ulong beg, ulong _max, string line, ulong where) { if (beg == line.length + 1) { this._beg += line.length; word.str = line; } else if (beg == 0) { word.str = line [0 .. min(_max, line.length)]; this._beg = (where + _max); } else if (beg > 0) { word.str = line [0 .. min(beg, line.length)]; this._beg = (where + beg); } word.locus = Location (this._line, this._column, word.str.length, "", this._content); } override bool isMixinContext () { return true; } }
D
/Users/hailor/Work/mobile/QhTestMV/ios/build/Build/Intermediates/Pods.build/Debug-iphonesimulator/HandyJSON.build/Objects-normal/x86_64/NominalType.o : /Users/hailor/Work/mobile/QhTestMV/ios/Pods/HandyJSON/Source/Metadata.swift /Users/hailor/Work/mobile/QhTestMV/ios/Pods/HandyJSON/Source/Transformable.swift /Users/hailor/Work/mobile/QhTestMV/ios/Pods/HandyJSON/Source/Measuable.swift /Users/hailor/Work/mobile/QhTestMV/ios/Pods/HandyJSON/Source/ExtendCustomBasicType.swift /Users/hailor/Work/mobile/QhTestMV/ios/Pods/HandyJSON/Source/BuiltInBasicType.swift /Users/hailor/Work/mobile/QhTestMV/ios/Pods/HandyJSON/Source/BuiltInBridgeType.swift /Users/hailor/Work/mobile/QhTestMV/ios/Pods/HandyJSON/Source/NominalType.swift /Users/hailor/Work/mobile/QhTestMV/ios/Pods/HandyJSON/Source/ExtendCustomModelType.swift /Users/hailor/Work/mobile/QhTestMV/ios/Pods/HandyJSON/Source/TransformType.swift /Users/hailor/Work/mobile/QhTestMV/ios/Pods/HandyJSON/Source/EnumType.swift /Users/hailor/Work/mobile/QhTestMV/ios/Pods/HandyJSON/Source/PointerType.swift /Users/hailor/Work/mobile/QhTestMV/ios/Pods/HandyJSON/Source/TransformOf.swift /Users/hailor/Work/mobile/QhTestMV/ios/Pods/HandyJSON/Source/URLTransform.swift /Users/hailor/Work/mobile/QhTestMV/ios/Pods/HandyJSON/Source/DataTransform.swift /Users/hailor/Work/mobile/QhTestMV/ios/Pods/HandyJSON/Source/DateTransform.swift /Users/hailor/Work/mobile/QhTestMV/ios/Pods/HandyJSON/Source/ISO8601DateTransform.swift /Users/hailor/Work/mobile/QhTestMV/ios/Pods/HandyJSON/Source/EnumTransform.swift /Users/hailor/Work/mobile/QhTestMV/ios/Pods/HandyJSON/Source/NSDecimalNumberTransform.swift /Users/hailor/Work/mobile/QhTestMV/ios/Pods/HandyJSON/Source/DateFormatterTransform.swift /Users/hailor/Work/mobile/QhTestMV/ios/Pods/HandyJSON/Source/HexColorTransform.swift /Users/hailor/Work/mobile/QhTestMV/ios/Pods/HandyJSON/Source/CustomDateFormatTransform.swift /Users/hailor/Work/mobile/QhTestMV/ios/Pods/HandyJSON/Source/OtherExtension.swift /Users/hailor/Work/mobile/QhTestMV/ios/Pods/HandyJSON/Source/Configuration.swift /Users/hailor/Work/mobile/QhTestMV/ios/Pods/HandyJSON/Source/PropertyInfo.swift /Users/hailor/Work/mobile/QhTestMV/ios/Pods/HandyJSON/Source/Logger.swift /Users/hailor/Work/mobile/QhTestMV/ios/Pods/HandyJSON/Source/ReflectionHelper.swift /Users/hailor/Work/mobile/QhTestMV/ios/Pods/HandyJSON/Source/HelpingMapper.swift /Users/hailor/Work/mobile/QhTestMV/ios/Pods/HandyJSON/Source/Serializer.swift /Users/hailor/Work/mobile/QhTestMV/ios/Pods/HandyJSON/Source/Deserializer.swift /Users/hailor/Work/mobile/QhTestMV/ios/Pods/HandyJSON/Source/Properties.swift /Users/hailor/Work/mobile/QhTestMV/ios/Pods/HandyJSON/Source/AnyExtensions.swift /Users/hailor/Work/mobile/QhTestMV/ios/Pods/HandyJSON/Source/Export.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/hailor/Work/mobile/QhTestMV/ios/Pods/HandyJSON/Source/HandyJSON.h /Users/hailor/Work/mobile/QhTestMV/ios/Pods/Target\ Support\ Files/HandyJSON/HandyJSON-umbrella.h /Users/hailor/Work/mobile/QhTestMV/ios/build/Build/Intermediates/Pods.build/Debug-iphonesimulator/HandyJSON.build/unextended-module.modulemap /Users/hailor/Work/mobile/QhTestMV/ios/build/Build/Intermediates/Pods.build/Debug-iphonesimulator/HandyJSON.build/Objects-normal/x86_64/NominalType~partial.swiftmodule : /Users/hailor/Work/mobile/QhTestMV/ios/Pods/HandyJSON/Source/Metadata.swift /Users/hailor/Work/mobile/QhTestMV/ios/Pods/HandyJSON/Source/Transformable.swift /Users/hailor/Work/mobile/QhTestMV/ios/Pods/HandyJSON/Source/Measuable.swift /Users/hailor/Work/mobile/QhTestMV/ios/Pods/HandyJSON/Source/ExtendCustomBasicType.swift /Users/hailor/Work/mobile/QhTestMV/ios/Pods/HandyJSON/Source/BuiltInBasicType.swift /Users/hailor/Work/mobile/QhTestMV/ios/Pods/HandyJSON/Source/BuiltInBridgeType.swift /Users/hailor/Work/mobile/QhTestMV/ios/Pods/HandyJSON/Source/NominalType.swift /Users/hailor/Work/mobile/QhTestMV/ios/Pods/HandyJSON/Source/ExtendCustomModelType.swift /Users/hailor/Work/mobile/QhTestMV/ios/Pods/HandyJSON/Source/TransformType.swift /Users/hailor/Work/mobile/QhTestMV/ios/Pods/HandyJSON/Source/EnumType.swift /Users/hailor/Work/mobile/QhTestMV/ios/Pods/HandyJSON/Source/PointerType.swift /Users/hailor/Work/mobile/QhTestMV/ios/Pods/HandyJSON/Source/TransformOf.swift /Users/hailor/Work/mobile/QhTestMV/ios/Pods/HandyJSON/Source/URLTransform.swift /Users/hailor/Work/mobile/QhTestMV/ios/Pods/HandyJSON/Source/DataTransform.swift /Users/hailor/Work/mobile/QhTestMV/ios/Pods/HandyJSON/Source/DateTransform.swift /Users/hailor/Work/mobile/QhTestMV/ios/Pods/HandyJSON/Source/ISO8601DateTransform.swift /Users/hailor/Work/mobile/QhTestMV/ios/Pods/HandyJSON/Source/EnumTransform.swift /Users/hailor/Work/mobile/QhTestMV/ios/Pods/HandyJSON/Source/NSDecimalNumberTransform.swift /Users/hailor/Work/mobile/QhTestMV/ios/Pods/HandyJSON/Source/DateFormatterTransform.swift /Users/hailor/Work/mobile/QhTestMV/ios/Pods/HandyJSON/Source/HexColorTransform.swift /Users/hailor/Work/mobile/QhTestMV/ios/Pods/HandyJSON/Source/CustomDateFormatTransform.swift /Users/hailor/Work/mobile/QhTestMV/ios/Pods/HandyJSON/Source/OtherExtension.swift /Users/hailor/Work/mobile/QhTestMV/ios/Pods/HandyJSON/Source/Configuration.swift /Users/hailor/Work/mobile/QhTestMV/ios/Pods/HandyJSON/Source/PropertyInfo.swift /Users/hailor/Work/mobile/QhTestMV/ios/Pods/HandyJSON/Source/Logger.swift /Users/hailor/Work/mobile/QhTestMV/ios/Pods/HandyJSON/Source/ReflectionHelper.swift /Users/hailor/Work/mobile/QhTestMV/ios/Pods/HandyJSON/Source/HelpingMapper.swift /Users/hailor/Work/mobile/QhTestMV/ios/Pods/HandyJSON/Source/Serializer.swift /Users/hailor/Work/mobile/QhTestMV/ios/Pods/HandyJSON/Source/Deserializer.swift /Users/hailor/Work/mobile/QhTestMV/ios/Pods/HandyJSON/Source/Properties.swift /Users/hailor/Work/mobile/QhTestMV/ios/Pods/HandyJSON/Source/AnyExtensions.swift /Users/hailor/Work/mobile/QhTestMV/ios/Pods/HandyJSON/Source/Export.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/hailor/Work/mobile/QhTestMV/ios/Pods/HandyJSON/Source/HandyJSON.h /Users/hailor/Work/mobile/QhTestMV/ios/Pods/Target\ Support\ Files/HandyJSON/HandyJSON-umbrella.h /Users/hailor/Work/mobile/QhTestMV/ios/build/Build/Intermediates/Pods.build/Debug-iphonesimulator/HandyJSON.build/unextended-module.modulemap /Users/hailor/Work/mobile/QhTestMV/ios/build/Build/Intermediates/Pods.build/Debug-iphonesimulator/HandyJSON.build/Objects-normal/x86_64/NominalType~partial.swiftdoc : /Users/hailor/Work/mobile/QhTestMV/ios/Pods/HandyJSON/Source/Metadata.swift /Users/hailor/Work/mobile/QhTestMV/ios/Pods/HandyJSON/Source/Transformable.swift /Users/hailor/Work/mobile/QhTestMV/ios/Pods/HandyJSON/Source/Measuable.swift /Users/hailor/Work/mobile/QhTestMV/ios/Pods/HandyJSON/Source/ExtendCustomBasicType.swift /Users/hailor/Work/mobile/QhTestMV/ios/Pods/HandyJSON/Source/BuiltInBasicType.swift /Users/hailor/Work/mobile/QhTestMV/ios/Pods/HandyJSON/Source/BuiltInBridgeType.swift /Users/hailor/Work/mobile/QhTestMV/ios/Pods/HandyJSON/Source/NominalType.swift /Users/hailor/Work/mobile/QhTestMV/ios/Pods/HandyJSON/Source/ExtendCustomModelType.swift /Users/hailor/Work/mobile/QhTestMV/ios/Pods/HandyJSON/Source/TransformType.swift /Users/hailor/Work/mobile/QhTestMV/ios/Pods/HandyJSON/Source/EnumType.swift /Users/hailor/Work/mobile/QhTestMV/ios/Pods/HandyJSON/Source/PointerType.swift /Users/hailor/Work/mobile/QhTestMV/ios/Pods/HandyJSON/Source/TransformOf.swift /Users/hailor/Work/mobile/QhTestMV/ios/Pods/HandyJSON/Source/URLTransform.swift /Users/hailor/Work/mobile/QhTestMV/ios/Pods/HandyJSON/Source/DataTransform.swift /Users/hailor/Work/mobile/QhTestMV/ios/Pods/HandyJSON/Source/DateTransform.swift /Users/hailor/Work/mobile/QhTestMV/ios/Pods/HandyJSON/Source/ISO8601DateTransform.swift /Users/hailor/Work/mobile/QhTestMV/ios/Pods/HandyJSON/Source/EnumTransform.swift /Users/hailor/Work/mobile/QhTestMV/ios/Pods/HandyJSON/Source/NSDecimalNumberTransform.swift /Users/hailor/Work/mobile/QhTestMV/ios/Pods/HandyJSON/Source/DateFormatterTransform.swift /Users/hailor/Work/mobile/QhTestMV/ios/Pods/HandyJSON/Source/HexColorTransform.swift /Users/hailor/Work/mobile/QhTestMV/ios/Pods/HandyJSON/Source/CustomDateFormatTransform.swift /Users/hailor/Work/mobile/QhTestMV/ios/Pods/HandyJSON/Source/OtherExtension.swift /Users/hailor/Work/mobile/QhTestMV/ios/Pods/HandyJSON/Source/Configuration.swift /Users/hailor/Work/mobile/QhTestMV/ios/Pods/HandyJSON/Source/PropertyInfo.swift /Users/hailor/Work/mobile/QhTestMV/ios/Pods/HandyJSON/Source/Logger.swift /Users/hailor/Work/mobile/QhTestMV/ios/Pods/HandyJSON/Source/ReflectionHelper.swift /Users/hailor/Work/mobile/QhTestMV/ios/Pods/HandyJSON/Source/HelpingMapper.swift /Users/hailor/Work/mobile/QhTestMV/ios/Pods/HandyJSON/Source/Serializer.swift /Users/hailor/Work/mobile/QhTestMV/ios/Pods/HandyJSON/Source/Deserializer.swift /Users/hailor/Work/mobile/QhTestMV/ios/Pods/HandyJSON/Source/Properties.swift /Users/hailor/Work/mobile/QhTestMV/ios/Pods/HandyJSON/Source/AnyExtensions.swift /Users/hailor/Work/mobile/QhTestMV/ios/Pods/HandyJSON/Source/Export.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/hailor/Work/mobile/QhTestMV/ios/Pods/HandyJSON/Source/HandyJSON.h /Users/hailor/Work/mobile/QhTestMV/ios/Pods/Target\ Support\ Files/HandyJSON/HandyJSON-umbrella.h /Users/hailor/Work/mobile/QhTestMV/ios/build/Build/Intermediates/Pods.build/Debug-iphonesimulator/HandyJSON.build/unextended-module.modulemap
D
any material used for its color a race with skin pigmentation different from the white race (especially Blacks) (physics) the characteristic of quarks that determines their role in the strong interaction interest and variety and intensity the timbre of a musical sound a visual attribute of things that results from the light they emit or transmit or reflect an outward or token appearance or form that is deliberately misleading the appearance of objects (or light sources) described in terms of a person's perception of their hue and lightness (or brightness) and saturation modify or bias decorate with colors give a deceptive explanation or excuse for affect as in thought or feeling add color to change color, often in an undesired manner having or capable of producing colors
D
c: Copyright (C) 1998 - 2022, Daniel Stenberg, <daniel@haxx.se>, et al. SPDX-License-Identifier: curl Long: ssl-reqd Help: Require SSL/TLS Protocols: FTP IMAP POP3 SMTP LDAP Added: 7.20.0 Category: tls Example: --ssl-reqd ftp://example.com See-also: ssl insecure Multi: boolean --- Require SSL/TLS for the connection. Terminates the connection if the server does not support SSL/TLS. This option is handled in LDAP since version 7.81.0. It is fully supported by the OpenLDAP backend and rejected by the generic ldap backend if explicit TLS is required. This option was formerly known as --ftp-ssl-reqd.
D
import imports.test11563std_traits; interface J : I {} // comment out to let compilation succeed struct A { } static assert(moduleName!A == "b"); interface I {}
D
/* * SPDX-FileCopyrightText: Copyright © 2020-2023 Serpent OS Developers * * SPDX-License-Identifier: Zlib */ /** * moss.core.fetchcontext * * A FetchContext is responsible for queuing + downloading assets in the form * of Fetchables. * * Authors: Copyright © 2020-2023 Serpent OS Developers * License: Zlib */ module moss.core.fetchcontext; public import std.stdint : uint64_t; public import std.signals; @trusted: public enum FetchType { /** * Just a regular download */ RegularFile = 0, /** * Specifically need a temporary file. Use mkstemp() format for the * destination path and remember to read it back again */ TemporaryFile, } /** * The Fetchable's closure is run on the corresponding thread when a fetch * has completed. This permits some level of thread architecture reuse for * various tasks (check hashsums, etc.) */ alias FetchableClosure = void delegate(immutable(Fetchable) fetch, long statusCode); /** * A Fetchable simply describes something we need to download. */ public struct Fetchable { /** * Where are we downloading this thing from? */ string sourceURI = null; /** * Where are we storing it? */ string destinationPath = null; /** * Expected size for the fetchable. Used for organising the * downloads by domain + size. */ uint64_t expectedSize = uint64_t.max; /** * Regular download or needing tmpfs? */ FetchType type = FetchType.RegularFile; /** * Run this hook when completed. */ immutable(FetchableClosure) onComplete = null; } /** * A FetchContext will be provided by the implementation and is responsible for * queuing + downloading assets. The interface is provided to pass to plugins so * they can enqueue their own fetchables without having to know the internal * details. */ public abstract class FetchContext { /** * Enqueue some download */ void enqueue(in Fetchable f); /** * The implementation should block until all * downloads have been attempted and the backlog * cleared. */ void fetch(); /** * Return true if the context is now empty. This allows * a constant loop approach to using the FetchContext. */ bool empty(); /** * Clear all pending downloads that aren't already in progress */ void clear(); /** * Thread Index (0-N) * Fetchable (work unit) * Download Total * Download Current */ mixin Signal!(uint, Fetchable, double, double) onProgress; /** * A given fetchable has now completed */ mixin Signal!(Fetchable, long) onComplete; /** * A given fetchable failed to download * Implementations may choose to enqueue the download again */ mixin Signal!(Fetchable, string) onFail; }
D
/******************************************************************************* copyright: Copyright (c) 2008. Fawzi Mohamed license: BSD стиль: $(LICENSE) version: Initial release: July 2008 author: Fawzi Mohamed *******************************************************************************/ module math.random.Ziggurat; import math.Bracket: найдиКорень; import math.Math: абс; import math.ErrorFunction: матошфунк; import core.Traits; /// ziggurat метод for decreasing distributions. /// Marsaglia, Tsang, Journal of Statistical Software, 2000 /// If имеется негатив is да the ни в каком дистрибутиве is assumed в_ be symmetric with respect в_ 0, /// otherwise it is assumed в_ be из_ 0 в_ infinity. /// Struct based в_ avoопр extra indirection when wrapped in a class (и it should be wrapped /// in a class и not использован directly). /// Вызов стиль initialization avoопрed on purpose (this is a big structure, you don't want в_ return it) struct Циггурат(СлучГ,T,alias плотностьВерФ,alias хвостГенератор,бул естьНегатив=да) { static assert(типРеал_ли!(T),T.stringof~" недопустимо, поддерживаются только переменные с плавающей точкой"); const цел члоБлоков=256; T[члоБлоков+1] блокПоз; T[члоБлоков+1] значФ; СлучГ r; alias Циггурат ТИсток; /// initializes the ziggurat static Циггурат создай(alias инвПлотностьВерФ, alias кумПлотностьВерФКомпл)(СлучГ рГенератор,реал xLast=-1.0L,бул проверь_ошиб=да) { /// function в_ найди xLast реал findXLast(реал xLast) { реал v=xLast*плотностьВерФ(xLast)+кумПлотностьВерФКомпл(xLast); реал fMax=плотностьВерФ(0.0L); реал pAtt=xLast; реал fAtt=плотностьВерФ(xLast); for (цел i=члоБлоков-2; i!=0; --i) { fAtt+=v/pAtt; if (fAtt>fMax) return fAtt+(i-1)*fMax; pAtt=инвПлотностьВерФ(fAtt); assert(pAtt>=0,"инвПлотностьВерФ должен возвратить положительное значения"); } return fAtt+v/pAtt-fMax; } проц findBracket(ref реал xMin,ref реал xMax) { реал vMin=кумПлотностьВерФКомпл(0.0L)/члоБлоков; реал pAtt=0.0L; for (цел i=1; i<члоБлоков; ++i) { pAtt+=vMin/плотностьВерФ(pAtt); } реал df=findXLast(pAtt); if (df>0) { // (most likely) xMin=pAtt; реал vMax=кумПлотностьВерФКомпл(0.0L); xMax=pAtt+vMax/плотностьВерФ(pAtt); } else { xMax=pAtt; xMin=vMin/плотностьВерФ(0.0L); } } if (xLast<=0) { реал xMin,xMax; findBracket(xMin,xMax); xLast=найдиКорень(&findXLast,xMin,xMax); // printf("xLast:%La => %La\n",xLast,findXLast(xLast)); } Циггурат рез; with (рез) { r=рГенератор; реал v=плотностьВерФ(xLast)*xLast+кумПлотностьВерФКомпл(xLast); реал pAtt=xLast; реал fMax=плотностьВерФ(0.0L); блокПоз[1]=cast(T)xLast; реал fAtt=плотностьВерФ(xLast); значФ[1]=cast(T)fAtt; for (цел i=2; i<члоБлоков; ++i) { fAtt+=v/pAtt; assert(fAtt<=fMax,"Построение Циггурат прервано"); pAtt=инвПлотностьВерФ(fAtt); assert(pAtt>=0,"инвПлотностьВерФ должен возвратить положительное значения"); блокПоз[i]=cast(T)pAtt; значФ[i]=cast(T)fAtt; } блокПоз[члоБлоков]=0.0L; значФ[члоБлоков]=cast(T)плотностьВерФ(0.0L); реал ошибка=fAtt+v/pAtt-плотностьВерФ(0.0L); assert((!проверь_ошиб) || ошибка<реал.epsilon*10000.0,"Ошибка Циггурат больше ожидаемой"); блокПоз[0]=cast(T)(xLast*(1.0L+кумПлотностьВерФКомпл(xLast)/плотностьВерФ(xLast))); значФ[0]=0.0L; for (цел i=0; i<члоБлоков; ++i) { assert(блокПоз[i]>=блокПоз[i+1],"уменьшаемый блокПоз"); assert(значФ[i]<=значФ[i+1],"увеличение функции плотности вероятности"); } } return рез; } /// returns a single значение with the probability ни в каком дистрибутиве of the текущ Циггурат /// и slightly worse randomness (in the нормаль case uses only 32 random биты). /// Cannot be 0. T дайБыстрСлуч() { static if (естьНегатив) { for (цел итер=1000; итер!=0; --итер) { бцел i0=r.униформа!(бцел)(); бцел i=i0 & 0xFFU; const T масштабФ=(cast(T)1)/(cast(T)бцел.max+1); T u= (cast(T)i0+cast(T)0.5)*масштабФ; T x = блокПоз[i]*u; if (x<блокПоз[i+1]) return ((i0 & 0x100u)?x:-x); if (i == 0) return хвостГенератор(r,блокПоз[1],x<0); if ((cast(T)плотностьВерФ(x))>значФ[i+1]+(значФ[i]-значФ[i+1])*((cast(T)r.униформа!(бцел)+cast(T)0.5)*масштабФ)) { return ((i0 & 0x100u)?x:-x); } } } else { for (цел итер=1000; итер!=0; --итер) { бцел i0=r.униформа!(бцел); бцел i= i0 & 0xFFU; const T масштабФ=(cast(T)1)/(cast(T)бцел.max+1); T u= (cast(T)i0+cast(T)0.5)*масштабФ; T x = блокПоз[i]*u; if (x<блокПоз[i+1]) return x; if (i == 0) return хвостГенератор(r,блокПоз[1]); if ((cast(T)плотностьВерФ(x))>значФ[i+1]+(значФ[i]-значФ[i+1])*r.униформа!(T)) { return x; } } } throw new Исключение("макс чло итераций в Циггурат, должна быть вероятность<1.0e-1000"); } /// returns a single значение with the probability ни в каком дистрибутиве of the текущ Циггурат T дайСлучайный() { static if (естьНегатив) { for (цел итер=1000; итер!=0; --итер) { бцел i0 = r.униформа!(бцел); бцел i= i0 & 0xFF; T u = r.униформа!(T)(); T x = блокПоз[i]*u; if (x<блокПоз[i+1]) return ((i0 & 0x100u)?x:-x); if (i == 0) return хвостГенератор(r,блокПоз[1],x<0); if ((cast(T)плотностьВерФ(x))>значФ[i+1]+(значФ[i]-значФ[i+1])*r.униформа!(T)) { return ((i0 & 0x100u)?x:-x); } } } else { for (цел итер=1000; итер!=0; --итер) { бцел i=r.униформа!(ббайт); T u = r.униформа!(T)(); T x = блокПоз[i]*u; if (x<блокПоз[i+1]) return x; if (i == 0) return хвостГенератор(r,блокПоз[1]); if ((cast(T)плотностьВерФ(x))>значФ[i+1]+(значФ[i]-значФ[i+1])*r.униформа!(T)) { return x; } } } throw new Исключение("макс чло итераций в Циггурат, должна быть вероятность<1.0e-1000"); } /// initializes the аргумент with the probability ни в каком дистрибутиве given и returns it /// for массивы this might potentially be faster than a naive loop U рандомируй(U)(ref U a) { static if(is(U S:S[])) { бцел aL=a.length; for (бцел i=0; i!=aL; ++i) { a[i]=cast(БазТипМассивов!(U))дайСлучайный(); } } else { a=cast(U)дайСлучайный(); } return a; } /// initializes the переменная with the результат of маппинг op on the random numbers (of тип T) // unfortunately this (ещё efficent version) cannot use local delegates template рандомирОп2(alias op) { U рандомирОп2(U)(ref U a) { static if(is(U S:S[])) { alias БазТипМассивов!(U) TT; бцел aL=a.length; for (бцел i=0; i!=aL; ++i) { static if(типКомплекс_ли!(TT)) { a[i]=cast(TT)(op(дайСлучайный())+1i*op(дайСлучайный())); } else static if (типМнимое_ли!(TT)) { a[i]=cast(TT)(1i*op(дайСлучайный())); } else { a[i]=cast(TT)op(дайСлучайный()); } } } else { static if(типКомплекс_ли!(U)) { a=cast(U)(op(дайСлучайный())+1i*op(дайСлучайный())); } else static if (типМнимое_ли!(U)) { el=cast(U)(1i*op(дайСлучайный())); } else { a=cast(U)op(дайСлучайный()); } } return a; } } /// initializes the переменная with the результат of маппинг op on the random numbers (of тип T) U рандомирОп(U,S)(S delegate(T) op,ref U a) { static if(is(U S:S[])) { alias БазТипМассивов!(U) TT; бцел aL=a.length; for (бцел i=0; i!=aL; ++i) { static if(типКомплекс_ли!(TT)) { a[i]=cast(TT)(op(дайСлучайный())+1i*op(дайСлучайный())); } else static if (типМнимое_ли!(TT)) { a[i]=cast(TT)(1i*op(дайСлучайный())); } else { a[i]=cast(TT)op(дайСлучайный()); } } } else { static if(типКомплекс_ли!(U)) { a=cast(U)(op(дайСлучайный())+1i*op(дайСлучайный())); } else static if (типМнимое_ли!(U)) { el=cast(U)(1i*op(дайСлучайный())); } else { a=cast(U)op(дайСлучайный()); } } return a; } }
D
// Author: Ivan Kazmenko (gassa@mail.ru) module solution; import std.algorithm, std.stdio, std.string; void main () { string s; while ((s = readln.strip) != "") { int [] a; while (true) { a ~= 0; } } }
D
module gelf.transport; private import std.socket : UdpSocket, InternetAddress; import std.random : uniform; import std.outbuffer; import std.range : chunks; import gelf.protocol; public: enum MAX_CHUNKS = 128; //"A message MUST NOT consist of more than 128 chunks." /** This function provides a convenient way to send chunked GELF messages to Graylog. It automatically chunks a message based on $(D_PARAM packetSizeBytes). Params: packetSizeBytes = The size of each chunk in bytes. Default : 81924 compressed = If true, compress the message using zlib. Default : false Throws: Exception if # of chunks > 128. Examples: ------------------------- auto s = new UdpSocket(); s.connect(new InternetAddress("localhost", 12200)); // Start netcat to watch this packet : `nc -lu 12200` s.sendChunked(gelfMessage, 500); ------------------------- Returns: The number of packets sent */ auto sendChunked(UdpSocket socket, Message message, uint packetSizeBytes = 8192, bool compressed = false) { import std.zlib; return chunkAndSend(socket, (compressed) ? compress(message.toString()) : cast(ubyte[])message.toString(), packetSizeBytes); } private: pragma(inline): auto chunkAndSend(UdpSocket socket, const(ubyte[]) message, uint packetSizeBytes) { auto msgLength = message.length; if(msgLength < packetSizeBytes) { socket.send(message); return 1; } auto t = (msgLength / packetSizeBytes) + 1; if (t > MAX_CHUNKS) { throw new Exception("Message too large"); } ubyte total = cast(ubyte)t; ulong messageId = uniform(0, long.max); auto buffer = new OutBuffer(); buffer.reserve(packetSizeBytes); byte sequenceNo = 0; auto chunks = chunks(message, packetSizeBytes - 12); foreach(c; chunks) { buffer.offset = 0; buffer.write(cast(ubyte)0x1e); buffer.write(cast(ubyte)0x0f); buffer.write(messageId); buffer.write(sequenceNo++); buffer.write(total); buffer.write(c); socket.send(buffer.toBytes()); } return total; }
D
module android.java.java.util.ResourceBundle; public import android.java.java.util.ResourceBundle_d_interface; import arsd.jni : ImportExportImpl; mixin ImportExportImpl!ResourceBundle; import import0 = android.java.java.util.Locale; import import1 = android.java.java.util.ResourceBundle; import import6 = android.java.java.lang.Class; import import4 = android.java.java.util.Enumeration; import import5 = android.java.java.util.Set;
D
/++ The Mersenne Twister generator. Copyright: Copyright Andrei Alexandrescu 2008 - 2009, Ilya Yaroshenko 2016-. License: $(HTTP www.boost.org/LICENSE_1_0.txt, Boost License 1.0). Authors: $(HTTP erdani.org, Andrei Alexandrescu) Ilya Yaroshenko (rework) +/ module mir.random.engine.mersenne_twister; import std.traits; /++ The $(LUCKY Mersenne Twister) generator. +/ struct MersenneTwisterEngine(UIntType, size_t w, size_t n, size_t m, size_t r, UIntType a, size_t u, UIntType d, size_t s, UIntType b, size_t t, UIntType c, size_t l, UIntType f) if (isUnsigned!UIntType) { /// enum isRandomEngine = true; static assert(0 < w && w <= UIntType.sizeof * 8); static assert(1 <= m && m <= n); static assert(0 <= r && 0 <= u && 0 <= s && 0 <= t && 0 <= l); static assert(r <= w && u <= w && s <= w && t <= w && l <= w); static assert(0 <= a && 0 <= b && 0 <= c); @disable this(); @disable this(this); /// Largest generated value. enum UIntType max = UIntType.max >> (UIntType.sizeof * 8u - w); static assert(a <= max && b <= max && c <= max && f <= max); private enum UIntType lowerMask = (cast(UIntType) 1u << r) - 1; private enum UIntType upperMask = ~lowerMask & max; /** Parameters for the generator. */ enum size_t wordSize = w; enum size_t stateSize = n; /// ditto enum size_t shiftSize = m; /// ditto enum size_t maskBits = r; /// ditto enum UIntType xorMask = a; /// ditto enum size_t temperingU = u; /// ditto enum UIntType temperingD = d; /// ditto enum size_t temperingS = s; /// ditto enum UIntType temperingB = b; /// ditto enum size_t temperingT = t; /// ditto enum UIntType temperingC = c; /// ditto enum size_t temperingL = l; /// ditto enum UIntType initializationMultiplier = f; /// ditto /// The default seed value. enum UIntType defaultSeed = 5489; /++ Current reversed payload index with initial value equals to `n-1` +/ size_t index = void; private UIntType _z = void; /++ Reversed(!) payload. +/ UIntType[n] data = void; /* * Marker indicating it's safe to construct from void * (i.e. the constructor doesn't depend on the struct * being in an initially valid state). * Non-public because we don't want to commit to this * design. */ package enum bool _isVoidInitOkay = true; /++ Constructs a MersenneTwisterEngine object. +/ this(UIntType value) @safe pure nothrow @nogc { static if (max == UIntType.max) data[$-1] = value; else data[$-1] = value & max; foreach_reverse (size_t i, ref e; data[0 .. $-1]) { e = f * (data[i + 1] ^ (data[i + 1] >> (w - 2))) + cast(UIntType)(n - (i + 1)); static if (max != UIntType.max) e &= max; } index = n-1; opCall(); } /++ Constructs a MersenneTwisterEngine object. Note that `MersenneTwisterEngine([123])` will not result in the same initial state as `MersenneTwisterEngine(123)`. +/ this()(scope const(UIntType)[] array) @safe pure nothrow @nogc { static if (is(UIntType == uint)) { enum UIntType f2 = 1664525u; enum UIntType f3 = 1566083941u; } else static if (is(UIntType == ulong)) { enum UIntType f2 = 3935559000370003845uL; enum UIntType f3 = 2862933555777941757uL; } else static assert(0, "init by slice only supported if UIntType is uint or ulong!"); data[$-1] = cast(UIntType) (19650218u & max); foreach_reverse (size_t i, ref e; data[0 .. $-1]) { e = f * (data[i + 1] ^ (data[i + 1] >> (w - 2))) + cast(UIntType)(n - (i + 1)); static if (max != UIntType.max) e &= max; } index = n-1; if (array.length == 0) { opCall(); return; } size_t final_mix_index = void; if (array.length >= n) { size_t j = 0; //Handle all but tail. while (array.length - j >= n - 1) { foreach_reverse (i, ref e; data[0 .. $-1]) { e = (e ^ ((data[i+1] ^ (data[i+1] >> (w - 2))) * f2)) + array[j] + cast(UIntType) j; static if (max != UIntType.max) e &= max; ++j; } data[$ - 1] = data[0]; } //Handle tail. size_t i = n - 2; while (j < array.length) { data[i] = (data[i] ^ ((data[i+1] ^ (data[i+1] >> (w - 2))) * f2)) + array[j] + cast(UIntType) j; static if (max != UIntType.max) data[i] &= max; ++j; --i; } //Set the index for use by the next pass. final_mix_index = i; } else { size_t i = n - 2; //Handle all but tail. while (i >= array.length) { foreach (j; 0 .. array.length) { data[i] = (data[i] ^ ((data[i+1] ^ (data[i+1] >> (w - 2))) * f2)) + array[j] + cast(UIntType) j; static if (max != UIntType.max) data[i] &= max; --i; } } //Handle tail. size_t j = 0; while (i != cast(size_t) -1) { data[i] = (data[i] ^ ((data[i+1] ^ (data[i+1] >> (w - 2))) * f2)) + array[j] + cast(UIntType) j; static if (max != UIntType.max) data[i] &= max; ++j; --i; } data[$ - 1] = data[0]; i = n - 2; data[i] = (data[i] ^ ((data[i+1] ^ (data[i+1] >> (w - 2))) * f2)) + array[j] + cast(UIntType) j; static if (max != UIntType.max) data[i] &= max; //Set the index for use by the next pass. final_mix_index = n - 2; } foreach_reverse (i, ref e; data[0 .. final_mix_index]) { e = (e ^ ((data[i+1] ^ (data[i+1] >> (w - 2))) * f3)) - cast(UIntType)(n - (i + 1)); static if (max != UIntType.max) e &= max; } foreach_reverse (i, ref e; data[final_mix_index .. n-1]) { e = (e ^ ((data[i+1] ^ (data[i+1] >> (w - 2))) * f3)) - cast(UIntType)(n - (i + 1)); static if (max != UIntType.max) e &= max; } data[$-1] = (cast(UIntType)1) << ((UIntType.sizeof * 8) - 1); /* MSB is 1; assuring non-zero initial array */ opCall(); } /++ Advances the generator. +/ UIntType opCall() @safe pure nothrow @nogc { // This function blends two nominally independent // processes: (i) calculation of the next random // variate from the cached previous `data` entry // `_z`, and (ii) updating `data[index]` and `_z` // and advancing the `index` value to the next in // sequence. // // By interweaving the steps involved in these // procedures, rather than performing each of // them separately in sequence, the variables // are kept 'hot' in CPU registers, allowing // for significantly faster performance. sizediff_t index = this.index; sizediff_t next = index - 1; if(next < 0) next = n - 1; auto z = _z; sizediff_t conj = index - m; if(conj < 0) conj = index - m + n; static if (d == UIntType.max) z ^= (z >> u); else z ^= (z >> u) & d; auto q = data[index] & upperMask; auto p = data[next] & lowerMask; z ^= (z << s) & b; auto y = q | p; auto x = y >> 1; z ^= (z << t) & c; if (y & 1) x ^= a; auto e = data[conj] ^ x; z ^= (z >> l); _z = data[index] = e; this.index = next; return z; } } /++ A $(D MersenneTwisterEngine) instantiated with the parameters of the original engine $(HTTP en.wikipedia.org/wiki/Mersenne_Twister, MT19937), generating uniformly-distributed 32-bit numbers with a period of 2 to the power of 19937. This is recommended for random number generation on 32-bit systems unless memory is severely restricted, in which case a $(REF_ALTTEXT Xorshift, Xorshift, mir, random, engine, xorshift) would be the generator of choice. +/ alias Mt19937 = MersenneTwisterEngine!(uint, 32, 624, 397, 31, 0x9908b0df, 11, 0xffffffff, 7, 0x9d2c5680, 15, 0xefc60000, 18, 1812433253); /// @safe version(mir_random_test) unittest { import mir.random.engine; // bit-masking by generator maximum is necessary // to handle 64-bit `unpredictableSeed` auto gen = Mt19937(unpredictableSeed & Mt19937.max); auto n = gen(); import std.traits; static assert(is(ReturnType!gen == uint)); } /++ A $(D MersenneTwisterEngine) instantiated with the parameters of the original engine $(HTTP en.wikipedia.org/wiki/Mersenne_Twister, MT19937), generating uniformly-distributed 64-bit numbers with a period of 2 to the power of 19937. This is recommended for random number generation on 64-bit systems unless memory is severely restricted, in which case a $(REF_ALTTEXT Xorshift, Xorshift, mir, random, engine, xorshift) would be the generator of choice. +/ alias Mt19937_64 = MersenneTwisterEngine!(ulong, 64, 312, 156, 31, 0xb5026f5aa96619e9, 29, 0x5555555555555555, 17, 0x71d67fffeda60000, 37, 0xfff7eee000000000, 43, 6364136223846793005); /// @safe version(mir_random_test) unittest { import mir.random.engine; auto gen = Mt19937_64(unpredictableSeed); auto n = gen(); import std.traits; static assert(is(ReturnType!gen == ulong)); } @safe nothrow version(mir_random_test) unittest { import mir.random.engine; static assert(isSaturatedRandomEngine!Mt19937); static assert(isSaturatedRandomEngine!Mt19937_64); auto gen = Mt19937(Mt19937.defaultSeed); foreach(_; 0 .. 9999) gen(); assert(gen() == 4123659995); auto gen64 = Mt19937_64(Mt19937_64.defaultSeed); foreach(_; 0 .. 9999) gen64(); assert(gen64() == 9981545732273789042uL); } version(mir_random_test) unittest { enum val = [1341017984, 62051482162767]; alias MT(UIntType, uint w) = MersenneTwisterEngine!(UIntType, w, 624, 397, 31, 0x9908b0df, 11, 0xffffffff, 7, 0x9d2c5680, 15, 0xefc60000, 18, 1812433253); import std.meta: AliasSeq; foreach (i, R; AliasSeq!(MT!(ulong, 32), MT!(ulong, 48))) { static if (R.wordSize == 48) static assert(R.max == 0xFFFFFFFFFFFF); auto a = R(R.defaultSeed); foreach(_; 0..999) a(); assert(val[i] == a()); } } @safe nothrow @nogc version(mir_random_test) unittest { //Verify that seeding with an array gives the same result as the reference //implementation. //32-bit: www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/MT2002/CODES/mt19937ar.tgz immutable uint[4] seed32 = [0x123u, 0x234u, 0x345u, 0x456u]; auto gen32 = Mt19937(seed32); foreach(_; 0..999) gen32(); assert(3460025646u == gen32()); //64-bit: www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/mt19937-64.tgz immutable ulong[4] seed64 = [0x12345uL, 0x23456uL, 0x34567uL, 0x45678uL]; auto gen64 = Mt19937_64(seed64); foreach(_; 0..999) gen64(); assert(994412663058993407uL == gen64()); }
D
/Users/thendral/POC/vapor/Friends/.build/debug/FluentTester.build/Student.swift.o : /Users/thendral/POC/vapor/Friends/Packages/Fluent-1.3.7/Sources/FluentTester/Atom.swift /Users/thendral/POC/vapor/Friends/Packages/Fluent-1.3.7/Sources/FluentTester/Compound.swift /Users/thendral/POC/vapor/Friends/Packages/Fluent-1.3.7/Sources/FluentTester/Student.swift /Users/thendral/POC/vapor/Friends/Packages/Fluent-1.3.7/Sources/FluentTester/Tester+InsertAndFind.swift /Users/thendral/POC/vapor/Friends/Packages/Fluent-1.3.7/Sources/FluentTester/Tester+PivotsAndRelations.swift /Users/thendral/POC/vapor/Friends/Packages/Fluent-1.3.7/Sources/FluentTester/Tester+Schema.swift /Users/thendral/POC/vapor/Friends/Packages/Fluent-1.3.7/Sources/FluentTester/Tester+Utilities.swift /Users/thendral/POC/vapor/Friends/Packages/Fluent-1.3.7/Sources/FluentTester/Tester.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/SwiftOnoneSupport.swiftmodule /Users/thendral/POC/vapor/Friends/.build/debug/Fluent.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/thendral/POC/vapor/Friends/.build/debug/Node.swiftmodule /Users/thendral/POC/vapor/Friends/.build/debug/PathIndexable.swiftmodule /Users/thendral/POC/vapor/Friends/.build/debug/Polymorphic.swiftmodule /Users/thendral/POC/vapor/Friends/.build/debug/FluentTester.build/Student~partial.swiftmodule : /Users/thendral/POC/vapor/Friends/Packages/Fluent-1.3.7/Sources/FluentTester/Atom.swift /Users/thendral/POC/vapor/Friends/Packages/Fluent-1.3.7/Sources/FluentTester/Compound.swift /Users/thendral/POC/vapor/Friends/Packages/Fluent-1.3.7/Sources/FluentTester/Student.swift /Users/thendral/POC/vapor/Friends/Packages/Fluent-1.3.7/Sources/FluentTester/Tester+InsertAndFind.swift /Users/thendral/POC/vapor/Friends/Packages/Fluent-1.3.7/Sources/FluentTester/Tester+PivotsAndRelations.swift /Users/thendral/POC/vapor/Friends/Packages/Fluent-1.3.7/Sources/FluentTester/Tester+Schema.swift /Users/thendral/POC/vapor/Friends/Packages/Fluent-1.3.7/Sources/FluentTester/Tester+Utilities.swift /Users/thendral/POC/vapor/Friends/Packages/Fluent-1.3.7/Sources/FluentTester/Tester.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/SwiftOnoneSupport.swiftmodule /Users/thendral/POC/vapor/Friends/.build/debug/Fluent.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/thendral/POC/vapor/Friends/.build/debug/Node.swiftmodule /Users/thendral/POC/vapor/Friends/.build/debug/PathIndexable.swiftmodule /Users/thendral/POC/vapor/Friends/.build/debug/Polymorphic.swiftmodule /Users/thendral/POC/vapor/Friends/.build/debug/FluentTester.build/Student~partial.swiftdoc : /Users/thendral/POC/vapor/Friends/Packages/Fluent-1.3.7/Sources/FluentTester/Atom.swift /Users/thendral/POC/vapor/Friends/Packages/Fluent-1.3.7/Sources/FluentTester/Compound.swift /Users/thendral/POC/vapor/Friends/Packages/Fluent-1.3.7/Sources/FluentTester/Student.swift /Users/thendral/POC/vapor/Friends/Packages/Fluent-1.3.7/Sources/FluentTester/Tester+InsertAndFind.swift /Users/thendral/POC/vapor/Friends/Packages/Fluent-1.3.7/Sources/FluentTester/Tester+PivotsAndRelations.swift /Users/thendral/POC/vapor/Friends/Packages/Fluent-1.3.7/Sources/FluentTester/Tester+Schema.swift /Users/thendral/POC/vapor/Friends/Packages/Fluent-1.3.7/Sources/FluentTester/Tester+Utilities.swift /Users/thendral/POC/vapor/Friends/Packages/Fluent-1.3.7/Sources/FluentTester/Tester.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/SwiftOnoneSupport.swiftmodule /Users/thendral/POC/vapor/Friends/.build/debug/Fluent.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/thendral/POC/vapor/Friends/.build/debug/Node.swiftmodule /Users/thendral/POC/vapor/Friends/.build/debug/PathIndexable.swiftmodule /Users/thendral/POC/vapor/Friends/.build/debug/Polymorphic.swiftmodule
D
/Users/sjwu/video/HouseHold/Build/Intermediates/Pods.build/Debug-iphonesimulator/RxSwift.build/Objects-normal/x86_64/AnonymousDisposable.o : /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/Amb.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/SingleAsync.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/DistinctUntilChanged.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/Deferred.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Deprecated.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/Enumerated.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Traits/Maybe.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/AsMaybe.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/Sequence.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/Platform/DataStructures/InfiniteSequence.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Traits/ObservableType+PrimitiveSequence.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Traits/PrimitiveSequence.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/Debounce.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/Reduce.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/Range.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/Merge.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/Take.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Cancelable.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Disposable.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Disposables/ScheduledDisposable.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Disposables/CompositeDisposable.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Disposables/SerialDisposable.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Disposables/BooleanDisposable.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Disposables/SubscriptionDisposable.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Disposables/NopDisposable.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Disposables/AnonymousDisposable.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Disposables/SingleAssignmentDisposable.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Disposables/RefCountDisposable.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Disposables/BinaryDisposable.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Traits/Completable.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observable.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/GroupedObservable.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Traits/Single.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/AsSingle.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/TakeWhile.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/SkipWhile.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/Sample.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/Throttle.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/ShareReplayScope.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Concurrency/SynchronizedUnsubscribeType.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Schedulers/Internal/InvocableType.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/ObservableType.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/ConnectableObservableType.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/ObservableConvertibleType.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Concurrency/SynchronizedDisposeType.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Schedulers/Internal/ScheduledItemType.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Concurrency/SynchronizedOnType.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/SchedulerType.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/ImmediateSchedulerType.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Concurrency/LockOwnerType.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Schedulers/VirtualTimeConverterType.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/ObserverType.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Subjects/SubjectType.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Disposables/DisposeBase.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observers/ObserverBase.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/Create.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/Generate.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/Platform/DataStructures/Queue.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/Platform/DataStructures/PriorityQueue.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Reactive.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/Materialize.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/Dematerialize.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/AddRef.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/Platform/DataStructures/Bag.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Disposables/DisposeBag.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/Using.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/Debug.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/Catch.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/Switch.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/StartWith.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Concurrency/Lock.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Concurrency/AsyncLock.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/Platform/RecursiveLock.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/Sink.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observers/TailRecursiveSink.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/Optional.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/TakeUntil.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/SkipUntil.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Schedulers/Internal/ScheduledItem.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Schedulers/Internal/InvocableScheduledItem.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/WithLatestFrom.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/SubscribeOn.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/ObserveOn.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/Scan.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Traits/Completable+AndThen.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/RetryWhen.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/Platform/Platform.Darwin.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Schedulers/SchedulerServices+Emulation.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Schedulers/Internal/DispatchQueueConfiguration.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/Zip+Collection.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/CombineLatest+Collection.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/DelaySubscription.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/Do.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/Map.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/Zip.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/Skip.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/Producer.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/Buffer.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Schedulers/CurrentThreadScheduler.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Schedulers/VirtualTimeScheduler.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Schedulers/SerialDispatchQueueScheduler.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Schedulers/ConcurrentDispatchQueueScheduler.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Schedulers/OperationQueueScheduler.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Schedulers/RecursiveScheduler.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Schedulers/HistoricalScheduler.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Schedulers/MainScheduler.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Schedulers/ConcurrentMainScheduler.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/Timer.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/Filter.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Schedulers/HistoricalSchedulerTimeConverter.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/Never.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observers/AnonymousObserver.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/AnyObserver.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/Error.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Disposables/Disposables.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/ObservableType+Extensions.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/Platform/DispatchQueue+Extensions.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Errors.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/ElementAt.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/Concat.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/Repeat.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Subjects/AsyncSubject.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Subjects/PublishSubject.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Subjects/BehaviorSubject.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Subjects/ReplaySubject.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Event.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/SwiftSupport/SwiftSupport.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/TakeLast.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/Multicast.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/CombineLatest.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/First.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/Just.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/Timeout.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/Window.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Extensions/Bag+Rx.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Extensions/String+Rx.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Rx.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/RxMutableBox.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/Platform/Platform.Linux.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/GroupBy.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/Delay.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/ToArray.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Traits/PrimitiveSequence+Zip+arity.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/Zip+arity.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/CombineLatest+arity.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/Empty.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/SwitchIfEmpty.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/DefaultIfEmpty.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/sjwu/video/HouseHold/Pods/Target\ Support\ Files/RxSwift/RxSwift-umbrella.h /Users/sjwu/video/HouseHold/Build/Intermediates/Pods.build/Debug-iphonesimulator/RxSwift.build/unextended-module.modulemap /Users/sjwu/video/HouseHold/Build/Intermediates/Pods.build/Debug-iphonesimulator/RxSwift.build/Objects-normal/x86_64/AnonymousDisposable~partial.swiftmodule : /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/Amb.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/SingleAsync.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/DistinctUntilChanged.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/Deferred.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Deprecated.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/Enumerated.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Traits/Maybe.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/AsMaybe.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/Sequence.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/Platform/DataStructures/InfiniteSequence.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Traits/ObservableType+PrimitiveSequence.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Traits/PrimitiveSequence.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/Debounce.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/Reduce.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/Range.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/Merge.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/Take.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Cancelable.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Disposable.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Disposables/ScheduledDisposable.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Disposables/CompositeDisposable.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Disposables/SerialDisposable.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Disposables/BooleanDisposable.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Disposables/SubscriptionDisposable.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Disposables/NopDisposable.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Disposables/AnonymousDisposable.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Disposables/SingleAssignmentDisposable.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Disposables/RefCountDisposable.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Disposables/BinaryDisposable.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Traits/Completable.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observable.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/GroupedObservable.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Traits/Single.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/AsSingle.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/TakeWhile.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/SkipWhile.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/Sample.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/Throttle.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/ShareReplayScope.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Concurrency/SynchronizedUnsubscribeType.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Schedulers/Internal/InvocableType.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/ObservableType.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/ConnectableObservableType.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/ObservableConvertibleType.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Concurrency/SynchronizedDisposeType.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Schedulers/Internal/ScheduledItemType.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Concurrency/SynchronizedOnType.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/SchedulerType.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/ImmediateSchedulerType.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Concurrency/LockOwnerType.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Schedulers/VirtualTimeConverterType.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/ObserverType.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Subjects/SubjectType.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Disposables/DisposeBase.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observers/ObserverBase.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/Create.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/Generate.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/Platform/DataStructures/Queue.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/Platform/DataStructures/PriorityQueue.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Reactive.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/Materialize.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/Dematerialize.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/AddRef.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/Platform/DataStructures/Bag.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Disposables/DisposeBag.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/Using.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/Debug.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/Catch.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/Switch.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/StartWith.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Concurrency/Lock.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Concurrency/AsyncLock.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/Platform/RecursiveLock.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/Sink.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observers/TailRecursiveSink.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/Optional.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/TakeUntil.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/SkipUntil.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Schedulers/Internal/ScheduledItem.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Schedulers/Internal/InvocableScheduledItem.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/WithLatestFrom.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/SubscribeOn.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/ObserveOn.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/Scan.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Traits/Completable+AndThen.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/RetryWhen.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/Platform/Platform.Darwin.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Schedulers/SchedulerServices+Emulation.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Schedulers/Internal/DispatchQueueConfiguration.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/Zip+Collection.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/CombineLatest+Collection.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/DelaySubscription.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/Do.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/Map.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/Zip.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/Skip.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/Producer.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/Buffer.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Schedulers/CurrentThreadScheduler.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Schedulers/VirtualTimeScheduler.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Schedulers/SerialDispatchQueueScheduler.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Schedulers/ConcurrentDispatchQueueScheduler.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Schedulers/OperationQueueScheduler.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Schedulers/RecursiveScheduler.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Schedulers/HistoricalScheduler.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Schedulers/MainScheduler.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Schedulers/ConcurrentMainScheduler.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/Timer.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/Filter.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Schedulers/HistoricalSchedulerTimeConverter.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/Never.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observers/AnonymousObserver.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/AnyObserver.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/Error.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Disposables/Disposables.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/ObservableType+Extensions.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/Platform/DispatchQueue+Extensions.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Errors.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/ElementAt.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/Concat.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/Repeat.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Subjects/AsyncSubject.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Subjects/PublishSubject.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Subjects/BehaviorSubject.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Subjects/ReplaySubject.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Event.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/SwiftSupport/SwiftSupport.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/TakeLast.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/Multicast.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/CombineLatest.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/First.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/Just.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/Timeout.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/Window.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Extensions/Bag+Rx.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Extensions/String+Rx.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Rx.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/RxMutableBox.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/Platform/Platform.Linux.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/GroupBy.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/Delay.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/ToArray.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Traits/PrimitiveSequence+Zip+arity.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/Zip+arity.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/CombineLatest+arity.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/Empty.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/SwitchIfEmpty.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/DefaultIfEmpty.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/sjwu/video/HouseHold/Pods/Target\ Support\ Files/RxSwift/RxSwift-umbrella.h /Users/sjwu/video/HouseHold/Build/Intermediates/Pods.build/Debug-iphonesimulator/RxSwift.build/unextended-module.modulemap /Users/sjwu/video/HouseHold/Build/Intermediates/Pods.build/Debug-iphonesimulator/RxSwift.build/Objects-normal/x86_64/AnonymousDisposable~partial.swiftdoc : /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/Amb.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/SingleAsync.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/DistinctUntilChanged.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/Deferred.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Deprecated.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/Enumerated.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Traits/Maybe.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/AsMaybe.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/Sequence.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/Platform/DataStructures/InfiniteSequence.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Traits/ObservableType+PrimitiveSequence.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Traits/PrimitiveSequence.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/Debounce.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/Reduce.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/Range.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/Merge.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/Take.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Cancelable.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Disposable.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Disposables/ScheduledDisposable.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Disposables/CompositeDisposable.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Disposables/SerialDisposable.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Disposables/BooleanDisposable.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Disposables/SubscriptionDisposable.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Disposables/NopDisposable.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Disposables/AnonymousDisposable.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Disposables/SingleAssignmentDisposable.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Disposables/RefCountDisposable.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Disposables/BinaryDisposable.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Traits/Completable.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observable.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/GroupedObservable.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Traits/Single.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/AsSingle.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/TakeWhile.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/SkipWhile.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/Sample.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/Throttle.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/ShareReplayScope.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Concurrency/SynchronizedUnsubscribeType.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Schedulers/Internal/InvocableType.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/ObservableType.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/ConnectableObservableType.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/ObservableConvertibleType.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Concurrency/SynchronizedDisposeType.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Schedulers/Internal/ScheduledItemType.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Concurrency/SynchronizedOnType.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/SchedulerType.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/ImmediateSchedulerType.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Concurrency/LockOwnerType.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Schedulers/VirtualTimeConverterType.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/ObserverType.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Subjects/SubjectType.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Disposables/DisposeBase.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observers/ObserverBase.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/Create.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/Generate.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/Platform/DataStructures/Queue.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/Platform/DataStructures/PriorityQueue.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Reactive.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/Materialize.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/Dematerialize.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/AddRef.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/Platform/DataStructures/Bag.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Disposables/DisposeBag.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/Using.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/Debug.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/Catch.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/Switch.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/StartWith.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Concurrency/Lock.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Concurrency/AsyncLock.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/Platform/RecursiveLock.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/Sink.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observers/TailRecursiveSink.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/Optional.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/TakeUntil.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/SkipUntil.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Schedulers/Internal/ScheduledItem.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Schedulers/Internal/InvocableScheduledItem.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/WithLatestFrom.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/SubscribeOn.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/ObserveOn.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/Scan.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Traits/Completable+AndThen.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/RetryWhen.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/Platform/Platform.Darwin.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Schedulers/SchedulerServices+Emulation.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Schedulers/Internal/DispatchQueueConfiguration.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/Zip+Collection.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/CombineLatest+Collection.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/DelaySubscription.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/Do.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/Map.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/Zip.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/Skip.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/Producer.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/Buffer.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Schedulers/CurrentThreadScheduler.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Schedulers/VirtualTimeScheduler.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Schedulers/SerialDispatchQueueScheduler.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Schedulers/ConcurrentDispatchQueueScheduler.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Schedulers/OperationQueueScheduler.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Schedulers/RecursiveScheduler.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Schedulers/HistoricalScheduler.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Schedulers/MainScheduler.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Schedulers/ConcurrentMainScheduler.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/Timer.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/Filter.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Schedulers/HistoricalSchedulerTimeConverter.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/Never.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observers/AnonymousObserver.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/AnyObserver.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/Error.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Disposables/Disposables.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/ObservableType+Extensions.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/Platform/DispatchQueue+Extensions.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Errors.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/ElementAt.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/Concat.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/Repeat.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Subjects/AsyncSubject.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Subjects/PublishSubject.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Subjects/BehaviorSubject.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Subjects/ReplaySubject.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Event.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/SwiftSupport/SwiftSupport.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/TakeLast.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/Multicast.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/CombineLatest.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/First.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/Just.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/Timeout.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/Window.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Extensions/Bag+Rx.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Extensions/String+Rx.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Rx.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/RxMutableBox.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/Platform/Platform.Linux.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/GroupBy.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/Delay.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/ToArray.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Traits/PrimitiveSequence+Zip+arity.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/Zip+arity.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/CombineLatest+arity.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/Empty.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/SwitchIfEmpty.swift /Users/sjwu/video/HouseHold/Pods/RxSwift/RxSwift/Observables/DefaultIfEmpty.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/sjwu/video/HouseHold/Pods/Target\ Support\ Files/RxSwift/RxSwift-umbrella.h /Users/sjwu/video/HouseHold/Build/Intermediates/Pods.build/Debug-iphonesimulator/RxSwift.build/unextended-module.modulemap
D
//T compiles:yes //T has-passed:no //T retval:23 string s1 = "some string"; int main() { string s2 = "other string"; return cast(int) ((s1 ~ s2).length); }
D
a member of the Siouan people formerly living in Iowa and Minnesota and Missouri a state in midwestern United States a dialect of the Chiwere language spoken by the Iowa
D
// Copyright © 2011, Jakob Bornecrantz. All rights reserved. // See copyright notice in src/charge/charge.d (GPLv2 only). module miners.actors.sunlight; import charge.charge; import miners.world; /** * Represents the minecraft sun light, also controls the fog. */ class SunLight : GameActor { public: GfxSimpleLight gfx; GfxFog fog; double _procent; const defaultFogProcent = 0.35; const defaultFogColor = Color4f(89.0/255, 178.0/255, 220.0/255); public: this(World w) { super(w); gfx = new GfxSimpleLight(); w.gfx.add(gfx); fog = new GfxFog(); fog.stop = w.opts.viewDistance(); fog.color = defaultFogColor; procent = defaultFogProcent; w.gfx.fog = w.opts.fog() ? fog : null; shadow = w.opts.shadow(); w.opts.fog ~= &setFog; w.opts.shadow ~= &shadow; w.opts.viewDistance ~= &setViewDistance; } ~this() { w.gfx.remove(gfx); w.gfx.fog = null; delete gfx; delete fog; } final void shadow(bool shadow) { gfx.shadow = shadow; } final bool shadow() { return gfx.shadow; } final void procent(double p) { _procent = p; fog.start = fog.stop - fog.stop * p; } final double procent() { return _procent; } void setPosition(ref Point3d pos) { gfx.setPosition(pos); } void getPosition(out Point3d pos) { gfx.getPosition(pos); } void setRotation(ref Quatd rot) { gfx.setRotation(rot); } void getRotation(out Quatd rot) { gfx.getRotation(rot); } private: void setViewDistance(double dist) { fog.stop = dist; procent = _procent; } void setFog(bool b) { w.gfx.fog = b ? fog : null; } }
D
/// WinGL bindings for D. Generated automatically by gldgen. /// See https://github.com/rtbo/gldgen module gfx.bindings.opengl.wgl; version(Windows): import core.stdc.config : c_ulong; import core.sys.windows.windef; import core.sys.windows.wingdi; import gfx.bindings.opengl.loader : SymbolLoader; import gfx.bindings.opengl.gl; // Base Types // Types for WGL_NV_gpu_affinity alias PGPU_DEVICE = _GPU_DEVICE*; // Handle declarations alias HPBUFFERARB = void*; alias HPBUFFEREXT = void*; alias HGPUNV = void*; alias HVIDEOOUTPUTDEVICENV = void*; alias HVIDEOINPUTDEVICENV = void*; alias HPVIDEODEV = void*; // Struct definitions // Structs for WGL_NV_gpu_affinity struct _GPU_DEVICE { DWORD cb; CHAR[32] DeviceName; CHAR[128] DeviceString; DWORD Flags; RECT rcVirtualScreen; } // Constants for WGL_VERSION_1_0 enum WGL_FONT_LINES = 0; enum WGL_FONT_POLYGONS = 1; enum WGL_SWAP_MAIN_PLANE = 0x00000001; enum WGL_SWAP_OVERLAY1 = 0x00000002; enum WGL_SWAP_OVERLAY2 = 0x00000004; enum WGL_SWAP_OVERLAY3 = 0x00000008; enum WGL_SWAP_OVERLAY4 = 0x00000010; enum WGL_SWAP_OVERLAY5 = 0x00000020; enum WGL_SWAP_OVERLAY6 = 0x00000040; enum WGL_SWAP_OVERLAY7 = 0x00000080; enum WGL_SWAP_OVERLAY8 = 0x00000100; enum WGL_SWAP_OVERLAY9 = 0x00000200; enum WGL_SWAP_OVERLAY10 = 0x00000400; enum WGL_SWAP_OVERLAY11 = 0x00000800; enum WGL_SWAP_OVERLAY12 = 0x00001000; enum WGL_SWAP_OVERLAY13 = 0x00002000; enum WGL_SWAP_OVERLAY14 = 0x00004000; enum WGL_SWAP_OVERLAY15 = 0x00008000; enum WGL_SWAP_UNDERLAY1 = 0x00010000; enum WGL_SWAP_UNDERLAY2 = 0x00020000; enum WGL_SWAP_UNDERLAY3 = 0x00040000; enum WGL_SWAP_UNDERLAY4 = 0x00080000; enum WGL_SWAP_UNDERLAY5 = 0x00100000; enum WGL_SWAP_UNDERLAY6 = 0x00200000; enum WGL_SWAP_UNDERLAY7 = 0x00400000; enum WGL_SWAP_UNDERLAY8 = 0x00800000; enum WGL_SWAP_UNDERLAY9 = 0x01000000; enum WGL_SWAP_UNDERLAY10 = 0x02000000; enum WGL_SWAP_UNDERLAY11 = 0x04000000; enum WGL_SWAP_UNDERLAY12 = 0x08000000; enum WGL_SWAP_UNDERLAY13 = 0x10000000; enum WGL_SWAP_UNDERLAY14 = 0x20000000; enum WGL_SWAP_UNDERLAY15 = 0x40000000; // Constants for WGL_ARB_buffer_region enum WGL_FRONT_COLOR_BUFFER_BIT_ARB = 0x00000001; enum WGL_BACK_COLOR_BUFFER_BIT_ARB = 0x00000002; enum WGL_DEPTH_BUFFER_BIT_ARB = 0x00000004; enum WGL_STENCIL_BUFFER_BIT_ARB = 0x00000008; // Constants for WGL_ARB_context_flush_control enum WGL_CONTEXT_RELEASE_BEHAVIOR_ARB = 0x2097; enum WGL_CONTEXT_RELEASE_BEHAVIOR_NONE_ARB = 0; enum WGL_CONTEXT_RELEASE_BEHAVIOR_FLUSH_ARB = 0x2098; // Constants for WGL_ARB_create_context enum WGL_CONTEXT_DEBUG_BIT_ARB = 0x00000001; enum WGL_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB = 0x00000002; enum WGL_CONTEXT_MAJOR_VERSION_ARB = 0x2091; enum WGL_CONTEXT_MINOR_VERSION_ARB = 0x2092; enum WGL_CONTEXT_LAYER_PLANE_ARB = 0x2093; enum WGL_CONTEXT_FLAGS_ARB = 0x2094; enum ERROR_INVALID_VERSION_ARB = 0x2095; // Constants for WGL_ARB_create_context_no_error enum WGL_CONTEXT_OPENGL_NO_ERROR_ARB = 0x31B3; // Constants for WGL_ARB_create_context_profile enum WGL_CONTEXT_PROFILE_MASK_ARB = 0x9126; enum WGL_CONTEXT_CORE_PROFILE_BIT_ARB = 0x00000001; enum WGL_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB = 0x00000002; enum ERROR_INVALID_PROFILE_ARB = 0x2096; // Constants for WGL_ARB_create_context_robustness enum WGL_CONTEXT_ROBUST_ACCESS_BIT_ARB = 0x00000004; enum WGL_LOSE_CONTEXT_ON_RESET_ARB = 0x8252; enum WGL_CONTEXT_RESET_NOTIFICATION_STRATEGY_ARB = 0x8256; enum WGL_NO_RESET_NOTIFICATION_ARB = 0x8261; // Constants for WGL_ARB_framebuffer_sRGB enum WGL_FRAMEBUFFER_SRGB_CAPABLE_ARB = 0x20A9; // Constants for WGL_ARB_make_current_read enum ERROR_INVALID_PIXEL_TYPE_ARB = 0x2043; enum ERROR_INCOMPATIBLE_DEVICE_CONTEXTS_ARB = 0x2054; // Constants for WGL_ARB_multisample enum WGL_SAMPLE_BUFFERS_ARB = 0x2041; enum WGL_SAMPLES_ARB = 0x2042; // Constants for WGL_ARB_pbuffer enum WGL_DRAW_TO_PBUFFER_ARB = 0x202D; enum WGL_MAX_PBUFFER_PIXELS_ARB = 0x202E; enum WGL_MAX_PBUFFER_WIDTH_ARB = 0x202F; enum WGL_MAX_PBUFFER_HEIGHT_ARB = 0x2030; enum WGL_PBUFFER_LARGEST_ARB = 0x2033; enum WGL_PBUFFER_WIDTH_ARB = 0x2034; enum WGL_PBUFFER_HEIGHT_ARB = 0x2035; enum WGL_PBUFFER_LOST_ARB = 0x2036; // Constants for WGL_ARB_pixel_format enum WGL_NUMBER_PIXEL_FORMATS_ARB = 0x2000; enum WGL_DRAW_TO_WINDOW_ARB = 0x2001; enum WGL_DRAW_TO_BITMAP_ARB = 0x2002; enum WGL_ACCELERATION_ARB = 0x2003; enum WGL_NEED_PALETTE_ARB = 0x2004; enum WGL_NEED_SYSTEM_PALETTE_ARB = 0x2005; enum WGL_SWAP_LAYER_BUFFERS_ARB = 0x2006; enum WGL_SWAP_METHOD_ARB = 0x2007; enum WGL_NUMBER_OVERLAYS_ARB = 0x2008; enum WGL_NUMBER_UNDERLAYS_ARB = 0x2009; enum WGL_TRANSPARENT_ARB = 0x200A; enum WGL_TRANSPARENT_RED_VALUE_ARB = 0x2037; enum WGL_TRANSPARENT_GREEN_VALUE_ARB = 0x2038; enum WGL_TRANSPARENT_BLUE_VALUE_ARB = 0x2039; enum WGL_TRANSPARENT_ALPHA_VALUE_ARB = 0x203A; enum WGL_TRANSPARENT_INDEX_VALUE_ARB = 0x203B; enum WGL_SHARE_DEPTH_ARB = 0x200C; enum WGL_SHARE_STENCIL_ARB = 0x200D; enum WGL_SHARE_ACCUM_ARB = 0x200E; enum WGL_SUPPORT_GDI_ARB = 0x200F; enum WGL_SUPPORT_OPENGL_ARB = 0x2010; enum WGL_DOUBLE_BUFFER_ARB = 0x2011; enum WGL_STEREO_ARB = 0x2012; enum WGL_PIXEL_TYPE_ARB = 0x2013; enum WGL_COLOR_BITS_ARB = 0x2014; enum WGL_RED_BITS_ARB = 0x2015; enum WGL_RED_SHIFT_ARB = 0x2016; enum WGL_GREEN_BITS_ARB = 0x2017; enum WGL_GREEN_SHIFT_ARB = 0x2018; enum WGL_BLUE_BITS_ARB = 0x2019; enum WGL_BLUE_SHIFT_ARB = 0x201A; enum WGL_ALPHA_BITS_ARB = 0x201B; enum WGL_ALPHA_SHIFT_ARB = 0x201C; enum WGL_ACCUM_BITS_ARB = 0x201D; enum WGL_ACCUM_RED_BITS_ARB = 0x201E; enum WGL_ACCUM_GREEN_BITS_ARB = 0x201F; enum WGL_ACCUM_BLUE_BITS_ARB = 0x2020; enum WGL_ACCUM_ALPHA_BITS_ARB = 0x2021; enum WGL_DEPTH_BITS_ARB = 0x2022; enum WGL_STENCIL_BITS_ARB = 0x2023; enum WGL_AUX_BUFFERS_ARB = 0x2024; enum WGL_NO_ACCELERATION_ARB = 0x2025; enum WGL_GENERIC_ACCELERATION_ARB = 0x2026; enum WGL_FULL_ACCELERATION_ARB = 0x2027; enum WGL_SWAP_EXCHANGE_ARB = 0x2028; enum WGL_SWAP_COPY_ARB = 0x2029; enum WGL_SWAP_UNDEFINED_ARB = 0x202A; enum WGL_TYPE_RGBA_ARB = 0x202B; enum WGL_TYPE_COLORINDEX_ARB = 0x202C; // Constants for WGL_ARB_pixel_format_float enum WGL_TYPE_RGBA_FLOAT_ARB = 0x21A0; // Constants for WGL_ARB_render_texture enum WGL_BIND_TO_TEXTURE_RGB_ARB = 0x2070; enum WGL_BIND_TO_TEXTURE_RGBA_ARB = 0x2071; enum WGL_TEXTURE_FORMAT_ARB = 0x2072; enum WGL_TEXTURE_TARGET_ARB = 0x2073; enum WGL_MIPMAP_TEXTURE_ARB = 0x2074; enum WGL_TEXTURE_RGB_ARB = 0x2075; enum WGL_TEXTURE_RGBA_ARB = 0x2076; enum WGL_NO_TEXTURE_ARB = 0x2077; enum WGL_TEXTURE_CUBE_MAP_ARB = 0x2078; enum WGL_TEXTURE_1D_ARB = 0x2079; enum WGL_TEXTURE_2D_ARB = 0x207A; enum WGL_MIPMAP_LEVEL_ARB = 0x207B; enum WGL_CUBE_MAP_FACE_ARB = 0x207C; enum WGL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB = 0x207D; enum WGL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB = 0x207E; enum WGL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB = 0x207F; enum WGL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB = 0x2080; enum WGL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB = 0x2081; enum WGL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB = 0x2082; enum WGL_FRONT_LEFT_ARB = 0x2083; enum WGL_FRONT_RIGHT_ARB = 0x2084; enum WGL_BACK_LEFT_ARB = 0x2085; enum WGL_BACK_RIGHT_ARB = 0x2086; enum WGL_AUX0_ARB = 0x2087; enum WGL_AUX1_ARB = 0x2088; enum WGL_AUX2_ARB = 0x2089; enum WGL_AUX3_ARB = 0x208A; enum WGL_AUX4_ARB = 0x208B; enum WGL_AUX5_ARB = 0x208C; enum WGL_AUX6_ARB = 0x208D; enum WGL_AUX7_ARB = 0x208E; enum WGL_AUX8_ARB = 0x208F; enum WGL_AUX9_ARB = 0x2090; // Constants for WGL_ARB_robustness_application_isolation enum WGL_CONTEXT_RESET_ISOLATION_BIT_ARB = 0x00000008; // Constants for WGL_3DFX_multisample enum WGL_SAMPLE_BUFFERS_3DFX = 0x2060; enum WGL_SAMPLES_3DFX = 0x2061; // Constants for WGL_3DL_stereo_control enum WGL_STEREO_EMITTER_ENABLE_3DL = 0x2055; enum WGL_STEREO_EMITTER_DISABLE_3DL = 0x2056; enum WGL_STEREO_POLARITY_NORMAL_3DL = 0x2057; enum WGL_STEREO_POLARITY_INVERT_3DL = 0x2058; // Constants for WGL_AMD_gpu_association enum WGL_GPU_VENDOR_AMD = 0x1F00; enum WGL_GPU_RENDERER_STRING_AMD = 0x1F01; enum WGL_GPU_OPENGL_VERSION_STRING_AMD = 0x1F02; enum WGL_GPU_FASTEST_TARGET_GPUS_AMD = 0x21A2; enum WGL_GPU_RAM_AMD = 0x21A3; enum WGL_GPU_CLOCK_AMD = 0x21A4; enum WGL_GPU_NUM_PIPES_AMD = 0x21A5; enum WGL_GPU_NUM_SIMD_AMD = 0x21A6; enum WGL_GPU_NUM_RB_AMD = 0x21A7; enum WGL_GPU_NUM_SPI_AMD = 0x21A8; // Constants for WGL_ATI_pixel_format_float enum WGL_TYPE_RGBA_FLOAT_ATI = 0x21A0; // Constants for WGL_ATI_render_texture_rectangle enum WGL_TEXTURE_RECTANGLE_ATI = 0x21A5; // Constants for WGL_EXT_colorspace enum WGL_COLORSPACE_EXT = 0x309D; enum WGL_COLORSPACE_SRGB_EXT = 0x3089; enum WGL_COLORSPACE_LINEAR_EXT = 0x308A; // Constants for WGL_EXT_create_context_es2_profile enum WGL_CONTEXT_ES2_PROFILE_BIT_EXT = 0x00000004; // Constants for WGL_EXT_create_context_es_profile enum WGL_CONTEXT_ES_PROFILE_BIT_EXT = 0x00000004; // Constants for WGL_EXT_depth_float enum WGL_DEPTH_FLOAT_EXT = 0x2040; // Constants for WGL_EXT_framebuffer_sRGB enum WGL_FRAMEBUFFER_SRGB_CAPABLE_EXT = 0x20A9; // Constants for WGL_EXT_make_current_read enum ERROR_INVALID_PIXEL_TYPE_EXT = 0x2043; // Constants for WGL_EXT_multisample enum WGL_SAMPLE_BUFFERS_EXT = 0x2041; enum WGL_SAMPLES_EXT = 0x2042; // Constants for WGL_EXT_pbuffer enum WGL_DRAW_TO_PBUFFER_EXT = 0x202D; enum WGL_MAX_PBUFFER_PIXELS_EXT = 0x202E; enum WGL_MAX_PBUFFER_WIDTH_EXT = 0x202F; enum WGL_MAX_PBUFFER_HEIGHT_EXT = 0x2030; enum WGL_OPTIMAL_PBUFFER_WIDTH_EXT = 0x2031; enum WGL_OPTIMAL_PBUFFER_HEIGHT_EXT = 0x2032; enum WGL_PBUFFER_LARGEST_EXT = 0x2033; enum WGL_PBUFFER_WIDTH_EXT = 0x2034; enum WGL_PBUFFER_HEIGHT_EXT = 0x2035; // Constants for WGL_EXT_pixel_format enum WGL_NUMBER_PIXEL_FORMATS_EXT = 0x2000; enum WGL_DRAW_TO_WINDOW_EXT = 0x2001; enum WGL_DRAW_TO_BITMAP_EXT = 0x2002; enum WGL_ACCELERATION_EXT = 0x2003; enum WGL_NEED_PALETTE_EXT = 0x2004; enum WGL_NEED_SYSTEM_PALETTE_EXT = 0x2005; enum WGL_SWAP_LAYER_BUFFERS_EXT = 0x2006; enum WGL_SWAP_METHOD_EXT = 0x2007; enum WGL_NUMBER_OVERLAYS_EXT = 0x2008; enum WGL_NUMBER_UNDERLAYS_EXT = 0x2009; enum WGL_TRANSPARENT_EXT = 0x200A; enum WGL_TRANSPARENT_VALUE_EXT = 0x200B; enum WGL_SHARE_DEPTH_EXT = 0x200C; enum WGL_SHARE_STENCIL_EXT = 0x200D; enum WGL_SHARE_ACCUM_EXT = 0x200E; enum WGL_SUPPORT_GDI_EXT = 0x200F; enum WGL_SUPPORT_OPENGL_EXT = 0x2010; enum WGL_DOUBLE_BUFFER_EXT = 0x2011; enum WGL_STEREO_EXT = 0x2012; enum WGL_PIXEL_TYPE_EXT = 0x2013; enum WGL_COLOR_BITS_EXT = 0x2014; enum WGL_RED_BITS_EXT = 0x2015; enum WGL_RED_SHIFT_EXT = 0x2016; enum WGL_GREEN_BITS_EXT = 0x2017; enum WGL_GREEN_SHIFT_EXT = 0x2018; enum WGL_BLUE_BITS_EXT = 0x2019; enum WGL_BLUE_SHIFT_EXT = 0x201A; enum WGL_ALPHA_BITS_EXT = 0x201B; enum WGL_ALPHA_SHIFT_EXT = 0x201C; enum WGL_ACCUM_BITS_EXT = 0x201D; enum WGL_ACCUM_RED_BITS_EXT = 0x201E; enum WGL_ACCUM_GREEN_BITS_EXT = 0x201F; enum WGL_ACCUM_BLUE_BITS_EXT = 0x2020; enum WGL_ACCUM_ALPHA_BITS_EXT = 0x2021; enum WGL_DEPTH_BITS_EXT = 0x2022; enum WGL_STENCIL_BITS_EXT = 0x2023; enum WGL_AUX_BUFFERS_EXT = 0x2024; enum WGL_NO_ACCELERATION_EXT = 0x2025; enum WGL_GENERIC_ACCELERATION_EXT = 0x2026; enum WGL_FULL_ACCELERATION_EXT = 0x2027; enum WGL_SWAP_EXCHANGE_EXT = 0x2028; enum WGL_SWAP_COPY_EXT = 0x2029; enum WGL_SWAP_UNDEFINED_EXT = 0x202A; enum WGL_TYPE_RGBA_EXT = 0x202B; enum WGL_TYPE_COLORINDEX_EXT = 0x202C; // Constants for WGL_EXT_pixel_format_packed_float enum WGL_TYPE_RGBA_UNSIGNED_FLOAT_EXT = 0x20A8; // Constants for WGL_I3D_digital_video_control enum WGL_DIGITAL_VIDEO_CURSOR_ALPHA_FRAMEBUFFER_I3D = 0x2050; enum WGL_DIGITAL_VIDEO_CURSOR_ALPHA_VALUE_I3D = 0x2051; enum WGL_DIGITAL_VIDEO_CURSOR_INCLUDED_I3D = 0x2052; enum WGL_DIGITAL_VIDEO_GAMMA_CORRECTED_I3D = 0x2053; // Constants for WGL_I3D_gamma enum WGL_GAMMA_TABLE_SIZE_I3D = 0x204E; enum WGL_GAMMA_EXCLUDE_DESKTOP_I3D = 0x204F; // Constants for WGL_I3D_genlock enum WGL_GENLOCK_SOURCE_MULTIVIEW_I3D = 0x2044; enum WGL_GENLOCK_SOURCE_EXTERNAL_SYNC_I3D = 0x2045; enum WGL_GENLOCK_SOURCE_EXTERNAL_FIELD_I3D = 0x2046; enum WGL_GENLOCK_SOURCE_EXTERNAL_TTL_I3D = 0x2047; enum WGL_GENLOCK_SOURCE_DIGITAL_SYNC_I3D = 0x2048; enum WGL_GENLOCK_SOURCE_DIGITAL_FIELD_I3D = 0x2049; enum WGL_GENLOCK_SOURCE_EDGE_FALLING_I3D = 0x204A; enum WGL_GENLOCK_SOURCE_EDGE_RISING_I3D = 0x204B; enum WGL_GENLOCK_SOURCE_EDGE_BOTH_I3D = 0x204C; // Constants for WGL_I3D_image_buffer enum WGL_IMAGE_BUFFER_MIN_ACCESS_I3D = 0x00000001; enum WGL_IMAGE_BUFFER_LOCK_I3D = 0x00000002; // Constants for WGL_NV_DX_interop enum WGL_ACCESS_READ_ONLY_NV = 0x00000000; enum WGL_ACCESS_READ_WRITE_NV = 0x00000001; enum WGL_ACCESS_WRITE_DISCARD_NV = 0x00000002; // Constants for WGL_NV_float_buffer enum WGL_FLOAT_COMPONENTS_NV = 0x20B0; enum WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_R_NV = 0x20B1; enum WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_RG_NV = 0x20B2; enum WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_RGB_NV = 0x20B3; enum WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_RGBA_NV = 0x20B4; enum WGL_TEXTURE_FLOAT_R_NV = 0x20B5; enum WGL_TEXTURE_FLOAT_RG_NV = 0x20B6; enum WGL_TEXTURE_FLOAT_RGB_NV = 0x20B7; enum WGL_TEXTURE_FLOAT_RGBA_NV = 0x20B8; // Constants for WGL_NV_gpu_affinity enum ERROR_INCOMPATIBLE_AFFINITY_MASKS_NV = 0x20D0; enum ERROR_MISSING_AFFINITY_MASK_NV = 0x20D1; // Constants for WGL_NV_multisample_coverage enum WGL_COVERAGE_SAMPLES_NV = 0x2042; enum WGL_COLOR_SAMPLES_NV = 0x20B9; // Constants for WGL_NV_present_video enum WGL_NUM_VIDEO_SLOTS_NV = 0x20F0; // Constants for WGL_NV_render_depth_texture enum WGL_BIND_TO_TEXTURE_DEPTH_NV = 0x20A3; enum WGL_BIND_TO_TEXTURE_RECTANGLE_DEPTH_NV = 0x20A4; enum WGL_DEPTH_TEXTURE_FORMAT_NV = 0x20A5; enum WGL_TEXTURE_DEPTH_COMPONENT_NV = 0x20A6; enum WGL_DEPTH_COMPONENT_NV = 0x20A7; // Constants for WGL_NV_render_texture_rectangle enum WGL_BIND_TO_TEXTURE_RECTANGLE_RGB_NV = 0x20A0; enum WGL_BIND_TO_TEXTURE_RECTANGLE_RGBA_NV = 0x20A1; enum WGL_TEXTURE_RECTANGLE_NV = 0x20A2; // Constants for WGL_NV_video_capture enum WGL_UNIQUE_ID_NV = 0x20CE; enum WGL_NUM_VIDEO_CAPTURE_SLOTS_NV = 0x20CF; // Constants for WGL_NV_video_output enum WGL_BIND_TO_VIDEO_RGB_NV = 0x20C0; enum WGL_BIND_TO_VIDEO_RGBA_NV = 0x20C1; enum WGL_BIND_TO_VIDEO_RGB_AND_DEPTH_NV = 0x20C2; enum WGL_VIDEO_OUT_COLOR_NV = 0x20C3; enum WGL_VIDEO_OUT_ALPHA_NV = 0x20C4; enum WGL_VIDEO_OUT_DEPTH_NV = 0x20C5; enum WGL_VIDEO_OUT_COLOR_AND_ALPHA_NV = 0x20C6; enum WGL_VIDEO_OUT_COLOR_AND_DEPTH_NV = 0x20C7; enum WGL_VIDEO_OUT_FRAME = 0x20C8; enum WGL_VIDEO_OUT_FIELD_1 = 0x20C9; enum WGL_VIDEO_OUT_FIELD_2 = 0x20CA; enum WGL_VIDEO_OUT_STACKED_FIELDS_1_2 = 0x20CB; enum WGL_VIDEO_OUT_STACKED_FIELDS_2_1 = 0x20CC; // Command pointer aliases extern(C) nothrow @nogc { // Command pointers for WGL_VERSION_1_0 alias PFN_wglCopyContext = BOOL function ( HGLRC hglrcSrc, HGLRC hglrcDst, UINT mask, ); alias PFN_wglCreateContext = HGLRC function ( HDC hDc, ); alias PFN_wglCreateLayerContext = HGLRC function ( HDC hDc, int level, ); alias PFN_wglDeleteContext = BOOL function ( HGLRC oldContext, ); alias PFN_wglDescribeLayerPlane = BOOL function ( HDC hDc, int pixelFormat, int layerPlane, UINT nBytes, const(LAYERPLANEDESCRIPTOR)* plpd, ); alias PFN_wglGetCurrentContext = HGLRC function (); alias PFN_wglGetCurrentDC = HDC function (); alias PFN_wglGetLayerPaletteEntries = int function ( HDC hdc, int iLayerPlane, int iStart, int cEntries, const(COLORREF)* pcr, ); alias PFN_wglGetProcAddress = PROC function ( LPCSTR lpszProc, ); alias PFN_wglMakeCurrent = BOOL function ( HDC hDc, HGLRC newContext, ); alias PFN_wglRealizeLayerPalette = BOOL function ( HDC hdc, int iLayerPlane, BOOL bRealize, ); alias PFN_wglSetLayerPaletteEntries = int function ( HDC hdc, int iLayerPlane, int iStart, int cEntries, const(COLORREF)* pcr, ); alias PFN_wglShareLists = BOOL function ( HGLRC hrcSrvShare, HGLRC hrcSrvSource, ); alias PFN_wglSwapLayerBuffers = BOOL function ( HDC hdc, UINT fuFlags, ); alias PFN_wglUseFontBitmaps = BOOL function ( HDC hDC, DWORD first, DWORD count, DWORD listBase, ); alias PFN_wglUseFontBitmapsA = BOOL function ( HDC hDC, DWORD first, DWORD count, DWORD listBase, ); alias PFN_wglUseFontBitmapsW = BOOL function ( HDC hDC, DWORD first, DWORD count, DWORD listBase, ); alias PFN_wglUseFontOutlines = BOOL function ( HDC hDC, DWORD first, DWORD count, DWORD listBase, FLOAT deviation, FLOAT extrusion, int format, LPGLYPHMETRICSFLOAT lpgmf, ); alias PFN_wglUseFontOutlinesA = BOOL function ( HDC hDC, DWORD first, DWORD count, DWORD listBase, FLOAT deviation, FLOAT extrusion, int format, LPGLYPHMETRICSFLOAT lpgmf, ); alias PFN_wglUseFontOutlinesW = BOOL function ( HDC hDC, DWORD first, DWORD count, DWORD listBase, FLOAT deviation, FLOAT extrusion, int format, LPGLYPHMETRICSFLOAT lpgmf, ); // Command pointers for WGL_ARB_buffer_region alias PFN_wglCreateBufferRegionARB = HANDLE function ( HDC hDC, int iLayerPlane, UINT uType, ); alias PFN_wglDeleteBufferRegionARB = VOID function ( HANDLE hRegion, ); alias PFN_wglSaveBufferRegionARB = BOOL function ( HANDLE hRegion, int x, int y, int width, int height, ); alias PFN_wglRestoreBufferRegionARB = BOOL function ( HANDLE hRegion, int x, int y, int width, int height, int xSrc, int ySrc, ); // Command pointers for WGL_ARB_create_context alias PFN_wglCreateContextAttribsARB = HGLRC function ( HDC hDC, HGLRC hShareContext, const(int)* attribList, ); // Command pointers for WGL_ARB_extensions_string alias PFN_wglGetExtensionsStringARB = const(char)* function ( HDC hdc, ); // Command pointers for WGL_ARB_make_current_read alias PFN_wglMakeContextCurrentARB = BOOL function ( HDC hDrawDC, HDC hReadDC, HGLRC hglrc, ); alias PFN_wglGetCurrentReadDCARB = HDC function (); // Command pointers for WGL_ARB_pbuffer alias PFN_wglCreatePbufferARB = HPBUFFERARB function ( HDC hDC, int iPixelFormat, int iWidth, int iHeight, const(int)* piAttribList, ); alias PFN_wglGetPbufferDCARB = HDC function ( HPBUFFERARB hPbuffer, ); alias PFN_wglReleasePbufferDCARB = int function ( HPBUFFERARB hPbuffer, HDC hDC, ); alias PFN_wglDestroyPbufferARB = BOOL function ( HPBUFFERARB hPbuffer, ); alias PFN_wglQueryPbufferARB = BOOL function ( HPBUFFERARB hPbuffer, int iAttribute, int* piValue, ); // Command pointers for WGL_ARB_pixel_format alias PFN_wglGetPixelFormatAttribivARB = BOOL function ( HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, const(int)* piAttributes, int* piValues, ); alias PFN_wglGetPixelFormatAttribfvARB = BOOL function ( HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, const(int)* piAttributes, FLOAT* pfValues, ); alias PFN_wglChoosePixelFormatARB = BOOL function ( HDC hdc, const(int)* piAttribIList, const(FLOAT)* pfAttribFList, UINT nMaxFormats, int* piFormats, UINT* nNumFormats, ); // Command pointers for WGL_ARB_render_texture alias PFN_wglBindTexImageARB = BOOL function ( HPBUFFERARB hPbuffer, int iBuffer, ); alias PFN_wglReleaseTexImageARB = BOOL function ( HPBUFFERARB hPbuffer, int iBuffer, ); alias PFN_wglSetPbufferAttribARB = BOOL function ( HPBUFFERARB hPbuffer, const(int)* piAttribList, ); // Command pointers for WGL_3DL_stereo_control alias PFN_wglSetStereoEmitterState3DL = BOOL function ( HDC hDC, UINT uState, ); // Command pointers for WGL_AMD_gpu_association alias PFN_wglGetGPUIDsAMD = UINT function ( UINT maxCount, UINT* ids, ); alias PFN_wglGetGPUInfoAMD = INT function ( UINT id, int property, GLenum dataType, UINT size, void* data, ); alias PFN_wglGetContextGPUIDAMD = UINT function ( HGLRC hglrc, ); alias PFN_wglCreateAssociatedContextAMD = HGLRC function ( UINT id, ); alias PFN_wglCreateAssociatedContextAttribsAMD = HGLRC function ( UINT id, HGLRC hShareContext, const(int)* attribList, ); alias PFN_wglDeleteAssociatedContextAMD = BOOL function ( HGLRC hglrc, ); alias PFN_wglMakeAssociatedContextCurrentAMD = BOOL function ( HGLRC hglrc, ); alias PFN_wglGetCurrentAssociatedContextAMD = HGLRC function (); alias PFN_wglBlitContextFramebufferAMD = VOID function ( HGLRC dstCtx, GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter, ); // Command pointers for WGL_EXT_display_color_table alias PFN_wglCreateDisplayColorTableEXT = GLboolean function ( GLushort id, ); alias PFN_wglLoadDisplayColorTableEXT = GLboolean function ( const(GLushort)* table, GLuint length, ); alias PFN_wglBindDisplayColorTableEXT = GLboolean function ( GLushort id, ); alias PFN_wglDestroyDisplayColorTableEXT = VOID function ( GLushort id, ); // Command pointers for WGL_EXT_extensions_string alias PFN_wglGetExtensionsStringEXT = const(char)* function (); // Command pointers for WGL_EXT_make_current_read alias PFN_wglMakeContextCurrentEXT = BOOL function ( HDC hDrawDC, HDC hReadDC, HGLRC hglrc, ); alias PFN_wglGetCurrentReadDCEXT = HDC function (); // Command pointers for WGL_EXT_pbuffer alias PFN_wglCreatePbufferEXT = HPBUFFEREXT function ( HDC hDC, int iPixelFormat, int iWidth, int iHeight, const(int)* piAttribList, ); alias PFN_wglGetPbufferDCEXT = HDC function ( HPBUFFEREXT hPbuffer, ); alias PFN_wglReleasePbufferDCEXT = int function ( HPBUFFEREXT hPbuffer, HDC hDC, ); alias PFN_wglDestroyPbufferEXT = BOOL function ( HPBUFFEREXT hPbuffer, ); alias PFN_wglQueryPbufferEXT = BOOL function ( HPBUFFEREXT hPbuffer, int iAttribute, int* piValue, ); // Command pointers for WGL_EXT_pixel_format alias PFN_wglGetPixelFormatAttribivEXT = BOOL function ( HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, int* piAttributes, int* piValues, ); alias PFN_wglGetPixelFormatAttribfvEXT = BOOL function ( HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, int* piAttributes, FLOAT* pfValues, ); alias PFN_wglChoosePixelFormatEXT = BOOL function ( HDC hdc, const(int)* piAttribIList, const(FLOAT)* pfAttribFList, UINT nMaxFormats, int* piFormats, UINT* nNumFormats, ); // Command pointers for WGL_EXT_swap_control alias PFN_wglSwapIntervalEXT = BOOL function ( int interval, ); alias PFN_wglGetSwapIntervalEXT = int function (); // Command pointers for WGL_I3D_digital_video_control alias PFN_wglGetDigitalVideoParametersI3D = BOOL function ( HDC hDC, int iAttribute, int* piValue, ); alias PFN_wglSetDigitalVideoParametersI3D = BOOL function ( HDC hDC, int iAttribute, const(int)* piValue, ); // Command pointers for WGL_I3D_gamma alias PFN_wglGetGammaTableParametersI3D = BOOL function ( HDC hDC, int iAttribute, int* piValue, ); alias PFN_wglSetGammaTableParametersI3D = BOOL function ( HDC hDC, int iAttribute, const(int)* piValue, ); alias PFN_wglGetGammaTableI3D = BOOL function ( HDC hDC, int iEntries, USHORT* puRed, USHORT* puGreen, USHORT* puBlue, ); alias PFN_wglSetGammaTableI3D = BOOL function ( HDC hDC, int iEntries, const(USHORT)* puRed, const(USHORT)* puGreen, const(USHORT)* puBlue, ); // Command pointers for WGL_I3D_genlock alias PFN_wglEnableGenlockI3D = BOOL function ( HDC hDC, ); alias PFN_wglDisableGenlockI3D = BOOL function ( HDC hDC, ); alias PFN_wglIsEnabledGenlockI3D = BOOL function ( HDC hDC, BOOL* pFlag, ); alias PFN_wglGenlockSourceI3D = BOOL function ( HDC hDC, UINT uSource, ); alias PFN_wglGetGenlockSourceI3D = BOOL function ( HDC hDC, UINT* uSource, ); alias PFN_wglGenlockSourceEdgeI3D = BOOL function ( HDC hDC, UINT uEdge, ); alias PFN_wglGetGenlockSourceEdgeI3D = BOOL function ( HDC hDC, UINT* uEdge, ); alias PFN_wglGenlockSampleRateI3D = BOOL function ( HDC hDC, UINT uRate, ); alias PFN_wglGetGenlockSampleRateI3D = BOOL function ( HDC hDC, UINT* uRate, ); alias PFN_wglGenlockSourceDelayI3D = BOOL function ( HDC hDC, UINT uDelay, ); alias PFN_wglGetGenlockSourceDelayI3D = BOOL function ( HDC hDC, UINT* uDelay, ); alias PFN_wglQueryGenlockMaxSourceDelayI3D = BOOL function ( HDC hDC, UINT* uMaxLineDelay, UINT* uMaxPixelDelay, ); // Command pointers for WGL_I3D_image_buffer alias PFN_wglCreateImageBufferI3D = LPVOID function ( HDC hDC, DWORD dwSize, UINT uFlags, ); alias PFN_wglDestroyImageBufferI3D = BOOL function ( HDC hDC, LPVOID pAddress, ); alias PFN_wglAssociateImageBufferEventsI3D = BOOL function ( HDC hDC, const(HANDLE)* pEvent, const(LPVOID)* pAddress, const(DWORD)* pSize, UINT count, ); alias PFN_wglReleaseImageBufferEventsI3D = BOOL function ( HDC hDC, const(LPVOID)* pAddress, UINT count, ); // Command pointers for WGL_I3D_swap_frame_lock alias PFN_wglEnableFrameLockI3D = BOOL function (); alias PFN_wglDisableFrameLockI3D = BOOL function (); alias PFN_wglIsEnabledFrameLockI3D = BOOL function ( BOOL* pFlag, ); alias PFN_wglQueryFrameLockMasterI3D = BOOL function ( BOOL* pFlag, ); // Command pointers for WGL_I3D_swap_frame_usage alias PFN_wglGetFrameUsageI3D = BOOL function ( float* pUsage, ); alias PFN_wglBeginFrameTrackingI3D = BOOL function (); alias PFN_wglEndFrameTrackingI3D = BOOL function (); alias PFN_wglQueryFrameTrackingI3D = BOOL function ( DWORD* pFrameCount, DWORD* pMissedFrames, float* pLastMissedUsage, ); // Command pointers for WGL_NV_DX_interop alias PFN_wglDXSetResourceShareHandleNV = BOOL function ( void* dxObject, HANDLE shareHandle, ); alias PFN_wglDXOpenDeviceNV = HANDLE function ( void* dxDevice, ); alias PFN_wglDXCloseDeviceNV = BOOL function ( HANDLE hDevice, ); alias PFN_wglDXRegisterObjectNV = HANDLE function ( HANDLE hDevice, void* dxObject, GLuint name, GLenum type, GLenum access, ); alias PFN_wglDXUnregisterObjectNV = BOOL function ( HANDLE hDevice, HANDLE hObject, ); alias PFN_wglDXObjectAccessNV = BOOL function ( HANDLE hObject, GLenum access, ); alias PFN_wglDXLockObjectsNV = BOOL function ( HANDLE hDevice, GLint count, HANDLE* hObjects, ); alias PFN_wglDXUnlockObjectsNV = BOOL function ( HANDLE hDevice, GLint count, HANDLE* hObjects, ); // Command pointers for WGL_NV_copy_image alias PFN_wglCopyImageSubDataNV = BOOL function ( HGLRC hSrcRC, GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, HGLRC hDstRC, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei width, GLsizei height, GLsizei depth, ); // Command pointers for WGL_NV_delay_before_swap alias PFN_wglDelayBeforeSwapNV = BOOL function ( HDC hDC, GLfloat seconds, ); // Command pointers for WGL_NV_gpu_affinity alias PFN_wglEnumGpusNV = BOOL function ( UINT iGpuIndex, HGPUNV* phGpu, ); alias PFN_wglEnumGpuDevicesNV = BOOL function ( HGPUNV hGpu, UINT iDeviceIndex, PGPU_DEVICE lpGpuDevice, ); alias PFN_wglCreateAffinityDCNV = HDC function ( const(HGPUNV)* phGpuList, ); alias PFN_wglEnumGpusFromAffinityDCNV = BOOL function ( HDC hAffinityDC, UINT iGpuIndex, HGPUNV* hGpu, ); alias PFN_wglDeleteDCNV = BOOL function ( HDC hdc, ); // Command pointers for WGL_NV_present_video alias PFN_wglEnumerateVideoDevicesNV = int function ( HDC hDC, HVIDEOOUTPUTDEVICENV* phDeviceList, ); alias PFN_wglBindVideoDeviceNV = BOOL function ( HDC hDC, uint uVideoSlot, HVIDEOOUTPUTDEVICENV hVideoDevice, const(int)* piAttribList, ); alias PFN_wglQueryCurrentContextNV = BOOL function ( int iAttribute, int* piValue, ); // Command pointers for WGL_NV_swap_group alias PFN_wglJoinSwapGroupNV = BOOL function ( HDC hDC, GLuint group, ); alias PFN_wglBindSwapBarrierNV = BOOL function ( GLuint group, GLuint barrier, ); alias PFN_wglQuerySwapGroupNV = BOOL function ( HDC hDC, GLuint* group, GLuint* barrier, ); alias PFN_wglQueryMaxSwapGroupsNV = BOOL function ( HDC hDC, GLuint* maxGroups, GLuint* maxBarriers, ); alias PFN_wglQueryFrameCountNV = BOOL function ( HDC hDC, GLuint* count, ); alias PFN_wglResetFrameCountNV = BOOL function ( HDC hDC, ); // Command pointers for WGL_NV_vertex_array_range alias PFN_wglAllocateMemoryNV = void * function ( GLsizei size, GLfloat readfreq, GLfloat writefreq, GLfloat priority, ); alias PFN_wglFreeMemoryNV = void function ( void* pointer, ); // Command pointers for WGL_NV_video_capture alias PFN_wglBindVideoCaptureDeviceNV = BOOL function ( UINT uVideoSlot, HVIDEOINPUTDEVICENV hDevice, ); alias PFN_wglEnumerateVideoCaptureDevicesNV = UINT function ( HDC hDc, HVIDEOINPUTDEVICENV* phDeviceList, ); alias PFN_wglLockVideoCaptureDeviceNV = BOOL function ( HDC hDc, HVIDEOINPUTDEVICENV hDevice, ); alias PFN_wglQueryVideoCaptureDeviceNV = BOOL function ( HDC hDc, HVIDEOINPUTDEVICENV hDevice, int iAttribute, int* piValue, ); alias PFN_wglReleaseVideoCaptureDeviceNV = BOOL function ( HDC hDc, HVIDEOINPUTDEVICENV hDevice, ); // Command pointers for WGL_NV_video_output alias PFN_wglGetVideoDeviceNV = BOOL function ( HDC hDC, int numDevices, HPVIDEODEV* hVideoDevice, ); alias PFN_wglReleaseVideoDeviceNV = BOOL function ( HPVIDEODEV hVideoDevice, ); alias PFN_wglBindVideoImageNV = BOOL function ( HPVIDEODEV hVideoDevice, HPBUFFERARB hPbuffer, int iVideoBuffer, ); alias PFN_wglReleaseVideoImageNV = BOOL function ( HPBUFFERARB hPbuffer, int iVideoBuffer, ); alias PFN_wglSendPbufferToVideoNV = BOOL function ( HPBUFFERARB hPbuffer, int iBufferType, c_ulong* pulCounterPbuffer, BOOL bBlock, ); alias PFN_wglGetVideoInfoNV = BOOL function ( HPVIDEODEV hpVideoDevice, c_ulong* pulCounterOutputPbuffer, c_ulong* pulCounterOutputVideo, ); // Command pointers for WGL_OML_sync_control alias PFN_wglGetSyncValuesOML = BOOL function ( HDC hdc, INT64* ust, INT64* msc, INT64* sbc, ); alias PFN_wglGetMscRateOML = BOOL function ( HDC hdc, INT32* numerator, INT32* denominator, ); alias PFN_wglSwapBuffersMscOML = INT64 function ( HDC hdc, INT64 target_msc, INT64 divisor, INT64 remainder, ); alias PFN_wglSwapLayerBuffersMscOML = INT64 function ( HDC hdc, int fuPlanes, INT64 target_msc, INT64 divisor, INT64 remainder, ); alias PFN_wglWaitForMscOML = BOOL function ( HDC hdc, INT64 target_msc, INT64 divisor, INT64 remainder, INT64* ust, INT64* msc, INT64* sbc, ); alias PFN_wglWaitForSbcOML = BOOL function ( HDC hdc, INT64 target_sbc, INT64* ust, INT64* msc, INT64* sbc, ); } /// WglVersion describes the version of WinGL enum WglVersion { wgl10 = 10, } /// WinGL loader base class final class Wgl { this(SymbolLoader loader) { // WGL_VERSION_1_0 _CopyContext = cast(PFN_wglCopyContext)loadSymbol(loader, "wglCopyContext", []); _CreateContext = cast(PFN_wglCreateContext)loadSymbol(loader, "wglCreateContext", []); _CreateLayerContext = cast(PFN_wglCreateLayerContext)loadSymbol(loader, "wglCreateLayerContext", []); _DeleteContext = cast(PFN_wglDeleteContext)loadSymbol(loader, "wglDeleteContext", []); _DescribeLayerPlane = cast(PFN_wglDescribeLayerPlane)loadSymbol(loader, "wglDescribeLayerPlane", []); _GetCurrentContext = cast(PFN_wglGetCurrentContext)loadSymbol(loader, "wglGetCurrentContext", []); _GetCurrentDC = cast(PFN_wglGetCurrentDC)loadSymbol(loader, "wglGetCurrentDC", []); _GetLayerPaletteEntries = cast(PFN_wglGetLayerPaletteEntries)loadSymbol(loader, "wglGetLayerPaletteEntries", []); _GetProcAddress = cast(PFN_wglGetProcAddress)loadSymbol(loader, "wglGetProcAddress", []); _MakeCurrent = cast(PFN_wglMakeCurrent)loadSymbol(loader, "wglMakeCurrent", []); _RealizeLayerPalette = cast(PFN_wglRealizeLayerPalette)loadSymbol(loader, "wglRealizeLayerPalette", []); _SetLayerPaletteEntries = cast(PFN_wglSetLayerPaletteEntries)loadSymbol(loader, "wglSetLayerPaletteEntries", []); _ShareLists = cast(PFN_wglShareLists)loadSymbol(loader, "wglShareLists", []); _SwapLayerBuffers = cast(PFN_wglSwapLayerBuffers)loadSymbol(loader, "wglSwapLayerBuffers", []); _UseFontBitmaps = cast(PFN_wglUseFontBitmaps)loadSymbol(loader, "wglUseFontBitmaps", []); _UseFontBitmapsA = cast(PFN_wglUseFontBitmapsA)loadSymbol(loader, "wglUseFontBitmapsA", []); _UseFontBitmapsW = cast(PFN_wglUseFontBitmapsW)loadSymbol(loader, "wglUseFontBitmapsW", []); _UseFontOutlines = cast(PFN_wglUseFontOutlines)loadSymbol(loader, "wglUseFontOutlines", []); _UseFontOutlinesA = cast(PFN_wglUseFontOutlinesA)loadSymbol(loader, "wglUseFontOutlinesA", []); _UseFontOutlinesW = cast(PFN_wglUseFontOutlinesW)loadSymbol(loader, "wglUseFontOutlinesW", []); // WGL_ARB_buffer_region, _CreateBufferRegionARB = cast(PFN_wglCreateBufferRegionARB)loadSymbol(loader, "wglCreateBufferRegionARB", []); _DeleteBufferRegionARB = cast(PFN_wglDeleteBufferRegionARB)loadSymbol(loader, "wglDeleteBufferRegionARB", []); _SaveBufferRegionARB = cast(PFN_wglSaveBufferRegionARB)loadSymbol(loader, "wglSaveBufferRegionARB", []); _RestoreBufferRegionARB = cast(PFN_wglRestoreBufferRegionARB)loadSymbol(loader, "wglRestoreBufferRegionARB", []); // WGL_ARB_create_context, _CreateContextAttribsARB = cast(PFN_wglCreateContextAttribsARB)loadSymbol(loader, "wglCreateContextAttribsARB", []); // WGL_ARB_extensions_string, _GetExtensionsStringARB = cast(PFN_wglGetExtensionsStringARB)loadSymbol(loader, "wglGetExtensionsStringARB", []); // WGL_ARB_make_current_read, _MakeContextCurrentARB = cast(PFN_wglMakeContextCurrentARB)loadSymbol(loader, "wglMakeContextCurrentARB", []); _GetCurrentReadDCARB = cast(PFN_wglGetCurrentReadDCARB)loadSymbol(loader, "wglGetCurrentReadDCARB", []); // WGL_ARB_pbuffer, _CreatePbufferARB = cast(PFN_wglCreatePbufferARB)loadSymbol(loader, "wglCreatePbufferARB", []); _GetPbufferDCARB = cast(PFN_wglGetPbufferDCARB)loadSymbol(loader, "wglGetPbufferDCARB", []); _ReleasePbufferDCARB = cast(PFN_wglReleasePbufferDCARB)loadSymbol(loader, "wglReleasePbufferDCARB", []); _DestroyPbufferARB = cast(PFN_wglDestroyPbufferARB)loadSymbol(loader, "wglDestroyPbufferARB", []); _QueryPbufferARB = cast(PFN_wglQueryPbufferARB)loadSymbol(loader, "wglQueryPbufferARB", []); // WGL_ARB_pixel_format, _GetPixelFormatAttribivARB = cast(PFN_wglGetPixelFormatAttribivARB)loadSymbol(loader, "wglGetPixelFormatAttribivARB", []); _GetPixelFormatAttribfvARB = cast(PFN_wglGetPixelFormatAttribfvARB)loadSymbol(loader, "wglGetPixelFormatAttribfvARB", []); _ChoosePixelFormatARB = cast(PFN_wglChoosePixelFormatARB)loadSymbol(loader, "wglChoosePixelFormatARB", []); // WGL_ARB_render_texture, _BindTexImageARB = cast(PFN_wglBindTexImageARB)loadSymbol(loader, "wglBindTexImageARB", []); _ReleaseTexImageARB = cast(PFN_wglReleaseTexImageARB)loadSymbol(loader, "wglReleaseTexImageARB", []); _SetPbufferAttribARB = cast(PFN_wglSetPbufferAttribARB)loadSymbol(loader, "wglSetPbufferAttribARB", []); // WGL_3DL_stereo_control, _SetStereoEmitterState3DL = cast(PFN_wglSetStereoEmitterState3DL)loadSymbol(loader, "wglSetStereoEmitterState3DL", []); // WGL_AMD_gpu_association, _GetGPUIDsAMD = cast(PFN_wglGetGPUIDsAMD)loadSymbol(loader, "wglGetGPUIDsAMD", []); _GetGPUInfoAMD = cast(PFN_wglGetGPUInfoAMD)loadSymbol(loader, "wglGetGPUInfoAMD", []); _GetContextGPUIDAMD = cast(PFN_wglGetContextGPUIDAMD)loadSymbol(loader, "wglGetContextGPUIDAMD", []); _CreateAssociatedContextAMD = cast(PFN_wglCreateAssociatedContextAMD)loadSymbol(loader, "wglCreateAssociatedContextAMD", []); _CreateAssociatedContextAttribsAMD = cast(PFN_wglCreateAssociatedContextAttribsAMD)loadSymbol(loader, "wglCreateAssociatedContextAttribsAMD", []); _DeleteAssociatedContextAMD = cast(PFN_wglDeleteAssociatedContextAMD)loadSymbol(loader, "wglDeleteAssociatedContextAMD", []); _MakeAssociatedContextCurrentAMD = cast(PFN_wglMakeAssociatedContextCurrentAMD)loadSymbol(loader, "wglMakeAssociatedContextCurrentAMD", []); _GetCurrentAssociatedContextAMD = cast(PFN_wglGetCurrentAssociatedContextAMD)loadSymbol(loader, "wglGetCurrentAssociatedContextAMD", []); _BlitContextFramebufferAMD = cast(PFN_wglBlitContextFramebufferAMD)loadSymbol(loader, "wglBlitContextFramebufferAMD", []); // WGL_EXT_display_color_table, _CreateDisplayColorTableEXT = cast(PFN_wglCreateDisplayColorTableEXT)loadSymbol(loader, "wglCreateDisplayColorTableEXT", []); _LoadDisplayColorTableEXT = cast(PFN_wglLoadDisplayColorTableEXT)loadSymbol(loader, "wglLoadDisplayColorTableEXT", []); _BindDisplayColorTableEXT = cast(PFN_wglBindDisplayColorTableEXT)loadSymbol(loader, "wglBindDisplayColorTableEXT", []); _DestroyDisplayColorTableEXT = cast(PFN_wglDestroyDisplayColorTableEXT)loadSymbol(loader, "wglDestroyDisplayColorTableEXT", []); // WGL_EXT_extensions_string, _GetExtensionsStringEXT = cast(PFN_wglGetExtensionsStringEXT)loadSymbol(loader, "wglGetExtensionsStringEXT", []); // WGL_EXT_make_current_read, _MakeContextCurrentEXT = cast(PFN_wglMakeContextCurrentEXT)loadSymbol(loader, "wglMakeContextCurrentEXT", []); _GetCurrentReadDCEXT = cast(PFN_wglGetCurrentReadDCEXT)loadSymbol(loader, "wglGetCurrentReadDCEXT", []); // WGL_EXT_pbuffer, _CreatePbufferEXT = cast(PFN_wglCreatePbufferEXT)loadSymbol(loader, "wglCreatePbufferEXT", []); _GetPbufferDCEXT = cast(PFN_wglGetPbufferDCEXT)loadSymbol(loader, "wglGetPbufferDCEXT", []); _ReleasePbufferDCEXT = cast(PFN_wglReleasePbufferDCEXT)loadSymbol(loader, "wglReleasePbufferDCEXT", []); _DestroyPbufferEXT = cast(PFN_wglDestroyPbufferEXT)loadSymbol(loader, "wglDestroyPbufferEXT", []); _QueryPbufferEXT = cast(PFN_wglQueryPbufferEXT)loadSymbol(loader, "wglQueryPbufferEXT", []); // WGL_EXT_pixel_format, _GetPixelFormatAttribivEXT = cast(PFN_wglGetPixelFormatAttribivEXT)loadSymbol(loader, "wglGetPixelFormatAttribivEXT", []); _GetPixelFormatAttribfvEXT = cast(PFN_wglGetPixelFormatAttribfvEXT)loadSymbol(loader, "wglGetPixelFormatAttribfvEXT", []); _ChoosePixelFormatEXT = cast(PFN_wglChoosePixelFormatEXT)loadSymbol(loader, "wglChoosePixelFormatEXT", []); // WGL_EXT_swap_control, _SwapIntervalEXT = cast(PFN_wglSwapIntervalEXT)loadSymbol(loader, "wglSwapIntervalEXT", []); _GetSwapIntervalEXT = cast(PFN_wglGetSwapIntervalEXT)loadSymbol(loader, "wglGetSwapIntervalEXT", []); // WGL_I3D_digital_video_control, _GetDigitalVideoParametersI3D = cast(PFN_wglGetDigitalVideoParametersI3D)loadSymbol(loader, "wglGetDigitalVideoParametersI3D", []); _SetDigitalVideoParametersI3D = cast(PFN_wglSetDigitalVideoParametersI3D)loadSymbol(loader, "wglSetDigitalVideoParametersI3D", []); // WGL_I3D_gamma, _GetGammaTableParametersI3D = cast(PFN_wglGetGammaTableParametersI3D)loadSymbol(loader, "wglGetGammaTableParametersI3D", []); _SetGammaTableParametersI3D = cast(PFN_wglSetGammaTableParametersI3D)loadSymbol(loader, "wglSetGammaTableParametersI3D", []); _GetGammaTableI3D = cast(PFN_wglGetGammaTableI3D)loadSymbol(loader, "wglGetGammaTableI3D", []); _SetGammaTableI3D = cast(PFN_wglSetGammaTableI3D)loadSymbol(loader, "wglSetGammaTableI3D", []); // WGL_I3D_genlock, _EnableGenlockI3D = cast(PFN_wglEnableGenlockI3D)loadSymbol(loader, "wglEnableGenlockI3D", []); _DisableGenlockI3D = cast(PFN_wglDisableGenlockI3D)loadSymbol(loader, "wglDisableGenlockI3D", []); _IsEnabledGenlockI3D = cast(PFN_wglIsEnabledGenlockI3D)loadSymbol(loader, "wglIsEnabledGenlockI3D", []); _GenlockSourceI3D = cast(PFN_wglGenlockSourceI3D)loadSymbol(loader, "wglGenlockSourceI3D", []); _GetGenlockSourceI3D = cast(PFN_wglGetGenlockSourceI3D)loadSymbol(loader, "wglGetGenlockSourceI3D", []); _GenlockSourceEdgeI3D = cast(PFN_wglGenlockSourceEdgeI3D)loadSymbol(loader, "wglGenlockSourceEdgeI3D", []); _GetGenlockSourceEdgeI3D = cast(PFN_wglGetGenlockSourceEdgeI3D)loadSymbol(loader, "wglGetGenlockSourceEdgeI3D", []); _GenlockSampleRateI3D = cast(PFN_wglGenlockSampleRateI3D)loadSymbol(loader, "wglGenlockSampleRateI3D", []); _GetGenlockSampleRateI3D = cast(PFN_wglGetGenlockSampleRateI3D)loadSymbol(loader, "wglGetGenlockSampleRateI3D", []); _GenlockSourceDelayI3D = cast(PFN_wglGenlockSourceDelayI3D)loadSymbol(loader, "wglGenlockSourceDelayI3D", []); _GetGenlockSourceDelayI3D = cast(PFN_wglGetGenlockSourceDelayI3D)loadSymbol(loader, "wglGetGenlockSourceDelayI3D", []); _QueryGenlockMaxSourceDelayI3D = cast(PFN_wglQueryGenlockMaxSourceDelayI3D)loadSymbol(loader, "wglQueryGenlockMaxSourceDelayI3D", []); // WGL_I3D_image_buffer, _CreateImageBufferI3D = cast(PFN_wglCreateImageBufferI3D)loadSymbol(loader, "wglCreateImageBufferI3D", []); _DestroyImageBufferI3D = cast(PFN_wglDestroyImageBufferI3D)loadSymbol(loader, "wglDestroyImageBufferI3D", []); _AssociateImageBufferEventsI3D = cast(PFN_wglAssociateImageBufferEventsI3D)loadSymbol(loader, "wglAssociateImageBufferEventsI3D", []); _ReleaseImageBufferEventsI3D = cast(PFN_wglReleaseImageBufferEventsI3D)loadSymbol(loader, "wglReleaseImageBufferEventsI3D", []); // WGL_I3D_swap_frame_lock, _EnableFrameLockI3D = cast(PFN_wglEnableFrameLockI3D)loadSymbol(loader, "wglEnableFrameLockI3D", []); _DisableFrameLockI3D = cast(PFN_wglDisableFrameLockI3D)loadSymbol(loader, "wglDisableFrameLockI3D", []); _IsEnabledFrameLockI3D = cast(PFN_wglIsEnabledFrameLockI3D)loadSymbol(loader, "wglIsEnabledFrameLockI3D", []); _QueryFrameLockMasterI3D = cast(PFN_wglQueryFrameLockMasterI3D)loadSymbol(loader, "wglQueryFrameLockMasterI3D", []); // WGL_I3D_swap_frame_usage, _GetFrameUsageI3D = cast(PFN_wglGetFrameUsageI3D)loadSymbol(loader, "wglGetFrameUsageI3D", []); _BeginFrameTrackingI3D = cast(PFN_wglBeginFrameTrackingI3D)loadSymbol(loader, "wglBeginFrameTrackingI3D", []); _EndFrameTrackingI3D = cast(PFN_wglEndFrameTrackingI3D)loadSymbol(loader, "wglEndFrameTrackingI3D", []); _QueryFrameTrackingI3D = cast(PFN_wglQueryFrameTrackingI3D)loadSymbol(loader, "wglQueryFrameTrackingI3D", []); // WGL_NV_DX_interop, _DXSetResourceShareHandleNV = cast(PFN_wglDXSetResourceShareHandleNV)loadSymbol(loader, "wglDXSetResourceShareHandleNV", []); _DXOpenDeviceNV = cast(PFN_wglDXOpenDeviceNV)loadSymbol(loader, "wglDXOpenDeviceNV", []); _DXCloseDeviceNV = cast(PFN_wglDXCloseDeviceNV)loadSymbol(loader, "wglDXCloseDeviceNV", []); _DXRegisterObjectNV = cast(PFN_wglDXRegisterObjectNV)loadSymbol(loader, "wglDXRegisterObjectNV", []); _DXUnregisterObjectNV = cast(PFN_wglDXUnregisterObjectNV)loadSymbol(loader, "wglDXUnregisterObjectNV", []); _DXObjectAccessNV = cast(PFN_wglDXObjectAccessNV)loadSymbol(loader, "wglDXObjectAccessNV", []); _DXLockObjectsNV = cast(PFN_wglDXLockObjectsNV)loadSymbol(loader, "wglDXLockObjectsNV", []); _DXUnlockObjectsNV = cast(PFN_wglDXUnlockObjectsNV)loadSymbol(loader, "wglDXUnlockObjectsNV", []); // WGL_NV_copy_image, _CopyImageSubDataNV = cast(PFN_wglCopyImageSubDataNV)loadSymbol(loader, "wglCopyImageSubDataNV", []); // WGL_NV_delay_before_swap, _DelayBeforeSwapNV = cast(PFN_wglDelayBeforeSwapNV)loadSymbol(loader, "wglDelayBeforeSwapNV", []); // WGL_NV_gpu_affinity, _EnumGpusNV = cast(PFN_wglEnumGpusNV)loadSymbol(loader, "wglEnumGpusNV", []); _EnumGpuDevicesNV = cast(PFN_wglEnumGpuDevicesNV)loadSymbol(loader, "wglEnumGpuDevicesNV", []); _CreateAffinityDCNV = cast(PFN_wglCreateAffinityDCNV)loadSymbol(loader, "wglCreateAffinityDCNV", []); _EnumGpusFromAffinityDCNV = cast(PFN_wglEnumGpusFromAffinityDCNV)loadSymbol(loader, "wglEnumGpusFromAffinityDCNV", []); _DeleteDCNV = cast(PFN_wglDeleteDCNV)loadSymbol(loader, "wglDeleteDCNV", []); // WGL_NV_present_video, _EnumerateVideoDevicesNV = cast(PFN_wglEnumerateVideoDevicesNV)loadSymbol(loader, "wglEnumerateVideoDevicesNV", []); _BindVideoDeviceNV = cast(PFN_wglBindVideoDeviceNV)loadSymbol(loader, "wglBindVideoDeviceNV", []); _QueryCurrentContextNV = cast(PFN_wglQueryCurrentContextNV)loadSymbol(loader, "wglQueryCurrentContextNV", []); // WGL_NV_swap_group, _JoinSwapGroupNV = cast(PFN_wglJoinSwapGroupNV)loadSymbol(loader, "wglJoinSwapGroupNV", []); _BindSwapBarrierNV = cast(PFN_wglBindSwapBarrierNV)loadSymbol(loader, "wglBindSwapBarrierNV", []); _QuerySwapGroupNV = cast(PFN_wglQuerySwapGroupNV)loadSymbol(loader, "wglQuerySwapGroupNV", []); _QueryMaxSwapGroupsNV = cast(PFN_wglQueryMaxSwapGroupsNV)loadSymbol(loader, "wglQueryMaxSwapGroupsNV", []); _QueryFrameCountNV = cast(PFN_wglQueryFrameCountNV)loadSymbol(loader, "wglQueryFrameCountNV", []); _ResetFrameCountNV = cast(PFN_wglResetFrameCountNV)loadSymbol(loader, "wglResetFrameCountNV", []); // WGL_NV_vertex_array_range, _AllocateMemoryNV = cast(PFN_wglAllocateMemoryNV)loadSymbol(loader, "wglAllocateMemoryNV", []); _FreeMemoryNV = cast(PFN_wglFreeMemoryNV)loadSymbol(loader, "wglFreeMemoryNV", []); // WGL_NV_video_capture, _BindVideoCaptureDeviceNV = cast(PFN_wglBindVideoCaptureDeviceNV)loadSymbol(loader, "wglBindVideoCaptureDeviceNV", []); _EnumerateVideoCaptureDevicesNV = cast(PFN_wglEnumerateVideoCaptureDevicesNV)loadSymbol(loader, "wglEnumerateVideoCaptureDevicesNV", []); _LockVideoCaptureDeviceNV = cast(PFN_wglLockVideoCaptureDeviceNV)loadSymbol(loader, "wglLockVideoCaptureDeviceNV", []); _QueryVideoCaptureDeviceNV = cast(PFN_wglQueryVideoCaptureDeviceNV)loadSymbol(loader, "wglQueryVideoCaptureDeviceNV", []); _ReleaseVideoCaptureDeviceNV = cast(PFN_wglReleaseVideoCaptureDeviceNV)loadSymbol(loader, "wglReleaseVideoCaptureDeviceNV", []); // WGL_NV_video_output, _GetVideoDeviceNV = cast(PFN_wglGetVideoDeviceNV)loadSymbol(loader, "wglGetVideoDeviceNV", []); _ReleaseVideoDeviceNV = cast(PFN_wglReleaseVideoDeviceNV)loadSymbol(loader, "wglReleaseVideoDeviceNV", []); _BindVideoImageNV = cast(PFN_wglBindVideoImageNV)loadSymbol(loader, "wglBindVideoImageNV", []); _ReleaseVideoImageNV = cast(PFN_wglReleaseVideoImageNV)loadSymbol(loader, "wglReleaseVideoImageNV", []); _SendPbufferToVideoNV = cast(PFN_wglSendPbufferToVideoNV)loadSymbol(loader, "wglSendPbufferToVideoNV", []); _GetVideoInfoNV = cast(PFN_wglGetVideoInfoNV)loadSymbol(loader, "wglGetVideoInfoNV", []); // WGL_OML_sync_control, _GetSyncValuesOML = cast(PFN_wglGetSyncValuesOML)loadSymbol(loader, "wglGetSyncValuesOML", []); _GetMscRateOML = cast(PFN_wglGetMscRateOML)loadSymbol(loader, "wglGetMscRateOML", []); _SwapBuffersMscOML = cast(PFN_wglSwapBuffersMscOML)loadSymbol(loader, "wglSwapBuffersMscOML", []); _SwapLayerBuffersMscOML = cast(PFN_wglSwapLayerBuffersMscOML)loadSymbol(loader, "wglSwapLayerBuffersMscOML", []); _WaitForMscOML = cast(PFN_wglWaitForMscOML)loadSymbol(loader, "wglWaitForMscOML", []); _WaitForSbcOML = cast(PFN_wglWaitForSbcOML)loadSymbol(loader, "wglWaitForSbcOML", []); } private static void* loadSymbol(SymbolLoader loader, in string name, in string[] aliases) { void* sym = loader(name); if (sym) return sym; foreach (n; aliases) { sym = loader(n); if (sym) return sym; } return null; } /// Commands for WGL_VERSION_1_0 public BOOL CopyContext (HGLRC hglrcSrc, HGLRC hglrcDst, UINT mask) const { assert(_CopyContext !is null, "WinGL command wglCopyContext was not loaded"); return _CopyContext (hglrcSrc, hglrcDst, mask); } /// ditto public HGLRC CreateContext (HDC hDc) const { assert(_CreateContext !is null, "WinGL command wglCreateContext was not loaded"); return _CreateContext (hDc); } /// ditto public HGLRC CreateLayerContext (HDC hDc, int level) const { assert(_CreateLayerContext !is null, "WinGL command wglCreateLayerContext was not loaded"); return _CreateLayerContext (hDc, level); } /// ditto public BOOL DeleteContext (HGLRC oldContext) const { assert(_DeleteContext !is null, "WinGL command wglDeleteContext was not loaded"); return _DeleteContext (oldContext); } /// ditto public BOOL DescribeLayerPlane (HDC hDc, int pixelFormat, int layerPlane, UINT nBytes, const(LAYERPLANEDESCRIPTOR)* plpd) const { assert(_DescribeLayerPlane !is null, "WinGL command wglDescribeLayerPlane was not loaded"); return _DescribeLayerPlane (hDc, pixelFormat, layerPlane, nBytes, plpd); } /// ditto public HGLRC GetCurrentContext () const { assert(_GetCurrentContext !is null, "WinGL command wglGetCurrentContext was not loaded"); return _GetCurrentContext (); } /// ditto public HDC GetCurrentDC () const { assert(_GetCurrentDC !is null, "WinGL command wglGetCurrentDC was not loaded"); return _GetCurrentDC (); } /// ditto public int GetLayerPaletteEntries (HDC hdc, int iLayerPlane, int iStart, int cEntries, const(COLORREF)* pcr) const { assert(_GetLayerPaletteEntries !is null, "WinGL command wglGetLayerPaletteEntries was not loaded"); return _GetLayerPaletteEntries (hdc, iLayerPlane, iStart, cEntries, pcr); } /// ditto public PROC GetProcAddress (LPCSTR lpszProc) const { assert(_GetProcAddress !is null, "WinGL command wglGetProcAddress was not loaded"); return _GetProcAddress (lpszProc); } /// ditto public BOOL MakeCurrent (HDC hDc, HGLRC newContext) const { assert(_MakeCurrent !is null, "WinGL command wglMakeCurrent was not loaded"); return _MakeCurrent (hDc, newContext); } /// ditto public BOOL RealizeLayerPalette (HDC hdc, int iLayerPlane, BOOL bRealize) const { assert(_RealizeLayerPalette !is null, "WinGL command wglRealizeLayerPalette was not loaded"); return _RealizeLayerPalette (hdc, iLayerPlane, bRealize); } /// ditto public int SetLayerPaletteEntries (HDC hdc, int iLayerPlane, int iStart, int cEntries, const(COLORREF)* pcr) const { assert(_SetLayerPaletteEntries !is null, "WinGL command wglSetLayerPaletteEntries was not loaded"); return _SetLayerPaletteEntries (hdc, iLayerPlane, iStart, cEntries, pcr); } /// ditto public BOOL ShareLists (HGLRC hrcSrvShare, HGLRC hrcSrvSource) const { assert(_ShareLists !is null, "WinGL command wglShareLists was not loaded"); return _ShareLists (hrcSrvShare, hrcSrvSource); } /// ditto public BOOL SwapLayerBuffers (HDC hdc, UINT fuFlags) const { assert(_SwapLayerBuffers !is null, "WinGL command wglSwapLayerBuffers was not loaded"); return _SwapLayerBuffers (hdc, fuFlags); } /// ditto public BOOL UseFontBitmaps (HDC hDC, DWORD first, DWORD count, DWORD listBase) const { assert(_UseFontBitmaps !is null, "WinGL command wglUseFontBitmaps was not loaded"); return _UseFontBitmaps (hDC, first, count, listBase); } /// ditto public BOOL UseFontBitmapsA (HDC hDC, DWORD first, DWORD count, DWORD listBase) const { assert(_UseFontBitmapsA !is null, "WinGL command wglUseFontBitmapsA was not loaded"); return _UseFontBitmapsA (hDC, first, count, listBase); } /// ditto public BOOL UseFontBitmapsW (HDC hDC, DWORD first, DWORD count, DWORD listBase) const { assert(_UseFontBitmapsW !is null, "WinGL command wglUseFontBitmapsW was not loaded"); return _UseFontBitmapsW (hDC, first, count, listBase); } /// ditto public BOOL UseFontOutlines (HDC hDC, DWORD first, DWORD count, DWORD listBase, FLOAT deviation, FLOAT extrusion, int format, LPGLYPHMETRICSFLOAT lpgmf) const { assert(_UseFontOutlines !is null, "WinGL command wglUseFontOutlines was not loaded"); return _UseFontOutlines (hDC, first, count, listBase, deviation, extrusion, format, lpgmf); } /// ditto public BOOL UseFontOutlinesA (HDC hDC, DWORD first, DWORD count, DWORD listBase, FLOAT deviation, FLOAT extrusion, int format, LPGLYPHMETRICSFLOAT lpgmf) const { assert(_UseFontOutlinesA !is null, "WinGL command wglUseFontOutlinesA was not loaded"); return _UseFontOutlinesA (hDC, first, count, listBase, deviation, extrusion, format, lpgmf); } /// ditto public BOOL UseFontOutlinesW (HDC hDC, DWORD first, DWORD count, DWORD listBase, FLOAT deviation, FLOAT extrusion, int format, LPGLYPHMETRICSFLOAT lpgmf) const { assert(_UseFontOutlinesW !is null, "WinGL command wglUseFontOutlinesW was not loaded"); return _UseFontOutlinesW (hDC, first, count, listBase, deviation, extrusion, format, lpgmf); } /// Commands for WGL_ARB_buffer_region public HANDLE CreateBufferRegionARB (HDC hDC, int iLayerPlane, UINT uType) const { assert(_CreateBufferRegionARB !is null, "WinGL command wglCreateBufferRegionARB was not loaded"); return _CreateBufferRegionARB (hDC, iLayerPlane, uType); } /// ditto public VOID DeleteBufferRegionARB (HANDLE hRegion) const { assert(_DeleteBufferRegionARB !is null, "WinGL command wglDeleteBufferRegionARB was not loaded"); return _DeleteBufferRegionARB (hRegion); } /// ditto public BOOL SaveBufferRegionARB (HANDLE hRegion, int x, int y, int width, int height) const { assert(_SaveBufferRegionARB !is null, "WinGL command wglSaveBufferRegionARB was not loaded"); return _SaveBufferRegionARB (hRegion, x, y, width, height); } /// ditto public BOOL RestoreBufferRegionARB (HANDLE hRegion, int x, int y, int width, int height, int xSrc, int ySrc) const { assert(_RestoreBufferRegionARB !is null, "WinGL command wglRestoreBufferRegionARB was not loaded"); return _RestoreBufferRegionARB (hRegion, x, y, width, height, xSrc, ySrc); } /// Commands for WGL_ARB_create_context public HGLRC CreateContextAttribsARB (HDC hDC, HGLRC hShareContext, const(int)* attribList) const { assert(_CreateContextAttribsARB !is null, "WinGL command wglCreateContextAttribsARB was not loaded"); return _CreateContextAttribsARB (hDC, hShareContext, attribList); } /// Commands for WGL_ARB_extensions_string public const(char)* GetExtensionsStringARB (HDC hdc) const { assert(_GetExtensionsStringARB !is null, "WinGL command wglGetExtensionsStringARB was not loaded"); return _GetExtensionsStringARB (hdc); } /// Commands for WGL_ARB_make_current_read public BOOL MakeContextCurrentARB (HDC hDrawDC, HDC hReadDC, HGLRC hglrc) const { assert(_MakeContextCurrentARB !is null, "WinGL command wglMakeContextCurrentARB was not loaded"); return _MakeContextCurrentARB (hDrawDC, hReadDC, hglrc); } /// ditto public HDC GetCurrentReadDCARB () const { assert(_GetCurrentReadDCARB !is null, "WinGL command wglGetCurrentReadDCARB was not loaded"); return _GetCurrentReadDCARB (); } /// Commands for WGL_ARB_pbuffer public HPBUFFERARB CreatePbufferARB (HDC hDC, int iPixelFormat, int iWidth, int iHeight, const(int)* piAttribList) const { assert(_CreatePbufferARB !is null, "WinGL command wglCreatePbufferARB was not loaded"); return _CreatePbufferARB (hDC, iPixelFormat, iWidth, iHeight, piAttribList); } /// ditto public HDC GetPbufferDCARB (HPBUFFERARB hPbuffer) const { assert(_GetPbufferDCARB !is null, "WinGL command wglGetPbufferDCARB was not loaded"); return _GetPbufferDCARB (hPbuffer); } /// ditto public int ReleasePbufferDCARB (HPBUFFERARB hPbuffer, HDC hDC) const { assert(_ReleasePbufferDCARB !is null, "WinGL command wglReleasePbufferDCARB was not loaded"); return _ReleasePbufferDCARB (hPbuffer, hDC); } /// ditto public BOOL DestroyPbufferARB (HPBUFFERARB hPbuffer) const { assert(_DestroyPbufferARB !is null, "WinGL command wglDestroyPbufferARB was not loaded"); return _DestroyPbufferARB (hPbuffer); } /// ditto public BOOL QueryPbufferARB (HPBUFFERARB hPbuffer, int iAttribute, int* piValue) const { assert(_QueryPbufferARB !is null, "WinGL command wglQueryPbufferARB was not loaded"); return _QueryPbufferARB (hPbuffer, iAttribute, piValue); } /// Commands for WGL_ARB_pixel_format public BOOL GetPixelFormatAttribivARB (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, const(int)* piAttributes, int* piValues) const { assert(_GetPixelFormatAttribivARB !is null, "WinGL command wglGetPixelFormatAttribivARB was not loaded"); return _GetPixelFormatAttribivARB (hdc, iPixelFormat, iLayerPlane, nAttributes, piAttributes, piValues); } /// ditto public BOOL GetPixelFormatAttribfvARB (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, const(int)* piAttributes, FLOAT* pfValues) const { assert(_GetPixelFormatAttribfvARB !is null, "WinGL command wglGetPixelFormatAttribfvARB was not loaded"); return _GetPixelFormatAttribfvARB (hdc, iPixelFormat, iLayerPlane, nAttributes, piAttributes, pfValues); } /// ditto public BOOL ChoosePixelFormatARB (HDC hdc, const(int)* piAttribIList, const(FLOAT)* pfAttribFList, UINT nMaxFormats, int* piFormats, UINT* nNumFormats) const { assert(_ChoosePixelFormatARB !is null, "WinGL command wglChoosePixelFormatARB was not loaded"); return _ChoosePixelFormatARB (hdc, piAttribIList, pfAttribFList, nMaxFormats, piFormats, nNumFormats); } /// Commands for WGL_ARB_render_texture public BOOL BindTexImageARB (HPBUFFERARB hPbuffer, int iBuffer) const { assert(_BindTexImageARB !is null, "WinGL command wglBindTexImageARB was not loaded"); return _BindTexImageARB (hPbuffer, iBuffer); } /// ditto public BOOL ReleaseTexImageARB (HPBUFFERARB hPbuffer, int iBuffer) const { assert(_ReleaseTexImageARB !is null, "WinGL command wglReleaseTexImageARB was not loaded"); return _ReleaseTexImageARB (hPbuffer, iBuffer); } /// ditto public BOOL SetPbufferAttribARB (HPBUFFERARB hPbuffer, const(int)* piAttribList) const { assert(_SetPbufferAttribARB !is null, "WinGL command wglSetPbufferAttribARB was not loaded"); return _SetPbufferAttribARB (hPbuffer, piAttribList); } /// Commands for WGL_3DL_stereo_control public BOOL SetStereoEmitterState3DL (HDC hDC, UINT uState) const { assert(_SetStereoEmitterState3DL !is null, "WinGL command wglSetStereoEmitterState3DL was not loaded"); return _SetStereoEmitterState3DL (hDC, uState); } /// Commands for WGL_AMD_gpu_association public UINT GetGPUIDsAMD (UINT maxCount, UINT* ids) const { assert(_GetGPUIDsAMD !is null, "WinGL command wglGetGPUIDsAMD was not loaded"); return _GetGPUIDsAMD (maxCount, ids); } /// ditto public INT GetGPUInfoAMD (UINT id, int property, GLenum dataType, UINT size, void* data) const { assert(_GetGPUInfoAMD !is null, "WinGL command wglGetGPUInfoAMD was not loaded"); return _GetGPUInfoAMD (id, property, dataType, size, data); } /// ditto public UINT GetContextGPUIDAMD (HGLRC hglrc) const { assert(_GetContextGPUIDAMD !is null, "WinGL command wglGetContextGPUIDAMD was not loaded"); return _GetContextGPUIDAMD (hglrc); } /// ditto public HGLRC CreateAssociatedContextAMD (UINT id) const { assert(_CreateAssociatedContextAMD !is null, "WinGL command wglCreateAssociatedContextAMD was not loaded"); return _CreateAssociatedContextAMD (id); } /// ditto public HGLRC CreateAssociatedContextAttribsAMD (UINT id, HGLRC hShareContext, const(int)* attribList) const { assert(_CreateAssociatedContextAttribsAMD !is null, "WinGL command wglCreateAssociatedContextAttribsAMD was not loaded"); return _CreateAssociatedContextAttribsAMD (id, hShareContext, attribList); } /// ditto public BOOL DeleteAssociatedContextAMD (HGLRC hglrc) const { assert(_DeleteAssociatedContextAMD !is null, "WinGL command wglDeleteAssociatedContextAMD was not loaded"); return _DeleteAssociatedContextAMD (hglrc); } /// ditto public BOOL MakeAssociatedContextCurrentAMD (HGLRC hglrc) const { assert(_MakeAssociatedContextCurrentAMD !is null, "WinGL command wglMakeAssociatedContextCurrentAMD was not loaded"); return _MakeAssociatedContextCurrentAMD (hglrc); } /// ditto public HGLRC GetCurrentAssociatedContextAMD () const { assert(_GetCurrentAssociatedContextAMD !is null, "WinGL command wglGetCurrentAssociatedContextAMD was not loaded"); return _GetCurrentAssociatedContextAMD (); } /// ditto public VOID BlitContextFramebufferAMD (HGLRC dstCtx, GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter) const { assert(_BlitContextFramebufferAMD !is null, "WinGL command wglBlitContextFramebufferAMD was not loaded"); return _BlitContextFramebufferAMD (dstCtx, srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter); } /// Commands for WGL_EXT_display_color_table public GLboolean CreateDisplayColorTableEXT (GLushort id) const { assert(_CreateDisplayColorTableEXT !is null, "WinGL command wglCreateDisplayColorTableEXT was not loaded"); return _CreateDisplayColorTableEXT (id); } /// ditto public GLboolean LoadDisplayColorTableEXT (const(GLushort)* table, GLuint length) const { assert(_LoadDisplayColorTableEXT !is null, "WinGL command wglLoadDisplayColorTableEXT was not loaded"); return _LoadDisplayColorTableEXT (table, length); } /// ditto public GLboolean BindDisplayColorTableEXT (GLushort id) const { assert(_BindDisplayColorTableEXT !is null, "WinGL command wglBindDisplayColorTableEXT was not loaded"); return _BindDisplayColorTableEXT (id); } /// ditto public VOID DestroyDisplayColorTableEXT (GLushort id) const { assert(_DestroyDisplayColorTableEXT !is null, "WinGL command wglDestroyDisplayColorTableEXT was not loaded"); return _DestroyDisplayColorTableEXT (id); } /// Commands for WGL_EXT_extensions_string public const(char)* GetExtensionsStringEXT () const { assert(_GetExtensionsStringEXT !is null, "WinGL command wglGetExtensionsStringEXT was not loaded"); return _GetExtensionsStringEXT (); } /// Commands for WGL_EXT_make_current_read public BOOL MakeContextCurrentEXT (HDC hDrawDC, HDC hReadDC, HGLRC hglrc) const { assert(_MakeContextCurrentEXT !is null, "WinGL command wglMakeContextCurrentEXT was not loaded"); return _MakeContextCurrentEXT (hDrawDC, hReadDC, hglrc); } /// ditto public HDC GetCurrentReadDCEXT () const { assert(_GetCurrentReadDCEXT !is null, "WinGL command wglGetCurrentReadDCEXT was not loaded"); return _GetCurrentReadDCEXT (); } /// Commands for WGL_EXT_pbuffer public HPBUFFEREXT CreatePbufferEXT (HDC hDC, int iPixelFormat, int iWidth, int iHeight, const(int)* piAttribList) const { assert(_CreatePbufferEXT !is null, "WinGL command wglCreatePbufferEXT was not loaded"); return _CreatePbufferEXT (hDC, iPixelFormat, iWidth, iHeight, piAttribList); } /// ditto public HDC GetPbufferDCEXT (HPBUFFEREXT hPbuffer) const { assert(_GetPbufferDCEXT !is null, "WinGL command wglGetPbufferDCEXT was not loaded"); return _GetPbufferDCEXT (hPbuffer); } /// ditto public int ReleasePbufferDCEXT (HPBUFFEREXT hPbuffer, HDC hDC) const { assert(_ReleasePbufferDCEXT !is null, "WinGL command wglReleasePbufferDCEXT was not loaded"); return _ReleasePbufferDCEXT (hPbuffer, hDC); } /// ditto public BOOL DestroyPbufferEXT (HPBUFFEREXT hPbuffer) const { assert(_DestroyPbufferEXT !is null, "WinGL command wglDestroyPbufferEXT was not loaded"); return _DestroyPbufferEXT (hPbuffer); } /// ditto public BOOL QueryPbufferEXT (HPBUFFEREXT hPbuffer, int iAttribute, int* piValue) const { assert(_QueryPbufferEXT !is null, "WinGL command wglQueryPbufferEXT was not loaded"); return _QueryPbufferEXT (hPbuffer, iAttribute, piValue); } /// Commands for WGL_EXT_pixel_format public BOOL GetPixelFormatAttribivEXT (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, int* piAttributes, int* piValues) const { assert(_GetPixelFormatAttribivEXT !is null, "WinGL command wglGetPixelFormatAttribivEXT was not loaded"); return _GetPixelFormatAttribivEXT (hdc, iPixelFormat, iLayerPlane, nAttributes, piAttributes, piValues); } /// ditto public BOOL GetPixelFormatAttribfvEXT (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, int* piAttributes, FLOAT* pfValues) const { assert(_GetPixelFormatAttribfvEXT !is null, "WinGL command wglGetPixelFormatAttribfvEXT was not loaded"); return _GetPixelFormatAttribfvEXT (hdc, iPixelFormat, iLayerPlane, nAttributes, piAttributes, pfValues); } /// ditto public BOOL ChoosePixelFormatEXT (HDC hdc, const(int)* piAttribIList, const(FLOAT)* pfAttribFList, UINT nMaxFormats, int* piFormats, UINT* nNumFormats) const { assert(_ChoosePixelFormatEXT !is null, "WinGL command wglChoosePixelFormatEXT was not loaded"); return _ChoosePixelFormatEXT (hdc, piAttribIList, pfAttribFList, nMaxFormats, piFormats, nNumFormats); } /// Commands for WGL_EXT_swap_control public BOOL SwapIntervalEXT (int interval) const { assert(_SwapIntervalEXT !is null, "WinGL command wglSwapIntervalEXT was not loaded"); return _SwapIntervalEXT (interval); } /// ditto public int GetSwapIntervalEXT () const { assert(_GetSwapIntervalEXT !is null, "WinGL command wglGetSwapIntervalEXT was not loaded"); return _GetSwapIntervalEXT (); } /// Commands for WGL_I3D_digital_video_control public BOOL GetDigitalVideoParametersI3D (HDC hDC, int iAttribute, int* piValue) const { assert(_GetDigitalVideoParametersI3D !is null, "WinGL command wglGetDigitalVideoParametersI3D was not loaded"); return _GetDigitalVideoParametersI3D (hDC, iAttribute, piValue); } /// ditto public BOOL SetDigitalVideoParametersI3D (HDC hDC, int iAttribute, const(int)* piValue) const { assert(_SetDigitalVideoParametersI3D !is null, "WinGL command wglSetDigitalVideoParametersI3D was not loaded"); return _SetDigitalVideoParametersI3D (hDC, iAttribute, piValue); } /// Commands for WGL_I3D_gamma public BOOL GetGammaTableParametersI3D (HDC hDC, int iAttribute, int* piValue) const { assert(_GetGammaTableParametersI3D !is null, "WinGL command wglGetGammaTableParametersI3D was not loaded"); return _GetGammaTableParametersI3D (hDC, iAttribute, piValue); } /// ditto public BOOL SetGammaTableParametersI3D (HDC hDC, int iAttribute, const(int)* piValue) const { assert(_SetGammaTableParametersI3D !is null, "WinGL command wglSetGammaTableParametersI3D was not loaded"); return _SetGammaTableParametersI3D (hDC, iAttribute, piValue); } /// ditto public BOOL GetGammaTableI3D (HDC hDC, int iEntries, USHORT* puRed, USHORT* puGreen, USHORT* puBlue) const { assert(_GetGammaTableI3D !is null, "WinGL command wglGetGammaTableI3D was not loaded"); return _GetGammaTableI3D (hDC, iEntries, puRed, puGreen, puBlue); } /// ditto public BOOL SetGammaTableI3D (HDC hDC, int iEntries, const(USHORT)* puRed, const(USHORT)* puGreen, const(USHORT)* puBlue) const { assert(_SetGammaTableI3D !is null, "WinGL command wglSetGammaTableI3D was not loaded"); return _SetGammaTableI3D (hDC, iEntries, puRed, puGreen, puBlue); } /// Commands for WGL_I3D_genlock public BOOL EnableGenlockI3D (HDC hDC) const { assert(_EnableGenlockI3D !is null, "WinGL command wglEnableGenlockI3D was not loaded"); return _EnableGenlockI3D (hDC); } /// ditto public BOOL DisableGenlockI3D (HDC hDC) const { assert(_DisableGenlockI3D !is null, "WinGL command wglDisableGenlockI3D was not loaded"); return _DisableGenlockI3D (hDC); } /// ditto public BOOL IsEnabledGenlockI3D (HDC hDC, BOOL* pFlag) const { assert(_IsEnabledGenlockI3D !is null, "WinGL command wglIsEnabledGenlockI3D was not loaded"); return _IsEnabledGenlockI3D (hDC, pFlag); } /// ditto public BOOL GenlockSourceI3D (HDC hDC, UINT uSource) const { assert(_GenlockSourceI3D !is null, "WinGL command wglGenlockSourceI3D was not loaded"); return _GenlockSourceI3D (hDC, uSource); } /// ditto public BOOL GetGenlockSourceI3D (HDC hDC, UINT* uSource) const { assert(_GetGenlockSourceI3D !is null, "WinGL command wglGetGenlockSourceI3D was not loaded"); return _GetGenlockSourceI3D (hDC, uSource); } /// ditto public BOOL GenlockSourceEdgeI3D (HDC hDC, UINT uEdge) const { assert(_GenlockSourceEdgeI3D !is null, "WinGL command wglGenlockSourceEdgeI3D was not loaded"); return _GenlockSourceEdgeI3D (hDC, uEdge); } /// ditto public BOOL GetGenlockSourceEdgeI3D (HDC hDC, UINT* uEdge) const { assert(_GetGenlockSourceEdgeI3D !is null, "WinGL command wglGetGenlockSourceEdgeI3D was not loaded"); return _GetGenlockSourceEdgeI3D (hDC, uEdge); } /// ditto public BOOL GenlockSampleRateI3D (HDC hDC, UINT uRate) const { assert(_GenlockSampleRateI3D !is null, "WinGL command wglGenlockSampleRateI3D was not loaded"); return _GenlockSampleRateI3D (hDC, uRate); } /// ditto public BOOL GetGenlockSampleRateI3D (HDC hDC, UINT* uRate) const { assert(_GetGenlockSampleRateI3D !is null, "WinGL command wglGetGenlockSampleRateI3D was not loaded"); return _GetGenlockSampleRateI3D (hDC, uRate); } /// ditto public BOOL GenlockSourceDelayI3D (HDC hDC, UINT uDelay) const { assert(_GenlockSourceDelayI3D !is null, "WinGL command wglGenlockSourceDelayI3D was not loaded"); return _GenlockSourceDelayI3D (hDC, uDelay); } /// ditto public BOOL GetGenlockSourceDelayI3D (HDC hDC, UINT* uDelay) const { assert(_GetGenlockSourceDelayI3D !is null, "WinGL command wglGetGenlockSourceDelayI3D was not loaded"); return _GetGenlockSourceDelayI3D (hDC, uDelay); } /// ditto public BOOL QueryGenlockMaxSourceDelayI3D (HDC hDC, UINT* uMaxLineDelay, UINT* uMaxPixelDelay) const { assert(_QueryGenlockMaxSourceDelayI3D !is null, "WinGL command wglQueryGenlockMaxSourceDelayI3D was not loaded"); return _QueryGenlockMaxSourceDelayI3D (hDC, uMaxLineDelay, uMaxPixelDelay); } /// Commands for WGL_I3D_image_buffer public LPVOID CreateImageBufferI3D (HDC hDC, DWORD dwSize, UINT uFlags) const { assert(_CreateImageBufferI3D !is null, "WinGL command wglCreateImageBufferI3D was not loaded"); return _CreateImageBufferI3D (hDC, dwSize, uFlags); } /// ditto public BOOL DestroyImageBufferI3D (HDC hDC, LPVOID pAddress) const { assert(_DestroyImageBufferI3D !is null, "WinGL command wglDestroyImageBufferI3D was not loaded"); return _DestroyImageBufferI3D (hDC, pAddress); } /// ditto public BOOL AssociateImageBufferEventsI3D (HDC hDC, const(HANDLE)* pEvent, const(LPVOID)* pAddress, const(DWORD)* pSize, UINT count) const { assert(_AssociateImageBufferEventsI3D !is null, "WinGL command wglAssociateImageBufferEventsI3D was not loaded"); return _AssociateImageBufferEventsI3D (hDC, pEvent, pAddress, pSize, count); } /// ditto public BOOL ReleaseImageBufferEventsI3D (HDC hDC, const(LPVOID)* pAddress, UINT count) const { assert(_ReleaseImageBufferEventsI3D !is null, "WinGL command wglReleaseImageBufferEventsI3D was not loaded"); return _ReleaseImageBufferEventsI3D (hDC, pAddress, count); } /// Commands for WGL_I3D_swap_frame_lock public BOOL EnableFrameLockI3D () const { assert(_EnableFrameLockI3D !is null, "WinGL command wglEnableFrameLockI3D was not loaded"); return _EnableFrameLockI3D (); } /// ditto public BOOL DisableFrameLockI3D () const { assert(_DisableFrameLockI3D !is null, "WinGL command wglDisableFrameLockI3D was not loaded"); return _DisableFrameLockI3D (); } /// ditto public BOOL IsEnabledFrameLockI3D (BOOL* pFlag) const { assert(_IsEnabledFrameLockI3D !is null, "WinGL command wglIsEnabledFrameLockI3D was not loaded"); return _IsEnabledFrameLockI3D (pFlag); } /// ditto public BOOL QueryFrameLockMasterI3D (BOOL* pFlag) const { assert(_QueryFrameLockMasterI3D !is null, "WinGL command wglQueryFrameLockMasterI3D was not loaded"); return _QueryFrameLockMasterI3D (pFlag); } /// Commands for WGL_I3D_swap_frame_usage public BOOL GetFrameUsageI3D (float* pUsage) const { assert(_GetFrameUsageI3D !is null, "WinGL command wglGetFrameUsageI3D was not loaded"); return _GetFrameUsageI3D (pUsage); } /// ditto public BOOL BeginFrameTrackingI3D () const { assert(_BeginFrameTrackingI3D !is null, "WinGL command wglBeginFrameTrackingI3D was not loaded"); return _BeginFrameTrackingI3D (); } /// ditto public BOOL EndFrameTrackingI3D () const { assert(_EndFrameTrackingI3D !is null, "WinGL command wglEndFrameTrackingI3D was not loaded"); return _EndFrameTrackingI3D (); } /// ditto public BOOL QueryFrameTrackingI3D (DWORD* pFrameCount, DWORD* pMissedFrames, float* pLastMissedUsage) const { assert(_QueryFrameTrackingI3D !is null, "WinGL command wglQueryFrameTrackingI3D was not loaded"); return _QueryFrameTrackingI3D (pFrameCount, pMissedFrames, pLastMissedUsage); } /// Commands for WGL_NV_DX_interop public BOOL DXSetResourceShareHandleNV (void* dxObject, HANDLE shareHandle) const { assert(_DXSetResourceShareHandleNV !is null, "WinGL command wglDXSetResourceShareHandleNV was not loaded"); return _DXSetResourceShareHandleNV (dxObject, shareHandle); } /// ditto public HANDLE DXOpenDeviceNV (void* dxDevice) const { assert(_DXOpenDeviceNV !is null, "WinGL command wglDXOpenDeviceNV was not loaded"); return _DXOpenDeviceNV (dxDevice); } /// ditto public BOOL DXCloseDeviceNV (HANDLE hDevice) const { assert(_DXCloseDeviceNV !is null, "WinGL command wglDXCloseDeviceNV was not loaded"); return _DXCloseDeviceNV (hDevice); } /// ditto public HANDLE DXRegisterObjectNV (HANDLE hDevice, void* dxObject, GLuint name, GLenum type, GLenum access) const { assert(_DXRegisterObjectNV !is null, "WinGL command wglDXRegisterObjectNV was not loaded"); return _DXRegisterObjectNV (hDevice, dxObject, name, type, access); } /// ditto public BOOL DXUnregisterObjectNV (HANDLE hDevice, HANDLE hObject) const { assert(_DXUnregisterObjectNV !is null, "WinGL command wglDXUnregisterObjectNV was not loaded"); return _DXUnregisterObjectNV (hDevice, hObject); } /// ditto public BOOL DXObjectAccessNV (HANDLE hObject, GLenum access) const { assert(_DXObjectAccessNV !is null, "WinGL command wglDXObjectAccessNV was not loaded"); return _DXObjectAccessNV (hObject, access); } /// ditto public BOOL DXLockObjectsNV (HANDLE hDevice, GLint count, HANDLE* hObjects) const { assert(_DXLockObjectsNV !is null, "WinGL command wglDXLockObjectsNV was not loaded"); return _DXLockObjectsNV (hDevice, count, hObjects); } /// ditto public BOOL DXUnlockObjectsNV (HANDLE hDevice, GLint count, HANDLE* hObjects) const { assert(_DXUnlockObjectsNV !is null, "WinGL command wglDXUnlockObjectsNV was not loaded"); return _DXUnlockObjectsNV (hDevice, count, hObjects); } /// Commands for WGL_NV_copy_image public BOOL CopyImageSubDataNV (HGLRC hSrcRC, GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, HGLRC hDstRC, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei width, GLsizei height, GLsizei depth) const { assert(_CopyImageSubDataNV !is null, "WinGL command wglCopyImageSubDataNV was not loaded"); return _CopyImageSubDataNV (hSrcRC, srcName, srcTarget, srcLevel, srcX, srcY, srcZ, hDstRC, dstName, dstTarget, dstLevel, dstX, dstY, dstZ, width, height, depth); } /// Commands for WGL_NV_delay_before_swap public BOOL DelayBeforeSwapNV (HDC hDC, GLfloat seconds) const { assert(_DelayBeforeSwapNV !is null, "WinGL command wglDelayBeforeSwapNV was not loaded"); return _DelayBeforeSwapNV (hDC, seconds); } /// Commands for WGL_NV_gpu_affinity public BOOL EnumGpusNV (UINT iGpuIndex, HGPUNV* phGpu) const { assert(_EnumGpusNV !is null, "WinGL command wglEnumGpusNV was not loaded"); return _EnumGpusNV (iGpuIndex, phGpu); } /// ditto public BOOL EnumGpuDevicesNV (HGPUNV hGpu, UINT iDeviceIndex, PGPU_DEVICE lpGpuDevice) const { assert(_EnumGpuDevicesNV !is null, "WinGL command wglEnumGpuDevicesNV was not loaded"); return _EnumGpuDevicesNV (hGpu, iDeviceIndex, lpGpuDevice); } /// ditto public HDC CreateAffinityDCNV (const(HGPUNV)* phGpuList) const { assert(_CreateAffinityDCNV !is null, "WinGL command wglCreateAffinityDCNV was not loaded"); return _CreateAffinityDCNV (phGpuList); } /// ditto public BOOL EnumGpusFromAffinityDCNV (HDC hAffinityDC, UINT iGpuIndex, HGPUNV* hGpu) const { assert(_EnumGpusFromAffinityDCNV !is null, "WinGL command wglEnumGpusFromAffinityDCNV was not loaded"); return _EnumGpusFromAffinityDCNV (hAffinityDC, iGpuIndex, hGpu); } /// ditto public BOOL DeleteDCNV (HDC hdc) const { assert(_DeleteDCNV !is null, "WinGL command wglDeleteDCNV was not loaded"); return _DeleteDCNV (hdc); } /// Commands for WGL_NV_present_video public int EnumerateVideoDevicesNV (HDC hDC, HVIDEOOUTPUTDEVICENV* phDeviceList) const { assert(_EnumerateVideoDevicesNV !is null, "WinGL command wglEnumerateVideoDevicesNV was not loaded"); return _EnumerateVideoDevicesNV (hDC, phDeviceList); } /// ditto public BOOL BindVideoDeviceNV (HDC hDC, uint uVideoSlot, HVIDEOOUTPUTDEVICENV hVideoDevice, const(int)* piAttribList) const { assert(_BindVideoDeviceNV !is null, "WinGL command wglBindVideoDeviceNV was not loaded"); return _BindVideoDeviceNV (hDC, uVideoSlot, hVideoDevice, piAttribList); } /// ditto public BOOL QueryCurrentContextNV (int iAttribute, int* piValue) const { assert(_QueryCurrentContextNV !is null, "WinGL command wglQueryCurrentContextNV was not loaded"); return _QueryCurrentContextNV (iAttribute, piValue); } /// Commands for WGL_NV_swap_group public BOOL JoinSwapGroupNV (HDC hDC, GLuint group) const { assert(_JoinSwapGroupNV !is null, "WinGL command wglJoinSwapGroupNV was not loaded"); return _JoinSwapGroupNV (hDC, group); } /// ditto public BOOL BindSwapBarrierNV (GLuint group, GLuint barrier) const { assert(_BindSwapBarrierNV !is null, "WinGL command wglBindSwapBarrierNV was not loaded"); return _BindSwapBarrierNV (group, barrier); } /// ditto public BOOL QuerySwapGroupNV (HDC hDC, GLuint* group, GLuint* barrier) const { assert(_QuerySwapGroupNV !is null, "WinGL command wglQuerySwapGroupNV was not loaded"); return _QuerySwapGroupNV (hDC, group, barrier); } /// ditto public BOOL QueryMaxSwapGroupsNV (HDC hDC, GLuint* maxGroups, GLuint* maxBarriers) const { assert(_QueryMaxSwapGroupsNV !is null, "WinGL command wglQueryMaxSwapGroupsNV was not loaded"); return _QueryMaxSwapGroupsNV (hDC, maxGroups, maxBarriers); } /// ditto public BOOL QueryFrameCountNV (HDC hDC, GLuint* count) const { assert(_QueryFrameCountNV !is null, "WinGL command wglQueryFrameCountNV was not loaded"); return _QueryFrameCountNV (hDC, count); } /// ditto public BOOL ResetFrameCountNV (HDC hDC) const { assert(_ResetFrameCountNV !is null, "WinGL command wglResetFrameCountNV was not loaded"); return _ResetFrameCountNV (hDC); } /// Commands for WGL_NV_vertex_array_range public void * AllocateMemoryNV (GLsizei size, GLfloat readfreq, GLfloat writefreq, GLfloat priority) const { assert(_AllocateMemoryNV !is null, "WinGL command wglAllocateMemoryNV was not loaded"); return _AllocateMemoryNV (size, readfreq, writefreq, priority); } /// ditto public void FreeMemoryNV (void* pointer) const { assert(_FreeMemoryNV !is null, "WinGL command wglFreeMemoryNV was not loaded"); return _FreeMemoryNV (pointer); } /// Commands for WGL_NV_video_capture public BOOL BindVideoCaptureDeviceNV (UINT uVideoSlot, HVIDEOINPUTDEVICENV hDevice) const { assert(_BindVideoCaptureDeviceNV !is null, "WinGL command wglBindVideoCaptureDeviceNV was not loaded"); return _BindVideoCaptureDeviceNV (uVideoSlot, hDevice); } /// ditto public UINT EnumerateVideoCaptureDevicesNV (HDC hDc, HVIDEOINPUTDEVICENV* phDeviceList) const { assert(_EnumerateVideoCaptureDevicesNV !is null, "WinGL command wglEnumerateVideoCaptureDevicesNV was not loaded"); return _EnumerateVideoCaptureDevicesNV (hDc, phDeviceList); } /// ditto public BOOL LockVideoCaptureDeviceNV (HDC hDc, HVIDEOINPUTDEVICENV hDevice) const { assert(_LockVideoCaptureDeviceNV !is null, "WinGL command wglLockVideoCaptureDeviceNV was not loaded"); return _LockVideoCaptureDeviceNV (hDc, hDevice); } /// ditto public BOOL QueryVideoCaptureDeviceNV (HDC hDc, HVIDEOINPUTDEVICENV hDevice, int iAttribute, int* piValue) const { assert(_QueryVideoCaptureDeviceNV !is null, "WinGL command wglQueryVideoCaptureDeviceNV was not loaded"); return _QueryVideoCaptureDeviceNV (hDc, hDevice, iAttribute, piValue); } /// ditto public BOOL ReleaseVideoCaptureDeviceNV (HDC hDc, HVIDEOINPUTDEVICENV hDevice) const { assert(_ReleaseVideoCaptureDeviceNV !is null, "WinGL command wglReleaseVideoCaptureDeviceNV was not loaded"); return _ReleaseVideoCaptureDeviceNV (hDc, hDevice); } /// Commands for WGL_NV_video_output public BOOL GetVideoDeviceNV (HDC hDC, int numDevices, HPVIDEODEV* hVideoDevice) const { assert(_GetVideoDeviceNV !is null, "WinGL command wglGetVideoDeviceNV was not loaded"); return _GetVideoDeviceNV (hDC, numDevices, hVideoDevice); } /// ditto public BOOL ReleaseVideoDeviceNV (HPVIDEODEV hVideoDevice) const { assert(_ReleaseVideoDeviceNV !is null, "WinGL command wglReleaseVideoDeviceNV was not loaded"); return _ReleaseVideoDeviceNV (hVideoDevice); } /// ditto public BOOL BindVideoImageNV (HPVIDEODEV hVideoDevice, HPBUFFERARB hPbuffer, int iVideoBuffer) const { assert(_BindVideoImageNV !is null, "WinGL command wglBindVideoImageNV was not loaded"); return _BindVideoImageNV (hVideoDevice, hPbuffer, iVideoBuffer); } /// ditto public BOOL ReleaseVideoImageNV (HPBUFFERARB hPbuffer, int iVideoBuffer) const { assert(_ReleaseVideoImageNV !is null, "WinGL command wglReleaseVideoImageNV was not loaded"); return _ReleaseVideoImageNV (hPbuffer, iVideoBuffer); } /// ditto public BOOL SendPbufferToVideoNV (HPBUFFERARB hPbuffer, int iBufferType, c_ulong* pulCounterPbuffer, BOOL bBlock) const { assert(_SendPbufferToVideoNV !is null, "WinGL command wglSendPbufferToVideoNV was not loaded"); return _SendPbufferToVideoNV (hPbuffer, iBufferType, pulCounterPbuffer, bBlock); } /// ditto public BOOL GetVideoInfoNV (HPVIDEODEV hpVideoDevice, c_ulong* pulCounterOutputPbuffer, c_ulong* pulCounterOutputVideo) const { assert(_GetVideoInfoNV !is null, "WinGL command wglGetVideoInfoNV was not loaded"); return _GetVideoInfoNV (hpVideoDevice, pulCounterOutputPbuffer, pulCounterOutputVideo); } /// Commands for WGL_OML_sync_control public BOOL GetSyncValuesOML (HDC hdc, INT64* ust, INT64* msc, INT64* sbc) const { assert(_GetSyncValuesOML !is null, "WinGL command wglGetSyncValuesOML was not loaded"); return _GetSyncValuesOML (hdc, ust, msc, sbc); } /// ditto public BOOL GetMscRateOML (HDC hdc, INT32* numerator, INT32* denominator) const { assert(_GetMscRateOML !is null, "WinGL command wglGetMscRateOML was not loaded"); return _GetMscRateOML (hdc, numerator, denominator); } /// ditto public INT64 SwapBuffersMscOML (HDC hdc, INT64 target_msc, INT64 divisor, INT64 remainder) const { assert(_SwapBuffersMscOML !is null, "WinGL command wglSwapBuffersMscOML was not loaded"); return _SwapBuffersMscOML (hdc, target_msc, divisor, remainder); } /// ditto public INT64 SwapLayerBuffersMscOML (HDC hdc, int fuPlanes, INT64 target_msc, INT64 divisor, INT64 remainder) const { assert(_SwapLayerBuffersMscOML !is null, "WinGL command wglSwapLayerBuffersMscOML was not loaded"); return _SwapLayerBuffersMscOML (hdc, fuPlanes, target_msc, divisor, remainder); } /// ditto public BOOL WaitForMscOML (HDC hdc, INT64 target_msc, INT64 divisor, INT64 remainder, INT64* ust, INT64* msc, INT64* sbc) const { assert(_WaitForMscOML !is null, "WinGL command wglWaitForMscOML was not loaded"); return _WaitForMscOML (hdc, target_msc, divisor, remainder, ust, msc, sbc); } /// ditto public BOOL WaitForSbcOML (HDC hdc, INT64 target_sbc, INT64* ust, INT64* msc, INT64* sbc) const { assert(_WaitForSbcOML !is null, "WinGL command wglWaitForSbcOML was not loaded"); return _WaitForSbcOML (hdc, target_sbc, ust, msc, sbc); } // WGL_VERSION_1_0 private PFN_wglCopyContext _CopyContext; private PFN_wglCreateContext _CreateContext; private PFN_wglCreateLayerContext _CreateLayerContext; private PFN_wglDeleteContext _DeleteContext; private PFN_wglDescribeLayerPlane _DescribeLayerPlane; private PFN_wglGetCurrentContext _GetCurrentContext; private PFN_wglGetCurrentDC _GetCurrentDC; private PFN_wglGetLayerPaletteEntries _GetLayerPaletteEntries; private PFN_wglGetProcAddress _GetProcAddress; private PFN_wglMakeCurrent _MakeCurrent; private PFN_wglRealizeLayerPalette _RealizeLayerPalette; private PFN_wglSetLayerPaletteEntries _SetLayerPaletteEntries; private PFN_wglShareLists _ShareLists; private PFN_wglSwapLayerBuffers _SwapLayerBuffers; private PFN_wglUseFontBitmaps _UseFontBitmaps; private PFN_wglUseFontBitmapsA _UseFontBitmapsA; private PFN_wglUseFontBitmapsW _UseFontBitmapsW; private PFN_wglUseFontOutlines _UseFontOutlines; private PFN_wglUseFontOutlinesA _UseFontOutlinesA; private PFN_wglUseFontOutlinesW _UseFontOutlinesW; // WGL_ARB_buffer_region, private PFN_wglCreateBufferRegionARB _CreateBufferRegionARB; private PFN_wglDeleteBufferRegionARB _DeleteBufferRegionARB; private PFN_wglSaveBufferRegionARB _SaveBufferRegionARB; private PFN_wglRestoreBufferRegionARB _RestoreBufferRegionARB; // WGL_ARB_create_context, private PFN_wglCreateContextAttribsARB _CreateContextAttribsARB; // WGL_ARB_extensions_string, private PFN_wglGetExtensionsStringARB _GetExtensionsStringARB; // WGL_ARB_make_current_read, private PFN_wglMakeContextCurrentARB _MakeContextCurrentARB; private PFN_wglGetCurrentReadDCARB _GetCurrentReadDCARB; // WGL_ARB_pbuffer, private PFN_wglCreatePbufferARB _CreatePbufferARB; private PFN_wglGetPbufferDCARB _GetPbufferDCARB; private PFN_wglReleasePbufferDCARB _ReleasePbufferDCARB; private PFN_wglDestroyPbufferARB _DestroyPbufferARB; private PFN_wglQueryPbufferARB _QueryPbufferARB; // WGL_ARB_pixel_format, private PFN_wglGetPixelFormatAttribivARB _GetPixelFormatAttribivARB; private PFN_wglGetPixelFormatAttribfvARB _GetPixelFormatAttribfvARB; private PFN_wglChoosePixelFormatARB _ChoosePixelFormatARB; // WGL_ARB_render_texture, private PFN_wglBindTexImageARB _BindTexImageARB; private PFN_wglReleaseTexImageARB _ReleaseTexImageARB; private PFN_wglSetPbufferAttribARB _SetPbufferAttribARB; // WGL_3DL_stereo_control, private PFN_wglSetStereoEmitterState3DL _SetStereoEmitterState3DL; // WGL_AMD_gpu_association, private PFN_wglGetGPUIDsAMD _GetGPUIDsAMD; private PFN_wglGetGPUInfoAMD _GetGPUInfoAMD; private PFN_wglGetContextGPUIDAMD _GetContextGPUIDAMD; private PFN_wglCreateAssociatedContextAMD _CreateAssociatedContextAMD; private PFN_wglCreateAssociatedContextAttribsAMD _CreateAssociatedContextAttribsAMD; private PFN_wglDeleteAssociatedContextAMD _DeleteAssociatedContextAMD; private PFN_wglMakeAssociatedContextCurrentAMD _MakeAssociatedContextCurrentAMD; private PFN_wglGetCurrentAssociatedContextAMD _GetCurrentAssociatedContextAMD; private PFN_wglBlitContextFramebufferAMD _BlitContextFramebufferAMD; // WGL_EXT_display_color_table, private PFN_wglCreateDisplayColorTableEXT _CreateDisplayColorTableEXT; private PFN_wglLoadDisplayColorTableEXT _LoadDisplayColorTableEXT; private PFN_wglBindDisplayColorTableEXT _BindDisplayColorTableEXT; private PFN_wglDestroyDisplayColorTableEXT _DestroyDisplayColorTableEXT; // WGL_EXT_extensions_string, private PFN_wglGetExtensionsStringEXT _GetExtensionsStringEXT; // WGL_EXT_make_current_read, private PFN_wglMakeContextCurrentEXT _MakeContextCurrentEXT; private PFN_wglGetCurrentReadDCEXT _GetCurrentReadDCEXT; // WGL_EXT_pbuffer, private PFN_wglCreatePbufferEXT _CreatePbufferEXT; private PFN_wglGetPbufferDCEXT _GetPbufferDCEXT; private PFN_wglReleasePbufferDCEXT _ReleasePbufferDCEXT; private PFN_wglDestroyPbufferEXT _DestroyPbufferEXT; private PFN_wglQueryPbufferEXT _QueryPbufferEXT; // WGL_EXT_pixel_format, private PFN_wglGetPixelFormatAttribivEXT _GetPixelFormatAttribivEXT; private PFN_wglGetPixelFormatAttribfvEXT _GetPixelFormatAttribfvEXT; private PFN_wglChoosePixelFormatEXT _ChoosePixelFormatEXT; // WGL_EXT_swap_control, private PFN_wglSwapIntervalEXT _SwapIntervalEXT; private PFN_wglGetSwapIntervalEXT _GetSwapIntervalEXT; // WGL_I3D_digital_video_control, private PFN_wglGetDigitalVideoParametersI3D _GetDigitalVideoParametersI3D; private PFN_wglSetDigitalVideoParametersI3D _SetDigitalVideoParametersI3D; // WGL_I3D_gamma, private PFN_wglGetGammaTableParametersI3D _GetGammaTableParametersI3D; private PFN_wglSetGammaTableParametersI3D _SetGammaTableParametersI3D; private PFN_wglGetGammaTableI3D _GetGammaTableI3D; private PFN_wglSetGammaTableI3D _SetGammaTableI3D; // WGL_I3D_genlock, private PFN_wglEnableGenlockI3D _EnableGenlockI3D; private PFN_wglDisableGenlockI3D _DisableGenlockI3D; private PFN_wglIsEnabledGenlockI3D _IsEnabledGenlockI3D; private PFN_wglGenlockSourceI3D _GenlockSourceI3D; private PFN_wglGetGenlockSourceI3D _GetGenlockSourceI3D; private PFN_wglGenlockSourceEdgeI3D _GenlockSourceEdgeI3D; private PFN_wglGetGenlockSourceEdgeI3D _GetGenlockSourceEdgeI3D; private PFN_wglGenlockSampleRateI3D _GenlockSampleRateI3D; private PFN_wglGetGenlockSampleRateI3D _GetGenlockSampleRateI3D; private PFN_wglGenlockSourceDelayI3D _GenlockSourceDelayI3D; private PFN_wglGetGenlockSourceDelayI3D _GetGenlockSourceDelayI3D; private PFN_wglQueryGenlockMaxSourceDelayI3D _QueryGenlockMaxSourceDelayI3D; // WGL_I3D_image_buffer, private PFN_wglCreateImageBufferI3D _CreateImageBufferI3D; private PFN_wglDestroyImageBufferI3D _DestroyImageBufferI3D; private PFN_wglAssociateImageBufferEventsI3D _AssociateImageBufferEventsI3D; private PFN_wglReleaseImageBufferEventsI3D _ReleaseImageBufferEventsI3D; // WGL_I3D_swap_frame_lock, private PFN_wglEnableFrameLockI3D _EnableFrameLockI3D; private PFN_wglDisableFrameLockI3D _DisableFrameLockI3D; private PFN_wglIsEnabledFrameLockI3D _IsEnabledFrameLockI3D; private PFN_wglQueryFrameLockMasterI3D _QueryFrameLockMasterI3D; // WGL_I3D_swap_frame_usage, private PFN_wglGetFrameUsageI3D _GetFrameUsageI3D; private PFN_wglBeginFrameTrackingI3D _BeginFrameTrackingI3D; private PFN_wglEndFrameTrackingI3D _EndFrameTrackingI3D; private PFN_wglQueryFrameTrackingI3D _QueryFrameTrackingI3D; // WGL_NV_DX_interop, private PFN_wglDXSetResourceShareHandleNV _DXSetResourceShareHandleNV; private PFN_wglDXOpenDeviceNV _DXOpenDeviceNV; private PFN_wglDXCloseDeviceNV _DXCloseDeviceNV; private PFN_wglDXRegisterObjectNV _DXRegisterObjectNV; private PFN_wglDXUnregisterObjectNV _DXUnregisterObjectNV; private PFN_wglDXObjectAccessNV _DXObjectAccessNV; private PFN_wglDXLockObjectsNV _DXLockObjectsNV; private PFN_wglDXUnlockObjectsNV _DXUnlockObjectsNV; // WGL_NV_copy_image, private PFN_wglCopyImageSubDataNV _CopyImageSubDataNV; // WGL_NV_delay_before_swap, private PFN_wglDelayBeforeSwapNV _DelayBeforeSwapNV; // WGL_NV_gpu_affinity, private PFN_wglEnumGpusNV _EnumGpusNV; private PFN_wglEnumGpuDevicesNV _EnumGpuDevicesNV; private PFN_wglCreateAffinityDCNV _CreateAffinityDCNV; private PFN_wglEnumGpusFromAffinityDCNV _EnumGpusFromAffinityDCNV; private PFN_wglDeleteDCNV _DeleteDCNV; // WGL_NV_present_video, private PFN_wglEnumerateVideoDevicesNV _EnumerateVideoDevicesNV; private PFN_wglBindVideoDeviceNV _BindVideoDeviceNV; private PFN_wglQueryCurrentContextNV _QueryCurrentContextNV; // WGL_NV_swap_group, private PFN_wglJoinSwapGroupNV _JoinSwapGroupNV; private PFN_wglBindSwapBarrierNV _BindSwapBarrierNV; private PFN_wglQuerySwapGroupNV _QuerySwapGroupNV; private PFN_wglQueryMaxSwapGroupsNV _QueryMaxSwapGroupsNV; private PFN_wglQueryFrameCountNV _QueryFrameCountNV; private PFN_wglResetFrameCountNV _ResetFrameCountNV; // WGL_NV_vertex_array_range, private PFN_wglAllocateMemoryNV _AllocateMemoryNV; private PFN_wglFreeMemoryNV _FreeMemoryNV; // WGL_NV_video_capture, private PFN_wglBindVideoCaptureDeviceNV _BindVideoCaptureDeviceNV; private PFN_wglEnumerateVideoCaptureDevicesNV _EnumerateVideoCaptureDevicesNV; private PFN_wglLockVideoCaptureDeviceNV _LockVideoCaptureDeviceNV; private PFN_wglQueryVideoCaptureDeviceNV _QueryVideoCaptureDeviceNV; private PFN_wglReleaseVideoCaptureDeviceNV _ReleaseVideoCaptureDeviceNV; // WGL_NV_video_output, private PFN_wglGetVideoDeviceNV _GetVideoDeviceNV; private PFN_wglReleaseVideoDeviceNV _ReleaseVideoDeviceNV; private PFN_wglBindVideoImageNV _BindVideoImageNV; private PFN_wglReleaseVideoImageNV _ReleaseVideoImageNV; private PFN_wglSendPbufferToVideoNV _SendPbufferToVideoNV; private PFN_wglGetVideoInfoNV _GetVideoInfoNV; // WGL_OML_sync_control, private PFN_wglGetSyncValuesOML _GetSyncValuesOML; private PFN_wglGetMscRateOML _GetMscRateOML; private PFN_wglSwapBuffersMscOML _SwapBuffersMscOML; private PFN_wglSwapLayerBuffersMscOML _SwapLayerBuffersMscOML; private PFN_wglWaitForMscOML _WaitForMscOML; private PFN_wglWaitForSbcOML _WaitForSbcOML; }
D
module orelang.operator.ClassOperators; import orelang.operator.DynamicOperator, orelang.expression.ClassType, orelang.operator.IOperator, orelang.Closure, orelang.Engine, orelang.Value; class ClassOperator : IOperator { public Value call(Engine engine, Value[] args) { string className = engine.eval(args[0]).getString; Engine cEngine = engine.clone; if (args.length > 1) { foreach (member; args[1..$]) { cEngine.eval(member); } } if ("constructor" !in cEngine.variables.called) { cEngine.defineVariable("constructor", new Value(cast(IOperator)(new DynamicOperator((string[]).init, new Value)))); } ClassType clst = new ClassType(cEngine); Value cls = new Value(clst); engine.defineVariable(className, cls); return cls; } } class NewOperator : IOperator { public Value call(Engine engine, Value[] args) { string className; if (args[0].type == ValueType.SymbolValue) { className = args[0].getString; } else { className = engine.eval(args[0]).getString; } ClassType _cls = engine.getVariable(className).getClassType; ClassType cls = new ClassType(_cls._engine.clone); Value[] cArgs; if (args.length > 0) { foreach (arg; args[1..$]) { cArgs ~= engine.eval(arg); } } cls._engine.variables["constructor"].getIOperator.call(cls._engine, cArgs); return new Value(cls); } }
D
/** * cl4d - object-oriented wrapper for the OpenCL C API * written in the D programming language * * Copyright: * (c) 2009-2012 Andreas Hollandt * * License: * see LICENSE.txt */ module opencl.c.cl_dx9_media_sharing; import opencl.c.cl; version(Windows): extern(System): import core.sys.windows.windows; /****************************************************************************** /* cl_khr_dx9_media_sharing */ struct IDirect3DSurface9; struct cl_dx9_surface_info_khr { IDirect3DSurface9* resource; HANDLE shared_handle; } alias cl_uint cl_dx9_media_adapter_type_khr; alias cl_uint cl_dx9_media_adapter_set_khr; /******************************************************************************/ enum { // Error Codes CL_INVALID_DX9_MEDIA_ADAPTER_KHR = -1010, CL_INVALID_DX9_MEDIA_SURFACE_KHR = -1011, CL_DX9_MEDIA_SURFACE_ALREADY_ACQUIRED_KHR = -1012, CL_DX9_MEDIA_SURFACE_NOT_ACQUIRED_KHR = -1013, } enum cl_media_adapter_type_khr { CL_ADAPTER_D3D9_KHR = 0x2020, CL_ADAPTER_D3D9EX_KHR = 0x2021, CL_ADAPTER_DXVA_KHR = 0x2022, } mixin(bringToCurrentScope!cl_media_adapter_type_khr); enum cl_media_adapter_set_khr { CL_PREFERRED_DEVICES_FOR_DX9_MEDIA_ADAPTER_KHR = 0x2023, CL_ALL_DEVICES_FOR_DX9_MEDIA_ADAPTER_KHR = 0x2024, } mixin(bringToCurrentScope!cl_media_adapter_set_khr); enum { // cl_context_info CL_CONTEXT_D3D9_DEVICE_KHR = 0x2025, CL_CONTEXT_D3D9EX_DEVICE_KHR = 0x2026, CL_CONTEXT_DXVA_DEVICE_KHR = 0x2027, // cl_mem_info CL_MEM_DX9_MEDIA_ADAPTER_TYPE_KHR = 0x2028, CL_MEM_DX9_MEDIA_SURFACE_INFO_KHR = 0x2029, // cl_image_info CL_IMAGE_DX9_MEDIA_PLANE_KHR = 0x202A, // cl_command_type CL_COMMAND_ACQUIRE_DX9_MEDIA_SURFACES_KHR = 0x202B, CL_COMMAND_RELEASE_DX9_MEDIA_SURFACES_KHR = 0x202C, } /******************************************************************************/ alias extern(System) cl_int function( cl_platform_id platform, cl_dx9_media_adapter_type_khr media_adapter_type, void* media_adapter, cl_dx9_media_adapter_set_khr media_adapter_set, cl_uint num_entries, cl_device_id* devices, cl_uint* num_devices) clGetDeviceIDsForDX9MediaAdapterKHR_fn; alias extern(System) cl_mem function( cl_context context, cl_mem_flags flags, cl_dx9_media_adapter_type_khr adapter_type, void* surface_info, cl_uint plane, cl_int* errcode_ret) clCreateFromDX9MediaSurfaceKHR_fn; alias extern(System) cl_int function( cl_command_queue command_queue, cl_uint num_objects, const cl_mem* mem_objects, cl_uint num_events_in_wait_list, const cl_event* event_wait_list, cl_event* event) cl_intclEnqueueAcquireDX9MediaSurfacesKHR_fn; alias extern(System) cl_int function( cl_command_queue command_queue, cl_uint num_objects, cl_mem* mem_objects, cl_uint num_events_in_wait_list, const cl_event* event_wait_list, cl_event* event) cl_intclEnqueueReleaseDX9MediaSurfacesKHR_fn;
D
/** * Handles operator overloading. * * Specification: $(LINK2 https://dlang.org/spec/operatoroverloading.html, Operator Overloading) * * Copyright: Copyright (C) 1999-2023 by The D Language Foundation, All Rights Reserved * Authors: $(LINK2 https://www.digitalmars.com, Walter Bright) * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/opover.d, _opover.d) * Documentation: https://dlang.org/phobos/dmd_opover.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/opover.d */ module dmd.opover; import core.stdc.stdio; import dmd.aggregate; import dmd.aliasthis; import dmd.arraytypes; import dmd.astenums; import dmd.dclass; import dmd.declaration; import dmd.dscope; import dmd.dstruct; import dmd.dsymbol; import dmd.dtemplate; import dmd.errors; import dmd.expression; import dmd.expressionsem; import dmd.func; import dmd.globals; import dmd.hdrgen; import dmd.id; import dmd.identifier; import dmd.location; import dmd.mtype; import dmd.statement; import dmd.tokens; import dmd.typesem; import dmd.visitor; /*********************************** * Determine if operands of binary op can be reversed * to fit operator overload. */ bool isCommutative(EXP op) { switch (op) { case EXP.add: case EXP.mul: case EXP.and: case EXP.or: case EXP.xor: // EqualExp case EXP.equal: case EXP.notEqual: // CmpExp case EXP.lessThan: case EXP.lessOrEqual: case EXP.greaterThan: case EXP.greaterOrEqual: return true; default: break; } return false; } /*********************************** * Get Identifier for operator overload. */ private Identifier opId(Expression e) { switch (e.op) { case EXP.uadd: return Id.uadd; case EXP.negate: return Id.neg; case EXP.tilde: return Id.com; case EXP.cast_: return Id._cast; case EXP.in_: return Id.opIn; case EXP.plusPlus: return Id.postinc; case EXP.minusMinus: return Id.postdec; case EXP.add: return Id.add; case EXP.min: return Id.sub; case EXP.mul: return Id.mul; case EXP.div: return Id.div; case EXP.mod: return Id.mod; case EXP.pow: return Id.pow; case EXP.leftShift: return Id.shl; case EXP.rightShift: return Id.shr; case EXP.unsignedRightShift: return Id.ushr; case EXP.and: return Id.iand; case EXP.or: return Id.ior; case EXP.xor: return Id.ixor; case EXP.concatenate: return Id.cat; case EXP.assign: return Id.assign; case EXP.addAssign: return Id.addass; case EXP.minAssign: return Id.subass; case EXP.mulAssign: return Id.mulass; case EXP.divAssign: return Id.divass; case EXP.modAssign: return Id.modass; case EXP.powAssign: return Id.powass; case EXP.leftShiftAssign: return Id.shlass; case EXP.rightShiftAssign: return Id.shrass; case EXP.unsignedRightShiftAssign: return Id.ushrass; case EXP.andAssign: return Id.andass; case EXP.orAssign: return Id.orass; case EXP.xorAssign: return Id.xorass; case EXP.concatenateAssign: return Id.catass; case EXP.equal: return Id.eq; case EXP.lessThan: case EXP.lessOrEqual: case EXP.greaterThan: case EXP.greaterOrEqual: return Id.cmp; case EXP.array: return Id.index; case EXP.star: return Id.opStar; default: assert(0); } } /*********************************** * Get Identifier for reverse operator overload, * `null` if not supported for this operator. */ private Identifier opId_r(Expression e) { switch (e.op) { case EXP.in_: return Id.opIn_r; case EXP.add: return Id.add_r; case EXP.min: return Id.sub_r; case EXP.mul: return Id.mul_r; case EXP.div: return Id.div_r; case EXP.mod: return Id.mod_r; case EXP.pow: return Id.pow_r; case EXP.leftShift: return Id.shl_r; case EXP.rightShift: return Id.shr_r; case EXP.unsignedRightShift:return Id.ushr_r; case EXP.and: return Id.iand_r; case EXP.or: return Id.ior_r; case EXP.xor: return Id.ixor_r; case EXP.concatenate: return Id.cat_r; default: return null; } } /******************************************* * Helper function to turn operator into template argument list */ Objects* opToArg(Scope* sc, EXP op) { /* Remove the = from op= */ switch (op) { case EXP.addAssign: op = EXP.add; break; case EXP.minAssign: op = EXP.min; break; case EXP.mulAssign: op = EXP.mul; break; case EXP.divAssign: op = EXP.div; break; case EXP.modAssign: op = EXP.mod; break; case EXP.andAssign: op = EXP.and; break; case EXP.orAssign: op = EXP.or; break; case EXP.xorAssign: op = EXP.xor; break; case EXP.leftShiftAssign: op = EXP.leftShift; break; case EXP.rightShiftAssign: op = EXP.rightShift; break; case EXP.unsignedRightShiftAssign: op = EXP.unsignedRightShift; break; case EXP.concatenateAssign: op = EXP.concatenate; break; case EXP.powAssign: op = EXP.pow; break; default: break; } Expression e = new StringExp(Loc.initial, EXPtoString(op)); e = e.expressionSemantic(sc); auto tiargs = new Objects(); tiargs.push(e); return tiargs; } // Try alias this on first operand private Expression checkAliasThisForLhs(AggregateDeclaration ad, Scope* sc, BinExp e) { if (!ad || !ad.aliasthis) return null; /* Rewrite (e1 op e2) as: * (e1.aliasthis op e2) */ if (isRecursiveAliasThis(e.att1, e.e1.type)) return null; //printf("att %s e1 = %s\n", Token.toChars(e.op), e.e1.type.toChars()); BinExp be = cast(BinExp)e.copy(); // Resolve 'alias this' but in case of assigment don't resolve properties yet // because 'e1 = e2' could mean 'e1(e2)' or 'e1() = e2' bool findOnly = (e.op == EXP.assign); be.e1 = resolveAliasThis(sc, e.e1, true, findOnly); if (!be.e1) return null; Expression result; if (be.op == EXP.concatenateAssign) result = be.op_overload(sc); else result = be.trySemantic(sc); return result; } // Try alias this on second operand private Expression checkAliasThisForRhs(AggregateDeclaration ad, Scope* sc, BinExp e) { if (!ad || !ad.aliasthis) return null; /* Rewrite (e1 op e2) as: * (e1 op e2.aliasthis) */ if (isRecursiveAliasThis(e.att2, e.e2.type)) return null; //printf("att %s e2 = %s\n", Token.toChars(e.op), e.e2.type.toChars()); BinExp be = cast(BinExp)e.copy(); be.e2 = resolveAliasThis(sc, e.e2, true); if (!be.e2) return null; Expression result; if (be.op == EXP.concatenateAssign) result = be.op_overload(sc); else result = be.trySemantic(sc); return result; } /************************************ * Operator overload. * Check for operator overload, if so, replace * with function call. * Params: * e = expression with operator * sc = context * pop = if not null, is set to the operator that was actually overloaded, * which may not be `e.op`. Happens when operands are reversed to * match an overload * Returns: * `null` if not an operator overload, * otherwise the lowered expression */ Expression op_overload(Expression e, Scope* sc, EXP* pop = null) { Expression visit(Expression e) { assert(0); } Expression visitUna(UnaExp e) { //printf("UnaExp::op_overload() (%s)\n", e.toChars()); Expression result; if (auto ae = e.e1.isArrayExp()) { ae.e1 = ae.e1.expressionSemantic(sc); ae.e1 = resolveProperties(sc, ae.e1); Expression ae1old = ae.e1; const(bool) maybeSlice = (ae.arguments.length == 0 || ae.arguments.length == 1 && (*ae.arguments)[0].op == EXP.interval); IntervalExp ie = null; if (maybeSlice && ae.arguments.length) { ie = (*ae.arguments)[0].isIntervalExp(); } while (true) { if (ae.e1.op == EXP.error) { return ae.e1; } Expression e0 = null; Expression ae1save = ae.e1; ae.lengthVar = null; Type t1b = ae.e1.type.toBasetype(); AggregateDeclaration ad = isAggregate(t1b); if (!ad) break; if (search_function(ad, Id.opIndexUnary)) { // Deal with $ result = resolveOpDollar(sc, ae, &e0); if (!result) // op(a[i..j]) might be: a.opSliceUnary!(op)(i, j) goto Lfallback; if (result.op == EXP.error) return result; /* Rewrite op(a[arguments]) as: * a.opIndexUnary!(op)(arguments) */ Expressions* a = ae.arguments.copy(); Objects* tiargs = opToArg(sc, e.op); result = new DotTemplateInstanceExp(e.loc, ae.e1, Id.opIndexUnary, tiargs); result = new CallExp(e.loc, result, a); if (maybeSlice) // op(a[]) might be: a.opSliceUnary!(op)() result = result.trySemantic(sc); else result = result.expressionSemantic(sc); if (result) { return Expression.combine(e0, result); } } Lfallback: if (maybeSlice && search_function(ad, Id.opSliceUnary)) { // Deal with $ result = resolveOpDollar(sc, ae, ie, &e0); if (result.op == EXP.error) return result; /* Rewrite op(a[i..j]) as: * a.opSliceUnary!(op)(i, j) */ auto a = new Expressions(); if (ie) { a.push(ie.lwr); a.push(ie.upr); } Objects* tiargs = opToArg(sc, e.op); result = new DotTemplateInstanceExp(e.loc, ae.e1, Id.opSliceUnary, tiargs); result = new CallExp(e.loc, result, a); result = result.expressionSemantic(sc); result = Expression.combine(e0, result); return result; } // Didn't find it. Forward to aliasthis if (ad.aliasthis && !isRecursiveAliasThis(ae.att1, ae.e1.type)) { /* Rewrite op(a[arguments]) as: * op(a.aliasthis[arguments]) */ ae.e1 = resolveAliasThis(sc, ae1save, true); if (ae.e1) continue; } break; } ae.e1 = ae1old; // recovery ae.lengthVar = null; } e.e1 = e.e1.expressionSemantic(sc); e.e1 = resolveProperties(sc, e.e1); if (e.e1.op == EXP.error) { return e.e1; } AggregateDeclaration ad = isAggregate(e.e1.type); if (ad) { Dsymbol fd = null; /* Rewrite as: * e1.opUnary!(op)() */ fd = search_function(ad, Id.opUnary); if (fd) { Objects* tiargs = opToArg(sc, e.op); result = new DotTemplateInstanceExp(e.loc, e.e1, fd.ident, tiargs); result = new CallExp(e.loc, result); result = result.expressionSemantic(sc); return result; } // D1-style operator overloads, deprecated if (e.op != EXP.prePlusPlus && e.op != EXP.preMinusMinus) { auto id = opId(e); fd = search_function(ad, id); if (fd) { // @@@DEPRECATED_2.110@@@. // Deprecated in 2.088, made an error in 2.100 e.error("`%s` is obsolete. Use `opUnary(string op)() if (op == \"%s\")` instead.", id.toChars(), EXPtoString(e.op).ptr); return ErrorExp.get(); } } // Didn't find it. Forward to aliasthis if (ad.aliasthis && !isRecursiveAliasThis(e.att1, e.e1.type)) { /* Rewrite op(e1) as: * op(e1.aliasthis) */ //printf("att una %s e1 = %s\n", EXPtoString(op).ptr, this.e1.type.toChars()); Expression e1 = new DotIdExp(e.loc, e.e1, ad.aliasthis.ident); UnaExp ue = cast(UnaExp)e.copy(); ue.e1 = e1; result = ue.trySemantic(sc); return result; } } return result; } Expression visitArray(ArrayExp ae) { //printf("ArrayExp::op_overload() (%s)\n", ae.toChars()); ae.e1 = ae.e1.expressionSemantic(sc); ae.e1 = resolveProperties(sc, ae.e1); Expression ae1old = ae.e1; const(bool) maybeSlice = (ae.arguments.length == 0 || ae.arguments.length == 1 && (*ae.arguments)[0].op == EXP.interval); IntervalExp ie = null; if (maybeSlice && ae.arguments.length) { ie = (*ae.arguments)[0].isIntervalExp(); } Expression result; while (true) { if (ae.e1.op == EXP.error) { return ae.e1; } Expression e0 = null; Expression ae1save = ae.e1; ae.lengthVar = null; Type t1b = ae.e1.type.toBasetype(); AggregateDeclaration ad = isAggregate(t1b); if (!ad) { // If the non-aggregate expression ae.e1 is indexable or sliceable, // convert it to the corresponding concrete expression. if (isIndexableNonAggregate(t1b) || ae.e1.op == EXP.type) { // Convert to SliceExp if (maybeSlice) { result = new SliceExp(ae.loc, ae.e1, ie); result = result.expressionSemantic(sc); return result; } // Convert to IndexExp if (ae.arguments.length == 1) { result = new IndexExp(ae.loc, ae.e1, (*ae.arguments)[0]); result = result.expressionSemantic(sc); return result; } } break; } if (search_function(ad, Id.index)) { // Deal with $ result = resolveOpDollar(sc, ae, &e0); if (!result) // a[i..j] might be: a.opSlice(i, j) goto Lfallback; if (result.op == EXP.error) return result; /* Rewrite e1[arguments] as: * e1.opIndex(arguments) */ Expressions* a = ae.arguments.copy(); result = new DotIdExp(ae.loc, ae.e1, Id.index); result = new CallExp(ae.loc, result, a); if (maybeSlice) // a[] might be: a.opSlice() result = result.trySemantic(sc); else result = result.expressionSemantic(sc); if (result) { return Expression.combine(e0, result); } } Lfallback: if (maybeSlice && ae.e1.op == EXP.type) { result = new SliceExp(ae.loc, ae.e1, ie); result = result.expressionSemantic(sc); result = Expression.combine(e0, result); return result; } if (maybeSlice && search_function(ad, Id.slice)) { // Deal with $ result = resolveOpDollar(sc, ae, ie, &e0); if (result.op == EXP.error) { if (!e0 && !search_function(ad, Id.dollar)) { ae.loc.errorSupplemental("Aggregate declaration '%s' does not define 'opDollar'", ae.e1.toChars()); } return result; } /* Rewrite a[i..j] as: * a.opSlice(i, j) */ auto a = new Expressions(); if (ie) { a.push(ie.lwr); a.push(ie.upr); } result = new DotIdExp(ae.loc, ae.e1, Id.slice); result = new CallExp(ae.loc, result, a); result = result.expressionSemantic(sc); result = Expression.combine(e0, result); return result; } // Didn't find it. Forward to aliasthis if (ad.aliasthis && !isRecursiveAliasThis(ae.att1, ae.e1.type)) { //printf("att arr e1 = %s\n", this.e1.type.toChars()); /* Rewrite op(a[arguments]) as: * op(a.aliasthis[arguments]) */ ae.e1 = resolveAliasThis(sc, ae1save, true); if (ae.e1) continue; } break; } ae.e1 = ae1old; // recovery ae.lengthVar = null; return result; } /*********************************************** * This is mostly the same as UnaryExp::op_overload(), but has * a different rewrite. */ Expression visitCast(CastExp e) { //printf("CastExp::op_overload() (%s)\n", e.toChars()); Expression result; AggregateDeclaration ad = isAggregate(e.e1.type); if (ad) { Dsymbol fd = null; /* Rewrite as: * e1.opCast!(T)() */ fd = search_function(ad, Id._cast); if (fd) { version (all) { // Backwards compatibility with D1 if opCast is a function, not a template if (fd.isFuncDeclaration()) { // Rewrite as: e1.opCast() return build_overload(e.loc, sc, e.e1, null, fd); } } auto tiargs = new Objects(); tiargs.push(e.to); result = new DotTemplateInstanceExp(e.loc, e.e1, fd.ident, tiargs); result = new CallExp(e.loc, result); result = result.expressionSemantic(sc); return result; } // Didn't find it. Forward to aliasthis if (ad.aliasthis && !isRecursiveAliasThis(e.att1, e.e1.type)) { /* Rewrite op(e1) as: * op(e1.aliasthis) */ if (auto e1 = resolveAliasThis(sc, e.e1, true)) { result = e.copy(); (cast(UnaExp)result).e1 = e1; result = result.op_overload(sc); return result; } } } return result; } Expression visitBin(BinExp e) { //printf("BinExp::op_overload() (%s)\n", e.toChars()); Identifier id = opId(e); Identifier id_r = opId_r(e); Expressions args1; Expressions args2; int argsset = 0; AggregateDeclaration ad1 = isAggregate(e.e1.type); AggregateDeclaration ad2 = isAggregate(e.e2.type); if (e.op == EXP.assign && ad1 == ad2) { StructDeclaration sd = ad1.isStructDeclaration(); if (sd && (!sd.hasIdentityAssign || /* Do a blit if we can and the rvalue is something like .init, * where a postblit is not necessary. */ (sd.hasBlitAssign && !e.e2.isLvalue()))) { /* This is bitwise struct assignment. */ return null; } } Dsymbol s = null; Dsymbol s_r = null; Objects* tiargs = null; if (e.op == EXP.plusPlus || e.op == EXP.minusMinus) { // Bug4099 fix if (ad1 && search_function(ad1, Id.opUnary)) return null; } if (e.op != EXP.equal && e.op != EXP.notEqual && e.op != EXP.assign && e.op != EXP.plusPlus && e.op != EXP.minusMinus) { /* Try opBinary and opBinaryRight */ if (ad1) { s = search_function(ad1, Id.opBinary); if (s && !s.isTemplateDeclaration()) { e.e1.error("`%s.opBinary` isn't a template", e.e1.toChars()); return ErrorExp.get(); } } if (ad2) { s_r = search_function(ad2, Id.opBinaryRight); if (s_r && !s_r.isTemplateDeclaration()) { e.e2.error("`%s.opBinaryRight` isn't a template", e.e2.toChars()); return ErrorExp.get(); } if (s_r && s_r == s) // https://issues.dlang.org/show_bug.cgi?id=12778 s_r = null; } // Set tiargs, the template argument list, which will be the operator string if (s || s_r) { id = Id.opBinary; id_r = Id.opBinaryRight; tiargs = opToArg(sc, e.op); } } if (!s && !s_r) { // Try the D1-style operators, deprecated if (ad1 && id) { s = search_function(ad1, id); if (s && id != Id.assign) { // @@@DEPRECATED_2.110@@@. // Deprecated in 2.088, made an error in 2.100 if (id == Id.postinc || id == Id.postdec) e.error("`%s` is obsolete. Use `opUnary(string op)() if (op == \"%s\")` instead.", id.toChars(), EXPtoString(e.op).ptr); else e.error("`%s` is obsolete. Use `opBinary(string op)(...) if (op == \"%s\")` instead.", id.toChars(), EXPtoString(e.op).ptr); return ErrorExp.get(); } } if (ad2 && id_r) { s_r = search_function(ad2, id_r); // https://issues.dlang.org/show_bug.cgi?id=12778 // If both x.opBinary(y) and y.opBinaryRight(x) found, // and they are exactly same symbol, x.opBinary(y) should be preferred. if (s_r && s_r == s) s_r = null; if (s_r) { // @@@DEPRECATED_2.110@@@. // Deprecated in 2.088, made an error in 2.100 e.error("`%s` is obsolete. Use `opBinaryRight(string op)(...) if (op == \"%s\")` instead.", id_r.toChars(), EXPtoString(e.op).ptr); return ErrorExp.get(); } } } if (s || s_r) { /* Try: * a.opfunc(b) * b.opfunc_r(a) * and see which is better. */ args1.setDim(1); args1[0] = e.e1; expandTuples(&args1); args2.setDim(1); args2[0] = e.e2; expandTuples(&args2); argsset = 1; MatchAccumulator m; if (s) { functionResolve(m, s, e.loc, sc, tiargs, e.e1.type, &args2); if (m.lastf && (m.lastf.errors || m.lastf.hasSemantic3Errors())) { return ErrorExp.get(); } } FuncDeclaration lastf = m.lastf; if (s_r) { functionResolve(m, s_r, e.loc, sc, tiargs, e.e2.type, &args1); if (m.lastf && (m.lastf.errors || m.lastf.hasSemantic3Errors())) { return ErrorExp.get(); } } if (m.count > 1) { // Error, ambiguous e.error("overloads `%s` and `%s` both match argument list for `%s`", m.lastf.type.toChars(), m.nextf.type.toChars(), m.lastf.toChars()); } else if (m.last == MATCH.nomatch) { if (tiargs) goto L1; m.lastf = null; } if (e.op == EXP.plusPlus || e.op == EXP.minusMinus) { // Kludge because operator overloading regards e++ and e-- // as unary, but it's implemented as a binary. // Rewrite (e1 ++ e2) as e1.postinc() // Rewrite (e1 -- e2) as e1.postdec() return build_overload(e.loc, sc, e.e1, null, m.lastf ? m.lastf : s); } else if (lastf && m.lastf == lastf || !s_r && m.last == MATCH.nomatch) { // Rewrite (e1 op e2) as e1.opfunc(e2) return build_overload(e.loc, sc, e.e1, e.e2, m.lastf ? m.lastf : s); } else { // Rewrite (e1 op e2) as e2.opfunc_r(e1) return build_overload(e.loc, sc, e.e2, e.e1, m.lastf ? m.lastf : s_r); } } L1: version (all) { // Retained for D1 compatibility if (isCommutative(e.op) && !tiargs) { s = null; s_r = null; if (ad1 && id_r) { s_r = search_function(ad1, id_r); } if (ad2 && id) { s = search_function(ad2, id); if (s && s == s_r) // https://issues.dlang.org/show_bug.cgi?id=12778 s = null; } if (s || s_r) { /* Try: * a.opfunc_r(b) * b.opfunc(a) * and see which is better. */ if (!argsset) { args1.setDim(1); args1[0] = e.e1; expandTuples(&args1); args2.setDim(1); args2[0] = e.e2; expandTuples(&args2); } MatchAccumulator m; if (s_r) { functionResolve(m, s_r, e.loc, sc, tiargs, e.e1.type, &args2); if (m.lastf && (m.lastf.errors || m.lastf.hasSemantic3Errors())) { return ErrorExp.get(); } } FuncDeclaration lastf = m.lastf; if (s) { functionResolve(m, s, e.loc, sc, tiargs, e.e2.type, &args1); if (m.lastf && (m.lastf.errors || m.lastf.hasSemantic3Errors())) { return ErrorExp.get(); } } if (m.count > 1) { // Error, ambiguous e.error("overloads `%s` and `%s` both match argument list for `%s`", m.lastf.type.toChars(), m.nextf.type.toChars(), m.lastf.toChars()); } else if (m.last == MATCH.nomatch) { m.lastf = null; } if (lastf && m.lastf == lastf || !s && m.last == MATCH.nomatch) { // Rewrite (e1 op e2) as e1.opfunc_r(e2) return build_overload(e.loc, sc, e.e1, e.e2, m.lastf ? m.lastf : s_r); } else { // Rewrite (e1 op e2) as e2.opfunc(e1) Expression result = build_overload(e.loc, sc, e.e2, e.e1, m.lastf ? m.lastf : s); // When reversing operands of comparison operators, // need to reverse the sense of the op if (pop) *pop = reverseRelation(e.op); return result; } } } } Expression rewrittenLhs; if (!(e.op == EXP.assign && ad2 && ad1 == ad2)) // https://issues.dlang.org/show_bug.cgi?id=2943 { if (Expression result = checkAliasThisForLhs(ad1, sc, e)) { /* https://issues.dlang.org/show_bug.cgi?id=19441 * * alias this may not be used for partial assignment. * If a struct has a single member which is aliased this * directly or aliased to a ref getter function that returns * the mentioned member, then alias this may be * used since the object will be fully initialised. * If the struct is nested, the context pointer is considered * one of the members, hence the `ad1.fields.length == 2 && ad1.vthis` * condition. */ if (result.op != EXP.assign) return result; // i.e: Rewrote `e1 = e2` -> `e1(e2)` auto ae = result.isAssignExp(); if (ae.e1.op != EXP.dotVariable) return result; // i.e: Rewrote `e1 = e2` -> `e1() = e2` auto dve = ae.e1.isDotVarExp(); if (auto ad = dve.var.isMember2()) { // i.e: Rewrote `e1 = e2` -> `e1.some.var = e2` // Ensure that `var` is the only field member in `ad` if (ad.fields.length == 1 || (ad.fields.length == 2 && ad.vthis)) { if (dve.var == ad.aliasthis.sym) return result; } } rewrittenLhs = ae.e1; } } if (!(e.op == EXP.assign && ad1 && ad1 == ad2)) // https://issues.dlang.org/show_bug.cgi?id=2943 { if (Expression result = checkAliasThisForRhs(ad2, sc, e)) return result; } if (rewrittenLhs) { e.error("cannot use `alias this` to partially initialize variable `%s` of type `%s`. Use `%s`", e.e1.toChars(), ad1.toChars(), rewrittenLhs.toChars()); return ErrorExp.get(); } return null; } Expression visitEqual(EqualExp e) { //printf("EqualExp::op_overload() (%s)\n", e.toChars()); Type t1 = e.e1.type.toBasetype(); Type t2 = e.e2.type.toBasetype(); /* Array equality is handled by expressionSemantic() potentially * lowering to object.__equals(), which takes care of overloaded * operators for the element types. */ if ((t1.ty == Tarray || t1.ty == Tsarray) && (t2.ty == Tarray || t2.ty == Tsarray)) { return null; } /* Check for class equality with null literal or typeof(null). */ if (t1.ty == Tclass && e.e2.op == EXP.null_ || t2.ty == Tclass && e.e1.op == EXP.null_) { e.error("use `%s` instead of `%s` when comparing with `null`", EXPtoString(e.op == EXP.equal ? EXP.identity : EXP.notIdentity).ptr, EXPtoString(e.op).ptr); return ErrorExp.get(); } if (t1.ty == Tclass && t2.ty == Tnull || t1.ty == Tnull && t2.ty == Tclass) { // Comparing a class with typeof(null) should not call opEquals return null; } /* Check for class equality. */ if (t1.ty == Tclass && t2.ty == Tclass) { ClassDeclaration cd1 = t1.isClassHandle(); ClassDeclaration cd2 = t2.isClassHandle(); if (!(cd1.classKind == ClassKind.cpp || cd2.classKind == ClassKind.cpp)) { /* Rewrite as: * .object.opEquals(e1, e2) */ if (!ClassDeclaration.object) { e.error("cannot compare classes for equality because `object.Object` was not declared"); return null; } Expression e1x = e.e1; Expression e2x = e.e2; /* The explicit cast is necessary for interfaces * https://issues.dlang.org/show_bug.cgi?id=4088 */ Type to = ClassDeclaration.object.getType(); if (cd1.isInterfaceDeclaration()) e1x = new CastExp(e.loc, e.e1, t1.isMutable() ? to : to.constOf()); if (cd2.isInterfaceDeclaration()) e2x = new CastExp(e.loc, e.e2, t2.isMutable() ? to : to.constOf()); Expression result = new IdentifierExp(e.loc, Id.empty); result = new DotIdExp(e.loc, result, Id.object); result = new DotIdExp(e.loc, result, Id.eq); result = new CallExp(e.loc, result, e1x, e2x); if (e.op == EXP.notEqual) result = new NotExp(e.loc, result); result = result.expressionSemantic(sc); return result; } } if (Expression result = compare_overload(e, sc, Id.eq, null)) { if (lastComma(result).op == EXP.call && e.op == EXP.notEqual) { result = new NotExp(result.loc, result); result = result.expressionSemantic(sc); } return result; } /* Check for pointer equality. */ if (t1.ty == Tpointer || t2.ty == Tpointer) { /* Rewrite: * ptr1 == ptr2 * as: * ptr1 is ptr2 * * This is just a rewriting for deterministic AST representation * as the backend input. */ auto op2 = e.op == EXP.equal ? EXP.identity : EXP.notIdentity; Expression r = new IdentityExp(op2, e.loc, e.e1, e.e2); return r.expressionSemantic(sc); } /* Check for struct equality without opEquals. */ if (t1.ty == Tstruct && t2.ty == Tstruct) { auto sd = t1.isTypeStruct().sym; if (sd != t2.isTypeStruct().sym) return null; import dmd.clone : needOpEquals; if (!global.params.fieldwise && !needOpEquals(sd)) { // Use bitwise equality. auto op2 = e.op == EXP.equal ? EXP.identity : EXP.notIdentity; Expression r = new IdentityExp(op2, e.loc, e.e1, e.e2); return r.expressionSemantic(sc); } /* Do memberwise equality. * https://dlang.org/spec/expression.html#equality_expressions * Rewrite: * e1 == e2 * as: * e1.tupleof == e2.tupleof * * If sd is a nested struct, and if it's nested in a class, it will * also compare the parent class's equality. Otherwise, compares * the identity of parent context through void*. */ if (e.att1 && t1.equivalent(e.att1)) return null; if (e.att2 && t2.equivalent(e.att2)) return null; e = e.copy().isEqualExp(); if (!e.att1) e.att1 = t1; if (!e.att2) e.att2 = t2; e.e1 = new DotIdExp(e.loc, e.e1, Id._tupleof); e.e2 = new DotIdExp(e.loc, e.e2, Id._tupleof); auto sc2 = sc.push(); sc2.flags |= SCOPE.noaccesscheck; Expression r = e.expressionSemantic(sc2); sc2.pop(); /* https://issues.dlang.org/show_bug.cgi?id=15292 * if the rewrite result is same with the original, * the equality is unresolvable because it has recursive definition. */ if (r.op == e.op && r.isEqualExp().e1.type.toBasetype() == t1) { e.error("cannot compare `%s` because its auto generated member-wise equality has recursive definition", t1.toChars()); return ErrorExp.get(); } return r; } /* Check for tuple equality. */ if (e.e1.op == EXP.tuple && e.e2.op == EXP.tuple) { auto tup1 = e.e1.isTupleExp(); auto tup2 = e.e2.isTupleExp(); size_t dim = tup1.exps.length; if (dim != tup2.exps.length) { e.error("mismatched tuple lengths, `%d` and `%d`", cast(int)dim, cast(int)tup2.exps.length); return ErrorExp.get(); } Expression result; if (dim == 0) { // zero-length tuple comparison should always return true or false. result = IntegerExp.createBool(e.op == EXP.equal); } else { for (size_t i = 0; i < dim; i++) { auto ex1 = (*tup1.exps)[i]; auto ex2 = (*tup2.exps)[i]; auto eeq = new EqualExp(e.op, e.loc, ex1, ex2); eeq.att1 = e.att1; eeq.att2 = e.att2; if (!result) result = eeq; else if (e.op == EXP.equal) result = new LogicalExp(e.loc, EXP.andAnd, result, eeq); else result = new LogicalExp(e.loc, EXP.orOr, result, eeq); } assert(result); } result = Expression.combine(tup1.e0, tup2.e0, result); result = result.expressionSemantic(sc); return result; } return null; } Expression visitCmp(CmpExp e) { //printf("CmpExp:: () (%s)\n", e.toChars()); return compare_overload(e, sc, Id.cmp, pop); } /********************************* * Operator overloading for op= */ Expression visitBinAssign(BinAssignExp e) { //printf("BinAssignExp::op_overload() (%s)\n", e.toChars()); if (auto ae = e.e1.isArrayExp()) { ae.e1 = ae.e1.expressionSemantic(sc); ae.e1 = resolveProperties(sc, ae.e1); Expression ae1old = ae.e1; const(bool) maybeSlice = (ae.arguments.length == 0 || ae.arguments.length == 1 && (*ae.arguments)[0].op == EXP.interval); IntervalExp ie = null; if (maybeSlice && ae.arguments.length) { ie = (*ae.arguments)[0].isIntervalExp(); } while (true) { if (ae.e1.op == EXP.error) { return ae.e1; } Expression e0 = null; Expression ae1save = ae.e1; ae.lengthVar = null; Type t1b = ae.e1.type.toBasetype(); AggregateDeclaration ad = isAggregate(t1b); if (!ad) break; if (search_function(ad, Id.opIndexOpAssign)) { // Deal with $ Expression result = resolveOpDollar(sc, ae, &e0); if (!result) // (a[i..j] op= e2) might be: a.opSliceOpAssign!(op)(e2, i, j) goto Lfallback; if (result.op == EXP.error) return result; result = e.e2.expressionSemantic(sc); if (result.op == EXP.error) return result; e.e2 = result; /* Rewrite a[arguments] op= e2 as: * a.opIndexOpAssign!(op)(e2, arguments) */ Expressions* a = ae.arguments.copy(); a.insert(0, e.e2); Objects* tiargs = opToArg(sc, e.op); result = new DotTemplateInstanceExp(e.loc, ae.e1, Id.opIndexOpAssign, tiargs); result = new CallExp(e.loc, result, a); if (maybeSlice) // (a[] op= e2) might be: a.opSliceOpAssign!(op)(e2) result = result.trySemantic(sc); else result = result.expressionSemantic(sc); if (result) { return Expression.combine(e0, result); } } Lfallback: if (maybeSlice && search_function(ad, Id.opSliceOpAssign)) { // Deal with $ Expression result = resolveOpDollar(sc, ae, ie, &e0); if (result.op == EXP.error) return result; result = e.e2.expressionSemantic(sc); if (result.op == EXP.error) return result; e.e2 = result; /* Rewrite (a[i..j] op= e2) as: * a.opSliceOpAssign!(op)(e2, i, j) */ auto a = new Expressions(); a.push(e.e2); if (ie) { a.push(ie.lwr); a.push(ie.upr); } Objects* tiargs = opToArg(sc, e.op); result = new DotTemplateInstanceExp(e.loc, ae.e1, Id.opSliceOpAssign, tiargs); result = new CallExp(e.loc, result, a); result = result.expressionSemantic(sc); result = Expression.combine(e0, result); return result; } // Didn't find it. Forward to aliasthis if (ad.aliasthis && !isRecursiveAliasThis(ae.att1, ae.e1.type)) { /* Rewrite (a[arguments] op= e2) as: * a.aliasthis[arguments] op= e2 */ ae.e1 = resolveAliasThis(sc, ae1save, true); if (ae.e1) continue; } break; } ae.e1 = ae1old; // recovery ae.lengthVar = null; } Expression result = e.binSemanticProp(sc); if (result) return result; // Don't attempt 'alias this' if an error occurred if (e.e1.type.ty == Terror || e.e2.type.ty == Terror) { return ErrorExp.get(); } Identifier id = opId(e); Expressions args2; AggregateDeclaration ad1 = isAggregate(e.e1.type); Dsymbol s = null; Objects* tiargs = null; /* Try opOpAssign */ if (ad1) { s = search_function(ad1, Id.opOpAssign); if (s && !s.isTemplateDeclaration()) { e.error("`%s.opOpAssign` isn't a template", e.e1.toChars()); return ErrorExp.get(); } } // Set tiargs, the template argument list, which will be the operator string if (s) { id = Id.opOpAssign; tiargs = opToArg(sc, e.op); } // Try D1-style operator overload, deprecated if (!s && ad1 && id) { s = search_function(ad1, id); if (s) { // @@@DEPRECATED_2.110@@@. // Deprecated in 2.088, made an error in 2.100 scope char[] op = EXPtoString(e.op).dup; op[$-1] = '\0'; // remove trailing `=` e.error("`%s` is obsolete. Use `opOpAssign(string op)(...) if (op == \"%s\")` instead.", id.toChars(), op.ptr); return ErrorExp.get(); } } if (s) { /* Try: * a.opOpAssign(b) */ args2.setDim(1); args2[0] = e.e2; expandTuples(&args2); MatchAccumulator m; functionResolve(m, s, e.loc, sc, tiargs, e.e1.type, &args2); if (m.lastf && (m.lastf.errors || m.lastf.hasSemantic3Errors())) { return ErrorExp.get(); } if (m.count > 1) { // Error, ambiguous e.error("overloads `%s` and `%s` both match argument list for `%s`", m.lastf.type.toChars(), m.nextf.type.toChars(), m.lastf.toChars()); } else if (m.last == MATCH.nomatch) { if (tiargs) goto L1; m.lastf = null; } // Rewrite (e1 op e2) as e1.opOpAssign(e2) return build_overload(e.loc, sc, e.e1, e.e2, m.lastf ? m.lastf : s); } L1: result = checkAliasThisForLhs(ad1, sc, e); if (result || !s) // no point in trying Rhs alias-this if there's no overload of any kind in lhs return result; return checkAliasThisForRhs(isAggregate(e.e2.type), sc, e); } if (pop) *pop = e.op; switch (e.op) { case EXP.cast_ : return visitCast(e.isCastExp()); case EXP.array : return visitArray(e.isArrayExp()); case EXP.notEqual : case EXP.equal : return visitEqual(e.isEqualExp()); case EXP.lessOrEqual : case EXP.greaterThan : case EXP.greaterOrEqual: case EXP.lessThan : return visitCmp(cast(CmpExp)e); default: if (auto ex = e.isBinAssignExp()) return visitBinAssign(ex); if (auto ex = e.isBinExp()) return visitBin(ex); if (auto ex = e.isUnaExp()) return visitUna(ex); return visit(e); } } /****************************************** * Common code for overloading of EqualExp and CmpExp */ private Expression compare_overload(BinExp e, Scope* sc, Identifier id, EXP* pop) { //printf("BinExp::compare_overload(id = %s) %s\n", id.toChars(), e.toChars()); AggregateDeclaration ad1 = isAggregate(e.e1.type); AggregateDeclaration ad2 = isAggregate(e.e2.type); Dsymbol s = null; Dsymbol s_r = null; if (ad1) { s = search_function(ad1, id); } if (ad2) { s_r = search_function(ad2, id); if (s == s_r) s_r = null; } Objects* tiargs = null; if (s || s_r) { /* Try: * a.opEquals(b) * b.opEquals(a) * and see which is better. */ Expressions args1 = Expressions(1); args1[0] = e.e1; expandTuples(&args1); Expressions args2 = Expressions(1); args2[0] = e.e2; expandTuples(&args2); MatchAccumulator m; if (0 && s && s_r) { printf("s : %s\n", s.toPrettyChars()); printf("s_r: %s\n", s_r.toPrettyChars()); } if (s) { functionResolve(m, s, e.loc, sc, tiargs, e.e1.type, &args2); if (m.lastf && (m.lastf.errors || m.lastf.hasSemantic3Errors())) return ErrorExp.get(); } FuncDeclaration lastf = m.lastf; int count = m.count; if (s_r) { functionResolve(m, s_r, e.loc, sc, tiargs, e.e2.type, &args1); if (m.lastf && (m.lastf.errors || m.lastf.hasSemantic3Errors())) return ErrorExp.get(); } if (m.count > 1) { /* The following if says "not ambiguous" if there's one match * from s and one from s_r, in which case we pick s. * This doesn't follow the spec, but is a workaround for the case * where opEquals was generated from templates and we cannot figure * out if both s and s_r came from the same declaration or not. * The test case is: * import std.typecons; * void main() { * assert(tuple("has a", 2u) == tuple("has a", 1)); * } */ if (!(m.lastf == lastf && m.count == 2 && count == 1)) { // Error, ambiguous e.error("overloads `%s` and `%s` both match argument list for `%s`", m.lastf.type.toChars(), m.nextf.type.toChars(), m.lastf.toChars()); } } else if (m.last == MATCH.nomatch) { m.lastf = null; } Expression result; if (lastf && m.lastf == lastf || !s_r && m.last == MATCH.nomatch) { // Rewrite (e1 op e2) as e1.opfunc(e2) result = build_overload(e.loc, sc, e.e1, e.e2, m.lastf ? m.lastf : s); } else { // Rewrite (e1 op e2) as e2.opfunc_r(e1) result = build_overload(e.loc, sc, e.e2, e.e1, m.lastf ? m.lastf : s_r); // When reversing operands of comparison operators, // need to reverse the sense of the op if (pop) *pop = reverseRelation(e.op); } return result; } /* * https://issues.dlang.org/show_bug.cgi?id=16657 * at this point, no matching opEquals was found for structs, * so we should not follow the alias this comparison code. */ if ((e.op == EXP.equal || e.op == EXP.notEqual) && ad1 == ad2) return null; Expression result = checkAliasThisForLhs(ad1, sc, e); return result ? result : checkAliasThisForRhs(isAggregate(e.e2.type), sc, e); } /*********************************** * Utility to build a function call out of this reference and argument. */ Expression build_overload(const ref Loc loc, Scope* sc, Expression ethis, Expression earg, Dsymbol d) { assert(d); Expression e; Declaration decl = d.isDeclaration(); if (decl) e = new DotVarExp(loc, ethis, decl, false); else e = new DotIdExp(loc, ethis, d.ident); e = new CallExp(loc, e, earg); e = e.expressionSemantic(sc); return e; } /*************************************** * Search for function funcid in aggregate ad. */ Dsymbol search_function(ScopeDsymbol ad, Identifier funcid) { Dsymbol s = ad.search(Loc.initial, funcid); if (s) { //printf("search_function: s = '%s'\n", s.kind()); Dsymbol s2 = s.toAlias(); //printf("search_function: s2 = '%s'\n", s2.kind()); FuncDeclaration fd = s2.isFuncDeclaration(); if (fd && fd.type.ty == Tfunction) return fd; TemplateDeclaration td = s2.isTemplateDeclaration(); if (td) return td; } return null; } /************************************** * Figure out what is being foreach'd over by looking at the ForeachAggregate. * Params: * sc = context * isForeach = true for foreach, false for foreach_reverse * feaggr = ForeachAggregate * sapply = set to function opApply/opApplyReverse, or delegate, or null. * Overload resolution is not done. * Returns: * true if successfully figured it out; feaggr updated with semantic analysis. * false for failed, which is an error. */ bool inferForeachAggregate(Scope* sc, bool isForeach, ref Expression feaggr, out Dsymbol sapply) { //printf("inferForeachAggregate(%s)\n", feaggr.toChars()); bool sliced; Type att = null; auto aggr = feaggr; while (1) { aggr = aggr.expressionSemantic(sc); aggr = resolveProperties(sc, aggr); aggr = aggr.optimize(WANTvalue); if (!aggr.type || aggr.op == EXP.error) return false; Type tab = aggr.type.toBasetype(); switch (tab.ty) { case Tarray: // https://dlang.org/spec/statement.html#foreach_over_arrays case Tsarray: // https://dlang.org/spec/statement.html#foreach_over_arrays case Ttuple: // https://dlang.org/spec/statement.html#foreach_over_tuples case Taarray: // https://dlang.org/spec/statement.html#foreach_over_associative_arrays break; case Tclass: case Tstruct: { AggregateDeclaration ad = (tab.ty == Tclass) ? tab.isTypeClass().sym : tab.isTypeStruct().sym; if (!sliced) { sapply = search_function(ad, isForeach ? Id.apply : Id.applyReverse); if (sapply) { // https://dlang.org/spec/statement.html#foreach_over_struct_and_classes // opApply aggregate break; } if (feaggr.op != EXP.type) { /* See if rewriting `aggr` to `aggr[]` will work */ Expression rinit = new ArrayExp(aggr.loc, feaggr); rinit = rinit.trySemantic(sc); if (rinit) // if it worked { aggr = rinit; sliced = true; // only try it once continue; } } } if (ad.search(Loc.initial, isForeach ? Id.Ffront : Id.Fback)) { // https://dlang.org/spec/statement.html#foreach-with-ranges // range aggregate break; } if (ad.aliasthis) { if (isRecursiveAliasThis(att, tab)) // error, circular alias this return false; aggr = resolveAliasThis(sc, aggr); continue; } return false; } case Tdelegate: // https://dlang.org/spec/statement.html#foreach_over_delegates if (auto de = aggr.isDelegateExp()) { sapply = de.func; } break; case Terror: break; default: return false; } feaggr = aggr; return true; } assert(0); } /***************************************** * Given array of foreach parameters and an aggregate type, * find best opApply overload, * if any of the parameter types are missing, attempt to infer * them from the aggregate type. * Params: * fes = the foreach statement * sc = context * sapply = null or opApply or delegate, overload resolution has not been done. * Do overload resolution on sapply. * Returns: * false for errors */ bool inferApplyArgTypes(ForeachStatement fes, Scope* sc, ref Dsymbol sapply) { if (!fes.parameters || !fes.parameters.length) return false; if (sapply) // prefer opApply { foreach (Parameter p; *fes.parameters) { if (p.type) { p.type = p.type.typeSemantic(fes.loc, sc); p.type = p.type.addStorageClass(p.storageClass); } } // Determine ethis for sapply Expression ethis; Type tab = fes.aggr.type.toBasetype(); if (tab.ty == Tclass || tab.ty == Tstruct) ethis = fes.aggr; else { assert(tab.ty == Tdelegate && fes.aggr.op == EXP.delegate_); ethis = fes.aggr.isDelegateExp().e1; } /* Look for like an * int opApply(int delegate(ref Type [, ...]) dg); * overload */ if (FuncDeclaration fd = sapply.isFuncDeclaration()) { if (auto fdapply = findBestOpApplyMatch(ethis, fd, fes.parameters)) { // Fill in any missing types on foreach parameters[] matchParamsToOpApply(fdapply.type.isTypeFunction(), fes.parameters, true); sapply = fdapply; return true; } return false; } return true; // shouldn't this be false? } Parameter p = (*fes.parameters)[0]; Type taggr = fes.aggr.type; assert(taggr); Type tab = taggr.toBasetype(); switch (tab.ty) { case Tarray: case Tsarray: case Ttuple: if (fes.parameters.length == 2) { if (!p.type) { p.type = Type.tsize_t; // key type p.type = p.type.addStorageClass(p.storageClass); } p = (*fes.parameters)[1]; } if (!p.type && tab.ty != Ttuple) { p.type = tab.nextOf(); // value type p.type = p.type.addStorageClass(p.storageClass); } break; case Taarray: { TypeAArray taa = tab.isTypeAArray(); if (fes.parameters.length == 2) { if (!p.type) { p.type = taa.index; // key type p.type = p.type.addStorageClass(p.storageClass); if (p.storageClass & STC.ref_) // key must not be mutated via ref p.type = p.type.addMod(MODFlags.const_); } p = (*fes.parameters)[1]; } if (!p.type) { p.type = taa.next; // value type p.type = p.type.addStorageClass(p.storageClass); } break; } case Tclass: case Tstruct: { AggregateDeclaration ad = (tab.ty == Tclass) ? tab.isTypeClass().sym : tab.isTypeStruct().sym; if (fes.parameters.length == 1) { if (!p.type) { /* Look for a front() or back() overload */ Identifier id = (fes.op == TOK.foreach_) ? Id.Ffront : Id.Fback; Dsymbol s = ad.search(Loc.initial, id); FuncDeclaration fd = s ? s.isFuncDeclaration() : null; if (fd) { // Resolve inout qualifier of front type p.type = fd.type.nextOf(); if (p.type) { p.type = p.type.substWildTo(tab.mod); p.type = p.type.addStorageClass(p.storageClass); } } else if (s && s.isTemplateDeclaration()) { } else if (s && s.isDeclaration()) p.type = s.isDeclaration().type; else break; } break; } break; } case Tdelegate: { auto td = tab.isTypeDelegate(); if (!matchParamsToOpApply(td.next.isTypeFunction(), fes.parameters, true)) return false; break; } default: break; // ignore error, caught later } return true; } /********************************************* * Find best overload match on fstart given ethis and parameters[]. * Params: * ethis = expression to use for `this` * fstart = opApply or foreach delegate * parameters = ForeachTypeList (i.e. foreach parameters) * Returns: * best match if there is one, null if error */ private FuncDeclaration findBestOpApplyMatch(Expression ethis, FuncDeclaration fstart, Parameters* parameters) { MOD mod = ethis.type.mod; MATCH match = MATCH.nomatch; FuncDeclaration fd_best; FuncDeclaration fd_ambig; overloadApply(fstart, (Dsymbol s) { auto f = s.isFuncDeclaration(); if (!f) return 0; // continue auto tf = f.type.isTypeFunction(); MATCH m = MATCH.exact; if (f.isThis()) { if (!MODimplicitConv(mod, tf.mod)) m = MATCH.nomatch; else if (mod != tf.mod) m = MATCH.constant; } if (!matchParamsToOpApply(tf, parameters, false)) m = MATCH.nomatch; if (m > match) { fd_best = f; fd_ambig = null; match = m; } else if (m == match && m > MATCH.nomatch) { assert(fd_best); auto bestTf = fd_best.type.isTypeFunction(); assert(bestTf); // Found another overload with different attributes? // e.g. @system vs. @safe opApply // @@@DEPRECATED_2.112@@@ // See semantic2.d Semantic2Visitor.visit(FuncDeclaration): // Remove `false` after deprecation period is over. bool ambig = tf.attributesEqual(bestTf, false); // opApplies with identical attributes could still accept // different function bodies as delegate // => different parameters or attributes if (ambig) { // Fetch the delegates that receive the function body auto tfBody = tf.parameterList[0].type.isTypeDelegate().next; assert(tfBody); auto bestBody = bestTf.parameterList[0].type.isTypeDelegate().next; assert(bestBody); // Ignore covariant matches, as later on it can be redone // after the opApply delegate has its attributes inferred. ambig = !(tfBody.covariant(bestBody) == Covariant.yes || bestBody.covariant(tfBody) == Covariant.yes); } if (ambig) fd_ambig = f; // not covariant, so ambiguous } return 0; // continue }); if (fd_ambig) { .error(ethis.loc, "`%s.%s` matches more than one declaration:\n`%s`: `%s`\nand:\n`%s`: `%s`", ethis.toChars(), fstart.ident.toChars(), fd_best.loc.toChars(), fd_best.type.toChars(), fd_ambig.loc.toChars(), fd_ambig.type.toChars()); return null; } return fd_best; } /****************************** * Determine if foreach parameters match opApply parameters. * Infer missing foreach parameter types from type of opApply delegate. * Params: * tf = type of opApply or delegate * parameters = foreach parameters * infer = infer missing parameter types * Returns: * true for match for this function * false for no match for this function */ private bool matchParamsToOpApply(TypeFunction tf, Parameters* parameters, bool infer) { enum nomatch = false; /* opApply/delegate has exactly one parameter, and that parameter * is a delegate that looks like: * int opApply(int delegate(ref Type [, ...]) dg); */ if (tf.parameterList.length != 1) return nomatch; /* Get the type of opApply's dg parameter */ Parameter p0 = tf.parameterList[0]; auto de = p0.type.isTypeDelegate(); if (!de) return nomatch; TypeFunction tdg = de.next.isTypeFunction(); /* We now have tdg, the type of the delegate. * tdg's parameters must match that of the foreach arglist (i.e. parameters). * Fill in missing types in parameters. */ const nparams = tdg.parameterList.length; if (nparams == 0 || nparams != parameters.length || tdg.parameterList.varargs != VarArg.none) return nomatch; // parameter mismatch foreach (u, p; *parameters) { Parameter param = tdg.parameterList[u]; if (p.type) { if (!p.type.equals(param.type)) return nomatch; } else if (infer) { p.type = param.type; p.type = p.type.addStorageClass(p.storageClass); } } return true; } /** * Reverse relational operator, eg >= becomes <= * Note this is not negation. * Params: * op = comparison operator to reverse * Returns: * reverse of op */ private EXP reverseRelation(EXP op) pure { switch (op) { case EXP.greaterOrEqual: op = EXP.lessOrEqual; break; case EXP.greaterThan: op = EXP.lessThan; break; case EXP.lessOrEqual: op = EXP.greaterOrEqual; break; case EXP.lessThan: op = EXP.greaterThan; break; default: break; } return op; }
D
/// This namespace needs to implemets net messaging by TCP/IP sockets // Copyright Gushcha Anton, Shamyan Roman 2012. // 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 util.net.socket; import std.stdio, std.socket, std.socketstream, std.stream; class ConnectEx: Exception { private enum MSG = "Connection Error"; this() { super(MSG); } } /// This class incapsulate general type Socket Listener public class Listener { this() { socketList = new Socket[0]; } enum PORT = 10100; enum BUF_SIZE = 1024; private auto MAX_CONNECTIONS = 60u; ///getter & setter of MAX_CONNECTIONS public uint getMaxConnections() { return MAX_CONNECTIONS; } public void setMaxConnections(uint max) { MAX_CONNECTIONS = max; } /// Socket List private Socket[] socketList; //accepted sockets /// SocketSet private SocketSet sSet; //all sockets /// Start listening private void run() { /// Setting listener port Socket listener = new TcpSocket; assert(listener.isAlive); listener.blocking = false; listener.bind(new InternetAddress(PORT)); /// todo: add choise to NetCard listener.listen(10); /// notice: 10 is a good choice sSet = new SocketSet(MAX_CONNECTIONS + 1); for(;; sSet.reset() ) { //add incoming socket sSet.add(listener); //add previous iteration sockets foreach(Socket sock; socketList) { sSet.add(sock); } //wait some changes for sockets Socket.select(sSet, null, null); /// notice: maybe not null, null ? int i; void sock_down() { socketList[i].close(); if (i != socketList.length - 1) socketList[i] = socketList[$ - 1]; //todo writefln("\tTotal connections: %d", socketList.length); //next(); } void next() { } //цикл учета for (i = 0;; i++) { //next: if (i == socketList.length) break; //////////////////////////////////// if (sSet.isSet(socketList[i])) { ubyte[BUF_SIZE] buf; int read = cast(int)socketList[i].receive(buf); if (Socket.ERROR == read) { throw new ConnectEx(); } else if ( 0 == read ) { try { //if the connection closed due to an error, remoteAddress() could fail //todo writefln("Connection from %s closed.", socketList[i].remoteAddress().toString()); } catch (SocketException) { //todo writeln("Connection closed."); } } } //////////////////////////////////////////////////// if (sSet.isSet(listener)) { Socket sn; //try //{ if(socketList.length < MAX_CONNECTIONS) { sn = listener.accept(); //todo writefln("Connection from %s established.", sn.remoteAddress().toString()); assert(sn.isAlive); assert(listener.isAlive); socketList ~= sn; //todo writefln("\tTotal connections: %d", socketList.length); } //} } } } } /// add new socket to the socket list /** * Return -1 if success */ private int add (Socket socket) { try { socketList ~= socket; return -1; } catch (Exception ex) { throw new Exception("Socket adding exception"); return 0; } } /// remove last added socket private int remove() { socketList = socketList[0..$ -1]; return -1; } } /// Implenets sockets by server public class ServerSocket { private Socket svSocket; private Stream ss; this(InternetAddress ia) { svSocket = new TcpSocket(); writeln("===========\nSERVER\n============="); svSocket.bind(ia); svSocket.listen(10); } public void print() { svSocket = svSocket.accept(); ss = new SocketStream(svSocket); write("Server: "); auto line = ss.readLine(); import std.array; assert (line.length != 0); writeln(line); } @property Stream stream() { return ss; } @property Socket socket() { return svSocket; } } /// Implements socket by client public class ClientSocket { private Socket clSocket; private Stream ss; this(InternetAddress ia) { clSocket = new TcpSocket(); writeln("===========\nCLIENT\n============="); clSocket.connect(ia); ss = new SocketStream(clSocket); } void write() { //string temp = "bebebe"; //clSocket.send(temp); ss.writeString("10500"); } @property Stream stream() { return ss; } @property Socket socket() { return clSocket; } }
D
# FIXED ICall/icall_cc2650.obj: C:/ti/simplelink/ble_sdk_2_02_01_18/src/components/icall/src/icall_cc2650.c ICall/icall_cc2650.obj: C:/ti/simplelink/ble_sdk_2_02_01_18/src/components/icall/src/icall_platform.h ICall/icall_cc2650.obj: C:/ti/ccsv7/tools/compiler/ti-cgt-arm_16.9.3.LTS/include/stdint.h ICall/icall_cc2650.obj: C:/ti/simplelink/ble_sdk_2_02_01_18/src/components/icall/src/inc/ICall.h ICall/icall_cc2650.obj: C:/ti/ccsv7/tools/compiler/ti-cgt-arm_16.9.3.LTS/include/stdbool.h ICall/icall_cc2650.obj: C:/ti/ccsv7/tools/compiler/ti-cgt-arm_16.9.3.LTS/include/stdlib.h ICall/icall_cc2650.obj: C:/ti/ccsv7/tools/compiler/ti-cgt-arm_16.9.3.LTS/include/linkage.h ICall/icall_cc2650.obj: C:/ti/simplelink/ble_sdk_2_02_01_18/src/components/hal/src/inc/hal_assert.h ICall/icall_cc2650.obj: C:/ti/simplelink/ble_sdk_2_02_01_18/src/components/hal/src/target/_common/hal_types.h ICall/icall_cc2650.obj: C:/ti/simplelink/ble_sdk_2_02_01_18/src/components/hal/src/target/_common/../_common/cc26xx/_hal_types.h ICall/icall_cc2650.obj: C:/ti/simplelink/ble_sdk_2_02_01_18/src/components/hal/src/inc/hal_defs.h ICall/icall_cc2650.obj: C:/ti/ccsv7/tools/compiler/ti-cgt-arm_16.9.3.LTS/include/stdlib.h ICall/icall_cc2650.obj: C:/ti/simplelink/ble_sdk_2_02_01_18/src/components/icall/src/inc/icall_cc26xx_defs.h ICall/icall_cc2650.obj: C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/tidrivers_cc13xx_cc26xx_2_20_01_10/packages/ti/drivers/Power.h ICall/icall_cc2650.obj: C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/tidrivers_cc13xx_cc26xx_2_20_01_10/packages/ti/drivers/utils/List.h ICall/icall_cc2650.obj: C:/ti/ccsv7/tools/compiler/ti-cgt-arm_16.9.3.LTS/include/stddef.h ICall/icall_cc2650.obj: C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/tidrivers_cc13xx_cc26xx_2_20_01_10/packages/ti/drivers/power/PowerCC26XX.h ICall/icall_cc2650.obj: C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/bios_6_46_01_38/packages/ti/sysbios/family/arm/m3/Hwi.h ICall/icall_cc2650.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/std.h ICall/icall_cc2650.obj: C:/ti/ccsv7/tools/compiler/ti-cgt-arm_16.9.3.LTS/include/stdarg.h ICall/icall_cc2650.obj: C:/ti/ccsv7/tools/compiler/ti-cgt-arm_16.9.3.LTS/include/stddef.h ICall/icall_cc2650.obj: C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/bios_6_46_01_38/packages/ti/targets/arm/elf/std.h ICall/icall_cc2650.obj: C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/bios_6_46_01_38/packages/ti/targets/arm/elf/M3.h ICall/icall_cc2650.obj: C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/bios_6_46_01_38/packages/ti/targets/std.h ICall/icall_cc2650.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/xdc.h ICall/icall_cc2650.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Types.h ICall/icall_cc2650.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Types__prologue.h ICall/icall_cc2650.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/package/package.defs.h ICall/icall_cc2650.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Types__epilogue.h ICall/icall_cc2650.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/IInstance.h ICall/icall_cc2650.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Types.h ICall/icall_cc2650.obj: C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/bios_6_46_01_38/packages/ti/sysbios/family/arm/m3/Hwi__prologue.h ICall/icall_cc2650.obj: C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/bios_6_46_01_38/packages/ti/sysbios/family/arm/m3/package/package.defs.h ICall/icall_cc2650.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Diags.h ICall/icall_cc2650.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Types.h ICall/icall_cc2650.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Diags__prologue.h ICall/icall_cc2650.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Main.h ICall/icall_cc2650.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Types.h ICall/icall_cc2650.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/IModule.h ICall/icall_cc2650.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Types.h ICall/icall_cc2650.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Types.h ICall/icall_cc2650.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/IHeap.h ICall/icall_cc2650.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Types.h ICall/icall_cc2650.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/IInstance.h ICall/icall_cc2650.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/IModule.h ICall/icall_cc2650.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Error.h ICall/icall_cc2650.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Types.h ICall/icall_cc2650.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Error__prologue.h ICall/icall_cc2650.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Main.h ICall/icall_cc2650.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/IModule.h ICall/icall_cc2650.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Types.h ICall/icall_cc2650.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Error__epilogue.h ICall/icall_cc2650.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Memory.h ICall/icall_cc2650.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Types.h ICall/icall_cc2650.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/IModule.h ICall/icall_cc2650.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/IHeap.h ICall/icall_cc2650.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Error.h ICall/icall_cc2650.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/package/Memory_HeapProxy.h ICall/icall_cc2650.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Types.h ICall/icall_cc2650.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/IInstance.h ICall/icall_cc2650.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/IHeap.h ICall/icall_cc2650.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Error.h ICall/icall_cc2650.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/IGateProvider.h ICall/icall_cc2650.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Types.h ICall/icall_cc2650.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/IInstance.h ICall/icall_cc2650.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/IModule.h ICall/icall_cc2650.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/package/Main_Module_GateProxy.h ICall/icall_cc2650.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Types.h ICall/icall_cc2650.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/IInstance.h ICall/icall_cc2650.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/IGateProvider.h ICall/icall_cc2650.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/IModule.h ICall/icall_cc2650.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Types.h ICall/icall_cc2650.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Diags__epilogue.h ICall/icall_cc2650.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Log.h ICall/icall_cc2650.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Types.h ICall/icall_cc2650.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Log__prologue.h ICall/icall_cc2650.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Error.h ICall/icall_cc2650.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Main.h ICall/icall_cc2650.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Diags.h ICall/icall_cc2650.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/IModule.h ICall/icall_cc2650.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Diags.h ICall/icall_cc2650.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Types.h ICall/icall_cc2650.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Text.h ICall/icall_cc2650.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Types.h ICall/icall_cc2650.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/IModule.h ICall/icall_cc2650.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Types.h ICall/icall_cc2650.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Log__epilogue.h ICall/icall_cc2650.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Assert.h ICall/icall_cc2650.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Types.h ICall/icall_cc2650.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Assert__prologue.h ICall/icall_cc2650.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Main.h ICall/icall_cc2650.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Diags.h ICall/icall_cc2650.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/IModule.h ICall/icall_cc2650.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Diags.h ICall/icall_cc2650.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Error.h ICall/icall_cc2650.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Types.h ICall/icall_cc2650.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Assert__epilogue.h ICall/icall_cc2650.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Error.h ICall/icall_cc2650.obj: C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/bios_6_46_01_38/packages/ti/sysbios/BIOS.h ICall/icall_cc2650.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Types.h ICall/icall_cc2650.obj: C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/bios_6_46_01_38/packages/ti/sysbios/BIOS__prologue.h ICall/icall_cc2650.obj: C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/bios_6_46_01_38/packages/ti/sysbios/package/package.defs.h ICall/icall_cc2650.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Error.h ICall/icall_cc2650.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Types.h ICall/icall_cc2650.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/IModule.h ICall/icall_cc2650.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/IGateProvider.h ICall/icall_cc2650.obj: C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/bios_6_46_01_38/packages/ti/sysbios/package/BIOS_RtsGateProxy.h ICall/icall_cc2650.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Types.h ICall/icall_cc2650.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/IInstance.h ICall/icall_cc2650.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/IGateProvider.h ICall/icall_cc2650.obj: C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/bios_6_46_01_38/packages/ti/sysbios/BIOS__epilogue.h ICall/icall_cc2650.obj: C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/bios_6_46_01_38/packages/ti/sysbios/interfaces/IHwi.h ICall/icall_cc2650.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Types.h ICall/icall_cc2650.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/IInstance.h ICall/icall_cc2650.obj: C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/bios_6_46_01_38/packages/ti/sysbios/interfaces/package/package.defs.h ICall/icall_cc2650.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Error.h ICall/icall_cc2650.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/IModule.h ICall/icall_cc2650.obj: C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/bios_6_46_01_38/packages/ti/sysbios/family/arm/m3/Hwi__epilogue.h ICall/icall_cc2650.obj: C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/bios_6_46_01_38/packages/ti/sysbios/knl/Clock.h ICall/icall_cc2650.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Types.h ICall/icall_cc2650.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/IInstance.h ICall/icall_cc2650.obj: C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/bios_6_46_01_38/packages/ti/sysbios/knl/package/package.defs.h ICall/icall_cc2650.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Assert.h ICall/icall_cc2650.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Diags.h ICall/icall_cc2650.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Log.h ICall/icall_cc2650.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/IModule.h ICall/icall_cc2650.obj: C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/bios_6_46_01_38/packages/ti/sysbios/interfaces/ITimer.h ICall/icall_cc2650.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Types.h ICall/icall_cc2650.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/IInstance.h ICall/icall_cc2650.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Types.h ICall/icall_cc2650.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/IModule.h ICall/icall_cc2650.obj: C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/bios_6_46_01_38/packages/ti/sysbios/knl/Queue.h ICall/icall_cc2650.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Types.h ICall/icall_cc2650.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/IInstance.h ICall/icall_cc2650.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/IModule.h ICall/icall_cc2650.obj: C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/bios_6_46_01_38/packages/ti/sysbios/knl/Swi.h ICall/icall_cc2650.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Types.h ICall/icall_cc2650.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/IInstance.h ICall/icall_cc2650.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Error.h ICall/icall_cc2650.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Assert.h ICall/icall_cc2650.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Diags.h ICall/icall_cc2650.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Log.h ICall/icall_cc2650.obj: C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/bios_6_46_01_38/packages/ti/sysbios/knl/Queue.h ICall/icall_cc2650.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/IModule.h ICall/icall_cc2650.obj: C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/bios_6_46_01_38/packages/ti/sysbios/knl/package/Clock_TimerProxy.h ICall/icall_cc2650.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Types.h ICall/icall_cc2650.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/IInstance.h ICall/icall_cc2650.obj: C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/bios_6_46_01_38/packages/ti/sysbios/interfaces/ITimer.h ICall/icall_cc2650.obj: C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/bios_6_46_01_38/packages/ti/sysbios/knl/package/Clock_TimerProxy.h C:/ti/simplelink/ble_sdk_2_02_01_18/src/components/icall/src/icall_cc2650.c: C:/ti/simplelink/ble_sdk_2_02_01_18/src/components/icall/src/icall_platform.h: C:/ti/ccsv7/tools/compiler/ti-cgt-arm_16.9.3.LTS/include/stdint.h: C:/ti/simplelink/ble_sdk_2_02_01_18/src/components/icall/src/inc/ICall.h: C:/ti/ccsv7/tools/compiler/ti-cgt-arm_16.9.3.LTS/include/stdbool.h: C:/ti/ccsv7/tools/compiler/ti-cgt-arm_16.9.3.LTS/include/stdlib.h: C:/ti/ccsv7/tools/compiler/ti-cgt-arm_16.9.3.LTS/include/linkage.h: C:/ti/simplelink/ble_sdk_2_02_01_18/src/components/hal/src/inc/hal_assert.h: C:/ti/simplelink/ble_sdk_2_02_01_18/src/components/hal/src/target/_common/hal_types.h: C:/ti/simplelink/ble_sdk_2_02_01_18/src/components/hal/src/target/_common/../_common/cc26xx/_hal_types.h: C:/ti/simplelink/ble_sdk_2_02_01_18/src/components/hal/src/inc/hal_defs.h: C:/ti/ccsv7/tools/compiler/ti-cgt-arm_16.9.3.LTS/include/stdlib.h: C:/ti/simplelink/ble_sdk_2_02_01_18/src/components/icall/src/inc/icall_cc26xx_defs.h: C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/tidrivers_cc13xx_cc26xx_2_20_01_10/packages/ti/drivers/Power.h: C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/tidrivers_cc13xx_cc26xx_2_20_01_10/packages/ti/drivers/utils/List.h: C:/ti/ccsv7/tools/compiler/ti-cgt-arm_16.9.3.LTS/include/stddef.h: C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/tidrivers_cc13xx_cc26xx_2_20_01_10/packages/ti/drivers/power/PowerCC26XX.h: C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/bios_6_46_01_38/packages/ti/sysbios/family/arm/m3/Hwi.h: C:/ti/xdctools_3_32_00_06_core/packages/xdc/std.h: C:/ti/ccsv7/tools/compiler/ti-cgt-arm_16.9.3.LTS/include/stdarg.h: C:/ti/ccsv7/tools/compiler/ti-cgt-arm_16.9.3.LTS/include/stddef.h: C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/bios_6_46_01_38/packages/ti/targets/arm/elf/std.h: C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/bios_6_46_01_38/packages/ti/targets/arm/elf/M3.h: C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/bios_6_46_01_38/packages/ti/targets/std.h: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/xdc.h: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Types.h: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Types__prologue.h: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/package/package.defs.h: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Types__epilogue.h: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/IInstance.h: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Types.h: C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/bios_6_46_01_38/packages/ti/sysbios/family/arm/m3/Hwi__prologue.h: C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/bios_6_46_01_38/packages/ti/sysbios/family/arm/m3/package/package.defs.h: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Diags.h: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Types.h: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Diags__prologue.h: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Main.h: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Types.h: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/IModule.h: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Types.h: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Types.h: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/IHeap.h: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Types.h: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/IInstance.h: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/IModule.h: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Error.h: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Types.h: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Error__prologue.h: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Main.h: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/IModule.h: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Types.h: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Error__epilogue.h: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Memory.h: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Types.h: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/IModule.h: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/IHeap.h: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Error.h: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/package/Memory_HeapProxy.h: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Types.h: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/IInstance.h: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/IHeap.h: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Error.h: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/IGateProvider.h: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Types.h: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/IInstance.h: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/IModule.h: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/package/Main_Module_GateProxy.h: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Types.h: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/IInstance.h: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/IGateProvider.h: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/IModule.h: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Types.h: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Diags__epilogue.h: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Log.h: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Types.h: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Log__prologue.h: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Error.h: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Main.h: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Diags.h: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/IModule.h: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Diags.h: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Types.h: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Text.h: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Types.h: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/IModule.h: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Types.h: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Log__epilogue.h: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Assert.h: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Types.h: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Assert__prologue.h: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Main.h: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Diags.h: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/IModule.h: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Diags.h: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Error.h: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Types.h: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Assert__epilogue.h: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Error.h: C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/bios_6_46_01_38/packages/ti/sysbios/BIOS.h: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Types.h: C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/bios_6_46_01_38/packages/ti/sysbios/BIOS__prologue.h: C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/bios_6_46_01_38/packages/ti/sysbios/package/package.defs.h: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Error.h: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Types.h: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/IModule.h: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/IGateProvider.h: C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/bios_6_46_01_38/packages/ti/sysbios/package/BIOS_RtsGateProxy.h: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Types.h: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/IInstance.h: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/IGateProvider.h: C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/bios_6_46_01_38/packages/ti/sysbios/BIOS__epilogue.h: C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/bios_6_46_01_38/packages/ti/sysbios/interfaces/IHwi.h: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Types.h: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/IInstance.h: C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/bios_6_46_01_38/packages/ti/sysbios/interfaces/package/package.defs.h: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Error.h: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/IModule.h: C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/bios_6_46_01_38/packages/ti/sysbios/family/arm/m3/Hwi__epilogue.h: C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/bios_6_46_01_38/packages/ti/sysbios/knl/Clock.h: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Types.h: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/IInstance.h: C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/bios_6_46_01_38/packages/ti/sysbios/knl/package/package.defs.h: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Assert.h: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Diags.h: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Log.h: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/IModule.h: C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/bios_6_46_01_38/packages/ti/sysbios/interfaces/ITimer.h: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Types.h: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/IInstance.h: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Types.h: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/IModule.h: C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/bios_6_46_01_38/packages/ti/sysbios/knl/Queue.h: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Types.h: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/IInstance.h: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/IModule.h: C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/bios_6_46_01_38/packages/ti/sysbios/knl/Swi.h: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Types.h: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/IInstance.h: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Error.h: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Assert.h: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Diags.h: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Log.h: C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/bios_6_46_01_38/packages/ti/sysbios/knl/Queue.h: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/IModule.h: C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/bios_6_46_01_38/packages/ti/sysbios/knl/package/Clock_TimerProxy.h: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Types.h: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/IInstance.h: C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/bios_6_46_01_38/packages/ti/sysbios/interfaces/ITimer.h: C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/bios_6_46_01_38/packages/ti/sysbios/knl/package/Clock_TimerProxy.h:
D
/Users/pramonowang/Desktop/anyhour/DerivedData/anyhour/Build/Intermediates/anyhour.build/Debug-iphoneos/anyhour.build/Objects-normal/armv7/MyAnnotation.o : /Users/pramonowang/Desktop/anyhour/anyhour/MyAnnotation.swift /Users/pramonowang/Desktop/anyhour/ShowMapViewController.swift /Users/pramonowang/Desktop/anyhour/anyhour/SearchMapViewController.swift /Users/pramonowang/Desktop/anyhour/anyhour/AnyHourCustomCell.swift /Users/pramonowang/Desktop/anyhour/anyhour/Restaurant.swift /Users/pramonowang/Desktop/anyhour/anyhour/ViewController.swift /Users/pramonowang/Desktop/anyhour/anyhour/AnyHourTableViewController.swift /Users/pramonowang/Desktop/anyhour/anyhour/AppDelegate.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/armv7/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/armv7/UIKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/armv7/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/armv7/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/armv7/Dispatch.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/armv7/ObjectiveC.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/armv7/CoreGraphics.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/armv7/CoreImage.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/armv7/CoreLocation.swiftmodule /Users/pramonowang/Desktop/anyhour/DerivedData/anyhour/Build/Intermediates/anyhour.build/Debug-iphoneos/anyhour.build/Objects-normal/armv7/MyAnnotation~partial.swiftmodule : /Users/pramonowang/Desktop/anyhour/anyhour/MyAnnotation.swift /Users/pramonowang/Desktop/anyhour/ShowMapViewController.swift /Users/pramonowang/Desktop/anyhour/anyhour/SearchMapViewController.swift /Users/pramonowang/Desktop/anyhour/anyhour/AnyHourCustomCell.swift /Users/pramonowang/Desktop/anyhour/anyhour/Restaurant.swift /Users/pramonowang/Desktop/anyhour/anyhour/ViewController.swift /Users/pramonowang/Desktop/anyhour/anyhour/AnyHourTableViewController.swift /Users/pramonowang/Desktop/anyhour/anyhour/AppDelegate.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/armv7/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/armv7/UIKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/armv7/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/armv7/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/armv7/Dispatch.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/armv7/ObjectiveC.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/armv7/CoreGraphics.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/armv7/CoreImage.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/armv7/CoreLocation.swiftmodule /Users/pramonowang/Desktop/anyhour/DerivedData/anyhour/Build/Intermediates/anyhour.build/Debug-iphoneos/anyhour.build/Objects-normal/armv7/MyAnnotation~partial.swiftdoc : /Users/pramonowang/Desktop/anyhour/anyhour/MyAnnotation.swift /Users/pramonowang/Desktop/anyhour/ShowMapViewController.swift /Users/pramonowang/Desktop/anyhour/anyhour/SearchMapViewController.swift /Users/pramonowang/Desktop/anyhour/anyhour/AnyHourCustomCell.swift /Users/pramonowang/Desktop/anyhour/anyhour/Restaurant.swift /Users/pramonowang/Desktop/anyhour/anyhour/ViewController.swift /Users/pramonowang/Desktop/anyhour/anyhour/AnyHourTableViewController.swift /Users/pramonowang/Desktop/anyhour/anyhour/AppDelegate.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/armv7/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/armv7/UIKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/armv7/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/armv7/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/armv7/Dispatch.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/armv7/ObjectiveC.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/armv7/CoreGraphics.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/armv7/CoreImage.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/armv7/CoreLocation.swiftmodule
D
module source.optimizers.nelder_mead; import std.algorithm; import std.conv: to; import std.functional: toDelegate; import std.math: abs, pow, sqrt, cos; import std.range: enumerate; import std.stdio: writeln, write; import std.typecons: Yes; import source.Matrix; import source.NeuralNetwork; import source.Parameter; T nelder_mead(T)(ref Vector!T _v, T function(in Vector!T) _obj, T reflection_coef=1.0, T expension_coef=2.0, T contraction_coef=0.5, T shrink_coef=0.5) { return nelder_mead!T(_v, toDelegate(_obj), reflection_coef, expension_coef, contraction_coef, shrink_coef); } T nelder_mead(T)(ref Vector!T _v, T delegate(in Vector!T) _obj, in T _random_bound=5.0, in size_t _max_iterations=10000, in T _reflection_coef=1.0, in T _expension_coef=2.0, in T _contraction_coef=0.5, in T _shrink_coef=0.5) { /+ + Arguments: + + - _v (Vector!T): will contains a local minimum of the _obj. + + - _obj (T delegate(Vector!T)): the function to minimize. + + - _random_bound (T): Absolute upper/lower bound for the creation + of the vectors. + + - _max_iterations (size_t): Maximum number of iterations. + + - reflection_coef (T): Meta-Parameter. + + - expension_coef (T): Meta-Parameter. + + - contraction_coef (T): Meta-Parameter. + + - shrink_coef (T): Meta-Parameter. +/ assert(_contraction_coef <= 0.5, "Contraction coef must be <= 0.5"); assert(_contraction_coef > 0, "Contraction coef must be > 0"); immutable size_t length = _v.length; immutable size_t num_points = _v.length + 1; /// Create Simplex auto simplex = new Vector!T[num_points]; /+ foreach(i; 0 .. (num_points)) simplex[i] = new Vector!T(length, _random_bound); +/ foreach(i; 0 .. (num_points-1)) { simplex[i] = new Vector!T(length, 0); simplex[i].v[i] = _random_bound; } simplex[num_points-1] = new Vector!T(length, 0); foreach(i; 0 .. length) simplex[num_points-1].v[i] = - _random_bound / sqrt(to!real(length)); /// Compute values at simplex points. T[] simplex_values = new T[num_points]; foreach(i; 0 .. num_points) simplex_values[i] = _obj(simplex[i]); /// Order simplex auto min_value = simplex_values.minElement; auto min_index = simplex_values.minIndex; auto tmp_max_value = new T[2]; simplex_values.topNCopy!"a > b"(tmp_max_value, Yes.sortOutput); size_t[] index_max = new size_t[2]; simplex_values.topNIndex!"a > b"(index_max, Yes.sortOutput); auto max1_value = tmp_max_value[0]; auto max1_index = index_max[0]; auto max2_value = tmp_max_value[1]; auto max2_index = index_max[1]; /// Init util vector auto temporary_vector = new Vector!T(length, _random_bound); auto reflection_vector = new Vector!T(length, _random_bound); auto expension_vector = new Vector!T(length, _random_bound); auto contraction_vector = new Vector!T(length, _random_bound); auto shrink_vector = new Vector!T(length, _random_bound); T temporary_value = to!T(0); T reflection_value = to!T(0); T expension_value = to!T(0); T contraction_value = to!T(0); T shrink_value = to!T(0); // Centroid auto temporary_centroid_vector = new Vector!T(length, 0); auto centroid_vector = new Vector!T(length, 0); foreach(i; 0 .. num_points){ // Centroid doesn't take worst point into account if (i != max1_index) temporary_centroid_vector += simplex[i]; } /// Core Loop bool stop_criterion = false; bool free_pass = false; size_t ind = 0; while(!stop_criterion && ind < _max_iterations) { /// Compute centroid centroid_vector.v[] = temporary_centroid_vector.v[]; centroid_vector /= length; free_pass = false; /// Reflection - 1st case reflection_vector.v[] = centroid_vector.v[]; reflection_vector -= simplex[max1_index]; reflection_vector *= _reflection_coef; reflection_vector += centroid_vector; reflection_value = _obj(reflection_vector); // if f(x_1) <= f(x_r) < f(x_n) if ((reflection_value < max2_value) && (reflection_value >= min_value)) { // Readjust centroid vector. temporary_centroid_vector += reflection_vector; // Replace last point in simplex. simplex[max1_index].v[] = reflection_vector.v[]; simplex_values[max1_index] = reflection_value; min_value = simplex_values.minElement; min_index = simplex_values.minIndex; simplex_values.topNCopy!"a > b"(tmp_max_value, Yes.sortOutput); simplex_values.topNIndex!"a > b"(index_max, Yes.sortOutput); max1_value = tmp_max_value[0]; max1_index = index_max[0]; max2_value = tmp_max_value[1]; max2_index = index_max[1]; free_pass = true; } /// Expension if (!free_pass) { if (reflection_value < min_value) { expension_vector.v[] = reflection_vector.v[]; expension_vector -= centroid_vector; expension_vector *= _expension_coef; expension_vector += centroid_vector; expension_value = _obj(expension_vector); // We replace the worst point by the expension vector if (expension_value < reflection_value) { // Readjust centroid vector. temporary_centroid_vector += expension_vector; simplex[max1_index].v[] = expension_vector.v[]; simplex_values[max1_index] = expension_value; min_value = simplex_values.minElement; min_index = simplex_values.minIndex; simplex_values.topNCopy!"a > b"(tmp_max_value, Yes.sortOutput); simplex_values.topNIndex!"a > b"(index_max, Yes.sortOutput); max1_value = tmp_max_value[0]; max1_index = index_max[0]; max2_value = tmp_max_value[1]; max2_index = index_max[1]; } // Reflection - 2nd case // We replace the worst point by the reflection vector else { // Readjust centroid vector. temporary_centroid_vector += reflection_vector; simplex[max1_index].v[] = reflection_vector.v[]; simplex_values[max1_index] = reflection_value; min_value = simplex_values.minElement; min_index = simplex_values.minIndex; simplex_values.topNCopy!"a > b"(tmp_max_value, Yes.sortOutput); simplex_values.topNIndex!"a > b"(index_max, Yes.sortOutput); max1_value = tmp_max_value[0]; max1_index = index_max[0]; max2_value = tmp_max_value[1]; max2_index = index_max[1]; } free_pass = true; } } /// Contraction if (!free_pass) { // Internal contraction auto blie = ""; if (max1_value <= reflection_value) { contraction_vector.v[] = simplex[max1_index].v[]; contraction_vector -= centroid_vector; contraction_vector *= _contraction_coef; contraction_vector += centroid_vector; } // External contraction else { contraction_vector.v[] = reflection_vector.v[]; contraction_vector -= centroid_vector; contraction_vector *= _contraction_coef; contraction_vector += centroid_vector; } contraction_value = _obj(contraction_vector); if (contraction_value < max1_value) { // Readjust centroid vector. temporary_centroid_vector += contraction_vector; // Replace last point in simplex. simplex[max1_index].v[] = contraction_vector.v[]; simplex_values[max1_index] = contraction_value; min_value = simplex_values.minElement; min_index = simplex_values.minIndex; simplex_values.topNCopy!"a > b"(tmp_max_value, Yes.sortOutput); simplex_values.topNIndex!"a > b"(index_max, Yes.sortOutput); max1_value = tmp_max_value[0]; max1_index = index_max[0]; max2_value = tmp_max_value[1]; max2_index = index_max[1]; free_pass = true; } } /// Shrink if (!free_pass) { // We need to recompute the centroid temporary_centroid_vector.v[] = simplex[min_index].v[]; foreach(i; 0 .. num_points) { if (i != min_index) { simplex[i] -= simplex[min_index]; simplex[i] *= _shrink_coef; simplex[i] += simplex[min_index]; simplex_values[i] = _obj(simplex[i]); temporary_centroid_vector += simplex[i]; } } min_value = simplex_values.minElement; min_index = simplex_values.minIndex; simplex_values.topNCopy!"a > b"(tmp_max_value, Yes.sortOutput); simplex_values.topNIndex!"a > b"(index_max, Yes.sortOutput); max1_value = tmp_max_value[0]; max1_index = index_max[0]; max2_value = tmp_max_value[1]; max2_index = index_max[1]; } // Stopping criterion 1: // Stop when the centroid and the first vector are close // Remove worst point from centroid temporary_centroid_vector -= simplex[max1_index]; temporary_vector.v[] = temporary_centroid_vector.v[]; temporary_vector.v[] /= length; temporary_vector -= simplex[min_index]; stop_criterion = (temporary_vector.norm!"L2" <= 0.0001); ind++; } /// Return _v.v[] = simplex[min_index].v[]; return min_value; } unittest { void test_action_NM(Vector!float expected_solution, string str_action, Vector!float point_training=null) { if (!point_training) point_training = expected_solution; // Create Data points. Vector!float[] x_train = new Vector!float[1]; Vector!float[] y_train = new Vector!float[1]; Vector!float[] y_tilde = new Vector!float[1]; x_train[0] = point_training; y_train[0] = new Vector!float(2); y_tilde[0] = new Vector!float(2); y_train[0].v[] = x_train[0].v[]; // Create Neural Network. auto nn = new NeuralNetwork!float(2); nn.func!("b.v[] = p0.v[];", Vector!float) (2, null, null, null, null, [2], [0.0]) .serialize; float loss_function_linRel(in Vector!float _v) { float loss_value = 0.0; // We equipe the neural network with the weigth given in parameters. nn.set_parameters(_v); // Compute the squared errors. nn.apply(x_train[0], y_tilde[0]); y_tilde[0] -= y_train[0]; loss_value += y_tilde[0].norm!"L2"; return loss_value; } auto sol = new Vector!float(nn.serialized_data.length, 0.0); auto res = nelder_mead!float(sol, &loss_function_linRel, 1.0, 1); sol -= expected_solution; assert (sol.norm!"L2" < 1e-3, "Optimizers: Nelder_Mead: " ~ str_action); } void test_action_NM_shrink(Vector!float expected_solution, string str_action,) { float loss_function_cosabs(in Vector!float _v) { auto v0 = 0.5*(_v[1] - _v[0]); auto v1 = 0.5*(1+sqrt(2.0))*(_v[0]+_v[1]-1.0); auto z = sqrt(v0*v0 + v1*v1); return z - cos(2.0*3.1415926535*z); } auto sol = new Vector!float(2, 0.0); auto res = nelder_mead!float(sol, &loss_function_cosabs, 1.0, 1); sol -= expected_solution; assert (sol.norm!"L2" < 1e-3, "Optimizers: Nelder_Mead: " ~ str_action); } auto vec_r1 = new Vector!float([0, 1]); auto vec_r2 = new Vector!float([1.0+1.0/sqrt(2.0), 1.0+1.0/sqrt(2.0)]); auto vec_e = new Vector!float([1.5+sqrt(2.0), 1.5+sqrt(2.0)]); auto vec_c_i = new Vector!float([0.25-1.0/(2.0*sqrt(2.0)), 0.25-1.0/(2.0*sqrt(2.0))]); auto vec_c_e = new Vector!float([0.75 + 1.0/(2.0*sqrt(2.0)), 0.75 + 1.0/(2.0*sqrt(2.0))]); auto vec_s = new Vector!float([0.5, 0.5]); test_action_NM(vec_r1, "Reflection - 1st case", new Vector!float([0.5, 1 + 1/sqrt(2.0)])); test_action_NM(vec_r2, "Reflection - 2nd case"); test_action_NM(vec_e, "Expension"); test_action_NM(vec_c_i, "Contraction (Internal)", new Vector!float([0.1, 0.1])); test_action_NM(vec_c_e, "Contraction (External)", new Vector!float([0.9, 0.9])); test_action_NM_shrink(vec_s, "Shrink"); } void nelder_mead_tests() { {// coscosexp function - dimensions auto v = new Vector!real(2); import std.math: cos, exp; real f3hc(in Vector!real _v) { real x = _v[0]; real y = _v[1]; return 1 - cos(x) * cos(y) * exp(- (x*x + y*y)); } size_t num = 25; real succes = 0; foreach(i; 0 .. num) { auto res = nelder_mead!real(v, &f3hc, 1.0); if ((abs(res) <= 0.01) && (v.norm!"L2" <= 0.01)) succes++; } assert((succes/num) >= 0.95, "Optimizers: Nelder_Mead: coscosexp: " ~ to!string(100*(succes/num))~"%"); } {// Sphere function auto v = new Vector!real(150); real sphere(in Vector!real _v) { real tmp = 0.0; foreach(val; _v.v) tmp += val*val; return tmp; } assert(sphere(new Vector!real([0.0])) == 0.0); assert(sphere(new Vector!real([1.0, -1.0])) == 2.0); size_t num = 25; real succes = 0; foreach(i; 0 .. num) { auto res = nelder_mead!real(v, &sphere); if ((abs(res) <= 0.01) && (v.norm!"max" <= 0.01)) succes++; } assert((succes/num) >= 0.95, "Optimizers: Nelder_Mead: Sphere: " ~ to!string(100*(succes/num))~"%"); } {// train a very small neural network on linear + relu function size_t len = 10; size_t num_points = 500; // Create Data points. auto true_nn = new NeuralNetwork!float(len); true_nn.linear .relu .serialize; Vector!float[] x_train = new Vector!float[num_points]; Vector!float[] y_train = new Vector!float[num_points]; Vector!float[] y_tilde = new Vector!float[num_points]; foreach(i; 0 .. num_points) { x_train[i] = new Vector!float(len, 1.0); y_train[i] = new Vector!float(len); y_tilde[i] = new Vector!float(len); true_nn.apply(x_train[i], y_train[i]); } // Create Neural Network. auto nn = new NeuralNetwork!float(len); nn.linear .relu .serialize; float loss_function_linRel(in Vector!float _v) { float loss_value = 0.0; // We equipe the neural network with the weigth given in parameters. nn.set_parameters(_v); // We loop over all data points and compute the sum of squared errors. foreach(i; 0 .. num_points) { nn.apply(x_train[i], y_tilde[i]); y_tilde[i] -= y_train[i]; loss_value += y_tilde[i].norm!"L2"; } return loss_value/num_points; } auto sol = new Vector!float(nn.serialized_data.length, 0.0); auto res = nelder_mead!float(sol, &loss_function_linRel, 2.0); assert(res < 1e-3, "Optimizers: Nelder_Mead: Linear.Relu"); } {// train a very small neural network on dot product function size_t len = 100; size_t num_points = 5000; // Create Data points. auto m = new Matrix!float(1, len, 1.0); Vector!float[] x_train = new Vector!float[num_points]; Vector!float[] y_train = new Vector!float[num_points]; Vector!float[] y_tilde = new Vector!float[num_points]; foreach(i; 0 .. num_points) { x_train[i] = new Vector!float(len, 1.0); y_tilde[i] = new Vector!float(1, 1.0); y_train[i] = m * x_train[i]; } // Create Neural Network. auto nn = new NeuralNetwork!float(len); nn.linear(1).serialize(); float loss_function_dot(in Vector!float _v) { float loss_value = 0.0; // We equipe the neural network with the weigth given in parameters. nn.set_parameters(_v); // We loop over all data points and compute the sum of squared errors. foreach(i; 0 .. num_points) { nn.apply(x_train[i], y_tilde[i]); y_tilde[i] -= y_train[i]; loss_value += y_tilde[i].norm!"L2"; } return loss_value/num_points; } auto sol = new Vector!float(nn.serialized_data.length, 0.0); auto res = nelder_mead!float(sol, &loss_function_dot, 2.0, 50000); assert (res < 1e-3, "Optimizers: Nelder_Mead: Dot Product"); } }
D
// https://issues.dlang.org/show_bug.cgi?id=6795 /* TEST_OUTPUT: --- fail_compilation/fail6795.d(12): Error: cannot modify constant `0` fail_compilation/fail6795.d(13): Error: cannot modify constant `0` --- */ void main() { enum int[] array = [0]; array[0]++; array[0] += 3; } /* TEST_OUTPUT: --- fail_compilation/fail6795.d(31): Error: cannot modify constant `0` fail_compilation/fail6795.d(32): Error: cannot modify constant `0` fail_compilation/fail6795.d(33): Error: cannot modify constant `0` --- */ void test_wrong_line_num() { enum int[] da = [0]; enum int[1] sa = [0]; enum int[int] aa = [0:0]; da[0] += 3; sa[0] += 3; aa[0] += 3; }
D
/Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/SQL.build/SQLTable.swift.o : /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLBind.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLJoinMethod.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLTable.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLCreateTable.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLDropTable.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLAlterTable.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLSerializable.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLDataType.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLUpdate.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLDelete.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLLiteral.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLBoolLiteral.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLDefaultLiteral.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLTableConstraintAlgorithm.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLColumnConstraintAlgorithm.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLJoin.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLExpression.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLSelectExpression.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLCollation.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLForeignKeyAction.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLConnection.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLDirection.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLFunction.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLColumnDefinition.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLCreateTableBuilder.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLDropTableBuilder.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLAlterTableBuilder.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLPredicateBuilder.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLUpdateBuilder.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLDeleteBuilder.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLColumnBuilder.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLPredicateGroupBuilder.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLSelectBuilder.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLInsertBuilder.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLRawBuilder.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLCreateIndexBuilder.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLQueryBuilder.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLQueryEncoder.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLQueryFetcher.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLIndexModifier.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLIdentifier.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLTableIdentifier.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLColumnIdentifier.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLError.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLBinaryOperator.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/Exports.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLSelect.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLDistinct.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLFunctionArgument.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLTableConstraint.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLColumnConstraint.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLInsert.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLCreateIndex.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLDropIndex.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLGroupBy.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLOrderBy.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLForeignKey.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLPrimaryKey.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLQuery.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/NIO.swiftmodule /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/Async.swiftmodule /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/Service.swiftmodule /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/Core.swiftmodule /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/Debugging.swiftmodule /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.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/TILAppAcronyms/.build/x86_64-apple-macosx/debug/NIOConcurrencyHelpers.swiftmodule /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/Bits.swiftmodule /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/NIOFoundationCompat.swiftmodule /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/DatabaseKit.swiftmodule /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/swift-nio/Sources/CNIOAtomics/include/cpp_magic.h /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/swift-nio/Sources/CNIOLinux/include/ifaddrs-android.h /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/swift-nio/Sources/CNIODarwin/include/CNIODarwin.h /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/swift-nio/Sources/CNIOAtomics/include/CNIOAtomics.h /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/swift-nio/Sources/CNIOLinux/include/CNIOLinux.h /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/CNIOSHA1.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/NIOHTTP1.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/SQL.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/FluentSQL.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/MySQL.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/FluentMySQL.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/NIOOpenSSL.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/CNIOOpenSSL.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/CCryptoOpenSSL.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/NIO.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/HTTP.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/NIOTLS.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/CNIOZlib.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/Async.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/Command.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/Service.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/Console.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/Core.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/SQLite.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/FluentSQLite.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/NIOPriorityQueue.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/Logging.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/Debugging.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/Routing.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/SQLBenchmark.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/FluentBenchmark.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/COperatingSystem.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/Random.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/URLEncodedForm.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/CNIODarwin.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/Authentication.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/Validation.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/Crypto.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/App.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/CNIOHTTPParser.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/Vapor.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/CNIOAtomics.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/NIOConcurrencyHelpers.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/Bits.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/NIOFoundationCompat.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/WebSocket.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/NIOWebSocket.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/DatabaseKit.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/TemplateKit.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/Fluent.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/Multipart.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/CNIOLinux.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.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/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/SQL.build/SQLTable~partial.swiftmodule : /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLBind.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLJoinMethod.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLTable.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLCreateTable.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLDropTable.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLAlterTable.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLSerializable.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLDataType.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLUpdate.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLDelete.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLLiteral.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLBoolLiteral.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLDefaultLiteral.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLTableConstraintAlgorithm.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLColumnConstraintAlgorithm.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLJoin.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLExpression.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLSelectExpression.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLCollation.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLForeignKeyAction.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLConnection.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLDirection.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLFunction.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLColumnDefinition.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLCreateTableBuilder.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLDropTableBuilder.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLAlterTableBuilder.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLPredicateBuilder.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLUpdateBuilder.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLDeleteBuilder.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLColumnBuilder.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLPredicateGroupBuilder.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLSelectBuilder.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLInsertBuilder.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLRawBuilder.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLCreateIndexBuilder.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLQueryBuilder.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLQueryEncoder.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLQueryFetcher.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLIndexModifier.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLIdentifier.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLTableIdentifier.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLColumnIdentifier.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLError.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLBinaryOperator.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/Exports.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLSelect.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLDistinct.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLFunctionArgument.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLTableConstraint.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLColumnConstraint.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLInsert.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLCreateIndex.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLDropIndex.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLGroupBy.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLOrderBy.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLForeignKey.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLPrimaryKey.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLQuery.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/NIO.swiftmodule /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/Async.swiftmodule /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/Service.swiftmodule /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/Core.swiftmodule /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/Debugging.swiftmodule /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.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/TILAppAcronyms/.build/x86_64-apple-macosx/debug/NIOConcurrencyHelpers.swiftmodule /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/Bits.swiftmodule /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/NIOFoundationCompat.swiftmodule /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/DatabaseKit.swiftmodule /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/swift-nio/Sources/CNIOAtomics/include/cpp_magic.h /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/swift-nio/Sources/CNIOLinux/include/ifaddrs-android.h /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/swift-nio/Sources/CNIODarwin/include/CNIODarwin.h /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/swift-nio/Sources/CNIOAtomics/include/CNIOAtomics.h /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/swift-nio/Sources/CNIOLinux/include/CNIOLinux.h /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/CNIOSHA1.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/NIOHTTP1.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/SQL.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/FluentSQL.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/MySQL.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/FluentMySQL.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/NIOOpenSSL.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/CNIOOpenSSL.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/CCryptoOpenSSL.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/NIO.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/HTTP.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/NIOTLS.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/CNIOZlib.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/Async.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/Command.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/Service.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/Console.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/Core.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/SQLite.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/FluentSQLite.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/NIOPriorityQueue.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/Logging.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/Debugging.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/Routing.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/SQLBenchmark.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/FluentBenchmark.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/COperatingSystem.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/Random.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/URLEncodedForm.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/CNIODarwin.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/Authentication.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/Validation.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/Crypto.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/App.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/CNIOHTTPParser.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/Vapor.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/CNIOAtomics.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/NIOConcurrencyHelpers.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/Bits.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/NIOFoundationCompat.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/WebSocket.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/NIOWebSocket.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/DatabaseKit.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/TemplateKit.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/Fluent.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/Multipart.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/CNIOLinux.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.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/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/SQL.build/SQLTable~partial.swiftdoc : /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLBind.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLJoinMethod.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLTable.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLCreateTable.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLDropTable.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLAlterTable.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLSerializable.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLDataType.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLUpdate.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLDelete.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLLiteral.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLBoolLiteral.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLDefaultLiteral.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLTableConstraintAlgorithm.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLColumnConstraintAlgorithm.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLJoin.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLExpression.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLSelectExpression.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLCollation.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLForeignKeyAction.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLConnection.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLDirection.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLFunction.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLColumnDefinition.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLCreateTableBuilder.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLDropTableBuilder.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLAlterTableBuilder.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLPredicateBuilder.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLUpdateBuilder.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLDeleteBuilder.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLColumnBuilder.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLPredicateGroupBuilder.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLSelectBuilder.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLInsertBuilder.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLRawBuilder.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLCreateIndexBuilder.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLQueryBuilder.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLQueryEncoder.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLQueryFetcher.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLIndexModifier.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLIdentifier.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLTableIdentifier.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLColumnIdentifier.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLError.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLBinaryOperator.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/Exports.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLSelect.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLDistinct.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLFunctionArgument.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLTableConstraint.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLColumnConstraint.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLInsert.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLCreateIndex.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLDropIndex.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLGroupBy.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLOrderBy.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLForeignKey.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLPrimaryKey.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLQuery.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/NIO.swiftmodule /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/Async.swiftmodule /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/Service.swiftmodule /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/Core.swiftmodule /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/Debugging.swiftmodule /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.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/TILAppAcronyms/.build/x86_64-apple-macosx/debug/NIOConcurrencyHelpers.swiftmodule /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/Bits.swiftmodule /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/NIOFoundationCompat.swiftmodule /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/DatabaseKit.swiftmodule /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/swift-nio/Sources/CNIOAtomics/include/cpp_magic.h /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/swift-nio/Sources/CNIOLinux/include/ifaddrs-android.h /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/swift-nio/Sources/CNIODarwin/include/CNIODarwin.h /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/swift-nio/Sources/CNIOAtomics/include/CNIOAtomics.h /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/swift-nio/Sources/CNIOLinux/include/CNIOLinux.h /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/CNIOSHA1.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/NIOHTTP1.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/SQL.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/FluentSQL.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/MySQL.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/FluentMySQL.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/NIOOpenSSL.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/CNIOOpenSSL.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/CCryptoOpenSSL.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/NIO.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/HTTP.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/NIOTLS.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/CNIOZlib.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/Async.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/Command.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/Service.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/Console.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/Core.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/SQLite.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/FluentSQLite.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/NIOPriorityQueue.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/Logging.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/Debugging.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/Routing.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/SQLBenchmark.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/FluentBenchmark.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/COperatingSystem.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/Random.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/URLEncodedForm.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/CNIODarwin.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/Authentication.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/Validation.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/Crypto.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/App.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/CNIOHTTPParser.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/Vapor.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/CNIOAtomics.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/NIOConcurrencyHelpers.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/Bits.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/NIOFoundationCompat.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/WebSocket.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/NIOWebSocket.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/DatabaseKit.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/TemplateKit.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/Fluent.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/Multipart.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/CNIOLinux.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.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/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/SQL.build/SQLTable~partial.swiftsourceinfo : /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLBind.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLJoinMethod.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLTable.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLCreateTable.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLDropTable.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLAlterTable.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLSerializable.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLDataType.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLUpdate.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLDelete.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLLiteral.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLBoolLiteral.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLDefaultLiteral.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLTableConstraintAlgorithm.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLColumnConstraintAlgorithm.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLJoin.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLExpression.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLSelectExpression.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLCollation.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLForeignKeyAction.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLConnection.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLDirection.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLFunction.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLColumnDefinition.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLCreateTableBuilder.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLDropTableBuilder.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLAlterTableBuilder.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLPredicateBuilder.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLUpdateBuilder.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLDeleteBuilder.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLColumnBuilder.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLPredicateGroupBuilder.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLSelectBuilder.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLInsertBuilder.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLRawBuilder.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLCreateIndexBuilder.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLQueryBuilder.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLQueryEncoder.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLQueryFetcher.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLIndexModifier.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLIdentifier.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLTableIdentifier.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLColumnIdentifier.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLError.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLBinaryOperator.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/Exports.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLSelect.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLDistinct.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLFunctionArgument.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLTableConstraint.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLColumnConstraint.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLInsert.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLCreateIndex.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLDropIndex.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLGroupBy.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLOrderBy.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLForeignKey.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLPrimaryKey.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/sql/Sources/SQL/SQLQuery.swift /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/NIO.swiftmodule /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/Async.swiftmodule /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/Service.swiftmodule /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/Core.swiftmodule /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/Debugging.swiftmodule /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.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/TILAppAcronyms/.build/x86_64-apple-macosx/debug/NIOConcurrencyHelpers.swiftmodule /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/Bits.swiftmodule /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/NIOFoundationCompat.swiftmodule /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/DatabaseKit.swiftmodule /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/swift-nio/Sources/CNIOAtomics/include/cpp_magic.h /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/swift-nio/Sources/CNIOLinux/include/ifaddrs-android.h /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/swift-nio/Sources/CNIODarwin/include/CNIODarwin.h /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/swift-nio/Sources/CNIOAtomics/include/CNIOAtomics.h /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/checkouts/swift-nio/Sources/CNIOLinux/include/CNIOLinux.h /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/CNIOSHA1.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/NIOHTTP1.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/SQL.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/FluentSQL.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/MySQL.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/FluentMySQL.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/NIOOpenSSL.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/CNIOOpenSSL.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/CCryptoOpenSSL.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/NIO.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/HTTP.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/NIOTLS.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/CNIOZlib.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/Async.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/Command.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/Service.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/Console.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/Core.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/SQLite.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/FluentSQLite.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/NIOPriorityQueue.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/Logging.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/Debugging.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/Routing.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/SQLBenchmark.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/FluentBenchmark.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/COperatingSystem.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/Random.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/URLEncodedForm.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/CNIODarwin.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/Authentication.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/Validation.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/Crypto.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/App.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/CNIOHTTPParser.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/Vapor.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/CNIOAtomics.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/NIOConcurrencyHelpers.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/Bits.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/NIOFoundationCompat.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/WebSocket.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/NIOWebSocket.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/DatabaseKit.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/TemplateKit.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/Fluent.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/Multipart.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.build/x86_64-apple-macosx/debug/CNIOLinux.build/module.modulemap /Users/panartem/Developer/Study/Microservices-vapor/TILAppAcronyms/.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 abagames.util.math; version(WASM) { private: version(X86) { extern (C) float wasm_cos(float x) { return 0.0f; } extern (C) float wasm_sin(float x) { return 0.0f; } extern (C) float wasm_sqrt(float x) { return 0.0f; } extern (C) float wasm_atan2(float y, float x) { return 0.0f; } extern (C) float wasm_pow(float x, float y) { return 0.0f; } extern (C) float wasm_fmodf(float x, float y) { return 0.0f; } } else { extern (C) float wasm_cos(float x); extern (C) float wasm_sin(float x); extern (C) float wasm_sqrt(float x); extern (C) float wasm_atan2(float y, float x); extern (C) float wasm_pow(float x, float y); extern (C) float wasm_fmodf(float x, float y); } public: float cos(float x) { return wasm_cos(x); } float sin(float x) { return wasm_sin(x); } float sqrt(float x) { return wasm_sqrt(x); } float atan2(float y, float x) { return wasm_atan2(y, x); } float pow(float x, float y) { return wasm_pow(x, y); } extern(C) float fmodf(float x, float y) { return wasm_fmodf(x, y); } } else { import std.math; alias cos = std.math.cos; alias sin = std.math.sin; alias sqrt = std.math.sqrt; alias atan2 = std.math.atan2; alias pow = std.math.pow; } enum real PI = 0x1.921fb54442d18469898cc51701b84p+1L; enum real PI_2 = PI/2; enum real PI_4 = PI/4; float fabs(float x) { return x < 0.0f ? -x : x; } bool isNaN(float x) @nogc @trusted pure nothrow { return x != x; }
D
/* * * This source code is CONFIDENTIAL and * PROPRIETARY to Blake McBride (blake@mcbride.name). Unauthorized * distribution, adaptation or use may * be subject to civil and criminal penalties. * * Copyright (c) 1993 Blake McBride (blake@mcbride.name) * * ALL RIGHTS RESERVED. * * * */ /* This example builds on the previous example by the addition of two methods which allow users of this class to set and obtain the value in the iName instance variable. */ #include <string.h> defclass Class1 { char iName[30]; int iCode; iData; }; /* Methods are declared in a similar fashion to C functions (using ANSI prototypes) except as noted as follows. 'imeth' is used to introduce instance methods with compile time argument checking enabled. Other method introductory commands are 'cmeth' which introduces class methods with compile time argument checking, 'ivmeth' which introduces variable argument instance methods without compile time checking, and 'cvmeth' which defines variable argument class methods without compile time argument checking. Since no return type is declared, Dynace defaults it to type 'object'. The name of the generic this method will be associated with is 'gSetName', and since there is no explicit method name given, Dynace will just default to 'm_gSetName'. This is quite convenient since you rarely reference a method directly. If, however, a method is accessed directly (only possible from within the same source file), a method name should be explicitly declared for use. The next example will show how to give a method an explicit name. Although no naming convention is enforced by Dynace, the suggested convention is to use a leading 'g' followed by an uppercase letter to designate a generic (instance or class) which is using compile-time argument checking. A leading 'v' followed by an uppercase letter is used to indicate a variable argument generic, or one whos arguments are not checked at compile time. The 'g' stands for generic, and the 'v' stands for variable argument generic. A method may also be associated with a group of generics. The first argument to ALL methods is 'object self'. Since it is always the same, Dynace defaults this declaration and the programmer need not explicitly declare it. This specific generic (gSetName) takes an additional argument 'char *name'. Notice how the instance variables associated with the instance passed to the method (as the first argument) are immediatly accessable. This is one reason for the instance variable nameing convension. Otherwise, it may be difficult to distinguish betweem instance variables and local variables. This method simply copies the argument passed to the specified instance variable. It is common practice, although not strictly required, under Dynace to return an object from methods. If no meaningful return value is available, simply return the instance passed (self). */ imeth gSetName(char *name) { strcpy(iName, name); return self; } /* This next method is defined as above except as follows: This new method, named get_name, is explictly defined to return a char *. Also, the method is explicitly associated with the gGetName generic. If you wanted to associated it with several generics you would use the following syntax: imeth char * gGetName, gAnotherGeneric, gAbc : get_name () This associates the method with all three generics. Since no arguments are declared, this method will only take the single, default, argument of 'object self'. This method returns a pointer to the iName instance variable associated with the instance passed. */ imeth char *gGetName : get_name () { return iName; } /* * * This source code is CONFIDENTIAL and * PROPRIETARY to Blake McBride (blake@mcbride.name). Unauthorized * distribution, adaptation or use may * be subject to civil and criminal penalties. * * Copyright (c) 1993 Blake McBride (blake@mcbride.name) * * ALL RIGHTS RESERVED. * * * */
D
module forms; import std.stdio; import qte5; import core.runtime; import std.string; import std.conv; import mybase; import mysql; import std.variant; import app; import std.datetime.date; import mylib; extern (C) { void on_actionButton1(Form1* h){ (*h).button1Click(); } void on_actionButton3(Form1* h){ (*h).button3Click(); } void on_actionButton2(Form1* h){ (*h).button2Click(); } void on_signal(Form1* h,int n,int curr_r,int curr_c, int prev_r, int prev_c){ (*h).cellChange(curr_r,curr_c,prev_r,prev_c); } void on_newButton(Form1* h){ (*h).newButtonClick(); } void on_delButton(Form1* h){ (*h).delButtonClick(); } void on_exit(Form1* h){ (*h).fExit; } } class Form1 :QWidget { mydb db; private { ulong tRows,tCols; QVBoxLayout vLayAll; //Общ. верт выравниватель QHBoxLayout hLay1,hLay2,hLay3,hLay4; //Горизонтальный выравниватель QLabel Label1,Label_dbHost,Label_dbUser,Label_dbPort,Label_dbPwd,Label_dbName; QPushButton Button1,Button2,Button3, newButton, delButton; QAction actionButton1,actionButton3,actionButton2,actionNewButton, actionDelButton; QAction actionCellChanged,actionExit; QTableWidget Table1; QTableWidgetItem[][] items; QTableWidgetItem[] cols_header; QLineEdit LineEdit_dbHost,LineEdit_dbUser,LineEdit_dbPort,LineEdit_dbPwd,LineEdit_dbName; } this (QWidget parent, WindowType windowType){ super(parent, windowType); this.resize(900,500); setWindowTitle("Адресная книга"); vLayAll = new QVBoxLayout(this); hLay1 = new QHBoxLayout(null); hLay2 = new QHBoxLayout(null); hLay3 = new QHBoxLayout(null); hLay4 = new QHBoxLayout(null); LineEdit_dbHost = new QLineEdit(this); LineEdit_dbUser = new QLineEdit(this); LineEdit_dbPort = new QLineEdit(this); LineEdit_dbPwd = new QLineEdit(this); LineEdit_dbName = new QLineEdit(this); Label1 = new QLabel(this); (Label_dbHost = new QLabel(this)).setText("Host"); (Label_dbPort = new QLabel(this)).setText("Port"); (Label_dbUser = new QLabel(this)).setText("User"); (Label_dbPwd = new QLabel(this)).setText("Password"); (Label_dbName = new QLabel(this)).setText("Database"); Button1 = new QPushButton("подключится к базе данных",this); Button2 = new QPushButton("Обновить",this); Button3 = new QPushButton("Редактировать",this); newButton = new QPushButton("Добавить",this); delButton = new QPushButton("Удалить",this); Button2.setEnabled(false); Button3.setEnabled(false); newButton.setEnabled(false); delButton.setEnabled(false); Table1 = new QTableWidget(this); LineEdit_dbPwd.setEchoMode(QLineEdit.EchoMode.Password); LineEdit_dbHost.setText("192.168.1.1"); LineEdit_dbUser.setText("test"); LineEdit_dbPort.setText("3306"); LineEdit_dbPwd.setText("test"); LineEdit_dbName.setText("storage"); actionButton1 = new QAction(this,&on_actionButton1,aThis); actionButton3 = new QAction(this,&on_actionButton3,aThis); actionButton2 = new QAction(this,&on_actionButton2,aThis); actionNewButton = new QAction(this,&on_newButton,aThis); actionDelButton = new QAction(this,&on_delButton,aThis); actionCellChanged = new QAction(this,&on_signal,aThis); connects(Table1,"currentCellChanged(int, int, int, int)",actionCellChanged,"Slot_ANIIII(int, int, int, int)"); connects(Button1,"clicked()",actionButton1,"Slot()"); connects(Button2,"clicked()",actionButton2,"Slot()"); connects(Button3,"clicked()",actionButton3,"Slot()"); connects(newButton,"clicked()",actionNewButton,"Slot()"); connects(delButton,"clicked()",actionDelButton,"Slot()"); hLay1.addWidget(Button1); hLay2.addWidget(Label_dbHost). addWidget(Label_dbPort). addWidget(Label_dbUser). addWidget(Label_dbPwd). addWidget(Label_dbName); hLay3.addWidget(LineEdit_dbHost). addWidget(LineEdit_dbPort). addWidget(LineEdit_dbUser). addWidget(LineEdit_dbPwd). addWidget(LineEdit_dbName); hLay4.addWidget(Button2).addWidget(Button3).addWidget(newButton).addWidget(delButton); vLayAll.addWidget(Label1).addLayout(hLay1).addLayout(hLay2).addLayout(hLay3).addWidget(Table1).addLayout(hLay4); this.setCloseEvent(&on_exit,aThis); } void button1Click(){ try { if (db !is null) db.close(); db = new mydb; db.connect(LineEdit_dbHost.text!string,LineEdit_dbPort.text!string,LineEdit_dbUser.text!string,LineEdit_dbPwd.text!string,LineEdit_dbName.text!string); } catch (Exception e) { Label1.setText("Ошибка при подключении:"~e.msg); } if (db.connected){ Label1.setText("Подключено к БД"); fillTable1(); Table1.setCurrentCell(0,0); Button2.setEnabled(true); Button3.setEnabled(true); newButton.setEnabled(true); delButton.setEnabled(true); } else{ Label1.setText("Не подключено к БД"); } } void button2Click(){ fillTable1(); } void fillTable1(){ if ((db !is null) && db.connected){ items = db.getItems("person"); if (items !is null) { // получаем и задаем рвзмеры таблицы this.tRows = items.length; this.tCols = items[0].length; Table1.setRowCount(cast(int)this.tRows).setColumnCount(cast(int)this.tCols).hideColumn(0); //Заполняем заголовки столбцов if (cols_header is null){ auto tmp_colNames = db.colNames; //Получаем имена Столбцов for (auto i = 0; i<=(tCols-1);i++){ cols_header ~= new QTableWidgetItem(i).setText(tmp_colNames[i]); } foreach (e;cols_header){ e.setNoDelete(true); } for (auto i = 0; i<=(tCols-1);i++){ Table1.setHorizontalHeaderItem(i,cols_header[i]); } } //Присваеваем ячейкам таблицы итемы. for (auto i = 0;i<=tRows-1;i++){ for(auto j = 0;j<=tCols-1;j++){ items[i][j].setFlags(items[i][j].flags-QtE.ItemFlag.ItemIsEditable); Table1.setItem(i,j,items[i][j]); } } } }else{ Label1.setText("Не подключено к БД"); } } void button3Click(){ if ((db !is null) && db.connected){ ContactEdit cc = new ContactEdit(this,QtE.WindowType.Dialog,db.getRow(Table1.item(Table1.currentRow,0).text!int,"person"),this.db); cc.saveThis(&cc); cc.exec(); fillTable1(); } } void newButtonClick(){ if ((db !is null) && db.connected){ ContactEdit cc = new ContactEdit(this,QtE.WindowType.Dialog,null,this.db); cc.saveThis(&cc); cc.exec(); fillTable1(); } } void delButtonClick(){ this.db.delRecord(Table1.item(Table1.currentRow,0).text!int); fillTable1(); } void cellChange(int curr_r,int curr_c, int prev_r, int prev_c){ // } void fExit(){ if ((db !is null) && db.connected) { db.close(); } } } extern (C){ void on_okButton1(ContactEdit* h){ (*h).okButtonClick(); } void on_cancelButton1(ContactEdit* h){ (*h).close(); } void on_noteChanged(ContactEdit* h,int n){ (*h).noteChanged(); } void on_sexChanged(ContactEdit* h,int n){ (*h).sexChanged(); } } class ContactEdit : QDialog { mydb db; string id; private { QGridLayout gLay; QLineEdit f_nameEdit, m_nameEdit, l_nameEdit, b_dateEdit, emailEdit, m_phoneEdit; QLineEdit postcodeEdit, countryEdit, cityEdit, streetEdit, houseEdit, buildingEdit, apartmentEdit; QComboBox sexEdit; QPlainTextEdit noteEdit; QPushButton okButton,cancelButton; QLabel lFName, lMName, lLName, lB_Date,lEmail,lM_Phone, lSex, lNote; QLabel lPostcode, lCountry, lCity, lStreet, lHouse, lBuilding, lApartment; QAction actionOk, actionCancel, actionNoteChanged, actionSexChanged; QLineEdit[string] outData; bool noteModified = false; bool sexModified = false; } this(QWidget parent, QtE.WindowType fl, Variant[string] data, mydb db){ this.db = db; super(parent,fl); this.resize(700,600); setWindowTitle("Редактирование записи."); gLay = new QGridLayout(this); f_nameEdit = new QLineEdit(this); m_nameEdit = new QLineEdit(this); l_nameEdit = new QLineEdit(this); b_dateEdit = new QLineEdit(this); QString datemask = new QString("0000-00-00"); b_dateEdit.setInputMask(datemask); emailEdit = new QLineEdit(this); m_phoneEdit = new QLineEdit(this); QString phonemask = new QString("+0-000-000-00-00"); m_phoneEdit.setInputMask(phonemask); sexEdit = new QComboBox(this); if (data is null) sexEdit.addItem("-",3).addItem("Ж",2).addItem("М",1); noteEdit = new QPlainTextEdit(this); postcodeEdit = new QLineEdit(this); QString pcodemask = new QString("0000000000"); postcodeEdit.setInputMask(pcodemask); countryEdit= new QLineEdit(this); cityEdit = new QLineEdit(this); streetEdit = new QLineEdit(this); houseEdit = new QLineEdit(this); QString nummask = new QString("00000"); houseEdit.setInputMask(nummask); buildingEdit = new QLineEdit(this); apartmentEdit = new QLineEdit(this); apartmentEdit.setInputMask(nummask); outData["f_name"] = f_nameEdit; outData["m_name"] = m_nameEdit; outData["l_name"] = l_nameEdit; outData["b_date"] = b_dateEdit; outData["email"] = emailEdit; outData["mobile_phone"] = m_phoneEdit; outData["postcode"] = postcodeEdit; outData["country"] = countryEdit; outData["city"] = cityEdit; outData["street"] = streetEdit; outData["house"] = houseEdit; outData["building"] = buildingEdit; outData["apartment"] = apartmentEdit; if (data !is null){ this.id = data["id"].toString; f_nameEdit.setText(data["f_name"].toString); f_nameEdit.setModified(false); m_nameEdit.setText(data["m_name"].toString); m_nameEdit.setModified(false); l_nameEdit.setText(data["l_name"].toString); l_nameEdit.setModified(false); if (validDate(data["b_date"].toString)){ Date dt = Date.fromSimpleString(data["b_date"].toString); b_dateEdit.setText(dt.toISOExtString()); } b_dateEdit.setModified(false); emailEdit.setText(data["email"].toString); emailEdit.setModified(false); m_phoneEdit.setText(data["mobile_phone"].toString); m_phoneEdit.setModified(false); if (data["sex"] == "М") sexEdit.addItem("М",1).addItem("Ж",2).addItem("-",3); else if (data["sex"] == "Ж") sexEdit.addItem("Ж",2).addItem("М",1).addItem("-",3); else sexEdit.addItem("-",3).addItem("Ж",2).addItem("М",1); noteEdit.appendPlainText(data["note"]); postcodeEdit.setText(data["postcode"].toString); postcodeEdit.setModified(false); countryEdit.setText(data["country"].toString); countryEdit.setModified(false); cityEdit.setText(data["city"].toString); cityEdit.setModified(false); streetEdit.setText(data["street"].toString); streetEdit.setModified(false); houseEdit.setText(data["house"].toString); if (data["house"].toString == "") houseEdit.setText("0"); houseEdit.setModified(false); buildingEdit.setText(data["building"].toString); buildingEdit.setModified(false); apartmentEdit.setText(data["apartment"].toString); if (data["apartment"].toString == "") apartmentEdit.setText("0"); apartmentEdit.setModified(false); } okButton = new QPushButton("OK"); cancelButton = new QPushButton("Отмена"); lFName = new QLabel(this); lFName.setText("Имя"); lMName = new QLabel(this); lMName.setText("Отчество"); lLName = new QLabel(this); lLName.setText("Фамилия"); lB_Date = new QLabel(this); lB_Date.setText("дата Рождения"); lEmail = new QLabel(this); lEmail.setText("e-mail"); lM_Phone = new QLabel(this); lM_Phone.setText("Моб. Телефон"); lSex = new QLabel(this); lSex.setText("Пол"); lNote = new QLabel(this); lNote.setText("Примечание"); lPostcode = new QLabel(this); lPostcode.setText("Индекс"); lCountry = new QLabel(this); lCountry.setText("Страна"); lCity = new QLabel(this); lCity.setText("Нас.Пункт"); lStreet = new QLabel(this); lStreet.setText("Улица"); lHouse = new QLabel(this); lHouse.setText("Дом"); lBuilding = new QLabel(this); lBuilding.setText("Корпус"); lApartment = new QLabel(this); lApartment.setText("Квартира"); actionCancel = new QAction(this,&on_cancelButton1,aThis); actionNoteChanged = new QAction(this,&on_noteChanged,aThis); actionSexChanged = new QAction(this,&on_sexChanged,aThis); actionOk = new QAction(this,&on_okButton1,aThis); connects(cancelButton,"clicked()",actionCancel,"Slot()"); connects(okButton,"clicked()",actionOk,"Slot()"); connects(noteEdit,"textChanged()",actionNoteChanged,"Slot()"); connects(sexEdit,"currentIndexChanged(int)",actionSexChanged,"Slot()"); QtE.AlignmentFlag aLeftTop = QtE.AlignmentFlag.AlignTop+QtE.AlignmentFlag.AlignLeft; QtE.AlignmentFlag aCenterTop = QtE.AlignmentFlag.AlignTop+QtE.AlignmentFlag.AlignHCenter; QtE.AlignmentFlag aAxpand = QtE.AlignmentFlag.AlignExpanding; QtE.AlignmentFlag aRightTop = QtE.AlignmentFlag.AlignTop+QtE.AlignmentFlag.AlignRight; gLay.addWidget(lLName,0,0,aLeftTop).addWidget(lFName,0,1,aLeftTop).addWidget(lMName,0,2,aLeftTop) .addWidget(l_nameEdit,1,0,aLeftTop).addWidget(f_nameEdit,1,1,aLeftTop).addWidget(m_nameEdit,1,2,aLeftTop) .addWidget(lB_Date,2,0,aLeftTop).addWidget(lSex,2,1,aLeftTop) .addWidget(b_dateEdit,3,0,aLeftTop).addWidget(sexEdit,3,1,aLeftTop) .addWidget(lEmail,4,0,aLeftTop).addWidget(lM_Phone,4,1,aLeftTop) .addWidget(emailEdit,5,0,aLeftTop).addWidget(m_phoneEdit,5,1,aLeftTop) .addWidget(lPostcode,6,0).addWidget(lCountry,6,1).addWidget(lCity,6,2) .addWidget(postcodeEdit,7,0).addWidget(countryEdit,7,1).addWidget(cityEdit,7,2) .addWidget(lStreet,8,0,1,3).addWidget(lHouse,8,3).addWidget(lBuilding,8,4).addWidget(lApartment,8,5) .addWidget(streetEdit,9,0,1,3).addWidget(houseEdit,9,3).addWidget(buildingEdit,9,4).addWidget(apartmentEdit,9,5) .addWidget(lNote,10,0,aLeftTop) .addWidget(noteEdit,11,0,1,6,aAxpand) .addWidget(okButton,12,4,aRightTop).addWidget(cancelButton,12,5,aRightTop); setLayout(gLay); } void noteChanged(){ this.noteModified = true; } void sexChanged(){ this.sexModified = true; } void editRecord(){ string[string] result; foreach(elem;outData.byKey){ if (elem == "b_date"){ if (!validDate(outData[elem].text!string)){ QMessageBox msgBox = new QMessageBox(this); msgBox.setWindowTitle("Ошибка ввода даты."); msgBox.setText("Некорректная дата."); msgBox.setInformativeText("Не менять дату - \"OK\" \n Отменить для ввода корректной даты -\"Отмена\" "); msgBox.setStandardButtons((QMessageBox.StandardButton.Ok)| (QMessageBox.StandardButton.Cancel)); msgBox.setIcon(QMessageBox.Icon.Question); int res = msgBox.exec(); if (res == QMessageBox.StandardButton.Ok ) { continue; } else return; } } if (outData[elem].isModified) result[elem] = outData[elem].text!string; } if (this.noteModified) result["note"] = noteEdit.toPlainText!string; if (this.sexModified) result["sex"] = sexEdit.text!string; result["id"] = this.id; this.db.updateRecord(result); this.close(); } void newRecord(){ string[string] result; foreach(elem;outData.byKey){ if (elem == "b_date"){ if (!validDate(outData[elem].text!string)){ QMessageBox msgBox = new QMessageBox(this); msgBox.setWindowTitle("Ошибка ввода даты."); msgBox.setText("Некорректная дата."); msgBox.setInformativeText("Не менять дату - \"OK\" \n Отменить для ввода корректной даты -\"Отмена\" "); msgBox.setStandardButtons((QMessageBox.StandardButton.Ok)| (QMessageBox.StandardButton.Cancel)); msgBox.setIcon(QMessageBox.Icon.Question); int res = msgBox.exec(); if (res == QMessageBox.StandardButton.Ok ) { continue; } else return; } } if (outData[elem].isModified) result[elem] = outData[elem].text!string; } if (this.noteModified) result["note"] = noteEdit.toPlainText!string; if (this.sexModified) result["sex"] = sexEdit.text!string; this.db.newRecord(result); this.close(); } void okButtonClick(){ if (id !is null){ this.editRecord(); } else { this.newRecord(); } } }
D
instance Info_GRD_276_Exit(C_Info) { npc = GRD_276_Brueckenwache; nr = 999; condition = Info_GRD_276_Exit_Condition; information = Info_GRD_276_Exit_Info; permanent = 1; description = DIALOG_ENDE; }; func int Info_GRD_276_Exit_Condition() { return 1; }; func void Info_GRD_276_Exit_Info() { AI_StopProcessInfos(self); }; instance Info_GRD_276_Tips(C_Info) { npc = GRD_276_Brueckenwache; nr = 1; condition = Info_GRD_276_Tips_Condition; information = Info_GRD_276_Tips_Info; permanent = 0; description = "Zdar! Jsem tady nový."; }; func int Info_GRD_276_Tips_Condition() { if(Kapitel <= 2) { return 1; }; }; func void Info_GRD_276_Tips_Info() { AI_Output(other,self,"Info_GRD_276_Tips_15_00"); //Zdar! Jsem tady novej! AI_Output(self,other,"Info_GRD_276_Tips_07_01"); //To se teda máš! }; instance Info_GRD_276_Bla(C_Info) { npc = GRD_276_Brueckenwache; nr = 2; condition = Info_GRD_276_Bla_Condition; information = Info_GRD_276_Bla_Info; permanent = 1; description = "Je támhleto Starý tábor?"; }; func int Info_GRD_276_Bla_Condition() { if(Npc_KnowsInfo(hero,Info_GRD_276_Tips)) { return 1; }; }; func void Info_GRD_276_Bla_Info() { AI_Output(other,self,"Info_GRD_276_Bla_15_00"); //Je támhleto Starý tábor? AI_Output(self,other,"Info_GRD_276_Bla_07_01"); //Ne, to je Nový tábor. Starý tábor je za mostem. AI_StopProcessInfos(self); };
D
// SDLang-D // Written in the D programming language. module dub.internal.sdlang.util; version (Have_sdlang_d) public import sdlang.util; else: import std.algorithm; import std.datetime; import std.stdio; import std.string; import dub.internal.sdlang.token; enum sdlangVersion = "0.9.1"; alias immutable(ubyte)[] ByteString; auto startsWith(T)(string haystack, T needle) if( is(T:ByteString) || is(T:string) ) { return std.algorithm.startsWith( cast(ByteString)haystack, cast(ByteString)needle ); } struct Location { string file; /// Filename (including path) int line; /// Zero-indexed int col; /// Zero-indexed, Tab counts as 1 size_t index; /// Index into the source this(int line, int col, int index) { this.line = line; this.col = col; this.index = index; } this(string file, int line, int col, int index) { this.file = file; this.line = line; this.col = col; this.index = index; } string toString() { return "%s(%s:%s)".format(file, line+1, col+1); } } void removeIndex(E)(ref E[] arr, ptrdiff_t index) { arr = arr[0..index] ~ arr[index+1..$]; } void trace(string file=__FILE__, size_t line=__LINE__, TArgs...)(TArgs args) { version(sdlangTrace) { writeln(file, "(", line, "): ", args); stdout.flush(); } } string toString(TypeInfo ti) { if (ti == typeid( bool )) return "bool"; else if(ti == typeid( string )) return "string"; else if(ti == typeid( dchar )) return "dchar"; else if(ti == typeid( int )) return "int"; else if(ti == typeid( long )) return "long"; else if(ti == typeid( float )) return "float"; else if(ti == typeid( double )) return "double"; else if(ti == typeid( real )) return "real"; else if(ti == typeid( Date )) return "Date"; else if(ti == typeid( DateTimeFrac )) return "DateTimeFrac"; else if(ti == typeid( DateTimeFracUnknownZone )) return "DateTimeFracUnknownZone"; else if(ti == typeid( SysTime )) return "SysTime"; else if(ti == typeid( Duration )) return "Duration"; else if(ti == typeid( ubyte[] )) return "ubyte[]"; else if(ti == typeid( typeof(null) )) return "null"; return "{unknown}"; }
D
module bullet2.BulletCollision.BroadphaseCollision.btBroadphaseInterface; extern (C++): import bullet2.BulletCollision.BroadphaseCollision.btDispatcher; import bullet2.BulletCollision.BroadphaseCollision.btBroadphaseProxy; import bullet2.LinearMath.btScalar; import bullet2.LinearMath.btVector3; import bullet2.BulletCollision.BroadphaseCollision.btOverlappingPairCache; //struct btDispatcherInfo {}; extern (C++, struct) struct btBroadphaseAabbCallback { /*virtual*/ ~this() {} /*virtual*/ bool process(const(btBroadphaseProxy)* proxy); }; extern (C++, struct) struct btBroadphaseRayCallback //: btBroadphaseAabbCallback { btBroadphaseAabbCallback base_; alias base_ this; ///added some cached data to accelerate ray-AABB tests btVector3 m_rayDirectionInverse; uint[3] m_signs; btScalar m_lambda_max; /*virtual*/ ~this() { } protected: //this() {} }; ///The btBroadphaseInterface class provides an interface to detect aabb-overlapping object pairs. ///Some implementations for this broadphase interface include btAxisSweep3, bt32BitAxisSweep3 and btDbvtBroadphase. ///The actual overlapping pair management, storage, adding and removing of pairs is dealt by the btOverlappingPairCache class. extern (C++, class) class btBroadphaseInterface { public: /*virtual*/ ~this() {} /*virtual*/ abstract btBroadphaseProxy createProxy(const ref btVector3 aabbMin, const ref btVector3 aabbMax, int shapeType, void* userPtr, int collisionFilterGroup, int collisionFilterMask, btDispatcher dispatcher); /*virtual*/ abstract void destroyProxy(btBroadphaseProxy proxy, btDispatcher dispatcher); /*virtual*/ abstract void setAabb(btBroadphaseProxy proxy, const ref btVector3 aabbMin, const ref btVector3 aabbMax, btDispatcher dispatcher); /*virtual*/ abstract void getAabb(btBroadphaseProxy proxy, ref btVector3 aabbMin, ref btVector3 aabbMax) const; /*final void rayTest(const ref btVector3 rayFrom, const ref btVector3 rayTo, ref btBroadphaseRayCallback rayCallback) { btVector3 zero = btVector3(0, 0, 0); rayTest(rayFrom, rayTo, rayCallback, zero, zero); }*/ /*virtual*/ abstract void rayTest(const ref btVector3 rayFrom, const ref btVector3 rayTo, ref btBroadphaseRayCallback rayCallback, const ref btVector3 aabbMin, const ref btVector3 aabbMax); /*virtual*/ abstract void aabbTest(const ref btVector3 aabbMin, const ref btVector3 aabbMax, ref btBroadphaseAabbCallback callback); ///calculateOverlappingPairs is optional: incremental algorithms (sweep and prune) might do it during the set aabb /*virtual*/ abstract void calculateOverlappingPairs(btDispatcher dispatcher); /*virtual*/ abstract btOverlappingPairCache getOverlappingPairCache(); /*virtual*/ abstract const(btOverlappingPairCache) getOverlappingPairCache() const; ///getAabb returns the axis aligned bounding box in the 'global' coordinate frame ///will add some transform later /*virtual*/ abstract void getBroadphaseAabb(ref btVector3 aabbMin, ref btVector3 aabbMax) const; ///reset broadphase internal structures, to ensure determinism/reproducability /*virtual*/ void resetPool(btDispatcher dispatcher) { /*(void)dispatcher;*/ }; /*virtual*/ abstract void printStats(); };
D
/* 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 derelict.opengl.extfuncs; private { version(Windows) { import derelict.util.wintypes; } import derelict.util.compat; import derelict.opengl.gltypes; import derelict.opengl.exttypes; } version = DerelictGL_ALL; version(DerelictGL_ALL) { version = DerelictGL_ARB; version = DerelictGL_EXT; version = DerelictGL_NV; version = DerelictGL_ATI; version = DerelictGL_AMD; version = DerelictGL_SGI; version = DerelictGL_SGIS; version = DerelictGL_SGIX; version = DerelictGL_HP; version = DerelictGL_PGI; version = DerelictGL_IBM; version = DerelictGL_WIN; version = DerelictGL_INTEL; version = DerelictGL_REND; version = DerelictGL_APPLE; version = DerelictGL_SUNX; version = DerelictGL_SUN; version = DerelictGL_INGR; version = DerelictGL_MESA; version = DerelictGL_3DFX; version = DerelictGL_OML; version = DerelictGL_S3; version = DerelictGL_OES; version = DerelictGL_GREMEDY; version = DerelictGL_MESAX; version = DerelictGL_I3D; version = DerelictGL_3DL; } extern(System) { mixin(gsharedString!() ~ " version(DerelictGL_ARB) { // GL_ARB_multitexture void function(GLenum) glActiveTextureARB; void function(GLenum) glClientActiveTextureARB; void function(GLenum, GLdouble) glMultiTexCoord1dARB; void function(GLenum, in GLdouble*) glMultiTexCoord1dvARB; void function(GLenum, GLfloat) glMultiTexCoord1fARB; void function(GLenum, in GLfloat*) glMultiTexCoord1fvARB; void function(GLenum, GLint) glMultiTexCoord1iARB; void function(GLenum, in GLint*) glMultiTexCoord1ivARB; void function(GLenum, GLshort) glMultiTexCoord1sARB; void function(GLenum, in GLshort*) glMultiTexCoord1svARB; void function(GLenum, GLdouble, GLdouble) glMultiTexCoord2dARB; void function(GLenum, in GLdouble*) glMultiTexCoord2dvARB; void function(GLenum, GLfloat, GLfloat) glMultiTexCoord2fARB; void function(GLenum, in GLfloat*) glMultiTexCoord2fvARB; void function(GLenum, GLint, GLint) glMultiTexCoord2iARB; void function(GLenum, in GLint*) glMultiTexCoord2ivARB; void function(GLenum, GLshort, GLshort) glMultiTexCoord2sARB; void function(GLenum, in GLshort*) glMultiTexCoord2svARB; void function(GLenum, GLdouble, GLdouble, GLdouble) glMultiTexCoord3dARB; void function(GLenum, in GLdouble*) glMultiTexCoord3dvARB; void function(GLenum, GLfloat, GLfloat, GLfloat) glMultiTexCoord3fARB; void function(GLenum, in GLfloat*) glMultiTexCoord3fvARB; void function(GLenum, GLint, GLint, GLint) glMultiTexCoord3iARB; void function(GLenum, in GLint*) glMultiTexCoord3ivARB; void function(GLenum, GLshort, GLshort, GLshort) glMultiTexCoord3sARB; void function(GLenum, in GLshort*) glMultiTexCoord3svARB; void function(GLenum, GLdouble, GLdouble, GLdouble, GLdouble) glMultiTexCoord4dARB; void function(GLenum, in GLdouble*) glMultiTexCoord4dvARB; void function(GLenum, GLfloat, GLfloat, GLfloat, GLfloat) glMultiTexCoord4fARB; void function(GLenum, in GLfloat*) glMultiTexCoord4fvARB; void function(GLenum, GLint, GLint, GLint, GLint) glMultiTexCoord4iARB; void function(GLenum, in GLint*) glMultiTexCoord4ivARB; void function(GLenum, GLshort, GLshort, GLshort, GLshort) glMultiTexCoord4sARB; void function(GLenum, in GLshort*) glMultiTexCoord4svARB; // GL_ARB_transpose_matrix void function(GLfloat*) glLoadTransposeMatrixfARB; void function(GLdouble*) glLoadTransposeMatrixdARB; void function(GLfloat*) glMultTransposeMatrixfARB; void function(GLdouble*) glMultTransposeMatrixdARB; // GL_ARB_multisample void function(GLclampf, GLboolean) glSampleCoverageARB; // GL_ARB_texture_compression void function(GLenum, GLint, GLenum, GLsizei, GLsizei, GLsizei, GLint, GLsizei, in GLvoid*) glCompressedTexImage3DARB; void function(GLenum, GLint, GLenum, GLsizei, GLsizei, GLint, GLsizei, in GLvoid*) glCompressedTexImage2DARB; void function(GLenum, GLint, GLenum, GLsizei, GLint, GLsizei, in GLvoid*) glCompressedTexImage1DARB; void function(GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLenum, GLsizei, in GLvoid*) glCompressedTexSubImage3DARB; void function(GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLsizei, in GLvoid*) glCompressedTexSubImage2DARB; void function(GLenum, GLint, GLint, GLsizei, GLenum, GLsizei, in GLvoid*) glCompressedTexSubImage1DARB; void function(GLenum, GLint, GLvoid*) glGetCompressedTexImageARB; // GL_ARB_point_parameters void function(GLenum, GLfloat) glPointParameterfARB; void function(GLenum, GLfloat*) glPointParameterfvARB; // GL_ARB_vertex_blend void function(GLint, GLbyte*) glWeightbvARB; void function(GLint, GLshort*) glWeightsvARB; void function(GLint, GLint*) glWeightivARB; void function(GLint, GLfloat*) glWeightfvARB; void function(GLint, GLdouble*) glWeightdvARB; void function(GLint, GLubyte*) glWeightubvARB; void function(GLint, GLushort*) glWeightusvARB; void function(GLint, GLuint*) glWeightuivARB; void function(GLint, GLenum, GLsizei, GLvoid*) glWeightPointerARB; void function(GLint) glVertexBlendARB; // GL_ARB_matrix_palette void function(GLint) glCurrentPaletteMatrixARB; void function(GLint, GLubyte*) glMatrixIndexubvARB; void function(GLint, GLushort*) glMatrixIndexusvARB; void function(GLint, GLuint*) glMatrixIndexuivARB; void function(GLint, GLenum, GLsizei, GLvoid*) glMatrixIndexPointerARB; // GL_ARB_window_pos void function(GLdouble, GLdouble) glWindowPos2dARB; void function(in GLdouble*) glWindowPos2dvARB; void function(GLfloat, GLfloat) glWindowPos2fARB; void function(in GLfloat*) glWindowPos2fvARB; void function(GLint, GLint) glWindowPos2iARB; void function(in GLint*) glWindowPos2ivARB; void function(GLshort, GLshort) glWindowPos2sARB; void function(in GLshort*) glWindowPos2svARB; void function(GLdouble, GLdouble, GLdouble) glWindowPos3dARB; void function(in GLdouble*) glWindowPos3dvARB; void function(GLfloat, GLfloat, GLfloat) glWindowPos3fARB; void function(in GLfloat*) glWindowPos3fvARB; void function(GLint, GLint, GLint) glWindowPos3iARB; void function(in GLint*) glWindowPos3ivARB; void function(GLshort, GLshort, GLshort) glWindowPos3sARB; void function(in GLshort*) glWindowPos3svARB; // GL_ARB_vertex_program void function(GLuint, GLdouble) glVertexAttrib1dARB; void function(GLuint, in GLdouble*) glVertexAttrib1dvARB; void function(GLuint, GLfloat) glVertexAttrib1fARB; void function(GLuint, in GLfloat*) glVertexAttrib1fvARB; void function(GLuint, GLshort) glVertexAttrib1sARB; void function(GLuint, in GLshort*) glVertexAttrib1svARB; void function(GLuint, GLdouble, GLdouble) glVertexAttrib2dARB; void function(GLuint, in GLdouble*) glVertexAttrib2dvARB; void function(GLuint, GLfloat, GLfloat) glVertexAttrib2fARB; void function(GLuint, in GLfloat*) glVertexAttrib2fvARB; void function(GLuint, GLshort, GLshort) glVertexAttrib2sARB; void function(GLuint, in GLshort*) glVertexAttrib2svARB; void function(GLuint, GLdouble, GLdouble, GLdouble) glVertexAttrib3dARB; void function(GLuint, in GLdouble*) glVertexAttrib3dvARB; void function(GLuint, GLfloat, GLfloat, GLfloat) glVertexAttrib3fARB; void function(GLuint, in GLfloat*) glVertexAttrib3fvARB; void function(GLuint, GLshort, GLshort, GLshort) glVertexAttrib3sARB; void function(GLuint, in GLshort*) glVertexAttrib3svARB; void function(GLuint, in GLbyte*) glVertexAttrib4NbvARB; void function(GLuint, in GLint*) glVertexAttrib4NivARB; void function(GLuint, in GLshort*) glVertexAttrib4NsvARB; void function(GLuint, GLubyte, GLubyte, GLubyte, GLubyte) glVertexAttrib4NubARB; void function(GLuint, in GLubyte*) glVertexAttrib4NubvARB; void function(GLuint, in GLuint*) glVertexAttrib4NuivARB; void function(GLuint, in GLushort*) glVertexAttrib4NusvARB; void function(GLuint, in GLbyte*) glVertexAttrib4bvARB; void function(GLuint, GLdouble, GLdouble, GLdouble, GLdouble) glVertexAttrib4dARB; void function(GLuint, in GLdouble*) glVertexAttrib4dvARB; void function(GLuint, GLfloat, GLfloat, GLfloat, GLfloat) glVertexAttrib4fARB; void function(GLuint, in GLfloat*) glVertexAttrib4fvARB; void function(GLuint, in GLint*) glVertexAttrib4ivARB; void function(GLuint, GLshort, GLshort, GLshort, GLshort) glVertexAttrib4sARB; void function(GLuint, in GLshort*) glVertexAttrib4svARB; void function(GLuint, in GLubyte*) glVertexAttrib4ubvARB; void function(GLuint, in GLuint*) glVertexAttrib4uivARB; void function(GLuint, in GLushort*) glVertexAttrib4usvARB; void function(GLuint, GLint, GLenum, GLboolean, GLsizei, in GLvoid*) glVertexAttribPointerARB; void function(GLuint) glEnableVertexAttribArrayARB; void function(GLuint) glDisableVertexAttribArrayARB; void function(GLenum, GLenum, GLsizei, in GLvoid*) glProgramStringARB; void function(GLenum, GLuint) glBindProgramARB; void function(GLsizei, in GLuint*) glDeleteProgramsARB; void function(GLsizei, GLuint*) glGenProgramsARB; void function(GLenum, GLuint, GLdouble, GLdouble, GLdouble, GLdouble) glProgramEnvParameter4dARB; void function(GLenum, GLuint, in GLdouble*) glProgramEnvParameter4dvARB; void function(GLenum, GLuint, GLfloat, GLfloat, GLfloat, GLfloat) glProgramEnvParameter4fARB; void function(GLenum, GLuint, in GLfloat*) glProgramEnvParameter4fvARB; void function(GLenum, GLuint, GLdouble, GLdouble, GLdouble, GLdouble) glProgramLocalParameter4dARB; void function(GLenum, GLuint, in GLdouble*) glProgramLocalParameter4dvARB; void function(GLenum, GLuint, GLfloat, GLfloat, GLfloat, GLfloat) glProgramLocalParameter4fARB; void function(GLenum, GLuint, in GLfloat*) glProgramLocalParameter4fvARB; void function(GLenum, GLuint, GLdouble*) glGetProgramEnvParameterdvARB; void function(GLenum, GLuint, GLfloat*) glGetProgramEnvParameterfvARB; void function(GLenum, GLuint, GLdouble*) glGetProgramLocalParameterdvARB; void function(GLenum, GLuint, GLfloat*) glGetProgramLocalParameterfvARB; void function(GLenum, GLenum, GLint*) glGetProgramivARB; void function(GLenum, GLenum, GLvoid*) glGetProgramStringARB; void function(GLuint, GLenum, GLdouble*) glGetVertexAttribdvARB; void function(GLuint, GLenum, GLfloat*) glGetVertexAttribfvARB; void function(GLuint, GLenum, GLint*) glGetVertexAttribivARB; void function(GLuint, GLenum, GLvoid*) glGetVertexAttribPointervARB; GLboolean function(GLuint) glIsProgramARB; // GL_ARB_vertex_buffer_object void function(GLenum, GLuint) glBindBufferARB; void function(GLsizei, in GLuint*) glDeleteBuffersARB; void function(GLsizei, GLuint*) glGenBuffersARB; GLboolean function(GLuint) glIsBufferARB; void function(GLenum, GLsizeiptrARB, in GLvoid*, GLenum) glBufferDataARB; void function(GLenum, GLintptrARB, GLsizeiptrARB, in GLvoid*) glBufferSubDataARB; void function(GLenum, GLintptrARB, GLsizeiptrARB, GLvoid*) glGetBufferSubDataARB; GLvoid* function(GLenum, GLenum) glMapBufferARB; GLboolean function(GLenum) glUnmapBufferARB; void function(GLenum, GLenum, GLint*) glGetBufferParameterivARB; void function(GLenum, GLenum, GLvoid*) glGetBufferPointervARB; // GL_ARB_occlusion_query void function(GLsizei, GLuint*) glGenQueriesARB; void function(GLsizei, in GLuint*) glDeleteQueriesARB; GLboolean function(GLuint) glIsQueryARB; void function(GLenum, GLuint) glBeginQueryARB; void function(GLenum) glEndQueryARB; void function(GLenum, GLenum, GLint*) glGetQueryivARB; void function(GLuint, GLenum, GLint*) glGetQueryObjectivARB; void function(GLuint, GLenum, GLuint*) glGetQueryObjectuivARB; // GL_ARB_shader_objects void function(GLhandleARB) glDeleteObjectARB; GLhandleARB function(GLenum) glGetHandleARB; void function(GLhandleARB, GLhandleARB) glDetachObjectARB; GLhandleARB function(GLenum) glCreateShaderObjectARB; void function(GLhandleARB, GLsizei, in GLcharARB**, in GLint*) glShaderSourceARB; void function(GLhandleARB) glCompileShaderARB; GLhandleARB function() glCreateProgramObjectARB; void function(GLhandleARB, GLhandleARB) glAttachObjectARB; void function(GLhandleARB) glLinkProgramARB; void function(GLhandleARB) glUseProgramObjectARB; void function(GLhandleARB) glValidateProgramARB; void function(GLint, GLfloat) glUniform1fARB; void function(GLint, GLfloat, GLfloat) glUniform2fARB; void function(GLint, GLfloat, GLfloat, GLfloat) glUniform3fARB; void function(GLint, GLfloat, GLfloat, GLfloat, GLfloat) glUniform4fARB; void function(GLint, GLint) glUniform1iARB; void function(GLint, GLint, GLint) glUniform2iARB; void function(GLint, GLint, GLint, GLint) glUniform3iARB; void function(GLint, GLint, GLint, GLint, GLint) glUniform4iARB; void function(GLint, GLsizei, in GLfloat*) glUniform1fvARB; void function(GLint, GLsizei, in GLfloat*) glUniform2fvARB; void function(GLint, GLsizei, in GLfloat*) glUniform3fvARB; void function(GLint, GLsizei, in GLfloat*) glUniform4fvARB; void function(GLint, GLsizei, in GLint*) glUniform1ivARB; void function(GLint, GLsizei, in GLint*) glUniform2ivARB; void function(GLint, GLsizei, in GLint*) glUniform3ivARB; void function(GLint, GLsizei, in GLint*) glUniform4ivARB; void function(GLint, GLsizei, GLboolean, in GLfloat*) glUniformMatrix2fvARB; void function(GLint, GLsizei, GLboolean, in GLfloat*) glUniformMatrix3fvARB; void function(GLint, GLsizei, GLboolean, in GLfloat*) glUniformMatrix4fvARB; void function(GLhandleARB, GLenum, GLfloat*) glGetObjectParameterfvARB; void function(GLhandleARB, GLenum, GLint*) glGetObjectParameterivARB; void function(GLhandleARB, GLsizei, GLsizei*, GLcharARB*) glGetInfoLogARB; void function(GLhandleARB, GLsizei, GLsizei*, GLhandleARB*) glGetAttachedObjectsARB; GLint function(GLhandleARB, in GLcharARB*) glGetUniformLocationARB; void function(GLhandleARB, GLuint, GLsizei, GLsizei*, GLint*, GLenum*, GLcharARB*) glGetActiveUniformARB; void function(GLhandleARB, GLint, GLfloat*) glGetUniformfvARB; void function(GLhandleARB, GLint, GLint*) glGetUniformivARB; void function(GLhandleARB, GLsizei, GLsizei*, GLcharARB*) glGetShaderSourceARB; // GL_ARB_vertex_shader void function(GLhandleARB, GLuint, in GLcharARB*) glBindAttribLocationARB; void function(GLhandleARB, GLuint, GLsizei, GLsizei*, GLint*, GLenum*, GLcharARB*) glGetActiveAttribARB; GLint function(GLhandleARB, in GLcharARB* name) glGetAttribLocationARB; // GL_ARB_draw_buffers void function(GLsizei, in GLenum*) glDrawBuffersARB; // GL_ARB_color_buffer_float void function(GLenum, GLenum) glClampColorARB; // GL_ARB_draw_instanced void function(GLenum, GLint, GLsizei, GLsizei) glDrawArraysInstancedARB; void function(GLenum, GLsizei, GLenum, in void*, GLsizei) glDrawElementsInstancedARB; // GL_ARB_framebuffer_object GLboolean function(GLuint) glIsRenderbuffer; void function(GLenum, GLuint) glBindRenderbuffer; void function(GLsizei, in GLuint*) glDeleteRenderbuffers; void function(GLsizei, GLuint*) glGenRenderbuffers; void function(GLenum, GLenum, GLsizei, GLsizei) glRenderbufferStorage; void function(GLenum, GLsizei, GLenum, GLsizei, GLsizei) glRenderbufferStorageMultisample; void function(GLenum, GLenum, GLint*) glGetRenderbufferParameteriv; GLboolean function(GLuint) glIsFramebuffer; void function(GLenum, GLuint) glBindFramebuffer; void function(GLsizei, in GLuint*) glDeleteFramebuffers; void function(GLsizei, GLuint*) glGenFramebuffers; GLenum function(GLenum) glCheckFramebufferStatus; void function(GLenum, GLenum, GLenum, GLuint, GLint) glFramebufferTexture1D; void function(GLenum, GLenum, GLenum, GLuint, GLint) glFramebufferTexture2D; void function(GLenum, GLenum, GLenum, GLuint, GLint, GLint) glFramebufferTexture3D; void function(GLenum, GLenum, GLuint, GLint, GLint) glFramebufferTextureLayer; void function(GLenum, GLenum, GLenum, GLuint) glFramebufferRenderbuffer; void function(GLenum, GLenum, GLenum, GLint*) glGetFramebufferAttachmentParameteriv; void function(GLint, GLint, GLint, GLint, GLint, GLint, GLint, GLint, GLbitfield, GLenum) glBlitFramebuffer; void function(GLenum) glGenerateMipmap; // GL_ARB_geometry_shader4 void function(GLuint, GLenum, GLint) glProgramParameteriARB; void function(GLenum, GLenum, GLuint, GLint) glFramebufferTextureARB; void function(GLenum, GLenum, GLuint, GLint, GLint) glFramebufferTextureLayerARB; void function(GLenum, GLenum, GLuint, GLint, GLenum) glFramebufferTextureFaceARB; // GL_ARB_imaging void function(GLenum, GLenum, GLsizei, GLenum, GLenum, in void*) glColorTable; void function(GLenum, GLsizei, GLsizei, GLenum, GLenum, in void*) glColorSubTable; void function(GLenum, GLenum, in GLint*) glColorTableParameteriv; void function(GLenum, GLenum, in GLfloat*) glColorTableParameterfv; void function(GLenum, GLsizei, GLint, GLint, GLsizei) glCopyColorSubTable; void function(GLenum, GLenum, GLint, GLint, GLsizei) glCopyColorTable; void function(GLenum, GLenum, GLenum, void*) glGetColorTable; void function(GLenum, GLenum, GLfloat*) glGetColorTableParameterfv; void function(GLenum, GLenum, GLint*) glGetColorTableParameteriv; void function(GLenum, GLsizei, GLenum, GLboolean) glHistogram; void function(GLenum) glResetHistogram; void function(GLenum, GLboolean, GLenum, GLenum, void*) glGetHistogram; void function(GLenum, GLenum, GLfloat*) glGetHistogramParameterfv; void function(GLenum, GLenum, GLint*) glGetHistogramParameteriv; void function(GLenum, GLenum, GLboolean) glMinmax; void function(GLenum) glResetMinmax; void function(GLenum, GLboolean, GLenum, GLenum, void*) glGetMinmax; void function(GLenum, GLenum, GLfloat*) glGetMinmaxParameterfv; void function(GLenum, GLenum, GLint*) glGetMinmaxParameteriv; void function(GLenum, GLenum, GLsizei, GLenum, GLenum, in void*) glConvolutionFilter1D; void function(GLenum, GLenum, GLsizei, GLsizei, GLenum, GLenum, in void*) glConvolutionFilter2D; void function(GLenum, GLenum, GLfloat) glConvolutionParameterf; void function(GLenum, GLenum, in GLfloat*) glConvolutionParameterfv; void function(GLenum, GLenum, GLint) glConvolutionParameteri; void function(GLenum, GLenum, in GLint*) glConvolutionParameteriv; void function(GLenum, GLenum, GLint, GLint, GLsizei) glCopyConvolutionFilter1D; void function(GLenum, GLenum, GLint, GLint, GLsizei, GLsizei) glCopyConvolutionFilter2D; void function(GLenum, GLenum, GLenum, void*) glGetConvolutionFilter; void function(GLenum, GLenum, GLfloat*) glGetConvolutionParameterfv; void function(GLenum, GLenum, GLint*) glGetConvolutionParameteriv; void function(GLenum, GLenum, GLsizei, GLsizei, GLenum, GLenum, in void*, in void*) glSeparableFilter2D; void function(GLenum, GLenum, GLenum, void*, void*, void*) glGetSeparableFilter; // GL_ARB_instanced_arrays void function(GLuint, GLuint) glVertexAttribDivisorARB; // GL_ARB_map_buffer_range void* function(GLenum, GLintptr, GLsizeiptr, GLbitfield) glMapBufferRange; void function(GLenum, GLintptr, GLsizeiptr) glFlushMappedBufferRange; // GL_ARB_texture_buffer_object void function(GLenum, GLenum, GLuint) glTexBufferARB; // GL_ARB_vertex_array_object void function(GLuint) glBindVertexArray; void function(GLsizei, in GLuint*) glDeleteVertexArrays; void function(GLsizei, GLuint*) glGenVertexArrays; GLboolean function(GLuint) glIsVertexArray; // GL_ARB_copy_buffer void function(GLenum, GLenum, GLintptr, GLintptr, GLsizeiptr) glCopyBufferSubData; // GL_ARB_uniform_buffer_object void function(GLuint, GLsizei, in char**, GLuint*) glGetUniformIndices; void function(GLuint, GLsizei, in GLuint*, GLenum, GLint*) glGetActiveUniformsiv; void function(GLuint, GLuint, GLsizei, GLsizei*, char*) glGetActiveUniformName; GLuint function(GLuint, in char*) glGetUniformBlockIndex; void function(GLuint, GLuint, GLenum, int*) glGetActiveUniformBlockiv; void function(GLuint, GLuint, GLsizei, GLsizei*, char*) glGetActiveUniformBlockName; void function(GLuint, GLuint, GLuint) glUniformBlockBinding; // GL_ARB_draw_elements_base_vertex void function(GLenum, GLsizei, GLenum, const(GLvoid)*, GLint) glDrawElementsBaseVertex; void function(GLenum, GLuint, GLuint, GLsizei, GLenum, const(GLvoid)*, GLint) glDrawRangeElementsBaseVertex; void function(GLenum, GLsizei, GLenum, const(GLvoid)*, GLsizei, GLint) glDrawElementsInstancedBaseVertex; void function(GLenum, const(GLsizei)*, GLenum, const(GLvoid*)*, GLsizei, const(GLint)*) glMultiDrawElementsBaseVertex; // GL_ARB_vertex_attrib_64bit void function(GLuint, GLenum, GLdouble*) glGetVertexAttribLdv; void function(GLuint, GLdouble) glVertexAttribL1d; void function(GLuint, in GLdouble*) glVertexAttribL1dv; void function(GLuint, GLdouble, GLdouble) glVertexAttribL2d; void function(GLuint, in GLdouble*) glVertexAttribL2dv; void function(GLuint, GLdouble, GLdouble, GLdouble) glVertexAttribL3d; void function(GLuint, in GLdouble*) glVertexAttribL3dv; void function(GLuint, GLdouble, GLdouble, GLdouble, GLdouble) glVertexAttribL4d; void function(GLuint, in GLdouble*) glVertexAttribL4dv; void function(GLuint, GLint, GLenum, GLsizei, in void*) glVertexAttribLPointer; // GL_ARB_provoking_vertex void function(GLenum) glProvokingVertex; // GL_ARB_sync GLsync function(GLenum, GLbitfield) glFenceSync; GLboolean function(GLsync) glIsSync; void function(GLsync) glDeleteSync; GLenum function(GLsync, GLbitfield, GLuint64) glClientWaitSync; void function(GLsync, GLbitfield, GLuint64) glWaitSync; void function(GLsync, GLint64*) glGetInteger64v; void function(GLsync, GLenum, GLsizei, GLsizei*, GLint*) glGetSynciv; // GL_ARB_texture_multisample void function(GLenum, GLsizei, GLint, GLsizei, GLsizei, GLboolean) glTexImage2DMultisample; void function(GLenum, GLsizei, GLint, GLsizei, GLsizei, GLsizei, GLboolean) glTexImage3DMultisample; void function(GLenum, GLuint, GLfloat*) glGetMultisamplefv; void function(GLuint, GLbitfield) glSampleMaski; // GL_ARB_viewport_array void function(GLuint, GLsizei, in GLclampd*) glDepthRangeArrayv; void function(GLuint, GLclampd, GLclampd) glDepthRangeIndexed; void function(GLenum, GLuint, GLdouble*) glGetDoublei_v; void function(GLenum, GLuint, GLfloat*) glGetFloati_v; void function(GLuint, GLsizei, in GLint*) glScissorArrayv; void function(GLuint, GLint, GLint, GLsizei, GLsizei) glScissorArrayIndexed; void function(GLuint, GLint*) glScissorArrayIndexedv; void function(GLuint, GLsizei, in GLfloat*) glViewportArrayv; void function(GLuint, GLfloat, GLfloat, GLfloat, GLfloat) glViewportIndexedf; void function(GLuint, in GLfloat*) glViewportIndexedfv; // GL_ARB_cl_event void function(cl_context, cl_event, GLbitfield) glCreateSyncFromCLeventARB; // GL_ARB_debug_output void function(GLDEBUGPROCARB, void*) glDebugMessageCallbackARB; void function(GLenum, GLenum, GLenum, GLsizei, in GLuint*, GLboolean) glDebugMessageControlARB; void function(GLenum, GLenum, GLuint, GLenum, GLsizei, in char*) glDebugMessageInsertARB; GLuint function(GLuint, GLsizei, GLenum*, GLenum*, GLint*, GLenum*, GLsizei*, char*) glGetDebugMessageLogARB; // GL_ARB_robustness void function(GLenum, GLenum, GLenum, GLsizei, void*) glGetnColorTableARB; void function(GLenum, GLint, GLsizei, void*) glGetnCompressedTexImageARB; void function(GLenum, GLenum, GLenum, GLsizei, void*) glGetnConvolutionFilterARB; void function(GLenum, GLboolean, GLsizei, GLdouble*) glGetnHistogramARB; void function(GLenum, GLenum, GLsizei, GLdouble*) glGetnMapdvARB; void function(GLenum, GLenum, GLsizei, GLfloat*) glGetnMapfvARB; void function(GLenum, GLenum, GLsizei, GLint*) glGetnMapivARB; void function(GLenum, GLboolean, GLenum, GLenum, GLsizei, void*) glGetnMinMaxARB; void function(GLenum, GLsizei, GLfloat*) glGetnPixelMapfvARB; void function(GLenum, GLsizei, GLuint*) glGetnPixelMapuivARB; void function(GLenum, GLsizei, GLushort*) glGetnPixelMapusvARB; void function(GLsizei, GLubyte*) glGetnPolygonStippleARB; void function(GLenum, GLenum, GLenum, GLsizei, void*, GLsizei, GLvoid*) glGetnSeparableFilterARB; void function(GLenum, GLint, GLenum, GLenum, GLsizei, void*) glGetnTexImageARB; void function(GLuint, GLint, GLsizei, GLdouble*) glGetnUniformdvARB; void function(GLuint, GLint, GLsizei, GLfloat*) glGetnUniformfvARB; void function(GLuint, GLint, GLsizei, GLint*) glGetnUniformivARB; void function(GLuint, GLint, GLsizei, GLuint*) glGetUniformuivARB; void function(GLint, GLint, GLsizei, GLsizei, GLenum, GLenum, GLsizei, void*) glReadnPixelsARB; // GL_ARB_blend_func_extended void function(GLuint, GLuint, GLuint, const(GLchar)*) glBindFragDataLocationIndexed; GLint function(GLuint, const(GLchar)*) glGetFragDataIndex; // GL_ARB_sampler_objects void function(GLuint, GLuint*) glGenSamplers; void function(GLsizei, in GLuint*) glDeleteSamplers; GLboolean function(GLuint) glIsSampler; void function(GLuint, GLuint) glBindSampler; void function(GLuint, GLenum, GLint) glSamplerParameteri; void function(GLuint, GLenum, in GLint*) glSamplerParameteriv; void function(GLuint, GLenum, GLfloat) glSamplerParameterf; void function(GLuint, GLenum, in GLfloat*) glSamplerParameterfv; void function(GLuint, GLenum, in GLint*) glSamplerParameterIiv; void function(GLuint, GLenum, in GLuint*) glSamplerParameterIuiv; void function(GLuint, GLenum, GLint*) glGetSamplerParameteriv; void function(GLuint, GLenum, GLint*) glGetSamplerParameterIiv; void function(GLuint, GLenum, GLfloat*) glGetSamplerParameterfv; void function(GLuint, GLenum, GLuint*) glGetSamplerParameterIuiv; // GL_ARB_timer_query void function(GLuint, GLenum) glQueryCounter; void function(GLuint, GLenum, GLint64*) glGetQueryObjecti64v; void function(GLuint, GLenum, GLuint64*) glGetQueryObjectui64v; // GL_ARB_vertex_type_2_10_10_10_rev void function(GLenum, GLuint) glVertexP2ui; void function(GLenum, const(GLuint)*) glVertexP2uiv; void function(GLenum, GLuint) glVertexP3ui; void function(GLenum, const(GLuint)*) glVertexP3uiv; void function(GLenum, GLuint) glVertexP4ui; void function(GLenum, const(GLuint)*) glVertexP4uiv; void function(GLenum, GLuint) glTexCoordP1ui; void function(GLenum, const(GLuint)*) glTexCoordP1uiv; void function(GLenum, GLuint) glTexCoordP2ui; void function(GLenum, const(GLuint)*) glTexCoordP2uiv; void function(GLenum, GLuint) glTexCoordP3ui; void function(GLenum, const(GLuint)*) glTexCoordP3uiv; void function(GLenum, GLuint) glTexCoordP4ui; void function(GLenum, const(GLuint)*) glTexCoordP4uiv; void function(GLenum, GLenum, GLuint) glMultiTexCoordP1ui; void function(GLenum, GLenum, const(GLuint)*) glMultiTexCoordP1uiv; void function(GLenum, GLenum, GLuint) glMultiTexCoordP2ui; void function(GLenum, GLenum, const(GLuint)*) glMultiTexCoordP2uiv; void function(GLenum, GLenum, GLuint) glMultiTexCoordP3ui; void function(GLenum, GLenum, const(GLuint)*) glMultiTexCoordP3uiv; void function(GLenum, GLenum, GLuint) glMultiTexCoordP4ui; void function(GLenum, GLenum, const(GLuint)*) glMultiTexCoordP4uiv; void function(GLenum, GLuint) glNormalP3ui; void function(GLenum, const(GLuint)*) glNormalP3uiv; void function(GLenum, GLuint) glColorP3ui; void function(GLenum, const(GLuint)*) glColorP3uiv; void function(GLenum, GLuint) glColorP4ui; void function(GLenum, const(GLuint)*) glColorP4uiv; void function(GLenum, GLuint) glSecondaryColorP3ui; void function(GLenum, const(GLuint)*) glSecondaryColorP3uiv; void function(GLuint, GLenum, GLboolean, GLuint) glVertexAttribP1ui; void function(GLuint, GLenum, GLboolean, const(GLuint)*) glVertexAttribP1uiv; void function(GLuint, GLenum, GLboolean, GLuint) glVertexAttribP2ui; void function(GLuint, GLenum, GLboolean, const(GLuint)*) glVertexAttribP2uiv; void function(GLuint, GLenum, GLboolean, GLuint) glVertexAttribP3ui; void function(GLuint, GLenum, GLboolean, const(GLuint)*) glVertexAttribP3uiv; void function(GLuint, GLenum, GLboolean, GLuint) glVertexAttribP4ui; void function(GLuint, GLenum, GLboolean, const(GLuint)*) glVertexAttribP4uiv; } version(DerelictGL_EXT) { // GL_EXT_blend_color void function(GLclampf, GLclampf, GLclampf, GLclampf) glBlendColorEXT; // GL_EXT_polygon_offset void function(GLfloat, GLfloat) glPolygonOffsetEXT; // GL_EXT_texture3D void function(GLenum, GLint, GLenum, GLsizei, GLsizei, GLsizei, GLint, GLenum, GLenum, GLvoid*) glTexImage3DEXT; void function(GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLenum, GLenum, GLvoid*) glTexSubImage3DEXT; // GL_EXT_subtexture void function(GLenum, GLint, GLint, GLsizei, GLenum, GLenum, in GLvoid*) glTexSubImage1DEXT; void function(GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLenum, in GLvoid*) glTexSubImage21DEXT; // GL_EXT_copy_texture void function(GLenum, GLint, GLenum, GLint, GLint, GLsizei, GLint) glCopyTexImage1DEXT; void function(GLenum, GLint, GLenum, GLint, GLint, GLsizei, GLsizei, GLint)glCopyTexImage2DEXT; void function(GLenum, GLint, GLint, GLint, GLint, GLsizei) glCopyTexSubImage1DEXT; void function(GLenum, GLint, GLint, GLint, GLint, GLint, GLsizei, GLsizei) glCopyTexSubImage2DEXT; void function(GLenum, GLint, GLint, GLint, GLint, GLint, GLint, GLsizei, GLsizei) glCopyTexSubImage3DEXT; // GL_EXT_histogram void function(GLenum, GLboolean, GLenum, GLenum, GLvoid*) glGetHistogramEXT; void function(GLenum, GLenum, GLfloat*) glGetHistogramParameterfvEXT; void function(GLenum, GLenum, GLint*) glGetHistogramParameterivEXT; void function(GLenum, GLboolean, GLenum, GLenum, GLvoid*) glGetMinmaxEXT; void function(GLenum, GLenum, GLfloat*) glGetMinmaxParameterfvEXT; void function(GLenum, GLsizei, GLenum, GLint*) glGetMinmaxParameterivEXT; void function(GLenum, GLsizei, GLenum, GLboolean) glHistogramEXT; void function(GLenum, GLenum, GLboolean) glMinmaxEXT; void function(GLenum) glResetHistogramEXT; void function(GLenum) glResetMinmaxEXT; // GL_EXT_convolution void function(GLenum, GLenum, GLsizei, GLenum, GLenum, GLvoid*) glConvolutionFilter1DEXT; void function(GLenum, GLenum, GLsizei, GLsizei, GLenum, GLenum, GLvoid*) glConvolutionFilter2DEXT; void function(GLenum, GLenum, GLfloat) glConvolutionParameterfEXT; void function(GLenum, GLenum, GLfloat*) glConvolutionParameterfvEXT; void function(GLenum, GLenum, GLint) glConvolutionParameteriEXT; void function(GLenum, GLenum, GLint*) glConvolutionParameterivEXT; void function(GLenum, GLenum, GLint, GLint, GLsizei) glCopyConvolutionFilter1DEXT; void function(GLenum, GLenum, GLint, GLint, GLsizei, GLsizei) glCopyConvolutionFilter2DEXT; void function(GLenum, GLenum, GLenum, GLvoid*) glGetConvolutionFilterEXT; void function(GLenum, GLenum, GLfloat*) glGetConvolutionParameterfvEXT; void function(GLenum, GLenum, GLint*) glGetConvolutionParameterivEXT; void function(GLenum, GLenum, GLenum, GLvoid*, GLvoid*, GLvoid*) glGetSeparableFilterEXT; void function(GLenum, GLenum, GLsizei, GLsizei, GLenum, GLenum, GLvoid*, GLvoid*) glSeparableFilter2DEXT; // GL_EXT_texture_object GLboolean function(GLsizei, in GLuint*, GLboolean*) glAreTexturesResidentEXT; void function(GLenum, GLuint) glBindTextureEXT; void function(GLsizei, in GLuint*) glDeleteTexturesEXT; void function(GLsizei, GLuint*) glGenTexturesEXT; GLboolean function(GLuint) glIsTextureEXT; void function(GLsizei, in GLuint*, in GLclampf*) glPrioritizeTexturesEXT; // GL_EXT_vertex_array void function(GLint) glArrayElementEXT; void function(GLint, GLenum, GLsizei, GLsizei, in GLvoid*) glColorPointerEXT; void function(GLenum, GLint, GLsizei) glDrawArraysEXT; void function(GLsizei, GLsizei, in GLboolean*) glEdgeFlagPointerEXT; void function(GLenum, GLvoid**) glGetPointervEXT; void function(GLenum, GLsizei, GLsizei, in GLvoid*) glIndexPointerEXT; void function(GLenum, GLsizei, GLsizei, in GLvoid*) glNormalPointerEXT; void function(GLint, GLenum, GLsizei, GLsizei, in GLvoid*) glTexCoordPointerEXT; void function(GLint, GLenum, GLsizei, GLsizei, in GLvoid*) glVertexPointerEXT; // GL_EXT_blend_minmax void function(GLenum) glBlendEquationEXT; // GL_EXT_point_parameters void function(GLenum, GLfloat) glPointParameterfEXT; void function(GLenum, in GLfloat*) glPointParameterfvEXT; // GL_EXT_color_subtable void function(GLenum, GLsizei, GLsizei, GLenum, GLenum, in GLvoid*) glColorSubTableEXT; void function(GLenum, GLsizei, GLint, GLint, GLsizei) glCopyColorSubTableEXT; // GL_EXT_paletted_texture void function(GLenum, GLenum, GLsizei, GLenum, GLenum, in GLvoid*) glColorTableEXT; void function(GLenum, GLenum, GLenum, GLvoid*) glGetColorTableEXT; void function(GLenum, GLenum, GLint*) glGetColorTableParameterivEXT; void function(GLenum, GLenum, GLfloat*) glGetColorTableParameterfvEXT; //GL_EXT_index_material void function(GLenum, GLenum) glIndexMaterialEXT; // GL_EXT_index_func void function(GLenum, GLclampf) glIndexFuncEXT; // GL_EXT_compiled_vertex_array void function(GLint, GLsizei) glLockArraysEXT; void function() glUnlockArraysEXT; // GL_EXT_cull_vertex void function(GLenum, GLdouble*) glCullParameterdvEXT; void function(GLenum, GLfloat*) glCullParameterfvEXT; // GL_EXT_draw_range_elements void function(GLenum, GLuint, GLuint, GLsizei, GLenum, in GLvoid*) glDrawRangeElementsEXT; // GL_EXT_light_texture void function(GLenum) glApplyTextureEXT; void function(GLenum) glTextureLightEXT; void function(GLenum, GLenum) glTextureMaterialEXT; // GL_EXT_pixel_transform void function(GLenum, GLenum, GLint) glPixelTransformParameteriEXT; void function(GLenum, GLenum, GLfloat) glPixelTransformParameterfEXT; void function(GLenum, GLenum, in GLint*) glPixelTransformParameterivEXT; void function(GLenum, GLenum, in GLfloat*) glPixelTransformParameterfvEXT; // GL_EXT_secondary_color void function(GLbyte, GLbyte, GLbyte) glSecondaryColor3bEXT; void function(in GLbyte*) glSecondaryColor3bvEXT; void function(GLdouble, GLdouble, GLdouble) glSecondaryColor3dEXT; void function(in GLdouble*) glSecondaryColor3dvEXT; void function(GLfloat, GLfloat, GLfloat) glSecondaryColor3fEXT; void function(in GLfloat*) glSecondaryColor3fvEXT; void function(GLint, GLint, GLint) glSecondaryColor3iEXT; void function(in GLint*) glSecondaryColor3ivEXT; void function(GLshort, GLshort, GLshort) glSecondaryColor3sEXT; void function(in GLshort*) glSecondaryColor3svEXT; void function(GLubyte, GLubyte, GLubyte) glSecondaryColor3ubEXT; void function(in GLubyte*) glSecondaryColor3ubvEXT; void function(GLuint, GLuint, GLuint) glSecondaryColor3uiEXT; void function(in GLuint*) glSecondaryColor3uivEXT; void function(GLushort, GLushort, GLushort) glSecondaryColor3usEXT; void function(in GLushort*) glSecondaryColor3usvEXT; void function(GLint, GLenum, GLsizei, in GLvoid*) glSecondaryColorPointerEXT; // GL_EXT_texture_perturb_normal void function(GLenum) glTextureNormalEXT; // GL_EXT_multi_draw_arrays void function(GLenum, GLint*, GLsizei*, GLsizei) glMultiDrawArraysEXT; void function(GLenum, in GLsizei*, GLenum, in GLvoid**, GLsizei) glMultiDrawElementsEXT; // GL_EXT_fog_coord void function(GLfloat) glFogCoordfEXT; void function(in GLfloat*) glFogCoordfvEXT; void function(GLdouble) glFogCoorddEXT; void function(in GLdouble*) glFogCoorddvEXT; void function(GLenum, GLsizei, in GLvoid*) glFogCoordPointerEXT; // GL_EXT_coordinate_frame void function(GLbyte, GLbyte, GLbyte) glTangent3bEXT; void function(in GLbyte*) glTangent3bvEXT; void function(GLdouble, GLdouble, GLdouble) glTangent3dEXT; void function(in GLdouble*) glTangent3dvEXT; void function(GLfloat, GLfloat, GLfloat) glTangent3fEXT; void function(in GLfloat*) glTangent3fvEXT; void function(GLint, GLint, GLint) glTangent3iEXT; void function(in GLint*) glTangent3ivEXT; void function(GLshort, GLshort, GLshort) glTangent3sEXT; void function(in GLshort*) glTangent3svEXT; void function(GLbyte, GLbyte, GLbyte) glBinormal3bEXT; void function(in GLbyte*) glBinormal3bvEXT; void function(GLdouble, GLdouble, GLdouble) glBinormal3dEXT; void function(in GLdouble*) glBinormal3dvEXT; void function(GLfloat, GLfloat, GLfloat) glBinormal3fEXT; void function(in GLfloat*) glBinormal3fvEXT; void function(GLint, GLint, GLint) glBinormal3iEXT; void function(in GLint*) glBinormal3ivEXT; void function(GLshort, GLshort, GLshort) glBinormal3sEXT; void function(in GLshort*) glBinormal3svEXT; void function(GLenum, GLsizei, in GLvoid*) glTangentPointerEXT; void function(GLenum, GLsizei, in GLvoid*) glBinormalPointerEXT; // GL_EXT_blend_func_separate void function(GLenum, GLenum, GLenum, GLenum) glBlendFuncSeparateEXT; // GL_EXT_vertex_weighting void function(GLfloat) glVertexWeightfEXT; void function(in GLfloat*) glVertexWeightfvEXT; void function(GLsizei, GLenum, GLsizei, in GLvoid*) glVertexWeightPointerEXT; // GL_EXT_multisample void function(GLclampf, GLboolean) glSampleMaskEXT; void function(GLenum) glSamplePatternEXT; // GL_EXT_vertex_shader void function() glBeginVertexShaderEXT; void function() glEndVertexShaderEXT; void function(GLuint) glBindVertexShaderEXT; GLuint function(GLuint) glGenVertexShadersEXT; void function(GLuint) glDeleteVertexShaderEXT; void function(GLenum, GLuint, GLuint) glShaderOp1EXT; void function(GLenum, GLuint, GLuint, GLuint) glShaderOp2EXT; void function(GLenum, GLuint, GLuint, GLuint, GLuint) glShaderOp3EXT; void function(GLuint, GLuint, GLenum, GLenum, GLenum, GLenum) glSwizzleEXT; void function(GLuint, GLuint, GLenum, GLenum, GLenum, GLenum) glWriteMaskEXT; void function(GLuint, GLuint, GLuint) glInsertComponentEXT; void function(GLuint, GLuint, GLuint) glExtractComponentEXT; GLuint function(GLenum, GLenum, GLenum, GLuint) glGenSymbolsEXT; void function(GLuint, GLenum, in GLvoid*) glSetInvariantEXT; void function(GLuint, GLenum, in GLvoid*) glSetLocalConstantEXT; void function(GLuint, in GLbyte*) glVariantbvEXT; void function(GLuint, in GLshort*) glVariantsvEXT; void function(GLuint, in GLint*) glVariantivEXT; void function(GLuint, in GLfloat*) glVariantfvEXT; void function(GLuint, in GLdouble*) glVariantdvEXT; void function(GLuint, in GLubyte*) glVariantubvEXT; void function(GLuint, in GLushort*) glVariantusvEXT; void function(GLuint, in GLuint*) glVariantuivEXT; void function(GLuint, GLenum, GLuint, in GLvoid*) glVariantPointerEXT; void function(GLuint) glEnableVariantClientStateEXT; void function(GLuint) glDisableVariantClientStateEXT; GLuint function(GLenum, GLenum) glBindLightParameterEXT; GLuint function(GLenum, GLenum) glBindMaterialParameterEXT; GLuint function(GLenum, GLenum, GLenum) glBindTexGenParameterEXT; GLuint function(GLenum, GLenum) glBindTextureUnitParameterEXT; GLuint function(GLenum) glBindParameterEXT; GLboolean function(GLuint, GLenum) glIsVariantEnabledEXT; void function(GLuint, GLenum, GLboolean*) glGetVariantBooleanvEXT; void function(GLuint, GLenum, GLint*) glGetVariantIntegervEXT; void function(GLuint, GLenum, GLfloat*) glGetVariantFloatvEXT; void function(GLuint, GLenum, GLvoid**) glGetVariantPointervEXT; void function(GLuint, GLenum, GLboolean*) glGetInvariantBooleanvEXT; void function(GLuint, GLenum, GLint*) glGetInvariantIntegervEXT; void function(GLuint, GLenum, GLfloat*) glGetInvariantFloatvEXT; void function(GLuint, GLenum, GLboolean*) glGetLocalConstantBooleanvEXT; void function(GLuint, GLenum, GLint*) glGetLocalConstantIntegervEXT; void function(GLuint, GLenum, GLfloat*) glGetLocalConstantFloatvEXT; // GL_EXT_stencil_two_side void function(GLenum) glActiveStencilFaceEXT; // GL_EXT_depth_bounds_test void function(GLclampd, GLclampd) glDepthBoundsEXT; // GL_EXT_blend_equation_separate void function(GLenum, GLenum) glBlendEquationSeparateEXT; // GL_EXT_framebuffer_object GLboolean function(GLuint) glIsRenderbufferEXT; void function(GLenum, GLuint) glBindRenderbufferEXT; void function(GLsizei, in GLuint*) glDeleteRenderbuffersEXT; void function(GLsizei, GLuint*) glGenRenderbuffersEXT; void function(GLenum, GLenum, GLsizei, GLsizei) glRenderbufferStorageEXT; void function(GLenum, GLenum, GLint*) glGetRenderbufferParameterivEXT; GLboolean function(GLuint) glIsFramebufferEXT; void function(GLenum, GLuint) glBindFramebufferEXT; void function(GLsizei, in GLuint*) glDeleteFramebuffersEXT; void function(GLsizei, GLuint*) glGenFramebuffersEXT; GLenum function(GLenum) glCheckFramebufferStatusEXT; void function(GLenum, GLenum, GLenum, GLuint, GLint) glFramebufferTexture1DEXT; void function(GLenum, GLenum, GLenum, GLuint, GLint) glFramebufferTexture2DEXT; void function(GLenum, GLenum, GLenum, GLuint, GLint, GLint) glFramebufferTexture3DEXT; void function(GLenum, GLenum, GLenum, GLuint) glFramebufferRenderbufferEXT; void function(GLenum, GLenum, GLenum, GLint*) glGetFramebufferAttachmentParameterivEXT; void function(GLenum) glGenerateMipmapEXT; // GL_EXT_stencil_clear_tag void function(GLsizei, GLuint) glStencilClearTagEXT; // GL_EXT_framebuffer_blit void function(GLint, GLint, GLint, GLint, GLint, GLint, GLint, GLint, GLbitfield, GLenum) glBlitFramebufferEXT; // GL_EXT_framebuffer_multisample void function(GLenum, GLsizei, GLenum, GLsizei, GLsizei) glRenderbufferStorageMultisampleEXT; // GL_EXT_timer_query void function(GLuint, GLenum, GLint64EXT*) glGetQueryObjecti64vEXT; void function(GLuint, GLenum, GLuint64EXT*) glGetQueryObjectui64vEXT; // GL_EXT_gpu_program_parameters void function(GLenum, GLuint, GLsizei, in GLfloat*) glProgramEnvParameters4fvEXT; void function(GLenum, GLuint, GLsizei, in GLfloat*) glProgramLocalParameters4fvEXT; // GL_EXT_geometry_shader4 void function(GLuint, GLenum, GLint) glProgramParameteriEXT; // GL_EXT_gpu_shader4 void function(GLuint, GLint, GLuint*) glGetUniformuivEXT; void function(GLuint, GLuint, in GLchar*) glBindFragDataLocationEXT; GLint function(GLuint, in GLchar*) glGetFragDataLocationEXT; void function(GLint, GLuint) glUniform1uiEXT; void function(GLint, GLuint, GLuint) glUniform2uiEXT; void function(GLint, GLuint, GLuint, GLuint) glUniform3uiEXT; void function(GLint, GLuint, GLuint, GLuint, GLuint) glUniform4uiEXT; void function(GLint, GLsizei, in GLuint*) glUniform1uivEXT; void function(GLint, GLsizei, in GLuint*) glUniform2uivEXT; void function(GLint, GLsizei, in GLuint*) glUniform3uivEXT; void function(GLint, GLsizei, in GLuint*) glUniform4uivEXT; // GL_EXT_draw_instanced void function(GLenum, GLint, GLsizei, GLsizei) glDrawArraysInstancedEXT; void function(GLenum, GLsizei, GLenum, in GLvoid*, GLsizei) glDrawElementsInstancedEXT; // GL_EXT_texture_buffer_object void function(GLenum, GLenum, GLuint) glTexBufferEXT; // GL_EXT_draw_buffers2 void function(GLuint, GLboolean, GLboolean, GLboolean, GLboolean) glColorMaskIndexedEXT; void function(GLenum, GLuint, GLboolean*) glGetBooleanIndexedvEXT; void function(GLenum, GLuint, GLint*) glGetIntegerIndexedvEXT; void function(GLenum, GLuint) glEnableIndexedEXT; void function(GLenum, GLuint) glDisableIndexedEXT; GLboolean function(GLenum, GLuint) glIsEnabledIndexedEXT; // GL_EXT_bindable_uniform void function(GLuint, GLint, GLuint) glUniformBufferEXT; void function(GLuint, GLint) glGetUniformBufferSizeEXT; void function(GLuint, GLint) glGetUniformOffsetEXT; // GL_EXT_texture_integer void function(GLenum, GLenum, in GLint*) glTexParameterIivEXT; void function(GLenum, GLenum, in GLuint*) glTexParameterIuivEXT; void function(GLenum, GLenum, GLint*) glGetTexParameterIivEXT; void function(GLenum, GLenum, GLuint*) glGetTexParameterIuivEXT; void function(GLint, GLint, GLint, GLint) glClearColorIiEXT; void function(GLuint, GLuint, GLuint, GLuint) glClearColorIuiEXT; // GL_EXT_transform_feedback void function(GLenum) glBeginTransformFeedbackEXT; void function() glEndTransformFeedbackEXT; void function(GLenum, GLuint, GLuint, GLintptr, GLsizeiptr) glBindBufferRangeEXT; void function(GLenum, GLuint, GLuint, GLintptr) glBindBufferOffsetEXT; void function(GLenum, GLuint, GLuint) glBindBufferBaseEXT; void function(GLuint, GLsizei, in GLchar**, GLenum) glTransformFeedbackVaryingsEXT; void function(GLuint, GLuint, GLsizei, GLsizei*, GLsizei*, GLenum*, GLchar*) glGetTransformFeedbackVaryingEXT; // GL_EXT_direct_state_access void function(GLbitfield) glClientAttribDefaultEXT; void function(GLbitfield) glPushClientAttribDefaultEXT; void function(GLenum, in GLfloat*) glMatrixLoadfEXT; void function(GLenum, in GLdouble*) glMatrixLoaddEXT; void function(GLenum, in GLfloat*) glMatrixMultfEXT; void function(GLenum, in GLdouble*) glMatrixMultdEXT; void function(GLenum) glMatrixLoadIdentityEXT; void function(GLenum, GLfloat, GLfloat, GLfloat, GLfloat) glMatrixRotatefEXT; void function(GLenum, GLdouble, GLdouble, GLdouble, GLdouble) glMatrixRotatedEXT; void function(GLenum, GLfloat, GLfloat, GLfloat) glMatrixScalefEXT; void function(GLenum, GLdouble, GLdouble, GLdouble) glMatrixScaledEXT; void function(GLenum, GLfloat, GLfloat, GLfloat) glMatrixTranslatefEXT; void function(GLenum, GLdouble, GLdouble, GLdouble) glMatrixTranslatedEXT; void function(GLenum, GLdouble, GLdouble, GLdouble, GLdouble, GLdouble, GLdouble) glMatrixFrustumEXT; void function(GLenum, GLdouble, GLdouble, GLdouble, GLdouble, GLdouble, GLdouble) glMatrixOrthoEXT; void function(GLenum) glMatrixPopEXT; void function(GLenum) glMatrixPushEXT; void function(GLenum, in GLfloat*) glMatrixLoadTransposefEXT; void function(GLenum, in GLdouble*) glMatrixLoadTransposedEXT; void function(GLenum, in GLfloat*) glMatrixMultTransposefEXT; void function(GLenum, in GLdouble*) glMatrixMultTransposedEXT; void function(GLuint, GLenum, GLenum, GLfloat) glTextureParameterfEXT; void function(GLuint, GLenum, GLenum, in GLfloat*) glTextureParameterfvEXT; void function(GLuint, GLenum, GLenum, GLint) glTextureParameteriEXT; void function(GLuint, GLenum, GLenum, in GLint*) glTextureParameterivEXT; void function(GLuint, GLenum, GLint, GLenum, GLsizei, GLint, GLenum, GLenum, in GLvoid*) glTextureImage1DEXT; void function(GLuint, GLenum, GLint, GLenum, GLsizei, GLsizei, GLint, GLenum, GLenum, in GLvoid*) glTextureImage2DEXT; void function(GLuint, GLenum, GLint, GLint, GLsizei, GLenum, GLenum, in GLvoid*) glTextureSubImage1DEXT; void function(GLuint, GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLenum, in GLvoid*) glTextureSubImage2DEXT; void function(GLuint, GLenum, GLint, GLenum, GLint, GLint, GLsizei, GLint) glCopyTextureImage1DEXT; void function(GLuint, GLenum, GLint, GLenum, GLint, GLint, GLsizei, GLsizei, GLint) glCopyTextureImage2DEXT; void function(GLuint, GLenum, GLint, GLint, GLint, GLint, GLsizei) glCopyTextureSubImage1DEXT; void function(GLuint, GLenum, GLint, GLint, GLint, GLint, GLint, GLsizei, GLsizei) glCopyTextureSubImage2DEXT; void function(GLuint, GLenum, GLint, GLenum, GLenum, GLvoid*) glGetTextureImageEXT; void function(GLuint, GLenum, GLenum, GLfloat*) glGetTextureParameterfvEXT; void function(GLuint, GLenum, GLenum, GLint*) glGetTextureParameterivEXT; void function(GLuint, GLenum, GLint, GLenum, GLfloat*) glGetTextureLevelParameterfvEXT; void function(GLuint, GLenum, GLint, GLenum, GLint*) glGetTextureLevelParameterivEXT; void function(GLuint, GLenum, GLint, GLenum, GLsizei, GLsizei, GLsizei, GLint, GLenum, GLenum, in GLvoid*) glTextureImage3DEXT; void function(GLuint, GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLenum, GLenum, in GLvoid*) glTextureSubImage3DEXT; void function(GLuint, GLenum, GLint, GLint, GLint, GLint, GLint, GLint, GLsizei, GLsizei) glCopyTextureSubImage3DEXT; void function(GLenum, GLenum, GLenum, GLfloat) glMultiTexParameterfEXT; void function(GLenum, GLenum, GLenum, in GLfloat*) glMultiTexParameterfvEXT; void function(GLenum, GLenum, GLenum, GLint) glMultiTexParameteriEXT; void function(GLenum, GLenum, GLenum, in GLint*) glMultiTexParameterivEXT; void function(GLenum, GLenum, GLint, GLenum, GLsizei, GLint, GLenum, GLenum, in GLvoid*) glMultiTexImage1DEXT; void function(GLenum, GLenum, GLint, GLenum, GLsizei, GLsizei, GLint, GLenum, GLenum, in GLvoid*) glMultiTexImage2DEXT; void function(GLenum, GLenum, GLint, GLint, GLsizei, GLenum, GLenum, in GLvoid*) glMultiTexSubImage1DEXT; void function(GLenum, GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLenum, in GLvoid*) glMultiTexSubImage2DEXT; void function(GLenum, GLenum, GLint, GLenum, GLint, GLint, GLsizei, GLint) glCopyMultiTexImage1DEXT; void function(GLenum, GLenum, GLint, GLenum, GLint, GLint, GLsizei, GLsizei, GLint) glCopyMultiTexImage2DEXT; void function(GLenum, GLenum, GLint, GLint, GLint, GLint, GLsizei) glCopyMultiTexSubImage1DEXT; void function(GLenum, GLenum, GLint, GLint, GLint, GLint, GLint, GLsizei, GLsizei) glCopyMultiTexSubImage2DEXT; void function(GLenum, GLenum, GLint, GLenum, GLenum, GLvoid*) glGetMultiTexImageEXT; void function(GLenum, GLenum, GLenum, GLfloat*) glGetMultiTexParameterfvEXT; void function(GLenum, GLenum, GLenum, GLint*) glGetMultiTexParameterivEXT; void function(GLenum, GLenum, GLint, GLenum, GLfloat*) glGetMultiTexLevelParameterfvEXT; void function(GLenum, GLenum, GLint, GLenum, GLint*) glGetMultiTexLevelParameterivEXT; void function(GLenum, GLenum, GLint, GLenum, GLsizei, GLsizei, GLsizei, GLint, GLenum, GLenum, in GLvoid*) glMultiTexImage3DEXT; void function(GLenum, GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLenum, GLenum, in GLvoid*) glMultiTexSubImage3DEXT; void function(GLenum, GLenum, GLint, GLint, GLint, GLint, GLint, GLint, GLsizei, GLsizei) glCopyMultiTexSubImage3DEXT; void function(GLenum, GLenum, GLuint) glBindMultiTextureEXT; void function(GLenum, GLuint) glEnableClientStateIndexedEXT; void function(GLenum, GLuint) glDisableClientStateIndexedEXT; void function(GLenum, GLint, GLenum, GLsizei, in GLvoid*) glMultiTexCoordPointerEXT; void function(GLenum, GLenum, GLenum, GLfloat) glMultiTexEnvfEXT; void function(GLenum, GLenum, GLenum, in GLfloat*) glMultiTexEnvfvEXT; void function(GLenum, GLenum, GLenum, GLint) glMultiTexEnviEXT; void function(GLenum, GLenum, GLenum, in GLint*) glMultiTexEnvivEXT; void function(GLenum, GLenum, GLenum, GLdouble) glMultiTexGendEXT; void function(GLenum, GLenum, GLenum, in GLdouble*) glMultiTexGendvEXT; void function(GLenum, GLenum, GLenum, GLfloat) glMultiTexGenfEXT; void function(GLenum, GLenum, GLenum, in GLfloat*) glMultiTexGenfvEXT; void function(GLenum, GLenum, GLenum, GLint) glMultiTexGeniEXT; void function(GLenum, GLenum, GLenum, in GLint*) glMultiTexGenivEXT; void function(GLenum, GLenum, GLenum, GLfloat*) glGetMultiTexEnvfvEXT; void function(GLenum, GLenum, GLenum, GLint*) glGetMultiTexEnvivEXT; void function(GLenum, GLenum, GLenum, GLdouble*) glGetMultiTexGendvEXT; void function(GLenum, GLenum, GLenum, GLfloat*) glGetMultiTexGenfvEXT; void function(GLenum, GLenum, GLenum, GLint*) glGetMultiTexGenivEXT; void function(GLenum, GLuint, GLfloat*) glGetFloatIndexedvEXT; void function(GLenum, GLuint, GLdouble*) glGetDoubleIndexedvEXT; void function(GLenum, GLuint, GLvoid**) glGetPointerIndexedvEXT; void function(GLuint, GLenum, GLint, GLenum, GLsizei, GLsizei, GLsizei, GLint, GLsizei, in GLvoid*) glCompressedTextureImage3DEXT; void function(GLuint, GLenum, GLint, GLenum, GLsizei, GLsizei, GLint, GLsizei, in GLvoid*) glCompressedTextureImage2DEXT; void function(GLuint, GLenum, GLint, GLenum, GLsizei, GLint, GLsizei, in GLvoid*) glCompressedTextureImage1DEXT; void function(GLuint, GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLenum, GLsizei, in GLvoid*) glCompressedTextureSubImage3DEXT; void function(GLuint, GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLsizei, in GLvoid*) glCompressedTextureSubImage2DEXT; void function(GLuint, GLenum, GLint, GLint, GLsizei, GLenum, GLsizei, in GLvoid*) glCompressedTextureSubImage1DEXT; void function(GLuint, GLenum, GLint, GLvoid*) glGetCompressedTextureImageEXT; void function(GLenum, GLenum, GLint, GLenum, GLsizei, GLsizei, GLsizei, GLint, GLsizei, in GLvoid*) glCompressedMultiTexImage3DEXT; void function(GLenum, GLenum, GLint, GLenum, GLsizei, GLsizei, GLint, GLsizei, in GLvoid*) glCompressedMultiTexImage2DEXT; void function(GLenum, GLenum, GLint, GLenum, GLsizei, GLint, GLsizei, in GLvoid*) glCompressedMultiTexImage1DEXT; void function(GLenum, GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLenum, GLsizei, in GLvoid*) glCompressedMultiTexSubImage3DEXT; void function(GLenum, GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLsizei, in GLvoid*) glCompressedMultiTexSubImage2DEXT; void function(GLenum, GLenum, GLint, GLint, GLsizei, GLenum, GLsizei, in GLvoid*) glCompressedMultiTexSubImage1DEXT; void function(GLenum, GLenum, GLint, GLvoid*) glGetCompressedMultiTexImageEXT; void function(GLuint, GLenum, GLenum, GLsizei, in GLvoid*) glNamedProgramStringEXT; void function(GLuint, GLenum, GLuint, GLdouble, GLdouble, GLdouble, GLdouble) glNamedProgramLocalParameter4dEXT; void function(GLuint, GLenum, GLuint, in GLdouble*) glNamedProgramLocalParameter4dvEXT; void function(GLuint, GLenum, GLuint, GLfloat, GLfloat, GLfloat, GLfloat) glNamedProgramLocalParameter4fEXT; void function(GLuint, GLenum, GLuint, in GLfloat*) glNamedProgramLocalParameter4fvEXT; void function(GLuint, GLenum, GLuint, GLdouble*) glGetNamedProgramLocalParameterdvEXT; void function(GLuint, GLenum, GLuint, GLfloat*) glGetNamedProgramLocalParameterfvEXT; void function(GLuint, GLenum, GLenum, GLint*) glGetNamedProgramivEXT; void function(GLuint, GLenum, GLenum, GLvoid*) glGetNamedProgramStringEXT; void function(GLuint, GLenum, GLuint, GLsizei, in GLfloat*) glNamedProgramLocalParameters4fvEXT; void function(GLuint, GLenum, GLuint, GLint, GLint, GLint, GLint) glNamedProgramLocalParameterI4iEXT; void function(GLuint, GLenum, GLuint, in GLint*) glNamedProgramLocalParameterI4ivEXT; void function(GLuint, GLenum, GLuint, GLsizei, in GLint*) glNamedProgramLocalParametersI4ivEXT; void function(GLuint, GLenum, GLuint, GLuint, GLuint, GLuint, GLuint) glNamedProgramLocalParameterI4uiEXT; void function(GLuint, GLenum, GLuint, in GLuint*) glNamedProgramLocalParameterI4uivEXT; void function(GLuint, GLenum, GLuint, GLsizei, in GLuint*) glNamedProgramLocalParametersI4uivEXT; void function(GLuint, GLenum, GLuint, GLint*) glGetNamedProgramLocalParameterIivEXT; void function(GLuint, GLenum, GLuint, GLuint*) glGetNamedProgramLocalParameterIuivEXT; void function(GLuint, GLenum, GLenum, in GLint*) glTextureParameterIivEXT; void function(GLuint, GLenum, GLenum, in GLuint*) glTextureParameterIuivEXT; void function(GLuint, GLenum, GLenum, GLint*) glGetTextureParameterIivEXT; void function(GLuint, GLenum, GLenum, GLuint*) glGetTextureParameterIuivEXT; void function(GLenum, GLenum, GLenum, in GLint*) glMultiTexParameterIivEXT; void function(GLenum, GLenum, GLenum, in GLuint*) glMultiTexParameterIuivEXT; void function(GLenum, GLenum, GLenum, GLint*) glGetMultiTexParameterIivEXT; void function(GLenum, GLenum, GLenum, GLuint*) glGetMultiTexParameterIuivEXT; void function(GLuint, GLint, GLfloat) glProgramUniform1fEXT; void function(GLuint, GLint, GLfloat, GLfloat) glProgramUniform2fEXT; void function(GLuint, GLint, GLfloat, GLfloat, GLfloat) glProgramUniform3fEXT; void function(GLuint, GLint, GLfloat, GLfloat, GLfloat, GLfloat) glProgramUniform4fEXT; void function(GLuint, GLint, GLint) glProgramUniform1iEXT; void function(GLuint, GLint, GLint, GLint) glProgramUniform2iEXT; void function(GLuint, GLint, GLint, GLint, GLint) glProgramUniform3iEXT; void function(GLuint, GLint, GLint, GLint, GLint, GLint) glProgramUniform4iEXT; void function(GLuint, GLint, GLsizei, in GLfloat*) glProgramUniform1fvEXT; void function(GLuint, GLint, GLsizei, in GLfloat*) glProgramUniform2fvEXT; void function(GLuint, GLint, GLsizei, in GLfloat*) glProgramUniform3fvEXT; void function(GLuint, GLint, GLsizei, in GLfloat*) glProgramUniform4fvEXT; void function(GLuint, GLint, GLsizei, in GLint*) glProgramUniform1ivEXT; void function(GLuint, GLint, GLsizei, in GLint*) glProgramUniform2ivEXT; void function(GLuint, GLint, GLsizei, in GLint*) glProgramUniform3ivEXT; void function(GLuint, GLint, GLsizei, in GLint*) glProgramUniform4ivEXT; void function(GLuint, GLint, GLsizei, GLboolean, in GLfloat*) glProgramUniformMatrix2fvEXT; void function(GLuint, GLint, GLsizei, GLboolean, in GLfloat*) glProgramUniformMatrix3fvEXT; void function(GLuint, GLint, GLsizei, GLboolean, in GLfloat*) glProgramUniformMatrix4fvEXT; void function(GLuint, GLint, GLsizei, GLboolean, in GLfloat*) glProgramUniformMatrix2x3fvEXT; void function(GLuint, GLint, GLsizei, GLboolean, in GLfloat*) glProgramUniformMatrix3x2fvEXT; void function(GLuint, GLint, GLsizei, GLboolean, in GLfloat*) glProgramUniformMatrix2x4fvEXT; void function(GLuint, GLint, GLsizei, GLboolean, in GLfloat*) glProgramUniformMatrix4x2fvEXT; void function(GLuint, GLint, GLsizei, GLboolean, in GLfloat*) glProgramUniformMatrix3x4fvEXT; void function(GLuint, GLint, GLsizei, GLboolean, in GLfloat*) glProgramUniformMatrix4x3fvEXT; void function(GLuint, GLint, GLuint) glProgramUniform1uiEXT; void function(GLuint, GLint, GLuint, GLuint) glProgramUniform2uiEXT; void function(GLuint, GLint, GLuint, GLuint, GLuint) glProgramUniform3uiEXT; void function(GLuint, GLint, GLuint, GLuint, GLuint, GLuint) glProgramUniform4uiEXT; void function(GLuint, GLint, GLsizei, in GLuint*) glProgramUniform1uivEXT; void function(GLuint, GLint, GLsizei, in GLuint*) glProgramUniform2uivEXT; void function(GLuint, GLint, GLsizei, in GLuint*) glProgramUniform3uivEXT; void function(GLuint, GLint, GLsizei, in GLuint*) glProgramUniform4uivEXT; void function(GLuint, GLsizeiptr, in GLvoid*, GLenum) glNamedBufferDataEXT; void function(GLuint, GLintptr, GLsizeiptr, in GLvoid*) glNamedBufferSubDataEXT; GLvoid* function(GLuint, GLenum) glMapNamedBufferEXT; GLboolean function(GLuint) glUnmapNamedBufferEXT; void function(GLuint, GLenum, GLint*) glGetNamedBufferParameterivEXT; void function(GLuint, GLenum, GLvoid**) glGetNamedBufferPointervEXT; void function(GLuint, GLintptr, GLsizeiptr, GLvoid*) glGetNamedBufferSubDataEXT; void function(GLuint, GLenum, GLenum, GLuint) glTextureBufferEXT; void function(GLenum, GLenum, GLenum, GLuint) glMultiTexBufferEXT; void function(GLuint, GLenum, GLsizei, GLsizei) glNamedRenderbufferStorageEXT; void function(GLuint, GLenum, GLint*) glGetNamedRenderbufferParameterivEXT; GLenum function(GLuint, GLenum) glCheckNamedFramebufferStatusEXT; void function(GLuint, GLenum, GLenum, GLuint, GLint) glNamedFramebufferTexture1DEXT; void function(GLuint, GLenum, GLenum, GLuint, GLint) glNamedFramebufferTexture2DEXT; void function(GLuint, GLenum, GLenum, GLuint, GLint, GLint) glNamedFramebufferTexture3DEXT; void function(GLuint, GLenum, GLenum, GLuint) glNamedFramebufferRenderbufferEXT; void function(GLuint, GLenum, GLenum, GLint*) glGetNamedFramebufferAttachmentParameterivEXT; void function(GLuint, GLenum) glGenerateTextureMipmapEXT; void function(GLenum, GLenum) glGenerateMultiTexMipmapEXT; void function(GLuint, GLenum) glFramebufferDrawBufferEXT; void function(GLuint, GLsizei, in GLenum*) glFramebufferDrawBuffersEXT; void function(GLuint, GLenum) glFramebufferReadBufferEXT; void function(GLuint, GLenum, GLint*) glGetFramebufferParameterivEXT; void function(GLuint, GLsizei, GLenum, GLsizei, GLsizei) glNamedRenderbufferStorageMultisampleEXT; void function(GLuint, GLsizei, GLsizei, GLenum, GLsizei, GLsizei) glNamedRenderbufferStorageMultisampleCoverageEXT; void function(GLuint, GLenum, GLuint, GLint) glNamedFramebufferTextureEXT; void function(GLuint, GLenum, GLuint, GLint, GLint) glNamedFramebufferTextureLayerEXT; void function(GLuint, GLenum, GLuint, GLint, GLenum) glNamedFramebufferTextureFaceEXT; void function(GLuint, GLenum, GLuint) glTextureRenderbufferEXT; void function(GLenum, GLenum, GLuint) glMultiTexRenderbufferEXT; // GL_EXT_provoking_vertex void function(GLenum) glProvokingVertexEXT; // GL_EXT_separate_shader_objects void function(GLenum, GLuint) glUseShaderProgramEXT; void function(GLuint) glActiveProgramEXT; GLuint function(GLenum, in GLchar*) glCreateShaderProgramEXT; } version(DerelictGL_NV) { // GL_NV_vertex_array_range void function() glFlushVertexArrayRangeNV; void function(GLsizei, in GLvoid*) glVertexArrayRangeNV; // GL_NV_register_combiners void function(GLenum, in GLfloat*) glCombinerParameterfvNV; void function(GLenum, GLfloat) glCombinerParameterfNV; void function(GLenum, in GLint*) glCombinerParameterivNV; void function(GLenum, GLint) glCombinerParameteriNV; void function(GLenum, GLenum, GLenum, GLenum, GLenum, GLenum) glCombinerInputNV; void function(GLenum, GLenum, GLenum, GLenum, GLenum, GLenum, GLenum, GLboolean, GLboolean, GLboolean) glCombinerOutputNV; void function(GLenum, GLenum, GLenum, GLenum) glFinalCombinerInputNV; void function(GLenum, GLenum, GLenum, GLenum, GLfloat*) glGetCombinerInputParameterfvNV; void function(GLenum, GLenum, GLenum, GLenum, GLint*) glGetCombinerInputParameterivNV; void function(GLenum, GLenum, GLenum, GLfloat*) glGetCombinerOutputParameterfvNV; void function(GLenum, GLenum, GLenum, GLint*) glGetCombinerOutputParameterivNV; void function(GLenum, GLenum, GLfloat*) glGetFinalCombinerInputParameterfvNV; void function(GLenum, GLenum, GLint*) glGetFinalCombinerInputParameterivNV; // GL_NV_fence void function(GLsizei, in GLuint*) glDeleteFencesNV; void function(GLsizei, GLuint*) glGenFencesNV; GLboolean function(GLuint) glIsFenceNV; GLboolean function(GLuint) glTestFenceNV; void function(GLuint, GLenum, GLint*) glGetFenceivNV; void function(GLuint) glFinishFenceNV; void function(GLuint, GLenum) glSetFenceNV; // GL_NV_evaluators void function(GLenum, GLuint, GLenum, GLsizei, GLsizei, GLint, GLint, GLboolean, in GLvoid*) glMapControlPointsNV; void function(GLenum, GLenum, in GLint*) glMapParameterivNV; void function(GLenum, GLenum, in GLfloat*) glMapParameterfvNV; void function(GLenum, GLuint, GLenum, GLsizei, GLsizei, GLboolean, GLvoid*) glGetMapControlPointsNV; void function(GLenum, GLenum, GLint*) glGetMapParameterivNV; void function(GLenum, GLenum, GLfloat*) glGetMapParameterfvNV; void function(GLenum, GLuint, GLenum, GLint*) glGetMapAttribParameterivNV; void function(GLenum, GLuint, GLenum, GLfloat*) glGetMapAttribParameterfvNV; // GL_NV_register_combiners2 void function(GLenum, GLenum, in GLfloat*) glCombinerStageParameterfvNV; void function(GLenum, GLenum, GLfloat*) glGetCombinerStageParameterfvNV; // GL_NV_vertex_program GLboolean function(GLsizei, in GLuint*, GLboolean*) glAreProgramsResidentNV; void function(GLenum, GLuint) glBindProgramNV; void function(GLsizei, in GLuint*) glDeleteProgramsNV; void function(GLenum, GLuint, in GLfloat*) glExecuteProgramNV; void function(GLsizei, GLuint*) glGenProgramsNV; void function(GLenum, GLuint, GLenum, GLdouble*) glGetProgramParameterdvNV; void function(GLenum, GLuint, GLenum, GLfloat*) glGetProgramParameterfvNV; void function(GLuint, GLenum, GLint*) glGetProgramivNV; void function(GLuint, GLenum, GLubyte*) glGetProgramStringNV; void function(GLenum, GLuint, GLenum, GLint*) glGetTrackMatrixivNV; void function(GLuint, GLenum, GLdouble*) glGetVertexAttribdvNV; void function(GLuint, GLenum, GLfloat*) glGetVertexAttribfvNV; void function(GLuint, GLenum, GLint*) glGetVertexAttribivNV; void function(GLuint, GLenum, GLvoid**) glGetVertexAttribPointervNV; GLboolean function(GLuint) glIsProgramNV; void function(GLenum, GLuint, GLsizei, in GLubyte*) glLoadProgramNV; void function(GLenum, GLuint, GLdouble, GLdouble, GLdouble, GLdouble) glProgramParameter4dNV; void function(GLenum, GLuint, in GLdouble*) glProgramParameter4dvNV; void function(GLenum, GLuint, GLfloat, GLfloat, GLfloat, GLfloat) glProgramParameter4fNV; void function(GLenum, GLuint, in GLfloat*) glProgramParameter4fvNV; void function(GLenum, GLuint, GLuint, in GLdouble*) glProgramParameters4dvNV; void function(GLenum, GLuint, GLuint, in GLfloat*) glProgramParameters4fvNV; void function(GLsizei, in GLuint*) glRequestResidentProgramsNV; void function(GLenum, GLuint, GLenum, GLenum) glTrackMatrixNV; void function(GLuint, GLint, GLenum, GLsizei, in GLvoid*) glVertexAttribPointerNV; void function(GLuint, GLdouble) glVertexAttrib1dNV; void function(GLuint, in GLdouble*) glVertexAttrib1dvNV; void function(GLuint, GLfloat) glVertexAttrib1fNV; void function(GLuint, in GLfloat*) glVertexAttrib1fvNV; void function(GLuint, GLshort) glVertexAttrib1sNV; void function(GLuint, in GLshort*) glVertexAttrib1svNV; void function(GLuint, GLdouble, GLdouble) glVertexAttrib2dNV; void function(GLuint, in GLdouble*) glVertexAttrib2dvNV; void function(GLuint, GLfloat, GLfloat) glVertexAttrib2fNV; void function(GLuint, in GLfloat*) glVertexAttrib2fvNV; void function(GLuint, GLshort, GLshort) glVertexAttrib2sNV; void function(GLuint, in GLshort*) glVertexAttrib2svNV; void function(GLuint, GLdouble, GLdouble, GLdouble) glVertexAttrib3dNV; void function(GLuint, in GLdouble*) glVertexAttrib3dvNV; void function(GLuint, GLfloat, GLfloat, GLfloat) glVertexAttrib3fNV; void function(GLuint, in GLfloat*) glVertexAttrib3fvNV; void function(GLuint, GLshort, GLshort, GLshort) glVertexAttrib3sNV; void function(GLuint, in GLshort*) glVertexAttrib3svNV; void function(GLuint, GLdouble, GLdouble, GLdouble, GLdouble) glVertexAttrib4dNV; void function(GLuint, in GLdouble*) glVertexAttrib4dvNV; void function(GLuint, GLfloat, GLfloat, GLfloat, GLfloat) glVertexAttrib4fNV; void function(GLuint, in GLfloat*) glVertexAttrib4fvNV; void function(GLuint, GLshort, GLshort, GLshort, GLshort) glVertexAttrib4sNV; void function(GLuint, in GLshort*) glVertexAttrib4svNV; void function(GLuint, GLubyte, GLubyte, GLubyte, GLubyte) glVertexAttrib4ubNV; void function(GLuint, in GLubyte*) glVertexAttrib4ubvNV; void function(GLuint, GLsizei, in GLdouble*) glVertexAttribs1dvNV; void function(GLuint, GLsizei, in GLfloat*) glVertexAttribs1fvNV; void function(GLuint, GLsizei, in GLshort*) glVertexAttribs1svNV; void function(GLuint, GLsizei, in GLdouble*) glVertexAttribs2dvNV; void function(GLuint, GLsizei, in GLfloat*) glVertexAttribs2fvNV; void function(GLuint, GLsizei, in GLshort*) glVertexAttribs2svNV; void function(GLuint, GLsizei, in GLdouble*) glVertexAttribs3dvNV; void function(GLuint, GLsizei, in GLfloat*) glVertexAttribs3fvNV; void function(GLuint, GLsizei, in GLshort*) glVertexAttribs3svNV; void function(GLuint, GLsizei, in GLdouble*) glVertexAttribs4dvNV; void function(GLuint, GLsizei, in GLfloat*) glVertexAttribs4fvNV; void function(GLuint, GLsizei, in GLshort*) glVertexAttribs4svNV; void function(GLuint, GLsizei, in GLubyte*) glVertexAttribs4ubvNV; // GL_NV_occlusion_query void function(GLsizei, GLuint*) glGenOcclusionQueriesNV; void function(GLsizei, in GLuint*) glDeleteOcclusionQueriesNV; GLboolean function(GLuint) glIsOcclusionQueryNV; void function(GLuint) glBeginOcclusionQueryNV; void function() glEndOcclusionQueryNV; void function(GLuint, GLenum, GLint*) glGetOcclusionQueryivNV; void function(GLuint, GLenum, GLuint*) glGetOcclusionQueryuivNV; // GL_NV_point_sprite void function(GLenum, GLint) glPointParameteriNV; void function(GLenum, in GLint*) glPointParameterivNV; // GL_NV_fragment_program void function(GLuint, GLsizei, in GLubyte*, GLfloat, GLfloat, GLfloat, GLfloat) glProgramNamedParameter4fNV; void function(GLuint, GLsizei, in GLubyte*, GLdouble, GLdouble, GLdouble, GLdouble) glProgramNamedParameter4dNV; void function(GLuint, GLsizei, in GLubyte*, in GLfloat*) glProgramNamedParameter4fvNV; void function(GLuint, GLsizei, in GLubyte*, in GLdouble*) glProgramNamedParameter4dvNV; void function(GLuint, GLsizei, in GLubyte*, GLfloat*) glGetProgramNamedParameterfvNV; void function(GLuint, GLsizei, in GLubyte*, GLdouble*) glGetProgramNamedParameterdvNV; // GL_NV_half_float void function(GLhalfNV, GLhalfNV) glVertex2hNV; void function(in GLhalfNV*) glVertex2hvNV; void function(GLhalfNV, GLhalfNV, GLhalfNV) glVertex3hNV; void function(in GLhalfNV*) glVertex3hvNV; void function(GLhalfNV, GLhalfNV, GLhalfNV, GLhalfNV) glVertex4hNV; void function(in GLhalfNV*) glVertex4hvNV; void function(GLhalfNV, GLhalfNV, GLhalfNV) glNormal3hNV; void function(in GLhalfNV*) glNormal3hvNV; void function(GLhalfNV, GLhalfNV, GLhalfNV) glColor3hNV; void function(in GLhalfNV*) glColor3hvNV; void function(GLhalfNV, GLhalfNV, GLhalfNV, GLhalfNV) glColor4hNV; void function(in GLhalfNV*) glColor4hvNV; void function(GLhalfNV) glTexCoord1hNV; void function(in GLhalfNV*) glTexCoord1hvNV; void function(GLhalfNV, GLhalfNV) glTexCoord2hNV; void function(in GLhalfNV*) glTexCoord2hvNV; void function(GLhalfNV, GLhalfNV, GLhalfNV) glTexCoord3hNV; void function(in GLhalfNV*) glTexCoord3hvNV; void function(GLhalfNV, GLhalfNV, GLhalfNV, GLhalfNV) glTexCoord4hNV; void function(in GLhalfNV*) glTexCoord4hvNV; void function(GLenum, GLhalfNV) glMultiTexCoord1hNV; void function(GLenum, in GLhalfNV*) glMultiTexCoord1hvNV; void function(GLenum, GLhalfNV, GLhalfNV) glMultiTexCoord2hNV; void function(GLenum, in GLhalfNV*) glMultiTexCoord2hvNV; void function(GLenum, GLhalfNV, GLhalfNV, GLhalfNV) glMultiTexCoord3hNV; void function(GLenum, in GLhalfNV*) glMultiTexCoord3hvNV; void function(GLenum, GLhalfNV, GLhalfNV, GLhalfNV, GLhalfNV) glMultiTexCoord4hNV; void function(GLenum, in GLhalfNV*) glMultiTexCoord4hvNV; void function(GLhalfNV) glFogCoordhNV; void function(in GLhalfNV*) glFogCoordhvNV; void function(GLhalfNV, GLhalfNV, GLhalfNV) glSecondaryColor3hNV; void function(in GLhalfNV*) glSecondaryColor3hvNV; // These two funcs seem not to be present in the NVIDIA drivers // void function(GLhalfNV) glVertexWeighthNV; // void function(in GLhalfNV*) glVertexWeighthvNV; void function(GLuint, GLhalfNV) glVertexAttrib1hNV; void function(GLuint, in GLhalfNV*) glVertexAttrib1hvNV; void function(GLuint, GLhalfNV, GLhalfNV) glVertexAttrib2hNV; void function(GLuint, in GLhalfNV*) glVertexAttrib2hvNV; void function(GLuint, GLhalfNV, GLhalfNV, GLhalfNV) glVertexAttrib3hNV; void function(GLuint, in GLhalfNV*) glVertexAttrib3hvNV; void function(GLuint, GLhalfNV, GLhalfNV, GLhalfNV, GLhalfNV) glVertexAttrib4hNV; void function(GLuint, in GLhalfNV*) glVertexAttrib4hvNV; void function(GLuint, GLsizei, in GLhalfNV*) glVertexAttribs1hvNV; void function(GLuint, GLsizei, in GLhalfNV*) glVertexAttribs2hvNV; void function(GLuint, GLsizei, in GLhalfNV*) glVertexAttribs3hvNV; void function(GLuint, GLsizei, in GLhalfNV*) glVertexAttribs4hvNV; // GL_NV_pixel_data_range void function(GLenum, GLsizei, GLvoid*) glPixelDataRangeNV; void function(GLenum) glFlushPixelDataRangeNV; // GL_NV_primitive_restart void function() glPrimitiveRestartNV; void function(GLuint) glPrimitiveRestartIndexNV; // GL_NV_gpu_program4 void function(GLenum, GLuint, GLint, GLint, GLint, GLint) glProgramLocalParameterI4iNV; void function(GLenum, GLuint, in GLint*) glProgramLocalParameterI4ivNV; void function(GLenum, GLuint, GLsizei, in GLint*) glProgramLocalParametersI4ivNV; void function(GLenum, GLuint, GLuint, GLuint, GLuint, GLuint) glProgramLocalParameterI4uiNV; void function(GLenum, GLuint, in GLuint*) glProgramLocalParameterI4uivNV; void function(GLenum, GLuint, GLsizei, in GLuint*) glProgramLocalParametersI4uivNV; void function(GLenum, GLuint, GLint, GLint, GLint, GLint) glProgramEnvParameterI4iNV; void function(GLenum, GLuint, in GLint*) glProgramEnvParameterI4ivNV; void function(GLenum, GLuint, GLsizei, in GLint*) glProgramEnvParametersI4ivNV; void function(GLenum, GLuint, GLuint, GLuint, GLuint, GLuint) glProgramEnvParameterI4uiNV; void function(GLenum, GLuint, in GLuint*) glProgramEnvParameterI4uivNV; void function(GLenum, GLuint, GLsizei, in GLuint*) glProgramEnvParametersI4uivNV; void function(GLenum, GLuint, GLint*) glGetProgramLocalParameterIivNV; void function(GLenum, GLuint, GLuint*) glGetProgramLocalParameterIuivNV; void function(GLenum, GLuint, GLint*) glGetProgramEnvParameterIivNV; void function(GLenum, GLuint, GLuint*) glGetProgramEnvParameterIuivNV; // GL_NV_geometry_program4 void function(GLenum, GLint) glProgramVertexLimitNV; void function(GLenum, GLenum, GLuint, GLint) glFramebufferTextureEXT; void function(GLenum, GLenum, GLuint, GLint, GLint) glFramebufferTextureLayerEXT; void function(GLenum, GLenum, GLuint, GLint, GLenum) glFramebufferTextureFaceEXT; // GL_NV_vertex_program4 void function(GLuint, GLint) glVertexAttribI1iEXT; void function(GLuint, GLint, GLint) glVertexAttribI2iEXT; void function(GLuint, GLint, GLint, GLint) glVertexAttribI3iEXT; void function(GLuint, GLint, GLint, GLint, GLint) glVertexAttribI4iEXT; void function(GLuint, GLuint) glVertexAttribI1uiEXT; void function(GLuint, GLuint, GLuint) glVertexAttribI2uiEXT; void function(GLuint, GLuint, GLuint, GLuint) glVertexAttribI3uiEXT; void function(GLuint, GLuint, GLuint, GLuint, GLuint) glVertexAttribI4uiEXT; void function(GLuint, in GLint*) glVertexAttribI1ivEXT; void function(GLuint, in GLint*) glVertexAttribI2ivEXT; void function(GLuint, in GLint*) glVertexAttribI3ivEXT; void function(GLuint, in GLint*) glVertexAttribI4ivEXT; void function(GLuint, in GLuint*) glVertexAttribI1uivEXT; void function(GLuint, in GLuint*) glVertexAttribI2uivEXT; void function(GLuint, in GLuint*) glVertexAttribI3uivEXT; void function(GLuint, in GLuint*) glVertexAttribI4uivEXT; void function(GLuint, in GLbyte*) glVertexAttribI4bvEXT; void function(GLuint, in GLshort*) glVertexAttribI4svEXT; void function(GLuint, in GLubyte*) glVertexAttribI4ubvEXT; void function(GLuint, in GLushort*) glVertexAttribI4usvEXT; void function(GLuint, GLint, GLenum, GLsizei, in GLvoid*) glVertexAttribIPointerEXT; void function(GLuint, GLenum, GLint*) glGetVertexAttribIivEXT; void function(GLuint, GLenum, GLuint*) glGetVertexAttribIuivEXT; // GL_NV_depth_buffer_float void function(GLdouble, GLdouble) glDepthRangedNV; void function(GLdouble) glClearDepthdNV; void function(GLdouble, GLdouble) glDepthBoundsdNV; // GL_NV_framebuffer_multisample_coverage void function(GLenum, GLsizei, GLsizei, GLenum, GLsizei, GLsizei) glRenderbufferStorageMultisampleCoverageNV; // GL_NV_transform_feedback void function(GLenum) glBeginTransformFeedbackNV; void function() glEndTransformFeedbackNV; void function(GLuint, in GLint*, GLenum) glTransformFeedbackAttribsNV; void function(GLenum, GLuint, GLuint, GLintptr, GLsizeiptr) glBindBufferRangeNV; void function(GLenum, GLuint, GLuint, GLintptr) glBindBufferOffsetNV; void function(GLenum, GLuint, GLuint) glBindBufferBaseNV; void function(GLuint, GLsizei, in GLchar**, GLenum) glTransformFeedbackVaryingsNV; void function(GLuint, in GLchar*) glActiveVaryingNV; GLint function(GLuint, in GLchar*) glGetVaryingLocationNV; void function(GLuint, GLuint, GLsizei, GLsizei*, GLsizei*, GLenum*, GLchar*) glGetActiveVaryingNV; void function(GLuint, GLuint, GLint*) glGetTransformFeedbackVaryingNV; // GL_NV_conditional_render void function(GLuint, GLenum) glBeginConditionalRenderNV; void function() glEndConditionalRenderNV; // GL_NV_present_video void function(GLuint, GLuint64EXT, GLuint, GLuint, GLenum, GLenum, GLuint, GLuint, GLenum, GLuint, GLuint) glPresentFrameKeyedNV; void function(GLuint, GLuint64EXT, GLuint, GLuint, GLenum, GLenum, GLuint, GLenum, GLuint, GLenum, GLuint, GLenum, GLuint) glPresentFrameDualFillNV; void function(GLuint, GLenum, GLint*) glGetVideoivNV; void function(GLuint, GLenum, GLuint*) glGetVideouivNV; void function(GLuint, GLenum, GLint64EXT*) glGetVideoi64vNV; void function(GLuint, GLenum, GLuint64EXT*) glGetVideoui64vNV; // GL_NV_explicit_multisample void function(GLenum, GLuint, GLfloat*) glGetMultisamplefvNV; void function(GLuint, GLbitfield) glSampleMaskIndexedNV; void function(GLenum, GLuint) glTexRenderbufferNV; // GL_NV_transform_feedback2 void function(GLenum, GLuint) glBindTransformFeedbackNV; void function(GLsizei, in GLuint*) glDeleteTransformFeedbacksNV; void function(GLsizei, GLuint*) glGenTransformFeedbacksNV; GLboolean function(GLuint) glIsTransformFeedbackNV; void function() glPauseTransformFeedbackNV; void function() glResumeTransformFeedbackNV; void function(GLenum, GLuint) glDrawTransformFeedbackNV; // GL_NV_video_capture void function(GLuint) glBeginVideoCaptureNV; void function(GLuint, GLuint, GLenum, GLintptrARB) glBindVideoCaptureStreamBufferNV; void function(GLuint, GLuint, GLenum, GLenum, GLuint) glBindVideoCaptureStreamTextureNV; void function(GLuint) glEndVideoCaptureNV; void function(GLuint, GLenum, GLint*) glGetVideoCaptureivNV; void function(GLuint, GLuint, GLenum, GLint*) glGetVideoCaptureStreamivNV; void function(GLuint, GLuint, GLenum, GLfloat*) glGetVideoCaptureStreamfvNV; void function(GLuint, GLuint, GLenum, GLdouble*) glGetVideoCaptureStreamdvNV; GLenum function(GLuint, GLuint*, GLuint64EXT*) glVideoCaptureNV; void function(GLuint, GLuint, GLenum, in GLint*) glVideoCaptureStreamParameterivNV; void function(GLuint, GLuint, GLenum, in GLfloat*) glVideoCaptureStreamParameterfvNV; void function(GLuint, GLuint, GLenum, in GLdouble*) glVideoCaptureStreamParameterdvNV; // GL_NV_copy_image void function(GLuint, GLenum, GLint, GLint, GLint, GLint, GLuint, GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei) glCopyImageSubDataNV; // GL_NV_shader_buffer_load void function(GLenum, GLenum) glMakeBufferResidentNV; void function(GLenum) glMakeBufferNonResidentNV; GLboolean function(GLenum) glIsBufferResidentNV; void function(GLuint, GLenum) glNamedMakeBufferResidentNV; void function(GLuint) glNamedMakeBufferNonResidentNV; GLboolean function(GLuint) glIsNamedBufferResidentNV; void function(GLenum, GLenum, GLuint64EXT*) glGetBufferParameterui64vNV; void function(GLuint, GLenum, GLuint64EXT*) glGetNamedBufferParameterui64vNV; void function(GLenum, GLuint64EXT*) glGetIntegerui64vNV; void function(GLint, GLuint64EXT) glUniformui64NV; void function(GLint, GLsizei, in GLuint64EXT*) glUniformui64vNV; void function(GLuint, GLint, GLuint64EXT*) glGetUniformui64vNV; void function(GLuint, GLint, GLuint64EXT) glProgramUniformui64NV; void function(GLuint, GLint, GLsizei, in GLuint64EXT*) glProgramUniformui64vNV; // GL_NV_vertex_buffer_unified_memory void function(GLenum, GLuint, GLuint64EXT, GLsizeiptr) glBufferAddressRangeNV; void function(GLint, GLenum, GLsizei) glVertexFormatNV; void function(GLenum, GLsizei) glNormalFormatNV; void function(GLint, GLenum, GLsizei) glColorFormatNV; void function(GLenum, GLsizei) glIndexFormatNV; void function(GLint, GLenum, GLsizei) glTexCoordFormatNV; void function(GLsizei) glEdgeFlagFormatNV; void function(GLint, GLenum, GLsizei) glSecondaryColorFormatNV; void function(GLenum, GLsizei) glFogCoordFormatNV; void function(GLuint, GLint, GLenum, GLboolean, GLsizei) glVertexAttribFormatNV; void function(GLuint, GLint, GLenum, GLsizei) glVertexAttribIFormatNV; void function(GLenum, GLuint, GLuint64EXT*) glGetIntegerui64i_vNV; // GL_NV_texture_barrier void function() glTextureBarrierNV; } version(DerelictGL_ATI) { // GL_ATI_envmap_bumpmap void function(GLenum, in GLint*) glTexBumpParameterivATI; void function(GLenum, in GLfloat*) glTexBumpParameterfvATI; void function(GLenum, GLint*) glGetTexBumpParameterivATI; void function(GLenum, GLfloat*) glGetTexBumpParameterfvATI; // GL_ATI_fragment_shader GLuint function(GLuint) glGenFragmentShadersATI; void function(GLuint) glBindFragmentShaderATI; void function(GLuint) glDeleteFragmentShaderATI; void function() glBeginFragmentShaderATI; void function() glEndFragmentShaderATI; void function(GLuint, GLuint, GLenum) glPassTexCoordATI; void function(GLuint, GLuint, GLenum) glSampleMapATI; void function(GLenum, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint) glColorFragmentOp1ATI; void function(GLenum, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint) glColorFragmentOp2ATI; void function(GLenum, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint) glColorFragmentOp3ATI; void function(GLenum, GLuint, GLuint, GLuint, GLuint, GLuint) glAlphaFragmentOp1ATI; void function(GLenum, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint) glAlphaFragmentOp2ATI; void function(GLenum, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint) glAlphaFragmentOp3ATI; void function(GLuint, in GLfloat*) glSetFragmentShaderConstantATI; // GL_ATI_pn_triangles void function(GLenum, GLint) glPNTrianglesiATI; void function(GLenum, GLint) glPNTrianglesfATI; // GL_ATI_vertex_array_object GLuint function(GLsizei, in GLvoid*, GLenum) glNewObjectBufferATI; GLboolean function(GLuint) glIsObjectBufferATI; void function(GLuint, GLuint, GLsizei, in GLvoid*, GLenum) glUpdateObjectBufferATI; void function(GLuint, GLenum, GLfloat*) glGetObjectBufferfvATI; void function(GLuint, GLenum, GLint*) glGetObjectBufferivATI; void function(GLuint) glFreeObjectBufferATI; void function(GLenum, GLint, GLenum, GLsizei, GLuint, GLuint) glArrayObjectATI; void function(GLenum, GLenum, GLfloat*) glGetArrayObjectfvATI; void function(GLenum, GLenum, GLint*) glGetArrayObjectivATI; void function(GLuint, GLenum, GLsizei, GLuint, GLuint) glVariantArrayObjectATI; void function(GLuint, GLenum, GLfloat*) glGetVariantArrayObjectfvATI; void function(GLuint, GLenum, GLint*) glGetVariantArrayObjectivATI; // GL_ATI_vertex_streams void function(GLenum, GLshort) glVertexStream1sATI; void function(GLenum, in GLshort*) glVertexStream1svATI; void function(GLenum, GLint) glVertexStream1iATI; void function(GLenum, in GLint*) glVertexStream1ivATI; void function(GLenum, GLfloat) glVertexStream1fATI; void function(GLenum, in GLfloat*) glVertexStream1fvATI; void function(GLenum, GLdouble) glVertexStream1dATI; void function(GLenum, in GLdouble*) glVertexStream1dvATI; void function(GLenum, GLshort, GLshort) glVertexStream2sATI; void function(GLenum, in GLshort*) glVertexStream2svATI; void function(GLenum, GLint, GLint) glVertexStream2iATI; void function(GLenum, in GLint*) glVertexStream2ivATI; void function(GLenum, GLfloat, GLfloat) glVertexStream2fATI; void function(GLenum, in GLfloat*) glVertexStream2fvATI; void function(GLenum, GLdouble, GLdouble) glVertexStream2dATI; void function(GLenum, in GLdouble*) glVertexStream2dvATI; void function(GLenum, GLshort, GLshort, GLshort) glVertexStream3sATI; void function(GLenum, in GLshort*) glVertexStream3svATI; void function(GLenum, GLint, GLint, GLint) glVertexStream3iATI; void function(GLenum, in GLint*) glVertexStream3ivATI; void function(GLenum, GLfloat, GLfloat, GLfloat) glVertexStream3fATI; void function(GLenum, in GLfloat*) glVertexStream3fvATI; void function(GLenum, GLdouble, GLdouble, GLdouble) glVertexStream3dATI; void function(GLenum, in GLdouble*) glVertexStream3dvATI; void function(GLenum, GLshort, GLshort, GLshort, GLshort) glVertexStream4sATI; void function(GLenum, in GLshort*) glVertexStream4svATI; void function(GLenum, GLint, GLint, GLint, GLint) glVertexStream4iATI; void function(GLenum, in GLint*) glVertexStream4ivATI; void function(GLenum, GLfloat, GLfloat, GLfloat, GLfloat) glVertexStream4fATI; void function(GLenum, in GLfloat*) glVertexStream4fvATI; void function(GLenum, GLdouble, GLdouble, GLdouble, GLdouble) glVertexStream4dATI; void function(GLenum, in GLdouble*) glVertexStream4dvATI; void function(GLenum, GLbyte, GLbyte, GLbyte) glNormalStream3bATI; void function(GLenum, in GLbyte*) glNormalStream3bvATI; void function(GLenum, GLshort, GLshort, GLshort) glNormalStream3sATI; void function(GLenum, in GLshort*) glNormalStream3svATI; void function(GLenum, GLint, GLint, GLint) glNormalStream3iATI; void function(GLenum, in GLint*) glNormalStream3ivATI; void function(GLenum, GLfloat, GLfloat, GLfloat) glNormalStream3fATI; void function(GLenum, in GLfloat*) glNormalStream3fvATI; void function(GLenum, GLdouble, GLdouble, GLdouble) glNormalStream3dATI; void function(GLenum, in GLdouble*) glNormalStream3dvATI; void function(GLenum) glClientActiveVertexStreamATI; void function(GLenum, GLint) glVertexBlendEnviATI; void function(GLenum, GLfloat) glVertexBlendEnvfATI; // GL_ATI_element_array void function(GLenum, in GLvoid*) glElementPointerATI; void function(GLenum, GLsizei) glDrawElementArrayATI; void function(GLenum, GLuint, GLuint, GLsizei) glDrawRangeElementArrayATI; // GL_ATI_draw_buffers void function(GLsizei, in GLenum*) glDrawBuffersATI; // GL_ATI_map_object_buffer GLvoid* function(GLuint) glMapBufferATI; void function(GLuint) glUnmapBufferATI; // GL_ATI_separate_stencil void function(GLenum, GLenum, GLenum, GLenum) glStencilOpSeparateATI; void function(GLenum, GLenum, GLint, GLuint) glStencilFuncSeparateATI; // GL_ATI_vertex_attrib_array_object void function(GLuint, GLint, GLenum, GLboolean, GLsizei, GLuint, GLuint) glVertexAttribArrayObjectATI; void function(GLuint, GLenum, GLfloat*) glGetVertexAttribArrayObjectfvATI; void function(GLuint, GLenum, GLint*) glGetVertexAttribArrayObjectivATI; } version(DerelictGL_AMD) { // GL_AMD_performance_monitor void function(GLint*, GLsizei, GLuint*) glGetPerfMonitorGroupsAMD; void function(GLuint, GLint*, GLint*, GLsizei, GLuint*) glGetPerfMonitorCountersAMD; void function(GLuint, GLsizei, GLsizei*, GLchar*) glGetPerfMonitorGroupStringAMD; void function(GLuint, GLuint, GLsizei, GLsizei*, GLchar*) glGetPerfMonitorCounterStringAMD; void function(GLuint, GLuint, GLenum, void*) glGetPerfMonitorCounterInfoAMD; void function(GLsizei, GLuint*) glGenPerfMonitorsAMD; void function(GLsizei, GLuint*) glDeletePerfMonitorsAMD; void function(GLuint, GLboolean, GLuint, GLint, GLuint*) glSelectPerfMonitorCountersAMD; void function(GLuint) glBeginPerfMonitorAMD; void function(GLuint) glEndPerfMonitorAMD; void function(GLuint, GLenum, GLsizei, GLuint*, GLint*) glGetPerfMonitorCounterDataAMD; // GL_AMD_vertex_shader_tesselator void function(GLfloat) glTessellationFactorAMD; void function(GLenum) glTessellationModeAMD; // GL_AMD_draw_buffers_blend void function(GLuint, GLenum, GLenum) glBlendFuncIndexedAMD; void function(GLuint, GLenum, GLenum, GLenum, GLenum) glBlendFuncSeparateIndexedAMD; void function(GLuint, GLenum) glBlendEquationIndexedAMD; void function(GLuint, GLenum, GLenum) glBlendEquationSeparateIndexedAMD; } version(DerelictGL_SGI) { // GL_SGI_color_table void function(GLenum, GLenum, GLsizei, GLenum, GLenum, in GLvoid*) glColorTableSGI; void function(GLenum, GLenum, in GLfloat*) glColorTableParameterfvSGI; void function(GLenum, GLenum, in GLint*) glColorTableParameterivSGI; void function(GLenum, GLenum, GLint, GLint, GLsizei) glCopyColorTableSGI; void function(GLenum, GLenum, GLenum, GLvoid*) glGetColorTableSGI; void function(GLenum, GLenum, GLfloat*) glGetColorTableParameterfvSGI; void function(GLenum, GLenum, GLint*) glGetColorTableParameterivSGI; } version(DerelictGL_SGIS) { // GL_SGIS_texture_filter4 void function(GLenum, GLenum, GLfloat*) glGetTexFilterFuncSGIS; void function(GLenum, GLenum, in GLfloat*) glTexFilterFuncSGIS; // GL_SGIS_pixel_texture void function(GLenum, GLint) glPixelTexGenParameteriSGIS; void function(GLenum, in GLint*) glPixelTexGenParameterivSGIS; void function(GLenum, GLfloat) glPixelTexGenParameterfSGIS; void function(GLenum, in GLfloat*) glPixelTexGenParameterfvSGIS; void function(GLenum, GLint*) glGetPixelTexGenParameterivSGIS; void function(GLenum, GLfloat*) glGetPixelTexGenParameterfvSGIS; // GL_SGIS_texture4D void function(GLenum, GLint, GLenum, GLsizei, GLsizei, GLsizei, GLsizei, GLint, GLenum, GLenum, in GLvoid*) glTexImage4DSGIS; void function(GLenum, GLint, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLsizei, GLenum, GLenum, in GLvoid*) glTexSubImage4DSGIS; // GL_SGIS_detail_texture void function(GLenum, GLsizei, in GLfloat*) glDetailTexFuncSGIS; void function(GLenum, GLfloat*) glGetDetailTexFuncSGIS; // GL_SGIS_sharpen_texture void function(GLenum, GLsizei, in GLfloat*) glSharpenTexFuncSGIS; void function(GLenum, GLfloat*) glGetSharpenTexFuncSGIS; // GL_SGIS_multisample void function(GLclampf, GLboolean) glSampleMaskSGIS; void function(GLenum) glSamplePatternSGIS; // GL_SGIS_point_parameters void function(GLenum, GLfloat) glPointParameterfSGIS; void function(GLenum, in GLfloat*) glPointParameterfvSGIS; // GL_SGIS_fog_function void function(GLsizei, in GLfloat*) glFogFuncSGIS; void function(GLfloat*) glGetFogFuncSGIS; // GL_SGIS_texture_color_mask void function(GLboolean, GLboolean, GLboolean, GLboolean) glTextureColorMaskSGIS; } version(DerelictGL_SGIX) { // GL_SGIX_pixel_texture void function(GLenum) glPixelTexGenSGIX; // GL_SGIX_sprite void function(GLenum, GLfloat) glSpriteParameterfSGIX; void function(GLenum, in GLfloat*) glSpriteParameterfvSGIX; void function(GLenum, GLint) glSpriteParameteriSGIX; void function(GLenum, in GLint*) glSpriteParameterivSGIX; // GL_SGIX_instruments GLint function() glGetInstrumentsSGIX; void function(GLsizei, GLint*) glInstrumentsBufferSGIX; GLint function(GLint*) glPollInstrumentsSGIX; void function(GLint) glReadInstrumentsSGIX; void function() glStartInstrumentsSGIX; void function(GLint) glStopInstrumentsSGIX; // GL_SGIX_framezoom void function(GLint) glFrameZoomSGIX; // GL_SGIX_tag_sample_buffer void function() glTagSampleBufferSGIX; // GL_SGIX_polynomial_ffd void function(GLenum, GLdouble, GLdouble, GLint, GLint, GLdouble, GLdouble, GLint, GLint, GLdouble, GLdouble, GLint, GLint, in GLdouble*) glDeformationMap3dSGIX; void function(GLenum, GLfloat, GLfloat, GLint, GLint, GLfloat, GLfloat, GLint, GLint, GLfloat, GLfloat, GLint, GLint, in GLfloat*) glDeformationMap3fSGIX; void function(GLbitfield) glDeformSGIX; void function(GLbitfield) glLoadIdentityDeformationMapSGIX; // GL_SGIX_reference_plane void function(in GLdouble*) glReferencePlaneSGIX; // GL_SGIX_flush_raster void function() glFLushRasterSGIX; // GL_SGIX_list_priority void function(GLuint, GLenum, GLfloat*) glGetListParameterfvSGIX; void function(GLuint, GLenum, GLint*) glGetListParameterivSGIX; void function(GLuint, GLenum, GLfloat) glListParameterfSGIX; void function(GLuint, GLenum, in GLfloat*) glListParameterfvSGIX; void function(GLuint, GLenum, GLint) glListParameteriSGIX; void function(GLuint, GLenum, in GLint*) glListParameterivSGIX; // GL_SGIX_fragment_lighting void function(GLenum, GLenum) glFragmentColorMaterialSGIX; void function(GLenum, GLenum, GLfloat) glFragmentLightfSGIX; void function(GLenum, GLenum, in GLfloat*) glFragmentLightfvSGIX; void function(GLenum, GLenum, GLint) glFragmentLightiSGIX; void function(GLenum, GLenum, in GLint*) glFragmentLightivSGIX; void function(GLenum, GLfloat) glFragmentLightModelfSGIX; void function(GLenum, in GLfloat*) glFragmentLightModelfvSGIX; void function(GLenum, GLint) glFragmentLightModeliSGIX; void function(GLenum, in GLint*) glFragmentLightModelivSGIX; void function(GLenum, GLenum, GLfloat) glFragmentMaterialfSGIX; void function(GLenum, GLenum, in GLfloat*) glFragmentMaterialfvSGIX; void function(GLenum, GLenum, GLint) glFragmentMaterialiSGIX; void function(GLenum, GLenum, in GLint*) glFragmentMaterialivSGIX; void function(GLenum, GLenum, GLfloat*) glGetFragmentLightfvSGIX; void function(GLenum, GLenum, GLint*) glGetFragmentLightivSGIX; void function(GLenum, GLenum, GLfloat*) glGetFragmentMaterialfvSGIX; void function(GLenum, GLenum, GLint*) glGetFragmentMaterialivSGIX; void function(GLenum, GLint) glLightEnviSGIX; // GL_SGIX_async void function(GLuint) glAsyncMarkerSGIX; GLint function(GLuint*) glFinishAsyncSGIX; GLint function(GLuint*) glPollAsyncSGIX; GLuint function(GLsizei) glGenAsyncMarkersSGIX; void function(GLuint, GLsizei) glDeleteAsyncMarkersSGIX; GLboolean function(GLuint) glIsAsyncMarkerSGIX; } version(DerelictGL_HP) { // GL_HP_image_transform void function(GLenum, GLenum, GLint) glImageTransformParameteriHP; void function(GLenum, GLenum, GLfloat) glImageTransformParameterfHP; void function(GLenum, GLenum, in GLint*) glImageTransformParameterivHP; void function(GLenum, GLenum, in GLfloat*) glImageTransformParameterfvHP; void function(GLenum, GLenum, GLint*) glGetImageTransformParameterivHP; void function(GLenum, GLenum, GLfloat*) glGetImageTransformParameterfvHP; } version(DerelictGL_PGI) { // GL_PGI_misc_hints void function(GLenum, GLint) glHintPGI; } version(DerelictGL_IBM) { // GL_IBM_multimode_draw_arrays void function(in GLenum*, in GLint*, in GLsizei*, GLsizei, GLint) glMultiModeDrawArraysIBM; void function(in GLenum*, in GLsizei*, GLenum, in GLvoid**, GLsizei, GLint) glMultiModeDrawElementsIBM; // GL_IBM_vertex_array_lists void function(GLint, GLenum, GLint, in GLvoid**, GLint) glColorPointerListIBM; void function(GLint, GLenum, GLint, in GLvoid**, GLint) glSecondaryColorPointerListIBM; void function(GLint, in GLboolean**, GLint) glEdgeFlagPointerListIBM; void function(GLenum, GLint, in GLvoid**, GLint) glFogCoordPointerListIBM; void function(GLenum, GLint, in GLvoid**, GLint) glIndexPointerListIBM; void function(GLenum, GLint, in GLvoid**, GLint) glNormalPointerListIBM; void function(GLint, GLenum, GLint, in GLvoid**, GLint) glTexCoordPointerListIBM; void function(GLint, GLenum, GLint, in GLvoid**, GLint) glVertexPointerListIBM; } version(DerelictGL_WIN) { } version(DerelictGL_INTEL) { // GL_INTEL_parallel_arrays void function(GLint, GLenum, in GLvoid**) glVertexPointervINTEL; void function(GLenum, in GLvoid**) glNormalPointervINTEL; void function(GLint, GLenum, in GLvoid**) glColorPointervINTEL; void function(GLint, GLenum, in GLvoid**) glTexCoordPointervINTEL; } version(DerelictGL_REND) { } version(DerelictGL_APPLE) { // GL_APPLE_element_array void function(GLenum, in GLvoid*) glElementPointerAPPLE; void function(GLenum, GLint, GLsizei) glDrawElementArrayAPPLE; void function(GLenum, GLuint, GLuint, GLint, GLsizei) glDrawRangeElementArrayAPPLE; void function(GLenum, in GLint*, in GLsizei*, GLsizei) glMultiDrawElementArrayAPPLE; void function(GLenum, GLuint, GLuint, in GLint*, in GLsizei*, GLsizei) glMultiDrawRangeElementArrayAPPLE; // GL_APPLE_fence void function(GLsizei, GLuint*) glGenFencesAPPLE; void function(GLsizei, in GLuint*) glDeleteFencesAPPLE; void function(GLuint) glSetFenceAPPLE; GLboolean function(GLuint) glIsFenceAPPLE; GLboolean function(GLuint) glTestFenceAPPLE; void function(GLuint) glFinishFenceAPPLE; GLboolean function(GLenum, GLuint) glTestObjectAPPLE; void function(GLenum, GLint) glFinishObjectAPPLE; // GL_APPLE_vertex_array_object void function(GLuint) glBindVertexArrayAPPLE; void function(GLsizei, in GLuint*) glDeleteVertexArraysAPPLE; void function(GLsizei, GLuint*) glGenVertexArraysAPPLE; GLboolean function(GLuint) glIsVertexArrayAPPLE; // GL_APPLE_vertex_array_range void function(GLsizei, GLvoid*) glVertexArrayRangeAPPLE; void function(GLsizei, GLvoid*) glFlushVertexArrayRangeAPPLE; void function(GLenum, GLint) glVertexArrayParameteriAPPLE; // GL_APPLE_flush_buffer_range void function(GLenum, GLenum, GLint) glBufferParameteriAPPLE; void function(GLenum, GLintptr, GLsizeiptr) glFlushMappedBufferRangeAPPLE; // GL_APPLE_texture_range void function(GLenum, GLsizei, in GLvoid*) glTextureRangeAPPLE; void function(GLenum, GLenum, GLvoid**) glGetTexParameterPointervAPPLE; // GL_APPLE_vertex_program_evaluators void function(GLuint, GLenum) glEnableVertexAttribAPPLE; void function(GLuint, GLenum) glDisableVertexAttribAPPLE; GLboolean function(GLuint, GLenum) glIsVertexAttribAPPLE; void function(GLuint, GLuint, GLdouble, GLdouble, GLint, GLint, in GLdouble*) glMapVertexAttrib1dAPPLE; void function(GLuint, GLuint, GLfloat, GLfloat, GLint, GLint, in GLfloat*) glMapVertexAttrib1fAPPLE; void function(GLuint, GLuint, GLdouble, GLdouble, GLint, GLint, GLdouble, GLdouble, GLint, GLint, in GLdouble*) glMapVertexAttrib2dAPPLE; void function(GLuint, GLuint, GLfloat, GLfloat, GLint, GLint, GLfloat, GLfloat, GLint, GLint, in GLfloat*) glMapVertexAttrib2fAPPLE; // GL_APPLE_object_purgeable GLenum function(GLenum, GLuint, GLenum) glObjectPurgeableAPPLE; GLenum function(GLenum, GLuint, GLenum) glObjectUnpurgeableAPPLE; void function(GLenum, GLuint, GLenum, GLuint*) glGetObjectParameterivAPPLE; } version(DerelictGL_SUNX) { // GL_SUNX_inant_data void function() glFinishTextureSUNX; } version(DerelictGL_SUN) { // GL_SUN_global_alpha void function(GLbyte) glGlobalAlphaFactorbSUN; void function(GLshort) glGlobalAlphaFactorsSUN; void function(GLint) glGlobalAlphaFactoriSUN; void function(GLfloat) glGlobalAlphaFactorfSUN; void function(GLdouble) glGlobalAlphaFactordSUN; void function(GLubyte) glGlobalAlphaFactorubSUN; void function(GLushort) glGlobalAlphaFactorusSUN; void function(GLuint) glGlobalAlphaFactoruiSUN; // GL_SUN_triangle_list void function(GLuint) glReplacementCodeuiSUN; void function(GLushort) glReplacementCodeusSUN; void function(GLubyte) glReplacementCodeubSUN; void function(in GLuint*) glReplacementCodeuivSUN; void function(in GLushort*) glReplacementCodeusvSUN; void function(in GLubyte*) glReplacementCodeubvSUN; void function(GLenum, GLsizei, in GLvoid**) glReplacementCodePointerSUN; // GL_SUN_vertex void function(GLubyte, GLubyte, GLubyte, GLubyte, GLfloat, GLfloat) glColor4ubVertex2fSUN; void function(in GLubyte*, in GLfloat*) glColor4ubVertex2fvSUN; void function(GLubyte, GLubyte, GLubyte, GLubyte, GLfloat, GLfloat, GLfloat) glColor4ubVertex3fSUN; void function(in GLubyte*, in GLfloat*) glColor4ubVertex3fvSUN; void function(GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat) glColor3fVertex3fSUN; void function(in GLfloat*, in GLfloat*) glColor3fVertex3fvSUN; void function(GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat) glNormal3fVertex3fSUN; void function(in GLfloat*, in GLfloat*) glNormal3fVertex3fvSUN; void function(GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat) glColor4fNormal3fVertex3fSUN; void function(in GLfloat*, in GLfloat*, in GLfloat*) glColor4fNormal3fVertex3fvSUN; void function(GLfloat, GLfloat, GLfloat, GLfloat, GLfloat) glTexCoord2fVertex3fSUN; void function(in GLfloat*, in GLfloat*) glTexCoord2fVertex3fvSUN; void function(GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat) glTexCoord4fVertex4fSUN; void function(in GLfloat*, in GLfloat*) glTexCoord4fVertex4fvSUN; void function(GLfloat, GLfloat, GLubyte, GLubyte, GLubyte, GLubyte, GLfloat, GLfloat, GLfloat) glTexCoord2fColor4ubVertex3fSUN; void function(in GLfloat*, in GLubyte*, in GLfloat*) glTexCoord2fColor4ubVertex3fvSUN; void function(GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat) glTexCoord2fColor3fVertex3fSUN; void function(in GLfloat*, in GLfloat*, in GLfloat*) glTexCoord2fColor3fVertex3fvSUN; void function(GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat) glTexCoord2fNormal3fVertex3fSUN; void function(in GLfloat*, in GLfloat*, in GLfloat*) glTexCoord2fNormal3fVertex3fvSUN; void function(GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat) glTexCoord2fColor4fNormal3fVertex3fSUN; void function(in GLfloat*, in GLfloat*, in GLfloat*, in GLfloat*) glTexCoord2fColor4fNormal3fVertex3fvSUN; void function(GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat) glTexCoord4fColor4fNormal3fVertex4fSUN; void function(in GLfloat*, in GLfloat*, in GLfloat*, in GLfloat*) glTexCoord4fColor4fNormal3fVertex4fvSUN; void function(GLuint, GLfloat, GLfloat, GLfloat) glReplacementCodeuiVertex3fSUN; void function(in GLuint*, in GLfloat*) glReplacementCodeuiVertex3fvSUN; void function(GLuint, GLubyte, GLubyte, GLubyte, GLubyte, GLfloat, GLfloat, GLfloat) glReplacementCodeuiColor4ubVertex3fSUN; void function(in GLuint*, in GLubyte*, in GLfloat*) glReplacementCodeuiColor4ubVertex3fvSUN; void function(GLuint, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat) glReplacementCodeuiColor3fVertex3fSUN; void function(in GLuint*, in GLfloat*, in GLfloat*) glReplacementCodeuiColor3fVertex3fvSUN; void function(GLuint, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat) glReplacementCodeuiNormal3fVertex3fSUN; void function(in GLuint*, in GLfloat*, in GLfloat*) glReplacementCodeuiNormal3fVertex3fvSUN; void function(GLuint, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat) glReplacementCodeuiColor4fNormal3fVertex3fSUN; void function(in GLuint*, in GLfloat*, in GLfloat*, in GLfloat*) glReplacementCodeuiColor4fNormal3fVertex3fvSUN; void function(GLuint, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat) glReplacementCodeuiTexCoord2fVertex3fSUN; void function(in GLuint*, in GLfloat*, in GLfloat*) glReplacementCodeuiTexCoord2fVertex3fvSUN; void function(GLuint, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat) glReplacementCodeuiTexCoord2fNormal3fVertex3fSUN; void function(in GLuint*, in GLfloat*, in GLfloat*, in GLfloat*) glReplacementCodeuiTexCoord2fNormal3fVertex3fvSUN; void function(GLuint, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat) glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fSUN; void function(in GLuint*, in GLfloat*, in GLfloat*, in GLfloat*, in GLfloat*) glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fvSUN; // GL_SUN_mesh_array void function(GLenum, GLint, GLsizei, GLsizei) glDrawMeshArraysSUN; } version(DerelictGL_INGR) { } version(DerelictGL_MESA) { // GL_MESA_resize_buffers void function() glResizeBuffersMESA; // GL_MESA_window_pos void function(GLdouble, GLdouble) glWindowPos2dMESA; void function(in GLdouble*) glWindowPos2dvMESA; void function(GLfloat, GLfloat) glWindowPos2fMESA; void function(in GLfloat*) glWindowPos2fvMESA; void function(GLint, GLint) glWindowPos2iMESA; void function(in GLint*) glWindowPos2ivMESA; void function(GLshort, GLshort) glWindowPos2sMESA; void function(in GLshort*) glWindowPos2svMESA; void function(GLdouble, GLdouble, GLdouble) glWindowPos3dMESA; void function(in GLdouble*) glWindowPos3dvMESA; void function(GLfloat, GLfloat, GLfloat) glWindowPos3fMESA; void function(in GLfloat*) glWindowPos3fvMESA; void function(GLint, GLint, GLint) glWindowPos3iMESA; void function(in GLint*) glWindowPos3ivMESA; void function(GLshort, GLshort, GLshort) glWindowPos3sMESA; void function(in GLshort*) glWindowPos3svMESA; void function(GLdouble, GLdouble, GLdouble, GLdouble) glWindowPos4dMESA; void function(in GLdouble*) glWindowPos4dvMESA; void function(GLfloat, GLfloat, GLfloat, GLfloat) glWindowPos4fMESA; void function(in GLfloat*) glWindowPos4fvMESA; void function(GLint, GLint, GLint, GLint) glWindowPos4iMESA; void function(in GLint*) glWindowPos4ivMESA; void function(GLshort, GLshort, GLshort, GLshort) glWindowPos4sMESA; void function(in GLshort*) glWindowPos4svMESA; } version(DerelictGL_3DFX) { // GL_3DFX_tbuffer void function(GLuint) glTbufferMask3DFX; } version(DerelictGL_OML) { } version(DerelictGL_S3) { } version(DerelictGL_OES) { } version(DerelictGL_GREMEDY) { // GL_GREMEDY_string_marker void function(GLsizei, in GLvoid*) glStringMarkerGREMEDY; // GL_GREMEDY_frame_terminator void function() glFrameTerminatorGREMEDY; } version(DerelictGL_MESAX) { } version(Windows) { version(DerelictGL_ARB) { // WGL_ARB_buffer_region HANDLE function(HDC, int, UINT) wglCreateBufferRegionARB; void function(HANDLE) wglDeleteBufferRegionARB; BOOL function(HANDLE, int, int, int, int) wglSaveBufferRegionARB; BOOL function(HANDLE, int, int, int, int, int, int) wglRestoreBufferRegionARB; // WGL_ARB_extensions_string CCPTR function(HDC) wglGetExtensionsStringARB; // WGL_ARB_pixel_format BOOL function(HDC, int, int, UINT, in int*, int*) wglGetPixelFormatAttribivARB; BOOL function(HDC, int, int, UINT, in int*, float*) wglGetPixelFormatAttribfvARB; BOOL function(HDC, in int*, in float*, UINT, int*, UINT*) wglChoosePixelFormatARB; // WGL_ARB_make_current_read BOOL function(HDC, HDC, HGLRC) wglMakeContextCurrentARB; HDC function() wglGetCurrentReadDCARB; // WGL_ARB_pbuffer HPBUFFERARB function(HDC, int, int, int, in int*) wglCreatePbufferARB; HDC function(HPBUFFERARB) wglGetPbufferDCARB; int function(HPBUFFERARB, HDC) wglReleasePbufferDCARB; BOOL function(HPBUFFERARB) wglDestroyPbufferARB; BOOL function(HPBUFFERARB, int, int*) wglQueryPbufferARB; // WGL_ARB_render_texture BOOL function(HPBUFFERARB, int) wglBindTexImageARB; BOOL function(HPBUFFERARB, int) wglReleaseTexImageARB; BOOL function(HPBUFFERARB, in int*) wglSetPbufferAttribARB; // WGL_ARB_create_context HGLRC function(HDC, HGLRC, in int*) wglCreateContextAttribsARB; } version(DerelictGL_EXT) { // WGL_EXT_display_color_table GLboolean function(GLushort) wglBindDisplayColorTableEXT; GLboolean function(GLushort) wglCreateDisplayColorTableEXT; void function(GLushort) wglDestroyDisplayColorTableEXT; GLboolean function(GLushort*, GLuint) wglLoadDisplayColorTableEXT; // WGL_EXT_extensions_string CCPTR function() wglGetExtensionsStringEXT; // WGL_EXT_make_current_read BOOL function(HDC, HDC, HGLRC) wglMakeContextCurrentEXT; HDC function() wglGetCurrentReadDCEXT; // WGL_EXT_pbuffer HPBUFFEREXT function(HDC, int, int, int, in int*) wglCreatePbufferEXT; BOOL function(HPBUFFEREXT) wglDestroyPbufferEXT; HDC function(HPBUFFEREXT) wglGetPbufferDCEXT; BOOL function(HPBUFFEREXT, int, int*) wglQueryPbufferEXT; int function(HPBUFFEREXT, HDC) wglReleasePbufferDCEXT; // WGL_EXT_pixel_format BOOL function(HDC, in int*, in FLOAT*, UINT, int*, UINT*) wglChoosePixelFormatEXT; BOOL function(HDC, int, int, UINT, int*, FLOAT*) wglGetPixelFormatAttribfvEXT; BOOL function(HDC, int, int, UINT, int*, int*) wglGetPixelFormatAttribivEXT; // WGL_EXT_swap_control int function() wglGetSwapIntervalEXT; BOOL function(int) wglSwapIntervalEXT; } version(DerelictGL_NV) { // WGL_NV_copy_image BOOL function(HGLRC, GLuint, GLenum, GLint, GLint, GLint, GLint, HGLRC, GLuint, GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei) wglCopyImageSubDataNV; // WGL_NV_gpu_affinity HDC function(in HGPUNV*) wglCreateAffinityDCNV; BOOL function(HDC) wglDeleteDCNV; BOOL function(HGPUNV, UINT, PGPU_DEVICE) wglEnumGpuDevicesNV; BOOL function(HDC, UINT, HGPUNV*) wglEnumGpusFromAffinityDCNV; BOOL function(UINT, HGPUNV*) wglEnumGpusNV; // WGL_NV_present_video BOOL function(HDC, uint, HVIDEOOUTPUTDEVICENV, in int*) wglBindVideoDeviceNV; int function(HDC, HVIDEOOUTPUTDEVICENV*) wglEnumerateVideoDevicesNV; BOOL function(HDC, int, int*) wglQueryCurrentContextNV; // WGL_NV_swap_group BOOL function(GLuint, GLuint) wglBindSwapBarrierNV; BOOL function(HDC, GLuint) wglJoinSwapGroupNV; BOOL function(HDC, GLuint*) wglQueryFrameCountNV; BOOL function(HDC, GLuint*, GLuint*) wglQueryMaxSwapGroupsNV; BOOL function(HDC, GLuint*, GLuint*) wglQuerySwapGroupNV; BOOL function(HDC) wglResetFrameCountNV; // WGL_NV_vertex_array_range void* function(GLsizei, GLfloat, GLfloat, GLfloat) wglAllocateMemoryNV; void function(void*) wglFreeMemoryNV; // WGL_NV_video_output BOOL function(HPVIDEODEV, HPBUFFERARB, int) wglBindVideoImageNV; BOOL function(HDC, int, HPVIDEODEV*) wglGetVideoDeviceNV; BOOL function(HPVIDEODEV, uint*, uint*) wglGetVideoInfoNV; BOOL function(HPVIDEODEV) wglReleaseVideoDeviceNV; BOOL function(HPBUFFERARB, int) wglReleaseVideoImageNV; BOOL function(HPBUFFERARB, int, uint*, BOOL) wglSendPbufferToVideoNV; } version(DerelictGL_AMD) { // WGL_AMD_gpu_association void function(HGLRC, GLint, GLint, GLint, GLint, GLint, GLint, GLint, GLint, GLbitfield, GLenum) wglBlitContextFramebufferAMD; HGLRC function(UINT) wglCreateAssociatedContextAMD; HGLRC function(UINT, HGLRC, in int*) wglCreateAssociatedContextAttribsAMD; BOOL function(HGLRC) wglDeleteAssociatedContextAMD; UINT function(HGLRC) wglGetContextGPUIDAMD; HGLRC function() wglGetCurrentAssociatedContextAMD; UINT function(UINT, UINT*) wglGetGPUIDsAMD; INT function(UINT, INT, GLenum, UINT, void*) wglGetGPUInfoAMD; BOOL function(HGLRC) wglMakeAssociatedContextCurrentAMD; } version(DerelictGL_I3D) { // WGL_I3D_digital_video_control BOOL function(HDC, int, int*) wglGetDigitalVideoParametersI3D; BOOL function(HDC, int, in int*) wglSetDigitalVideoParametersI3D; // WGL_I3D_gamma BOOL function(HDC, int, USHORT*, USHORT*, USHORT*) wglGetGammaTableI3D; BOOL function(HDC, int, int*) wglGetGammaTableParametersI3D; BOOL function(HDC, int, in USHORT*, in USHORT*, in USHORT*) wglSetGammaTableI3D; BOOL function(HDC, int, in int*) wglSetGammaTableParametersI3D; // WGL_I3D_genlock BOOL function(HDC) wglDisableGenlockI3D; BOOL function(HDC) wglEnableGenlockI3D; BOOL function(HDC, UINT) wglGenlockSampleRateI3D; BOOL function(HDC, UINT) wglGenlockSourceDelayI3D; BOOL function(HDC, UINT) wglGenlockSourceEdgeI3D; BOOL function(HDC, UINT) wglGenlockSourceI3D; BOOL function(HDC, UINT*) wglGetGenlockSampleRateI3D; BOOL function(HDC, UINT*) wglGetGenlockSourceDelayI3D; BOOL function(HDC, UINT*) wglGetGenlockSourceEdgeI3D; BOOL function(HDC, UINT*) wglGetGenlockSourceI3D; BOOL function(HDC, BOOL*) wglIsEnabledGenlockI3D; BOOL function(HDC, UINT*, UINT*) wglQueryGenlockMaxSourceDelayI3D; // WGL_I3D_image_buffer BOOL function(HDC, HANDLE*, LPVOID*, DWORD*, UINT) wglAssociateImageBufferEventsI3D; LPVOID function(HDC, DWORD, UINT) wglCreateImageBufferI3D; BOOL function(HDC, LPVOID) wglDestroyImageBufferI3D; BOOL function(HDC, LPVOID*, UINT) wglReleaseImageBufferEventsI3D; // WGL_I3D_swap_frame_lock BOOL function() wglDisableFrameLockI3D; BOOL function() wglEnableFrameLockI3D; BOOL function(BOOL*) wglIsEnabledFrameLockI3D; BOOL function(BOOL*) wglQueryFrameLockMasterI3D; // WGL_I3D_swap_frame_usage BOOL function() wglBeginFrameTrackingI3D; BOOL function() wglEndFrameTrackingI3D; BOOL function(float*) wglGetFrameUsageI3D; BOOL function(DWORD*, DWORD*, float*) wglQueryFrameTrackingI3D; } version(DerelictGL_OML) { // WGL_OML_sync_control BOOL function(HDC, int*, int*) wglGetMscRateOML; BOOL function(HDC, long*, long*, long*) wglGetSyncValuesOML; long function(HDC, long, long, long) wglSwapBuffersMscOML; long function(HDC, int, long, long, long) wglSwapLayerBuffersMscOML; BOOL function(HDC, long, long, long, long*, long*, long*) wglWaitForMscOML; BOOL function(HDC, long, long*, long*, long*) wglWaitForSbcOML; } version(DerelictGL_3DL) { // WGL_3DL_stereo_control BOOL function(HDC, UINT) wglSetStereoEmitterState3DL; } } "); }
D
an Asian republic in the Middle East at the east end of the Mediterranean
D
import interrupt; import node; import enfilade; import trans; import cell; import doc; import std.string; import enfs; void register_driver(Enfs n, uint irq, Enfilade handler, Enfilade deviceOut) { set_idt(n, handler, irq); XuDoc doc; doc.doc.doc="__OUT"; XuDoc doc2; doc2.doc.doc=toString(irq); doc2.links[1].back.start=deviceOut; doc2.links[1].back.end=deviceOut; doc2.links[1].back.vstart=0; doc2.links[1].back.vend=5; n.add(doc2, deviceOut~1); doc.links[1].forward.start=deviceOut~1; doc.links[1].forward.end=deviceOut~1; doc.links[1].forward.vstart=0; doc.links[1].forward.vend=50; n.add(doc, deviceOut); }
D
an instance of visual perception anything that is seen the ability to see a range of mental vision the range of vision the act of looking or seeing or observing (often followed by `of') a large number or amount or extent catch sight of take aim by looking through the sights of a gun (or other device)
D
/Users/mu/Hello/.build/x86_64-apple-macosx/debug/NIO.build/ByteBuffer-aux.swift.o : /Users/mu/Hello/.build/checkouts/swift-nio/Sources/NIO/IO.swift /Users/mu/Hello/.build/checkouts/swift-nio/Sources/NIO/NonBlockingFileIO.swift /Users/mu/Hello/.build/checkouts/swift-nio/Sources/NIO/IOData.swift /Users/mu/Hello/.build/checkouts/swift-nio/Sources/NIO/Codec.swift /Users/mu/Hello/.build/checkouts/swift-nio/Sources/NIO/Thread.swift /Users/mu/Hello/.build/checkouts/swift-nio/Sources/NIO/Embedded.swift /Users/mu/Hello/.build/checkouts/swift-nio/Sources/NIO/Selectable.swift /Users/mu/Hello/.build/checkouts/swift-nio/Sources/NIO/FileHandle.swift /Users/mu/Hello/.build/checkouts/swift-nio/Sources/NIO/ChannelPipeline.swift /Users/mu/Hello/.build/checkouts/swift-nio/Sources/NIO/AddressedEnvelope.swift /Users/mu/Hello/.build/checkouts/swift-nio/Sources/NIO/ByteBuffer-core.swift /Users/mu/Hello/.build/checkouts/swift-nio/Sources/NIO/EventLoopFuture.swift /Users/mu/Hello/.build/checkouts/swift-nio/Sources/NIO/PriorityQueue.swift /Users/mu/Hello/.build/checkouts/swift-nio/Sources/NIO/Channel.swift /Users/mu/Hello/.build/checkouts/swift-nio/Sources/NIO/DeadChannel.swift /Users/mu/Hello/.build/checkouts/swift-nio/Sources/NIO/SocketChannel.swift /Users/mu/Hello/.build/checkouts/swift-nio/Sources/NIO/BaseSocketChannel.swift /Users/mu/Hello/.build/checkouts/swift-nio/Sources/NIO/MulticastChannel.swift /Users/mu/Hello/.build/checkouts/swift-nio/Sources/NIO/BlockingIOThreadPool.swift /Users/mu/Hello/.build/checkouts/swift-nio/Sources/NIO/System.swift /Users/mu/Hello/.build/checkouts/swift-nio/Sources/NIO/FileRegion.swift /Users/mu/Hello/.build/checkouts/swift-nio/Sources/NIO/ContiguousCollection.swift /Users/mu/Hello/.build/checkouts/swift-nio/Sources/NIO/ChannelOption.swift /Users/mu/Hello/.build/checkouts/swift-nio/Sources/NIO/Heap.swift /Users/mu/Hello/.build/checkouts/swift-nio/Sources/NIO/Bootstrap.swift /Users/mu/Hello/.build/checkouts/swift-nio/Sources/NIO/EventLoop.swift /Users/mu/Hello/.build/checkouts/swift-nio/Sources/NIO/SocketOptionProvider.swift /Users/mu/Hello/.build/checkouts/swift-nio/Sources/NIO/CircularBuffer.swift /Users/mu/Hello/.build/checkouts/swift-nio/Sources/NIO/MarkedCircularBuffer.swift /Users/mu/Hello/.build/checkouts/swift-nio/Sources/NIO/PendingWritesManager.swift /Users/mu/Hello/.build/checkouts/swift-nio/Sources/NIO/PendingDatagramWritesManager.swift /Users/mu/Hello/.build/checkouts/swift-nio/Sources/NIO/ChannelInvoker.swift /Users/mu/Hello/.build/checkouts/swift-nio/Sources/NIO/ChannelHandler.swift /Users/mu/Hello/.build/checkouts/swift-nio/Sources/NIO/TypeAssistedChannelHandler.swift /Users/mu/Hello/.build/checkouts/swift-nio/Sources/NIO/Resolver.swift /Users/mu/Hello/.build/checkouts/swift-nio/Sources/NIO/GetaddrinfoResolver.swift /Users/mu/Hello/.build/checkouts/swift-nio/Sources/NIO/CompositeError.swift /Users/mu/Hello/.build/checkouts/swift-nio/Sources/NIO/RecvByteBufferAllocator.swift /Users/mu/Hello/.build/checkouts/swift-nio/Sources/NIO/Selector.swift /Users/mu/Hello/.build/checkouts/swift-nio/Sources/NIO/FileDescriptor.swift /Users/mu/Hello/.build/checkouts/swift-nio/Sources/NIO/Interfaces.swift /Users/mu/Hello/.build/checkouts/swift-nio/Sources/NIO/Utilities.swift /Users/mu/Hello/.build/checkouts/swift-nio/Sources/NIO/IntegerTypes.swift /Users/mu/Hello/.build/checkouts/swift-nio/Sources/NIO/SocketAddresses.swift /Users/mu/Hello/.build/checkouts/swift-nio/Sources/NIO/HappyEyeballs.swift /Users/mu/Hello/.build/checkouts/swift-nio/Sources/NIO/ChannelHandlers.swift /Users/mu/Hello/.build/checkouts/swift-nio/Sources/NIO/ByteBuffer-views.swift /Users/mu/Hello/.build/checkouts/swift-nio/Sources/NIO/LinuxCPUSet.swift /Users/mu/Hello/.build/checkouts/swift-nio/Sources/NIO/Socket.swift /Users/mu/Hello/.build/checkouts/swift-nio/Sources/NIO/BaseSocket.swift /Users/mu/Hello/.build/checkouts/swift-nio/Sources/NIO/ServerSocket.swift /Users/mu/Hello/.build/checkouts/swift-nio/Sources/NIO/ByteBuffer-int.swift /Users/mu/Hello/.build/checkouts/swift-nio/Sources/NIO/ByteBuffer-aux.swift /Users/mu/Hello/.build/checkouts/swift-nio/Sources/NIO/Linux.swift /Users/mu/Hello/.build/checkouts/swift-nio/Sources/NIO/NIOAny.swift /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 /Users/mu/Hello/.build/x86_64-apple-macosx/debug/NIOConcurrencyHelpers.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/SwiftOnoneSupport.swiftmodule /Users/mu/Hello/.build/checkouts/swift-nio/Sources/CNIOAtomics/include/cpp_magic.h /Users/mu/Hello/.build/checkouts/swift-nio/Sources/CNIOLinux/include/ifaddrs-android.h /Users/mu/Hello/.build/checkouts/swift-nio/Sources/CNIODarwin/include/CNIODarwin.h /Users/mu/Hello/.build/checkouts/swift-nio/Sources/CNIOAtomics/include/CNIOAtomics.h /Users/mu/Hello/.build/checkouts/swift-nio/Sources/CNIOLinux/include/CNIOLinux.h /Users/mu/Hello/.build/x86_64-apple-macosx/debug/CNIOSHA1.build/module.modulemap /Users/mu/Hello/.build/x86_64-apple-macosx/debug/CNIOOpenSSL.build/module.modulemap /Users/mu/Hello/.build/x86_64-apple-macosx/debug/CCryptoOpenSSL.build/module.modulemap /Users/mu/Hello/.build/x86_64-apple-macosx/debug/CNIOZlib.build/module.modulemap /Users/mu/Hello/.build/x86_64-apple-macosx/debug/CNIODarwin.build/module.modulemap /Users/mu/Hello/.build/x86_64-apple-macosx/debug/CNIOHTTPParser.build/module.modulemap /Users/mu/Hello/.build/x86_64-apple-macosx/debug/CNIOAtomics.build/module.modulemap /Users/mu/Hello/.build/x86_64-apple-macosx/debug/CNIOLinux.build/module.modulemap /Users/mu/Hello/.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 /Users/mu/Hello/.build/x86_64-apple-macosx/debug/NIO.build/ByteBuffer-aux~partial.swiftmodule : /Users/mu/Hello/.build/checkouts/swift-nio/Sources/NIO/IO.swift /Users/mu/Hello/.build/checkouts/swift-nio/Sources/NIO/NonBlockingFileIO.swift /Users/mu/Hello/.build/checkouts/swift-nio/Sources/NIO/IOData.swift /Users/mu/Hello/.build/checkouts/swift-nio/Sources/NIO/Codec.swift /Users/mu/Hello/.build/checkouts/swift-nio/Sources/NIO/Thread.swift /Users/mu/Hello/.build/checkouts/swift-nio/Sources/NIO/Embedded.swift /Users/mu/Hello/.build/checkouts/swift-nio/Sources/NIO/Selectable.swift /Users/mu/Hello/.build/checkouts/swift-nio/Sources/NIO/FileHandle.swift /Users/mu/Hello/.build/checkouts/swift-nio/Sources/NIO/ChannelPipeline.swift /Users/mu/Hello/.build/checkouts/swift-nio/Sources/NIO/AddressedEnvelope.swift /Users/mu/Hello/.build/checkouts/swift-nio/Sources/NIO/ByteBuffer-core.swift /Users/mu/Hello/.build/checkouts/swift-nio/Sources/NIO/EventLoopFuture.swift /Users/mu/Hello/.build/checkouts/swift-nio/Sources/NIO/PriorityQueue.swift /Users/mu/Hello/.build/checkouts/swift-nio/Sources/NIO/Channel.swift /Users/mu/Hello/.build/checkouts/swift-nio/Sources/NIO/DeadChannel.swift /Users/mu/Hello/.build/checkouts/swift-nio/Sources/NIO/SocketChannel.swift /Users/mu/Hello/.build/checkouts/swift-nio/Sources/NIO/BaseSocketChannel.swift /Users/mu/Hello/.build/checkouts/swift-nio/Sources/NIO/MulticastChannel.swift /Users/mu/Hello/.build/checkouts/swift-nio/Sources/NIO/BlockingIOThreadPool.swift /Users/mu/Hello/.build/checkouts/swift-nio/Sources/NIO/System.swift /Users/mu/Hello/.build/checkouts/swift-nio/Sources/NIO/FileRegion.swift /Users/mu/Hello/.build/checkouts/swift-nio/Sources/NIO/ContiguousCollection.swift /Users/mu/Hello/.build/checkouts/swift-nio/Sources/NIO/ChannelOption.swift /Users/mu/Hello/.build/checkouts/swift-nio/Sources/NIO/Heap.swift /Users/mu/Hello/.build/checkouts/swift-nio/Sources/NIO/Bootstrap.swift /Users/mu/Hello/.build/checkouts/swift-nio/Sources/NIO/EventLoop.swift /Users/mu/Hello/.build/checkouts/swift-nio/Sources/NIO/SocketOptionProvider.swift /Users/mu/Hello/.build/checkouts/swift-nio/Sources/NIO/CircularBuffer.swift /Users/mu/Hello/.build/checkouts/swift-nio/Sources/NIO/MarkedCircularBuffer.swift /Users/mu/Hello/.build/checkouts/swift-nio/Sources/NIO/PendingWritesManager.swift /Users/mu/Hello/.build/checkouts/swift-nio/Sources/NIO/PendingDatagramWritesManager.swift /Users/mu/Hello/.build/checkouts/swift-nio/Sources/NIO/ChannelInvoker.swift /Users/mu/Hello/.build/checkouts/swift-nio/Sources/NIO/ChannelHandler.swift /Users/mu/Hello/.build/checkouts/swift-nio/Sources/NIO/TypeAssistedChannelHandler.swift /Users/mu/Hello/.build/checkouts/swift-nio/Sources/NIO/Resolver.swift /Users/mu/Hello/.build/checkouts/swift-nio/Sources/NIO/GetaddrinfoResolver.swift /Users/mu/Hello/.build/checkouts/swift-nio/Sources/NIO/CompositeError.swift /Users/mu/Hello/.build/checkouts/swift-nio/Sources/NIO/RecvByteBufferAllocator.swift /Users/mu/Hello/.build/checkouts/swift-nio/Sources/NIO/Selector.swift /Users/mu/Hello/.build/checkouts/swift-nio/Sources/NIO/FileDescriptor.swift /Users/mu/Hello/.build/checkouts/swift-nio/Sources/NIO/Interfaces.swift /Users/mu/Hello/.build/checkouts/swift-nio/Sources/NIO/Utilities.swift /Users/mu/Hello/.build/checkouts/swift-nio/Sources/NIO/IntegerTypes.swift /Users/mu/Hello/.build/checkouts/swift-nio/Sources/NIO/SocketAddresses.swift /Users/mu/Hello/.build/checkouts/swift-nio/Sources/NIO/HappyEyeballs.swift /Users/mu/Hello/.build/checkouts/swift-nio/Sources/NIO/ChannelHandlers.swift /Users/mu/Hello/.build/checkouts/swift-nio/Sources/NIO/ByteBuffer-views.swift /Users/mu/Hello/.build/checkouts/swift-nio/Sources/NIO/LinuxCPUSet.swift /Users/mu/Hello/.build/checkouts/swift-nio/Sources/NIO/Socket.swift /Users/mu/Hello/.build/checkouts/swift-nio/Sources/NIO/BaseSocket.swift /Users/mu/Hello/.build/checkouts/swift-nio/Sources/NIO/ServerSocket.swift /Users/mu/Hello/.build/checkouts/swift-nio/Sources/NIO/ByteBuffer-int.swift /Users/mu/Hello/.build/checkouts/swift-nio/Sources/NIO/ByteBuffer-aux.swift /Users/mu/Hello/.build/checkouts/swift-nio/Sources/NIO/Linux.swift /Users/mu/Hello/.build/checkouts/swift-nio/Sources/NIO/NIOAny.swift /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 /Users/mu/Hello/.build/x86_64-apple-macosx/debug/NIOConcurrencyHelpers.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/SwiftOnoneSupport.swiftmodule /Users/mu/Hello/.build/checkouts/swift-nio/Sources/CNIOAtomics/include/cpp_magic.h /Users/mu/Hello/.build/checkouts/swift-nio/Sources/CNIOLinux/include/ifaddrs-android.h /Users/mu/Hello/.build/checkouts/swift-nio/Sources/CNIODarwin/include/CNIODarwin.h /Users/mu/Hello/.build/checkouts/swift-nio/Sources/CNIOAtomics/include/CNIOAtomics.h /Users/mu/Hello/.build/checkouts/swift-nio/Sources/CNIOLinux/include/CNIOLinux.h /Users/mu/Hello/.build/x86_64-apple-macosx/debug/CNIOSHA1.build/module.modulemap /Users/mu/Hello/.build/x86_64-apple-macosx/debug/CNIOOpenSSL.build/module.modulemap /Users/mu/Hello/.build/x86_64-apple-macosx/debug/CCryptoOpenSSL.build/module.modulemap /Users/mu/Hello/.build/x86_64-apple-macosx/debug/CNIOZlib.build/module.modulemap /Users/mu/Hello/.build/x86_64-apple-macosx/debug/CNIODarwin.build/module.modulemap /Users/mu/Hello/.build/x86_64-apple-macosx/debug/CNIOHTTPParser.build/module.modulemap /Users/mu/Hello/.build/x86_64-apple-macosx/debug/CNIOAtomics.build/module.modulemap /Users/mu/Hello/.build/x86_64-apple-macosx/debug/CNIOLinux.build/module.modulemap /Users/mu/Hello/.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 /Users/mu/Hello/.build/x86_64-apple-macosx/debug/NIO.build/ByteBuffer-aux~partial.swiftdoc : /Users/mu/Hello/.build/checkouts/swift-nio/Sources/NIO/IO.swift /Users/mu/Hello/.build/checkouts/swift-nio/Sources/NIO/NonBlockingFileIO.swift /Users/mu/Hello/.build/checkouts/swift-nio/Sources/NIO/IOData.swift /Users/mu/Hello/.build/checkouts/swift-nio/Sources/NIO/Codec.swift /Users/mu/Hello/.build/checkouts/swift-nio/Sources/NIO/Thread.swift /Users/mu/Hello/.build/checkouts/swift-nio/Sources/NIO/Embedded.swift /Users/mu/Hello/.build/checkouts/swift-nio/Sources/NIO/Selectable.swift /Users/mu/Hello/.build/checkouts/swift-nio/Sources/NIO/FileHandle.swift /Users/mu/Hello/.build/checkouts/swift-nio/Sources/NIO/ChannelPipeline.swift /Users/mu/Hello/.build/checkouts/swift-nio/Sources/NIO/AddressedEnvelope.swift /Users/mu/Hello/.build/checkouts/swift-nio/Sources/NIO/ByteBuffer-core.swift /Users/mu/Hello/.build/checkouts/swift-nio/Sources/NIO/EventLoopFuture.swift /Users/mu/Hello/.build/checkouts/swift-nio/Sources/NIO/PriorityQueue.swift /Users/mu/Hello/.build/checkouts/swift-nio/Sources/NIO/Channel.swift /Users/mu/Hello/.build/checkouts/swift-nio/Sources/NIO/DeadChannel.swift /Users/mu/Hello/.build/checkouts/swift-nio/Sources/NIO/SocketChannel.swift /Users/mu/Hello/.build/checkouts/swift-nio/Sources/NIO/BaseSocketChannel.swift /Users/mu/Hello/.build/checkouts/swift-nio/Sources/NIO/MulticastChannel.swift /Users/mu/Hello/.build/checkouts/swift-nio/Sources/NIO/BlockingIOThreadPool.swift /Users/mu/Hello/.build/checkouts/swift-nio/Sources/NIO/System.swift /Users/mu/Hello/.build/checkouts/swift-nio/Sources/NIO/FileRegion.swift /Users/mu/Hello/.build/checkouts/swift-nio/Sources/NIO/ContiguousCollection.swift /Users/mu/Hello/.build/checkouts/swift-nio/Sources/NIO/ChannelOption.swift /Users/mu/Hello/.build/checkouts/swift-nio/Sources/NIO/Heap.swift /Users/mu/Hello/.build/checkouts/swift-nio/Sources/NIO/Bootstrap.swift /Users/mu/Hello/.build/checkouts/swift-nio/Sources/NIO/EventLoop.swift /Users/mu/Hello/.build/checkouts/swift-nio/Sources/NIO/SocketOptionProvider.swift /Users/mu/Hello/.build/checkouts/swift-nio/Sources/NIO/CircularBuffer.swift /Users/mu/Hello/.build/checkouts/swift-nio/Sources/NIO/MarkedCircularBuffer.swift /Users/mu/Hello/.build/checkouts/swift-nio/Sources/NIO/PendingWritesManager.swift /Users/mu/Hello/.build/checkouts/swift-nio/Sources/NIO/PendingDatagramWritesManager.swift /Users/mu/Hello/.build/checkouts/swift-nio/Sources/NIO/ChannelInvoker.swift /Users/mu/Hello/.build/checkouts/swift-nio/Sources/NIO/ChannelHandler.swift /Users/mu/Hello/.build/checkouts/swift-nio/Sources/NIO/TypeAssistedChannelHandler.swift /Users/mu/Hello/.build/checkouts/swift-nio/Sources/NIO/Resolver.swift /Users/mu/Hello/.build/checkouts/swift-nio/Sources/NIO/GetaddrinfoResolver.swift /Users/mu/Hello/.build/checkouts/swift-nio/Sources/NIO/CompositeError.swift /Users/mu/Hello/.build/checkouts/swift-nio/Sources/NIO/RecvByteBufferAllocator.swift /Users/mu/Hello/.build/checkouts/swift-nio/Sources/NIO/Selector.swift /Users/mu/Hello/.build/checkouts/swift-nio/Sources/NIO/FileDescriptor.swift /Users/mu/Hello/.build/checkouts/swift-nio/Sources/NIO/Interfaces.swift /Users/mu/Hello/.build/checkouts/swift-nio/Sources/NIO/Utilities.swift /Users/mu/Hello/.build/checkouts/swift-nio/Sources/NIO/IntegerTypes.swift /Users/mu/Hello/.build/checkouts/swift-nio/Sources/NIO/SocketAddresses.swift /Users/mu/Hello/.build/checkouts/swift-nio/Sources/NIO/HappyEyeballs.swift /Users/mu/Hello/.build/checkouts/swift-nio/Sources/NIO/ChannelHandlers.swift /Users/mu/Hello/.build/checkouts/swift-nio/Sources/NIO/ByteBuffer-views.swift /Users/mu/Hello/.build/checkouts/swift-nio/Sources/NIO/LinuxCPUSet.swift /Users/mu/Hello/.build/checkouts/swift-nio/Sources/NIO/Socket.swift /Users/mu/Hello/.build/checkouts/swift-nio/Sources/NIO/BaseSocket.swift /Users/mu/Hello/.build/checkouts/swift-nio/Sources/NIO/ServerSocket.swift /Users/mu/Hello/.build/checkouts/swift-nio/Sources/NIO/ByteBuffer-int.swift /Users/mu/Hello/.build/checkouts/swift-nio/Sources/NIO/ByteBuffer-aux.swift /Users/mu/Hello/.build/checkouts/swift-nio/Sources/NIO/Linux.swift /Users/mu/Hello/.build/checkouts/swift-nio/Sources/NIO/NIOAny.swift /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 /Users/mu/Hello/.build/x86_64-apple-macosx/debug/NIOConcurrencyHelpers.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/SwiftOnoneSupport.swiftmodule /Users/mu/Hello/.build/checkouts/swift-nio/Sources/CNIOAtomics/include/cpp_magic.h /Users/mu/Hello/.build/checkouts/swift-nio/Sources/CNIOLinux/include/ifaddrs-android.h /Users/mu/Hello/.build/checkouts/swift-nio/Sources/CNIODarwin/include/CNIODarwin.h /Users/mu/Hello/.build/checkouts/swift-nio/Sources/CNIOAtomics/include/CNIOAtomics.h /Users/mu/Hello/.build/checkouts/swift-nio/Sources/CNIOLinux/include/CNIOLinux.h /Users/mu/Hello/.build/x86_64-apple-macosx/debug/CNIOSHA1.build/module.modulemap /Users/mu/Hello/.build/x86_64-apple-macosx/debug/CNIOOpenSSL.build/module.modulemap /Users/mu/Hello/.build/x86_64-apple-macosx/debug/CCryptoOpenSSL.build/module.modulemap /Users/mu/Hello/.build/x86_64-apple-macosx/debug/CNIOZlib.build/module.modulemap /Users/mu/Hello/.build/x86_64-apple-macosx/debug/CNIODarwin.build/module.modulemap /Users/mu/Hello/.build/x86_64-apple-macosx/debug/CNIOHTTPParser.build/module.modulemap /Users/mu/Hello/.build/x86_64-apple-macosx/debug/CNIOAtomics.build/module.modulemap /Users/mu/Hello/.build/x86_64-apple-macosx/debug/CNIOLinux.build/module.modulemap /Users/mu/Hello/.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
D
/* This file is part of BioD. Copyright (C) 2012-2014 Artem Tarasov <lomereiter@gmail.com> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 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 AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ module bio.bam.region; /// struct BamRegion { uint ref_id; /// Reference ID in the BAM file uint start; /// 0-based leftmost coordinate (included) uint end; /// 0-based rightmost coordinate (excluded) int opCmp(const ref BamRegion other) const nothrow { if (this.ref_id > other.ref_id) { return 1; } if (this.ref_id < other.ref_id) { return -1; } if (this.start > other.start) { return 1; } if (this.start < other.start) { return -1; } if (this.end > other.end) { return 1; } if (this.end < other.end) { return -1; } return 0; } }
D
/* * Copyright 2012 The Netty Project * * The Netty Project licenses this file to you under the Apache License, * version 2.0 (the "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at: * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations * under the License. */ module hunt.net.buffer.CompositeByteBuf; import hunt.net.buffer.AbstractByteBuf; import hunt.net.buffer.AbstractByteBufAllocator; import hunt.net.buffer.AbstractReferenceCountedByteBuf; import hunt.net.buffer.AbstractUnpooledSlicedByteBuf; import hunt.net.buffer.ByteBuf; import hunt.net.buffer.ByteBufAllocator; import hunt.net.buffer.ByteBufUtil; import hunt.net.buffer.ByteProcessor; import hunt.net.buffer.ReferenceCountUtil; import hunt.net.buffer.Unpooled; import hunt.Byte; import hunt.collection.ByteBuffer; import hunt.collection.BufferUtils; import hunt.collection.Collections; import hunt.collection.ArrayList; import hunt.collection.List; import hunt.Double; import hunt.Exceptions; import hunt.Float; import hunt.logging.ConsoleLogger; import hunt.net.Exceptions; import hunt.io.Common; import hunt.text.StringBuilder; import hunt.util.Common; import std.algorithm; import std.conv; import std.format; import std.concurrency : initOnce; import std.range; // import io.netty.util.ByteProcessor; // import io.netty.util.IllegalReferenceCountException; // import io.netty.util.ReferenceCountUtil; // import io.netty.util.internal.EmptyArrays; // import io.netty.util.internal.RecyclableArrayList; // import java.io.IOException; // import java.io.InputStream; // import java.io.OutputStream; // import java.nio.ByteBuffer; // import java.nio.ByteOrder; // import java.nio.channels.FileChannel; // import java.nio.channels.GatheringByteChannel; // import java.nio.channels.ScatteringByteChannel; // import java.util.ArrayList; // import java.util.Arrays; // import java.util.Collection; // import java.util.Collections; // import java.util.ConcurrentModificationException; // import java.util.Iterator; // import java.util.List; // import java.util.NoSuchElementException; // import static io.netty.util.internal.ObjectUtil.checkNotNull; /** * A virtual buffer which shows multiple buffers as a single merged buffer. It is recommended to use * {@link ByteBufAllocator#compositeBuffer()} or {@link Unpooled#wrappedBuffer(ByteBuf...)} instead of calling the * constructor explicitly. */ class CompositeByteBuf : AbstractReferenceCountedByteBuf, Iterable!(ByteBuf) { private static ByteBuffer EMPTY_NIO_BUFFER() { __gshared ByteBuffer inst; return initOnce!inst(Unpooled.EMPTY_BUFFER.nioBuffer()); } // private static final Iterator!(ByteBuf) EMPTY_ITERATOR = Collections.<ByteBuf>emptyList().iterator(); private ByteBufAllocator _alloc; private bool direct; private int _maxNumComponents; private int componentCount; private Component[] components; // resized when needed private bool freed; private this(ByteBufAllocator alloc, bool direct, int maxNumComponents, int initSize) { super(AbstractByteBufAllocator.DEFAULT_MAX_CAPACITY); if (alloc is null) { throw new NullPointerException("alloc"); } if (maxNumComponents < 1) { throw new IllegalArgumentException( "maxNumComponents: " ~ maxNumComponents.to!string() ~ " (expected: >= 1)"); } this._alloc = alloc; this.direct = direct; this._maxNumComponents = maxNumComponents; components = newCompArray(initSize, maxNumComponents); } this(ByteBufAllocator alloc, bool direct, int maxNumComponents) { this(alloc, direct, maxNumComponents, 0); } this(ByteBufAllocator alloc, bool direct, int maxNumComponents, ByteBuf[] buffers...) { this(alloc, direct, maxNumComponents, buffers, 0); } this(ByteBufAllocator alloc, bool direct, int maxNumComponents, ByteBuf[] buffers, int offset) { this(alloc, direct, maxNumComponents, cast(int)buffers.length - offset); addComponents0(false, 0, buffers, offset); consolidateIfNeeded(); setIndex0(0, capacity()); } // this(ByteBufAllocator alloc, bool direct, int maxNumComponents, Iterable!(ByteBuf) buffers) { // this(alloc, direct, maxNumComponents, // buffers instanceof Collection ? ((Collection!(ByteBuf)) buffers).size() : 0); // addComponents(false, 0, buffers); // setIndex(0, capacity()); // } static ByteWrapper!(byte[]) BYTE_ARRAY_WRAPPER() { __gshared ByteWrapper!(byte[]) inst; return initOnce!inst(createByteWrapper()); } private static ByteWrapper!(byte[]) createByteWrapper() { return new class ByteWrapper!(byte[]) { override ByteBuf wrap(byte[] bytes) { return Unpooled.wrappedBuffer(bytes); } override bool isEmpty(byte[] bytes) { return bytes.length == 0; } }; } static final ByteWrapper!(ByteBuffer) BYTE_BUFFER_WRAPPER() { __gshared ByteWrapper!(ByteBuffer) inst; return initOnce!inst(createByteBufferWrapper()); } private static ByteWrapper!(ByteBuffer) createByteBufferWrapper() { return new class ByteWrapper!(ByteBuffer) { override ByteBuf wrap(ByteBuffer bytes) { return Unpooled.wrappedBuffer(bytes); } override bool isEmpty(ByteBuffer bytes) { return !bytes.hasRemaining(); } }; } this(T)(ByteBufAllocator alloc, bool direct, int maxNumComponents, ByteWrapper!(T) wrapper, T[] buffers, int offset) { this(alloc, direct, maxNumComponents, cast(int)buffers.length - offset); addComponents0(false, 0, wrapper, buffers, offset); consolidateIfNeeded(); setIndex(0, capacity()); } private static Component[] newCompArray(int initComponents, int maxNumComponents) { int capacityGuess = min(AbstractByteBufAllocator.DEFAULT_MAX_COMPONENTS, maxNumComponents); return new Component[max(initComponents, capacityGuess)]; } // Special constructor used by WrappedCompositeByteBuf this(ByteBufAllocator alloc) { super(int.max); this._alloc = alloc; direct = false; _maxNumComponents = 0; components = null; } /** * Add the given {@link ByteBuf}. * <p> * Be aware that this method does not increase the {@code writerIndex} of the {@link CompositeByteBuf}. * If you need to have it increased use {@link #addComponent(bool, ByteBuf)}. * <p> * {@link ByteBuf#release()} ownership of {@code buffer} is transferred to this {@link CompositeByteBuf}. * @param buffer the {@link ByteBuf} to add. {@link ByteBuf#release()} ownership is transferred to this * {@link CompositeByteBuf}. */ CompositeByteBuf addComponent(ByteBuf buffer) { return addComponent(false, buffer); } /** * Add the given {@link ByteBuf}s. * <p> * Be aware that this method does not increase the {@code writerIndex} of the {@link CompositeByteBuf}. * If you need to have it increased use {@link #addComponents(bool, ByteBuf[])}. * <p> * {@link ByteBuf#release()} ownership of all {@link ByteBuf} objects in {@code buffers} is transferred to this * {@link CompositeByteBuf}. * @param buffers the {@link ByteBuf}s to add. {@link ByteBuf#release()} ownership of all {@link ByteBuf#release()} * ownership of all {@link ByteBuf} objects is transferred to this {@link CompositeByteBuf}. */ CompositeByteBuf addComponents(ByteBuf[] buffers...) { return addComponents(false, buffers); } /** * Add the given {@link ByteBuf}s. * <p> * Be aware that this method does not increase the {@code writerIndex} of the {@link CompositeByteBuf}. * If you need to have it increased use {@link #addComponents(bool, Iterable)}. * <p> * {@link ByteBuf#release()} ownership of all {@link ByteBuf} objects in {@code buffers} is transferred to this * {@link CompositeByteBuf}. * @param buffers the {@link ByteBuf}s to add. {@link ByteBuf#release()} ownership of all {@link ByteBuf#release()} * ownership of all {@link ByteBuf} objects is transferred to this {@link CompositeByteBuf}. */ CompositeByteBuf addComponents(Iterable!(ByteBuf) buffers) { return addComponents(false, buffers); } /** * Add the given {@link ByteBuf} on the specific index. * <p> * Be aware that this method does not increase the {@code writerIndex} of the {@link CompositeByteBuf}. * If you need to have it increased use {@link #addComponent(bool, int, ByteBuf)}. * <p> * {@link ByteBuf#release()} ownership of {@code buffer} is transferred to this {@link CompositeByteBuf}. * @param cIndex the index on which the {@link ByteBuf} will be added. * @param buffer the {@link ByteBuf} to add. {@link ByteBuf#release()} ownership is transferred to this * {@link CompositeByteBuf}. */ CompositeByteBuf addComponent(int cIndex, ByteBuf buffer) { return addComponent(false, cIndex, buffer); } /** * Add the given {@link ByteBuf} and increase the {@code writerIndex} if {@code increaseWriterIndex} is * {@code true}. * * {@link ByteBuf#release()} ownership of {@code buffer} is transferred to this {@link CompositeByteBuf}. * @param buffer the {@link ByteBuf} to add. {@link ByteBuf#release()} ownership is transferred to this * {@link CompositeByteBuf}. */ CompositeByteBuf addComponent(bool increaseWriterIndex, ByteBuf buffer) { return addComponent(increaseWriterIndex, componentCount, buffer); } /** * Add the given {@link ByteBuf}s and increase the {@code writerIndex} if {@code increaseWriterIndex} is * {@code true}. * * {@link ByteBuf#release()} ownership of all {@link ByteBuf} objects in {@code buffers} is transferred to this * {@link CompositeByteBuf}. * @param buffers the {@link ByteBuf}s to add. {@link ByteBuf#release()} ownership of all {@link ByteBuf#release()} * ownership of all {@link ByteBuf} objects is transferred to this {@link CompositeByteBuf}. */ CompositeByteBuf addComponents(bool increaseWriterIndex, ByteBuf[] buffers...) { checkNotNull(buffers, "buffers"); addComponents0(increaseWriterIndex, componentCount, buffers, 0); consolidateIfNeeded(); return this; } /** * Add the given {@link ByteBuf}s and increase the {@code writerIndex} if {@code increaseWriterIndex} is * {@code true}. * * {@link ByteBuf#release()} ownership of all {@link ByteBuf} objects in {@code buffers} is transferred to this * {@link CompositeByteBuf}. * @param buffers the {@link ByteBuf}s to add. {@link ByteBuf#release()} ownership of all {@link ByteBuf#release()} * ownership of all {@link ByteBuf} objects is transferred to this {@link CompositeByteBuf}. */ CompositeByteBuf addComponents(bool increaseWriterIndex, Iterable!(ByteBuf) buffers) { return addComponents(increaseWriterIndex, componentCount, buffers); } /** * Add the given {@link ByteBuf} on the specific index and increase the {@code writerIndex} * if {@code increaseWriterIndex} is {@code true}. * * {@link ByteBuf#release()} ownership of {@code buffer} is transferred to this {@link CompositeByteBuf}. * @param cIndex the index on which the {@link ByteBuf} will be added. * @param buffer the {@link ByteBuf} to add. {@link ByteBuf#release()} ownership is transferred to this * {@link CompositeByteBuf}. */ CompositeByteBuf addComponent(bool increaseWriterIndex, int cIndex, ByteBuf buffer) { checkNotNull(buffer, "buffer"); addComponent0(increaseWriterIndex, cIndex, buffer); consolidateIfNeeded(); return this; } /** * Precondition is that {@code buffer !is null}. */ private int addComponent0(bool increaseWriterIndex, int cIndex, ByteBuf buffer) { assert(buffer !is null); bool wasAdded = false; try { checkComponentIndex(cIndex); // No need to consolidate - just add a component to the list. Component c = newComponent(buffer, 0); int readableBytes = c.length(); addComp(cIndex, c); wasAdded = true; if (readableBytes > 0 && cIndex < componentCount - 1) { updateComponentOffsets(cIndex); } else if (cIndex > 0) { c.reposition(components[cIndex - 1].endOffset); } if (increaseWriterIndex) { _writerIndex += readableBytes; } return cIndex; } finally { if (!wasAdded) { buffer.release(); } } } private Component newComponent(ByteBuf buf, int offset) { if (checkAccessible && !buf.isAccessible()) { throw new IllegalReferenceCountException(0); } int srcIndex = buf.readerIndex(), len = buf.readableBytes(); ByteBuf _slice = null; // unwrap if already sliced AbstractUnpooledSlicedByteBuf slicedBuffer = cast(AbstractUnpooledSlicedByteBuf) buf; if (slicedBuffer !is null) { srcIndex += slicedBuffer.idx(0); _slice = buf; buf = buf.unwrap(); } else { // TODO: Tasks pending completion -@zxp at 8/16/2019, 6:25:33 PM // // implementationMissing(false); // if (buf instanceof PooledSlicedByteBuf) { // srcIndex += ((PooledSlicedByteBuf) buf).adjustment; // _slice = buf; // buf = buf.unwrap(); // } } return new Component(buf, srcIndex, offset, len, _slice); // .order(ByteOrder.BigEndian) } /** * Add the given {@link ByteBuf}s on the specific index * <p> * Be aware that this method does not increase the {@code writerIndex} of the {@link CompositeByteBuf}. * If you need to have it increased you need to handle it by your own. * <p> * {@link ByteBuf#release()} ownership of all {@link ByteBuf} objects in {@code buffers} is transferred to this * {@link CompositeByteBuf}. * @param cIndex the index on which the {@link ByteBuf} will be added. {@link ByteBuf#release()} ownership of all * {@link ByteBuf#release()} ownership of all {@link ByteBuf} objects is transferred to this * {@link CompositeByteBuf}. * @param buffers the {@link ByteBuf}s to add. {@link ByteBuf#release()} ownership of all {@link ByteBuf#release()} * ownership of all {@link ByteBuf} objects is transferred to this {@link CompositeByteBuf}. */ CompositeByteBuf addComponents(int cIndex, ByteBuf[] buffers...) { checkNotNull(buffers, "buffers"); addComponents0(false, cIndex, buffers, 0); consolidateIfNeeded(); return this; } private CompositeByteBuf addComponents0(bool increaseWriterIndex, int cIndex, ByteBuf[] buffers, int arrOffset) { int len = cast(int)buffers.length; int count = len - arrOffset; // only set ci after we've shifted so that finally block logic is always correct int ci = int.max; try { checkComponentIndex(cIndex); shiftComps(cIndex, count); // will increase componentCount int nextOffset = cIndex > 0 ? components[cIndex - 1].endOffset : 0; for (ci = cIndex; arrOffset < len; arrOffset++, ci++) { ByteBuf b = buffers[arrOffset]; if (b is null) { break; } Component c = newComponent(b, nextOffset); components[ci] = c; nextOffset = c.endOffset; } return this; } finally { // ci is now the index following the last successfully added component if (ci < componentCount) { if (ci < cIndex + count) { // we bailed early removeCompRange(ci, cIndex + count); for (; arrOffset < len; ++arrOffset) { ReferenceCountUtil.safeRelease(buffers[arrOffset]); } } updateComponentOffsets(ci); // only need to do this here for components after the added ones } if (increaseWriterIndex && ci > cIndex && ci <= componentCount) { _writerIndex += components[ci - 1].endOffset - components[cIndex].offset; } } } private int addComponents0(T)(bool increaseWriterIndex, int cIndex, ByteWrapper!(T) wrapper, T[] buffers, int offset) { checkComponentIndex(cIndex); // No need for consolidation for (int i = offset, len = cast(int)buffers.length; i < len; i++) { T b = buffers[i]; if (b is null) { break; } if (!wrapper.isEmpty(b)) { cIndex = addComponent0(increaseWriterIndex, cIndex, wrapper.wrap(b)) + 1; int size = componentCount; if (cIndex > size) { cIndex = size; } } } return cIndex; } /** * Add the given {@link ByteBuf}s on the specific index * * Be aware that this method does not increase the {@code writerIndex} of the {@link CompositeByteBuf}. * If you need to have it increased you need to handle it by your own. * <p> * {@link ByteBuf#release()} ownership of all {@link ByteBuf} objects in {@code buffers} is transferred to this * {@link CompositeByteBuf}. * @param cIndex the index on which the {@link ByteBuf} will be added. * @param buffers the {@link ByteBuf}s to add. {@link ByteBuf#release()} ownership of all * {@link ByteBuf#release()} ownership of all {@link ByteBuf} objects is transferred to this * {@link CompositeByteBuf}. */ CompositeByteBuf addComponents(int cIndex, Iterable!(ByteBuf) buffers) { return addComponents(false, cIndex, buffers); } /** * Add the given {@link ByteBuf} and increase the {@code writerIndex} if {@code increaseWriterIndex} is * {@code true}. If the provided buffer is a {@link CompositeByteBuf} itself, a "shallow copy" of its * readable components will be performed. Thus the actual number of new components added may vary * and in particular will be zero if the provided buffer is not readable. * <p> * {@link ByteBuf#release()} ownership of {@code buffer} is transferred to this {@link CompositeByteBuf}. * @param buffer the {@link ByteBuf} to add. {@link ByteBuf#release()} ownership is transferred to this * {@link CompositeByteBuf}. */ CompositeByteBuf addFlattenedComponents(bool increaseWriterIndex, ByteBuf buffer) { checkNotNull(buffer, "buffer"); int ridx = buffer.readerIndex(); int widx = buffer.writerIndex(); if (ridx == widx) { buffer.release(); return this; } CompositeByteBuf from = cast(CompositeByteBuf) buffer; if (from is null) { addComponent0(increaseWriterIndex, componentCount, buffer); consolidateIfNeeded(); return this; } from.checkIndex(ridx, widx - ridx); Component[] fromComponents = from.components; int compCountBefore = componentCount; int writerIndexBefore = writerIndex; try { for (int cidx = from.toComponentIndex0(ridx), newOffset = capacity();; cidx++) { Component component = fromComponents[cidx]; int compOffset = component.offset; int fromIdx = max(ridx, compOffset); int toIdx = min(widx, component.endOffset); int len = toIdx - fromIdx; if (len > 0) { // skip empty components // Note that it's safe to just retain the unwrapped buf here, even in the case // of PooledSlicedByteBufs - those slices will still be properly released by the // source Component's free() method. addComp(componentCount, new Component( component.buf.retain(), component.idx(fromIdx), newOffset, len, null)); } if (widx == toIdx) { break; } newOffset += len; } if (increaseWriterIndex) { writerIndex = writerIndexBefore + (widx - ridx); } consolidateIfNeeded(); buffer.release(); buffer = null; return this; } finally { if (buffer !is null) { // if we did not succeed, attempt to rollback any components that were added if (increaseWriterIndex) { writerIndex = writerIndexBefore; } for (int cidx = componentCount - 1; cidx >= compCountBefore; cidx--) { components[cidx].free(); removeComp(cidx); } } } } // TODO optimize further, similar to ByteBuf[] version // (difference here is that we don't know *always* know precise size increase in advance, // but we do in the most common case that the Iterable is a Collection) private CompositeByteBuf addComponents(bool increaseIndex, int cIndex, Iterable!(ByteBuf) buffers) { // if (buffers instanceof ByteBuf) { // // If buffers also implements ByteBuf (e.g. CompositeByteBuf), it has to go to addComponent(ByteBuf). // return addComponent(increaseIndex, cIndex, (ByteBuf) buffers); // } // checkNotNull(buffers, "buffers"); // Iterator!(ByteBuf) it = buffers.iterator(); // try { // checkComponentIndex(cIndex); // // No need for consolidation // while (it.hasNext()) { // ByteBuf b = it.next(); // if (b is null) { // break; // } // cIndex = addComponent0(increaseIndex, cIndex, b) + 1; // cIndex = min(cIndex, componentCount); // } // } finally { // while (it.hasNext()) { // ReferenceCountUtil.safeRelease(it.next()); // } // } // consolidateIfNeeded(); implementationMissing(false); return this; } /** * This should only be called as last operation from a method as this may adjust the underlying * array of components and so affect the index etc. */ private void consolidateIfNeeded() { // Consolidate if the number of components will exceed the allowed maximum by the current // operation. int size = componentCount; if (size > _maxNumComponents) { int capacity = components[size - 1].endOffset; ByteBuf consolidated = allocBuffer(capacity); lastAccessed = null; // We're not using foreach to avoid creating an iterator. for (int i = 0; i < size; i ++) { components[i].transferTo(consolidated); } components[0] = new Component(consolidated, 0, 0, capacity, consolidated); removeCompRange(1, size); } } private void checkComponentIndex(int cIndex) { ensureAccessible(); if (cIndex < 0 || cIndex > componentCount) { throw new IndexOutOfBoundsException(format( "cIndex: %d (expected: >= 0 && <= numComponents(%d))", cIndex, componentCount)); } } private void checkComponentIndex(int cIndex, int numComponents) { ensureAccessible(); if (cIndex < 0 || cIndex + numComponents > componentCount) { throw new IndexOutOfBoundsException(format( "cIndex: %d, numComponents: %d " ~ "(expected: cIndex >= 0 && cIndex + numComponents <= totalNumComponents(%d))", cIndex, numComponents, componentCount)); } } private void updateComponentOffsets(int cIndex) { int size = componentCount; if (size <= cIndex) { return; } int nextIndex = cIndex > 0 ? components[cIndex - 1].endOffset : 0; for (; cIndex < size; cIndex++) { Component c = components[cIndex]; c.reposition(nextIndex); nextIndex = c.endOffset; } } /** * Remove the {@link ByteBuf} from the given index. * * @param cIndex the index on from which the {@link ByteBuf} will be remove */ CompositeByteBuf removeComponent(int cIndex) { checkComponentIndex(cIndex); Component comp = components[cIndex]; if (lastAccessed == comp) { lastAccessed = null; } comp.free(); removeComp(cIndex); if (comp.length() > 0) { // Only need to call updateComponentOffsets if the length was > 0 updateComponentOffsets(cIndex); } return this; } /** * Remove the number of {@link ByteBuf}s starting from the given index. * * @param cIndex the index on which the {@link ByteBuf}s will be started to removed * @param numComponents the number of components to remove */ CompositeByteBuf removeComponents(int cIndex, int numComponents) { checkComponentIndex(cIndex, numComponents); if (numComponents == 0) { return this; } int endIndex = cIndex + numComponents; bool needsUpdate = false; for (int i = cIndex; i < endIndex; ++i) { Component c = components[i]; if (c.length() > 0) { needsUpdate = true; } if (lastAccessed == c) { lastAccessed = null; } c.free(); } removeCompRange(cIndex, endIndex); if (needsUpdate) { // Only need to call updateComponentOffsets if the length was > 0 updateComponentOffsets(cIndex); } return this; } // override InputRange!(ByteBuf) iterator() { ensureAccessible(); // return componentCount == 0 ? EMPTY_ITERATOR : new CompositeByteBufIterator(); implementationMissing(false); return null; } int opApply(scope int delegate(ref ByteBuf) dg) { if(dg is null) throw new NullPointerException(); int result = 0; foreach(Component v; components) { ByteBuf b = v.slice(); result = dg(b); if(result != 0) return result; } return result; } override protected int forEachByteAsc0(int start, int end, ByteProcessor processor) { if (end <= start) { return -1; } for (int i = toComponentIndex0(start), length = end - start; length > 0; i++) { Component c = components[i]; if (c.offset == c.endOffset) { continue; // empty } ByteBuf s = c.buf; int localStart = c.idx(start); int localLength = min(length, c.endOffset - start); // avoid additional checks in AbstractByteBuf case AbstractByteBuf buffer = cast(AbstractByteBuf) s; int result = 0; if(buffer is null) result = s.forEachByte(localStart, localLength, processor); else buffer.forEachByteAsc0(localStart, localStart + localLength, processor); if (result != -1) { return result - c.adjustment; } start += localLength; length -= localLength; } return -1; } override protected int forEachByteDesc0(int rStart, int rEnd, ByteProcessor processor) { if (rEnd > rStart) { // rStart *and* rEnd are inclusive return -1; } for (int i = toComponentIndex0(rStart), length = 1 + rStart - rEnd; length > 0; i--) { Component c = components[i]; if (c.offset == c.endOffset) { continue; // empty } ByteBuf s = c.buf; int localRStart = c.idx(length + rEnd); int localLength = min(length, localRStart), localIndex = localRStart - localLength; // avoid additional checks in AbstractByteBuf case int result = 0; AbstractByteBuf buf = cast(AbstractByteBuf) s; if(buf is null) result = s.forEachByteDesc(localIndex, localLength, processor); else result = buf.forEachByteDesc0(localRStart - 1, localIndex, processor); if (result != -1) { return result - c.adjustment; } length -= localLength; } return -1; } /** * Same with {@link #slice(int, int)} except that this method returns a list. */ List!(ByteBuf) decompose(int offset, int length) { checkIndex(offset, length); if (length == 0) { return Collections.emptyList!(ByteBuf)(); } int componentId = toComponentIndex0(offset); int bytesToSlice = length; // The first component Component firstC = components[componentId]; ByteBuf _slice = firstC.buf.slice(firstC.idx(offset), min(firstC.endOffset - offset, bytesToSlice)); bytesToSlice -= _slice.readableBytes(); if (bytesToSlice == 0) { return Collections.singletonList(_slice); } List!(ByteBuf) sliceList = new ArrayList!(ByteBuf)(componentCount - componentId); sliceList.add(_slice); // Add all the slices until there is nothing more left and then return the List. do { Component component = components[++componentId]; _slice = component.buf.slice(component.idx(component.offset), min(component.length(), bytesToSlice)); bytesToSlice -= _slice.readableBytes(); sliceList.add(_slice); } while (bytesToSlice > 0); return sliceList; } override bool isDirect() { int size = componentCount; if (size == 0) { return false; } for (int i = 0; i < size; i++) { if (!components[i].buf.isDirect()) { return false; } } return true; } override bool hasArray() { switch (componentCount) { case 0: return true; case 1: return components[0].buf.hasArray(); default: return false; } } override byte[] array() { switch (componentCount) { case 0: return []; case 1: return components[0].buf.array(); default: throw new UnsupportedOperationException(); } } override int arrayOffset() { switch (componentCount) { case 0: return 0; case 1: Component c = components[0]; return c.idx(c.buf.arrayOffset()); default: throw new UnsupportedOperationException(); } } override bool hasMemoryAddress() { switch (componentCount) { case 0: return Unpooled.EMPTY_BUFFER.hasMemoryAddress(); case 1: return components[0].buf.hasMemoryAddress(); default: return false; } } override long memoryAddress() { switch (componentCount) { case 0: return Unpooled.EMPTY_BUFFER.memoryAddress(); case 1: Component c = components[0]; return c.buf.memoryAddress() + c.adjustment; default: throw new UnsupportedOperationException(); } } override int capacity() { int size = componentCount; return size > 0 ? components[size - 1].endOffset : 0; } override CompositeByteBuf capacity(int newCapacity) { checkNewCapacity(newCapacity); int size = componentCount, oldCapacity = capacity(); if (newCapacity > oldCapacity) { int paddingLength = newCapacity - oldCapacity; ByteBuf padding = allocBuffer(paddingLength).setIndex(0, paddingLength); addComponent0(false, size, padding); if (componentCount >= _maxNumComponents) { // FIXME: No need to create a padding buffer and consolidate. // Just create a big single buffer and put the current content there. consolidateIfNeeded(); } } else if (newCapacity < oldCapacity) { lastAccessed = null; int i = size - 1; for (int bytesToTrim = oldCapacity - newCapacity; i >= 0; i--) { Component c = components[i]; int cLength = c.length(); if (bytesToTrim < cLength) { // Trim the last component c.endOffset -= bytesToTrim; ByteBuf _slice = c._slice; if (_slice !is null) { // We must replace the cached slice with a derived one to ensure that // it can later be released properly in the case of PooledSlicedByteBuf. c._slice = _slice.slice(0, c.length()); } break; } c.free(); bytesToTrim -= cLength; } removeCompRange(i + 1, size); if (readerIndex() > newCapacity) { setIndex0(newCapacity, newCapacity); } else if (writerIndex > newCapacity) { writerIndex = newCapacity; } } return this; } override ByteBufAllocator alloc() { return _alloc; } override ByteOrder order() { return ByteOrder.BigEndian; } /** * Return the current number of {@link ByteBuf}'s that are composed in this instance */ int numComponents() { return componentCount; } /** * Return the max number of {@link ByteBuf}'s that are composed in this instance */ int maxNumComponents() { return _maxNumComponents; } /** * Return the index for the given offset */ int toComponentIndex(int offset) { checkIndex(offset); return toComponentIndex0(offset); } private int toComponentIndex0(int offset) { int size = componentCount; if (offset == 0) { // fast-path zero offset for (int i = 0; i < size; i++) { if (components[i].endOffset > 0) { return i; } } } if (size <= 2) { // fast-path for 1 and 2 component count return size == 1 || offset < components[0].endOffset ? 0 : 1; } for (int low = 0, high = size; low <= high;) { int mid = low + high >>> 1; Component c = components[mid]; if (offset >= c.endOffset) { low = mid + 1; } else if (offset < c.offset) { high = mid - 1; } else { return mid; } } throw new Error("should not reach here"); } int toByteIndex(int cIndex) { checkComponentIndex(cIndex); return components[cIndex].offset; } override byte getByte(int index) { Component c = findComponent(index); return c.buf.getByte(c.idx(index)); } override protected byte _getByte(int index) { Component c = findComponent0(index); return c.buf.getByte(c.idx(index)); } override protected short _getShort(int index) { Component c = findComponent0(index); if (index + 2 <= c.endOffset) { return c.buf.getShort(c.idx(index)); } else if (order() == ByteOrder.BigEndian) { return cast(short) ((_getByte(index) & 0xff) << 8 | _getByte(index + 1) & 0xff); } else { return cast(short) (_getByte(index) & 0xff | (_getByte(index + 1) & 0xff) << 8); } } override protected short _getShortLE(int index) { Component c = findComponent0(index); if (index + 2 <= c.endOffset) { return c.buf.getShortLE(c.idx(index)); } else if (order() == ByteOrder.BigEndian) { return cast(short) (_getByte(index) & 0xff | (_getByte(index + 1) & 0xff) << 8); } else { return cast(short) ((_getByte(index) & 0xff) << 8 | _getByte(index + 1) & 0xff); } } override protected int _getUnsignedMedium(int index) { Component c = findComponent0(index); if (index + 3 <= c.endOffset) { return c.buf.getUnsignedMedium(c.idx(index)); } else if (order() == ByteOrder.BigEndian) { return (_getShort(index) & 0xffff) << 8 | _getByte(index + 2) & 0xff; } else { return _getShort(index) & 0xFFFF | (_getByte(index + 2) & 0xFF) << 16; } } override protected int _getUnsignedMediumLE(int index) { Component c = findComponent0(index); if (index + 3 <= c.endOffset) { return c.buf.getUnsignedMediumLE(c.idx(index)); } else if (order() == ByteOrder.BigEndian) { return _getShortLE(index) & 0xffff | (_getByte(index + 2) & 0xff) << 16; } else { return (_getShortLE(index) & 0xffff) << 8 | _getByte(index + 2) & 0xff; } } override protected int _getInt(int index) { Component c = findComponent0(index); if (index + 4 <= c.endOffset) { return c.buf.getInt(c.idx(index)); } else if (order() == ByteOrder.BigEndian) { return (_getShort(index) & 0xffff) << 16 | _getShort(index + 2) & 0xffff; } else { return _getShort(index) & 0xFFFF | (_getShort(index + 2) & 0xFFFF) << 16; } } override protected int _getIntLE(int index) { Component c = findComponent0(index); if (index + 4 <= c.endOffset) { return c.buf.getIntLE(c.idx(index)); } else if (order() == ByteOrder.BigEndian) { return _getShortLE(index) & 0xffff | (_getShortLE(index + 2) & 0xffff) << 16; } else { return (_getShortLE(index) & 0xffff) << 16 | _getShortLE(index + 2) & 0xffff; } } override protected long _getLong(int index) { Component c = findComponent0(index); if (index + 8 <= c.endOffset) { return c.buf.getLong(c.idx(index)); } else if (order() == ByteOrder.BigEndian) { return (_getInt(index) & 0xffffffffL) << 32 | _getInt(index + 4) & 0xffffffffL; } else { return _getInt(index) & 0xFFFFFFFFL | (_getInt(index + 4) & 0xFFFFFFFFL) << 32; } } override protected long _getLongLE(int index) { Component c = findComponent0(index); if (index + 8 <= c.endOffset) { return c.buf.getLongLE(c.idx(index)); } else if (order() == ByteOrder.BigEndian) { return _getIntLE(index) & 0xffffffffL | (_getIntLE(index + 4) & 0xffffffffL) << 32; } else { return (_getIntLE(index) & 0xffffffffL) << 32 | _getIntLE(index + 4) & 0xffffffffL; } } override CompositeByteBuf getBytes(int index, byte[] dst, int dstIndex, int length) { checkDstIndex(index, length, dstIndex, cast(int)dst.length); if (length == 0) { return this; } int i = toComponentIndex0(index); while (length > 0) { Component c = components[i]; int localLength = min(length, c.endOffset - index); c.buf.getBytes(c.idx(index), dst, dstIndex, localLength); index += localLength; dstIndex += localLength; length -= localLength; i ++; } return this; } override CompositeByteBuf getBytes(int index, ByteBuffer dst) { int limit = dst.limit(); int length = dst.remaining(); checkIndex(index, length); if (length == 0) { return this; } int i = toComponentIndex0(index); try { while (length > 0) { Component c = components[i]; int localLength = min(length, c.endOffset - index); dst.limit(dst.position() + localLength); c.buf.getBytes(c.idx(index), dst); index += localLength; length -= localLength; i ++; } } finally { dst.limit(limit); } return this; } override CompositeByteBuf getBytes(int index, ByteBuf dst, int dstIndex, int length) { checkDstIndex(index, length, dstIndex, dst.capacity()); if (length == 0) { return this; } int i = toComponentIndex0(index); while (length > 0) { Component c = components[i]; int localLength = min(length, c.endOffset - index); c.buf.getBytes(c.idx(index), dst, dstIndex, localLength); index += localLength; dstIndex += localLength; length -= localLength; i ++; } return this; } // override // int getBytes(int index, GatheringByteChannel output, int length) { // int count = nioBufferCount(); // if (count == 1) { // return output.write(internalNioBuffer(index, length)); // } else { // long writtenBytes = output.write(nioBuffers(index, length)); // if (writtenBytes > int.max) { // return int.max; // } else { // return cast(int) writtenBytes; // } // } // } // override // int getBytes(int index, FileChannel output, long position, int length) { // int count = nioBufferCount(); // if (count == 1) { // return output.write(internalNioBuffer(index, length), position); // } else { // long writtenBytes = 0; // foreach(ByteBuffer buf ; nioBuffers(index, length)) { // writtenBytes += output.write(buf, position + writtenBytes); // } // if (writtenBytes > int.max) { // return int.max; // } // return cast(int) writtenBytes; // } // } override CompositeByteBuf getBytes(int index, OutputStream output, int length) { checkIndex(index, length); if (length == 0) { return this; } int i = toComponentIndex0(index); while (length > 0) { Component c = components[i]; int localLength = min(length, c.endOffset - index); c.buf.getBytes(c.idx(index), output, localLength); index += localLength; length -= localLength; i ++; } return this; } override CompositeByteBuf setByte(int index, int value) { Component c = findComponent(index); c.buf.setByte(c.idx(index), value); return this; } override protected void _setByte(int index, int value) { Component c = findComponent0(index); c.buf.setByte(c.idx(index), value); } override CompositeByteBuf setShort(int index, int value) { checkIndex(index, 2); _setShort(index, value); return this; } override protected void _setShort(int index, int value) { Component c = findComponent0(index); if (index + 2 <= c.endOffset) { c.buf.setShort(c.idx(index), value); } else if (order() == ByteOrder.BigEndian) { _setByte(index, cast(byte) (value >>> 8)); _setByte(index + 1, cast(byte) value); } else { _setByte(index, cast(byte) value); _setByte(index + 1, cast(byte) (value >>> 8)); } } override protected void _setShortLE(int index, int value) { Component c = findComponent0(index); if (index + 2 <= c.endOffset) { c.buf.setShortLE(c.idx(index), value); } else if (order() == ByteOrder.BigEndian) { _setByte(index, cast(byte) value); _setByte(index + 1, cast(byte) (value >>> 8)); } else { _setByte(index, cast(byte) (value >>> 8)); _setByte(index + 1, cast(byte) value); } } override CompositeByteBuf setMedium(int index, int value) { checkIndex(index, 3); _setMedium(index, value); return this; } override protected void _setMedium(int index, int value) { Component c = findComponent0(index); if (index + 3 <= c.endOffset) { c.buf.setMedium(c.idx(index), value); } else if (order() == ByteOrder.BigEndian) { _setShort(index, cast(short) (value >> 8)); _setByte(index + 2, cast(byte) value); } else { _setShort(index, cast(short) value); _setByte(index + 2, cast(byte) (value >>> 16)); } } override protected void _setMediumLE(int index, int value) { Component c = findComponent0(index); if (index + 3 <= c.endOffset) { c.buf.setMediumLE(c.idx(index), value); } else if (order() == ByteOrder.BigEndian) { _setShortLE(index, cast(short) value); _setByte(index + 2, cast(byte) (value >>> 16)); } else { _setShortLE(index, cast(short) (value >> 8)); _setByte(index + 2, cast(byte) value); } } override CompositeByteBuf setInt(int index, int value) { checkIndex(index, 4); _setInt(index, value); return this; } override protected void _setInt(int index, int value) { Component c = findComponent0(index); if (index + 4 <= c.endOffset) { c.buf.setInt(c.idx(index), value); } else if (order() == ByteOrder.BigEndian) { _setShort(index, cast(short) (value >>> 16)); _setShort(index + 2, cast(short) value); } else { _setShort(index, cast(short) value); _setShort(index + 2, cast(short) (value >>> 16)); } } override protected void _setIntLE(int index, int value) { Component c = findComponent0(index); if (index + 4 <= c.endOffset) { c.buf.setIntLE(c.idx(index), value); } else if (order() == ByteOrder.BigEndian) { _setShortLE(index, cast(short) value); _setShortLE(index + 2, cast(short) (value >>> 16)); } else { _setShortLE(index, cast(short) (value >>> 16)); _setShortLE(index + 2, cast(short) value); } } override CompositeByteBuf setLong(int index, long value) { checkIndex(index, 8); _setLong(index, value); return this; } override protected void _setLong(int index, long value) { Component c = findComponent0(index); if (index + 8 <= c.endOffset) { c.buf.setLong(c.idx(index), value); } else if (order() == ByteOrder.BigEndian) { _setInt(index, cast(int) (value >>> 32)); _setInt(index + 4, cast(int) value); } else { _setInt(index, cast(int) value); _setInt(index + 4, cast(int) (value >>> 32)); } } override protected void _setLongLE(int index, long value) { Component c = findComponent0(index); if (index + 8 <= c.endOffset) { c.buf.setLongLE(c.idx(index), value); } else if (order() == ByteOrder.BigEndian) { _setIntLE(index, cast(int) value); _setIntLE(index + 4, cast(int) (value >>> 32)); } else { _setIntLE(index, cast(int) (value >>> 32)); _setIntLE(index + 4, cast(int) value); } } override CompositeByteBuf setBytes(int index, byte[] src, int srcIndex, int length) { checkSrcIndex(index, length, srcIndex, cast(int)src.length); if (length == 0) { return this; } int i = toComponentIndex0(index); while (length > 0) { Component c = components[i]; int localLength = min(length, c.endOffset - index); c.buf.setBytes(c.idx(index), src, srcIndex, localLength); index += localLength; srcIndex += localLength; length -= localLength; i ++; } return this; } override CompositeByteBuf setBytes(int index, ByteBuffer src) { int limit = src.limit(); int length = src.remaining(); checkIndex(index, length); if (length == 0) { return this; } int i = toComponentIndex0(index); try { while (length > 0) { Component c = components[i]; int localLength = min(length, c.endOffset - index); src.limit(src.position() + localLength); c.buf.setBytes(c.idx(index), src); index += localLength; length -= localLength; i ++; } } finally { src.limit(limit); } return this; } override CompositeByteBuf setBytes(int index, ByteBuf src, int srcIndex, int length) { checkSrcIndex(index, length, srcIndex, src.capacity()); if (length == 0) { return this; } int i = toComponentIndex0(index); while (length > 0) { Component c = components[i]; int localLength = min(length, c.endOffset - index); c.buf.setBytes(c.idx(index), src, srcIndex, localLength); index += localLength; srcIndex += localLength; length -= localLength; i ++; } return this; } override int setBytes(int index, InputStream input, int length) { checkIndex(index, length); if (length == 0) { return input.read([]); } int i = toComponentIndex0(index); int readBytes = 0; do { Component c = components[i]; int localLength = min(length, c.endOffset - index); if (localLength == 0) { // Skip empty buffer i++; continue; } int localReadBytes = c.buf.setBytes(c.idx(index), input, localLength); if (localReadBytes < 0) { if (readBytes == 0) { return -1; } else { break; } } index += localReadBytes; length -= localReadBytes; readBytes += localReadBytes; if (localReadBytes == localLength) { i ++; } } while (length > 0); return readBytes; } // override // int setBytes(int index, ScatteringByteChannel input, int length) { // checkIndex(index, length); // if (length == 0) { // return input.read(EMPTY_NIO_BUFFER); // } // int i = toComponentIndex0(index); // int readBytes = 0; // do { // Component c = components[i]; // int localLength = min(length, c.endOffset - index); // if (localLength == 0) { // // Skip empty buffer // i++; // continue; // } // int localReadBytes = c.buf.setBytes(c.idx(index), input, localLength); // if (localReadBytes == 0) { // break; // } // if (localReadBytes < 0) { // if (readBytes == 0) { // return -1; // } else { // break; // } // } // index += localReadBytes; // length -= localReadBytes; // readBytes += localReadBytes; // if (localReadBytes == localLength) { // i ++; // } // } while (length > 0); // return readBytes; // } // override // int setBytes(int index, FileChannel input, long position, int length) { // checkIndex(index, length); // if (length == 0) { // return input.read(EMPTY_NIO_BUFFER, position); // } // int i = toComponentIndex0(index); // int readBytes = 0; // do { // Component c = components[i]; // int localLength = min(length, c.endOffset - index); // if (localLength == 0) { // // Skip empty buffer // i++; // continue; // } // int localReadBytes = c.buf.setBytes(c.idx(index), input, position + readBytes, localLength); // if (localReadBytes == 0) { // break; // } // if (localReadBytes < 0) { // if (readBytes == 0) { // return -1; // } else { // break; // } // } // index += localReadBytes; // length -= localReadBytes; // readBytes += localReadBytes; // if (localReadBytes == localLength) { // i ++; // } // } while (length > 0); // return readBytes; // } override ByteBuf copy(int index, int length) { checkIndex(index, length); ByteBuf dst = allocBuffer(length); if (length != 0) { copyTo(index, length, toComponentIndex0(index), dst); } return dst; } private void copyTo(int index, int length, int componentId, ByteBuf dst) { int dstIndex = 0; int i = componentId; while (length > 0) { Component c = components[i]; int localLength = min(length, c.endOffset - index); c.buf.getBytes(c.idx(index), dst, dstIndex, localLength); index += localLength; dstIndex += localLength; length -= localLength; i ++; } dst.writerIndex(dst.capacity()); } /** * Return the {@link ByteBuf} on the specified index * * @param cIndex the index for which the {@link ByteBuf} should be returned * @return buf the {@link ByteBuf} on the specified index */ ByteBuf component(int cIndex) { checkComponentIndex(cIndex); return components[cIndex].duplicate(); } /** * Return the {@link ByteBuf} on the specified index * * @param offset the offset for which the {@link ByteBuf} should be returned * @return the {@link ByteBuf} on the specified index */ ByteBuf componentAtOffset(int offset) { return findComponent(offset).duplicate(); } /** * Return the internal {@link ByteBuf} on the specified index. Note that updating the indexes of the returned * buffer will lead to an undefined behavior of this buffer. * * @param cIndex the index for which the {@link ByteBuf} should be returned */ ByteBuf internalComponent(int cIndex) { checkComponentIndex(cIndex); return components[cIndex].slice(); } /** * Return the internal {@link ByteBuf} on the specified offset. Note that updating the indexes of the returned * buffer will lead to an undefined behavior of this buffer. * * @param offset the offset for which the {@link ByteBuf} should be returned */ ByteBuf internalComponentAtOffset(int offset) { return findComponent(offset).slice(); } // weak cache - check it first when looking for component private Component lastAccessed; private Component findComponent(int offset) { Component la = lastAccessed; if (la !is null && offset >= la.offset && offset < la.endOffset) { ensureAccessible(); return la; } checkIndex(offset); return findIt(offset); } private Component findComponent0(int offset) { Component la = lastAccessed; if (la !is null && offset >= la.offset && offset < la.endOffset) { return la; } return findIt(offset); } private Component findIt(int offset) { for (int low = 0, high = componentCount; low <= high;) { int mid = low + high >>> 1; Component c = components[mid]; if (offset >= c.endOffset) { low = mid + 1; } else if (offset < c.offset) { high = mid - 1; } else { lastAccessed = c; return c; } } throw new Error("should not reach here"); } override int nioBufferCount() { int size = componentCount; switch (size) { case 0: return 1; case 1: return components[0].buf.nioBufferCount(); default: int count = 0; for (int i = 0; i < size; i++) { count += components[i].buf.nioBufferCount(); } return count; } } override ByteBuffer internalNioBuffer(int index, int length) { switch (componentCount) { case 0: return EMPTY_NIO_BUFFER; case 1: return components[0].internalNioBuffer(index, length); default: throw new UnsupportedOperationException(); } } override ByteBuffer nioBuffer(int index, int length) { checkIndex(index, length); switch (componentCount) { case 0: return EMPTY_NIO_BUFFER; case 1: Component c = components[0]; ByteBuf buf = c.buf; if (buf.nioBufferCount() == 1) { return buf.nioBuffer(c.idx(index), length); } break; default : break; } ByteBuffer[] buffers = nioBuffers(index, length); if (buffers.length == 1) { return buffers[0]; } ByteBuffer merged = BufferUtils.allocate(length).order(order()); foreach(ByteBuffer buf; buffers) { merged.put(buf); } merged.flip(); return merged; } override ByteBuffer[] nioBuffers(int index, int length) { checkIndex(index, length); if (length == 0) { return [ EMPTY_NIO_BUFFER ]; } implementationMissing(false); return null; // RecyclableArrayList buffers = RecyclableArrayList.newInstance(componentCount); // try { // int i = toComponentIndex0(index); // while (length > 0) { // Component c = components[i]; // ByteBuf s = c.buf; // int localLength = min(length, c.endOffset - index); // switch (s.nioBufferCount()) { // case 0: // throw new UnsupportedOperationException(); // case 1: // buffers.add(s.nioBuffer(c.idx(index), localLength)); // break; // default: // Collections.addAll(buffers, s.nioBuffers(c.idx(index), localLength)); // } // index += localLength; // length -= localLength; // i ++; // } // return buffers.toArray(new ByteBuffer[0]); // } finally { // buffers.recycle(); // } } /** * Consolidate the composed {@link ByteBuf}s */ CompositeByteBuf consolidate() { ensureAccessible(); int numComponents = componentCount; if (numComponents <= 1) { return this; } int capacity = components[numComponents - 1].endOffset; ByteBuf consolidated = allocBuffer(capacity); for (int i = 0; i < numComponents; i ++) { components[i].transferTo(consolidated); } lastAccessed = null; components[0] = new Component(consolidated, 0, 0, capacity, consolidated); removeCompRange(1, numComponents); return this; } /** * Consolidate the composed {@link ByteBuf}s * * @param cIndex the index on which to start to compose * @param numComponents the number of components to compose */ CompositeByteBuf consolidate(int cIndex, int numComponents) { checkComponentIndex(cIndex, numComponents); if (numComponents <= 1) { return this; } int endCIndex = cIndex + numComponents; Component last = components[endCIndex - 1]; int capacity = last.endOffset - components[cIndex].offset; ByteBuf consolidated = allocBuffer(capacity); for (int i = cIndex; i < endCIndex; i ++) { components[i].transferTo(consolidated); } lastAccessed = null; removeCompRange(cIndex + 1, endCIndex); components[cIndex] = new Component(consolidated, 0, 0, capacity, consolidated); updateComponentOffsets(cIndex); return this; } /** * Discard all {@link ByteBuf}s which are read. */ CompositeByteBuf discardReadComponents() { ensureAccessible(); int rIndex = readerIndex(); if (rIndex == 0) { return this; } // Discard everything if (readerIndex = writerIndex = capacity). int wIndex = writerIndex(); if (rIndex == wIndex && wIndex == capacity()) { for (int i = 0, size = componentCount; i < size; i++) { components[i].free(); } lastAccessed = null; clearComps(); setIndex(0, 0); adjustMarkers(rIndex); return this; } // Remove read components. int firstComponentId = 0; Component c = null; for (int size = componentCount; firstComponentId < size; firstComponentId++) { c = components[firstComponentId]; if (c.endOffset > rIndex) { break; } c.free(); } if (firstComponentId == 0) { return this; // Nothing to discard } Component la = lastAccessed; if (la !is null && la.endOffset <= rIndex) { lastAccessed = null; } removeCompRange(0, firstComponentId); // Update indexes and markers. int offset = c.offset; updateComponentOffsets(0); setIndex(rIndex - offset, wIndex - offset); adjustMarkers(offset); return this; } override CompositeByteBuf discardReadBytes() { ensureAccessible(); int rIndex = readerIndex(); if (rIndex == 0) { return this; } // Discard everything if (readerIndex = writerIndex = capacity). int wIndex = writerIndex(); if (rIndex == wIndex && wIndex == capacity()) { for (int i = 0, size = componentCount; i < size; i++) { components[i].free(); } lastAccessed = null; clearComps(); setIndex(0, 0); adjustMarkers(rIndex); return this; } int firstComponentId = 0; Component c = null; for (int size = componentCount; firstComponentId < size; firstComponentId++) { c = components[firstComponentId]; if (c.endOffset > rIndex) { break; } c.free(); } // Replace the first readable component with a new slice. int trimmedBytes = rIndex - c.offset; c.offset = 0; c.endOffset -= rIndex; c.adjustment += rIndex; ByteBuf slice = c.slice; if (slice !is null) { // We must replace the cached slice with a derived one to ensure that // it can later be released properly in the case of PooledSlicedByteBuf. c._slice = slice.slice(trimmedBytes, c.length()); } Component la = lastAccessed; if (la !is null && la.endOffset <= rIndex) { lastAccessed = null; } removeCompRange(0, firstComponentId); // Update indexes and markers. updateComponentOffsets(0); setIndex(0, wIndex - rIndex); adjustMarkers(rIndex); return this; } private ByteBuf allocBuffer(int capacity) { return direct ? alloc().directBuffer(capacity) : alloc().heapBuffer(capacity); } override string toString() { string result = super.toString(); result = result[0 .. $ - 1]; return result ~ ", components=" ~ componentCount.to!string() ~ ")"; } override CompositeByteBuf readerIndex(int index) { super.readerIndex(index); return this; } alias readerIndex = ByteBuf.readerIndex; override CompositeByteBuf writerIndex(int index) { super.writerIndex(index); return this; } alias writerIndex = ByteBuf.writerIndex; override CompositeByteBuf setIndex(int rIndex, int wIndex) { super.setIndex(rIndex, wIndex); return this; } override CompositeByteBuf clear() { super.clear(); return this; } override CompositeByteBuf markReaderIndex() { super.markReaderIndex(); return this; } override CompositeByteBuf resetReaderIndex() { super.resetReaderIndex(); return this; } override CompositeByteBuf markWriterIndex() { super.markWriterIndex(); return this; } override CompositeByteBuf resetWriterIndex() { super.resetWriterIndex(); return this; } override CompositeByteBuf ensureWritable(int minWritableBytes) { super.ensureWritable(minWritableBytes); return this; } override CompositeByteBuf getBytes(int index, ByteBuf dst) { return getBytes(index, dst, dst.writableBytes()); } override CompositeByteBuf getBytes(int index, ByteBuf dst, int length) { getBytes(index, dst, dst.writerIndex(), length); dst.writerIndex(dst.writerIndex() + length); return this; } override CompositeByteBuf getBytes(int index, byte[] dst) { return getBytes(index, dst, 0, cast(int)dst.length); } override CompositeByteBuf setBoolean(int index, bool value) { return setByte(index, value? 1 : 0); } override CompositeByteBuf setChar(int index, int value) { return setShort(index, value); } override CompositeByteBuf setFloat(int index, float value) { return setInt(index, Float.floatToRawIntBits(value)); } override CompositeByteBuf setDouble(int index, double value) { return setLong(index, Double.doubleToRawLongBits(value)); } override CompositeByteBuf setBytes(int index, ByteBuf src) { super.setBytes(index, src, src.readableBytes()); return this; } override CompositeByteBuf setBytes(int index, ByteBuf src, int length) { super.setBytes(index, src, length); return this; } override CompositeByteBuf setBytes(int index, byte[] src) { return setBytes(index, src, 0, cast(int)src.length); } override CompositeByteBuf setZero(int index, int length) { super.setZero(index, length); return this; } override CompositeByteBuf readBytes(ByteBuf dst) { super.readBytes(dst, dst.writableBytes()); return this; } override CompositeByteBuf readBytes(ByteBuf dst, int length) { super.readBytes(dst, length); return this; } override CompositeByteBuf readBytes(ByteBuf dst, int dstIndex, int length) { super.readBytes(dst, dstIndex, length); return this; } override CompositeByteBuf readBytes(byte[] dst) { super.readBytes(dst, 0, cast(int)dst.length); return this; } override CompositeByteBuf readBytes(byte[] dst, int dstIndex, int length) { super.readBytes(dst, dstIndex, length); return this; } override CompositeByteBuf readBytes(ByteBuffer dst) { super.readBytes(dst); return this; } override CompositeByteBuf readBytes(OutputStream output, int length) { super.readBytes(output, length); return this; } override CompositeByteBuf skipBytes(int length) { super.skipBytes(length); return this; } override CompositeByteBuf writeBoolean(bool value) { writeByte(value ? 1 : 0); return this; } override CompositeByteBuf writeByte(int value) { ensureWritable0(1); _setByte(_writerIndex++, value); return this; } override CompositeByteBuf writeShort(int value) { super.writeShort(value); return this; } override CompositeByteBuf writeMedium(int value) { super.writeMedium(value); return this; } override CompositeByteBuf writeInt(int value) { super.writeInt(value); return this; } override CompositeByteBuf writeLong(long value) { super.writeLong(value); return this; } override CompositeByteBuf writeChar(int value) { super.writeShort(value); return this; } override CompositeByteBuf writeFloat(float value) { super.writeInt(Float.floatToRawIntBits(value)); return this; } override CompositeByteBuf writeDouble(double value) { super.writeLong(Double.doubleToRawLongBits(value)); return this; } override CompositeByteBuf writeBytes(ByteBuf src) { super.writeBytes(src, src.readableBytes()); return this; } override CompositeByteBuf writeBytes(ByteBuf src, int length) { super.writeBytes(src, length); return this; } override CompositeByteBuf writeBytes(ByteBuf src, int srcIndex, int length) { super.writeBytes(src, srcIndex, length); return this; } override CompositeByteBuf writeBytes(byte[] src) { super.writeBytes(src, 0, cast(int)src.length); return this; } override CompositeByteBuf writeBytes(byte[] src, int srcIndex, int length) { super.writeBytes(src, srcIndex, length); return this; } override CompositeByteBuf writeBytes(ByteBuffer src) { super.writeBytes(src); return this; } override CompositeByteBuf writeZero(int length) { super.writeZero(length); return this; } override CompositeByteBuf retain(int increment) { super.retain(increment); return this; } override CompositeByteBuf retain() { super.retain(); return this; } override CompositeByteBuf touch() { return this; } override CompositeByteBuf touch(Object hint) { return this; } override ByteBuffer[] nioBuffers() { return nioBuffers(readerIndex(), readableBytes()); } override CompositeByteBuf discardSomeReadBytes() { return discardReadComponents(); } override protected void deallocate() { if (freed) { return; } freed = true; // We're not using foreach to avoid creating an iterator. // see https://github.com/netty/netty/issues/2642 for (int i = 0, size = componentCount; i < size; i++) { components[i].free(); } } override bool isAccessible() { return !freed; } override ByteBuf unwrap() { return null; } // private final class CompositeByteBufIterator : InputRange!(ByteBuf) { // private int size = numComponents(); // private int index; // override // bool hasNext() { // return size > index; // } // override // ByteBuf next() { // if (size != numComponents()) { // throw new ConcurrentModificationException(); // } // if (!hasNext()) { // throw new NoSuchElementException(); // } // try { // return components[index++].slice(); // } catch (IndexOutOfBoundsException e) { // throw new ConcurrentModificationException(); // } // } // override // void remove() { // throw new UnsupportedOperationException("Read-Only"); // } // } // Component array manipulation - range checking omitted private void clearComps() { removeCompRange(0, componentCount); } private void removeComp(int i) { removeCompRange(i, i + 1); } private void removeCompRange(int from, int to) { if (from >= to) { return; } int size = componentCount; assert(from >= 0 && to <= size); if (to < size) { // System.arraycopy(components, to, components, from, size - to); // components[from .. from + size - to] = components[to .. size]; for(int i=0; i<size - to; i++) { components[from+i] = components[to+i]; } } int newSize = size - to + from; for (int i = newSize; i < size; i++) { components[i] = null; } componentCount = newSize; } private void addComp(int i, Component c) { shiftComps(i, 1); components[i] = c; } private void shiftComps(int i, int count) { int size = componentCount, newSize = size + count; assert( i >= 0 && i <= size && count > 0); if (newSize > components.length) { // grow the array int newArrSize = max(size + (size >> 1), newSize); Component[] newArr; if (i == size) { newArr = components.dup; // Arrays.copyOf(components, newArrSize, Component[].class); } else { newArr = new Component[newArrSize]; if (i > 0) { // System.arraycopy(components, 0, newArr, 0, i); newArr[0..i] = components[0..i]; } if (i < size) { newArr[i + count .. size+count] = components[i .. size]; // System.arraycopy(components, i, newArr, i + count, size - i); } } components = newArr; } else if (i < size) { // System.arraycopy(components, i, components, i + count, size - i); // components[i + count .. count+size] = components[i .. size]; for(int j=0; j<size - i; j++) components[i + count + j] = components[i+j]; } componentCount = newSize; } } private final class Component { ByteBuf buf; int adjustment; int offset; int endOffset; private ByteBuf _slice; // cached slice, may be null this(ByteBuf buf, int srcOffset, int offset, int len, ByteBuf slice) { this.buf = buf; this.offset = offset; this.endOffset = offset + len; this.adjustment = srcOffset - offset; this._slice = slice; } int idx(int index) { return index + adjustment; } int length() { return endOffset - offset; } void reposition(int newOffset) { int move = newOffset - offset; endOffset += move; adjustment -= move; offset = newOffset; } // copy then release void transferTo(ByteBuf dst) { dst.writeBytes(buf, idx(offset), length()); free(); } ByteBuf slice() { return _slice !is null ? _slice : (_slice = buf.slice(idx(offset), length())); } ByteBuf duplicate() { return buf.duplicate().setIndex(idx(offset), idx(endOffset)); } ByteBuffer internalNioBuffer(int index, int length) { // We must not return the unwrapped buffer's internal buffer // if it was originally added as a slice - this check of the // slice field is threadsafe since we only care whether it // was set upon Component construction, and we aren't // attempting to access the referenced slice itself return _slice !is null ? buf.nioBuffer(idx(index), length) : buf.internalNioBuffer(idx(index), length); } void free() { // Release the slice if present since it may have a different // refcount to the unwrapped buf if it is a PooledSlicedByteBuf ByteBuf buffer = _slice; if (buffer !is null) { buffer.release(); } else { buf.release(); } // null out in either case since it could be racy if set lazily (but not // in the case we care about, where it will have been set in the ctor) _slice = null; } } // support passing arrays of other types instead of having to copy to a ByteBuf[] first interface ByteWrapper(T) { ByteBuf wrap(T bytes); bool isEmpty(T bytes); }
D
/******************************************************************************* copyright: Copyright (c) 2006 Juan Jose Comellas. все rights reserved license: BSD стиль: $(LICENSE) author: Juan Jose Comellas <juanjo@comellas.com.ar> *******************************************************************************/ module io.selector.model; public import time.Time; public import io.model; /** * События, используемые для регистрации Провода к селектору и возвращаемые * в КлючеВыбора после вызова ИСелектор.выбери(). */ enum Событие: бцел { Нет = 0, // No событие // IMPORTANT: Do not change the значения of the following symbols. They were // установи in this way в_ карта the значения returned by the POSIX poll() // system вызов. Чит = (1 << 0), // POLLIN СрочноеЧтение = (1 << 1), // POLLPRI Зап = (1 << 2), // POLLOUT // The following события should not be использован when registering a провод в_ a // selector. They are only использован when returning события в_ the пользователь. Ошибка = (1 << 3), // POLLERR Зависание = (1 << 4), // POLLHUP НеверныйУк = (1 << 5) // POLLNVAL } /** * The КлючВыбора struct holds the information concerning the conduits и * their association в_ a selector. Each ключ keeps a reference в_ a registered * провод и the события that are в_ be tracked for it. The 'события' member * of the ключ can возьми two meanings, depending on where it's использован. If использован * with the регистрируй() метод of the selector it represents the события we want * в_ track; if использован внутри a foreach cycle on an ИНаборВыделений it represents * the события that have been detected for a провод. * * The КлючВыбора can also hold an optional объект via the 'атачмент' * member. This member is very convenient в_ keep application-specific данные * that will be needed when the tracked события are triggered. * * See $(LINK $(CODEURL)io.selector.ИСелектор), * $(LINK $(CODEURL)io.selector.ИНаборВыделений) */ struct КлючВыбора { /** * The провод referred в_ by the КлючВыбора. */ ИВыбираемый провод; /** * The registered (or selected) события as a bit маска of different Событие * значения. */ Событие события; /** * The attached Объект referred в_ by the КлючВыбора. */ Объект атачмент; /** * Check if a Чит событие имеется been associated в_ this КлючВыбора. */ public бул читаем_ли() { return ((события & Событие.Чит) != 0); } /** * Check if an СрочноеЧтение событие имеется been associated в_ this КлючВыбора. */ public бул срочноеЧтен_ли() { return ((события & Событие.СрочноеЧтение) != 0); } /** * Check if a Зап событие имеется been associated в_ this КлючВыбора. */ public бул записываем_ли() { return ((события & Событие.Зап) != 0); } /** * Check if an Ошибка событие имеется been associated в_ this КлючВыбора. */ public бул ошибка_ли() { return ((события & Событие.Ошибка) != 0); } /** * Check if a Зависание событие имеется been associated в_ this КлючВыбора. */ public бул зависание_ли() { return ((события & Событие.Зависание) != 0); } /** * Check if an НеверныйУк событие имеется been associated в_ this КлючВыбора. */ public бул невернУк_ли() { return ((события & Событие.НеверныйУк) != 0); } } /** * Контейнер that holds the КлючВыбора's for все the conduits that have * triggered события during a previous invocation в_ ИСелектор.выбери(). * Instances of this container are normally returned из_ calls в_ * ИСелектор.наборВыд(). */ interface ИНаборВыделений { /** * Returns the число of КлючВыбора's in the установи. */ public abstract бцел длина(); /** * Operator в_ iterate over a установи via a foreach блок. Note that any * modifications в_ the КлючВыбора will be ignored. */ public abstract цел opApply(цел delegate(ref КлючВыбора) дг); } /** * A selector is a multИПlexor for I/O события associated в_ a Провод. * все selectors must implement this interface. * * A selector needs в_ be инициализован by calling the открой() метод в_ пароль * it the начальное amount of conduits that it will укз и the maximum * amount of события that will be returned per вызов в_ выбери(). In Всё cases, * these значения are only hints и may not even be использован by the specific * ИСелектор implementation you choose в_ use, so you cannot сделай any * assumptions regarding что results из_ the вызов в_ выбери() (i.e. you * may принять ещё or less события per вызов в_ выбери() than что was passed * in the 'maxEvents' аргумент. The amount of conduits that the selector can * manage will be incremented dynamically if necessary. * * To добавь or modify провод registrations in the selector, use the регистрируй() * метод. To удали провод registrations из_ the selector, use the * отмениРег() метод. * * To жди for события из_ the conduits you need в_ вызов any of the выбери() * methods. The selector cannot be изменён из_ другой нить while * блокируется on a вызов в_ these methods. * * Once the selector is no longer использован you must вызов the закрой() метод so * that the selector can free any resources it may have allocated in the вызов * в_ открой(). * * Examples: * --- * import io.selector.model; * import io.СокетПровод; * import io.Stdout; * * ИСелектор selector; * СокетПровод conduit1; * СокетПровод conduit2; * MyClass object1; * MyClass object2; * цел eventCount; * * // Initialize the selector assuming that it will deal with 2 conduits и * // will принять 2 события per invocation в_ the выбери() метод. * selector.открой(2, 2); * * selector.регистрируй(провод, Событие.Чит, object1); * selector.регистрируй(провод, Событие.Зап, object2); * * eventCount = selector.выбери(); * * if (eventCount > 0) * { * сим[16] буфер; * цел счёт; * * foreach (КлючВыбора ключ, selector.наборВыд()) * { * if (ключ.читаем_ли()) * { * счёт = (cast(СокетПровод) ключ.провод).читай(буфер); * if (счёт != ИПровод.Кф) * { * Стдвыв.форматируй("Приёмd '{0}' из_ peer\n", буфер[0..счёт]); * selector.регистрируй(ключ.провод, Событие.Зап, ключ.атачмент); * } * else * { * selector.отмениРег(ключ.провод); * ключ.провод.закрой(); * } * } * * if (ключ.записываем_ли()) * { * счёт = (cast(СокетПровод) ключ.провод).пиши("MESSAGE"); * if (счёт != ИПровод.Кф) * { * Стдвыв.выведи("Sent 'MESSAGE' в_ peer\n"); * selector.регистрируй(ключ.провод, Событие.Чит, ключ.атачмент); * } * else * { * selector.отмениРег(ключ.провод); * ключ.провод.закрой(); * } * } * * if (ключ.ошибка_ли() || ключ.зависание_ли() || ключ.невернУк_ли()) * { * selector.отмениРег(ключ.провод); * ключ.провод.закрой(); * } * } * } * * selector.закрой(); * --- */ interface ИСелектор { /** * Initialize the selector. * * Параметры: * размер = значение that provопрes a hint for the maximum amount of * conduits that will be registered * maxEvents = значение that provопрes a hint for the maximum amount of * провод события that will be returned in the выделение * установи per вызов в_ выбери. */ public abstract проц открой(бцел размер, бцел maxEvents); /** * Free any operating system resources that may have been allocated in the * вызов в_ открой(). * * Remarks: * Not все of the selectors need в_ free resources другой than allocated * память, but those that do will normally also добавь a вызов в_ закрой() in * their destructors. */ public abstract проц закрой(); /** * Associate a провод в_ the selector и track specific I/O события. * If the провод is already часть of the selector, modify the события or * atachment. * * Параметры: * провод = провод that will be associated в_ the selector; * must be a действителен провод (i.e. not пусто и открой). * события = bit маска of Событие значения that represent the события that * will be tracked for the провод. * атачмент = optional объект with application-specific данные that will * be available when an событие is triggered for the провод * * Examples: * --- * ИСелектор selector; * СокетПровод провод; * MyClass объект; * * selector.регистрируй(провод, Событие.Чит | Событие.Зап, объект); * --- */ public abstract проц регистрируй(ИВыбираемый провод, Событие события, Объект атачмент = пусто); /** * Deprecated, use регистрируй instead */ deprecated public abstract проц повториРег(ИВыбираемый провод, Событие события, Объект атачмент = пусто); /** * Удали a провод из_ the selector. * * Параметры: * провод = провод that had been previously associated в_ the * selector; it can be пусто. * * Remarks: * Unregistering a пусто провод is allowed и no исключение is thrown * if this happens. */ public abstract проц отмениРег(ИВыбираемый провод); /** * Wait indefinitely for I/O события из_ the registered conduits. * * Возвращает: * The amount of conduits that have Приёмd события; 0 if no conduits * have Приёмd события внутри the specified таймаут и -1 if there * was an ошибка. */ public abstract цел выбери(); /** * Wait for I/O события из_ the registered conduits for a specified * amount of время. * * Параметры: * таймаут = ИнтервалВремени with the maximum amount of время that the * selector will жди for события из_ the conduits; the * amount of время is relative в_ the текущ system время * (i.e. just the число of milliseconds that the selector * имеется в_ жди for the события). * * Возвращает: * The amount of conduits that have Приёмd события; 0 if no conduits * have Приёмd события внутри the specified таймаут. */ public abstract цел выбери(ИнтервалВремени таймаут); /** * Wait for I/O события из_ the registered conduits for a specified * amount of время. * * Note: This representation of таймаут is not always accurate, so it is * possible that the function will return with a таймаут before the * specified период. For ещё accuracy, use the ИнтервалВремени version. * * Note: Implementers should define this метод as: * ------- * выбери(ИнтервалВремени.интервал(таймаут)); * ------- * * Параметры: * таймаут = the maximum amount of время in сек that the * selector will жди for события из_ the conduits; the * amount of время is relative в_ the текущ system время * (i.e. just the число of milliseconds that the selector * имеется в_ жди for the события). * * Возвращает: * The amount of conduits that have Приёмd события; 0 if no conduits * have Приёмd события внутри the specified таймаут. */ public abstract цел выбери(дво таймаут); /** * Return the выделение установи resulting из_ the вызов в_ any of the выбери() * methods. * * Remarks: * If the вызов в_ выбери() was unsuccessful or it dопр not return any * события, the returned значение will be пусто. */ public abstract ИНаборВыделений наборВыд(); /** * Return the выделение ключ resulting из_ the registration of a провод * в_ the selector. * * Remarks: * If the провод is not registered в_ the selector the returned * значение will КлючВыбора.init. No исключение will be thrown by this * метод. */ public abstract КлючВыбора ключ(ИВыбираемый провод); /** * Iterate through the currently registered выделение ключи. Note that you * should not erase or добавь any items из_ the selector while iterating, * although you can регистрируй existing conduits again. */ public abstract цел opApply(цел delegate(ref КлючВыбора sk) дг); }
D
module usingallmembers1; class MyClass { int i; this() { i = 0;} this(int j) { i = j;} ~this() { } void foo() { ++i;} int foo(int j) { return i+j;} } void main() { // Put in an array for a more human-readable printing enum myMembers = [__traits(allMembers, MyClass)]; // See "i" and "foo" in the middle of standard class members // "foo" appears only once, despite it being overloaded. assert(myMembers == ["i", "__ctor", "__dtor", "foo", "toString", "toHash", "opCmp", "opEquals", "Monitor", "factory"]); }
D
// REQUIRED_ARGS: -de // EXTRA_FILES: imports/protectionimp.d import imports.protectionimp; alias TypeTuple(T...) = T; private { void localF() {} class localC {} struct localS {} union localU {} interface localI {} enum localE { foo } mixin template localMT() {} class localTC(T) {} struct localTS(T) {} union localTU(T) {} interface localTI(T) {} void localTF(T)() {} } void main() { // Private non-template declarations static assert(!__traits(compiles, privF())); static assert(!__traits(compiles, privC)); static assert(!__traits(compiles, privS)); static assert(!__traits(compiles, privU)); static assert(!__traits(compiles, privI)); static assert(!__traits(compiles, privE)); static assert(!__traits(compiles, privMT)); // Private local non-template declarations. static assert( __traits(compiles, localF())); static assert( __traits(compiles, localC)); static assert( __traits(compiles, localS)); static assert( __traits(compiles, localU)); static assert( __traits(compiles, localI)); static assert( __traits(compiles, localE)); static assert( __traits(compiles, localMT)); // Private template declarations. static assert(!__traits(compiles, privTF!int())); static assert(!__traits(compiles, privTC!int)); static assert(!__traits(compiles, privTS!int)); static assert(!__traits(compiles, privTU!int)); static assert(!__traits(compiles, privTI!int)); // Private local template declarations. static assert( __traits(compiles, localTF!int())); static assert( __traits(compiles, localTC!int)); static assert( __traits(compiles, localTS!int)); static assert( __traits(compiles, localTU!int)); static assert( __traits(compiles, localTI!int)); // Public template function with private type parameters. static assert(!__traits(compiles, publF!privC())); static assert(!__traits(compiles, publF!privS())); static assert(!__traits(compiles, publF!privU())); static assert(!__traits(compiles, publF!privI())); static assert(!__traits(compiles, publF!privE())); // Public template function with private alias parameters. static assert(!__traits(compiles, publFA!privC())); static assert(!__traits(compiles, publFA!privS())); static assert(!__traits(compiles, publFA!privU())); static assert(!__traits(compiles, publFA!privI())); static assert(!__traits(compiles, publFA!privE())); // Private alias. static assert(!__traits(compiles, privA)); // Public template mixin. static assert( __traits(compiles, publMT)); } /***************************************************/ // https://issues.dlang.org/show_bug.cgi?id=14169 template staticMap14169(alias fun, T...) { static if (T.length > 0) alias staticMap14169 = TypeTuple!(fun!(T[0]), staticMap14169!(fun, T[1..$])); else alias staticMap14169 = TypeTuple!(); } class C14169 { private struct InnerStruct(string NameS) { alias Name = NameS; } alias DimensionNames = staticMap14169!(GetName14169, InnerStruct!"A"); }
D
instance VLK_563_Buddler(Npc_Default) { name[0] = NAME_Buddler; npcType = Npctype_MINE_Ambient; guild = GIL_VLK; level = 4; voice = 3; id = 563; attribute[ATR_STRENGTH] = 30; attribute[ATR_DEXTERITY] = 20; attribute[ATR_MANA_MAX] = 0; attribute[ATR_MANA] = 0; attribute[ATR_HITPOINTS_MAX] = 118; attribute[ATR_HITPOINTS] = 118; Mdl_SetVisual(self,"HUMANS.MDS"); Mdl_ApplyOverlayMds(self,"Humans_Tired.mds"); Mdl_SetVisualBody(self,"hum_body_Naked0",3,1,"Hum_Head_Fighter",73,1,vlk_armor_l); B_Scale(self); Mdl_SetModelFatness(self,0); fight_tactic = FAI_HUMAN_COWARD; EquipItem(self,ItMw_1H_Nailmace_01); CreateInvItem(self,ItMwPickaxe); CreateInvItem(self,ItFoLoaf); CreateInvItem(self,ItFoBeer); CreateInvItem(self,ItLsTorch); daily_routine = Rtn_start_563; }; func void Rtn_start_563() { TA_PickOre(21,0,4,0,"OM_PICKORE_11B"); TA_PickOre(4,0,21,0,"OM_PICKORE_11B"); };
D
module ogre.general.platform; import core.cpuid; import std.conv; import ogre.general.generals; import ogre.general.log; /** \addtogroup Core * @{ */ /** \addtogroup General * @{ */ /** Class which provides the run-time platform information Ogre runs on. @remarks Ogre is designed to be platform-independent, but some platform and run-time environment specific optimised functions are built-in to maximise performance, and those special optimised routines are need to determine run-time environment for select variant executing path. @par This class manages that provides a couple of functions to determine platform information of the run-time environment. @note This class is supposed to use by advanced user only. Assumes that it is run only on modern x86 / x86_64. */ class PlatformInformation { public: /// Enum describing the different CPU features we want to check for, platform-dependent enum CpuFeatures { //#if OGRE_CPU == OGRE_CPU_X86 CPU_FEATURE_SSE = 1 << 0, CPU_FEATURE_SSE2 = 1 << 1, CPU_FEATURE_SSE3 = 1 << 2, CPU_FEATURE_MMX = 1 << 3, CPU_FEATURE_MMXEXT = 1 << 4, CPU_FEATURE_3DNOW = 1 << 5, CPU_FEATURE_3DNOWEXT = 1 << 6, CPU_FEATURE_CMOV = 1 << 7, CPU_FEATURE_TSC = 1 << 8, CPU_FEATURE_FPU = 1 << 9, CPU_FEATURE_PRO = 1 << 10, CPU_FEATURE_HTT = 1 << 11, //#elif OGRE_CPU == OGRE_CPU_ARM // CPU_FEATURE_VFP = 1 << 12, // CPU_FEATURE_NEON = 1 << 13, //#endif CPU_FEATURE_NONE = 0 } static int _isSupportCpuid() { return true; } static bool _checkOperatingSystemSupportSSE() { return true; } /** Gets a string of the CPU identifier. @note Actual detecting are performs in the first time call to this function, and then all future calls with return internal cached value. */ static string getCpuIdentifier() { return vendor() ~ " " ~ processor(); } /** Gets a or-masked of enum CpuFeatures that are supported by the CPU. @note Actual detecting are performs in the first time call to this function, and then all future calls with return internal cached value. */ static uint getCpuFeatures() { uint feat = 0; if(sse) feat |= CpuFeatures.CPU_FEATURE_SSE; if(sse2) feat |= CpuFeatures.CPU_FEATURE_SSE2; if(sse3) feat |= CpuFeatures.CPU_FEATURE_SSE3; if(mmx) feat |= CpuFeatures.CPU_FEATURE_MMX; if(amdMmx) //TODO CPU_FEATURE_MMXEXT? feat |= CpuFeatures.CPU_FEATURE_MMXEXT; if(amd3dnow) feat |= CpuFeatures.CPU_FEATURE_3DNOW; if(amd3dnowExt) feat |= CpuFeatures.CPU_FEATURE_3DNOWEXT; if(hasCmov) feat |= CpuFeatures.CPU_FEATURE_CMOV; if(hasRdtsc) feat |= CpuFeatures.CPU_FEATURE_TSC; if(x87onChip) feat |= CpuFeatures.CPU_FEATURE_FPU; if(false)//TODO CPU_FEATURE_PRO? feat |= CpuFeatures.CPU_FEATURE_PRO; if(hyperThreading)//TODO CPU_FEATURE_HTT? feat |= CpuFeatures.CPU_FEATURE_HTT; uint sse_features = CpuFeatures.CPU_FEATURE_SSE | CpuFeatures.CPU_FEATURE_SSE2 | CpuFeatures.CPU_FEATURE_SSE3; if ((feat & sse_features) && !_checkOperatingSystemSupportSSE()) { feat &= ~sse_features; } return feat; } /** Gets whether a specific feature is supported by the CPU. @note Actual detecting are performs in the first time call to this function, and then all future calls with return internal cached value. */ static bool hasCpuFeature(CpuFeatures feature) { final switch(feature) { case CpuFeatures.CPU_FEATURE_SSE: return sse; case CpuFeatures.CPU_FEATURE_SSE2: return sse2; case CpuFeatures.CPU_FEATURE_SSE3: return sse3; case CpuFeatures.CPU_FEATURE_MMX: return mmx; case CpuFeatures.CPU_FEATURE_MMXEXT: //TODO CPU_FEATURE_MMXEXT? return amdMmx; case CpuFeatures.CPU_FEATURE_3DNOW: return amd3dnow; case CpuFeatures.CPU_FEATURE_3DNOWEXT: return amd3dnowExt; case CpuFeatures.CPU_FEATURE_CMOV: return hasCmov; case CpuFeatures.CPU_FEATURE_TSC: return hasRdtsc; case CpuFeatures.CPU_FEATURE_FPU: return x87onChip; case CpuFeatures.CPU_FEATURE_PRO: //TODO CPU_FEATURE_PRO? return false; case CpuFeatures.CPU_FEATURE_HTT: //TODO CPU_FEATURE_HTT? return hyperThreading; case CpuFeatures.CPU_FEATURE_NONE: return false; } } /** Write the CPU information to the passed in Log */ static void log(ref Log pLog) { pLog.logMessage("CPU Identifier & Features"); pLog.logMessage("-------------------------"); pLog.logMessage(" * CPU ID: " ~ getCpuIdentifier()); //#if OGRE_CPU == OGRE_CPU_X86 if(_isSupportCpuid()) { pLog.logMessage( " * SSE: " ~ std.conv.to!string(hasCpuFeature(CpuFeatures.CPU_FEATURE_SSE))); pLog.logMessage( " * SSE2: " ~ std.conv.to!string(hasCpuFeature(CpuFeatures.CPU_FEATURE_SSE2))); pLog.logMessage( " * SSE3: " ~ std.conv.to!string(hasCpuFeature(CpuFeatures.CPU_FEATURE_SSE3))); pLog.logMessage( " * MMX: " ~ std.conv.to!string(hasCpuFeature(CpuFeatures.CPU_FEATURE_MMX))); pLog.logMessage( " * MMXEXT: " ~ std.conv.to!string(hasCpuFeature(CpuFeatures.CPU_FEATURE_MMXEXT))); pLog.logMessage( " * 3DNOW: " ~ std.conv.to!string(hasCpuFeature(CpuFeatures.CPU_FEATURE_3DNOW))); pLog.logMessage( " * 3DNOWEXT: " ~ std.conv.to!string(hasCpuFeature(CpuFeatures.CPU_FEATURE_3DNOWEXT))); pLog.logMessage( " * CMOV: " ~ std.conv.to!string(hasCpuFeature(CpuFeatures.CPU_FEATURE_CMOV))); pLog.logMessage( " * TSC: " ~ std.conv.to!string(hasCpuFeature(CpuFeatures.CPU_FEATURE_TSC))); pLog.logMessage( " * FPU: " ~ std.conv.to!string(hasCpuFeature(CpuFeatures.CPU_FEATURE_FPU))); pLog.logMessage( " * PRO: " ~ std.conv.to!string(hasCpuFeature(CpuFeatures.CPU_FEATURE_PRO))); pLog.logMessage( " * HT: " ~ std.conv.to!string(hasCpuFeature(CpuFeatures.CPU_FEATURE_HTT))); } //#elif OGRE_CPU == OGRE_CPU_ARM || OGRE_PLATFORM == OGRE_PLATFORM_ANDROID //pLog.logMessage( // " * VFP: " ~ std.conv.to!string(hasCpuFeature(CpuFeatures.CPU_FEATURE_VFP))); //pLog.logMessage( // " * NEON: " ~ std.conv.to!string(hasCpuFeature(CpuFeatures.CPU_FEATURE_NEON))); //#endif pLog.logMessage("-------------------------"); } } /** @} */ /** @} */
D
module android.java.android.graphics.ComposeShader; public import android.java.android.graphics.ComposeShader_d_interface; import arsd.jni : ImportExportImpl; mixin ImportExportImpl!ComposeShader; import import5 = android.java.java.lang.Class;
D
import std.stdio, std.range; import peparser; int main(string[] args) { if (args.length == 1) { stderr.writefln("[Usage] %s <PE FILE>", args[0]); return 1; } auto f = File(args[1], "rb"); auto pe = readPE(f); writeln("===RESOURCES==="); writeln("NAME\t\tVALUE"); foreach(res;pe.resources) { writeln(res.Name, "\t\t", res.Value); } return 0; }
D
/* Copyright (c) 1996 Blake McBride All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include <math.h> defclass Character : Number { char iVal; }; cmeth gNewWithChar, <vNew> (int val) { object obj = gNew(super); ivType *iv = ivPtr(obj); iVal = (char) val; return(obj); } imeth gStringRepValue() { return vSprintf(String, "'%c'", iVal); } imeth char gCharValue() { return (char) iVal; } imeth short gShortValue() { return (short) iVal; } imeth unsigned short gUnsignedShortValue() { return (unsigned short) iVal; } imeth long gLongValue() { return (long) iVal; } imeth double gDoubleValue() { return (double) iVal; } imeth gChangeValue(val) { ChkArg(val, 2); iVal = gCharValue(val); return self; } imeth gChangeCharValue(int val) { iVal = (char) val; return self; } imeth gChangeShortValue(int val) { iVal = (char) val; return self; } imeth gChangeUShortValue(unsigned val) { iVal = (char) val; return self; } imeth gChangeLongValue(long val) { iVal = (char) val; return self; } imeth gChangeDoubleValue(double val) { iVal = (char) val; return self; } imeth void *gPointerValue() { return (void *) &iVal; } imeth gFormatChar, <vFormat> () { char b[2]; b[0] = iVal; b[1] = '\0'; return gNewWithStr(String, b); } imeth int gHash() { double t; t = .6125423371 * (unsigned) iVal; t = t < 0.0 ? -t : t; return (int) (BIG_INT * (t - floor(t))); } imeth int gCompare(obj) { short sv, ov; ChkArg(obj, 2); if (ClassOf(obj) != CLASS) return gCompare(super, obj); if ((sv=iVal) < (ov=ivPtr(obj)->iVal)) return -1; else if (sv == ov) return 0; else return 1; }
D
import core.sync.rwmutex; import std.stdio; void main() { auto lock = new ReadWriteMutex; auto val = 10; // うーん synchronized (lock.reader) { synchronized (lock.reader) { writeln("v1 = ", val); writeln("v2 = ", val); } } { auto v = lock.writer; synchronized (v) { val = 7; writeln("v = ", val); } } }
D
module matrix.olm; struct OlmAccount; struct OlmSession; struct OlmUtility; import std.file : read; char[] read_random(size_t rnd_len) { return cast(char[]) read("/dev/urandom", rnd_len); } extern (C): // copy&pasted from olm.h /** Get the version number of the library. * Arguments will be updated if non-null. */ void olm_get_library_version(ubyte *major, ubyte *minor, ubyte *patch); /** The size of an account object in bytes */ size_t olm_account_size(); /** The size of a session object in bytes */ size_t olm_session_size(); /** The size of a utility object in bytes */ size_t olm_utility_size(); /** Initialise an account object using the supplied memory * The supplied memory must be at least olm_account_size() bytes */ OlmAccount * olm_account( void * memory ); /** Initialise a session object using the supplied memory * The supplied memory must be at least olm_session_size() bytes */ OlmSession * olm_session( void * memory ); /** Initialise a utility object using the supplied memory * The supplied memory must be at least olm_utility_size() bytes */ OlmUtility * olm_utility( void * memory ); /** The value that olm will return from a function if there was an error */ size_t olm_error(); /** A null terminated string describing the most recent error to happen to an * account */ const(char*) olm_account_last_error( OlmAccount * account ); /** A null terminated string describing the most recent error to happen to a * session */ const(char*) olm_session_last_error( OlmSession * session ); /** A null terminated string describing the most recent error to happen to a * utility */ const(char*) olm_utility_last_error( OlmUtility * utility ); /** Clears the memory used to back this account */ size_t olm_clear_account( OlmAccount * account ); /** Clears the memory used to back this session */ size_t olm_clear_session( OlmSession * session ); /** Clears the memory used to back this utility */ size_t olm_clear_utility( OlmUtility * utility ); /** Returns the number of bytes needed to store an account */ size_t olm_pickle_account_length( OlmAccount * account ); /** Returns the number of bytes needed to store a session */ size_t olm_pickle_session_length( OlmSession * session ); /** Stores an account as a base64 string. Encrypts the account using the * supplied key. Returns the length of the pickled account on success. * Returns olm_error() on failure. If the pickle output buffer * is smaller than olm_pickle_account_length() then * olm_account_last_error() will be "OUTPUT_BUFFER_TOO_SMALL" */ size_t olm_pickle_account( OlmAccount * account, const void * key, size_t key_length, void * pickled, size_t pickled_length ); /** Stores a session as a base64 string. Encrypts the session using the * supplied key. Returns the length of the pickled session on success. * Returns olm_error() on failure. If the pickle output buffer * is smaller than olm_pickle_session_length() then * olm_session_last_error() will be "OUTPUT_BUFFER_TOO_SMALL" */ size_t olm_pickle_session( OlmSession * session, const void * key, size_t key_length, void * pickled, size_t pickled_length ); /** Loads an account from a pickled base64 string. Decrypts the account using * the supplied key. Returns olm_error() on failure. If the key doesn't * match the one used to encrypt the account then olm_account_last_error() * will be "BAD_ACCOUNT_KEY". If the base64 couldn't be decoded then * olm_account_last_error() will be "INVALID_BASE64". The input pickled * buffer is destroyed */ size_t olm_unpickle_account( OlmAccount * account, const(void)* key, size_t key_length, void * pickled, size_t pickled_length ); /** Loads a session from a pickled base64 string. Decrypts the session using * the supplied key. Returns olm_error() on failure. If the key doesn't * match the one used to encrypt the account then olm_session_last_error() * will be "BAD_ACCOUNT_KEY". If the base64 couldn't be decoded then * olm_session_last_error() will be "INVALID_BASE64". The input pickled * buffer is destroyed */ size_t olm_unpickle_session( OlmSession * session, const void * key, size_t key_length, void * pickled, size_t pickled_length ); /** The number of random bytes needed to create an account.*/ size_t olm_create_account_random_length( OlmAccount * account ); /** Creates a new account. Returns olm_error() on failure. If weren't * enough random bytes then olm_account_last_error() will be * "NOT_ENOUGH_RANDOM" */ size_t olm_create_account( OlmAccount * account, void * random, size_t random_length ); /** The size of the output buffer needed to hold the identity keys */ size_t olm_account_identity_keys_length( OlmAccount * account ); /** Writes the public parts of the identity keys for the account into the * identity_keys output buffer. Returns olm_error() on failure. If the * identity_keys buffer was too small then olm_account_last_error() will be * "OUTPUT_BUFFER_TOO_SMALL". */ size_t olm_account_identity_keys( OlmAccount * account, void * identity_keys, size_t identity_key_length ); /** The length of an ed25519 signature encoded as base64. */ size_t olm_account_signature_length( OlmAccount * account ); /** Signs a message with the ed25519 key for this account. Returns olm_error() * on failure. If the signature buffer was too small then * olm_account_last_error() will be "OUTPUT_BUFFER_TOO_SMALL" */ size_t olm_account_sign( OlmAccount * account, const void * message, size_t message_length, void * signature, size_t signature_length ); /** The size of the output buffer needed to hold the one time keys */ size_t olm_account_one_time_keys_length( OlmAccount * account ); /** Writes the public parts of the unpublished one time keys for the account * into the one_time_keys output buffer. * <p> * The returned data is a JSON-formatted object with the single property * <tt>curve25519</tt>, which is itself an object mapping key id to * base64-encoded Curve25519 key. For example: * <pre> * { * curve25519: { * "AAAAAA": "wo76WcYtb0Vk/pBOdmduiGJ0wIEjW4IBMbbQn7aSnTo", * "AAAAAB": "LRvjo46L1X2vx69sS9QNFD29HWulxrmW11Up5AfAjgU" * } * } * </pre> * Returns olm_error() on failure. * <p> * If the one_time_keys buffer was too small then olm_account_last_error() * will be "OUTPUT_BUFFER_TOO_SMALL". */ size_t olm_account_one_time_keys( OlmAccount * account, void * one_time_keys, size_t one_time_keys_length ); /** Marks the current set of one time keys as being published. */ size_t olm_account_mark_keys_as_published( OlmAccount * account ); /** The largest number of one time keys this account can store. */ size_t olm_account_max_number_of_one_time_keys( OlmAccount * account ); /** The number of random bytes needed to generate a given number of new one * time keys. */ size_t olm_account_generate_one_time_keys_random_length( OlmAccount * account, size_t number_of_keys ); /** Generates a number of new one time keys. If the total number of keys stored * by this account exceeds max_number_of_one_time_keys() then the old keys are * discarded. Returns olm_error() on error. If the number of random bytes is * too small then olm_account_last_error() will be "NOT_ENOUGH_RANDOM". */ size_t olm_account_generate_one_time_keys( OlmAccount * account, size_t number_of_keys, void * random, size_t random_length ); /** The number of random bytes needed to create an outbound session */ size_t olm_create_outbound_session_random_length( OlmSession * session ); /** Creates a new out-bound session for sending messages to a given identity_key * and one_time_key. Returns olm_error() on failure. If the keys couldn't be * decoded as base64 then olm_session_last_error() will be "INVALID_BASE64" * If there weren't enough random bytes then olm_session_last_error() will * be "NOT_ENOUGH_RANDOM". */ size_t olm_create_outbound_session( OlmSession * session, OlmAccount * account, const void * their_identity_key, size_t their_identity_key_length, const void * their_one_time_key, size_t their_one_time_key_length, void * random, size_t random_length ); /** Create a new in-bound session for sending/receiving messages from an * incoming PRE_KEY message. Returns olm_error() on failure. If the base64 * couldn't be decoded then olm_session_last_error will be "INVALID_BASE64". * If the message was for an unsupported protocol version then * olm_session_last_error() will be "BAD_MESSAGE_VERSION". If the message * couldn't be decoded then then olm_session_last_error() will be * "BAD_MESSAGE_FORMAT". If the message refers to an unknown one time * key then olm_session_last_error() will be "BAD_MESSAGE_KEY_ID". */ size_t olm_create_inbound_session( OlmSession * session, OlmAccount * account, void * one_time_key_message, size_t message_length ); /** Create a new in-bound session for sending/receiving messages from an * incoming PRE_KEY message. Returns olm_error() on failure. If the base64 * couldn't be decoded then olm_session_last_error will be "INVALID_BASE64". * If the message was for an unsupported protocol version then * olm_session_last_error() will be "BAD_MESSAGE_VERSION". If the message * couldn't be decoded then then olm_session_last_error() will be * "BAD_MESSAGE_FORMAT". If the message refers to an unknown one time * key then olm_session_last_error() will be "BAD_MESSAGE_KEY_ID". */ size_t olm_create_inbound_session_from( OlmSession * session, OlmAccount * account, const void * their_identity_key, size_t their_identity_key_length, void * one_time_key_message, size_t message_length ); /** The length of the buffer needed to return the id for this session. */ size_t olm_session_id_length( OlmSession * session ); /** An identifier for this session. Will be the same for both ends of the * conversation. If the id buffer is too small then olm_session_last_error() * will be "OUTPUT_BUFFER_TOO_SMALL". */ size_t olm_session_id( OlmSession * session, void * id, size_t id_length ); int olm_session_has_received_message( OlmSession *session ); /** Checks if the PRE_KEY message is for this in-bound session. This can happen * if multiple messages are sent to this account before this account sends a * message in reply. Returns 1 if the session matches. Returns 0 if the session * does not match. Returns olm_error() on failure. If the base64 * couldn't be decoded then olm_session_last_error will be "INVALID_BASE64". * If the message was for an unsupported protocol version then * olm_session_last_error() will be "BAD_MESSAGE_VERSION". If the message * couldn't be decoded then then olm_session_last_error() will be * "BAD_MESSAGE_FORMAT". */ size_t olm_matches_inbound_session( OlmSession * session, void * one_time_key_message, size_t message_length ); /** Checks if the PRE_KEY message is for this in-bound session. This can happen * if multiple messages are sent to this account before this account sends a * message in reply. Returns 1 if the session matches. Returns 0 if the session * does not match. Returns olm_error() on failure. If the base64 * couldn't be decoded then olm_session_last_error will be "INVALID_BASE64". * If the message was for an unsupported protocol version then * olm_session_last_error() will be "BAD_MESSAGE_VERSION". If the message * couldn't be decoded then then olm_session_last_error() will be * "BAD_MESSAGE_FORMAT". */ size_t olm_matches_inbound_session_from( OlmSession * session, const void * their_identity_key, size_t their_identity_key_length, void * one_time_key_message, size_t message_length ); /** Removes the one time keys that the session used from the account. Returns * olm_error() on failure. If the account doesn't have any matching one time * keys then olm_account_last_error() will be "BAD_MESSAGE_KEY_ID". */ size_t olm_remove_one_time_keys( OlmAccount * account, OlmSession * session ); /** The type of the next message that olm_encrypt() will return. Returns * OLM_MESSAGE_TYPE_PRE_KEY if the message will be a PRE_KEY message. * Returns OLM_MESSAGE_TYPE_MESSAGE if the message will be a normal message. * Returns olm_error on failure. */ size_t olm_encrypt_message_type( OlmSession * session ); /** The number of random bytes needed to encrypt the next message. */ size_t olm_encrypt_random_length( OlmSession * session ); /** The size of the next message in bytes for the given number of plain-text * bytes. */ size_t olm_encrypt_message_length( OlmSession * session, size_t plaintext_length ); /** Encrypts a message using the session. Returns the length of the message in * bytes on success. Writes the message as base64 into the message buffer. * Returns olm_error() on failure. If the message buffer is too small then * olm_session_last_error() will be "OUTPUT_BUFFER_TOO_SMALL". If there * weren't enough random bytes then olm_session_last_error() will be * "NOT_ENOUGH_RANDOM". */ size_t olm_encrypt( OlmSession * session, const void * plaintext, size_t plaintext_length, void * random, size_t random_length, void * message, size_t message_length ); /** The maximum number of bytes of plain-text a given message could decode to. * The actual size could be different due to padding. The input message buffer * is destroyed. Returns olm_error() on failure. If the message base64 * couldn't be decoded then olm_session_last_error() will be * "INVALID_BASE64". If the message is for an unsupported version of the * protocol then olm_session_last_error() will be "BAD_MESSAGE_VERSION". * If the message couldn't be decoded then olm_session_last_error() will be * "BAD_MESSAGE_FORMAT". */ size_t olm_decrypt_max_plaintext_length( OlmSession * session, size_t message_type, void * message, size_t message_length ); /** Decrypts a message using the session. The input message buffer is destroyed. * Returns the length of the plain-text on success. Returns olm_error() on * failure. If the plain-text buffer is smaller than * olm_decrypt_max_plaintext_length() then olm_session_last_error() * will be "OUTPUT_BUFFER_TOO_SMALL". If the base64 couldn't be decoded then * olm_session_last_error() will be "INVALID_BASE64". If the message is for * an unsupported version of the protocol then olm_session_last_error() will * be "BAD_MESSAGE_VERSION". If the message couldn't be decoded then * olm_session_last_error() will be BAD_MESSAGE_FORMAT". * If the MAC on the message was invalid then olm_session_last_error() will * be "BAD_MESSAGE_MAC". */ size_t olm_decrypt( OlmSession * session, size_t message_type, void * message, size_t message_length, void * plaintext, size_t max_plaintext_length ); /** The length of the buffer needed to hold the SHA-256 hash. */ size_t olm_sha256_length( OlmUtility * utility ); /** Calculates the SHA-256 hash of the input and encodes it as base64. If the * output buffer is smaller than olm_sha256_length() then * olm_session_last_error() will be "OUTPUT_BUFFER_TOO_SMALL". */ size_t olm_sha256( OlmUtility * utility, const void * input, size_t input_length, void * output, size_t output_length ); /** Verify an ed25519 signature. If the key was too small then * olm_session_last_error will be "INVALID_BASE64". If the signature was invalid * then olm_session_last_error() will be "BAD_MESSAGE_MAC". */ size_t olm_ed25519_verify( OlmUtility * utility, const void * key, size_t key_length, const void * message, size_t message_length, void * signature, size_t signature_length );
D
/* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ module flow.engine.impl.bpmn.behavior.BoundaryConditionalEventActivityBehavior; import flow.bpmn.model.ConditionalEventDefinition; import flow.common.api.deleg.Expression; import flow.common.api.deleg.event.FlowableEngineEventType; import flow.common.api.deleg.event.FlowableEventDispatcher; import flow.common.context.Context; import flow.common.interceptor.CommandContext; import flow.engine.deleg.DelegateExecution; import flow.engine.deleg.event.impl.FlowableEventBuilder; import flow.engine.impl.persistence.entity.ExecutionEntity; import flow.engine.impl.util.CommandContextUtil; import flow.engine.impl.bpmn.behavior.BoundaryEventActivityBehavior; import hunt.Boolean; /** * @author Tijs Rademakers */ class BoundaryConditionalEventActivityBehavior : BoundaryEventActivityBehavior { protected ConditionalEventDefinition conditionalEventDefinition; protected string conditionExpression; this(ConditionalEventDefinition conditionalEventDefinition, string conditionExpression, bool interrupting) { super(interrupting); this.conditionalEventDefinition = conditionalEventDefinition; this.conditionExpression = conditionExpression; } override public void execute(DelegateExecution execution) { CommandContext commandContext = Context.getCommandContext(); ExecutionEntity executionEntity = cast(ExecutionEntity) execution; FlowableEventDispatcher eventDispatcher = CommandContextUtil.getProcessEngineConfiguration(commandContext).getEventDispatcher(); if (eventDispatcher !is null && eventDispatcher.isEnabled()) { eventDispatcher.dispatchEvent(FlowableEventBuilder.createConditionalEvent(FlowableEngineEventType.ACTIVITY_CONDITIONAL_WAITING, executionEntity.getActivityId(), conditionExpression, executionEntity.getId(), executionEntity.getProcessInstanceId(), executionEntity.getProcessDefinitionId())); } } override public void trigger(DelegateExecution execution, string triggerName, Object triggerData) { CommandContext commandContext = Context.getCommandContext(); ExecutionEntity executionEntity = cast(ExecutionEntity) execution; Expression expression = CommandContextUtil.getProcessEngineConfiguration(commandContext).getExpressionManager().createExpression(conditionExpression); Object result = expression.getValue(execution); if (result !is null && cast(Boolean)result !is null && (cast(Boolean) result).booleanValue()) { CommandContextUtil.getActivityInstanceEntityManager(commandContext).recordActivityStart(executionEntity); FlowableEventDispatcher eventDispatcher = CommandContextUtil.getProcessEngineConfiguration(commandContext).getEventDispatcher(); if (eventDispatcher !is null && eventDispatcher.isEnabled()) { eventDispatcher.dispatchEvent(FlowableEventBuilder.createConditionalEvent(FlowableEngineEventType.ACTIVITY_CONDITIONAL_RECEIVED, executionEntity.getActivityId(), conditionExpression, executionEntity.getId(), executionEntity.getProcessInstanceId(), executionEntity.getProcessDefinitionId())); } if (interrupting) { executeInterruptingBehavior(executionEntity, commandContext); } else { executeNonInterruptingBehavior(executionEntity, commandContext); } } } }
D
ZUNMTR (F08FUF) Example Program Data 4 :Value of N 'L' :Value of UPLO (-2.28, 0.00) ( 1.78, 2.03) (-1.12, 0.00) ( 2.26,-0.10) ( 0.01,-0.43) (-0.37, 0.00) (-0.12,-2.53) (-1.07,-0.86) ( 2.31, 0.92) (-0.73, 0.00) :End of matrix A
D
/* REQUIRED_ARGS: -preview=dip1000 TEST_OUTPUT: --- fail_compilation/retscope.d(22): Error: scope parameter `p` may not be returned fail_compilation/retscope.d(32): Error: returning `b ? nested1(& i) : nested2(& j)` escapes a reference to local variable `j` fail_compilation/retscope.d(45): Error: scope variable `p` assigned to global variable `q` fail_compilation/retscope.d(47): Error: address of variable `i` assigned to `q` with longer lifetime fail_compilation/retscope.d(48): Error: scope variable `a` assigned to global variable `b` fail_compilation/retscope.d(49): Error: address of struct temporary returned by `(*fp2)()` assigned to longer lived variable `q` --- */ int* foo1(return scope int* p) @safe { return p; } // ok int* foo2()(scope int* p) @safe { return p; } // ok, 'return' is inferred alias foo2a = foo2!(); int* foo3(scope int* p) @safe { return p; } // error int* foo4(bool b) @safe { int i; int j; int* nested1(scope int* p) { return null; } int* nested2(return scope int* p) { return p; } return b ? nested1(&i) : nested2(&j); } /************************************************/ struct S2 { int a,b,c,d; } @safe S2 function() fp2; void test2(scope int* p, int[] a ...) @safe { static int* q; static int[] b; q = p; int i; q = &i; b = a; q = &fp2().d; } /**************************************************/ /* TEST_OUTPUT: --- fail_compilation/retscope.d(75): Error: function `retscope.HTTP.Impl.onReceive` is `@nogc` yet allocates closure for `onReceive()` with the GC fail_compilation/retscope.d(77): `retscope.HTTP.Impl.onReceive.__lambda1` closes over variable `this` at fail_compilation/retscope.d(75) --- */ struct Curl { int delegate() dg; } struct HTTP { struct Impl { Curl curl; int x; @nogc void onReceive() { auto dg = ( ) { return x; }; curl.dg = dg; } } } /***********************************************/ /* TEST_OUTPUT: --- fail_compilation/retscope.d(96): Error: reference to local variable `sa` assigned to non-scope parameter `a` calling `bar8` --- */ // https://issues.dlang.org/show_bug.cgi?id=8838 int[] foo8() @safe { int[5] sa; return bar8(sa); } int[] bar8(int[] a) @safe { return a; } /*************************************************/ /* TEST_OUTPUT: --- fail_compilation/retscope.d(123): Error: returning `foo9(cast(char[])tmp)` escapes a reference to local variable `tmp` --- */ char[] foo9(return char[] a) @safe pure nothrow @nogc { return a; } char[] bar9() @safe { char[20] tmp; foo9(tmp); // ok return foo9(tmp); // error } /*************************************************/ /* // // //fail_compilation/retscope.d(143): To enforce `@safe`, the compiler allocates a closure unless `opApply()` uses `scope` // */ struct S10 { static int opApply(int delegate(S10*) dg); } S10* test10() { foreach (S10* m; S10) return m; return null; } /************************************************/ /* TEST_OUTPUT: --- fail_compilation/retscope.d(158): Error: scope parameter `this` may not be returned --- */ class C11 { @safe C11 foo() scope { return this; } } /****************************************************/ /* TEST_OUTPUT: --- fail_compilation/retscope.d(177): Error: address of variable `i` assigned to `p` with longer lifetime --- */ void foo11() @safe { int[] p; int[3] i; p = i[]; } /************************************************/ /* TEST_OUTPUT: --- fail_compilation/retscope.d(197): Error: scope variable `e` may not be returned --- */ struct Escaper { void* DG; } void* escapeDg1(scope void* d) @safe { Escaper e; e.DG = d; return e.DG; } /*************************************************/ /* TEST_OUTPUT: --- fail_compilation/retscope.d(212): Error: scope variable `p` assigned to non-scope `e.e` --- */ struct Escaper3 { void* e; } void* escape3 (scope void* p) @safe { Escaper3 e; scope dg = () { return e.e; }; e.e = p; return dg(); } /**************************************************/ /* TEST_OUTPUT: --- fail_compilation/retscope.d(229): Error: scope parameter `ptr` may not be returned --- */ alias dg_t = void* delegate () return scope @safe; void* funretscope(scope dg_t ptr) @safe { return ptr(); } /*****************************************************/ /* TEST_OUTPUT: --- fail_compilation/retscope.d(248): Error: cannot implicitly convert expression `__lambda2` of type `void* delegate() pure nothrow @nogc @safe` to `void* delegate() scope @safe` fail_compilation/retscope.d(248): Error: cannot implicitly convert expression `__lambda2` of type `void* delegate() pure nothrow @nogc @safe` to `void* delegate() scope @safe` fail_compilation/retscope.d(249): Error: cannot implicitly convert expression `__lambda4` of type `void* delegate() pure nothrow @nogc @safe` to `void* delegate() scope @safe` fail_compilation/retscope.d(249): Error: cannot implicitly convert expression `__lambda4` of type `void* delegate() pure nothrow @nogc @safe` to `void* delegate() scope @safe` --- */ void escape4() @safe { alias FunDG = void* delegate () scope @safe; int x = 42; scope FunDG f = () return { return &x; }; scope FunDG g = () { return &x; }; } /**************************************************/ /* TEST_OUTPUT: --- fail_compilation/retscope.d(266): Error: cannot take address of `scope` variable `p` since `scope` applies to first indirection only --- */ void escape5() @safe { int* q; scope int* p; scope int** pp = &q; // ok pp = &p; // error } /***********************************************/ /* TEST_OUTPUT: --- fail_compilation/retscope.d(286): Error: returning `foo6(& b)` escapes a reference to local variable `b` --- */ @safe int* foo6()(int* arg) { return arg; } int* escape6() @safe { int b; return foo6(&b); } /***************************************************/ struct S7 { int[10] a; int[3] abc(int i) @safe { return a[0 .. 3]; // should not error } } /***************************************************/ int[3] escape8(scope int[] p) @safe { return p[0 .. 3]; } // should not error char*[3] escape9(scope char*[] p) @safe { return p[0 .. 3]; } /***************************************************/ /* TEST_OUTPUT: --- fail_compilation/retscope.d(319): Error: reference to local variable `i` assigned to non-scope `f` --- */ int* escape10() @safe { int i; int* f; scope int** x = &f; f = &i; return bar10(x); } int* bar10( scope int** ptr ) @safe { return *ptr; } /******************************************/ /* TEST_OUTPUT: --- fail_compilation/retscope.d(342): Error: cannot take address of `scope` variable `aa` since `scope` applies to first indirection only --- */ int* escape11() @safe { int i; int*[3] aa = [ &i, null, null ]; return bar11(&aa[0]); } int* bar11(scope int** x) @safe { return foo11(*x); } int* foo11(int* x) @safe { return x; } /******************************************/ void escape15() @safe { int arg; const(void)*[1] argsAddresses; argsAddresses[0] = // MUST be an array assignment (ref arg)@trusted{ return cast(const void*) &arg; }(arg); } /******************************************/ /* TEST_OUTPUT: --- fail_compilation/retscope.d(1003): Error: returning `f.foo()` escapes a reference to local variable `f` --- */ #line 1000 int* escape12() @safe { Foo12 f; return f.foo; } struct Foo12 { int* foo() return @safe; } /******************************************/ /* TEST_OUTPUT: --- fail_compilation/retscope.d(1103): Error: scope variable `f` may not be returned --- */ #line 1100 int* escape13() @safe { scope Foo13 f; return f.foo; } class Foo13 { int* foo() return @safe; } /******************************************/ /* TEST_OUTPUT: --- fail_compilation/retscope.d(1205): Error: scope variable `f14` calling non-scope member function `Foo14.foo()` --- */ #line 1200 int* escape14() @safe { int i; Foo14 f14; f14.v = &i; return f14.foo; } struct Foo14 { int* v; int* foo () @safe { return this.v; } } /******************************************/ /* TEST_OUTPUT: --- fail_compilation/retscope.d(1311): Error: scope variable `u2` assigned to `ek` with longer lifetime --- */ #line 1300 @safe struct U13 { int* k; int* get() return scope { return k; } static int* sget(return scope ref U13 u) { return u.k; } } @safe void foo13() { int* ek; int i; auto u2 = U13(&i); ek = U13.sget(u2); // Error: scope variable u2 assigned to ek with longer lifetime auto u1 = U13(new int); ek = u1.get(); // ok ek = U13.sget(u1); // ok } /************************************************/ /* TEST_OUTPUT: --- fail_compilation/retscope.d(1405): Error: reference to local variable `buf` assigned to non-scope anonymous parameter calling `myprintf` --- */ #line 1400 @trusted extern(C) int myprintf(const(char)*, ...); @safe void foo14() { char[4] buf = [ 'h', 'i', '\n', 0 ]; myprintf(&buf[0]); } /************************************************/ /* TEST_OUTPUT: --- fail_compilation/retscope.d(1509): Error: reference to stack allocated value returned by `(*fp15)()` assigned to non-scope anonymous parameter --- */ #line 1500 @safe void bar15(int*); struct S15 { int a,b,c,d; } @safe S15 function() fp15; void test15() @safe { bar15(&fp15().d); } /*************************************************/ void foo16() @nogc nothrow { alias dg_t = string delegate(string) @nogc nothrow; dg_t dg = (string s) => s; } /*************************************************/ /* TEST_OUTPUT: --- fail_compilation/retscope.d(1701): Error: cannot implicitly convert expression `& func` of type `int* function(int* p)` to `int* function(scope int* p)` fail_compilation/retscope.d(1702): Error: cannot implicitly convert expression `& func` of type `int* function(int* p)` to `int* function(return int* p)` fail_compilation/retscope.d(1703): Error: cannot implicitly convert expression `& func` of type `int* function(int* p)` to `int* function(return scope int* p)` fail_compilation/retscope.d(1711): Error: cannot implicitly convert expression `& funcr` of type `int* function(return int* p)` to `int* function(scope int* p)` fail_compilation/retscope.d(1716): Error: cannot implicitly convert expression `& funcrs` of type `int* function(return scope int* p)` to `int* function(scope int* p)` --- */ int* func(int* p); int* funcs(scope int* p); int* funcr(return int* p); int* funcrs(return scope int* p); void foo17() { #line 1700 typeof(func) *fp1 = &func; typeof(funcs) *fp2 = &func; // error typeof(funcr) *fp3 = &func; // error typeof(funcrs) *fp4 = &func; // error typeof(func) *fq1 = &funcs; typeof(funcs) *fq2 = &funcs; typeof(funcr) *fq3 = &funcs; typeof(funcrs) *fq4 = &funcs; typeof(func) *fr1 = &funcr; typeof(funcs) *fr2 = &funcr; // error typeof(funcr) *fr3 = &funcr; typeof(funcrs) *fr4 = &funcr; typeof(func) *fs1 = &funcrs; typeof(funcs) *fs2 = &funcrs; // error typeof(funcr) *fs3 = &funcrs; typeof(funcrs) *fs4 = &funcrs; } /*************************************************/ /* TEST_OUTPUT: --- fail_compilation/retscope.d(1801): Error: cannot implicitly convert expression `&c.func` of type `int* delegate()` to `int* delegate() scope` fail_compilation/retscope.d(1802): Error: cannot implicitly convert expression `&c.func` of type `int* delegate()` to `int* delegate() return scope` fail_compilation/retscope.d(1803): Error: cannot implicitly convert expression `&c.func` of type `int* delegate()` to `int* delegate() return scope` fail_compilation/retscope.d(1811): Error: cannot implicitly convert expression `&c.funcr` of type `int* delegate() return scope` to `int* delegate() scope` fail_compilation/retscope.d(1816): Error: cannot implicitly convert expression `&c.funcrs` of type `int* delegate() return scope` to `int* delegate() scope` --- */ class C18 { int* func(); int* funcs() scope; int* funcr() return; int* funcrs() return scope; } void foo18() { C18 c; #line 1800 typeof(&c.func) fp1 = &c.func; typeof(&c.funcs) fp2 = &c.func; // error typeof(&c.funcr) fp3 = &c.func; // error typeof(&c.funcrs) fp4 = &c.func; // error typeof(&c.func) fq1 = &c.funcs; typeof(&c.funcs) fq2 = &c.funcs; typeof(&c.funcr) fq3 = &c.funcs; typeof(&c.funcrs) fq4 = &c.funcs; typeof(&c.func) fr1 = &c.funcr; typeof(&c.funcs) fr2 = &c.funcr; // error typeof(&c.funcr) fr3 = &c.funcr; typeof(&c.funcrs) fr4 = &c.funcr; typeof(&c.func) fs1 = &c.funcrs; typeof(&c.funcs) fs2 = &c.funcrs; // error typeof(&c.funcr) fs3 = &c.funcrs; typeof(&c.funcrs) fs4 = &c.funcrs; } /*********************************************/ @safe void foo19(C)(ref C[] str) // infer 'scope' for 'str' { str = str; str = str[1 .. str.length]; } @safe void test19() { char[10] s; char[] t = s[]; foo19(t); } /********************************************/ bool foo20(const string a) @safe pure nothrow @nogc { return !a.length; } struct Result(R) { R source; bool empty() // infer 'scope' for 'this' { return foo20(source); } } @safe void test20() { scope n = Result!string("abc"); n.empty(); } /************************************************/ // https://issues.dlang.org/show_bug.cgi?id=17117 ref int foo21(return ref int s) { return s; } int fail21() { int s; return foo21(s); // Error: escaping reference to local variable s } int test21() { int s; s = foo21(s); return s; } /**********************************************/ @safe void foo22()(ref char[] s) { char[] a = s; } @safe void test22(scope char[] s) { foo22(s); } /********************************************* TEST_OUTPUT: --- fail_compilation/retscope.d(1907): Error: scope variable `x` assigned to `ref` variable `this` with longer lifetime fail_compilation/retscope.d(1913): Error: scope variable `x` may not be returned --- */ #line 1900 struct Constant { int* member; int* foo(scope Repeat!(int*) grid) @safe { foreach(ref x; grid) member = x; foreach(ref x; grid) x = member; foreach(ref x; grid) return x; return null; } alias Repeat(T...) = T; }
D
/** * Forms the symbols available to all D programs. Includes Object, which is * the root of the class object hierarchy. This module is implicitly * imported. * * Copyright: Copyright Digital Mars 2000 - 2011. * License: $(HTTP www.boost.org/LICENSE_1_0.txt, Boost License 1.0). * Authors: Walter Bright, Sean Kelly */ module object; // NOTE: For some reason, this declaration method doesn't work // in this particular file (and this file only). It must // be a DMD thing. //alias typeof(int.sizeof) size_t; //alias typeof(cast(void*)0 - cast(void*)0) ptrdiff_t; version (D_LP64) { alias size_t = ulong; alias ptrdiff_t = long; } else { alias size_t = uint; alias ptrdiff_t = int; } alias sizediff_t = ptrdiff_t; //For backwards compatibility only. alias hash_t = size_t; //For backwards compatibility only. alias equals_t = bool; //For backwards compatibility only. alias string = immutable(char)[]; alias wstring = immutable(wchar)[]; alias dstring = immutable(dchar)[]; version (D_ObjectiveC) { deprecated("explicitly import `selector` instead using: `import core.attribute : selector;`") public import core.attribute : selector; } version (Posix) public import core.attribute : gnuAbiTag; // Some ABIs use a complex varargs implementation requiring TypeInfo.argTypes(). version (GNU) { // No TypeInfo-based core.vararg.va_arg(). } else version (X86_64) { version (DigitalMars) version = WithArgTypes; else version (Windows) { /* no need for Win64 ABI */ } else version = WithArgTypes; } version (AArch64) { // Apple uses a trivial varargs implementation version (OSX) {} else version (iOS) {} else version (TVOS){} else version (WatchOS) {} else version = WithArgTypes; } /** * All D class objects inherit from Object. */ class Object { /** * Convert Object to a human readable string. */ string toString() { return typeid(this).name; } /** * Compute hash function for Object. */ size_t toHash() @trusted nothrow { // BUG: this prevents a compacting GC from working, needs to be fixed size_t addr = cast(size_t) cast(void*) this; // The bottom log2((void*).alignof) bits of the address will always // be 0. Moreover it is likely that each Object is allocated with a // separate call to malloc. The alignment of malloc differs from // platform to platform, but rather than having special cases for // each platform it is safe to use a shift of 4. To minimize // collisions in the low bits it is more important for the shift to // not be too small than for the shift to not be too big. return addr ^ (addr >>> 4); } /** * Compare with another Object obj. * Returns: * $(TABLE * $(TR $(TD this &lt; obj) $(TD &lt; 0)) * $(TR $(TD this == obj) $(TD 0)) * $(TR $(TD this &gt; obj) $(TD &gt; 0)) * ) */ int opCmp(Object o) { // BUG: this prevents a compacting GC from working, needs to be fixed //return cast(int)cast(void*)this - cast(int)cast(void*)o; throw new Exception("need opCmp for class " ~ typeid(this).name); //return this !is o; } /** * Test whether $(D this) is equal to $(D o). * The default implementation only compares by identity (using the $(D is) operator). * Generally, overrides for $(D opEquals) should attempt to compare objects by their contents. */ bool opEquals(Object o) { return this is o; } interface Monitor { void lock(); void unlock(); } /** * Create instance of class specified by the fully qualified name * classname. * The class must either have no constructors or have * a default constructor. * Returns: * null if failed * Example: * --- * module foo.bar; * * class C * { * this() { x = 10; } * int x; * } * * void main() * { * auto c = cast(C)Object.factory("foo.bar.C"); * assert(c !is null && c.x == 10); * } * --- */ static Object factory(string classname) { auto ci = TypeInfo_Class.find(classname); if (ci) { return ci.create(); } return null; } } bool opEquals(Object lhs, Object rhs) { // If aliased to the same object or both null => equal if (lhs is rhs) return true; // If either is null => non-equal if (lhs is null || rhs is null) return false; if (!lhs.opEquals(rhs)) return false; // If same exact type => one call to method opEquals if (typeid(lhs) is typeid(rhs) || !__ctfe && typeid(lhs).opEquals(typeid(rhs))) /* CTFE doesn't like typeid much. 'is' works, but opEquals doesn't (issue 7147). But CTFE also guarantees that equal TypeInfos are always identical. So, no opEquals needed during CTFE. */ { return true; } // General case => symmetric calls to method opEquals return rhs.opEquals(lhs); } /************************ * Returns true if lhs and rhs are equal. */ bool opEquals(const Object lhs, const Object rhs) { // A hack for the moment. return opEquals(cast()lhs, cast()rhs); } /// If aliased to the same object or both null => equal @system unittest { class F { int flag; this(int flag) { this.flag = flag; } } F f; assert(f == f); // both null f = new F(1); assert(f == f); // both aliased to the same object } /// If either is null => non-equal @system unittest { class F { int flag; this(int flag) { this.flag = flag; } } F f; assert(!(new F(0) == f)); assert(!(f == new F(0))); } /// If same exact type => one call to method opEquals @system unittest { class F { int flag; this(int flag) { this.flag = flag; } override bool opEquals(const Object o) { return flag == (cast(F) o).flag; } } F f; assert(new F(0) == new F(0)); assert(!(new F(0) == new F(1))); } /// General case => symmetric calls to method opEquals @system unittest { int fEquals, gEquals; class Base { int flag; this(int flag) { this.flag = flag; } } class F : Base { this(int flag) { super(flag); } override bool opEquals(const Object o) { fEquals++; return flag == (cast(Base) o).flag; } } class G : Base { this(int flag) { super(flag); } override bool opEquals(const Object o) { gEquals++; return flag == (cast(Base) o).flag; } } assert(new F(1) == new G(1)); assert(fEquals == 1); assert(gEquals == 1); } private extern(C) void _d_setSameMutex(shared Object ownee, shared Object owner) nothrow; void setSameMutex(shared Object ownee, shared Object owner) { _d_setSameMutex(ownee, owner); } /** * Information about an interface. * When an object is accessed via an interface, an Interface* appears as the * first entry in its vtbl. */ struct Interface { TypeInfo_Class classinfo; /// .classinfo for this interface (not for containing class) void*[] vtbl; size_t offset; /// offset to Interface 'this' from Object 'this' } /** * Array of pairs giving the offset and type information for each * member in an aggregate. */ struct OffsetTypeInfo { size_t offset; /// Offset of member from start of object TypeInfo ti; /// TypeInfo for this member } /** * Runtime type information about a type. * Can be retrieved for any type using a * $(GLINK2 expression,TypeidExpression, TypeidExpression). */ class TypeInfo { override string toString() const pure @safe nothrow { return typeid(this).name; } override size_t toHash() @trusted const nothrow { return hashOf(this.toString()); } override int opCmp(Object rhs) { if (this is rhs) return 0; auto ti = cast(TypeInfo) rhs; if (ti is null) return 1; return __cmp(this.toString(), ti.toString()); } override bool opEquals(Object o) { /* TypeInfo instances are singletons, but duplicates can exist * across DLL's. Therefore, comparing for a name match is * sufficient. */ if (this is o) return true; auto ti = cast(const TypeInfo)o; return ti && this.toString() == ti.toString(); } /** * Computes a hash of the instance of a type. * Params: * p = pointer to start of instance of the type * Returns: * the hash * Bugs: * fix https://issues.dlang.org/show_bug.cgi?id=12516 e.g. by changing this to a truly safe interface. */ size_t getHash(scope const void* p) @trusted nothrow const { return hashOf(p); } /// Compares two instances for equality. bool equals(in void* p1, in void* p2) const { return p1 == p2; } /// Compares two instances for &lt;, ==, or &gt;. int compare(in void* p1, in void* p2) const { return _xopCmp(p1, p2); } /// Returns size of the type. @property size_t tsize() nothrow pure const @safe @nogc { return 0; } /// Swaps two instances of the type. void swap(void* p1, void* p2) const { immutable size_t n = tsize; for (size_t i = 0; i < n; i++) { byte t = (cast(byte *)p1)[i]; (cast(byte*)p1)[i] = (cast(byte*)p2)[i]; (cast(byte*)p2)[i] = t; } } /** Get TypeInfo for 'next' type, as defined by what kind of type this is, null if none. */ @property inout(TypeInfo) next() nothrow pure inout @nogc { return null; } /** * Return default initializer. If the type should be initialized to all * zeros, an array with a null ptr and a length equal to the type size will * be returned. For static arrays, this returns the default initializer for * a single element of the array, use `tsize` to get the correct size. */ abstract const(void)[] initializer() nothrow pure const @safe @nogc; /** Get flags for type: 1 means GC should scan for pointers, 2 means arg of this type is passed in SIMD register(s) if available */ @property uint flags() nothrow pure const @safe @nogc { return 0; } /// Get type information on the contents of the type; null if not available const(OffsetTypeInfo)[] offTi() const { return null; } /// Run the destructor on the object and all its sub-objects void destroy(void* p) const {} /// Run the postblit on the object and all its sub-objects void postblit(void* p) const {} /// Return alignment of type @property size_t talign() nothrow pure const @safe @nogc { return tsize; } /** Return internal info on arguments fitting into 8byte. * See X86-64 ABI 3.2.3 */ version (WithArgTypes) int argTypes(out TypeInfo arg1, out TypeInfo arg2) @safe nothrow { arg1 = this; return 0; } /** Return info used by the garbage collector to do precise collection. */ @property immutable(void)* rtInfo() nothrow pure const @safe @nogc { return rtinfoHasPointers; } // better safe than sorry } class TypeInfo_Enum : TypeInfo { override string toString() const { return name; } override bool opEquals(Object o) { if (this is o) return true; auto c = cast(const TypeInfo_Enum)o; return c && this.name == c.name && this.base == c.base; } override size_t getHash(scope const void* p) const { return base.getHash(p); } override bool equals(in void* p1, in void* p2) const { return base.equals(p1, p2); } override int compare(in void* p1, in void* p2) const { return base.compare(p1, p2); } override @property size_t tsize() nothrow pure const { return base.tsize; } override void swap(void* p1, void* p2) const { return base.swap(p1, p2); } override @property inout(TypeInfo) next() nothrow pure inout { return base.next; } override @property uint flags() nothrow pure const { return base.flags; } override const(void)[] initializer() const { return m_init.length ? m_init : base.initializer(); } override @property size_t talign() nothrow pure const { return base.talign; } version (WithArgTypes) override int argTypes(out TypeInfo arg1, out TypeInfo arg2) { return base.argTypes(arg1, arg2); } override @property immutable(void)* rtInfo() const { return base.rtInfo; } TypeInfo base; string name; void[] m_init; } @safe unittest // issue 12233 { static assert(is(typeof(TypeInfo.init) == TypeInfo)); assert(TypeInfo.init is null); } // Please make sure to keep this in sync with TypeInfo_P (src/rt/typeinfo/ti_ptr.d) class TypeInfo_Pointer : TypeInfo { override string toString() const { return m_next.toString() ~ "*"; } override bool opEquals(Object o) { if (this is o) return true; auto c = cast(const TypeInfo_Pointer)o; return c && this.m_next == c.m_next; } override size_t getHash(scope const void* p) @trusted const { size_t addr = cast(size_t) *cast(const void**)p; return addr ^ (addr >> 4); } override bool equals(in void* p1, in void* p2) const { return *cast(void**)p1 == *cast(void**)p2; } override int compare(in void* p1, in void* p2) const { if (*cast(void**)p1 < *cast(void**)p2) return -1; else if (*cast(void**)p1 > *cast(void**)p2) return 1; else return 0; } override @property size_t tsize() nothrow pure const { return (void*).sizeof; } override const(void)[] initializer() const @trusted { return (cast(void *)null)[0 .. (void*).sizeof]; } override void swap(void* p1, void* p2) const { void* tmp = *cast(void**)p1; *cast(void**)p1 = *cast(void**)p2; *cast(void**)p2 = tmp; } override @property inout(TypeInfo) next() nothrow pure inout { return m_next; } override @property uint flags() nothrow pure const { return 1; } TypeInfo m_next; } class TypeInfo_Array : TypeInfo { override string toString() const { return value.toString() ~ "[]"; } override bool opEquals(Object o) { if (this is o) return true; auto c = cast(const TypeInfo_Array)o; return c && this.value == c.value; } override size_t getHash(scope const void* p) @trusted const { void[] a = *cast(void[]*)p; return getArrayHash(value, a.ptr, a.length); } override bool equals(in void* p1, in void* p2) const { void[] a1 = *cast(void[]*)p1; void[] a2 = *cast(void[]*)p2; if (a1.length != a2.length) return false; size_t sz = value.tsize; for (size_t i = 0; i < a1.length; i++) { if (!value.equals(a1.ptr + i * sz, a2.ptr + i * sz)) return false; } return true; } override int compare(in void* p1, in void* p2) const { void[] a1 = *cast(void[]*)p1; void[] a2 = *cast(void[]*)p2; size_t sz = value.tsize; size_t len = a1.length; if (a2.length < len) len = a2.length; for (size_t u = 0; u < len; u++) { immutable int result = value.compare(a1.ptr + u * sz, a2.ptr + u * sz); if (result) return result; } return cast(int)a1.length - cast(int)a2.length; } override @property size_t tsize() nothrow pure const { return (void[]).sizeof; } override const(void)[] initializer() const @trusted { return (cast(void *)null)[0 .. (void[]).sizeof]; } override void swap(void* p1, void* p2) const { void[] tmp = *cast(void[]*)p1; *cast(void[]*)p1 = *cast(void[]*)p2; *cast(void[]*)p2 = tmp; } TypeInfo value; override @property inout(TypeInfo) next() nothrow pure inout { return value; } override @property uint flags() nothrow pure const { return 1; } override @property size_t talign() nothrow pure const { return (void[]).alignof; } version (WithArgTypes) override int argTypes(out TypeInfo arg1, out TypeInfo arg2) { arg1 = typeid(size_t); arg2 = typeid(void*); return 0; } override @property immutable(void)* rtInfo() nothrow pure const @safe { return RTInfo!(void[]); } } class TypeInfo_StaticArray : TypeInfo { override string toString() const { import core.internal.string : unsignedToTempString; char[20] tmpBuff = void; return value.toString() ~ "[" ~ unsignedToTempString(len, tmpBuff) ~ "]"; } override bool opEquals(Object o) { if (this is o) return true; auto c = cast(const TypeInfo_StaticArray)o; return c && this.len == c.len && this.value == c.value; } override size_t getHash(scope const void* p) @trusted const { return getArrayHash(value, p, len); } override bool equals(in void* p1, in void* p2) const { size_t sz = value.tsize; for (size_t u = 0; u < len; u++) { if (!value.equals(p1 + u * sz, p2 + u * sz)) return false; } return true; } override int compare(in void* p1, in void* p2) const { size_t sz = value.tsize; for (size_t u = 0; u < len; u++) { immutable int result = value.compare(p1 + u * sz, p2 + u * sz); if (result) return result; } return 0; } override @property size_t tsize() nothrow pure const { return len * value.tsize; } override void swap(void* p1, void* p2) const { import core.memory; import core.stdc.string : memcpy; void* tmp; size_t sz = value.tsize; ubyte[16] buffer; void* pbuffer; if (sz < buffer.sizeof) tmp = buffer.ptr; else tmp = pbuffer = (new void[sz]).ptr; for (size_t u = 0; u < len; u += sz) { size_t o = u * sz; memcpy(tmp, p1 + o, sz); memcpy(p1 + o, p2 + o, sz); memcpy(p2 + o, tmp, sz); } if (pbuffer) GC.free(pbuffer); } override const(void)[] initializer() nothrow pure const { return value.initializer(); } override @property inout(TypeInfo) next() nothrow pure inout { return value; } override @property uint flags() nothrow pure const { return value.flags; } override void destroy(void* p) const { immutable sz = value.tsize; p += sz * len; foreach (i; 0 .. len) { p -= sz; value.destroy(p); } } override void postblit(void* p) const { immutable sz = value.tsize; foreach (i; 0 .. len) { value.postblit(p); p += sz; } } TypeInfo value; size_t len; override @property size_t talign() nothrow pure const { return value.talign; } version (WithArgTypes) override int argTypes(out TypeInfo arg1, out TypeInfo arg2) { arg1 = typeid(void*); return 0; } // just return the rtInfo of the element, we have no generic type T to run RTInfo!T on override @property immutable(void)* rtInfo() nothrow pure const @safe { return value.rtInfo(); } } class TypeInfo_AssociativeArray : TypeInfo { override string toString() const { return value.toString() ~ "[" ~ key.toString() ~ "]"; } override bool opEquals(Object o) { if (this is o) return true; auto c = cast(const TypeInfo_AssociativeArray)o; return c && this.key == c.key && this.value == c.value; } override bool equals(in void* p1, in void* p2) @trusted const { return !!_aaEqual(this, *cast(const AA*) p1, *cast(const AA*) p2); } override hash_t getHash(scope const void* p) nothrow @trusted const { return _aaGetHash(cast(AA*)p, this); } // BUG: need to add the rest of the functions override @property size_t tsize() nothrow pure const { return (char[int]).sizeof; } override const(void)[] initializer() const @trusted { return (cast(void *)null)[0 .. (char[int]).sizeof]; } override @property inout(TypeInfo) next() nothrow pure inout { return value; } override @property uint flags() nothrow pure const { return 1; } TypeInfo value; TypeInfo key; override @property size_t talign() nothrow pure const { return (char[int]).alignof; } version (WithArgTypes) override int argTypes(out TypeInfo arg1, out TypeInfo arg2) { arg1 = typeid(void*); return 0; } } class TypeInfo_Vector : TypeInfo { override string toString() const { return "__vector(" ~ base.toString() ~ ")"; } override bool opEquals(Object o) { if (this is o) return true; auto c = cast(const TypeInfo_Vector)o; return c && this.base == c.base; } override size_t getHash(scope const void* p) const { return base.getHash(p); } override bool equals(in void* p1, in void* p2) const { return base.equals(p1, p2); } override int compare(in void* p1, in void* p2) const { return base.compare(p1, p2); } override @property size_t tsize() nothrow pure const { return base.tsize; } override void swap(void* p1, void* p2) const { return base.swap(p1, p2); } override @property inout(TypeInfo) next() nothrow pure inout { return base.next; } override @property uint flags() nothrow pure const { return 2; /* passed in SIMD register */ } override const(void)[] initializer() nothrow pure const { return base.initializer(); } override @property size_t talign() nothrow pure const { return 16; } version (WithArgTypes) override int argTypes(out TypeInfo arg1, out TypeInfo arg2) { return base.argTypes(arg1, arg2); } TypeInfo base; } class TypeInfo_Function : TypeInfo { override string toString() const { import core.demangle : demangleType; alias SafeDemangleFunctionType = char[] function (const(char)[] buf, char[] dst = null) @safe nothrow pure; SafeDemangleFunctionType demangle = ( () @trusted => cast(SafeDemangleFunctionType)(&demangleType) ) (); return (() @trusted => cast(string)(demangle(deco))) (); } override bool opEquals(Object o) { if (this is o) return true; auto c = cast(const TypeInfo_Function)o; return c && this.deco == c.deco; } // BUG: need to add the rest of the functions override @property size_t tsize() nothrow pure const { return 0; // no size for functions } override const(void)[] initializer() const @safe { return null; } override @property immutable(void)* rtInfo() nothrow pure const @safe { return rtinfoNoPointers; } TypeInfo next; /** * Mangled function type string */ string deco; } @safe unittest { abstract class C { void func(); void func(int a); int func(int a, int b); } alias functionTypes = typeof(__traits(getVirtualFunctions, C, "func")); assert(typeid(functionTypes[0]).toString() == "void function()"); assert(typeid(functionTypes[1]).toString() == "void function(int)"); assert(typeid(functionTypes[2]).toString() == "int function(int, int)"); } class TypeInfo_Delegate : TypeInfo { override string toString() const { import core.demangle : demangleType; alias SafeDemangleFunctionType = char[] function (const(char)[] buf, char[] dst = null) @safe nothrow pure; SafeDemangleFunctionType demangle = ( () @trusted => cast(SafeDemangleFunctionType)(&demangleType) ) (); return (() @trusted => cast(string)(demangle(deco))) (); } unittest { double sqr(double x) { return x * x; } assert(typeid(typeof(&sqr)).toString() == "double delegate(double) pure nothrow @nogc @safe"); int g; assert(typeid(typeof((int a, int b) => a + b + g)).toString() == "int delegate(int, int) pure nothrow @nogc @safe"); } override bool opEquals(Object o) { if (this is o) return true; auto c = cast(const TypeInfo_Delegate)o; return c && this.deco == c.deco; } override size_t getHash(scope const void* p) @trusted const { return hashOf(*cast(void delegate()*)p); } override bool equals(in void* p1, in void* p2) const { auto dg1 = *cast(void delegate()*)p1; auto dg2 = *cast(void delegate()*)p2; return dg1 == dg2; } override int compare(in void* p1, in void* p2) const { auto dg1 = *cast(void delegate()*)p1; auto dg2 = *cast(void delegate()*)p2; if (dg1 < dg2) return -1; else if (dg1 > dg2) return 1; else return 0; } override @property size_t tsize() nothrow pure const { alias dg = int delegate(); return dg.sizeof; } override const(void)[] initializer() const @trusted { return (cast(void *)null)[0 .. (int delegate()).sizeof]; } override @property uint flags() nothrow pure const { return 1; } TypeInfo next; string deco; override @property size_t talign() nothrow pure const { alias dg = int delegate(); return dg.alignof; } version (WithArgTypes) override int argTypes(out TypeInfo arg1, out TypeInfo arg2) { arg1 = typeid(void*); arg2 = typeid(void*); return 0; } override @property immutable(void)* rtInfo() nothrow pure const @safe { return RTInfo!(int delegate()); } } private extern (C) Object _d_newclass(const TypeInfo_Class ci); private extern (C) int _d_isbaseof(scope TypeInfo_Class child, scope const TypeInfo_Class parent) @nogc nothrow pure @safe; // rt.cast_ /** * Runtime type information about a class. * Can be retrieved from an object instance by using the * $(DDSUBLINK spec/property,classinfo, .classinfo) property. */ class TypeInfo_Class : TypeInfo { override string toString() const { return info.name; } override bool opEquals(Object o) { if (this is o) return true; auto c = cast(const TypeInfo_Class)o; return c && this.info.name == c.info.name; } override size_t getHash(scope const void* p) @trusted const { auto o = *cast(Object*)p; return o ? o.toHash() : 0; } override bool equals(in void* p1, in void* p2) const { Object o1 = *cast(Object*)p1; Object o2 = *cast(Object*)p2; return (o1 is o2) || (o1 && o1.opEquals(o2)); } override int compare(in void* p1, in void* p2) const { Object o1 = *cast(Object*)p1; Object o2 = *cast(Object*)p2; int c = 0; // Regard null references as always being "less than" if (o1 !is o2) { if (o1) { if (!o2) c = 1; else c = o1.opCmp(o2); } else c = -1; } return c; } override @property size_t tsize() nothrow pure const { return Object.sizeof; } override const(void)[] initializer() nothrow pure const @safe { return m_init; } override @property uint flags() nothrow pure const { return 1; } override @property const(OffsetTypeInfo)[] offTi() nothrow pure const { return m_offTi; } @property auto info() @safe nothrow pure const return { return this; } @property auto typeinfo() @safe nothrow pure const return { return this; } byte[] m_init; /** class static initializer * (init.length gives size in bytes of class) */ string name; /// class name void*[] vtbl; /// virtual function pointer table Interface[] interfaces; /// interfaces this class implements TypeInfo_Class base; /// base class void* destructor; void function(Object) classInvariant; enum ClassFlags : uint { isCOMclass = 0x1, noPointers = 0x2, hasOffTi = 0x4, hasCtor = 0x8, hasGetMembers = 0x10, hasTypeInfo = 0x20, isAbstract = 0x40, isCPPclass = 0x80, hasDtor = 0x100, } ClassFlags m_flags; void* deallocator; OffsetTypeInfo[] m_offTi; void function(Object) defaultConstructor; // default Constructor immutable(void)* m_RTInfo; // data for precise GC override @property immutable(void)* rtInfo() const { return m_RTInfo; } /** * Search all modules for TypeInfo_Class corresponding to classname. * Returns: null if not found */ static const(TypeInfo_Class) find(const scope char[] classname) { foreach (m; ModuleInfo) { if (m) { //writefln("module %s, %d", m.name, m.localClasses.length); foreach (c; m.localClasses) { if (c is null) continue; //writefln("\tclass %s", c.name); if (c.name == classname) return c; } } } return null; } /** * Create instance of Object represented by 'this'. */ Object create() const { if (m_flags & 8 && !defaultConstructor) return null; if (m_flags & 64) // abstract return null; Object o = _d_newclass(this); if (m_flags & 8 && defaultConstructor) { defaultConstructor(o); } return o; } /** * Returns true if the class described by `child` derives from or is * the class described by this `TypeInfo_Class`. Always returns false * if the argument is null. * * Params: * child = TypeInfo for some class * Returns: * true if the class described by `child` derives from or is the * class described by this `TypeInfo_Class`. */ final bool isBaseOf(scope const TypeInfo_Class child) const @nogc nothrow pure @trusted { if (m_init.length) { // If this TypeInfo_Class represents an actual class we only need // to check the child and its direct ancestors. for (auto ti = cast() child; ti !is null; ti = ti.base) if (ti is this) return true; return false; } else { // If this TypeInfo_Class is the .info field of a TypeInfo_Interface // we also need to recursively check the child's interfaces. return child !is null && _d_isbaseof(cast() child, this); } } } alias ClassInfo = TypeInfo_Class; @safe unittest { // Bugzilla 14401 static class X { int a; } assert(typeid(X).initializer is typeid(X).m_init); assert(typeid(X).initializer.length == typeid(const(X)).initializer.length); assert(typeid(X).initializer.length == typeid(shared(X)).initializer.length); assert(typeid(X).initializer.length == typeid(immutable(X)).initializer.length); } class TypeInfo_Interface : TypeInfo { override string toString() const { return info.name; } override bool opEquals(Object o) { if (this is o) return true; auto c = cast(const TypeInfo_Interface)o; return c && this.info.name == typeid(c).name; } override size_t getHash(scope const void* p) @trusted const { if (!*cast(void**)p) { return 0; } Interface* pi = **cast(Interface ***)*cast(void**)p; Object o = cast(Object)(*cast(void**)p - pi.offset); assert(o); return o.toHash(); } override bool equals(in void* p1, in void* p2) const { Interface* pi = **cast(Interface ***)*cast(void**)p1; Object o1 = cast(Object)(*cast(void**)p1 - pi.offset); pi = **cast(Interface ***)*cast(void**)p2; Object o2 = cast(Object)(*cast(void**)p2 - pi.offset); return o1 == o2 || (o1 && o1.opCmp(o2) == 0); } override int compare(in void* p1, in void* p2) const { Interface* pi = **cast(Interface ***)*cast(void**)p1; Object o1 = cast(Object)(*cast(void**)p1 - pi.offset); pi = **cast(Interface ***)*cast(void**)p2; Object o2 = cast(Object)(*cast(void**)p2 - pi.offset); int c = 0; // Regard null references as always being "less than" if (o1 != o2) { if (o1) { if (!o2) c = 1; else c = o1.opCmp(o2); } else c = -1; } return c; } override @property size_t tsize() nothrow pure const { return Object.sizeof; } override const(void)[] initializer() const @trusted { return (cast(void *)null)[0 .. Object.sizeof]; } override @property uint flags() nothrow pure const { return 1; } TypeInfo_Class info; /** * Returns true if the class described by `child` derives from the * interface described by this `TypeInfo_Interface`. Always returns * false if the argument is null. * * Params: * child = TypeInfo for some class * Returns: * true if the class described by `child` derives from the * interface described by this `TypeInfo_Interface`. */ final bool isBaseOf(scope const TypeInfo_Class child) const @nogc nothrow pure @trusted { return child !is null && _d_isbaseof(cast() child, this.info); } /** * Returns true if the interface described by `child` derives from * or is the interface described by this `TypeInfo_Interface`. * Always returns false if the argument is null. * * Params: * child = TypeInfo for some interface * Returns: * true if the interface described by `child` derives from or is * the interface described by this `TypeInfo_Interface`. */ final bool isBaseOf(scope const TypeInfo_Interface child) const @nogc nothrow pure @trusted { return child !is null && _d_isbaseof(cast() child.info, this.info); } } class TypeInfo_Struct : TypeInfo { override string toString() const { return name; } override bool opEquals(Object o) { if (this is o) return true; auto s = cast(const TypeInfo_Struct)o; return s && this.name == s.name && this.initializer().length == s.initializer().length; } override size_t getHash(scope const void* p) @trusted pure nothrow const { assert(p); if (xtoHash) { return (*xtoHash)(p); } else { return hashOf(p[0 .. initializer().length]); } } override bool equals(in void* p1, in void* p2) @trusted pure nothrow const { import core.stdc.string : memcmp; if (!p1 || !p2) return false; else if (xopEquals) return (*xopEquals)(p1, p2); else if (p1 == p2) return true; else // BUG: relies on the GC not moving objects return memcmp(p1, p2, initializer().length) == 0; } override int compare(in void* p1, in void* p2) @trusted pure nothrow const { import core.stdc.string : memcmp; // Regard null references as always being "less than" if (p1 != p2) { if (p1) { if (!p2) return true; else if (xopCmp) return (*xopCmp)(p2, p1); else // BUG: relies on the GC not moving objects return memcmp(p1, p2, initializer().length); } else return -1; } return 0; } override @property size_t tsize() nothrow pure const { return initializer().length; } override const(void)[] initializer() nothrow pure const @safe { return m_init; } override @property uint flags() nothrow pure const { return m_flags; } override @property size_t talign() nothrow pure const { return m_align; } final override void destroy(void* p) const { if (xdtor) { if (m_flags & StructFlags.isDynamicType) (*xdtorti)(p, this); else (*xdtor)(p); } } override void postblit(void* p) const { if (xpostblit) (*xpostblit)(p); } string name; void[] m_init; // initializer; m_init.ptr == null if 0 initialize @safe pure nothrow { size_t function(in void*) xtoHash; bool function(in void*, in void*) xopEquals; int function(in void*, in void*) xopCmp; string function(in void*) xtoString; enum StructFlags : uint { hasPointers = 0x1, isDynamicType = 0x2, // built at runtime, needs type info in xdtor } StructFlags m_flags; } union { void function(void*) xdtor; void function(void*, const TypeInfo_Struct ti) xdtorti; } void function(void*) xpostblit; uint m_align; override @property immutable(void)* rtInfo() nothrow pure const @safe { return m_RTInfo; } version (WithArgTypes) { override int argTypes(out TypeInfo arg1, out TypeInfo arg2) { arg1 = m_arg1; arg2 = m_arg2; return 0; } TypeInfo m_arg1; TypeInfo m_arg2; } immutable(void)* m_RTInfo; // data for precise GC } @system unittest { struct S { bool opEquals(ref const S rhs) const { return false; } } S s; assert(!typeid(S).equals(&s, &s)); } class TypeInfo_Tuple : TypeInfo { TypeInfo[] elements; override string toString() const { string s = "("; foreach (i, element; elements) { if (i) s ~= ','; s ~= element.toString(); } s ~= ")"; return s; } override bool opEquals(Object o) { if (this is o) return true; auto t = cast(const TypeInfo_Tuple)o; if (t && elements.length == t.elements.length) { for (size_t i = 0; i < elements.length; i++) { if (elements[i] != t.elements[i]) return false; } return true; } return false; } override size_t getHash(scope const void* p) const { assert(0); } override bool equals(in void* p1, in void* p2) const { assert(0); } override int compare(in void* p1, in void* p2) const { assert(0); } override @property size_t tsize() nothrow pure const { assert(0); } override const(void)[] initializer() const @trusted { assert(0); } override void swap(void* p1, void* p2) const { assert(0); } override void destroy(void* p) const { assert(0); } override void postblit(void* p) const { assert(0); } override @property size_t talign() nothrow pure const { assert(0); } version (WithArgTypes) override int argTypes(out TypeInfo arg1, out TypeInfo arg2) { assert(0); } } class TypeInfo_Const : TypeInfo { override string toString() const { return cast(string) ("const(" ~ base.toString() ~ ")"); } //override bool opEquals(Object o) { return base.opEquals(o); } override bool opEquals(Object o) { if (this is o) return true; if (typeid(this) != typeid(o)) return false; auto t = cast(TypeInfo_Const)o; return base.opEquals(t.base); } override size_t getHash(scope const void *p) const { return base.getHash(p); } override bool equals(in void *p1, in void *p2) const { return base.equals(p1, p2); } override int compare(in void *p1, in void *p2) const { return base.compare(p1, p2); } override @property size_t tsize() nothrow pure const { return base.tsize; } override void swap(void *p1, void *p2) const { return base.swap(p1, p2); } override @property inout(TypeInfo) next() nothrow pure inout { return base.next; } override @property uint flags() nothrow pure const { return base.flags; } override const(void)[] initializer() nothrow pure const { return base.initializer(); } override @property size_t talign() nothrow pure const { return base.talign; } version (WithArgTypes) override int argTypes(out TypeInfo arg1, out TypeInfo arg2) { return base.argTypes(arg1, arg2); } TypeInfo base; } class TypeInfo_Invariant : TypeInfo_Const { override string toString() const { return cast(string) ("immutable(" ~ base.toString() ~ ")"); } } class TypeInfo_Shared : TypeInfo_Const { override string toString() const { return cast(string) ("shared(" ~ base.toString() ~ ")"); } } class TypeInfo_Inout : TypeInfo_Const { override string toString() const { return cast(string) ("inout(" ~ base.toString() ~ ")"); } } // Contents of Moduleinfo._flags enum { MIctorstart = 0x1, // we've started constructing it MIctordone = 0x2, // finished construction MIstandalone = 0x4, // module ctor does not depend on other module // ctors being done first MItlsctor = 8, MItlsdtor = 0x10, MIctor = 0x20, MIdtor = 0x40, MIxgetMembers = 0x80, MIictor = 0x100, MIunitTest = 0x200, MIimportedModules = 0x400, MIlocalClasses = 0x800, MIname = 0x1000, } /***************************************** * An instance of ModuleInfo is generated into the object file for each compiled module. * * It provides access to various aspects of the module. * It is not generated for betterC. */ struct ModuleInfo { uint _flags; // MIxxxx uint _index; // index into _moduleinfo_array[] version (all) { deprecated("ModuleInfo cannot be copy-assigned because it is a variable-sized struct.") void opAssign(const scope ModuleInfo m) { _flags = m._flags; _index = m._index; } } else { @disable this(); } const: private void* addrOf(int flag) nothrow pure @nogc in { assert(flag >= MItlsctor && flag <= MIname); assert(!(flag & (flag - 1)) && !(flag & ~(flag - 1) << 1)); } do { import core.stdc.string : strlen; void* p = cast(void*)&this + ModuleInfo.sizeof; if (flags & MItlsctor) { if (flag == MItlsctor) return p; p += typeof(tlsctor).sizeof; } if (flags & MItlsdtor) { if (flag == MItlsdtor) return p; p += typeof(tlsdtor).sizeof; } if (flags & MIctor) { if (flag == MIctor) return p; p += typeof(ctor).sizeof; } if (flags & MIdtor) { if (flag == MIdtor) return p; p += typeof(dtor).sizeof; } if (flags & MIxgetMembers) { if (flag == MIxgetMembers) return p; p += typeof(xgetMembers).sizeof; } if (flags & MIictor) { if (flag == MIictor) return p; p += typeof(ictor).sizeof; } if (flags & MIunitTest) { if (flag == MIunitTest) return p; p += typeof(unitTest).sizeof; } if (flags & MIimportedModules) { if (flag == MIimportedModules) return p; p += size_t.sizeof + *cast(size_t*)p * typeof(importedModules[0]).sizeof; } if (flags & MIlocalClasses) { if (flag == MIlocalClasses) return p; p += size_t.sizeof + *cast(size_t*)p * typeof(localClasses[0]).sizeof; } if (true || flags & MIname) // always available for now { if (flag == MIname) return p; p += strlen(cast(immutable char*)p); } assert(0); } @property uint index() nothrow pure @nogc { return _index; } @property uint flags() nothrow pure @nogc { return _flags; } /************************ * Returns: * module constructor for thread locals, `null` if there isn't one */ @property void function() tlsctor() nothrow pure @nogc { return flags & MItlsctor ? *cast(typeof(return)*)addrOf(MItlsctor) : null; } /************************ * Returns: * module destructor for thread locals, `null` if there isn't one */ @property void function() tlsdtor() nothrow pure @nogc { return flags & MItlsdtor ? *cast(typeof(return)*)addrOf(MItlsdtor) : null; } /***************************** * Returns: * address of a module's `const(MemberInfo)[] getMembers(string)` function, `null` if there isn't one */ @property void* xgetMembers() nothrow pure @nogc { return flags & MIxgetMembers ? *cast(typeof(return)*)addrOf(MIxgetMembers) : null; } /************************ * Returns: * module constructor, `null` if there isn't one */ @property void function() ctor() nothrow pure @nogc { return flags & MIctor ? *cast(typeof(return)*)addrOf(MIctor) : null; } /************************ * Returns: * module destructor, `null` if there isn't one */ @property void function() dtor() nothrow pure @nogc { return flags & MIdtor ? *cast(typeof(return)*)addrOf(MIdtor) : null; } /************************ * Returns: * module order independent constructor, `null` if there isn't one */ @property void function() ictor() nothrow pure @nogc { return flags & MIictor ? *cast(typeof(return)*)addrOf(MIictor) : null; } /************* * Returns: * address of function that runs the module's unittests, `null` if there isn't one */ @property void function() unitTest() nothrow pure @nogc { return flags & MIunitTest ? *cast(typeof(return)*)addrOf(MIunitTest) : null; } /**************** * Returns: * array of pointers to the ModuleInfo's of modules imported by this one */ @property immutable(ModuleInfo*)[] importedModules() nothrow pure @nogc { if (flags & MIimportedModules) { auto p = cast(size_t*)addrOf(MIimportedModules); return (cast(immutable(ModuleInfo*)*)(p + 1))[0 .. *p]; } return null; } /**************** * Returns: * array of TypeInfo_Class references for classes defined in this module */ @property TypeInfo_Class[] localClasses() nothrow pure @nogc { if (flags & MIlocalClasses) { auto p = cast(size_t*)addrOf(MIlocalClasses); return (cast(TypeInfo_Class*)(p + 1))[0 .. *p]; } return null; } /******************** * Returns: * name of module, `null` if no name */ @property string name() nothrow pure @nogc { if (true || flags & MIname) // always available for now { import core.stdc.string : strlen; auto p = cast(immutable char*)addrOf(MIname); return p[0 .. strlen(p)]; } // return null; } static int opApply(scope int delegate(ModuleInfo*) dg) { import core.internal.traits : externDFunc; alias moduleinfos_apply = externDFunc!("rt.minfo.moduleinfos_apply", int function(scope int delegate(immutable(ModuleInfo*)))); // Bugzilla 13084 - enforcing immutable ModuleInfo would break client code return moduleinfos_apply( (immutable(ModuleInfo*)m) => dg(cast(ModuleInfo*)m)); } } @system unittest { ModuleInfo* m1; foreach (m; ModuleInfo) { m1 = m; } } /////////////////////////////////////////////////////////////////////////////// // Throwable /////////////////////////////////////////////////////////////////////////////// /** * The base class of all thrown objects. * * All thrown objects must inherit from Throwable. Class $(D Exception), which * derives from this class, represents the category of thrown objects that are * safe to catch and handle. In principle, one should not catch Throwable * objects that are not derived from $(D Exception), as they represent * unrecoverable runtime errors. Certain runtime guarantees may fail to hold * when these errors are thrown, making it unsafe to continue execution after * catching them. */ class Throwable : Object { interface TraceInfo { int opApply(scope int delegate(ref const(char[]))) const; int opApply(scope int delegate(ref size_t, ref const(char[]))) const; string toString() const; } string msg; /// A message describing the error. /** * The _file name of the D source code corresponding with * where the error was thrown from. */ string file; /** * The _line number of the D source code corresponding with * where the error was thrown from. */ size_t line; /** * The stack trace of where the error happened. This is an opaque object * that can either be converted to $(D string), or iterated over with $(D * foreach) to extract the items in the stack trace (as strings). */ TraceInfo info; /** * A reference to the _next error in the list. This is used when a new * $(D Throwable) is thrown from inside a $(D catch) block. The originally * caught $(D Exception) will be chained to the new $(D Throwable) via this * field. */ private Throwable nextInChain; private uint _refcount; // 0 : allocated by GC // 1 : allocated by _d_newThrowable() // 2.. : reference count + 1 /** * Returns: * A reference to the _next error in the list. This is used when a new * $(D Throwable) is thrown from inside a $(D catch) block. The originally * caught $(D Exception) will be chained to the new $(D Throwable) via this * field. */ @property inout(Throwable) next() @safe inout return scope pure nothrow @nogc { return nextInChain; } /** * Replace next in chain with `tail`. * Use `chainTogether` instead if at all possible. */ @property void next(Throwable tail) @safe scope pure nothrow @nogc { if (tail && tail._refcount) ++tail._refcount; // increment the replacement *first* auto n = nextInChain; nextInChain = null; // sever the tail before deleting it if (n && n._refcount) _d_delThrowable(n); // now delete the old tail nextInChain = tail; // and set the new tail } /** * Returns: * mutable reference to the reference count, which is * 0 - allocated by the GC, 1 - allocated by _d_newThrowable(), * and >=2 which is the reference count + 1 * Note: * Marked as `@system` to discourage casual use of it. */ @system @nogc final pure nothrow ref uint refcount() return { return _refcount; } /** * Loop over the chain of Throwables. */ int opApply(scope int delegate(Throwable) dg) { int result = 0; for (Throwable t = this; t; t = t.nextInChain) { result = dg(t); if (result) break; } return result; } /** * Append `e2` to chain of exceptions that starts with `e1`. * Params: * e1 = start of chain (can be null) * e2 = second part of chain (can be null) * Returns: * Throwable that is at the start of the chain; null if both `e1` and `e2` are null */ static @__future @system @nogc pure nothrow Throwable chainTogether(return scope Throwable e1, return scope Throwable e2) { if (!e1) return e2; if (!e2) return e1; if (e2.refcount()) ++e2.refcount(); for (auto e = e1; 1; e = e.nextInChain) { if (!e.nextInChain) { e.nextInChain = e2; break; } } return e1; } @nogc @safe pure nothrow this(string msg, Throwable nextInChain = null) { this.msg = msg; this.nextInChain = nextInChain; //this.info = _d_traceContext(); } @nogc @safe pure nothrow this(string msg, string file, size_t line, Throwable nextInChain = null) { this(msg, nextInChain); this.file = file; this.line = line; //this.info = _d_traceContext(); } @trusted nothrow ~this() { if (nextInChain && nextInChain._refcount) _d_delThrowable(nextInChain); } /** * Overrides $(D Object.toString) and returns the error message. * Internally this forwards to the $(D toString) overload that * takes a $(D_PARAM sink) delegate. */ override string toString() { string s; toString((buf) { s ~= buf; }); return s; } /** * The Throwable hierarchy uses a toString overload that takes a * $(D_PARAM _sink) delegate to avoid GC allocations, which cannot be * performed in certain error situations. Override this $(D * toString) method to customize the error message. */ void toString(scope void delegate(in char[]) sink) const { import core.internal.string : unsignedToTempString; char[20] tmpBuff = void; sink(typeid(this).name); sink("@"); sink(file); sink("("); sink(unsignedToTempString(line, tmpBuff)); sink(")"); if (msg.length) { sink(": "); sink(msg); } if (info) { try { sink("\n----------------"); foreach (t; info) { sink("\n"); sink(t); } } catch (Throwable) { // ignore more errors } } } /** * Get the message describing the error. * Base behavior is to return the `Throwable.msg` field. * Override to return some other error message. * * Returns: * Error message */ @__future const(char)[] message() const { return this.msg; } } /** * The base class of all errors that are safe to catch and handle. * * In principle, only thrown objects derived from this class are safe to catch * inside a $(D catch) block. Thrown objects not derived from Exception * represent runtime errors that should not be caught, as certain runtime * guarantees may not hold, making it unsafe to continue program execution. */ class Exception : Throwable { /** * Creates a new instance of Exception. The nextInChain parameter is used * internally and should always be $(D null) when passed by user code. * This constructor does not automatically throw the newly-created * Exception; the $(D throw) statement should be used for that purpose. */ @nogc @safe pure nothrow this(string msg, string file = __FILE__, size_t line = __LINE__, Throwable nextInChain = null) { super(msg, file, line, nextInChain); } @nogc @safe pure nothrow this(string msg, Throwable nextInChain, string file = __FILE__, size_t line = __LINE__) { super(msg, file, line, nextInChain); } } /// @safe unittest { bool gotCaught; try { throw new Exception("msg"); } catch (Exception e) { gotCaught = true; assert(e.msg == "msg"); } assert(gotCaught); } @system unittest { { auto e = new Exception("msg"); assert(e.file == __FILE__); assert(e.line == __LINE__ - 2); assert(e.nextInChain is null); assert(e.msg == "msg"); } { auto e = new Exception("msg", new Exception("It's an Exception!"), "hello", 42); assert(e.file == "hello"); assert(e.line == 42); assert(e.nextInChain !is null); assert(e.msg == "msg"); } { auto e = new Exception("msg", "hello", 42, new Exception("It's an Exception!")); assert(e.file == "hello"); assert(e.line == 42); assert(e.nextInChain !is null); assert(e.msg == "msg"); } { auto e = new Exception("message"); assert(e.message == "message"); } } /** * The base class of all unrecoverable runtime errors. * * This represents the category of $(D Throwable) objects that are $(B not) * safe to catch and handle. In principle, one should not catch Error * objects, as they represent unrecoverable runtime errors. * Certain runtime guarantees may fail to hold when these errors are * thrown, making it unsafe to continue execution after catching them. */ class Error : Throwable { /** * Creates a new instance of Error. The nextInChain parameter is used * internally and should always be $(D null) when passed by user code. * This constructor does not automatically throw the newly-created * Error; the $(D throw) statement should be used for that purpose. */ @nogc @safe pure nothrow this(string msg, Throwable nextInChain = null) { super(msg, nextInChain); bypassedException = null; } @nogc @safe pure nothrow this(string msg, string file, size_t line, Throwable nextInChain = null) { super(msg, file, line, nextInChain); bypassedException = null; } /** The first $(D Exception) which was bypassed when this Error was thrown, or $(D null) if no $(D Exception)s were pending. */ Throwable bypassedException; } /// @system unittest { bool gotCaught; try { throw new Error("msg"); } catch (Error e) { gotCaught = true; assert(e.msg == "msg"); } assert(gotCaught); } @safe unittest { { auto e = new Error("msg"); assert(e.file is null); assert(e.line == 0); assert(e.nextInChain is null); assert(e.msg == "msg"); assert(e.bypassedException is null); } { auto e = new Error("msg", new Exception("It's an Exception!")); assert(e.file is null); assert(e.line == 0); assert(e.nextInChain !is null); assert(e.msg == "msg"); assert(e.bypassedException is null); } { auto e = new Error("msg", "hello", 42, new Exception("It's an Exception!")); assert(e.file == "hello"); assert(e.line == 42); assert(e.nextInChain !is null); assert(e.msg == "msg"); assert(e.bypassedException is null); } } extern (C) { // from druntime/src/rt/aaA.d private struct AA { void* impl; } // size_t _aaLen(in AA aa) pure nothrow @nogc; private void* _aaGetY(AA* paa, const TypeInfo_AssociativeArray ti, const size_t valsz, const scope void* pkey) pure nothrow; private void* _aaGetX(AA* paa, const TypeInfo_AssociativeArray ti, const size_t valsz, const scope void* pkey, out bool found) pure nothrow; // inout(void)* _aaGetRvalueX(inout AA aa, in TypeInfo keyti, in size_t valsz, in void* pkey); inout(void[]) _aaValues(inout AA aa, const size_t keysz, const size_t valsz, const TypeInfo tiValueArray) pure nothrow; inout(void[]) _aaKeys(inout AA aa, const size_t keysz, const TypeInfo tiKeyArray) pure nothrow; void* _aaRehash(AA* paa, const scope TypeInfo keyti) pure nothrow; void _aaClear(AA aa) pure nothrow; // alias _dg_t = extern(D) int delegate(void*); // int _aaApply(AA aa, size_t keysize, _dg_t dg); // alias _dg2_t = extern(D) int delegate(void*, void*); // int _aaApply2(AA aa, size_t keysize, _dg2_t dg); private struct AARange { AA impl; size_t idx; } AARange _aaRange(AA aa) pure nothrow @nogc @safe; bool _aaRangeEmpty(AARange r) pure nothrow @nogc @safe; void* _aaRangeFrontKey(AARange r) pure nothrow @nogc @safe; void* _aaRangeFrontValue(AARange r) pure nothrow @nogc @safe; void _aaRangePopFront(ref AARange r) pure nothrow @nogc @safe; int _aaEqual(scope const TypeInfo tiRaw, scope const AA aa1, scope const AA aa2); hash_t _aaGetHash(scope const AA* aa, scope const TypeInfo tiRaw) nothrow; /* _d_assocarrayliteralTX marked as pure, because aaLiteral can be called from pure code. This is a typesystem hole, however this is existing hole. Early compiler didn't check purity of toHash or postblit functions, if key is a UDT thus copiler allowed to create AA literal with keys, which have impure unsafe toHash methods. */ void* _d_assocarrayliteralTX(const TypeInfo_AssociativeArray ti, void[] keys, void[] values) pure; } void* aaLiteral(Key, Value)(Key[] keys, Value[] values) @trusted pure { return _d_assocarrayliteralTX(typeid(Value[Key]), *cast(void[]*)&keys, *cast(void[]*)&values); } alias AssociativeArray(Key, Value) = Value[Key]; /*********************************** * Removes all remaining keys and values from an associative array. * Params: * aa = The associative array. */ void clear(Value, Key)(Value[Key] aa) { _aaClear(*cast(AA *) &aa); } /* ditto */ void clear(Value, Key)(Value[Key]* aa) { _aaClear(*cast(AA *) aa); } /// @system unittest { auto aa = ["k1": 2]; aa.clear; assert("k1" !in aa); } // Issue 20559 @system unittest { static class Foo { int[string] aa; alias aa this; } auto v = new Foo(); v["Hello World"] = 42; v.clear; assert("Hello World" !in v); // Test for T* static assert(!__traits(compiles, (&v).clear)); static assert( __traits(compiles, (*(&v)).clear)); } /*********************************** * Reorganizes the associative array in place so that lookups are more * efficient. * Params: * aa = The associative array. * Returns: * The rehashed associative array. */ T rehash(T : Value[Key], Value, Key)(T aa) { _aaRehash(cast(AA*)&aa, typeid(Value[Key])); return aa; } /* ditto */ T rehash(T : Value[Key], Value, Key)(T* aa) { _aaRehash(cast(AA*)aa, typeid(Value[Key])); return *aa; } /* ditto */ T rehash(T : shared Value[Key], Value, Key)(T aa) { _aaRehash(cast(AA*)&aa, typeid(Value[Key])); return aa; } /* ditto */ T rehash(T : shared Value[Key], Value, Key)(T* aa) { _aaRehash(cast(AA*)aa, typeid(Value[Key])); return *aa; } /*********************************** * Create a new associative array of the same size and copy the contents of the * associative array into it. * Params: * aa = The associative array. */ V[K] dup(T : V[K], K, V)(T aa) { //pragma(msg, "K = ", K, ", V = ", V); // Bug10720 - check whether V is copyable static assert(is(typeof({ V v = aa[K.init]; })), "cannot call " ~ T.stringof ~ ".dup because " ~ V.stringof ~ " is not copyable"); V[K] result; //foreach (k, ref v; aa) // result[k] = v; // Bug13701 - won't work if V is not mutable ref V duplicateElem(ref K k, ref const V v) @trusted pure nothrow { import core.stdc.string : memcpy; void* pv = _aaGetY(cast(AA*)&result, typeid(V[K]), V.sizeof, &k); memcpy(pv, &v, V.sizeof); return *cast(V*)pv; } static if (__traits(hasPostblit, V)) { auto postblit = _getPostblit!V(); foreach (k, ref v; aa) postblit(duplicateElem(k, v)); } else { foreach (k, ref v; aa) duplicateElem(k, v); } return result; } /* ditto */ V[K] dup(T : V[K], K, V)(T* aa) { return (*aa).dup; } /// @safe unittest { auto aa = ["k1": 2]; auto a2 = aa.dup; aa["k2"] = 3; assert("k2" !in a2); } // this should never be made public. private AARange _aaToRange(T: V[K], K, V)(ref T aa) pure nothrow @nogc @safe { // ensure we are dealing with a genuine AA. static if (is(const(V[K]) == const(T))) alias realAA = aa; else const(V[K]) realAA = aa; return _aaRange(() @trusted { return *cast(AA*)&realAA; } ()); } /*********************************** * Returns a forward range over the keys of the associative array. * Params: * aa = The associative array. * Returns: * A forward range. */ auto byKey(T : V[K], K, V)(T aa) pure nothrow @nogc @safe { import core.internal.traits : substInout; static struct Result { AARange r; pure nothrow @nogc: @property bool empty() @safe { return _aaRangeEmpty(r); } @property ref front() { auto p = (() @trusted => cast(substInout!K*) _aaRangeFrontKey(r)) (); return *p; } void popFront() @safe { _aaRangePopFront(r); } @property Result save() { return this; } } return Result(_aaToRange(aa)); } /* ditto */ auto byKey(T : V[K], K, V)(T* aa) pure nothrow @nogc { return (*aa).byKey(); } /// @safe unittest { auto dict = [1: 0, 2: 0]; int sum; foreach (v; dict.byKey) sum += v; assert(sum == 3); } /*********************************** * Returns a forward range over the values of the associative array. * Params: * aa = The associative array. * Returns: * A forward range. */ auto byValue(T : V[K], K, V)(T aa) pure nothrow @nogc @safe { import core.internal.traits : substInout; static struct Result { AARange r; pure nothrow @nogc: @property bool empty() @safe { return _aaRangeEmpty(r); } @property ref front() { auto p = (() @trusted => cast(substInout!V*) _aaRangeFrontValue(r)) (); return *p; } void popFront() @safe { _aaRangePopFront(r); } @property Result save() { return this; } } return Result(_aaToRange(aa)); } /* ditto */ auto byValue(T : V[K], K, V)(T* aa) pure nothrow @nogc { return (*aa).byValue(); } /// @safe unittest { auto dict = ["k1": 1, "k2": 2]; int sum; foreach (v; dict.byValue) sum += v; assert(sum == 3); } /*********************************** * Returns a forward range over the key value pairs of the associative array. * Params: * aa = The associative array. * Returns: * A forward range. */ auto byKeyValue(T : V[K], K, V)(T aa) pure nothrow @nogc @safe { import core.internal.traits : substInout; static struct Result { AARange r; pure nothrow @nogc: @property bool empty() @safe { return _aaRangeEmpty(r); } @property auto front() { static struct Pair { // We save the pointers here so that the Pair we return // won't mutate when Result.popFront is called afterwards. private void* keyp; private void* valp; @property ref key() inout { auto p = (() @trusted => cast(substInout!K*) keyp) (); return *p; } @property ref value() inout { auto p = (() @trusted => cast(substInout!V*) valp) (); return *p; } } return Pair(_aaRangeFrontKey(r), _aaRangeFrontValue(r)); } void popFront() @safe { return _aaRangePopFront(r); } @property Result save() { return this; } } return Result(_aaToRange(aa)); } /* ditto */ auto byKeyValue(T : V[K], K, V)(T* aa) pure nothrow @nogc { return (*aa).byKeyValue(); } /// @safe unittest { auto dict = ["k1": 1, "k2": 2]; int sum; foreach (e; dict.byKeyValue) sum += e.value; assert(sum == 3); } /*********************************** * Returns a dynamic array, the elements of which are the keys in the * associative array. * Params: * aa = The associative array. * Returns: * A dynamic array. */ Key[] keys(T : Value[Key], Value, Key)(T aa) @property { // ensure we are dealing with a genuine AA. static if (is(const(Value[Key]) == const(T))) alias realAA = aa; else const(Value[Key]) realAA = aa; auto a = cast(void[])_aaKeys(*cast(inout(AA)*)&realAA, Key.sizeof, typeid(Key[])); auto res = *cast(Key[]*)&a; static if (__traits(hasPostblit, Key)) _doPostblit(res); return res; } /* ditto */ Key[] keys(T : Value[Key], Value, Key)(T *aa) @property { return (*aa).keys; } /// @system unittest { auto aa = [1: "v1", 2: "v2"]; int sum; foreach (k; aa.keys) sum += k; assert(sum == 3); } @system unittest { static struct S { string str; void[][string] dict; alias dict this; } auto s = S("a"); assert(s.keys.length == 0); } /*********************************** * Returns a dynamic array, the elements of which are the values in the * associative array. * Params: * aa = The associative array. * Returns: * A dynamic array. */ Value[] values(T : Value[Key], Value, Key)(T aa) @property { // ensure we are dealing with a genuine AA. static if (is(const(Value[Key]) == const(T))) alias realAA = aa; else const(Value[Key]) realAA = aa; auto a = cast(void[])_aaValues(*cast(inout(AA)*)&realAA, Key.sizeof, Value.sizeof, typeid(Value[])); auto res = *cast(Value[]*)&a; static if (__traits(hasPostblit, Value)) _doPostblit(res); return res; } /* ditto */ Value[] values(T : Value[Key], Value, Key)(T *aa) @property { return (*aa).values; } /// @system unittest { auto aa = ["k1": 1, "k2": 2]; int sum; foreach (e; aa.values) sum += e; assert(sum == 3); } @system unittest { static struct S { string str; void[][string] dict; alias dict this; } auto s = S("a"); assert(s.values.length == 0); } /*********************************** * Looks up key; if it exists returns corresponding value else evaluates and * returns defaultValue. * Params: * aa = The associative array. * key = The key. * defaultValue = The default value. * Returns: * The value. */ inout(V) get(K, V)(inout(V[K]) aa, K key, lazy inout(V) defaultValue) { auto p = key in aa; return p ? *p : defaultValue; } /* ditto */ inout(V) get(K, V)(inout(V[K])* aa, K key, lazy inout(V) defaultValue) { return (*aa).get(key, defaultValue); } @safe unittest { auto aa = ["k1": 1]; assert(aa.get("k1", 0) == 1); assert(aa.get("k2", 0) == 0); } /*********************************** * Looks up key; if it exists returns corresponding value else evaluates * value, adds it to the associative array and returns it. * Params: * aa = The associative array. * key = The key. * value = The required value. * Returns: * The value. */ ref V require(K, V)(ref V[K] aa, K key, lazy V value = V.init) { bool found; // if key is @safe-ly copyable, `require` can infer @safe static if (isSafeCopyable!K) { auto p = () @trusted { return cast(V*) _aaGetX(cast(AA*) &aa, typeid(V[K]), V.sizeof, &key, found); } (); } else { auto p = cast(V*) _aaGetX(cast(AA*) &aa, typeid(V[K]), V.sizeof, &key, found); } if (found) return *p; else { *p = value; // Not `return (*p = value)` since if `=` is overloaded return *p; // this might not return a ref to the left-hand side. } } /// @safe unittest { auto aa = ["k1": 1]; assert(aa.require("k1", 0) == 1); assert(aa.require("k2", 0) == 0); assert(aa["k2"] == 0); } // Tests whether T can be @safe-ly copied. Use a union to exclude destructor from the test. private enum bool isSafeCopyable(T) = is(typeof(() @safe { union U { T x; } T *x; auto u = U(*x); })); /*********************************** * Looks up key; if it exists applies the update callable else evaluates the * create callable and adds it to the associative array * Params: * aa = The associative array. * key = The key. * create = The callable to apply on create. * update = The callable to apply on update. */ void update(K, V, C, U)(ref V[K] aa, K key, scope C create, scope U update) if (is(typeof(create()) : V) && (is(typeof(update(aa[K.init])) : V) || is(typeof(update(aa[K.init])) == void))) { bool found; // if key is @safe-ly copyable, `update` may infer @safe static if (isSafeCopyable!K) { auto p = () @trusted { return cast(V*) _aaGetX(cast(AA*) &aa, typeid(V[K]), V.sizeof, &key, found); } (); } else { auto p = cast(V*) _aaGetX(cast(AA*) &aa, typeid(V[K]), V.sizeof, &key, found); } if (!found) *p = create(); else { static if (is(typeof(update(*p)) == void)) update(*p); else *p = update(*p); } } /// @system unittest { auto aa = ["k1": 1]; aa.update("k1", { return -1; // create (won't be executed) }, (ref int v) { v += 1; // update }); assert(aa["k1"] == 2); aa.update("k2", { return 0; // create }, (ref int v) { v = -1; // update (won't be executed) }); assert(aa["k2"] == 0); } @safe unittest { static struct S { int x; @nogc nothrow pure: this(this) @system {} @safe const: // stubs bool opEquals(S rhs) { assert(0); } size_t toHash() { assert(0); } } int[string] aai; static assert(is(typeof(() @safe { aai.require("a", 1234); }))); static assert(is(typeof(() @safe { aai.update("a", { return 1234; }, (ref int x) { x++; return x; }); }))); S[string] aas; static assert(is(typeof(() { aas.require("a", S(1234)); }))); static assert(is(typeof(() { aas.update("a", { return S(1234); }, (ref S s) { s.x++; return s; }); }))); static assert(!is(typeof(() @safe { aas.update("a", { return S(1234); }, (ref S s) { s.x++; return s; }); }))); int[S] aais; static assert(is(typeof(() { aais.require(S(1234), 1234); }))); static assert(is(typeof(() { aais.update(S(1234), { return 1234; }, (ref int x) { x++; return x; }); }))); static assert(!is(typeof(() @safe { aais.require(S(1234), 1234); }))); static assert(!is(typeof(() @safe { aais.update(S(1234), { return 1234; }, (ref int x) { x++; return x; }); }))); } @safe unittest { struct S0 { int opCall(ref int v) { return v + 1; } } struct S1 { int opCall()() { return -2; } T opCall(T)(ref T v) { return v + 1; } } int[string] a = ["2" : 1]; a.update("2", () => -1, S0.init); assert(a["2"] == 2); a.update("0", () => -1, S0.init); assert(a["0"] == -1); a.update("2", S1.init, S1.init); assert(a["2"] == 3); a.update("1", S1.init, S1.init); assert(a["1"] == -2); } @system unittest { int[string] aa; foreach (n; 0 .. 2) aa.update("k1", { return 7; }, (ref int v) { return v + 3; }); assert(aa["k1"] == 10); } version (CoreDdoc) { // This lets DDoc produce better documentation. /** Calculates the hash value of `arg` with an optional `seed` initial value. The result might not be equal to `typeid(T).getHash(&arg)`. Params: arg = argument to calculate the hash value of seed = optional `seed` value (may be used for hash chaining) Return: calculated hash value of `arg` */ size_t hashOf(T)(auto ref T arg, size_t seed) { static import core.internal.hash; return core.internal.hash.hashOf(arg, seed); } /// ditto size_t hashOf(T)(auto ref T arg) { static import core.internal.hash; return core.internal.hash.hashOf(arg); } @safe unittest { auto h1 = "my.string".hashOf; assert(h1 == "my.string".hashOf); } } else { public import core.internal.hash : hashOf; } /// @system unittest { class MyObject { size_t myMegaHash() const @safe pure nothrow { return 42; } } struct Test { int a; string b; MyObject c; size_t toHash() const pure nothrow { size_t hash = a.hashOf(); hash = b.hashOf(hash); size_t h1 = c.myMegaHash(); hash = h1.hashOf(hash); //Mix two hash values return hash; } } } bool _xopEquals(in void*, in void*) { throw new Error("TypeInfo.equals is not implemented"); } bool _xopCmp(in void*, in void*) { throw new Error("TypeInfo.compare is not implemented"); } /****************************************** * Create RTInfo for type T */ template RTInfoImpl(size_t[] pointerBitmap) { immutable size_t[pointerBitmap.length] RTInfoImpl = pointerBitmap[]; } template NoPointersBitmapPayload(size_t N) { enum size_t[N] NoPointersBitmapPayload = 0; } template RTInfo(T) { enum pointerBitmap = __traits(getPointerBitmap, T); static if (pointerBitmap[1 .. $] == NoPointersBitmapPayload!(pointerBitmap.length - 1)) enum RTInfo = rtinfoNoPointers; else enum RTInfo = RTInfoImpl!(pointerBitmap).ptr; } /** * shortcuts for the precise GC, also generated by the compiler * used instead of the actual pointer bitmap */ enum immutable(void)* rtinfoNoPointers = null; enum immutable(void)* rtinfoHasPointers = cast(void*)1; // Helper functions private inout(TypeInfo) getElement(inout TypeInfo value) @trusted pure nothrow { TypeInfo element = cast() value; for (;;) { if (auto qualified = cast(TypeInfo_Const) element) element = qualified.base; else if (auto redefined = cast(TypeInfo_Enum) element) element = redefined.base; else if (auto staticArray = cast(TypeInfo_StaticArray) element) element = staticArray.value; else if (auto vector = cast(TypeInfo_Vector) element) element = vector.base; else break; } return cast(inout) element; } private size_t getArrayHash(const scope TypeInfo element, const scope void* ptr, const size_t count) @trusted nothrow { if (!count) return 0; const size_t elementSize = element.tsize; if (!elementSize) return 0; static bool hasCustomToHash(const scope TypeInfo value) @trusted pure nothrow { const element = getElement(value); if (const struct_ = cast(const TypeInfo_Struct) element) return !!struct_.xtoHash; return cast(const TypeInfo_Array) element || cast(const TypeInfo_AssociativeArray) element || cast(const ClassInfo) element || cast(const TypeInfo_Interface) element; } if (!hasCustomToHash(element)) return hashOf(ptr[0 .. elementSize * count]); size_t hash = 0; foreach (size_t i; 0 .. count) hash = hashOf(element.getHash(ptr + i * elementSize), hash); return hash; } /// Provide the .dup array property. @property auto dup(T)(T[] a) if (!is(const(T) : T)) { import core.internal.traits : Unconst; static assert(is(T : Unconst!T), "Cannot implicitly convert type "~T.stringof~ " to "~Unconst!T.stringof~" in dup."); // wrap unsafe _dup in @trusted to preserve @safe postblit static if (__traits(compiles, (T b) @safe { T a = b; })) return _trustedDup!(T, Unconst!T)(a); else return _dup!(T, Unconst!T)(a); } /// @safe unittest { auto arr = [1, 2]; auto arr2 = arr.dup; arr[0] = 0; assert(arr == [0, 2]); assert(arr2 == [1, 2]); } /// ditto // const overload to support implicit conversion to immutable (unique result, see DIP29) @property T[] dup(T)(const(T)[] a) if (is(const(T) : T)) { // wrap unsafe _dup in @trusted to preserve @safe postblit static if (__traits(compiles, (T b) @safe { T a = b; })) return _trustedDup!(const(T), T)(a); else return _dup!(const(T), T)(a); } /// Provide the .idup array property. @property immutable(T)[] idup(T)(T[] a) { static assert(is(T : immutable(T)), "Cannot implicitly convert type "~T.stringof~ " to immutable in idup."); // wrap unsafe _dup in @trusted to preserve @safe postblit static if (__traits(compiles, (T b) @safe { T a = b; })) return _trustedDup!(T, immutable(T))(a); else return _dup!(T, immutable(T))(a); } /// ditto @property immutable(T)[] idup(T:void)(const(T)[] a) { return a.dup; } /// @safe unittest { char[] arr = ['a', 'b', 'c']; string s = arr.idup; arr[0] = '.'; assert(s == "abc"); } private U[] _trustedDup(T, U)(T[] a) @trusted { return _dup!(T, U)(a); } private U[] _dup(T, U)(T[] a) // pure nothrow depends on postblit { if (__ctfe) { static if (is(T : void)) assert(0, "Cannot dup a void[] array at compile time."); else { U[] res; foreach (ref e; a) res ~= e; return res; } } import core.stdc.string : memcpy; void[] arr = _d_newarrayU(typeid(T[]), a.length); memcpy(arr.ptr, cast(const(void)*)a.ptr, T.sizeof * a.length); auto res = *cast(U[]*)&arr; static if (__traits(hasPostblit, T)) _doPostblit(res); return res; } // HACK: This is a lie. `_d_arraysetcapacity` is neither `nothrow` nor `pure`, but this lie is // necessary for now to prevent breaking code. private extern (C) size_t _d_arraysetcapacity(const TypeInfo ti, size_t newcapacity, void[]* arrptr) pure nothrow; /** (Property) Gets the current _capacity of a slice. The _capacity is the size that the slice can grow to before the underlying array must be reallocated or extended. If an append must reallocate a slice with no possibility of extension, then `0` is returned. This happens when the slice references a static array, or if another slice references elements past the end of the current slice. Note: The _capacity of a slice may be impacted by operations on other slices. */ @property size_t capacity(T)(T[] arr) pure nothrow @trusted { return _d_arraysetcapacity(typeid(T[]), 0, cast(void[]*)&arr); } /// @safe unittest { //Static array slice: no capacity int[4] sarray = [1, 2, 3, 4]; int[] slice = sarray[]; assert(sarray.capacity == 0); //Appending to slice will reallocate to a new array slice ~= 5; assert(slice.capacity >= 5); //Dynamic array slices int[] a = [1, 2, 3, 4]; int[] b = a[1 .. $]; int[] c = a[1 .. $ - 1]; debug(SENTINEL) {} else // non-zero capacity very much depends on the array and GC implementation { assert(a.capacity != 0); assert(a.capacity == b.capacity + 1); //both a and b share the same tail } assert(c.capacity == 0); //an append to c must relocate c. } /** Reserves capacity for a slice. The capacity is the size that the slice can grow to before the underlying array must be reallocated or extended. Returns: The new capacity of the array (which may be larger than the requested capacity). */ size_t reserve(T)(ref T[] arr, size_t newcapacity) pure nothrow @trusted { if (__ctfe) return newcapacity; else return _d_arraysetcapacity(typeid(T[]), newcapacity, cast(void[]*)&arr); } /// @safe unittest { //Static array slice: no capacity. Reserve relocates. int[4] sarray = [1, 2, 3, 4]; int[] slice = sarray[]; auto u = slice.reserve(8); assert(u >= 8); assert(&sarray[0] !is &slice[0]); assert(slice.capacity == u); //Dynamic array slices int[] a = [1, 2, 3, 4]; a.reserve(8); //prepare a for appending 4 more items auto p = &a[0]; u = a.capacity; a ~= [5, 6, 7, 8]; assert(p == &a[0]); //a should not have been reallocated assert(u == a.capacity); //a should not have been extended } // https://issues.dlang.org/show_bug.cgi?id=12330, reserve() at CTFE time @safe unittest { int[] foo() { int[] result; auto a = result.reserve = 5; assert(a == 5); return result; } enum r = foo(); } // Issue 6646: should be possible to use array.reserve from SafeD. @safe unittest { int[] a; a.reserve(10); } // HACK: This is a lie. `_d_arrayshrinkfit` is not `nothrow`, but this lie is necessary // for now to prevent breaking code. private extern (C) void _d_arrayshrinkfit(const TypeInfo ti, void[] arr) nothrow; /** Assume that it is safe to append to this array. Appends made to this array after calling this function may append in place, even if the array was a slice of a larger array to begin with. Use this only when it is certain there are no elements in use beyond the array in the memory block. If there are, those elements will be overwritten by appending to this array. Warning: Calling this function, and then using references to data located after the given array results in undefined behavior. Returns: The input is returned. */ auto ref inout(T[]) assumeSafeAppend(T)(auto ref inout(T[]) arr) nothrow @system { _d_arrayshrinkfit(typeid(T[]), *(cast(void[]*)&arr)); return arr; } /// @system unittest { int[] a = [1, 2, 3, 4]; // Without assumeSafeAppend. Appending relocates. int[] b = a [0 .. 3]; b ~= 5; assert(a.ptr != b.ptr); debug(SENTINEL) {} else { // With assumeSafeAppend. Appending overwrites. int[] c = a [0 .. 3]; c.assumeSafeAppend() ~= 5; assert(a.ptr == c.ptr); } } @system unittest { int[] arr; auto newcap = arr.reserve(2000); assert(newcap >= 2000); assert(newcap == arr.capacity); auto ptr = arr.ptr; foreach (i; 0..2000) arr ~= i; assert(ptr == arr.ptr); arr = arr[0..1]; arr.assumeSafeAppend(); arr ~= 5; assert(ptr == arr.ptr); } @system unittest { int[] arr = [1, 2, 3]; void foo(ref int[] i) { i ~= 5; } arr = arr[0 .. 2]; foo(assumeSafeAppend(arr)); //pass by ref assert(arr[]==[1, 2, 5]); arr = arr[0 .. 1].assumeSafeAppend(); //pass by value } // https://issues.dlang.org/show_bug.cgi?id=10574 @system unittest { int[] a; immutable(int[]) b; auto a2 = &assumeSafeAppend(a); auto b2 = &assumeSafeAppend(b); auto a3 = assumeSafeAppend(a[]); auto b3 = assumeSafeAppend(b[]); assert(is(typeof(*a2) == int[])); assert(is(typeof(*b2) == immutable(int[]))); assert(is(typeof(a3) == int[])); assert(is(typeof(b3) == immutable(int[]))); } private extern (C) void[] _d_newarrayU(const TypeInfo ti, size_t length) pure nothrow; /************** * Get the postblit for type T. * Returns: * null if no postblit is necessary * function pointer for struct postblits * delegate for class postblits */ private auto _getPostblit(T)() @trusted pure nothrow @nogc { // infer static postblit type, run postblit if any static if (is(T == struct)) { import core.internal.traits : Unqual; // use typeid(Unqual!T) here to skip TypeInfo_Const/Shared/... alias _PostBlitType = typeof(function (ref T t){ T a = t; }); return cast(_PostBlitType)typeid(Unqual!T).xpostblit; } else if ((&typeid(T).postblit).funcptr !is &TypeInfo.postblit) { alias _PostBlitType = typeof(delegate (ref T t){ T a = t; }); return cast(_PostBlitType)&typeid(T).postblit; } else return null; } private void _doPostblit(T)(T[] arr) { // infer static postblit type, run postblit if any static if (__traits(hasPostblit, T)) { auto postblit = _getPostblit!T(); foreach (ref elem; arr) postblit(elem); } } @safe unittest { static struct S1 { int* p; } static struct S2 { @disable this(); } static struct S3 { @disable this(this); } int dg1() pure nothrow @safe { { char[] m; string i; m = m.dup; i = i.idup; m = i.dup; i = m.idup; } { S1[] m; immutable(S1)[] i; m = m.dup; i = i.idup; static assert(!is(typeof(m.idup))); static assert(!is(typeof(i.dup))); } { S3[] m; immutable(S3)[] i; static assert(!is(typeof(m.dup))); static assert(!is(typeof(i.idup))); } { shared(S1)[] m; m = m.dup; static assert(!is(typeof(m.idup))); } { int[] a = (inout(int)) { inout(const(int))[] a; return a.dup; }(0); } return 1; } int dg2() pure nothrow @safe { { S2[] m = [S2.init, S2.init]; immutable(S2)[] i = [S2.init, S2.init]; m = m.dup; m = i.dup; i = m.idup; i = i.idup; } return 2; } enum a = dg1(); enum b = dg2(); assert(dg1() == a); assert(dg2() == b); } @system unittest { static struct Sunpure { this(this) @safe nothrow {} } static struct Sthrow { this(this) @safe pure {} } static struct Sunsafe { this(this) @system pure nothrow {} } static assert( __traits(compiles, () { [].dup!Sunpure; })); static assert(!__traits(compiles, () pure { [].dup!Sunpure; })); static assert( __traits(compiles, () { [].dup!Sthrow; })); static assert(!__traits(compiles, () nothrow { [].dup!Sthrow; })); static assert( __traits(compiles, () { [].dup!Sunsafe; })); static assert(!__traits(compiles, () @safe { [].dup!Sunsafe; })); static assert( __traits(compiles, () { [].idup!Sunpure; })); static assert(!__traits(compiles, () pure { [].idup!Sunpure; })); static assert( __traits(compiles, () { [].idup!Sthrow; })); static assert(!__traits(compiles, () nothrow { [].idup!Sthrow; })); static assert( __traits(compiles, () { [].idup!Sunsafe; })); static assert(!__traits(compiles, () @safe { [].idup!Sunsafe; })); } @safe unittest { static int*[] pureFoo() pure { return null; } { char[] s; immutable x = s.dup; } { immutable x = (cast(int*[])null).dup; } { immutable x = pureFoo(); } { immutable x = pureFoo().dup; } } @safe unittest { auto a = [1, 2, 3]; auto b = a.dup; debug(SENTINEL) {} else assert(b.capacity >= 3); } @system unittest { // Bugzilla 12580 void[] m = [0]; shared(void)[] s = [cast(shared)1]; immutable(void)[] i = [cast(immutable)2]; s = s.dup; static assert(is(typeof(s.dup) == shared(void)[])); m = i.dup; i = m.dup; i = i.idup; i = m.idup; i = s.idup; i = s.dup; static assert(!__traits(compiles, m = s.dup)); } @safe unittest { // Bugzilla 13809 static struct S { this(this) {} ~this() {} } S[] arr; auto a = arr.dup; } @system unittest { // Bugzilla 16504 static struct S { __gshared int* gp; int* p; // postblit and hence .dup could escape this(this) { gp = p; } } int p; scope S[1] arr = [S(&p)]; auto a = arr.dup; // dup does escape } /** Destroys the given object and optionally resets to initial state. It's used to _destroy an object, calling its destructor or finalizer so it no longer references any other objects. It does $(I not) initiate a GC cycle or free any GC memory. If `initialize` is supplied `false`, the object is considered invalid after destruction, and should not be referenced. */ void destroy(bool initialize = true, T)(ref T obj) if (is(T == struct)) { import core.internal.destruction : destructRecurse; destructRecurse(obj); static if (initialize) { import core.internal.lifetime : emplaceInitializer; emplaceInitializer(obj); // emplace T.init } } @safe unittest { struct A { string s = "A"; } A a = {s: "B"}; assert(a.s == "B"); a.destroy; assert(a.s == "A"); } nothrow @safe @nogc unittest { { struct A { string s = "A"; } A a; a.s = "asd"; destroy!false(a); assert(a.s == "asd"); destroy(a); assert(a.s == "A"); } { static int destroyed = 0; struct C { string s = "C"; ~this() nothrow @safe @nogc { destroyed ++; } } struct B { C c; string s = "B"; ~this() nothrow @safe @nogc { destroyed ++; } } B a; a.s = "asd"; a.c.s = "jkl"; destroy!false(a); assert(destroyed == 2); assert(a.s == "asd"); assert(a.c.s == "jkl" ); destroy(a); assert(destroyed == 4); assert(a.s == "B"); assert(a.c.s == "C" ); } } private extern (C) void rt_finalize(void *data, bool det=true) nothrow; /// ditto void destroy(bool initialize = true, T)(T obj) if (is(T == class)) { static if (__traits(getLinkage, T) == "C++") { static if (__traits(hasMember, T, "__xdtor")) obj.__xdtor(); static if (initialize) { enum classSize = __traits(classInstanceSize, T); (cast(void*)obj)[0 .. classSize] = typeid(T).initializer[]; } } else rt_finalize(cast(void*)obj); } /// ditto void destroy(bool initialize = true, T)(T obj) if (is(T == interface)) { static assert(__traits(getLinkage, T) == "D", "Invalid call to destroy() on extern(" ~ __traits(getLinkage, T) ~ ") interface"); destroy!initialize(cast(Object)obj); } /// Reference type demonstration @system unittest { class C { struct Agg { static int dtorCount; int x = 10; ~this() { dtorCount++; } } static int dtorCount; string s = "S"; Agg a; ~this() { dtorCount++; } } C c = new C(); assert(c.dtorCount == 0); // destructor not yet called assert(c.s == "S"); // initial state `c.s` is `"S"` assert(c.a.dtorCount == 0); // destructor not yet called assert(c.a.x == 10); // initial state `c.a.x` is `10` c.s = "T"; c.a.x = 30; assert(c.s == "T"); // `c.s` is `"T"` destroy(c); assert(c.dtorCount == 1); // `c`'s destructor was called assert(c.s == "S"); // `c.s` is back to its inital state, `"S"` assert(c.a.dtorCount == 1); // `c.a`'s destructor was called assert(c.a.x == 10); // `c.a.x` is back to its inital state, `10` // check C++ classes work too! extern (C++) class CPP { struct Agg { __gshared int dtorCount; int x = 10; ~this() { dtorCount++; } } __gshared int dtorCount; string s = "S"; Agg a; ~this() { dtorCount++; } } CPP cpp = new CPP(); assert(cpp.dtorCount == 0); // destructor not yet called assert(cpp.s == "S"); // initial state `cpp.s` is `"S"` assert(cpp.a.dtorCount == 0); // destructor not yet called assert(cpp.a.x == 10); // initial state `cpp.a.x` is `10` cpp.s = "T"; cpp.a.x = 30; assert(cpp.s == "T"); // `cpp.s` is `"T"` destroy!false(cpp); // destroy without initialization assert(cpp.dtorCount == 1); // `cpp`'s destructor was called assert(cpp.s == "T"); // `cpp.s` is not initialized assert(cpp.a.dtorCount == 1); // `cpp.a`'s destructor was called assert(cpp.a.x == 30); // `cpp.a.x` is not initialized destroy(cpp); assert(cpp.dtorCount == 2); // `cpp`'s destructor was called again assert(cpp.s == "S"); // `cpp.s` is back to its inital state, `"S"` assert(cpp.a.dtorCount == 2); // `cpp.a`'s destructor was called again assert(cpp.a.x == 10); // `cpp.a.x` is back to its inital state, `10` } /// Value type demonstration @safe unittest { int i; assert(i == 0); // `i`'s initial state is `0` i = 1; assert(i == 1); // `i` changed to `1` destroy!false(i); assert(i == 1); // `i` was not initialized destroy(i); assert(i == 0); // `i` is back to its initial state `0` } @system unittest { extern(C++) static class C { void* ptr; this() {} } destroy!false(new C()); destroy!true(new C()); } @system unittest { // class with an `alias this` class A { static int dtorCount; ~this() { dtorCount++; } } class B { A a; alias a this; this() { a = new A; } static int dtorCount; ~this() { dtorCount++; } } auto b = new B; assert(A.dtorCount == 0); assert(B.dtorCount == 0); destroy(b); assert(A.dtorCount == 0); assert(B.dtorCount == 1); } @system unittest { interface I { } { class A: I { string s = "A"; this() {} } auto a = new A, b = new A; a.s = b.s = "asd"; destroy(a); assert(a.s == "A"); I i = b; destroy(i); assert(b.s == "A"); } { static bool destroyed = false; class B: I { string s = "B"; this() {} ~this() { destroyed = true; } } auto a = new B, b = new B; a.s = b.s = "asd"; destroy(a); assert(destroyed); assert(a.s == "B"); destroyed = false; I i = b; destroy(i); assert(destroyed); assert(b.s == "B"); } // this test is invalid now that the default ctor is not run after clearing version (none) { class C { string s; this() { s = "C"; } } auto a = new C; a.s = "asd"; destroy(a); assert(a.s == "C"); } } nothrow @safe @nogc unittest { { struct A { string s = "A"; } A a; a.s = "asd"; destroy!false(a); assert(a.s == "asd"); destroy(a); assert(a.s == "A"); } { static int destroyed = 0; struct C { string s = "C"; ~this() nothrow @safe @nogc { destroyed ++; } } struct B { C c; string s = "B"; ~this() nothrow @safe @nogc { destroyed ++; } } B a; a.s = "asd"; a.c.s = "jkl"; destroy!false(a); assert(destroyed == 2); assert(a.s == "asd"); assert(a.c.s == "jkl" ); destroy(a); assert(destroyed == 4); assert(a.s == "B"); assert(a.c.s == "C" ); } } nothrow unittest { // Bugzilla 20049: Test to ensure proper behavior of `nothrow` destructors class C { static int dtorCount = 0; this() nothrow {} ~this() nothrow { dtorCount++; } } auto c = new C; destroy(c); assert(C.dtorCount == 1); } /// ditto void destroy(bool initialize = true, T : U[n], U, size_t n)(ref T obj) if (!is(T == struct) && !is(T == class) && !is(T == interface)) { foreach_reverse (ref e; obj[]) destroy!initialize(e); } @safe unittest { int[2] a; a[0] = 1; a[1] = 2; destroy!false(a); assert(a == [ 1, 2 ]); destroy(a); assert(a == [ 0, 0 ]); } @safe unittest { static struct vec2f { float[2] values; alias values this; } vec2f v; destroy!(true, vec2f)(v); } @system unittest { // Bugzilla 15009 static string op; static struct S { int x; this(int x) { op ~= "C" ~ cast(char)('0'+x); this.x = x; } this(this) { op ~= "P" ~ cast(char)('0'+x); } ~this() { op ~= "D" ~ cast(char)('0'+x); } } { S[2] a1 = [S(1), S(2)]; op = ""; } assert(op == "D2D1"); // built-in scope destruction { S[2] a1 = [S(1), S(2)]; op = ""; destroy(a1); assert(op == "D2D1"); // consistent with built-in behavior } { S[2][2] a2 = [[S(1), S(2)], [S(3), S(4)]]; op = ""; } assert(op == "D4D3D2D1"); { S[2][2] a2 = [[S(1), S(2)], [S(3), S(4)]]; op = ""; destroy(a2); assert(op == "D4D3D2D1", op); } } // https://issues.dlang.org/show_bug.cgi?id=19218 @system unittest { static struct S { static dtorCount = 0; ~this() { ++dtorCount; } } static interface I { ref S[3] getArray(); alias getArray this; } static class C : I { static dtorCount = 0; ~this() { ++dtorCount; } S[3] a; alias a this; ref S[3] getArray() { return a; } } C c = new C(); destroy(c); assert(S.dtorCount == 3); assert(C.dtorCount == 1); I i = new C(); destroy(i); assert(S.dtorCount == 6); assert(C.dtorCount == 2); } /// ditto void destroy(bool initialize = true, T)(ref T obj) if (!is(T == struct) && !is(T == interface) && !is(T == class) && !__traits(isStaticArray, T)) { static if (initialize) obj = T.init; } @safe unittest { { int a = 42; destroy!false(a); assert(a == 42); destroy(a); assert(a == 0); } { float a = 42; destroy!false(a); assert(a == 42); destroy(a); assert(a != a); // isnan } } @safe unittest { // Bugzilla 14746 static struct HasDtor { ~this() { assert(0); } } static struct Owner { HasDtor* ptr; alias ptr this; } Owner o; assert(o.ptr is null); destroy(o); // must not reach in HasDtor.__dtor() } /* ************************************************************************ COMPILER SUPPORT The compiler lowers certain expressions to instantiations of the following templates. They must be implicitly imported, which is why they are here in this file. They must also be `public` as they must be visible from the scope in which they are instantiated. They are explicitly undocumented as they are only intended to be instantiated by the compiler, not the user. **************************************************************************/ public import core.internal.entrypoint : _d_cmain; public import core.internal.array.appending : _d_arrayappendTImpl; public import core.internal.array.appending : _d_arrayappendcTXImpl; public import core.internal.array.comparison : __cmp; public import core.internal.array.equality : __equals; public import core.internal.array.casting: __ArrayCast; public import core.internal.array.concatenation : _d_arraycatnTXImpl; public import core.internal.array.construction : _d_arrayctor; public import core.internal.array.construction : _d_arraysetctor; public import core.internal.array.capacity: _d_arraysetlengthTImpl; public import core.internal.dassert: _d_assert_fail; public import core.internal.destruction: __ArrayDtor; public import core.internal.moving: __move_post_blt; public import core.internal.postblit: __ArrayPostblit; public import core.internal.switch_: __switch; public import core.internal.switch_: __switch_error; public @trusted @nogc nothrow pure extern (C) void _d_delThrowable(scope Throwable); // Compare class and interface objects for ordering. private int __cmp(Obj)(Obj lhs, Obj rhs) if (is(Obj : Object)) { if (lhs is rhs) return 0; // Regard null references as always being "less than" if (!lhs) return -1; if (!rhs) return 1; return lhs.opCmp(rhs); } // objects @safe unittest { class C { int i; this(int i) { this.i = i; } override int opCmp(Object c) const @safe { return i - (cast(C)c).i; } } auto c1 = new C(1); auto c2 = new C(2); assert(__cmp(c1, null) > 0); assert(__cmp(null, c1) < 0); assert(__cmp(c1, c1) == 0); assert(__cmp(c1, c2) < 0); assert(__cmp(c2, c1) > 0); assert(__cmp([c1, c1][], [c2, c2][]) < 0); assert(__cmp([c2, c2], [c1, c1]) > 0); } // structs @safe unittest { struct C { ubyte i; this(ubyte i) { this.i = i; } } auto c1 = C(1); auto c2 = C(2); assert(__cmp([c1, c1][], [c2, c2][]) < 0); assert(__cmp([c2, c2], [c1, c1]) > 0); assert(__cmp([c2, c2], [c2, c1]) > 0); } @safe unittest { auto a = "hello"c; assert(a > "hel"); assert(a >= "hel"); assert(a < "helloo"); assert(a <= "helloo"); assert(a > "betty"); assert(a >= "betty"); assert(a == "hello"); assert(a <= "hello"); assert(a >= "hello"); assert(a < "я"); } // Used in Exception Handling LSDA tables to 'wrap' C++ type info // so it can be distinguished from D TypeInfo class __cpp_type_info_ptr { void* ptr; // opaque pointer to C++ RTTI type info } // Compiler hook into the runtime implementation of array (vector) operations. template _arrayOp(Args...) { import core.internal.array.operations; alias _arrayOp = arrayOp!Args; } void __ctfeWrite(scope const(char)[] s) @nogc @safe pure nothrow {}
D
module UnrealScript.UTGame.UTGameSettingsCommon; import ScriptClasses; import UnrealScript.Helpers; import UnrealScript.Engine.GameInfo; import UnrealScript.UTGame.UTUIDataStore_MenuItems; import UnrealScript.UDKBase.UDKGameSettingsCommon; extern(C++) interface UTGameSettingsCommon : UDKGameSettingsCommon { public extern(D): private static __gshared ScriptClass mStaticClass; @property final static ScriptClass StaticClass() { mixin(MGSCC("Class UTGame.UTGameSettingsCommon")); } private static __gshared UTGameSettingsCommon mDefaultProperties; @property final static UTGameSettingsCommon DefaultProperties() { mixin(MGDPC("UTGameSettingsCommon", "UTGameSettingsCommon UTGame.Default__UTGameSettingsCommon")); } static struct Functions { private static __gshared { ScriptFunction mSetCustomMapName; ScriptFunction mSetOfficialMutatorBitmask; ScriptFunction mBuildURL; ScriptFunction mUpdateFromURL; ScriptFunction mSetMutators; ScriptFunction mGenerateMutatorBitmaskFromURL; ScriptFunction mSetCustomMutators; } public @property static final { ScriptFunction SetCustomMapName() { mixin(MGF("mSetCustomMapName", "Function UTGame.UTGameSettingsCommon.SetCustomMapName")); } ScriptFunction SetOfficialMutatorBitmask() { mixin(MGF("mSetOfficialMutatorBitmask", "Function UTGame.UTGameSettingsCommon.SetOfficialMutatorBitmask")); } ScriptFunction BuildURL() { mixin(MGF("mBuildURL", "Function UTGame.UTGameSettingsCommon.BuildURL")); } ScriptFunction UpdateFromURL() { mixin(MGF("mUpdateFromURL", "Function UTGame.UTGameSettingsCommon.UpdateFromURL")); } ScriptFunction SetMutators() { mixin(MGF("mSetMutators", "Function UTGame.UTGameSettingsCommon.SetMutators")); } ScriptFunction GenerateMutatorBitmaskFromURL() { mixin(MGF("mGenerateMutatorBitmaskFromURL", "Function UTGame.UTGameSettingsCommon.GenerateMutatorBitmaskFromURL")); } ScriptFunction SetCustomMutators() { mixin(MGF("mSetCustomMutators", "Function UTGame.UTGameSettingsCommon.SetCustomMutators")); } } } static struct Constants { enum { GS_USERNAME_MAXLENGTH = 15, GS_PASSWORD_MAXLENGTH = 30, GS_MESSAGE_MAXLENGTH = 255, GS_EMAIL_MAXLENGTH = 50, GS_CDKEY_PART_MAXLENGTH = 4, CONTEXT_PRESENCE_MENUPRESENCE = 0, CONTEXT_GAME_MODE = 0x0000800B, CONTEXT_GAME_MODE_DM = 0, CONTEXT_GAME_MODE_CTF = 1, CONTEXT_GAME_MODE_WAR = 2, CONTEXT_GAME_MODE_VCTF = 3, CONTEXT_GAME_MODE_TDM = 4, CONTEXT_GAME_MODE_DUEL = 5, CONTEXT_GAME_MODE_CUSTOM = 6, CONTEXT_GAME_MODE_CAMPAIGN = 7, CONTEXT_MAPNAME = 0, CONTEXT_LOCKEDSERVER = 1, CONTEXT_ALLOWKEYBOARD = 2, CONTEXT_BOTSKILL = 10, CONTEXT_PURESERVER = 11, CONTEXT_VSBOTS = 12, CONTEXT_CAMPAIGN = 13, CONTEXT_FORCERESPAWN = 14, CONTEXT_FULLSERVER = 15, CONTEXT_EMPTYSERVER = 16, CONTEXT_DEDICATEDSERVER = 17, CONTEXT_MAPNAME_CUSTOM = 0, CONTEXT_BOTSKILL_NOVICE = 0, CONTEXT_BOTSKILL_AVERAGE = 1, CONTEXT_BOTSKILL_EXPERIENCED = 2, CONTEXT_BOTSKILL_SKILLED = 3, CONTEXT_BOTSKILL_ADEPT = 4, CONTEXT_BOTSKILL_MASTERFUL = 5, CONTEXT_BOTSKILL_INHUMAN = 6, CONTEXT_BOTSKILL_GODLIKE = 7, CONTEXT_GOALSCORE_5 = 0, CONTEXT_GOALSCORE_10 = 1, CONTEXT_GOALSCORE_15 = 2, CONTEXT_GOALSCORE_20 = 3, CONTEXT_GOALSCORE_30 = 4, CONTEXT_NUMBOTS_0 = 0, CONTEXT_NUMBOTS_1 = 1, CONTEXT_NUMBOTS_2 = 2, CONTEXT_NUMBOTS_3 = 3, CONTEXT_NUMBOTS_4 = 4, CONTEXT_NUMBOTS_5 = 5, CONTEXT_NUMBOTS_6 = 6, CONTEXT_NUMBOTS_7 = 7, CONTEXT_NUMBOTS_8 = 8, CONTEXT_TIMELIMIT_5 = 0, CONTEXT_TIMELIMIT_10 = 1, CONTEXT_TIMELIMIT_15 = 2, CONTEXT_TIMELIMIT_20 = 3, CONTEXT_TIMELIMIT_30 = 4, CONTEXT_PURESERVER_NO = 0, CONTEXT_PURESERVER_YES = 1, CONTEXT_PURESERVER_ANY = 2, CONTEXT_LOCKEDSERVER_NO = 0, CONTEXT_LOCKEDSERVER_YES = 1, CONTEXT_CAMPAIGN_NO = 0, CONTEXT_CAMPAIGN_YES = 1, CONTEXT_FORCERESPAWN_NO = 0, CONTEXT_FORCERESPAWN_YES = 1, CONTEXT_ALLOWKEYBOARD_NO = 0, CONTEXT_ALLOWKEYBOARD_YES = 1, CONTEXT_ALLOWKEYBOARD_ANY = 2, CONTEXT_FULLSERVER_NO = 0, CONTEXT_FULLSERVER_YES = 1, CONTEXT_EMPTYSERVER_NO = 0, CONTEXT_EMPTYSERVER_YES = 1, CONTEXT_DEDICATEDSERVER_NO = 0, CONTEXT_DEDICATEDSERVER_YES = 1, CONTEXT_VSBOTS_NONE = 0, CONTEXT_VSBOTS_1_TO_2 = 1, CONTEXT_VSBOTS_1_TO_1 = 2, CONTEXT_VSBOTS_3_TO_2 = 3, CONTEXT_VSBOTS_2_TO_1 = 4, CONTEXT_VSBOTS_3_TO_1 = 5, CONTEXT_VSBOTS_4_TO_1 = 6, PROPERTY_NUMBOTS = 0x100000F7, PROPERTY_TIMELIMIT = 0x1000000A, PROPERTY_GOALSCORE = 0x1000000B, PROPERTY_LEADERBOARDRATING = 0x20000004, PROPERTY_EPICMUTATORS = 0x10000105, PROPERTY_CUSTOMMAPNAME = 0x40000001, PROPERTY_CUSTOMGAMEMODE = 0x40000002, PROPERTY_SERVERDESCRIPTION = 0x40000003, PROPERTY_CUSTOMMUTATORS = 0x40000004, QUERY_DM = 0, QUERY_TDM = 1, QUERY_CTF = 2, QUERY_VCTF = 3, QUERY_WAR = 4, QUERY_DUEL = 5, QUERY_CAMPAIGN = 6, STATS_VIEW_DM_PLAYER_ALLTIME = 1, STATS_VIEW_DM_RANKED_ALLTIME = 2, STATS_VIEW_DM_WEAPONS_ALLTIME = 3, STATS_VIEW_DM_VEHICLES_ALLTIME = 4, STATS_VIEW_DM_VEHICLEWEAPONS_ALLTIME = 5, STATS_VIEW_DM_VEHICLES_RANKED_ALLTIME = 6, STATS_VIEW_DM_VEHICLEWEAPONS_RANKED_ALLTIME = 7, STATS_VIEW_DM_WEAPONS_RANKED_ALLTIME = 8, } } @property final auto ref { int MaxPlayers() { mixin(MGPC("int", 172)); } int MinNetPlayers() { mixin(MGPC("int", 176)); } } final: void SetCustomMapName(ScriptString MapName) { ubyte params[12]; params[] = 0; *cast(ScriptString*)params.ptr = MapName; (cast(ScriptObject)this).ProcessEvent(Functions.SetCustomMapName, params.ptr, cast(void*)0); } void SetOfficialMutatorBitmask(int MutatorBitmask) { ubyte params[4]; params[] = 0; *cast(int*)params.ptr = MutatorBitmask; (cast(ScriptObject)this).ProcessEvent(Functions.SetOfficialMutatorBitmask, params.ptr, cast(void*)0); } void BuildURL(ref ScriptString OutURL) { ubyte params[12]; params[] = 0; *cast(ScriptString*)params.ptr = OutURL; (cast(ScriptObject)this).ProcessEvent(Functions.BuildURL, params.ptr, cast(void*)0); OutURL = *cast(ScriptString*)params.ptr; } void UpdateFromURL(ref in ScriptString pURL, GameInfo Game) { ubyte params[16]; params[] = 0; *cast(ScriptString*)params.ptr = cast(ScriptString)pURL; *cast(GameInfo*)&params[12] = Game; (cast(ScriptObject)this).ProcessEvent(Functions.UpdateFromURL, params.ptr, cast(void*)0); } void SetMutators(ref in ScriptString pURL) { ubyte params[12]; params[] = 0; *cast(ScriptString*)params.ptr = cast(ScriptString)pURL; (cast(ScriptObject)this).ProcessEvent(Functions.SetMutators, params.ptr, cast(void*)0); } int GenerateMutatorBitmaskFromURL(UTUIDataStore_MenuItems MenuDataStore, ref ScriptArray!(ScriptString) MutatorClassNames) { ubyte params[20]; params[] = 0; *cast(UTUIDataStore_MenuItems*)params.ptr = MenuDataStore; *cast(ScriptArray!(ScriptString)*)&params[4] = MutatorClassNames; (cast(ScriptObject)this).ProcessEvent(Functions.GenerateMutatorBitmaskFromURL, params.ptr, cast(void*)0); MutatorClassNames = *cast(ScriptArray!(ScriptString)*)&params[4]; return *cast(int*)&params[16]; } void SetCustomMutators(UTUIDataStore_MenuItems MenuDataStore, ref in ScriptArray!(ScriptString) MutatorClassNames) { ubyte params[16]; params[] = 0; *cast(UTUIDataStore_MenuItems*)params.ptr = MenuDataStore; *cast(ScriptArray!(ScriptString)*)&params[4] = cast(ScriptArray!(ScriptString))MutatorClassNames; (cast(ScriptObject)this).ProcessEvent(Functions.SetCustomMutators, params.ptr, cast(void*)0); } }
D
instance VLK_4002_Buergerin (Npc_Default) { // ------ NSC ------ name = NAME_Buergerin; guild = GIL_VLK; id = 4002; voice = 17; flags = 0; npctype = NPCTYPE_AMBIENT; // ------ Attribute ------ B_SetAttributesToChapter (self, 3); // ------ Kampf-Taktik ------ fight_tactic = FAI_HUMAN_COWARD; // ------ Equippte Waffen ------ // ------ Inventory ------ B_CreateAmbientInv (self); // ------ visuals ------ B_SetNpcVisual (self, FEMALE, "Hum_Head_Babe1", FaceBabe_N_Anne, BodyTex_N, ITAR_VlkBabe_H); Mdl_SetModelFatness (self, 0); Mdl_ApplyOverlayMds (self, "Humans_Babe.mds"); // ------ NSC-relevante Talente vergeben ------ B_GiveNpcTalents (self); // ------ Kampf-Talente ------ B_SetFightSkills (self, 30); // ------ TA anmelden ------ daily_routine = Rtn_Start_4002; }; FUNC VOID Rtn_Start_4002 () { TA_Cook_Stove (06,00,08,00,"NW_CITY_RICHTER_COOK"); TA_Stand_Sweeping (08,00,10,00,"NW_CITY_UPTOWN_JUDGE_02"); TA_Smalltalk (10,00,14,00,"NW_CITY_UPTOWN_PATH_15"); TA_Cook_Stove (14,00,16,00,"NW_CITY_RICHTER_COOK"); TA_Sit_Chair (16,00,18,00,"NW_CITY_RICHTER"); TA_Stand_Sweeping (18,00,20,00,"NW_CITY_UPTOWN_JUDGE_02"); TA_Sit_Throne (20,00,23,00,"NW_CITY_UPTOWN_JUDGE_THRONE_01"); TA_Sleep (23,00,06,00,"NW_CITY_RICHTER_BED_WEIB"); };
D
/Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/App.build/configure.swift.o : /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/Sources/App/configure.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/Sources/App/Models/UserToken.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/Sources/App/Models/Todo.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/Sources/App/app.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/Sources/App/Controllers/TodoController.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/Sources/App/Controllers/UserController.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/Sources/App/Models/User.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/Sources/App/routes.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/Sources/App/boot.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/NIOHTTP1.swiftmodule /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/FluentSQL.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/NIOOpenSSL.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/HTTP.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/NIOTLS.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/Command.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/Console.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/SQLite.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/FluentSQLite.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/Logging.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/Routing.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/COperatingSystem.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/Random.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/URLEncodedForm.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/Authentication.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/Validation.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/Crypto.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/Vapor.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/WebSocket.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/NIOWebSocket.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/DatabaseKit.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/TemplateKit.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/Fluent.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/Multipart.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/swift-nio/Sources/CNIOSHA1/include/CNIOSHA1.h /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/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.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/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 /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/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/swift-nio-ssl/Sources/CNIOOpenSSL/include/c_nio_openssl.h /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/crypto/Sources/CCryptoOpenSSL/include/c_crypto_openssl.h /usr/local/Cellar/libressl/3.0.2/include/openssl/pem.h /usr/local/Cellar/libressl/3.0.2/include/openssl/bn.h /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.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/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/swift-nio/Sources/CNIOHTTPParser/include/CNIOHTTPParser.h /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/swift-nio/Sources/CNIOHTTPParser/include/c_nio_http_parser.h /usr/local/Cellar/libressl/3.0.2/include/openssl/err.h /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.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/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/swift-nio/Sources/CNIOLinux/include/CNIOLinux.h /usr/local/Cellar/libressl/3.0.2/include/openssl/x509_vfy.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/crypto/Sources/CBase32/include/module.modulemap /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/crypto/Sources/CBcrypt/include/module.modulemap /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/swift-nio-zlib-support/module.modulemap /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.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/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/App.build/configure~partial.swiftmodule : /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/Sources/App/configure.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/Sources/App/Models/UserToken.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/Sources/App/Models/Todo.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/Sources/App/app.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/Sources/App/Controllers/TodoController.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/Sources/App/Controllers/UserController.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/Sources/App/Models/User.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/Sources/App/routes.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/Sources/App/boot.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/NIOHTTP1.swiftmodule /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/FluentSQL.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/NIOOpenSSL.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/HTTP.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/NIOTLS.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/Command.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/Console.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/SQLite.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/FluentSQLite.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/Logging.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/Routing.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/COperatingSystem.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/Random.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/URLEncodedForm.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/Authentication.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/Validation.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/Crypto.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/Vapor.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/WebSocket.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/NIOWebSocket.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/DatabaseKit.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/TemplateKit.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/Fluent.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/Multipart.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/swift-nio/Sources/CNIOSHA1/include/CNIOSHA1.h /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/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.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/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 /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/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/swift-nio-ssl/Sources/CNIOOpenSSL/include/c_nio_openssl.h /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/crypto/Sources/CCryptoOpenSSL/include/c_crypto_openssl.h /usr/local/Cellar/libressl/3.0.2/include/openssl/pem.h /usr/local/Cellar/libressl/3.0.2/include/openssl/bn.h /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.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/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/swift-nio/Sources/CNIOHTTPParser/include/CNIOHTTPParser.h /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/swift-nio/Sources/CNIOHTTPParser/include/c_nio_http_parser.h /usr/local/Cellar/libressl/3.0.2/include/openssl/err.h /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.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/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/swift-nio/Sources/CNIOLinux/include/CNIOLinux.h /usr/local/Cellar/libressl/3.0.2/include/openssl/x509_vfy.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/crypto/Sources/CBase32/include/module.modulemap /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/crypto/Sources/CBcrypt/include/module.modulemap /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/swift-nio-zlib-support/module.modulemap /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.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/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/App.build/configure~partial.swiftdoc : /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/Sources/App/configure.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/Sources/App/Models/UserToken.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/Sources/App/Models/Todo.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/Sources/App/app.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/Sources/App/Controllers/TodoController.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/Sources/App/Controllers/UserController.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/Sources/App/Models/User.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/Sources/App/routes.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/Sources/App/boot.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/NIOHTTP1.swiftmodule /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/FluentSQL.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/NIOOpenSSL.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/HTTP.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/NIOTLS.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/Command.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/Console.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/SQLite.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/FluentSQLite.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/Logging.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/Routing.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/COperatingSystem.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/Random.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/URLEncodedForm.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/Authentication.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/Validation.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/Crypto.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/Vapor.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/WebSocket.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/NIOWebSocket.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/DatabaseKit.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/TemplateKit.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/Fluent.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/Multipart.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/swift-nio/Sources/CNIOSHA1/include/CNIOSHA1.h /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/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.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/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 /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/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/swift-nio-ssl/Sources/CNIOOpenSSL/include/c_nio_openssl.h /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/crypto/Sources/CCryptoOpenSSL/include/c_crypto_openssl.h /usr/local/Cellar/libressl/3.0.2/include/openssl/pem.h /usr/local/Cellar/libressl/3.0.2/include/openssl/bn.h /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.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/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/swift-nio/Sources/CNIOHTTPParser/include/CNIOHTTPParser.h /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/swift-nio/Sources/CNIOHTTPParser/include/c_nio_http_parser.h /usr/local/Cellar/libressl/3.0.2/include/openssl/err.h /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.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/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/swift-nio/Sources/CNIOLinux/include/CNIOLinux.h /usr/local/Cellar/libressl/3.0.2/include/openssl/x509_vfy.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/crypto/Sources/CBase32/include/module.modulemap /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/crypto/Sources/CBcrypt/include/module.modulemap /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/swift-nio-zlib-support/module.modulemap /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.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
// Written in the D programming language. /** Functions for starting and interacting with other processes, and for working with the current _process' execution environment. Process_handling: $(UL $(LI $(LREF spawnProcess) spawns a new _process, optionally assigning it an arbitrary set of standard input, output, and error streams. The function returns immediately, leaving the child _process to execute in parallel with its parent. All other functions in this module that spawn processes are built around $(D spawnProcess).) $(LI $(LREF wait) makes the parent _process wait for a child _process to terminate. In general one should always do this, to avoid child processes becoming "zombies" when the parent _process exits. Scope guards are perfect for this – see the $(LREF spawnProcess) documentation for examples. $(LREF tryWait) is similar to $(D wait), but does not block if the _process has not yet terminated.) $(LI $(LREF pipeProcess) also spawns a child _process which runs in parallel with its parent. However, instead of taking arbitrary streams, it automatically creates a set of pipes that allow the parent to communicate with the child through the child's standard input, output, and/or error streams. This function corresponds roughly to C's $(D popen) function.) $(LI $(LREF execute) starts a new _process and waits for it to complete before returning. Additionally, it captures the _process' standard output and error streams and returns the output of these as a string.) $(LI $(LREF spawnShell), $(LREF pipeShell) and $(LREF executeShell) work like $(D spawnProcess), $(D pipeProcess) and $(D execute), respectively, except that they take a single command string and run it through the current user's default command interpreter. $(D executeShell) corresponds roughly to C's $(D system) function.) $(LI $(LREF kill) attempts to terminate a running _process.) ) The following table compactly summarises the different _process creation functions and how they relate to each other: $(BOOKTABLE, $(TR $(TH ) $(TH Runs program directly) $(TH Runs shell command)) $(TR $(TD Low-level _process creation) $(TD $(LREF spawnProcess)) $(TD $(LREF spawnShell))) $(TR $(TD Automatic input/output redirection using pipes) $(TD $(LREF pipeProcess)) $(TD $(LREF pipeShell))) $(TR $(TD Execute and wait for completion, collect output) $(TD $(LREF execute)) $(TD $(LREF executeShell))) ) Other_functionality: $(UL $(LI $(LREF pipe) is used to create unidirectional pipes.) $(LI $(LREF environment) is an interface through which the current _process' environment variables can be read and manipulated.) $(LI $(LREF escapeShellCommand) and $(LREF escapeShellFileName) are useful for constructing shell command lines in a portable way.) ) Authors: $(LINK2 https://github.com/kyllingstad, Lars Tandle Kyllingstad), $(LINK2 https://github.com/schveiguy, Steven Schveighoffer), $(HTTP thecybershadow.net, Vladimir Panteleev) Copyright: Copyright (c) 2013, the authors. All rights reserved. License: $(HTTP www.boost.org/LICENSE_1_0.txt, Boost License 1.0). Source: $(PHOBOSSRC std/_process.d) Macros: OBJECTREF=$(D $(LINK2 object.html#$0,$0)) LREF=$(D $(LINK2 #.$0,$0)) */ module std.process; version (Posix) { import core.sys.posix.sys.wait; import core.sys.posix.unistd; } version (Windows) { import core.stdc.stdio; import core.sys.windows.windows; import std.utf; import std.windows.syserror; } import std.internal.cstring; import std.range.primitives; import std.stdio; // When the DMC runtime is used, we have to use some custom functions // to convert between Windows file handles and FILE*s. version (Win32) version (CRuntime_DigitalMars) version = DMC_RUNTIME; // Some of the following should be moved to druntime. private { // Microsoft Visual C Runtime (MSVCRT) declarations. version (Windows) { version (DMC_RUNTIME) { } else { import core.stdc.stdint; enum { STDIN_FILENO = 0, STDOUT_FILENO = 1, STDERR_FILENO = 2, } } } // POSIX API declarations. version (Posix) { version (OSX) { extern(C) char*** _NSGetEnviron() nothrow; const(char**) getEnvironPtr() @trusted { return *_NSGetEnviron; } } else { // Made available by the C runtime: extern(C) extern __gshared const char** environ; const(char**) getEnvironPtr() @trusted { return environ; } } @system unittest { new Thread({assert(getEnvironPtr !is null);}).start(); } } } // private // ============================================================================= // Functions and classes for process management. // ============================================================================= /** Spawns a new _process, optionally assigning it an arbitrary set of standard input, output, and error streams. The function returns immediately, leaving the child _process to execute in parallel with its parent. It is recommended to always call $(LREF wait) on the returned $(LREF Pid) unless the process was spawned with $(D Config.detached) flag, as detailed in the documentation for $(D wait). Command_line: There are four overloads of this function. The first two take an array of strings, $(D args), which should contain the program name as the zeroth element and any command-line arguments in subsequent elements. The third and fourth versions are included for convenience, and may be used when there are no command-line arguments. They take a single string, $(D program), which specifies the program name. Unless a directory is specified in $(D args[0]) or $(D program), $(D spawnProcess) will search for the program in a platform-dependent manner. On POSIX systems, it will look for the executable in the directories listed in the PATH environment variable, in the order they are listed. On Windows, it will search for the executable in the following sequence: $(OL $(LI The directory from which the application loaded.) $(LI The current directory for the parent process.) $(LI The 32-bit Windows system directory.) $(LI The 16-bit Windows system directory.) $(LI The Windows directory.) $(LI The directories listed in the PATH environment variable.) ) --- // Run an executable called "prog" located in the current working // directory: auto pid = spawnProcess("./prog"); scope(exit) wait(pid); // We can do something else while the program runs. The scope guard // ensures that the process is waited for at the end of the scope. ... // Run DMD on the file "myprog.d", specifying a few compiler switches: auto dmdPid = spawnProcess(["dmd", "-O", "-release", "-inline", "myprog.d" ]); if (wait(dmdPid) != 0) writeln("Compilation failed!"); --- Environment_variables: By default, the child process inherits the environment of the parent process, along with any additional variables specified in the $(D env) parameter. If the same variable exists in both the parent's environment and in $(D env), the latter takes precedence. If the $(LREF Config.newEnv) flag is set in $(D config), the child process will $(I not) inherit the parent's environment. Its entire environment will then be determined by $(D env). --- wait(spawnProcess("myapp", ["foo" : "bar"], Config.newEnv)); --- Standard_streams: The optional arguments $(D stdin), $(D stdout) and $(D stderr) may be used to assign arbitrary $(REF File, std,stdio) objects as the standard input, output and error streams, respectively, of the child process. The former must be opened for reading, while the latter two must be opened for writing. The default is for the child process to inherit the standard streams of its parent. --- // Run DMD on the file myprog.d, logging any error messages to a // file named errors.log. auto logFile = File("errors.log", "w"); auto pid = spawnProcess(["dmd", "myprog.d"], std.stdio.stdin, std.stdio.stdout, logFile); if (wait(pid) != 0) writeln("Compilation failed. See errors.log for details."); --- Note that if you pass a $(D File) object that is $(I not) one of the standard input/output/error streams of the parent process, that stream will by default be $(I closed) in the parent process when this function returns. See the $(LREF Config) documentation below for information about how to disable this behaviour. Beware of buffering issues when passing $(D File) objects to $(D spawnProcess). The child process will inherit the low-level raw read/write offset associated with the underlying file descriptor, but it will not be aware of any buffered data. In cases where this matters (e.g. when a file should be aligned before being passed on to the child process), it may be a good idea to use unbuffered streams, or at least ensure all relevant buffers are flushed. Params: args = An array which contains the program name as the zeroth element and any command-line arguments in the following elements. stdin = The standard input stream of the child process. This can be any $(REF File, std,stdio) that is opened for reading. By default the child process inherits the parent's input stream. stdout = The standard output stream of the child process. This can be any $(REF File, std,stdio) that is opened for writing. By default the child process inherits the parent's output stream. stderr = The standard error stream of the child process. This can be any $(REF File, std,stdio) that is opened for writing. By default the child process inherits the parent's error stream. env = Additional environment variables for the child process. config = Flags that control process creation. See $(LREF Config) for an overview of available flags. workDir = The working directory for the new process. By default the child process inherits the parent's working directory. Returns: A $(LREF Pid) object that corresponds to the spawned process. Throws: $(LREF ProcessException) on failure to start the process.$(BR) $(REF StdioException, std,stdio) on failure to pass one of the streams to the child process (Windows only).$(BR) $(REF RangeError, core,exception) if $(D args) is empty. */ Pid spawnProcess(in char[][] args, File stdin = std.stdio.stdin, File stdout = std.stdio.stdout, File stderr = std.stdio.stderr, const string[string] env = null, Config config = Config.none, in char[] workDir = null) @trusted // TODO: Should be @safe { version (Windows) auto args2 = escapeShellArguments(args); else version (Posix) alias args2 = args; return spawnProcessImpl(args2, stdin, stdout, stderr, env, config, workDir); } /// ditto Pid spawnProcess(in char[][] args, const string[string] env, Config config = Config.none, in char[] workDir = null) @trusted // TODO: Should be @safe { return spawnProcess(args, std.stdio.stdin, std.stdio.stdout, std.stdio.stderr, env, config, workDir); } /// ditto Pid spawnProcess(in char[] program, File stdin = std.stdio.stdin, File stdout = std.stdio.stdout, File stderr = std.stdio.stderr, const string[string] env = null, Config config = Config.none, in char[] workDir = null) @trusted { return spawnProcess((&program)[0 .. 1], stdin, stdout, stderr, env, config, workDir); } /// ditto Pid spawnProcess(in char[] program, const string[string] env, Config config = Config.none, in char[] workDir = null) @trusted { return spawnProcess((&program)[0 .. 1], env, config, workDir); } version(Posix) private enum InternalError : ubyte { noerror, exec, chdir, getrlimit, doubleFork, } /* Implementation of spawnProcess() for POSIX. envz should be a zero-terminated array of zero-terminated strings on the form "var=value". */ version (Posix) private Pid spawnProcessImpl(in char[][] args, File stdin, File stdout, File stderr, const string[string] env, Config config, in char[] workDir) @trusted // TODO: Should be @safe { import core.exception : RangeError; import std.algorithm.searching : any; import std.conv : text; import std.path : isDirSeparator; import std.string : toStringz; if (args.empty) throw new RangeError(); const(char)[] name = args[0]; if (any!isDirSeparator(name)) { if (!isExecutable(name)) throw new ProcessException(text("Not an executable file: ", name)); } else { name = searchPathFor(name); if (name is null) throw new ProcessException(text("Executable file not found: ", args[0])); } // Convert program name and arguments to C-style strings. auto argz = new const(char)*[args.length+1]; argz[0] = toStringz(name); foreach (i; 1 .. args.length) argz[i] = toStringz(args[i]); argz[$-1] = null; // Prepare environment. auto envz = createEnv(env, !(config & Config.newEnv)); // Open the working directory. // We use open in the parent and fchdir in the child // so that most errors (directory doesn't exist, not a directory) // can be propagated as exceptions before forking. int workDirFD = -1; scope(exit) if (workDirFD >= 0) close(workDirFD); if (workDir.length) { import core.sys.posix.fcntl : open, O_RDONLY, stat_t, fstat, S_ISDIR; workDirFD = open(workDir.tempCString(), O_RDONLY); if (workDirFD < 0) throw ProcessException.newFromErrno("Failed to open working directory"); stat_t s; if (fstat(workDirFD, &s) < 0) throw ProcessException.newFromErrno("Failed to stat working directory"); if (!S_ISDIR(s.st_mode)) throw new ProcessException("Not a directory: " ~ cast(string) workDir); } static int getFD(ref File f) { return core.stdc.stdio.fileno(f.getFP()); } // Get the file descriptors of the streams. // These could potentially be invalid, but that is OK. If so, later calls // to dup2() and close() will just silently fail without causing any harm. auto stdinFD = getFD(stdin); auto stdoutFD = getFD(stdout); auto stderrFD = getFD(stderr); // We don't have direct access to the errors that may happen in a child process. // So we use this pipe to deliver them. int[2] forkPipe; if (core.sys.posix.unistd.pipe(forkPipe) == 0) setCLOEXEC(forkPipe[1], true); else throw ProcessException.newFromErrno("Could not create pipe to check startup of child"); scope(exit) close(forkPipe[0]); /* To create detached process, we use double fork technique but we don't have a direct access to the second fork pid from the caller side thus use a pipe. We also can't reuse forkPipe for that purpose because we can't predict the order in which pid and possible error will be written since the first and the second forks will run in parallel. */ int[2] pidPipe; if (config & Config.detached) { if (core.sys.posix.unistd.pipe(pidPipe) != 0) throw ProcessException.newFromErrno("Could not create pipe to get process pid"); setCLOEXEC(pidPipe[1], true); } scope(exit) if (config & Config.detached) close(pidPipe[0]); static void abortOnError(int forkPipeOut, InternalError errorType, int error) nothrow { core.sys.posix.unistd.write(forkPipeOut, &errorType, errorType.sizeof); core.sys.posix.unistd.write(forkPipeOut, &error, error.sizeof); close(forkPipeOut); core.sys.posix.unistd._exit(1); assert(0); } void closePipeWriteEnds() { close(forkPipe[1]); if (config & Config.detached) close(pidPipe[1]); } auto id = core.sys.posix.unistd.fork(); if (id < 0) { closePipeWriteEnds(); throw ProcessException.newFromErrno("Failed to spawn new process"); } void forkChild() nothrow @nogc { static import core.sys.posix.stdio; pragma(inline, true); // Child process // no need for the read end of pipe on child side if (config & Config.detached) close(pidPipe[0]); close(forkPipe[0]); immutable forkPipeOut = forkPipe[1]; immutable pidPipeOut = pidPipe[1]; // Set the working directory. if (workDirFD >= 0) { if (fchdir(workDirFD) < 0) { // Fail. It is dangerous to run a program // in an unexpected working directory. abortOnError(forkPipeOut, InternalError.chdir, .errno); } close(workDirFD); } void execProcess() { // Redirect streams and close the old file descriptors. // In the case that stderr is redirected to stdout, we need // to backup the file descriptor since stdout may be redirected // as well. if (stderrFD == STDOUT_FILENO) stderrFD = dup(stderrFD); dup2(stdinFD, STDIN_FILENO); dup2(stdoutFD, STDOUT_FILENO); dup2(stderrFD, STDERR_FILENO); // Ensure that the standard streams aren't closed on execute, and // optionally close all other file descriptors. setCLOEXEC(STDIN_FILENO, false); setCLOEXEC(STDOUT_FILENO, false); setCLOEXEC(STDERR_FILENO, false); if (!(config & Config.inheritFDs)) { import core.stdc.stdlib : malloc; import core.sys.posix.poll : pollfd, poll, POLLNVAL; import core.sys.posix.sys.resource : rlimit, getrlimit, RLIMIT_NOFILE; // Get the maximum number of file descriptors that could be open. rlimit r; if (getrlimit(RLIMIT_NOFILE, &r) != 0) { abortOnError(forkPipeOut, InternalError.getrlimit, .errno); } immutable maxDescriptors = cast(int) r.rlim_cur; // The above, less stdin, stdout, and stderr immutable maxToClose = maxDescriptors - 3; // Call poll() to see which ones are actually open: auto pfds = cast(pollfd*) malloc(pollfd.sizeof * maxToClose); foreach (i; 0 .. maxToClose) { pfds[i].fd = i + 3; pfds[i].events = 0; pfds[i].revents = 0; } if (poll(pfds, maxToClose, 0) >= 0) { foreach (i; 0 .. maxToClose) { // don't close pipe write end if (pfds[i].fd == forkPipeOut) continue; // POLLNVAL will be set if the file descriptor is invalid. if (!(pfds[i].revents & POLLNVAL)) close(pfds[i].fd); } } else { // Fall back to closing everything. foreach (i; 3 .. maxDescriptors) { if (i == forkPipeOut) continue; close(i); } } } else // This is already done if we don't inherit descriptors. { // Close the old file descriptors, unless they are // either of the standard streams. if (stdinFD > STDERR_FILENO) close(stdinFD); if (stdoutFD > STDERR_FILENO) close(stdoutFD); if (stderrFD > STDERR_FILENO) close(stderrFD); } // Execute program. core.sys.posix.unistd.execve(argz[0], argz.ptr, envz); // If execution fails, exit as quickly as possible. abortOnError(forkPipeOut, InternalError.exec, .errno); } if (config & Config.detached) { auto secondFork = core.sys.posix.unistd.fork(); if (secondFork == 0) { close(pidPipeOut); execProcess(); } else if (secondFork == -1) { auto secondForkErrno = .errno; close(pidPipeOut); abortOnError(forkPipeOut, InternalError.doubleFork, secondForkErrno); } else { core.sys.posix.unistd.write(pidPipeOut, &secondFork, pid_t.sizeof); close(pidPipeOut); close(forkPipeOut); _exit(0); } } else { execProcess(); } } if (id == 0) { forkChild(); assert(0); } else { closePipeWriteEnds(); auto status = InternalError.noerror; auto readExecResult = core.sys.posix.unistd.read(forkPipe[0], &status, status.sizeof); // Save error number just in case if subsequent "waitpid" fails and overrides errno immutable lastError = .errno; if (config & Config.detached) { // Forked child exits right after creating second fork. So it should be safe to wait here. import core.sys.posix.sys.wait : waitpid; int waitResult; waitpid(id, &waitResult, 0); } if (readExecResult == -1) throw ProcessException.newFromErrno(lastError, "Could not read from pipe to get child status"); bool owned = true; if (status != InternalError.noerror) { int error; readExecResult = read(forkPipe[0], &error, error.sizeof); string errorMsg; final switch (status) { case InternalError.chdir: errorMsg = "Failed to set working directory"; break; case InternalError.getrlimit: errorMsg = "getrlimit failed"; break; case InternalError.exec: errorMsg = "Failed to execute program"; break; case InternalError.doubleFork: // Can happen only when starting detached process assert(config & Config.detached); errorMsg = "Failed to fork twice"; break; case InternalError.noerror: assert(false); } if (readExecResult == error.sizeof) throw ProcessException.newFromErrno(error, errorMsg); throw new ProcessException(errorMsg); } else if (config & Config.detached) { owned = false; if (read(pidPipe[0], &id, id.sizeof) != id.sizeof) throw ProcessException.newFromErrno("Could not read from pipe to get detached process id"); } // Parent process: Close streams and return. if (!(config & Config.retainStdin ) && stdinFD > STDERR_FILENO && stdinFD != getFD(std.stdio.stdin )) stdin.close(); if (!(config & Config.retainStdout) && stdoutFD > STDERR_FILENO && stdoutFD != getFD(std.stdio.stdout)) stdout.close(); if (!(config & Config.retainStderr) && stderrFD > STDERR_FILENO && stderrFD != getFD(std.stdio.stderr)) stderr.close(); return new Pid(id, owned); } } /* Implementation of spawnProcess() for Windows. commandLine must contain the entire command line, properly quoted/escaped as required by CreateProcessW(). envz must be a pointer to a block of UTF-16 characters on the form "var1=value1\0var2=value2\0...varN=valueN\0\0". */ version (Windows) private Pid spawnProcessImpl(in char[] commandLine, File stdin, File stdout, File stderr, const string[string] env, Config config, in char[] workDir) @trusted { import core.exception : RangeError; if (commandLine.empty) throw new RangeError("Command line is empty"); // Prepare environment. auto envz = createEnv(env, !(config & Config.newEnv)); // Startup info for CreateProcessW(). STARTUPINFO_W startinfo; startinfo.cb = startinfo.sizeof; static int getFD(ref File f) { return f.isOpen ? f.fileno : -1; } // Extract file descriptors and HANDLEs from the streams and make the // handles inheritable. static void prepareStream(ref File file, DWORD stdHandle, string which, out int fileDescriptor, out HANDLE handle) { fileDescriptor = getFD(file); handle = null; if (fileDescriptor >= 0) handle = file.windowsHandle; // Windows GUI applications have a fd but not a valid Windows HANDLE. if (handle is null || handle == INVALID_HANDLE_VALUE) handle = GetStdHandle(stdHandle); DWORD dwFlags; if (GetHandleInformation(handle, &dwFlags)) { if (!(dwFlags & HANDLE_FLAG_INHERIT)) { if (!SetHandleInformation(handle, HANDLE_FLAG_INHERIT, HANDLE_FLAG_INHERIT)) { throw new StdioException( "Failed to make "~which~" stream inheritable by child process (" ~sysErrorString(GetLastError()) ~ ')', 0); } } } } int stdinFD = -1, stdoutFD = -1, stderrFD = -1; prepareStream(stdin, STD_INPUT_HANDLE, "stdin" , stdinFD, startinfo.hStdInput ); prepareStream(stdout, STD_OUTPUT_HANDLE, "stdout", stdoutFD, startinfo.hStdOutput); prepareStream(stderr, STD_ERROR_HANDLE, "stderr", stderrFD, startinfo.hStdError ); if ((startinfo.hStdInput != null && startinfo.hStdInput != INVALID_HANDLE_VALUE) || (startinfo.hStdOutput != null && startinfo.hStdOutput != INVALID_HANDLE_VALUE) || (startinfo.hStdError != null && startinfo.hStdError != INVALID_HANDLE_VALUE)) startinfo.dwFlags = STARTF_USESTDHANDLES; // Create process. PROCESS_INFORMATION pi; DWORD dwCreationFlags = CREATE_UNICODE_ENVIRONMENT | ((config & Config.suppressConsole) ? CREATE_NO_WINDOW : 0); auto pworkDir = workDir.tempCStringW(); // workaround until Bugzilla 14696 is fixed if (!CreateProcessW(null, commandLine.tempCStringW().buffPtr, null, null, true, dwCreationFlags, envz, workDir.length ? pworkDir : null, &startinfo, &pi)) throw ProcessException.newFromLastError("Failed to spawn new process"); // figure out if we should close any of the streams if (!(config & Config.retainStdin ) && stdinFD > STDERR_FILENO && stdinFD != getFD(std.stdio.stdin )) stdin.close(); if (!(config & Config.retainStdout) && stdoutFD > STDERR_FILENO && stdoutFD != getFD(std.stdio.stdout)) stdout.close(); if (!(config & Config.retainStderr) && stderrFD > STDERR_FILENO && stderrFD != getFD(std.stdio.stderr)) stderr.close(); // close the thread handle in the process info structure CloseHandle(pi.hThread); if (config & Config.detached) { CloseHandle(pi.hProcess); return new Pid(pi.dwProcessId); } return new Pid(pi.dwProcessId, pi.hProcess); } // Converts childEnv to a zero-terminated array of zero-terminated strings // on the form "name=value", optionally adding those of the current process' // environment strings that are not present in childEnv. If the parent's // environment should be inherited without modification, this function // returns environ directly. version (Posix) private const(char*)* createEnv(const string[string] childEnv, bool mergeWithParentEnv) { // Determine the number of strings in the parent's environment. int parentEnvLength = 0; auto environ = getEnvironPtr; if (mergeWithParentEnv) { if (childEnv.length == 0) return environ; while (environ[parentEnvLength] != null) ++parentEnvLength; } // Convert the "new" variables to C-style strings. auto envz = new const(char)*[parentEnvLength + childEnv.length + 1]; int pos = 0; foreach (var, val; childEnv) envz[pos++] = (var~'='~val~'\0').ptr; // Add the parent's environment. foreach (environStr; environ[0 .. parentEnvLength]) { int eqPos = 0; while (environStr[eqPos] != '=' && environStr[eqPos] != '\0') ++eqPos; if (environStr[eqPos] != '=') continue; auto var = environStr[0 .. eqPos]; if (var in childEnv) continue; envz[pos++] = environStr; } envz[pos] = null; return envz.ptr; } version (Posix) @system unittest { auto e1 = createEnv(null, false); assert(e1 != null && *e1 == null); auto e2 = createEnv(null, true); assert(e2 != null); int i = 0; auto environ = getEnvironPtr; for (; environ[i] != null; ++i) { assert(e2[i] != null); import core.stdc.string; assert(strcmp(e2[i], environ[i]) == 0); } assert(e2[i] == null); auto e3 = createEnv(["foo" : "bar", "hello" : "world"], false); assert(e3 != null && e3[0] != null && e3[1] != null && e3[2] == null); assert((e3[0][0 .. 8] == "foo=bar\0" && e3[1][0 .. 12] == "hello=world\0") || (e3[0][0 .. 12] == "hello=world\0" && e3[1][0 .. 8] == "foo=bar\0")); } // Converts childEnv to a Windows environment block, which is on the form // "name1=value1\0name2=value2\0...nameN=valueN\0\0", optionally adding // those of the current process' environment strings that are not present // in childEnv. Returns null if the parent's environment should be // inherited without modification, as this is what is expected by // CreateProcess(). version (Windows) private LPVOID createEnv(const string[string] childEnv, bool mergeWithParentEnv) { if (mergeWithParentEnv && childEnv.length == 0) return null; import std.array : appender; import std.uni : toUpper; auto envz = appender!(wchar[])(); void put(string var, string val) { envz.put(var); envz.put('='); envz.put(val); envz.put(cast(wchar) '\0'); } // Add the variables in childEnv, removing them from parentEnv // if they exist there too. auto parentEnv = mergeWithParentEnv ? environment.toAA() : null; foreach (k, v; childEnv) { auto uk = toUpper(k); put(uk, v); if (uk in parentEnv) parentEnv.remove(uk); } // Add remaining parent environment variables. foreach (k, v; parentEnv) put(k, v); // Two final zeros are needed in case there aren't any environment vars, // and the last one does no harm when there are. envz.put("\0\0"w); return envz.data.ptr; } version (Windows) @system unittest { assert(createEnv(null, true) == null); assert((cast(wchar*) createEnv(null, false))[0 .. 2] == "\0\0"w); auto e1 = (cast(wchar*) createEnv(["foo":"bar", "ab":"c"], false))[0 .. 14]; assert(e1 == "FOO=bar\0AB=c\0\0"w || e1 == "AB=c\0FOO=bar\0\0"w); } // Searches the PATH variable for the given executable file, // (checking that it is in fact executable). version (Posix) private string searchPathFor(in char[] executable) @trusted //TODO: @safe nothrow { import std.algorithm.iteration : splitter; import std.conv : to; import std.path : buildPath; auto pathz = core.stdc.stdlib.getenv("PATH"); if (pathz == null) return null; foreach (dir; splitter(to!string(pathz), ':')) { auto execPath = buildPath(dir, executable); if (isExecutable(execPath)) return execPath; } return null; } // Checks whether the file exists and can be executed by the // current user. version (Posix) private bool isExecutable(in char[] path) @trusted nothrow @nogc //TODO: @safe { return (access(path.tempCString(), X_OK) == 0); } version (Posix) @safe unittest { import std.algorithm; auto lsPath = searchPathFor("ls"); assert(!lsPath.empty); assert(lsPath[0] == '/'); assert(lsPath.endsWith("ls")); auto unlikely = searchPathFor("lkmqwpoialhggyaofijadsohufoiqezm"); assert(unlikely is null, "Are you kidding me?"); } // Sets or unsets the FD_CLOEXEC flag on the given file descriptor. version (Posix) private void setCLOEXEC(int fd, bool on) nothrow @nogc { import core.sys.posix.fcntl : fcntl, F_GETFD, FD_CLOEXEC, F_SETFD; auto flags = fcntl(fd, F_GETFD); if (flags >= 0) { if (on) flags |= FD_CLOEXEC; else flags &= ~(cast(typeof(flags)) FD_CLOEXEC); flags = fcntl(fd, F_SETFD, flags); } assert(flags != -1 || .errno == EBADF); } @system unittest // Command line arguments in spawnProcess(). { version (Windows) TestScript prog = "if not [%~1]==[foo] ( exit 1 ) if not [%~2]==[bar] ( exit 2 ) exit 0"; else version (Posix) TestScript prog = `if test "$1" != "foo"; then exit 1; fi if test "$2" != "bar"; then exit 2; fi exit 0`; assert(wait(spawnProcess(prog.path)) == 1); assert(wait(spawnProcess([prog.path])) == 1); assert(wait(spawnProcess([prog.path, "foo"])) == 2); assert(wait(spawnProcess([prog.path, "foo", "baz"])) == 2); assert(wait(spawnProcess([prog.path, "foo", "bar"])) == 0); } // test that file descriptors are correctly closed / left open. // ideally this would be done by the child process making libc // calls, but we make do... version (Posix) @system unittest { import core.sys.posix.fcntl : open, O_RDONLY; import core.sys.posix.unistd : close; import std.algorithm.searching : canFind, findSplitBefore; import std.array : split; import std.conv : to; static import std.file; import std.functional : reverseArgs; import std.path : buildPath; auto directory = uniqueTempPath(); std.file.mkdir(directory); scope(exit) std.file.rmdirRecurse(directory); auto path = buildPath(directory, "tmp"); std.file.write(path, null); auto fd = open(path.tempCString, O_RDONLY); scope(exit) close(fd); // command >&2 (or any other number) checks whethether that number // file descriptor is open. // Can't use this for arbitrary descriptors as many shells only support // single digit fds. TestScript testDefaults = `command >&0 && command >&1 && command >&2`; assert(execute(testDefaults.path).status == 0); assert(execute(testDefaults.path, null, Config.inheritFDs).status == 0); // try /proc/<pid>/fd/ on linux version (linux) { TestScript proc = "ls /proc/$$/fd"; auto procRes = execute(proc.path, null); if (procRes.status == 0) { auto fdStr = fd.to!string; assert(!procRes.output.split.canFind(fdStr)); assert(execute(proc.path, null, Config.inheritFDs) .output.split.canFind(fdStr)); return; } } // try fuser (might sometimes need permissions) TestScript fuser = "echo $$ && fuser -f " ~ path; auto fuserRes = execute(fuser.path, null); if (fuserRes.status == 0) { assert(!reverseArgs!canFind(fuserRes .output.findSplitBefore("\n").expand)); assert(reverseArgs!canFind(execute(fuser.path, null, Config.inheritFDs) .output.findSplitBefore("\n").expand)); return; } // last resort, try lsof (not available on all Posix) TestScript lsof = "lsof -p$$"; auto lsofRes = execute(lsof.path, null); if (lsofRes.status == 0) { assert(!lsofRes.output.canFind(path)); assert(execute(lsof.path, null, Config.inheritFDs).output.canFind(path)); return; } std.stdio.stderr.writeln(__FILE__, ':', __LINE__, ": Warning: Couldn't find any way to check open files"); // DON'T DO ANY MORE TESTS BELOW HERE IN THIS UNITTEST BLOCK, THE ABOVE // TESTS RETURN ON SUCCESS } @system unittest // Environment variables in spawnProcess(). { // We really should use set /a on Windows, but Wine doesn't support it. version (Windows) TestScript envProg = `if [%STD_PROCESS_UNITTEST1%] == [1] ( if [%STD_PROCESS_UNITTEST2%] == [2] (exit 3) exit 1 ) if [%STD_PROCESS_UNITTEST1%] == [4] ( if [%STD_PROCESS_UNITTEST2%] == [2] (exit 6) exit 4 ) if [%STD_PROCESS_UNITTEST2%] == [2] (exit 2) exit 0`; version (Posix) TestScript envProg = `if test "$std_process_unittest1" = ""; then std_process_unittest1=0 fi if test "$std_process_unittest2" = ""; then std_process_unittest2=0 fi exit $(($std_process_unittest1+$std_process_unittest2))`; environment.remove("std_process_unittest1"); // Just in case. environment.remove("std_process_unittest2"); assert(wait(spawnProcess(envProg.path)) == 0); assert(wait(spawnProcess(envProg.path, null, Config.newEnv)) == 0); environment["std_process_unittest1"] = "1"; assert(wait(spawnProcess(envProg.path)) == 1); assert(wait(spawnProcess(envProg.path, null, Config.newEnv)) == 0); auto env = ["std_process_unittest2" : "2"]; assert(wait(spawnProcess(envProg.path, env)) == 3); assert(wait(spawnProcess(envProg.path, env, Config.newEnv)) == 2); env["std_process_unittest1"] = "4"; assert(wait(spawnProcess(envProg.path, env)) == 6); assert(wait(spawnProcess(envProg.path, env, Config.newEnv)) == 6); environment.remove("std_process_unittest1"); assert(wait(spawnProcess(envProg.path, env)) == 6); assert(wait(spawnProcess(envProg.path, env, Config.newEnv)) == 6); } @system unittest // Stream redirection in spawnProcess(). { import std.path : buildPath; import std.string; version (Windows) TestScript prog = "set /p INPUT= echo %INPUT% output %~1 echo %INPUT% error %~2 1>&2"; else version (Posix) TestScript prog = "read INPUT echo $INPUT output $1 echo $INPUT error $2 >&2"; // Pipes void testPipes(Config config) { auto pipei = pipe(); auto pipeo = pipe(); auto pipee = pipe(); auto pid = spawnProcess([prog.path, "foo", "bar"], pipei.readEnd, pipeo.writeEnd, pipee.writeEnd, null, config); pipei.writeEnd.writeln("input"); pipei.writeEnd.flush(); assert(pipeo.readEnd.readln().chomp() == "input output foo"); assert(pipee.readEnd.readln().chomp().stripRight() == "input error bar"); if (!(config & Config.detached)) wait(pid); } // Files void testFiles(Config config) { import std.ascii, std.file, std.uuid, core.thread; auto pathi = buildPath(tempDir(), randomUUID().toString()); auto patho = buildPath(tempDir(), randomUUID().toString()); auto pathe = buildPath(tempDir(), randomUUID().toString()); std.file.write(pathi, "INPUT"~std.ascii.newline); auto filei = File(pathi, "r"); auto fileo = File(patho, "w"); auto filee = File(pathe, "w"); auto pid = spawnProcess([prog.path, "bar", "baz" ], filei, fileo, filee, null, config); if (!(config & Config.detached)) wait(pid); else // We need to wait a little to ensure that the process has finished and data was written to files Thread.sleep(2.seconds); assert(readText(patho).chomp() == "INPUT output bar"); assert(readText(pathe).chomp().stripRight() == "INPUT error baz"); remove(pathi); remove(patho); remove(pathe); } testPipes(Config.none); testFiles(Config.none); testPipes(Config.detached); testFiles(Config.detached); } @system unittest // Error handling in spawnProcess() { import std.exception : assertThrown; assertThrown!ProcessException(spawnProcess("ewrgiuhrifuheiohnmnvqweoijwf")); assertThrown!ProcessException(spawnProcess("./rgiuhrifuheiohnmnvqweoijwf")); assertThrown!ProcessException(spawnProcess("ewrgiuhrifuheiohnmnvqweoijwf", null, Config.detached)); assertThrown!ProcessException(spawnProcess("./rgiuhrifuheiohnmnvqweoijwf", null, Config.detached)); // can't execute malformed file with executable permissions version(Posix) { import std.path : buildPath; import std.file : remove, write, setAttributes; import core.sys.posix.sys.stat : S_IRUSR, S_IWUSR, S_IXUSR, S_IRGRP, S_IXGRP, S_IROTH, S_IXOTH; string deleteme = buildPath(tempDir(), "deleteme.std.process.unittest.pid") ~ to!string(thisProcessID); write(deleteme, ""); scope(exit) remove(deleteme); setAttributes(deleteme, S_IRUSR|S_IWUSR|S_IXUSR|S_IRGRP|S_IXGRP|S_IROTH|S_IXOTH); assertThrown!ProcessException(spawnProcess(deleteme)); assertThrown!ProcessException(spawnProcess(deleteme, null, Config.detached)); } } @system unittest // Specifying a working directory. { import std.path; TestScript prog = "echo foo>bar"; auto directory = uniqueTempPath(); mkdir(directory); scope(exit) rmdirRecurse(directory); auto pid = spawnProcess([prog.path], null, Config.none, directory); wait(pid); assert(exists(buildPath(directory, "bar"))); } @system unittest // Specifying a bad working directory. { import std.exception : assertThrown; TestScript prog = "echo"; auto directory = uniqueTempPath(); assertThrown!ProcessException(spawnProcess([prog.path], null, Config.none, directory)); assertThrown!ProcessException(spawnProcess([prog.path], null, Config.detached, directory)); std.file.write(directory, "foo"); scope(exit) remove(directory); assertThrown!ProcessException(spawnProcess([prog.path], null, Config.none, directory)); assertThrown!ProcessException(spawnProcess([prog.path], null, Config.detached, directory)); // can't run in directory if user does not have search permission on this directory version(Posix) { import core.sys.posix.sys.stat : S_IRUSR; auto directoryNoSearch = uniqueTempPath(); mkdir(directoryNoSearch); scope(exit) rmdirRecurse(directoryNoSearch); setAttributes(directoryNoSearch, S_IRUSR); assertThrown!ProcessException(spawnProcess(prog.path, null, Config.none, directoryNoSearch)); assertThrown!ProcessException(spawnProcess(prog.path, null, Config.detached, directoryNoSearch)); } } @system unittest // Specifying empty working directory. { TestScript prog = ""; string directory = ""; assert(directory.ptr && !directory.length); spawnProcess([prog.path], null, Config.none, directory).wait(); } @system unittest // Reopening the standard streams (issue 13258) { import std.string; void fun() { spawnShell("echo foo").wait(); spawnShell("echo bar").wait(); } auto tmpFile = uniqueTempPath(); scope(exit) if (exists(tmpFile)) remove(tmpFile); { auto oldOut = std.stdio.stdout; scope(exit) std.stdio.stdout = oldOut; std.stdio.stdout = File(tmpFile, "w"); fun(); std.stdio.stdout.close(); } auto lines = readText(tmpFile).splitLines(); assert(lines == ["foo", "bar"]); } version (Windows) @system unittest // MSVCRT workaround (issue 14422) { auto fn = uniqueTempPath(); std.file.write(fn, "AAAAAAAAAA"); auto f = File(fn, "a"); spawnProcess(["cmd", "/c", "echo BBBBB"], std.stdio.stdin, f).wait(); auto data = readText(fn); assert(data == "AAAAAAAAAABBBBB\r\n", data); } /** A variation on $(LREF spawnProcess) that runs the given _command through the current user's preferred _command interpreter (aka. shell). The string $(D command) is passed verbatim to the shell, and is therefore subject to its rules about _command structure, argument/filename quoting and escaping of special characters. The path to the shell executable defaults to $(LREF nativeShell). In all other respects this function works just like $(D spawnProcess). Please refer to the $(LREF spawnProcess) documentation for descriptions of the other function parameters, the return value and any exceptions that may be thrown. --- // Run the command/program "foo" on the file named "my file.txt", and // redirect its output into foo.log. auto pid = spawnShell(`foo "my file.txt" > foo.log`); wait(pid); --- See_also: $(LREF escapeShellCommand), which may be helpful in constructing a properly quoted and escaped shell _command line for the current platform. */ Pid spawnShell(in char[] command, File stdin = std.stdio.stdin, File stdout = std.stdio.stdout, File stderr = std.stdio.stderr, const string[string] env = null, Config config = Config.none, in char[] workDir = null, string shellPath = nativeShell) @trusted // TODO: Should be @safe { version (Windows) { // CMD does not parse its arguments like other programs. // It does not use CommandLineToArgvW. // Instead, it treats the first and last quote specially. // See CMD.EXE /? for details. auto args = escapeShellFileName(shellPath) ~ ` ` ~ shellSwitch ~ ` "` ~ command ~ `"`; } else version (Posix) { const(char)[][3] args; args[0] = shellPath; args[1] = shellSwitch; args[2] = command; } return spawnProcessImpl(args, stdin, stdout, stderr, env, config, workDir); } /// ditto Pid spawnShell(in char[] command, const string[string] env, Config config = Config.none, in char[] workDir = null, string shellPath = nativeShell) @trusted // TODO: Should be @safe { return spawnShell(command, std.stdio.stdin, std.stdio.stdout, std.stdio.stderr, env, config, workDir, shellPath); } @system unittest { version (Windows) auto cmd = "echo %FOO%"; else version (Posix) auto cmd = "echo $foo"; import std.file; auto tmpFile = uniqueTempPath(); scope(exit) if (exists(tmpFile)) remove(tmpFile); auto redir = "> \""~tmpFile~'"'; auto env = ["foo" : "bar"]; assert(wait(spawnShell(cmd~redir, env)) == 0); auto f = File(tmpFile, "a"); version(CRuntime_Microsoft) f.seek(0, SEEK_END); // MSVCRT probably seeks to the end when writing, not before assert(wait(spawnShell(cmd, std.stdio.stdin, f, std.stdio.stderr, env)) == 0); f.close(); auto output = std.file.readText(tmpFile); assert(output == "bar\nbar\n" || output == "bar\r\nbar\r\n"); } version (Windows) @system unittest { import std.string; TestScript prog = "echo %0 %*"; auto outputFn = uniqueTempPath(); scope(exit) if (exists(outputFn)) remove(outputFn); auto args = [`a b c`, `a\b\c\`, `a"b"c"`]; auto result = executeShell( escapeShellCommand([prog.path] ~ args) ~ " > " ~ escapeShellFileName(outputFn)); assert(result.status == 0); auto args2 = outputFn.readText().strip().parseCommandLine()[1..$]; assert(args == args2, text(args2)); } /** Flags that control the behaviour of $(LREF spawnProcess) and $(LREF spawnShell). Use bitwise OR to combine flags. Example: --- auto logFile = File("myapp_error.log", "w"); // Start program, suppressing the console window (Windows only), // redirect its error stream to logFile, and leave logFile open // in the parent process as well. auto pid = spawnProcess("myapp", stdin, stdout, logFile, Config.retainStderr | Config.suppressConsole); scope(exit) { auto exitCode = wait(pid); logFile.writeln("myapp exited with code ", exitCode); logFile.close(); } --- */ enum Config { none = 0, /** By default, the child process inherits the parent's environment, and any environment variables passed to $(LREF spawnProcess) will be added to it. If this flag is set, the only variables in the child process' environment will be those given to spawnProcess. */ newEnv = 1, /** Unless the child process inherits the standard input/output/error streams of its parent, one almost always wants the streams closed in the parent when $(LREF spawnProcess) returns. Therefore, by default, this is done. If this is not desirable, pass any of these options to spawnProcess. */ retainStdin = 2, retainStdout = 4, /// ditto retainStderr = 8, /// ditto /** On Windows, if the child process is a console application, this flag will prevent the creation of a console window. Otherwise, it will be ignored. On POSIX, $(D suppressConsole) has no effect. */ suppressConsole = 16, /** On POSIX, open $(LINK2 http://en.wikipedia.org/wiki/File_descriptor,file descriptors) are by default inherited by the child process. As this may lead to subtle bugs when pipes or multiple threads are involved, $(LREF spawnProcess) ensures that all file descriptors except the ones that correspond to standard input/output/error are closed in the child process when it starts. Use $(D inheritFDs) to prevent this. On Windows, this option has no effect, and any handles which have been explicitly marked as inheritable will always be inherited by the child process. */ inheritFDs = 32, /** Spawn process in detached state. This removes the need in calling $(LREF wait) to clean up the process resources. Note: Calling $(LREF wait) or $(LREF kill) with the resulting $(D Pid) is invalid. */ detached = 64, } /// A handle that corresponds to a spawned process. final class Pid { /** The process ID number. This is a number that uniquely identifies the process on the operating system, for at least as long as the process is running. Once $(LREF wait) has been called on the $(LREF Pid), this method will return an invalid (negative) process ID. */ @property int processID() const @safe pure nothrow { return _processID; } /** An operating system handle to the process. This handle is used to specify the process in OS-specific APIs. On POSIX, this function returns a $(D core.sys.posix.sys.types.pid_t) with the same value as $(LREF Pid.processID), while on Windows it returns a $(D core.sys.windows.windows.HANDLE). Once $(LREF wait) has been called on the $(LREF Pid), this method will return an invalid handle. */ // Note: Since HANDLE is a reference, this function cannot be const. version (Windows) @property HANDLE osHandle() @safe pure nothrow { return _handle; } else version (Posix) @property pid_t osHandle() @safe pure nothrow { return _processID; } private: /* Pid.performWait() does the dirty work for wait() and nonBlockingWait(). If block == true, this function blocks until the process terminates, sets _processID to terminated, and returns the exit code or terminating signal as described in the wait() documentation. If block == false, this function returns immediately, regardless of the status of the process. If the process has terminated, the function has the exact same effect as the blocking version. If not, it returns 0 and does not modify _processID. */ version (Posix) int performWait(bool block) @trusted { import std.exception : enforceEx; enforceEx!ProcessException(owned, "Can't wait on a detached process"); if (_processID == terminated) return _exitCode; int exitCode; while (true) { int status; auto check = waitpid(_processID, &status, block ? 0 : WNOHANG); if (check == -1) { if (errno == ECHILD) { throw new ProcessException( "Process does not exist or is not a child process."); } else { // waitpid() was interrupted by a signal. We simply // restart it. assert(errno == EINTR); continue; } } if (!block && check == 0) return 0; if (WIFEXITED(status)) { exitCode = WEXITSTATUS(status); break; } else if (WIFSIGNALED(status)) { exitCode = -WTERMSIG(status); break; } // We check again whether the call should be blocking, // since we don't care about other status changes besides // "exited" and "terminated by signal". if (!block) return 0; // Process has stopped, but not terminated, so we continue waiting. } // Mark Pid as terminated, and cache and return exit code. _processID = terminated; _exitCode = exitCode; return exitCode; } else version (Windows) { int performWait(bool block) @trusted { import std.exception : enforceEx; enforceEx!ProcessException(owned, "Can't wait on a detached process"); if (_processID == terminated) return _exitCode; assert(_handle != INVALID_HANDLE_VALUE); if (block) { auto result = WaitForSingleObject(_handle, INFINITE); if (result != WAIT_OBJECT_0) throw ProcessException.newFromLastError("Wait failed."); } if (!GetExitCodeProcess(_handle, cast(LPDWORD)&_exitCode)) throw ProcessException.newFromLastError(); if (!block && _exitCode == STILL_ACTIVE) return 0; CloseHandle(_handle); _handle = INVALID_HANDLE_VALUE; _processID = terminated; return _exitCode; } ~this() { if (_handle != INVALID_HANDLE_VALUE) { CloseHandle(_handle); _handle = INVALID_HANDLE_VALUE; } } } // Special values for _processID. enum invalid = -1, terminated = -2; // OS process ID number. Only nonnegative IDs correspond to // running processes. int _processID = invalid; // Exit code cached by wait(). This is only expected to hold a // sensible value if _processID == terminated. int _exitCode; // Whether the process can be waited for by wait() for or killed by kill(). // False if process was started as detached. True otherwise. bool owned; // Pids are only meant to be constructed inside this module, so // we make the constructor private. version (Windows) { HANDLE _handle = INVALID_HANDLE_VALUE; this(int pid, HANDLE handle) @safe pure nothrow { _processID = pid; _handle = handle; this.owned = true; } this(int pid) @safe pure nothrow { _processID = pid; this.owned = false; } } else { this(int id, bool owned) @safe pure nothrow { _processID = id; this.owned = owned; } } } /** Waits for the process associated with $(D pid) to terminate, and returns its exit status. In general one should always _wait for child processes to terminate before exiting the parent process unless the process was spawned as detached (that was spawned with $(D Config.detached) flag). Otherwise, they may become "$(HTTP en.wikipedia.org/wiki/Zombie_process,zombies)" – processes that are defunct, yet still occupy a slot in the OS process table. You should not and must not wait for detached processes, since you don't own them. If the process has already terminated, this function returns directly. The exit code is cached, so that if wait() is called multiple times on the same $(LREF Pid) it will always return the same value. POSIX_specific: If the process is terminated by a signal, this function returns a negative number whose absolute value is the signal number. Since POSIX restricts normal exit codes to the range 0-255, a negative return value will always indicate termination by signal. Signal codes are defined in the $(D core.sys.posix.signal) module (which corresponds to the $(D signal.h) POSIX header). Throws: $(LREF ProcessException) on failure or on attempt to wait for detached process. Example: See the $(LREF spawnProcess) documentation. See_also: $(LREF tryWait), for a non-blocking function. */ int wait(Pid pid) @safe { assert(pid !is null, "Called wait on a null Pid."); return pid.performWait(true); } @system unittest // Pid and wait() { version (Windows) TestScript prog = "exit %~1"; else version (Posix) TestScript prog = "exit $1"; assert(wait(spawnProcess([prog.path, "0"])) == 0); assert(wait(spawnProcess([prog.path, "123"])) == 123); auto pid = spawnProcess([prog.path, "10"]); assert(pid.processID > 0); version (Windows) assert(pid.osHandle != INVALID_HANDLE_VALUE); else version (Posix) assert(pid.osHandle == pid.processID); assert(wait(pid) == 10); assert(wait(pid) == 10); // cached exit code assert(pid.processID < 0); version (Windows) assert(pid.osHandle == INVALID_HANDLE_VALUE); else version (Posix) assert(pid.osHandle < 0); } /** A non-blocking version of $(LREF wait). If the process associated with $(D pid) has already terminated, $(D tryWait) has the exact same effect as $(D wait). In this case, it returns a tuple where the $(D terminated) field is set to $(D true) and the $(D status) field has the same interpretation as the return value of $(D wait). If the process has $(I not) yet terminated, this function differs from $(D wait) in that does not wait for this to happen, but instead returns immediately. The $(D terminated) field of the returned tuple will then be set to $(D false), while the $(D status) field will always be 0 (zero). $(D wait) or $(D tryWait) should then be called again on the same $(D Pid) at some later time; not only to get the exit code, but also to avoid the process becoming a "zombie" when it finally terminates. (See $(LREF wait) for details). Returns: An $(D std.typecons.Tuple!(bool, "terminated", int, "status")). Throws: $(LREF ProcessException) on failure or on attempt to wait for detached process. Example: --- auto pid = spawnProcess("dmd myapp.d"); scope(exit) wait(pid); ... auto dmd = tryWait(pid); if (dmd.terminated) { if (dmd.status == 0) writeln("Compilation succeeded!"); else writeln("Compilation failed"); } else writeln("Still compiling..."); ... --- Note that in this example, the first $(D wait) call will have no effect if the process has already terminated by the time $(D tryWait) is called. In the opposite case, however, the $(D scope) statement ensures that we always wait for the process if it hasn't terminated by the time we reach the end of the scope. */ auto tryWait(Pid pid) @safe { import std.typecons : Tuple; assert(pid !is null, "Called tryWait on a null Pid."); auto code = pid.performWait(false); return Tuple!(bool, "terminated", int, "status")(pid._processID == Pid.terminated, code); } // unittest: This function is tested together with kill() below. /** Attempts to terminate the process associated with $(D pid). The effect of this function, as well as the meaning of $(D codeOrSignal), is highly platform dependent. Details are given below. Common to all platforms is that this function only $(I initiates) termination of the process, and returns immediately. It does not wait for the process to end, nor does it guarantee that the process does in fact get terminated. Always call $(LREF wait) to wait for a process to complete, even if $(D kill) has been called on it. Windows_specific: The process will be $(LINK2 http://msdn.microsoft.com/en-us/library/windows/desktop/ms686714%28v=vs.100%29.aspx, forcefully and abruptly terminated). If $(D codeOrSignal) is specified, it must be a nonnegative number which will be used as the exit code of the process. If not, the process wil exit with code 1. Do not use $(D codeOrSignal = 259), as this is a special value (aka. $(LINK2 http://msdn.microsoft.com/en-us/library/windows/desktop/ms683189.aspx,STILL_ACTIVE)) used by Windows to signal that a process has in fact $(I not) terminated yet. --- auto pid = spawnProcess("some_app"); kill(pid, 10); assert(wait(pid) == 10); --- POSIX_specific: A $(LINK2 http://en.wikipedia.org/wiki/Unix_signal,signal) will be sent to the process, whose value is given by $(D codeOrSignal). Depending on the signal sent, this may or may not terminate the process. Symbolic constants for various $(LINK2 http://en.wikipedia.org/wiki/Unix_signal#POSIX_signals, POSIX signals) are defined in $(D core.sys.posix.signal), which corresponds to the $(LINK2 http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/signal.h.html, $(D signal.h) POSIX header). If $(D codeOrSignal) is omitted, the $(D SIGTERM) signal will be sent. (This matches the behaviour of the $(LINK2 http://pubs.opengroup.org/onlinepubs/9699919799/utilities/kill.html, $(D _kill)) shell command.) --- import core.sys.posix.signal : SIGKILL; auto pid = spawnProcess("some_app"); kill(pid, SIGKILL); assert(wait(pid) == -SIGKILL); // Negative return value on POSIX! --- Throws: $(LREF ProcessException) on error (e.g. if codeOrSignal is invalid). or on attempt to kill detached process. Note that failure to terminate the process is considered a "normal" outcome, not an error.$(BR) */ void kill(Pid pid) { version (Windows) kill(pid, 1); else version (Posix) { import core.sys.posix.signal : SIGTERM; kill(pid, SIGTERM); } } /// ditto void kill(Pid pid, int codeOrSignal) { import std.exception : enforceEx; enforceEx!ProcessException(pid.owned, "Can't kill detached process"); version (Windows) { if (codeOrSignal < 0) throw new ProcessException("Invalid exit code"); // On Windows, TerminateProcess() appears to terminate the // *current* process if it is passed an invalid handle... if (pid.osHandle == INVALID_HANDLE_VALUE) throw new ProcessException("Invalid process handle"); if (!TerminateProcess(pid.osHandle, codeOrSignal)) throw ProcessException.newFromLastError(); } else version (Posix) { import core.sys.posix.signal : kill; if (kill(pid.osHandle, codeOrSignal) == -1) throw ProcessException.newFromErrno(); } } @system unittest // tryWait() and kill() { import core.thread; import std.exception : assertThrown; // The test script goes into an infinite loop. version (Windows) { TestScript prog = ":loop goto loop"; } else version (Posix) { import core.sys.posix.signal : SIGTERM, SIGKILL; TestScript prog = "while true; do sleep 1; done"; } auto pid = spawnProcess(prog.path); // Android appears to automatically kill sleeping processes very quickly, // so shorten the wait before killing here. version (Android) Thread.sleep(dur!"msecs"(5)); else Thread.sleep(dur!"seconds"(1)); kill(pid); version (Windows) assert(wait(pid) == 1); else version (Posix) assert(wait(pid) == -SIGTERM); pid = spawnProcess(prog.path); Thread.sleep(dur!"seconds"(1)); auto s = tryWait(pid); assert(!s.terminated && s.status == 0); assertThrown!ProcessException(kill(pid, -123)); // Negative code not allowed. version (Windows) kill(pid, 123); else version (Posix) kill(pid, SIGKILL); do { s = tryWait(pid); } while (!s.terminated); version (Windows) assert(s.status == 123); else version (Posix) assert(s.status == -SIGKILL); assertThrown!ProcessException(kill(pid)); } @system unittest // wait() and kill() detached process { import core.thread; import std.exception : assertThrown; TestScript prog = "exit 0"; auto pid = spawnProcess([prog.path], null, Config.detached); /* This sleep is needed because we can't wait() for detached process to end and therefore TestScript destructor may run at the same time as /bin/sh tries to start the script. This leads to the annoying message like "/bin/sh: 0: Can't open /tmp/std.process temporary file" to appear when running tests. It does not happen in unittests with non-detached processes because we always wait() for them to finish. */ Thread.sleep(1.seconds); assert(!pid.owned); version(Windows) assert(pid.osHandle == INVALID_HANDLE_VALUE); assertThrown!ProcessException(wait(pid)); assertThrown!ProcessException(kill(pid)); } /** Creates a unidirectional _pipe. Data is written to one end of the _pipe and read from the other. --- auto p = pipe(); p.writeEnd.writeln("Hello World"); p.writeEnd.flush(); assert(p.readEnd.readln().chomp() == "Hello World"); --- Pipes can, for example, be used for interprocess communication by spawning a new process and passing one end of the _pipe to the child, while the parent uses the other end. (See also $(LREF pipeProcess) and $(LREF pipeShell) for an easier way of doing this.) --- // Use cURL to download the dlang.org front page, pipe its // output to grep to extract a list of links to ZIP files, // and write the list to the file "D downloads.txt": auto p = pipe(); auto outFile = File("D downloads.txt", "w"); auto cpid = spawnProcess(["curl", "http://dlang.org/download.html"], std.stdio.stdin, p.writeEnd); scope(exit) wait(cpid); auto gpid = spawnProcess(["grep", "-o", `http://\S*\.zip`], p.readEnd, outFile); scope(exit) wait(gpid); --- Returns: A $(LREF Pipe) object that corresponds to the created _pipe. Throws: $(REF StdioException, std,stdio) on failure. */ version (Posix) Pipe pipe() @trusted //TODO: @safe { import core.sys.posix.stdio : fdopen; int[2] fds; if (core.sys.posix.unistd.pipe(fds) != 0) throw new StdioException("Unable to create pipe"); Pipe p; auto readFP = fdopen(fds[0], "r"); if (readFP == null) throw new StdioException("Cannot open read end of pipe"); p._read = File(readFP, null); auto writeFP = fdopen(fds[1], "w"); if (writeFP == null) throw new StdioException("Cannot open write end of pipe"); p._write = File(writeFP, null); return p; } else version (Windows) Pipe pipe() @trusted //TODO: @safe { // use CreatePipe to create an anonymous pipe HANDLE readHandle; HANDLE writeHandle; if (!CreatePipe(&readHandle, &writeHandle, null, 0)) { throw new StdioException( "Error creating pipe (" ~ sysErrorString(GetLastError()) ~ ')', 0); } scope(failure) { CloseHandle(readHandle); CloseHandle(writeHandle); } try { Pipe p; p._read .windowsHandleOpen(readHandle , "r"); p._write.windowsHandleOpen(writeHandle, "a"); return p; } catch (Exception e) { throw new StdioException("Error attaching pipe (" ~ e.msg ~ ")", 0); } } /// An interface to a pipe created by the $(LREF pipe) function. struct Pipe { /// The read end of the pipe. @property File readEnd() @safe nothrow { return _read; } /// The write end of the pipe. @property File writeEnd() @safe nothrow { return _write; } /** Closes both ends of the pipe. Normally it is not necessary to do this manually, as $(REF File, std,stdio) objects are automatically closed when there are no more references to them. Note that if either end of the pipe has been passed to a child process, it will only be closed in the parent process. (What happens in the child process is platform dependent.) Throws: $(REF ErrnoException, std,exception) if an error occurs. */ void close() @safe { _read.close(); _write.close(); } private: File _read, _write; } @system unittest { import std.string; auto p = pipe(); p.writeEnd.writeln("Hello World"); p.writeEnd.flush(); assert(p.readEnd.readln().chomp() == "Hello World"); p.close(); assert(!p.readEnd.isOpen); assert(!p.writeEnd.isOpen); } /** Starts a new process, creating pipes to redirect its standard input, output and/or error streams. $(D pipeProcess) and $(D pipeShell) are convenient wrappers around $(LREF spawnProcess) and $(LREF spawnShell), respectively, and automate the task of redirecting one or more of the child process' standard streams through pipes. Like the functions they wrap, these functions return immediately, leaving the child process to execute in parallel with the invoking process. It is recommended to always call $(LREF wait) on the returned $(LREF ProcessPipes.pid), as detailed in the documentation for $(D wait). The $(D args)/$(D program)/$(D command), $(D env) and $(D config) parameters are forwarded straight to the underlying spawn functions, and we refer to their documentation for details. Params: args = An array which contains the program name as the zeroth element and any command-line arguments in the following elements. (See $(LREF spawnProcess) for details.) program = The program name, $(I without) command-line arguments. (See $(LREF spawnProcess) for details.) command = A shell command which is passed verbatim to the command interpreter. (See $(LREF spawnShell) for details.) redirect = Flags that determine which streams are redirected, and how. See $(LREF Redirect) for an overview of available flags. env = Additional environment variables for the child process. (See $(LREF spawnProcess) for details.) config = Flags that control process creation. See $(LREF Config) for an overview of available flags, and note that the $(D retainStd...) flags have no effect in this function. workDir = The working directory for the new process. By default the child process inherits the parent's working directory. shellPath = The path to the shell to use to run the specified program. By default this is $(LREF nativeShell). Returns: A $(LREF ProcessPipes) object which contains $(REF File, std,stdio) handles that communicate with the redirected streams of the child process, along with a $(LREF Pid) object that corresponds to the spawned process. Throws: $(LREF ProcessException) on failure to start the process.$(BR) $(REF StdioException, std,stdio) on failure to redirect any of the streams.$(BR) Example: --- // my_application writes to stdout and might write to stderr auto pipes = pipeProcess("my_application", Redirect.stdout | Redirect.stderr); scope(exit) wait(pipes.pid); // Store lines of output. string[] output; foreach (line; pipes.stdout.byLine) output ~= line.idup; // Store lines of errors. string[] errors; foreach (line; pipes.stderr.byLine) errors ~= line.idup; // sendmail expects to read from stdin pipes = pipeProcess(["/usr/bin/sendmail", "-t"], Redirect.stdin); pipes.stdin.writeln("To: you"); pipes.stdin.writeln("From: me"); pipes.stdin.writeln("Subject: dlang"); pipes.stdin.writeln(""); pipes.stdin.writeln(message); // a single period tells sendmail we are finished pipes.stdin.writeln("."); // but at this point sendmail might not see it, we need to flush pipes.stdin.flush(); // sendmail happens to exit on ".", but some you have to close the file: pipes.stdin.close(); // otherwise this wait will wait forever wait(pipes.pid); --- */ ProcessPipes pipeProcess(in char[][] args, Redirect redirect = Redirect.all, const string[string] env = null, Config config = Config.none, in char[] workDir = null) @safe { return pipeProcessImpl!spawnProcess(args, redirect, env, config, workDir); } /// ditto ProcessPipes pipeProcess(in char[] program, Redirect redirect = Redirect.all, const string[string] env = null, Config config = Config.none, in char[] workDir = null) @safe { return pipeProcessImpl!spawnProcess(program, redirect, env, config, workDir); } /// ditto ProcessPipes pipeShell(in char[] command, Redirect redirect = Redirect.all, const string[string] env = null, Config config = Config.none, in char[] workDir = null, string shellPath = nativeShell) @safe { return pipeProcessImpl!spawnShell(command, redirect, env, config, workDir, shellPath); } // Implementation of the pipeProcess() family of functions. private ProcessPipes pipeProcessImpl(alias spawnFunc, Cmd, ExtraSpawnFuncArgs...) (Cmd command, Redirect redirectFlags, const string[string] env = null, Config config = Config.none, in char[] workDir = null, ExtraSpawnFuncArgs extraArgs = ExtraSpawnFuncArgs.init) @trusted //TODO: @safe { File childStdin, childStdout, childStderr; ProcessPipes pipes; pipes._redirectFlags = redirectFlags; if (redirectFlags & Redirect.stdin) { auto p = pipe(); childStdin = p.readEnd; pipes._stdin = p.writeEnd; } else { childStdin = std.stdio.stdin; } if (redirectFlags & Redirect.stdout) { if ((redirectFlags & Redirect.stdoutToStderr) != 0) throw new StdioException("Cannot create pipe for stdout AND " ~"redirect it to stderr", 0); auto p = pipe(); childStdout = p.writeEnd; pipes._stdout = p.readEnd; } else { childStdout = std.stdio.stdout; } if (redirectFlags & Redirect.stderr) { if ((redirectFlags & Redirect.stderrToStdout) != 0) throw new StdioException("Cannot create pipe for stderr AND " ~"redirect it to stdout", 0); auto p = pipe(); childStderr = p.writeEnd; pipes._stderr = p.readEnd; } else { childStderr = std.stdio.stderr; } if (redirectFlags & Redirect.stdoutToStderr) { if (redirectFlags & Redirect.stderrToStdout) { // We know that neither of the other options have been // set, so we assign the std.stdio.std* streams directly. childStdout = std.stdio.stderr; childStderr = std.stdio.stdout; } else { childStdout = childStderr; } } else if (redirectFlags & Redirect.stderrToStdout) { childStderr = childStdout; } config &= ~(Config.retainStdin | Config.retainStdout | Config.retainStderr); pipes._pid = spawnFunc(command, childStdin, childStdout, childStderr, env, config, workDir, extraArgs); return pipes; } /** Flags that can be passed to $(LREF pipeProcess) and $(LREF pipeShell) to specify which of the child process' standard streams are redirected. Use bitwise OR to combine flags. */ enum Redirect { /// Redirect the standard input, output or error streams, respectively. stdin = 1, stdout = 2, /// ditto stderr = 4, /// ditto /** Redirect _all three streams. This is equivalent to $(D Redirect.stdin | Redirect.stdout | Redirect.stderr). */ all = stdin | stdout | stderr, /** Redirect the standard error stream into the standard output stream. This can not be combined with $(D Redirect.stderr). */ stderrToStdout = 8, /** Redirect the standard output stream into the standard error stream. This can not be combined with $(D Redirect.stdout). */ stdoutToStderr = 16, } @system unittest { import std.string; version (Windows) TestScript prog = "call :sub %~1 %~2 0 call :sub %~1 %~2 1 call :sub %~1 %~2 2 call :sub %~1 %~2 3 exit 3 :sub set /p INPUT= if -%INPUT%-==-stop- ( exit %~3 ) echo %INPUT% %~1 echo %INPUT% %~2 1>&2"; else version (Posix) TestScript prog = `for EXITCODE in 0 1 2 3; do read INPUT if test "$INPUT" = stop; then break; fi echo "$INPUT $1" echo "$INPUT $2" >&2 done exit $EXITCODE`; auto pp = pipeProcess([prog.path, "bar", "baz"]); pp.stdin.writeln("foo"); pp.stdin.flush(); assert(pp.stdout.readln().chomp() == "foo bar"); assert(pp.stderr.readln().chomp().stripRight() == "foo baz"); pp.stdin.writeln("1234567890"); pp.stdin.flush(); assert(pp.stdout.readln().chomp() == "1234567890 bar"); assert(pp.stderr.readln().chomp().stripRight() == "1234567890 baz"); pp.stdin.writeln("stop"); pp.stdin.flush(); assert(wait(pp.pid) == 2); pp = pipeProcess([prog.path, "12345", "67890"], Redirect.stdin | Redirect.stdout | Redirect.stderrToStdout); pp.stdin.writeln("xyz"); pp.stdin.flush(); assert(pp.stdout.readln().chomp() == "xyz 12345"); assert(pp.stdout.readln().chomp().stripRight() == "xyz 67890"); pp.stdin.writeln("stop"); pp.stdin.flush(); assert(wait(pp.pid) == 1); pp = pipeShell(escapeShellCommand(prog.path, "AAAAA", "BBB"), Redirect.stdin | Redirect.stdoutToStderr | Redirect.stderr); pp.stdin.writeln("ab"); pp.stdin.flush(); assert(pp.stderr.readln().chomp() == "ab AAAAA"); assert(pp.stderr.readln().chomp().stripRight() == "ab BBB"); pp.stdin.writeln("stop"); pp.stdin.flush(); assert(wait(pp.pid) == 1); } @system unittest { import std.exception : assertThrown; TestScript prog = "exit 0"; assertThrown!StdioException(pipeProcess( prog.path, Redirect.stdout | Redirect.stdoutToStderr)); assertThrown!StdioException(pipeProcess( prog.path, Redirect.stderr | Redirect.stderrToStdout)); auto p = pipeProcess(prog.path, Redirect.stdin); assertThrown!Error(p.stdout); assertThrown!Error(p.stderr); wait(p.pid); p = pipeProcess(prog.path, Redirect.stderr); assertThrown!Error(p.stdin); assertThrown!Error(p.stdout); wait(p.pid); } /** Object which contains $(REF File, std,stdio) handles that allow communication with a child process through its standard streams. */ struct ProcessPipes { /// The $(LREF Pid) of the child process. @property Pid pid() @safe nothrow { return _pid; } /** An $(REF File, std,stdio) that allows writing to the child process' standard input stream. Throws: $(OBJECTREF Error) if the child process' standard input stream hasn't been redirected. */ @property File stdin() @safe nothrow { if ((_redirectFlags & Redirect.stdin) == 0) throw new Error("Child process' standard input stream hasn't " ~"been redirected."); return _stdin; } /** An $(REF File, std,stdio) that allows reading from the child process' standard output stream. Throws: $(OBJECTREF Error) if the child process' standard output stream hasn't been redirected. */ @property File stdout() @safe nothrow { if ((_redirectFlags & Redirect.stdout) == 0) throw new Error("Child process' standard output stream hasn't " ~"been redirected."); return _stdout; } /** An $(REF File, std,stdio) that allows reading from the child process' standard error stream. Throws: $(OBJECTREF Error) if the child process' standard error stream hasn't been redirected. */ @property File stderr() @safe nothrow { if ((_redirectFlags & Redirect.stderr) == 0) throw new Error("Child process' standard error stream hasn't " ~"been redirected."); return _stderr; } private: Redirect _redirectFlags; Pid _pid; File _stdin, _stdout, _stderr; } /** Executes the given program or shell command and returns its exit code and output. $(D execute) and $(D executeShell) start a new process using $(LREF spawnProcess) and $(LREF spawnShell), respectively, and wait for the process to complete before returning. The functions capture what the child process prints to both its standard output and standard error streams, and return this together with its exit code. --- auto dmd = execute(["dmd", "myapp.d"]); if (dmd.status != 0) writeln("Compilation failed:\n", dmd.output); auto ls = executeShell("ls -l"); if (ls.status != 0) writeln("Failed to retrieve file listing"); else writeln(ls.output); --- The $(D args)/$(D program)/$(D command), $(D env) and $(D config) parameters are forwarded straight to the underlying spawn functions, and we refer to their documentation for details. Params: args = An array which contains the program name as the zeroth element and any command-line arguments in the following elements. (See $(LREF spawnProcess) for details.) program = The program name, $(I without) command-line arguments. (See $(LREF spawnProcess) for details.) command = A shell command which is passed verbatim to the command interpreter. (See $(LREF spawnShell) for details.) env = Additional environment variables for the child process. (See $(LREF spawnProcess) for details.) config = Flags that control process creation. See $(LREF Config) for an overview of available flags, and note that the $(D retainStd...) flags have no effect in this function. maxOutput = The maximum number of bytes of output that should be captured. workDir = The working directory for the new process. By default the child process inherits the parent's working directory. shellPath = The path to the shell to use to run the specified program. By default this is $(LREF nativeShell). Returns: An $(D std.typecons.Tuple!(int, "status", string, "output")). POSIX_specific: If the process is terminated by a signal, the $(D status) field of the return value will contain a negative number whose absolute value is the signal number. (See $(LREF wait) for details.) Throws: $(LREF ProcessException) on failure to start the process.$(BR) $(REF StdioException, std,stdio) on failure to capture output. */ auto execute(in char[][] args, const string[string] env = null, Config config = Config.none, size_t maxOutput = size_t.max, in char[] workDir = null) @trusted //TODO: @safe { return executeImpl!pipeProcess(args, env, config, maxOutput, workDir); } /// ditto auto execute(in char[] program, const string[string] env = null, Config config = Config.none, size_t maxOutput = size_t.max, in char[] workDir = null) @trusted //TODO: @safe { return executeImpl!pipeProcess(program, env, config, maxOutput, workDir); } /// ditto auto executeShell(in char[] command, const string[string] env = null, Config config = Config.none, size_t maxOutput = size_t.max, in char[] workDir = null, string shellPath = nativeShell) @trusted //TODO: @safe { return executeImpl!pipeShell(command, env, config, maxOutput, workDir, shellPath); } // Does the actual work for execute() and executeShell(). private auto executeImpl(alias pipeFunc, Cmd, ExtraPipeFuncArgs...)( Cmd commandLine, const string[string] env = null, Config config = Config.none, size_t maxOutput = size_t.max, in char[] workDir = null, ExtraPipeFuncArgs extraArgs = ExtraPipeFuncArgs.init) { import std.algorithm.comparison : min; import std.array : appender; import std.typecons : Tuple; auto p = pipeFunc(commandLine, Redirect.stdout | Redirect.stderrToStdout, env, config, workDir, extraArgs); auto a = appender!(ubyte[])(); enum size_t defaultChunkSize = 4096; immutable chunkSize = min(maxOutput, defaultChunkSize); // Store up to maxOutput bytes in a. foreach (ubyte[] chunk; p.stdout.byChunk(chunkSize)) { immutable size_t remain = maxOutput - a.data.length; if (chunk.length < remain) a.put(chunk); else { a.put(chunk[0 .. remain]); break; } } // Exhaust the stream, if necessary. foreach (ubyte[] chunk; p.stdout.byChunk(defaultChunkSize)) { } return Tuple!(int, "status", string, "output")(wait(p.pid), cast(string) a.data); } @system unittest { import std.string; // To avoid printing the newline characters, we use the echo|set trick on // Windows, and printf on POSIX (neither echo -n nor echo \c are portable). version (Windows) TestScript prog = "echo|set /p=%~1 echo|set /p=%~2 1>&2 exit 123"; else version (Android) TestScript prog = `echo -n $1 echo -n $2 >&2 exit 123`; else version (Posix) TestScript prog = `printf '%s' $1 printf '%s' $2 >&2 exit 123`; auto r = execute([prog.path, "foo", "bar"]); assert(r.status == 123); assert(r.output.stripRight() == "foobar"); auto s = execute([prog.path, "Hello", "World"]); assert(s.status == 123); assert(s.output.stripRight() == "HelloWorld"); } @safe unittest { import std.string; auto r1 = executeShell("echo foo"); assert(r1.status == 0); assert(r1.output.chomp() == "foo"); auto r2 = executeShell("echo bar 1>&2"); assert(r2.status == 0); assert(r2.output.chomp().stripRight() == "bar"); auto r3 = executeShell("exit 123"); assert(r3.status == 123); assert(r3.output.empty); } @safe unittest { import std.typecons : Tuple; void foo() //Just test the compilation { auto ret1 = execute(["dummy", "arg"]); auto ret2 = executeShell("dummy arg"); static assert(is(typeof(ret1) == typeof(ret2))); Tuple!(int, string) ret3 = execute(["dummy", "arg"]); } } /// An exception that signals a problem with starting or waiting for a process. class ProcessException : Exception { import std.exception : basicExceptionCtors; mixin basicExceptionCtors; // Creates a new ProcessException based on errno. static ProcessException newFromErrno(string customMsg = null, string file = __FILE__, size_t line = __LINE__) { import core.stdc.errno : errno; return newFromErrno(errno, customMsg, file, line); } // ditto, but error number is provided by caller static ProcessException newFromErrno(int error, string customMsg = null, string file = __FILE__, size_t line = __LINE__) { import std.exception : errnoString; auto errnoMsg = errnoString(error); auto msg = customMsg.empty ? errnoMsg : customMsg ~ " (" ~ errnoMsg ~ ')'; return new ProcessException(msg, file, line); } // Creates a new ProcessException based on GetLastError() (Windows only). version (Windows) static ProcessException newFromLastError(string customMsg = null, string file = __FILE__, size_t line = __LINE__) { auto lastMsg = sysErrorString(GetLastError()); auto msg = customMsg.empty ? lastMsg : customMsg ~ " (" ~ lastMsg ~ ')'; return new ProcessException(msg, file, line); } } /** Determines the path to the current user's preferred command interpreter. On Windows, this function returns the contents of the COMSPEC environment variable, if it exists. Otherwise, it returns the result of $(LREF nativeShell). On POSIX, $(D userShell) returns the contents of the SHELL environment variable, if it exists and is non-empty. Otherwise, it returns the result of $(LREF nativeShell). */ @property string userShell() @safe { version (Windows) return environment.get("COMSPEC", nativeShell); else version (Posix) return environment.get("SHELL", nativeShell); } /** The platform-specific native shell path. This function returns $(D "cmd.exe") on Windows, $(D "/bin/sh") on POSIX, and $(D "/system/bin/sh") on Android. */ @property string nativeShell() @safe @nogc pure nothrow { version (Windows) return "cmd.exe"; else version (Android) return "/system/bin/sh"; else version (Posix) return "/bin/sh"; } // A command-line switch that indicates to the shell that it should // interpret the following argument as a command to be executed. version (Posix) private immutable string shellSwitch = "-c"; version (Windows) private immutable string shellSwitch = "/C"; /** * Returns the process ID of the current process, * which is guaranteed to be unique on the system. * * Example: * --- * writefln("Current process ID: %d", thisProcessID); * --- */ @property int thisProcessID() @trusted nothrow //TODO: @safe { version (Windows) return GetCurrentProcessId(); else version (Posix) return core.sys.posix.unistd.getpid(); } /** * Returns the process ID of the current thread, * which is guaranteed to be unique within the current process. * * Returns: * A $(REF ThreadID, core,thread) value for the calling thread. * * Example: * --- * writefln("Current thread ID: %s", thisThreadID); * --- */ @property ThreadID thisThreadID() @trusted nothrow //TODO: @safe { version (Windows) return GetCurrentThreadId(); else version (Posix) { import core.sys.posix.pthread : pthread_self; return pthread_self(); } } @system unittest { int pidA, pidB; ThreadID tidA, tidB; pidA = thisProcessID; tidA = thisThreadID; import core.thread; auto t = new Thread({ pidB = thisProcessID; tidB = thisThreadID; }); t.start(); t.join(); assert(pidA == pidB); assert(tidA != tidB); } // Unittest support code: TestScript takes a string that contains a // shell script for the current platform, and writes it to a temporary // file. On Windows the file name gets a .cmd extension, while on // POSIX its executable permission bit is set. The file is // automatically deleted when the object goes out of scope. version (unittest) private struct TestScript { this(string code) @system { // @system due to chmod import std.ascii : newline; import std.file : write; version (Windows) { auto ext = ".cmd"; auto firstLine = "@echo off"; } else version (Posix) { auto ext = ""; auto firstLine = "#!" ~ nativeShell; } path = uniqueTempPath()~ext; write(path, firstLine ~ newline ~ code ~ newline); version (Posix) { import core.sys.posix.sys.stat : chmod; chmod(path.tempCString(), octal!777); } } ~this() { import std.file : remove, exists; if (!path.empty && exists(path)) { try { remove(path); } catch (Exception e) { debug std.stdio.stderr.writeln(e.msg); } } } string path; } version (unittest) private string uniqueTempPath() @safe { import std.file : tempDir; import std.path : buildPath; import std.uuid : randomUUID; // Path should contain spaces to test escaping whitespace return buildPath(tempDir(), "std.process temporary file " ~ randomUUID().toString()); } // ============================================================================= // Functions for shell command quoting/escaping. // ============================================================================= /* Command line arguments exist in three forms: 1) string or char* array, as received by main. Also used internally on POSIX systems. 2) Command line string, as used in Windows' CreateProcess and CommandLineToArgvW functions. A specific quoting and escaping algorithm is used to distinguish individual arguments. 3) Shell command string, as written at a shell prompt or passed to cmd /C - this one may contain shell control characters, e.g. > or | for redirection / piping - thus, yet another layer of escaping is used to distinguish them from program arguments. Except for escapeWindowsArgument, the intermediary format (2) is hidden away from the user in this module. */ /** Escapes an argv-style argument array to be used with $(LREF spawnShell), $(LREF pipeShell) or $(LREF executeShell). --- string url = "http://dlang.org/"; executeShell(escapeShellCommand("wget", url, "-O", "dlang-index.html")); --- Concatenate multiple $(D escapeShellCommand) and $(LREF escapeShellFileName) results to use shell redirection or piping operators. --- executeShell( escapeShellCommand("curl", "http://dlang.org/download.html") ~ "|" ~ escapeShellCommand("grep", "-o", `http://\S*\.zip`) ~ ">" ~ escapeShellFileName("D download links.txt")); --- Throws: $(OBJECTREF Exception) if any part of the command line contains unescapable characters (NUL on all platforms, as well as CR and LF on Windows). */ string escapeShellCommand(in char[][] args...) @safe pure { if (args.empty) return null; version (Windows) { // Do not ^-escape the first argument (the program path), // as the shell parses it differently from parameters. // ^-escaping a program path that contains spaces will fail. string result = escapeShellFileName(args[0]); if (args.length > 1) { result ~= " " ~ escapeShellCommandString( escapeShellArguments(args[1..$])); } return result; } version (Posix) { return escapeShellCommandString(escapeShellArguments(args)); } } @safe unittest { // This is a simple unit test without any special requirements, // in addition to the unittest_burnin one below which requires // special preparation. struct TestVector { string[] args; string windows, posix; } TestVector[] tests = [ { args : ["foo bar"], windows : `"foo bar"`, posix : `'foo bar'` }, { args : ["foo bar", "hello"], windows : `"foo bar" hello`, posix : `'foo bar' 'hello'` }, { args : ["foo bar", "hello world"], windows : `"foo bar" ^"hello world^"`, posix : `'foo bar' 'hello world'` }, { args : ["foo bar", "hello", "world"], windows : `"foo bar" hello world`, posix : `'foo bar' 'hello' 'world'` }, { args : ["foo bar", `'"^\`], windows : `"foo bar" ^"'\^"^^\\^"`, posix : `'foo bar' ''\''"^\'` }, ]; foreach (test; tests) version (Windows) assert(escapeShellCommand(test.args) == test.windows); else assert(escapeShellCommand(test.args) == test.posix ); } private string escapeShellCommandString(string command) @safe pure { version (Windows) return escapeWindowsShellCommand(command); else return command; } private string escapeWindowsShellCommand(in char[] command) @safe pure { import std.array : appender; auto result = appender!string(); result.reserve(command.length); foreach (c; command) switch (c) { case '\0': throw new Exception("Cannot put NUL in command line"); case '\r': case '\n': throw new Exception("CR/LF are not escapable"); case '\x01': .. case '\x09': case '\x0B': .. case '\x0C': case '\x0E': .. case '\x1F': case '"': case '^': case '&': case '<': case '>': case '|': result.put('^'); goto default; default: result.put(c); } return result.data; } private string escapeShellArguments(in char[][] args...) @trusted pure nothrow { import std.exception : assumeUnique; char[] buf; @safe nothrow char[] allocator(size_t size) { if (buf.length == 0) return buf = new char[size]; else { auto p = buf.length; buf.length = buf.length + 1 + size; buf[p++] = ' '; return buf[p .. p+size]; } } foreach (arg; args) escapeShellArgument!allocator(arg); return assumeUnique(buf); } private auto escapeShellArgument(alias allocator)(in char[] arg) @safe nothrow { // The unittest for this function requires special // preparation - see below. version (Windows) return escapeWindowsArgumentImpl!allocator(arg); else return escapePosixArgumentImpl!allocator(arg); } /** Quotes a command-line argument in a manner conforming to the behavior of $(LINK2 http://msdn.microsoft.com/en-us/library/windows/desktop/bb776391(v=vs.85).aspx, CommandLineToArgvW). */ string escapeWindowsArgument(in char[] arg) @trusted pure nothrow { // Rationale for leaving this function as public: // this algorithm of escaping paths is also used in other software, // e.g. DMD's response files. import std.exception : assumeUnique; auto buf = escapeWindowsArgumentImpl!charAllocator(arg); return assumeUnique(buf); } private char[] charAllocator(size_t size) @safe pure nothrow { return new char[size]; } private char[] escapeWindowsArgumentImpl(alias allocator)(in char[] arg) @safe nothrow if (is(typeof(allocator(size_t.init)[0] = char.init))) { // References: // * http://msdn.microsoft.com/en-us/library/windows/desktop/bb776391(v=vs.85).aspx // * http://blogs.msdn.com/b/oldnewthing/archive/2010/09/17/10063629.aspx // Check if the string needs to be escaped, // and calculate the total string size. // Trailing backslashes must be escaped bool escaping = true; bool needEscape = false; // Result size = input size + 2 for surrounding quotes + 1 for the // backslash for each escaped character. size_t size = 1 + arg.length + 1; foreach_reverse (char c; arg) { if (c == '"') { needEscape = true; escaping = true; size++; } else if (c == '\\') { if (escaping) size++; } else { if (c == ' ' || c == '\t') needEscape = true; escaping = false; } } import std.ascii : isDigit; // Empty arguments need to be specified as "" if (!arg.length) needEscape = true; else // Arguments ending with digits need to be escaped, // to disambiguate with 1>file redirection syntax if (isDigit(arg[$-1])) needEscape = true; if (!needEscape) return allocator(arg.length)[] = arg; // Construct result string. auto buf = allocator(size); size_t p = size; buf[--p] = '"'; escaping = true; foreach_reverse (char c; arg) { if (c == '"') escaping = true; else if (c != '\\') escaping = false; buf[--p] = c; if (escaping) buf[--p] = '\\'; } buf[--p] = '"'; assert(p == 0); return buf; } version(Windows) version(unittest) { import core.stdc.stddef; import core.stdc.wchar_ : wcslen; import core.sys.windows.shellapi : CommandLineToArgvW; import core.sys.windows.windows; import std.array; string[] parseCommandLine(string line) { import std.algorithm.iteration : map; import std.array : array; LPWSTR lpCommandLine = (to!(wchar[])(line) ~ "\0"w).ptr; int numArgs; LPWSTR* args = CommandLineToArgvW(lpCommandLine, &numArgs); scope(exit) LocalFree(args); return args[0 .. numArgs] .map!(arg => to!string(arg[0 .. wcslen(arg)])) .array(); } @system unittest { string[] testStrings = [ `Hello`, `Hello, world`, `Hello, "world"`, `C:\`, `C:\dmd`, `C:\Program Files\`, ]; enum CHARS = `_x\" *&^` ~ "\t"; // _ is placeholder for nothing foreach (c1; CHARS) foreach (c2; CHARS) foreach (c3; CHARS) foreach (c4; CHARS) testStrings ~= [c1, c2, c3, c4].replace("_", ""); foreach (s; testStrings) { auto q = escapeWindowsArgument(s); auto args = parseCommandLine("Dummy.exe " ~ q); assert(args.length == 2, s ~ " => " ~ q ~ " #" ~ text(args.length-1)); assert(args[1] == s, s ~ " => " ~ q ~ " => " ~ args[1]); } } } private string escapePosixArgument(in char[] arg) @trusted pure nothrow { import std.exception : assumeUnique; auto buf = escapePosixArgumentImpl!charAllocator(arg); return assumeUnique(buf); } private char[] escapePosixArgumentImpl(alias allocator)(in char[] arg) @safe nothrow if (is(typeof(allocator(size_t.init)[0] = char.init))) { // '\'' means: close quoted part of argument, append an escaped // single quote, and reopen quotes // Below code is equivalent to: // return `'` ~ std.array.replace(arg, `'`, `'\''`) ~ `'`; size_t size = 1 + arg.length + 1; foreach (char c; arg) if (c == '\'') size += 3; auto buf = allocator(size); size_t p = 0; buf[p++] = '\''; foreach (char c; arg) if (c == '\'') { buf[p .. p+4] = `'\''`; p += 4; } else buf[p++] = c; buf[p++] = '\''; assert(p == size); return buf; } /** Escapes a filename to be used for shell redirection with $(LREF spawnShell), $(LREF pipeShell) or $(LREF executeShell). */ string escapeShellFileName(in char[] fileName) @trusted pure nothrow { // The unittest for this function requires special // preparation - see below. version (Windows) { // If a file starts with &, it can cause cmd.exe to misinterpret // the file name as the stream redirection syntax: // command > "&foo.txt" // gets interpreted as // command >&foo.txt // Prepend .\ to disambiguate. if (fileName.length && fileName[0] == '&') return cast(string)(`".\` ~ fileName ~ '"'); return cast(string)('"' ~ fileName ~ '"'); } else return escapePosixArgument(fileName); } // Loop generating strings with random characters //version = unittest_burnin; version(unittest_burnin) @system unittest { // There are no readily-available commands on all platforms suitable // for properly testing command escaping. The behavior of CMD's "echo" // built-in differs from the POSIX program, and Windows ports of POSIX // environments (Cygwin, msys, gnuwin32) may interfere with their own // "echo" ports. // To run this unit test, create std_process_unittest_helper.d with the // following content and compile it: // import std.stdio, std.array; void main(string[] args) { write(args.join("\0")); } // Then, test this module with: // rdmd --main -unittest -version=unittest_burnin process.d auto helper = absolutePath("std_process_unittest_helper"); assert(executeShell(helper ~ " hello").output.split("\0")[1..$] == ["hello"], "Helper malfunction"); void test(string[] s, string fn) { string e; string[] g; e = escapeShellCommand(helper ~ s); { scope(failure) writefln("executeShell() failed.\nExpected:\t%s\nEncoded:\t%s", s, [e]); auto result = executeShell(e); assert(result.status == 0, "std_process_unittest_helper failed"); g = result.output.split("\0")[1..$]; } assert(s == g, format("executeShell() test failed.\nExpected:\t%s\nGot:\t\t%s\nEncoded:\t%s", s, g, [e])); e = escapeShellCommand(helper ~ s) ~ ">" ~ escapeShellFileName(fn); { scope(failure) writefln( "executeShell() with redirect failed.\nExpected:\t%s\nFilename:\t%s\nEncoded:\t%s", s, [fn], [e]); auto result = executeShell(e); assert(result.status == 0, "std_process_unittest_helper failed"); assert(!result.output.length, "No output expected, got:\n" ~ result.output); g = readText(fn).split("\0")[1..$]; } remove(fn); assert(s == g, format("executeShell() with redirect test failed.\nExpected:\t%s\nGot:\t\t%s\nEncoded:\t%s", s, g, [e])); } while (true) { string[] args; foreach (n; 0 .. uniform(1, 4)) { string arg; foreach (l; 0 .. uniform(0, 10)) { dchar c; while (true) { version (Windows) { // As long as DMD's system() uses CreateProcessA, // we can't reliably pass Unicode c = uniform(0, 128); } else c = uniform!ubyte(); if (c == 0) continue; // argv-strings are zero-terminated version (Windows) if (c == '\r' || c == '\n') continue; // newlines are unescapable on Windows break; } arg ~= c; } args ~= arg; } // generate filename string fn; foreach (l; 0 .. uniform(1, 10)) { dchar c; while (true) { version (Windows) c = uniform(0, 128); // as above else c = uniform!ubyte(); if (c == 0 || c == '/') continue; // NUL and / are the only characters // forbidden in POSIX filenames version (Windows) if (c < '\x20' || c == '<' || c == '>' || c == ':' || c == '"' || c == '\\' || c == '|' || c == '?' || c == '*') continue; // http://msdn.microsoft.com/en-us/library/aa365247(VS.85).aspx break; } fn ~= c; } fn = fn[0..$/2] ~ "_testfile_" ~ fn[$/2..$]; test(args, fn); } } // ============================================================================= // Environment variable manipulation. // ============================================================================= /** Manipulates _environment variables using an associative-array-like interface. This class contains only static methods, and cannot be instantiated. See below for examples of use. */ abstract final class environment { static: /** Retrieves the value of the environment variable with the given $(D name). --- auto path = environment["PATH"]; --- Throws: $(OBJECTREF Exception) if the environment variable does not exist, or $(REF UTFException, std,utf) if the variable contains invalid UTF-16 characters (Windows only). See_also: $(LREF environment.get), which doesn't throw on failure. */ string opIndex(in char[] name) @safe { import std.exception : enforce; string value; enforce(getImpl(name, value), "Environment variable not found: "~name); return value; } /** Retrieves the value of the environment variable with the given $(D name), or a default value if the variable doesn't exist. Unlike $(LREF environment.opIndex), this function never throws. --- auto sh = environment.get("SHELL", "/bin/sh"); --- This function is also useful in checking for the existence of an environment variable. --- auto myVar = environment.get("MYVAR"); if (myVar is null) { // Environment variable doesn't exist. // Note that we have to use 'is' for the comparison, since // myVar == null is also true if the variable exists but is // empty. } --- Throws: $(REF UTFException, std,utf) if the variable contains invalid UTF-16 characters (Windows only). */ string get(in char[] name, string defaultValue = null) @safe { string value; auto found = getImpl(name, value); return found ? value : defaultValue; } /** Assigns the given $(D value) to the environment variable with the given $(D name). If $(D value) is null the variable is removed from environment. If the variable does not exist, it will be created. If it already exists, it will be overwritten. --- environment["foo"] = "bar"; --- Throws: $(OBJECTREF Exception) if the environment variable could not be added (e.g. if the name is invalid). Note: On some platforms, modifying environment variables may not be allowed in multi-threaded programs. See e.g. $(LINK2 https://www.gnu.org/software/libc/manual/html_node/Environment-Access.html#Environment-Access, glibc). */ inout(char)[] opIndexAssign(inout char[] value, in char[] name) @trusted { version (Posix) { import std.exception : enforce, errnoEnforce; if (value is null) { remove(name); return value; } if (core.sys.posix.stdlib.setenv(name.tempCString(), value.tempCString(), 1) != -1) { return value; } // The default errno error message is very uninformative // in the most common case, so we handle it manually. enforce(errno != EINVAL, "Invalid environment variable name: '"~name~"'"); errnoEnforce(false, "Failed to add environment variable"); assert(0); } else version (Windows) { import std.exception : enforce; enforce( SetEnvironmentVariableW(name.tempCStringW(), value.tempCStringW()), sysErrorString(GetLastError()) ); return value; } else static assert(0); } /** Removes the environment variable with the given $(D name). If the variable isn't in the environment, this function returns successfully without doing anything. Note: On some platforms, modifying environment variables may not be allowed in multi-threaded programs. See e.g. $(LINK2 https://www.gnu.org/software/libc/manual/html_node/Environment-Access.html#Environment-Access, glibc). */ void remove(in char[] name) @trusted nothrow @nogc // TODO: @safe { version (Windows) SetEnvironmentVariableW(name.tempCStringW(), null); else version (Posix) core.sys.posix.stdlib.unsetenv(name.tempCString()); else static assert(0); } /** Identify whether a variable is defined in the environment. Because it doesn't return the value, this function is cheaper than `get`. However, if you do need the value as well, you should just check the return of `get` for `null` instead of using this function first. Example: ------------- // good usage if ("MY_ENV_FLAG" in environment) doSomething(); // bad usage if ("MY_ENV_VAR" in environment) doSomething(environment["MY_ENV_VAR"]); // do this instead if (auto var = environment.get("MY_ENV_VAR")) doSomething(var); ------------- */ bool opBinaryRight(string op : "in")(in char[] name) @trusted { version (Posix) return core.sys.posix.stdlib.getenv(name.tempCString()) !is null; else version (Windows) { SetLastError(NO_ERROR); if (GetEnvironmentVariableW(name.tempCStringW, null, 0) > 0) return true; immutable err = GetLastError(); if (err == ERROR_ENVVAR_NOT_FOUND) return false; // some other windows error. Might actually be NO_ERROR, because // GetEnvironmentVariable doesn't specify whether it sets on all // failures throw new WindowsException(err); } else static assert(0); } /** Copies all environment variables into an associative array. Windows_specific: While Windows environment variable names are case insensitive, D's built-in associative arrays are not. This function will store all variable names in uppercase (e.g. $(D PATH)). Throws: $(OBJECTREF Exception) if the environment variables could not be retrieved (Windows only). */ string[string] toAA() @trusted { import std.conv : to; string[string] aa; version (Posix) { auto environ = getEnvironPtr; for (int i=0; environ[i] != null; ++i) { import std.string : indexOf; immutable varDef = to!string(environ[i]); immutable eq = indexOf(varDef, '='); assert(eq >= 0); immutable name = varDef[0 .. eq]; immutable value = varDef[eq+1 .. $]; // In POSIX, environment variables may be defined more // than once. This is a security issue, which we avoid // by checking whether the key already exists in the array. // For more info: // http://www.dwheeler.com/secure-programs/Secure-Programs-HOWTO/environment-variables.html if (name !in aa) aa[name] = value; } } else version (Windows) { import std.exception : enforce; import std.uni : toUpper; auto envBlock = GetEnvironmentStringsW(); enforce(envBlock, "Failed to retrieve environment variables."); scope(exit) FreeEnvironmentStringsW(envBlock); for (int i=0; envBlock[i] != '\0'; ++i) { auto start = i; while (envBlock[i] != '=') ++i; immutable name = toUTF8(toUpper(envBlock[start .. i])); start = i+1; while (envBlock[i] != '\0') ++i; // Ignore variables with empty names. These are used internally // by Windows to keep track of each drive's individual current // directory. if (!name.length) continue; // Just like in POSIX systems, environment variables may be // defined more than once in an environment block on Windows, // and it is just as much of a security issue there. Moreso, // in fact, due to the case insensensitivity of variable names, // which is not handled correctly by all programs. auto val = toUTF8(envBlock[start .. i]); if (name !in aa) aa[name] = val is null ? "" : val; } } else static assert(0); return aa; } private: // Retrieves the environment variable, returns false on failure. bool getImpl(in char[] name, out string value) @trusted { version (Windows) { // first we ask windows how long the environment variable is, // then we try to read it in to a buffer of that length. Lots // of error conditions because the windows API is nasty. import std.conv : to; const namezTmp = name.tempCStringW(); WCHAR[] buf; // clear error because GetEnvironmentVariable only says it sets it // if the environment variable is missing, not on other errors. SetLastError(NO_ERROR); // len includes terminating null immutable len = GetEnvironmentVariableW(namezTmp, null, 0); if (len == 0) { immutable err = GetLastError(); if (err == ERROR_ENVVAR_NOT_FOUND) return false; // some other windows error. Might actually be NO_ERROR, because // GetEnvironmentVariable doesn't specify whether it sets on all // failures throw new WindowsException(err); } if (len == 1) { value = ""; return true; } buf.length = len; while (true) { // lenRead is either the number of bytes read w/o null - if buf was long enough - or // the number of bytes necessary *including* null if buf wasn't long enough immutable lenRead = GetEnvironmentVariableW(namezTmp, buf.ptr, to!DWORD(buf.length)); if (lenRead == 0) { immutable err = GetLastError(); if (err == NO_ERROR) // sucessfully read a 0-length variable { value = ""; return true; } if (err == ERROR_ENVVAR_NOT_FOUND) // variable didn't exist return false; // some other windows error throw new WindowsException(err); } assert(lenRead != buf.length, "impossible according to msft docs"); if (lenRead < buf.length) // the buffer was long enough { value = toUTF8(buf[0 .. lenRead]); return true; } // resize and go around again, because the environment variable grew buf.length = lenRead; } } else version (Posix) { const vz = core.sys.posix.stdlib.getenv(name.tempCString()); if (vz == null) return false; auto v = vz[0 .. strlen(vz)]; // Cache the last call's result. static string lastResult; if (v.empty) { // Return non-null array for blank result to distinguish from // not-present result. lastResult = ""; } else if (v != lastResult) { lastResult = v.idup; } value = lastResult; return true; } else static assert(0); } } @safe unittest { import std.exception : assertThrown; // New variable environment["std_process"] = "foo"; assert(environment["std_process"] == "foo"); assert("std_process" in environment); // Set variable again (also tests length 1 case) environment["std_process"] = "b"; assert(environment["std_process"] == "b"); assert("std_process" in environment); // Remove variable environment.remove("std_process"); assert("std_process" !in environment); // Remove again, should succeed environment.remove("std_process"); assert("std_process" !in environment); // Throw on not found. assertThrown(environment["std_process"]); // get() without default value assert(environment.get("std_process") is null); // get() with default value assert(environment.get("std_process", "baz") == "baz"); // get() on an empty (but present) value environment["std_process"] = ""; auto res = environment.get("std_process"); assert(res !is null); assert(res == ""); assert("std_process" in environment); // Important to do the following round-trip after the previous test // because it tests toAA with an empty var // Convert to associative array auto aa = environment.toAA(); assert(aa.length > 0); foreach (n, v; aa) { // Wine has some bugs related to environment variables: // - Wine allows the existence of an env. variable with the name // "\0", but GetEnvironmentVariable refuses to retrieve it. // As of 2.067 we filter these out anyway (see comment in toAA). assert(v == environment[n]); } // ... and back again. foreach (n, v; aa) environment[n] = v; // Complete the roundtrip auto aa2 = environment.toAA(); import std.conv : text; assert(aa == aa2, text(aa, " != ", aa2)); assert("std_process" in environment); // Setting null must have the same effect as remove environment["std_process"] = null; assert("std_process" !in environment); } // ============================================================================= // Everything below this line was part of the old std.process, and most of // it will be deprecated and removed. // ============================================================================= /* Copyright: Copyright Digital Mars 2007 - 2009. License: $(HTTP www.boost.org/LICENSE_1_0.txt, Boost License 1.0). Authors: $(HTTP digitalmars.com, Walter Bright), $(HTTP erdani.org, Andrei Alexandrescu), $(HTTP thecybershadow.net, Vladimir Panteleev) Source: $(PHOBOSSRC std/_process.d) */ /* Copyright Digital Mars 2007 - 2009. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) */ import core.stdc.errno; import core.stdc.stdlib; import core.stdc.string; import core.thread; version (Windows) { import std.file, std.format, std.random; } version (Posix) { import core.sys.posix.stdlib; } version (unittest) { import std.conv, std.file, std.random; } private void toAStringz(in string[] a, const(char)**az) { import std.string : toStringz; foreach (string s; a) { *az++ = toStringz(s); } *az = null; } /* ========================================================== */ //version (Windows) //{ // int spawnvp(int mode, string pathname, string[] argv) // { // char** argv_ = cast(char**) core.stdc.stdlib.malloc((char*).sizeof * (1 + argv.length)); // scope(exit) core.stdc.stdlib.free(argv_); // // toAStringz(argv, argv_); // // return spawnvp(mode, pathname.tempCString(), argv_); // } //} // Incorporating idea (for spawnvp() on Posix) from Dave Fladebo enum { _P_WAIT, _P_NOWAIT, _P_OVERLAY } version(Windows) extern(C) int spawnvp(int, in char *, in char **); alias P_WAIT = _P_WAIT; alias P_NOWAIT = _P_NOWAIT; /* ========================================================== */ version (StdDdoc) { /** Replaces the current process by executing a command, $(D pathname), with the arguments in $(D argv). $(BLUE This functions is Posix-Only.) Typically, the first element of $(D argv) is the command being executed, i.e. $(D argv[0] == pathname). The 'p' versions of $(D exec) search the PATH environment variable for $(D pathname). The 'e' versions additionally take the new process' environment variables as an array of strings of the form key=value. Does not return on success (the current process will have been replaced). Returns -1 on failure with no indication of the underlying error. Windows_specific: These functions are only supported on POSIX platforms, as the Windows operating systems do not provide the ability to overwrite the current process image with another. In single-threaded programs it is possible to approximate the effect of $(D execv*) by using $(LREF spawnProcess) and terminating the current process once the child process has returned. For example: --- auto commandLine = [ "program", "arg1", "arg2" ]; version (Posix) { execv(commandLine[0], commandLine); throw new Exception("Failed to execute program"); } else version (Windows) { import core.stdc.stdlib : _exit; _exit(wait(spawnProcess(commandLine))); } --- This is, however, NOT equivalent to POSIX' $(D execv*). For one thing, the executed program is started as a separate process, with all this entails. Secondly, in a multithreaded program, other threads will continue to do work while the current thread is waiting for the child process to complete. A better option may sometimes be to terminate the current program immediately after spawning the child process. This is the behaviour exhibited by the $(LINK2 http://msdn.microsoft.com/en-us/library/431x4c1w.aspx,$(D __exec)) functions in Microsoft's C runtime library, and it is how D's now-deprecated Windows $(D execv*) functions work. Example: --- auto commandLine = [ "program", "arg1", "arg2" ]; version (Posix) { execv(commandLine[0], commandLine); throw new Exception("Failed to execute program"); } else version (Windows) { spawnProcess(commandLine); import core.stdc.stdlib : _exit; _exit(0); } --- */ int execv(in string pathname, in string[] argv); ///ditto int execve(in string pathname, in string[] argv, in string[] envp); /// ditto int execvp(in string pathname, in string[] argv); /// ditto int execvpe(in string pathname, in string[] argv, in string[] envp); } else version(Posix) { int execv(in string pathname, in string[] argv) { return execv_(pathname, argv); } int execve(in string pathname, in string[] argv, in string[] envp) { return execve_(pathname, argv, envp); } int execvp(in string pathname, in string[] argv) { return execvp_(pathname, argv); } int execvpe(in string pathname, in string[] argv, in string[] envp) { return execvpe_(pathname, argv, envp); } } // Move these C declarations to druntime if we decide to keep the D wrappers extern(C) { int execv(in char *, in char **); int execve(in char *, in char **, in char **); int execvp(in char *, in char **); version(Windows) int execvpe(in char *, in char **, in char **); } private int execv_(in string pathname, in string[] argv) { auto argv_ = cast(const(char)**)core.stdc.stdlib.malloc((char*).sizeof * (1 + argv.length)); scope(exit) core.stdc.stdlib.free(argv_); toAStringz(argv, argv_); return execv(pathname.tempCString(), argv_); } private int execve_(in string pathname, in string[] argv, in string[] envp) { auto argv_ = cast(const(char)**)core.stdc.stdlib.malloc((char*).sizeof * (1 + argv.length)); scope(exit) core.stdc.stdlib.free(argv_); auto envp_ = cast(const(char)**)core.stdc.stdlib.malloc((char*).sizeof * (1 + envp.length)); scope(exit) core.stdc.stdlib.free(envp_); toAStringz(argv, argv_); toAStringz(envp, envp_); return execve(pathname.tempCString(), argv_, envp_); } private int execvp_(in string pathname, in string[] argv) { auto argv_ = cast(const(char)**)core.stdc.stdlib.malloc((char*).sizeof * (1 + argv.length)); scope(exit) core.stdc.stdlib.free(argv_); toAStringz(argv, argv_); return execvp(pathname.tempCString(), argv_); } private int execvpe_(in string pathname, in string[] argv, in string[] envp) { version(Posix) { import std.array : split; import std.conv : to; // Is pathname rooted? if (pathname[0] == '/') { // Yes, so just call execve() return execve(pathname, argv, envp); } else { // No, so must traverse PATHs, looking for first match string[] envPaths = split( to!string(core.stdc.stdlib.getenv("PATH")), ":"); int iRet = 0; // Note: if any call to execve() succeeds, this process will cease // execution, so there's no need to check the execve() result through // the loop. foreach (string pathDir; envPaths) { string composite = cast(string) (pathDir ~ "/" ~ pathname); iRet = execve(composite, argv, envp); } if (0 != iRet) { iRet = execve(pathname, argv, envp); } return iRet; } } else version(Windows) { auto argv_ = cast(const(char)**)core.stdc.stdlib.malloc((char*).sizeof * (1 + argv.length)); scope(exit) core.stdc.stdlib.free(argv_); auto envp_ = cast(const(char)**)core.stdc.stdlib.malloc((char*).sizeof * (1 + envp.length)); scope(exit) core.stdc.stdlib.free(envp_); toAStringz(argv, argv_); toAStringz(envp, envp_); return execvpe(pathname.tempCString(), argv_, envp_); } else { static assert(0); } // version } version(StdDdoc) { /**************************************** * Start up the browser and set it to viewing the page at url. */ void browse(const(char)[] url); } else version (Windows) { import core.sys.windows.windows; pragma(lib,"shell32.lib"); void browse(const(char)[] url) { ShellExecuteW(null, "open", url.tempCStringW(), null, null, SW_SHOWNORMAL); } } else version (OSX) { import core.stdc.stdio; import core.stdc.string; import core.sys.posix.unistd; void browse(const(char)[] url) nothrow @nogc { const(char)*[5] args; auto curl = url.tempCString(); const(char)* browser = core.stdc.stdlib.getenv("BROWSER"); if (browser) { browser = strdup(browser); args[0] = browser; args[1] = curl; args[2] = null; } else { args[0] = "open".ptr; args[1] = curl; args[2] = null; } auto childpid = core.sys.posix.unistd.fork(); if (childpid == 0) { core.sys.posix.unistd.execvp(args[0], cast(char**) args.ptr); perror(args[0]); // failed to execute return; } if (browser) free(cast(void*) browser); } } else version (Posix) { import core.stdc.stdio; import core.stdc.string; import core.sys.posix.unistd; void browse(const(char)[] url) nothrow @nogc { const(char)*[3] args; const(char)* browser = core.stdc.stdlib.getenv("BROWSER"); if (browser) { browser = strdup(browser); args[0] = browser; } else //args[0] = "x-www-browser".ptr; // doesn't work on some systems args[0] = "xdg-open".ptr; args[1] = url.tempCString(); args[2] = null; auto childpid = core.sys.posix.unistd.fork(); if (childpid == 0) { core.sys.posix.unistd.execvp(args[0], cast(char**) args.ptr); perror(args[0]); // failed to execute return; } if (browser) free(cast(void*) browser); } } else static assert(0, "os not supported");
D
/home/thodges/Workspace/wasm/bindgenhello/target/debug/build/syn-c6a8eef23501aa2e/build_script_build-c6a8eef23501aa2e: /home/thodges/.cargo/registry/src/github.com-1ecc6299db9ec823/syn-0.15.30/build.rs /home/thodges/Workspace/wasm/bindgenhello/target/debug/build/syn-c6a8eef23501aa2e/build_script_build-c6a8eef23501aa2e.d: /home/thodges/.cargo/registry/src/github.com-1ecc6299db9ec823/syn-0.15.30/build.rs /home/thodges/.cargo/registry/src/github.com-1ecc6299db9ec823/syn-0.15.30/build.rs:
D
// ************************************************************ // EXIT // ************************************************************ INSTANCE DIA_NASZ_406_Straznik_EXIT(C_INFO) { npc = NASZ_406_Straznik; nr = 999; condition = DIA_NASZ_406_Straznik_EXIT_Condition; information = DIA_NASZ_406_Straznik_EXIT_Info; permanent = FALSE; description = DIALOG_ENDE; }; FUNC INT DIA_NASZ_406_Straznik_EXIT_Condition() { return TRUE; }; FUNC VOID DIA_NASZ_406_Straznik_EXIT_Info() { Wld_InsertNpc (SkeletonStraznikD,"FP_ROAM_OW_SNAPPER_OW_ORC5"); Wld_InsertNpc (SkeletonStraznikE,"FP_ROAM_OW_SNAPPER_OW_ORC7"); NASZ_406_Straznik.guild = GIL_SKELETON; Npc_SetTrueGuild (NASZ_406_Straznik, GIL_SKELETON); AI_StopProcessInfos (self); B_Attack(NASZ_406_Straznik,hero,AR_KILL,1); }; /////////////////////////////////////////////////////////////////////// // Info Moc /////////////////////////////////////////////////////////////////////// instance DIA_NASZ_406_Straznik_Moc (C_INFO) { npc = NASZ_406_Straznik; nr = 1; condition = DIA_NASZ_406_Straznik_Moc_Condition; information = DIA_NASZ_406_Straznik_Moc_Info; permanent = FALSE; important = TRUE; }; func int DIA_NASZ_406_Straznik_Moc_Condition () { return TRUE; }; func void DIA_NASZ_406_Straznik_Moc_Info () { Wld_PlayEffect("SPELLFX_massdeath", hero, hero, 0, 0, 0, FALSE ); Wld_PlayEffect("SPELLFX_incovation_blue", hero, hero, 0, 0, 0, FALSE ); Wld_PlayEffect("SPELLFX_lightstar_white", hero, hero, 0, 0, 0, FALSE ); AI_PlayAni (self,"T_PRACTICEMAGIC5"); AI_Output (self ,other, "DIA_NASZ_406_Straznik_Moc_19_00"); //Kolejny, który próbuje wykraść mój skarb? AI_Output (self ,other, "DIA_NASZ_406_Straznik_Moc_19_01"); //Ludzie. Jesteście tacy niepoważni! Zginiesz! B_LogEntry (TOPIC_Niedostepny_Klif, "Strażnik krypty pod wulkanem chroni artefaktu. Muszę go zabić i zabrać to, co potrzebuję."); };
D
/Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/Console.build/Output/ConsoleTextFragment.swift.o : /Users/nice/HelloWord/.build/checkouts/console.git-2755603573940926646/Sources/Console/Terminal/ANSI.swift /Users/nice/HelloWord/.build/checkouts/console.git-2755603573940926646/Sources/Console/Deprecated.swift /Users/nice/HelloWord/.build/checkouts/console.git-2755603573940926646/Sources/Console/Console.swift /Users/nice/HelloWord/.build/checkouts/console.git-2755603573940926646/Sources/Console/Output/ConsoleStyle.swift /Users/nice/HelloWord/.build/checkouts/console.git-2755603573940926646/Sources/Console/Input/Console+Choose.swift /Users/nice/HelloWord/.build/checkouts/console.git-2755603573940926646/Sources/Console/Activity/ActivityIndicatorState.swift /Users/nice/HelloWord/.build/checkouts/console.git-2755603573940926646/Sources/Console/Input/Console+Ask.swift /Users/nice/HelloWord/.build/checkouts/console.git-2755603573940926646/Sources/Console/Terminal/Terminal.swift /Users/nice/HelloWord/.build/checkouts/console.git-2755603573940926646/Sources/Console/Clear/Console+Ephemeral.swift /Users/nice/HelloWord/.build/checkouts/console.git-2755603573940926646/Sources/Console/Input/Console+Confirm.swift /Users/nice/HelloWord/.build/checkouts/console.git-2755603573940926646/Sources/Console/Activity/LoadingBar.swift /Users/nice/HelloWord/.build/checkouts/console.git-2755603573940926646/Sources/Console/Activity/ProgressBar.swift /Users/nice/HelloWord/.build/checkouts/console.git-2755603573940926646/Sources/Console/Activity/ActivityBar.swift /Users/nice/HelloWord/.build/checkouts/console.git-2755603573940926646/Sources/Console/Clear/Console+Clear.swift /Users/nice/HelloWord/.build/checkouts/console.git-2755603573940926646/Sources/Console/Clear/ConsoleClear.swift /Users/nice/HelloWord/.build/checkouts/console.git-2755603573940926646/Sources/Console/Utilities/ConsoleLogger.swift /Users/nice/HelloWord/.build/checkouts/console.git-2755603573940926646/Sources/Console/Activity/ActivityIndicatorRenderer.swift /Users/nice/HelloWord/.build/checkouts/console.git-2755603573940926646/Sources/Console/Output/Console+Center.swift /Users/nice/HelloWord/.build/checkouts/console.git-2755603573940926646/Sources/Console/Output/ConsoleColor.swift /Users/nice/HelloWord/.build/checkouts/console.git-2755603573940926646/Sources/Console/Utilities/ConsoleError.swift /Users/nice/HelloWord/.build/checkouts/console.git-2755603573940926646/Sources/Console/Activity/ActivityIndicator.swift /Users/nice/HelloWord/.build/checkouts/console.git-2755603573940926646/Sources/Console/Utilities/Exports.swift /Users/nice/HelloWord/.build/checkouts/console.git-2755603573940926646/Sources/Console/Output/Console+Wait.swift /Users/nice/HelloWord/.build/checkouts/console.git-2755603573940926646/Sources/Console/Output/ConsoleTextFragment.swift /Users/nice/HelloWord/.build/checkouts/console.git-2755603573940926646/Sources/Console/Input/Console+Input.swift /Users/nice/HelloWord/.build/checkouts/console.git-2755603573940926646/Sources/Console/Output/Console+Output.swift /Users/nice/HelloWord/.build/checkouts/console.git-2755603573940926646/Sources/Console/Output/ConsoleText.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/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/NIO.swiftmodule /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/Async.swiftmodule /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/Service.swiftmodule /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/Core.swiftmodule /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/Logging.swiftmodule /Users/nice/HelloWord/.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/nice/HelloWord/.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/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/NIOConcurrencyHelpers.swiftmodule /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/Bits.swiftmodule /Users/nice/HelloWord/.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/nice/HelloWord/.build/checkouts/swift-nio.git-5005363973595484456/Sources/CNIOAtomics/include/cpp_magic.h /Users/nice/HelloWord/.build/checkouts/swift-nio.git-5005363973595484456/Sources/CNIODarwin/include/c_nio_darwin.h /Users/nice/HelloWord/.build/checkouts/swift-nio.git-5005363973595484456/Sources/CNIOAtomics/include/c-atomics.h /Users/nice/HelloWord/.build/checkouts/swift-nio.git-5005363973595484456/Sources/CNIOLinux/include/c_nio_linux.h /Users/nice/HelloWord/.build/checkouts/swift-nio-zlib-support.git--6556802241718767980/module.modulemap /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/CNIOSHA1.build/module.modulemap /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/CNIOOpenSSL.build/module.modulemap /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/CCryptoOpenSSL.build/module.modulemap /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/CNIOZlib.build/module.modulemap /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/CNIODarwin.build/module.modulemap /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/CNIOHTTPParser.build/module.modulemap /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/CNIOAtomics.build/module.modulemap /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/CNIOLinux.build/module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/ApplicationServices.framework/Headers/ApplicationServices.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Security.framework/Headers/Security.apinotes /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/Console.build/ConsoleTextFragment~partial.swiftmodule : /Users/nice/HelloWord/.build/checkouts/console.git-2755603573940926646/Sources/Console/Terminal/ANSI.swift /Users/nice/HelloWord/.build/checkouts/console.git-2755603573940926646/Sources/Console/Deprecated.swift /Users/nice/HelloWord/.build/checkouts/console.git-2755603573940926646/Sources/Console/Console.swift /Users/nice/HelloWord/.build/checkouts/console.git-2755603573940926646/Sources/Console/Output/ConsoleStyle.swift /Users/nice/HelloWord/.build/checkouts/console.git-2755603573940926646/Sources/Console/Input/Console+Choose.swift /Users/nice/HelloWord/.build/checkouts/console.git-2755603573940926646/Sources/Console/Activity/ActivityIndicatorState.swift /Users/nice/HelloWord/.build/checkouts/console.git-2755603573940926646/Sources/Console/Input/Console+Ask.swift /Users/nice/HelloWord/.build/checkouts/console.git-2755603573940926646/Sources/Console/Terminal/Terminal.swift /Users/nice/HelloWord/.build/checkouts/console.git-2755603573940926646/Sources/Console/Clear/Console+Ephemeral.swift /Users/nice/HelloWord/.build/checkouts/console.git-2755603573940926646/Sources/Console/Input/Console+Confirm.swift /Users/nice/HelloWord/.build/checkouts/console.git-2755603573940926646/Sources/Console/Activity/LoadingBar.swift /Users/nice/HelloWord/.build/checkouts/console.git-2755603573940926646/Sources/Console/Activity/ProgressBar.swift /Users/nice/HelloWord/.build/checkouts/console.git-2755603573940926646/Sources/Console/Activity/ActivityBar.swift /Users/nice/HelloWord/.build/checkouts/console.git-2755603573940926646/Sources/Console/Clear/Console+Clear.swift /Users/nice/HelloWord/.build/checkouts/console.git-2755603573940926646/Sources/Console/Clear/ConsoleClear.swift /Users/nice/HelloWord/.build/checkouts/console.git-2755603573940926646/Sources/Console/Utilities/ConsoleLogger.swift /Users/nice/HelloWord/.build/checkouts/console.git-2755603573940926646/Sources/Console/Activity/ActivityIndicatorRenderer.swift /Users/nice/HelloWord/.build/checkouts/console.git-2755603573940926646/Sources/Console/Output/Console+Center.swift /Users/nice/HelloWord/.build/checkouts/console.git-2755603573940926646/Sources/Console/Output/ConsoleColor.swift /Users/nice/HelloWord/.build/checkouts/console.git-2755603573940926646/Sources/Console/Utilities/ConsoleError.swift /Users/nice/HelloWord/.build/checkouts/console.git-2755603573940926646/Sources/Console/Activity/ActivityIndicator.swift /Users/nice/HelloWord/.build/checkouts/console.git-2755603573940926646/Sources/Console/Utilities/Exports.swift /Users/nice/HelloWord/.build/checkouts/console.git-2755603573940926646/Sources/Console/Output/Console+Wait.swift /Users/nice/HelloWord/.build/checkouts/console.git-2755603573940926646/Sources/Console/Output/ConsoleTextFragment.swift /Users/nice/HelloWord/.build/checkouts/console.git-2755603573940926646/Sources/Console/Input/Console+Input.swift /Users/nice/HelloWord/.build/checkouts/console.git-2755603573940926646/Sources/Console/Output/Console+Output.swift /Users/nice/HelloWord/.build/checkouts/console.git-2755603573940926646/Sources/Console/Output/ConsoleText.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/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/NIO.swiftmodule /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/Async.swiftmodule /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/Service.swiftmodule /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/Core.swiftmodule /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/Logging.swiftmodule /Users/nice/HelloWord/.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/nice/HelloWord/.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/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/NIOConcurrencyHelpers.swiftmodule /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/Bits.swiftmodule /Users/nice/HelloWord/.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/nice/HelloWord/.build/checkouts/swift-nio.git-5005363973595484456/Sources/CNIOAtomics/include/cpp_magic.h /Users/nice/HelloWord/.build/checkouts/swift-nio.git-5005363973595484456/Sources/CNIODarwin/include/c_nio_darwin.h /Users/nice/HelloWord/.build/checkouts/swift-nio.git-5005363973595484456/Sources/CNIOAtomics/include/c-atomics.h /Users/nice/HelloWord/.build/checkouts/swift-nio.git-5005363973595484456/Sources/CNIOLinux/include/c_nio_linux.h /Users/nice/HelloWord/.build/checkouts/swift-nio-zlib-support.git--6556802241718767980/module.modulemap /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/CNIOSHA1.build/module.modulemap /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/CNIOOpenSSL.build/module.modulemap /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/CCryptoOpenSSL.build/module.modulemap /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/CNIOZlib.build/module.modulemap /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/CNIODarwin.build/module.modulemap /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/CNIOHTTPParser.build/module.modulemap /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/CNIOAtomics.build/module.modulemap /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/CNIOLinux.build/module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/ApplicationServices.framework/Headers/ApplicationServices.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Security.framework/Headers/Security.apinotes /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/Console.build/ConsoleTextFragment~partial.swiftdoc : /Users/nice/HelloWord/.build/checkouts/console.git-2755603573940926646/Sources/Console/Terminal/ANSI.swift /Users/nice/HelloWord/.build/checkouts/console.git-2755603573940926646/Sources/Console/Deprecated.swift /Users/nice/HelloWord/.build/checkouts/console.git-2755603573940926646/Sources/Console/Console.swift /Users/nice/HelloWord/.build/checkouts/console.git-2755603573940926646/Sources/Console/Output/ConsoleStyle.swift /Users/nice/HelloWord/.build/checkouts/console.git-2755603573940926646/Sources/Console/Input/Console+Choose.swift /Users/nice/HelloWord/.build/checkouts/console.git-2755603573940926646/Sources/Console/Activity/ActivityIndicatorState.swift /Users/nice/HelloWord/.build/checkouts/console.git-2755603573940926646/Sources/Console/Input/Console+Ask.swift /Users/nice/HelloWord/.build/checkouts/console.git-2755603573940926646/Sources/Console/Terminal/Terminal.swift /Users/nice/HelloWord/.build/checkouts/console.git-2755603573940926646/Sources/Console/Clear/Console+Ephemeral.swift /Users/nice/HelloWord/.build/checkouts/console.git-2755603573940926646/Sources/Console/Input/Console+Confirm.swift /Users/nice/HelloWord/.build/checkouts/console.git-2755603573940926646/Sources/Console/Activity/LoadingBar.swift /Users/nice/HelloWord/.build/checkouts/console.git-2755603573940926646/Sources/Console/Activity/ProgressBar.swift /Users/nice/HelloWord/.build/checkouts/console.git-2755603573940926646/Sources/Console/Activity/ActivityBar.swift /Users/nice/HelloWord/.build/checkouts/console.git-2755603573940926646/Sources/Console/Clear/Console+Clear.swift /Users/nice/HelloWord/.build/checkouts/console.git-2755603573940926646/Sources/Console/Clear/ConsoleClear.swift /Users/nice/HelloWord/.build/checkouts/console.git-2755603573940926646/Sources/Console/Utilities/ConsoleLogger.swift /Users/nice/HelloWord/.build/checkouts/console.git-2755603573940926646/Sources/Console/Activity/ActivityIndicatorRenderer.swift /Users/nice/HelloWord/.build/checkouts/console.git-2755603573940926646/Sources/Console/Output/Console+Center.swift /Users/nice/HelloWord/.build/checkouts/console.git-2755603573940926646/Sources/Console/Output/ConsoleColor.swift /Users/nice/HelloWord/.build/checkouts/console.git-2755603573940926646/Sources/Console/Utilities/ConsoleError.swift /Users/nice/HelloWord/.build/checkouts/console.git-2755603573940926646/Sources/Console/Activity/ActivityIndicator.swift /Users/nice/HelloWord/.build/checkouts/console.git-2755603573940926646/Sources/Console/Utilities/Exports.swift /Users/nice/HelloWord/.build/checkouts/console.git-2755603573940926646/Sources/Console/Output/Console+Wait.swift /Users/nice/HelloWord/.build/checkouts/console.git-2755603573940926646/Sources/Console/Output/ConsoleTextFragment.swift /Users/nice/HelloWord/.build/checkouts/console.git-2755603573940926646/Sources/Console/Input/Console+Input.swift /Users/nice/HelloWord/.build/checkouts/console.git-2755603573940926646/Sources/Console/Output/Console+Output.swift /Users/nice/HelloWord/.build/checkouts/console.git-2755603573940926646/Sources/Console/Output/ConsoleText.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/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/NIO.swiftmodule /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/Async.swiftmodule /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/Service.swiftmodule /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/Core.swiftmodule /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/Logging.swiftmodule /Users/nice/HelloWord/.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/nice/HelloWord/.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/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/NIOConcurrencyHelpers.swiftmodule /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/Bits.swiftmodule /Users/nice/HelloWord/.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/nice/HelloWord/.build/checkouts/swift-nio.git-5005363973595484456/Sources/CNIOAtomics/include/cpp_magic.h /Users/nice/HelloWord/.build/checkouts/swift-nio.git-5005363973595484456/Sources/CNIODarwin/include/c_nio_darwin.h /Users/nice/HelloWord/.build/checkouts/swift-nio.git-5005363973595484456/Sources/CNIOAtomics/include/c-atomics.h /Users/nice/HelloWord/.build/checkouts/swift-nio.git-5005363973595484456/Sources/CNIOLinux/include/c_nio_linux.h /Users/nice/HelloWord/.build/checkouts/swift-nio-zlib-support.git--6556802241718767980/module.modulemap /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/CNIOSHA1.build/module.modulemap /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/CNIOOpenSSL.build/module.modulemap /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/CCryptoOpenSSL.build/module.modulemap /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/CNIOZlib.build/module.modulemap /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/CNIODarwin.build/module.modulemap /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/CNIOHTTPParser.build/module.modulemap /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/CNIOAtomics.build/module.modulemap /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/CNIOLinux.build/module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/ApplicationServices.framework/Headers/ApplicationServices.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Security.framework/Headers/Security.apinotes
D
/** BSON serialization and value handling. Copyright: © 2012 RejectedSoftware e.K. License: Subject to the terms of the MIT license, as written in the included LICENSE.txt file. Authors: Sönke Ludwig */ module vibe.data.bson; public import vibe.data.json; import vibe.core.log; import vibe.data.utils; import std.algorithm; import std.array; import std.base64; import std.bitmanip; import std.conv; import std.datetime; import std.exception; import std.range; import std.traits; alias immutable(ubyte)[] bdata_t; /** Represents a BSON value. */ struct Bson { /// Represents the type of a BSON value enum Type : ubyte { /// End marker - should never occur explicitly End = 0x00, /// A 64-bit floating point value Double = 0x01, /// A UTF-8 string String = 0x02, /// An object aka. dictionary of string to Bson Object = 0x03, /// An array of BSON values Array = 0x04, /// Raw binary data (ubyte[]) BinData = 0x05, /// Deprecated Undefined = 0x06, /// BSON Object ID (96-bit) ObjectID = 0x07, /// Boolean value Bool = 0x08, /// Date value (UTC) Date = 0x09, /// Null value Null = 0x0A, /// Regular expression Regex = 0x0B, /// Deprecated DBRef = 0x0C, /// JaveScript code Code = 0x0D, /// Symbol/variable name Symbol = 0x0E, /// JavaScript code with scope CodeWScope = 0x0F, /// 32-bit integer Int = 0x10, /// Timestamp value Timestamp = 0x11, /// 64-bit integer Long = 0x12, /// Internal value MinKey = 0xff, /// Internal value MaxKey = 0x7f } /// Returns a new, empty Bson value of type Object. static @property Bson EmptyObject() { return Bson(cast(Bson[string])null); } /// Returns a new, empty Bson value of type Object. static @property Bson EmptyArray() { return Bson(cast(Bson[])null); } private { Type m_type = Type.Undefined; bdata_t m_data; } /** Creates a new BSON value using raw data. A slice of the first bytes of 'data' is stored, containg the data related to the value. An exception is thrown if 'data' is too short. */ this(Type type, bdata_t data) { m_type = type; m_data = data; final switch(type){ case Type.End: m_data = null; break; case Type.Double: m_data = m_data[0 .. 8]; break; case Type.String: m_data = m_data[0 .. 4 + fromBsonData!int(m_data)]; break; case Type.Object: m_data = m_data[0 .. fromBsonData!int(m_data)]; break; case Type.Array: m_data = m_data[0 .. fromBsonData!int(m_data)]; break; case Type.BinData: m_data = m_data[0 .. 5 + fromBsonData!int(m_data)]; break; case Type.Undefined: m_data = null; break; case Type.ObjectID: m_data = m_data[0 .. 12]; break; case Type.Bool: m_data = m_data[0 .. 1]; break; case Type.Date: m_data = m_data[0 .. 8]; break; case Type.Null: m_data = null; break; case Type.Regex: auto tmp = m_data; tmp.skipCString(); tmp.skipCString(); m_data = m_data[0 .. $ - tmp.length]; break; case Type.DBRef: m_data = m_data[0 .. 0]; assert(false, "Not implemented."); case Type.Code: m_data = m_data[0 .. 4 + fromBsonData!int(m_data)]; break; case Type.Symbol: m_data = m_data[0 .. 4 + fromBsonData!int(m_data)]; break; case Type.CodeWScope: m_data = m_data[0 .. 0]; assert(false, "Not implemented."); case Type.Int: m_data = m_data[0 .. 4]; break; case Type.Timestamp: m_data = m_data[0 .. 8]; break; case Type.Long: m_data = m_data[0 .. 8]; break; case Type.MinKey: m_data = null; break; case Type.MaxKey: m_data = null; break; } } /** Initializes a new BSON value from the given D type. */ this(double value) { opAssign(value); } /// ditto this(string value, Type type = Type.String) { assert(type == Type.String || type == Type.Code || type == Type.Symbol); opAssign(value); m_type = type; } /// ditto this(in Bson[string] value) { opAssign(value); } /// ditto this(in Bson[] value) { opAssign(value); } /// ditto this(in BsonBinData value) { opAssign(value); } /// ditto this(in BsonObjectID value) { opAssign(value); } /// ditto this(bool value) { opAssign(value); } /// ditto this(in BsonDate value) { opAssign(value); } /// ditto this(typeof(null)) { opAssign(null); } /// ditto this(in BsonRegex value) { opAssign(value); } /// ditto this(int value) { opAssign(value); } /// ditto this(in BsonTimestamp value) { opAssign(value); } /// ditto this(long value) { opAssign(value); } /// ditto this(in Json value) { opAssign(value); } /** Assigns a D type to a BSON value. */ void opAssign(in Bson other) { m_data = other.m_data; m_type = other.m_type; } /// ditto void opAssign(double value) { m_data = toBsonData(value).idup; m_type = Type.Double; } /// ditto void opAssign(string value) { auto app = appender!bdata_t(); app.put(toBsonData(cast(int)value.length+1)); app.put(cast(bdata_t)value); app.put(cast(ubyte)0); m_data = app.data; m_type = Type.String; } /// ditto void opAssign(in Bson[string] value) { auto app = appender!bdata_t(); foreach( k, ref v; value ){ app.put(cast(ubyte)v.type); putCString(app, k); app.put(v.data); } auto dapp = appender!bdata_t(); dapp.put(toBsonData(cast(int)app.data.length+5)); dapp.put(app.data); dapp.put(cast(ubyte)0); m_data = dapp.data; m_type = Type.Object; } /// ditto void opAssign(in Bson[] value) { auto app = appender!bdata_t(); foreach( i, ref v; value ){ app.put(v.type); putCString(app, to!string(i)); app.put(v.data); } auto dapp = appender!bdata_t(); dapp.put(toBsonData(cast(int)app.data.length+5)); dapp.put(app.data); dapp.put(cast(ubyte)0); m_data = dapp.data; m_type = Type.Array; } /// ditto void opAssign(in BsonBinData value) { auto app = appender!bdata_t(); app.put(toBsonData(cast(int)value.rawData.length)); app.put(value.type); app.put(value.rawData); m_data = app.data; m_type = Type.BinData; } /// ditto void opAssign(in BsonObjectID value) { m_data = value.m_bytes.idup; m_type = Type.ObjectID; } /// ditto void opAssign(bool value) { m_data = [value ? 0x01 : 0x00]; m_type = Type.Bool; } /// ditto void opAssign(in BsonDate value) { m_data = toBsonData(value.m_time).idup; m_type = Type.Date; } /// ditto void opAssign(typeof(null)) { m_data = null; m_type = Type.Null; } /// ditto void opAssign(in BsonRegex value) { auto app = appender!bdata_t(); putCString(app, value.expression); putCString(app, value.options); m_data = app.data; m_type = type.Regex; } /// ditto void opAssign(int value) { m_data = toBsonData(value).idup; m_type = Type.Int; } /// ditto void opAssign(in BsonTimestamp value) { m_data = toBsonData(value.m_time).idup; m_type = Type.Timestamp; } /// ditto void opAssign(long value) { m_data = toBsonData(value).idup; m_type = Type.Long; } /// ditto void opAssign(in Json value) { auto app = appender!bdata_t(); m_type = writeBson(app, value); m_data = app.data; } /** Returns the BSON type of this value. */ @property Type type() const { return m_type; } bool isNull() const { return m_type == Type.Null; } /** Returns the raw data representing this BSON value (not including the field name and type). */ @property bdata_t data() const { return m_data; } /** Converts the BSON value to a D value. If the BSON type of the value does not match the D type, an exception is thrown. */ T opCast(T)() const { return get!T(); } /// ditto @property T get(T)() const { static if( is(T == double) ){ checkType(Type.Double); return fromBsonData!double(m_data); } else static if( is(T == string) ){ checkType(Type.String, Type.Code, Type.Symbol); return cast(string)m_data[4 .. 4+fromBsonData!int(m_data)-1]; } else static if( is(Unqual!T == Bson[string]) || is(Unqual!T == const(Bson)[string]) ){ checkType(Type.Object); Bson[string] ret; auto d = m_data[4 .. $]; while( d.length > 0 ){ auto tp = cast(Type)d[0]; if( tp == Type.End ) break; d = d[1 .. $]; auto key = skipCString(d); auto value = Bson(tp, d); d = d[value.data.length .. $]; ret[key] = value; } return cast(T)ret; } else static if( is(Unqual!T == Bson[]) || is(Unqual!T == const(Bson)[]) ){ checkType(Type.Array); Bson[] ret; auto d = m_data[4 .. $]; while( d.length > 0 ){ auto tp = cast(Type)d[0]; if( tp == Type.End ) break; auto key = skipCString(d); // should be '0', '1', ... auto value = Bson(tp, d); d = d[value.data.length .. $]; ret ~= value; } return cast(T)ret; } else static if( is(T == BsonBinData) ){ checkType(Type.BinData); auto size = fromBsonData!int(m_data); auto type = cast(BsonBinData.Type)m_data[4]; return BsonBinData(type, m_data[5 .. 5+size]); } else static if( is(T == BsonObjectID) ){ checkType(Type.ObjectID); return BsonObjectID(m_data[0 .. 12]); } else static if( is(T == bool) ){ checkType(Type.Bool); return m_data[0] != 0; } else static if( is(T == BsonDate) ){ checkType(Type.Date); return BsonDate(fromBsonData!long(m_data)); } else static if( is(T == BsonRegex) ){ checkType(Type.Regex); auto d = m_data; auto expr = skipCString(d); auto options = skipCString(d); return BsonRegex(expr, options); } else static if( is(T == int) ){ checkType(Type.Int); return fromBsonData!int(m_data); } else static if( is(T == BsonTimestamp) ){ checkType(Type.Timestamp); return BsonTimestamp(fromBsonData!long(m_data)); } else static if( is(T == long) ){ checkType(Type.Long); return fromBsonData!long(m_data); } else static if( is(T == Json) ){ pragma(msg, "Bson.get!Json() and Bson.opCast!Json() will soon be removed. Please use Bson.toJson() instead."); return this.toJson(); } else static assert(false, "Cannot cast "~typeof(this).stringof~" to '"~T.stringof~"'."); } /** Returns the native type for this BSON if it matches the current runtime type. If the runtime type does not match the given native type, the 'def' parameter is returned instead. */ inout(T) opt(T)(T def = T.init) inout { if( isNull() ) return def; try def = cast(T)this; catch( Exception e ) {} return def; } /** Returns the length of a BSON value of type String, Array, Object or BinData. */ @property size_t length() const { switch( m_type ){ default: enforce(false, "Bson objects of type "~to!string(m_type)~" do not have a length field."); break; case Type.String, Type.Code, Type.Symbol: return (cast(string)this).length; case Type.Array: return (cast(const(Bson)[])this).length; // TODO: optimize! case Type.Object: return (cast(const(Bson)[string])this).length; // TODO: optimize! case Type.BinData: assert(false); //return (cast(BsonBinData)this).length; break; } assert(false); } /** Converts a given JSON value to the corresponding BSON value. */ static Bson fromJson(in Json value) { auto app = appender!bdata_t(); auto tp = writeBson(app, value); return Bson(tp, app.data); } /** Converts a BSON value to a JSON value. All BSON types that cannot be exactly represented as JSON, will be converted to a string. */ Json toJson() const { switch( this.type ){ default: assert(false); case Bson.Type.Double: return Json(get!double()); case Bson.Type.String: return Json(get!string()); case Bson.Type.Object: Json[string] ret; foreach( k, v; get!(Bson[string])() ) ret[k] = v.toJson(); return Json(ret); case Bson.Type.Array: auto ret = new Json[this.length]; foreach( i, v; get!(Bson[])() ) ret[i] = v.toJson(); return Json(ret); case Bson.Type.BinData: return Json(cast(string)Base64.encode(get!BsonBinData.rawData)); case Bson.Type.ObjectID: return Json(get!BsonObjectID().toString()); case Bson.Type.Bool: return Json(get!bool()); case Bson.Type.Date: return Json(get!BsonDate.toString()); case Bson.Type.Null: return Json(null); case Bson.Type.Regex: assert(false, "TODO"); case Bson.Type.DBRef: assert(false, "TODO"); case Bson.Type.Code: return Json(get!string()); case Bson.Type.Symbol: return Json(get!string()); case Bson.Type.CodeWScope: assert(false, "TODO"); case Bson.Type.Int: return Json(get!int()); case Bson.Type.Timestamp: return Json(get!BsonTimestamp().m_time); case Bson.Type.Long: return Json(get!long()); } } /** Allows accessing fields of a BSON object using []. Returns a null value if the specified field does not exist. */ inout(Bson) opIndex(string idx) inout { foreach( string key, v; this ) if( key == idx ) return v; return Bson(null); } /// ditto void opIndexAssign(T)(T value, string idx){ auto newcont = appender!bdata_t(); checkType(Type.Object); auto d = m_data[4 .. $]; while( d.length > 0 ){ auto tp = cast(Type)d[0]; if( tp == Type.End ) break; d = d[1 .. $]; auto key = skipCString(d); auto val = Bson(tp, d); d = d[val.data.length .. $]; if( key != idx ){ // copy to new array newcont.put(cast(ubyte)tp); putCString(newcont, key); newcont.put(val.data); } } static if( is(T == Bson) ) alias value bval; else auto bval = Bson(value); newcont.put(cast(ubyte)bval.type); putCString(newcont, idx); newcont.put(bval.data); auto newdata = appender!bdata_t(); newdata.put(toBsonData(cast(uint)(newcont.data.length + 5))); newdata.put(newcont.data); newdata.put(cast(ubyte)0); m_data = newdata.data; } /** Allows index based access of a BSON array value. Returns a null value if the index is out of bounds. */ inout(Bson) opIndex(size_t idx) inout { foreach( size_t i, v; this ) if( i == idx ) return v; return Bson(null); } /** Allows foreach iterating over BSON objects and arrays. Note that although D requires to provide a 'ref' argument for opApply, in-place editing of the array/object fields is not possible. Any modification attempty will work on a temporary, even if the loop variable is declared 'ref'. */ int opApply(int delegate(ref Bson obj) del) const { checkType(Type.Array, Type.Object); if( m_type == Type.Array ){ foreach( size_t idx, v; this ) if( auto ret = del(v) ) return ret; return 0; } else { foreach( string idx, v; this ) if( auto ret = del(v) ) return ret; return 0; } } /// ditto int opApply(int delegate(ref size_t idx, ref Bson obj) del) const { checkType(Type.Array); auto d = m_data[4 .. $]; size_t i = 0; while( d.length > 0 ){ auto tp = cast(Type)d[0]; if( tp == Type.End ) break; d = d[1 .. $]; skipCString(d); auto value = Bson(tp, d); d = d[value.data.length .. $]; auto icopy = i; if( auto ret = del(icopy, value) ) return ret; i++; } return 0; } /// ditto int opApply(int delegate(ref string idx, ref Bson obj) del) const { checkType(Type.Object); auto d = m_data[4 .. $]; while( d.length > 0 ){ auto tp = cast(Type)d[0]; if( tp == Type.End ) break; d = d[1 .. $]; auto key = skipCString(d); auto value = Bson(tp, d); d = d[value.data.length .. $]; if( auto ret = del(key, value) ) return ret; } return 0; } /** Allows to access existing fields of a JSON object using dot syntax. Returns a null value for non-existent fields. */ @property inout(Bson) opDispatch(string prop)() inout { return opIndex(prop); } /// ditto @property void opDispatch(string prop, T)(T val) { opIndexAssign(val, prop); } /// bool opEquals(ref const Bson other) const { if( m_type != other.m_type ) return false; return m_data == other.m_data; } /// ditto bool opEquals(const Bson other) const { if( m_type != other.m_type ) return false; return m_data == other.m_data; } private void checkType(in Type[] valid_types...) const { foreach( t; valid_types ) if( m_type == t ) return; throw new Exception("BSON value is type '"~to!string(m_type)~"', expected to be one of "~to!string(valid_types)); } } /** Represents a BSON binary data value (Bson.Type.BinData). */ struct BsonBinData { enum Type : ubyte { Generic = 0x00, Function = 0x01, BinaryOld = 0x02, UUID = 0x03, MD5 = 0x05, UserDefined = 0x80 } private { Type m_type; bdata_t m_data; } this(Type type, immutable(ubyte)[] data) { m_type = type; m_data = data; } @property Type type() const { return m_type; } @property bdata_t rawData() const { return m_data; } } /** Represents a BSON object id (Bson.Type.BinData). */ struct BsonObjectID { private { ubyte[12] m_bytes; static int ms_pid = -1; static uint ms_inc = 0; static uint MACHINE_ID = 0; } /** Constructs a new object ID from the given raw byte array. */ this( in ubyte[] bytes ){ assert(bytes.length == 12); m_bytes[] = bytes[]; } /** Creates an on object ID from a string in standard hexa-decimal form. */ static BsonObjectID fromString(string str) { assert(str.length == 24, "BSON Object ID string s must be 24 characters."); BsonObjectID ret = void; uint b = 0; foreach( i, ch; str ){ ubyte n; if( ch >= '0' && ch <= '9' ) n = cast(ubyte)(ch - '0'); else if( ch >= 'a' && ch <= 'f' ) n = cast(ubyte)(ch - 'a' + 10); else if( ch >= 'A' && ch <= 'F' ) n = cast(ubyte)(ch - 'F' + 10); else assert(false, "Not a valid hex string."); b <<= 4; b += n; if( i % 8 == 7 ){ auto j = i / 8; ret.m_bytes[j*4 .. (j+1)*4] = toBigEndianData(b)[]; b = 0; } } return ret; } /// ditto alias fromString fromHexString; /** Generates a unique object ID. */ static BsonObjectID generate() { import std.datetime; import std.process; import std.random; if( ms_pid == -1 ) ms_pid = getpid(); if( MACHINE_ID == 0 ) MACHINE_ID = uniform(0, 0xffffff); auto unixTime = Clock.currTime(UTC()).toUnixTime(); BsonObjectID ret = void; ret.m_bytes[0 .. 4] = toBigEndianData(cast(uint)unixTime)[]; ret.m_bytes[4 .. 7] = toBsonData(MACHINE_ID)[0 .. 3]; ret.m_bytes[7 .. 9] = toBsonData(cast(ushort)ms_pid)[]; ret.m_bytes[9 .. 12] = toBigEndianData(ms_inc++)[1 .. 4]; return ret; } /** Creates a pseudo object ID that matches the given date. This kind of ID can be useful to query a database for items in a certain date interval using their ID. This works using the property of standard BSON object IDs that they store their creation date as part of the ID. Note that this date part is only 32-bit wide and is limited to the same timespan as a 32-bit Unix timestamp. */ static BsonObjectID createDateID(in SysTime date) { BsonObjectID ret; ret.m_bytes[0 .. 4] = toBigEndianData(cast(uint)date.toUnixTime())[]; return ret; } /** Returns true for any non-zero ID. */ @property bool valid() const { foreach( b; m_bytes ) if( b != 0 ) return true; return false; } /** Extracts the time/date portion of the object ID. For IDs created using the standard generation algorithm or using createDateID this will return the associated time stamp. */ @property SysTime timeStamp() { ubyte[4] tm = m_bytes[0 .. 4]; return SysTime(unixTimeToStdTime(bigEndianToNative!uint(tm))); } /** Allows for relational comparison of different IDs. */ int opCmp(ref const BsonObjectID other) const { import core.stdc.string; return memcmp(m_bytes.ptr, other.m_bytes.ptr, m_bytes.length); } /** Converts the ID to its standard hexa-decimal string representation. */ string toString() const { enum hexdigits = "0123456789abcdef"; auto ret = new char[24]; foreach( i, b; m_bytes ){ ret[i*2+0] = hexdigits[(b >> 4) & 0x0F]; ret[i*2+1] = hexdigits[b & 0x0F]; } return cast(immutable)ret; } ubyte[] opCast() { return m_bytes; } } /** Represents a BSON date value (Bson.Type.Date). */ struct BsonDate { private long m_time; // milliseconds since UTC unix epoch this(in Date date) { this(SysTime(date)); } this(in DateTime date) { this(SysTime(date)); } this(long time){ m_time = time; } this(in SysTime time){ auto zero = unixTimeToStdTime(0); m_time = (time.stdTime() - zero) / 10_000L; } static BsonDate fromString(string iso_ext_string) { return BsonDate(SysTime.fromISOExtString(iso_ext_string)); } string toString() const { return toSysTime().toISOExtString(); } SysTime toSysTime() const { auto zero = unixTimeToStdTime(0); return SysTime(zero + m_time * 10_000L, UTC()); } bool opEquals(ref const BsonDate other) const { return m_time == other.m_time; } int opCmp(ref const BsonDate other) const { if( m_time == other.m_time ) return 0; if( m_time < other.m_time ) return -1; else return 1; } @property long value() const { return m_time; } @property void value(long v) { m_time = v; } } /** Represents a BSON timestamp value (Bson.Type.Timestamp) */ struct BsonTimestamp { private long m_time; this( long time ){ m_time = time; } } /** Represents a BSON regular expression value (Bson.Type.Regex). */ struct BsonRegex { private { string m_expr; string m_options; } this(string expr, string options) { m_expr = expr; m_options = options; } @property string expression() const { return m_expr; } @property string options() const { return m_options; } } /** Serializes the given value to BSON. The following types of values are supported: $(DL $(DT Bson) $(DD Used as-is) $(DT Json) $(DD Converted to BSON) $(DT BsonBinData) $(DD Converted to Bson.Type.BinData) $(DT BsonObjectID) $(DD Converted to Bson.Type.ObjectID) $(DT BsonDate) $(DD Converted to Bson.Type.Date) $(DT BsonTimestamp) $(DD Converted to Bson.Type.Timestamp) $(DT BsonRegex) $(DD Converted to Bson.Type.Regex) $(DT null) $(DD Converted to Bson.Type.Null) $(DT bool) $(DD Converted to Bson.Type.Bool) $(DT float, double) $(DD Converted to Bson.Type.Double) $(DT short, ushort, int, uint, long, ulong) $(DD Converted to Bson.Type.Long) $(DT string) $(DD Converted to Bson.Type.String) $(DT ubyte[]) $(DD Converted to Bson.Type.BinData) $(DT T[]) $(DD Converted to Bson.Type.Array) $(DT T[string]) $(DD Converted to Bson.Type.Object) $(DT struct) $(DD Converted to Bson.Type.Object) $(DT class) $(DD Converted to Bson.Type.Object or Bson.Type.Null) ) All entries of an array or an associative array, as well as all R/W properties and all 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: --- Bson toBson() const; static T fromBson(Bson src); 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. toBson overrides toJson). */ Bson serializeToBson(T)(T value) { alias Unqual!T Unqualified; static if( is(Unqualified == Bson) ) return value; else static if( is(Unqualified == Json) ) return Bson.fromJson(value); else static if( is(Unqualified == BsonBinData) ) return Bson(value); else static if( is(Unqualified == BsonObjectID) ) return Bson(value); else static if( is(Unqualified == BsonDate) ) return Bson(value); else static if( is(Unqualified == BsonTimestamp) ) return Bson(value); else static if( is(Unqualified == BsonRegex) ) return Bson(value); else static if( is(Unqualified == DateTime) ) return Bson(BsonDate(value)); else static if( is(Unqualified == SysTime) ) return Bson(BsonDate(value)); else static if( is(Unqualified == typeof(null)) ) return Bson(null); else static if( is(Unqualified == bool) ) return Bson(value); else static if( is(Unqualified == float) ) return Bson(cast(double)value); else static if( is(Unqualified == double) ) return Bson(value); else static if( is(Unqualified : int) ) return Bson(cast(int)value); else static if( is(Unqualified : long) ) return Bson(cast(long)value); else static if( is(Unqualified == string) ) return Bson(value); else static if( is(Unqualified : const(ubyte)[]) ) return Bson(BsonBinData(BsonBinData.Type.Generic, value.idup)); else static if( isArray!T ){ auto ret = new Bson[value.length]; foreach( i; 0 .. value.length ) ret[i] = serializeToBson(value[i]); return Bson(ret); } else static if( isAssociativeArray!T ){ Bson[string] ret; foreach( string key, value; value ) ret[key] = serializeToBson(value); return Bson(ret); } else static if( __traits(compiles, value = T.fromBson(value.toBson())) ){ return value.toBson(); } else static if( __traits(compiles, value = T.fromJson(value.toJson())) ){ return Bson.fromJson(value.toJson()); } else static if( __traits(compiles, value = T.fromString(value.toString())) ){ return Bson(value.toString()); } else static if( is(Unqualified == struct) ){ Bson[string] ret; foreach( m; __traits(allMembers, T) ){ static if( isRWField!(Unqualified, m) ){ auto mv = __traits(getMember, value, m); ret[underscoreStrip(m)] = serializeToBson(mv); } } return Bson(ret); } else static if( is(Unqualified == class) ){ if( value is null ) return Bson(null); Bson[string] ret; foreach( m; __traits(allMembers, T) ){ static if( isRWField!(Unqualified, m) ){ auto mv = __traits(getMember, value, m); ret[underscoreStrip(m)] = serializeToBson(mv); } } return Bson(ret); } else { static assert(false, "Unsupported type '"~T.stringof~"' for BSON serialization."); } } /** Deserializes a BSON value into the destination variable. The same types as for serializeToBson() are supported and handled inversely. */ void deserializeBson(T)(ref T dst, Bson src) { dst = deserializeBson!T(src); } /// ditto T deserializeBson(T)(Bson src) { static if( is(T == Bson) ) return src; else static if( is(T == Json) ) return src.toJson(); else static if( is(T == BsonBinData) ) return cast(T)src; else static if( is(T == BsonObjectID) ) return cast(T)src; else static if( is(T == BsonDate) ) return cast(T)src; else static if( is(T == BsonTimestamp) ) return cast(T)src; else static if( is(T == BsonRegex) ) return cast(T)src; else static if( is(T == SysTime) ) return src.get!BsonDate().toSysTime(); else static if( is(T == DateTime) ) return cast(DateTime)src.get!BsonDate().toSysTime(); else static if( is(T == typeof(null)) ){ return null; } else static if( is(T == bool) ) return cast(bool)src; else static if( is(T == float) ) return cast(double)src; else static if( is(T == double) ) return cast(double)src; else static if( is(T : int) ) return cast(T)cast(int)src; else static if( is(T : long) ) return cast(T)cast(long)src; else static if( is(T == string) ) return cast(string)src; else static if( is(T : const(ubyte)[]) ) return cast(T)src.get!BsonBinData.rawData.dup; else static if( isArray!T ){ alias typeof(T.init[0]) TV; auto ret = new Unqual!TV[src.length]; foreach( size_t i, v; cast(Bson[])src ) ret[i] = deserializeBson!(Unqual!TV)(v); return ret; } else static if( isAssociativeArray!T ){ alias typeof(T.init.values[0]) TV; Unqual!TV[string] dst; foreach( string key, value; cast(Bson[string])src ) dst[key] = deserializeBson!(Unqual!TV)(value); return dst; } else static if( __traits(compiles, { T dst; dst = T.fromBson(dst.toBson()); }) ){ return T.fromBson(src); } else static if( __traits(compiles, { T dst; dst = T.fromJson(dst.toJson()); }) ){ return T.fromJson(src.toJson()); } else static if( __traits(compiles, { T dst; dst = T.fromString(dst.toString()); }) ){ return T.fromString(cast(string)src); } else static if( is(T == struct) ){ T dst; foreach( m; __traits(allMembers, T) ){ static if( isRWPlainField!(T, m) || isRWField!(T, m) ){ alias typeof(__traits(getMember, dst, m)) TM; debug enforce(!src[underscoreStrip(m)].isNull() || is(TM == class) || isPointer!TM || is(TM == typeof(null)), "Missing field '"~underscoreStrip(m)~"'."); __traits(getMember, dst, m) = deserializeBson!TM(src[underscoreStrip(m)]); } } return dst; } else static if( is(T == class) ){ if (src.isNull()) return null; auto dst = new T; foreach( m; __traits(allMembers, T) ){ static if( isRWPlainField!(T, m) || isRWField!(T, m) ){ alias typeof(__traits(getMember, dst, m)) TM; __traits(getMember, dst, m) = deserializeBson!TM(src[underscoreStrip(m)]); } } return dst; } else static if( isPointer!T ){ if( src.type == Bson.Type.Null ) return null; alias typeof(*T.init) TD; dst = new TD; *dst = deserializeBson!TD(src); return dst; } else { static assert(false, "Unsupported type '"~T.stringof~"' for BSON serialization."); } } unittest { import std.stdio; static struct S { float a; double b; bool c; int d; string e; byte f; ubyte g; long h; ulong i; float[] j; } immutable S t = {1.5, -3.0, true, int.min, "Test", -128, 255, long.min, ulong.max, [1.1, 1.2, 1.3]}; S u; deserializeBson(u, serializeToBson(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); } unittest { static class C { 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; deserializeBson(d, serializeToBson(c)); assert(c.a == d.a); assert(c.b == d.b); } private Bson.Type writeBson(R)(ref R dst, in Json value) if( isOutputRange!(R, ubyte) ) { static immutable uint[] JsonIDToBsonID = [ Bson.Type.Undefined, Bson.Type.Null, Bson.Type.Bool, Bson.Type.Int, Bson.Type.Double, Bson.Type.String, Bson.Type.Array, Bson.Type.Object ]; final switch(value.type){ case Json.Type.Undefined: return Bson.Type.Undefined; case Json.Type.Null: return Bson.Type.Null; case Json.Type.Bool: dst.put(cast(ubyte)(cast(bool)value ? 0x00 : 0x01)); return Bson.Type.Bool; case Json.Type.Int: auto v = cast(long)value; if( v >= int.min && v <= int.max ){ dst.put(toBsonData(cast(int)v)); return Bson.Type.Int; } dst.put(toBsonData(v)); return Bson.Type.Long; case Json.Type.Float: dst.put(toBsonData(cast(double)value)); return Bson.Type.Double; case Json.Type.String: dst.put(toBsonData(cast(uint)value.length+1)); dst.put(cast(bdata_t)cast(string)value); dst.put(cast(ubyte)0); return Bson.Type.String; case Json.Type.Array: auto app = appender!bdata_t(); foreach( size_t i, ref const Json v; value ){ app.put(cast(ubyte)(JsonIDToBsonID[v.type])); putCString(app, to!string(i)); writeBson(app, v); } dst.put(toBsonData(cast(int)(app.data.length + int.sizeof + 1))); dst.put(app.data); dst.put(cast(ubyte)0); return Bson.Type.Array; case Json.Type.Object: auto app = appender!bdata_t(); foreach( string k, ref const Json v; value ){ app.put(cast(ubyte)(JsonIDToBsonID[v.type])); putCString(app, k); writeBson(app, v); } dst.put(toBsonData(cast(int)(app.data.length + int.sizeof + 1))); dst.put(app.data); dst.put(cast(ubyte)0); return Bson.Type.Object; } } unittest { Json jsvalue = parseJsonString("{\"key\" : \"Value\"}"); assert(serializeToBson(jsvalue).toJson() == jsvalue); jsvalue = parseJsonString("{\"key\" : [{\"key\" : \"Value\"}, {\"key2\" : \"Value2\"}] }"); assert(serializeToBson(jsvalue).toJson() == jsvalue); jsvalue = parseJsonString("[ 1 , 2 , 3]"); assert(serializeToBson(jsvalue).toJson() == jsvalue); } private string skipCString(ref bdata_t data) { auto idx = data.countUntil(0); enforce(idx >= 0, "Unterminated BSON C-string."); auto ret = data[0 .. idx]; data = data[idx+1 .. $]; return cast(string)ret; } private void putCString(R)(R dst, string str) { dst.put(cast(bdata_t)str); dst.put(cast(ubyte)0); } ubyte[] toBsonData(T)(T v) { /*static T tmp; tmp = nativeToLittleEndian(v); return cast(ubyte[])((&tmp)[0 .. 1]);*/ static ubyte[T.sizeof] ret; ret = nativeToLittleEndian(v); return ret; } T fromBsonData(T)(in ubyte[] v) { assert(v.length >= T.sizeof); //return (cast(T[])v[0 .. T.sizeof])[0]; ubyte[T.sizeof] vu = v[0 .. T.sizeof]; return littleEndianToNative!T(vu); } ubyte[] toBigEndianData(T)(T v) { /*static T tmp; tmp = nativeToBigEndian(v); return cast(ubyte[])((&tmp)[0 .. 1]);*/ static ubyte[T.sizeof] ret; ret = nativeToBigEndian(v); return ret; } private string underscoreStrip(string field_name) pure { if( field_name.length < 1 || field_name[$-1] != '_' ) return field_name; else return field_name[0 .. $-1]; }
D
/Users/andrew/Documents/xcodeProjects/nanodegeree/meme/Build/Intermediates/meme.build/Debug-iphoneos/meme.build/Objects-normal/armv7/MemeModel.o : /Users/andrew/Documents/xcodeProjects/nanodegeree/meme/meme/ViewController.swift /Users/andrew/Documents/xcodeProjects/nanodegeree/meme/meme/MemeModel.swift /Users/andrew/Documents/xcodeProjects/nanodegeree/meme/meme/MemeCollectionViewController.swift /Users/andrew/Documents/xcodeProjects/nanodegeree/meme/meme/AppDelegate.swift /Users/andrew/Documents/xcodeProjects/nanodegeree/meme/meme/MemeTableViewController.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/32/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/32/UIKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/32/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/32/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/32/Dispatch.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/32/ObjectiveC.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/32/CoreGraphics.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/32/Security.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/32/CoreImage.swiftmodule /Users/andrew/Documents/xcodeProjects/nanodegeree/meme/Build/Intermediates/meme.build/Debug-iphoneos/meme.build/Objects-normal/armv7/MemeModel~partial.swiftmodule : /Users/andrew/Documents/xcodeProjects/nanodegeree/meme/meme/ViewController.swift /Users/andrew/Documents/xcodeProjects/nanodegeree/meme/meme/MemeModel.swift /Users/andrew/Documents/xcodeProjects/nanodegeree/meme/meme/MemeCollectionViewController.swift /Users/andrew/Documents/xcodeProjects/nanodegeree/meme/meme/AppDelegate.swift /Users/andrew/Documents/xcodeProjects/nanodegeree/meme/meme/MemeTableViewController.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/32/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/32/UIKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/32/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/32/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/32/Dispatch.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/32/ObjectiveC.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/32/CoreGraphics.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/32/Security.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/32/CoreImage.swiftmodule /Users/andrew/Documents/xcodeProjects/nanodegeree/meme/Build/Intermediates/meme.build/Debug-iphoneos/meme.build/Objects-normal/armv7/MemeModel~partial.swiftdoc : /Users/andrew/Documents/xcodeProjects/nanodegeree/meme/meme/ViewController.swift /Users/andrew/Documents/xcodeProjects/nanodegeree/meme/meme/MemeModel.swift /Users/andrew/Documents/xcodeProjects/nanodegeree/meme/meme/MemeCollectionViewController.swift /Users/andrew/Documents/xcodeProjects/nanodegeree/meme/meme/AppDelegate.swift /Users/andrew/Documents/xcodeProjects/nanodegeree/meme/meme/MemeTableViewController.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/32/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/32/UIKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/32/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/32/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/32/Dispatch.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/32/ObjectiveC.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/32/CoreGraphics.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/32/Security.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/32/CoreImage.swiftmodule
D
/Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/Fluent.build/Utilities/Exports.swift.o : /Users/nice/HelloWord/.build/checkouts/fluent.git-6829944210039798771/Sources/Fluent/Model/ID.swift /Users/nice/HelloWord/.build/checkouts/fluent.git-6829944210039798771/Sources/Fluent/Schema/SchemaSupporting+CRUD.swift /Users/nice/HelloWord/.build/checkouts/fluent.git-6829944210039798771/Sources/Fluent/Model/Model+CRUD.swift /Users/nice/HelloWord/.build/checkouts/fluent.git-6829944210039798771/Sources/Fluent/QueryBuilder/QueryBuilder+CRUD.swift /Users/nice/HelloWord/.build/checkouts/fluent.git-6829944210039798771/Sources/Fluent/Utilities/Deprecated.swift /Users/nice/HelloWord/.build/checkouts/fluent.git-6829944210039798771/Sources/Fluent/Service/MigrateCommand.swift /Users/nice/HelloWord/.build/checkouts/fluent.git-6829944210039798771/Sources/Fluent/Service/RevertCommand.swift /Users/nice/HelloWord/.build/checkouts/fluent.git-6829944210039798771/Sources/Fluent/QueryBuilder/QueryBuilder+Decode.swift /Users/nice/HelloWord/.build/checkouts/fluent.git-6829944210039798771/Sources/Fluent/QueryBuilder/QueryBuilder+Range.swift /Users/nice/HelloWord/.build/checkouts/fluent.git-6829944210039798771/Sources/Fluent/Model/SoftDeletable.swift /Users/nice/HelloWord/.build/checkouts/fluent.git-6829944210039798771/Sources/Fluent/QueryBuilder/QueryBuilder+Aggregate.swift /Users/nice/HelloWord/.build/checkouts/fluent.git-6829944210039798771/Sources/Fluent/Migration/MigrationConfig.swift /Users/nice/HelloWord/.build/checkouts/fluent.git-6829944210039798771/Sources/Fluent/Schema/SchemaSupporting.swift /Users/nice/HelloWord/.build/checkouts/fluent.git-6829944210039798771/Sources/Fluent/Join/JoinSupporting.swift /Users/nice/HelloWord/.build/checkouts/fluent.git-6829944210039798771/Sources/Fluent/Migration/MigrationSupporting.swift /Users/nice/HelloWord/.build/checkouts/fluent.git-6829944210039798771/Sources/Fluent/Transaction/TransactionSupporting.swift /Users/nice/HelloWord/.build/checkouts/fluent.git-6829944210039798771/Sources/Fluent/Query/QuerySupporting.swift /Users/nice/HelloWord/.build/checkouts/fluent.git-6829944210039798771/Sources/Fluent/Migration/MigrationLog.swift /Users/nice/HelloWord/.build/checkouts/fluent.git-6829944210039798771/Sources/Fluent/QueryBuilder/QueryBuilder+Model.swift /Users/nice/HelloWord/.build/checkouts/fluent.git-6829944210039798771/Sources/Fluent/Model/Model.swift /Users/nice/HelloWord/.build/checkouts/fluent.git-6829944210039798771/Sources/Fluent/Model/AnyModel.swift /Users/nice/HelloWord/.build/checkouts/fluent.git-6829944210039798771/Sources/Fluent/Relations/Children.swift /Users/nice/HelloWord/.build/checkouts/fluent.git-6829944210039798771/Sources/Fluent/Join/QueryBuilder+Join.swift /Users/nice/HelloWord/.build/checkouts/fluent.git-6829944210039798771/Sources/Fluent/Schema/SchemaSupporting+Migration.swift /Users/nice/HelloWord/.build/checkouts/fluent.git-6829944210039798771/Sources/Fluent/Migration/Migration.swift /Users/nice/HelloWord/.build/checkouts/fluent.git-6829944210039798771/Sources/Fluent/Migration/AnyMigration.swift /Users/nice/HelloWord/.build/checkouts/fluent.git-6829944210039798771/Sources/Fluent/QueryBuilder/QueryBuilder+Run.swift /Users/nice/HelloWord/.build/checkouts/fluent.git-6829944210039798771/Sources/Fluent/Service/FluentProvider.swift /Users/nice/HelloWord/.build/checkouts/fluent.git-6829944210039798771/Sources/Fluent/Schema/SchemaBuilder.swift /Users/nice/HelloWord/.build/checkouts/fluent.git-6829944210039798771/Sources/Fluent/QueryBuilder/QueryBuilder.swift /Users/nice/HelloWord/.build/checkouts/fluent.git-6829944210039798771/Sources/Fluent/Schema/SchemaUpdater.swift /Users/nice/HelloWord/.build/checkouts/fluent.git-6829944210039798771/Sources/Fluent/QueryBuilder/QueryBuilder+Filter.swift /Users/nice/HelloWord/.build/checkouts/fluent.git-6829944210039798771/Sources/Fluent/Utilities/FluentError.swift /Users/nice/HelloWord/.build/checkouts/fluent.git-6829944210039798771/Sources/Fluent/Schema/SchemaCreator.swift /Users/nice/HelloWord/.build/checkouts/fluent.git-6829944210039798771/Sources/Fluent/Schema/DatabasesConfig+References.swift /Users/nice/HelloWord/.build/checkouts/fluent.git-6829944210039798771/Sources/Fluent/Relations/Siblings.swift /Users/nice/HelloWord/.build/checkouts/fluent.git-6829944210039798771/Sources/Fluent/Migration/Migrations.swift /Users/nice/HelloWord/.build/checkouts/fluent.git-6829944210039798771/Sources/Fluent/Migration/AnyMigrations.swift /Users/nice/HelloWord/.build/checkouts/fluent.git-6829944210039798771/Sources/Fluent/QueryBuilder/QueryBuilder+Operators.swift /Users/nice/HelloWord/.build/checkouts/fluent.git-6829944210039798771/Sources/Fluent/Utilities/Exports.swift /Users/nice/HelloWord/.build/checkouts/fluent.git-6829944210039798771/Sources/Fluent/Relations/Parent.swift /Users/nice/HelloWord/.build/checkouts/fluent.git-6829944210039798771/Sources/Fluent/Service/CommandConfig+Fluent.swift /Users/nice/HelloWord/.build/checkouts/fluent.git-6829944210039798771/Sources/Fluent/Cache/KeyedCacheSupporting+Fluent.swift /Users/nice/HelloWord/.build/checkouts/fluent.git-6829944210039798771/Sources/Fluent/Database/DatabaseConnection+Fluent.swift /Users/nice/HelloWord/.build/checkouts/fluent.git-6829944210039798771/Sources/Fluent/Model/ModelEvent.swift /Users/nice/HelloWord/.build/checkouts/fluent.git-6829944210039798771/Sources/Fluent/Model/Pivot.swift /Users/nice/HelloWord/.build/checkouts/fluent.git-6829944210039798771/Sources/Fluent/QueryBuilder/QueryBuilder+Sort.swift /Users/nice/HelloWord/.build/checkouts/fluent.git-6829944210039798771/Sources/Fluent/Cache/CacheEntry.swift /Users/nice/HelloWord/.build/checkouts/fluent.git-6829944210039798771/Sources/Fluent/Query/FluentProperty.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/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/NIO.swiftmodule /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/Async.swiftmodule /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/Command.swiftmodule /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/Service.swiftmodule /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/Console.swiftmodule /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/Core.swiftmodule /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/Logging.swiftmodule /Users/nice/HelloWord/.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/nice/HelloWord/.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/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/NIOConcurrencyHelpers.swiftmodule /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/Bits.swiftmodule /Users/nice/HelloWord/.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 /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/DatabaseKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/SwiftOnoneSupport.swiftmodule /Users/nice/HelloWord/.build/checkouts/swift-nio.git-5005363973595484456/Sources/CNIOAtomics/include/cpp_magic.h /Users/nice/HelloWord/.build/checkouts/swift-nio.git-5005363973595484456/Sources/CNIODarwin/include/c_nio_darwin.h /Users/nice/HelloWord/.build/checkouts/swift-nio.git-5005363973595484456/Sources/CNIOAtomics/include/c-atomics.h /Users/nice/HelloWord/.build/checkouts/swift-nio.git-5005363973595484456/Sources/CNIOLinux/include/c_nio_linux.h /Users/nice/HelloWord/.build/checkouts/swift-nio-zlib-support.git--6556802241718767980/module.modulemap /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/CNIOSHA1.build/module.modulemap /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/CNIOOpenSSL.build/module.modulemap /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/CCryptoOpenSSL.build/module.modulemap /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/CNIOZlib.build/module.modulemap /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/CNIODarwin.build/module.modulemap /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/CNIOHTTPParser.build/module.modulemap /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/CNIOAtomics.build/module.modulemap /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/CNIOLinux.build/module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/ApplicationServices.framework/Headers/ApplicationServices.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Security.framework/Headers/Security.apinotes /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/Fluent.build/Exports~partial.swiftmodule : /Users/nice/HelloWord/.build/checkouts/fluent.git-6829944210039798771/Sources/Fluent/Model/ID.swift /Users/nice/HelloWord/.build/checkouts/fluent.git-6829944210039798771/Sources/Fluent/Schema/SchemaSupporting+CRUD.swift /Users/nice/HelloWord/.build/checkouts/fluent.git-6829944210039798771/Sources/Fluent/Model/Model+CRUD.swift /Users/nice/HelloWord/.build/checkouts/fluent.git-6829944210039798771/Sources/Fluent/QueryBuilder/QueryBuilder+CRUD.swift /Users/nice/HelloWord/.build/checkouts/fluent.git-6829944210039798771/Sources/Fluent/Utilities/Deprecated.swift /Users/nice/HelloWord/.build/checkouts/fluent.git-6829944210039798771/Sources/Fluent/Service/MigrateCommand.swift /Users/nice/HelloWord/.build/checkouts/fluent.git-6829944210039798771/Sources/Fluent/Service/RevertCommand.swift /Users/nice/HelloWord/.build/checkouts/fluent.git-6829944210039798771/Sources/Fluent/QueryBuilder/QueryBuilder+Decode.swift /Users/nice/HelloWord/.build/checkouts/fluent.git-6829944210039798771/Sources/Fluent/QueryBuilder/QueryBuilder+Range.swift /Users/nice/HelloWord/.build/checkouts/fluent.git-6829944210039798771/Sources/Fluent/Model/SoftDeletable.swift /Users/nice/HelloWord/.build/checkouts/fluent.git-6829944210039798771/Sources/Fluent/QueryBuilder/QueryBuilder+Aggregate.swift /Users/nice/HelloWord/.build/checkouts/fluent.git-6829944210039798771/Sources/Fluent/Migration/MigrationConfig.swift /Users/nice/HelloWord/.build/checkouts/fluent.git-6829944210039798771/Sources/Fluent/Schema/SchemaSupporting.swift /Users/nice/HelloWord/.build/checkouts/fluent.git-6829944210039798771/Sources/Fluent/Join/JoinSupporting.swift /Users/nice/HelloWord/.build/checkouts/fluent.git-6829944210039798771/Sources/Fluent/Migration/MigrationSupporting.swift /Users/nice/HelloWord/.build/checkouts/fluent.git-6829944210039798771/Sources/Fluent/Transaction/TransactionSupporting.swift /Users/nice/HelloWord/.build/checkouts/fluent.git-6829944210039798771/Sources/Fluent/Query/QuerySupporting.swift /Users/nice/HelloWord/.build/checkouts/fluent.git-6829944210039798771/Sources/Fluent/Migration/MigrationLog.swift /Users/nice/HelloWord/.build/checkouts/fluent.git-6829944210039798771/Sources/Fluent/QueryBuilder/QueryBuilder+Model.swift /Users/nice/HelloWord/.build/checkouts/fluent.git-6829944210039798771/Sources/Fluent/Model/Model.swift /Users/nice/HelloWord/.build/checkouts/fluent.git-6829944210039798771/Sources/Fluent/Model/AnyModel.swift /Users/nice/HelloWord/.build/checkouts/fluent.git-6829944210039798771/Sources/Fluent/Relations/Children.swift /Users/nice/HelloWord/.build/checkouts/fluent.git-6829944210039798771/Sources/Fluent/Join/QueryBuilder+Join.swift /Users/nice/HelloWord/.build/checkouts/fluent.git-6829944210039798771/Sources/Fluent/Schema/SchemaSupporting+Migration.swift /Users/nice/HelloWord/.build/checkouts/fluent.git-6829944210039798771/Sources/Fluent/Migration/Migration.swift /Users/nice/HelloWord/.build/checkouts/fluent.git-6829944210039798771/Sources/Fluent/Migration/AnyMigration.swift /Users/nice/HelloWord/.build/checkouts/fluent.git-6829944210039798771/Sources/Fluent/QueryBuilder/QueryBuilder+Run.swift /Users/nice/HelloWord/.build/checkouts/fluent.git-6829944210039798771/Sources/Fluent/Service/FluentProvider.swift /Users/nice/HelloWord/.build/checkouts/fluent.git-6829944210039798771/Sources/Fluent/Schema/SchemaBuilder.swift /Users/nice/HelloWord/.build/checkouts/fluent.git-6829944210039798771/Sources/Fluent/QueryBuilder/QueryBuilder.swift /Users/nice/HelloWord/.build/checkouts/fluent.git-6829944210039798771/Sources/Fluent/Schema/SchemaUpdater.swift /Users/nice/HelloWord/.build/checkouts/fluent.git-6829944210039798771/Sources/Fluent/QueryBuilder/QueryBuilder+Filter.swift /Users/nice/HelloWord/.build/checkouts/fluent.git-6829944210039798771/Sources/Fluent/Utilities/FluentError.swift /Users/nice/HelloWord/.build/checkouts/fluent.git-6829944210039798771/Sources/Fluent/Schema/SchemaCreator.swift /Users/nice/HelloWord/.build/checkouts/fluent.git-6829944210039798771/Sources/Fluent/Schema/DatabasesConfig+References.swift /Users/nice/HelloWord/.build/checkouts/fluent.git-6829944210039798771/Sources/Fluent/Relations/Siblings.swift /Users/nice/HelloWord/.build/checkouts/fluent.git-6829944210039798771/Sources/Fluent/Migration/Migrations.swift /Users/nice/HelloWord/.build/checkouts/fluent.git-6829944210039798771/Sources/Fluent/Migration/AnyMigrations.swift /Users/nice/HelloWord/.build/checkouts/fluent.git-6829944210039798771/Sources/Fluent/QueryBuilder/QueryBuilder+Operators.swift /Users/nice/HelloWord/.build/checkouts/fluent.git-6829944210039798771/Sources/Fluent/Utilities/Exports.swift /Users/nice/HelloWord/.build/checkouts/fluent.git-6829944210039798771/Sources/Fluent/Relations/Parent.swift /Users/nice/HelloWord/.build/checkouts/fluent.git-6829944210039798771/Sources/Fluent/Service/CommandConfig+Fluent.swift /Users/nice/HelloWord/.build/checkouts/fluent.git-6829944210039798771/Sources/Fluent/Cache/KeyedCacheSupporting+Fluent.swift /Users/nice/HelloWord/.build/checkouts/fluent.git-6829944210039798771/Sources/Fluent/Database/DatabaseConnection+Fluent.swift /Users/nice/HelloWord/.build/checkouts/fluent.git-6829944210039798771/Sources/Fluent/Model/ModelEvent.swift /Users/nice/HelloWord/.build/checkouts/fluent.git-6829944210039798771/Sources/Fluent/Model/Pivot.swift /Users/nice/HelloWord/.build/checkouts/fluent.git-6829944210039798771/Sources/Fluent/QueryBuilder/QueryBuilder+Sort.swift /Users/nice/HelloWord/.build/checkouts/fluent.git-6829944210039798771/Sources/Fluent/Cache/CacheEntry.swift /Users/nice/HelloWord/.build/checkouts/fluent.git-6829944210039798771/Sources/Fluent/Query/FluentProperty.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/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/NIO.swiftmodule /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/Async.swiftmodule /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/Command.swiftmodule /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/Service.swiftmodule /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/Console.swiftmodule /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/Core.swiftmodule /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/Logging.swiftmodule /Users/nice/HelloWord/.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/nice/HelloWord/.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/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/NIOConcurrencyHelpers.swiftmodule /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/Bits.swiftmodule /Users/nice/HelloWord/.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 /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/DatabaseKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/SwiftOnoneSupport.swiftmodule /Users/nice/HelloWord/.build/checkouts/swift-nio.git-5005363973595484456/Sources/CNIOAtomics/include/cpp_magic.h /Users/nice/HelloWord/.build/checkouts/swift-nio.git-5005363973595484456/Sources/CNIODarwin/include/c_nio_darwin.h /Users/nice/HelloWord/.build/checkouts/swift-nio.git-5005363973595484456/Sources/CNIOAtomics/include/c-atomics.h /Users/nice/HelloWord/.build/checkouts/swift-nio.git-5005363973595484456/Sources/CNIOLinux/include/c_nio_linux.h /Users/nice/HelloWord/.build/checkouts/swift-nio-zlib-support.git--6556802241718767980/module.modulemap /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/CNIOSHA1.build/module.modulemap /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/CNIOOpenSSL.build/module.modulemap /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/CCryptoOpenSSL.build/module.modulemap /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/CNIOZlib.build/module.modulemap /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/CNIODarwin.build/module.modulemap /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/CNIOHTTPParser.build/module.modulemap /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/CNIOAtomics.build/module.modulemap /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/CNIOLinux.build/module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/ApplicationServices.framework/Headers/ApplicationServices.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Security.framework/Headers/Security.apinotes /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/Fluent.build/Exports~partial.swiftdoc : /Users/nice/HelloWord/.build/checkouts/fluent.git-6829944210039798771/Sources/Fluent/Model/ID.swift /Users/nice/HelloWord/.build/checkouts/fluent.git-6829944210039798771/Sources/Fluent/Schema/SchemaSupporting+CRUD.swift /Users/nice/HelloWord/.build/checkouts/fluent.git-6829944210039798771/Sources/Fluent/Model/Model+CRUD.swift /Users/nice/HelloWord/.build/checkouts/fluent.git-6829944210039798771/Sources/Fluent/QueryBuilder/QueryBuilder+CRUD.swift /Users/nice/HelloWord/.build/checkouts/fluent.git-6829944210039798771/Sources/Fluent/Utilities/Deprecated.swift /Users/nice/HelloWord/.build/checkouts/fluent.git-6829944210039798771/Sources/Fluent/Service/MigrateCommand.swift /Users/nice/HelloWord/.build/checkouts/fluent.git-6829944210039798771/Sources/Fluent/Service/RevertCommand.swift /Users/nice/HelloWord/.build/checkouts/fluent.git-6829944210039798771/Sources/Fluent/QueryBuilder/QueryBuilder+Decode.swift /Users/nice/HelloWord/.build/checkouts/fluent.git-6829944210039798771/Sources/Fluent/QueryBuilder/QueryBuilder+Range.swift /Users/nice/HelloWord/.build/checkouts/fluent.git-6829944210039798771/Sources/Fluent/Model/SoftDeletable.swift /Users/nice/HelloWord/.build/checkouts/fluent.git-6829944210039798771/Sources/Fluent/QueryBuilder/QueryBuilder+Aggregate.swift /Users/nice/HelloWord/.build/checkouts/fluent.git-6829944210039798771/Sources/Fluent/Migration/MigrationConfig.swift /Users/nice/HelloWord/.build/checkouts/fluent.git-6829944210039798771/Sources/Fluent/Schema/SchemaSupporting.swift /Users/nice/HelloWord/.build/checkouts/fluent.git-6829944210039798771/Sources/Fluent/Join/JoinSupporting.swift /Users/nice/HelloWord/.build/checkouts/fluent.git-6829944210039798771/Sources/Fluent/Migration/MigrationSupporting.swift /Users/nice/HelloWord/.build/checkouts/fluent.git-6829944210039798771/Sources/Fluent/Transaction/TransactionSupporting.swift /Users/nice/HelloWord/.build/checkouts/fluent.git-6829944210039798771/Sources/Fluent/Query/QuerySupporting.swift /Users/nice/HelloWord/.build/checkouts/fluent.git-6829944210039798771/Sources/Fluent/Migration/MigrationLog.swift /Users/nice/HelloWord/.build/checkouts/fluent.git-6829944210039798771/Sources/Fluent/QueryBuilder/QueryBuilder+Model.swift /Users/nice/HelloWord/.build/checkouts/fluent.git-6829944210039798771/Sources/Fluent/Model/Model.swift /Users/nice/HelloWord/.build/checkouts/fluent.git-6829944210039798771/Sources/Fluent/Model/AnyModel.swift /Users/nice/HelloWord/.build/checkouts/fluent.git-6829944210039798771/Sources/Fluent/Relations/Children.swift /Users/nice/HelloWord/.build/checkouts/fluent.git-6829944210039798771/Sources/Fluent/Join/QueryBuilder+Join.swift /Users/nice/HelloWord/.build/checkouts/fluent.git-6829944210039798771/Sources/Fluent/Schema/SchemaSupporting+Migration.swift /Users/nice/HelloWord/.build/checkouts/fluent.git-6829944210039798771/Sources/Fluent/Migration/Migration.swift /Users/nice/HelloWord/.build/checkouts/fluent.git-6829944210039798771/Sources/Fluent/Migration/AnyMigration.swift /Users/nice/HelloWord/.build/checkouts/fluent.git-6829944210039798771/Sources/Fluent/QueryBuilder/QueryBuilder+Run.swift /Users/nice/HelloWord/.build/checkouts/fluent.git-6829944210039798771/Sources/Fluent/Service/FluentProvider.swift /Users/nice/HelloWord/.build/checkouts/fluent.git-6829944210039798771/Sources/Fluent/Schema/SchemaBuilder.swift /Users/nice/HelloWord/.build/checkouts/fluent.git-6829944210039798771/Sources/Fluent/QueryBuilder/QueryBuilder.swift /Users/nice/HelloWord/.build/checkouts/fluent.git-6829944210039798771/Sources/Fluent/Schema/SchemaUpdater.swift /Users/nice/HelloWord/.build/checkouts/fluent.git-6829944210039798771/Sources/Fluent/QueryBuilder/QueryBuilder+Filter.swift /Users/nice/HelloWord/.build/checkouts/fluent.git-6829944210039798771/Sources/Fluent/Utilities/FluentError.swift /Users/nice/HelloWord/.build/checkouts/fluent.git-6829944210039798771/Sources/Fluent/Schema/SchemaCreator.swift /Users/nice/HelloWord/.build/checkouts/fluent.git-6829944210039798771/Sources/Fluent/Schema/DatabasesConfig+References.swift /Users/nice/HelloWord/.build/checkouts/fluent.git-6829944210039798771/Sources/Fluent/Relations/Siblings.swift /Users/nice/HelloWord/.build/checkouts/fluent.git-6829944210039798771/Sources/Fluent/Migration/Migrations.swift /Users/nice/HelloWord/.build/checkouts/fluent.git-6829944210039798771/Sources/Fluent/Migration/AnyMigrations.swift /Users/nice/HelloWord/.build/checkouts/fluent.git-6829944210039798771/Sources/Fluent/QueryBuilder/QueryBuilder+Operators.swift /Users/nice/HelloWord/.build/checkouts/fluent.git-6829944210039798771/Sources/Fluent/Utilities/Exports.swift /Users/nice/HelloWord/.build/checkouts/fluent.git-6829944210039798771/Sources/Fluent/Relations/Parent.swift /Users/nice/HelloWord/.build/checkouts/fluent.git-6829944210039798771/Sources/Fluent/Service/CommandConfig+Fluent.swift /Users/nice/HelloWord/.build/checkouts/fluent.git-6829944210039798771/Sources/Fluent/Cache/KeyedCacheSupporting+Fluent.swift /Users/nice/HelloWord/.build/checkouts/fluent.git-6829944210039798771/Sources/Fluent/Database/DatabaseConnection+Fluent.swift /Users/nice/HelloWord/.build/checkouts/fluent.git-6829944210039798771/Sources/Fluent/Model/ModelEvent.swift /Users/nice/HelloWord/.build/checkouts/fluent.git-6829944210039798771/Sources/Fluent/Model/Pivot.swift /Users/nice/HelloWord/.build/checkouts/fluent.git-6829944210039798771/Sources/Fluent/QueryBuilder/QueryBuilder+Sort.swift /Users/nice/HelloWord/.build/checkouts/fluent.git-6829944210039798771/Sources/Fluent/Cache/CacheEntry.swift /Users/nice/HelloWord/.build/checkouts/fluent.git-6829944210039798771/Sources/Fluent/Query/FluentProperty.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/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/NIO.swiftmodule /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/Async.swiftmodule /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/Command.swiftmodule /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/Service.swiftmodule /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/Console.swiftmodule /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/Core.swiftmodule /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/Logging.swiftmodule /Users/nice/HelloWord/.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/nice/HelloWord/.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/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/NIOConcurrencyHelpers.swiftmodule /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/Bits.swiftmodule /Users/nice/HelloWord/.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 /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/DatabaseKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/SwiftOnoneSupport.swiftmodule /Users/nice/HelloWord/.build/checkouts/swift-nio.git-5005363973595484456/Sources/CNIOAtomics/include/cpp_magic.h /Users/nice/HelloWord/.build/checkouts/swift-nio.git-5005363973595484456/Sources/CNIODarwin/include/c_nio_darwin.h /Users/nice/HelloWord/.build/checkouts/swift-nio.git-5005363973595484456/Sources/CNIOAtomics/include/c-atomics.h /Users/nice/HelloWord/.build/checkouts/swift-nio.git-5005363973595484456/Sources/CNIOLinux/include/c_nio_linux.h /Users/nice/HelloWord/.build/checkouts/swift-nio-zlib-support.git--6556802241718767980/module.modulemap /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/CNIOSHA1.build/module.modulemap /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/CNIOOpenSSL.build/module.modulemap /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/CCryptoOpenSSL.build/module.modulemap /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/CNIOZlib.build/module.modulemap /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/CNIODarwin.build/module.modulemap /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/CNIOHTTPParser.build/module.modulemap /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/CNIOAtomics.build/module.modulemap /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/CNIOLinux.build/module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/ApplicationServices.framework/Headers/ApplicationServices.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Security.framework/Headers/Security.apinotes
D
// Copyright © 2011, Jakob Bornecrantz. All rights reserved. // See copyright notice in src/charge/charge.d (GPLv2 only). module miners.classic.connection; import std.socket; import std.string; import charge.charge; import charge.util.zip; import miners.classic.proto; import miners.importer.network; alias charge.net.util.ntoh ntoh; /** * Receive server to client packages. */ interface ClassicClientNetworkListener { void indentification(ubyte ver, char[] name, char[] motd, ubyte type); void levelInitialize(); void levelLoadUpdate(ubyte precent); void levelFinalize(uint x, uint y, uint z, ubyte data[]); void setBlock(short x, short y, short z, ubyte type); void playerSpawn(byte id, char[] name, double x, double y, double z, ubyte yaw, ubyte pitch); void playerMoveTo(byte id, double x, double y, double z, ubyte yaw, ubyte pitch); void playerMove(byte id, double x, double y, double z, ubyte yaw, ubyte pitch); void playerMove(byte id, double x, double y, double z); void playerMove(byte id, ubyte yaw, ubyte pitch); void playerDespawn(byte id); void playerType(ubyte type); void ping(); void message(byte id, char[] message); void disconnect(char[] reason); } /** * A threaded TCP connection to a server that handles protocol parsing. */ class ClientConnection : public NetThreadedPacketQueue { private: // Server details char[] hostname; ushort port; /// Username that was authenticated to mc.net char[] username; /// Verification recieved from mc.net char[] verificationKey; /// Stored data when receiving the level ubyte[] inData; /// Receiver of packages ClassicClientNetworkListener l; public: this(ClassicClientNetworkListener l, char[] hostname, ushort port, char[] username, char[] verificationKey = null) { this.l = l; this.hostname = hostname; this.port = port; this.username = username; this.verificationKey = verificationKey; super(); } ~this() { freePacketsUnsafe(); } /** * Push all the packages to the listener. */ void doPackets() { popPackets(&packet); } /* * * Client send functions. * */ void sendClientIdentification(char[] name, char[] key) { ClientIdentification ci; ci.packetId = ci.constId; ci.protocolVersion = 0x07; ci.username[0 .. name.length] = name[0 .. $]; ci.username[name.length .. $] = ' '; ci.verificationKey[0 .. key.length] = key[0 .. $]; ci.verificationKey[key.length .. $] = ' '; ci.pad = 0; sendPacket!(ci)(s); } void sendClientSetBlock(short x, short y, short z, ubyte mode, ubyte type) { ClientSetBlock csb; csb.packetId = csb.constId; csb.x = x; csb.y = y; csb.z = z; csb.mode = mode; csb.type = type; sendPacket!(csb)(s); } void sendClientPlayerUpdatePosOri(short x, short y, short z, ubyte yaw, ubyte pitch) { ClientPlayerUpdatePosOri cpupo; cpupo.packetId = cpupo.constId; cpupo.playerId = cast(byte)0xff; cpupo.x = x; cpupo.y = y; cpupo.z = z; cpupo.yaw = yaw; cpupo.pitch = pitch; sendPacket!(cpupo)(s); } void sendClientMessage(char[] msg) { ClientMessage cm; cm.packetId = cm.constId; cm.pad = 0xff; cm.message[0 .. msg.length] = msg; cm.message[msg.length .. $] = ' '; sendPacket!(cm)(s); } protected: /* * * Protocol decoding functions. * */ /** * 0x00 */ void serverIdentification(ServerIdentification *si) { ubyte ver = si.playerType; char[] name = removeTrailingSpaces(si.name); char[] motd = removeTrailingSpaces(si.motd); ubyte type = si.playerType; l.indentification(ver, name, motd, type); } /* * Ping 0x01 and LevelIntialized 0x02 routed directly. */ /** * 0x03 */ void levelDataChunk(ServerLevelDataChunk *sldc) { inData ~= sldc.data; l.levelLoadUpdate(sldc.percent); } /** * 0x04 */ void levelFinalize(ServerLevelFinalize *slf) { // Uncompress the read data as gzip data ubyte[] decomp = cast(ubyte[])cUncompress(inData, 0, 15+16); scope (exit) std.c.stdlib.free(decomp.ptr); // No point in keeping the read data around delete inData; // Get the level size short xSize = ntoh(slf.x); short ySize = ntoh(slf.y); short zSize = ntoh(slf.z); // Skip the size in the begining auto d = decomp[4 .. $]; l.levelFinalize(xSize, ySize, zSize, d); } /** * 0x06 */ void setBlock(ServerSetBlock *ssb) { short x = ntoh(ssb.x); short y = ntoh(ssb.y); short z = ntoh(ssb.z); ubyte type = ssb.type; l.setBlock(x, y, z, type); } /** * 0x07 */ void playerSpawn(ServerPlayerSpawn *sps) { auto id = sps.playerId; auto name = removeTrailingSpaces(sps.playerName); double x = cast(double)ntoh(sps.x) / 32.0; double y = cast(double)ntoh(sps.y) / 32.0; double z = cast(double)ntoh(sps.z) / 32.0; auto yaw = sps.yaw; auto pitch = sps.pitch; l.playerSpawn(id, name, x, y, z, yaw, pitch); } /** * 0x08 */ void playerTeleport(ServerPlayerTeleport *spt) { auto id = spt.playerId; double x = cast(double)ntoh(spt.x) / 32.0; double y = cast(double)ntoh(spt.y) / 32.0; double z = cast(double)ntoh(spt.z) / 32.0; auto yaw = spt.yaw; auto pitch = spt.pitch; l.playerMoveTo(id, x, y, z, yaw, pitch); } /** * 0x09 */ void playerUpdatePosOri(ServerPlayerUpdatePosOri *spupo) { auto id = spupo.playerId; double x = spupo.x / 32.0; double y = spupo.y / 32.0; double z = spupo.z / 32.0; auto yaw = spupo.yaw; auto pitch = spupo.pitch; l.playerMove(id, x, y, z, yaw, pitch); } /** * 0x0a */ void playerUpdatePos(ServerPlayerUpdatePos *spup) { auto id = spup.playerId; double x = spup.x / 32.0; double y = spup.y / 32.0; double z = spup.z / 32.0; l.playerMove(id, x, y, z); } /** * 0x0b */ void playerUpdateOri(ServerPlayerUpdateOri *spuo) { auto id = spuo.playerId; auto yaw = spuo.yaw; auto pitch = spuo.pitch; l.playerMove(id, yaw, pitch); } /** * 0x0c */ void playerDespawn(ServerPlayerDespawn *spd) { auto id = spd.playerId; l.playerDespawn(id); } /** * 0x0d */ void message(ServerMessage *sm) { byte player = sm.playerId; char[] msg = removeTrailingSpaces(sm.message); l.message(player, msg); } /** * 0x0e */ void disconnect(ServerDisconnect *sd) { char[] reason = removeTrailingSpaces(sd.reason); l.disconnect(reason); } /** * 0x0f */ void playerType(ServerUpdateType *sut) { ubyte type = sut.type; l.playerType(type); } void packet(ubyte *pkg) { switch(*pkg) { case 0x00: auto p = cast(ServerIdentification*)pkg; serverIdentification(p); break; case 0x01: l.ping(); break; case 0x02: l.levelInitialize(); break; case 0x03: auto p = cast(ServerLevelDataChunk*)pkg; levelDataChunk(p); break; case 0x04: auto p = cast(ServerLevelFinalize*)pkg; levelFinalize(p); break; case 0x05: // Ignore break; case 0x06: auto p = cast(ServerSetBlock*)pkg; setBlock(p); break; case 0x07: auto p = cast(ServerPlayerSpawn*)pkg; playerSpawn(p); break; case 0x08: auto p = cast(ServerPlayerTeleport*)pkg; playerTeleport(p); break; case 0x09: auto p = cast(ServerPlayerUpdatePosOri*)pkg; playerUpdatePosOri(p); break; case 0x0a: auto p = cast(ServerPlayerUpdatePos*)pkg; playerUpdatePos(p); break; case 0x0b: auto p = cast(ServerPlayerUpdateOri*)pkg; playerUpdateOri(p); break; case 0x0c: auto p = cast(ServerPlayerDespawn*)pkg; playerDespawn(p); break; case 0x0d: auto p = cast(ServerMessage*)pkg; message(p); break; case 0x0e: auto p = cast(ServerDisconnect*)pkg; disconnect(p); break; case 0x0f: auto p = cast(ServerUpdateType*)pkg; playerType(p); break; default: // Error assert(false); } } /* * * Socket functions. * */ /** * Called at start. */ int run() { try { connect(hostname, port); sendClientIdentification(username, verificationKey); while(true) loop(); } catch (Exception e) { /// XXX: Do something better here. } return 0; } /** * Main loop for receiving packages. */ void loop() { ubyte[] data; ubyte peek; int n; // Peek to see which packet it is n = receive((&peek)[0 .. 1], true); if (n <= 0) throw new ConnectionException("peek"); if (peek >= serverPacketSizes.length) throw new InvalidPacketException(peek); // Get the length of this packet type auto len = serverPacketSizes[peek]; if (len == 0) throw new InvalidPacketException(); // Allocate a receiving packet from the C heap auto pkg = allocPacket(len, data); // Get the data from the socket into the packet for (int i; i < len; i += n) { n = receive(data[i .. len]); if (n <= 0) throw new ConnectionException("read"); } pushPacket(pkg); } } private class ConnectionException : public Exception { this(char[] str) { char[] s = format("Connection error (%s)", str); super(s); } } private class InvalidPacketException : public Exception { this() { super("Invalid packet length"); } this(ubyte b) { char[] s = format("Invalid packet type (0x%02x)", b); super(s); } } private template sendPacket(alias T) { void sendPacket(Socket s) { s.send((cast(ubyte*)&T)[0 .. typeof(T).sizeof]); } }
D
/** TEST_OUTPUT: --- fail_compilation/diag_debug_conditional.d(1): Error: identifier or integer expected inside `debug(...)`, not `alias` fail_compilation/diag_debug_conditional.d(2): Error: identifier or integer expected inside `version(...)`, not `alias` fail_compilation/diag_debug_conditional.d(3): Error: declaration expected following attribute, not end of file --- */ #line 1 debug(alias) version(alias)
D
/** Copyright: 2018 Mark Fisher License: Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 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 AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. **/ module dxx.app.cache; //private import hunt.cache; private import dxx.app; class BasicCache { // Cache cache; CachedValue!T get(T)(string id) { //return cache.get!T(id); return null; } void set(T)(T t,string id) { //cache.put!T(id,t); } this() shared { //cache = cast(shared(Cache))CacheFectory.create(); } this() { //cache = CacheFectory.create(); } class CachedValue(T) { T t; alias t this; bool isNull() { return t is null; } auto ref origin() { return t; } } } /*struct MemoryCache { } struct RedisCache { }*/ //class Cache { // //} interface CacheProvider { // Cache getCache(string id=""); }
D
instance Mil_313_Boltan(Npc_Default) { name[0] = "Болтан"; guild = GIL_MIL; id = 313; voice = 5; flags = 0; npcType = NPCTYPE_AMBIENT; B_SetAttributesToChapter(self,3); fight_tactic = FAI_HUMAN_STRONG; EquipItem(self,ItMw_1h_Mil_Sword); B_CreateAmbientInv(self); B_SetNpcVisual(self,MALE,"Hum_Head_Fighter",Face_B_Normal01,BodyTex_B,ITAR_Mil_L); Mdl_SetModelFatness(self,0); Mdl_ApplyOverlayMds(self,"Humans_Militia.mds"); B_GiveNpcTalents(self); B_SetFightSkills(self,55); daily_routine = Rtn_Start_313; }; func void Rtn_Start_313() { TA_Sit_Chair(6,55,21,0,"NW_CITY_HABOUR_KASERN_PRISON_SIT"); TA_Stand_Guarding(21,0,6,55,"NW_CITY_HABOUR_KASERN_PRISON_02"); };
D
/Users/lap14205/Documents/home/blockchain_learning/casper/casper-get-started/src/tests/target/debug/deps/remove_dir_all-00c8638883ead5b6.rmeta: /Users/lap14205/.cargo/registry/src/github.com-1ecc6299db9ec823/remove_dir_all-0.5.3/src/lib.rs /Users/lap14205/Documents/home/blockchain_learning/casper/casper-get-started/src/tests/target/debug/deps/libremove_dir_all-00c8638883ead5b6.rlib: /Users/lap14205/.cargo/registry/src/github.com-1ecc6299db9ec823/remove_dir_all-0.5.3/src/lib.rs /Users/lap14205/Documents/home/blockchain_learning/casper/casper-get-started/src/tests/target/debug/deps/remove_dir_all-00c8638883ead5b6.d: /Users/lap14205/.cargo/registry/src/github.com-1ecc6299db9ec823/remove_dir_all-0.5.3/src/lib.rs /Users/lap14205/.cargo/registry/src/github.com-1ecc6299db9ec823/remove_dir_all-0.5.3/src/lib.rs:
D
#!/usr/bin/rdmd module mtest; import metus.dncurses.dncurses; void main() { initscr(); scope(exit) endwin(); static if(1) { Window ansWin = new Window(stdwin, 3, stdwin.max.x, stdwin.max.y-2, 0, Positioning.Relative); } else { Window ansWin = stdwin.derwin(3, stdwin.max.x, stdwin.max.y-2, 0); } ansWin.border(); stdwin.put(Pos(stdwin.max.y/2, (stdwin.max.x-16)/2), "Enter a string: "); auto str = stdwin.getstr(80); ansWin.put(Pos(1,1), ACS.lantern, ": You Entered: ", str.bold); stdwin.touch(); stdwin.getch(); }
D
# FIXED user.obj: C:/TAPAS_Fandriver/TAPAS-DSP/ti/motorware/motorware_1_01_00_18/sw/modules/user/src/32b/user.c user.obj: C:/ti/ccsv7/tools/compiler/ti-cgt-c2000_16.9.1.LTS/include/math.h user.obj: C:/ti/ccsv7/tools/compiler/ti-cgt-c2000_16.9.1.LTS/include/linkage.h user.obj: C:/ti/ccsv7/tools/compiler/ti-cgt-c2000_16.9.1.LTS/include/_defs.h user.obj: C:/TAPAS_Fandriver/TAPAS-DSP/ti/motorware/motorware_1_01_00_18/sw/solutions/instaspin_foc/boards/TAPAS/f28x/f2806xF/src/user.h user.obj: C:/TAPAS_Fandriver/TAPAS-DSP/ti/motorware/motorware_1_01_00_18/sw/modules/types/src/types.h user.obj: C:/ti/ccsv7/tools/compiler/ti-cgt-c2000_16.9.1.LTS/include/stdbool.h user.obj: C:/ti/ccsv7/tools/compiler/ti-cgt-c2000_16.9.1.LTS/include/string.h user.obj: C:/ti/ccsv7/tools/compiler/ti-cgt-c2000_16.9.1.LTS/include/stdint.h user.obj: C:/TAPAS_Fandriver/TAPAS-DSP/ti/motorware/motorware_1_01_00_18/sw/modules/motor/src/32b/motor.h user.obj: C:/TAPAS_Fandriver/TAPAS-DSP/ti/motorware/motorware_1_01_00_18/sw/modules/est/src/32b/est.h user.obj: C:/TAPAS_Fandriver/TAPAS-DSP/ti/motorware/motorware_1_01_00_18/sw/modules/math/src/32b/math.h user.obj: C:/TAPAS_Fandriver/TAPAS-DSP/ti/motorware/motorware_1_01_00_18/sw/modules/iqmath/src/32b/IQmathLib.h user.obj: C:/ti/ccsv7/tools/compiler/ti-cgt-c2000_16.9.1.LTS/include/limits.h user.obj: C:/TAPAS_Fandriver/TAPAS-DSP/ti/motorware/motorware_1_01_00_18/sw/modules/est/src/est_states.h user.obj: C:/TAPAS_Fandriver/TAPAS-DSP/ti/motorware/motorware_1_01_00_18/sw/modules/est/src/est_Flux_states.h user.obj: C:/TAPAS_Fandriver/TAPAS-DSP/ti/motorware/motorware_1_01_00_18/sw/modules/est/src/est_Ls_states.h user.obj: C:/TAPAS_Fandriver/TAPAS-DSP/ti/motorware/motorware_1_01_00_18/sw/modules/est/src/est_Rs_states.h user.obj: C:/TAPAS_Fandriver/TAPAS-DSP/ti/motorware/motorware_1_01_00_18/sw/modules/ctrl/src/32b/ctrl_obj.h user.obj: C:/TAPAS_Fandriver/TAPAS-DSP/ti/motorware/motorware_1_01_00_18/sw/modules/ctrl/src/ctrl_states.h user.obj: C:/TAPAS_Fandriver/TAPAS-DSP/ti/motorware/motorware_1_01_00_18/sw/modules/clarke/src/32b/clarke.h user.obj: C:/TAPAS_Fandriver/TAPAS-DSP/ti/motorware/motorware_1_01_00_18/sw/modules/park/src/32b/park.h user.obj: C:/TAPAS_Fandriver/TAPAS-DSP/ti/motorware/motorware_1_01_00_18/sw/modules/ipark/src/32b/ipark.h user.obj: C:/TAPAS_Fandriver/TAPAS-DSP/ti/motorware/motorware_1_01_00_18/sw/modules/offset/src/32b/offset.h user.obj: C:/TAPAS_Fandriver/TAPAS-DSP/ti/motorware/motorware_1_01_00_18/sw/modules/filter/src/32b/filter_fo.h user.obj: C:/TAPAS_Fandriver/TAPAS-DSP/ti/motorware/motorware_1_01_00_18/sw/modules/pid/src/32b/pid.h user.obj: C:/TAPAS_Fandriver/TAPAS-DSP/ti/motorware/motorware_1_01_00_18/sw/modules/svgen/src/32b/svgen.h user.obj: C:/TAPAS_Fandriver/TAPAS-DSP/ti/motorware/motorware_1_01_00_18/sw/modules/traj/src/32b/traj.h user.obj: C:/TAPAS_Fandriver/TAPAS-DSP/ti/motorware/motorware_1_01_00_18/sw/modules/vs_freq/src/32b/vs_freq.h user.obj: C:/TAPAS_Fandriver/TAPAS-DSP/ti/motorware/motorware_1_01_00_18/sw/modules/angle_gen/src/32b/angle_gen.h user.obj: C:/TAPAS_Fandriver/TAPAS-DSP/ti/motorware/motorware_1_01_00_18/sw/modules/datalog/src/32b/datalog.h user.obj: C:/TAPAS_Fandriver/TAPAS-DSP/ti/motorware/motorware_1_01_00_18/sw/modules/fast/src/32b/userParams.h user.obj: C:/TAPAS_Fandriver/TAPAS-DSP/ti/motorware/motorware_1_01_00_18/sw/modules/ctrl/src/32b/ctrl.h user.obj: C:/TAPAS_Fandriver/TAPAS-DSP/ti/motorware/motorware_1_01_00_18/sw/modules/hal/boards/TAPAS/f28x/f2806x/src/hal_obj.h user.obj: C:/TAPAS_Fandriver/TAPAS-DSP/ti/motorware/motorware_1_01_00_18/sw/drivers/adc/src/32b/f28x/f2806x/adc.h user.obj: C:/TAPAS_Fandriver/TAPAS-DSP/ti/motorware/motorware_1_01_00_18/sw/drivers/cpu/src/32b/f28x/f2806x/cpu.h user.obj: C:/TAPAS_Fandriver/TAPAS-DSP/ti/motorware/motorware_1_01_00_18/sw/drivers/clk/src/32b/f28x/f2806x/clk.h user.obj: C:/TAPAS_Fandriver/TAPAS-DSP/ti/motorware/motorware_1_01_00_18/sw/drivers/pwm/src/32b/f28x/f2806x/pwm.h user.obj: C:/TAPAS_Fandriver/TAPAS-DSP/ti/motorware/motorware_1_01_00_18/sw/drivers/flash/src/32b/f28x/f2806x/flash.h user.obj: C:/TAPAS_Fandriver/TAPAS-DSP/ti/motorware/motorware_1_01_00_18/sw/drivers/gpio/src/32b/f28x/f2806x/gpio.h user.obj: C:/TAPAS_Fandriver/TAPAS-DSP/ti/motorware/motorware_1_01_00_18/sw/drivers/osc/src/32b/f28x/f2806x/osc.h user.obj: C:/TAPAS_Fandriver/TAPAS-DSP/ti/motorware/motorware_1_01_00_18/sw/drivers/pie/src/32b/f28x/f2806x/pie.h user.obj: C:/TAPAS_Fandriver/TAPAS-DSP/ti/motorware/motorware_1_01_00_18/sw/drivers/pll/src/32b/f28x/f2806x/pll.h user.obj: C:/TAPAS_Fandriver/TAPAS-DSP/ti/motorware/motorware_1_01_00_18/sw/drivers/pwmdac/src/32b/f28x/f2806x/pwmdac.h user.obj: C:/TAPAS_Fandriver/TAPAS-DSP/ti/motorware/motorware_1_01_00_18/sw/drivers/pwr/src/32b/f28x/f2806x/pwr.h user.obj: C:/TAPAS_Fandriver/TAPAS-DSP/ti/motorware/motorware_1_01_00_18/sw/drivers/spi/src/32b/f28x/f2806x/spi.h user.obj: C:/TAPAS_Fandriver/TAPAS-DSP/ti/motorware/motorware_1_01_00_18/sw/drivers/timer/src/32b/f28x/f2806x/timer.h user.obj: C:/TAPAS_Fandriver/TAPAS-DSP/ti/motorware/motorware_1_01_00_18/sw/drivers/wdog/src/32b/f28x/f2806x/wdog.h user.obj: C:/TAPAS_Fandriver/TAPAS-DSP/ti/motorware/motorware_1_01_00_18/sw/drivers/drvic/drv8301/src/32b/f28x/f2806x/drv8301.h user.obj: C:/TAPAS_Fandriver/TAPAS-DSP/ti/motorware/motorware_1_01_00_18/sw/modules/usDelay/src/32b/usDelay.h C:/TAPAS_Fandriver/TAPAS-DSP/ti/motorware/motorware_1_01_00_18/sw/modules/user/src/32b/user.c: C:/ti/ccsv7/tools/compiler/ti-cgt-c2000_16.9.1.LTS/include/math.h: C:/ti/ccsv7/tools/compiler/ti-cgt-c2000_16.9.1.LTS/include/linkage.h: C:/ti/ccsv7/tools/compiler/ti-cgt-c2000_16.9.1.LTS/include/_defs.h: C:/TAPAS_Fandriver/TAPAS-DSP/ti/motorware/motorware_1_01_00_18/sw/solutions/instaspin_foc/boards/TAPAS/f28x/f2806xF/src/user.h: C:/TAPAS_Fandriver/TAPAS-DSP/ti/motorware/motorware_1_01_00_18/sw/modules/types/src/types.h: C:/ti/ccsv7/tools/compiler/ti-cgt-c2000_16.9.1.LTS/include/stdbool.h: C:/ti/ccsv7/tools/compiler/ti-cgt-c2000_16.9.1.LTS/include/string.h: C:/ti/ccsv7/tools/compiler/ti-cgt-c2000_16.9.1.LTS/include/stdint.h: C:/TAPAS_Fandriver/TAPAS-DSP/ti/motorware/motorware_1_01_00_18/sw/modules/motor/src/32b/motor.h: C:/TAPAS_Fandriver/TAPAS-DSP/ti/motorware/motorware_1_01_00_18/sw/modules/est/src/32b/est.h: C:/TAPAS_Fandriver/TAPAS-DSP/ti/motorware/motorware_1_01_00_18/sw/modules/math/src/32b/math.h: C:/TAPAS_Fandriver/TAPAS-DSP/ti/motorware/motorware_1_01_00_18/sw/modules/iqmath/src/32b/IQmathLib.h: C:/ti/ccsv7/tools/compiler/ti-cgt-c2000_16.9.1.LTS/include/limits.h: C:/TAPAS_Fandriver/TAPAS-DSP/ti/motorware/motorware_1_01_00_18/sw/modules/est/src/est_states.h: C:/TAPAS_Fandriver/TAPAS-DSP/ti/motorware/motorware_1_01_00_18/sw/modules/est/src/est_Flux_states.h: C:/TAPAS_Fandriver/TAPAS-DSP/ti/motorware/motorware_1_01_00_18/sw/modules/est/src/est_Ls_states.h: C:/TAPAS_Fandriver/TAPAS-DSP/ti/motorware/motorware_1_01_00_18/sw/modules/est/src/est_Rs_states.h: C:/TAPAS_Fandriver/TAPAS-DSP/ti/motorware/motorware_1_01_00_18/sw/modules/ctrl/src/32b/ctrl_obj.h: C:/TAPAS_Fandriver/TAPAS-DSP/ti/motorware/motorware_1_01_00_18/sw/modules/ctrl/src/ctrl_states.h: C:/TAPAS_Fandriver/TAPAS-DSP/ti/motorware/motorware_1_01_00_18/sw/modules/clarke/src/32b/clarke.h: C:/TAPAS_Fandriver/TAPAS-DSP/ti/motorware/motorware_1_01_00_18/sw/modules/park/src/32b/park.h: C:/TAPAS_Fandriver/TAPAS-DSP/ti/motorware/motorware_1_01_00_18/sw/modules/ipark/src/32b/ipark.h: C:/TAPAS_Fandriver/TAPAS-DSP/ti/motorware/motorware_1_01_00_18/sw/modules/offset/src/32b/offset.h: C:/TAPAS_Fandriver/TAPAS-DSP/ti/motorware/motorware_1_01_00_18/sw/modules/filter/src/32b/filter_fo.h: C:/TAPAS_Fandriver/TAPAS-DSP/ti/motorware/motorware_1_01_00_18/sw/modules/pid/src/32b/pid.h: C:/TAPAS_Fandriver/TAPAS-DSP/ti/motorware/motorware_1_01_00_18/sw/modules/svgen/src/32b/svgen.h: C:/TAPAS_Fandriver/TAPAS-DSP/ti/motorware/motorware_1_01_00_18/sw/modules/traj/src/32b/traj.h: C:/TAPAS_Fandriver/TAPAS-DSP/ti/motorware/motorware_1_01_00_18/sw/modules/vs_freq/src/32b/vs_freq.h: C:/TAPAS_Fandriver/TAPAS-DSP/ti/motorware/motorware_1_01_00_18/sw/modules/angle_gen/src/32b/angle_gen.h: C:/TAPAS_Fandriver/TAPAS-DSP/ti/motorware/motorware_1_01_00_18/sw/modules/datalog/src/32b/datalog.h: C:/TAPAS_Fandriver/TAPAS-DSP/ti/motorware/motorware_1_01_00_18/sw/modules/fast/src/32b/userParams.h: C:/TAPAS_Fandriver/TAPAS-DSP/ti/motorware/motorware_1_01_00_18/sw/modules/ctrl/src/32b/ctrl.h: C:/TAPAS_Fandriver/TAPAS-DSP/ti/motorware/motorware_1_01_00_18/sw/modules/hal/boards/TAPAS/f28x/f2806x/src/hal_obj.h: C:/TAPAS_Fandriver/TAPAS-DSP/ti/motorware/motorware_1_01_00_18/sw/drivers/adc/src/32b/f28x/f2806x/adc.h: C:/TAPAS_Fandriver/TAPAS-DSP/ti/motorware/motorware_1_01_00_18/sw/drivers/cpu/src/32b/f28x/f2806x/cpu.h: C:/TAPAS_Fandriver/TAPAS-DSP/ti/motorware/motorware_1_01_00_18/sw/drivers/clk/src/32b/f28x/f2806x/clk.h: C:/TAPAS_Fandriver/TAPAS-DSP/ti/motorware/motorware_1_01_00_18/sw/drivers/pwm/src/32b/f28x/f2806x/pwm.h: C:/TAPAS_Fandriver/TAPAS-DSP/ti/motorware/motorware_1_01_00_18/sw/drivers/flash/src/32b/f28x/f2806x/flash.h: C:/TAPAS_Fandriver/TAPAS-DSP/ti/motorware/motorware_1_01_00_18/sw/drivers/gpio/src/32b/f28x/f2806x/gpio.h: C:/TAPAS_Fandriver/TAPAS-DSP/ti/motorware/motorware_1_01_00_18/sw/drivers/osc/src/32b/f28x/f2806x/osc.h: C:/TAPAS_Fandriver/TAPAS-DSP/ti/motorware/motorware_1_01_00_18/sw/drivers/pie/src/32b/f28x/f2806x/pie.h: C:/TAPAS_Fandriver/TAPAS-DSP/ti/motorware/motorware_1_01_00_18/sw/drivers/pll/src/32b/f28x/f2806x/pll.h: C:/TAPAS_Fandriver/TAPAS-DSP/ti/motorware/motorware_1_01_00_18/sw/drivers/pwmdac/src/32b/f28x/f2806x/pwmdac.h: C:/TAPAS_Fandriver/TAPAS-DSP/ti/motorware/motorware_1_01_00_18/sw/drivers/pwr/src/32b/f28x/f2806x/pwr.h: C:/TAPAS_Fandriver/TAPAS-DSP/ti/motorware/motorware_1_01_00_18/sw/drivers/spi/src/32b/f28x/f2806x/spi.h: C:/TAPAS_Fandriver/TAPAS-DSP/ti/motorware/motorware_1_01_00_18/sw/drivers/timer/src/32b/f28x/f2806x/timer.h: C:/TAPAS_Fandriver/TAPAS-DSP/ti/motorware/motorware_1_01_00_18/sw/drivers/wdog/src/32b/f28x/f2806x/wdog.h: C:/TAPAS_Fandriver/TAPAS-DSP/ti/motorware/motorware_1_01_00_18/sw/drivers/drvic/drv8301/src/32b/f28x/f2806x/drv8301.h: C:/TAPAS_Fandriver/TAPAS-DSP/ti/motorware/motorware_1_01_00_18/sw/modules/usDelay/src/32b/usDelay.h:
D
in an amicable manner
D
/** * Code for generating .json descriptions of the module when passing the `-X` flag to dmd. * * Copyright: Copyright (C) 1999-2020 by The D Language Foundation, All Rights Reserved * Authors: $(LINK2 http://www.digitalmars.com, Walter Bright) * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/json.d, _json.d) * Documentation: https://dlang.org/phobos/dmd_json.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/json.d */ module dmd.json; import core.stdc.stdio; import core.stdc.string; import dmd.aggregate; import dmd.arraytypes; import dmd.attrib; import dmd.cond; import dmd.dclass; import dmd.declaration; import dmd.denum; import dmd.dimport; import dmd.dmodule; import dmd.dsymbol; import dmd.dtemplate; import dmd.errors; import dmd.expression; import dmd.func; import dmd.globals; import dmd.hdrgen; import dmd.id; import dmd.identifier; import dmd.mtype; import dmd.root.outbuffer; import dmd.root.rootobject; import dmd.root.string; import dmd.visitor; version(Windows) { extern (C) char* getcwd(char* buffer, size_t maxlen); } else { import core.sys.posix.unistd : getcwd; } private extern (C++) final class ToJsonVisitor : Visitor { alias visit = Visitor.visit; public: OutBuffer* buf; int indentLevel; const(char)[] filename; extern (D) this(OutBuffer* buf) { this.buf = buf; } void indent() { if (buf.length >= 1 && (*buf)[buf.length - 1] == '\n') for (int i = 0; i < indentLevel; i++) buf.writeByte(' '); } void removeComma() { if (buf.length >= 2 && (*buf)[buf.length - 2] == ',' && ((*buf)[buf.length - 1] == '\n' || (*buf)[buf.length - 1] == ' ')) buf.setsize(buf.length - 2); } void comma() { if (indentLevel > 0) buf.writestring(",\n"); } void stringStart() { buf.writeByte('\"'); } void stringEnd() { buf.writeByte('\"'); } extern(D) void stringPart(const char[] s) { foreach (char c; s) { switch (c) { case '\n': buf.writestring("\\n"); break; case '\r': buf.writestring("\\r"); break; case '\t': buf.writestring("\\t"); break; case '\"': buf.writestring("\\\""); break; case '\\': buf.writestring("\\\\"); break; case '\b': buf.writestring("\\b"); break; case '\f': buf.writestring("\\f"); break; default: if (c < 0x20) buf.printf("\\u%04x", c); else { // Note that UTF-8 chars pass through here just fine buf.writeByte(c); } break; } } } // Json value functions /********************************* * Encode string into buf, and wrap it in double quotes. */ extern(D) void value(const char[] s) { stringStart(); stringPart(s); stringEnd(); } void value(int value) { if (value < 0) { buf.writeByte('-'); value = -value; } buf.print(value); } void valueBool(bool value) { buf.writestring(value ? "true" : "false"); } /********************************* * Item is an intented value and a comma, for use in arrays */ extern(D) void item(const char[] s) { indent(); value(s); comma(); } void item(int i) { indent(); value(i); comma(); } void itemBool(const bool b) { indent(); valueBool(b); comma(); } // Json array functions void arrayStart() { indent(); buf.writestring("[\n"); indentLevel++; } void arrayEnd() { indentLevel--; removeComma(); if (buf.length >= 2 && (*buf)[buf.length - 2] == '[' && (*buf)[buf.length - 1] == '\n') buf.setsize(buf.length - 1); else if (!(buf.length >= 1 && (*buf)[buf.length - 1] == '[')) { buf.writestring("\n"); indent(); } buf.writestring("]"); comma(); } // Json object functions void objectStart() { indent(); buf.writestring("{\n"); indentLevel++; } void objectEnd() { indentLevel--; removeComma(); if (buf.length >= 2 && (*buf)[buf.length - 2] == '{' && (*buf)[buf.length - 1] == '\n') buf.setsize(buf.length - 1); else { buf.writestring("\n"); indent(); } buf.writestring("}"); comma(); } // Json object property functions extern(D) void propertyStart(const char[] name) { indent(); value(name); buf.writestring(" : "); } /** Write the given string object property only if `s` is not null. Params: name = the name of the object property s = the string value of the object property */ extern(D) void property(const char[] name, const char[] s) { if (s is null) return; propertyStart(name); value(s); comma(); } /** Write the given string object property. Params: name = the name of the object property s = the string value of the object property */ extern(D) void requiredProperty(const char[] name, const char[] s) { propertyStart(name); if (s is null) buf.writestring("null"); else value(s); comma(); } extern(D) void property(const char[] name, int i) { propertyStart(name); value(i); comma(); } extern(D) void propertyBool(const char[] name, const bool b) { propertyStart(name); valueBool(b); comma(); } extern(D) void property(const char[] name, TRUST trust) { final switch (trust) { case TRUST.default_: // Should not be printed //property(name, "default"); break; case TRUST.system: return property(name, "system"); case TRUST.trusted: return property(name, "trusted"); case TRUST.safe: return property(name, "safe"); } } extern(D) void property(const char[] name, PURE purity) { final switch (purity) { case PURE.impure: // Should not be printed //property(name, "impure"); break; case PURE.weak: return property(name, "weak"); case PURE.const_: return property(name, "const"); case PURE.strong: return property(name, "strong"); case PURE.fwdref: return property(name, "fwdref"); } } extern(D) void property(const char[] name, const LINK linkage) { final switch (linkage) { case LINK.default_: // Should not be printed //property(name, "default"); break; case LINK.d: // Should not be printed //property(name, "d"); break; case LINK.system: // Should not be printed //property(name, "system"); break; case LINK.c: return property(name, "c"); case LINK.cpp: return property(name, "cpp"); case LINK.windows: return property(name, "windows"); case LINK.objc: return property(name, "objc"); } } extern(D) void propertyStorageClass(const char[] name, StorageClass stc) { stc &= STCStorageClass; if (stc) { propertyStart(name); arrayStart(); while (stc) { auto p = stcToString(stc); assert(p.length); item(p); } arrayEnd(); } } extern(D) void property(const char[] linename, const char[] charname, const ref Loc loc) { if (loc.isValid()) { if (auto filename = loc.filename.toDString) { if (filename != this.filename) { this.filename = filename; property("file", filename); } } if (loc.linnum) { property(linename, loc.linnum); if (loc.charnum) property(charname, loc.charnum); } } } extern(D) void property(const char[] name, Type type) { if (type) { property(name, type.toString()); } } extern(D) void property(const char[] name, const char[] deconame, Type type) { if (type) { if (type.deco) property(deconame, type.deco.toDString); else property(name, type.toString()); } } extern(D) void property(const char[] name, Parameters* parameters) { if (parameters is null || parameters.dim == 0) return; propertyStart(name); arrayStart(); if (parameters) { for (size_t i = 0; i < parameters.dim; i++) { Parameter p = (*parameters)[i]; objectStart(); if (p.ident) property("name", p.ident.toString()); property("type", "deco", p.type); propertyStorageClass("storageClass", p.storageClass); if (p.defaultArg) property("default", p.defaultArg.toString()); objectEnd(); } } arrayEnd(); } /* ========================================================================== */ void jsonProperties(Dsymbol s) { if (s.isModule()) return; if (!s.isTemplateDeclaration()) // TemplateDeclaration::kind() acts weird sometimes { property("name", s.toString()); if (s.isStaticCtorDeclaration()) { property("kind", s.isSharedStaticCtorDeclaration() ? "shared static constructor" : "static constructor"); } else if (s.isStaticDtorDeclaration()) { property("kind", s.isSharedStaticDtorDeclaration() ? "shared static destructor" : "static destructor"); } else property("kind", s.kind.toDString); } // TODO: How about package(names)? property("protection", visibilityToString(s.visible().kind)); if (EnumMember em = s.isEnumMember()) { if (em.origValue) property("value", em.origValue.toString()); } property("comment", s.comment.toDString); property("line", "char", s.loc); } void jsonProperties(Declaration d) { if (d.storage_class & STC.local) return; jsonProperties(cast(Dsymbol)d); propertyStorageClass("storageClass", d.storage_class); property("linkage", d.linkage); property("type", "deco", d.type); // Emit originalType if it differs from type if (d.type != d.originalType && d.originalType) { auto ostr = d.originalType.toString(); if (d.type) { auto tstr = d.type.toString(); if (ostr != tstr) { //printf("tstr = %s, ostr = %s\n", tstr, ostr); property("originalType", ostr); } } else property("originalType", ostr); } } void jsonProperties(TemplateDeclaration td) { jsonProperties(cast(Dsymbol)td); if (td.onemember && td.onemember.isCtorDeclaration()) property("name", "this"); // __ctor -> this else property("name", td.ident.toString()); // Foo(T) -> Foo } /* ========================================================================== */ override void visit(Dsymbol s) { } override void visit(Module s) { objectStart(); if (s.md) property("name", s.md.toString()); property("kind", s.kind.toDString); filename = s.srcfile.toString(); property("file", filename); property("comment", s.comment.toDString); propertyStart("members"); arrayStart(); for (size_t i = 0; i < s.members.dim; i++) { (*s.members)[i].accept(this); } arrayEnd(); objectEnd(); } override void visit(Import s) { if (s.id == Id.object) return; objectStart(); propertyStart("name"); stringStart(); if (s.packages && s.packages.dim) { for (size_t i = 0; i < s.packages.dim; i++) { const pid = (*s.packages)[i]; stringPart(pid.toString()); buf.writeByte('.'); } } stringPart(s.id.toString()); stringEnd(); comma(); property("kind", s.kind.toDString); property("comment", s.comment.toDString); property("line", "char", s.loc); if (s.visible().kind != Visibility.Kind.public_) property("protection", visibilityToString(s.visible().kind)); if (s.aliasId) property("alias", s.aliasId.toString()); bool hasRenamed = false; bool hasSelective = false; for (size_t i = 0; i < s.aliases.dim; i++) { // avoid empty "renamed" and "selective" sections if (hasRenamed && hasSelective) break; else if (s.aliases[i]) hasRenamed = true; else hasSelective = true; } if (hasRenamed) { // import foo : alias1 = target1; propertyStart("renamed"); objectStart(); for (size_t i = 0; i < s.aliases.dim; i++) { const name = s.names[i]; const _alias = s.aliases[i]; if (_alias) property(_alias.toString(), name.toString()); } objectEnd(); } if (hasSelective) { // import foo : target1; propertyStart("selective"); arrayStart(); foreach (i, name; s.names) { if (!s.aliases[i]) item(name.toString()); } arrayEnd(); } objectEnd(); } override void visit(AttribDeclaration d) { Dsymbols* ds = d.include(null); if (ds) { for (size_t i = 0; i < ds.dim; i++) { Dsymbol s = (*ds)[i]; s.accept(this); } } } override void visit(ConditionalDeclaration d) { if (d.condition.inc != Include.notComputed) { visit(cast(AttribDeclaration)d); return; // Don't visit the if/else bodies again below } Dsymbols* ds = d.decl ? d.decl : d.elsedecl; for (size_t i = 0; i < ds.dim; i++) { Dsymbol s = (*ds)[i]; s.accept(this); } } override void visit(TypeInfoDeclaration d) { } override void visit(PostBlitDeclaration d) { } override void visit(Declaration d) { objectStart(); //property("unknown", "declaration"); jsonProperties(d); objectEnd(); } override void visit(AggregateDeclaration d) { objectStart(); jsonProperties(d); ClassDeclaration cd = d.isClassDeclaration(); if (cd) { if (cd.baseClass && cd.baseClass.ident != Id.Object) { property("base", cd.baseClass.toPrettyChars(true).toDString); } if (cd.interfaces.length) { propertyStart("interfaces"); arrayStart(); foreach (b; cd.interfaces) { item(b.sym.toPrettyChars(true).toDString); } arrayEnd(); } } if (d.members) { propertyStart("members"); arrayStart(); for (size_t i = 0; i < d.members.dim; i++) { Dsymbol s = (*d.members)[i]; s.accept(this); } arrayEnd(); } objectEnd(); } override void visit(FuncDeclaration d) { objectStart(); jsonProperties(d); TypeFunction tf = cast(TypeFunction)d.type; if (tf && tf.ty == Tfunction) property("parameters", tf.parameterList.parameters); property("endline", "endchar", d.endloc); if (d.foverrides.dim) { propertyStart("overrides"); arrayStart(); for (size_t i = 0; i < d.foverrides.dim; i++) { FuncDeclaration fd = d.foverrides[i]; item(fd.toPrettyChars().toDString); } arrayEnd(); } if (d.fdrequire) { propertyStart("in"); d.fdrequire.accept(this); } if (d.fdensure) { propertyStart("out"); d.fdensure.accept(this); } objectEnd(); } override void visit(TemplateDeclaration d) { objectStart(); // TemplateDeclaration::kind returns the kind of its Aggregate onemember, if it is one property("kind", "template"); jsonProperties(d); propertyStart("parameters"); arrayStart(); for (size_t i = 0; i < d.parameters.dim; i++) { TemplateParameter s = (*d.parameters)[i]; objectStart(); property("name", s.ident.toString()); if (auto type = s.isTemplateTypeParameter()) { if (s.isTemplateThisParameter()) property("kind", "this"); else property("kind", "type"); property("type", "deco", type.specType); property("default", "defaultDeco", type.defaultType); } if (auto value = s.isTemplateValueParameter()) { property("kind", "value"); property("type", "deco", value.valType); if (value.specValue) property("specValue", value.specValue.toString()); if (value.defaultValue) property("defaultValue", value.defaultValue.toString()); } if (auto _alias = s.isTemplateAliasParameter()) { property("kind", "alias"); property("type", "deco", _alias.specType); if (_alias.specAlias) property("specAlias", _alias.specAlias.toString()); if (_alias.defaultAlias) property("defaultAlias", _alias.defaultAlias.toString()); } if (auto tuple = s.isTemplateTupleParameter()) { property("kind", "tuple"); } objectEnd(); } arrayEnd(); Expression expression = d.constraint; if (expression) { property("constraint", expression.toString()); } propertyStart("members"); arrayStart(); for (size_t i = 0; i < d.members.dim; i++) { Dsymbol s = (*d.members)[i]; s.accept(this); } arrayEnd(); objectEnd(); } override void visit(EnumDeclaration d) { if (d.isAnonymous()) { if (d.members) { for (size_t i = 0; i < d.members.dim; i++) { Dsymbol s = (*d.members)[i]; s.accept(this); } } return; } objectStart(); jsonProperties(d); property("base", "baseDeco", d.memtype); if (d.members) { propertyStart("members"); arrayStart(); for (size_t i = 0; i < d.members.dim; i++) { Dsymbol s = (*d.members)[i]; s.accept(this); } arrayEnd(); } objectEnd(); } override void visit(EnumMember s) { objectStart(); jsonProperties(cast(Dsymbol)s); property("type", "deco", s.origType); objectEnd(); } override void visit(VarDeclaration d) { if (d.storage_class & STC.local) return; objectStart(); jsonProperties(d); if (d._init) property("init", d._init.toString()); if (d.isField()) property("offset", d.offset); if (d.alignment && d.alignment != STRUCTALIGN_DEFAULT) property("align", d.alignment); objectEnd(); } override void visit(TemplateMixin d) { objectStart(); jsonProperties(d); objectEnd(); } /** Generate an array of module objects that represent the syntax of each "root module". Params: modules = array of the "root modules" */ private void generateModules(Modules* modules) { arrayStart(); if (modules) { foreach (m; *modules) { if (global.params.verbose) message("json gen %s", m.toChars()); m.accept(this); } } arrayEnd(); } /** Generate the "compilerInfo" object which contains information about the compiler such as the filename, version, supported features, etc. */ private void generateCompilerInfo() { import dmd.target : target; objectStart(); requiredProperty("vendor", global.vendor); requiredProperty("version", global.versionString()); property("__VERSION__", global.versionNumber()); requiredProperty("interface", determineCompilerInterface()); property("size_t", size_t.sizeof); propertyStart("platforms"); arrayStart(); if (global.params.targetOS == TargetOS.Windows) { item("windows"); } else { item("posix"); if (global.params.targetOS == TargetOS.linux) item("linux"); else if (global.params.targetOS == TargetOS.OSX) item("osx"); else if (global.params.targetOS == TargetOS.FreeBSD) { item("freebsd"); item("bsd"); } else if (global.params.targetOS == TargetOS.OpenBSD) { item("openbsd"); item("bsd"); } else if (global.params.targetOS == TargetOS.Solaris) { item("solaris"); item("bsd"); } } arrayEnd(); propertyStart("architectures"); arrayStart(); item(target.architectureName); arrayEnd(); propertyStart("predefinedVersions"); arrayStart(); if (global.versionids) { foreach (const versionid; *global.versionids) { item(versionid.toString()); } } arrayEnd(); propertyStart("supportedFeatures"); { objectStart(); scope(exit) objectEnd(); propertyBool("includeImports", true); } objectEnd(); } /** Generate the "buildInfo" object which contains information specific to the current build such as CWD, importPaths, configFile, etc. */ private void generateBuildInfo() { objectStart(); requiredProperty("cwd", getcwd(null, 0).toDString); requiredProperty("argv0", global.params.argv0); requiredProperty("config", global.inifilename); requiredProperty("libName", global.params.libname); propertyStart("importPaths"); arrayStart(); if (global.params.imppath) { foreach (importPath; *global.params.imppath) { item(importPath.toDString); } } arrayEnd(); propertyStart("objectFiles"); arrayStart(); foreach (objfile; global.params.objfiles) { item(objfile.toDString); } arrayEnd(); propertyStart("libraryFiles"); arrayStart(); foreach (lib; global.params.libfiles) { item(lib.toDString); } arrayEnd(); propertyStart("ddocFiles"); arrayStart(); foreach (ddocFile; global.params.ddocfiles) { item(ddocFile.toDString); } arrayEnd(); requiredProperty("mapFile", global.params.mapfile); requiredProperty("resourceFile", global.params.resfile); requiredProperty("defFile", global.params.deffile); objectEnd(); } /** Generate the "semantics" object which contains a 'modules' field representing semantic information about all the modules used in the compilation such as module name, isRoot, contentImportedFiles, etc. */ private void generateSemantics() { objectStart(); propertyStart("modules"); arrayStart(); foreach (m; Module.amodules) { objectStart(); requiredProperty("name", m.md ? m.md.toString() : null); requiredProperty("file", m.srcfile.toString()); propertyBool("isRoot", m.isRoot()); if(m.contentImportedFiles.dim > 0) { propertyStart("contentImports"); arrayStart(); foreach (file; m.contentImportedFiles) { item(file.toDString); } arrayEnd(); } objectEnd(); } arrayEnd(); objectEnd(); } } extern (C++) void json_generate(OutBuffer* buf, Modules* modules) { scope ToJsonVisitor json = new ToJsonVisitor(buf); // write trailing newline scope(exit) buf.writeByte('\n'); if (global.params.jsonFieldFlags == 0) { // Generate the original format, which is just an array // of modules representing their syntax. json.generateModules(modules); json.removeComma(); } else { // Generate the new format which is an object where each // output option is its own field. json.objectStart(); if (global.params.jsonFieldFlags & JsonFieldFlags.compilerInfo) { json.propertyStart("compilerInfo"); json.generateCompilerInfo(); } if (global.params.jsonFieldFlags & JsonFieldFlags.buildInfo) { json.propertyStart("buildInfo"); json.generateBuildInfo(); } if (global.params.jsonFieldFlags & JsonFieldFlags.modules) { json.propertyStart("modules"); json.generateModules(modules); } if (global.params.jsonFieldFlags & JsonFieldFlags.semantics) { json.propertyStart("semantics"); json.generateSemantics(); } json.objectEnd(); } } /** A string listing the name of each JSON field. Useful for errors messages. */ enum jsonFieldNames = () { string s; string prefix = ""; foreach (idx, enumName; __traits(allMembers, JsonFieldFlags)) { static if (idx > 0) { s ~= prefix ~ "`" ~ enumName ~ "`"; prefix = ", "; } } return s; }(); /** Parse the given `fieldName` and return its corresponding JsonFieldFlags value. Params: fieldName = the field name to parse Returns: JsonFieldFlags.none on error, otherwise the JsonFieldFlags value corresponding to the given fieldName. */ extern (C++) JsonFieldFlags tryParseJsonField(const(char)* fieldName) { auto fieldNameString = fieldName.toDString(); foreach (idx, enumName; __traits(allMembers, JsonFieldFlags)) { static if (idx > 0) { if (fieldNameString == enumName) return __traits(getMember, JsonFieldFlags, enumName); } } return JsonFieldFlags.none; } /** Determines and returns the compiler interface which is one of `dmd`, `ldc`, `gdc` or `sdc`. Returns `null` if no interface can be determined. */ private extern(D) string determineCompilerInterface() { if (global.vendor == "Digital Mars D") return "dmd"; if (global.vendor == "LDC") return "ldc"; if (global.vendor == "GNU D") return "gdc"; if (global.vendor == "SDC") return "sdc"; return null; }
D
//Written in the D programming language /++ D header file for FreeBSD's extensions to POSIX's netinet/in.h. Copyright: Copyright 2017 - License: $(HTTP www.boost.org/LICENSE_1_0.txt, Boost License 1.0). Authors: $(HTTP jmdavisprog.com, Jonathan M Davis) +/ module core.sys.freebsd.netinet.in_; import core.sys.freebsd.sys.cdefs; public import core.sys.posix.netinet.in_; version (FreeBSD): extern(C) nothrow @nogc: static if (__BSD_VISIBLE) { enum IPPROTO_HOPOPTS = 0; enum IPPROTO_IPV4 = 4; enum IPPROTO_IPIP = IPPROTO_IPV4; enum IPPROTO_ST = 7; enum IPPROTO_EGP = 8; enum IPPROTO_PIGP = 9; enum IPPROTO_RCCMON = 10; enum IPPROTO_NVPII = 11; enum IPPROTO_ARGUS = 13; enum IPPROTO_EMCON = 14; enum IPPROTO_XNET = 15; enum IPPROTO_CHAOS = 16; enum IPPROTO_MUX = 18; enum IPPROTO_MEAS = 19; enum IPPROTO_HMP = 20; enum IPPROTO_PRM = 21; enum IPPROTO_TRUNK1 = 23; enum IPPROTO_TRUNK2 = 24; enum IPPROTO_LEAF1 = 25; enum IPPROTO_LEAF2 = 26; enum IPPROTO_RDP = 27; enum IPPROTO_IRTP = 28; enum IPPROTO_TP = 29; enum IPPROTO_BLT = 30; enum IPPROTO_NSP = 31; enum IPPROTO_INP = 32; enum IPPROTO_SEP = 33; enum IPPROTO_3PC = 34; enum IPPROTO_IDPR = 35; enum IPPROTO_XTP = 36; enum IPPROTO_DDP = 37; enum IPPROTO_CMTP = 38; enum IPPROTO_TPXX = 39; enum IPPROTO_IL = 40; enum IPPROTO_SDRP = 42; enum IPPROTO_ROUTING = 43; enum IPPROTO_FRAGMENT = 44; enum IPPROTO_IDRP = 45; enum IPPROTO_RSVP = 46; enum IPPROTO_GRE = 47; enum IPPROTO_MHRP = 48; enum IPPROTO_BHA = 49; enum IPPROTO_ESP = 50; enum IPPROTO_AH = 51; enum IPPROTO_INLSP = 52; enum IPPROTO_SWIPE = 53; enum IPPROTO_NHRP = 54; enum IPPROTO_MOBILE = 55; enum IPPROTO_TLSP = 56; enum IPPROTO_SKIP = 57; enum IPPROTO_ICMPV6 = 58; enum IPPROTO_NONE = 59; enum IPPROTO_DSTOPTS = 60; enum IPPROTO_AHIP = 61; enum IPPROTO_CFTP = 62; enum IPPROTO_HELLO = 63; enum IPPROTO_SATEXPAK = 64; enum IPPROTO_KRYPTOLAN = 65; enum IPPROTO_RVD = 66; enum IPPROTO_IPPC = 67; enum IPPROTO_ADFS = 68; enum IPPROTO_SATMON = 69; enum IPPROTO_VISA = 70; enum IPPROTO_IPCV = 71; enum IPPROTO_CPNX = 72; enum IPPROTO_CPHB = 73; enum IPPROTO_WSN = 74; enum IPPROTO_PVP = 75; enum IPPROTO_BRSATMON = 76; enum IPPROTO_WBMON = 78; enum IPPROTO_WBEXPAK = 79; enum IPPROTO_EON = 80; enum IPPROTO_VMTP = 81; enum IPPROTO_SVMTP = 82; enum IPPROTO_VINES = 83; enum IPPROTO_TTP = 84; enum IPPROTO_IGP = 85; enum IPPROTO_DGP = 86; enum IPPROTO_TCF = 87; enum IPPROTO_IGRP = 88; enum IPPROTO_OSPFIGP = 89; enum IPPROTO_SRPC = 90; enum IPPROTO_LARP = 91; enum IPPROTO_MTP = 92; enum IPPROTO_AX25 = 93; enum IPPROTO_IPEIP = 94; enum IPPROTO_MICP = 95; enum IPPROTO_SCCSP = 96; enum IPPROTO_ETHERIP = 97; enum IPPROTO_ENCAP = 98; enum IPPROTO_APES = 99; enum IPPROTO_GMTP = 100; enum IPPROTO_IPCOMP = 108; enum IPPROTO_SCTP = 132; enum IPPROTO_MH = 135; enum IPPROTO_UDPLITE = 136; enum IPPROTO_HIP = 139; enum IPPROTO_SHIM6 = 140; enum IPPROTO_PIM = 103; enum IPPROTO_CARP = 112; enum IPPROTO_PGM = 113; enum IPPROTO_MPLS = 137; enum IPPROTO_PFSYNC = 240; enum IPPROTO_RESERVED_253 = 253; enum IPPROTO_RESERVED_254 = 254; enum IPPROTO_DONE = 257; enum IPPORT_RESERVED = 1024; enum IPPORT_EPHEMERALFIRST = 10000; enum IPPORT_EPHEMERALLAST = 65535; enum IPPORT_HIFIRSTAUTO = 49152; enum IPPORT_HILASTAUTO = 65535; enum IPPORT_RESERVEDSTART = 600; enum IPPORT_MAX = 65535; extern(D) bool IN_CLASSA(in_addr_t i) pure @safe { return (i & 0x80000000) == 0; } enum IN_CLASSA_NET = 0xff000000; enum IN_CLASSA_NSHIFT = 24; enum IN_CLASSA_HOST = 0x00ffffff; enum IN_CLASSA_MAX = 128; extern(D) bool IN_CLASSB(in_addr_t i) pure @safe { return (i & 0xc0000000) == 0x80000000; } enum IN_CLASSB_NET = 0xffff0000; enum IN_CLASSB_NSHIFT = 16; enum IN_CLASSB_HOST = 0x0000ffff; enum IN_CLASSB_MAX = 65536; extern(D) bool IN_CLASSC(in_addr_t i) pure @safe { return (i & 0xe0000000) == 0xc0000000; } enum IN_CLASSC_NET = 0xffffff00; enum IN_CLASSC_NSHIFT = 8; enum IN_CLASSC_HOST = 0x000000ff; extern(D) bool IN_CLASSD(in_addr_t i) pure @safe { return (i & 0xf0000000) == 0xe0000000; } enum IN_CLASSD_NET = 0xf0000000; enum IN_CLASSD_NSHIFT = 28; enum IN_CLASSD_HOST = 0x0fffffff; extern(D) bool IN_MULTICAST(in_addr_t i) { return IN_CLASSD(i); } // The fact that these are identical looks suspicious (they're not quite // identical on Linux). However, this _is_ how they're defined in FreeBSD // and on OS X. So, while it _might_ be a bug, if it is, it's an upstream // one, and we're compatible with it. extern(D) bool IN_EXPERIMENTAL(in_addr_t i) pure @safe { return (i & 0xf0000000) == 0xf0000000; } extern(D) bool IN_BADCLASS(in_addr_t i) pure @safe { return (i & 0xf0000000) == 0xf0000000; } extern(D) bool IN_LINKLOCAL(in_addr_t i) pure @safe { return (i & 0xffff0000) == 0xa9fe0000; } extern(D) bool IN_LOOPBACK(in_addr_t i) pure @safe { return (i & 0xff000000) == 0x7f000000; } extern(D) bool IN_ZERONET(in_addr_t i) pure @safe { return (i & 0xff000000) == 0; } extern(D) bool IN_PRIVATE(in_addr_t i) pure @safe { return (i & 0xff000000) == 0x0a000000 || (i & 0xfff00000) == 0xac100000 || (i & 0xffff0000) == 0xc0a80000; } extern(D) bool IN_LOCAL_GROUP(in_addr_t i) pure @safe { return (i & 0xffffff00) == 0xe0000000; } extern(D) bool IN_ANY_LOCAL(in_addr_t i) pure @safe { return IN_LINKLOCAL(i) || IN_LOCAL_GROUP(i); } enum INADDR_UNSPEC_GROUP = 0xe0000000; enum INADDR_ALLHOSTS_GROUP = 0xe0000001; enum INADDR_ALLRTRS_GROUP = 0xe0000002; enum INADDR_ALLRPTS_GROUP = 0xe0000016; enum INADDR_CARP_GROUP = 0xe0000012; enum INADDR_PFSYNC_GROUP = 0xe00000f0; enum INADDR_ALLMDNS_GROUP = 0xe00000fb; enum INADDR_MAX_LOCAL_GROUP = 0xe00000ff; enum IN_LOOPBACKNET = 127; enum IN_RFC3021_MASK = 0xfffffffe; enum IP_OPTIONS = 1; enum IP_HDRINCL = 2; enum IP_TOS = 3; enum IP_TTL = 4; enum IP_RECVOPTS = 5; enum IP_RECVRETOPTS = 6; enum IP_RECVDSTADDR = 7; enum IP_SENDSRCADDR = IP_RECVDSTADDR; enum IP_RETOPTS = 8; enum IP_MULTICAST_IF = 9; enum IP_MULTICAST_TTL = 10; enum IP_MULTICAST_LOOP = 11; enum IP_ADD_MEMBERSHIP = 12; enum IP_DROP_MEMBERSHIP = 13; enum IP_MULTICAST_VIF = 14; enum IP_RSVP_ON = 15; enum IP_RSVP_OFF = 16; enum IP_RSVP_VIF_ON = 17; enum IP_RSVP_VIF_OFF = 18; enum IP_PORTRANGE = 19; enum IP_RECVIF = 20; enum IP_IPSEC_POLICY = 21; enum IP_ONESBCAST = 23; enum IP_BINDANY = 24; enum IP_BINDMULTI = 25; enum IP_RSS_LISTEN_BUCKET = 26; enum IP_ORIGDSTADDR = 27; enum IP_RECVORIGDSTADDR = IP_ORIGDSTADDR; enum IP_FW3 = 48; enum IP_DUMMYNET3 = 49; enum IP_ADD_SOURCE_MEMBERSHIP = 70; enum IP_DROP_SOURCE_MEMBERSHIP = 71; enum IP_BLOCK_SOURCE = 72; enum IP_UNBLOCK_SOURCE = 73; enum MCAST_JOIN_GROUP = 80; enum MCAST_LEAVE_GROUP = 81; enum MCAST_JOIN_SOURCE_GROUP = 82; enum MCAST_LEAVE_SOURCE_GROUP = 83; enum MCAST_BLOCK_SOURCE = 84; enum MCAST_UNBLOCK_SOURCE = 85; enum IP_FLOWID = 90; enum IP_FLOWTYPE = 91; enum IP_RSSBUCKETID = 92; enum IP_RECVFLOWID = 93; enum IP_RECVRSSBUCKETID = 94; enum IP_DEFAULT_MULTICAST_TTL = 1; enum IP_DEFAULT_MULTICAST_LOOP = 1; enum IP_MIN_MEMBERSHIPS = 31; enum IP_MAX_MEMBERSHIPS = 4095; enum IP_MAX_GROUP_SRC_FILTER = 512; enum IP_MAX_SOCK_SRC_FILTER = 128; struct ip_mreq { in_addr imr_multiaddr; in_addr imr_interface; } struct ip_mreqn { in_addr imr_multiaddr; in_addr imr_address; int imr_ifindex; } struct ip_mreq_source { in_addr imr_multiaddr; in_addr imr_sourceaddr; in_addr imr_interface; } struct group_req { uint gr_interface; sockaddr_storage gr_group; } struct group_source_req { uint gsr_interface; sockaddr_storage gsr_group; sockaddr_storage gsr_source; } int setipv4sourcefilter(int, in_addr, in_addr, uint, uint, in_addr*); int getipv4sourcefilter(int, in_addr, in_addr, uint*, uint*, in_addr*); int setsourcefilter(int, uint, sockaddr*, socklen_t, uint, uint, sockaddr_storage*); int getsourcefilter(int, uint, sockaddr*, socklen_t, uint*, uint*, sockaddr_storage*); enum MCAST_UNDEFINED = 0; enum MCAST_INCLUDE = 1; enum MCAST_EXCLUDE = 2; enum IP_PORTRANGE_DEFAULT = 0; enum IP_PORTRANGE_HIGH = 1; enum IP_PORTRANGE_LOW = 2; enum IPCTL_FORWARDING = 1; enum IPCTL_SENDREDIRECTS = 2; enum IPCTL_DEFTTL = 3; enum IPCTL_DEFMTU = 4; enum IPCTL_SOURCEROUTE = 8; enum IPCTL_DIRECTEDBROADCAST = 9; enum IPCTL_INTRQMAXLEN = 10; enum IPCTL_INTRQDROPS = 11; enum IPCTL_STATS = 12; enum IPCTL_ACCEPTSOURCEROUTE = 13; enum IPCTL_FASTFORWARDING = 14; enum IPCTL_GIF_TTL = 16; enum IPCTL_INTRDQMAXLEN = 17; enum IPCTL_INTRDQDROPS = 18; } // ============================================================================= // What follows is from netinet6/in6.h, but since netinet6/in6.h specifically // says that it should only be #included by #including netinet/in.h, it makes // more sense to put them in here so that the way they're imported corresponds // with the correct way of #including them in C/C++. // ============================================================================= // The #if was around the #include of in6.h at the end of in.h. static if (__POSIX_VISIBLE) { static if (__BSD_VISIBLE) { enum IPV6PORT_RESERVED = 1024; enum IPV6PORT_ANONMIN = 49152; enum IPV6PORT_ANONMAX = 65535; enum IPV6PORT_RESERVEDMIN = 600; enum IPV6PORT_RESERVEDMAX = IPV6PORT_RESERVED - 1; enum IN6ADDR_ANY_INIT = in6_addr.init; enum IN6ADDR_LOOPBACK_INIT = in6_addr([0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01]); enum IN6ADDR_NODELOCAL_ALLNODES_INIT = in6_addr([0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01]); enum IN6ADDR_INTFACELOCAL_ALLNODES_INIT = in6_addr([0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01]); enum IN6ADDR_LINKLOCAL_ALLNODES_INIT = in6_addr([0xff, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01]); enum IN6ADDR_LINKLOCAL_ALLROUTERS_INIT = in6_addr([0xff, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02]); enum IN6ADDR_LINKLOCAL_ALLV2ROUTERS_INIT = in6_addr([0xff, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x16]); __gshared const in6_addr in6addr_nodelocal_allnodes; __gshared const in6_addr in6addr_linklocal_allnodes; __gshared const in6_addr in6addr_linklocal_allrouters; __gshared const in6_addr in6addr_linklocal_allv2routers; extern(D) bool IN6_ARE_ADDR_EQUAL(in6_addr* a, in6_addr* b) pure @safe { return *a == *b; } } enum __IPV6_ADDR_SCOPE_NODELOCAL = 0x01; enum __IPV6_ADDR_SCOPE_INTFACELOCAL = 0x01; enum __IPV6_ADDR_SCOPE_LINKLOCAL = 0x02; enum __IPV6_ADDR_SCOPE_SITELOCAL = 0x05; enum __IPV6_ADDR_SCOPE_GLOBAL = 0x0e; static if (__BSD_VISIBLE) { // TODO - requires declarations from elsewhere that we don't currently have bindings for. /+ struct route_in6 { rtentry* ro_rt; llentry* ro_lle; char* ro_prepend; ushort ro_plen; ushort ro_flags; ushort ro_mtu; ushort spare; sockaddr_in6 ro_dst; }; +/ } enum IPV6_SOCKOPT_RESERVED1 = 3; enum IPV6_PORTRANGE = 14; enum ICMP6_FILTER = 18; enum IPV6_CHECKSUM = 26; enum IPV6_IPSEC_POLICY = 28; enum IPV6_FW_ADD = 30; enum IPV6_FW_DEL = 31; enum IPV6_FW_FLUSH = 32; enum IPV6_FW_ZERO = 33; enum IPV6_FW_GET = 34; enum IPV6_RTHDRDSTOPTS = 35; enum IPV6_RECVPKTINFO = 36; enum IPV6_RECVHOPLIMIT = 37; enum IPV6_RECVRTHDR = 38; enum IPV6_RECVHOPOPTS = 39; enum IPV6_RECVDSTOPTS = 40; enum IPV6_USE_MIN_MTU = 42; enum IPV6_RECVPATHMTU = 43; enum IPV6_PATHMTU = 44; enum IPV6_PKTINFO = 46; enum IPV6_HOPLIMIT = 47; enum IPV6_NEXTHOP = 48; enum IPV6_HOPOPTS = 49; enum IPV6_DSTOPTS = 50; enum IPV6_RTHDR = 51; enum IPV6_RECVTCLASS = 57; enum IPV6_AUTOFLOWLABEL = 59; enum IPV6_TCLASS = 61; enum IPV6_DONTFRAG = 62; enum IPV6_PREFER_TEMPADDR = 63; enum IPV6_BINDANY = 64; enum IPV6_BINDMULTI = 65; enum IPV6_RSS_LISTEN_BUCKET = 66; enum IPV6_FLOWID = 67; enum IPV6_FLOWTYPE = 68; enum IPV6_RSSBUCKETID = 69; enum IPV6_RECVFLOWID = 70; enum IPV6_RECVRSSBUCKETID = 71; enum IPV6_ORIGDSTADDR = 72; enum IPV6_RECVORIGDSTADDR = IPV6_ORIGDSTADDR; enum IPV6_RTHDR_LOOSE = 0; enum IPV6_RTHDR_STRICT = 1; enum IPV6_RTHDR_TYPE_0 = 0; enum IPV6_DEFAULT_MULTICAST_HOPS = 1; enum IPV6_DEFAULT_MULTICAST_LOOP = 1; enum IPV6_MIN_MEMBERSHIPS = 31; enum IPV6_MAX_MEMBERSHIPS = 4095; enum IPV6_MAX_GROUP_SRC_FILTER = 512; enum IPV6_MAX_SOCK_SRC_FILTER = 128; struct in6_pktinfo { in6_addr ipi6_addr; uint ipi6_ifindex; } struct ip6_mtuinfo { sockaddr_in6 ip6m_addr; uint ip6m_mtu; } enum IPV6_PORTRANGE_DEFAULT = 0; enum IPV6_PORTRANGE_HIGH = 1; enum IPV6_PORTRANGE_LOW = 2; static if (__BSD_VISIBLE) { enum IPV6PROTO_MAXID = IPPROTO_PIM + 1; enum IPV6CTL_FORWARDING = 1; enum IPV6CTL_SENDREDIRECTS = 2; enum IPV6CTL_DEFHLIM = 3; enum IPV6CTL_DEFMTU = 4; enum IPV6CTL_FORWSRCRT = 5; enum IPV6CTL_STATS = 6; enum IPV6CTL_MRTSTATS = 7; enum IPV6CTL_MRTPROTO = 8; enum IPV6CTL_MAXFRAGPACKETS = 9; enum IPV6CTL_SOURCECHECK = 10; enum IPV6CTL_SOURCECHECK_LOGINT = 11; enum IPV6CTL_ACCEPT_RTADV = 12; enum IPV6CTL_LOG_INTERVAL = 14; enum IPV6CTL_HDRNESTLIMIT = 15; enum IPV6CTL_DAD_COUNT = 16; enum IPV6CTL_AUTO_FLOWLABEL = 17; enum IPV6CTL_DEFMCASTHLIM = 18; enum IPV6CTL_GIF_HLIM = 19; enum IPV6CTL_KAME_VERSION = 20; enum IPV6CTL_USE_DEPRECATED = 21; enum IPV6CTL_RR_PRUNE = 22; enum IPV6CTL_V6ONLY = 24; enum IPV6CTL_USETEMPADDR = 32; enum IPV6CTL_TEMPPLTIME = 33; enum IPV6CTL_TEMPVLTIME = 34; enum IPV6CTL_AUTO_LINKLOCAL = 35; enum IPV6CTL_RIP6STATS = 36; enum IPV6CTL_PREFER_TEMPADDR = 37; enum IPV6CTL_ADDRCTLPOLICY = 38; enum IPV6CTL_USE_DEFAULTZONE = 39; enum IPV6CTL_MAXFRAGS = 41; enum IPV6CTL_MCAST_PMTU = 44; enum IPV6CTL_STEALTH = 45; enum ICMPV6CTL_ND6_ONLINKNSRFC4861 = 47; enum IPV6CTL_NO_RADR = 48; enum IPV6CTL_NORBIT_RAIF = 49; enum IPV6CTL_RFC6204W3 = 50; enum IPV6CTL_INTRQMAXLEN = 51; enum IPV6CTL_INTRDQMAXLEN = 52; enum IPV6CTL_MAXID = 53; } // TODO - require declarations from elsewhere that we don't currently have bindings for. /+ enum M_FASTFWD_OURS = M_PROTO1; enum M_IP6_NEXTHOP = M_PROTO2; enum M_IP_NEXTHOP = M_PROTO2; enum M_SKIP_FIREWALL = M_PROTO3; enum M_AUTHIPHDR = M_PROTO4; enum M_DECRYPTED = M_PROTO5; enum M_LOOP = M_PROTO6; enum M_AUTHIPDGM = M_PROTO7; enum M_RTALERT_MLD = M_PROTO8; +/ static if (__BSD_VISIBLE) { size_t inet6_rthdr_space(int, int) @trusted; cmsghdr* inet6_rthdr_init(void*, int); int inet6_rthdr_add(cmsghdr*, const in6_addr*, uint); int inet6_rthdr_lasthop(cmsghdr*, uint); int inet6_rthdr_segments(const cmsghdr*); in6_addr* inet6_rthdr_getaddr(cmsghdr*, int); int inet6_rthdr_getflags(const cmsghdr*, int); int inet6_opt_init(void*, socklen_t); int inet6_opt_append(void*, socklen_t, int, ubyte, socklen_t, ubyte, void**); int inet6_opt_finish(void*, socklen_t, int); int inet6_opt_set_val(void*, int, void*, socklen_t); int inet6_opt_next(void*, socklen_t, int, ubyte*, socklen_t*, void**); int inet6_opt_find(void*, socklen_t, int, ubyte, socklen_t*, void**); int inet6_opt_get_val(void*, int, void*, socklen_t); socklen_t inet6_rth_space(int, int) @trusted; void* inet6_rth_init(void*, socklen_t, int, int); int inet6_rth_add(void*, const in6_addr*); int inet6_rth_reverse(const void*, void*); int inet6_rth_segments(const void*); in6_addr* inet6_rth_getaddr(const void*, int); } }
D
/* REQUIRED_ARGS: -preview=dip1000 * TEST_OUTPUT: --- fail_compilation/fail19881.d(12): Error: address of local variable `local` assigned to return scope `input` --- */ // https://issues.dlang.org/show_bug.cgi?id=19881 @safe int* test(return scope int* input) { int local = 42; input = &local; return input; }
D
/Users/amir/Desktop/EasyChat/build/EasyChat.build/Debug-iphonesimulator/EasyChat.build/Objects-normal/x86_64/File.o : /Users/amir/Desktop/EasyChat/EasyChat/C/Auths/LoginVC.swift /Users/amir/Desktop/EasyChat/EasyChat/C/Auths/SignUpVC.swift /Users/amir/Desktop/EasyChat/EasyChat/C/Home/ChatRoomsVC.swift /Users/amir/Desktop/EasyChat/EasyChat/C/Home/ChatVC.swift /Users/amir/Desktop/EasyChat/EasyChat/Helper/Reload.swift /Users/amir/Desktop/EasyChat/EasyChat/M/File.swift /Users/amir/Desktop/EasyChat/EasyChat/AppDelegate.swift /Users/amir/Desktop/EasyChat/EasyChat/C/Home/ChatTableViewCell.swift /Users/amir/Desktop/EasyChat/EasyChat/M/Room.swift /Users/amir/Desktop/EasyChat/EasyChat/C/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/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/File~partial.swiftmodule : /Users/amir/Desktop/EasyChat/EasyChat/C/Auths/LoginVC.swift /Users/amir/Desktop/EasyChat/EasyChat/C/Auths/SignUpVC.swift /Users/amir/Desktop/EasyChat/EasyChat/C/Home/ChatRoomsVC.swift /Users/amir/Desktop/EasyChat/EasyChat/C/Home/ChatVC.swift /Users/amir/Desktop/EasyChat/EasyChat/Helper/Reload.swift /Users/amir/Desktop/EasyChat/EasyChat/M/File.swift /Users/amir/Desktop/EasyChat/EasyChat/AppDelegate.swift /Users/amir/Desktop/EasyChat/EasyChat/C/Home/ChatTableViewCell.swift /Users/amir/Desktop/EasyChat/EasyChat/M/Room.swift /Users/amir/Desktop/EasyChat/EasyChat/C/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/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/File~partial.swiftdoc : /Users/amir/Desktop/EasyChat/EasyChat/C/Auths/LoginVC.swift /Users/amir/Desktop/EasyChat/EasyChat/C/Auths/SignUpVC.swift /Users/amir/Desktop/EasyChat/EasyChat/C/Home/ChatRoomsVC.swift /Users/amir/Desktop/EasyChat/EasyChat/C/Home/ChatVC.swift /Users/amir/Desktop/EasyChat/EasyChat/Helper/Reload.swift /Users/amir/Desktop/EasyChat/EasyChat/M/File.swift /Users/amir/Desktop/EasyChat/EasyChat/AppDelegate.swift /Users/amir/Desktop/EasyChat/EasyChat/C/Home/ChatTableViewCell.swift /Users/amir/Desktop/EasyChat/EasyChat/M/Room.swift /Users/amir/Desktop/EasyChat/EasyChat/C/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/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
module engine.modules.physics_2d.shape; import engine.core.object; import engine.core.typedefs; import engine.modules.physics_2d.physics_2d; import engine.modules.physics_2d.basic; class CP2DShape : CP2DObject { mixin( TRegisterClass!CP2DShape ); public: void move( SVec2F pos ) { GPhysics2D.shape_move( pId, pos ); } @property { void bTrigger( bool bEnabled ) { GPhysics2D.shape_setProperty( pId, EP2DShapeProperty.IS_TRIGGER, var( bEnabled ) ); } bool bTrigger() { return GPhysics2D.shape_getProperty( pId, EP2DShapeProperty.IS_TRIGGER ).as!bool; } void position( SVec2F npos ) { GPhysics2D.shape_setProperty( pId, EP2DShapeProperty.POSITION, var( npos ) ); } SVec2F position() { return GPhysics2D.shape_getProperty( pId, EP2DShapeProperty.POSITION ).as!SVec2F; } void rotation( float angle ) { GPhysics2D.shape_setProperty( pId, EP2DShapeProperty.ROTATION, var( angle ) ); } float rotation() { return GPhysics2D.shape_getProperty( pId, EP2DShapeProperty.ROTATION ).as!float; } void friction( float frict ) { GPhysics2D.shape_setProperty( pId, EP2DShapeProperty.FRICTION, var( frict ) ); } float friction() { return GPhysics2D.shape_getProperty( pId, EP2DShapeProperty.FRICTION ).as!float; } uint collidingCount() { return GPhysics2D.shape_getProperty( pId, EP2DShapeProperty.COLLIDING_COUNT ).as!uint; } } } class CP2DBoxShape : CP2DShape { mixin( TRegisterClass!CP2DBoxShape ); public: int width; int height; this() { super(); } void update( int iwidth, int iheight ) { width = iwidth; height = iheight; VArray data; data ~= SVariant( width ); data ~= SVariant( height ); if ( pId != ID_INVALID ) { GPhysics2D.shape_update( pId, EP2DShapeType.BOX, data ); } else { pId = GPhysics2D.shape_create( EP2DShapeType.BOX, data ); } } } class CP2DCircleShape : CP2DShape { mixin( TRegisterClass!CP2DCircleShape ); public: float radius; this() { super(); } void update( float irad ) { radius = irad; VArray data; data ~= SVariant( radius ); if ( pId != ID_INVALID ) { GPhysics2D.shape_update( pId, EP2DShapeType.CIRCLE, data ); } else { pId = GPhysics2D.shape_create( EP2DShapeType.CIRCLE, data ); } } } class CP2DEdgeShape : CP2DShape { mixin( TRegisterClass!CP2DEdgeShape ); public: SVec2F vec0; SVec2F vec3; this() { super(); } void update( SVec2F ivec0, SVec2F ivec3 ) { vec0 = ivec0; vec3 = ivec3; VArray data; data ~= var( vec0 ); data ~= var( vec3 ); if ( pId != ID_INVALID ) { GPhysics2D.shape_update( pId, EP2DShapeType.EDGE, data ); } else { pId = GPhysics2D.shape_create( EP2DShapeType.EDGE, data ); } } }
D
module dopt.nnet.data.imagetransformer; import dopt.nnet.data; class ImageTransformer : BatchIterator { public { this(BatchIterator imageDataset, size_t jitterX, size_t jitterY, bool flipX, bool flipY, size_t[] folds = [0]) { mDataset = imageDataset; mJitterX = jitterX; mJitterY = jitterY; mFlipX = flipX; mFlipY = flipY; auto shape = this.shape()[0]; mPadded = new float[shape[0] * (shape[1] + 2 * jitterY) * (shape[2] + 2 * jitterX)]; } size_t[][] shape() { return mDataset.shape(); } size_t[] volume() { return mDataset.volume(); } size_t length() { return mDataset.length; } bool finished() { return mDataset.finished(); } void restart() { mDataset.restart(); } void getBatch(float[][] batchData) { import std.algorithm : canFind, reverse; import std.random : uniform; import std.range : chunks, drop, stride, take; mDataset.getBatch(batchData); auto shape = this.shape()[0]; size_t pw = shape[2] + 2 * mJitterX; size_t ph = shape[1] + 2 * mJitterY; foreach(img; batchData[0].chunks(volume[0])) { if(mJitterX != 0 || mJitterY != 0) { //Pad the image. The extra content around the border will be filled with reflected image. for(size_t c = 0; c < shape[0]; c++) { for(size_t y = 0; y < shape[1]; y++) { for(size_t x = 0; x < shape[2]; x++) { mPadded[c * ph * pw + (y + mJitterY) * pw + x + mJitterX] = img[c * shape[1] * shape[2] + y * shape[2] + x]; } if(mJitterX != 0) { size_t o = c * ph * pw + (y + mJitterY) * pw; mPadded[o .. o + mJitterX] = mPadded[o + mJitterX .. o + 2 * mJitterX]; mPadded[o .. o + mJitterX].reverse(); o += shape[2]; mPadded[o + mJitterX .. o + 2 * mJitterX] = mPadded[o .. o + mJitterX]; mPadded[o + mJitterX .. o + 2 * mJitterX].reverse(); } } for(size_t y = 0; y < mJitterY; y++) { size_t o = c * pw * ph; //Pad the top rows mPadded[o + y * pw .. o + (y + 1) * pw] = mPadded[o + (2 * mJitterY - y - 1) * pw .. o + (2 * mJitterY - y) * pw]; //Pad the bottom rows mPadded[o + (ph - y - 1) * pw .. o + (ph - y) * pw] = mPadded[o + (ph - 2 * mJitterY + y) * pw .. o + (ph - 2 * mJitterY + y + 1) * pw]; } } size_t xOff = uniform(0, mJitterX * 2); size_t yOff = uniform(0, mJitterY * 2); //Crop the padded image for(size_t c = 0; c < shape[0]; c++) { for(size_t y = 0; y < shape[1]; y++) { for(size_t x = 0; x < shape[2]; x++) { img[c * shape[1] * shape[2] + y * shape[2] + x] = mPadded[c * ph * pw + (y + yOff) * pw + x + xOff]; } } } } if(mFlipX && uniform(0.0f, 1.0f) < 0.5f) { foreach(row; img.chunks(shape[2])) { row.reverse(); } } if(mFlipY && uniform(0.0f, 1.0f) < 0.5f) { for(size_t c = 0; c < shape[0]; c++) { for(size_t x = 0; x < shape[2]; x++) { img.drop(c * shape[1] * shape[2] + x) .stride(shape[2]) .take(shape[1]) .reverse(); } } } } } } protected { BatchIterator mDataset; size_t mJitterX; size_t mJitterY; bool mFlipX; bool mFlipY; float[] mPadded; } }
D
; Copyright (C) 2008 The Android Open Source Project ; ; Licensed under the Apache License, Version 2.0 (the "License"); ; you may not use this file except in compliance with the License. ; You may obtain a copy of the License at ; ; http://www.apache.org/licenses/LICENSE-2.0 ; ; Unless required by applicable law or agreed to in writing, software ; distributed under the License is distributed on an "AS IS" BASIS, ; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ; See the License for the specific language governing permissions and ; limitations under the License. .source T_div_int_6.java .class public dot.junit.opcodes.div_int.d.T_div_int_6 .super java/lang/Object .method public <init>()V .limit regs 1 invoke-direct {v0}, java/lang/Object/<init>()V return-void .end method .method public run(II)I .limit regs 4 div-int v0, v2, v4 return v0 .end method
D
/** Representing a full project, with a root Package and several dependencies. Copyright: © 2012-2013 Matthias Dondorff, 2012-2016 Sönke Ludwig License: Subject to the terms of the MIT license, as written in the included LICENSE.txt file. Authors: Matthias Dondorff, Sönke Ludwig */ module dub.project; import dub.compilers.compiler; import dub.dependency; import dub.description; import dub.internal.utils; import dub.internal.vibecompat.core.file; import dub.internal.vibecompat.core.log; import dub.internal.vibecompat.data.json; import dub.internal.vibecompat.inet.path; import dub.package_; import dub.packagemanager; import dub.generators.generator; import std.algorithm; import std.array; import std.conv : to; import std.datetime; import std.exception : enforce; import std.string; import std.encoding : sanitize; /** Represents a full project, a root package with its dependencies and package selection. All dependencies must be available locally so that the package dependency graph can be built. Use `Project.reinit` if necessary for reloading dependencies after more packages are available. */ class Project { private { PackageManager m_packageManager; Json m_packageSettings; Package m_rootPackage; Package[] m_dependencies; Package[][Package] m_dependees; SelectedVersions m_selections; string[] m_missingDependencies; string[string] m_overriddenConfigs; } /** Loads a project. Params: package_manager = Package manager instance to use for loading dependencies project_path = Path of the root package to load pack = An existing `Package` instance to use as the root package */ this(PackageManager package_manager, NativePath project_path) { Package pack; auto packageFile = Package.findPackageFile(project_path); if (packageFile.empty) { logWarn("There was no package description found for the application in '%s'.", project_path.toNativeString()); pack = new Package(PackageRecipe.init, project_path); } else { pack = package_manager.getOrLoadPackage(project_path, packageFile); } this(package_manager, pack); } /// ditto this(PackageManager package_manager, Package pack) { m_packageManager = package_manager; m_rootPackage = pack; m_packageSettings = Json.emptyObject; try m_packageSettings = jsonFromFile(m_rootPackage.path ~ ".dub/dub.json", true); catch(Exception t) logDiagnostic("Failed to read .dub/dub.json: %s", t.msg); auto selverfile = m_rootPackage.path ~ SelectedVersions.defaultFile; if (existsFile(selverfile)) { try m_selections = new SelectedVersions(selverfile); catch(Exception e) { logWarn("Failed to load %s: %s", SelectedVersions.defaultFile, e.msg); logDiagnostic("Full error: %s", e.toString().sanitize); m_selections = new SelectedVersions; } } else m_selections = new SelectedVersions; reinit(); } /** List of all resolved dependencies. This includes all direct and indirect dependencies of all configurations combined. Optional dependencies that were not chosen are not included. */ @property const(Package[]) dependencies() const { return m_dependencies; } /// The root package of the project. @property inout(Package) rootPackage() inout { return m_rootPackage; } /// The versions to use for all dependencies. Call reinit() after changing these. @property inout(SelectedVersions) selections() inout { return m_selections; } /// Package manager instance used by the project. @property inout(PackageManager) packageManager() inout { return m_packageManager; } /** Determines if all dependencies necessary to build have been collected. If this function returns `false`, it may be necessary to add more entries to `selections`, or to use `Dub.upgrade` to automatically select all missing dependencies. */ bool hasAllDependencies() const { return m_missingDependencies.length == 0; } /// Sorted list of missing dependencies. string[] missingDependencies() { return m_missingDependencies; } /** Allows iteration of the dependency tree in topological order */ int delegate(int delegate(ref Package)) getTopologicalPackageList(bool children_first = false, Package root_package = null, string[string] configs = null) { // ugly way to avoid code duplication since inout isn't compatible with foreach type inference return cast(int delegate(int delegate(ref Package)))(cast(const)this).getTopologicalPackageList(children_first, root_package, configs); } /// ditto int delegate(int delegate(ref const Package)) getTopologicalPackageList(bool children_first = false, in Package root_package = null, string[string] configs = null) const { const(Package) rootpack = root_package ? root_package : m_rootPackage; int iterator(int delegate(ref const Package) del) { int ret = 0; bool[const(Package)] visited; void perform_rec(in Package p){ if( p in visited ) return; visited[p] = true; if( !children_first ){ ret = del(p); if( ret ) return; } auto cfg = configs.get(p.name, null); PackageDependency[] deps; if (!cfg.length) deps = p.getAllDependencies(); else { auto depmap = p.getDependencies(cfg); deps = depmap.byKey.map!(k => PackageDependency(k, depmap[k])).array; } deps.sort!((a, b) => a.name < b.name); foreach (d; deps) { auto dependency = getDependency(d.name, true); assert(dependency || d.spec.optional, format("Non-optional dependency '%s' of '%s' not found in dependency tree!?.", d.name, p.name)); if(dependency) perform_rec(dependency); if( ret ) return; } if( children_first ){ ret = del(p); if( ret ) return; } } perform_rec(rootpack); return ret; } return &iterator; } /** Retrieves a particular dependency by name. Params: name = (Qualified) package name of the dependency is_optional = If set to true, will return `null` for unsatisfiable dependencies instead of throwing an exception. */ inout(Package) getDependency(string name, bool is_optional) inout { foreach(dp; m_dependencies) if( dp.name == name ) return dp; if (!is_optional) throw new Exception("Unknown dependency: "~name); else return null; } /** Returns the name of the default build configuration for the specified target platform. Params: platform = The target build platform allow_non_library_configs = If set to true, will use the first possible configuration instead of the first "executable" configuration. */ string getDefaultConfiguration(BuildPlatform platform, bool allow_non_library_configs = true) const { auto cfgs = getPackageConfigs(platform, null, allow_non_library_configs); return cfgs[m_rootPackage.name]; } /** Overrides the configuration chosen for a particular package in the dependency graph. Setting a certain configuration here is equivalent to removing all but one configuration from the package. Params: package_ = The package for which to force selecting a certain dependency config = Name of the configuration to force */ void overrideConfiguration(string package_, string config) { auto p = getDependency(package_, true); enforce(p !is null, format("Package '%s', marked for configuration override, is not present in dependency graph.", package_)); enforce(p.configurations.canFind(config), format("Package '%s' does not have a configuration named '%s'.", package_, config)); m_overriddenConfigs[package_] = config; } /** Performs basic validation of various aspects of the package. This will emit warnings to `stderr` if any discouraged names or dependency patterns are found. */ void validate() { // some basic package lint m_rootPackage.warnOnSpecialCompilerFlags(); string nameSuggestion() { string ret; ret ~= `Please modify the "name" field in %s accordingly.`.format(m_rootPackage.recipePath.toNativeString()); if (!m_rootPackage.recipe.buildSettings.targetName.length) { if (m_rootPackage.recipePath.head.name.endsWith(".sdl")) { ret ~= ` You can then add 'targetName "%s"' to keep the current executable name.`.format(m_rootPackage.name); } else { ret ~= ` You can then add '"targetName": "%s"' to keep the current executable name.`.format(m_rootPackage.name); } } return ret; } if (m_rootPackage.name != m_rootPackage.name.toLower()) { logWarn(`WARNING: DUB package names should always be lower case. %s`, nameSuggestion()); } else if (!m_rootPackage.recipe.name.all!(ch => ch >= 'a' && ch <= 'z' || ch >= '0' && ch <= '9' || ch == '-' || ch == '_')) { logWarn(`WARNING: DUB package names may only contain alphanumeric characters, ` ~ `as well as '-' and '_'. %s`, nameSuggestion()); } enforce(!m_rootPackage.name.canFind(' '), "Aborting due to the package name containing spaces."); foreach (d; m_rootPackage.getAllDependencies()) if (d.spec.isExactVersion && d.spec.version_.isBranch && d.spec.repository.empty) { logWarn("WARNING: A deprecated branch based version specification is used " ~ "for the dependency %s. Please use numbered versions instead. Also " ~ "note that you can still use the %s file to override a certain " ~ "dependency to use a branch instead.", d.name, SelectedVersions.defaultFile); } // search for orphan sub configurations void warnSubConfig(string pack, string config) { logWarn("The sub configuration directive \"%s\" -> \"%s\" " ~ "references a package that is not specified as a dependency " ~ "and will have no effect.", pack, config); } void checkSubConfig(string pack, string config) { auto p = getDependency(pack, true); if (p && !p.configurations.canFind(config)) { logWarn("The sub configuration directive \"%s\" -> \"%s\" " ~ "references a configuration that does not exist.", pack, config); } } auto globalbs = m_rootPackage.getBuildSettings(); foreach (p, c; globalbs.subConfigurations) { if (p !in globalbs.dependencies) warnSubConfig(p, c); else checkSubConfig(p, c); } foreach (c; m_rootPackage.configurations) { auto bs = m_rootPackage.getBuildSettings(c); foreach (p, subConf; bs.subConfigurations) { if (p !in bs.dependencies && p !in globalbs.dependencies) warnSubConfig(p, subConf); else checkSubConfig(p, subConf); } } // check for version specification mismatches bool[Package] visited; void validateDependenciesRec(Package pack) { // perform basic package linting pack.simpleLint(); foreach (d; pack.getAllDependencies()) { auto basename = getBasePackageName(d.name); if (m_selections.hasSelectedVersion(basename)) { auto selver = m_selections.getSelectedVersion(basename); if (d.spec.merge(selver) == Dependency.invalid) { logWarn("Selected package %s %s does not match the dependency specification %s in package %s. Need to \"dub upgrade\"?", basename, selver, d.spec, pack.name); } } auto deppack = getDependency(d.name, true); if (deppack in visited) continue; visited[deppack] = true; if (deppack) validateDependenciesRec(deppack); } } validateDependenciesRec(m_rootPackage); } /// Reloads dependencies. void reinit() { m_dependencies = null; m_missingDependencies = []; m_packageManager.refresh(false); void collectDependenciesRec(Package pack, int depth = 0) { auto indent = replicate(" ", depth); logDebug("%sCollecting dependencies for %s", indent, pack.name); indent ~= " "; foreach (dep; pack.getAllDependencies()) { Dependency vspec = dep.spec; Package p; auto basename = getBasePackageName(dep.name); auto subname = getSubPackageName(dep.name); // non-optional and optional-default dependencies (if no selections file exists) // need to be satisfied bool is_desired = !vspec.optional || m_selections.hasSelectedVersion(basename) || (vspec.default_ && m_selections.bare); Package resolveSubPackage(Package p, in bool silentFail) { return subname.length ? m_packageManager.getSubPackage(p, subname, silentFail) : p; } if (dep.name == m_rootPackage.basePackage.name) { vspec = Dependency(m_rootPackage.version_); p = m_rootPackage.basePackage; } else if (basename == m_rootPackage.basePackage.name) { vspec = Dependency(m_rootPackage.version_); try p = m_packageManager.getSubPackage(m_rootPackage.basePackage, subname, false); catch (Exception e) { logDiagnostic("%sError getting sub package %s: %s", indent, dep.name, e.msg); if (is_desired) m_missingDependencies ~= dep.name; continue; } } else if (m_selections.hasSelectedVersion(basename)) { vspec = m_selections.getSelectedVersion(basename); if (!vspec.path.empty) { auto path = vspec.path; if (!path.absolute) path = m_rootPackage.path ~ path; p = m_packageManager.getOrLoadPackage(path, NativePath.init, true); p = resolveSubPackage(p, true); } else if (!vspec.repository.empty) { p = m_packageManager.loadSCMPackage(basename, vspec); p = resolveSubPackage(p, true); } else { p = m_packageManager.getBestPackage(dep.name, vspec); } } else if (m_dependencies.canFind!(d => getBasePackageName(d.name) == basename)) { auto idx = m_dependencies.countUntil!(d => getBasePackageName(d.name) == basename); auto bp = m_dependencies[idx].basePackage; vspec = Dependency(bp.path); p = resolveSubPackage(bp, false); } else { logDiagnostic("%sVersion selection for dependency %s (%s) of %s is missing.", indent, basename, dep.name, pack.name); } if (!p && !vspec.repository.empty) { p = m_packageManager.loadSCMPackage(basename, vspec); resolveSubPackage(p, false); } if (!p && !vspec.path.empty && is_desired) { NativePath path = vspec.path; if (!path.absolute) path = pack.path ~ path; logDiagnostic("%sAdding local %s in %s", indent, dep.name, path); p = m_packageManager.getOrLoadPackage(path, NativePath.init, true); if (p.parentPackage !is null) { logWarn("%sSub package %s must be referenced using the path to it's parent package.", indent, dep.name); p = p.parentPackage; } p = resolveSubPackage(p, false); enforce(p.name == dep.name, format("Path based dependency %s is referenced with a wrong name: %s vs. %s", path.toNativeString(), dep.name, p.name)); } if (!p) { logDiagnostic("%sMissing dependency %s %s of %s", indent, dep.name, vspec, pack.name); if (is_desired) m_missingDependencies ~= dep.name; continue; } if (!m_dependencies.canFind(p)) { logDiagnostic("%sFound dependency %s %s", indent, dep.name, vspec.toString()); m_dependencies ~= p; if (basename == m_rootPackage.basePackage.name) p.warnOnSpecialCompilerFlags(); collectDependenciesRec(p, depth+1); } m_dependees[p] ~= pack; //enforce(p !is null, "Failed to resolve dependency "~dep.name~" "~vspec.toString()); } } collectDependenciesRec(m_rootPackage); m_missingDependencies.sort(); } /// Returns the name of the root package. @property string name() const { return m_rootPackage ? m_rootPackage.name : "app"; } /// Returns the names of all configurations of the root package. @property string[] configurations() const { return m_rootPackage.configurations; } /// Returns the names of all built-in and custom build types of the root package. /// The default built-in build type is the first item in the list. @property string[] builds() const { return builtinBuildTypes ~ m_rootPackage.customBuildTypes; } /// Returns a map with the configuration for all packages in the dependency tree. string[string] getPackageConfigs(in BuildPlatform platform, string config, bool allow_non_library = true) const { struct Vertex { string pack, config; } struct Edge { size_t from, to; } Vertex[] configs; Edge[] edges; string[][string] parents; parents[m_rootPackage.name] = null; foreach (p; getTopologicalPackageList()) foreach (d; p.getAllDependencies()) parents[d.name] ~= p.name; size_t createConfig(string pack, string config) { foreach (i, v; configs) if (v.pack == pack && v.config == config) return i; assert(pack !in m_overriddenConfigs || config == m_overriddenConfigs[pack]); logDebug("Add config %s %s", pack, config); configs ~= Vertex(pack, config); return configs.length-1; } bool haveConfig(string pack, string config) { return configs.any!(c => c.pack == pack && c.config == config); } size_t createEdge(size_t from, size_t to) { auto idx = edges.countUntil(Edge(from, to)); if (idx >= 0) return idx; logDebug("Including %s %s -> %s %s", configs[from].pack, configs[from].config, configs[to].pack, configs[to].config); edges ~= Edge(from, to); return edges.length-1; } void removeConfig(size_t i) { logDebug("Eliminating config %s for %s", configs[i].config, configs[i].pack); auto had_dep_to_pack = new bool[configs.length]; auto still_has_dep_to_pack = new bool[configs.length]; edges = edges.filter!((e) { if (e.to == i) { had_dep_to_pack[e.from] = true; return false; } else if (configs[e.to].pack == configs[i].pack) { still_has_dep_to_pack[e.from] = true; } if (e.from == i) return false; return true; }).array; configs[i] = Vertex.init; // mark config as removed // also remove any configs that cannot be satisfied anymore foreach (j; 0 .. configs.length) if (j != i && had_dep_to_pack[j] && !still_has_dep_to_pack[j]) removeConfig(j); } bool isReachable(string pack, string conf) { if (pack == configs[0].pack && configs[0].config == conf) return true; foreach (e; edges) if (configs[e.to].pack == pack && configs[e.to].config == conf) return true; return false; //return (pack == configs[0].pack && conf == configs[0].config) || edges.canFind!(e => configs[e.to].pack == pack && configs[e.to].config == config); } bool isReachableByAllParentPacks(size_t cidx) { bool[string] r; foreach (p; parents[configs[cidx].pack]) r[p] = false; foreach (e; edges) { if (e.to != cidx) continue; if (auto pp = configs[e.from].pack in r) *pp = true; } foreach (bool v; r) if (!v) return false; return true; } string[] allconfigs_path; void determineDependencyConfigs(in Package p, string c) { string[][string] depconfigs; foreach (d; p.getAllDependencies()) { auto dp = getDependency(d.name, true); if (!dp) continue; string[] cfgs; if (auto pc = dp.name in m_overriddenConfigs) cfgs = [*pc]; else { auto subconf = p.getSubConfiguration(c, dp, platform); if (!subconf.empty) cfgs = [subconf]; else cfgs = dp.getPlatformConfigurations(platform); } cfgs = cfgs.filter!(c => haveConfig(d.name, c)).array; // if no valid configuration was found for a dependency, don't include the // current configuration if (!cfgs.length) { logDebug("Skip %s %s (missing configuration for %s)", p.name, c, dp.name); return; } depconfigs[d.name] = cfgs; } // add this configuration to the graph size_t cidx = createConfig(p.name, c); foreach (d; p.getAllDependencies()) foreach (sc; depconfigs.get(d.name, null)) createEdge(cidx, createConfig(d.name, sc)); } // create a graph of all possible package configurations (package, config) -> (subpackage, subconfig) void determineAllConfigs(in Package p) { auto idx = allconfigs_path.countUntil(p.name); enforce(idx < 0, format("Detected dependency cycle: %s", (allconfigs_path[idx .. $] ~ p.name).join("->"))); allconfigs_path ~= p.name; scope (exit) allconfigs_path.length--; // first, add all dependency configurations foreach (d; p.getAllDependencies) { auto dp = getDependency(d.name, true); if (!dp) continue; determineAllConfigs(dp); } // for each configuration, determine the configurations usable for the dependencies if (auto pc = p.name in m_overriddenConfigs) determineDependencyConfigs(p, *pc); else foreach (c; p.getPlatformConfigurations(platform, p is m_rootPackage && allow_non_library)) determineDependencyConfigs(p, c); } if (config.length) createConfig(m_rootPackage.name, config); determineAllConfigs(m_rootPackage); // successively remove configurations until only one configuration per package is left bool changed; do { // remove all configs that are not reachable by all parent packages changed = false; foreach (i, ref c; configs) { if (c == Vertex.init) continue; // ignore deleted configurations if (!isReachableByAllParentPacks(i)) { logDebug("%s %s NOT REACHABLE by all of (%s):", c.pack, c.config, parents[c.pack]); removeConfig(i); changed = true; } } // when all edges are cleaned up, pick one package and remove all but one config if (!changed) { foreach (p; getTopologicalPackageList()) { size_t cnt = 0; foreach (i, ref c; configs) if (c.pack == p.name && ++cnt > 1) { logDebug("NON-PRIMARY: %s %s", c.pack, c.config); removeConfig(i); } if (cnt > 1) { changed = true; break; } } } } while (changed); // print out the resulting tree foreach (e; edges) logDebug(" %s %s -> %s %s", configs[e.from].pack, configs[e.from].config, configs[e.to].pack, configs[e.to].config); // return the resulting configuration set as an AA string[string] ret; foreach (c; configs) { if (c == Vertex.init) continue; // ignore deleted configurations assert(ret.get(c.pack, c.config) == c.config, format("Conflicting configurations for %s found: %s vs. %s", c.pack, c.config, ret[c.pack])); logDebug("Using configuration '%s' for %s", c.config, c.pack); ret[c.pack] = c.config; } // check for conflicts (packages missing in the final configuration graph) void checkPacksRec(in Package pack) { auto pc = pack.name in ret; enforce(pc !is null, "Could not resolve configuration for package "~pack.name); foreach (p, dep; pack.getDependencies(*pc)) { auto deppack = getDependency(p, dep.optional); if (deppack) checkPacksRec(deppack); } } checkPacksRec(m_rootPackage); return ret; } /** * Fills `dst` with values from this project. * * `dst` gets initialized according to the given platform and config. * * Params: * dst = The BuildSettings struct to fill with data. * gsettings = The generator settings to retrieve the values for. * config = Values of the given configuration will be retrieved. * root_package = If non null, use it instead of the project's real root package. * shallow = If true, collects only build settings for the main package (including inherited settings) and doesn't stop on target type none and sourceLibrary. */ void addBuildSettings(ref BuildSettings dst, in GeneratorSettings gsettings, string config, in Package root_package = null, bool shallow = false) const { import dub.internal.utils : stripDlangSpecialChars; auto configs = getPackageConfigs(gsettings.platform, config); foreach (pkg; this.getTopologicalPackageList(false, root_package, configs)) { auto pkg_path = pkg.path.toNativeString(); dst.addVersions(["Have_" ~ stripDlangSpecialChars(pkg.name)]); assert(pkg.name in configs, "Missing configuration for "~pkg.name); logDebug("Gathering build settings for %s (%s)", pkg.name, configs[pkg.name]); auto psettings = pkg.getBuildSettings(gsettings.platform, configs[pkg.name]); if (psettings.targetType != TargetType.none) { if (shallow && pkg !is m_rootPackage) psettings.sourceFiles = null; processVars(dst, this, pkg, psettings, gsettings); if (!gsettings.single && psettings.importPaths.empty) logWarn(`Package %s (configuration "%s") defines no import paths, use {"importPaths": [...]} or the default package directory structure to fix this.`, pkg.name, configs[pkg.name]); if (psettings.mainSourceFile.empty && pkg is m_rootPackage && psettings.targetType == TargetType.executable) logWarn(`Executable configuration "%s" of package %s defines no main source file, this may cause certain build modes to fail. Add an explicit "mainSourceFile" to the package description to fix this.`, configs[pkg.name], pkg.name); } if (pkg is m_rootPackage) { if (!shallow) { enforce(psettings.targetType != TargetType.none, "Main package has target type \"none\" - stopping build."); enforce(psettings.targetType != TargetType.sourceLibrary, "Main package has target type \"sourceLibrary\" which generates no target - stopping build."); } dst.targetType = psettings.targetType; dst.targetPath = psettings.targetPath; dst.targetName = psettings.targetName; if (!psettings.workingDirectory.empty) dst.workingDirectory = processVars(psettings.workingDirectory, this, pkg, gsettings, true, [dst.environments, dst.buildEnvironments]); if (psettings.mainSourceFile.length) dst.mainSourceFile = processVars(psettings.mainSourceFile, this, pkg, gsettings, true, [dst.environments, dst.buildEnvironments]); } } // always add all version identifiers of all packages foreach (pkg; this.getTopologicalPackageList(false, null, configs)) { auto psettings = pkg.getBuildSettings(gsettings.platform, configs[pkg.name]); dst.addVersions(psettings.versions); } } /** Fills `dst` with build settings specific to the given build type. Params: dst = The `BuildSettings` instance to add the build settings to gsettings = Target generator settings build_type = Name of the build type for_root_package = Selects if the build settings are for the root package or for one of the dependencies. Unittest flags will only be added to the root package. */ void addBuildTypeSettings(ref BuildSettings dst, in GeneratorSettings gsettings, bool for_root_package = true) { bool usedefflags = !(dst.requirements & BuildRequirement.noDefaultFlags); if (usedefflags) { BuildSettings btsettings; m_rootPackage.addBuildTypeSettings(btsettings, gsettings.platform, gsettings.buildType); if (!for_root_package) { // don't propagate unittest switch to dependencies, as dependent // unit tests aren't run anyway and the additional code may // cause linking to fail on Windows (issue #640) btsettings.removeOptions(BuildOption.unittests); } processVars(dst, this, m_rootPackage, btsettings, gsettings); } } /// Outputs a build description of the project, including its dependencies. ProjectDescription describe(GeneratorSettings settings) { import dub.generators.targetdescription; // store basic build parameters ProjectDescription ret; ret.rootPackage = m_rootPackage.name; ret.configuration = settings.config; ret.buildType = settings.buildType; ret.compiler = settings.platform.compiler; ret.architecture = settings.platform.architecture; ret.platform = settings.platform.platform; // collect high level information about projects (useful for IDE display) auto configs = getPackageConfigs(settings.platform, settings.config); ret.packages ~= m_rootPackage.describe(settings.platform, settings.config); foreach (dep; m_dependencies) ret.packages ~= dep.describe(settings.platform, configs[dep.name]); foreach (p; getTopologicalPackageList(false, null, configs)) ret.packages[ret.packages.countUntil!(pp => pp.name == p.name)].active = true; if (settings.buildType.length) { // collect build target information (useful for build tools) auto gen = new TargetDescriptionGenerator(this); try { gen.generate(settings); ret.targets = gen.targetDescriptions; ret.targetLookup = gen.targetDescriptionLookup; } catch (Exception e) { logDiagnostic("Skipping targets description: %s", e.msg); logDebug("Full error: %s", e.toString().sanitize); } } return ret; } private string[] listBuildSetting(string attributeName)(ref GeneratorSettings settings, string config, ProjectDescription projectDescription, Compiler compiler, bool disableEscaping) { return listBuildSetting!attributeName(settings, getPackageConfigs(settings.platform, config), projectDescription, compiler, disableEscaping); } private string[] listBuildSetting(string attributeName)(ref GeneratorSettings settings, string[string] configs, ProjectDescription projectDescription, Compiler compiler, bool disableEscaping) { if (compiler) return formatBuildSettingCompiler!attributeName(settings, configs, projectDescription, compiler, disableEscaping); else return formatBuildSettingPlain!attributeName(settings, configs, projectDescription); } // Output a build setting formatted for a compiler private string[] formatBuildSettingCompiler(string attributeName)(ref GeneratorSettings settings, string[string] configs, ProjectDescription projectDescription, Compiler compiler, bool disableEscaping) { import std.process : escapeShellFileName; import std.path : dirSeparator; assert(compiler); auto targetDescription = projectDescription.lookupTarget(projectDescription.rootPackage); auto buildSettings = targetDescription.buildSettings; string[] values; switch (attributeName) { case "dflags": case "linkerFiles": case "mainSourceFile": case "importFiles": values = formatBuildSettingPlain!attributeName(settings, configs, projectDescription); break; case "lflags": case "sourceFiles": case "injectSourceFiles": case "versions": case "debugVersions": case "importPaths": case "stringImportPaths": case "options": auto bs = buildSettings.dup; bs.dflags = null; // Ensure trailing slash on directory paths auto ensureTrailingSlash = (string path) => path.endsWith(dirSeparator) ? path : path ~ dirSeparator; static if (attributeName == "importPaths") bs.importPaths = bs.importPaths.map!(ensureTrailingSlash).array(); else static if (attributeName == "stringImportPaths") bs.stringImportPaths = bs.stringImportPaths.map!(ensureTrailingSlash).array(); compiler.prepareBuildSettings(bs, settings.platform, BuildSetting.all & ~to!BuildSetting(attributeName)); values = bs.dflags; break; case "libs": auto bs = buildSettings.dup; bs.dflags = null; bs.lflags = null; bs.sourceFiles = null; bs.targetType = TargetType.none; // Force Compiler to NOT omit dependency libs when package is a library. compiler.prepareBuildSettings(bs, settings.platform, BuildSetting.all & ~to!BuildSetting(attributeName)); if (bs.lflags) values = compiler.lflagsToDFlags( bs.lflags ); else if (bs.sourceFiles) values = compiler.lflagsToDFlags( bs.sourceFiles ); else values = bs.dflags; break; default: assert(0); } // Escape filenames and paths if(!disableEscaping) { switch (attributeName) { case "mainSourceFile": case "linkerFiles": case "injectSourceFiles": case "copyFiles": case "importFiles": case "stringImportFiles": case "sourceFiles": case "importPaths": case "stringImportPaths": return values.map!(escapeShellFileName).array(); default: return values; } } return values; } // Output a build setting without formatting for any particular compiler private string[] formatBuildSettingPlain(string attributeName)(ref GeneratorSettings settings, string[string] configs, ProjectDescription projectDescription) { import std.path : buildNormalizedPath, dirSeparator; import std.range : only; string[] list; enforce(attributeName == "targetType" || projectDescription.lookupRootPackage().targetType != TargetType.none, "Target type is 'none'. Cannot list build settings."); static if (attributeName == "targetType") if (projectDescription.rootPackage !in projectDescription.targetLookup) return ["none"]; auto targetDescription = projectDescription.lookupTarget(projectDescription.rootPackage); auto buildSettings = targetDescription.buildSettings; string[] substituteCommands(Package pack, string[] commands, CommandType type) { auto env = makeCommandEnvironmentVariables(type, pack, this, settings, buildSettings); return processVars(this, pack, settings, commands, false, env); } // Return any BuildSetting member attributeName as a range of strings. Don't attempt to fixup values. // allowEmptyString: When the value is a string (as opposed to string[]), // is empty string an actual permitted value instead of // a missing value? auto getRawBuildSetting(Package pack, bool allowEmptyString) { auto value = __traits(getMember, buildSettings, attributeName); static if( attributeName.endsWith("Commands") ) return substituteCommands(pack, value, mixin("CommandType.", attributeName[0 .. $ - "Commands".length])); else static if( is(typeof(value) == string[]) ) return value; else static if( is(typeof(value) == string) ) { auto ret = only(value); // only() has a different return type from only(value), so we // have to empty the range rather than just returning only(). if(value.empty && !allowEmptyString) { ret.popFront(); assert(ret.empty); } return ret; } else static if( is(typeof(value) == string[string]) ) return value.byKeyValue.map!(a => a.key ~ "=" ~ a.value); else static if( is(typeof(value) == enum) ) return only(value); else static if( is(typeof(value) == BuildRequirements) ) return only(cast(BuildRequirement) cast(int) value.values); else static if( is(typeof(value) == BuildOptions) ) return only(cast(BuildOption) cast(int) value.values); else static assert(false, "Type of BuildSettings."~attributeName~" is unsupported."); } // Adjust BuildSetting member attributeName as needed. // Returns a range of strings. auto getFixedBuildSetting(Package pack) { // Is relative path(s) to a directory? enum isRelativeDirectory = attributeName == "importPaths" || attributeName == "stringImportPaths" || attributeName == "targetPath" || attributeName == "workingDirectory"; // Is relative path(s) to a file? enum isRelativeFile = attributeName == "sourceFiles" || attributeName == "linkerFiles" || attributeName == "importFiles" || attributeName == "stringImportFiles" || attributeName == "copyFiles" || attributeName == "mainSourceFile" || attributeName == "injectSourceFiles"; // For these, empty string means "main project directory", not "missing value" enum allowEmptyString = attributeName == "targetPath" || attributeName == "workingDirectory"; enum isEnumBitfield = attributeName == "requirements" || attributeName == "options"; enum isEnum = attributeName == "targetType"; auto values = getRawBuildSetting(pack, allowEmptyString); string fixRelativePath(string importPath) { return buildNormalizedPath(pack.path.toString(), importPath); } static string ensureTrailingSlash(string path) { return path.endsWith(dirSeparator) ? path : path ~ dirSeparator; } static if(isRelativeDirectory) { // Return full paths for the paths, making sure a // directory separator is on the end of each path. return values.map!(fixRelativePath).map!(ensureTrailingSlash); } else static if(isRelativeFile) { // Return full paths. return values.map!(fixRelativePath); } else static if(isEnumBitfield) return bitFieldNames(values.front); else static if (isEnum) return [values.front.to!string]; else return values; } foreach(value; getFixedBuildSetting(m_rootPackage)) { list ~= value; } return list; } // The "compiler" arg is for choosing which compiler the output should be formatted for, // or null to imply "list" format. private string[] listBuildSetting(ref GeneratorSettings settings, string[string] configs, ProjectDescription projectDescription, string requestedData, Compiler compiler, bool disableEscaping) { // Certain data cannot be formatter for a compiler if (compiler) { switch (requestedData) { case "target-type": case "target-path": case "target-name": case "working-directory": case "string-import-files": case "copy-files": case "extra-dependency-files": case "pre-generate-commands": case "post-generate-commands": case "pre-build-commands": case "post-build-commands": case "pre-run-commands": case "post-run-commands": case "environments": case "build-environments": case "run-environments": case "pre-generate-environments": case "post-generate-environments": case "pre-build-environments": case "post-build-environments": case "pre-run-environments": case "post-run-environments": enforce(false, "--data="~requestedData~" can only be used with `--data-list` or `--data-list --data-0`."); break; case "requirements": enforce(false, "--data=requirements can only be used with `--data-list` or `--data-list --data-0`. Use --data=options instead."); break; default: break; } } import std.typetuple : TypeTuple; auto args = TypeTuple!(settings, configs, projectDescription, compiler, disableEscaping); switch (requestedData) { case "target-type": return listBuildSetting!"targetType"(args); case "target-path": return listBuildSetting!"targetPath"(args); case "target-name": return listBuildSetting!"targetName"(args); case "working-directory": return listBuildSetting!"workingDirectory"(args); case "main-source-file": return listBuildSetting!"mainSourceFile"(args); case "dflags": return listBuildSetting!"dflags"(args); case "lflags": return listBuildSetting!"lflags"(args); case "libs": return listBuildSetting!"libs"(args); case "linker-files": return listBuildSetting!"linkerFiles"(args); case "source-files": return listBuildSetting!"sourceFiles"(args); case "inject-source-files": return listBuildSetting!"injectSourceFiles"(args); case "copy-files": return listBuildSetting!"copyFiles"(args); case "extra-dependency-files": return listBuildSetting!"extraDependencyFiles"(args); case "versions": return listBuildSetting!"versions"(args); case "debug-versions": return listBuildSetting!"debugVersions"(args); case "import-paths": return listBuildSetting!"importPaths"(args); case "string-import-paths": return listBuildSetting!"stringImportPaths"(args); case "import-files": return listBuildSetting!"importFiles"(args); case "string-import-files": return listBuildSetting!"stringImportFiles"(args); case "pre-generate-commands": return listBuildSetting!"preGenerateCommands"(args); case "post-generate-commands": return listBuildSetting!"postGenerateCommands"(args); case "pre-build-commands": return listBuildSetting!"preBuildCommands"(args); case "post-build-commands": return listBuildSetting!"postBuildCommands"(args); case "pre-run-commands": return listBuildSetting!"preRunCommands"(args); case "post-run-commands": return listBuildSetting!"postRunCommands"(args); case "environments": return listBuildSetting!"environments"(args); case "build-environments": return listBuildSetting!"buildEnvironments"(args); case "run-environments": return listBuildSetting!"runEnvironments"(args); case "pre-generate-environments": return listBuildSetting!"preGenerateEnvironments"(args); case "post-generate-environments": return listBuildSetting!"postGenerateEnvironments"(args); case "pre-build-environments": return listBuildSetting!"preBuildEnvironments"(args); case "post-build-environments": return listBuildSetting!"postBuildEnvironments"(args); case "pre-run-environments": return listBuildSetting!"preRunEnvironments"(args); case "post-run-environments": return listBuildSetting!"postRunEnvironments"(args); case "requirements": return listBuildSetting!"requirements"(args); case "options": return listBuildSetting!"options"(args); default: enforce(false, "--data="~requestedData~ " is not a valid option. See 'dub describe --help' for accepted --data= values."); } assert(0); } /// Outputs requested data for the project, optionally including its dependencies. string[] listBuildSettings(GeneratorSettings settings, string[] requestedData, ListBuildSettingsFormat list_type) { import dub.compilers.utils : isLinkerFile; auto projectDescription = describe(settings); auto configs = getPackageConfigs(settings.platform, settings.config); PackageDescription packageDescription; foreach (pack; projectDescription.packages) { if (pack.name == projectDescription.rootPackage) packageDescription = pack; } if (projectDescription.rootPackage in projectDescription.targetLookup) { // Copy linker files from sourceFiles to linkerFiles auto target = projectDescription.lookupTarget(projectDescription.rootPackage); foreach (file; target.buildSettings.sourceFiles.filter!(f => isLinkerFile(settings.platform, f))) target.buildSettings.addLinkerFiles(file); // Remove linker files from sourceFiles target.buildSettings.sourceFiles = target.buildSettings.sourceFiles .filter!(a => !isLinkerFile(settings.platform, a)) .array(); projectDescription.lookupTarget(projectDescription.rootPackage) = target; } Compiler compiler; bool no_escape; final switch (list_type) with (ListBuildSettingsFormat) { case list: break; case listNul: no_escape = true; break; case commandLine: compiler = settings.compiler; break; case commandLineNul: compiler = settings.compiler; no_escape = true; break; } auto result = requestedData .map!(dataName => listBuildSetting(settings, configs, projectDescription, dataName, compiler, no_escape)); final switch (list_type) with (ListBuildSettingsFormat) { case list: return result.map!(l => l.join("\n")).array(); case listNul: return result.map!(l => l.join("\0")).array; case commandLine: return result.map!(l => l.join(" ")).array; case commandLineNul: return result.map!(l => l.join("\0")).array; } } /** Saves the currently selected dependency versions to disk. The selections will be written to a file named `SelectedVersions.defaultFile` ("dub.selections.json") within the directory of the root package. Any existing file will get overwritten. */ void saveSelections() { assert(m_selections !is null, "Cannot save selections for non-disk based project (has no selections)."); if (m_selections.hasSelectedVersion(m_rootPackage.basePackage.name)) m_selections.deselectVersion(m_rootPackage.basePackage.name); auto path = m_rootPackage.path ~ SelectedVersions.defaultFile; if (m_selections.dirty || !existsFile(path)) m_selections.save(path); } deprecated bool isUpgradeCacheUpToDate() { return false; } deprecated Dependency[string] getUpgradeCache() { return null; } /** Sets a new set of versions for the upgrade cache. */ void setUpgradeCache(Dependency[string] versions) { logDebug("markUpToDate"); Json create(ref Json json, string object) { if (json[object].type == Json.Type.undefined) json[object] = Json.emptyObject; return json[object]; } create(m_packageSettings, "dub"); m_packageSettings["dub"]["lastUpgrade"] = Clock.currTime().toISOExtString(); create(m_packageSettings["dub"], "cachedUpgrades"); foreach (p, d; versions) m_packageSettings["dub"]["cachedUpgrades"][p] = SelectedVersions.dependencyToJson(d); writeDubJson(); } private void writeDubJson() { import std.file : exists, mkdir; // don't bother to write an empty file if( m_packageSettings.length == 0 ) return; try { logDebug("writeDubJson"); auto dubpath = m_rootPackage.path~".dub"; if( !exists(dubpath.toNativeString()) ) mkdir(dubpath.toNativeString()); auto dstFile = openFile((dubpath~"dub.json").toString(), FileMode.createTrunc); scope(exit) dstFile.close(); dstFile.writePrettyJsonString(m_packageSettings); } catch( Exception e ){ logWarn("Could not write .dub/dub.json."); } } } /// Determines the output format used for `Project.listBuildSettings`. enum ListBuildSettingsFormat { list, /// Newline separated list entries listNul, /// NUL character separated list entries (unescaped) commandLine, /// Formatted for compiler command line (one data list per line) commandLineNul, /// NUL character separated list entries (unescaped, data lists separated by two NUL characters) } /// Indicates where a package has been or should be placed to. enum PlacementLocation { /// Packages retrieved with 'local' will be placed in the current folder /// using the package name as destination. local, /// Packages with 'userWide' will be placed in a folder accessible by /// all of the applications from the current user. user, /// Packages retrieved with 'systemWide' will be placed in a shared folder, /// which can be accessed by all users of the system. system } void processVars(ref BuildSettings dst, in Project project, in Package pack, BuildSettings settings, in GeneratorSettings gsettings, bool include_target_settings = false) { string[string] processVerEnvs(in string[string] targetEnvs, in string[string] defaultEnvs) { string[string] retEnv; foreach (k, v; targetEnvs) retEnv[k] = v; foreach (k, v; defaultEnvs) { if (k !in targetEnvs) retEnv[k] = v; } return processVars(project, pack, gsettings, retEnv); } dst.addEnvironments(processVerEnvs(settings.environments, gsettings.buildSettings.environments)); dst.addBuildEnvironments(processVerEnvs(settings.buildEnvironments, gsettings.buildSettings.buildEnvironments)); dst.addRunEnvironments(processVerEnvs(settings.runEnvironments, gsettings.buildSettings.runEnvironments)); dst.addPreGenerateEnvironments(processVerEnvs(settings.preGenerateEnvironments, gsettings.buildSettings.preGenerateEnvironments)); dst.addPostGenerateEnvironments(processVerEnvs(settings.postGenerateEnvironments, gsettings.buildSettings.postGenerateEnvironments)); dst.addPreBuildEnvironments(processVerEnvs(settings.preBuildEnvironments, gsettings.buildSettings.preBuildEnvironments)); dst.addPostBuildEnvironments(processVerEnvs(settings.postBuildEnvironments, gsettings.buildSettings.postBuildEnvironments)); dst.addPreRunEnvironments(processVerEnvs(settings.preRunEnvironments, gsettings.buildSettings.preRunEnvironments)); dst.addPostRunEnvironments(processVerEnvs(settings.postRunEnvironments, gsettings.buildSettings.postRunEnvironments)); auto buildEnvs = [dst.environments, dst.buildEnvironments]; dst.addDFlags(processVars(project, pack, gsettings, settings.dflags, false, buildEnvs)); dst.addLFlags(processVars(project, pack, gsettings, settings.lflags, false, buildEnvs)); dst.addLibs(processVars(project, pack, gsettings, settings.libs, false, buildEnvs)); dst.addSourceFiles(processVars!true(project, pack, gsettings, settings.sourceFiles, true, buildEnvs)); dst.addImportFiles(processVars(project, pack, gsettings, settings.importFiles, true, buildEnvs)); dst.addStringImportFiles(processVars(project, pack, gsettings, settings.stringImportFiles, true, buildEnvs)); dst.addInjectSourceFiles(processVars!true(project, pack, gsettings, settings.injectSourceFiles, true, buildEnvs)); dst.addCopyFiles(processVars(project, pack, gsettings, settings.copyFiles, true, buildEnvs)); dst.addExtraDependencyFiles(processVars(project, pack, gsettings, settings.extraDependencyFiles, true, buildEnvs)); dst.addVersions(processVars(project, pack, gsettings, settings.versions, false, buildEnvs)); dst.addDebugVersions(processVars(project, pack, gsettings, settings.debugVersions, false, buildEnvs)); dst.addVersionFilters(processVars(project, pack, gsettings, settings.versionFilters, false, buildEnvs)); dst.addDebugVersionFilters(processVars(project, pack, gsettings, settings.debugVersionFilters, false, buildEnvs)); dst.addImportPaths(processVars(project, pack, gsettings, settings.importPaths, true, buildEnvs)); dst.addStringImportPaths(processVars(project, pack, gsettings, settings.stringImportPaths, true, buildEnvs)); dst.addRequirements(settings.requirements); dst.addOptions(settings.options); // commands are substituted in dub.generators.generator : runBuildCommands dst.addPreGenerateCommands(settings.preGenerateCommands); dst.addPostGenerateCommands(settings.postGenerateCommands); dst.addPreBuildCommands(settings.preBuildCommands); dst.addPostBuildCommands(settings.postBuildCommands); dst.addPreRunCommands(settings.preRunCommands); dst.addPostRunCommands(settings.postRunCommands); if (include_target_settings) { dst.targetType = settings.targetType; dst.targetPath = processVars(settings.targetPath, project, pack, gsettings, true, buildEnvs); dst.targetName = settings.targetName; if (!settings.workingDirectory.empty) dst.workingDirectory = processVars(settings.workingDirectory, project, pack, gsettings, true, buildEnvs); if (settings.mainSourceFile.length) dst.mainSourceFile = processVars(settings.mainSourceFile, project, pack, gsettings, true, buildEnvs); } } string[] processVars(bool glob = false)(in Project project, in Package pack, in GeneratorSettings gsettings, in string[] vars, bool are_paths = false, in string[string][] extraVers = null) { auto ret = appender!(string[])(); processVars!glob(ret, project, pack, gsettings, vars, are_paths, extraVers); return ret.data; } void processVars(bool glob = false)(ref Appender!(string[]) dst, in Project project, in Package pack, in GeneratorSettings gsettings, in string[] vars, bool are_paths = false, in string[string][] extraVers = null) { static if (glob) alias process = processVarsWithGlob!(Project, Package); else alias process = processVars!(Project, Package); foreach (var; vars) dst.put(process(var, project, pack, gsettings, are_paths, extraVers)); } string processVars(Project, Package)(string var, in Project project, in Package pack, in GeneratorSettings gsettings, bool is_path, in string[string][] extraVers = null) { var = var.expandVars!(varName => getVariable(varName, project, pack, gsettings, extraVers)); if (!is_path) return var; auto p = NativePath(var); if (!p.absolute) return (pack.path ~ p).toNativeString(); else return p.toNativeString(); } string[string] processVars(bool glob = false)(in Project project, in Package pack, in GeneratorSettings gsettings, in string[string] vars, in string[string][] extraVers = null) { string[string] ret; processVars!glob(ret, project, pack, gsettings, vars, extraVers); return ret; } void processVars(bool glob = false)(ref string[string] dst, in Project project, in Package pack, in GeneratorSettings gsettings, in string[string] vars, in string[string][] extraVers) { static if (glob) alias process = processVarsWithGlob!(Project, Package); else alias process = processVars!(Project, Package); foreach (k, var; vars) dst[k] = process(var, project, pack, gsettings, false, extraVers); } private string[] processVarsWithGlob(Project, Package)(string var, in Project project, in Package pack, in GeneratorSettings gsettings, bool is_path, in string[string][] extraVers) { assert(is_path, "can't glob something that isn't a path"); string res = processVars(var, project, pack, gsettings, is_path, extraVers); // Find the unglobbed prefix and iterate from there. size_t i = 0; size_t sepIdx = 0; loop: while (i < res.length) { switch_: switch (res[i]) { case '*', '?', '[', '{': break loop; case '/': sepIdx = i; goto default; default: ++i; break switch_; } } if (i == res.length) //no globbing found in the path return [res]; import std.path : globMatch; import std.file : dirEntries, SpanMode; return dirEntries(res[0 .. sepIdx], SpanMode.depth) .map!(de => de.name) .filter!(name => globMatch(name, res)) .array; } /// Expand variables using `$VAR_NAME` or `${VAR_NAME}` syntax. /// `$$` escapes itself and is expanded to a single `$`. private string expandVars(alias expandVar)(string s) { import std.functional : not; auto result = appender!string; static bool isVarChar(char c) { import std.ascii; return isAlphaNum(c) || c == '_'; } while (true) { auto pos = s.indexOf('$'); if (pos < 0) { result.put(s); return result.data; } result.put(s[0 .. pos]); s = s[pos + 1 .. $]; enforce(s.length > 0, "Variable name expected at end of string"); switch (s[0]) { case '$': result.put("$"); s = s[1 .. $]; break; case '{': pos = s.indexOf('}'); enforce(pos >= 0, "Could not find '}' to match '${'"); result.put(expandVar(s[1 .. pos])); s = s[pos + 1 .. $]; break; default: pos = s.representation.countUntil!(not!isVarChar); if (pos < 0) pos = s.length; result.put(expandVar(s[0 .. pos])); s = s[pos .. $]; break; } } } unittest { string[string] vars = [ "A" : "a", "B" : "b", ]; string expandVar(string name) { auto p = name in vars; enforce(p, name); return *p; } assert(expandVars!expandVar("") == ""); assert(expandVars!expandVar("x") == "x"); assert(expandVars!expandVar("$$") == "$"); assert(expandVars!expandVar("x$$") == "x$"); assert(expandVars!expandVar("$$x") == "$x"); assert(expandVars!expandVar("$$$$") == "$$"); assert(expandVars!expandVar("x$A") == "xa"); assert(expandVars!expandVar("x$$A") == "x$A"); assert(expandVars!expandVar("$A$B") == "ab"); assert(expandVars!expandVar("${A}$B") == "ab"); assert(expandVars!expandVar("$A${B}") == "ab"); assert(expandVars!expandVar("a${B}") == "ab"); assert(expandVars!expandVar("${A}b") == "ab"); import std.exception : assertThrown; assertThrown(expandVars!expandVar("$")); assertThrown(expandVars!expandVar("${}")); assertThrown(expandVars!expandVar("$|")); assertThrown(expandVars!expandVar("x$")); assertThrown(expandVars!expandVar("$X")); assertThrown(expandVars!expandVar("${")); assertThrown(expandVars!expandVar("${X")); // https://github.com/dlang/dmd/pull/9275 assert(expandVars!expandVar("$${DUB_EXE:-dub}") == "${DUB_EXE:-dub}"); } // Keep the following list up-to-date if adding more build settings variables. /// List of variables that can be used in build settings package(dub) immutable buildSettingsVars = [ "ARCH", "PLATFORM", "PLATFORM_POSIX", "BUILD_TYPE" ]; private string getVariable(Project, Package)(string name, in Project project, in Package pack, in GeneratorSettings gsettings, in string[string][] extraVars = null) { import dub.internal.utils : getDUBExePath; import std.process : environment, escapeShellFileName; import std.uni : asUpperCase; NativePath path; if (name == "PACKAGE_DIR") path = pack.path; else if (name == "ROOT_PACKAGE_DIR") path = project.rootPackage.path; if (name.endsWith("_PACKAGE_DIR")) { auto pname = name[0 .. $-12]; foreach (prj; project.getTopologicalPackageList()) if (prj.name.asUpperCase.map!(a => a == '-' ? '_' : a).equal(pname)) { path = prj.path; break; } } if (!path.empty) { // no trailing slash for clean path concatenation (see #1392) path.endsWithSlash = false; return path.toNativeString(); } if (name == "DUB") { return getDUBExePath(gsettings.platform.compilerBinary); } if (name == "ARCH") { foreach (a; gsettings.platform.architecture) return a; return ""; } if (name == "PLATFORM") { import std.algorithm : filter; foreach (p; gsettings.platform.platform.filter!(p => p != "posix")) return p; foreach (p; gsettings.platform.platform) return p; return ""; } if (name == "PLATFORM_POSIX") { import std.algorithm : canFind; if (gsettings.platform.platform.canFind("posix")) return "posix"; foreach (p; gsettings.platform.platform) return p; return ""; } if (name == "BUILD_TYPE") return gsettings.buildType; if (name == "DFLAGS" || name == "LFLAGS") { auto buildSettings = pack.getBuildSettings(gsettings.platform, gsettings.config); if (name == "DFLAGS") return join(buildSettings.dflags," "); else if (name == "LFLAGS") return join(buildSettings.lflags," "); } import std.range; foreach (aa; retro(extraVars)) if (auto exvar = name in aa) return *exvar; auto envvar = environment.get(name); if (envvar !is null) return envvar; throw new Exception("Invalid variable: "~name); } unittest { static struct MockPackage { this(string name) { this.name = name; version (Posix) path = NativePath("/pkgs/"~name); else version (Windows) path = NativePath(`C:\pkgs\`~name); // see 4d4017c14c, #268, and #1392 for why this all package paths end on slash internally path.endsWithSlash = true; } string name; NativePath path; BuildSettings getBuildSettings(in BuildPlatform platform, string config) const { return BuildSettings(); } } static struct MockProject { MockPackage rootPackage; inout(MockPackage)[] getTopologicalPackageList() inout { return _dependencies; } private: MockPackage[] _dependencies; } MockProject proj = { rootPackage: MockPackage("root"), _dependencies: [MockPackage("dep1"), MockPackage("dep2")] }; auto pack = MockPackage("test"); GeneratorSettings gsettings; enum isPath = true; import std.path : dirSeparator; static NativePath woSlash(NativePath p) { p.endsWithSlash = false; return p; } // basic vars assert(processVars("Hello $PACKAGE_DIR", proj, pack, gsettings, !isPath) == "Hello "~woSlash(pack.path).toNativeString); assert(processVars("Hello $ROOT_PACKAGE_DIR", proj, pack, gsettings, !isPath) == "Hello "~woSlash(proj.rootPackage.path).toNativeString.chomp(dirSeparator)); assert(processVars("Hello $DEP1_PACKAGE_DIR", proj, pack, gsettings, !isPath) == "Hello "~woSlash(proj._dependencies[0].path).toNativeString); // ${VAR} replacements assert(processVars("Hello ${PACKAGE_DIR}"~dirSeparator~"foobar", proj, pack, gsettings, !isPath) == "Hello "~(pack.path ~ "foobar").toNativeString); assert(processVars("Hello $PACKAGE_DIR"~dirSeparator~"foobar", proj, pack, gsettings, !isPath) == "Hello "~(pack.path ~ "foobar").toNativeString); // test with isPath assert(processVars("local", proj, pack, gsettings, isPath) == (pack.path ~ "local").toNativeString); assert(processVars("foo/$$ESCAPED", proj, pack, gsettings, isPath) == (pack.path ~ "foo/$ESCAPED").toNativeString); assert(processVars("$$ESCAPED", proj, pack, gsettings, !isPath) == "$ESCAPED"); // test other env variables import std.process : environment; environment["MY_ENV_VAR"] = "blablabla"; assert(processVars("$MY_ENV_VAR", proj, pack, gsettings, !isPath) == "blablabla"); assert(processVars("${MY_ENV_VAR}suffix", proj, pack, gsettings, !isPath) == "blablablasuffix"); assert(processVars("$MY_ENV_VAR-suffix", proj, pack, gsettings, !isPath) == "blablabla-suffix"); assert(processVars("$MY_ENV_VAR:suffix", proj, pack, gsettings, !isPath) == "blablabla:suffix"); assert(processVars("$MY_ENV_VAR$MY_ENV_VAR", proj, pack, gsettings, !isPath) == "blablablablablabla"); environment.remove("MY_ENV_VAR"); } /** Holds and stores a set of version selections for package dependencies. This is the runtime representation of the information contained in "dub.selections.json" within a package's directory. */ final class SelectedVersions { private struct Selected { Dependency dep; //Dependency[string] packages; } private { enum FileVersion = 1; Selected[string] m_selections; bool m_dirty = false; // has changes since last save bool m_bare = true; } /// Default file name to use for storing selections. enum defaultFile = "dub.selections.json"; /// Constructs a new empty version selection. this() {} /** Constructs a new version selection from JSON data. The structure of the JSON document must match the contents of the "dub.selections.json" file. */ this(Json data) { deserialize(data); m_dirty = false; } /** Constructs a new version selections from an existing JSON file. */ this(NativePath path) { auto json = jsonFromFile(path); deserialize(json); m_dirty = false; m_bare = false; } /// Returns a list of names for all packages that have a version selection. @property string[] selectedPackages() const { return m_selections.keys; } /// Determines if any changes have been made after loading the selections from a file. @property bool dirty() const { return m_dirty; } /// Determine if this set of selections is still empty (but not `clear`ed). @property bool bare() const { return m_bare && !m_dirty; } /// Removes all selections. void clear() { m_selections = null; m_dirty = true; } /// Duplicates the set of selected versions from another instance. void set(SelectedVersions versions) { m_selections = versions.m_selections.dup; m_dirty = true; } /// Selects a certain version for a specific package. void selectVersion(string package_id, Version version_) { if (auto ps = package_id in m_selections) { if (ps.dep == Dependency(version_)) return; } m_selections[package_id] = Selected(Dependency(version_)/*, issuer*/); m_dirty = true; } /// Selects a certain path for a specific package. void selectVersion(string package_id, NativePath path) { if (auto ps = package_id in m_selections) { if (ps.dep == Dependency(path)) return; } m_selections[package_id] = Selected(Dependency(path)); m_dirty = true; } /// Selects a certain Git reference for a specific package. void selectVersionWithRepository(string package_id, Repository repository, string spec) { const dependency = Dependency(repository, spec); if (auto ps = package_id in m_selections) { if (ps.dep == dependency) return; } m_selections[package_id] = Selected(dependency); m_dirty = true; } /// Removes the selection for a particular package. void deselectVersion(string package_id) { m_selections.remove(package_id); m_dirty = true; } /// Determines if a particular package has a selection set. bool hasSelectedVersion(string packageId) const { return (packageId in m_selections) !is null; } /** Returns the selection for a particular package. Note that the returned `Dependency` can either have the `Dependency.path` property set to a non-empty value, in which case this is a path based selection, or its `Dependency.version_` property is valid and it is a version selection. */ Dependency getSelectedVersion(string packageId) const { enforce(hasSelectedVersion(packageId)); return m_selections[packageId].dep; } /** Stores the selections to disk. The target file will be written in JSON format. Usually, `defaultFile` should be used as the file name and the directory should be the root directory of the project's root package. */ void save(NativePath path) { Json json = serialize(); auto file = openFile(path, FileMode.createTrunc); scope(exit) file.close(); assert(json.type == Json.Type.object); assert(json.length == 2); assert(json["versions"].type != Json.Type.undefined); file.write("{\n\t\"fileVersion\": "); file.writeJsonString(json["fileVersion"]); file.write(",\n\t\"versions\": {"); auto vers = json["versions"].get!(Json[string]); bool first = true; foreach (k; vers.byKey.array.sort()) { if (!first) file.write(","); else first = false; file.write("\n\t\t"); file.writeJsonString(Json(k)); file.write(": "); file.writeJsonString(vers[k]); } file.write("\n\t}\n}\n"); m_dirty = false; m_bare = false; } static Json dependencyToJson(Dependency d) { if (!d.repository.empty) { return serializeToJson([ "version": d.version_.toString(), "repository": d.repository.toString, ]); } else if (d.path.empty) return Json(d.version_.toString()); else return serializeToJson(["path": d.path.toString()]); } static Dependency dependencyFromJson(Json j) { if (j.type == Json.Type.string) return Dependency(Version(j.get!string)); else if (j.type == Json.Type.object && "path" in j) return Dependency(NativePath(j["path"].get!string)); else if (j.type == Json.Type.object && "repository" in j) return Dependency(Repository(j["repository"].get!string), enforce("version" in j, "Expected \"version\" field in repository version object").get!string); else throw new Exception(format("Unexpected type for dependency: %s", j)); } Json serialize() const { Json json = serializeToJson(m_selections); Json serialized = Json.emptyObject; serialized["fileVersion"] = FileVersion; serialized["versions"] = Json.emptyObject; foreach (p, v; m_selections) serialized["versions"][p] = dependencyToJson(v.dep); return serialized; } private void deserialize(Json json) { enforce(cast(int)json["fileVersion"] == FileVersion, "Mismatched dub.select.json version: " ~ to!string(cast(int)json["fileVersion"]) ~ "vs. " ~to!string(FileVersion)); clear(); scope(failure) clear(); foreach (string p, v; json["versions"]) m_selections[p] = Selected(dependencyFromJson(v)); } }
D
module game.fpcamera; import derelict.opengl.gl; import dlib.core.memory; import dlib.math.vector; import dlib.math.matrix; import dlib.math.affine; import dlib.math.utils; import dgl.core.interfaces; import dgl.graphics.camera; class FirstPersonCamera: Modifier, Camera { Matrix4x4f transformation; Matrix4x4f gunTransformation; Vector3f position; Vector3f eyePosition = Vector3f(0, 0, 0); Vector3f gunPosition = Vector3f(0, 0, 0); float turn = 0.0f; float pitch = 0.0f; float roll = 0.0f; float gunPitch = 0.0f; float gunRoll = 0.0f; Matrix4x4f worldTransInv; this(Vector3f position) { this.position = position; } Matrix4x4f worldTrans(double dt) { Matrix4x4f m = translationMatrix(position + eyePosition); m *= rotationMatrix(Axis.y, degtorad(turn)); m *= rotationMatrix(Axis.x, degtorad(pitch)); m *= rotationMatrix(Axis.z, degtorad(roll)); return m; } Matrix4x4f getTransform() { return transformation; } override void bind(double dt) { transformation = worldTrans(dt); gunTransformation = translationMatrix(position + eyePosition); gunTransformation *= rotationMatrix(Axis.y, degtorad(turn)); gunTransformation *= rotationMatrix(Axis.x, degtorad(gunPitch)); gunTransformation *= rotationMatrix(Axis.z, degtorad(gunRoll)); gunTransformation *= translationMatrix(gunPosition); worldTransInv = transformation.inverse; glPushMatrix(); glMultMatrixf(worldTransInv.arrayof.ptr); } override void unbind() { glPopMatrix(); } void free() { Delete(this); } }
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 vtkImageGradientMagnitude; 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 vtkThreadedImageAlgorithm; class vtkImageGradientMagnitude : vtkThreadedImageAlgorithm.vtkThreadedImageAlgorithm { private void* swigCPtr; public this(void* cObject, bool ownCObject) { super(vtkd_im.vtkImageGradientMagnitude_Upcast(cObject), ownCObject); swigCPtr = cObject; } public static void* swigGetCPtr(vtkImageGradientMagnitude 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 vtkImageGradientMagnitude New() { void* cPtr = vtkd_im.vtkImageGradientMagnitude_New(); vtkImageGradientMagnitude ret = (cPtr is null) ? null : new vtkImageGradientMagnitude(cPtr, false); return ret; } public static int IsTypeOf(string type) { auto ret = vtkd_im.vtkImageGradientMagnitude_IsTypeOf((type ? std.string.toStringz(type) : null)); return ret; } public static vtkImageGradientMagnitude SafeDownCast(vtkObjectBase.vtkObjectBase o) { void* cPtr = vtkd_im.vtkImageGradientMagnitude_SafeDownCast(vtkObjectBase.vtkObjectBase.swigGetCPtr(o)); vtkImageGradientMagnitude ret = (cPtr is null) ? null : new vtkImageGradientMagnitude(cPtr, false); return ret; } public vtkImageGradientMagnitude NewInstance() const { void* cPtr = vtkd_im.vtkImageGradientMagnitude_NewInstance(cast(void*)swigCPtr); vtkImageGradientMagnitude ret = (cPtr is null) ? null : new vtkImageGradientMagnitude(cPtr, false); return ret; } alias vtkThreadedImageAlgorithm.vtkThreadedImageAlgorithm.NewInstance NewInstance; public void SetHandleBoundaries(int _arg) { vtkd_im.vtkImageGradientMagnitude_SetHandleBoundaries(cast(void*)swigCPtr, _arg); } public int GetHandleBoundaries() { auto ret = vtkd_im.vtkImageGradientMagnitude_GetHandleBoundaries(cast(void*)swigCPtr); return ret; } public void HandleBoundariesOn() { vtkd_im.vtkImageGradientMagnitude_HandleBoundariesOn(cast(void*)swigCPtr); } public void HandleBoundariesOff() { vtkd_im.vtkImageGradientMagnitude_HandleBoundariesOff(cast(void*)swigCPtr); } public void SetDimensionality(int _arg) { vtkd_im.vtkImageGradientMagnitude_SetDimensionality(cast(void*)swigCPtr, _arg); } public int GetDimensionalityMinValue() { auto ret = vtkd_im.vtkImageGradientMagnitude_GetDimensionalityMinValue(cast(void*)swigCPtr); return ret; } public int GetDimensionalityMaxValue() { auto ret = vtkd_im.vtkImageGradientMagnitude_GetDimensionalityMaxValue(cast(void*)swigCPtr); return ret; } public int GetDimensionality() { auto ret = vtkd_im.vtkImageGradientMagnitude_GetDimensionality(cast(void*)swigCPtr); return ret; } }
D
/** Copyright: Copyright (c) 2017-2019 Andrey Penechko. License: $(WEB boost.org/LICENSE_1_0.txt, Boost License 1.0). Authors: Andrey Penechko. */ module utils; public import core.bitop : bsr; public import core.time : MonoTime, Duration, usecs, dur; public import std.algorithm : min, max, swap; public import std.conv : to; public import std.exception : enforce; public import std.format : formattedWrite; public import std.stdio : stdout, write, writef, writeln, writefln; public import std.string : format; public import utils.arena; public import utils.arenapool; public import utils.array; public import utils.arrayarena; public import utils.buffer; public import utils.fixedbuffer; public import utils.har : parseHar; public import utils.hash; public import utils.mem; public import utils.numfmt; public import utils.textsink; enum PAGE_SIZE = 4096; enum ulong GiB = 1024UL*1024*1024; string[] gatherEnumStrings(E)() { string[] res = new string[__traits(allMembers, E).length]; foreach (i, m; __traits(allMembers, E)) { res[i] = __traits(getAttributes, __traits(getMember, E, m))[0]; } return res; } void printHex(ubyte[] buffer, size_t lineLength) { import std.stdio; size_t index = 0; if (lineLength) { while (index + lineLength <= buffer.length) { writefln("%(%02X %)", buffer[index..index+lineLength]); index += lineLength; } } if (index < buffer.length) writefln("%(%02X %)", buffer[index..buffer.length]); } T divCeil(T)(T a, T b) { return a / b + (a % b > 0); } T nextPOT(T)(T x) { --x; x |= x >> 1; // handle 2 bit numbers x |= x >> 2; // handle 4 bit numbers x |= x >> 4; // handle 8 bit numbers static if (T.sizeof >= 2) x |= x >> 8; // handle 16 bit numbers static if (T.sizeof >= 4) x |= x >> 16; // handle 32 bit numbers static if (T.sizeof >= 8) x |= x >> 32; // handle 64 bit numbers ++x; return x; } T isPowerOfTwo(T)(T x) { return (x != 0) && ((x & (~x + 1)) == x); } /// alignment is POT T alignValue(T)(T value, T alignment) pure { assert(isPowerOfTwo(alignment), format("alignment is not power of two (%s)", alignment)); return cast(T)((value + (alignment-1)) & ~(alignment-1)); } /// multiple can be NPOT T roundUp(T)(T value, T multiple) pure { assert(multiple != 0, "multiple must not be zero"); return cast(T)(((value + multiple - 1) / multiple) * multiple); } /// alignment is POT T paddingSize(T)(T address, T alignment) { return cast(T)(alignValue(address, alignment) - address); } MonoTime currTime() { return MonoTime.currTime(); } T[] removeInPlace(T)(T[] array, T what) { size_t i = 0; size_t length = array.length; while(i < length) { if (array[i] == what) { array[i] = array[length-1]; --length; } ++i; } return assumeSafeAppend(array[0..length]); } unittest { assert(removeInPlace([], 1) == []); assert(removeInPlace([1], 1) == []); assert(removeInPlace([1], 2) == [1]); assert(removeInPlace([1, 2], 2) == [1]); assert(removeInPlace([2, 1], 2) == [1]); } struct FileDataSlicer { ubyte[] fileData; size_t fileCursor = 0; // Returns array of Ts of length 'length' stating from fileCursor offset in fileData T[] getArrayOf(T)(size_t length) { enforce(fileData.length >= fileCursor + T.sizeof * length); auto res = (cast(T*)(fileData.ptr + fileCursor))[0..length]; fileCursor += T.sizeof * length; return res; } T* getPtrTo(T)() { return getArrayOf!T(1).ptr; } T parseBigEndian(T)() { ubyte[T.sizeof] buf = getArrayOf!ubyte(T.sizeof); return bigEndianToNative!T(buf); } void advanceToAlignment(size_t alignment) { fileCursor += paddingSize(fileCursor, alignment); } }
D
/** * Contains methods for working with strings. * * Methods that perform comparisons are culturally sensitive. * * Copyright: (c) 2009 John Chapman * * License: See $(LINK2 ..\..\licence.txt, licence.txt) for use and distribution terms. */ module os.win.base.string; import os.win.base.core, os.win.loc.consts, os.win.loc.core, os.win.loc.time, os.win.loc.conv; import std.utf : toUTF8, toUTF16, toUTF16z; import std.string : wcslen, strlen, toStringz; import std.c; import std.stdarg; //debug import std.io : writeln; version(D_Version2) { mixin("alias const(char)* stringz;"); mixin("alias const(wchar*) wstringz;"); } else { alias char* stringz; alias wchar* wstringz; } string toUtf8(in char* s, int index = 0, int count = -1) { if (s == null) return ""; if (count == -1) count = strlen(s); if (count == 0) return ""; version(D_Version2) { return s[index .. count].idup; } else { return s[index .. count].dup; } } string toUtf8(in wchar* s, int index = 0, int count = -1) { if (s == null) return ""; if (count == -1) count = std.c.wcslen(s); if (count == 0) return ""; return s[index .. count].toUTF8(); } stringz toUtf8z(in char[] s, int index = 0, int count = -1) { if (s == null) return ""; if (count == -1) count = s.length; if (count == 0) return ""; return s[index .. count].toStringz(); } version(D_Version2) { stringz toUtf8z(string s, int index = 0, int count = -1) { if (s == null) return ""; if (count == -1) count = s.length; if (count == 0) return ""; return s[index .. count].toStringz(); } } string toUtf8(in wchar[] s, int index = 0, int count = -1) { if (s == null) return ""; if (count == -1) count = s.length; if (count == 0) return ""; return s[index .. count].toUTF8(); } version(D_Version2) { string toUtf8(string s, int index = 0, int count = -1) { if (s == null) return ""; if (count == -1) count = s.length; if (count == 0) return ""; return s[index .. count].toUTF8(); } } wstring toUtf16(string s, int index = 0, int count = -1) { if (s == null) return ""; if (count == -1) count = s.length; if (count == 0) return ""; return s[index .. count].toUTF16(); } wstringz toUtf16z(in char[] s, int index = 0, int count = -1) { if (s == null) return ""; if (count == -1) count = s.length; if (count == 0) return ""; return s[index .. count].toUTF16z(); } version(D_Version2) { wstringz toUtf16z(string s, int index = 0, int count = -1) { if (s == null) return ""; if (count == -1) count = s.length; if (count == 0) return ""; return s[index .. count].toUTF16z(); } } /** * Compares two specified strings, ignoring or honouring their case. * Параметры: * stringA = The first string. * stringB = The second string. * ignoreCase = A value indicating a case- sensitive or insensitive comparison. * Возвращает: An integer indicating the lexical relationship between the two strings (less than zero if stringA is less then stringB; zero if stringA equals stringB; greater than zero if stringA is greater than stringB). */ int compare(string stringA, string stringB, bool ignoreCase, Culture culture = null) { if (culture is null) culture = Culture.current; if (stringA != stringB) { if (stringA == null) return -1; if (stringB == null) return -1; return culture.collator.compare(stringA, stringB, ignoreCase ? CompareOptions.IgnoreCase : CompareOptions.None); } return 0; } /** * ditto */ int compare(string stringA, string stringB, Culture culture) { if (culture is null) throw new ArgumentNullException("culture"); return compare(stringA, stringB, false, culture); } /** * ditto */ int compare(string stringA, string stringB) { return compare(stringA, stringB, false, Culture.current); } /** * Compares two specified strings, ignoring or honouring their case. * Параметры: * stringA = The first string. * indexA = The position of the substring withing stringA. * stringB = The second string. * indexB = The position of the substring withing stringB. * ignoreCase = A value indicating a case- sensitive or insensitive comparison. * Возвращает: An integer indicating the lexical relationship between the two strings (less than zero if the substring in stringA is less then the substring in stringB; zero if the substrings are equal; greater than zero if the substring in stringA is greater than the substring in stringB). */ int compare(string stringA, int indexA, string stringB, int indexB, int length, bool ignoreCase = false, Culture culture = null) { if (culture is null) culture = Culture.current; if (length != 0 && (stringA != stringB || indexA != indexB)) { int lengthA = length, lengthB = length; if (stringA.length - indexA < lengthA) lengthA = stringA.length - indexA; if (stringB.length - indexB < lengthB) lengthB = stringB.length - indexB; return culture.collator.compare(stringA, indexA, lengthA, stringB, indexB, lengthB, ignoreCase ? CompareOptions.IgnoreCase : CompareOptions.None); } return 0; } /** * ditto */ int compare(string stringA, int indexA, string stringB, int indexB, int length, Culture culture) { if (culture is null) throw new ArgumentNullException("culture"); return compare(stringA, indexA, stringB, indexB, length, false, culture); } /** * Determines whether two specified strings are the same, ignoring or honouring their case. * Параметры: * stringA = The first string. * stringB = The second string. * ignoreCase = A value indicating a case- sensitive or insensitive comparison. * Возвращает: true if stringA то же самое, что stringB; otherwise, false. */ bool equals(string stringA, string stringB, bool ignoreCase = false) { return compare(stringA, stringB, ignoreCase) == 0; } /** * Determines whether the value parameter occurs within the s parameter. * Параметры: * s = The string to search within. * value = The string to find. * Возвращает: true if the value parameter occurs within the s parameter; otherwise, false. */ bool contains(string s, string value) { return s.indexOf(value) >= 0; } /** * Retrieves the index of the first occurrence of the specified character within the specified string. * Параметры: * s = The string to search within. * value = The character to find. * index = The start position of the search. * count = The number of characters to examine. * Возвращает: The index of value if that character is found, or -1 if it is not. */ int indexOf(string s, char value, int index = 0, int count = -1) { if (count == -1) count = s.length - index; int end = index + count; for (int i = index; i < end; i++) { if (s[i] == value) return i; } return -1; } /** * Retrieves the index of the first occurrence of the specified value in the specified string s. * Параметры: * s = The string to search within. * value = The string to find. * index = The start position of the search. * count = The number of characters to examine. * ignoreCase = A value indicating a case- sensitive or insensitive comparison. * Возвращает: The index of value if that string is found, or -1 if it is not. */ int indexOf(string s, string value, int index, int count, bool ignoreCase = false, Culture culture = null) { if (culture is null) culture = Culture.current; return culture.collator.indexOf(s, value, index, count, ignoreCase ? CompareOptions.IgnoreCase : CompareOptions.None); } /** * ditto */ int indexOf(string s, string value, int index, bool ignoreCase = false, Culture culture = null) { return indexOf(s, value, index, s.length - index, ignoreCase, culture); } /** * ditto */ int indexOf(string s, string value, bool ignoreCase = false, Culture culture = null) { return indexOf(s, value, 0, s.length, ignoreCase, culture); } int indexOfAny(string s, in char[] anyOf, int index = 0, int count = -1) { if (count == -1) count = s.length - index; int end = index + count; for (int i = index; i < end; i++) { int k = -1; for (int j = 0; j < anyOf.length; j++) { if (s[i] == anyOf[j]) { k = j; break; } } if (k != -1) return i; } return -1; } /** * Retrieves the index of the last occurrence of the specified character within the specified string. * Параметры: * s = The string to search within. * value = The character to find. * index = The start position of the search. * count = The number of characters to examine. * Возвращает: The index of value if that character is found, or -1 if it is not. */ int lastIndexOf(string s, char value, int index = 0, int count = -1) { if (s.length == 0) return -1; if (count == -1) { index = s.length - 1; count = s.length; } int end = index - count + 1; for (int i = index; i >= end; i--) { if (s[i] == value) return i; } return -1; } /** * Retrieves the index of the last occurrence of value within the specified string s. * Параметры: * s = The string to search within. * value = The string to find. * index = The start position of the search. * count = The number of characters to examine. * ignoreCase = A value indicating a case- sensitive or insensitive comparison. * Возвращает: The index of value if that character is found, or -1 if it is not. */ int lastIndexOf(string s, string value, int index, int count, bool ignoreCase = false, Culture culture = null) { if (s.length == 0 && (index == -1 || index == 0)) { if (value.length != 0) return -1; return 0; } if (index == s.length) { index--; if (count > 0) count--; if (value.length == 0 && count >= 0 && (index - count) + 1 >= 0) return index; } if (culture is null) culture = Culture.current; return culture.collator.lastIndexOf(s, value, index, count, ignoreCase ? CompareOptions.IgnoreCase : CompareOptions.None); } /** * ditto */ int lastIndexOf(string s, string value, int index, bool ignoreCase = false, Culture culture = null) { return lastIndexOf(s, value, index, index + 1, ignoreCase, culture); } /** * ditto */ int lastIndexOf(string s, string value, bool ignoreCase = false, Culture culture = null) { return lastIndexOf(s, value, s.length - 1, s.length, ignoreCase, culture); } int lastIndexOfAny(string s, in char[] anyOf, int index = -1, int count = -1) { if (s.length == 0) return -1; if (count == -1) { index = s.length - 1; count = s.length; } int end = index - count + 1; for (int i = index; i >= end; i--) { int k = -1; for (int j = 0; j < anyOf.length; j++) { if (s[i] == anyOf[j]) { k = j; break; } } if (k != -1) return i; } return -1; } /** * Determines whether the beginning of s matches value. * Параметры: * s = The string to search. * value = The string to compare. * ignoreCase = A value indicating a case- sensitive or insensitive comparison. * Возвращает: true if value matches the beginning of s; otherwise, false. */ bool startsWith(string s, string value, bool ignoreCase = false, Culture culture = null) { if (s == value) return true; if (culture is null) culture = Culture.current; return culture.collator.isPrefix(s, value, ignoreCase ? CompareOptions.IgnoreCase : CompareOptions.None); } /** * Determines whether the end of s matches value. * Параметры: * s = The string to search. * value = The string to compare. * ignoreCase = A value indicating a case- sensitive or insensitive comparison. * Возвращает: true if value matches the end of s; otherwise, false. */ bool endsWith(string s, string value, bool ignoreCase = false, Culture culture = null) { if (s == value) return true; if (culture is null) culture = Culture.current; return culture.collator.isSuffix(s, value, ignoreCase ? CompareOptions.IgnoreCase : CompareOptions.None); } /** * Inserts value at the specified index in s. * Параметры: * s = The string in which to _insert value. * index = The position of the insertion. * value = The string to _insert. * Возвращает: A new string with value inserted at index. */ string insert(string s, int index, string value) { if (value.length == 0 || s.length == 0) { version(D_Version2) { return s.idup; } else { return s.dup; } } int newLength = s.length + value.length; char[] newString = new char[newLength]; newString[0 .. index] = s[0 .. index]; newString[index .. index + value.length] = value; newString[index + value.length .. $] = s[index .. $]; return cast(string)newString; } /** * Deletes characters from s beginning at the specified position. * Параметры: * s = The string from which to delete characters. * index = The position to begin deleting characters. * count = The number of characters to delete. * Возвращает: A new string equivalent to s less count number of characters. */ string remove(string s, int index, int count) { char[] ret = new char[s.length - count]; memcpy(ret.ptr, s.ptr, index); memcpy(ret.ptr + index, s.ptr + (index + count), s.length - (index + count)); return cast(string)ret; } /** * ditto */ string remove(string s, int index) { return s[0 .. index]; } private char[] WhitespaceChars = [ '\t', '\n', '\v', '\f', '\r', ' ' ]; /** * Indicates whether the specified character is white space. * Параметры: c = A character. * Возвращает: true if c is white space; otherwise, false. */ bool isWhitespace(char c) { foreach (ch; WhitespaceChars) { if (ch == c) return true; } return false; } /** * Returns a string array containing the substrings in s that are delimited by elements of the specified char array. * Параметры: * s = The string to _split. * separator = An array of characters that delimit the substrings in s. * count = The maximum number of substrings to return. * removeEmptyEntries = true to omit empty array elements from the array returned, or false to include empty array elements in the array returned. * Возвращает: An array whose elements contain the substrings in s that are delimited by one or more characters in separator. */ string[] split(string s, char[] separator, int count, bool removeEmptyEntries = false) { int createSeparatorList(ref int[] sepList) { int foundCount; if (separator.length == 0) { for (int i = 0; i < s.length && foundCount < sepList.length; i++) { if (isWhitespace(s[i])) sepList[foundCount++] = i; } } else { for (int i = 0; i < s.length && foundCount < sepList.length; i++) { for (int j = 0; j < separator.length; j++) { if (s[i] == separator[j]) { sepList[foundCount++] = i; break; } } } } return foundCount; } if (count == 0 || (removeEmptyEntries && s.length == 0)) return new string[0]; int[] sepList = new int[s.length]; int replaceCount = createSeparatorList(sepList); if (replaceCount == 0 || count == 1) return [ s ]; return splitImpl(s, sepList, null, replaceCount, count, removeEmptyEntries); } /// ditto string[] split(string s, char[] separator, bool removeEmptyEntries) { return split(s, separator, int.max, removeEmptyEntries); } /// ditto string[] split(string s, char[] separator...) { return split(s, separator, int.max, false); } /** * Returns a string array containing the substrings in s that are delimited by elements of the specified string array. * Параметры: * s = The string to _split. * separator = An array of strings that delimit the substrings in s. * count = The maximum number of substrings to return. * removeEmptyEntries = true to omit empty array elements from the array returned, or false to include empty array elements in the array returned. * Возвращает: An array whose elements contain the substrings in s that are delimited by one or more strings in separator. */ string[] split(string s, string[] separator, int count = int.max, bool removeEmptyEntries = false) { int createSeparatorList(ref int[] sepList, ref int[] lengthList) { int foundCount; for (int i = 0; i < s.length && foundCount < sepList.length; i++) { for (int j = 0; j < separator.length; j++) { string sep = separator[j]; if (sep.length != 0) { if (s[i] == sep[0] && sep.length <= s.length - i) { if (sep.length == 1 || memcmp(s.ptr + i, sep.ptr, sep.length) == 0) { sepList[foundCount] = i; lengthList[foundCount] = sep.length; foundCount++; i += sep.length - 1; } } } } } return foundCount; } if (count == 0 || (removeEmptyEntries && s.length == 0)) return new string[0]; int[] sepList = new int[s.length]; int[] lengthList = new int[s.length]; int replaceCount = createSeparatorList(sepList, lengthList); if (replaceCount == 0 || count == 1) return [ s ]; return splitImpl(s, sepList, lengthList, replaceCount, count, removeEmptyEntries); } /** * ditto */ string[] split(string s, string[] separator, bool removeEmptyEntries) { return split(s, separator, int.max, removeEmptyEntries); } private string[] splitImpl(string s, int[] sepList, int[] lengthList, int replaceCount, int count, bool removeEmptyEntries) { string[] splitStrings; int arrayIndex, currentIndex; if (removeEmptyEntries) { int max = (replaceCount < count) ? replaceCount + 1 : count; splitStrings.length = max; for (int i = 0; i < replaceCount && currentIndex < s.length; i++) { if (sepList[i] - currentIndex > 0) splitStrings[arrayIndex++] = s[currentIndex .. sepList[i]]; currentIndex = sepList[i] + ((lengthList == null) ? 1 : lengthList[i]); if (arrayIndex == count - 1) { while (i < replaceCount - 1 && currentIndex == sepList[++i]) { currentIndex += ((lengthList == null) ? 1 : lengthList[i]); } break; } } if (currentIndex < s.length) splitStrings[arrayIndex++] = s[currentIndex .. $]; string[] strings = splitStrings; if (arrayIndex != max) { strings.length = arrayIndex; for (int j = 0; j < arrayIndex; j++) strings[j] = splitStrings[j]; } splitStrings = strings; } else { count--; int max = (replaceCount < count) ? replaceCount : count; splitStrings.length = max + 1; for (int i = 0; i < max && currentIndex < s.length; i++) { splitStrings[arrayIndex++] = s[currentIndex .. sepList[i]]; currentIndex = sepList[i] + ((lengthList == null) ? 1 : lengthList[i]); } if (currentIndex < s.length && max >= 0) splitStrings[arrayIndex] = s[currentIndex .. $]; else if (arrayIndex == max) splitStrings[arrayIndex] = null; } return splitStrings; } /** * Concatenates separator between each element of value, returning a single concatenated string. * Параметры: * separator = A string. * value = An array of strings. * index = The first element in value to use. * count = The number of elements of value to use. * Возвращает: A string containing the strings in value joined by separator. */ string join(string separator, string[] value, int index = 0, int count = -1) { if (count == -1) count = value.length; if (count == 0) return ""; int end = index + count - 1; string ret = value[index]; for (int i = index + 1; i <= end; i++) { ret ~= separator; ret ~= value[i]; } return ret; } /** * Replaces all instances of oldChar with newChar in s. * Параметры: * s = A string containing oldChar. * oldChar = The character to be replaced. * newChar = The character to replace all instances of oldChar. * Возвращает: A string equivalent to s but with all instances of oldChar replaced with newChar. */ string replace(string s, char oldChar, char newChar) { int len = s.length; int firstFound = -1; for (int i = 0; i < len; i++) { if (oldChar == s[i]) { firstFound = i; break; } } if (firstFound == -1) return s; char[] ret = s[0 .. firstFound].dup; ret.length = len; for (int i = firstFound; i < len; i++) ret[i] = (s[i] == oldChar) ? newChar : s[i]; return cast(string)ret; } /** * Replaces all instances of oldValue with newValue in s. * Параметры: * s = A string containing oldValue. * oldValue = The string to be replaced. * newValue = The string to replace all instances of oldValue. * Возвращает: A string equivalent to s but with all instances of oldValue replaced with newValue. */ string replace(string s, string oldValue, string newValue) { int[] indices = new int[s.length + oldValue.length]; int index, count; while (((index = indexOf(s, oldValue, index, s.length)) > -1) && (index <= s.length - oldValue.length)) { indices[count++] = index; index += oldValue.length; } char[] ret; if (count != 0) { ret.length = s.length - ((oldValue.length - newValue.length) * count); int limit = count; count = 0; int i, j; while (i < s.length) { if (count < limit && i == indices[count]) { count++; i += oldValue.length; ret[j .. j + newValue.length] = newValue; j += newValue.length; } else ret[j++] = s[i++]; } } else return s; return cast(string)ret; } /** * Right-aligns the characters in s, padding on the left with paddingChar for a specified total length. * Параметры: * s = The string to pad. * totalWidth = The number of characters in the resulting string. * paddingChar = A padding character. * Возвращает: A string equivalent to s but right-aligned and padded on the left with paddingChar. */ string padLeft(string s, int totalWidth, char paddingChar = ' ') { if (totalWidth < s.length) return s; char[] ret = new char[totalWidth]; ret[totalWidth - s.length .. $] = s; ret[0 .. totalWidth - s.length] = paddingChar; return cast(string)ret; } /** * Left-aligns the characters in s, padding on the right with paddingChar for a specified total length. * Параметры: * s = The string to pad. * totalWidth = The number of characters in the resulting string. * paddingChar = A padding character. * Возвращает: A string equivalent to s but left-aligned and padded on the right with paddingChar. */ string padRight(string s, int totalWidth, char paddingChar = ' ') { if (totalWidth < s.length) return s; char[] ret = s.dup; ret.length = totalWidth; ret[s.length .. $] = paddingChar; return cast(string)ret; } private enum Trim { Head, Tail, Both } /** * Removes all leading and trailing occurrences of a set of characters specified in trimChars from s. * Возвращает: The string that remains after all occurrences of the characters in trimChars are removed from the start and end of s. */ string trim(string s, char[] trimChars ...) { if (trimChars.length == 0) trimChars = WhitespaceChars; return trimHelper(s, trimChars, Trim.Both); } /** * Removes all leading occurrences of a set of characters specified in trimChars from s. * Возвращает: The string that remains after all occurrences of the characters in trimChars are removed from the start of s. */ string trimStart(string s, char[] trimChars ...) { if (trimChars.length == 0) trimChars = WhitespaceChars; return trimHelper(s, trimChars, Trim.Head); } /** * Removes all trailing occurrences of a set of characters specified in trimChars from s. * Возвращает: The string that remains after all occurrences of the characters in trimChars are removed from the end of s. */ string trimEnd(string s, char[] trimChars ...) { if (trimChars.length == 0) trimChars = WhitespaceChars; return trimHelper(s, trimChars, Trim.Tail); } private string trimHelper(string s, char[] trimChars, Trim trimType) { int right = s.length - 1; int left; if (trimType != Trim.Tail) { for (left = 0; left < s.length; left++) { char ch = s[left]; int i; while (i < trimChars.length) { if (trimChars[i] == ch) break; i++; } if (i == trimChars.length) break; } } if (trimType != Trim.Head) { for (right = s.length - 1; right >= left; right--) { char ch = s[right]; int i; while (i < trimChars.length) { if (trimChars[i] == ch) break; i++; } if (i == trimChars.length) break; } } int len = right - left + 1; if (len == s.length) return s; if (len == 0) return null; version(D_Version2) { return s[left .. right + 1].idup; } else { return s[left .. right + 1].dup; } } /** * Retrieves a _substring from s starting at the specified character position and has a specified length. * Параметры: * s = A string. * index = The starting character position of a _substring in s. * length = The number of characters in the _substring. * Возвращает: The _substring of length that begins at index in s. */ string substring(string s, int index, int length) { if (length == 0) return null; if (index == 0 && length == s.length) return s; char[] ret = new char[length]; memcpy(ret.ptr, s.ptr + index, length * char.sizeof); return cast(string)ret; } /** * ditto */ string substring(string s, int index) { return substring(s, index, s.length - index); } /** * Returns a copy of s converted to lowercase. * Параметры: s = The string to convert. * Возвращает: a string in lowercase. */ public string toLower(string s, Culture culture = null) { if (culture is null) culture = Culture.current; return culture.collator.toLower(s); } /** * Returns a copy of s converted to uppercase. * Параметры: s = The string to convert. * Возвращает: a string in uppercase. */ public string toUpper(string s, Culture culture = null) { if (culture is null) culture = Culture.current; return culture.collator.toUpper(s); } private enum TypeCode { Empty, Void = 'v', Bool = 'b', UByte = 'h', Byte = 'g', UShort = 't', Short = 's', UInt = 'k', Int = 'i', ULong = 'm', Long = 'l', Float = 'f', Double = 'd', Real = 'e', Char = 'a', WChar = 'u', DChar = 'w', Array = 'A', Class = 'C', Struct = 'S', Enum = 'E', Pointer = 'P', Function = 'F', Delegate = 'D', Typedef = 'T', Const = 'x', Invariant = 'y' } private TypeInfo skipConstOrInvariant(TypeInfo t) { while (true) { if (t.classinfo.name.length == 18 && t.classinfo.name[9 .. 18] == "Invariant") t = (cast(TypeInfo_Invariant)t).next; else if (t.classinfo.name.length == 14 && t.classinfo.name[9 .. 14] == "Const") t = (cast(TypeInfo_Const)t).next; else break; } return t; } private struct Argument { TypeInfo type; TypeCode typeCode; void* value; static Argument opCall(TypeInfo type, void* value) { Argument self; self.type = type; self.value = value; self.typeCode = cast(TypeCode)type.classinfo.name[9]; if (self.typeCode == TypeCode.Enum) { self.type = (cast(TypeInfo_Enum)type).base; self.typeCode = cast(TypeCode)self.type.classinfo.name[9]; } if (self.typeCode == TypeCode.Typedef) { self.type = (cast(TypeInfo_Typedef)type).base; self.typeCode = cast(TypeCode)self.type.classinfo.name[9]; } return self; } string toString(string format, IFormatProvider provider) { switch (typeCode) { case TypeCode.Array: TypeInfo ti = type; TypeCode tc = typeCode; if (ti.classinfo.name.length == 14 && ti.classinfo.name[9 .. 14] == "Array") { ti = skipConstOrInvariant((cast(TypeInfo_Array)ti).next); tc = cast(TypeCode)ti.classinfo.name[9]; if (tc == TypeCode.Char) return *cast(string*)value; } int i = 10; while (true) { tc = cast(TypeCode)ti.classinfo.name[i]; switch (tc) { case TypeCode.Char: return *cast(string*)value; case TypeCode.Const, TypeCode.Invariant: i++; continue; default: } break; } return type.toString(); case TypeCode.Bool: return *cast(bool*)value ? "True" : "False"; case TypeCode.UByte: return .toString(*cast(ubyte*)value, format, provider); case TypeCode.Byte: return .toString(*cast(byte*)value, format, provider); case TypeCode.UShort: return .toString(*cast(ushort*)value, format, provider); case TypeCode.Short: return .toString(*cast(short*)value, format, provider); case TypeCode.UInt: return .toString(*cast(uint*)value, format, provider); case TypeCode.Int: return .toString(*cast(int*)value, format, provider); case TypeCode.ULong: return .toString(*cast(ulong*)value, format, provider); case TypeCode.Long: return .toString(*cast(long*)value, format, provider); case TypeCode.Float: return .toString(*cast(float*)value, format, provider); case TypeCode.Double: return .toString(*cast(double*)value, format, provider); case TypeCode.Class: if (auto obj = *cast(Object*)value) return obj.toString(); break; case TypeCode.Struct: static if (is(DateTime)) { if (type == typeid(DateTime)) return (*cast(DateTime*)value).toString(format, provider); } if (auto ti = cast(TypeInfo_Struct)type) { if (ti.xtoString != null) return ti.xtoString(value); } // Fall through case TypeCode.Function, TypeCode.Delegate, TypeCode.Typedef: return type.toString(); default: break; } return null; } } private struct ArgumentList { Argument[] args; int size; static ArgumentList opCall(TypeInfo[] types, va_list argptr) { ArgumentList self; foreach (type; types) { type = skipConstOrInvariant(type); auto arg = Argument(type, argptr); self.args ~= arg; if (arg.typeCode == TypeCode.Struct) argptr += (type.tsize() + 3) & ~3; else argptr += (type.tsize() + int.sizeof - 1) & ~(int.sizeof - 1); self.size++; } return self; } Argument opIndex(int index) { return args[index]; } } /** * Replaces the _format items in the specified string with string representations of the corresponding items in the specified argument list. * Параметры: * provider = An object supplying culture-specific formatting information. * format = A _format string. * _argptr = An argument list containing zero or more items to _format. * Возвращает: A copy of format in which the _format items have been replaced by string representations of the corresponding items in the argument list. */ string format(IFormatProvider provider, string format, ...) { void formatError() { throw new FormatException("Input string was not in correct format."); } void append(ref string s, char value, int count) { char[] d = s.dup; int n = d.length; d.length = d.length + count; for (auto i = 0; i < count; i++) d[n + i] = value; version(D_Version2) { s = d.idup; } else { s = d.dup; } } auto types = _arguments; auto argptr = _argptr; void resolveArgs() { if (types.length == 2 && types[0] == typeid(TypeInfo[]) && types[1] == typeid(va_list)) { types = va_arg!(TypeInfo[])(argptr); argptr = *cast(va_list*)argptr; if (types.length == 2 && types[0] == typeid(TypeInfo[]) && types[1] == typeid(va_list)) { resolveArgs(); } } } resolveArgs(); auto args = ArgumentList(types, argptr); string result; char[] chars = format.dup; int pos, len = format.length; char c; while (true) { int p = pos, i = pos; while (pos < len) { c = chars[pos]; pos++; if (c == '}') { if (pos < len && chars[pos] == '}') pos++; else formatError(); } if (c == '{') { if (pos < len && chars[pos] == '{') pos++; else { pos--; break; } } chars[i++] = c; } if (i > p) result ~= chars[p .. i]; if (pos == len) break; pos++; if (pos == len || (c = chars[pos]) < '0' || c > '9') formatError(); int index = 0; do { index = index * 10 + c - '0'; pos++; if (pos == len) formatError(); c = chars[pos]; } while (c >= '0' && c <= '9'); if (index >= args.size) throw new FormatException("Index must be less than the size of the argument list."); while (pos < len && (c = chars[pos]) == ' ') pos++; int width = 0; bool leftAlign = false; if (c == ',') { pos++; while (pos < len && (c = chars[pos]) == ' ') pos++; if (pos == len) formatError(); c = chars[pos]; if (c == '-') { leftAlign = true; pos++; if (pos == len) formatError(); c = chars[pos]; } if (c < '0' || c > '9') formatError(); do { width = width * 10 + c - '0'; pos++; if (pos == len) formatError(); c = chars[pos]; } while (c >= '0' && c <= '9'); } while (pos < len && (c = chars[pos]) == ' ') pos++; auto arg = args[index]; string fmt = null; if (c == ':') { pos++; p = pos, i = pos; while (true) { c = chars[pos]; pos++; if (c == '{') { if (pos < len && chars[pos] == '{') pos++; else formatError(); } if (c == '}') { if (pos < len && chars[pos] == '}') pos++; else { pos--; break; } } chars[i++] = c; } if (i > p) { version(D_Version2) { fmt = chars[p .. i].idup; } else { fmt = chars[p .. i].dup; } } } if (c != '}') formatError(); pos++; string s = arg.toString(fmt, provider); int padding = width - s.length; if (!leftAlign && padding > 0) append(result, ' ', padding); result ~= s; if (leftAlign && padding > 0) append(result, ' ', padding); } return result; } /** * ditto */ string format(string format, ...) { return .format(cast(IFormatProvider)null, format, _arguments, _argptr); }
D
module UnrealScript.TribesGame.TrVehicleWeapon_BeowulfGunner; import ScriptClasses; import UnrealScript.Helpers; import UnrealScript.TribesGame.TrSkelControl_SpinControl; import UnrealScript.TribesGame.TrVehicleWeapon_FullAuto; extern(C++) interface TrVehicleWeapon_BeowulfGunner : TrVehicleWeapon_FullAuto { public extern(D): private static __gshared ScriptClass mStaticClass; @property final static ScriptClass StaticClass() { mixin(MGSCC("Class TribesGame.TrVehicleWeapon_BeowulfGunner")); } private static __gshared TrVehicleWeapon_BeowulfGunner mDefaultProperties; @property final static TrVehicleWeapon_BeowulfGunner DefaultProperties() { mixin(MGDPC("TrVehicleWeapon_BeowulfGunner", "TrVehicleWeapon_BeowulfGunner TribesGame.Default__TrVehicleWeapon_BeowulfGunner")); } static struct Functions { private static __gshared { ScriptFunction mInitVehicleGun; ScriptFunction mActivate; } public @property static final { ScriptFunction InitVehicleGun() { mixin(MGF("mInitVehicleGun", "Function TribesGame.TrVehicleWeapon_BeowulfGunner.InitVehicleGun")); } ScriptFunction Activate() { mixin(MGF("mActivate", "Function TribesGame.TrVehicleWeapon_BeowulfGunner.Activate")); } } } static struct WeaponFullAutoFiring { private static __gshared ScriptState mStaticClass; @property final static ScriptState StaticClass() { mixin(MGSCSA("State TribesGame.TrVehicleWeapon_BeowulfGunner.WeaponFullAutoFiring")); } } @property final auto ref TrSkelControl_SpinControl m_BarrelSpinControl() { mixin(MGPC("TrSkelControl_SpinControl", 1804)); } final: void InitVehicleGun() { (cast(ScriptObject)this).ProcessEvent(Functions.InitVehicleGun, cast(void*)0, cast(void*)0); } void Activate() { (cast(ScriptObject)this).ProcessEvent(Functions.Activate, cast(void*)0, cast(void*)0); } }
D
a logarithmic unit of sound intensity equal to 10 decibels Babylonian god of the earth
D
c: Copyright (C) 1998 - 2022, Daniel Stenberg, <daniel@haxx.se>, et al. SPDX-License-Identifier: curl Short: C Long: continue-at Arg: <offset> Help: Resumed transfer offset See-also: range Category: connection Example: -C - $URL Example: -C 400 $URL Added: 4.8 Multi: single --- Continue/Resume a previous file transfer at the given offset. The given offset is the exact number of bytes that will be skipped, counting from the beginning of the source file before it is transferred to the destination. If used with uploads, the FTP server command SIZE will not be used by curl. Use "-C -" to tell curl to automatically find out where/how to resume the transfer. It then uses the given output/input files to figure that out.
D
module tower_controller; import math; import collections; import types; import std.conv; import enemy_collection; import std.algorithm : countUntil, min, max; import graphics; import game; import content; import spriter.types; import spriter.renderer; enum maxPressure = 1000; enum AnimationState : string { idle = "idle", broken = "broken" } interface ITowerController { @property TileType type(); void buildTower(uint towerIndex, uint prototypeIndex); void removeTower(uint towerIndex, BaseTower base); void enterTower(int towerIndex, ulong playerID); void exitTower(int towerIndex, ulong playerID); void breakTower(int towerIndex); void repairTower(int towerIndex); void update(List!BaseEnemy enemies); void render(List!BaseEnemy enemies); } struct BaseTower { float2 position; bool isBroken; ulong ownedPlayerID; float pressure; float regenRate; uint metaIndex; float range; float angle; SpriteInstance sprite; } uint2 cell(T)(T t, float2 tileSize) { return uint2(cast(int)(t.position.x / tileSize.x), cast(int)(t.position.y / tileSize.y)); } alias TowerBrokeHandler = void delegate(TowerCollection, uint); final class TowerCollection { float2 tileSize; List!ITowerController controllers; List!BaseTower baseTowers; List!TowerBrokeHandler onTowerBroken; List!Tower metas; this(A)(ref A allocator, List!Tower metas) { this.controllers = List!ITowerController(allocator, 10); this.baseTowers = List!BaseTower(allocator, 200); this.onTowerBroken = List!TowerBrokeHandler(allocator, 10); this.metas = metas; } final void buildTower(float2 position, ubyte metaIndex, ulong ownedPlayerID) { foreach(tc; controllers) { if(tc.type == metas[metaIndex].type) { baseTowers ~= BaseTower(position, false, ownedPlayerID, maxPressure*metas[metaIndex].startPressure, metas[metaIndex].regenRate, metaIndex, metas[metaIndex].range * tileSize.x, 0f, metas[metaIndex].spriteID.animationInstance(AnimationState.idle)); tc.buildTower(metas[metaIndex].typeIndex, baseTowers.length - 1); return; } } } void addController(T)(T t) { this.controllers ~= cast(ITowerController)t; } uint towerIndex(uint2 cell, float2 tileSize) { return baseTowers.countUntil!(x => x.cell(tileSize) == cell); } void removeTower(uint towerIndex) { auto base = baseTowers[towerIndex]; baseTowers.removeAt(towerIndex); foreach(tc;controllers) { tc.removeTower(towerIndex, base); } } void upgradeTower(uint towerIndex, ubyte upgradeIndex) { auto pos = baseTowers[towerIndex].position; auto player = baseTowers[towerIndex].ownedPlayerID; removeTower(towerIndex); buildTower(pos, upgradeIndex, player); } final Tower metaTower(uint towerIndex) { import std.algorithm; return metas[baseTowers[towerIndex].metaIndex]; } final int indexOf(uint2 position) { return baseTowers.countUntil!(x => x.cell(tileSize) == position); } void breakTower(uint towerIndex) { auto base = &baseTowers[towerIndex]; if(base.isBroken == false) { base.isBroken = true; base.sprite = metas[base.metaIndex].spriteID.animationInstance(AnimationState.broken); foreach(handler; onTowerBroken) handler(this, towerIndex); foreach(tc; controllers) { tc.breakTower(towerIndex); } } } void repairTower(uint towerIndex) { auto base = &baseTowers[towerIndex]; base.isBroken = false; base.sprite = metas[base.metaIndex].spriteID.animationInstance(AnimationState.idle); foreach(tc; controllers) { tc.repairTower(towerIndex); } } void enterTower(uint towerIndex, ulong playerID) { foreach(tc; controllers) { if(tc.type == metas[baseTowers[towerIndex].metaIndex].type) { tc.enterTower(towerIndex, playerID); } } } void exitTower(uint towerIndex, ulong playerID) { foreach(tc; controllers) { if(tc.type == metas[baseTowers[towerIndex].metaIndex].type) { tc.exitTower(towerIndex, playerID); } } } void update(ref List!BaseEnemy enemies) { foreach(ref tower; baseTowers) { tower.sprite.update(Time.delta); tower.pressure = min(tower.pressure + tower.regenRate * Time.delta, maxPressure); } foreach(tc;controllers) { tc.update(enemies); } } void render(List!BaseEnemy enemies) { auto baseTexture = Game.content.loadTexture("base_tower"); auto baseFrame = Frame(baseTexture); foreach(tower;baseTowers) { Color color = tower.isBroken ? Color(0xFF777777) : Color.white; Game.renderer.addFrame(baseFrame, float4( tower.position.x, tower.position.y, tileSize.x, tileSize.y), color, float2(tileSize)/2); Game.renderer.addSprite(tower.sprite, tower.position, color, Game.window.relativeScale, tower.angle); } foreach(tc;controllers) { tc.render(enemies); } foreach(ref tower; baseTowers) if(!tower.isBroken) { float amount = tower.pressure/maxPressure; float width = min(50, maxPressure)*Game.window.relativeScale.x; float height = 5*Game.window.relativeScale.y; import game.debuging; Game.renderer.addRect(float4(tower.position.x - width/2, tower.position.y + tileSize.y/2, width, height), Color.blue); Game.renderer.addRect(float4(tower.position.x - width/2, tower.position.y + tileSize.y/2, width*amount, height), Color.white); } } } template isValidTowerType(T) { enum isValidTowerType = __traits(compiles, { T t; t.baseIndex = 1; t.prefab = 1; t = T(1,1); }); } abstract class TowerController(T) : ITowerController { List!T instances; TowerCollection owner; struct Controlled { int instanceIndex; ulong playerID; } List!Controlled controlled; TileType _type; override @property TileType type() { return _type; } this(A)(ref A allocator, TileType type, TowerCollection owner) { this.instances = List!T(allocator, 100); this.controlled = List!Controlled(allocator, 10); this._type = type; this.owner = owner; this.owner.addController(this); } final int indexOf(uint2 pos) { foreach(i, tower; instances) { if(owner.baseTowers[tower.baseIndex].cell(owner.tileSize) == pos) return i; } return -1; } final ref float2 position(ref T instance) { return owner.baseTowers[instance.baseIndex].position; } final float2 position(int instanceIndex) { return position(instances[instanceIndex]); } final ref bool isBroken(ref T instance) { return owner.baseTowers[instance.baseIndex].isBroken; } final ref bool isBroken(int instanceIndex) { return isBroken(instances[instanceIndex]); } final bool isControlled(int instanceIndex) { return controlled.countUntil!(x => x.instanceIndex == instanceIndex) != -1; } final ref float pressure(ref T instance) { return owner.baseTowers[instance.baseIndex].pressure; } final ref float pressure(int instanceIndex) { return pressure(instances[instanceIndex]); } final float range(ref T instance) { return owner.baseTowers[instance.baseIndex].range; } final float range(uint instanceIndex) { return range(instances[instanceIndex]); } final void buildTower(uint prototypeIndex, uint towerIndex) { instances ~= T(prototypeIndex, towerIndex); towerBuilt(towerIndex, instances.length - 1); } final void removeTower(uint towerIndex, BaseTower base) { for(int i = instances.length - 1; i >= 0; i--) { if(instances[i].baseIndex > towerIndex) { instances[i].baseIndex--; } else if(instances[i].baseIndex == towerIndex) { towerRemoved(base, instances[i]); instances.removeAt(i); } } } void update(List!BaseEnemy enemies) { import network.message, network_types; foreach(tower; controlled) { Game.server.sendMessage( tower.playerID, PressureInfoMessage(pressure(tower.instanceIndex)) ); } } final void breakTower(int towerIndex) { auto index = instances.countUntil!(x => x.baseIndex == towerIndex); if(index != -1) { towerBroken(index); } } final void repairTower(int towerIndex) { auto index = instances.countUntil!(x => x.baseIndex == towerIndex); if(index != -1) towerRepaired(index); } final void enterTower(int towerIndex, ulong playerID) { auto index = instances.countUntil!( x => x.baseIndex == towerIndex); if(isBroken(index)) return; controlled ~= Controlled(index, playerID); towerEntered(index, playerID); } final void exitTower(int towerIndex, ulong playerID) { auto index = controlled.countUntil!( x => x.playerID == playerID); if(index != -1) controlled.removeAt(index); towerExited(index, playerID); } final void pressure(int towerIndex, float newPressure) { owner.baseTowers[instances[towerIndex].baseIndex].pressure = newPressure; } void towerBuilt(int towerIndex, int instanceIndex) { } void towerRemoved(BaseTower base, T towerInstance) { } void towerRepaired(int instanceIndex) { } void towerBroken(int instanceIndex) { } abstract void towerEntered(int instanceIndex, ulong playerID); abstract void towerExited(int instanceIndex, ulong playerID); }
D
/home/hustccc/OS_Tutorial_Summer_of_Code/rCore_Labs/Lab5/os/target/debug/deps/thread_local-05f3d0984ed3e172.rmeta: /home/hustccc/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/thread_local-1.0.1/src/lib.rs /home/hustccc/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/thread_local-1.0.1/src/thread_id.rs /home/hustccc/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/thread_local-1.0.1/src/unreachable.rs /home/hustccc/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/thread_local-1.0.1/src/cached.rs /home/hustccc/OS_Tutorial_Summer_of_Code/rCore_Labs/Lab5/os/target/debug/deps/libthread_local-05f3d0984ed3e172.rlib: /home/hustccc/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/thread_local-1.0.1/src/lib.rs /home/hustccc/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/thread_local-1.0.1/src/thread_id.rs /home/hustccc/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/thread_local-1.0.1/src/unreachable.rs /home/hustccc/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/thread_local-1.0.1/src/cached.rs /home/hustccc/OS_Tutorial_Summer_of_Code/rCore_Labs/Lab5/os/target/debug/deps/thread_local-05f3d0984ed3e172.d: /home/hustccc/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/thread_local-1.0.1/src/lib.rs /home/hustccc/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/thread_local-1.0.1/src/thread_id.rs /home/hustccc/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/thread_local-1.0.1/src/unreachable.rs /home/hustccc/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/thread_local-1.0.1/src/cached.rs /home/hustccc/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/thread_local-1.0.1/src/lib.rs: /home/hustccc/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/thread_local-1.0.1/src/thread_id.rs: /home/hustccc/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/thread_local-1.0.1/src/unreachable.rs: /home/hustccc/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/thread_local-1.0.1/src/cached.rs:
D
the 100th anniversary (or the celebration of it) of or relating to or completing a period of 100 years
D
/Users/congle/Desktop/DEVELOPMENTS/Social-Login/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/OAuthSwift.build/Objects-normal/x86_64/NotificationCenter+OAuthSwift.o : /Users/congle/Desktop/DEVELOPMENTS/Social-Login/Pods/OAuthSwift/Sources/SHA1.swift /Users/congle/Desktop/DEVELOPMENTS/Social-Login/Pods/OAuthSwift/Sources/HMAC.swift /Users/congle/Desktop/DEVELOPMENTS/Social-Login/Pods/OAuthSwift/Sources/OAuthSwiftMultipartData.swift /Users/congle/Desktop/DEVELOPMENTS/Social-Login/Pods/OAuthSwift/Sources/URLConvertible.swift /Users/congle/Desktop/DEVELOPMENTS/Social-Login/Pods/OAuthSwift/Sources/OAuthSwiftURLHandlerType.swift /Users/congle/Desktop/DEVELOPMENTS/Social-Login/Pods/OAuthSwift/Sources/OAuthSwiftResponse.swift /Users/congle/Desktop/DEVELOPMENTS/Social-Login/Pods/OAuthSwift/Sources/OAuthSwiftCredential.swift /Users/congle/Desktop/DEVELOPMENTS/Social-Login/Pods/OAuthSwift/Sources/OAuthWebViewController.swift /Users/congle/Desktop/DEVELOPMENTS/Social-Login/Pods/OAuthSwift/Sources/OAuthSwiftError.swift /Users/congle/Desktop/DEVELOPMENTS/Social-Login/Pods/OAuthSwift/Sources/Utils.swift /Users/congle/Desktop/DEVELOPMENTS/Social-Login/Pods/OAuthSwift/Sources/OAuth1Swift.swift /Users/congle/Desktop/DEVELOPMENTS/Social-Login/Pods/OAuthSwift/Sources/OAuth2Swift.swift /Users/congle/Desktop/DEVELOPMENTS/Social-Login/Pods/OAuthSwift/Sources/URL+OAuthSwift.swift /Users/congle/Desktop/DEVELOPMENTS/Social-Login/Pods/OAuthSwift/Sources/Data+OAuthSwift.swift /Users/congle/Desktop/DEVELOPMENTS/Social-Login/Pods/OAuthSwift/Sources/String+OAuthSwift.swift /Users/congle/Desktop/DEVELOPMENTS/Social-Login/Pods/OAuthSwift/Sources/UIApplication+OAuthSwift.swift /Users/congle/Desktop/DEVELOPMENTS/Social-Login/Pods/OAuthSwift/Sources/Collection+OAuthSwift.swift /Users/congle/Desktop/DEVELOPMENTS/Social-Login/Pods/OAuthSwift/Sources/NotificationCenter+OAuthSwift.swift /Users/congle/Desktop/DEVELOPMENTS/Social-Login/Pods/OAuthSwift/Sources/NSError+OAuthSwift.swift /Users/congle/Desktop/DEVELOPMENTS/Social-Login/Pods/OAuthSwift/Sources/Int+OAuthSwift.swift /Users/congle/Desktop/DEVELOPMENTS/Social-Login/Pods/OAuthSwift/Sources/Dictionary+OAuthSwift.swift /Users/congle/Desktop/DEVELOPMENTS/Social-Login/Pods/OAuthSwift/Sources/OAuthSwift.swift /Users/congle/Desktop/DEVELOPMENTS/Social-Login/Pods/OAuthSwift/Sources/OAuthSwiftClient.swift /Users/congle/Desktop/DEVELOPMENTS/Social-Login/Pods/OAuthSwift/Sources/OAuthSwiftHTTPRequest.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/congle/Desktop/DEVELOPMENTS/Social-Login/Pods/Target\ Support\ Files/OAuthSwift/OAuthSwift-umbrella.h /Users/congle/Desktop/DEVELOPMENTS/Social-Login/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/OAuthSwift.build/unextended-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/SafariServices.framework/Headers/SafariServices.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/System/Library/Frameworks/AuthenticationServices.framework/Headers/AuthenticationServices.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/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/congle/Desktop/DEVELOPMENTS/Social-Login/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/OAuthSwift.build/Objects-normal/x86_64/NotificationCenter+OAuthSwift~partial.swiftmodule : /Users/congle/Desktop/DEVELOPMENTS/Social-Login/Pods/OAuthSwift/Sources/SHA1.swift /Users/congle/Desktop/DEVELOPMENTS/Social-Login/Pods/OAuthSwift/Sources/HMAC.swift /Users/congle/Desktop/DEVELOPMENTS/Social-Login/Pods/OAuthSwift/Sources/OAuthSwiftMultipartData.swift /Users/congle/Desktop/DEVELOPMENTS/Social-Login/Pods/OAuthSwift/Sources/URLConvertible.swift /Users/congle/Desktop/DEVELOPMENTS/Social-Login/Pods/OAuthSwift/Sources/OAuthSwiftURLHandlerType.swift /Users/congle/Desktop/DEVELOPMENTS/Social-Login/Pods/OAuthSwift/Sources/OAuthSwiftResponse.swift /Users/congle/Desktop/DEVELOPMENTS/Social-Login/Pods/OAuthSwift/Sources/OAuthSwiftCredential.swift /Users/congle/Desktop/DEVELOPMENTS/Social-Login/Pods/OAuthSwift/Sources/OAuthWebViewController.swift /Users/congle/Desktop/DEVELOPMENTS/Social-Login/Pods/OAuthSwift/Sources/OAuthSwiftError.swift /Users/congle/Desktop/DEVELOPMENTS/Social-Login/Pods/OAuthSwift/Sources/Utils.swift /Users/congle/Desktop/DEVELOPMENTS/Social-Login/Pods/OAuthSwift/Sources/OAuth1Swift.swift /Users/congle/Desktop/DEVELOPMENTS/Social-Login/Pods/OAuthSwift/Sources/OAuth2Swift.swift /Users/congle/Desktop/DEVELOPMENTS/Social-Login/Pods/OAuthSwift/Sources/URL+OAuthSwift.swift /Users/congle/Desktop/DEVELOPMENTS/Social-Login/Pods/OAuthSwift/Sources/Data+OAuthSwift.swift /Users/congle/Desktop/DEVELOPMENTS/Social-Login/Pods/OAuthSwift/Sources/String+OAuthSwift.swift /Users/congle/Desktop/DEVELOPMENTS/Social-Login/Pods/OAuthSwift/Sources/UIApplication+OAuthSwift.swift /Users/congle/Desktop/DEVELOPMENTS/Social-Login/Pods/OAuthSwift/Sources/Collection+OAuthSwift.swift /Users/congle/Desktop/DEVELOPMENTS/Social-Login/Pods/OAuthSwift/Sources/NotificationCenter+OAuthSwift.swift /Users/congle/Desktop/DEVELOPMENTS/Social-Login/Pods/OAuthSwift/Sources/NSError+OAuthSwift.swift /Users/congle/Desktop/DEVELOPMENTS/Social-Login/Pods/OAuthSwift/Sources/Int+OAuthSwift.swift /Users/congle/Desktop/DEVELOPMENTS/Social-Login/Pods/OAuthSwift/Sources/Dictionary+OAuthSwift.swift /Users/congle/Desktop/DEVELOPMENTS/Social-Login/Pods/OAuthSwift/Sources/OAuthSwift.swift /Users/congle/Desktop/DEVELOPMENTS/Social-Login/Pods/OAuthSwift/Sources/OAuthSwiftClient.swift /Users/congle/Desktop/DEVELOPMENTS/Social-Login/Pods/OAuthSwift/Sources/OAuthSwiftHTTPRequest.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/congle/Desktop/DEVELOPMENTS/Social-Login/Pods/Target\ Support\ Files/OAuthSwift/OAuthSwift-umbrella.h /Users/congle/Desktop/DEVELOPMENTS/Social-Login/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/OAuthSwift.build/unextended-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/SafariServices.framework/Headers/SafariServices.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/System/Library/Frameworks/AuthenticationServices.framework/Headers/AuthenticationServices.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/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/congle/Desktop/DEVELOPMENTS/Social-Login/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/OAuthSwift.build/Objects-normal/x86_64/NotificationCenter+OAuthSwift~partial.swiftdoc : /Users/congle/Desktop/DEVELOPMENTS/Social-Login/Pods/OAuthSwift/Sources/SHA1.swift /Users/congle/Desktop/DEVELOPMENTS/Social-Login/Pods/OAuthSwift/Sources/HMAC.swift /Users/congle/Desktop/DEVELOPMENTS/Social-Login/Pods/OAuthSwift/Sources/OAuthSwiftMultipartData.swift /Users/congle/Desktop/DEVELOPMENTS/Social-Login/Pods/OAuthSwift/Sources/URLConvertible.swift /Users/congle/Desktop/DEVELOPMENTS/Social-Login/Pods/OAuthSwift/Sources/OAuthSwiftURLHandlerType.swift /Users/congle/Desktop/DEVELOPMENTS/Social-Login/Pods/OAuthSwift/Sources/OAuthSwiftResponse.swift /Users/congle/Desktop/DEVELOPMENTS/Social-Login/Pods/OAuthSwift/Sources/OAuthSwiftCredential.swift /Users/congle/Desktop/DEVELOPMENTS/Social-Login/Pods/OAuthSwift/Sources/OAuthWebViewController.swift /Users/congle/Desktop/DEVELOPMENTS/Social-Login/Pods/OAuthSwift/Sources/OAuthSwiftError.swift /Users/congle/Desktop/DEVELOPMENTS/Social-Login/Pods/OAuthSwift/Sources/Utils.swift /Users/congle/Desktop/DEVELOPMENTS/Social-Login/Pods/OAuthSwift/Sources/OAuth1Swift.swift /Users/congle/Desktop/DEVELOPMENTS/Social-Login/Pods/OAuthSwift/Sources/OAuth2Swift.swift /Users/congle/Desktop/DEVELOPMENTS/Social-Login/Pods/OAuthSwift/Sources/URL+OAuthSwift.swift /Users/congle/Desktop/DEVELOPMENTS/Social-Login/Pods/OAuthSwift/Sources/Data+OAuthSwift.swift /Users/congle/Desktop/DEVELOPMENTS/Social-Login/Pods/OAuthSwift/Sources/String+OAuthSwift.swift /Users/congle/Desktop/DEVELOPMENTS/Social-Login/Pods/OAuthSwift/Sources/UIApplication+OAuthSwift.swift /Users/congle/Desktop/DEVELOPMENTS/Social-Login/Pods/OAuthSwift/Sources/Collection+OAuthSwift.swift /Users/congle/Desktop/DEVELOPMENTS/Social-Login/Pods/OAuthSwift/Sources/NotificationCenter+OAuthSwift.swift /Users/congle/Desktop/DEVELOPMENTS/Social-Login/Pods/OAuthSwift/Sources/NSError+OAuthSwift.swift /Users/congle/Desktop/DEVELOPMENTS/Social-Login/Pods/OAuthSwift/Sources/Int+OAuthSwift.swift /Users/congle/Desktop/DEVELOPMENTS/Social-Login/Pods/OAuthSwift/Sources/Dictionary+OAuthSwift.swift /Users/congle/Desktop/DEVELOPMENTS/Social-Login/Pods/OAuthSwift/Sources/OAuthSwift.swift /Users/congle/Desktop/DEVELOPMENTS/Social-Login/Pods/OAuthSwift/Sources/OAuthSwiftClient.swift /Users/congle/Desktop/DEVELOPMENTS/Social-Login/Pods/OAuthSwift/Sources/OAuthSwiftHTTPRequest.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/congle/Desktop/DEVELOPMENTS/Social-Login/Pods/Target\ Support\ Files/OAuthSwift/OAuthSwift-umbrella.h /Users/congle/Desktop/DEVELOPMENTS/Social-Login/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/OAuthSwift.build/unextended-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/SafariServices.framework/Headers/SafariServices.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/System/Library/Frameworks/AuthenticationServices.framework/Headers/AuthenticationServices.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/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
argue or speak in defense of be on the defensive protect against a challenge or attack fight against or resist strongly protect or fight for as a champion be the defense counsel for someone in a trial state or assert attempting to or designed to prevent an opponent from winning or scoring
D
/** TEST_OUTPUT: --- --- */ // Test C++ name mangling. // https://issues.dlang.org/show_bug.cgi?id=4059 // https://issues.dlang.org/show_bug.cgi?id=5148 // https://issues.dlang.org/show_bug.cgi?id=7024 // https://issues.dlang.org/show_bug.cgi?id=10058 import core.stdc.stdio; extern (C++) int foob(int i, int j, int k); class C { extern (C++) int bar(int i, int j, int k) { printf("this = %p\n", this); printf("i = %d\n", i); printf("j = %d\n", j); printf("k = %d\n", k); return 1; } } extern (C++) int foo(int i, int j, int k) { printf("i = %d\n", i); printf("j = %d\n", j); printf("k = %d\n", k); assert(i == 1); assert(j == 2); assert(k == 3); return 1; } void test1() { foo(1, 2, 3); auto i = foob(1, 2, 3); assert(i == 7); C c = new C(); c.bar(4, 5, 6); } version (Posix) { static assert(foo.mangleof == "_Z3fooiii"); static assert(foob.mangleof == "_Z4foobiii"); static assert(C.bar.mangleof == "_ZN1C3barEiii"); } version (Win32) { static assert(foo.mangleof == "?foo@@YAHHHH@Z"); static assert(foob.mangleof == "?foob@@YAHHHH@Z"); static assert(C.bar.mangleof == "?bar@C@@UAEHHHH@Z"); } version (Win64) { static assert(foo.mangleof == "?foo@@YAHHHH@Z"); static assert(foob.mangleof == "?foob@@YAHHHH@Z"); static assert(C.bar.mangleof == "?bar@C@@UEAAHHHH@Z"); } /****************************************/ extern (C++) interface D { int bar(int i, int j, int k); } extern (C++) D getD(); void test2() { D d = getD(); int i = d.bar(9,10,11); assert(i == 8); } version (Posix) { static assert (getD.mangleof == "_Z4getDv"); static assert (D.bar.mangleof == "_ZN1D3barEiii"); } /****************************************/ extern (C++) int callE(E); extern (C++) interface E { int bar(int i, int j, int k); } class F : E { extern (C++) int bar(int i, int j, int k) { printf("F.bar: i = %d\n", i); printf("F.bar: j = %d\n", j); printf("F.bar: k = %d\n", k); assert(i == 11); assert(j == 12); assert(k == 13); return 8; } } void test3() { F f = new F(); int i = callE(f); assert(i == 8); } version (Posix) { static assert (callE.mangleof == "_Z5callEP1E"); static assert (E.bar.mangleof == "_ZN1E3barEiii"); static assert (F.bar.mangleof == "_ZN1F3barEiii"); } /****************************************/ extern (C++) void foo4(char* p); void test4() { foo4(null); } version (Posix) { static assert(foo4.mangleof == "_Z4foo4Pc"); } /****************************************/ extern(C++) { struct foo5 { int i; int j; void* p; } interface bar5{ foo5 getFoo(int i); } bar5 newBar(); } void test5() { bar5 b = newBar(); foo5 f = b.getFoo(4); printf("f.p = %p, b = %p\n", f.p, cast(void*)b); assert(f.p == cast(void*)b); } version (Posix) { static assert(bar5.getFoo.mangleof == "_ZN4bar56getFooEi"); static assert (newBar.mangleof == "_Z6newBarv"); } /****************************************/ extern(C++) { struct S6 { int i; double d; } S6 foo6(); } extern (C) int foosize6(); void test6() { S6 f = foo6(); printf("%d %d\n", foosize6(), S6.sizeof); assert(foosize6() == S6.sizeof); assert(f.i == 42); printf("f.d = %g\n", f.d); assert(f.d == 2.5); } version (Posix) { static assert (foo6.mangleof == "_Z4foo6v"); } /****************************************/ extern (C) int foo7(); struct S { int i; long l; } void test7() { printf("%d %d\n", foo7(), S.sizeof); assert(foo7() == S.sizeof); } /****************************************/ extern (C++) void foo8(const char *); void test8() { char c; foo8(&c); } version (Posix) { static assert(foo8.mangleof == "_Z4foo8PKc"); } /****************************************/ // https://issues.dlang.org/show_bug.cgi?id=4059 struct elem9 { } extern(C++) void foobar9(elem9*, elem9*); void test9() { elem9 *a; foobar9(a, a); } version (Posix) { static assert(foobar9.mangleof == "_Z7foobar9P5elem9S0_"); } /****************************************/ // https://issues.dlang.org/show_bug.cgi?id=5148 extern (C++) { void foo10(const char*, const char*); void foo10(const int, const int); void foo10(const char, const char); struct MyStructType { } void foo10(const MyStructType s, const MyStructType t); enum MyEnumType { onemember } void foo10(const MyEnumType s, const MyEnumType t); } void test10() { char* p; foo10(p, p); foo10(1,2); foo10('c','d'); MyStructType s; foo10(s,s); MyEnumType e; foo10(e,e); } /**************************************/ // https://issues.dlang.org/show_bug.cgi?id=10058 extern (C++) { void test10058a(void*) { } void test10058b(void function(void*)) { } void test10058c(void* function(void*)) { } void test10058d(void function(void*), void*) { } void test10058e(void* function(void*), void*) { } void test10058f(void* function(void*), void* function(void*)) { } void test10058g(void function(void*), void*, void*) { } void test10058h(void* function(void*), void*, void*) { } void test10058i(void* function(void*), void* function(void*), void*) { } void test10058j(void* function(void*), void* function(void*), void* function(void*)) { } void test10058k(void* function(void*), void* function(const (void)*)) { } void test10058l(void* function(void*), void* function(const (void)*), const(void)* function(void*)) { } } version (Posix) { static assert(test10058a.mangleof == "_Z10test10058aPv"); static assert(test10058b.mangleof == "_Z10test10058bPFvPvE"); static assert(test10058c.mangleof == "_Z10test10058cPFPvS_E"); static assert(test10058d.mangleof == "_Z10test10058dPFvPvES_"); static assert(test10058e.mangleof == "_Z10test10058ePFPvS_ES_"); static assert(test10058f.mangleof == "_Z10test10058fPFPvS_ES1_"); static assert(test10058g.mangleof == "_Z10test10058gPFvPvES_S_"); static assert(test10058h.mangleof == "_Z10test10058hPFPvS_ES_S_"); static assert(test10058i.mangleof == "_Z10test10058iPFPvS_ES1_S_"); static assert(test10058j.mangleof == "_Z10test10058jPFPvS_ES1_S1_"); static assert(test10058k.mangleof == "_Z10test10058kPFPvS_EPFS_PKvE"); static assert(test10058l.mangleof == "_Z10test10058lPFPvS_EPFS_PKvEPFS3_S_E"); } /**************************************/ // https://issues.dlang.org/show_bug.cgi?id=11696 class Expression; struct Loc {} extern(C++) class CallExp { static void test11696a(Loc, Expression, Expression); static void test11696b(Loc, Expression, Expression*); static void test11696c(Loc, Expression*, Expression); static void test11696d(Loc, Expression*, Expression*); } version (Posix) { static assert(CallExp.test11696a.mangleof == "_ZN7CallExp10test11696aE3LocP10ExpressionS2_"); static assert(CallExp.test11696b.mangleof == "_ZN7CallExp10test11696bE3LocP10ExpressionPS2_"); static assert(CallExp.test11696c.mangleof == "_ZN7CallExp10test11696cE3LocPP10ExpressionS2_"); static assert(CallExp.test11696d.mangleof == "_ZN7CallExp10test11696dE3LocPP10ExpressionS3_"); } /**************************************/ // https://issues.dlang.org/show_bug.cgi?id=13337 extern(C++, N13337a.N13337b.N13337c) { struct S13337{} void foo13337(S13337 s); } extern(C++, `N13337a`, `N13337b`, `N13337c`) { struct S13337_2{} void foo13337_2(S13337 s); void foo13337_3(S13337_2 s); } version (Posix) { static assert(foo13337.mangleof == "_ZN7N13337a7N13337b7N13337c8foo13337ENS1_6S13337E"); static assert(foo13337_2.mangleof == "_ZN7N13337a7N13337b7N13337c10foo13337_2ENS1_6S13337E"); static assert(foo13337_3.mangleof == "_ZN7N13337a7N13337b7N13337c10foo13337_3ENS1_8S13337_2E"); } /**************************************/ // https://issues.dlang.org/show_bug.cgi?id=15789 extern (C++) void test15789a(T...)(T args); void test15789() { test15789a(0); } /**************************************/ // https://issues.dlang.org/show_bug.cgi?id=7030 extern(C++) { struct Struct7030 { void foo(int) const; void bar(int); static __gshared int boo; } } version (Posix) { static assert(Struct7030.foo.mangleof == "_ZNK10Struct70303fooEi"); static assert(Struct7030.bar.mangleof == "_ZN10Struct70303barEi"); static assert(Struct7030.boo.mangleof == "_ZN10Struct70303booE"); } /****************************************/ // Special cases of Itanium mangling extern (C++, std) { struct pair(T1, T2) { void swap(ref pair other); } struct allocator(T) { uint fooa() const; uint foob(); } struct basic_string(T1, T2, T3) { uint fooa(); } struct basic_istream(T1, T2) { uint fooc(); } struct basic_ostream(T1, T2) { uint food(); } struct basic_iostream(T1, T2) { uint fooe(); } struct char_traits(T) { uint foof(); } struct vector (T); struct test18957 {} } extern (C++, `std`) { struct pair(T1, T2) { void swap(ref pair other); } struct allocator(T) { uint fooa() const; uint foob(); } struct basic_string(T1, T2, T3) { uint fooa(); } struct basic_istream(T1, T2) { uint fooc(); } struct basic_ostream(T1, T2) { uint food(); } struct basic_iostream(T1, T2) { uint fooe(); } struct char_traits(T) { uint foof(); } struct vector (T); struct Struct18957 {} } extern(C++) { // Nspace std.allocator!int func_18957_1(std.allocator!(int)* v); // CPPNamespaceAttribute allocator!int func_18957_2(allocator!(int)* v); X func_18957_2(X)(X* v); } version (Posix) { // https://issues.dlang.org/show_bug.cgi?id=17947 static assert(std.pair!(void*, void*).swap.mangleof == "_ZNSt4pairIPvS0_E4swapERS1_"); static assert(std.allocator!int.fooa.mangleof == "_ZNKSaIiE4fooaEv"); static assert(std.allocator!int.foob.mangleof == "_ZNSaIiE4foobEv"); static assert(std.basic_string!(char,int,uint).fooa.mangleof == "_ZNSbIcijE4fooaEv"); static assert(std.basic_string!(char, std.char_traits!char, std.allocator!char).fooa.mangleof == "_ZNSs4fooaEv"); static assert(std.basic_istream!(char, std.char_traits!char).fooc.mangleof == "_ZNSi4foocEv"); static assert(std.basic_ostream!(char, std.char_traits!char).food.mangleof == "_ZNSo4foodEv"); static assert(std.basic_iostream!(char, std.char_traits!char).fooe.mangleof == "_ZNSd4fooeEv"); static assert(func_18957_1.mangleof == `_Z12func_18957_1PSaIiE`); static assert(func_18957_2!(std.allocator!int).mangleof == `_Z12func_18957_2ISaIiEET_PS1_`); static assert(pair!(void*, void*).swap.mangleof == "_ZNSt4pairIPvS0_E4swapERS1_"); static assert(allocator!int.fooa.mangleof == "_ZNKSaIiE4fooaEv"); static assert(allocator!int.foob.mangleof == "_ZNSaIiE4foobEv"); static assert(basic_string!(char,int,uint).fooa.mangleof == "_ZNSbIcijE4fooaEv"); static assert(basic_string!(char, char_traits!char, allocator!char).fooa.mangleof == "_ZNSs4fooaEv"); static assert(basic_istream!(char, char_traits!char).fooc.mangleof == "_ZNSi4foocEv"); static assert(basic_ostream!(char, char_traits!char).food.mangleof == "_ZNSo4foodEv"); static assert(basic_iostream!(char, char_traits!char).fooe.mangleof == "_ZNSd4fooeEv"); static assert(func_18957_2.mangleof == `_Z12func_18957_2PSaIiE`); static assert(func_18957_2!(allocator!int).mangleof == `_Z12func_18957_2ISaIiEET_PS1_`); } /**************************************/ alias T36 = int ********** ********** ********** **********; extern (C++) void test36(T36, T36*) { } version (Posix) { static assert(test36.mangleof == "_Z6test36PPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPiPS12_"); } /*****************************************/ // https://issues.dlang.org/show_bug.cgi?id=17772 extern(C++, SPACE) int test37(T)(){ return 0;} extern(C++, `SPACE`) int test37(T)(){ return 0;} version (Posix) // all non-Windows machines { static assert(SPACE.test37!int.mangleof == "_ZN5SPACE6test37IiEEiv"); static assert(test37!int.mangleof == "_ZN5SPACE6test37IiEEiv"); } /**************************************/ // https://issues.dlang.org/show_bug.cgi?id=15388 extern (C++) void test15388(typeof(null)); version (Posix) { static assert(test15388.mangleof == "_Z9test15388Dn"); } version (Windows) { static assert(test15388.mangleof == "?test15388@@YAX$$T@Z"); } /**************************************/ // https://issues.dlang.org/show_bug.cgi?id=14086 extern (C++) class Test14086 { this(); ~this(); } extern (C++) class Test14086_2 { final ~this(); } extern (C++) struct Test14086_S { this(int); ~this(); } version(Posix) { static assert(Test14086.__ctor.mangleof == "_ZN9Test14086C1Ev"); static assert(Test14086.__dtor.mangleof == "_ZN9Test14086D1Ev"); static assert(Test14086_2.__dtor.mangleof == "_ZN11Test14086_2D1Ev"); static assert(Test14086_S.__ctor.mangleof == "_ZN11Test14086_SC1Ei"); static assert(Test14086_S.__dtor.mangleof == "_ZN11Test14086_SD1Ev"); } version(Win32) { static assert(Test14086.__ctor.mangleof == "??0Test14086@@QAE@XZ"); static assert(Test14086.__dtor.mangleof == "??1Test14086@@UAE@XZ"); static assert(Test14086_2.__dtor.mangleof == "??1Test14086_2@@QAE@XZ"); static assert(Test14086_S.__ctor.mangleof == "??0Test14086_S@@QAE@H@Z"); static assert(Test14086_S.__dtor.mangleof == "??1Test14086_S@@QAE@XZ"); } version(Win64) { static assert(Test14086.__ctor.mangleof == "??0Test14086@@QEAA@XZ"); static assert(Test14086.__dtor.mangleof == "??1Test14086@@UEAA@XZ"); static assert(Test14086_2.__dtor.mangleof == "??1Test14086_2@@QEAA@XZ"); static assert(Test14086_S.__ctor.mangleof == "??0Test14086_S@@QEAA@H@Z"); static assert(Test14086_S.__dtor.mangleof == "??1Test14086_S@@QEAA@XZ"); } /**************************************/ // https://issues.dlang.org/show_bug.cgi?id=18888 extern (C++) struct T18888(T) { void fun(); } extern (C++) struct S18888(alias arg = T18888) { alias I = T18888!(arg!int); } version(Posix) { static assert(S18888!().I.fun.mangleof == "_ZN6T18888IS_IiEE3funEv"); } version(Win32) { static assert(S18888!().I.fun.mangleof == "?fun@?$T18888@U?$T18888@H@@@@QAEXXZ"); } version(Win64) { static assert(S18888!().I.fun.mangleof == "?fun@?$T18888@U?$T18888@H@@@@QEAAXXZ"); } /**************************************/ // https://issues.dlang.org/show_bug.cgi?id=18890 extern (C++) class C18890 { ~this() {} } extern (C++) class C18890_2 { ~this() {} extern (C++) struct Agg { ~this() {} } Agg s; } version (Posix) { static assert(C18890.__dtor.mangleof == "_ZN6C18890D1Ev"); static assert(C18890.__xdtor.mangleof == "_ZN6C18890D1Ev"); static assert(C18890_2.__dtor.mangleof == "_ZN8C18890_26__dtorEv"); static assert(C18890_2.__xdtor.mangleof == "_ZN8C18890_2D1Ev"); } version (Win32) { static assert(C18890.__dtor.mangleof == "??1C18890@@UAE@XZ"); static assert(C18890.__xdtor.mangleof == "??_GC18890@@UAEPAXI@Z"); static assert(C18890_2.__dtor.mangleof == "?__dtor@C18890_2@@UAEXXZ"); static assert(C18890_2.__xdtor.mangleof == "??_GC18890_2@@UAEPAXI@Z"); } version (Win64) { static assert(C18890.__dtor.mangleof == "??1C18890@@UEAA@XZ"); static assert(C18890.__xdtor.mangleof == "??_GC18890@@UEAAPEAXI@Z"); static assert(C18890_2.__dtor.mangleof == "?__dtor@C18890_2@@UEAAXXZ"); static assert(C18890_2.__xdtor.mangleof == "??_GC18890_2@@UEAAPEAXI@Z"); } /**************************************/ // https://issues.dlang.org/show_bug.cgi?id=18891 extern (C++) class C18891 { ~this(); extern (C++) struct Agg { ~this() {} } Agg s; } version (Posix) { static assert(C18891.__dtor.mangleof == "_ZN6C18891D1Ev"); static assert(C18891.__xdtor.mangleof == "_ZN6C18891D1Ev"); } version (Win32) { static assert(C18891.__dtor.mangleof == "??1C18891@@UAE@XZ"); static assert(C18891.__xdtor.mangleof == "??_GC18891@@UAEPAXI@Z"); } version (Win64) { static assert(C18891.__dtor.mangleof == "??1C18891@@UEAA@XZ"); static assert(C18891.__xdtor.mangleof == "??_GC18891@@UEAAPEAXI@Z"); } /**************************************/ // Test C++ operator mangling extern (C++) struct TestOperators { int opCast(T)(); int opBinary(string op)(int x); int opUnary(string op)(); int opOpAssign(string op)(int x); int opIndex(int x); bool opEquals(int x); int opCall(int, float); int opAssign(int); } version (Posix) { static assert(TestOperators.opUnary!"*".mangleof == "_ZN13TestOperatorsdeEv"); static assert(TestOperators.opUnary!"++".mangleof == "_ZN13TestOperatorsppEv"); static assert(TestOperators.opUnary!"--".mangleof == "_ZN13TestOperatorsmmEv"); static assert(TestOperators.opUnary!"-".mangleof == "_ZN13TestOperatorsngEv"); static assert(TestOperators.opUnary!"+".mangleof == "_ZN13TestOperatorspsEv"); static assert(TestOperators.opUnary!"~".mangleof == "_ZN13TestOperatorscoEv"); static assert(TestOperators.opBinary!">>".mangleof == "_ZN13TestOperatorsrsEi"); static assert(TestOperators.opBinary!"<<".mangleof == "_ZN13TestOperatorslsEi"); static assert(TestOperators.opBinary!"*".mangleof == "_ZN13TestOperatorsmlEi"); static assert(TestOperators.opBinary!"-".mangleof == "_ZN13TestOperatorsmiEi"); static assert(TestOperators.opBinary!"+".mangleof == "_ZN13TestOperatorsplEi"); static assert(TestOperators.opBinary!"&".mangleof == "_ZN13TestOperatorsanEi"); static assert(TestOperators.opBinary!"/".mangleof == "_ZN13TestOperatorsdvEi"); static assert(TestOperators.opBinary!"%".mangleof == "_ZN13TestOperatorsrmEi"); static assert(TestOperators.opBinary!"^".mangleof == "_ZN13TestOperatorseoEi"); static assert(TestOperators.opBinary!"|".mangleof == "_ZN13TestOperatorsorEi"); static assert(TestOperators.opOpAssign!"*".mangleof == "_ZN13TestOperatorsmLEi"); static assert(TestOperators.opOpAssign!"+".mangleof == "_ZN13TestOperatorspLEi"); static assert(TestOperators.opOpAssign!"-".mangleof == "_ZN13TestOperatorsmIEi"); static assert(TestOperators.opOpAssign!"/".mangleof == "_ZN13TestOperatorsdVEi"); static assert(TestOperators.opOpAssign!"%".mangleof == "_ZN13TestOperatorsrMEi"); static assert(TestOperators.opOpAssign!">>".mangleof == "_ZN13TestOperatorsrSEi"); static assert(TestOperators.opOpAssign!"<<".mangleof == "_ZN13TestOperatorslSEi"); static assert(TestOperators.opOpAssign!"&".mangleof == "_ZN13TestOperatorsaNEi"); static assert(TestOperators.opOpAssign!"|".mangleof == "_ZN13TestOperatorsoREi"); static assert(TestOperators.opOpAssign!"^".mangleof == "_ZN13TestOperatorseOEi"); static assert(TestOperators.opCast!int.mangleof == "_ZN13TestOperatorscviEv"); static assert(TestOperators.opAssign.mangleof == "_ZN13TestOperatorsaSEi"); static assert(TestOperators.opEquals.mangleof == "_ZN13TestOperatorseqEi"); static assert(TestOperators.opIndex.mangleof == "_ZN13TestOperatorsixEi"); static assert(TestOperators.opCall.mangleof == "_ZN13TestOperatorsclEif"); } version (Win32) { static assert(TestOperators.opUnary!"*".mangleof == "??DTestOperators@@QAEHXZ"); static assert(TestOperators.opUnary!"++".mangleof == "??ETestOperators@@QAEHXZ"); static assert(TestOperators.opUnary!"--".mangleof == "??FTestOperators@@QAEHXZ"); static assert(TestOperators.opUnary!"-".mangleof == "??GTestOperators@@QAEHXZ"); static assert(TestOperators.opUnary!"+".mangleof == "??HTestOperators@@QAEHXZ"); static assert(TestOperators.opUnary!"~".mangleof == "??STestOperators@@QAEHXZ"); static assert(TestOperators.opBinary!">>".mangleof == "??5TestOperators@@QAEHH@Z"); static assert(TestOperators.opBinary!"<<".mangleof == "??6TestOperators@@QAEHH@Z"); static assert(TestOperators.opBinary!"*".mangleof == "??DTestOperators@@QAEHH@Z"); static assert(TestOperators.opBinary!"-".mangleof == "??GTestOperators@@QAEHH@Z"); static assert(TestOperators.opBinary!"+".mangleof == "??HTestOperators@@QAEHH@Z"); static assert(TestOperators.opBinary!"&".mangleof == "??ITestOperators@@QAEHH@Z"); static assert(TestOperators.opBinary!"/".mangleof == "??KTestOperators@@QAEHH@Z"); static assert(TestOperators.opBinary!"%".mangleof == "??LTestOperators@@QAEHH@Z"); static assert(TestOperators.opBinary!"^".mangleof == "??TTestOperators@@QAEHH@Z"); static assert(TestOperators.opBinary!"|".mangleof == "??UTestOperators@@QAEHH@Z"); static assert(TestOperators.opOpAssign!"*".mangleof == "??XTestOperators@@QAEHH@Z"); static assert(TestOperators.opOpAssign!"+".mangleof == "??YTestOperators@@QAEHH@Z"); static assert(TestOperators.opOpAssign!"-".mangleof == "??ZTestOperators@@QAEHH@Z"); static assert(TestOperators.opOpAssign!"/".mangleof == "??_0TestOperators@@QAEHH@Z"); static assert(TestOperators.opOpAssign!"%".mangleof == "??_1TestOperators@@QAEHH@Z"); static assert(TestOperators.opOpAssign!">>".mangleof == "??_2TestOperators@@QAEHH@Z"); static assert(TestOperators.opOpAssign!"<<".mangleof == "??_3TestOperators@@QAEHH@Z"); static assert(TestOperators.opOpAssign!"&".mangleof == "??_4TestOperators@@QAEHH@Z"); static assert(TestOperators.opOpAssign!"|".mangleof == "??_5TestOperators@@QAEHH@Z"); static assert(TestOperators.opOpAssign!"^".mangleof == "??_6TestOperators@@QAEHH@Z"); static assert(TestOperators.opCast!int.mangleof == "??BTestOperators@@QAEHXZ"); static assert(TestOperators.opAssign.mangleof == "??4TestOperators@@QAEHH@Z"); static assert(TestOperators.opEquals.mangleof == "??8TestOperators@@QAE_NH@Z"); static assert(TestOperators.opIndex.mangleof == "??ATestOperators@@QAEHH@Z"); static assert(TestOperators.opCall.mangleof == "??RTestOperators@@QAEHHM@Z"); } version (Win64) { static assert(TestOperators.opUnary!"*".mangleof == "??DTestOperators@@QEAAHXZ"); static assert(TestOperators.opUnary!"++".mangleof == "??ETestOperators@@QEAAHXZ"); static assert(TestOperators.opUnary!"--".mangleof == "??FTestOperators@@QEAAHXZ"); static assert(TestOperators.opUnary!"-".mangleof == "??GTestOperators@@QEAAHXZ"); static assert(TestOperators.opUnary!"+".mangleof == "??HTestOperators@@QEAAHXZ"); static assert(TestOperators.opUnary!"~".mangleof == "??STestOperators@@QEAAHXZ"); static assert(TestOperators.opBinary!">>".mangleof == "??5TestOperators@@QEAAHH@Z"); static assert(TestOperators.opBinary!"<<".mangleof == "??6TestOperators@@QEAAHH@Z"); static assert(TestOperators.opBinary!"*".mangleof == "??DTestOperators@@QEAAHH@Z"); static assert(TestOperators.opBinary!"-".mangleof == "??GTestOperators@@QEAAHH@Z"); static assert(TestOperators.opBinary!"+".mangleof == "??HTestOperators@@QEAAHH@Z"); static assert(TestOperators.opBinary!"&".mangleof == "??ITestOperators@@QEAAHH@Z"); static assert(TestOperators.opBinary!"/".mangleof == "??KTestOperators@@QEAAHH@Z"); static assert(TestOperators.opBinary!"%".mangleof == "??LTestOperators@@QEAAHH@Z"); static assert(TestOperators.opBinary!"^".mangleof == "??TTestOperators@@QEAAHH@Z"); static assert(TestOperators.opBinary!"|".mangleof == "??UTestOperators@@QEAAHH@Z"); static assert(TestOperators.opOpAssign!"*".mangleof == "??XTestOperators@@QEAAHH@Z"); static assert(TestOperators.opOpAssign!"+".mangleof == "??YTestOperators@@QEAAHH@Z"); static assert(TestOperators.opOpAssign!"-".mangleof == "??ZTestOperators@@QEAAHH@Z"); static assert(TestOperators.opOpAssign!"/".mangleof == "??_0TestOperators@@QEAAHH@Z"); static assert(TestOperators.opOpAssign!"%".mangleof == "??_1TestOperators@@QEAAHH@Z"); static assert(TestOperators.opOpAssign!">>".mangleof == "??_2TestOperators@@QEAAHH@Z"); static assert(TestOperators.opOpAssign!"<<".mangleof == "??_3TestOperators@@QEAAHH@Z"); static assert(TestOperators.opOpAssign!"&".mangleof == "??_4TestOperators@@QEAAHH@Z"); static assert(TestOperators.opOpAssign!"|".mangleof == "??_5TestOperators@@QEAAHH@Z"); static assert(TestOperators.opOpAssign!"^".mangleof == "??_6TestOperators@@QEAAHH@Z"); static assert(TestOperators.opCast!int.mangleof == "??BTestOperators@@QEAAHXZ"); static assert(TestOperators.opAssign.mangleof == "??4TestOperators@@QEAAHH@Z"); static assert(TestOperators.opEquals.mangleof == "??8TestOperators@@QEAA_NH@Z"); static assert(TestOperators.opIndex.mangleof == "??ATestOperators@@QEAAHH@Z"); static assert(TestOperators.opCall.mangleof == "??RTestOperators@@QEAAHHM@Z"); } import cppmangle2; extern(C++, Namespace18922) { // Nspace void func18922(cppmangle2.Namespace18922.Struct18922) {} // CPPNamespaceAttribute void func18922_1(Struct18922) {} } extern(C++, `Namespace18922`) { // Nspace void func18922_2(cppmangle2.Namespace18922.Struct18922) {} // CPPNamespaceAttribute void func18922_3(Struct18922) {} } version (Posix) { static assert(func18922.mangleof == "_ZN14Namespace189229func18922ENS_11Struct18922E"); static assert(func18922_1.mangleof == "_ZN14Namespace1892211func18922_1ENS_11Struct18922E"); static assert(func18922_2.mangleof == "_ZN14Namespace1892211func18922_2ENS_11Struct18922E"); static assert(func18922_3.mangleof == "_ZN14Namespace1892211func18922_3ENS_11Struct18922E"); } else version(Windows) { static assert(func18922.mangleof == "?func18922@Namespace18922@@YAXUStruct18922@1@@Z"); static assert(func18922_1.mangleof == "?func18922_1@Namespace18922@@YAXUStruct18922@1@@Z"); static assert(func18922_2.mangleof == "?func18922_2@Namespace18922@@YAXUStruct18922@1@@Z"); static assert(func18922_3.mangleof == "?func18922_3@Namespace18922@@YAXUStruct18922@1@@Z"); } /**************************************/ // https://issues.dlang.org/show_bug.cgi?id=18957 // extern(C++) doesn't mangle 'std' correctly on posix systems version (Posix) { // https://godbolt.org/z/C5T2LQ /+ namespace std { struct test18957 {}; } void test18957(const std::test18957& t) {} +/ extern (C++) void test18957(ref const(Struct18957) t) {} static assert(test18957.mangleof == "_Z9test18957RKSt11Struct18957"); } /**************************************/ // https://issues.dlang.org/show_bug.cgi?id=19043 // Incorrect mangling for extern(C++) const template parameter on windows extern(C++) struct test19043(T) {} extern(C++) void test19043a(test19043!(const(char)) a) {} extern(C++) void test19043b(T)(T a) {} version(Windows) { static assert(test19043a.mangleof == "?test19043a@@YAXU?$test19043@$$CBD@@@Z"); static assert(test19043b!(test19043!(const(char))).mangleof == "??$test19043b@U?$test19043@$$CBD@@@@YAXU?$test19043@$$CBD@@@Z"); } // https://issues.dlang.org/show_bug.cgi?id=16479 // Missing substitution while mangling C++ template parameter for functions version (Posix) extern (C++) { // Make sure aliases are still resolved alias Alias16479 = int; Alias16479 func16479_0 (FuncT1) (FuncT1, Alias16479); static assert(func16479_0!(int).mangleof == `_Z11func16479_0IiEiT_i`); // Simple substitution on return type FuncT1* func16479_1 (FuncT1) (); static assert(func16479_1!(int).mangleof == `_Z11func16479_1IiEPT_v`); // Simple substitution on parameter void func16479_2 (FuncT1) (FuncT1); static assert(func16479_2!(int).mangleof == `_Z11func16479_2IiEvT_`); // Make sure component substition is prefered over template parameter FuncT1* func16479_3 (FuncT1) (FuncT1); static assert(func16479_3!(int).mangleof == `_Z11func16479_3IiEPT_S0_`); struct Array16479 (Arg) { Arg* data; } struct Array16479_2 (Arg, int Size) { Arg[Size] data; } struct Value16479 (int Value1, int Value2) { int data; } // Make sure template parameter substitution happens on templated return Array16479!(FuncT2) func16479_4 (FuncT1, FuncT2) (FuncT1); static assert(func16479_4!(int, float).mangleof == `_Z11func16479_4IifE10Array16479IT0_ET_`); // Make sure template parameter substitution happens with values Value16479!(Value2, Value1)* func16479_5 (int Value1, int Value2) (); static assert(func16479_5!(1, 1).mangleof == `_Z11func16479_5ILi1ELi1EEP10Value16479IXT0_EXT_EEv`); // But make sure it's not substituting *too many* values Value16479!(1, 1)* func16479_6 (int Value1, int Value2) (); static assert(func16479_6!(1, 1).mangleof == `_Z11func16479_6ILi1ELi1EEP10Value16479ILi1ELi1EEv`); // Or too many types Array16479!(int) func16479_7 (FuncT1, FuncT2) (FuncT1); static assert(func16479_7!(int, int).mangleof == `_Z11func16479_7IiiE10Array16479IiET_`); // Also must check the parameters for template param substitution void func16479_8 (FuncT1) (Array16479!(FuncT1)); static assert(func16479_8!(int).mangleof == `_Z11func16479_8IiEv10Array16479IT_E`); // And non-substitution void func16479_9 (FuncT1) (Array16479!(int)); static assert(func16479_9!(int).mangleof == `_Z11func16479_9IiEv10Array16479IiE`); // Now let's have a bit of fun with alias parameters, // starting with C functions // TODO: Why is this mangled by g++: /* extern "C" { void externC16479 (int); } template<void (*Print)(int)> void func16479_10 (); void foo () { func16479_10<externC16479>(); } */ extern (C) void externC16479 (int); void func16479_10 (alias Print) (); static assert(func16479_10!(externC16479).mangleof == `_Z12func16479_10IXadL_Z12externC16479EEEvv`); /** * Let's not exclude C++ functions * Note: * Passing a function as template parameter has an implicit * `&` operator prepended to it, so the following code: * --- * void CPPPrinter16479(const char*); * template<void (*Print)(const char*)> void func16479_11 (); * void foo () { func16479_11<CPPPrinter16479>(); } * --- * Gets mangled as `func16479_11<&CPPPrinter16479>()` would, * which means the expression part of the template argument is * mangled as `XadL_Z[...]E` not `XL_Z[...]E` * (expressions always begin with a code anyway). */ extern(C++) void CPPPrinter16479(const(char)*); extern(C++, Namespace16479) void CPPPrinterNS16479(const(char)*); extern(C++, `Namespace16479`) void CPPPrinterNS16479_1(const(char)*); void func16479_11 (alias Print) (); static assert(func16479_11!(CPPPrinter16479).mangleof == `_Z12func16479_11IXadL_Z15CPPPrinter16479PKcEEEvv`); static assert(func16479_11!(CPPPrinterNS16479).mangleof == `_Z12func16479_11IXadL_ZN14Namespace1647917CPPPrinterNS16479EPKcEEEvv`); static assert(func16479_11!(CPPPrinterNS16479_1).mangleof == `_Z12func16479_11IXadL_ZN14Namespace1647919CPPPrinterNS16479_1EPKcEEEvv`); // Functions are fine, but templates are finer // --- // template<template<typename, int> class Container, typename T, int Val> // Container<T, Val> func16479_12 (); // --- Container!(T, Val) func16479_12 (alias Container, T, int Val) (); static assert(func16479_12!(Array16479_2, int, 42).mangleof == `_Z12func16479_12I12Array16479_2iLi42EET_IT0_XT1_EEv`); // Substitution needs to happen on the most specialized type // Iow, `ref T identity (T) (ref T v);` should be mangled as // `_Z8identityIiET_*S1_*`, not as `_Z8identityIiET_*RS0_*` ref FuncT1 func16479_13_1 (FuncT1) (ref FuncT1); FuncT1* func16479_13_2 (FuncT1) (FuncT1*); void func16479_13_3 (FuncT1) (FuncT1*, FuncT1*); FuncT1** func16479_13_4 (FuncT1) (FuncT1*, FuncT1); FuncT1 func16479_13_5 (FuncT1) (FuncT1*, FuncT1**); static assert(func16479_13_1!(int).mangleof == `_Z14func16479_13_1IiERT_S1_`); static assert(func16479_13_2!(float).mangleof == `_Z14func16479_13_2IfEPT_S1_`); static assert(func16479_13_3!(int).mangleof == `_Z14func16479_13_3IiEvPT_S1_`); static assert(func16479_13_4!(int).mangleof == `_Z14func16479_13_4IiEPPT_S1_S0_`); static assert(func16479_13_5!(int).mangleof == `_Z14func16479_13_5IiET_PS0_PS1_`); // Opaque types result in a slightly different AST vector!T* func16479_14 (T) (T v); static assert(func16479_14!(int).mangleof == `_Z12func16479_14IiEPSt6vectorIT_ES1_`); struct Foo16479_15 (T); struct Baguette16479_15 (T); struct Bar16479_15 (T); struct FooBar16479_15 (A, B); void inst16479_15_2 (A, B) (); void inst16479_15_3 (A, B, C) (); static assert(inst16479_15_2!(Bar16479_15!int, int).mangleof == `_Z14inst16479_15_2I11Bar16479_15IiEiEvv`); static assert(inst16479_15_2!(int, Bar16479_15!int).mangleof == `_Z14inst16479_15_2Ii11Bar16479_15IiEEvv`); static assert(inst16479_15_2!(Bar16479_15!int, FooBar16479_15!(Bar16479_15!int, Foo16479_15!(Bar16479_15!(Foo16479_15!int)))).mangleof == `_Z14inst16479_15_2I11Bar16479_15IiE14FooBar16479_15IS1_11Foo16479_15IS0_IS3_IiEEEEEvv`); static assert(inst16479_15_3!(int, Bar16479_15!int, FooBar16479_15!(Bar16479_15!int, Foo16479_15!(Bar16479_15!(Foo16479_15!int)))).mangleof == `_Z14inst16479_15_3Ii11Bar16479_15IiE14FooBar16479_15IS1_11Foo16479_15IS0_IS3_IiEEEEEvv`); static import cppmangle2; cppmangle2.Struct18922* func16479_16_1 (T) (T*); static assert(func16479_16_1!int.mangleof == `_Z14func16479_16_1IiEPN14Namespace1892211Struct18922EPT_`); T* func16479_16_2 (T) (T*); static assert(func16479_16_2!int.mangleof == `_Z14func16479_16_2IiEPT_S1_`); static assert(func16479_16_2!(cppmangle2.vector!int).mangleof == `_Z14func16479_16_2ISt6vectorIiEEPT_S3_`); static assert(func16479_16_2!(cppmangle2.vector!int).mangleof == func16479_16_2!(cppmangle2.vector!int).mangleof); cppmangle2.vector!T* func16479_16_3 (T) (T*); static assert(func16479_16_3!int.mangleof == `_Z14func16479_16_3IiEPSt6vectorIiEPT_`); extern(C++, `fakestd`) { extern (C++, `__1`) { struct allocator16479 (T); struct vector16479(T, alloc = allocator16479!T); } } vector16479!(T, allocator16479!T)* func16479_17_1(T)(); vector16479!(T)* func16479_17_2(T)(); static assert(func16479_17_1!int.mangleof == `_Z14func16479_17_1IiEPN7fakestd3__111vector16479IT_NS1_14allocator16479IS3_EEEEv`); static assert(func16479_17_2!int.mangleof == `_Z14func16479_17_2IiEPN7fakestd3__111vector16479IT_NS1_14allocator16479IS3_EEEEv`); // Make sure substitution takes place everywhere in template arg list extern(C++, "ns") void func16479_18_1(T, X)(int, X, T, float); extern(C++, "ns") void func16479_18_2(T, X)(X, int, T, float); static assert(func16479_18_1!(double, char).mangleof == `_ZN2ns14func16479_18_1IdcEEviT0_T_f`); static assert(func16479_18_2!(double, char).mangleof == `_ZN2ns14func16479_18_2IdcEEvT0_iT_f`); } /**************************************/ // https://issues.dlang.org/show_bug.cgi?id=19278 // extern(C++, "name") doesn't accept expressions extern(C++, "hello" ~ "world") { void test19278(); } enum NS = "lookup"; extern(C++, (NS)) { void test19278_2(); } alias AliasSeq(Args...) = Args; alias Tup = AliasSeq!("hello", "world"); extern(C++, (Tup)) { void test19278_3(); __gshared size_t test19278_var; } extern(C++, (AliasSeq!(Tup, "yay"))) { void test19278_4(); } version(Win64) { static assert(test19278.mangleof == "?test19278@helloworld@@YAXXZ"); static assert(test19278_2.mangleof == "?test19278_2@lookup@@YAXXZ"); static assert(test19278_3.mangleof == "?test19278_3@world@hello@@YAXXZ"); static assert(test19278_4.mangleof == "?test19278_4@yay@world@hello@@YAXXZ"); static assert(test19278_var.mangleof == "?test19278_var@world@hello@@3_KA"); } else version(Posix) { static assert(test19278.mangleof == "_ZN10helloworld9test19278Ev"); static assert(test19278_2.mangleof == "_ZN6lookup11test19278_2Ev"); static assert(test19278_3.mangleof == "_ZN5hello5world11test19278_3Ev"); static assert(test19278_4.mangleof == "_ZN5hello5world3yay11test19278_4Ev"); static assert(test19278_var.mangleof == "_ZN5hello5world13test19278_varE"); } /**************************************/ // https://issues.dlang.org/show_bug.cgi?id=18958 // Issue 18958 - extern(C++) wchar, dchar mangling not correct version(Posix) enum __c_wchar_t : dchar; else version(Windows) enum __c_wchar_t : wchar; alias wchar_t = __c_wchar_t; extern (C++) void test_char_mangling(char, wchar, dchar, wchar_t); version (Posix) { static assert(test_char_mangling.mangleof == "_Z18test_char_manglingcDsDiw"); } version (Win64) { static assert(test_char_mangling.mangleof == "?test_char_mangling@@YAXD_S_U_W@Z"); } // https://github.com/dlang/dmd/pull/10021/files#r294055424 version (Posix) { extern(C++, PR10021_NS) struct PR10021_Struct(T){} extern(C++) void PR10021_fun(int i)(PR10021_Struct!int); static assert(PR10021_fun!0.mangleof == `_Z11PR10021_funILi0EEvN10PR10021_NS14PR10021_StructIiEE`); } // https://github.com/dlang/dmd/pull/10021#discussion_r294095749 version (Posix) { extern(C++, "a", "b") struct PR10021_Struct2 { void func(); void func2(PR10021_Struct2*); } static assert(PR10021_Struct2.func.mangleof == `_ZN1a1b15PR10021_Struct24funcEv`); static assert(PR10021_Struct2.func2.mangleof == `_ZN1a1b15PR10021_Struct25func2EPS1_`); }
D
void main() { runSolver(); } void problem() { auto S = cast(char[])scan; auto A = scan!long; auto B = scan!long; auto solve() { swap(S[A - 1], S[B - 1]); return S.to!string; } outputForAtCoder(&solve); } // ---------------------------------------------- import std.stdio, std.conv, std.array, std.string, std.algorithm, std.container, std.range, core.stdc.stdlib, std.math, std.typecons, std.numeric, std.traits, std.functional, std.bigint, std.datetime.stopwatch, core.time, core.bitop; T[][] combinations(T)(T[] s, in long m) { if (!m) return [[]]; if (s.empty) return []; return s[1 .. $].combinations(m - 1).map!(x => s[0] ~ x).array ~ s[1 .. $].combinations(m); } string scan(){ static string[] ss; while(!ss.length) ss = readln.chomp.split; string res = ss[0]; ss.popFront; return res; } T scan(T)(){ return scan.to!T; } T[] scan(T)(long n){ return n.iota.map!(i => scan!T()).array; } void deb(T ...)(T t){ debug writeln(t); } alias Point = Tuple!(long, "x", long, "y"); Point invert(Point p) { return Point(p.y, p.x); } long[] divisors(long n) { long[] ret; for (long i = 1; i * i <= n; i++) { if (n % i == 0) { ret ~= i; if (i * i != n) ret ~= n / i; } } return ret.sort.array; } bool chmin(T)(ref T a, T b) { if (b < a) { a = b; return true; } else return false; } bool chmax(T)(ref T a, T b) { if (b > a) { a = b; return true; } else return false; } string charSort(alias S = "a < b")(string s) { return (cast(char[])((cast(byte[])s).sort!S.array)).to!string; } ulong comb(ulong a, ulong b) { if (b == 0) {return 1;}else{return comb(a - 1, b - 1) * a / b;}} string toAnswerString(R)(R r) { return r.map!"a.to!string".joiner(" ").array.to!string; } struct ModInt(uint MD) if (MD < int.max) {ulong v;this(string v) {this(v.to!long);}this(int v) {this(long(v));}this(long v) {this.v = (v%MD+MD)%MD;}void opAssign(long t) {v = (t%MD+MD)%MD;}static auto normS(ulong x) {return (x<MD)?x:x-MD;}static auto make(ulong x) {ModInt m; m.v = x; return m;}auto opBinary(string op:"+")(ModInt r) const {return make(normS(v+r.v));}auto opBinary(string op:"-")(ModInt r) const {return make(normS(v+MD-r.v));}auto opBinary(string op:"*")(ModInt r) const {return make((ulong(v)*r.v%MD).to!ulong);}auto opBinary(string op:"^^", T)(T r) const {long x=v;long y=1;while(r){if(r%2==1)y=(y*x)%MD;x=x^^2%MD;r/=2;} return make(y);}auto opBinary(string op:"/")(ModInt r) const {return this*memoize!inv(r);}static ModInt inv(ModInt x) {return x^^(MD-2);}string toString() const {return v.to!string;}auto opOpAssign(string op)(ModInt r) {return mixin ("this=this"~op~"r");}} alias MInt1 = ModInt!(10^^9 + 7); alias MInt9 = ModInt!(998_244_353); void outputForAtCoder(T)(T delegate() fn) { static if (is(T == float) || is(T == double) || is(T == real)) "%.16f".writefln(fn()); else static if (is(T == void)) fn(); else static if (is(T == string)) fn().writeln; else static if (isInputRange!T) { static if (!is(string == ElementType!T) && isInputRange!(ElementType!T)) foreach(r; fn()) r.toAnswerString.writeln; else foreach(r; fn()) r.writeln; } else fn().writeln; } void runSolver() { enum BORDER = "=================================="; debug { BORDER.writeln; while(!stdin.eof) { "<<< Process time: %s >>>".writefln(benchmark!problem(1)); BORDER.writeln; } } else problem(); } enum YESNO = [true: "Yes", false: "No"]; // -----------------------------------------------
D
/** Types for project descriptions (dub describe). Copyright: © 2015-2016 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 dub.description; import dub.compilers.buildsettings; import dub.dependency; import dub.internal.vibecompat.data.serialization; /** Describes a complete project for use in IDEs or build tools. The build settings will be specific to the compiler, platform and configuration that has been selected. */ struct ProjectDescription { string rootPackage; /// Name of the root package being built string configuration; /// Name of the selected build configuration string buildType; /// Name of the selected build type string compiler; /// Canonical name of the compiler used (e.g. "dmd", "gdc" or "ldc") string[] architecture; /// Architecture constants for the selected platform (e.g. `["x86_64"]`) string[] platform; /// Platform constants for the selected platform (e.g. `["posix", "osx"]`) PackageDescription[] packages; /// All packages in the dependency tree TargetDescription[] targets; /// Build targets @ignore size_t[string] targetLookup; /// Target index by package name name /// Targets by name ref inout(TargetDescription) lookupTarget(string name) inout { import std.exception : enforce; auto pti = name in targetLookup; enforce(pti !is null, "Target '"~name~"' doesn't exist. Is the target type set to \"none\" in the package recipe?"); return targets[*pti]; } /// Projects by name ref inout(PackageDescription) lookupPackage(string name) inout { foreach (ref p; packages) if (p.name == name) { static if (__VERSION__ > 2065) return p; else return *cast(inout(PackageDescription)*)&p; } throw new Exception("Package '"~name~"' not found in dependency tree."); } /// Root package ref inout(PackageDescription) lookupRootPackage() inout { return lookupPackage(rootPackage); } } /** Describes the build settings and meta data of a single package. This structure contains the effective build settings and dependencies for the selected build platform. This structure is most useful for displaying information about a package in an IDE. Use `TargetDescription` instead when writing a build-tool. */ struct PackageDescription { string path; /// Path to the package string name; /// Qualified name of the package Version version_; /// Version of the package string description; string homepage; string[] authors; string copyright; string license; string[] dependencies; bool active; /// Does this package take part in the build? string configuration; /// The configuration that is built @byName TargetType targetType; string targetPath; string targetName; string targetFileName; string workingDirectory; string mainSourceFile; string[] dflags; /// Flags passed to the D compiler string[] lflags; /// Flags passed to the linker string[] libs; /// Librariy names to link against (typically using "-l<name>") string[] copyFiles; /// Files to copy to the target directory string[] versions; /// D version identifiers to set string[] debugVersions; /// D debug version identifiers to set string[] importPaths; string[] stringImportPaths; string[] preGenerateCommands; /// commands executed before creating the description string[] postGenerateCommands; /// commands executed after creating the description string[] preBuildCommands; /// Commands to execute prior to every build string[] postBuildCommands; /// Commands to execute after every build @byName BuildRequirement[] buildRequirements; @byName BuildOption[] options; SourceFileDescription[] files; /// A list of all source/import files possibly used by the package } /** Describes the settings necessary to build a certain binary target. */ struct TargetDescription { string rootPackage; /// Main package associated with this target, this is also the name of the target. string[] packages; /// All packages contained in this target (e.g. for target type "sourceLibrary") string rootConfiguration; /// Build configuration of the target's root package used for building BuildSettings buildSettings; /// Final build settings to use when building the target string[] dependencies; /// List of all dependencies of this target (package names) string[] linkDependencies; /// List of all link-dependencies of this target (target names) } /** Description for a single source file known to the package. */ struct SourceFileDescription { @byName SourceFileRole role; /// Main role this file plays in the build process string path; /// Full path to the file } /** Determines the role that a file plays in the build process. If a file has multiple roles, higher enum values will have precedence, i.e. if a file is used both, as a source file and as an import file, it will be classified as a source file. */ enum SourceFileRole { unusedStringImport, /// Used as a string import for another configuration/platform unusedImport, /// Used as an import for another configuration/platform unusedSource, /// Used as a source file for another configuration/platform stringImport, /// Used as a string import file import_, /// Used as an import file source /// Used as a source file }
D
/**************************************************************************** ** ** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the QtCore module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL21$ ** Commercial License Usage ** Licensees holding valid commercial Qt licenses may use this file in ** accordance with the commercial license agreement provided with the ** Software or, alternatively, in accordance with the terms contained in ** a written agreement between you and Digia. For licensing terms and ** conditions see http://qt.digia.com/licensing. For further information ** use the contact form at http://qt.digia.com/contact-us. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser ** General Public License version 2.1 or version 3 as published by the Free ** Software Foundation and appearing in the file LICENSE.LGPLv21 and ** LICENSE.LGPLv3 included in the packaging of this file. Please review the ** following information to ensure the GNU Lesser General Public License ** requirements will be met: https://www.gnu.org/licenses/lgpl.html and ** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ** ** In addition, as a special exception, Digia gives you certain additional ** rights. These rights are described in the Digia Qt LGPL Exception ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ** ** $QT_END_LICENSE$ ** ****************************************************************************/ /* Dialogs */ #ifndef QT_NO_COLORDIALOG # define QT_NO_COLORDIALOG #endif #ifndef QT_NO_FILEDIALOG # define QT_NO_FILEDIALOG #endif #ifndef QT_NO_FONTDIALOG # define QT_NO_FONTDIALOG #endif #ifndef QT_NO_INPUTDIALOG # define QT_NO_INPUTDIALOG #endif #ifndef QT_NO_PRINTDIALOG # define QT_NO_PRINTDIALOG #endif #ifndef QT_NO_PROGRESSDIALOG # define QT_NO_PROGRESSDIALOG #endif /* Images */ #ifndef QT_NO_IMAGEFORMAT_BMP # define QT_NO_IMAGEFORMAT_BMP #endif #ifndef QT_NO_IMAGEFORMAT_PPM # define QT_NO_IMAGEFORMAT_PPM #endif #ifndef QT_NO_MOVIE # define QT_NO_MOVIE #endif /* Internationalization */ #ifndef QT_NO_BIG_CODECS # define QT_NO_BIG_CODECS #endif #ifndef QT_NO_TEXTCODEC # define QT_NO_TEXTCODEC #endif #ifndef QT_NO_CODECS # define QT_NO_CODECS #endif #ifndef QT_NO_TRANSLATION # define QT_NO_TRANSLATION #endif /* ItemViews */ #ifndef QT_NO_TABLEVIEW # define QT_NO_TABLEVIEW #endif #ifndef QT_NO_TREEVIEW # define QT_NO_TREEVIEW #endif /* Kernel */ #ifndef QT_NO_ACTION # define QT_NO_ACTION #endif #ifndef QT_NO_CLIPBOARD # define QT_NO_CLIPBOARD #endif #ifndef QT_NO_DRAGANDDROP # define QT_NO_DRAGANDDROP #endif #ifndef QT_NO_EFFECTS # define QT_NO_EFFECTS #endif #ifndef QT_NO_PROPERTIES # define QT_NO_PROPERTIES #endif #ifndef QT_NO_SESSIONMANAGER # define QT_NO_SESSIONMANAGER #endif #ifndef QT_NO_SHORTCUT # define QT_NO_SHORTCUT #endif #ifndef QT_NO_WHEELEVENT # define QT_NO_WHEELEVENT #endif /* Networking */ #ifndef QT_NO_HTTP # define QT_NO_HTTP #endif #ifndef QT_NO_NETWORKPROXY # define QT_NO_NETWORKPROXY #endif #ifndef QT_NO_SOCKS5 # define QT_NO_SOCKS5 #endif #ifndef QT_NO_UDPSOCKET # define QT_NO_UDPSOCKET #endif #ifndef QT_NO_FTP # define QT_NO_FTP #endif /* Painting */ #ifndef QT_NO_COLORNAMES # define QT_NO_COLORNAMES #endif #ifndef QT_NO_PICTURE # define QT_NO_PICTURE #endif #ifndef QT_NO_PRINTER # define QT_NO_PRINTER #endif #ifndef QT_NO_CUPS # define QT_NO_CUPS #endif /* Styles */ #ifndef QT_NO_STYLE_STYLESHEET # define QT_NO_STYLE_STYLESHEET #endif /* Utilities */ #ifndef QT_NO_UNDOCOMMAND # define QT_NO_UNDOCOMMAND #endif #ifndef QT_NO_UNDOGROUP # define QT_NO_UNDOGROUP #endif #ifndef QT_NO_UNDOSTACK # define QT_NO_UNDOSTACK #endif #ifndef QT_NO_UNDOVIEW # define QT_NO_UNDOVIEW #endif #ifndef QT_NO_GESTURES # define QT_NO_GESTURES #endif /* Widgets */ #ifndef QT_NO_LCDNUMBER # define QT_NO_LCDNUMBER #endif #ifndef QT_NO_CALENDARWIDGET # define QT_NO_CALENDARWIDGET #endif #ifndef QT_NO_DATETIMEEDIT # define QT_NO_DATETIMEEDIT #endif #ifndef QT_NO_MENU # define QT_NO_MENU #endif #ifndef QT_NO_CONTEXTMENU # define QT_NO_CONTEXTMENU #endif #ifndef QT_NO_MAINWINDOW # define QT_NO_MAINWINDOW #endif #ifndef QT_NO_DOCKWIDGET # define QT_NO_DOCKWIDGET #endif #ifndef QT_NO_TOOLBAR # define QT_NO_TOOLBAR #endif #ifndef QT_NO_MENUBAR # define QT_NO_MENUBAR #endif #ifndef QT_NO_PROGRESSBAR # define QT_NO_PROGRESSBAR #endif #ifndef QT_NO_SIZEGRIP # define QT_NO_SIZEGRIP #endif #ifndef QT_NO_DIAL # define QT_NO_DIAL #endif #ifndef QT_NO_STACKEDWIDGET # define QT_NO_STACKEDWIDGET #endif #ifndef QT_NO_TABWIDGET # define QT_NO_TABWIDGET #endif #ifndef QT_NO_STATUSBAR # define QT_NO_STATUSBAR #endif #ifndef QT_NO_STATUSTIP # define QT_NO_STATUSTIP #endif #ifndef QT_NO_TABLEWIDGET # define QT_NO_TABLEWIDGET #endif #ifndef QT_NO_TOOLBUTTON # define QT_NO_TOOLBUTTON #endif #ifndef QT_NO_TABBAR # define QT_NO_TABBAR #endif #ifndef QT_NO_TOOLBOX # define QT_NO_TOOLBOX #endif #ifndef QT_NO_WHATSTHIS # define QT_NO_WHATSTHIS #endif #ifndef QT_NO_TOOLTIP # define QT_NO_TOOLTIP #endif #ifndef QT_NO_TREEWIDGET # define QT_NO_TREEWIDGET #endif
D
/** * Compiler implementation of the * $(LINK2 http://www.dlang.org, D programming language). * * Copyright: Copyright (c) 1999-2017 by Digital Mars, 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/ddmd/sideeffect.d, _sideeffect.d) */ module ddmd.sideeffect; // Online documentation: https://dlang.org/phobos/ddmd_sideeffect.html import ddmd.apply; import ddmd.declaration; import ddmd.dscope; import ddmd.expression; import ddmd.expressionsem; import ddmd.func; import ddmd.globals; import ddmd.identifier; import ddmd.init; import ddmd.mtype; import ddmd.semantic; import ddmd.tokens; import ddmd.visitor; /************************************************** * Front-end expression rewriting should create temporary variables for * non trivial sub-expressions in order to: * 1. save evaluation order * 2. prevent sharing of sub-expression in AST */ extern (C++) bool isTrivialExp(Expression e) { extern (C++) final class IsTrivialExp : StoppableVisitor { alias visit = super.visit; public: extern (D) this() { } override void visit(Expression e) { /* https://issues.dlang.org/show_bug.cgi?id=11201 * CallExp is always non trivial expression, * especially for inlining. */ if (e.op == TOKcall) { stop = true; return; } // stop walking if we determine this expression has side effects stop = lambdaHasSideEffect(e); } } scope IsTrivialExp v = new IsTrivialExp(); return walkPostorder(e, v) == false; } /******************************************** * Determine if Expression has any side effects. */ extern (C++) bool hasSideEffect(Expression e) { extern (C++) final class LambdaHasSideEffect : StoppableVisitor { alias visit = super.visit; public: extern (D) this() { } override void visit(Expression e) { // stop walking if we determine this expression has side effects stop = lambdaHasSideEffect(e); } } scope LambdaHasSideEffect v = new LambdaHasSideEffect(); return walkPostorder(e, v); } /******************************************** * Determine if the call of f, or function type or delegate type t1, has any side effects. * Returns: * 0 has any side effects * 1 nothrow + constant purity * 2 nothrow + strong purity */ extern (C++) int callSideEffectLevel(FuncDeclaration f) { /* https://issues.dlang.org/show_bug.cgi?id=12760 * ctor call always has side effects. */ if (f.isCtorDeclaration()) return 0; assert(f.type.ty == Tfunction); TypeFunction tf = cast(TypeFunction)f.type; if (tf.isnothrow) { PURE purity = f.isPure(); if (purity == PUREstrong) return 2; if (purity == PUREconst) return 1; } return 0; } extern (C++) int callSideEffectLevel(Type t) { t = t.toBasetype(); TypeFunction tf; if (t.ty == Tdelegate) tf = cast(TypeFunction)(cast(TypeDelegate)t).next; else { assert(t.ty == Tfunction); tf = cast(TypeFunction)t; } tf.purityLevel(); PURE purity = tf.purity; if (t.ty == Tdelegate && purity > PUREweak) { if (tf.isMutable()) purity = PUREweak; else if (!tf.isImmutable()) purity = PUREconst; } if (tf.isnothrow) { if (purity == PUREstrong) return 2; if (purity == PUREconst) return 1; } return 0; } extern (C++) bool lambdaHasSideEffect(Expression e) { switch (e.op) { // Sort the cases by most frequently used first case TOKassign: case TOKplusplus: case TOKminusminus: case TOKdeclaration: case TOKconstruct: case TOKblit: case TOKaddass: case TOKminass: case TOKcatass: case TOKcatelemass: case TOKcatdcharass: case TOKmulass: case TOKdivass: case TOKmodass: case TOKshlass: case TOKshrass: case TOKushrass: case TOKandass: case TOKorass: case TOKxorass: case TOKpowass: case TOKin: case TOKremove: case TOKassert: case TOKhalt: case TOKdelete: case TOKnew: case TOKnewanonclass: return true; case TOKcall: { CallExp ce = cast(CallExp)e; /* Calling a function or delegate that is pure nothrow * has no side effects. */ if (ce.e1.type) { Type t = ce.e1.type.toBasetype(); if (t.ty == Tdelegate) t = (cast(TypeDelegate)t).next; if (t.ty == Tfunction && (ce.f ? callSideEffectLevel(ce.f) : callSideEffectLevel(ce.e1.type)) > 0) { } else return true; } break; } case TOKcast: { CastExp ce = cast(CastExp)e; /* if: * cast(classtype)func() // because it may throw */ if (ce.to.ty == Tclass && ce.e1.op == TOKcall && ce.e1.type.ty == Tclass) return true; break; } default: break; } return false; } /*********************************** * The result of this expression will be discarded. * Print error messages if the operation has no side effects (and hence is meaningless). * Returns: * true if expression has no side effects */ extern (C++) bool discardValue(Expression e) { if (lambdaHasSideEffect(e)) // check side-effect shallowly return false; switch (e.op) { case TOKcast: { CastExp ce = cast(CastExp)e; if (ce.to.equals(Type.tvoid)) { /* * Don't complain about an expression with no effect if it was cast to void */ return false; } break; // complain } case TOKerror: return false; case TOKvar: { VarDeclaration v = (cast(VarExp)e).var.isVarDeclaration(); if (v && (v.storage_class & STCtemp)) { // https://issues.dlang.org/show_bug.cgi?id=5810 // Don't complain about an internal generated variable. return false; } break; } case TOKcall: /* Issue 3882: */ if (global.params.warnings && !global.gag) { CallExp ce = cast(CallExp)e; if (e.type.ty == Tvoid) { /* Don't complain about calling void-returning functions with no side-effect, * because purity and nothrow are inferred, and because some of the * runtime library depends on it. Needs more investigation. * * One possible solution is to restrict this message to only be called in hierarchies that * never call assert (and or not called from inside unittest blocks) */ } else if (ce.e1.type) { Type t = ce.e1.type.toBasetype(); if (t.ty == Tdelegate) t = (cast(TypeDelegate)t).next; if (t.ty == Tfunction && (ce.f ? callSideEffectLevel(ce.f) : callSideEffectLevel(ce.e1.type)) > 0) { const(char)* s; if (ce.f) s = ce.f.toPrettyChars(); else if (ce.e1.op == TOKstar) { // print 'fp' if ce.e1 is (*fp) s = (cast(PtrExp)ce.e1).e1.toChars(); } else s = ce.e1.toChars(); e.warning("calling %s without side effects discards return value of type %s, prepend a cast(void) if intentional", s, e.type.toChars()); } } } return false; case TOKandand: case TOKoror: { LogicalExp aae = cast(LogicalExp)e; return discardValue(aae.e2); } case TOKquestion: { CondExp ce = cast(CondExp)e; /* https://issues.dlang.org/show_bug.cgi?id=6178 * https://issues.dlang.org/show_bug.cgi?id=14089 * Either CondExp::e1 or e2 may have * redundant expression to make those types common. For example: * * struct S { this(int n); int v; alias v this; } * S[int] aa; * aa[1] = 0; * * The last assignment statement will be rewitten to: * * 1 in aa ? aa[1].value = 0 : (aa[1] = 0, aa[1].this(0)).value; * * The last DotVarExp is necessary to take assigned value. * * int value = (aa[1] = 0); // value = aa[1].value * * To avoid false error, discardValue() should be called only when * the both tops of e1 and e2 have actually no side effects. */ if (!lambdaHasSideEffect(ce.e1) && !lambdaHasSideEffect(ce.e2)) { return discardValue(ce.e1) | discardValue(ce.e2); } return false; } case TOKcomma: { CommaExp ce = cast(CommaExp)e; /* Check for compiler-generated code of the form auto __tmp, e, __tmp; * In such cases, only check e for side effect (it's OK for __tmp to have * no side effect). * See https://issues.dlang.org/show_bug.cgi?id=4231 for discussion */ CommaExp firstComma = ce; while (firstComma.e1.op == TOKcomma) firstComma = cast(CommaExp)firstComma.e1; if (firstComma.e1.op == TOKdeclaration && ce.e2.op == TOKvar && (cast(DeclarationExp)firstComma.e1).declaration == (cast(VarExp)ce.e2).var) { return false; } // Don't check e1 until we cast(void) the a,b code generation //discardValue(ce.e1); return discardValue(ce.e2); } case TOKtuple: /* Pass without complaint if any of the tuple elements have side effects. * Ideally any tuple elements with no side effects should raise an error, * this needs more investigation as to what is the right thing to do. */ if (!hasSideEffect(e)) break; return false; default: break; } e.error("`%s` has no effect", e.toChars()); return true; } /************************************************** * Build a temporary variable to copy the value of e into. * Params: * stc = storage classes will be added to the made temporary variable * name = name for temporary variable * e = original expression * Returns: * Newly created temporary variable. */ VarDeclaration copyToTemp(StorageClass stc, const char* name, Expression e) { assert(name && name[0] == '_' && name[1] == '_'); auto id = Identifier.generateId(name); auto ez = new ExpInitializer(e.loc, e); auto vd = new VarDeclaration(e.loc, e.type, id, ez); vd.storage_class = stc; vd.storage_class |= STCtemp; vd.storage_class |= STCctfe; // temporary is always CTFEable return vd; } /************************************************** * Build a temporary variable to extract e's evaluation, if e is not trivial. * Params: * sc = scope * name = name for temporary variable * e0 = a new side effect part will be appended to it. * e = original expression * alwaysCopy = if true, build new temporary variable even if e is trivial. * Returns: * When e is trivial and alwaysCopy == false, e itself is returned. * Otherwise, a new VarExp is returned. * Note: * e's lvalue-ness will be handled well by STCref or STCrvalue. */ Expression extractSideEffect(Scope* sc, const char* name, ref Expression e0, Expression e, bool alwaysCopy = false) { if (!alwaysCopy && isTrivialExp(e)) return e; auto vd = copyToTemp(0, name, e); if (e.isLvalue()) vd.storage_class |= STCref; else vd.storage_class |= STCrvalue; Expression de = new DeclarationExp(vd.loc, vd); Expression ve = new VarExp(vd.loc, vd); de = de.expressionSemantic(sc); ve = ve.expressionSemantic(sc); e0 = Expression.combine(e0, de); return ve; }
D
/******************************************************************************* * Copyright (c) 2007, 2008 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * IBM Corporation - initial API and implementation * * Port to the D programming language: * Jacob Carlborg <doob@me.com> *******************************************************************************/ module dwt.dnd.DragSourceEffect; import dwt.dwthelper.utils; import dwt.DWT; import dwt.dnd.DragSourceAdapter; import dwt.widgets.Control; /** * This class provides default implementations to display a drag source * effect during a drag and drop operation. The current implementation * does not provide any visual feedback. * * <p>The drag source effect has the same API as the * <code>DragSourceAdapter</code> so that it can provide custom visual * feedback when a <code>DragSourceEvent</code> occurs. * </p> * * <p>Classes that wish to provide their own drag source effect such as * displaying a default source image during a drag can extend the <code>DragSourceEffect</code> * class, override the <code>DragSourceAdapter.dragStart</code> method and set * the field <code>DragSourceEvent.image</code> with their own image. * The image should be disposed when <code>DragSourceAdapter.dragFinished</code> is called. * </p> * * @see DragSourceAdapter * @see DragSourceEvent * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a> * * @since 3.3 */ public class DragSourceEffect : DragSourceAdapter { Control control = null; /** * Creates a new <code>DragSourceEffect</code> to handle drag effect from the specified <code>Control</code>. * * @param control the <code>Control</code> that the user clicks on to initiate the drag * * @exception IllegalArgumentException <ul> * <li>ERROR_NULL_ARGUMENT - if the control is null</li> * </ul> */ public this(Control control) { if (control is null) DWT.error(DWT.ERROR_NULL_ARGUMENT); this.control = control; } /** * Returns the Control which is registered for this DragSourceEffect. This is the control that the * user clicks in to initiate dragging. * * @return the Control which is registered for this DragSourceEffect */ public Control getControl() { return control; } }
D
instance Mod_1738_KDF_Velario_PAT (Npc_Default) { // ------ NSC ------ name = "Velario"; guild = GIL_vlk; id = 1738; voice = 0; flags = 0; npctype = NPCTYPE_main; // ------ Attribute ------ B_SetAttributesToChapter (self, 3); aivar[AIV_MagicUser] = MAGIC_ALWAYS; // ------ Kampf-Taktik ------ fight_tactic = FAI_HUMAN_STRONG; // ------ Equippte Waffen ------ EquipItem (self, ItMW_Addon_Stab01); // ------ Inventory ------ B_CreateAmbientInv (self); // ------ visuals ------ B_SetNpcVisual (self, MALE, "Hum_Head_Bald", Face_N_NormalBart16, BodyTex_N, ITAR_KDF_H); Mdl_SetModelFatness (self,0); Mdl_ApplyOverlayMds (self, "Humans_Mage.mds"); // ------ NSC-relevante Talente vergeben ------ B_GiveNpcTalents (self); // ------ Kampf-Talente ------ B_SetFightSkills (self, 60); // ------ TA anmelden ------ daily_routine = Rtn_Start_1738; }; FUNC VOID Rtn_Start_1738() { TA_Read_Bookstand (06,00,10,05,"WP_PAT_WEG_68"); TA_Study_WP (10,05,23,05,"WP_PAT_WEG_70"); TA_Sit_Throne (23,05,06,00,"WP_PAT_WEG_67"); }; FUNC VOID Rtn_Runemaker_1738() { TA_Make_Rune (06,00,10,05,"WP_PAT_WEG_86"); TA_Make_Rune (10,05,06,00,"WP_PAT_WEG_86"); };
D
/Users/marvinevins/Library/Autosave\ Information/FoodLayoutTest/DerivedData/FoodLayoutTest/Build/Intermediates.noindex/FoodLayoutTest.build/Debug-iphonesimulator/FoodLayoutTest.build/Objects-normal/x86_64/SceneDelegate.o : /Users/marvinevins/Library/Autosave\ Information/FoodLayoutTest/FoodLayoutTest/SceneDelegate.swift /Users/marvinevins/Library/Autosave\ Information/FoodLayoutTest/FoodLayoutTest/AppDelegate.swift /Users/marvinevins/Library/Autosave\ Information/FoodLayoutTest/FoodLayoutTest/ViewController.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/ObjectiveC.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/CoreImage.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/QuartzCore.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Dispatch.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Metal.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/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/SwiftOnoneSupport.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.5.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.5.sdk/System/Library/Frameworks/OpenGLES.framework/Headers/OpenGLES.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.5.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImage.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.5.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/QuartzCore.apinotes /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/apinotes/Dispatch.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.5.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.5.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.5.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.5.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.5.sdk/System/Library/Frameworks/UserNotifications.framework/Headers/UserNotifications.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.5.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.5.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.5.sdk/System/Library/Frameworks/Security.framework/Headers/Security.apinotes /Users/marvinevins/Library/Autosave\ Information/FoodLayoutTest/DerivedData/FoodLayoutTest/Build/Intermediates.noindex/FoodLayoutTest.build/Debug-iphonesimulator/FoodLayoutTest.build/Objects-normal/x86_64/SceneDelegate~partial.swiftmodule : /Users/marvinevins/Library/Autosave\ Information/FoodLayoutTest/FoodLayoutTest/SceneDelegate.swift /Users/marvinevins/Library/Autosave\ Information/FoodLayoutTest/FoodLayoutTest/AppDelegate.swift /Users/marvinevins/Library/Autosave\ Information/FoodLayoutTest/FoodLayoutTest/ViewController.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/ObjectiveC.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/CoreImage.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/QuartzCore.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Dispatch.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Metal.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/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/SwiftOnoneSupport.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.5.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.5.sdk/System/Library/Frameworks/OpenGLES.framework/Headers/OpenGLES.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.5.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImage.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.5.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/QuartzCore.apinotes /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/apinotes/Dispatch.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.5.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.5.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.5.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.5.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.5.sdk/System/Library/Frameworks/UserNotifications.framework/Headers/UserNotifications.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.5.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.5.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.5.sdk/System/Library/Frameworks/Security.framework/Headers/Security.apinotes /Users/marvinevins/Library/Autosave\ Information/FoodLayoutTest/DerivedData/FoodLayoutTest/Build/Intermediates.noindex/FoodLayoutTest.build/Debug-iphonesimulator/FoodLayoutTest.build/Objects-normal/x86_64/SceneDelegate~partial.swiftdoc : /Users/marvinevins/Library/Autosave\ Information/FoodLayoutTest/FoodLayoutTest/SceneDelegate.swift /Users/marvinevins/Library/Autosave\ Information/FoodLayoutTest/FoodLayoutTest/AppDelegate.swift /Users/marvinevins/Library/Autosave\ Information/FoodLayoutTest/FoodLayoutTest/ViewController.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/ObjectiveC.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/CoreImage.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/QuartzCore.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Dispatch.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Metal.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/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/SwiftOnoneSupport.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.5.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.5.sdk/System/Library/Frameworks/OpenGLES.framework/Headers/OpenGLES.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.5.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImage.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.5.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/QuartzCore.apinotes /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/apinotes/Dispatch.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.5.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.5.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.5.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.5.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.5.sdk/System/Library/Frameworks/UserNotifications.framework/Headers/UserNotifications.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.5.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.5.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.5.sdk/System/Library/Frameworks/Security.framework/Headers/Security.apinotes /Users/marvinevins/Library/Autosave\ Information/FoodLayoutTest/DerivedData/FoodLayoutTest/Build/Intermediates.noindex/FoodLayoutTest.build/Debug-iphonesimulator/FoodLayoutTest.build/Objects-normal/x86_64/SceneDelegate~partial.swiftsourceinfo : /Users/marvinevins/Library/Autosave\ Information/FoodLayoutTest/FoodLayoutTest/SceneDelegate.swift /Users/marvinevins/Library/Autosave\ Information/FoodLayoutTest/FoodLayoutTest/AppDelegate.swift /Users/marvinevins/Library/Autosave\ Information/FoodLayoutTest/FoodLayoutTest/ViewController.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/ObjectiveC.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/CoreImage.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/QuartzCore.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Dispatch.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Metal.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/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/SwiftOnoneSupport.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.5.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.5.sdk/System/Library/Frameworks/OpenGLES.framework/Headers/OpenGLES.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.5.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImage.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.5.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/QuartzCore.apinotes /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/apinotes/Dispatch.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.5.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.5.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.5.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.5.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.5.sdk/System/Library/Frameworks/UserNotifications.framework/Headers/UserNotifications.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.5.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.5.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.5.sdk/System/Library/Frameworks/Security.framework/Headers/Security.apinotes
D
module mahjong.domain.exceptions.illegalclaim; import std.string; import mahjong.domain.exceptions; import mahjong.domain.tile; class IllegalClaimException : MahjongException { this(const Tile tile, string msg) { super("Tried to claim %s but failed with reason %s".format(tile, msg)); } }
D