code
stringlengths
3
10M
language
stringclasses
31 values
/* TEST_OUTPUT --- fail_compilation/diag9420.d(21): Error: function diag9420.S.t3!().tx () is not callable using argument types (int) fail_compilation/diag9420.d(21): Error: expected 0 arguments, not 1 for non-variadic function type pure nothrow @safe void() --- */ mixin template Mixin() { } struct S { template t3(T...) { void tx(T){} alias t3 = tx; } } void main() { S s1; s1.t3!()(1); }
D
instance DIA_Addon_Ramon_EXIT(C_Info) { npc = BDT_1071_Addon_Ramon; nr = 999; condition = DIA_Addon_Ramon_EXIT_Condition; information = DIA_Addon_Ramon_EXIT_Info; permanent = TRUE; description = Dialog_Ende; }; func int DIA_Addon_Ramon_EXIT_Condition() { return TRUE; }; func void DIA_Addon_Ramon_EXIT_Info() { AI_StopProcessInfos(self); }; const string BDT_1071_Checkpoint = "BL_UP_CHECK"; instance DIA_Addon_Ramon_FirstWarn(C_Info) { npc = BDT_1071_Addon_Ramon; nr = 1; condition = DIA_Addon_Ramon_FirstWarn_Condition; information = DIA_Addon_Ramon_FirstWarn_Info; permanent = TRUE; important = TRUE; }; func int DIA_Addon_Ramon_FirstWarn_Condition() { if(Npc_GetDistToWP(other,BDT_1071_Checkpoint) <= 700) { Npc_SetRefuseTalk(self,5); return FALSE; }; if((self.aivar[AIV_Guardpassage_Status] == GP_NONE) && (self.aivar[AIV_PASSGATE] == FALSE) && (Hlp_StrCmp(Npc_GetNearestWP(self),self.wp) == TRUE) && (Npc_RefuseTalk(self) == FALSE)) { return TRUE; }; return FALSE; }; func void DIA_Addon_Ramon_FirstWarn_Info() { if(Npc_IsDead(Franco)) { AI_Output(self,other,"DIA_Addon_Ramon_FirstWarn_07_00"); //Hej, co se tam stalo? AI_Output(other,self,"DIA_Addon_Ramon_FirstWarn_15_01"); //Zabil jsem Franca. AI_Output(self,other,"DIA_Addon_Ramon_FirstWarn_07_02"); //A? Teď je to TVOJE práce ujistit se, že ti líní psi budou dělat svou práci. AI_Output(other,self,"DIA_Addon_Ramon_FirstWarn_15_03"); //Hej, nejsem tady od toho zaneprázdňovat se s lovci. Chci jít do tábora. AI_Output(self,other,"DIA_Addon_Ramon_FirstWarn_07_04"); //Na to zapomeň. Zabil jsi Franca - teď jsi velitel. Tak dělej svou práci. AI_Output(other,self,"DIA_Addon_Ramon_FirstWarn_15_05"); //Pokud jsem velitel, tak rozhodnu, kdo je další na řadě. AI_Output(other,self,"DIA_Addon_Ramon_FirstWarn_15_06"); //A rozhodl jsem, že JÁ jsem další. AI_Output(self,other,"DIA_Addon_Ramon_FirstWarn_07_07"); //(směšně) Není to tak jednoduché. NIKOHO jsem se neptal, takže NIKDO nevstoupí. AI_Output(other,self,"DIA_Addon_Ramon_FirstWarn_15_08"); //Thorus může poslat nového vůdce lovcům, potom pro mě bude volno uvnitř. AI_Output(self,other,"DIA_Addon_Ramon_FirstWarn_07_09"); //(směšně) Ty se nevzdáš, co? Ok, tak pohni zadkem a pojď dovnitř. AI_Output(self,other,"DIA_Addon_Ramon_FirstWarn_07_10"); //Thorus zajistí, aby lovci nebyli bez vůdce. AI_Output(self,other,"DIA_Addon_Ramon_FirstWarn_07_11"); //Na co čekáš? A nezapomeň na krumpáč. self.aivar[AIV_PASSGATE] = TRUE; Player_HasTalkedToBanditCamp = TRUE; B_GivePlayerXP(XP_Addon_Hinein); AI_StopProcessInfos(self); AI_Teleport(Carlos,"BL_WAIT_FINN"); B_StartOtherRoutine(Carlos,"START"); B_StartOtherRoutine(Finn,"START"); } else if(Ramon_News == FALSE) { AI_Output(self,other,"DIA_Addon_Ramon_FirstWarn_07_12"); //Hej! Co chceš? Nezdá se mi, že máš povolení pro vstup do tábora. if(Npc_KnowsInfo(other,DIA_Addon_Franco_HI)) { AI_Output(other,self,"DIA_Addon_Ramon_FirstWarn_15_13"); //Franco mě poslal. Chce vědět, jestli je někdo potřeba do tábora. }; AI_Output(self,other,"DIA_Addon_Ramon_FirstWarn_07_14"); //Ano, někoho potřebujem. Včera chcípl další chlap. AI_Output(self,other,"DIA_Addon_Ramon_FirstWarn_07_15"); //Ten idiot se zapletl s Estebanem. AI_Output(other,self,"DIA_Addon_Ramon_FirstWarn_15_16"); //Kdo je Esteban? AI_Output(self,other,"DIA_Addon_Ramon_FirstWarn_07_17"); //Velitel dolní části tábora. Rozhoduje, kdo se dostane do dolu. AI_Output(self,other,"DIA_Addon_Ramon_FirstWarn_07_18"); //Tak řekni Francovi, že Thorus chce nového muže. Chápeš? Log_CreateTopic(Topic_Addon_Franco,LOG_MISSION); Log_SetTopicStatus(Topic_Addon_Franco,LOG_Running); B_LogEntry(Topic_Addon_Franco,"Thorus žádá nového člověka do tábora. To bude Franca zajímat."); Info_ClearChoices(DIA_Addon_Ramon_FirstWarn); Info_AddChoice(DIA_Addon_Ramon_FirstWarn,"Thorus? TEN Thorus?",DIA_Addon_Ramon_FirstWarn_YES); Info_AddChoice(DIA_Addon_Ramon_FirstWarn,"Thorus? Nikdy jsem o něm neslyšel...",DIA_Addon_Ramon_FirstWarn_NO); Ramon_News = TRUE; } else { AI_Output(self,other,"DIA_Addon_Ramon_FirstWarn_07_19"); //Hej, zpomal! Sem se nedostaneš - tak vypadni! AI_StopProcessInfos(self); }; other.aivar[AIV_LastDistToWP] = Npc_GetDistToWP(other,BDT_1071_Checkpoint); self.aivar[AIV_Guardpassage_Status] = GP_FirstWarnGiven; }; func void DIA_Addon_Ramon_FirstWarn_YES() { B_GivePlayerXP(100); AI_Output(other,self,"DIA_Addon_Ramon_FirstWarn_YES_15_00"); //Thorus? TEN Thorus? AI_Output(self,other,"DIA_Addon_Ramon_FirstWarn_YES_07_01"); //Ano. TEN Thorus. TEN, který shání nové lidi. AI_Output(self,other,"DIA_Addon_Ramon_FirstWarn_YES_07_02"); //Muž, který rozhoduje jestli může nový chlap jít z bažin do tábora. AI_Output(self,other,"DIA_Addon_Ramon_FirstWarn_YES_07_03"); //Nesnažíš se mi říct, že ho znáš z dřívějška? AI_Output(other,self,"DIA_Addon_Ramon_FirstWarn_YES_15_04"); //No... ano... AI_Output(self,other,"DIA_Addon_Ramon_FirstWarn_YES_07_05"); //Poslouchej - KAŽDÝ zná Thoruse. AI_Output(self,other,"DIA_Addon_Ramon_FirstWarn_YES_07_06"); //Nicméně, to ti nepomůže ke vstupu. A já tu nejsem na předávání jakýchkoliv zpráv! Info_ClearChoices(DIA_Addon_Ramon_FirstWarn); }; func void DIA_Addon_Ramon_FirstWarn_NO() { AI_Output(other,self,"DIA_Addon_Ramon_FirstWarn_NO_15_00"); //Thorus? Nikdy jsem o něm neslyšel... AI_Output(self,other,"DIA_Addon_Ramon_FirstWarn_NO_07_01"); //Chlape ty ho neznáš? Byl velitelem stráží ve Starém táboře. AI_Output(self,other,"DIA_Addon_Ramon_FirstWarn_NO_07_02"); //Je to muž, kterému každý věří. AI_Output(self,other,"DIA_Addon_Ramon_FirstWarn_NO_07_03"); //Posílá pro nové lidi a rozhoduje, kdo může jít do tábora. AI_Output(self,other,"DIA_Addon_Ramon_FirstWarn_NO_07_04"); //Pokud přežiješ dost dlouho, tak ho poznáš. Info_ClearChoices(DIA_Addon_Ramon_FirstWarn); }; instance DIA_Addon_Ramon_SecondWarn(C_Info) { npc = BDT_1071_Addon_Ramon; nr = 2; condition = DIA_Addon_Ramon_SecondWarn_Condition; information = DIA_Addon_Ramon_SecondWarn_Info; permanent = TRUE; important = TRUE; }; func int DIA_Addon_Ramon_SecondWarn_Condition() { if((self.aivar[AIV_Guardpassage_Status] == GP_FirstWarnGiven) && (self.aivar[AIV_PASSGATE] == FALSE) && (Hlp_StrCmp(Npc_GetNearestWP(self),self.wp) == TRUE) && (Npc_GetDistToWP(other,BDT_1071_Checkpoint) < (other.aivar[AIV_LastDistToWP] - 50))) { return TRUE; }; return FALSE; }; func void DIA_Addon_Ramon_SecondWarn_Info() { AI_Output(self,other,"DIA_Addon_Ramon_SecondWarn_07_00"); //Ještě jeden krok a bude to tvůj poslední! other.aivar[AIV_LastDistToWP] = Npc_GetDistToWP(other,BDT_1071_Checkpoint); self.aivar[AIV_Guardpassage_Status] = GP_SecondWarnGiven; AI_StopProcessInfos(self); }; instance DIA_Addon_Ramon_Attack(C_Info) { npc = BDT_1071_Addon_Ramon; nr = 3; condition = DIA_Addon_Ramon_Attack_Condition; information = DIA_Addon_Ramon_Attack_Info; permanent = TRUE; important = TRUE; }; func int DIA_Addon_Ramon_Attack_Condition() { if((self.aivar[AIV_Guardpassage_Status] == GP_SecondWarnGiven) && (self.aivar[AIV_PASSGATE] == FALSE) && (Hlp_StrCmp(Npc_GetNearestWP(self),self.wp) == TRUE) && (Npc_GetDistToWP(other,BDT_1071_Checkpoint) < (other.aivar[AIV_LastDistToWP] - 50))) { return TRUE; }; return FALSE; }; func void DIA_Addon_Ramon_Attack_Info() { other.aivar[AIV_LastDistToWP] = 0; self.aivar[AIV_Guardpassage_Status] = GP_NONE; AI_Output(self,other,"DIA_Addon_Ramon_Attack_07_00"); //Někteří lidé se nikdy nepoučí... AI_StopProcessInfos(self); B_Attack(self,other,AR_GuardStopsIntruder,0); }; instance DIA_Addon_Ramon_News(C_Info) { npc = BDT_1071_Addon_Ramon; nr = 10; condition = DIA_Addon_Ramon_News_Condition; information = DIA_Addon_Ramon_News_Info; permanent = FALSE; description = "Jsem tady nový."; }; func int DIA_Addon_Ramon_News_Condition() { if(!Npc_IsDead(Franco)) { return TRUE; }; return FALSE; }; func void DIA_Addon_Ramon_News_Info() { AI_Output(other,self,"DIA_Addon_Ramon_News_15_00"); //Jsem tady nový. AI_Output(self,other,"DIA_Addon_Ramon_News_07_01"); //Hej, nedělej ze mě blázna. Franco je ten, kdo rozhoduje, kdo z vás se dostane do tábora. }; instance DIA_Addon_Ramon_Lie(C_Info) { npc = BDT_1071_Addon_Ramon; nr = 10; condition = DIA_Addon_Ramon_Lie_Condition; information = DIA_Addon_Ramon_Lie_Info; permanent = FALSE; description = "Franco mě poslal..."; }; func int DIA_Addon_Ramon_Lie_Condition() { if(Npc_KnowsInfo(other,DIA_Addon_Ramon_News) && !Npc_IsDead(Franco)) { return TRUE; }; return FALSE; }; func void DIA_Addon_Ramon_Lie_Info() { AI_Output(other,self,"DIA_Addon_Ramon_Lie_15_00"); //Franco mě poslal... AI_Output(self,other,"DIA_Addon_Ramon_Lie_07_01"); //Neposlal. Tak vypadni nebo ti zlámu kosti... AI_StopProcessInfos(self); }; instance DIA_Addon_Ramon_Perm(C_Info) { npc = BDT_1071_Addon_Ramon; nr = 99; condition = DIA_Addon_Ramon_Perm_Condition; information = DIA_Addon_Ramon_Perm_Info; permanent = TRUE; description = "Všechno v pořádku?"; }; func int DIA_Addon_Ramon_Perm_Condition() { if(Npc_KnowsInfo(other,DIA_Addon_Ramon_News) && !Npc_IsDead(Franco)) { return TRUE; }; return FALSE; }; func void DIA_Addon_Ramon_Perm_Info() { AI_Output(other,self,"DIA_Addon_Ramon_Perm_15_00"); //Všechno v pořádku? AI_Output(self,other,"DIA_Addon_Ramon_Perm_07_01"); //Ano všechno, pokud se nebude snažit dostat dovnitř ten, kdo NEMÁ. AI_StopProcessInfos(self); };
D
/Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/TemplateKit.build/Tag/Raw.swift.o : /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/template-kit/Sources/TemplateKit/Data/TemplateData.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/template-kit/Sources/TemplateKit/AST/TemplateEmbed.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/template-kit/Sources/TemplateKit/Deprecated.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/template-kit/Sources/TemplateKit/AST/TemplateSource.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/template-kit/Sources/TemplateKit/Data/TemplateDataStorage.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/template-kit/Sources/TemplateKit/Pipeline/ASTCache.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/template-kit/Sources/TemplateKit/Data/TemplateDataRepresentable.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/template-kit/Sources/TemplateKit/Utilities/HTMLEscape.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/template-kit/Sources/TemplateKit/AST/TemplateSyntaxType.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/template-kit/Sources/TemplateKit/Tag/Uppercase.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/template-kit/Sources/TemplateKit/Tag/Lowercase.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/template-kit/Sources/TemplateKit/Tag/Capitalize.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/template-kit/Sources/TemplateKit/AST/TemplateTag.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/template-kit/Sources/TemplateKit/AST/TemplateConditional.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/template-kit/Sources/TemplateKit/AST/TemplateCustom.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/template-kit/Sources/TemplateKit/AST/TemplateExpression.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/template-kit/Sources/TemplateKit/Tag/Var.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/template-kit/Sources/TemplateKit/Data/TemplateDataEncoder.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/template-kit/Sources/TemplateKit/AST/TemplateIdentifier.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/template-kit/Sources/TemplateKit/Pipeline/TemplateByteScanner.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/template-kit/Sources/TemplateKit/Pipeline/TemplateRenderer.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/template-kit/Sources/TemplateKit/Tag/TagRenderer.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/template-kit/Sources/TemplateKit/Pipeline/PlaintextRenderer.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/template-kit/Sources/TemplateKit/ViewRenderer.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/template-kit/Sources/TemplateKit/Pipeline/TemplateParser.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/template-kit/Sources/TemplateKit/Pipeline/TemplateSerializer.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/template-kit/Sources/TemplateKit/Utilities/TemplateError.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/template-kit/Sources/TemplateKit/AST/TemplateIterator.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/template-kit/Sources/TemplateKit/Tag/Contains.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/template-kit/Sources/TemplateKit/Utilities/Exports.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/template-kit/Sources/TemplateKit/Tag/DateFormat.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/template-kit/Sources/TemplateKit/AST/TemplateConstant.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/template-kit/Sources/TemplateKit/Tag/Comment.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/template-kit/Sources/TemplateKit/Tag/Print.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/template-kit/Sources/TemplateKit/Tag/Count.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/template-kit/Sources/TemplateKit/AST/TemplateDataContext.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/template-kit/Sources/TemplateKit/Tag/TagContext.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/template-kit/Sources/TemplateKit/Tag/Raw.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/template-kit/Sources/TemplateKit/AST/TemplateRaw.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/template-kit/Sources/TemplateKit/View.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/template-kit/Sources/TemplateKit/AST/TemplateSyntax.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/NIO.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/Async.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/Service.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/Core.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/Debugging.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/COperatingSystem.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/XPC.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/ObjectiveC.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/Combine.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/Dispatch.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/Darwin.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/Foundation.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/CoreFoundation.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/CoreGraphics.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/Swift.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/IOKit.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/SwiftOnoneSupport.swiftmodule/x86_64-apple-macos.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/NIOConcurrencyHelpers.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/Bits.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/NIOFoundationCompat.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/swift-nio/Sources/CNIOAtomics/include/cpp_magic.h /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/swift-nio/Sources/CNIOLinux/include/ifaddrs-android.h /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/swift-nio/Sources/CNIODarwin/include/CNIODarwin.h /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/swift-nio/Sources/CNIOAtomics/include/CNIOAtomics.h /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/swift-nio/Sources/CNIOLinux/include/CNIOLinux.h /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/CNIOSHA1.build/module.modulemap /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/CNIOOpenSSL.build/module.modulemap /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/CCryptoOpenSSL.build/module.modulemap /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/CNIOZlib.build/module.modulemap /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/CNIODarwin.build/module.modulemap /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/CNIOHTTPParser.build/module.modulemap /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/CNIOAtomics.build/module.modulemap /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/CNIOLinux.build/module.modulemap /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/swift-nio-zlib-support/module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/xpc/XPC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/apinotes/Dispatch.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/ApplicationServices.framework/Headers/ApplicationServices.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/Security.framework/Headers/Security.apinotes /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/TemplateKit.build/Tag/Raw~partial.swiftmodule : /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/template-kit/Sources/TemplateKit/Data/TemplateData.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/template-kit/Sources/TemplateKit/AST/TemplateEmbed.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/template-kit/Sources/TemplateKit/Deprecated.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/template-kit/Sources/TemplateKit/AST/TemplateSource.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/template-kit/Sources/TemplateKit/Data/TemplateDataStorage.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/template-kit/Sources/TemplateKit/Pipeline/ASTCache.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/template-kit/Sources/TemplateKit/Data/TemplateDataRepresentable.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/template-kit/Sources/TemplateKit/Utilities/HTMLEscape.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/template-kit/Sources/TemplateKit/AST/TemplateSyntaxType.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/template-kit/Sources/TemplateKit/Tag/Uppercase.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/template-kit/Sources/TemplateKit/Tag/Lowercase.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/template-kit/Sources/TemplateKit/Tag/Capitalize.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/template-kit/Sources/TemplateKit/AST/TemplateTag.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/template-kit/Sources/TemplateKit/AST/TemplateConditional.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/template-kit/Sources/TemplateKit/AST/TemplateCustom.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/template-kit/Sources/TemplateKit/AST/TemplateExpression.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/template-kit/Sources/TemplateKit/Tag/Var.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/template-kit/Sources/TemplateKit/Data/TemplateDataEncoder.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/template-kit/Sources/TemplateKit/AST/TemplateIdentifier.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/template-kit/Sources/TemplateKit/Pipeline/TemplateByteScanner.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/template-kit/Sources/TemplateKit/Pipeline/TemplateRenderer.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/template-kit/Sources/TemplateKit/Tag/TagRenderer.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/template-kit/Sources/TemplateKit/Pipeline/PlaintextRenderer.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/template-kit/Sources/TemplateKit/ViewRenderer.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/template-kit/Sources/TemplateKit/Pipeline/TemplateParser.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/template-kit/Sources/TemplateKit/Pipeline/TemplateSerializer.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/template-kit/Sources/TemplateKit/Utilities/TemplateError.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/template-kit/Sources/TemplateKit/AST/TemplateIterator.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/template-kit/Sources/TemplateKit/Tag/Contains.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/template-kit/Sources/TemplateKit/Utilities/Exports.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/template-kit/Sources/TemplateKit/Tag/DateFormat.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/template-kit/Sources/TemplateKit/AST/TemplateConstant.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/template-kit/Sources/TemplateKit/Tag/Comment.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/template-kit/Sources/TemplateKit/Tag/Print.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/template-kit/Sources/TemplateKit/Tag/Count.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/template-kit/Sources/TemplateKit/AST/TemplateDataContext.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/template-kit/Sources/TemplateKit/Tag/TagContext.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/template-kit/Sources/TemplateKit/Tag/Raw.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/template-kit/Sources/TemplateKit/AST/TemplateRaw.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/template-kit/Sources/TemplateKit/View.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/template-kit/Sources/TemplateKit/AST/TemplateSyntax.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/NIO.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/Async.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/Service.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/Core.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/Debugging.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/COperatingSystem.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/XPC.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/ObjectiveC.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/Combine.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/Dispatch.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/Darwin.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/Foundation.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/CoreFoundation.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/CoreGraphics.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/Swift.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/IOKit.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/SwiftOnoneSupport.swiftmodule/x86_64-apple-macos.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/NIOConcurrencyHelpers.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/Bits.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/NIOFoundationCompat.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/swift-nio/Sources/CNIOAtomics/include/cpp_magic.h /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/swift-nio/Sources/CNIOLinux/include/ifaddrs-android.h /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/swift-nio/Sources/CNIODarwin/include/CNIODarwin.h /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/swift-nio/Sources/CNIOAtomics/include/CNIOAtomics.h /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/swift-nio/Sources/CNIOLinux/include/CNIOLinux.h /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/CNIOSHA1.build/module.modulemap /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/CNIOOpenSSL.build/module.modulemap /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/CCryptoOpenSSL.build/module.modulemap /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/CNIOZlib.build/module.modulemap /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/CNIODarwin.build/module.modulemap /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/CNIOHTTPParser.build/module.modulemap /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/CNIOAtomics.build/module.modulemap /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/CNIOLinux.build/module.modulemap /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/swift-nio-zlib-support/module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/xpc/XPC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/apinotes/Dispatch.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/ApplicationServices.framework/Headers/ApplicationServices.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/Security.framework/Headers/Security.apinotes /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/TemplateKit.build/Tag/Raw~partial.swiftdoc : /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/template-kit/Sources/TemplateKit/Data/TemplateData.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/template-kit/Sources/TemplateKit/AST/TemplateEmbed.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/template-kit/Sources/TemplateKit/Deprecated.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/template-kit/Sources/TemplateKit/AST/TemplateSource.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/template-kit/Sources/TemplateKit/Data/TemplateDataStorage.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/template-kit/Sources/TemplateKit/Pipeline/ASTCache.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/template-kit/Sources/TemplateKit/Data/TemplateDataRepresentable.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/template-kit/Sources/TemplateKit/Utilities/HTMLEscape.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/template-kit/Sources/TemplateKit/AST/TemplateSyntaxType.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/template-kit/Sources/TemplateKit/Tag/Uppercase.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/template-kit/Sources/TemplateKit/Tag/Lowercase.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/template-kit/Sources/TemplateKit/Tag/Capitalize.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/template-kit/Sources/TemplateKit/AST/TemplateTag.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/template-kit/Sources/TemplateKit/AST/TemplateConditional.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/template-kit/Sources/TemplateKit/AST/TemplateCustom.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/template-kit/Sources/TemplateKit/AST/TemplateExpression.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/template-kit/Sources/TemplateKit/Tag/Var.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/template-kit/Sources/TemplateKit/Data/TemplateDataEncoder.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/template-kit/Sources/TemplateKit/AST/TemplateIdentifier.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/template-kit/Sources/TemplateKit/Pipeline/TemplateByteScanner.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/template-kit/Sources/TemplateKit/Pipeline/TemplateRenderer.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/template-kit/Sources/TemplateKit/Tag/TagRenderer.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/template-kit/Sources/TemplateKit/Pipeline/PlaintextRenderer.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/template-kit/Sources/TemplateKit/ViewRenderer.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/template-kit/Sources/TemplateKit/Pipeline/TemplateParser.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/template-kit/Sources/TemplateKit/Pipeline/TemplateSerializer.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/template-kit/Sources/TemplateKit/Utilities/TemplateError.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/template-kit/Sources/TemplateKit/AST/TemplateIterator.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/template-kit/Sources/TemplateKit/Tag/Contains.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/template-kit/Sources/TemplateKit/Utilities/Exports.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/template-kit/Sources/TemplateKit/Tag/DateFormat.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/template-kit/Sources/TemplateKit/AST/TemplateConstant.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/template-kit/Sources/TemplateKit/Tag/Comment.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/template-kit/Sources/TemplateKit/Tag/Print.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/template-kit/Sources/TemplateKit/Tag/Count.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/template-kit/Sources/TemplateKit/AST/TemplateDataContext.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/template-kit/Sources/TemplateKit/Tag/TagContext.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/template-kit/Sources/TemplateKit/Tag/Raw.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/template-kit/Sources/TemplateKit/AST/TemplateRaw.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/template-kit/Sources/TemplateKit/View.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/template-kit/Sources/TemplateKit/AST/TemplateSyntax.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/NIO.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/Async.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/Service.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/Core.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/Debugging.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/COperatingSystem.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/XPC.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/ObjectiveC.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/Combine.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/Dispatch.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/Darwin.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/Foundation.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/CoreFoundation.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/CoreGraphics.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/Swift.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/IOKit.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/SwiftOnoneSupport.swiftmodule/x86_64-apple-macos.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/NIOConcurrencyHelpers.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/Bits.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/NIOFoundationCompat.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/swift-nio/Sources/CNIOAtomics/include/cpp_magic.h /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/swift-nio/Sources/CNIOLinux/include/ifaddrs-android.h /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/swift-nio/Sources/CNIODarwin/include/CNIODarwin.h /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/swift-nio/Sources/CNIOAtomics/include/CNIOAtomics.h /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/swift-nio/Sources/CNIOLinux/include/CNIOLinux.h /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/CNIOSHA1.build/module.modulemap /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/CNIOOpenSSL.build/module.modulemap /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/CCryptoOpenSSL.build/module.modulemap /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/CNIOZlib.build/module.modulemap /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/CNIODarwin.build/module.modulemap /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/CNIOHTTPParser.build/module.modulemap /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/CNIOAtomics.build/module.modulemap /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/CNIOLinux.build/module.modulemap /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/swift-nio-zlib-support/module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/xpc/XPC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/apinotes/Dispatch.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/ApplicationServices.framework/Headers/ApplicationServices.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/Security.framework/Headers/Security.apinotes
D
/* * Copyright (c) 2004-2008 Derelict Developers * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * * 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. * * * Neither the names 'Derelict', 'DerelictGL', nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * 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 OWNER 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. */ module derelict.opengl.extension.ext.rescale_normal; private { import derelict.opengl.gltypes; import derelict.opengl.gl; import derelict.util.wrapper; } private bool enabled = false; struct EXTRescaleNormal { static bool load(char[] extString) { if(extString.findStr("GL_EXT_rescale_normal") == -1) return false; enabled = true; return true; } static bool isEnabled() { return enabled; } } version(DerelictGL_NoExtensionLoaders) { } else { static this() { DerelictGL.registerExtensionLoader(&EXTRescaleNormal.load); } } enum : GLenum { GL_RESCALE_NORMAL_EXT = 0x803A }
D
#!/usr/bin/rdmd import std.stdio; import std.string; import std.datetime; import pack.second; int incTwice(int a) { int inc(int b) { return ++b; } return inc(inc(a)); } T[] mapInc(T)(T[] arr) { auto res = new T[arr.length]; foreach(i, item; arr) res[i] = item+1; return res; } class A { this(string s) { this.s = s; } abstract void print(); string s; } class B : A { this(string s) { super(s); } void print() { writeln(s); } } void main() { auto start_time = Clock.currTime(); int n = 0; foreach(int i; 0..10) n = i; string[] strings = ["first", "lala", "zz"]; uint[string] dict; uint id = 0; foreach(word; strings) dict[word] = id++; writeln(dict, strings[0..2]); writeln(incTwice(3)); auto dec = (int a){ return ++a; }; writeln(dec(555)); auto b = new B("hey, im a"); b.print(); writeln(mapInc([5,4,3,2,1])); f2(5); writeln("prog duration: ", Clock.currTime() - start_time); }
D
module fallentos; import std.stdio; import std.regexp; import std.file; import std.string:atoi; import std.string:join; import alogprocessor; class FallenTos : public ALogProcessor { protected: RegExp refallen; int[char[]] FallenTos; public: this() { refallen = RegExp("^" ~ reTimestamp ~ "Du bist durch ein(en?)? (.+) gefallen.$"); } void ProcessLine(char[] line) { foreach (m; refallen.search(line)) { if (!(m.match(4) in FallenTos)) { FallenTos[m.match(4)] = 0; } FallenTos[m.match(4)]++; } } char[] GetName() { return "fallen"; } void PrintFallenTos() { writefln("\nFallen To\n---------"); foreach (Monster, Number; FallenTos) { writefln("%s: %d", Monster, Number); } } }
D
the common people generally the property of a body that causes it to have weight in a gravitational field (often followed by `of') a large number or amount or extent an ill-structured collection of similar things (objects or people) (Roman Catholic Church and Protestant Churches) the celebration of the Eucharist a body of matter without definite shape the common people generally the property of something that is great in magnitude a musical setting for a Mass a sequence of prayers constituting the Christian Eucharistic rite a shot in billiards made by hitting the cue ball with the cue held nearly vertically join together into a mass or collect or form a mass
D
/** Import all indicators. */ module crypto.exchanges.indicators; public import crypto.exchanges.indicators.rsi; public import crypto.exchanges.indicators.sma; public import crypto.exchanges.indicators.smma;
D
const int SPL_COST_Deathball = 35; const int SPL_DAMAGE_Deathball = 165; instance Spell_Deathball(C_Spell_Proto) { time_per_mana = 0; damage_per_level = SPL_DAMAGE_Deathball; // изменить тип если нужно damagetype = DAM_MAGIC; // damagetype = DAM_FIRE; }; func int Spell_Logic_Deathball(var int manaInvested) { if(Npc_GetActiveSpellIsScroll(self) && (self.attribute[ATR_MANA] >= SPL_Cost_Scroll)) { return SPL_SENDCAST; } else if(self.attribute[ATR_MANA] >= SPL_COST_Deathball) { return SPL_SENDCAST; } else { return SPL_SENDSTOP; }; }; func void Spell_Cast_Deathball() { if(Npc_GetActiveSpellIsScroll(self)) { self.attribute[ATR_MANA] -= SPL_Cost_Scroll; } else { self.attribute[ATR_MANA] -= SPL_COST_Deathball; }; self.aivar[AIV_SelectSpell] += 1; };
D
/* This file is part of BioD. Copyright (C) 2013 Artem Tarasov <lomereiter@gmail.com> Copyright (C) 2018 Pjotr Prins <pjotr.prins@thebird.nl> 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.maf.reader; import bio.maf.block; import bio.maf.parser; import std.array; import std.string; import std.stdio; import std.algorithm; import std.range.interfaces; import std.string; /// struct MafBlockRange { private { File _f; bool _empty; MafBlock _front; void skipHeader() { auto _lines = _f.byLine(); if (!_lines.empty) if (_lines.front.startsWith("##maf")) _lines.popFront(); } } this(string fn) { _f = File(fn); // _lines = _f.byLine(KeepTerminator.yes); skipHeader(); popFront(); } /// bool empty() @property const { return _empty; } /// MafBlock front() @property { return _front; } /// void popFront() { auto block_data = Appender!(char[])(); auto _lines = _f.byLine(); while (!_lines.empty && !_lines.front.chomp().empty) { block_data.put(_lines.front.dup); _lines.popFront(); } if (block_data.data.empty) { _empty = true; } else { _front = parseMafBlock(cast(string)(block_data.data)); if (!_lines.empty) _lines.popFront(); } } } /// class MafReader { private string _fn; /// this(string filename) { _fn = filename; } /// string filename() @property const { return _fn; } /// MafBlockRange blocks() @property { return MafBlockRange(_fn); } }
D
# FIXED grlib/msp-exp432p401r_grlib_example/fonts/fontcmss36.obj: ../grlib/msp-exp432p401r_grlib_example/fonts/fontcmss36.c ../grlib/msp-exp432p401r_grlib_example/fonts/fontcmss36.c:
D
/* This file is part of Sambamba. Copyright (C) 2017 Pjotr Prins <pjotr.prins@thebird.nl> Sambamba is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Sambamba is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ module bio2.pileup; import std.conv; import std.exception; import std.stdio; import std.traits; import std.typecons; import std.experimental.logger; import bio2.constants; import bio.core.utils.exception; immutable ulong DEFAULT_BUFFER_SIZE = 1_000_000; /** Cyclic buffer or ringbuffer based on Artem's original. Uses copy semantics to copy a read in a pre-allocated buffer. New items get added to the tail, and used items get popped from the head (FIFO). Basically it is empty when pointers align and full when head - tail equals length. Not that the pointers are of size_t which puts a theoretical limit on the number of items that can be pushed. */ import core.stdc.string : memcpy; // alias ulong RingBufferIndex; struct RingBufferIndex { alias Representation = ulong; private ulong value = 0; this(ulong v) { value = v; } // @disable this(this); // disable copy semantics; auto get() inout { return value; } auto max() @property { return value.max; } void opAssign(U)(U rhs) if (is(typeof(Checked!(T, Hook)(rhs)))) { value = rhs; } bool opEquals(U, this _)(U rhs) { return value == rhs; } auto opCmp(U, this _)(const U rhs) { return value < rhs ? -1 : value > rhs; } ulong opUnary(string s)() if (s == "++") { return ++value; } } struct RingBuffer(T) { T[] _items; RingBufferIndex _head; RingBufferIndex _tail; size_t max_size = 0; /** initializes round buffer of size $(D n) */ this(size_t n) { _items = new T[n]; // _items.reserve(n); } @disable this(this); // disable copy semantics; /* Does not work because data is no longer available! ~this() { // assert(is_empty); // make sure all items have been popped } */ bool empty() @property @nogc nothrow const { return _tail == _head; } alias empty is_empty; auto ref front() @property { enforce(!is_empty, "ringbuffer is empty"); return _items[_head.get() % $]; } alias back last; auto ref back() @property { enforce(!is_empty, "ringbuffer is empty"); return _items[(_tail.get() - 1) % $]; } alias front first; bool is_tail(RingBufferIndex idx) { return idx == _tail.get()-1; } ref T get_at(RingBufferIndex idx) { enforce(!is_empty, "ringbuffer is empty"); enforce(idx >= _head, "ringbuffer range error (idx before front)"); enforce(idx != _tail, "ringbuffer range error (idx at end)"); enforce(idx < _tail, "ringbuffer range error (idx after end)"); return _items[idx.get() % $]; } bool is_valid(RingBufferIndex idx) { enforce(!is_empty, "ringbuffer is empty"); enforce(idx >= _head, "ringbuffer range error (idx before front)"); enforce(idx != _tail, "ringbuffer range error (idx at end)"); enforce(idx < _tail, "ringbuffer range error (idx after end)"); return true; } // This function is a hack. void update_at(RingBufferIndex idx, T item) { is_valid(idx); _items[idx.get() % $] = item; // uses copy semantics } RingBufferIndex popFront() { enforce(!is_empty, "ringbuffer is empty"); static if (__traits(compiles, _items[0].cleanupx)) { // write("x"); _items[_head.get() % $].cleanup(); } ++_head.value; return _head; } /// Puts item on the stack and returns the index RingBufferIndex put(T item) { enforce(!is_full, "ringbuffer is full - you need to expand buffer"); enforce(_tail < _tail.max, "ringbuffer overflow"); max_size = length > max_size ? length : max_size; _items[_tail.get() % $] = item; // uses copy semantics auto prev = _tail; ++_tail.value; return prev; } ulong length() @property const { // writeln(_tail.get(),":",_head.get(),"= len ",_tail.get()-_head.get()); return _tail.get() - _head.get(); } bool is_full() @property const { return _items.length == length(); } bool in_range(RingBufferIndex idx) @property const { return idx >= _head && idx < _tail; } ulong pushed() @property const { return _tail.value; } ulong popped() @property const { return _head.value; } @property void cleanup() { _head = RingBufferIndex(); _tail = RingBufferIndex(); } string toString() { string res = "ring "; for(RingBufferIndex i = _head; i<_tail; i++) res ~= to!string(get_at(i)); return res; } @property string stats() { return "Ringbuffer pushed " ~ to!string(pushed) ~ " popped " ~ to!string(popped) ~ " max-size " ~ to!string(max_size) // , "/", (pileup.ring.max_size+1)/pileup.ring.length); ; } } unittest { auto buf = RingBuffer!int(4); assert(buf.is_empty); buf.put(1); buf.put(2); assert(buf.length == 2); assert(buf.front == 1); buf.popFront(); // 1 buf.popFront(); // 2 buf.put(2); buf.put(1); buf.put(0); buf.put(3); assert(buf.is_full); assert(buf.front == 2); buf.popFront(); assert(buf.front == 1); buf.put(4); buf.popFront(); assert(buf.front == 0); buf.popFront(); assert(buf.front == 3); buf.popFront(); assert(buf.front == 4); buf.popFront(); assert(buf.is_empty); } /** Represent a pileup of reads in a buffer. */ /* Read RingBuffer with current pointer, so you have three states (first, current, last). */ class PileUp(R) { RingBuffer!R ring; Nullable!RingBufferIndex current; this(ulong bufsize=DEFAULT_BUFFER_SIZE) { ring = RingBuffer!R(bufsize); set_current_to_head; } RingBufferIndex push(R r) { return ring.put(r); } bool empty() @property const { return ring.is_empty();} bool is_full() @property const { return ring.is_full();} RingBufferIndex popFront() { return ring.popFront(); } ref R front() { return ring.front(); } alias front leftmost; ref R rightmost() { return ring.back(); } ref R read(RingBufferIndex idx) { enforce(ring.in_range(idx), "idx should be set for PileUp.read"); return ring.get_at(idx); } ref R read_current() { enforce(!current.isNull, "current should be set for PileUp.read_current"); return read(current); } bool is_at_end(RingBufferIndex idx) { return ring.is_tail(idx); } @property void current_inc() { asserte(!empty); asserte(!ring.is_tail(current)); ++current; } @property void set_current_to_head() { current = ring._head; // note pileup can be empty } void current_reset() { current = RingBufferIndex(); } @property bool current_is_tail() { return ring.is_tail(current); } void each(void delegate(R) dg) { auto idx = ring._head; while(!ring.is_tail(idx)) { auto r = read(idx); dg(r); idx++; } } void each_left_of_current(void delegate(RingBufferIndex, R) dg) { R cur = read_current; if (cur.is_unmapped) return; auto idx = ring._head; while(!ring.is_tail(idx)) { auto r = read(idx); if (r.is_mapped && r.end_pos >= cur.start_pos) return; dg(idx,r); idx++; } } void purge_while(bool delegate(R) dg) { while(!empty) { if (!dg(front)) return; // skip the rest popFront(); } } void purge(void delegate(R) dg) { while(!empty) { dg(front); popFront(); } set_current_to_head(); } @property string stats() { return ring.stats(); } override string toString() { return stats; } }
D
// URL: https://atcoder.jp/contests/abc097/tasks/abc097_a import std.algorithm, std.container, std.conv, std.math, std.range, std.typecons, std.stdio, std.string; auto rdsp(){return readln.splitter;} void pick(R,T)(ref R r,ref T t){t=r.front.to!T;r.popFront;} void pickV(R,T...)(ref R r,ref T t){foreach(ref v;t)pick(r,v);} void readV(T...)(ref T t){auto r=rdsp;foreach(ref v;t)pick(r,v);} void readA(T)(size_t n,ref T[]t){t=new T[](n);auto r=rdsp;foreach(ref v;t)pick(r,v);} void readM(T)(size_t r,size_t c,ref T[][]t){t=new T[][](r);foreach(ref v;t)readA(c,v);} void readC(T...)(size_t n,ref T t){foreach(ref v;t)v=new typeof(v)(n);foreach(i;0..n){auto r=rdsp;foreach(ref v;t)pick(r,v[i]);}} void readS(T)(size_t n,ref T t){t=new T(n);foreach(ref v;t){auto r=rdsp;foreach(ref j;v.tupleof)pick(r,j);}} void writeA(T)(size_t n,T t){foreach(i,v;t.enumerate){write(v);if(i<n-1)write(" ");}writeln;} version(unittest) {} else void main() { int a, b, c, d; readV(a, b, c, d); writeln((a-c).abs <= d || (a-b).abs <= d && (b-c).abs <= d ? "Yes" : "No"); }
D
/** * Compiler implementation of the * $(LINK2 http://www.dlang.org, D programming language). * * Copyright: Copyright (C) 1999-2018 by The D Language Foundation, All Rights Reserved * Authors: $(LINK2 http://www.digitalmars.com, Walter Bright) * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/aliasthis.d, _aliasthis.d) */ module dmd.aliasthis; // Online documentation: https://dlang.org/phobos/dmd_aliasthis.html import core.stdc.stdio; import dmd.aggregate; import dmd.dscope; import dmd.dsymbol; import dmd.expression; import dmd.expressionsem; import dmd.globals; import dmd.identifier; import dmd.mtype; import dmd.opover; import dmd.tokens; import dmd.visitor; /*********************************************************** * alias ident this; */ extern (C++) final class AliasThis : Dsymbol { Identifier ident; extern (D) this(Loc loc, Identifier ident) { super(null); // it's anonymous (no identifier) this.loc = loc; this.ident = ident; } override Dsymbol syntaxCopy(Dsymbol s) { assert(!s); return new AliasThis(loc, ident); } override const(char)* kind() const { return "alias this"; } AliasThis isAliasThis() { return this; } override void accept(Visitor v) { v.visit(this); } } extern (C++) Expression resolveAliasThis(Scope* sc, Expression e, bool gag = false) { AggregateDeclaration ad = isAggregate(e.type); if (ad && ad.aliasthis) { uint olderrors = gag ? global.startGagging() : 0; Loc loc = e.loc; Type tthis = (e.op == TOKtype ? e.type : null); e = new DotIdExp(loc, e, ad.aliasthis.ident); e = e.expressionSemantic(sc); if (tthis && ad.aliasthis.needThis()) { if (e.op == TOKvar) { if (auto fd = (cast(VarExp)e).var.isFuncDeclaration()) { // https://issues.dlang.org/show_bug.cgi?id=13009 // Support better match for the overloaded alias this. bool hasOverloads; if (auto f = fd.overloadModMatch(loc, tthis, hasOverloads)) { if (!hasOverloads) fd = f; // use exact match e = new VarExp(loc, fd, hasOverloads); e.type = f.type; e = new CallExp(loc, e); goto L1; } } } /* non-@property function is not called inside typeof(), * so resolve it ahead. */ { int save = sc.intypeof; sc.intypeof = 1; // bypass "need this" error check e = resolveProperties(sc, e); sc.intypeof = save; } L1: e = new TypeExp(loc, new TypeTypeof(loc, e)); e = e.expressionSemantic(sc); } e = resolveProperties(sc, e); if (gag && global.endGagging(olderrors)) e = null; } return e; }
D
/** * Windows API header module * * Translated from MinGW Windows headers * * Authors: Stewart Gordon * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(DRUNTIMESRC src/core/sys/windows/_accctrl.d) */ module core.sys.windows.accctrl; version (Windows): version (ANSI) {} else version = Unicode; import core.sys.windows.basetyps, core.sys.windows.w32api, core.sys.windows.winbase, core.sys.windows.windef; // FIXME: check types and grouping of constants // FIXME: check Windows version support alias LocalFree AccFree; enum uint ACTRL_RESERVED = 0x00000000, ACTRL_ACCESS_PROTECTED = 0x00000001, ACTRL_ACCESS_ALLOWED = 0x00000001, ACTRL_ACCESS_DENIED = 0x00000002, ACTRL_AUDIT_SUCCESS = 0x00000004, ACTRL_AUDIT_FAILURE = 0x00000008, ACTRL_SYSTEM_ACCESS = 0x04000000, ACTRL_DELETE = 0x08000000, ACTRL_READ_CONTROL = 0x10000000, ACTRL_CHANGE_ACCESS = 0x20000000, ACTRL_CHANGE_OWNER = 0x40000000, ACTRL_SYNCHRONIZE = 0x80000000, ACTRL_STD_RIGHTS_ALL = 0xf8000000; enum uint ACTRL_FILE_READ = 0x00000001, ACTRL_FILE_WRITE = 0x00000002, ACTRL_FILE_APPEND = 0x00000004, ACTRL_FILE_READ_PROP = 0x00000008, ACTRL_FILE_WRITE_PROP = 0x00000010, ACTRL_FILE_EXECUTE = 0x00000020, ACTRL_FILE_READ_ATTRIB = 0x00000080, ACTRL_FILE_WRITE_ATTRIB = 0x00000100, ACTRL_FILE_CREATE_PIPE = 0x00000200; enum uint ACTRL_DIR_LIST = 0x00000001, ACTRL_DIR_CREATE_OBJECT = 0x00000002, ACTRL_DIR_CREATE_CHILD = 0x00000004, ACTRL_DIR_DELETE_CHILD = 0x00000040, ACTRL_DIR_TRAVERSE = 0x00000020; enum uint ACTRL_KERNEL_TERMINATE = 0x00000001, ACTRL_KERNEL_THREAD = 0x00000002, ACTRL_KERNEL_VM = 0x00000004, ACTRL_KERNEL_VM_READ = 0x00000008, ACTRL_KERNEL_VM_WRITE = 0x00000010, ACTRL_KERNEL_DUP_HANDLE = 0x00000020, ACTRL_KERNEL_PROCESS = 0x00000040, ACTRL_KERNEL_SET_INFO = 0x00000080, ACTRL_KERNEL_GET_INFO = 0x00000100, ACTRL_KERNEL_CONTROL = 0x00000200, ACTRL_KERNEL_ALERT = 0x00000400, ACTRL_KERNEL_GET_CONTEXT = 0x00000800, ACTRL_KERNEL_SET_CONTEXT = 0x00001000, ACTRL_KERNEL_TOKEN = 0x00002000, ACTRL_KERNEL_IMPERSONATE = 0x00004000, ACTRL_KERNEL_DIMPERSONATE = 0x00008000; enum uint ACTRL_PRINT_SADMIN = 0x00000001, ACTRL_PRINT_SLIST = 0x00000002, ACTRL_PRINT_PADMIN = 0x00000004, ACTRL_PRINT_PUSE = 0x00000008, ACTRL_PRINT_JADMIN = 0x00000010; enum uint ACTRL_SVC_GET_INFO = 0x00000001, ACTRL_SVC_SET_INFO = 0x00000002, ACTRL_SVC_STATUS = 0x00000004, ACTRL_SVC_LIST = 0x00000008, ACTRL_SVC_START = 0x00000010, ACTRL_SVC_STOP = 0x00000020, ACTRL_SVC_PAUSE = 0x00000040, ACTRL_SVC_INTERROGATE = 0x00000080, ACTRL_SVC_UCONTROL = 0x00000100; enum uint ACTRL_REG_QUERY = 0x00000001, ACTRL_REG_SET = 0x00000002, ACTRL_REG_CREATE_CHILD = 0x00000004, ACTRL_REG_LIST = 0x00000008, ACTRL_REG_NOTIFY = 0x00000010, ACTRL_REG_LINK = 0x00000020; enum uint ACTRL_WIN_CLIPBRD = 0x00000001, ACTRL_WIN_GLOBAL_ATOMS = 0x00000002, ACTRL_WIN_CREATE = 0x00000004, ACTRL_WIN_LIST_DESK = 0x00000008, ACTRL_WIN_LIST = 0x00000010, ACTRL_WIN_READ_ATTRIBS = 0x00000020, ACTRL_WIN_WRITE_ATTRIBS = 0x00000040, ACTRL_WIN_SCREEN = 0x00000080, ACTRL_WIN_EXIT = 0x00000100; enum : uint { ACTRL_ACCESS_NO_OPTIONS = 0x00000000, ACTRL_ACCESS_SUPPORTS_OBJECT_ENTRIES = 0x00000001 } const TCHAR[] ACCCTRL_DEFAULT_PROVIDER = "Windows NT Access Provider"; enum uint TRUSTEE_ACCESS_ALLOWED = 0x00000001, TRUSTEE_ACCESS_READ = 0x00000002, TRUSTEE_ACCESS_WRITE = 0x00000004, TRUSTEE_ACCESS_EXPLICIT = 0x00000001, TRUSTEE_ACCESS_READ_WRITE = 0x00000006, TRUSTEE_ACCESS_ALL = 0xFFFFFFFF; enum uint NO_INHERITANCE = 0x0, SUB_OBJECTS_ONLY_INHERIT = 0x1, SUB_CONTAINERS_ONLY_INHERIT = 0x2, SUB_CONTAINERS_AND_OBJECTS_INHERIT = 0x3, INHERIT_NO_PROPAGATE = 0x4, INHERIT_ONLY = 0x8, INHERITED_ACCESS_ENTRY = 0x10, INHERITED_PARENT = 0x10000000, INHERITED_GRANDPARENT = 0x20000000; alias ULONG INHERIT_FLAGS, ACCESS_RIGHTS; alias ULONG* PINHERIT_FLAGS, PACCESS_RIGHTS; enum ACCESS_MODE { NOT_USED_ACCESS, GRANT_ACCESS, SET_ACCESS, DENY_ACCESS, REVOKE_ACCESS, SET_AUDIT_SUCCESS, SET_AUDIT_FAILURE } enum SE_OBJECT_TYPE { SE_UNKNOWN_OBJECT_TYPE, SE_FILE_OBJECT, SE_SERVICE, SE_PRINTER, SE_REGISTRY_KEY, SE_LMSHARE, SE_KERNEL_OBJECT, SE_WINDOW_OBJECT, SE_DS_OBJECT, SE_DS_OBJECT_ALL, SE_PROVIDER_DEFINED_OBJECT, SE_WMIGUID_OBJECT, SE_REGISTRY_WOW64_32KEY } enum TRUSTEE_TYPE { TRUSTEE_IS_UNKNOWN, TRUSTEE_IS_USER, TRUSTEE_IS_GROUP, TRUSTEE_IS_DOMAIN, TRUSTEE_IS_ALIAS, TRUSTEE_IS_WELL_KNOWN_GROUP, TRUSTEE_IS_DELETED, TRUSTEE_IS_INVALID, TRUSTEE_IS_COMPUTER } enum TRUSTEE_FORM { TRUSTEE_IS_SID, TRUSTEE_IS_NAME, TRUSTEE_BAD_FORM, TRUSTEE_IS_OBJECTS_AND_SID, TRUSTEE_IS_OBJECTS_AND_NAME } enum MULTIPLE_TRUSTEE_OPERATION { NO_MULTIPLE_TRUSTEE, TRUSTEE_IS_IMPERSONATE } struct TRUSTEE_A { TRUSTEE_A* pMultipleTrustee; MULTIPLE_TRUSTEE_OPERATION MultipleTrusteeOperation; TRUSTEE_FORM TrusteeForm; TRUSTEE_TYPE TrusteeType; LPSTR ptstrName; } alias TRUSTEE_A TRUSTEEA; alias TRUSTEE_A* PTRUSTEE_A, PTRUSTEEA; struct TRUSTEE_W { TRUSTEE_W* pMultipleTrustee; MULTIPLE_TRUSTEE_OPERATION MultipleTrusteeOperation; TRUSTEE_FORM TrusteeForm; TRUSTEE_TYPE TrusteeType; LPWSTR ptstrName; } alias TRUSTEE_W TRUSTEEW; alias TRUSTEEW* PTRUSTEE_W, PTRUSTEEW; struct ACTRL_ACCESS_ENTRYA { TRUSTEE_A Trustee; ULONG fAccessFlags; ACCESS_RIGHTS Access; ACCESS_RIGHTS ProvSpecificAccess; INHERIT_FLAGS Inheritance; LPCSTR lpInheritProperty; } alias ACTRL_ACCESS_ENTRYA* PACTRL_ACCESS_ENTRYA; struct ACTRL_ACCESS_ENTRYW { TRUSTEE_W Trustee; ULONG fAccessFlags; ACCESS_RIGHTS Access; ACCESS_RIGHTS ProvSpecificAccess; INHERIT_FLAGS Inheritance; LPCWSTR lpInheritProperty; } alias ACTRL_ACCESS_ENTRYW* PACTRL_ACCESS_ENTRYW; struct ACTRL_ACCESS_ENTRY_LISTA { ULONG cEntries; ACTRL_ACCESS_ENTRYA* pAccessList; } alias ACTRL_ACCESS_ENTRY_LISTA* PACTRL_ACCESS_ENTRY_LISTA; struct ACTRL_ACCESS_ENTRY_LISTW { ULONG cEntries; ACTRL_ACCESS_ENTRYW* pAccessList; } alias ACTRL_ACCESS_ENTRY_LISTW* PACTRL_ACCESS_ENTRY_LISTW; struct ACTRL_PROPERTY_ENTRYA { LPCSTR lpProperty; PACTRL_ACCESS_ENTRY_LISTA pAccessEntryList; ULONG fListFlags; } alias ACTRL_PROPERTY_ENTRYA* PACTRL_PROPERTY_ENTRYA; struct ACTRL_PROPERTY_ENTRYW { LPCWSTR lpProperty; PACTRL_ACCESS_ENTRY_LISTW pAccessEntryList; ULONG fListFlags; } alias ACTRL_PROPERTY_ENTRYW* PACTRL_PROPERTY_ENTRYW; struct ACTRL_ACCESSA { ULONG cEntries; PACTRL_PROPERTY_ENTRYA pPropertyAccessList; } alias ACTRL_ACCESSA ACTRL_AUDITA; alias ACTRL_ACCESSA* PACTRL_ACCESSA, PACTRL_AUDITA; struct ACTRL_ACCESSW { ULONG cEntries; PACTRL_PROPERTY_ENTRYW pPropertyAccessList; } alias ACTRL_ACCESSW ACTRL_AUDITW; alias ACTRL_ACCESSW* PACTRL_ACCESSW, PACTRL_AUDITW; struct TRUSTEE_ACCESSA { LPSTR lpProperty; ACCESS_RIGHTS Access; ULONG fAccessFlags; ULONG fReturnedAccess; } alias TRUSTEE_ACCESSA* PTRUSTEE_ACCESSA; struct TRUSTEE_ACCESSW { LPWSTR lpProperty; ACCESS_RIGHTS Access; ULONG fAccessFlags; ULONG fReturnedAccess; } alias TRUSTEE_ACCESSW* PTRUSTEE_ACCESSW; struct ACTRL_OVERLAPPED { union { PVOID Provider; ULONG Reserved1; } ULONG Reserved2; HANDLE hEvent; } alias ACTRL_OVERLAPPED* PACTRL_OVERLAPPED; struct ACTRL_ACCESS_INFOA { ULONG fAccessPermission; LPSTR lpAccessPermissionName; } alias ACTRL_ACCESS_INFOA* PACTRL_ACCESS_INFOA; struct ACTRL_ACCESS_INFOW { ULONG fAccessPermission; LPWSTR lpAccessPermissionName; } alias ACTRL_ACCESS_INFOW* PACTRL_ACCESS_INFOW; struct ACTRL_CONTROL_INFOA { LPSTR lpControlId; LPSTR lpControlName; } alias ACTRL_CONTROL_INFOA* PACTRL_CONTROL_INFOA; struct ACTRL_CONTROL_INFOW { LPWSTR lpControlId; LPWSTR lpControlName; } alias ACTRL_CONTROL_INFOW* PACTRL_CONTROL_INFOW; struct EXPLICIT_ACCESS_A { DWORD grfAccessPermissions; ACCESS_MODE grfAccessMode; DWORD grfInheritance; TRUSTEE_A Trustee; } alias EXPLICIT_ACCESS_A EXPLICIT_ACCESSA; alias EXPLICIT_ACCESS_A* PEXPLICIT_ACCESS_A, PEXPLICIT_ACCESSA; struct EXPLICIT_ACCESS_W { DWORD grfAccessPermissions; ACCESS_MODE grfAccessMode; DWORD grfInheritance; TRUSTEE_W Trustee; } alias EXPLICIT_ACCESS_W EXPLICIT_ACCESSW; alias EXPLICIT_ACCESS_W* PEXPLICIT_ACCESS_W, PEXPLICIT_ACCESSW; struct OBJECTS_AND_SID { DWORD ObjectsPresent; GUID ObjectTypeGuid; GUID InheritedObjectTypeGuid; SID* pSid; } alias OBJECTS_AND_SID* POBJECTS_AND_SID; struct OBJECTS_AND_NAME_A { DWORD ObjectsPresent; SE_OBJECT_TYPE ObjectType; LPSTR ObjectTypeName; LPSTR InheritedObjectTypeName; LPSTR ptstrName; } alias OBJECTS_AND_NAME_A* POBJECTS_AND_NAME_A; struct OBJECTS_AND_NAME_W { DWORD ObjectsPresent; SE_OBJECT_TYPE ObjectType; LPWSTR ObjectTypeName; LPWSTR InheritedObjectTypeName; LPWSTR ptstrName; } alias OBJECTS_AND_NAME_W* POBJECTS_AND_NAME_W; static if (_WIN32_WINNT >= 0x501) { struct INHERITED_FROMA { LONG GenerationGap; LPSTR AncestorName; } alias INHERITED_FROMA* PINHERITED_FROMA; struct INHERITED_FROMW { LONG GenerationGap; LPWSTR AncestorName; } alias INHERITED_FROMW* PINHERITED_FROMW; } version (Unicode) { alias TRUSTEEW TRUSTEE; alias ACTRL_ACCESSW ACTRL_ACCESS; alias ACTRL_ACCESS_ENTRY_LISTW ACTRL_ACCESS_ENTRY_LIST; alias ACTRL_ACCESS_INFOW ACTRL_ACCESS_INFO; alias ACTRL_ACCESS_ENTRYW ACTRL_ACCESS_ENTRY; alias ACTRL_AUDITW ACTRL_AUDIT; alias ACTRL_CONTROL_INFOW ACTRL_CONTROL_INFO; alias EXPLICIT_ACCESSW EXPLICIT_ACCESS; alias TRUSTEE_ACCESSW TRUSTEE_ACCESS; alias OBJECTS_AND_NAME_W OBJECTS_AND_NAME_; static if (_WIN32_WINNT >= 0x501) { alias INHERITED_FROMW INHERITED_FROM; } } else { alias TRUSTEEA TRUSTEE; alias ACTRL_ACCESSA ACTRL_ACCESS; alias ACTRL_ACCESS_ENTRY_LISTA ACTRL_ACCESS_ENTRY_LIST; alias ACTRL_ACCESS_INFOA ACTRL_ACCESS_INFO; alias ACTRL_ACCESS_ENTRYA ACTRL_ACCESS_ENTRY; alias ACTRL_AUDITA ACTRL_AUDIT; alias ACTRL_CONTROL_INFOA ACTRL_CONTROL_INFO; alias EXPLICIT_ACCESSA EXPLICIT_ACCESS; alias TRUSTEE_ACCESSA TRUSTEE_ACCESS; alias OBJECTS_AND_NAME_A OBJECTS_AND_NAME_; static if (_WIN32_WINNT >= 0x501) { alias INHERITED_FROMA INHERITED_FROM; } } alias TRUSTEE TRUSTEE_; alias TRUSTEE* PTRUSTEE, PTRUSTEE_; alias ACTRL_ACCESS* PACTRL_ACCESS; alias ACTRL_ACCESS_ENTRY_LIST* PACTRL_ACCESS_ENTRY_LIST; alias ACTRL_ACCESS_INFO* PACTRL_ACCESS_INFO; alias ACTRL_ACCESS_ENTRY* PACTRL_ACCESS_ENTRY; alias ACTRL_AUDIT* PACTRL_AUDIT; alias ACTRL_CONTROL_INFO* PACTRL_CONTROL_INFO; alias EXPLICIT_ACCESS EXPLICIT_ACCESS_; alias EXPLICIT_ACCESS* PEXPLICIT_ACCESS, PEXPLICIT_ACCESS_; alias TRUSTEE_ACCESS* PTRUSTEE_ACCESS; alias OBJECTS_AND_NAME_* POBJECTS_AND_NAME_; static if (_WIN32_WINNT >= 0x501) { alias INHERITED_FROM* PINHERITED_FROM; }
D
.hd ptoc "convert packed string to EOS-terminated string" 03/23/80 integer function ptoc (pstr, term, str, len) packed_char pstr (ARB) integer len character term, str (len) .sp Library: vswtlb (standard Subsystem library) .fs 'Ptoc' is used to convert packed character strings (e.g., Fortran Hollerith literals) into the EOS-terminated unpacked form normally used by all Subsystem routines. The argument 'pstr' is the packed array to be converted. 'Term' is a "termination character"; if the termination character appears unescaped in the packed string, then the unpacking operation will be terminated. (For example, most uses of packed strings in .ul Software Tools included a period as a termination character, since in general there is no other way for a subprogram to tell where a Hollerith literal ends.) The argument 'str' is an array to receive the unpacked string; its maximum length is specified by the argument 'len'. .sp The function return is the length of the string in 'str' (as usual, excluding the EOS character). .sp A note on a rather common use of 'ptoc': Many Primos routines return packed character strings that do not have a termination character, but do have a maximum length. When using 'ptoc' to convert the output of these routines, one may use EOS as the termination character to obtain a fixed-length result. .im 'Ptoc' uses the standard Subsystem macro 'fpchar' to pull successive characters from the packed array. These are simply copied into the receiving string until the string is full or an unescaped instance of the termination character is found. .am str .sa other conversion routines ('cto?*' and '?*toc'), particularly 'ctop' (2), 'vtoc' (2), and 'ctov' (2)
D
raise being or moving higher in position or greater in some value out of bed getting higher or more vigorous extending or moving toward a higher place (usually followed by `on' or `for') in readiness open (used of computers) operating properly used up spatially or metaphorically from a lower to a higher position to a higher intensity nearer to the speaker to a more central or a more northerly place to a later time
D
E: c34, c110, c79, c56, c51, c94, c85, c10, c18, c2, c101, c27, c114, c76, c43, c72, c37, c17, c12, c67, c100, c36, c109, c54, c107, c80, c108, c116, c41, c84, c26, c60, c8, c44, c74, c35, c42, c14, c49, c96, c23, c112, c22, c88, c82, c39, c59, c16, c111, c65, c21, c45, c77, c31. p8(E,E) c34,c110 c51,c94 c85,c94 c85,c10 c85,c18 c51,c27 c94,c43 c10,c18 c94,c27 c51,c12 c67,c100 c51,c36 c10,c80 c85,c12 c51,c43 c94,c41 c17,c94 c85,c2 c10,c12 c17,c2 c17,c43 c17,c41 c74,c49 c85,c80 c10,c43 c10,c94 c94,c18 c51,c80 c51,c10 c94,c36 c10,c2 c94,c80 c94,c72 c10,c27 c94,c2 c51,c41 c17,c10 c17,c80 c22,c14 . p6(E,E) c79,c56 c10,c2 c2,c101 c10,c27 c10,c80 c17,c27 c17,c36 c74,c35 c34,c110 c17,c80 c10,c12 c82,c39 c67,c100 c10,c36 c10,c18 c10,c43 c17,c94 c17,c18 c10,c41 c10,c94 . p4(E,E) c114,c76 . p5(E,E) c72,c37 c107,c2 c42,c14 . p7(E,E) c43,c17 c94,c10 c12,c56 c72,c60 c94,c110 c2,c59 c10,c22 c27,c111 c41,c65 c18,c110 c36,c84 . p2(E,E) c109,c54 c79,c12 . p10(E,E) c108,c116 c8,c44 c10,c22 c2,c59 c36,c84 c41,c65 c72,c60 c18,c110 c14,c31 . p3(E,E) c18,c94 c96,c10 c23,c85 c88,c109 c16,c51 c54,c21 . p0(E,E) c84,c26 c17,c79 . p9(E,E) c51,c112 . p1(E,E) c41,c45 c22,c77 .
D
module gfm.core.queue; import std.range; // what to do when capacity is exceeded? private enum OverflowPolicy { GROW, CRASH, DROP } /** Doubly-indexed queue, can be used as a FIFO or stack. Bugs: Doesn't call struct destructors. */ final class QueueImpl(T, OverflowPolicy overflowPolicy) { public { /// Create a QueueImpl with specified initial capacity. this(size_t initialCapacity) nothrow { _data.length = initialCapacity; clear(); } /// Returns: true if the queue is full. @property bool isFull() pure const nothrow { return _count == capacity; } /// Returns: capacity of the queue. @property size_t capacity() pure const nothrow { return _data.length; } /// Adds an item on the back of the queue. void pushBack(T x) nothrow { checkOverflow!popFront(); _data[(_first + _count) % _data.length] = x; ++_count; } /// Adds an item on the front of the queue. void pushFront(T x) nothrow { checkOverflow!popBack(); ++_count; _first = (_first - 1 + _data.length) % _data.length; _data[_first] = x; } /// Removes an item from the front of the queue. /// Returns: the removed item. T popFront() nothrow { crashIfEmpty(); T res = _data[_first]; _first = (_first + 1) % _data.length; --_count; return res; } /// Removes an item from the back of the queue. /// Returns: the removed item. T popBack() nothrow { crashIfEmpty(); --_count; return _data[(_first + _count) % _data.length]; } /// Removes all items from the queue. void clear() nothrow { _first = 0; _count = 0; } /// Returns: number of items in the queue. size_t length() pure const nothrow { return _count; } /// Returns: item at the front of the queue. T front() pure { crashIfEmpty(); return _data[_first]; } /// Returns: item on the back of the queue. T back() pure { crashIfEmpty(); return _data[(_first + _count + _data.length - 1) % _data.length]; } /// Returns: item index from the queue. T opIndex(size_t index) { // crash if index out-of-bounds (not recoverable) if (index > _count) assert(0); return _data[(_first + index) % _data.length]; } /// Returns: random-access range over the whole queue. Range opSlice() nothrow { return Range(this); } deprecated("Queue.range() is deprecated, use opSlice instead") alias opSlice range; /// Returns: random-access range over a queue sub-range. Range opSlice(size_t i, size_t j) nothrow { // verify that all elements are in bound if (i != j && i >= _count) assert(false); if (j > _count) assert(false); if (j < i) assert(false); return Range(this); } // range type, random access static struct Range { nothrow: public { this(QueueImpl queue) pure { this(queue, 0, queue._count); _first = queue._first; _count = queue._count; } this(QueueImpl queue, size_t index, size_t count) pure { _index = index; _data = queue._data; _first = (queue._first + index) % _data.length; _count = _count; } @property bool empty() pure const { return _index >= _count; } void popFront() { _index++; } @property T front() pure { return _data[(_first + _index) % _data.length]; } void popBack() { _count--; } @property T back() pure { return _data[(_first + _count - 1) % _data.length]; } @property Range save() { return this; } T opIndex(size_t i) { // crash if index out-of-bounds of the range (not recoverable) if (i > _count) assert(0); return _data[(_first + _index + i) % _data.length]; } @property size_t length() pure { return _count; } alias length opDollar; } private { size_t _index; T[] _data; size_t _first; size_t _count; } } } private { void crashIfEmpty() { // popping if empty is not a recoverable error if (_count == 0) assert(false); } // element lie from _first to _first + _count - 1 index, modulo the allocated size T[] _data; size_t _first; size_t _count; void checkOverflow(alias popMethod)() nothrow { if (isFull()) { static if (overflowPolicy == OverflowPolicy.GROW) extend(); static if (overflowPolicy == OverflowPolicy.CRASH) assert(false); // not recoverable to overflow such a queue static if (overflowPolicy == OverflowPolicy.DROP) popMethod(); } } void extend() nothrow { size_t newCapacity = capacity * 2; if (newCapacity < 8) newCapacity = 8; assert(newCapacity >= _count + 1); T[] newData = new T[newCapacity]; auto r = this[]; size_t i = 0; while (!r.empty()) { newData[i] = r.front(); r.popFront(); ++i; } _data = newData; _first = 0; } } } static assert (isRandomAccessRange!(Queue!int.Range)); unittest { // fifo { int N = 7; auto fifo = new Queue!int(N); foreach(n; 0..N) fifo.pushBack(n); assert(fifo.back() == N - 1); assert(fifo.front() == 0); foreach(n; 0..N) { assert(fifo.popFront() == n); } } // stack { int N = 7; auto fifo = new Queue!int(N); foreach(n; 0..N) fifo.pushBack(n); foreach(n; 0..N) assert(fifo.popBack() == N - 1 - n); } } /** A queue that can only grow. See_also: $(LINK2 #QueueImpl, QueueImpl) */ template Queue(T) { alias QueueImpl!(T, OverflowPolicy.GROW) Queue; } /** A fixed-sized queue that will crash on overflow. See_also: $(LINK2 #QueueImpl, QueueImpl) */ template FixedSizeQueue(T) { alias QueueImpl!(T, OverflowPolicy.CRASH) FixedSizeQueue; } /** Ring buffer, it drops if its capacity is exceeded. See_also: $(LINK2 #QueueImpl, QueueImpl) */ template RingBuffer(T) { alias QueueImpl!(T, OverflowPolicy.DROP) RingBuffer; }
D
/Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/App.build/app.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/app~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/app~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
// This file is part of Visual D // // Visual D integrates the D programming language into Visual Studio // Copyright (c) 2010-2011 by Rainer Schuetze, All Rights Reserved // // License for redistribution is given by the Artistic License 2.0 // see file LICENSE for further details module stdext.com; //version(none): import std.utf; import std.string; import std.c.string; import core.memory; import sdk.port.base; import sdk.port.stdole2; import sdk.win32.oleauto; import sdk.win32.objbase; /////////////////////////////////////////////////////////////////////////////// extern(C) void* gc_malloc(size_t sz, uint ba = 0, const TypeInfo ti=null); C _newCom(C, T...)(T arguments) { // avoid special casing in _d_newclass, where COM objects are not garbage collected size_t size = C.classinfo.init.length; void* p = gc_malloc(size, 1, C.classinfo); // BlkAttr.FINALIZE memcpy(p, C.classinfo.init.ptr, size); C c = cast(C) p; static if(arguments.length || __traits(compiles,c.__ctor(arguments))) c.__ctor(arguments); return c; } C newCom(C, T...)(T arguments) if(is(C : ComObject) && T.length > 0) { return _newCom!C(arguments); } @property C newCom(C)() if(is(C : ComObject)) { return _newCom!C(); } class ComObject : IUnknown { @disable new(size_t size) { assert(false); // should not be called because we don't have enough type info void* p = gc_malloc(size, 1, typeid(ComObject)); // BlkAttr.FINALIZE return p; } extern (System): override HRESULT QueryInterface(in IID* riid, void** ppv) { if (*riid == IID_IUnknown) { *ppv = cast(void*)cast(IUnknown)this; AddRef(); return S_OK; } *ppv = null; return E_NOINTERFACE; } override ULONG AddRef() { LONG lRef = InterlockedIncrement(&count); if(lRef == 1) { void* vthis = cast(void*) this; GC.addRoot(vthis); } return lRef; } override ULONG Release() { LONG lRef = InterlockedDecrement(&count); if (lRef == 0) { void* vthis = cast(void*) this; GC.removeRoot(vthis); return 0; } return cast(ULONG)lRef; } LONG count = 0; // object reference count } struct ComPtr(Interface) { Interface ptr; this(Interface i = null, bool doref = true) { ptr = i; if(ptr && doref) ptr.AddRef(); } this(IUnknown i) { ptr = qi_cast!(Interface)(i); } ~this() { if(ptr) ptr.Release(); } Interface detach() { Interface p = ptr; ptr = null; return p; } void opAssign(Interface i) { if(ptr) ptr.Release(); ptr = i; if(ptr) ptr.AddRef(); } void opAssign(IUnknown i) { if(ptr) ptr.Release(); ptr = qi_cast!(Interface)(i); } Interface opCast(T:Interface)() { return ptr; } Interface* opCast(T:Interface*)() { return &ptr; } bool opCast(T:bool)() { return ptr !is null; } alias ptr this; } /////////////////////////////////////////////////////////////////////// bool queryInterface2(I)(I obj, in IID iid, in IID* riid, void** pvObject) { if(*riid == iid) { *pvObject = cast(void*)obj; obj.AddRef(); return true; } return false; } bool queryInterface(I)(I obj, in IID* riid, void** pvObject) { return queryInterface2!(I)(obj, I.iid, riid, pvObject); } I qi_cast(I)(IUnknown obj) { I iobj; if(obj && obj.QueryInterface(&I.iid, cast(void**)&iobj) == S_OK) return iobj; return null; } /////////////////////////////////////////////////////////////////////////////// T addref(T)(T p) { if(p) p.AddRef(); return p; } T release(T)(T p) { if(p) p.Release(); return null; } /////////////////////////////////////////////////////////////////////////////// static const size_t clsidLen = 127; static const size_t clsidSize = clsidLen + 1; wstring GUID2wstring(in GUID clsid) { //get clsid's as string wchar oleCLSID_arr[clsidLen+1]; if (StringFromGUID2(*cast(GUID*)&clsid, oleCLSID_arr.ptr, clsidLen) == 0) return ""; wstring oleCLSID = to_wstring(oleCLSID_arr.ptr); return oleCLSID; } string GUID2string(in GUID clsid) { return toUTF8(GUID2wstring(clsid)); } BSTR allocwBSTR(wstring s) { return SysAllocStringLen(s.ptr, cast(UINT) s.length); } BSTR allocBSTR(string s) { wstring ws = toUTF16(s); return SysAllocStringLen(ws.ptr, cast(UINT) ws.length); } wstring wdetachBSTR(ref BSTR bstr) { if(!bstr) return ""w; wstring ws = to_wstring(bstr); SysFreeString(bstr); bstr = null; return ws; } string detachBSTR(ref BSTR bstr) { if(!bstr) return ""; wstring ws = to_wstring(bstr); SysFreeString(bstr); bstr = null; string s = toUTF8(ws); return s; } void freeBSTR(BSTR bstr) { if(bstr) SysFreeString(bstr); } wchar* wstring2OLESTR(wstring s) { size_t sz = (s.length + 1) * 2; wchar* p = cast(wchar*) CoTaskMemAlloc(sz); p[0 .. s.length] = s[0 .. $]; p[s.length] = 0; return p; } wchar* string2OLESTR(string s) { wstring ws = toUTF16(s); size_t sz = (ws.length + 1) * 2; wchar* p = cast(wchar*) CoTaskMemAlloc(sz); p[0 .. ws.length] = ws[0 .. $]; p[ws.length] = 0; return p; } string detachOLESTR(wchar* oleStr) { if(!oleStr) return null; string s = to_string(oleStr); CoTaskMemFree(oleStr); return s; } unittest { // chinese for utf-8 string str2 = "\xe8\xbf\x99\xe6\x98\xaf\xe4\xb8\xad\xe6\x96\x87"; wchar* olestr2 = string2OLESTR(str2); string cmpstr2 = detachOLESTR(olestr2); assert(str2 == cmpstr2); // chinese for Ansi wstring str1 = "\ud5e2\ucac7\ud6d0\ucec4"w; wchar* olestr1 = wstring2OLESTR(str1); string cmpstr1 = detachOLESTR(olestr1); wstring wcmpstr1 = toUTF16(cmpstr1); assert(str1 == wcmpstr1); } wchar* _toUTF16z(string s) { // const for D2 return cast(wchar*)toUTF16z(s); } wchar* _toUTF16zw(wstring s) { // const for D2 wstring sz = s ~ "\0"w; return cast(wchar*)sz.ptr; } string to_string(in wchar* pText, size_t iLength) { if(!pText) return ""; string text = toUTF8(pText[0 .. iLength]); return text; } string to_string(in wchar* pText) { if(!pText) return ""; size_t len = wcslen(pText); return to_string(pText, len); } wstring to_wstring(in wchar* pText, size_t iLength) { if(!pText) return ""w; wstring text = pText[0 .. iLength].idup; return text; } wstring to_cwstring(in wchar* pText, size_t iLength) { if(!pText) return ""w; wstring text = pText[0 .. iLength].idup; return text; } wstring to_wstring(in wchar* pText) { if(!pText) return ""w; size_t len = wcslen(pText); return to_wstring(pText, len); } wstring to_cwstring(in wchar* pText) { if(!pText) return ""w; size_t len = wcslen(pText); return to_cwstring(pText, len); } wstring to_wstring(in char* pText) { if(!pText) return ""w; size_t len = strlen(pText); return toUTF16(pText[0 .. len]); } /////////////////////////////////////////////////////////////////////// struct ScopedBSTR { BSTR bstr; alias bstr this; this(string s) { bstr = allocBSTR(s); } this(wstring s) { bstr = allocwBSTR(s); } ~this() { if(bstr) { freeBSTR(bstr); bstr = null; } } wstring wdetach() { return wdetachBSTR(bstr); } string detach() { return detachBSTR(bstr); } }
D
/** * Copyright: © 2014 Anton Gushcha * License: Subject to the terms of the MIT license, as written in the included LICENSE file. * Authors: NCrashed <ncrashed@gmail.com> */ module evol.operators.idcast; import std.stdio; import devol.typemng; public { import devol.individ; import devol.world; import devol.operator; import devol.std.typepod; } class IntDoubleCastOperator : Operator { TypePod!double doubletype; TypePod!int inttype; enum description = "Преобразует целочисленное в действительное число."; this() { inttype = cast(TypePod!int)(TypeMng.getSingleton().getType("Typeint")); assert(inttype, "We need int type!"); doubletype = cast(TypePod!double)(TypeMng.getSingleton().getType("Typedouble")); assert(doubletype, "We need double type!"); mRetType = doubletype; super("cast", description, ArgsStyle.UNAR_STYLE); ArgInfo a1; a1.type = inttype; a1.min = "-100"; a1.max = "+100"; args ~= a1; } override Argument apply(IndAbstract ind, Line line, WorldAbstract world) { auto ret = doubletype.getNewArg(); auto a1 = cast(ArgPod!int)(line[0]); assert( a1 !is null, "Critical error: Operator plus, argument 1 isn't a right value!"); ret = cast(double)a1.val; return ret; } }
D
/* * Copyright (C) 2010 Google Inc. * * 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. */ package benchmarks; /** * What do various kinds of addition cost? */ public class AdditionBenchmark { public int timeAddConstantToLocalInt(int reps) { int result = 0; for (int i = 0; i < reps; ++i) { result += 123; } return result; } public int timeAddTwoLocalInts(int reps) { int result = 0; int constant = 123; for (int i = 0; i < reps; ++i) { result += constant; } return result; } public long timeAddConstantToLocalLong(int reps) { long result = 0; for (int i = 0; i < reps; ++i) { result += 123L; } return result; } public long timeAddTwoLocalLongs(int reps) { long result = 0; long constant = 123L; for (int i = 0; i < reps; ++i) { result += constant; } return result; } public float timeAddConstantToLocalFloat(int reps) { float result = 0.0f; for (int i = 0; i < reps; ++i) { result += 123.0f; } return result; } public float timeAddTwoLocalFloats(int reps) { float result = 0.0f; float constant = 123.0f; for (int i = 0; i < reps; ++i) { result += constant; } return result; } public double timeAddConstantToLocalDouble(int reps) { double result = 0.0; for (int i = 0; i < reps; ++i) { result += 123.0; } return result; } public double timeAddTwoLocalDoubles(int reps) { double result = 0.0; double constant = 123.0; for (int i = 0; i < reps; ++i) { result += constant; } return result; } }
D
/Users/lb/Documents/Project/LearnVapor/.build/x86_64-apple-macosx10.10/debug/URLEncodedForm.build/Codable/URLEncodedFormDecoder.swift.o : /Users/lb/Documents/Project/LearnVapor/.build/checkouts/url-encoded-form.git--7962792991753699495/Sources/URLEncodedForm/Data/URLEncodedFormData.swift /Users/lb/Documents/Project/LearnVapor/.build/checkouts/url-encoded-form.git--7962792991753699495/Sources/URLEncodedForm/Data/URLEncodedFormDataConvertible.swift /Users/lb/Documents/Project/LearnVapor/.build/checkouts/url-encoded-form.git--7962792991753699495/Sources/URLEncodedForm/Codable/URLEncodedFormDecoder.swift /Users/lb/Documents/Project/LearnVapor/.build/checkouts/url-encoded-form.git--7962792991753699495/Sources/URLEncodedForm/Codable/URLEncodedFormEncoder.swift /Users/lb/Documents/Project/LearnVapor/.build/checkouts/url-encoded-form.git--7962792991753699495/Sources/URLEncodedForm/Data/URLEncodedFormParser.swift /Users/lb/Documents/Project/LearnVapor/.build/checkouts/url-encoded-form.git--7962792991753699495/Sources/URLEncodedForm/Data/URLEncodedFormSerializer.swift /Users/lb/Documents/Project/LearnVapor/.build/checkouts/url-encoded-form.git--7962792991753699495/Sources/URLEncodedForm/Utilities/URLEncodedFormError.swift /Users/lb/Documents/Project/LearnVapor/.build/checkouts/url-encoded-form.git--7962792991753699495/Sources/URLEncodedForm/Utilities/Exports.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/lb/Documents/Project/LearnVapor/.build/x86_64-apple-macosx10.10/debug/NIO.swiftmodule /Users/lb/Documents/Project/LearnVapor/.build/x86_64-apple-macosx10.10/debug/Async.swiftmodule /Users/lb/Documents/Project/LearnVapor/.build/x86_64-apple-macosx10.10/debug/Core.swiftmodule /Users/lb/Documents/Project/LearnVapor/.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/lb/Documents/Project/LearnVapor/.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/lb/Documents/Project/LearnVapor/.build/x86_64-apple-macosx10.10/debug/NIOConcurrencyHelpers.swiftmodule /Users/lb/Documents/Project/LearnVapor/.build/x86_64-apple-macosx10.10/debug/Bits.swiftmodule /Users/lb/Documents/Project/LearnVapor/.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/lb/Documents/Project/LearnVapor/.build/checkouts/swift-nio.git-8756902686293799568/Sources/CNIOAtomics/include/cpp_magic.h /Users/lb/Documents/Project/LearnVapor/.build/checkouts/swift-nio.git-8756902686293799568/Sources/CNIODarwin/include/c_nio_darwin.h /Users/lb/Documents/Project/LearnVapor/.build/checkouts/swift-nio.git-8756902686293799568/Sources/CNIOAtomics/include/c-atomics.h /Users/lb/Documents/Project/LearnVapor/.build/checkouts/swift-nio.git-8756902686293799568/Sources/CNIOLinux/include/c_nio_linux.h /Users/lb/Documents/Project/LearnVapor/.build/checkouts/swift-nio-zlib-support.git--4783613459776704231/module.modulemap /Users/lb/Documents/Project/LearnVapor/.build/x86_64-apple-macosx10.10/debug/CNIOSHA1.build/module.modulemap /Users/lb/Documents/Project/LearnVapor/.build/x86_64-apple-macosx10.10/debug/CNIOOpenSSL.build/module.modulemap /Users/lb/Documents/Project/LearnVapor/.build/x86_64-apple-macosx10.10/debug/CCryptoOpenSSL.build/module.modulemap /Users/lb/Documents/Project/LearnVapor/.build/x86_64-apple-macosx10.10/debug/CNIOZlib.build/module.modulemap /Users/lb/Documents/Project/LearnVapor/.build/x86_64-apple-macosx10.10/debug/CNIODarwin.build/module.modulemap /Users/lb/Documents/Project/LearnVapor/.build/x86_64-apple-macosx10.10/debug/CNIOHTTPParser.build/module.modulemap /Users/lb/Documents/Project/LearnVapor/.build/x86_64-apple-macosx10.10/debug/CNIOAtomics.build/module.modulemap /Users/lb/Documents/Project/LearnVapor/.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/lb/Documents/Project/LearnVapor/.build/x86_64-apple-macosx10.10/debug/URLEncodedForm.build/URLEncodedFormDecoder~partial.swiftmodule : /Users/lb/Documents/Project/LearnVapor/.build/checkouts/url-encoded-form.git--7962792991753699495/Sources/URLEncodedForm/Data/URLEncodedFormData.swift /Users/lb/Documents/Project/LearnVapor/.build/checkouts/url-encoded-form.git--7962792991753699495/Sources/URLEncodedForm/Data/URLEncodedFormDataConvertible.swift /Users/lb/Documents/Project/LearnVapor/.build/checkouts/url-encoded-form.git--7962792991753699495/Sources/URLEncodedForm/Codable/URLEncodedFormDecoder.swift /Users/lb/Documents/Project/LearnVapor/.build/checkouts/url-encoded-form.git--7962792991753699495/Sources/URLEncodedForm/Codable/URLEncodedFormEncoder.swift /Users/lb/Documents/Project/LearnVapor/.build/checkouts/url-encoded-form.git--7962792991753699495/Sources/URLEncodedForm/Data/URLEncodedFormParser.swift /Users/lb/Documents/Project/LearnVapor/.build/checkouts/url-encoded-form.git--7962792991753699495/Sources/URLEncodedForm/Data/URLEncodedFormSerializer.swift /Users/lb/Documents/Project/LearnVapor/.build/checkouts/url-encoded-form.git--7962792991753699495/Sources/URLEncodedForm/Utilities/URLEncodedFormError.swift /Users/lb/Documents/Project/LearnVapor/.build/checkouts/url-encoded-form.git--7962792991753699495/Sources/URLEncodedForm/Utilities/Exports.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/lb/Documents/Project/LearnVapor/.build/x86_64-apple-macosx10.10/debug/NIO.swiftmodule /Users/lb/Documents/Project/LearnVapor/.build/x86_64-apple-macosx10.10/debug/Async.swiftmodule /Users/lb/Documents/Project/LearnVapor/.build/x86_64-apple-macosx10.10/debug/Core.swiftmodule /Users/lb/Documents/Project/LearnVapor/.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/lb/Documents/Project/LearnVapor/.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/lb/Documents/Project/LearnVapor/.build/x86_64-apple-macosx10.10/debug/NIOConcurrencyHelpers.swiftmodule /Users/lb/Documents/Project/LearnVapor/.build/x86_64-apple-macosx10.10/debug/Bits.swiftmodule /Users/lb/Documents/Project/LearnVapor/.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/lb/Documents/Project/LearnVapor/.build/checkouts/swift-nio.git-8756902686293799568/Sources/CNIOAtomics/include/cpp_magic.h /Users/lb/Documents/Project/LearnVapor/.build/checkouts/swift-nio.git-8756902686293799568/Sources/CNIODarwin/include/c_nio_darwin.h /Users/lb/Documents/Project/LearnVapor/.build/checkouts/swift-nio.git-8756902686293799568/Sources/CNIOAtomics/include/c-atomics.h /Users/lb/Documents/Project/LearnVapor/.build/checkouts/swift-nio.git-8756902686293799568/Sources/CNIOLinux/include/c_nio_linux.h /Users/lb/Documents/Project/LearnVapor/.build/checkouts/swift-nio-zlib-support.git--4783613459776704231/module.modulemap /Users/lb/Documents/Project/LearnVapor/.build/x86_64-apple-macosx10.10/debug/CNIOSHA1.build/module.modulemap /Users/lb/Documents/Project/LearnVapor/.build/x86_64-apple-macosx10.10/debug/CNIOOpenSSL.build/module.modulemap /Users/lb/Documents/Project/LearnVapor/.build/x86_64-apple-macosx10.10/debug/CCryptoOpenSSL.build/module.modulemap /Users/lb/Documents/Project/LearnVapor/.build/x86_64-apple-macosx10.10/debug/CNIOZlib.build/module.modulemap /Users/lb/Documents/Project/LearnVapor/.build/x86_64-apple-macosx10.10/debug/CNIODarwin.build/module.modulemap /Users/lb/Documents/Project/LearnVapor/.build/x86_64-apple-macosx10.10/debug/CNIOHTTPParser.build/module.modulemap /Users/lb/Documents/Project/LearnVapor/.build/x86_64-apple-macosx10.10/debug/CNIOAtomics.build/module.modulemap /Users/lb/Documents/Project/LearnVapor/.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/lb/Documents/Project/LearnVapor/.build/x86_64-apple-macosx10.10/debug/URLEncodedForm.build/URLEncodedFormDecoder~partial.swiftdoc : /Users/lb/Documents/Project/LearnVapor/.build/checkouts/url-encoded-form.git--7962792991753699495/Sources/URLEncodedForm/Data/URLEncodedFormData.swift /Users/lb/Documents/Project/LearnVapor/.build/checkouts/url-encoded-form.git--7962792991753699495/Sources/URLEncodedForm/Data/URLEncodedFormDataConvertible.swift /Users/lb/Documents/Project/LearnVapor/.build/checkouts/url-encoded-form.git--7962792991753699495/Sources/URLEncodedForm/Codable/URLEncodedFormDecoder.swift /Users/lb/Documents/Project/LearnVapor/.build/checkouts/url-encoded-form.git--7962792991753699495/Sources/URLEncodedForm/Codable/URLEncodedFormEncoder.swift /Users/lb/Documents/Project/LearnVapor/.build/checkouts/url-encoded-form.git--7962792991753699495/Sources/URLEncodedForm/Data/URLEncodedFormParser.swift /Users/lb/Documents/Project/LearnVapor/.build/checkouts/url-encoded-form.git--7962792991753699495/Sources/URLEncodedForm/Data/URLEncodedFormSerializer.swift /Users/lb/Documents/Project/LearnVapor/.build/checkouts/url-encoded-form.git--7962792991753699495/Sources/URLEncodedForm/Utilities/URLEncodedFormError.swift /Users/lb/Documents/Project/LearnVapor/.build/checkouts/url-encoded-form.git--7962792991753699495/Sources/URLEncodedForm/Utilities/Exports.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/lb/Documents/Project/LearnVapor/.build/x86_64-apple-macosx10.10/debug/NIO.swiftmodule /Users/lb/Documents/Project/LearnVapor/.build/x86_64-apple-macosx10.10/debug/Async.swiftmodule /Users/lb/Documents/Project/LearnVapor/.build/x86_64-apple-macosx10.10/debug/Core.swiftmodule /Users/lb/Documents/Project/LearnVapor/.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/lb/Documents/Project/LearnVapor/.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/lb/Documents/Project/LearnVapor/.build/x86_64-apple-macosx10.10/debug/NIOConcurrencyHelpers.swiftmodule /Users/lb/Documents/Project/LearnVapor/.build/x86_64-apple-macosx10.10/debug/Bits.swiftmodule /Users/lb/Documents/Project/LearnVapor/.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/lb/Documents/Project/LearnVapor/.build/checkouts/swift-nio.git-8756902686293799568/Sources/CNIOAtomics/include/cpp_magic.h /Users/lb/Documents/Project/LearnVapor/.build/checkouts/swift-nio.git-8756902686293799568/Sources/CNIODarwin/include/c_nio_darwin.h /Users/lb/Documents/Project/LearnVapor/.build/checkouts/swift-nio.git-8756902686293799568/Sources/CNIOAtomics/include/c-atomics.h /Users/lb/Documents/Project/LearnVapor/.build/checkouts/swift-nio.git-8756902686293799568/Sources/CNIOLinux/include/c_nio_linux.h /Users/lb/Documents/Project/LearnVapor/.build/checkouts/swift-nio-zlib-support.git--4783613459776704231/module.modulemap /Users/lb/Documents/Project/LearnVapor/.build/x86_64-apple-macosx10.10/debug/CNIOSHA1.build/module.modulemap /Users/lb/Documents/Project/LearnVapor/.build/x86_64-apple-macosx10.10/debug/CNIOOpenSSL.build/module.modulemap /Users/lb/Documents/Project/LearnVapor/.build/x86_64-apple-macosx10.10/debug/CCryptoOpenSSL.build/module.modulemap /Users/lb/Documents/Project/LearnVapor/.build/x86_64-apple-macosx10.10/debug/CNIOZlib.build/module.modulemap /Users/lb/Documents/Project/LearnVapor/.build/x86_64-apple-macosx10.10/debug/CNIODarwin.build/module.modulemap /Users/lb/Documents/Project/LearnVapor/.build/x86_64-apple-macosx10.10/debug/CNIOHTTPParser.build/module.modulemap /Users/lb/Documents/Project/LearnVapor/.build/x86_64-apple-macosx10.10/debug/CNIOAtomics.build/module.modulemap /Users/lb/Documents/Project/LearnVapor/.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
module android.java.android.database.sqlite.SQLiteOpenHelper; public import android.java.android.database.sqlite.SQLiteOpenHelper_d_interface; import arsd.jni : ImportExportImpl; mixin ImportExportImpl!SQLiteOpenHelper; import import4 = android.java.android.database.sqlite.SQLiteDatabase; import import5 = android.java.java.lang.Class;
D
INSTANCE KDF_505_Marduk (Npc_Default) { // ------ NSC ------ name = "Marduk"; guild = GIL_KDF; id = 505; voice = 5; flags = 0; npctype = NPCTYPE_MAIN; // ------ Attribute ------ B_SetAttributesToChapter (self, 6); // ------ Kampf-Taktik ------ fight_tactic = FAI_HUMAN_MASTER; // ------ Equippte Waffen ------ // ------ Inventory ------ B_CreateAmbientInv (self); // ------ visuals ------ B_SetNpcVisual (self, MALE, "Hum_Head_Bald",Face_P_OldMan_Gravo, BodyTex_P, ITAR_KDF_L); Mdl_SetModelFatness (self, 0); Mdl_ApplyOverlayMds (self, "Humans_Mage.mds"); // ------ NSC-relevante Talente vergeben ------ B_GiveNpcTalents (self); // ------ Kampf-Talente ------ B_SetFightSkills (self, 30); // ------ TA anmelden ------ daily_routine = Rtn_Start_505; }; FUNC VOID Rtn_Start_505 () { TA_Stand_Guarding (08,00,23,00,"NW_MONASTERY_CORRIDOR_03"); TA_Sleep (23,00,08,00,"NW_MONASTERY_MAGE01_BED_01"); };
D
/* TEST_OUTPUT: --- fail_compilation/diag9861.d(8): Error: no property `epsilon` for type `int` fail_compilation/diag9861.d(9): while looking for match for `Foo!int` --- */ struct Foo(T, real x = T.epsilon) {} Foo!(int) q;
D
Long: version Short: V Help: Show version number and quit Category: important curl Example: --version Added: 4.0 See-also: help manual --- Displays information about curl and the libcurl version it uses. The first line includes the full version of curl, libcurl and other 3rd party libraries linked with the executable. The second line (starts with "Protocols:") shows all protocols that libcurl reports to support. The third line (starts with "Features:") shows specific features libcurl reports to offer. Available features include: .RS .IP "alt-svc" Support for the Alt-Svc: header is provided. .IP "AsynchDNS" This curl uses asynchronous name resolves. Asynchronous name resolves can be done using either the c-ares or the threaded resolver backends. .IP "brotli" Support for automatic brotli compression over HTTP(S). .IP "CharConv" curl was built with support for character set conversions (like EBCDIC) .IP "Debug" This curl uses a libcurl built with Debug. This enables more error-tracking and memory debugging etc. For curl-developers only! .IP "gsasl" The built-in SASL authentication includes extensions to support SCRAM because libcurl was built with libgsasl. .IP "GSS-API" GSS-API is supported. .IP "HSTS" HSTS support is present. .IP "HTTP2" HTTP/2 support has been built-in. .IP "HTTP3" HTTP/3 support has been built-in. .IP "HTTPS-proxy" This curl is built to support HTTPS proxy. .IP "IDN" This curl supports IDN - international domain names. .IP "IPv6" You can use IPv6 with this. .IP "Kerberos" Kerberos V5 authentication is supported. .IP "Largefile" This curl supports transfers of large files, files larger than 2GB. .IP "libz" Automatic decompression (via gzip, deflate) of compressed files over HTTP is supported. .IP "MultiSSL" This curl supports multiple TLS backends. .IP "NTLM" NTLM authentication is supported. .IP "NTLM_WB" NTLM delegation to winbind helper is supported. .IP "PSL" PSL is short for Public Suffix List and means that this curl has been built with knowledge about "public suffixes". .IP "SPNEGO" SPNEGO authentication is supported. .IP "SSL" SSL versions of various protocols are supported, such as HTTPS, FTPS, POP3S and so on. .IP "SSPI" SSPI is supported. .IP "TLS-SRP" SRP (Secure Remote Password) authentication is supported for TLS. .IP "TrackMemory" Debug memory tracking is supported. .IP "Unicode" Unicode support on Windows. .IP "UnixSockets" Unix sockets support is provided. .IP "zstd" Automatic decompression (via zstd) of compressed files over HTTP is supported. .RE
D
instance SLD_802_Buster(Npc_Default) { name[0] = "Buster"; guild = GIL_SLD; id = 802; voice = 13; flags = 0; npcType = npctype_main; aivar[AIV_IgnoresArmor] = TRUE; B_SetAttributesToChapter(self,1); fight_tactic = FAI_HUMAN_NORMAL; EquipItem(self,ItMw_1h_Sld_Axe); EquipItem(self,ItRw_Sld_Bow); CreateInvItems(self,ItRw_Arrow,10); B_CreateAmbientInv(self); B_SetNpcVisual(self,MALE,"Hum_Head_FatBald",Face_N_Drax,BodyTex_N,ItAr_Sld_L); Mdl_SetModelFatness(self,0); Mdl_ApplyOverlayMds(self,"Humans_Relaxed.mds"); B_GiveNpcTalents(self); B_SetFightSkills(self,30); daily_routine = Rtn_Start_802; }; func void Rtn_Start_802() { TA_Smalltalk(7,0,21,0,"NW_BIGFARM_HUT_01"); TA_Sit_Bench(21,0,7,0,"NW_BIGFARM_HUT_BENCH_02"); };
D
//*NS - 18/06/13 // один из охранников у входа в ратушу instance PIR_220_DS2P_Guard(Npc_Default) { name[0] = "Охранник"; guild = GIL_PIR; id = 220; voice = 13; flags = NPC_FLAG_IMMORTAL; npcType = npctype_pir_main; B_SetAttributesToChapter(self,3); fight_tactic = FAI_HUMAN_MASTER; EquipItem(self,ItMw_Addon_PIR1hSword); B_SetNpcVisual(self,MALE,"Hum_Head_Fighter",Face_L_ToughBald01,BodyTex_L,ITAR_PIR_M_DS); Mdl_SetModelFatness(self,1); Mdl_ApplyOverlayMds(self,"Humans_Militia.mds"); B_GiveNpcTalents(self); B_SetFightSkills(self,50); daily_routine = Rtn_Start_220; }; func void Rtn_Start_220() { //стоит перед ратушей весь день TA_Stand_Guarding(8,0,22,0,""); TA_Stand_Guarding(22,0,8,0,""); };
D
/** * Defines the `Dsymbol` representing a `static assert()`. * * Specification: $(LINK2 https://dlang.org/spec/version.html#static-assert, Static Assert) * * 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/staticassert.d, _staticassert.d) * Documentation: https://dlang.org/phobos/dmd_staticassert.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/staticassert.d */ module dmd.staticassert; import dmd.arraytypes; import dmd.dscope; import dmd.dsymbol; import dmd.expression; import dmd.globals; import dmd.location; import dmd.id; import dmd.identifier; import dmd.mtype; import dmd.visitor; /*********************************************************** */ extern (C++) final class StaticAssert : Dsymbol { Expression exp; Expressions* msgs; extern (D) this(const ref Loc loc, Expression exp, Expression msg) { super(loc, Id.empty); this.exp = exp; this.msgs = new Expressions(1); (*this.msgs)[0] = msg; } extern (D) this(const ref Loc loc, Expression exp, Expressions* msgs) { super(loc, Id.empty); this.exp = exp; this.msgs = msgs; } override StaticAssert syntaxCopy(Dsymbol s) { assert(!s); return new StaticAssert(loc, exp.syntaxCopy(), msgs ? Expression.arraySyntaxCopy(msgs) : null); } override void addMember(Scope* sc, ScopeDsymbol sds) { // we didn't add anything } override bool oneMember(Dsymbol* ps, Identifier ident) { //printf("StaticAssert::oneMember())\n"); *ps = null; return true; } override const(char)* kind() const { return "static assert"; } override inout(StaticAssert) isStaticAssert() inout { return this; } override void accept(Visitor v) { v.visit(this); } }
D
obj_xwr14xx/framework_ipc_local.oer4f: C:/ti/mmwave_sdk_02_01_00_04/packages/ti/drivers/test/common/framework_ipc_local.c obj_xwr14xx/framework_ipc_local.oer4f: C:/ti/ti-cgt-arm_16.9.6.LTS/include/stdint.h obj_xwr14xx/framework_ipc_local.oer4f: C:/ti/ti-cgt-arm_16.9.6.LTS/include/stdlib.h obj_xwr14xx/framework_ipc_local.oer4f: C:/ti/ti-cgt-arm_16.9.6.LTS/include/linkage.h obj_xwr14xx/framework_ipc_local.oer4f: C:/ti/ti-cgt-arm_16.9.6.LTS/include/stddef.h obj_xwr14xx/framework_ipc_local.oer4f: C:/ti/ti-cgt-arm_16.9.6.LTS/include/string.h obj_xwr14xx/framework_ipc_local.oer4f: C:/ti/ti-cgt-arm_16.9.6.LTS/include/stdio.h obj_xwr14xx/framework_ipc_local.oer4f: C:/ti/ti-cgt-arm_16.9.6.LTS/include/stdarg.h obj_xwr14xx/framework_ipc_local.oer4f: C:/ti/mmwave_sdk_02_01_00_04/packages/ti/common/sys_common.h obj_xwr14xx/framework_ipc_local.oer4f: C:/ti/ti-cgt-arm_16.9.6.LTS/include/stdbool.h obj_xwr14xx/framework_ipc_local.oer4f: C:/ti/mmwave_sdk_02_01_00_04/packages/ti/common/sys_common_xwr14xx.h obj_xwr14xx/framework_ipc_local.oer4f: C:/ti/mmwave_sdk_02_01_00_04/packages/ti/drivers/osal/DebugP.h obj_xwr14xx/framework_ipc_local.oer4f: C:/ti/ti-cgt-arm_16.9.6.LTS/include/stddef.h obj_xwr14xx/framework_ipc_local.oer4f: C:/ti/mmwave_sdk_02_01_00_04/packages/ti/drivers/test/common/framework.h obj_xwr14xx/framework_ipc_local.oer4f: C:/ti/mmwave_sdk_02_01_00_04/packages/ti/common/mmwave_error.h obj_xwr14xx/framework_ipc_local.oer4f: C:/ti/mmwave_sdk_02_01_00_04/packages/ti/drivers/soc/soc.h obj_xwr14xx/framework_ipc_local.oer4f: C:/ti/mmwave_sdk_02_01_00_04/packages/ti/drivers/osal/HwiP.h obj_xwr14xx/framework_ipc_local.oer4f: C:/ti/ti-cgt-arm_16.9.6.LTS/include/stddef.h obj_xwr14xx/framework_ipc_local.oer4f: C:/ti/mmwave_sdk_02_01_00_04/packages/ti/drivers/soc/include/soc_xwr14xx.h obj_xwr14xx/framework_ipc_local.oer4f: C:/ti/mmwave_sdk_02_01_00_04/packages/ti/control/mmwave/mmwave.h obj_xwr14xx/framework_ipc_local.oer4f: C:/ti/mmwave_sdk_02_01_00_04/packages/ti/drivers/crc/crc.h obj_xwr14xx/framework_ipc_local.oer4f: C:/ti/mmwave_sdk_02_01_00_04/packages/ti/control/mmwavelink/mmwavelink.h obj_xwr14xx/framework_ipc_local.oer4f: C:/ti/mmwave_sdk_02_01_00_04/packages/ti/control/mmwavelink/include/rl_datatypes.h obj_xwr14xx/framework_ipc_local.oer4f: C:/ti/ti-cgt-arm_16.9.6.LTS/include/stddef.h obj_xwr14xx/framework_ipc_local.oer4f: C:/ti/ti-cgt-arm_16.9.6.LTS/include/string.h obj_xwr14xx/framework_ipc_local.oer4f: C:/ti/mmwave_sdk_02_01_00_04/packages/ti/control/mmwavelink/include/rl_device.h obj_xwr14xx/framework_ipc_local.oer4f: C:/ti/mmwave_sdk_02_01_00_04/packages/ti/control/mmwavelink/include/rl_protocol.h obj_xwr14xx/framework_ipc_local.oer4f: C:/ti/mmwave_sdk_02_01_00_04/packages/ti/control/mmwavelink/include/rl_sensor.h obj_xwr14xx/framework_ipc_local.oer4f: C:/ti/mmwave_sdk_02_01_00_04/packages/ti/control/mmwavelink/include/rl_monitoring.h obj_xwr14xx/framework_ipc_local.oer4f: C:/ti/mmwave_sdk_02_01_00_04/packages/ti/control/mmwavelink/include/rl_messages.h obj_xwr14xx/framework_ipc_local.oer4f: C:/ti/mmwave_sdk_02_01_00_04/packages/ti/drivers/osal/SemaphoreP.h obj_xwr14xx/framework_ipc_local.oer4f: C:/ti/ti-cgt-arm_16.9.6.LTS/include/stddef.h obj_xwr14xx/framework_ipc_local.oer4f: C:/ti/mmwave_sdk_02_01_00_04/packages/ti/drivers/adcbuf/ADCBuf.h obj_xwr14xx/framework_ipc_local.oer4f: C:/ti/ti-cgt-arm_16.9.6.LTS/include/stddef.h obj_xwr14xx/framework_ipc_local.oer4f: C:/ti/mmwave_sdk_02_01_00_04/packages/ti/drivers/test/common/framework_internal.h obj_xwr14xx/framework_ipc_local.oer4f: C:/ti/mmwave_sdk_02_01_00_04/packages/ti/drivers/mailbox/mailbox.h obj_xwr14xx/framework_ipc_local.oer4f: C:/ti/ti-cgt-arm_16.9.6.LTS/include/stddef.h obj_xwr14xx/framework_ipc_local.oer4f: C:/ti/mmwave_sdk_02_01_00_04/packages/ti/drivers/edma/edma.h obj_xwr14xx/framework_ipc_local.oer4f: C:/ti/ti-cgt-arm_16.9.6.LTS/include/stddef.h obj_xwr14xx/framework_ipc_local.oer4f: C:/ti/mmwave_sdk_02_01_00_04/packages/ti/drivers/edma/include/edma_low_level.h obj_xwr14xx/framework_ipc_local.oer4f: C:/ti/mmwave_sdk_02_01_00_04/packages/ti/drivers/edma/include/hw_edma_tc.h obj_xwr14xx/framework_ipc_local.oer4f: C:/ti/mmwave_sdk_02_01_00_04/packages/ti/drivers/edma/include/hw_edma_tpcc.h obj_xwr14xx/framework_ipc_local.oer4f: C:/ti/mmwave_sdk_02_01_00_04/packages/ti/drivers/test/common/framework_listlib.h
D
class Goone { void AddCow(Cow cow) { cow.Method1(); } } int main() { Cow a; Pishi p; Cow[] c; Goone g; c = NewArray(1, Cow); g = new Goone; a = new Cow; a.Init(24); a.Method2(); p = new Pishi; p.Init(33); a = p; a.Method2(); p.Method2(); p.Method3(); g.AddCow(a); g.AddCow(p); } class Pishi extends Cow { void Method3() { Print("Pishi3"); Method2(); } void Method1() { Print("Pishi"); PrintSelf(); } } class Animal { int num1; void Init(int n) { num1 = n; } void Method1() { Print("Animal"); PrintSelf(); } void PrintSelf() { Print("num1 = ", num1, "\n"); } } class Cow extends Animal { void Method2() { Print("Cow2"); Method1(); } void Method1() { Print("Cow"); PrintSelf(); } }
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_lit16_2.java .class public dot.junit.opcodes.div_int_lit16.d.T_div_int_lit16_2 .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()I .limit regs 4 const v2, 1073741823 div-int/lit16 v0, v2, 4 return v0 .end method
D
/* The MIT License Copyright (C) 2015, 2018 Genome Research Ltd. 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 htslib.kbitset; import core.stdc.config; import core.stdc.limits; import core.stdc.stdlib; import core.stdc.string; @system: nothrow: @nogc: extern (C): /* Example of using kbitset_t, which represents a subset of {0,..., N-1}, where N is the size specified in kbs_init(). kbitset_t *bset = kbs_init(100); kbs_insert(bset, 5); kbs_insert(bset, 68); kbs_delete(bset, 37); // ... if (kbs_exists(bset, 68)) printf("68 present\n"); kbitset_iter_t itr; int i; kbs_start(&itr); while ((i = kbs_next(bset, &itr)) >= 0) printf("%d present\n", i); kbs_destroy(bset); Example of declaring a kbitset_t-using function in a header file, so that only source files that actually use process() need to include <kbitset.h>: struct kbitset_t; void process(struct kbitset_t *bset); */ enum KBS_ELTBITS = CHAR_BIT * c_ulong.sizeof; extern (D) auto KBS_ELT(T)(auto ref T i) { return i / KBS_ELTBITS; } extern (D) auto KBS_MASK(T)(auto ref T i) { return 1U << (i % KBS_ELTBITS); } struct kbitset_t { size_t n; size_t n_max; c_ulong[1] b; } pragma(inline, true): /// (For internal use only.) Returns a mask (like 00011111) showing /// which bits are in use in the last slot (for the given ni) set. c_ulong kbs_last_mask (size_t ni) { uint mask = KBS_MASK(ni) - 1; return mask? mask : ~0UL; } /// Initialise a bit set capable of holding ni integers, 0 <= i < ni. /// The set returned is empty if fill == 0, or all of [0,ni) otherwise. /// b[n] is always non-zero (a fact used by kbs_next()). kbitset_t* kbs_init2 (size_t ni, int fill) { size_t n = (ni + KBS_ELTBITS-1) / KBS_ELTBITS; kbitset_t *bs = cast(kbitset_t *) malloc(kbitset_t.sizeof + n * uint.sizeof); if (bs == null) return null; bs.n = bs.n_max = n; memset(cast(void*)bs.b, fill? ~0 : 0, n * uint.sizeof); // b[n] is always non-zero (a fact used by kbs_next()). bs.b[n] = kbs_last_mask(ni); if (fill) bs.b[n-1] &= bs.b[n]; return bs; } /// Initialise an empty bit set capable of holding ni integers, 0 <= i < ni. kbitset_t* kbs_init (size_t ni) { return kbs_init2(ni, 0); } /// Resize an existing bit set to be capable of holding ni_new integers. /// Elements in [ni_old,ni_new) are added to the set if fill != 0. /// Need to clear excess bits when fill!=0 or n_new<n; always is simpler. int kbs_resize2 (kbitset_t** bsp, size_t ni_new, int fill) { kbitset_t *bs = *bsp; size_t n = bs? bs.n : 0; size_t n_new = (ni_new + KBS_ELTBITS-1) / KBS_ELTBITS; if (bs == null || n_new > bs.n_max) { bs = cast(kbitset_t *) realloc(*bsp, kbitset_t.sizeof + n_new * uint.sizeof); if (bs == null) return -1; bs.n_max = n_new; *bsp = bs; } bs.n = n_new; if (n_new >= n) memset(&bs.b[n], fill? ~0 : 0, (n_new - n) * uint.sizeof); bs.b[n_new] = kbs_last_mask(ni_new); // Need to clear excess bits when fill!=0 or n_new<n; always is simpler. bs.b[n_new-1] &= bs.b[n_new]; return 0; } /// Resize an existing bit set to be capable of holding ni_new integers. /// Returns negative on error. int kbs_resize (kbitset_t** bsp, size_t ni_new) { return kbs_resize2(bsp, ni_new, 0); } /// Destroy a bit set. void kbs_destroy (kbitset_t* bs) { free(bs); } /// Reset the bit set to empty. void kbs_clear (kbitset_t* bs) { memset(cast(void*)bs.b, 0, bs.n * uint.sizeof); } /// Reset the bit set to all of [0,ni). void kbs_insert_all (kbitset_t* bs) { memset(cast(void*)bs.b, ~0, bs.n * uint.sizeof); bs.b[bs.n-1] &= bs.b[bs.n]; } /// Insert an element into the bit set. void kbs_insert (kbitset_t* bs, int i) { bs.b[KBS_ELT(i)] |= KBS_MASK(i); } /// Remove an element from the bit set. void kbs_delete (kbitset_t* bs, int i) { bs.b[KBS_ELT(i)] &= ~KBS_MASK(i); } /// Test whether the bit set contains the element. int kbs_exists (const(kbitset_t)* bs, int i) { return (bs.b[KBS_ELT(i)] & KBS_MASK(i)) != 0; } struct kbitset_iter_t { c_ulong mask; size_t elt; int i; } /// Initialise or reset a bit set iterator. void kbs_start (kbitset_iter_t* itr) { itr.mask = 1; itr.elt = 0; itr.i = 0; } /// Return the next element contained in the bit set, or -1 if there are no more. int kbs_next (const(kbitset_t)* bs, kbitset_iter_t* itr) { size_t b = bs.b[itr.elt]; for (;;) { if (itr.mask == 0) { while ((b = bs.b[++itr.elt]) == 0) itr.i += KBS_ELTBITS; if (itr.elt == bs.n) return -1; itr.mask = 1; } if (b & itr.mask) break; itr.i++; itr.mask <<= 1; } itr.mask <<= 1; return itr.i++; }
D
instance DIA_ADDON_PATRICK_NW_EXIT(C_INFO) { npc = strf_1123_addon_patrick_nw; nr = 999; condition = dia_addon_patrick_nw_exit_condition; information = dia_addon_patrick_nw_exit_info; permanent = TRUE; description = DIALOG_ENDE; }; func int dia_addon_patrick_nw_exit_condition() { return TRUE; }; func void dia_addon_patrick_nw_exit_info() { AI_StopProcessInfos(self); }; instance DIA_ADDON_PATRICK_NW_PICKPOCKET(C_INFO) { npc = strf_1123_addon_patrick_nw; nr = 900; condition = dia_addon_patrick_nw_pickpocket_condition; information = dia_addon_patrick_nw_pickpocket_info; permanent = TRUE; description = PICKPOCKET_40; }; func int dia_addon_patrick_nw_pickpocket_condition() { return c_beklauen(35,50); }; func void dia_addon_patrick_nw_pickpocket_info() { Info_ClearChoices(dia_addon_patrick_nw_pickpocket); Info_AddChoice(dia_addon_patrick_nw_pickpocket,DIALOG_BACK,dia_addon_patrick_nw_pickpocket_back); Info_AddChoice(dia_addon_patrick_nw_pickpocket,DIALOG_PICKPOCKET,dia_addon_patrick_nw_pickpocket_doit); }; func void dia_addon_patrick_nw_pickpocket_doit() { b_beklauen(); Info_ClearChoices(dia_addon_patrick_nw_pickpocket); }; func void dia_addon_patrick_nw_pickpocket_back() { Info_ClearChoices(dia_addon_patrick_nw_pickpocket); }; instance DIA_ADDON_PATRICK_NW_HI(C_INFO) { npc = strf_1123_addon_patrick_nw; nr = 2; condition = dia_addon_patrick_nw_hi_condition; information = dia_addon_patrick_nw_hi_info; permanent = FALSE; description = "Jak to jde?"; }; func int dia_addon_patrick_nw_hi_condition() { return TRUE; }; func void dia_addon_patrick_nw_hi_info() { AI_Output(other,self,"DIA_Addon_Patrick_NW_Hi_15_00"); //Jak to jde? AI_Output(self,other,"DIA_Addon_Patrick_NW_Hi_07_01"); //Skvěle. Mágové Vody nám pomohli dostat se bezpečně z tohoto prokletého údolí. AI_Output(other,self,"DIA_Addon_Patrick_NW_Hi_15_02"); //A co máš teď v plánu? AI_Output(self,other,"DIA_Addon_Patrick_NW_Hi_07_03"); //Opět se přidám k Leemu a jednoho dne opustíme tento ostrov ... AI_Output(other,self,"DIA_Addon_Patrick_NW_Hi_15_04"); //A pak? AI_Output(self,other,"DIA_Addon_Patrick_NW_Hi_07_05"); //Uvidíme. Jestli bude stále zuřit válka, budu bojovat se skřety. Ale to bude až potom. };
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 vtkSQLiteDatabase; 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 vtkSQLDatabase; class vtkSQLiteDatabase : vtkSQLDatabase.vtkSQLDatabase { private void* swigCPtr; public this(void* cObject, bool ownCObject) { super(vtkd_im.vtkSQLiteDatabase_Upcast(cObject), ownCObject); swigCPtr = cObject; } public static void* swigGetCPtr(vtkSQLiteDatabase 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 int IsTypeOf(string type) { auto ret = vtkd_im.vtkSQLiteDatabase_IsTypeOf((type ? std.string.toStringz(type) : null)); return ret; } public static vtkSQLiteDatabase SafeDownCast(vtkObjectBase.vtkObjectBase o) { void* cPtr = vtkd_im.vtkSQLiteDatabase_SafeDownCast(vtkObjectBase.vtkObjectBase.swigGetCPtr(o)); vtkSQLiteDatabase ret = (cPtr is null) ? null : new vtkSQLiteDatabase(cPtr, false); return ret; } public vtkSQLiteDatabase NewInstance() const { void* cPtr = vtkd_im.vtkSQLiteDatabase_NewInstance(cast(void*)swigCPtr); vtkSQLiteDatabase ret = (cPtr is null) ? null : new vtkSQLiteDatabase(cPtr, false); return ret; } alias vtkSQLDatabase.vtkSQLDatabase.NewInstance NewInstance; public static vtkSQLiteDatabase New() { void* cPtr = vtkd_im.vtkSQLiteDatabase_New(); vtkSQLiteDatabase ret = (cPtr is null) ? null : new vtkSQLiteDatabase(cPtr, false); return ret; } public override bool Open(string password) { bool ret = vtkd_im.vtkSQLiteDatabase_Open__SWIG_0(cast(void*)swigCPtr, (password ? std.string.toStringz(password) : null)) ? true : false; return ret; } public bool Open(string password, int mode) { bool ret = vtkd_im.vtkSQLiteDatabase_Open__SWIG_1(cast(void*)swigCPtr, (password ? std.string.toStringz(password) : null), mode) ? true : false; return ret; } alias vtkSQLDatabase.vtkSQLDatabase.Open Open; public string GetDatabaseFileName() { string ret = std.conv.to!string(vtkd_im.vtkSQLiteDatabase_GetDatabaseFileName(cast(void*)swigCPtr)); return ret; } public void SetDatabaseFileName(string _arg) { vtkd_im.vtkSQLiteDatabase_SetDatabaseFileName(cast(void*)swigCPtr, (_arg ? std.string.toStringz(_arg) : null)); } }
D
module android.java.java.net.ServerSocket; public import android.java.java.net.ServerSocket_d_interface; import arsd.jni : ImportExportImpl; mixin ImportExportImpl!ServerSocket; import import3 = android.java.java.nio.channels.ServerSocketChannel; import import5 = android.java.java.lang.Class; import import2 = android.java.java.net.Socket;
D
/**************************************************************************** ** ** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part 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$ ** ****************************************************************************/ #ifndef QCAMERAVIEWFINDERSETTINGSCONTROL_H #define QCAMERAVIEWFINDERSETTINGSCONTROL_H public import qt.QtMultimedia.qmediacontrol; QT_BEGIN_NAMESPACE // Required for QDoc workaround class QString; class Q_MULTIMEDIA_EXPORT QCameraViewfinderSettingsControl : public QMediaControl { mixin Q_OBJECT; public: enum ViewfinderParameter { Resolution, PixelAspectRatio, MinimumFrameRate, MaximumFrameRate, PixelFormat, UserParameter = 1000 }; ~QCameraViewfinderSettingsControl(); /+virtual+/ bool isViewfinderParameterSupported(ViewfinderParameter parameter) const = 0; /+virtual+/ QVariant viewfinderParameter(ViewfinderParameter parameter) const = 0; /+virtual+/ void setViewfinderParameter(ViewfinderParameter parameter, ref const(QVariant) value) = 0; protected: QCameraViewfinderSettingsControl(QObject *parent = 0); }; #define QCameraViewfinderSettingsControl_iid "org.qt-project.qt.cameraviewfindersettingscontrol/5.0" Q_MEDIA_DECLARE_CONTROL(QCameraViewfinderSettingsControl, QCameraViewfinderSettingsControl_iid) QT_END_NAMESPACE #endif // QCAMERAVIEWFINDERSETTINGSCONTROL_H
D
/Users/safwendebbichi/workspace/CI-Sample/Build/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/Alamofire.build/Objects-normal/x86_64/Result.o : /Users/safwendebbichi/workspace/CI-Sample/Pods/Alamofire/Source/MultipartFormData.swift /Users/safwendebbichi/workspace/CI-Sample/Pods/Alamofire/Source/Timeline.swift /Users/safwendebbichi/workspace/CI-Sample/Pods/Alamofire/Source/DispatchQueue+Alamofire.swift /Users/safwendebbichi/workspace/CI-Sample/Pods/Alamofire/Source/Alamofire.swift /Users/safwendebbichi/workspace/CI-Sample/Pods/Alamofire/Source/Response.swift /Users/safwendebbichi/workspace/CI-Sample/Pods/Alamofire/Source/TaskDelegate.swift /Users/safwendebbichi/workspace/CI-Sample/Pods/Alamofire/Source/SessionDelegate.swift /Users/safwendebbichi/workspace/CI-Sample/Pods/Alamofire/Source/ParameterEncoding.swift /Users/safwendebbichi/workspace/CI-Sample/Pods/Alamofire/Source/Validation.swift /Users/safwendebbichi/workspace/CI-Sample/Pods/Alamofire/Source/ResponseSerialization.swift /Users/safwendebbichi/workspace/CI-Sample/Pods/Alamofire/Source/SessionManager.swift /Users/safwendebbichi/workspace/CI-Sample/Pods/Alamofire/Source/NetworkReachabilityManager.swift /Users/safwendebbichi/workspace/CI-Sample/Pods/Alamofire/Source/AFError.swift /Users/safwendebbichi/workspace/CI-Sample/Pods/Alamofire/Source/Notifications.swift /Users/safwendebbichi/workspace/CI-Sample/Pods/Alamofire/Source/Result.swift /Users/safwendebbichi/workspace/CI-Sample/Pods/Alamofire/Source/Request.swift /Users/safwendebbichi/workspace/CI-Sample/Pods/Alamofire/Source/ServerTrustPolicy.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/ObjectiveC.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/CoreImage.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Combine.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/QuartzCore.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Dispatch.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Metal.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Darwin.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Foundation.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/CoreFoundation.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/CoreGraphics.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/UIKit.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/SwiftOnoneSupport.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Users/safwendebbichi/workspace/CI-Sample/Pods/Target\ Support\ Files/Alamofire/Alamofire-umbrella.h /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/usr/include/mach-o/dyld.modulemap /Users/safwendebbichi/workspace/CI-Sample/Build/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/Alamofire.build/unextended-module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/usr/include/mach-o/compact_unwind_encoding.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/System/Library/Frameworks/OpenGLES.framework/Headers/OpenGLES.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImage.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/QuartzCore.apinotes /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/apinotes/Dispatch.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/System/Library/Frameworks/UserNotifications.framework/Headers/UserNotifications.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/System/Library/Frameworks/Security.framework/Headers/Security.apinotes /Users/safwendebbichi/workspace/CI-Sample/Build/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/Alamofire.build/Objects-normal/x86_64/Result~partial.swiftmodule : /Users/safwendebbichi/workspace/CI-Sample/Pods/Alamofire/Source/MultipartFormData.swift /Users/safwendebbichi/workspace/CI-Sample/Pods/Alamofire/Source/Timeline.swift /Users/safwendebbichi/workspace/CI-Sample/Pods/Alamofire/Source/DispatchQueue+Alamofire.swift /Users/safwendebbichi/workspace/CI-Sample/Pods/Alamofire/Source/Alamofire.swift /Users/safwendebbichi/workspace/CI-Sample/Pods/Alamofire/Source/Response.swift /Users/safwendebbichi/workspace/CI-Sample/Pods/Alamofire/Source/TaskDelegate.swift /Users/safwendebbichi/workspace/CI-Sample/Pods/Alamofire/Source/SessionDelegate.swift /Users/safwendebbichi/workspace/CI-Sample/Pods/Alamofire/Source/ParameterEncoding.swift /Users/safwendebbichi/workspace/CI-Sample/Pods/Alamofire/Source/Validation.swift /Users/safwendebbichi/workspace/CI-Sample/Pods/Alamofire/Source/ResponseSerialization.swift /Users/safwendebbichi/workspace/CI-Sample/Pods/Alamofire/Source/SessionManager.swift /Users/safwendebbichi/workspace/CI-Sample/Pods/Alamofire/Source/NetworkReachabilityManager.swift /Users/safwendebbichi/workspace/CI-Sample/Pods/Alamofire/Source/AFError.swift /Users/safwendebbichi/workspace/CI-Sample/Pods/Alamofire/Source/Notifications.swift /Users/safwendebbichi/workspace/CI-Sample/Pods/Alamofire/Source/Result.swift /Users/safwendebbichi/workspace/CI-Sample/Pods/Alamofire/Source/Request.swift /Users/safwendebbichi/workspace/CI-Sample/Pods/Alamofire/Source/ServerTrustPolicy.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/ObjectiveC.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/CoreImage.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Combine.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/QuartzCore.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Dispatch.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Metal.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Darwin.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Foundation.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/CoreFoundation.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/CoreGraphics.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/UIKit.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/SwiftOnoneSupport.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Users/safwendebbichi/workspace/CI-Sample/Pods/Target\ Support\ Files/Alamofire/Alamofire-umbrella.h /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/usr/include/mach-o/dyld.modulemap /Users/safwendebbichi/workspace/CI-Sample/Build/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/Alamofire.build/unextended-module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/usr/include/mach-o/compact_unwind_encoding.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/System/Library/Frameworks/OpenGLES.framework/Headers/OpenGLES.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImage.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/QuartzCore.apinotes /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/apinotes/Dispatch.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/System/Library/Frameworks/UserNotifications.framework/Headers/UserNotifications.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/System/Library/Frameworks/Security.framework/Headers/Security.apinotes /Users/safwendebbichi/workspace/CI-Sample/Build/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/Alamofire.build/Objects-normal/x86_64/Result~partial.swiftdoc : /Users/safwendebbichi/workspace/CI-Sample/Pods/Alamofire/Source/MultipartFormData.swift /Users/safwendebbichi/workspace/CI-Sample/Pods/Alamofire/Source/Timeline.swift /Users/safwendebbichi/workspace/CI-Sample/Pods/Alamofire/Source/DispatchQueue+Alamofire.swift /Users/safwendebbichi/workspace/CI-Sample/Pods/Alamofire/Source/Alamofire.swift /Users/safwendebbichi/workspace/CI-Sample/Pods/Alamofire/Source/Response.swift /Users/safwendebbichi/workspace/CI-Sample/Pods/Alamofire/Source/TaskDelegate.swift /Users/safwendebbichi/workspace/CI-Sample/Pods/Alamofire/Source/SessionDelegate.swift /Users/safwendebbichi/workspace/CI-Sample/Pods/Alamofire/Source/ParameterEncoding.swift /Users/safwendebbichi/workspace/CI-Sample/Pods/Alamofire/Source/Validation.swift /Users/safwendebbichi/workspace/CI-Sample/Pods/Alamofire/Source/ResponseSerialization.swift /Users/safwendebbichi/workspace/CI-Sample/Pods/Alamofire/Source/SessionManager.swift /Users/safwendebbichi/workspace/CI-Sample/Pods/Alamofire/Source/NetworkReachabilityManager.swift /Users/safwendebbichi/workspace/CI-Sample/Pods/Alamofire/Source/AFError.swift /Users/safwendebbichi/workspace/CI-Sample/Pods/Alamofire/Source/Notifications.swift /Users/safwendebbichi/workspace/CI-Sample/Pods/Alamofire/Source/Result.swift /Users/safwendebbichi/workspace/CI-Sample/Pods/Alamofire/Source/Request.swift /Users/safwendebbichi/workspace/CI-Sample/Pods/Alamofire/Source/ServerTrustPolicy.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/ObjectiveC.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/CoreImage.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Combine.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/QuartzCore.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Dispatch.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Metal.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Darwin.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Foundation.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/CoreFoundation.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/CoreGraphics.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/UIKit.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/SwiftOnoneSupport.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Users/safwendebbichi/workspace/CI-Sample/Pods/Target\ Support\ Files/Alamofire/Alamofire-umbrella.h /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/usr/include/mach-o/dyld.modulemap /Users/safwendebbichi/workspace/CI-Sample/Build/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/Alamofire.build/unextended-module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/usr/include/mach-o/compact_unwind_encoding.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/System/Library/Frameworks/OpenGLES.framework/Headers/OpenGLES.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImage.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/QuartzCore.apinotes /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/apinotes/Dispatch.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/System/Library/Frameworks/UserNotifications.framework/Headers/UserNotifications.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/System/Library/Frameworks/Security.framework/Headers/Security.apinotes /Users/safwendebbichi/workspace/CI-Sample/Build/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/Alamofire.build/Objects-normal/x86_64/Result~partial.swiftsourceinfo : /Users/safwendebbichi/workspace/CI-Sample/Pods/Alamofire/Source/MultipartFormData.swift /Users/safwendebbichi/workspace/CI-Sample/Pods/Alamofire/Source/Timeline.swift /Users/safwendebbichi/workspace/CI-Sample/Pods/Alamofire/Source/DispatchQueue+Alamofire.swift /Users/safwendebbichi/workspace/CI-Sample/Pods/Alamofire/Source/Alamofire.swift /Users/safwendebbichi/workspace/CI-Sample/Pods/Alamofire/Source/Response.swift /Users/safwendebbichi/workspace/CI-Sample/Pods/Alamofire/Source/TaskDelegate.swift /Users/safwendebbichi/workspace/CI-Sample/Pods/Alamofire/Source/SessionDelegate.swift /Users/safwendebbichi/workspace/CI-Sample/Pods/Alamofire/Source/ParameterEncoding.swift /Users/safwendebbichi/workspace/CI-Sample/Pods/Alamofire/Source/Validation.swift /Users/safwendebbichi/workspace/CI-Sample/Pods/Alamofire/Source/ResponseSerialization.swift /Users/safwendebbichi/workspace/CI-Sample/Pods/Alamofire/Source/SessionManager.swift /Users/safwendebbichi/workspace/CI-Sample/Pods/Alamofire/Source/NetworkReachabilityManager.swift /Users/safwendebbichi/workspace/CI-Sample/Pods/Alamofire/Source/AFError.swift /Users/safwendebbichi/workspace/CI-Sample/Pods/Alamofire/Source/Notifications.swift /Users/safwendebbichi/workspace/CI-Sample/Pods/Alamofire/Source/Result.swift /Users/safwendebbichi/workspace/CI-Sample/Pods/Alamofire/Source/Request.swift /Users/safwendebbichi/workspace/CI-Sample/Pods/Alamofire/Source/ServerTrustPolicy.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/ObjectiveC.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/CoreImage.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Combine.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/QuartzCore.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Dispatch.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Metal.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Darwin.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Foundation.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/CoreFoundation.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/CoreGraphics.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/UIKit.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/SwiftOnoneSupport.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Users/safwendebbichi/workspace/CI-Sample/Pods/Target\ Support\ Files/Alamofire/Alamofire-umbrella.h /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/usr/include/mach-o/dyld.modulemap /Users/safwendebbichi/workspace/CI-Sample/Build/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/Alamofire.build/unextended-module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/usr/include/mach-o/compact_unwind_encoding.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/System/Library/Frameworks/OpenGLES.framework/Headers/OpenGLES.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImage.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/QuartzCore.apinotes /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/apinotes/Dispatch.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/System/Library/Frameworks/UserNotifications.framework/Headers/UserNotifications.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/System/Library/Frameworks/Security.framework/Headers/Security.apinotes
D
a seat behind the rider of a horse or motorbike etc.
D
forest bird of warm regions of the New World having brilliant lustrous plumage and long tails
D
/Users/lukenewman/Developer/Plutonium/PlayToPay/Build/Intermediates/Pods.build/Debug-iphonesimulator/SnapKit.build/Objects-normal/x86_64/LayoutConstraint.o : /Users/lukenewman/Developer/Plutonium/PlayToPay/Pods/SnapKit/Source/Constraint.swift /Users/lukenewman/Developer/Plutonium/PlayToPay/Pods/SnapKit/Source/ConstraintAttributes.swift /Users/lukenewman/Developer/Plutonium/PlayToPay/Pods/SnapKit/Source/ConstraintDescription.swift /Users/lukenewman/Developer/Plutonium/PlayToPay/Pods/SnapKit/Source/ConstraintItem.swift /Users/lukenewman/Developer/Plutonium/PlayToPay/Pods/SnapKit/Source/ConstraintMaker.swift /Users/lukenewman/Developer/Plutonium/PlayToPay/Pods/SnapKit/Source/ConstraintRelation.swift /Users/lukenewman/Developer/Plutonium/PlayToPay/Pods/SnapKit/Source/Debugging.swift /Users/lukenewman/Developer/Plutonium/PlayToPay/Pods/SnapKit/Source/EdgeInsets.swift /Users/lukenewman/Developer/Plutonium/PlayToPay/Pods/SnapKit/Source/LayoutConstraint.swift /Users/lukenewman/Developer/Plutonium/PlayToPay/Pods/SnapKit/Source/SnapKit.swift /Users/lukenewman/Developer/Plutonium/PlayToPay/Pods/SnapKit/Source/View+SnapKit.swift /Users/lukenewman/Developer/Plutonium/PlayToPay/Pods/SnapKit/Source/ViewController+SnapKit.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Swift.swiftmodule /Users/lukenewman/Developer/Plutonium/PlayToPay/Pods/Target\ Support\ Files/SnapKit/SnapKit-umbrella.h /Users/lukenewman/Developer/Plutonium/PlayToPay/Build/Intermediates/Pods.build/Debug-iphonesimulator/SnapKit.build/unextended-module.modulemap /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/UIKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/ObjectiveC.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreGraphics.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreImage.swiftmodule /Users/lukenewman/Developer/Plutonium/PlayToPay/Build/Intermediates/Pods.build/Debug-iphonesimulator/SnapKit.build/Objects-normal/x86_64/LayoutConstraint~partial.swiftmodule : /Users/lukenewman/Developer/Plutonium/PlayToPay/Pods/SnapKit/Source/Constraint.swift /Users/lukenewman/Developer/Plutonium/PlayToPay/Pods/SnapKit/Source/ConstraintAttributes.swift /Users/lukenewman/Developer/Plutonium/PlayToPay/Pods/SnapKit/Source/ConstraintDescription.swift /Users/lukenewman/Developer/Plutonium/PlayToPay/Pods/SnapKit/Source/ConstraintItem.swift /Users/lukenewman/Developer/Plutonium/PlayToPay/Pods/SnapKit/Source/ConstraintMaker.swift /Users/lukenewman/Developer/Plutonium/PlayToPay/Pods/SnapKit/Source/ConstraintRelation.swift /Users/lukenewman/Developer/Plutonium/PlayToPay/Pods/SnapKit/Source/Debugging.swift /Users/lukenewman/Developer/Plutonium/PlayToPay/Pods/SnapKit/Source/EdgeInsets.swift /Users/lukenewman/Developer/Plutonium/PlayToPay/Pods/SnapKit/Source/LayoutConstraint.swift /Users/lukenewman/Developer/Plutonium/PlayToPay/Pods/SnapKit/Source/SnapKit.swift /Users/lukenewman/Developer/Plutonium/PlayToPay/Pods/SnapKit/Source/View+SnapKit.swift /Users/lukenewman/Developer/Plutonium/PlayToPay/Pods/SnapKit/Source/ViewController+SnapKit.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Swift.swiftmodule /Users/lukenewman/Developer/Plutonium/PlayToPay/Pods/Target\ Support\ Files/SnapKit/SnapKit-umbrella.h /Users/lukenewman/Developer/Plutonium/PlayToPay/Build/Intermediates/Pods.build/Debug-iphonesimulator/SnapKit.build/unextended-module.modulemap /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/UIKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/ObjectiveC.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreGraphics.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreImage.swiftmodule /Users/lukenewman/Developer/Plutonium/PlayToPay/Build/Intermediates/Pods.build/Debug-iphonesimulator/SnapKit.build/Objects-normal/x86_64/LayoutConstraint~partial.swiftdoc : /Users/lukenewman/Developer/Plutonium/PlayToPay/Pods/SnapKit/Source/Constraint.swift /Users/lukenewman/Developer/Plutonium/PlayToPay/Pods/SnapKit/Source/ConstraintAttributes.swift /Users/lukenewman/Developer/Plutonium/PlayToPay/Pods/SnapKit/Source/ConstraintDescription.swift /Users/lukenewman/Developer/Plutonium/PlayToPay/Pods/SnapKit/Source/ConstraintItem.swift /Users/lukenewman/Developer/Plutonium/PlayToPay/Pods/SnapKit/Source/ConstraintMaker.swift /Users/lukenewman/Developer/Plutonium/PlayToPay/Pods/SnapKit/Source/ConstraintRelation.swift /Users/lukenewman/Developer/Plutonium/PlayToPay/Pods/SnapKit/Source/Debugging.swift /Users/lukenewman/Developer/Plutonium/PlayToPay/Pods/SnapKit/Source/EdgeInsets.swift /Users/lukenewman/Developer/Plutonium/PlayToPay/Pods/SnapKit/Source/LayoutConstraint.swift /Users/lukenewman/Developer/Plutonium/PlayToPay/Pods/SnapKit/Source/SnapKit.swift /Users/lukenewman/Developer/Plutonium/PlayToPay/Pods/SnapKit/Source/View+SnapKit.swift /Users/lukenewman/Developer/Plutonium/PlayToPay/Pods/SnapKit/Source/ViewController+SnapKit.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Swift.swiftmodule /Users/lukenewman/Developer/Plutonium/PlayToPay/Pods/Target\ Support\ Files/SnapKit/SnapKit-umbrella.h /Users/lukenewman/Developer/Plutonium/PlayToPay/Build/Intermediates/Pods.build/Debug-iphonesimulator/SnapKit.build/unextended-module.modulemap /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/UIKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/ObjectiveC.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreGraphics.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreImage.swiftmodule
D
/Users/radibarq/developer/Chottky/build/Pods.build/Debug-iphonesimulator/FacebookCore.build/Objects-normal/x86_64/GraphRequestConnectionDelegateBridge.o : /Users/radibarq/developer/Chottky/Pods/FacebookCore/Sources/Core/GraphRequest/GraphRequestProtocol.Bridge.swift /Users/radibarq/developer/Chottky/Pods/FacebookCore/Sources/Core/GraphRequest/GraphRequestConnectionDelegateBridge.swift /Users/radibarq/developer/Chottky/Pods/FacebookCore/Sources/Core/UserProfile/UserProfile.swift /Users/radibarq/developer/Chottky/Pods/FacebookCore/Sources/Core/AppEvents/AppEventParameterName.swift /Users/radibarq/developer/Chottky/Pods/FacebookCore/Sources/Core/AppEvents/AppEventName.swift /Users/radibarq/developer/Chottky/Pods/FacebookCore/Sources/Core/Internal/Extensions/Optional+OnSome.swift /Users/radibarq/developer/Chottky/Pods/FacebookCore/Sources/Core/GraphRequest/GraphResponse.swift /Users/radibarq/developer/Chottky/Pods/FacebookCore/Sources/Core/Common/SDKApplicationDelegate.swift /Users/radibarq/developer/Chottky/Pods/FacebookCore/Sources/Core/GraphRequest/GraphResponseProtocol.swift /Users/radibarq/developer/Chottky/Pods/FacebookCore/Sources/Core/GraphRequest/GraphRequestProtocol.swift /Users/radibarq/developer/Chottky/Pods/FacebookCore/Sources/Core/Common/AccessToken.swift /Users/radibarq/developer/Chottky/Pods/FacebookCore/Sources/Core/AppEvents/AppEvent.Builtin.swift /Users/radibarq/developer/Chottky/Pods/FacebookCore/Sources/Core/GraphRequest/GraphAPIVersion.swift /Users/radibarq/developer/Chottky/Pods/FacebookCore/Sources/Core/Permissions/Permission.swift /Users/radibarq/developer/Chottky/Pods/FacebookCore/Sources/Core/Permissions/ReadPermission.swift /Users/radibarq/developer/Chottky/Pods/FacebookCore/Sources/Core/Permissions/PublishPermission.swift /Users/radibarq/developer/Chottky/Pods/FacebookCore/Sources/Core/GraphRequest/GraphRequestConnection.swift /Users/radibarq/developer/Chottky/Pods/FacebookCore/Sources/Core/Internal/Extensions/Dictionary+KeyValueMap.swift /Users/radibarq/developer/Chottky/Pods/FacebookCore/Sources/Core/AppEvents/AppEventsLogger.swift /Users/radibarq/developer/Chottky/Pods/FacebookCore/Sources/Core/Common/SDKLoggingBehavior.swift /Users/radibarq/developer/Chottky/Pods/FacebookCore/Sources/Core/AppEvents/AppEventsLogger.FlushBehavior.swift /Users/radibarq/developer/Chottky/Pods/FacebookCore/Sources/Core/Common/SDKSettings.swift /Users/radibarq/developer/Chottky/Pods/FacebookCore/Sources/Core/UserProfile/UserProfile.FetchResult.swift /Users/radibarq/developer/Chottky/Pods/FacebookCore/Sources/Core/GraphRequest/GraphRequestResult.swift /Users/radibarq/developer/Chottky/Pods/FacebookCore/Sources/Core/GraphRequest/GraphRequestDataAttachment.swift /Users/radibarq/developer/Chottky/Pods/FacebookCore/Sources/Core/AppEvents/AppEvent.swift /Users/radibarq/developer/Chottky/Pods/FacebookCore/Sources/Core/GraphRequest/GraphRequest.swift /Users/radibarq/developer/Chottky/Pods/FacebookCore/Sources/Core/UserProfile/UserProfile.PictureView.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/radibarq/developer/Chottky/Pods/Bolts/Bolts/iOS/BFURL.h /Users/radibarq/developer/Chottky/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKURL.h /Users/radibarq/developer/Chottky/Pods/Target\ Support\ Files/FacebookCore/FacebookCore-umbrella.h /Users/radibarq/developer/Chottky/Pods/Target\ Support\ Files/Bolts/Bolts-umbrella.h /Users/radibarq/developer/Chottky/Pods/Target\ Support\ Files/FBSDKCoreKit/FBSDKCoreKit-umbrella.h /Users/radibarq/developer/Chottky/Pods/Bolts/Bolts/Common/BFGeneric.h /Users/radibarq/developer/Chottky/Pods/Bolts/Bolts/Common/BFCancellationTokenSource.h /Users/radibarq/developer/Chottky/Pods/Bolts/Bolts/Common/BFTaskCompletionSource.h /Users/radibarq/developer/Chottky/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKProfile.h /Users/radibarq/developer/Chottky/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKApplicationDelegate.h /Users/radibarq/developer/Chottky/Pods/Bolts/Bolts/iOS/BFAppLinkResolving.h /Users/radibarq/developer/Chottky/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKAppLinkResolving.h /Users/radibarq/developer/Chottky/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKCopying.h /Users/radibarq/developer/Chottky/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKMutableCopying.h /Users/radibarq/developer/Chottky/Pods/Bolts/Bolts/iOS/BFAppLink.h /Users/radibarq/developer/Chottky/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKAppLink.h /Users/radibarq/developer/Chottky/Pods/Bolts/Bolts/Common/BFTask.h /Users/radibarq/developer/Chottky/Pods/Bolts/Bolts/Common/BFCancellationToken.h /Users/radibarq/developer/Chottky/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKAccessToken.h /Users/radibarq/developer/Chottky/Pods/Bolts/Bolts/iOS/BFAppLinkNavigation.h /Users/radibarq/developer/Chottky/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKAppLinkNavigation.h /Users/radibarq/developer/Chottky/Pods/Bolts/Bolts/Common/BFCancellationTokenRegistration.h /Users/radibarq/developer/Chottky/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKGraphRequestConnection.h /Users/radibarq/developer/Chottky/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKButton.h /Users/radibarq/developer/Chottky/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKTestUsersManager.h /Users/radibarq/developer/Chottky/Pods/Bolts/Bolts/iOS/BFAppLinkReturnToRefererController.h /Users/radibarq/developer/Chottky/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKAppLinkReturnToRefererController.h /Users/radibarq/developer/Chottky/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKAppLinkResolver.h /Users/radibarq/developer/Chottky/Pods/Bolts/Bolts/iOS/BFWebViewAppLinkResolver.h /Users/radibarq/developer/Chottky/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKWebViewAppLinkResolver.h /Users/radibarq/developer/Chottky/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKGraphErrorRecoveryProcessor.h /Users/radibarq/developer/Chottky/Pods/Bolts/Bolts/Common/BFExecutor.h /Users/radibarq/developer/Chottky/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKSettings.h /Users/radibarq/developer/Chottky/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKMacros.h /Users/radibarq/developer/Chottky/Pods/Bolts/Bolts/Common/Bolts.h /Users/radibarq/developer/Chottky/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKConstants.h /Users/radibarq/developer/Chottky/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKAppEvents.h /Users/radibarq/developer/Chottky/Pods/Bolts/Bolts/iOS/BFAppLinkTarget.h /Users/radibarq/developer/Chottky/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKAppLinkTarget.h /Users/radibarq/developer/Chottky/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit.h /Users/radibarq/developer/Chottky/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKGraphRequestDataAttachment.h /Users/radibarq/developer/Chottky/Pods/Bolts/Bolts/iOS/BFMeasurementEvent.h /Users/radibarq/developer/Chottky/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKMeasurementEvent.h /Users/radibarq/developer/Chottky/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKGraphRequest.h /Users/radibarq/developer/Chottky/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKProfilePictureView.h /Users/radibarq/developer/Chottky/Pods/Bolts/Bolts/iOS/BFAppLinkReturnToRefererView.h /Users/radibarq/developer/Chottky/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKAppLinkReturnToRefererView.h /Users/radibarq/developer/Chottky/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKUtility.h /Users/radibarq/developer/Chottky/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKAppLinkUtility.h /Users/radibarq/developer/Chottky/build/Pods.build/Debug-iphonesimulator/FacebookCore.build/unextended-module.modulemap /Users/radibarq/developer/Chottky/build/Pods.build/Debug-iphonesimulator/Bolts.build/module.modulemap /Users/radibarq/developer/Chottky/build/Pods.build/Debug-iphonesimulator/FBSDKCoreKit.build/module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.0.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.0.sdk/System/Library/Frameworks/OpenGLES.framework/Headers/OpenGLES.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.0.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImage.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.0.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/QuartzCore.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.0.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.0.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.0.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.0.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.0.sdk/System/Library/Frameworks/WebKit.framework/Headers/WebKit.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.0.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.0.sdk/System/Library/Frameworks/Security.framework/Headers/Security.apinotes /Users/radibarq/developer/Chottky/build/Pods.build/Debug-iphonesimulator/FacebookCore.build/Objects-normal/x86_64/GraphRequestConnectionDelegateBridge~partial.swiftmodule : /Users/radibarq/developer/Chottky/Pods/FacebookCore/Sources/Core/GraphRequest/GraphRequestProtocol.Bridge.swift /Users/radibarq/developer/Chottky/Pods/FacebookCore/Sources/Core/GraphRequest/GraphRequestConnectionDelegateBridge.swift /Users/radibarq/developer/Chottky/Pods/FacebookCore/Sources/Core/UserProfile/UserProfile.swift /Users/radibarq/developer/Chottky/Pods/FacebookCore/Sources/Core/AppEvents/AppEventParameterName.swift /Users/radibarq/developer/Chottky/Pods/FacebookCore/Sources/Core/AppEvents/AppEventName.swift /Users/radibarq/developer/Chottky/Pods/FacebookCore/Sources/Core/Internal/Extensions/Optional+OnSome.swift /Users/radibarq/developer/Chottky/Pods/FacebookCore/Sources/Core/GraphRequest/GraphResponse.swift /Users/radibarq/developer/Chottky/Pods/FacebookCore/Sources/Core/Common/SDKApplicationDelegate.swift /Users/radibarq/developer/Chottky/Pods/FacebookCore/Sources/Core/GraphRequest/GraphResponseProtocol.swift /Users/radibarq/developer/Chottky/Pods/FacebookCore/Sources/Core/GraphRequest/GraphRequestProtocol.swift /Users/radibarq/developer/Chottky/Pods/FacebookCore/Sources/Core/Common/AccessToken.swift /Users/radibarq/developer/Chottky/Pods/FacebookCore/Sources/Core/AppEvents/AppEvent.Builtin.swift /Users/radibarq/developer/Chottky/Pods/FacebookCore/Sources/Core/GraphRequest/GraphAPIVersion.swift /Users/radibarq/developer/Chottky/Pods/FacebookCore/Sources/Core/Permissions/Permission.swift /Users/radibarq/developer/Chottky/Pods/FacebookCore/Sources/Core/Permissions/ReadPermission.swift /Users/radibarq/developer/Chottky/Pods/FacebookCore/Sources/Core/Permissions/PublishPermission.swift /Users/radibarq/developer/Chottky/Pods/FacebookCore/Sources/Core/GraphRequest/GraphRequestConnection.swift /Users/radibarq/developer/Chottky/Pods/FacebookCore/Sources/Core/Internal/Extensions/Dictionary+KeyValueMap.swift /Users/radibarq/developer/Chottky/Pods/FacebookCore/Sources/Core/AppEvents/AppEventsLogger.swift /Users/radibarq/developer/Chottky/Pods/FacebookCore/Sources/Core/Common/SDKLoggingBehavior.swift /Users/radibarq/developer/Chottky/Pods/FacebookCore/Sources/Core/AppEvents/AppEventsLogger.FlushBehavior.swift /Users/radibarq/developer/Chottky/Pods/FacebookCore/Sources/Core/Common/SDKSettings.swift /Users/radibarq/developer/Chottky/Pods/FacebookCore/Sources/Core/UserProfile/UserProfile.FetchResult.swift /Users/radibarq/developer/Chottky/Pods/FacebookCore/Sources/Core/GraphRequest/GraphRequestResult.swift /Users/radibarq/developer/Chottky/Pods/FacebookCore/Sources/Core/GraphRequest/GraphRequestDataAttachment.swift /Users/radibarq/developer/Chottky/Pods/FacebookCore/Sources/Core/AppEvents/AppEvent.swift /Users/radibarq/developer/Chottky/Pods/FacebookCore/Sources/Core/GraphRequest/GraphRequest.swift /Users/radibarq/developer/Chottky/Pods/FacebookCore/Sources/Core/UserProfile/UserProfile.PictureView.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/radibarq/developer/Chottky/Pods/Bolts/Bolts/iOS/BFURL.h /Users/radibarq/developer/Chottky/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKURL.h /Users/radibarq/developer/Chottky/Pods/Target\ Support\ Files/FacebookCore/FacebookCore-umbrella.h /Users/radibarq/developer/Chottky/Pods/Target\ Support\ Files/Bolts/Bolts-umbrella.h /Users/radibarq/developer/Chottky/Pods/Target\ Support\ Files/FBSDKCoreKit/FBSDKCoreKit-umbrella.h /Users/radibarq/developer/Chottky/Pods/Bolts/Bolts/Common/BFGeneric.h /Users/radibarq/developer/Chottky/Pods/Bolts/Bolts/Common/BFCancellationTokenSource.h /Users/radibarq/developer/Chottky/Pods/Bolts/Bolts/Common/BFTaskCompletionSource.h /Users/radibarq/developer/Chottky/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKProfile.h /Users/radibarq/developer/Chottky/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKApplicationDelegate.h /Users/radibarq/developer/Chottky/Pods/Bolts/Bolts/iOS/BFAppLinkResolving.h /Users/radibarq/developer/Chottky/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKAppLinkResolving.h /Users/radibarq/developer/Chottky/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKCopying.h /Users/radibarq/developer/Chottky/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKMutableCopying.h /Users/radibarq/developer/Chottky/Pods/Bolts/Bolts/iOS/BFAppLink.h /Users/radibarq/developer/Chottky/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKAppLink.h /Users/radibarq/developer/Chottky/Pods/Bolts/Bolts/Common/BFTask.h /Users/radibarq/developer/Chottky/Pods/Bolts/Bolts/Common/BFCancellationToken.h /Users/radibarq/developer/Chottky/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKAccessToken.h /Users/radibarq/developer/Chottky/Pods/Bolts/Bolts/iOS/BFAppLinkNavigation.h /Users/radibarq/developer/Chottky/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKAppLinkNavigation.h /Users/radibarq/developer/Chottky/Pods/Bolts/Bolts/Common/BFCancellationTokenRegistration.h /Users/radibarq/developer/Chottky/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKGraphRequestConnection.h /Users/radibarq/developer/Chottky/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKButton.h /Users/radibarq/developer/Chottky/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKTestUsersManager.h /Users/radibarq/developer/Chottky/Pods/Bolts/Bolts/iOS/BFAppLinkReturnToRefererController.h /Users/radibarq/developer/Chottky/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKAppLinkReturnToRefererController.h /Users/radibarq/developer/Chottky/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKAppLinkResolver.h /Users/radibarq/developer/Chottky/Pods/Bolts/Bolts/iOS/BFWebViewAppLinkResolver.h /Users/radibarq/developer/Chottky/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKWebViewAppLinkResolver.h /Users/radibarq/developer/Chottky/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKGraphErrorRecoveryProcessor.h /Users/radibarq/developer/Chottky/Pods/Bolts/Bolts/Common/BFExecutor.h /Users/radibarq/developer/Chottky/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKSettings.h /Users/radibarq/developer/Chottky/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKMacros.h /Users/radibarq/developer/Chottky/Pods/Bolts/Bolts/Common/Bolts.h /Users/radibarq/developer/Chottky/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKConstants.h /Users/radibarq/developer/Chottky/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKAppEvents.h /Users/radibarq/developer/Chottky/Pods/Bolts/Bolts/iOS/BFAppLinkTarget.h /Users/radibarq/developer/Chottky/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKAppLinkTarget.h /Users/radibarq/developer/Chottky/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit.h /Users/radibarq/developer/Chottky/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKGraphRequestDataAttachment.h /Users/radibarq/developer/Chottky/Pods/Bolts/Bolts/iOS/BFMeasurementEvent.h /Users/radibarq/developer/Chottky/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKMeasurementEvent.h /Users/radibarq/developer/Chottky/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKGraphRequest.h /Users/radibarq/developer/Chottky/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKProfilePictureView.h /Users/radibarq/developer/Chottky/Pods/Bolts/Bolts/iOS/BFAppLinkReturnToRefererView.h /Users/radibarq/developer/Chottky/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKAppLinkReturnToRefererView.h /Users/radibarq/developer/Chottky/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKUtility.h /Users/radibarq/developer/Chottky/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKAppLinkUtility.h /Users/radibarq/developer/Chottky/build/Pods.build/Debug-iphonesimulator/FacebookCore.build/unextended-module.modulemap /Users/radibarq/developer/Chottky/build/Pods.build/Debug-iphonesimulator/Bolts.build/module.modulemap /Users/radibarq/developer/Chottky/build/Pods.build/Debug-iphonesimulator/FBSDKCoreKit.build/module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.0.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.0.sdk/System/Library/Frameworks/OpenGLES.framework/Headers/OpenGLES.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.0.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImage.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.0.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/QuartzCore.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.0.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.0.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.0.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.0.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.0.sdk/System/Library/Frameworks/WebKit.framework/Headers/WebKit.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.0.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.0.sdk/System/Library/Frameworks/Security.framework/Headers/Security.apinotes /Users/radibarq/developer/Chottky/build/Pods.build/Debug-iphonesimulator/FacebookCore.build/Objects-normal/x86_64/GraphRequestConnectionDelegateBridge~partial.swiftdoc : /Users/radibarq/developer/Chottky/Pods/FacebookCore/Sources/Core/GraphRequest/GraphRequestProtocol.Bridge.swift /Users/radibarq/developer/Chottky/Pods/FacebookCore/Sources/Core/GraphRequest/GraphRequestConnectionDelegateBridge.swift /Users/radibarq/developer/Chottky/Pods/FacebookCore/Sources/Core/UserProfile/UserProfile.swift /Users/radibarq/developer/Chottky/Pods/FacebookCore/Sources/Core/AppEvents/AppEventParameterName.swift /Users/radibarq/developer/Chottky/Pods/FacebookCore/Sources/Core/AppEvents/AppEventName.swift /Users/radibarq/developer/Chottky/Pods/FacebookCore/Sources/Core/Internal/Extensions/Optional+OnSome.swift /Users/radibarq/developer/Chottky/Pods/FacebookCore/Sources/Core/GraphRequest/GraphResponse.swift /Users/radibarq/developer/Chottky/Pods/FacebookCore/Sources/Core/Common/SDKApplicationDelegate.swift /Users/radibarq/developer/Chottky/Pods/FacebookCore/Sources/Core/GraphRequest/GraphResponseProtocol.swift /Users/radibarq/developer/Chottky/Pods/FacebookCore/Sources/Core/GraphRequest/GraphRequestProtocol.swift /Users/radibarq/developer/Chottky/Pods/FacebookCore/Sources/Core/Common/AccessToken.swift /Users/radibarq/developer/Chottky/Pods/FacebookCore/Sources/Core/AppEvents/AppEvent.Builtin.swift /Users/radibarq/developer/Chottky/Pods/FacebookCore/Sources/Core/GraphRequest/GraphAPIVersion.swift /Users/radibarq/developer/Chottky/Pods/FacebookCore/Sources/Core/Permissions/Permission.swift /Users/radibarq/developer/Chottky/Pods/FacebookCore/Sources/Core/Permissions/ReadPermission.swift /Users/radibarq/developer/Chottky/Pods/FacebookCore/Sources/Core/Permissions/PublishPermission.swift /Users/radibarq/developer/Chottky/Pods/FacebookCore/Sources/Core/GraphRequest/GraphRequestConnection.swift /Users/radibarq/developer/Chottky/Pods/FacebookCore/Sources/Core/Internal/Extensions/Dictionary+KeyValueMap.swift /Users/radibarq/developer/Chottky/Pods/FacebookCore/Sources/Core/AppEvents/AppEventsLogger.swift /Users/radibarq/developer/Chottky/Pods/FacebookCore/Sources/Core/Common/SDKLoggingBehavior.swift /Users/radibarq/developer/Chottky/Pods/FacebookCore/Sources/Core/AppEvents/AppEventsLogger.FlushBehavior.swift /Users/radibarq/developer/Chottky/Pods/FacebookCore/Sources/Core/Common/SDKSettings.swift /Users/radibarq/developer/Chottky/Pods/FacebookCore/Sources/Core/UserProfile/UserProfile.FetchResult.swift /Users/radibarq/developer/Chottky/Pods/FacebookCore/Sources/Core/GraphRequest/GraphRequestResult.swift /Users/radibarq/developer/Chottky/Pods/FacebookCore/Sources/Core/GraphRequest/GraphRequestDataAttachment.swift /Users/radibarq/developer/Chottky/Pods/FacebookCore/Sources/Core/AppEvents/AppEvent.swift /Users/radibarq/developer/Chottky/Pods/FacebookCore/Sources/Core/GraphRequest/GraphRequest.swift /Users/radibarq/developer/Chottky/Pods/FacebookCore/Sources/Core/UserProfile/UserProfile.PictureView.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/radibarq/developer/Chottky/Pods/Bolts/Bolts/iOS/BFURL.h /Users/radibarq/developer/Chottky/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKURL.h /Users/radibarq/developer/Chottky/Pods/Target\ Support\ Files/FacebookCore/FacebookCore-umbrella.h /Users/radibarq/developer/Chottky/Pods/Target\ Support\ Files/Bolts/Bolts-umbrella.h /Users/radibarq/developer/Chottky/Pods/Target\ Support\ Files/FBSDKCoreKit/FBSDKCoreKit-umbrella.h /Users/radibarq/developer/Chottky/Pods/Bolts/Bolts/Common/BFGeneric.h /Users/radibarq/developer/Chottky/Pods/Bolts/Bolts/Common/BFCancellationTokenSource.h /Users/radibarq/developer/Chottky/Pods/Bolts/Bolts/Common/BFTaskCompletionSource.h /Users/radibarq/developer/Chottky/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKProfile.h /Users/radibarq/developer/Chottky/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKApplicationDelegate.h /Users/radibarq/developer/Chottky/Pods/Bolts/Bolts/iOS/BFAppLinkResolving.h /Users/radibarq/developer/Chottky/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKAppLinkResolving.h /Users/radibarq/developer/Chottky/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKCopying.h /Users/radibarq/developer/Chottky/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKMutableCopying.h /Users/radibarq/developer/Chottky/Pods/Bolts/Bolts/iOS/BFAppLink.h /Users/radibarq/developer/Chottky/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKAppLink.h /Users/radibarq/developer/Chottky/Pods/Bolts/Bolts/Common/BFTask.h /Users/radibarq/developer/Chottky/Pods/Bolts/Bolts/Common/BFCancellationToken.h /Users/radibarq/developer/Chottky/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKAccessToken.h /Users/radibarq/developer/Chottky/Pods/Bolts/Bolts/iOS/BFAppLinkNavigation.h /Users/radibarq/developer/Chottky/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKAppLinkNavigation.h /Users/radibarq/developer/Chottky/Pods/Bolts/Bolts/Common/BFCancellationTokenRegistration.h /Users/radibarq/developer/Chottky/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKGraphRequestConnection.h /Users/radibarq/developer/Chottky/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKButton.h /Users/radibarq/developer/Chottky/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKTestUsersManager.h /Users/radibarq/developer/Chottky/Pods/Bolts/Bolts/iOS/BFAppLinkReturnToRefererController.h /Users/radibarq/developer/Chottky/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKAppLinkReturnToRefererController.h /Users/radibarq/developer/Chottky/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKAppLinkResolver.h /Users/radibarq/developer/Chottky/Pods/Bolts/Bolts/iOS/BFWebViewAppLinkResolver.h /Users/radibarq/developer/Chottky/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKWebViewAppLinkResolver.h /Users/radibarq/developer/Chottky/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKGraphErrorRecoveryProcessor.h /Users/radibarq/developer/Chottky/Pods/Bolts/Bolts/Common/BFExecutor.h /Users/radibarq/developer/Chottky/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKSettings.h /Users/radibarq/developer/Chottky/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKMacros.h /Users/radibarq/developer/Chottky/Pods/Bolts/Bolts/Common/Bolts.h /Users/radibarq/developer/Chottky/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKConstants.h /Users/radibarq/developer/Chottky/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKAppEvents.h /Users/radibarq/developer/Chottky/Pods/Bolts/Bolts/iOS/BFAppLinkTarget.h /Users/radibarq/developer/Chottky/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKAppLinkTarget.h /Users/radibarq/developer/Chottky/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit.h /Users/radibarq/developer/Chottky/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKGraphRequestDataAttachment.h /Users/radibarq/developer/Chottky/Pods/Bolts/Bolts/iOS/BFMeasurementEvent.h /Users/radibarq/developer/Chottky/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKMeasurementEvent.h /Users/radibarq/developer/Chottky/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKGraphRequest.h /Users/radibarq/developer/Chottky/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKProfilePictureView.h /Users/radibarq/developer/Chottky/Pods/Bolts/Bolts/iOS/BFAppLinkReturnToRefererView.h /Users/radibarq/developer/Chottky/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKAppLinkReturnToRefererView.h /Users/radibarq/developer/Chottky/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKUtility.h /Users/radibarq/developer/Chottky/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKAppLinkUtility.h /Users/radibarq/developer/Chottky/build/Pods.build/Debug-iphonesimulator/FacebookCore.build/unextended-module.modulemap /Users/radibarq/developer/Chottky/build/Pods.build/Debug-iphonesimulator/Bolts.build/module.modulemap /Users/radibarq/developer/Chottky/build/Pods.build/Debug-iphonesimulator/FBSDKCoreKit.build/module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.0.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.0.sdk/System/Library/Frameworks/OpenGLES.framework/Headers/OpenGLES.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.0.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImage.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.0.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/QuartzCore.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.0.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.0.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.0.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.0.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.0.sdk/System/Library/Frameworks/WebKit.framework/Headers/WebKit.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.0.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.0.sdk/System/Library/Frameworks/Security.framework/Headers/Security.apinotes
D
module android.java.android.graphics.BitmapFactory_Options; public import android.java.android.graphics.BitmapFactory_Options_d_interface; import arsd.jni : ImportExportImpl; mixin ImportExportImpl!BitmapFactory_Options; import import0 = android.java.java.lang.Class;
D
module tests.broker; import unit_threaded; import mqttd.broker; import mqttd.message; import std.algorithm; import std.typecons; struct TestMqttSubscriber { alias Payload = ubyte[]; static int sIndex; void send(in ubyte[] bytes) { if(!index) index = ++sIndex; import std.stdio; writelnUt("New message: ", bytes, ", index: ", index); messages ~= bytes; } const(Payload)[] messages; int index; static assert(isMqttSubscriber!TestMqttSubscriber); } @(Yes.useCache, No.useCache) void testSubscribe(Flag!"useCache" useCache) { auto broker = MqttBroker!TestMqttSubscriber(useCache); auto subscriber = TestMqttSubscriber(); broker.publish("topics/foo", [2, 4, 6]); shouldEqual(subscriber.messages, []); broker.subscribe(subscriber, ["topics/foo"]); broker.publish("topics/foo", [2, 4, 6]); broker.publish("topics/bar", [1, 3, 5, 7]); shouldEqual(subscriber.messages, [[2, 4, 6]]); broker.subscribe(subscriber, ["topics/bar"]); broker.publish("topics/foo", [2, 4, 6]); broker.publish("topics/bar", [1, 3, 5, 7]); shouldEqual(subscriber.messages, [[2, 4, 6], [2, 4, 6], [1, 3, 5, 7]]); } @(Yes.useCache, No.useCache) void testUnsubscribeAll(Flag!"useCache" useCache) { auto broker = MqttBroker!TestMqttSubscriber(useCache); auto subscriber = TestMqttSubscriber(); broker.subscribe(subscriber, ["topics/foo"]); broker.publish("topics/foo", [2, 4, 6]); broker.publish("topics/bar", [1, 3, 5, 7]); shouldEqual(subscriber.messages, [[2, 4, 6]]); broker.unsubscribe(subscriber); broker.publish("topics/foo", [2, 4, 6]); broker.publish("topics/bar", [1, 3, 5, 7]); shouldEqual(subscriber.messages, [[2, 4, 6]]); //shouldn't have changed } @(Yes.useCache, No.useCache) void testUnsubscribeOne(Flag!"useCache" useCache) { auto broker = MqttBroker!TestMqttSubscriber(useCache); auto subscriber = TestMqttSubscriber(); broker.subscribe(subscriber, ["topics/foo", "topics/bar"]); broker.publish("topics/foo", [2, 4, 6]); broker.publish("topics/bar", [1, 3, 5, 7]); broker.publish("topics/baz", [9, 8, 7, 6, 5]); shouldEqual(subscriber.messages, [[2, 4, 6], [1, 3, 5, 7]]); broker.unsubscribe(subscriber, ["topics/foo"]); broker.publish("topics/foo", [2, 4, 6]); broker.publish("topics/bar", [1, 3, 5, 7]); broker.publish("topics/baz", [9, 8, 7, 6, 5]); shouldEqual(subscriber.messages, [[2, 4, 6], [1, 3, 5, 7], [1, 3, 5, 7]]); } private void checkMatches(in string pubTopic, in string subTopic, bool matches) { foreach(useCache; [Yes.useCache, No.useCache]) { auto broker = MqttBroker!TestMqttSubscriber(useCache); auto subscriber = TestMqttSubscriber(); broker.subscribe(subscriber, [subTopic]); broker.publish(pubTopic, [1, 2, 3, 4]); const expected = matches ? [[1, 2, 3, 4]] : []; writelnUt("checkMatches, subTopic is ", subTopic, " pubTopic is ", pubTopic, ", matches is ", matches); shouldEqual(subscriber.messages, expected); } } void testWildCards() { checkMatches("foo/bar/baz", "foo/bar/baz", true); checkMatches("foo/bar", "foo/+", true); checkMatches("foo/baz", "foo/+", true); checkMatches("foo/bar/baz", "foo/+", false); checkMatches("foo/bar", "foo/#", true); checkMatches("foo/bar/baz", "foo/#", true); checkMatches("foo/bar/baz/boo", "foo/#", true); checkMatches("foo/bla/bar/baz/boo/bogadog", "foo/+/bar/baz/#", true); checkMatches("finance", "finance/#", true); checkMatches("finance", "finance#", false); checkMatches("finance", "#", true); checkMatches("finance/stock", "#", true); checkMatches("finance/stock", "finance/stock/ibm", false); checkMatches("topics/foo/bar", "topics/foo/#", true); checkMatches("topics/bar/baz/boo", "topics/foo/#", false); } @(Yes.useCache, No.useCache) void testSubscribeWithWildCards(Flag!"useCache" useCache) { auto broker = MqttBroker!TestMqttSubscriber(useCache); auto subscriber1 = TestMqttSubscriber(); broker.subscribe(subscriber1, ["topics/foo/+"]); broker.publish("topics/foo/bar", [3]); broker.publish("topics/bar/baz/boo", [4]); //shouldn't get this one shouldEqual(subscriber1.messages, [[3]]); auto subscriber2 = TestMqttSubscriber(); broker.subscribe(subscriber2, ["topics/foo/#"]); broker.publish("topics/foo/bar", [3]); broker.publish("topics/bar/baz/boo", [4]); shouldEqual(subscriber1.messages, [[3], [3]]); shouldEqual(subscriber2.messages, [[3]]); auto subscriber3 = TestMqttSubscriber(); broker.subscribe(subscriber3, ["topics/+/bar"]); auto subscriber4 = TestMqttSubscriber(); broker.subscribe(subscriber4, ["topics/#"]); broker.publish("topics/foo/bar", [3]); broker.publish("topics/bar/baz/boo", [4]); broker.publish("topics/boo/bar/zoo", [5]); broker.publish("topics/foo/bar/zoo", [6]); broker.publish("topics/bbobobobo/bar", [7]); shouldEqual(subscriber1.messages, [[3], [3], [3]]); shouldEqual(subscriber2.messages, [[3], [3], [6]]); shouldEqual(subscriber3.messages, [[3], [7]]); shouldEqual(subscriber4.messages, [[3], [4], [5], [6], [7]]); } @(Yes.useCache, No.useCache) void testPlus(Flag!"useCache" useCache) { auto broker = MqttBroker!TestMqttSubscriber(useCache); auto subscriber = TestMqttSubscriber(); broker.publish("foo/bar/baz", [1, 2, 3, 4]); subscriber.messages.shouldBeEmpty; broker.subscribe(subscriber, [MqttSubscribe.Topic("foo/bar/+", 0)]); broker.publish("foo/bar/baz", [1, 2, 3, 4]); broker.publish("foo/boogagoo", [9, 8, 7]); subscriber.messages.shouldEqual([[1, 2, 3, 4]]); }
D
/****************************************************************************** Provides global test client instance used from test case to access the node. Copyright: Copyright (c) 2015-2017 dunnhumby Germany GmbH. All rights reserved. License: Boost Software License Version 1.0. See LICENSE.txt for details. ******************************************************************************/ module dlstest.DlsClient; /****************************************************************************** Imports ******************************************************************************/ import ocean.meta.types.Qualifiers; import ocean.core.Verify; import ocean.core.VersionCheck; import ocean.util.log.Logger; /****************************************************************************** Class that encapsulates fiber/epoll reference and provides functions to emulate blocking API for swarm DLS client. ******************************************************************************/ class DlsClient { import dlstest.util.Record; import ocean.core.Enforce; import ocean.core.Array : copy; import ocean.task.Task; import ocean.task.Scheduler; import ocean.task.util.Event; import swarm.util.Hash; static import dlsproto.client.DlsClient; import swarm.neo.authentication.HmacDef: Key; import core.stdc.time; /*************************************************************************** Protocol Type to use. ***************************************************************************/ public enum ProtocolType { Legacy, Neo } /*************************************************************************** Helper class to perform a request and suspend the current task until the request is finished. ***************************************************************************/ private final class TaskBlockingRequest { import ocean.io.select.protocol.generic.ErrnoIOException : IOError; import swarm.Const : NodeItem; /// Task event to suspend/resume the task while a request is handled. private TaskEvent task_event; /// Counter of the number of request-on-conns which are not finished. private uint pending; /// Flag per request-on-conn, set to true if it is queued. Used to /// ensure that pending is not incremented twice. private bool[NodeItem] queued; /// Set if an error occurs in any request-on-conn. private bool error; /// Stores the last error message. private mstring error_msg; /*********************************************************************** Should be called after assigning a request. Suspends the task until the request finishes and then checks for errors. Throws: if an error occurred while handling the request ***********************************************************************/ public void wait ( ) { this.task_event.wait(); enforce(!this.error, idup(this.error_msg)); } /*********************************************************************** DLS request notifier to pass to the request being assigned. Params: info = notification info ***********************************************************************/ public void notify ( RawClient.RequestNotification info ) { switch ( info.type ) { case info.type.Queued: this.queued[info.nodeitem] = true; this.pending++; break; case info.type.Started: if ( !(info.nodeitem in this.queued) ) this.pending++; break; case info.type.Finished: if ( !info.succeeded ) { info.message(this.error_msg); if ( cast(IOError) info.exception ) this.outer.log.warn("Socket I/O failure : {}", this.error_msg); else this.error = true; } if ( --this.pending == 0 ) this.task_event.trigger(); break; default: } } } /**************************************************************************** Reference to common fakedls logger instance ****************************************************************************/ private Logger log; /************************************************************************** Convenience aliases. **************************************************************************/ alias RawClient.Neo.Filter Filter; /************************************************************************** Alias for type of the standard DLS client. **************************************************************************/ alias dlsproto.client.DlsClient.DlsClient RawClient; /*************************************************************************** Shared DLS client instance. ***************************************************************************/ private RawClient raw_client; /************************************************************************* Neo protocol support. *************************************************************************/ private class Neo { /********************************************************************** Flag which is set (by connect()) when a connection error occurs. **********************************************************************/ private bool connection_error; /*********************************************************************** Task event to suspend/resume the task that handles the connection. ***********************************************************************/ private TaskEvent task_event; /*********************************************************************** Waits until either neo connections to all nodes have been established (including authentication) or one connection has failed. ***********************************************************************/ public void connect ( ) { scope stats = this.outer.raw_client.neo.new Stats; this.connection_error = false; while ( stats.num_connected_nodes < stats.num_registered_nodes && !this.connection_error ) { this.task_event.wait(); } enforce(!this.connection_error, "neo connection error"); } /*********************************************************************** Connection notifier used by the client (see the outer class' ctor). Params: info = notification info containing the connection attempt status ***********************************************************************/ private void connectionNotifier ( RawClient.Neo.ConnNotification info) { with (info.Active) switch (info.active) { case connected: log.trace("Neo connection established (on {}:{})", info.connected.node_addr.address_bytes, info.connected.node_addr.port); this.task_event.trigger(); break; case error_while_connecting: with (info.error_while_connecting) { this.connection_error = true; log.error("Neo connection error: {} (on {}:{})", e.message, node_addr.address_bytes, node_addr.port); } break; default: assert(false); } } /*********************************************************************** Performs a neo Put request, suspending the fiber until it is done. Params: channels = channels to put the record to timestamp = timestamp of the record to put data = record value to put Throws: upon failure ***********************************************************************/ public void put ( cstring channel, time_t timestamp, cstring data ) { auto res = this.outer.raw_client.blocking.put(channel, timestamp, data); enforce(res.succeeded, "Neo Put request failed on all nodes"); } /******************************************************************* Performs a neo GetRange request, suspending the fiber until it is done. Params: channel = channel to put the record to low = lower boundary of records to get high = higher boundary of records to get regex = filter string to filter the records on filter_mode = mode of the filtering Returns: record set received from the node(s). *******************************************************************/ public cstring[][time_t] getRange ( cstring channel, time_t low, time_t high, cstring filter_string = null, Filter.FilterMode filter_mode = Filter.FilterMode.None ) { auto task = Task.getThis(); verify (task !is null); void[] record_buf; cstring[][time_t] records; bool error = false; bool req_finished; auto res = this.outer.raw_client.blocking.getRange(channel, record_buf, low, high, Filter(filter_mode, filter_string)); foreach (key, value; res) { records[key] ~= cast(char[])(value.dup); } // Neo returns time_t as a record keys, but our test suite // requires hash_t (as that's what the legacy requests were // returning). return records; } /*********************************************************************** Convenience getter for the neo object of the swarm client owned by the outer class. ***********************************************************************/ private RawClient.Neo neo_client ( ) { return this.outer.raw_client.neo; } } /************************************************************************** Wrapper object containing all neo requests. **************************************************************************/ public Neo neo; /************************************************************************** Creates DLS client using the task scheduler's epoll instance. **************************************************************************/ public this ( ) { this.log = Log.lookup("dlstest"); static immutable max_connections = 2; this.neo = new Neo; auto auth_name = "test"; auto auth_key = Key.init; this.raw_client = new RawClient(theScheduler.epoll, auth_name, auth_key.content, &this.neo.connectionNotifier, max_connections); } /************************************************************************** Adds the address/port to listen to on both old and neo client. Params: port = standard port number to listen to. Neo port defaults to one higher. **************************************************************************/ public void addNode (ushort port) { this.raw_client.addNode("127.0.0.1".dup, port); ushort neo_port = port; neo_port++; this.neo.neo_client.addNode("127.0.0.1", neo_port); } /************************************************************************** Connects the Dls client with the nodes, on both legacy and neo port. **************************************************************************/ public void connect ( ProtocolType protocol_type ) { TaskEvent task_event; if (protocol_type & ProtocolType.Legacy) { bool handshake_ok = false; void handshake_cb (RawClient.RequestContext, bool ok) { handshake_ok = ok; task_event.trigger(); } this.raw_client.nodeHandshake(&handshake_cb, null); task_event.wait(); enforce(handshake_ok, "Test DLS handshake failed"); } if (protocol_type & ProtocolType.Neo) { this.neo.connect(); } } /************************************************************************** Adds a (key, data) pair to the specified DLS channel. Params: channel = name of DLS channel to which data should be added key = key with which to associate data data = data to be added to DLS Throws: upon empty record or request error (Exception.msg set to indicate error **************************************************************************/ public void put ( cstring channel, hash_t key, cstring data ) { scope tbr = new TaskBlockingRequest; cstring put ( RawClient.RequestContext context ) { return data; } this.raw_client.assign( this.raw_client.put(channel, key, &put, &tbr.notify) ); tbr.wait(); } /*************************************************************************** Removes the specified channel. Params: channel = name of dht channel to remove Throws: upon request error (Exception.msg set to indicate error) ***************************************************************************/ public void removeChannel ( cstring channel ) { scope tbr = new TaskBlockingRequest; this.raw_client.assign( this.raw_client.removeChannel(channel, &tbr.notify) ); tbr.wait(); } /*************************************************************************** Gets all items from the specified channel. Params: channel = name of dls channel from which items should be fetched filter = filter string for filtering the data pcre = PCRE expression string for filtering the data Returns: the set of records fetched Throws: upon request error (Exception.msg set to indicate error) ***************************************************************************/ public cstring[][hash_t] getAll ( cstring channel, cstring filter = null, cstring pcre = null ) { scope tbr = new TaskBlockingRequest; cstring[][hash_t] result; bool hash_error; void output ( RawClient.RequestContext context, in cstring key, in cstring value ) { if (!isHash(key)) { hash_error = true; return; } result[straightToHash(key)] ~= value.dup; } auto params = this.raw_client.getAll(channel, &output, &tbr.notify); if (filter.length > 0) { params.filter(filter); } if (pcre.length > 0) { params.pcre(pcre); } this.raw_client.assign(params); tbr.wait(); enforce(!hash_error, "Bad record hash received"); return result; } /*************************************************************************** Indicates if the verifyGetRange should filter, and if so, should it filter using string matching or PCRE. ***************************************************************************/ public enum FilterType { None, StringFilter, PCRE } /*************************************************************************** Gets range of items from the specified channel. Params: channel = name of dls channel from which items should be fetched start = start of the hash range to fetch end = end of the hash range to fetch filter_type = indicator should GetRange perform filter, and if so, what type filter = filter string for filtering the data Returns: the set of records fetched Throws: upon request error (Exception.msg set to indicate error) ***************************************************************************/ public cstring[][hash_t] getRange ( cstring channel, hash_t start, hash_t end, FilterType filter_type = FilterType.None, cstring filter = null) { scope tbr = new TaskBlockingRequest(); cstring[][hash_t] result; bool hash_error; void output ( RawClient.RequestContext context, in cstring key, in cstring value ) { if (!isHash(key)) { hash_error = true; return; } result[straightToHash(key)] ~= value.dup; } auto params = this.raw_client.getRange(channel, start, end, &output, &tbr.notify); if (filter_type == FilterType.StringFilter) { params.filter(filter); } if (filter_type == FilterType.PCRE) { params.pcre(filter); } this.raw_client.assign( params ); tbr.wait(); enforce(!hash_error, "Bad record hash received"); return result; } }
D
module dlangbot.scaleway_api; import std.algorithm; import std.array : array, empty, front; import std.datetime.systime; import std.string : format; import vibe.core.log : logError, logInfo; import vibe.data.json : byName, Name = name, deserializeJson, serializeToJson, Json; import vibe.http.common : enforceHTTP, HTTPMethod, HTTPStatus; import vibe.stream.operations : readAllUTF8; import dlangbot.utils : request; shared string scalewayAPIURL = "https://cp-par1.scaleway.com"; shared string scalewayAuth, scalewayOrg; //============================================================================== // Scaleway (Bare Metal) servers //============================================================================== struct Server { string id, name; enum State { starting, running, stopped } @byName State state; SysTime creation_date; enum Action { poweron, poweroff, terminate } void action(Action action) { import std.conv : to; scwPOST("/servers/%s/action".format(id), ["action": action.to!string]).dropBody; } void decommission() { logInfo("decommission scaleway server %s", name); action(Action.terminate); } @property bool healthy() const { import std.range : only; with (State) return only(starting, running).canFind(state); } } struct Image { string id, name, organization; @Name("creation_date") SysTime creationDate; } Server[] servers() { return scwGET("/servers") .readJson["servers"] .deserializeJson!(typeof(return)); } Server createServer(string name, string serverType, Image image) { logInfo("provision scaleway %s server %s with image %s", serverType, name, image.name); auto payload = serializeToJson([ "organization": scalewayOrg, "name": name, "image": image.id, "commercial_type": serverType]); payload["enable_ipv6"] = true; return scwPOST("/servers", payload) .readJson["server"] .deserializeJson!Server; } Image[] images() { return scwGET("/images") .readJson["images"] .deserializeJson!(typeof(return)) .sort!((a, b) => a.creationDate > b.creationDate) .release; } private: auto scwGET(string path) { return request(scalewayAPIURL ~ path, (scope req) { req.headers["X-Auth-Token"] = scalewayAuth; }); } auto scwPOST(T)(string path, T arg) { return request(scalewayAPIURL ~ path, (scope req) { req.headers["X-Auth-Token"] = scalewayAuth; req.method = HTTPMethod.POST; req.writeJsonBody(arg); }); }
D
module wx.HTML; public import wx.common; public import wx.ScrolledWindow; public import wx.Frame; public import wx.Config; public import wx.PrintData; public import wx.MouseEvent; //version(LDC) { pragma(ldc, "verbose") } //class ЯчейкаКонтейнераГЯР; //class ФильтрГЯР; //class ТэгГЯР; public enum ПтипУЛРГЯР { Страница, Рисунок, Другое } //----------------------------------------------------------------------------- public enum ПСтатусОткрыванияГЯР { Открыть, Блокировать, Перенаправить } //----------------------------------------------------------------------------- //! \cond EXTERN extern (C) ЦелУкз wxHtmlTag_GetParent(ЦелУкз сам); extern (C) ЦелУкз wxHtmlTag_GetFirstSibling(ЦелУкз сам); extern (C) ЦелУкз wxHtmlTag_GetLastSibling(ЦелУкз сам); extern (C) ЦелУкз wxHtmlTag_GetChildren(ЦелУкз сам); extern (C) ЦелУкз wxHtmlTag_GetPreviousSibling(ЦелУкз сам); extern (C) ЦелУкз wxHtmlTag_GetNextSibling(ЦелУкз сам); extern (C) ЦелУкз wxHtmlTag_GetNextTag(ЦелУкз сам); extern (C) ЦелУкз wxHtmlTag_GetName(ЦелУкз сам); extern (C) бул wxHtmlTag_HasParam(ЦелУкз сам, ткст par); extern (C) ЦелУкз wxHtmlTag_GetParam(ЦелУкз сам, ткст par, бул with_commas); extern (C) бул wxHtmlTag_GetParamAsColour(ЦелУкз сам, ткст par, ЦелУкз цв); extern (C) бул wxHtmlTag_GetParamAsInt(ЦелУкз сам, ткст par, inout цел цв); extern (C) цел wxHtmlTag_ScanParam(ЦелУкз сам, ткст par, ткст format, ЦелУкз парам); extern (C) ЦелУкз wxHtmlTag_GetAllParams(ЦелУкз сам); extern (C) бул wxHtmlTag_IsEnding(ЦелУкз сам); extern (C) бул wxHtmlTag_HasEnding(ЦелУкз сам); extern (C) цел wxHtmlTag_GetBeginPos(ЦелУкз сам); extern (C) цел wxHtmlTag_GetEndPos1(ЦелУкз сам); extern (C) цел wxHtmlTag_GetEndPos2(ЦелУкз сам); //! \endcond //----------------------------------------------------------------------------- export class ТэгГЯР : ВизОбъект { export this(ЦелУкз вхобъ) { super(вхобъ); } export static ВизОбъект Нов(ЦелУкз ptr) { return new ТэгГЯР(ptr); } //----------------------------------------------------------------------------- private static ТэгГЯР найдиОбъ(ЦелУкз ptr) { return cast(ТэгГЯР)найдиОбъект(ptr, &ТэгГЯР.Нов); } export ТэгГЯР родитель() { return ТэгГЯР.найдиОбъ(wxHtmlTag_GetParent(вхобъ)); } export ТэгГЯР первПасынок() { return ТэгГЯР.найдиОбъ(wxHtmlTag_GetFirstSibling(вхобъ)); } export ТэгГЯР последнПасынок() { return ТэгГЯР.найдиОбъ(wxHtmlTag_GetLastSibling(вхобъ)); } export ТэгГЯР отпрыски() { return ТэгГЯР.найдиОбъ(wxHtmlTag_GetChildren(вхобъ)); } //----------------------------------------------------------------------------- export ТэгГЯР предшПасынок() { return ТэгГЯР.найдиОбъ(wxHtmlTag_GetPreviousSibling(вхобъ)); } export ТэгГЯР следщПасынок() { return ТэгГЯР.найдиОбъ(wxHtmlTag_GetNextSibling(вхобъ)); } //----------------------------------------------------------------------------- export ТэгГЯР следщТэг() { return ТэгГЯР.найдиОбъ(wxHtmlTag_GetNextTag(вхобъ)); } //----------------------------------------------------------------------------- export ткст имя() { return cast(ткст) new ВизТкст(wxHtmlTag_GetName(вхобъ), да); } //----------------------------------------------------------------------------- export бул естьПарам(ткст par) { return wxHtmlTag_HasParam(вхобъ, par); } export ткст дайПарам(ткст par, бул with_commas) { return cast(ткст) new ВизТкст(wxHtmlTag_GetParam(вхобъ, par, with_commas), да); } //----------------------------------------------------------------------------- export бул дайПарамКакЦвет(ткст par, Цвет цв) { return wxHtmlTag_GetParamAsColour(вхобъ, par, ВизОбъект.безопУк(цв)); } //----------------------------------------------------------------------------- export бул дайПарамКакЦел(ткст par, out цел цв) { цв = 0; return wxHtmlTag_GetParamAsInt(вхобъ, par, цв); } //----------------------------------------------------------------------------- export цел сканируйПарам(ткст par, ткст format, ВизОбъект парам) { return wxHtmlTag_ScanParam(вхобъ, par, format, ВизОбъект.безопУк(парам)); } //----------------------------------------------------------------------------- export ткст всеПарамы() { return cast(ткст) new ВизТкст(wxHtmlTag_GetAllParams(вхобъ), да); } //----------------------------------------------------------------------------- /* export бул IsEnding() { return wxHtmlTag_IsEnding(вхобъ); } */ export бул естьОкончание() { return wxHtmlTag_HasEnding(вхобъ); } //----------------------------------------------------------------------------- export цел позНачала() { return wxHtmlTag_GetBeginPos(вхобъ); } export цел позКонца1() { return wxHtmlTag_GetEndPos1(вхобъ); } export цел позКонца2() { return wxHtmlTag_GetEndPos2(вхобъ); } //----------------------------------------------------------------------------- /+ export static implicit operator ТэгГЯР (ЦелУкз объ) { return cast(ТэгГЯР)найдиОбъект(объ, &ТэгГЯР.Нов); } +/ } export abstract class ФильтрГЯР : ВизОбъект { // TODO export this(ЦелУкз вхобъ) { super(вхобъ); } /*export abstract бул читается(FSFile файл); export abstract ткст ReadFile(FSFile файл);*/ } //----------------------------------------------------------------------------- //! \cond EXTERN extern (C) ЦелУкз wxHtmlCell_ctor(); extern (C) проц wxHtmlCell_SetParent(ЦелУкз сам, ЦелУкз p); extern (C) ЦелУкз wxHtmlCell_GetParent(ЦелУкз сам); extern (C) цел wxHtmlCell_GetPosX(ЦелУкз сам); extern (C) цел wxHtmlCell_GetPosY(ЦелУкз сам); extern (C) цел wxHtmlCell_GetWidth(ЦелУкз сам); extern (C) цел wxHtmlCell_GetHeight(ЦелУкз сам); extern (C) цел wxHtmlCell_GetDescent(ЦелУкз сам); extern (C) ЦелУкз wxHtmlCell_GetId(ЦелУкз сам); extern (C) проц wxHtmlCell_SetId(ЦелУкз сам, ткст ид); extern (C) ЦелУкз wxHtmlCell_GetNext(ЦелУкз сам); extern (C) проц wxHtmlCell_SetPos(ЦелУкз сам, цел x, цел y); extern (C) проц wxHtmlCell_SetLink(ЦелУкз сам, ЦелУкз ссылка); extern (C) проц wxHtmlCell_SetNext(ЦелУкз сам, ЦелУкз ячейка); extern (C) проц wxHtmlCell_Layout(ЦелУкз сам, цел w); extern (C) проц wxHtmlCell_Draw(ЦелУкз сам, ЦелУкз ку, цел x, цел y, цел view_y1, цел view_y2, ЦелУкз инфо); extern (C) проц wxHtmlCell_DrawInvisible(ЦелУкз сам, ЦелУкз ку, цел x, цел y, ЦелУкз инфо); extern (C) ЦелУкз wxHtmlCell_Find(ЦелУкз сам, цел условие, ЦелУкз парам); extern (C) проц wxHtmlCell_OnMouseClick(ЦелУкз сам, ЦелУкз родитель, цел x, цел y, ЦелУкз соб); extern (C) бул wxHtmlCell_AdjustPagebreak(ЦелУкз сам, inout цел разрывСтр); extern (C) проц wxHtmlCell_SetCanLiveOnPagebreak(ЦелУкз сам, бул can); extern (C) проц wxHtmlCell_GetHorizontalConstraints(ЦелУкз сам, inout цел left, inout цел right); extern (C) бул wxHtmlCell_IsTerminalCell(ЦелУкз сам); extern (C) ЦелУкз wxHtmlCell_FindCellByPos(ЦелУкз сам, цел x, цел y); //! \endcond export class ЯчейкаГЯР : ВизОбъект { //----------------------------------------------------------------------------- export this(ЦелУкз вхобъ) { super(вхобъ); } export this() { super(wxHtmlCell_ctor()); } export static ВизОбъект Нов(ЦелУкз ptr) { return new ЯчейкаГЯР(ptr); } export static ЯчейкаГЯР найдиОбъ(ЦелУкз ptr) { return cast(ЯчейкаГЯР)найдиОбъект(ptr, &ЯчейкаГЯР.Нов); } //----------------------------------------------------------------------------- export проц родитель(ЯчейкаКонтейнераГЯР значение) { wxHtmlCell_SetParent(вхобъ, ВизОбъект.безопУк(значение)); } export ЯчейкаКонтейнераГЯР родитель() { return cast(ЯчейкаКонтейнераГЯР)найдиОбъект(wxHtmlCell_GetParent(вхобъ), &ЯчейкаКонтейнераГЯР.Нов); } //----------------------------------------------------------------------------- export цел Х() { return wxHtmlCell_GetPosX(вхобъ); } export цел У() { return wxHtmlCell_GetPosY(вхобъ); } export цел ширь() { return wxHtmlCell_GetWidth(вхобъ); } export цел высь() { return wxHtmlCell_GetHeight(вхобъ); } /* helper */ export цел позХ() { return Х; } export цел позУ() { return У; } export Точка позиция() { return Точка(Х,У); } export проц позиция(Точка тчк) { устПоз(тчк.Х,тчк.У); } export Размер размер() { return Размер(ширь,высь); } export Прямоугольник прям() { return Прямоугольник(Х,У,ширь,высь); } //----------------------------------------------------------------------------- export цел спуск() { return wxHtmlCell_GetDescent(вхобъ); } //----------------------------------------------------------------------------- export ткст ид() { return cast(ткст) new ВизТкст(wxHtmlCell_GetId(вхобъ), да); } export проц ид(ткст значение) { wxHtmlCell_SetId(вхобъ, значение); } //----------------------------------------------------------------------------- export ЯчейкаГЯР следщ() { return cast(ЯчейкаГЯР)найдиОбъект(wxHtmlCell_GetNext(вхобъ), &ЯчейкаГЯР.Нов); } export проц следщ(ЯчейкаГЯР значение) { wxHtmlCell_SetNext(вхобъ, ВизОбъект.безопУк(значение)); } //----------------------------------------------------------------------------- export проц устПоз(цел x, цел y) { wxHtmlCell_SetPos(вхобъ, x, y); } //----------------------------------------------------------------------------- export проц ссылка(ИнфОСсылкеГЯР значение) { wxHtmlCell_SetLink(вхобъ, ВизОбъект.безопУк(значение)); } //----------------------------------------------------------------------------- export проц раскладка(цел w) { wxHtmlCell_Layout(вхобъ, w); } //----------------------------------------------------------------------------- export проц рисуй(КонтекстУстройства ку, цел x, цел y, цел view_y1, цел view_y2, ИнфОбОтображенииГЯР инфо) { wxHtmlCell_Draw(вхобъ, ВизОбъект.безопУк(ку), x, y, view_y1, view_y2, ВизОбъект.безопУк(инфо)); } //----------------------------------------------------------------------------- export проц рисуйНевидимо(КонтекстУстройства ку, цел x, цел y, ИнфОбОтображенииГЯР инфо) { wxHtmlCell_DrawInvisible(вхобъ, ВизОбъект.безопУк(ку), x, y, ВизОбъект.безопУк(инфо)); } //----------------------------------------------------------------------------- export ЯчейкаГЯР найди(цел условие, ВизОбъект парам) { return cast(ЯчейкаГЯР)найдиОбъект(wxHtmlCell_Find(вхобъ, условие, ВизОбъект.безопУк(парам)), &ЯчейкаГЯР.Нов); } //----------------------------------------------------------------------------- export проц поНажатиюМыши(Окно родитель, цел x, цел y, СобытиеМыши соб) { wxHtmlCell_OnMouseClick(вхобъ, ВизОбъект.безопУк(родитель), x, y, ВизОбъект.безопУк(соб)); } //----------------------------------------------------------------------------- export бул устройРазрывСтр(inout цел разрывСтр) { return wxHtmlCell_AdjustPagebreak(вхобъ, разрывСтр); } //----------------------------------------------------------------------------- export проц можетБытьНаРазрывеСтр(бул значение) { wxHtmlCell_SetCanLiveOnPagebreak(вхобъ, значение); } //----------------------------------------------------------------------------- /* export проц GetHorizontalConstraints(out цел left, out цел right) { left = right = 0; wxHtmlCell_GetHorizontalConstraints(вхобъ, left, right); } */ //----------------------------------------------------------------------------- export бул терминальнаяЯчейка_ли() { return wxHtmlCell_IsTerminalCell(вхобъ); } //----------------------------------------------------------------------------- export ЯчейкаГЯР найдиЯчейкуПоПоз(цел x, цел y) { return cast(ЯчейкаГЯР)найдиОбъект(wxHtmlCell_FindCellByPos(вхобъ, x, y), &ЯчейкаГЯР.Нов); } //----------------------------------------------------------------------------- /+ export static implicit operator ЯчейкаГЯР (ЦелУкз объ) { return cast(ЯчейкаГЯР)найдиОбъект(объ, &ЯчейкаГЯР.Нов); } +/ } //----------------------------------------------------------------------------- //! \cond EXTERN extern (C) ЦелУкз wxHtmlFontCell_ctor(ЦелУкз шрифт); extern (C) проц wxHtmlFontCell_Draw(ЦелУкз сам, ЦелУкз ку, цел x, цел y, цел view_y1, цел view_y2, ЦелУкз инфо); extern (C) проц wxHtmlFontCell_DrawInvisible(ЦелУкз сам, ЦелУкз ку, цел x, цел y, ЦелУкз инфо); //! \endcond export class ЯчейкаШрифтаГЯР : ЯчейкаГЯР { //----------------------------------------------------------------------------- export this(ЦелУкз вхобъ) { super(вхобъ); } export this(Шрифт шрифт) { this(wxHtmlFontCell_ctor(ВизОбъект.безопУк(шрифт))); } //----------------------------------------------------------------------------- export override проц рисуй(КонтекстУстройства ку, цел x, цел y, цел view_y1, цел view_y2, ИнфОбОтображенииГЯР инфо) { wxHtmlFontCell_Draw(вхобъ, ВизОбъект.безопУк(ку), x, y, view_y1, view_y2, ВизОбъект.безопУк(инфо)); } //----------------------------------------------------------------------------- export override проц рисуйНевидимо(КонтекстУстройства ку, цел x, цел y, ИнфОбОтображенииГЯР инфо) { wxHtmlFontCell_DrawInvisible(вхобъ, ВизОбъект.безопУк(ку), x, y, ВизОбъект.безопУк(инфо)); } } //----------------------------------------------------------------------------- //! \cond EXTERN extern (C) ЦелУкз wxHtmlContainerCell_ctor(ЦелУкз родитель); extern (C) проц wxHtmlContainerCell_Layout(ЦелУкз сам, цел w); extern (C) проц wxHtmlContainerCell_Draw(ЦелУкз сам, ЦелУкз ку, цел x, цел y, цел view_y1, цел view_y2, ЦелУкз инфо); extern (C) проц wxHtmlContainerCell_DrawInvisible(ЦелУкз сам, ЦелУкз ку, цел x, цел y, ЦелУкз инфо); extern (C) бул wxHtmlContainerCell_AdjustPagebreak(ЦелУкз сам, inout цел разрывСтр); extern (C) проц wxHtmlContainerCell_InsertCell(ЦелУкз сам, ЦелУкз ячейка); extern (C) проц wxHtmlContainerCell_SetAlignHor(ЦелУкз сам, цел al); extern (C) цел wxHtmlContainerCell_GetAlignHor(ЦелУкз сам); extern (C) проц wxHtmlContainerCell_SetAlignVer(ЦелУкз сам, цел al); extern (C) цел wxHtmlContainerCell_GetAlignVer(ЦелУкз сам); extern (C) проц wxHtmlContainerCell_SetIndent(ЦелУкз сам, цел i, цел what, цел единицы); extern (C) цел wxHtmlContainerCell_GetIndent(ЦелУкз сам, цел инд); extern (C) цел wxHtmlContainerCell_GetIndentUnits(ЦелУкз сам, цел инд); extern (C) проц wxHtmlContainerCell_SetAlign(ЦелУкз сам, ЦелУкз тэг); extern (C) проц wxHtmlContainerCell_SetWidthFloat(ЦелУкз сам, цел w, цел единицы); extern (C) проц wxHtmlContainerCell_SetWidthFloatTag(ЦелУкз сам, ЦелУкз тэг, дво масштаб_пикселя); extern (C) проц wxHtmlContainerCell_SetMinHeight(ЦелУкз сам, цел h, цел раскладка); extern (C) проц wxHtmlContainerCell_SetBackgroundColour(ЦелУкз сам, ЦелУкз цв); extern (C) ЦелУкз wxHtmlContainerCell_GetBackgroundColour(ЦелУкз сам); extern (C) проц wxHtmlContainerCell_SetBorder(ЦелУкз сам, ЦелУкз clr1, ЦелУкз clr2); extern (C) ЦелУкз wxHtmlContainerCell_GetLink(ЦелУкз сам, цел x, цел y); extern (C) ЦелУкз wxHtmlContainerCell_Find(ЦелУкз сам, цел условие, ЦелУкз парам); extern (C) проц wxHtmlContainerCell_OnMouseClick(ЦелУкз сам, ЦелУкз родитель, цел x, цел y, ЦелУкз соб); extern (C) проц wxHtmlContainerCell_GetHorizontalConstraints(ЦелУкз сам, inout цел left, inout цел right); extern (C) ЦелУкз wxHtmlContainerCell_GetFirstCell(ЦелУкз сам); extern (C) бул wxHtmlContainerCell_IsTerminalCell(ЦелУкз сам); extern (C) ЦелУкз wxHtmlContainerCell_FindCellByPos(ЦелУкз сам, цел x, цел y); //! \endcond export class ЯчейкаКонтейнераГЯР : ЯчейкаГЯР { //----------------------------------------------------------------------------- export this(ЦелУкз вхобъ) { super(вхобъ); } export this(ЯчейкаКонтейнераГЯР родитель) { this(wxHtmlContainerCell_ctor(ВизОбъект.безопУк(родитель))); } export static ВизОбъект Нов(ЦелУкз ptr) { return new ЯчейкаКонтейнераГЯР(ptr); } //----------------------------------------------------------------------------- export override проц раскладка(цел w) { wxHtmlContainerCell_Layout(вхобъ, w); } //----------------------------------------------------------------------------- export override проц рисуй(КонтекстУстройства ку, цел x, цел y, цел view_y1, цел view_y2, ИнфОбОтображенииГЯР инфо) { wxHtmlContainerCell_Draw(вхобъ, ВизОбъект.безопУк(ку), x, y, view_y1, view_y2, ВизОбъект.безопУк(инфо)); } //----------------------------------------------------------------------------- export override проц рисуйНевидимо(КонтекстУстройства ку, цел x, цел y, ИнфОбОтображенииГЯР инфо) { wxHtmlContainerCell_DrawInvisible(вхобъ, ВизОбъект.безопУк(ку), x, y, ВизОбъект.безопУк(инфо)); } //----------------------------------------------------------------------------- export override бул устройРазрывСтр(inout цел разрывСтр) { return wxHtmlContainerCell_AdjustPagebreak(вхобъ, разрывСтр); } //----------------------------------------------------------------------------- export проц вставьЯчейку(ЯчейкаГЯР ячейка) { wxHtmlContainerCell_InsertCell(вхобъ, ВизОбъект.безопУк(ячейка)); } //----------------------------------------------------------------------------- export проц разместиГориз(цел значение) { wxHtmlContainerCell_SetAlignHor(вхобъ, значение); } export цел разместиГориз() { return wxHtmlContainerCell_GetAlignHor(вхобъ); } //----------------------------------------------------------------------------- export проц разместиВерт(цел значение) { wxHtmlContainerCell_SetAlignVer(вхобъ, значение); } export цел разместиВерт() { return wxHtmlContainerCell_GetAlignVer(вхобъ); } //----------------------------------------------------------------------------- export проц устОтступ(цел i, цел what, цел единицы) { wxHtmlContainerCell_SetIndent(вхобъ, i, what, единицы); } export цел дайОтступ(цел инд) { return wxHtmlContainerCell_GetIndent(вхобъ, инд); } export цел дайЕдцыОтступа(цел инд) { return wxHtmlContainerCell_GetIndentUnits(вхобъ, инд); } //----------------------------------------------------------------------------- export проц расположи(ТэгГЯР значение) { wxHtmlContainerCell_SetAlign(вхобъ, ВизОбъект.безопУк(значение)); } //----------------------------------------------------------------------------- export проц устПлавШирину(цел w, цел единицы) { wxHtmlContainerCell_SetWidthFloat(вхобъ, w, единицы); } export проц устПлавШирину(ТэгГЯР тэг, дво масштаб_пикселя) { wxHtmlContainerCell_SetWidthFloatTag(вхобъ, ВизОбъект.безопУк(тэг), масштаб_пикселя); } //----------------------------------------------------------------------------- export проц устМинВысоту(цел h, цел раскладка) { wxHtmlContainerCell_SetMinHeight(вхобъ, h, раскладка); } //----------------------------------------------------------------------------- export проц цветФона(Цвет значение) { wxHtmlContainerCell_SetBackgroundColour(вхобъ, ВизОбъект.безопУк(значение)); } export Цвет цветФона() { return new Цвет(wxHtmlContainerCell_GetBackgroundColour(вхобъ), да); } //----------------------------------------------------------------------------- export проц устБордюр(Цвет clr1, Цвет clr2) { wxHtmlContainerCell_SetBorder(вхобъ, ВизОбъект.безопУк(clr1), ВизОбъект.безопУк(clr2)); } //----------------------------------------------------------------------------- export ИнфОСсылкеГЯР дайСсылку(цел x, цел y) { return cast(ИнфОСсылкеГЯР)найдиОбъект(wxHtmlContainerCell_GetLink(вхобъ, x, y), &ИнфОСсылкеГЯР.Нов); } //----------------------------------------------------------------------------- export override ЯчейкаГЯР найди(цел условие, ВизОбъект парам) { // return cast(ЯчейкаГЯР)найдиОбъект(wxHtmlContainerCell_Find(вхобъ, условие, ВизОбъект.безопУк(парам)), &ЯчейкаГЯР.Нов); return ЯчейкаГЯР.найдиОбъ(wxHtmlContainerCell_Find(вхобъ, условие, ВизОбъект.безопУк(парам))); } //----------------------------------------------------------------------------- export override проц поНажатиюМыши(Окно родитель, цел x, цел y, СобытиеМыши соб) { wxHtmlContainerCell_OnMouseClick(вхобъ, ВизОбъект.безопУк(родитель), x, y, ВизОбъект.безопУк(соб)); } //----------------------------------------------------------------------------- /* export проц GetHorizontalConstraints(out цел left, out цел right) { left = right = 0; wxHtmlContainerCell_GetHorizontalConstraints(вхобъ, left, right); } */ //----------------------------------------------------------------------------- /* export ЯчейкаГЯР FirstCell() { return ЯчейкаГЯР.найдиОбъ(wxHtmlContainerCell_GetFirstCell(вхобъ)); } */ //----------------------------------------------------------------------------- export override бул терминальнаяЯчейка_ли() { return wxHtmlContainerCell_IsTerminalCell(вхобъ); } //----------------------------------------------------------------------------- export override ЯчейкаГЯР найдиЯчейкуПоПоз(цел x, цел y) { return ЯчейкаГЯР.найдиОбъ(wxHtmlContainerCell_FindCellByPos(вхобъ, x, y)); } } //----------------------------------------------------------------------------- //! \cond EXTERN extern (C) ЦелУкз wxHtmlColourCell_ctor(ЦелУкз цв, цел флаги); extern (C) проц wxHtmlColourCell_Draw(ЦелУкз сам, ЦелУкз ку, цел x, цел y, цел view_y1, цел view_y2, ЦелУкз инфо); extern (C) проц wxHtmlColourCell_DrawInvisible(ЦелУкз сам, ЦелУкз ку, цел x, цел y, ЦелУкз инфо); //! \endcond export class ЯчейкаЦветаГЯР : ЯчейкаГЯР { //----------------------------------------------------------------------------- export this(ЦелУкз вхобъ) { super(вхобъ); } export this(Цвет цв, цел флаги) { this(wxHtmlColourCell_ctor(ВизОбъект.безопУк(цв), флаги)); } //----------------------------------------------------------------------------- export override проц рисуй(КонтекстУстройства ку, цел x, цел y, цел view_y1, цел view_y2, ИнфОбОтображенииГЯР инфо) { wxHtmlColourCell_Draw(вхобъ, ВизОбъект.безопУк(ку), x, y, view_y1, view_y2, ВизОбъект.безопУк(инфо)); } //----------------------------------------------------------------------------- export override проц рисуйНевидимо(КонтекстУстройства ку, цел x, цел y, ИнфОбОтображенииГЯР инфо) { wxHtmlColourCell_DrawInvisible(вхобъ, ВизОбъект.безопУк(ку), x, y, ВизОбъект.безопУк(инфо)); } } //----------------------------------------------------------------------------- //! \cond EXTERN extern (C) ЦелУкз wxHtmlLinkInfo_ctor(); /*extern (C) ЦелУкз wxHtmlLinkInfo_ctor(ткст href, ткст цель);*/ /*extern (C) ЦелУкз wxHtmlLinkInfo_ctor(ЦелУкз l);*/ extern (C) проц wxHtmlLinkInfo_SetEvent(ЦелУкз сам, ЦелУкз e); extern (C) проц wxHtmlLinkInfo_SetHtmlCell(ЦелУкз сам, ЦелУкз e); extern (C) ЦелУкз wxHtmlLinkInfo_GetHref(ЦелУкз сам); extern (C) ЦелУкз wxHtmlLinkInfo_GetTarget(ЦелУкз сам); extern (C) ЦелУкз wxHtmlLinkInfo_GetEvent(ЦелУкз сам); extern (C) ЦелУкз wxHtmlLinkInfo_GetHtmlCell(ЦелУкз сам); //! \endcond //----------------------------------------------------------------------------- export class ИнфОСсылкеГЯР : ВизОбъект { export this(ЦелУкз вхобъ) { super(вхобъ); } export this() { super(wxHtmlLinkInfo_ctor()); } //----------------------------------------------------------------------------- /*export this(ткст href, ткст цель) { super(wxHtmlLinkInfo_ctor(href, цель)); }*/ export static ВизОбъект Нов(ЦелУкз ptr) { return new ЯчейкаГЯР(ptr); } //----------------------------------------------------------------------------- /*export this(ИнфОСсылкеГЯР l) { super(wxHtmlLinkInfo_ctor(ВизОбъект.безопУк(l))); }*/ //----------------------------------------------------------------------------- export проц событие(СобытиеМыши значение) { wxHtmlLinkInfo_SetEvent(вхобъ, ВизОбъект.безопУк(значение)); } export СобытиеМыши событие() { return cast(СобытиеМыши)найдиОбъект(wxHtmlLinkInfo_GetEvent(вхобъ), cast(ВизОбъект function (ЦелУкз))&СобытиеМыши.Нов); } //----------------------------------------------------------------------------- export ткст гиперссылка() { return cast(ткст) new ВизТкст(wxHtmlLinkInfo_GetHref(вхобъ), да); } //----------------------------------------------------------------------------- export ткст цель() { return cast(ткст) new ВизТкст(wxHtmlLinkInfo_GetTarget(вхобъ), да); } //----------------------------------------------------------------------------- export ЯчейкаГЯР ячейкаГЯР() { return cast(ЯчейкаГЯР)найдиОбъект(wxHtmlLinkInfo_GetHtmlCell(вхобъ), &ЯчейкаГЯР.Нов); } export проц ячейкаГЯР(ЯчейкаГЯР значение) { wxHtmlLinkInfo_SetHtmlCell(вхобъ, ВизОбъект.безопУк(значение)); } } //----------------------------------------------------------------------------- //! \cond EXTERN extern (C) ЦелУкз wxHtmlWidgetCell_ctor(ЦелУкз окно, цел w); extern (C) проц wxHtmlWidgetCell_Draw(ЦелУкз сам, ЦелУкз ку, цел x, цел y, цел view_y1, цел view_y2, ЦелУкз инфо); extern (C) проц wxHtmlWidgetCell_DrawInvisible(ЦелУкз сам, ЦелУкз ку, цел x, цел y, ЦелУкз инфо); extern (C) проц wxHtmlWidgetCell_Layout(ЦелУкз сам, цел w); //! \endcond //----------------------------------------------------------------------------- export class ЯчейкаВиджетаГЯР : ЯчейкаГЯР { export this(ЦелУкз вхобъ) { super(вхобъ); } export this(Окно окно, цел w) { this(wxHtmlWidgetCell_ctor(ВизОбъект.безопУк(окно), w)); } //----------------------------------------------------------------------------- export override проц рисуй(КонтекстУстройства ку, цел x, цел y, цел view_y1, цел view_y2, ИнфОбОтображенииГЯР инфо) { wxHtmlWidgetCell_Draw(вхобъ, ВизОбъект.безопУк(ку), x, y, view_y1, view_y2, ВизОбъект.безопУк(инфо)); } //----------------------------------------------------------------------------- export override проц рисуйНевидимо(КонтекстУстройства ку, цел x, цел y, ИнфОбОтображенииГЯР инфо) { wxHtmlWidgetCell_DrawInvisible(вхобъ, ВизОбъект.безопУк(ку), x, y, ВизОбъект.безопУк(инфо)); } //----------------------------------------------------------------------------- export override проц раскладка(цел w) { wxHtmlWidgetCell_Layout(вхобъ, w); } } //----------------------------------------------------------------------------- //! \cond EXTERN extern (C) ЦелУкз wxHtmlWordCell_ctor(ткст слово, ЦелУкз ку); extern (C) проц wxHtmlWordCell_Draw(ЦелУкз сам, ЦелУкз ку, цел x, цел y, цел view_y1, цел view_y2, ЦелУкз инфо); //! \endcond //----------------------------------------------------------------------------- export class ЯчейкаСловаГЯР : ЯчейкаГЯР { export this(ЦелУкз вхобъ) { super(вхобъ); } export this(ткст слово, КонтекстУстройства ку) { this(wxHtmlWordCell_ctor(слово, ВизОбъект.безопУк(ку))); } //----------------------------------------------------------------------------- export override проц рисуй(КонтекстУстройства ку, цел x, цел y, цел view_y1, цел view_y2, ИнфОбОтображенииГЯР инфо) { wxHtmlWordCell_Draw(вхобъ, ВизОбъект.безопУк(ку), x, y, view_y1, view_y2, ВизОбъект.безопУк(инфо)); } } //----------------------------------------------------------------------------- //! \cond EXTERN extern (C) бул wxHtmlFilterPlainText_CanRead(ЦелУкз сам, ЦелУкз файл); extern (C) ЦелУкз wxHtmlFilterPlainText_ReadFile(ЦелУкз сам, ЦелУкз файл); //! \endcond //----------------------------------------------------------------------------- export class ФильтрПлоскогоТекстаГЯР : ФильтрГЯР { export this(ЦелУкз вхобъ) { super(вхобъ); } //----------------------------------------------------------------------------- /*export override бул читается(FSFile файл) { return wxHtmlFilterPlainText_CanRead(вхобъ, ВизОбъект.безопУк(файл)); } //----------------------------------------------------------------------------- export override ткст ReadFile(FSFile файл) { return cast(ткст) new ВизТкст(wxHtmlFilterPlainText_ReadFile(вхобъ, ВизОбъект.безопУк(файл))); } } //----------------------------------------------------------------------------- //! \cond EXTERN extern (C) бул wxHtmlFilterHTML_CanRead(ЦелУкз сам, ЦелУкз файл); extern (C) ЦелУкз wxHtmlFilterHTML_ReadFile(ЦелУкз сам, ЦелУкз файл); //! \endcond //----------------------------------------------------------------------------- alias HtmlFilterHTML wxHtmlFilterHTML; export class HtmlFilterHTML : ФильтрГЯР { export this(ЦелУкз вхобъ) { super(вхобъ); } //----------------------------------------------------------------------------- /*export override бул читается(FSFile файл) { return wxHtmlFilterHTML_CanRead(вхобъ, ВизОбъект.безопУк(файл)); } //----------------------------------------------------------------------------- export override ткст ReadFile(FSFile файл) { return cast(ткст) new ВизТкст(wxHtmlFilterHTML_ReadFile(вхобъ, ВизОбъект.безопУк(файл))); }*/ } //----------------------------------------------------------------------------- //! \cond EXTERN extern (C) ЦелУкз wxHtmlTagsModule_ctor(); extern (C) бул wxHtmlTagsModule_OnInit(ЦелУкз сам); extern (C) проц wxHtmlTagsModule_OnExit(ЦелУкз сам); extern (C) проц wxHtmlTagsModule_FillHandlersTable(ЦелУкз сам, ЦелУкз парсер); //! \endcond //----------------------------------------------------------------------------- export class МодульТэговГЯР : ВизОбъект // TODO: Module { export this(ЦелУкз вхобъ) { super(вхобъ); } export this() { super(wxHtmlTagsModule_ctor()); } //----------------------------------------------------------------------------- export бул поИниц() { return wxHtmlTagsModule_OnInit(вхобъ); } //----------------------------------------------------------------------------- export проц поВыходу() { wxHtmlTagsModule_OnExit(вхобъ); } //----------------------------------------------------------------------------- export проц заполниТаблицуОбработчиков(ПарсерГЯРОкна парсер) { wxHtmlTagsModule_FillHandlersTable(вхобъ, ВизОбъект.безопУк(парсер)); } } //----------------------------------------------------------------------------- export abstract class ОбработчикТэгаГЯРОкна : ОбработчикТэгаГЯР { export this(ЦелУкз вхобъ) { super(вхобъ); } } //----------------------------------------------------------------------------- //! \cond EXTERN extern (C) ЦелУкз wxHtmlWinParser_ctor(ЦелУкз окно); extern (C) проц wxHtmlWinParser_InitParser(ЦелУкз сам, ткст исток); extern (C) проц wxHtmlWinParser_DoneParser(ЦелУкз сам); extern (C) ЦелУкз wxHtmlWinParser_GetProduct(ЦелУкз сам); extern (C) ЦелУкз wxHtmlWinParser_OpenURL(ЦелУкз сам, цел тип, ткст улр); extern (C) проц wxHtmlWinParser_SetDC(ЦелУкз сам, ЦелУкз ку, дво масштаб_пикселя); extern (C) ЦелУкз wxHtmlWinParser_GetDC(ЦелУкз сам); extern (C) дво wxHtmlWinParser_GetPixelScale(ЦелУкз сам); extern (C) цел wxHtmlWinParser_GetCharHeight(ЦелУкз сам); extern (C) цел wxHtmlWinParser_GetCharWidth(ЦелУкз сам); extern (C) ЦелУкз wxHtmlWinParser_GetWindow(ЦелУкз сам); extern (C) проц wxHtmlWinParser_SetFonts(ЦелУкз сам, ткст нормФас, ткст фиксФас, цел* размы); extern (C) проц wxHtmlWinParser_AddModule(ЦелУкз сам, ЦелУкз mod); extern (C) проц wxHtmlWinParser_RemoveModule(ЦелУкз сам, ЦелУкз mod); extern (C) ЦелУкз wxHtmlWinParser_GetContainer(ЦелУкз сам); extern (C) ЦелУкз wxHtmlWinParser_OpenContainer(ЦелУкз сам); extern (C) ЦелУкз wxHtmlWinParser_SetContainer(ЦелУкз сам, ЦелУкз c); extern (C) ЦелУкз wxHtmlWinParser_CloseContainer(ЦелУкз сам); extern (C) цел wxHtmlWinParser_GetFontSize(ЦелУкз сам); extern (C) проц wxHtmlWinParser_SetFontSize(ЦелУкз сам, цел т); extern (C) цел wxHtmlWinParser_GetFontBold(ЦелУкз сам); extern (C) проц wxHtmlWinParser_SetFontBold(ЦелУкз сам, цел x); extern (C) цел wxHtmlWinParser_GetFontItalic(ЦелУкз сам); extern (C) проц wxHtmlWinParser_SetFontItalic(ЦелУкз сам, цел x); extern (C) цел wxHtmlWinParser_GetFontUnderlined(ЦелУкз сам); extern (C) проц wxHtmlWinParser_SetFontUnderlined(ЦелУкз сам, цел x); extern (C) цел wxHtmlWinParser_GetFontFixed(ЦелУкз сам); extern (C) проц wxHtmlWinParser_SetFontFixed(ЦелУкз сам, цел x); extern (C) ЦелУкз wxHtmlWinParser_GetFontFace(ЦелУкз сам); extern (C) проц wxHtmlWinParser_SetFontFace(ЦелУкз сам, ткст фас); extern (C) цел wxHtmlWinParser_GetAlign(ЦелУкз сам); extern (C) проц wxHtmlWinParser_SetAlign(ЦелУкз сам, цел a); extern (C) ЦелУкз wxHtmlWinParser_GetLinkColor(ЦелУкз сам); extern (C) проц wxHtmlWinParser_SetLinkColor(ЦелУкз сам, ЦелУкз цв); extern (C) ЦелУкз wxHtmlWinParser_GetActualColor(ЦелУкз сам); extern (C) проц wxHtmlWinParser_SetActualColor(ЦелУкз сам, ЦелУкз цв); extern (C) ЦелУкз wxHtmlWinParser_GetLink(ЦелУкз сам); extern (C) проц wxHtmlWinParser_SetLink(ЦелУкз сам, ЦелУкз ссылка); extern (C) ЦелУкз wxHtmlWinParser_CreateCurrentFont(ЦелУкз сам); //! \endcond //----------------------------------------------------------------------------- export class ПарсерГЯРОкна : ПарсерГЯР { export this(ЦелУкз вхобъ) { super(вхобъ); } export this(ОкноГЯР окно) { super(wxHtmlWinParser_ctor(ВизОбъект.безопУк(окно))); } export static ВизОбъект Нов(ЦелУкз ptr) { return new ПарсерГЯРОкна(ptr); } //----------------------------------------------------------------------------- export override проц иницПарсер(ткст исток) { wxHtmlWinParser_InitParser(вхобъ, исток); } //----------------------------------------------------------------------------- export override проц парсерВыполнен() { wxHtmlWinParser_DoneParser(вхобъ); } //----------------------------------------------------------------------------- export override ВизОбъект продукт() { //FIXME return найдиОбъект(wxHtmlWinParser_GetProduct(вхобъ), typeof(ВизОбъект)); return найдиОбъект(wxHtmlWinParser_GetProduct(вхобъ)); } //----------------------------------------------------------------------------- /*export FSFile OpenURL(ПтипУЛРГЯР тип, ткст улр) { return wxHtmlWinParser_OpenURL(вхобъ, ВизОбъект.безопУк(тип), улр); }*/ //----------------------------------------------------------------------------- export проц устКУ(КонтекстУстройства ку, дво масштаб_пикселя) { wxHtmlWinParser_SetDC(вхобъ, ВизОбъект.безопУк(ку), масштаб_пикселя); } //----------------------------------------------------------------------------- export КонтекстУстройства дайКУ() { return cast(КонтекстУстройства)найдиОбъект(wxHtmlWinParser_GetDC(вхобъ), &КонтекстУстройства.Нов); } //----------------------------------------------------------------------------- export дво масштабПикселя() { return wxHtmlWinParser_GetPixelScale(вхобъ); } //----------------------------------------------------------------------------- export цел высьСим() { return wxHtmlWinParser_GetCharHeight(вхобъ); } export цел ширьСим() { return wxHtmlWinParser_GetCharWidth(вхобъ); } //----------------------------------------------------------------------------- export ОкноГЯР окно() { return cast(ОкноГЯР)найдиОбъект(wxHtmlWinParser_GetWindow(вхобъ), &ОкноГЯР.Нов); } //----------------------------------------------------------------------------- export проц устШрифты(ткст нормФас, ткст фиксФас, цел[] размы) { wxHtmlWinParser_SetFonts(вхобъ, нормФас, фиксФас, размы.ptr); } //----------------------------------------------------------------------------- export проц добавьМодуль(МодульТэговГЯР mod) { wxHtmlWinParser_AddModule(вхобъ, ВизОбъект.безопУк(mod)); } export проц удалиМодуль(МодульТэговГЯР mod) { wxHtmlWinParser_RemoveModule(вхобъ, ВизОбъект.безопУк(mod)); } //----------------------------------------------------------------------------- export ЯчейкаКонтейнераГЯР контейнер() { return cast(ЯчейкаКонтейнераГЯР)найдиОбъект(wxHtmlWinParser_GetContainer(вхобъ), &ЯчейкаКонтейнераГЯР.Нов); } export ЯчейкаКонтейнераГЯР устКонтейнер(ЯчейкаКонтейнераГЯР конт) { return cast(ЯчейкаКонтейнераГЯР)найдиОбъект(wxHtmlWinParser_SetContainer(вхобъ, ВизОбъект.безопУк(конт)), &ЯчейкаКонтейнераГЯР.Нов); } //----------------------------------------------------------------------------- export ЯчейкаКонтейнераГЯР откройКонтейнер() { return cast(ЯчейкаКонтейнераГЯР)найдиОбъект(wxHtmlWinParser_OpenContainer(вхобъ), &ЯчейкаКонтейнераГЯР.Нов); } export ЯчейкаКонтейнераГЯР закройКонтейнер() { return cast(ЯчейкаКонтейнераГЯР)найдиОбъект(wxHtmlWinParser_CloseContainer(вхобъ), &ЯчейкаКонтейнераГЯР.Нов); } //----------------------------------------------------------------------------- export цел размШрифта() { return wxHtmlWinParser_GetFontSize(вхобъ); } export проц размШрифта(цел значение) { wxHtmlWinParser_SetFontSize(вхобъ, значение); } export цел полужирныйШрифт() { return wxHtmlWinParser_GetFontBold(вхобъ); } export проц полужирныйШрифт(цел значение) { wxHtmlWinParser_SetFontBold(вхобъ, значение); } export цел курсивныйШрифт() { return wxHtmlWinParser_GetFontItalic(вхобъ); } export проц курсивныйШрифт(цел значение) { wxHtmlWinParser_SetFontItalic(вхобъ, значение); } export цел шрифтПодчёркнут() { return wxHtmlWinParser_GetFontUnderlined(вхобъ); } export проц шрифтПодчёркнут(цел значение) { wxHtmlWinParser_SetFontUnderlined(вхобъ, значение); } export цел шрифтФиксирован() { return wxHtmlWinParser_GetFontFixed(вхобъ); } export проц шрифтФиксирован(цел значение) { wxHtmlWinParser_SetFontFixed(вхобъ, значение); } export ткст фасШрифта() { return cast(ткст) new ВизТкст(wxHtmlWinParser_GetFontFace(вхобъ), да); } export проц фасШрифта(ткст значение) { wxHtmlWinParser_SetFontFace(вхобъ, значение); } //----------------------------------------------------------------------------- export цел расположи() { return wxHtmlWinParser_GetAlign(вхобъ); } export проц расположи(цел значение) { wxHtmlWinParser_SetAlign(вхобъ, значение); } //----------------------------------------------------------------------------- export Цвет цветСсылки() { return new Цвет(wxHtmlWinParser_GetLinkColor(вхобъ), да); } export проц цветСсылки(Цвет значение) { wxHtmlWinParser_SetLinkColor(вхобъ, ВизОбъект.безопУк(значение)); } export Цвет действитЦвет() { return new Цвет(wxHtmlWinParser_GetActualColor(вхобъ), да); } export проц действитЦвет(Цвет значение) { wxHtmlWinParser_SetActualColor(вхобъ, ВизОбъект.безопУк(значение)); } //----------------------------------------------------------------------------- export ИнфОСсылкеГЯР ссылка() { return cast(ИнфОСсылкеГЯР)найдиОбъект(wxHtmlWinParser_GetLink(вхобъ), &ИнфОСсылкеГЯР.Нов); } export проц ссылка(ИнфОСсылкеГЯР значение) { wxHtmlWinParser_SetLink(вхобъ, ВизОбъект.безопУк(значение)); } //----------------------------------------------------------------------------- export Шрифт создайТекущШрифт() { return new Шрифт(wxHtmlWinParser_CreateCurrentFont(вхобъ)); } } //----------------------------------------------------------------------------- //! \cond EXTERN extern (C) проц wxHtmlTagHandler_SetParser(ЦелУкз сам, ЦелУкз парсер); //! \endcond //----------------------------------------------------------------------------- export abstract class ОбработчикТэгаГЯР : ВизОбъект { export this(ЦелУкз вхобъ) { super(вхобъ); } //----------------------------------------------------------------------------- export проц парсер(ПарсерГЯР значение) { wxHtmlTagHandler_SetParser(вхобъ, ВизОбъект.безопУк(значение)); } //----------------------------------------------------------------------------- export abstract ткст дайПоддерживаемыеТэги(); export abstract бул обработайТэг(ТэгГЯР тэг); } //----------------------------------------------------------------------------- //! \cond EXTERN extern (C) ЦелУкз wxHtmlEntitiesParser_ctor(); extern (C) проц wxHtmlEntitiesParser_SetEncoding(ЦелУкз сам, цел кодировка); extern (C) ЦелУкз wxHtmlEntitiesParser_Parse(ЦелУкз сам, ткст ввод); extern (C) char wxHtmlEntitiesParser_GetEntityChar(ЦелУкз сам, ткст сущность); extern (C) char wxHtmlEntitiesParser_GetCharForCode(ЦелУкз сам, бцел код); //! \endcond //----------------------------------------------------------------------------- export class ПарсерСущностейГЯР : ВизОбъект { export this(ЦелУкз вхобъ) { super(вхобъ); } export this() { super(wxHtmlEntitiesParser_ctor()); } //----------------------------------------------------------------------------- export проц кодировка(ПКодировкаШрифта значение) { wxHtmlEntitiesParser_SetEncoding(вхобъ, cast(цел)значение); } //----------------------------------------------------------------------------- export ткст разбор(ткст ввод) { return cast(ткст) new ВизТкст(wxHtmlEntitiesParser_Parse(вхобъ, ввод), да); } //----------------------------------------------------------------------------- export char дайСимСущности(ткст сущность) { return wxHtmlEntitiesParser_GetEntityChar(вхобъ, сущность); } export char дайСимДляКода(цел код) { return wxHtmlEntitiesParser_GetCharForCode(вхобъ, cast(бцел)код); } } //----------------------------------------------------------------------------- //! \cond EXTERN extern (C) проц wxHtmlParser_SetFS(ЦелУкз сам, ЦелУкз fs); extern (C) ЦелУкз wxHtmlParser_GetFS(ЦелУкз сам); extern (C) ЦелУкз wxHtmlParser_OpenURL(ЦелУкз сам, цел тип, ткст улр); extern (C) ЦелУкз wxHtmlParser_Parse(ЦелУкз сам, ткст исток); extern (C) проц wxHtmlParser_InitParser(ЦелУкз сам, ткст исток); extern (C) проц wxHtmlParser_DoneParser(ЦелУкз сам); extern (C) проц wxHtmlParser_StopParsing(ЦелУкз сам); extern (C) проц wxHtmlParser_DoParsing(ЦелУкз сам, цел начПоз, цел конПоз); extern (C) проц wxHtmlParser_DoParsingAll(ЦелУкз сам); extern (C) ЦелУкз wxHtmlParser_GetCurrentTag(ЦелУкз сам); extern (C) проц wxHtmlParser_AddTagHandler(ЦелУкз сам, ЦелУкз обработчик); extern (C) проц wxHtmlParser_PushTagHandler(ЦелУкз сам, ЦелУкз обработчик, ткст тэги); extern (C) проц wxHtmlParser_PopTagHandler(ЦелУкз сам); extern (C) ЦелУкз wxHtmlParser_GetSource(ЦелУкз сам); extern (C) проц wxHtmlParser_SetSource(ЦелУкз сам, ткст src); extern (C) проц wxHtmlParser_SetSourceAndSaveState(ЦелУкз сам, ткст src); extern (C) бул wxHtmlParser_RestoreState(ЦелУкз сам); extern (C) ЦелУкз wxHtmlParser_ExtractCharsetInformation(ЦелУкз сам, ткст маркап); //! \endcond //----------------------------------------------------------------------------- export abstract class ПарсерГЯР : ВизОбъект { export this(ЦелУкз вхобъ) { super(вхобъ); } //----------------------------------------------------------------------------- /*export проц УстFS(FileSystem fs) { wxHtmlParser_SetFS(вхобъ, ВизОбъект.безопУк(fs)); } //----------------------------------------------------------------------------- export FileSystem GetFS() { return wxHtmlParser_GetFS(вхобъ); } //----------------------------------------------------------------------------- export FSFile OpenURL(ПтипУЛРГЯР тип, ткст улр) { return wxHtmlParser_OpenURL(вхобъ, ВизОбъект.безопУк(тип), улр); }*/ //----------------------------------------------------------------------------- export ВизОбъект разбор(ткст исток) { return new ВизОбъект(wxHtmlParser_Parse(вхобъ, исток)); } //----------------------------------------------------------------------------- export проц иницПарсер(ткст исток) { wxHtmlParser_InitParser(вхобъ, исток); } //----------------------------------------------------------------------------- export проц парсерВыполнен() { wxHtmlParser_DoneParser(вхобъ); } //----------------------------------------------------------------------------- export проц стопРазбор() { wxHtmlParser_StopParsing(вхобъ); } //----------------------------------------------------------------------------- export проц выполниРазбор(цел начПоз, цел конПоз) { wxHtmlParser_DoParsing(вхобъ, начПоз, конПоз); } //----------------------------------------------------------------------------- export проц выполниРазбор() { wxHtmlParser_DoParsingAll(вхобъ); } //----------------------------------------------------------------------------- export ТэгГЯР дайТекТэг() { return ТэгГЯР.найдиОбъ(wxHtmlParser_GetCurrentTag(вхобъ)); } //----------------------------------------------------------------------------- export abstract ВизОбъект продукт(); //----------------------------------------------------------------------------- export проц добавьОбработчикТэга(ОбработчикТэгаГЯР обработчик) { wxHtmlParser_AddTagHandler(вхобъ, ВизОбъект.безопУк(обработчик)); } //----------------------------------------------------------------------------- export проц суньОбработчикТэга(ОбработчикТэгаГЯР обработчик, ткст тэги) { wxHtmlParser_PushTagHandler(вхобъ, ВизОбъект.безопУк(обработчик), тэги); } //----------------------------------------------------------------------------- export проц выньОбработчикТэга() { wxHtmlParser_PopTagHandler(вхобъ); } //----------------------------------------------------------------------------- export ткст источник() { return cast(ткст) new ВизТкст(wxHtmlParser_GetSource(вхобъ), да); } export проц источник(ткст значение) { wxHtmlParser_SetSource(вхобъ, значение); } export проц истокИСохрСост(ткст значение) { wxHtmlParser_SetSourceAndSaveState(вхобъ, значение); } export бул восстановиСостояние() { return wxHtmlParser_RestoreState(вхобъ); } //----------------------------------------------------------------------------- export ткст извлекиИнфоГарнитуре(ткст маркап) { return cast(ткст) new ВизТкст(wxHtmlParser_ExtractCharsetInformation(вхобъ, маркап), да); } } //----------------------------------------------------------------------------- //! \cond EXTERN extern (C) цел wxHtmlProcessor_GetPriority(ЦелУкз сам); extern (C) проц wxHtmlProcessor_Enable(ЦелУкз сам, бул вкл); extern (C) бул wxHtmlProcessor_IsEnabled(ЦелУкз сам); //! \endcond //----------------------------------------------------------------------------- export abstract class ПроцессорГЯР : ВизОбъект { export this(ЦелУкз вхобъ) { super(вхобъ); } //----------------------------------------------------------------------------- export abstract ткст процесс(ткст текст); //----------------------------------------------------------------------------- export цел приоритет() { return wxHtmlProcessor_GetPriority(вхобъ); } //----------------------------------------------------------------------------- export проц активен(бул значение) { wxHtmlProcessor_Enable(вхобъ, значение); } export бул активен() { return wxHtmlProcessor_IsEnabled(вхобъ); } } //----------------------------------------------------------------------------- //! \cond EXTERN extern (C) ЦелУкз wxHtmlRenderingInfo_ctor(); extern (C) проц wxHtmlRenderingInfo_dtor(ЦелУкз сам); extern (C) проц wxHtmlRenderingInfo_SetSelection(ЦелУкз сам, ЦелУкз т); extern (C) ЦелУкз wxHtmlRenderingInfo_GetSelection(ЦелУкз сам); //! \endcond //----------------------------------------------------------------------------- export class ИнфОбОтображенииГЯР : ВизОбъект { export this(ЦелУкз вхобъ) { super(вхобъ); } private this(ЦелУкз вхобъ, бул памСобств) { super(вхобъ); this.памСобств = памСобств; } export this() { this(wxHtmlRenderingInfo_ctor(), да); } //--------------------------------------------------------------------- override protected проц dtor() { wxHtmlRenderingInfo_dtor(вхобъ); } //---------------------------- export ~this(){this.dtor();} //---------------------------- //----------------------------------------------------------------------------- export ВыделениеГЯР выделение() { return cast(ВыделениеГЯР)найдиОбъект(wxHtmlRenderingInfo_GetSelection(вхобъ), &ВыделениеГЯР.Нов); } export проц выделение(ВыделениеГЯР значение) { wxHtmlRenderingInfo_SetSelection(вхобъ, ВизОбъект.безопУк(значение)); } } //----------------------------------------------------------------------------- //! \cond EXTERN extern (C) ЦелУкз wxHtmlSelection_ctor(); extern (C) проц wxHtmlSelection_dtor(ЦелУкз сам); extern (C) проц wxHtmlSelection_Set(ЦелУкз сам, inout Точка позОт, ЦелУкз отЯчейки, inout Точка позДо, ЦелУкз доЯчейки); extern (C) проц wxHtmlSelection_Set2(ЦелУкз сам, ЦелУкз отЯчейки, ЦелУкз доЯчейки); extern (C) ЦелУкз wxHtmlSelection_GetFromCell(ЦелУкз сам); extern (C) ЦелУкз wxHtmlSelection_GetToCell(ЦелУкз сам); extern (C) проц wxHtmlSelection_GetFromPos(ЦелУкз сам, out Точка позОт); extern (C) проц wxHtmlSelection_GetToPos(ЦелУкз сам, out Точка позДо); extern (C) проц wxHtmlSelection_GetFromPrivPos(ЦелУкз сам, out Точка fromPrivPos); extern (C) проц wxHtmlSelection_GetToPrivPos(ЦелУкз сам, out Точка toPrivPos); extern (C) проц wxHtmlSelection_SetFromPrivPos(ЦелУкз сам, inout Точка поз); extern (C) проц wxHtmlSelection_SetToPrivPos(ЦелУкз сам, inout Точка поз); extern (C) проц wxHtmlSelection_ClearPrivPos(ЦелУкз сам); extern (C) бул wxHtmlSelection_IsEmpty(ЦелУкз сам); //! \endcond //----------------------------------------------------------------------------- export class ВыделениеГЯР : ВизОбъект { export this(ЦелУкз вхобъ) { super(вхобъ); } private this(ЦелУкз вхобъ, бул памСобств) { super(вхобъ); this.памСобств = памСобств; } export this() { this(wxHtmlSelection_ctor(), да); } export static ВизОбъект Нов(ЦелУкз ptr) { return new ВыделениеГЯР(ptr); } //--------------------------------------------------------------------- override protected проц dtor() { wxHtmlSelection_dtor(вхобъ); } //---------------------------- export ~this(){this.dtor();} //---------------------------- //----------------------------------------------------------------------------- export проц установи(Точка позОт, ЯчейкаГЯР отЯчейки, Точка позДо, ЯчейкаГЯР доЯчейки) { wxHtmlSelection_Set(вхобъ, позОт, ВизОбъект.безопУк(отЯчейки), позДо, ВизОбъект.безопУк(доЯчейки)); } export проц установи(ЯчейкаГЯР отЯчейки, ЯчейкаГЯР доЯчейки) { wxHtmlSelection_Set2(вхобъ, ВизОбъект.безопУк(отЯчейки), ВизОбъект.безопУк(доЯчейки)); } //----------------------------------------------------------------------------- export ЯчейкаГЯР ячейкаОт() { return cast(ЯчейкаГЯР)найдиОбъект(wxHtmlSelection_GetFromCell(вхобъ), &ЯчейкаГЯР.Нов); } export ЯчейкаГЯР ячейкаДо() { return cast(ЯчейкаГЯР)найдиОбъект(wxHtmlSelection_GetToCell(вхобъ), &ЯчейкаГЯР.Нов); } //----------------------------------------------------------------------------- export Точка позОт() { Точка tpoint; wxHtmlSelection_GetFromPos(вхобъ, tpoint); return tpoint; } export Точка позДо() { Точка tpoint; wxHtmlSelection_GetToPos(вхобъ, tpoint); return tpoint; } //----------------------------------------------------------------------------- export Точка отПривПоз() { Точка tpoint; wxHtmlSelection_GetFromPrivPos(вхобъ, tpoint); return tpoint; } export проц отПривПоз(Точка значение) { wxHtmlSelection_SetFromPrivPos(вхобъ, значение); } export Точка доПривПоз() { Точка tpoint; wxHtmlSelection_GetToPrivPos(вхобъ, tpoint); return tpoint; } export проц доПривПоз(Точка значение) { wxHtmlSelection_SetToPrivPos(вхобъ, значение); } //----------------------------------------------------------------------------- export проц очистьПривПоз() { wxHtmlSelection_ClearPrivPos(вхобъ); } //----------------------------------------------------------------------------- export бул пуст() { return wxHtmlSelection_IsEmpty(вхобъ); } } //----------------------------------------------------------------------------- //! \cond EXTERN extern (C) ЦелУкз wxHtmlEasyPrinting_ctor(ткст имя, ЦелУкз родитель); extern (C) бул wxHtmlEasyPrinting_PreviewFile(ЦелУкз сам, ткст файлГЯР); extern (C) бул wxHtmlEasyPrinting_PreviewText(ЦелУкз сам, ткст текстГяр, ткст базПуть); extern (C) бул wxHtmlEasyPrinting_PrintFile(ЦелУкз сам, ткст файлГЯР); extern (C) бул wxHtmlEasyPrinting_PrintText(ЦелУкз сам, ткст текстГяр, ткст базПуть); //extern (C) проц wxHtmlEasyPrinting_PrinterSetup(ЦелУкз сам); extern (C) проц wxHtmlEasyPrinting_PageSetup(ЦелУкз сам); extern (C) проц wxHtmlEasyPrinting_SetHeader(ЦелУкз сам, ткст заголовок, цел страница); extern (C) проц wxHtmlEasyPrinting_SetFooter(ЦелУкз сам, ткст подвал, цел страница); extern (C) проц wxHtmlEasyPrinting_SetFonts(ЦелУкз сам, ткст нормФас, ткст фиксФас, цел* размы); extern (C) проц wxHtmlEasyPrinting_SetStandardFonts(ЦелУкз сам, цел размер, ткст нормФас, ткст фиксФас); extern (C) ЦелУкз wxHtmlEasyPrinting_GetPrintData(ЦелУкз сам); extern (C) ЦелУкз wxHtmlEasyPrinting_GetPageSetupData(ЦелУкз сам); //! \endcond //----------------------------------------------------------------------------- export class ЛёгкаяПечатьГЯР : ВизОбъект { public const цел НечётныеСтраницы = 0; public const цел ЧётныеСтраницы = 1; public const цел ВсеСтраницы = 2; //----------------------------------------------------------------------------- export this(ЦелУкз вхобъ) { super(вхобъ); } export this() { this("Printing", пусто); } export this(ткст имя) { this(имя, пусто); } export this(ткст имя, Окно родитОкно) { super(wxHtmlEasyPrinting_ctor(имя, ВизОбъект.безопУк(родитОкно))); } //----------------------------------------------------------------------------- export бул предпросмотрФайла(ткст файлГЯР) { return wxHtmlEasyPrinting_PreviewFile(вхобъ, файлГЯР); } //----------------------------------------------------------------------------- export бул предпросмотрТекста(ткст текстГяр) { return предпросмотрТекста(текстГяр, ""); } export бул предпросмотрТекста(ткст текстГяр, ткст базПуть) { return wxHtmlEasyPrinting_PreviewText(вхобъ, текстГяр, базПуть); } //----------------------------------------------------------------------------- export бул печатьФайла(ткст файлГЯР) { return wxHtmlEasyPrinting_PrintFile(вхобъ, файлГЯР); } //----------------------------------------------------------------------------- export бул печатьТекста(ткст текстГяр) { return печатьТекста(текстГяр, ""); } export бул печатьТекста(ткст текстГяр, ткст базПуть) { return wxHtmlEasyPrinting_PrintText(вхобъ, текстГяр, базПуть); } //----------------------------------------------------------------------------- /*export проц PrinterSetup() { wxHtmlEasyPrinting_PrinterSetup(вхобъ); }*/ //----------------------------------------------------------------------------- export проц настройкаСтраницы() { wxHtmlEasyPrinting_PageSetup(вхобъ); } //----------------------------------------------------------------------------- export проц устЗаголовок(ткст заголовок) { устЗаголовок(заголовок, ВсеСтраницы); } export проц устЗаголовок(ткст заголовок, цел страница) { wxHtmlEasyPrinting_SetHeader(вхобъ, заголовок, страница); } //----------------------------------------------------------------------------- export проц устПодвал(ткст подвал) { устПодвал(подвал, ВсеСтраницы); } export проц устПодвал(ткст подвал, цел страница) { wxHtmlEasyPrinting_SetFooter(вхобъ, подвал, страница); } //----------------------------------------------------------------------------- export проц устШрифты(ткст нормФас, ткст фиксФас) { устШрифты(нормФас, фиксФас, пусто); } export проц устШрифты(ткст нормФас, ткст фиксФас, цел[] размы) { wxHtmlEasyPrinting_SetFonts(вхобъ, нормФас, фиксФас, размы.ptr); } //----------------------------------------------------------------------------- export проц устСтандартнШрифты() { устСтандартнШрифты(-1, "", ""); } export проц устСтандартнШрифты(цел размер) { устСтандартнШрифты(размер, "", ""); } export проц устСтандартнШрифты(цел размер, ткст нормФас) { устСтандартнШрифты(размер, нормФас, ""); } export проц устСтандартнШрифты(цел размер, ткст нормФас, ткст фиксФас) { wxHtmlEasyPrinting_SetStandardFonts(вхобъ, размер, нормФас, фиксФас); } //----------------------------------------------------------------------------- export ДанныеПечати данныеПечати() { return cast(ДанныеПечати)найдиОбъект(wxHtmlEasyPrinting_GetPrintData(вхобъ), &ДанныеПечати.Нов); } //----------------------------------------------------------------------------- export ДанныеДиалогаНастройкиСтраницы данныеНастройкиСтраницы() { return cast(ДанныеДиалогаНастройкиСтраницы)найдиОбъект(wxHtmlEasyPrinting_GetPageSetupData(вхобъ), &ДанныеДиалогаНастройкиСтраницы.Нов); } } //----------------------------------------------------------------------------- //! \cond EXTERN extern (C) { alias проц function(ОкноГЯР объ, ЦелУкз ссылка) Virtual_OnLinkClicked; alias проц function(ОкноГЯР объ, ЦелУкз титул) Virtual_OnУстTitle; alias проц function(ОкноГЯР объ, ЦелУкз ячейка, цел x, цел y) Virtual_OnCellMouseHover; alias проц function(ОкноГЯР объ, ЦелУкз ячейка, цел x, цел y, ЦелУкз собМыши) Virtual_OnCellClicked; alias цел function(ОкноГЯР объ, цел тип, ЦелУкз улр, ЦелУкз переадр) Virtual_OnOpeningURL; } extern (C) ЦелУкз wxHtmlWindow_ctor(); extern (C) проц wxHtmlWindow_RegisterVirtual(ЦелУкз сам, ОкноГЯР объ, Virtual_OnLinkClicked onLinkClicked, Virtual_OnУстTitle onУстTitle, Virtual_OnCellMouseHover onCellMouseHover, Virtual_OnCellClicked onCellClicked, Virtual_OnOpeningURL onOpeningURL); extern (C) бул wxHtmlWindow_Create(ЦелУкз сам, ЦелУкз родитель, цел ид, inout Точка поз, inout Размер размер, бцел стиль, ткст имя); extern (C) бул wxHtmlWindow_SetPage(ЦелУкз сам, ткст исток); extern (C) бул wxHtmlWindow_AppendToPage(ЦелУкз сам, ткст исток); extern (C) бул wxHtmlWindow_LoadPage(ЦелУкз сам, ткст локация); extern (C) бул wxHtmlWindow_LoadFile(ЦелУкз сам, ткст имяф); extern (C) ЦелУкз wxHtmlWindow_GetOpenedPage(ЦелУкз сам); extern (C) ЦелУкз wxHtmlWindow_GetOpenedAnchor(ЦелУкз сам); extern (C) ЦелУкз wxHtmlWindow_GetOpenedPageTitle(ЦелУкз сам); extern (C) проц wxHtmlWindow_SetRelatedFrame(ЦелУкз сам, ЦелУкз рамка, ткст format); extern (C) ЦелУкз wxHtmlWindow_GetRelatedFrame(ЦелУкз сам); extern (C) проц wxHtmlWindow_SetRelatedStatusBar(ЦелУкз сам, цел bar); extern (C) проц wxHtmlWindow_SetFonts(ЦелУкз сам, ткст нормФас, ткст фиксФас, цел* размы); extern (C) проц wxHtmlWindow_SetBorders(ЦелУкз сам, цел с); extern (C) проц wxHtmlWindow_ReadCustomization(ЦелУкз сам, ЦелУкз кфг, ткст путь); extern (C) проц wxHtmlWindow_WriteCustomization(ЦелУкз сам, ЦелУкз кфг, ткст путь); extern (C) бул wxHtmlWindow_HistoryBack(ЦелУкз сам); extern (C) бул wxHtmlWindow_HistoryForward(ЦелУкз сам); extern (C) бул wxHtmlWindow_HistoryCanBack(ЦелУкз сам); extern (C) бул wxHtmlWindow_HistoryCanForward(ЦелУкз сам); extern (C) проц wxHtmlWindow_HistoryClear(ЦелУкз сам); extern (C) ЦелУкз wxHtmlWindow_GetInternalRepresentation(ЦелУкз сам); extern (C) проц wxHtmlWindow_AddFilter(ЦелУкз фильтр); extern (C) ЦелУкз wxHtmlWindow_GetParser(ЦелУкз сам); extern (C) проц wxHtmlWindow_AddProcessor(ЦелУкз сам, ЦелУкз процессор); extern (C) проц wxHtmlWindow_AddGlobalProcessor(ЦелУкз процессор); extern (C) бул wxHtmlWindow_AcceptsFocusFromKeyboard(ЦелУкз сам); extern (C) проц wxHtmlWindow_OnSetTitle(ЦелУкз сам, ткст титул); extern (C) проц wxHtmlWindow_OnCellClicked(ЦелУкз сам, ЦелУкз ячейка, цел x, цел y, ЦелУкз соб); extern (C) проц wxHtmlWindow_OnLinkClicked(ЦелУкз сам, ЦелУкз ссылка); extern (C) цел wxHtmlWindow_OnOpeningURL(ЦелУкз сам, цел тип, ткст улр, ткст переадр); extern (C) проц wxHtmlWindow_SelectAll(ЦелУкз сам); extern (C) проц wxHtmlWindow_SelectWord(ЦелУкз сам, inout Точка поз); extern (C) проц wxHtmlWindow_SelectLine(ЦелУкз сам, inout Точка поз); extern (C) ЦелУкз wxHtmlWindow_ToText(ЦелУкз сам); extern (C) ЦелУкз wxHtmlWindow_SelectionToText(ЦелУкз сам); //! \endcond //----------------------------------------------------------------------------- export class ОкноГЯР : ОкноСПрокруткой { public const цел БЕЗ_СКРОЛЛБАРА = 0x0002; public const цел АВТОСКРОЛЛБАР = 0x0004; public const цел БЕЗ_ВЫДЕЛЕНИЯ = 0x0008; //----------------------------------------------------------------------------- export this(ЦелУкз вхобъ) { super(вхобъ); } export this() { super(wxHtmlWindow_ctor()); } export this(Окно родитель, цел ид /*= ЛЮБОЙ*/, Точка поз = ДЕФПОЗ, Размер размер = ДЕФРАЗМ, цел стиль = АВТОСКРОЛЛБАР, ткст имя = "htmlWindow") { super(wxHtmlWindow_ctor()); wxHtmlWindow_RegisterVirtual(вхобъ, this, &staticDoOnLinkClicked, &staticDoOnSetTitle, &staticDoOnCellMouseHover, &staticDoOnCellClicked, &staticDoOnOpeningURL ); if (!создай(родитель, ид, поз, размер, стиль, имя)) { throw new ИсклНевернОперации("Не удалось создать ОкноГЯР"); } } //--------------------------------------------------------------------- // ctors with сам created ид export this(Окно родитель, Точка поз = ДЕФПОЗ, Размер размер = ДЕФРАЗМ, цел стиль = АВТОСКРОЛЛБАР, ткст имя = "htmlWindow") { this(родитель, Окно.уникИд, поз, размер, стиль, имя); } //----------------------------------------------------------------------------- export override бул создай(Окно родитель, цел ид, inout Точка поз, inout Размер размер, цел стиль, ткст имя) { return wxHtmlWindow_Create(вхобъ, ВизОбъект.безопУк(родитель), ид, поз, размер, cast(бцел)стиль, имя); } //----------------------------------------------------------------------------- export бул устСтраницу(ткст исток) { return wxHtmlWindow_SetPage(вхобъ, исток); } export бул приставьКСтранице(ткст исток) { return wxHtmlWindow_AppendToPage(вхобъ, исток); } //----------------------------------------------------------------------------- export бул загрузиСтраницу(ткст локация) { return wxHtmlWindow_LoadPage(вхобъ, локация); } export бул загрузиФайл(ткст имяф) { return wxHtmlWindow_LoadFile(вхобъ, имяф); } //----------------------------------------------------------------------------- export ткст открытаяСтраница() { return cast(ткст) new ВизТкст(wxHtmlWindow_GetOpenedPage(вхобъ), да); } export ткст открытыйЯкорь() { return cast(ткст) new ВизТкст(wxHtmlWindow_GetOpenedAnchor(вхобъ), да); } export ткст титулОткрытойСтраницы() { return cast(ткст) new ВизТкст(wxHtmlWindow_GetOpenedPageTitle(вхобъ), да); } //----------------------------------------------------------------------------- export проц устОтносящРамку(Рамка рамка, ткст format) { wxHtmlWindow_SetRelatedFrame(вхобъ, ВизОбъект.безопУк(рамка), format); } export Рамка относящРамка() { return cast(Рамка)найдиОбъект(wxHtmlWindow_GetRelatedFrame(вхобъ), &Рамка.Нов); } //----------------------------------------------------------------------------- export проц относящСтатусбар(цел значение) { wxHtmlWindow_SetRelatedStatusBar(вхобъ, значение); } //----------------------------------------------------------------------------- export проц устШрифты(ткст нормФас, ткст фиксФас, цел[] размы) { wxHtmlWindow_SetFonts(вхобъ, нормФас, фиксФас, размы.ptr); } //----------------------------------------------------------------------------- export проц бордюры(цел значение) { wxHtmlWindow_SetBorders(вхобъ, значение); } //----------------------------------------------------------------------------- export проц читайКустомизацию(Конфиг кфг, ткст путь) { wxHtmlWindow_ReadCustomization(вхобъ, ВизОбъект.безопУк(кфг), путь); } //----------------------------------------------------------------------------- export проц пишиКустомизацию(Конфиг кфг, ткст путь) { wxHtmlWindow_WriteCustomization(вхобъ, ВизОбъект.безопУк(кфг), путь); } //----------------------------------------------------------------------------- export бул историяНазад() { return wxHtmlWindow_HistoryBack(вхобъ); } export бул историяВперёд() { return wxHtmlWindow_HistoryForward(вхобъ); } export бул историяМожноНазад() { return wxHtmlWindow_HistoryCanBack(вхобъ); } export бул историяМожноВперёд() { return wxHtmlWindow_HistoryCanForward(вхобъ); } export проц историяОчисти() { wxHtmlWindow_HistoryClear(вхобъ); } //----------------------------------------------------------------------------- export ЯчейкаКонтейнераГЯР внутрПредставление() { return cast(ЯчейкаКонтейнераГЯР)найдиОбъект(wxHtmlWindow_GetInternalRepresentation(вхобъ), &ЯчейкаКонтейнераГЯР.Нов); } //----------------------------------------------------------------------------- export static проц добавьФильтр(ФильтрГЯР фильтр) { wxHtmlWindow_AddFilter(ВизОбъект.безопУк(фильтр)); } //----------------------------------------------------------------------------- export ПарсерГЯРОкна парсер() { return cast(ПарсерГЯРОкна)найдиОбъект(wxHtmlWindow_GetParser(вхобъ), &ПарсерГЯРОкна.Нов); } //----------------------------------------------------------------------------- export проц добавьПроцессор(ПроцессорГЯР процессор) { wxHtmlWindow_AddProcessor(вхобъ, ВизОбъект.безопУк(процессор)); } export static проц добавьГлобПроцессор(ПроцессорГЯР процессор) { wxHtmlWindow_AddGlobalProcessor(ВизОбъект.безопУк(процессор)); } //----------------------------------------------------------------------------- export override бул фокусируемоПоКлавиатуре() { return wxHtmlWindow_AcceptsFocusFromKeyboard(вхобъ); } //----------------------------------------------------------------------------- static export extern(C) проц staticDoOnSetTitle(ОкноГЯР объ, ЦелУкз титул) { объ.приУстановкеТитула(cast(ткст) new ВизТкст(титул)); } export проц приУстановкеТитула(ткст титул) { wxHtmlWindow_OnSetTitle(вхобъ, титул); } //----------------------------------------------------------------------------- static export extern(C) проц staticDoOnCellMouseHover(ОкноГЯР объ, ЦелУкз ячейка, цел x, цел y) { объ.приМышьНадЯчейкой(new ЯчейкаГЯР(ячейка), x, y); } export проц приМышьНадЯчейкой(ЯчейкаГЯР ячейка, цел x, цел y) { // Do nothing here } //----------------------------------------------------------------------------- static export extern(C) проц staticDoOnCellClicked(ОкноГЯР объ, ЦелУкз ячейка, цел x, цел y, ЦелУкз собМыши) { объ.приНажатииЯчейки(new ЯчейкаГЯР(ячейка), x, y, new СобытиеМыши(собМыши)); } export проц приНажатииЯчейки(ЯчейкаГЯР ячейка, цел x, цел y, СобытиеМыши соб) { wxHtmlWindow_OnCellClicked(вхобъ, ВизОбъект.безопУк(ячейка), x, y, ВизОбъект.безопУк(соб)); } //----------------------------------------------------------------------------- static export extern(C) проц staticDoOnLinkClicked(ОкноГЯР объ, ЦелУкз ссылка) { объ.приНажатииСсылки(new ИнфОСсылкеГЯР(ссылка)); } export проц приНажатииСсылки(ИнфОСсылкеГЯР ссылка) { wxHtmlWindow_OnLinkClicked(вхобъ, ВизОбъект.безопУк(ссылка)); } //----------------------------------------------------------------------------- static export extern(C) цел staticDoOnOpeningURL(ОкноГЯР объ, цел тип, ЦелУкз улр, ЦелУкз переадр) { return cast(цел)объ.приОткрытииУЛР(cast(ПтипУЛРГЯР) тип, cast(ткст) new ВизТкст(улр), cast(ткст) new ВизТкст(переадр)); } export ПСтатусОткрыванияГЯР приОткрытииУЛР(ПтипУЛРГЯР тип, ткст улр, ткст переадр) { return cast(ПСтатусОткрыванияГЯР)wxHtmlWindow_OnOpeningURL(вхобъ, cast(цел)тип, улр, переадр); } //----------------------------------------------------------------------------- export проц выделиВсе() { wxHtmlWindow_SelectAll(вхобъ); } //----------------------------------------------------------------------------- export проц выделиСтроку(Точка поз) { wxHtmlWindow_SelectLine(вхобъ, поз); } //----------------------------------------------------------------------------- export проц выделиСлово(Точка поз) { wxHtmlWindow_SelectWord(вхобъ, поз); } //----------------------------------------------------------------------------- export ткст текст() { return cast(ткст) new ВизТкст(wxHtmlWindow_ToText(вхобъ), да); } //----------------------------------------------------------------------------- export ткст текстВыделения() { return cast(ткст) new ВизТкст(wxHtmlWindow_SelectionToText(вхобъ), да); } }
D
/* Cockos WDL License Copyright (C) 2005 - 2015 Cockos Incorporated Copyright (C) 2015 - 2016 Auburn Sounds Portions copyright other contributors, see each source file for more information This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 1. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 1. This notice may not be removed or altered from any source distribution. */ /** Win32 window implementation. */ module dplug.window.win32window; import std.process, std.string, std.conv; import dplug.math.vector; import dplug.math.box; import dplug.core.runtime; import dplug.core.nogc; import dplug.core.vec; import dplug.graphics.image; import dplug.window.window; nothrow: @nogc: // Disabled, remaining issues in #536 // - very few hosts actually give the needed DPI // - resizing that window is in some cases a challenge // - using "mixed" DPI support to force Hi-DPI looks like a bad idea // - not always easy to resize the child window // - need testing in Windows 8 or something where some calls are missing enum DPISupportWin32 = false; version(Windows) { import std.uuid; import dplug.core.random; import core.sys.windows.windef; import core.sys.windows.winuser; import core.sys.windows.winbase; import core.sys.windows.wingdi; HINSTANCE getModuleHandle() nothrow @nogc { return GetModuleHandleA(null); } final class Win32Window : IWindow { public: nothrow: @nogc: this(HWND parentWindow, IWindowListener listener, int width, int height) { _wndClass.style = CS_DBLCLKS | CS_OWNDC | CS_VREDRAW | CS_HREDRAW; _wndClass.lpfnWndProc = &windowProcCallback; _wndClass.cbClsExtra = 0; _wndClass.cbWndExtra = 0; _wndClass.hInstance = getModuleHandle(); _wndClass.hIcon = null; _wndClass.hCursor = LoadCursor(null, IDC_ARROW); _wndClass.hbrBackground = null; _wndClass.lpszMenuName = null; // Generates an unique class name generateClassName(); _wndClass.lpszClassName = _className.ptr; if (!RegisterClassW(&_wndClass)) { assert(false, "Couldn't register Win32 class"); } DWORD flags = 0; if (parentWindow != null) flags |= WS_CHILD; else parentWindow = GetDesktopWindow(); _hwnd = CreateWindowW(_className.ptr, null, flags, CW_USEDEFAULT, CW_USEDEFAULT, width, height, parentWindow, null, getModuleHandle(), cast(void*)this); if (_hwnd is null) { assert(false, "Couldn't create a Win32 window"); } // Create update region _updateRegion = CreateRectRgn(0, 0, 0, 0); _clipRegion = CreateRectRgn(0, 0, 0, 0); _updateRgbBuf = makeVec!ubyte(); _updateRects = makeVec!box2i(); _listener = listener; // Sets this as user data SetWindowLongPtrA(_hwnd, GWLP_USERDATA, cast(LONG_PTR)( cast(void*)this )); if (_listener !is null) // we are interested in custom behavior { int mSec = 15; // refresh at 60 hz if possible SetTimer(_hwnd, TIMER_ID, mSec, null); } // Resize if DPI is supported. if (DPISupportWin32) { _dpiSupport.initialize(); _currentDPI = _dpiSupport.GetDpiForWindow(_hwnd) / 96.0f; //MAYDO resize for DPI //resizeWindowForDPI(); } ShowWindow(_hwnd, SW_SHOW); SetFocus(_hwnd); // Get performance counter frequency LARGE_INTEGER performanceFrequency; BOOL res = QueryPerformanceFrequency(&performanceFrequency); assert(res != 0); // since XP it is always supported _performanceCounterDivider = performanceFrequency.QuadPart; // Get reference time _timeAtCreationInMs = getTimeMs(); _lastMeasturedTimeInMs = _timeAtCreationInMs; // Do we need the FLStudio bridge work-around? // Detect if we are under FLStudio's bridge. _useFLStudioBridgeWorkaround = false; HMODULE hmodule = GetModuleHandle(NULL); if (hmodule !is NULL) { char[256] path; int len = GetModuleFileNameA(hmodule, path.ptr, 256); if (len >= 12) { _useFLStudioBridgeWorkaround = path[len - 12 .. len] == "ilbridge.exe"; } } } ~this() { if (_hwnd != null) { DestroyWindow(_hwnd); _hwnd = null; // Unregister the window class, which was unique UnregisterClassW(_wndClass.lpszClassName, getModuleHandle()); } if (_updateRegion != null) { DeleteObject(_updateRegion); _updateRegion = null; } if (_clipRegion != null) { DeleteObject(_clipRegion); _clipRegion = null; } } /// Returns: true if window size changed. /// Update internal buffers, if needed. bool updateInternalSize() { RECT winsize; BOOL res = GetClientRect(_hwnd, &winsize); if (res == 0) { assert(false, "GetClientRect failed"); } int newWidth = winsize.right - winsize.left; int newHeight = winsize.bottom - winsize.top; // only do something if the client size has changed if (newWidth != _width || newHeight != _height) { _width = newWidth; _height = newHeight; _sizeSet = true; _wfb = _listener.onResized(_width, _height); return true; } else return false; } override bool requestResize(int widthLogicalPixels, int heightLogicalPixels, bool alsoResizeParentWindow) { assert(!alsoResizeParentWindow); // doesn't work in Cubase, so the whole workaround is disabled UINT flags = SWP_NOACTIVATE | SWP_NOZORDER | SWP_NOOWNERZORDER | SWP_NOMOVE | SWP_NOCOPYBITS; // discard entire content of the client area RECT formerClient; GetClientRect(_hwnd, &formerClient); int dw = widthLogicalPixels - (formerClient.right - formerClient.left); int dh = heightLogicalPixels - (formerClient.bottom - formerClient.top); HWND parent = null; RECT parentClient; HWND gparent = null; RECT gparentClient; if (alsoResizeParentWindow) { if (IsChildWindow(_hwnd)) { parent = GetParent(_hwnd); GetClientRect(parent, &parentClient); if (IsChildWindow(parent)) { gparent = GetParent(_hwnd); GetClientRect(gparent, &gparentClient); } } } BOOL r = SetWindowPos(_hwnd, null, 0, 0, 0 + widthLogicalPixels, 0 + heightLogicalPixels, flags); bool result = r != 0; if (parent !is null) { int parentWidth = (parentClient.right - parentClient.left) + dw; int parentHeight = (parentClient.bottom - parentClient.top) + dh; SetWindowPos(parent, null, 0, 0, 0 + parentWidth, 0 + parentHeight, SWP_NOZORDER | SWP_NOMOVE | SWP_NOACTIVATE); } if (gparent !is null) { int gparentWidth = (gparentClient.right - gparentClient.left) + dw; int gparentHeight = (gparentClient.bottom - gparentClient.top) + dh; SetWindowPos(gparent, null, 0, 0, 0 + gparentWidth, 0 + gparentHeight, SWP_NOZORDER | SWP_NOMOVE | SWP_NOACTIVATE); } return result; } LRESULT windowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) { // because DispatchMessage is called by host, we don't know which thread comes here ScopedForeignCallback!(true, true) scopedCallback; scopedCallback.enter(); if (_listener is null) return DefWindowProc(hwnd, uMsg, wParam, lParam); switch (uMsg) { case WM_KEYDOWN: case WM_KEYUP: { bool handled = false; shiftPressed = GetKeyState(VK_SHIFT) < 0; Key key = vkToKey(wParam, shiftPressed); if (uMsg == WM_KEYDOWN) { if (_listener.onKeyDown(key)) { handled = true; } } else { if (_listener.onKeyUp(key)) { handled = true; } } if (!handled) { // TODO: looks fishy, why GA_ROOT instead of GA_PARENT? // key is passed to the most-parent window HWND rootHWnd = GetAncestor(hwnd, GA_ROOT); if (rootHWnd != hwnd) // send message up the chain if not self (not hosting) { SendMessage(rootHWnd, uMsg, wParam, lParam); return DefWindowProc(hwnd, uMsg, wParam, lParam); } else return DefWindowProc(hwnd, uMsg, wParam, lParam); } else return 0; } case WM_SETCURSOR: { // In case the cursor was modified by another window, restore the cursor. // This is done differently depending on whether we want a modifed cursor ourselves. // Easily tested in REAPER by hovering over the left border of // the plugin: this turn the custor into a resize arrow. version(legacyMouseCursor) { goto default; } else return setMouseCursor(true); } case WM_MOUSEMOVE: { // See Dplug #378, important to sign-extend for multiple monitors int newMouseX = cast(int)(lParam << 16) >> 16; int newMouseY = ( cast(int)lParam ) >> 16; int dx = newMouseX - _mouseX; int dy = newMouseY - _mouseY; _listener.onMouseMove(newMouseX, newMouseY, dx, dy, getMouseState(wParam)); _mouseX = newMouseX; _mouseY = newMouseY; setMouseCursor(false); // Track when mouse exit the window if (!_mouseTracking) { // Enable mouse tracking. TRACKMOUSEEVENT tme; tme.cbSize = tme.sizeof; tme.hwndTrack = hwnd; tme.dwFlags = TME_LEAVE; tme.dwHoverTime = HOVER_DEFAULT; TrackMouseEvent(&tme); _mouseTracking = true; } return 0; } case WM_SETFOCUS: { return 0; } case WM_KILLFOCUS: { return 0; } case WM_MOUSEWHEEL: { // See Dplug #378, important to sign-extend for multiple monitors int mouseX = cast(int)(lParam << 16) >> 16; int mouseY = ( cast(int)lParam ) >> 16; // Mouse positions we are getting are not relative to the client area RECT r; GetWindowRect(hwnd, &r); mouseX -= r.left; mouseY -= r.top; int wheelDeltaY = cast(short)((wParam & 0xffff0000) >> 16) / WHEEL_DELTA; if (_listener.onMouseWheel(mouseX, mouseY, 0, wheelDeltaY, getMouseState(wParam))) { return 0; // handled } goto default; } case WM_RBUTTONDOWN: case WM_RBUTTONDBLCLK: { if (mouseClick(_mouseX, _mouseY, MouseButton.right, uMsg == WM_RBUTTONDBLCLK, wParam)) return 0; // handled goto default; } case WM_LBUTTONDOWN: case WM_LBUTTONDBLCLK: { if (mouseClick(_mouseX, _mouseY, MouseButton.left, uMsg == WM_LBUTTONDBLCLK, wParam)) return 0; // handled goto default; } case WM_MBUTTONDOWN: case WM_MBUTTONDBLCLK: { if (mouseClick(_mouseX, _mouseY, MouseButton.middle, uMsg == WM_MBUTTONDBLCLK, wParam)) return 0; // handled goto default; } // X1/X2 buttons case WM_XBUTTONDOWN: case WM_XBUTTONDBLCLK: { auto mb = (wParam >> 16) == 1 ? MouseButton.x1 : MouseButton.x2; if (mouseClick(_mouseX, _mouseY, mb, uMsg == WM_XBUTTONDBLCLK, wParam)) return 0; goto default; } case WM_RBUTTONUP: if (mouseRelease(_mouseX, _mouseY, MouseButton.right, wParam)) return 0; goto default; case WM_LBUTTONUP: if (mouseRelease(_mouseX, _mouseY, MouseButton.left, wParam)) return 0; goto default; case WM_MBUTTONUP: if (mouseRelease(_mouseX, _mouseY, MouseButton.middle, wParam)) return 0; goto default; case WM_XBUTTONUP: { auto mb = (wParam >> 16) == 1 ? MouseButton.x1 : MouseButton.x2; if (mouseRelease(_mouseX, _mouseY, mb, wParam)) return 0; goto default; } case WM_CAPTURECHANGED: _listener.onMouseCaptureCancelled(); setMouseCursor(true); goto default; case WM_MOUSELEAVE: _listener.onMouseExitedWindow(); _mouseTracking = false; return 0; case WM_SIZE: case WM_SHOWWINDOW: { // This get the size of the client area, and then tells the listener about the new size. updateInternalSize(); goto default; } case WM_PAINT: { // Internal size must have been set. assert(_sizeSet); // Same thing that under Cocoa and Linux, the first WM_PAINT could happen before WM_TIMER is ever called. // In this case, call `recomputeDirtyAreas()` so that onDraw draw something and uninitialized pixels are not displayed. // See Issue #523 and #572. if (_dirtyAreasAreNotYetComputed) { _dirtyAreasAreNotYetComputed = false; _listener.recomputeDirtyAreas(); } // Renders UI. // FUTURE: This could be done in a separate thread? // For efficiency purpose, render in BGRA for Windows // We do it here, but note that redrawing has nothing to do with WM_PAINT specifically, // we just need to wait for it here. _listener.onDraw(WindowPixelFormat.BGRA8); // Get the update region int type = GetUpdateRgn(hwnd, _updateRegion, FALSE); assert (type != ERROR); // Begin painting PAINTSTRUCT paintStruct; HDC hdc = BeginPaint(_hwnd, &paintStruct); HRGN regionToUpdate = _updateRegion; // FLStudio compatibility // Try to get the DC's clipping region, which may be larger in the case of FLStudio's bridge. if (_useFLStudioBridgeWorkaround) { if ( GetClipRgn(hdc, _clipRegion) == 1) regionToUpdate = _clipRegion; } // Get needed number of bytes DWORD bytes = GetRegionData(regionToUpdate, 0, null); _updateRgbBuf.resize(bytes); if (bytes == GetRegionData(regionToUpdate, bytes, cast(RGNDATA*)(_updateRgbBuf.ptr))) { // Get rectangles to update visually from the update region ubyte* buf = _updateRgbBuf.ptr; RGNDATAHEADER* header = cast(RGNDATAHEADER*)buf; assert(header.iType == RDH_RECTANGLES); _updateRects.clearContents(); RECT* pRect = cast(RECT*)(buf + RGNDATAHEADER.sizeof); alias wfb = _wfb; for (int r = 0; r < header.nCount; ++r) { int left = pRect[r].left; int top = pRect[r].top; int right = pRect[r].right; int bottom = pRect[r].bottom; _updateRects.pushBack(box2i(left, top, right, bottom)); } static int byteStride(int width) pure nothrow @nogc @safe { enum scanLineAlignment = 4; int widthInBytes = width * 4; return (widthInBytes + (scanLineAlignment - 1)) & ~(scanLineAlignment-1); } // Note: the pitch of the displayed image _has_ to follow `byteStride`. // SetDIBitsToDevice doesn't seem to take arbitrary pitch assert(wfb.pitch == byteStride(wfb.w)); BITMAPINFOHEADER bmi = BITMAPINFOHEADER.init; // fill with zeroes with (bmi) { biSize = BITMAPINFOHEADER.sizeof; biWidth = wfb.w; biHeight = -wfb.h; biPlanes = 1; biCompression = BI_RGB; biXPelsPerMeter = 72; biYPelsPerMeter = 72; biBitCount = 32; biSizeImage = cast(int)(wfb.pitch) * wfb.h; } foreach(box2i area; _updateRects) { if (area.width() <= 0 || area.height() <= 0) continue; // nothing to update SetDIBitsToDevice(hdc, area.min.x, area.min.y, area.width, area.height, area.min.x, -area.min.y - area.height + wfb.h, 0, wfb.h, wfb.pixels, cast(BITMAPINFO *)&bmi, DIB_RGB_COLORS); } } else assert(false); EndPaint(_hwnd, &paintStruct); return 0; } case WM_ERASEBKGND: { // This fails, so cause this window's WM_PAINT to be responsible for erasing background, // hence saving a bit of performance. return 1; } case WM_CLOSE: { this.destroyNoGC(); return 0; } case WM_TIMER: { if (wParam == TIMER_ID) { uint now = getTimeMs(); double dt = (now - _lastMeasturedTimeInMs) * 0.001; double time = (now - _timeAtCreationInMs) * 0.001; // hopefully no plug-in will be open more than 49 days _lastMeasturedTimeInMs = now; _listener.onAnimate(dt, time); _listener.recomputeDirtyAreas(); _dirtyAreasAreNotYetComputed = false; box2i dirtyRect = _listener.getDirtyRectangle(); if (!dirtyRect.empty()) { RECT r = RECT(dirtyRect.min.x, dirtyRect.min.y, dirtyRect.max.x, dirtyRect.max.y); InvalidateRect(_hwnd, &r, FALSE); // FUTURE: invalidate rects one by one // See issue #432 and #269 // To avoid blocking WM_TIMER with expensive WM_PAINT, it's important NOT to enqueue manually a // WM_PAINT here. Let Windows do its job of sending WM_PAINT when needed. } } return 0; } default: return DefWindowProcA(hwnd, uMsg, wParam, lParam); } } // Implements IWindow override void waitEventAndDispatch() { MSG msg; int ret = GetMessageW(&msg, _hwnd, 0, 0); // no range filtering if (ret == -1) assert(false, "Error while in GetMessage"); TranslateMessage(&msg); DispatchMessageW(&msg); } override bool terminated() { return _terminated; } override uint getTimeMs() { LARGE_INTEGER perfCounter; BOOL err = QueryPerformanceCounter(&perfCounter); assert(err != 0); // always supported since XP double time = (perfCounter.QuadPart * 1000 + (_performanceCounterDivider >> 1)) / cast(double)_performanceCounterDivider; return cast(uint)(time); } override void* systemHandle() { return cast(void*)( cast(size_t)_hwnd ); } private: enum TIMER_ID = 144; HWND _hwnd; WNDCLASSW _wndClass; HRGN _updateRegion; HRGN _clipRegion; bool _useFLStudioBridgeWorkaround; Vec!ubyte _updateRgbBuf; Vec!box2i _updateRects; long _performanceCounterDivider; uint _timeAtCreationInMs; uint _lastMeasturedTimeInMs; bool _sizeSet = false; IWindowListener _listener; // contract: _listener must only be used in the message callback ImageRef!RGBA _wfb; // framebuffer reference bool _terminated = false; int _width = 0; int _height = 0; int _mouseX = 0; int _mouseY = 0; bool _mouseTracking = false; bool shiftPressed = false; bool _dirtyAreasAreNotYetComputed = true; // Helper for getting DPI information. DPIHelper _dpiSupport; // Current UI scale, 1.0f means default DPI (96). // See_also: https://www.enlyze.com/blog/writing-win32-apps-like-its-2020/part-3/ float _currentDPI = 1.0f; // Last MouseCursor used. This is to avoid updating the cursor // more often than necessary // Default value of pointer MouseCursor _lastMouseCursor = MouseCursor.pointer; /// Propagates mouse events. /// Returns: true if event handled. bool mouseClick(int mouseX, int mouseY, MouseButton mb, bool isDoubleClick, WPARAM wParam) { SetFocus(_hwnd); // get keyboard focus SetCapture(_hwnd); // start mouse capture bool consumed = _listener.onMouseClick(mouseX, mouseY, mb, isDoubleClick, getMouseState(wParam)); return consumed; } /// ditto bool mouseRelease(int mouseX, int mouseY, MouseButton mb, WPARAM wParam) { ReleaseCapture(); bool consumed = _listener.onMouseRelease(mouseX, mouseY, mb, getMouseState(wParam)); return consumed; } wchar[43] _className; // Zero-terminated class name void generateClassName() nothrow @nogc { generateNullTerminatedRandomUUID!wchar(_className, "dplug_"w); } int setMouseCursor(bool forceUpdate) { version(legacyMouseCursor) {} else { MouseCursor cursor = _listener.getMouseCursor(); if((cursor != _lastMouseCursor) || forceUpdate ) { CURSORINFO pci; pci.cbSize = CURSORINFO.sizeof; GetCursorInfo(&pci); // If the cursor we want to display is "hidden" and the cursor is being shown // then we will hide the cursor. // If the cursor we want to display is anything other than "hidden" and the // cursor is being hidden already, we will set it to show // (this triggers a WM_SETCURSOR which will call this to set the cursor) // lastly if the above conditions are false then we will set the cursor if(cursor == MouseCursor.hidden && pci.flags == CURSOR_SHOWING) { ShowCursor(false); } else if(cursor != MouseCursor.hidden && pci.flags == 0) { ShowCursor(true); } else { auto cursorId = mouseCursorToCursorId(cursor); HCURSOR hc = LoadCursorA(NULL, cast(const(char)*)cursorId); SetCursor(hc); } _lastMouseCursor = cursor; return 1; } } return 0; } } extern(Windows) nothrow { LRESULT windowProcCallback(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) { Win32Window window = cast(Win32Window)( cast(void*)(GetWindowLongPtrA(hwnd, GWLP_USERDATA)) ); if (window !is null) return window.windowProc(hwnd, uMsg, wParam, lParam); else return DefWindowProcA(hwnd, uMsg, wParam, lParam); } } Key vkToKey(WPARAM vk, bool shiftPressed)pure nothrow @nogc { switch (vk) { case VK_SPACE: return Key.space; case VK_UP: return Key.upArrow; case VK_DOWN: return Key.downArrow; case VK_LEFT: return Key.leftArrow; case VK_RIGHT: return Key.rightArrow; case VK_NUMPAD0: return Key.digit0; case VK_NUMPAD1: return Key.digit1; case VK_NUMPAD2: return Key.digit2; case VK_NUMPAD3: return Key.digit3; case VK_NUMPAD4: return Key.digit4; case VK_NUMPAD5: return Key.digit5; case VK_NUMPAD6: return Key.digit6; case VK_NUMPAD7: return Key.digit7; case VK_NUMPAD8: return Key.digit8; case VK_NUMPAD9: return Key.digit9; case 0x30: return Key.digit0; case 0x31: return Key.digit1; case 0x32: return Key.digit2; case 0x33: return Key.digit3; case 0x34: return Key.digit4; case 0x35: return Key.digit5; case 0x36: return Key.digit6; case 0x37: return Key.digit7; case 0x38: return Key.digit8; case 0x39: return Key.digit9; case 0x41: return shiftPressed ? Key.A : Key.a; case 0x42: return shiftPressed ? Key.B : Key.b; case 0x43: return shiftPressed ? Key.C : Key.c; case 0x44: return shiftPressed ? Key.D : Key.d; case 0x45: return shiftPressed ? Key.E : Key.e; case 0x46: return shiftPressed ? Key.F : Key.f; case 0x47: return shiftPressed ? Key.G : Key.g; case 0x48: return shiftPressed ? Key.H : Key.h; case 0x49: return shiftPressed ? Key.I : Key.i; case 0x4A: return shiftPressed ? Key.J : Key.j; case 0x4B: return shiftPressed ? Key.K : Key.k; case 0x4C: return shiftPressed ? Key.L : Key.l; case 0x4D: return shiftPressed ? Key.M : Key.m; case 0x4E: return shiftPressed ? Key.N : Key.n; case 0x4F: return shiftPressed ? Key.O : Key.o; case 0x50: return shiftPressed ? Key.P : Key.p; case 0x51: return shiftPressed ? Key.Q : Key.q; case 0x52: return shiftPressed ? Key.R : Key.r; case 0x53: return shiftPressed ? Key.S : Key.s; case 0x54: return shiftPressed ? Key.T : Key.t; case 0x55: return shiftPressed ? Key.U : Key.u; case 0x56: return shiftPressed ? Key.V : Key.v; case 0x57: return shiftPressed ? Key.W : Key.w; case 0x58: return shiftPressed ? Key.X : Key.x; case 0x59: return shiftPressed ? Key.Y : Key.y; case 0x5A: return shiftPressed ? Key.Z : Key.z; case VK_BACK: return Key.backspace; case VK_RETURN: return Key.enter; case VK_ESCAPE: return Key.escape; default: return Key.unsupported; } } SHORT keyState(int vk) { version(AAX) return GetAsyncKeyState(VK_MENU); else return GetKeyState(VK_MENU); } static MouseState getMouseState(WPARAM wParam) { return MouseState( (wParam & MK_LBUTTON) != 0, (wParam & MK_RBUTTON) != 0, (wParam & MK_MBUTTON) != 0, (wParam & MK_XBUTTON1) != 0, (wParam & MK_XBUTTON2) != 0, (wParam & MK_CONTROL) != 0, (wParam & MK_SHIFT) != 0, keyState(VK_MENU) < 0 ); } HCURSOR mouseCursorToCursorId(MouseCursor cursor) { switch(cursor) { case cursor.linkSelect: case cursor.drag: return IDC_CROSS; case cursor.move: return IDC_HAND; case cursor.horizontalResize: return IDC_SIZEWE; case cursor.verticalResize: return IDC_SIZENS; case cursor.diagonalResize: return IDC_SIZENWSE; case cursor.pointer: default: return IDC_ARROW; } } // Copyright 2013 The Flutter Authors. All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, // are permitted provided that the following conditions are met: // // * Redistributions of source code must retain the above copyright // notice, this list of conditions and the following disclaimer. // * 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. // * Neither the name of Google Inc. nor the names of its // contributors may be used to endorse or promote products derived // from this software without specific prior written permission. // // 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 OWNER 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. /// A helper class for abstracting various Windows DPI related functions across /// Windows OS versions. private struct DPIHelper { public: nothrow: @nogc: void initialize() { if ((user32_module_ = LoadLibraryA("User32.dll")) != null) { get_dpi_for_window_ = cast(GetDpiForWindow_t) GetProcAddress(user32_module_, "GetDpiForWindow".ptr); dpi_for_window_supported_ = get_dpi_for_window_ !is null; set_thread_dpi_awareness_context = cast(SetThreadDpiAwarenessContext_t) GetProcAddress(user32_module_, "SetThreadDpiAwarenessContext".ptr); set_thread_dpi_hosting_behavior = cast(SetThreadDpiHostingBehavior_t) GetProcAddress(user32_module_, "SetThreadDpiHostingBehavior".ptr); } if ((shlib_module_ = LoadLibraryA("Shcore.dll")) != null) { get_dpi_for_monitor_ = cast(GetDpiForMonitor_t) GetProcAddress(shlib_module_, "GetDpiForMonitor".ptr); dpi_for_monitor_supported_ = get_dpi_for_monitor_ !is null; } } ~this() { if (user32_module_ != null) { FreeLibrary(user32_module_); user32_module_ = null; } if (shlib_module_ != null) { FreeLibrary(shlib_module_); shlib_module_ = null; } } private: extern(Windows) nothrow @nogc { alias GetDpiForWindow_t = UINT function(HWND); alias GetDpiForMonitor_t = HRESULT function(HMONITOR hmonitor, UINT dpiType, UINT* dpiX, UINT* dpiY); alias EnableNonClientDpiScaling_t = BOOL function(HWND); alias SetThreadDpiAwarenessContext_t = DPI_AWARENESS_CONTEXT function(DPI_AWARENESS_CONTEXT); alias SetThreadDpiHostingBehavior_t = DPI_HOSTING_BEHAVIOR function(DPI_HOSTING_BEHAVIOR); } GetDpiForWindow_t get_dpi_for_window_; GetDpiForMonitor_t get_dpi_for_monitor_; SetThreadDpiAwarenessContext_t set_thread_dpi_awareness_context; SetThreadDpiHostingBehavior_t set_thread_dpi_hosting_behavior; EnableNonClientDpiScaling_t enable_non_client_dpi_scaling_; HMODULE user32_module_ = null; HMODULE shlib_module_ = null; bool dpi_for_window_supported_ = false; bool dpi_for_monitor_supported_ = false; /// Returns the DPI for |hwnd|. Supports all DPI awareness modes, and is /// backward compatible down to Windows Vista. If |hwnd| is nullptr, returns /// the DPI for the primary monitor. If Per-Monitor DPI awareness is not /// available, returns the system's DPI. UINT GetDpiForWindow(HWND hwnd) { // GetDpiForWindow returns the DPI for any awareness mode. If not available, // or no |hwnd| is provided, fallback to a per monitor, system, or default // DPI. if (dpi_for_window_supported_ && hwnd != null) { return get_dpi_for_window_(hwnd); } if (dpi_for_monitor_supported_) { HMONITOR monitor = null; if (hwnd != null) { monitor = MonitorFromWindow(hwnd, MONITOR_DEFAULTTOPRIMARY); } return GetDpiForMonitor(monitor); } HDC hdc = GetDC(hwnd); UINT dpi = GetDeviceCaps(hdc, LOGPIXELSX); ReleaseDC(hwnd, hdc); return dpi; } enum kDefaultDpi = 96; /// Returns the DPI of a given monitor. Defaults to 96 if the API is not /// available. UINT GetDpiForMonitor(HMONITOR monitor) { if (dpi_for_monitor_supported_) { if (monitor == null) { POINT target_point; target_point.x = 0; target_point.y = 0; monitor = MonitorFromPoint(target_point, MONITOR_DEFAULTTOPRIMARY); } UINT dpi_x = 0, dpi_y = 0; HRESULT result = get_dpi_for_monitor_(monitor, 0 /* kEffectiveDpiMonitorType */, &dpi_x, &dpi_y); if (SUCCEEDED(result)) { return dpi_x; } } return kDefaultDpi; } DPI_AWARENESS_CONTEXT SetThreadDpiAwarenessContext(DPI_AWARENESS_CONTEXT context) { // Do not set DPI to unsupported if asked so. if (context == DPI_AWARENESS_CONTEXT_UNSUPPORTED) return context; if (set_thread_dpi_awareness_context !is null) { return set_thread_dpi_awareness_context(context); } else return DPI_AWARENESS_CONTEXT_UNSUPPORTED; } DPI_HOSTING_BEHAVIOR SetThreadDpiHostingBehavior(DPI_HOSTING_BEHAVIOR value) { if (value == DPI_HOSTING_UNSUPPORTED) return value; if (set_thread_dpi_hosting_behavior !is null) return set_thread_dpi_hosting_behavior(value); else return value; // do nothing but pretend it went OK } } alias DPI_AWARENESS_CONTEXT = void*; enum : DPI_AWARENESS_CONTEXT { DPI_AWARENESS_CONTEXT_UNSUPPORTED = cast(void*)0, // This API not supported DPI_AWARENESS_CONTEXT_UNAWARE = cast(void*)(-1), DPI_AWARENESS_CONTEXT_SYSTEM_AWARE = cast(void*)(-2), DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE = cast(void*)(-3), DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2 = cast(void*)(-4), DPI_AWARENESS_CONTEXT_UNAWARE_GDISCALED = cast(void*)(-5) // since Windows 10 } alias DPI_HOSTING_BEHAVIOR = int; enum : DPI_HOSTING_BEHAVIOR { DPI_HOSTING_UNSUPPORTED = -2, DPI_HOSTING_BEHAVIOR_INVALID = -1, DPI_HOSTING_BEHAVIOR_DEFAULT = 0, DPI_HOSTING_BEHAVIOR_MIXED = 1 } static bool IsChildWindow(HWND pWnd) { if (pWnd) { int style = GetWindowLong(pWnd, GWL_STYLE); int exStyle = GetWindowLong(pWnd, GWL_EXSTYLE); return ((style & WS_CHILD) && !(exStyle & WS_EX_MDICHILD)); } return false; } }
D
-0.443612,-1.02544,-0.446728,-0.0458809
D
/** Module contains color format convertion operations. $(DL Module contains: $(DD $(LINK2 #rgb2gray,rgb2gray) $(LINK2 #gray2rgb,gray2rgb) $(LINK2 #rgb2hsv,rgb2hsv) $(LINK2 #hsv2rgb,hsv2rgb) $(LINK2 #rgb2yuv,rgb2yuv) $(LINK2 #yuv2rgb,yuv2rgb) ) ) Copyright: Copyright Relja Ljubobratovic 2016. Authors: Relja Ljubobratovic License: $(LINK3 http://www.boost.org/LICENSE_1_0.txt, Boost Software License - Version 1.0). */ module dcv.imgproc.color; /* TODO: redesign functions - one function to iterate, separated format convertions as template alias. Consider grouping color convertion routines into one function. v0.1 norm: rgb2gray vice versa (done) hsv2rgb -||- hls2rgb -||- lab2rgb -||- luv2rgb -||- luv2rgb -||- bayer2rgb -||- */ import std.traits : isFloatingPoint, isNumeric; import mir.math.common : fastmath; import mir.ndslice.slice; import mir.ndslice.topology; import mir.ndslice.algorithm; import mir.ndslice.allocation; import dcv.core.utils; /** RGB to Grayscale convertion strategy. */ enum Rgb2GrayConvertion { MEAN, /// Mean the RGB values and assign to gray. LUMINANCE_PRESERVE /// Use luminance preservation (0.2126R + 0.715G + 0.0722B). } /** Convert RGB image to grayscale. Params: input = Input image. Should have 3 channels, represented as R, G and B respectively in that order. prealloc = Pre-allocated buffer, where grayscale image will be copied. Default argument is an empty slice, where new data is allocated and returned. If given slice is not of corresponding shape(range.shape[0], range.shape[1]), it is discarded and allocated anew. conv = Convertion strategy - mean, or luminance preservation. Returns: Returns grayscale version of the given RGB image, of the same size. Note: Input and pre-allocated slices' strides must be identical. */ Slice!(SliceKind.contiguous, [2], V*) rgb2gray(V)(Slice!(SliceKind.contiguous, [3], V*) input, Slice!(SliceKind.contiguous, [2], V*) prealloc = emptySlice!([2], V), Rgb2GrayConvertion conv = Rgb2GrayConvertion.LUMINANCE_PRESERVE) pure nothrow { return rgbbgr2gray!(false, V)(input, prealloc, conv); } unittest { import std.math : approxEqual; auto rgb = [0, 0, 0, 1, 1, 1, 2, 2, 2, 3, 3, 3].sliced(2, 2, 3); auto gray = rgb.rgb2gray; assert(gray.flattened == [0, 1, 2, 3]); } /** Convert BGR image to grayscale. Same as rgb2gray, but follows swapped channels if luminance preservation is chosen as convertion strategy. Params: input = Input image. Should have 3 channels, represented as B, G and R respectively in that order. prealloc = Pre-allocated range, where grayscale image will be copied. Default argument is an empty slice, where new data is allocated and returned. If given slice is not of corresponding shape(range.shape[0], range.shape[1]), it is discarded and allocated anew. conv = Convertion strategy - mean, or luminance preservation. Returns: Returns grayscale version of the given BGR image, of the same size. Note: Input and pre-allocated slices' strides must be identical. */ Slice!(SliceKind.contiguous, [2], V*) bgr2gray(V)(Slice!(SliceKind.contiguous, [3], V*) input, Slice!(SliceKind.contiguous, [2], V*) prealloc = emptySlice!([2], V), Rgb2GrayConvertion conv = Rgb2GrayConvertion.LUMINANCE_PRESERVE) pure nothrow { return rgbbgr2gray!(true, V)(input, prealloc, conv); } unittest { import std.math : approxEqual; auto rgb = [0, 0, 0, 1, 1, 1, 2, 2, 2, 3, 3, 3].sliced(2, 2, 3); auto gray = rgb.bgr2gray; assert(gray.flattened == [0, 1, 2, 3]); } private Slice!(SliceKind.contiguous, [2], V*) rgbbgr2gray(bool isBGR, V)(Slice!(SliceKind.contiguous, [3], V*) input, Slice!(SliceKind.contiguous, [2], V*) prealloc = emptySlice!([2], V), Rgb2GrayConvertion conv = Rgb2GrayConvertion.LUMINANCE_PRESERVE) pure nothrow in { assert(!input.empty, "Input image is empty."); } body { if (prealloc.shape != input.shape[0 .. 2]) prealloc = uninitializedSlice!V(input.shape[0 .. 2]); auto rgb = staticPack!3(input); assert(rgb.strides == prealloc.strides, "Input image and pre-allocated buffer strides are not identical."); auto pack = zip!true(rgb, prealloc); alias PT = DeepElementType!(typeof(pack)); if (conv == Rgb2GrayConvertion.MEAN) pack.each!(rgb2grayImplMean!PT); else static if (isBGR) pack.each!(bgr2grayImplLuminance!(PT)); else pack.each!(rgb2grayImplLuminance!(PT)); return prealloc; } /** Convert gray image to RGB. Uses grayscale value and assigns it's value to each of three channels for the RGB image version. Params: input = Grayscale image, to be converted to the RGB. prealloc = Pre-allocated range, where RGB image will be copied. Default argument is an empty slice, where new data is allocated and returned. If given slice is not of corresponding shape(range.shape[0], range.shape[1], 3), it is discarded and allocated anew. Returns: Returns RGB version of the given grayscale image. Note: Input and pre-allocated slices' strides must be identical. */ Slice!(SliceKind.contiguous, [3], V*) gray2rgb(V)(Slice!(SliceKind.contiguous, [2], V*) input, Slice!(SliceKind.contiguous, [3], V*) prealloc = emptySlice!([3], V)) pure nothrow { Slice!(SliceKind.contiguous, [2], V[3]*) rgb; if (input.shape != prealloc.shape[0 .. 2]) { rgb = uninitializedSlice!(V[3])(input.length!0, input.length!1); } else { rgb = staticPack!3(prealloc); } assert(rgb.strides == input.strides, "Input and pre-allocated slices' strides are not identical."); auto pack = zip!true(input, rgb); alias PT = DeepElementType!(typeof(pack)); pack.each!(gray2rgbImpl!PT); return staticUnpack!3(rgb); } unittest { import std.math : approxEqual; auto gray = [0, 1, 2, 3].sliced(2, 2); auto rgb = gray.gray2rgb; assert(rgb.flattened == [0, 0, 0, 1, 1, 1, 2, 2, 2, 3, 3, 3]); } /** Convert RGB image to HSV color format. If HSV is represented as floating point, H is represented as 0-360 (degrees), S and V are 0.0-1.0. If is integral, S, and V are 0-100. Depending on the RGB (input) type, values are treated in the algorithm to be ranged as 0-255 for ubyte, 0-65535 for ushort, and 0-1 for floating point types. Params: input = RGB image, which gets converted to HSV. prealloc = Pre-allocated range, where HSV image will be copied. Default argument is an empty slice, where new data is allocated and returned. If given slice is not of corresponding shape(range.shape[0], range.shape[1], 3), it is discarded and allocated anew. Returns: Returns HSV verion of the given RGB image. Note: Input and pre-allocated slices' strides must be identical. */ Slice!(SliceKind.contiguous, [3], R*) rgb2hsv(R, V)(Slice!(SliceKind.contiguous, [3], V*) input, Slice!(SliceKind.contiguous, [3], R*) prealloc = emptySlice!([3], R)) pure nothrow if (isNumeric!R && isNumeric!V) in { static assert(R.max >= 360, "Invalid output type for HSV (R.max >= 360)"); assert(input.length!2 == 3, "Invalid channel count."); } body { if (prealloc.shape != input.shape) prealloc = uninitializedSlice!R(input.shape); assert(input.strides == prealloc.strides, "Input image and pre-allocated buffer strides are not identical."); auto pack = zip!true(input.staticPack!3, prealloc.staticPack!3); pack.each!(rgb2hsvImpl!(DeepElementType!(typeof(pack)))); return prealloc; } unittest { // value comparison based on results from http://www.rapidtables.com/convert/color/rgb-to-hsv.htm auto rgb2hsvTest(RGBType, HSVType)(RGBType[] rgb, HSVType[] expectedHSV) { import std.algorithm.comparison : equal; import std.array : array; import std.math : approxEqual; assert(rgb.sliced(1, 1, 3).rgb2hsv!HSVType.flattened.array.equal!approxEqual(expectedHSV)); } rgb2hsvTest(cast(ubyte[])[255, 0, 0], cast(ushort[])[0, 100, 100]); rgb2hsvTest(cast(ubyte[])[255, 0, 0], cast(float[])[0, 1.0f, 1.0f]); // test float result // test same input values as above for 16-bit and 32-bit images rgb2hsvTest(cast(ushort[])[ushort.max, 0, 0], cast(ushort[])[0, 100, 100]); rgb2hsvTest(cast(float[])[1.0f, 0, 0], cast(ushort[])[0, 100, 100]); rgb2hsvTest(cast(ubyte[])[0, 255, 0], cast(ushort[])[120, 100, 100]); rgb2hsvTest(cast(ubyte[])[0, 0, 255], cast(ushort[])[240, 100, 100]); rgb2hsvTest(cast(ubyte[])[122, 158, 200], cast(float[])[212, 0.39, 0.784]); } /** Convert HSV image to RGB color format. If HSV is represented in floating point, H is 0-360 degrees, S and V is 0.0-1.0. If it's of integral type, S and V values are in 0-100 range. Output range values are based on the output type cast - ubyte will range RGB values to be 0-255, ushort 0-65535, and floating types 0.0-1.0. Other types are not supported. Params: input = HSV image, which gets converted to RGB. prealloc = Pre-allocated range, where RGB image will be copied. Default argument is an empty slice, where new data is allocated and returned. If given slice is not of corresponding shape(range.shape[0], range.shape[1], 3), it is discarded and allocated anew. Returns: Returns RGB verion of the given HSV image. Note: Input and pre-allocated slices' strides must be identical. */ Slice!(SliceKind.contiguous, [3], R*) hsv2rgb(R, V)(Slice!(SliceKind.contiguous, [3], V*) input, Slice!(SliceKind.contiguous, [3], R*) prealloc = emptySlice!([3], R)) pure nothrow if (isNumeric!R && isNumeric!V) in { assert(input.length!2 == 3, "Invalid channel count."); } body { if (prealloc.shape != input.shape) prealloc = uninitializedSlice!R(input.shape); assert(input.strides == prealloc.strides, "Input image and pre-allocated buffer strides are not identical."); auto pack = zip!true(input.staticPack!3, prealloc.staticPack!3); pack.each!(hsv2rgbImpl!(DeepElementType!(typeof(pack)))); return prealloc; } unittest { // value comparison based on results from http://www.rapidtables.com/convert/color/hsv-to-rgb.htm auto hsv2rgbTest(HSVType, RGBType)(HSVType[] hsv, RGBType[] expectedRgb) { import std.algorithm.comparison : equal; import std.array : array; import std.math : approxEqual; assert(hsv.sliced(1, 1, 3).hsv2rgb!RGBType.flattened.array.equal!approxEqual(expectedRgb)); } import std.random : uniform; foreach (i; 0 .. 10) { // test any value with value of 0, should give rgb [0, 0, 0] hsv2rgbTest(cast(ushort[])[uniform(0, 359), uniform(0, 99), 0], cast(ubyte[])[0, 0, 0]); } hsv2rgbTest(cast(ushort[])[0, 0, 100], cast(ubyte[])[255, 255, 255]); hsv2rgbTest(cast(ushort[])[150, 50, 100], cast(ubyte[])[128, 255, 191]); hsv2rgbTest(cast(ushort[])[150, 50, 80], cast(ubyte[])[102, 204, 153]); hsv2rgbTest(cast(float[])[0.0f, 0.0f, 1.0f], cast(ubyte[])[255, 255, 255]); hsv2rgbTest(cast(float[])[150.0f, 0.5f, 1.0f], cast(ubyte[])[127, 255, 191]); hsv2rgbTest(cast(float[])[150.0f, 0.5f, 0.8f], cast(ubyte[])[102, 204, 153]); hsv2rgbTest(cast(ushort[])[0, 0, 100], cast(ushort[])[65535, 65535, 65535]); hsv2rgbTest(cast(ushort[])[150, 50, 100], cast(ushort[])[32896, 65535, 49087]); hsv2rgbTest(cast(ushort[])[150, 50, 80], cast(ushort[])[26214, 52428, 39321]); hsv2rgbTest(cast(float[])[0.0f, 0.0f, 1.0f], cast(float[])[1.0f, 1.0f, 1.0f]); hsv2rgbTest(cast(float[])[150.0f, 0.5f, 1.0f], cast(float[])[0.5f, 1.0f, 0.75f]); hsv2rgbTest(cast(float[])[150.0f, 0.5f, 0.8f], cast(float[])[0.4f, 0.8f, 0.6f]); } /** Convert RGB image format to YUV. YUV images in dcv are organized in the same buffer plane where quantity of luma and chroma values are the same (as in YUV444 format). Params: input = Input RGB image. prealloc = Optional pre-allocated buffer. If given, has to be of same shape as input image, otherwise gets reallocated. Returns: Resulting YUV image slice. Note: Input and pre-allocated slices' strides must be identical. */ Slice!(SliceKind.contiguous, [3], V*) rgb2yuv(V)(Slice!(SliceKind.contiguous, [3], V*) input, Slice!(SliceKind.contiguous, [3], V*) prealloc = emptySlice!([3], V)) pure nothrow in { assert(input.length!2 == 3, "Invalid channel count."); } body { if (prealloc.shape != input.shape) prealloc = uninitializedSlice!V(input.shape); assert(input.strides == prealloc.strides, "Input image and pre-allocated buffer strides are not identical."); auto p = zip!true(input, prealloc).pack!1; p.each!(rgb2yuvImpl!(V, DeepElementType!(typeof(p)))); return prealloc; } /** Convert YUV image to RGB. As in rgb2yuv conversion, YUV format is considered to have same amount of luma and chroma. Params: input = Input YUV image. prealloc = Optional pre-allocated buffer. If given, has to be of same shape as input image, otherwise gets reallocated. Returns: Resulting RGB image slice. Note: Input and pre-allocated slices' strides must be identical. */ Slice!(SliceKind.contiguous, [3], V*) yuv2rgb(V)(Slice!(SliceKind.contiguous, [3], V*) input, Slice!(SliceKind.contiguous, [3], V*) prealloc = emptySlice!([3], V)) pure nothrow in { assert(input.length!2 == 3, "Invalid channel count."); } body { import mir.ndslice.allocation; if (prealloc.shape != input.shape) prealloc = uninitializedSlice!V(input.shape); assert(input.strides == prealloc.strides, "Input image and pre-allocated buffer strides are not identical."); auto p = zip!true(input, prealloc).pack!1; p.each!(yuv2rgbImpl!(V, DeepElementType!(typeof(p)))); return prealloc; } unittest { // test rgb to yuv conversion auto rgb2yuvTest(Type)(Type[] rgb, Type[] expectedYuv) { import std.algorithm.comparison : equal; import std.array : array; import std.math : approxEqual; assert(rgb.sliced(1, 1, 3).rgb2yuv.flattened.array.equal!approxEqual(expectedYuv)); } rgb2yuvTest(cast(ubyte[])[0, 0, 0], cast(ubyte[])[16, 128, 128]); rgb2yuvTest(cast(ubyte[])[255, 0, 0], cast(ubyte[])[82, 90, 240]); rgb2yuvTest(cast(ubyte[])[0, 255, 0], cast(ubyte[])[144, 54, 34]); rgb2yuvTest(cast(ubyte[])[0, 0, 255], cast(ubyte[])[41, 240, 110]); } unittest { // test yuv to rgb conversion auto yuv2rgbTest(Type)(Type[] yuv, Type[] expectedRgb) { import std.algorithm.comparison : equal; import std.array : array; import std.math : approxEqual; assert(yuv.sliced(1, 1, 3).yuv2rgb.flattened.array.equal!approxEqual(expectedRgb)); } yuv2rgbTest(cast(ubyte[])[16, 128, 128], cast(ubyte[])[0, 0, 0]); yuv2rgbTest(cast(ubyte[])[150, 54, 125], cast(ubyte[])[151, 187, 7]); yuv2rgbTest(cast(ubyte[])[144, 54, 34], cast(ubyte[])[0, 255, 0]); yuv2rgbTest(cast(ubyte[])[41, 240, 110], cast(ubyte[])[0, 0, 255]); } pure @nogc nothrow @fastmath: void rgb2grayImplMean(P)(P pack) { alias V = typeof(pack.b); pack.b = cast(V)((pack.a[0] + pack.a[1] + pack.a[2]) / 3); } void rgb2grayImplLuminance(RGBGRAY)(RGBGRAY pack) { alias V = typeof(pack.b); pack.b = cast(V)( cast(float)pack.a[0] * 0.212642529f + cast(float)pack.a[1] * 0.715143029f + cast(float)pack.a[2] * 0.072214443f ); } void bgr2grayImplLuminance(RGBGRAY)(RGBGRAY pack) { alias V = typeof(pack.b); pack.b = cast(V)( cast(float)pack.a[2] * 0.212642529f + cast(float)pack.a[1] * 0.715143029f + cast(float)pack.a[0] * 0.072214443f ); } void gray2rgbImpl(GRAYRGB)(GRAYRGB pack) { auto v = pack.a; pack.b[0] = v; pack.b[1] = v; pack.b[2] = v; } void rgb2hsvImpl(RGBHSV)(RGBHSV pack) { import mir.math.common; alias V = typeof(pack.a[0]); alias R = typeof(pack.b[0]); static if (is(V == ubyte)) { auto r = cast(float)(pack.a[0]) * (1.0f / 255.0f); auto g = cast(float)(pack.a[1]) * (1.0f / 255.0f); auto b = cast(float)(pack.a[2]) * (1.0f / 255.0f); } else static if (is(V == ushort)) { auto r = cast(float)(pack.a[0]) * (1.0f / 65535.0f); auto g = cast(float)(pack.a[1]) * (1.0f / 65535.0f); auto b = cast(float)(pack.a[2]) * (1.0f / 65535.0f); } else static if (isFloatingPoint!V) { // assumes a value range 0-1 auto r = cast(float)(pack.a[0]); auto g = cast(float)(pack.a[1]); auto b = cast(float)(pack.a[2]); } else { static assert(0, "Invalid RGB input type: " ~ V.stringof); } auto cmax = fmax(r, fmax(g, b)); auto cmin = fmin(r, fmin(g, b)); auto cdelta = cmax - cmin; // TODO: compute min and max in a lockstep auto h = cast(R)((cdelta == 0) ? 0 : (cmax == r) ? 60.0f * ((g - b) / cdelta) : (cmax == g) ? 60.0f * ((b - r) / cdelta + 2) : 60.0f * ((r - g) / cdelta + 4)); if (h < 0) h += 360; static if (isFloatingPoint!R) { auto s = cast(R)(cmax == 0 ? 0 : cdelta / cmax); auto v = cast(R)(cmax); } else { auto s = cast(R)(100.0f * (cmax == 0 ? 0 : cdelta / cmax)); auto v = cast(R)(100.0f * cmax); } pack.b[0] = h; pack.b[1] = s; pack.b[2] = v; } void hsv2rgbImpl(HSVRGB)(HSVRGB pack) { alias V = typeof(pack.a[0]); alias R = typeof(pack.b[0]); static if (isFloatingPoint!V) { auto h = pack.a[0]; auto s = pack.a[1]; auto v = pack.a[2]; } else { float h = cast(float)pack.a[0]; float s = cast(float)pack.a[1] * 0.01f; float v = cast(float)pack.a[2] * 0.01f; } if (s <= 0) { static if (isFloatingPoint!R) { pack.b[0] = cast(R)v; pack.b[1] = cast(R)v; pack.b[2] = cast(R)v; } else { pack.b[0] = cast(R)(v * R.max); pack.b[1] = cast(R)(v * R.max); pack.b[2] = cast(R)(v * R.max); } return; } if (v <= 0.0f) { pack.b[0] = cast(R)0; pack.b[1] = cast(R)0; pack.b[2] = cast(R)0; return; } if (h >= 360.0f) h = 0.0f; else h /= 60.0; auto hh = cast(int)h; auto ff = h - float(hh); auto p = v * (1.0f - s); auto q = v * (1.0f - (s * ff)); auto t = v * (1.0f - (s * (1.0f - ff))); float r = void; float g = void; float b = void; switch (hh) { case 0: r = v; g = t; b = p; break; case 1: r = q; g = v; b = p; break; case 2: r = p; g = v; b = t; break; case 3: r = p; g = q; b = v; break; case 4: r = t; g = p; b = v; break; case 5: default: r = v; g = p; b = q; break; } static if (isFloatingPoint!R) { pack.b[0] = r; pack.b[1] = g; pack.b[2] = b; } else { pack.b[0] = cast(R)(r * R.max); pack.b[1] = cast(R)(g * R.max); pack.b[2] = cast(R)(b * R.max); } } void rgb2yuvImpl(V, RGBYUV)(RGBYUV pack) { static if (isFloatingPoint!V) { auto r = cast(int)pack[0].a; auto g = cast(int)pack[1].a; auto b = cast(int)pack[2].a; pack[0].b = clip!V((r * .257) + (g * .504) + (b * .098) + 16); pack[1].b = clip!V((r * .439) + (g * .368) + (b * .071) + 128); pack[2].b = clip!V(-(r * .148) - (g * .291) + (b * .439) + 128); } else { auto r = pack[0].a; auto g = pack[1].a; auto b = pack[2].a; pack[0].b = clip!V(((66 * (r) + 129 * (g) + 25 * (b) + 128) >> 8) + 16); pack[1].b = clip!V(((-38 * (r) - 74 * (g) + 112 * (b) + 128) >> 8) + 128); pack[2].b = clip!V(((112 * (r) - 94 * (g) - 18 * (b) + 128) >> 8) + 128); } } void yuv2rgbImpl(V, YUVRGB)(YUVRGB pack) { auto y = cast(int)(pack[0].a) - 16; auto u = cast(int)(pack[1].a) - 128; auto v = cast(int)(pack[2].a) - 128; static if (isFloatingPoint!V) { pack[0].b = clip!V(y + 1.4075 * v); pack[1].b = clip!V(y - 0.3455 * u - (0.7169 * v)); pack[2].b = clip!V(y + 1.7790 * u); } else { pack[0].b = clip!V((298 * y + 409 * v + 128) >> 8); pack[1].b = clip!V((298 * y - 100 * u - 208 * v + 128) >> 8); pack[2].b = clip!V((298 * y + 516 * u + 128) >> 8); } }
D
/// Generate by tools module java.nio.charset.Charset; import java.lang.exceptions; public class Charset { public this() { implMissing(); } }
D
module app; import vibe.core.core; import vibe.core.log; import vibe.core.stream; import vibe.stream.operations; import vibe.stream.wrapper; import vibe.stream.tls; import vibe.stream.taskpipe; import std.encoding : sanitize; TLSContext createContext(TLSContextKind kind, string cert, string key, string trust, TLSPeerValidationMode mode) { auto ctx = createTLSContext(kind); ctx.peerValidationMode = mode; if (cert.length) ctx.useCertificateChainFile(cert); if (key.length) ctx.usePrivateKeyFile(key); if (trust.length) ctx.useTrustedCertificateFile(trust); return ctx; } void createPipePair(out Stream a, out Stream b) { auto p1 = new TaskPipe; auto p2 = new TaskPipe; a = createProxyStream(p1, p2); b = createProxyStream(p2, p1); } void testConn( bool cli_fail, string cli_cert, string cli_key, string cli_trust, string cli_peer, TLSPeerValidationMode cli_mode, bool srv_fail, string srv_cert, string srv_key, string srv_trust, string srv_peer, TLSPeerValidationMode srv_mode) { Stream ctunnel, stunnel; logInfo("Test client %s (%s, %s, %s, %s), server %s (%s, %s, %s, %s)", cli_fail ? "fail" : "success", cli_cert, cli_key, cli_trust, cli_peer, srv_fail ? "fail" : "success", srv_cert, srv_key, srv_trust, srv_peer); createPipePair(ctunnel, stunnel); auto t1 = runTask({ auto sctx = createContext(TLSContextKind.server, srv_cert, srv_key, srv_trust, srv_mode); TLSStream sconn; try { sconn = createTLSStream(stunnel, sctx, TLSStreamState.accepting, srv_peer); logDiagnostic("Successfully initiated server tunnel."); assert(!srv_fail, "Server expected to fail TLS connection."); } catch (Exception e) { if (srv_fail) logDiagnostic("Server tunnel failed as expected: %s", e.msg); else logError("Server tunnel failed: %s", e.toString().sanitize); assert(srv_fail, "Server not expected to fail TLS connection."); return; } if (cli_fail) return; assert(sconn.readLine() == "foo"); sconn.write("bar\r\n"); sconn.finalize(); }); auto t2 = runTask({ auto cctx = createContext(TLSContextKind.client, cli_cert, cli_key, cli_trust, cli_mode); TLSStream cconn; try { cconn = createTLSStream(ctunnel, cctx, TLSStreamState.connecting, cli_peer); logDiagnostic("Successfully initiated client tunnel."); assert(!cli_fail, "Client expected to fail TLS connection."); } catch (Exception e) { if (cli_fail) logDiagnostic("Client tunnel failed as expected: %s", e.msg); else logError("Client tunnel failed: %s", e.toString().sanitize); assert(cli_fail, "Client not expected to fail TLS connection."); return; } if (srv_fail) return; cconn.write("foo\r\n"); assert(cconn.readLine() == "bar"); cconn.finalize(); }); t1.join(); t2.join(); } void test() { // // Server certificates // // fail for untrusted server cert testConn( true, null, null, null, "localhost", TLSPeerValidationMode.trustedCert, true, "server.crt", "server.key", null, null, TLSPeerValidationMode.none ); // succeed for untrusted server cert with disabled validation testConn( false, null, null, null, null, TLSPeerValidationMode.none, false, "server.crt", "server.key", null, null, TLSPeerValidationMode.none ); // succeed for untrusted server cert if ignored testConn( false, null, null, null, "localhost", TLSPeerValidationMode.requireCert|TLSPeerValidationMode.checkPeer, false, "server.crt", "server.key", null, null, TLSPeerValidationMode.none ); // fail for trusted server cert with no/wrong host name testConn( true, null, null, "ca.crt", "wronghost", TLSPeerValidationMode.trustedCert, false, "server.crt", "server.key", null, null, TLSPeerValidationMode.none ); // succeed for trusted server cert with no/wrong host name if ignored testConn( false, null, null, "ca.crt", "wronghost", TLSPeerValidationMode.trustedCert & ~TLSPeerValidationMode.checkPeer, false, "server.crt", "server.key", null, null, TLSPeerValidationMode.none ); // succeed for trusted server cert testConn( false, null, null, "ca.crt", "localhost", TLSPeerValidationMode.trustedCert, false, "server.crt", "server.key", null, null, TLSPeerValidationMode.none ); // succeed with no certificates /*testConn( false, null, null, null, null, false, null, null, null, null );*/ // // Client certificates // // fail for untrusted server cert testConn( true, "client.crt", "client.key", null, null, TLSPeerValidationMode.none, true, "server.crt", "server.key", null, null, TLSPeerValidationMode.trustedCert ); // succeed for untrusted server cert with disabled validation testConn( false, "client.crt", "client.key", null, null, TLSPeerValidationMode.none, false, "server.crt", "server.key", null, null, TLSPeerValidationMode.none ); // succeed for untrusted server cert if ignored testConn( false, "client.crt", "client.key", null, null, TLSPeerValidationMode.none, false, "server.crt", "server.key", null, null, TLSPeerValidationMode.requireCert ); // succeed for trusted server cert testConn( false, "client.crt", "client.key", null, null, TLSPeerValidationMode.none, false, "server.crt", "server.key", "ca.crt", null, TLSPeerValidationMode.trustedCert & ~TLSPeerValidationMode.checkPeer ); exitEventLoop(); } void main() { // import std.functional : toDelegate; // runTask(toDelegate(&test)); // runEventLoop(); }
D
module dbal.expression; import dbal; class Expression { string value; } class WhereExpression : Expression { string key; string op; string value; this(string key , string op, string value) { this.key = key; this.op = op; this.value = value; } string formatKey(string str) { return str; } string formatValue(string str) { if(str == null)return "null"; return str; } override string toString() { return formatKey(key) ~ " " ~ op ~ " "~ formatValue(value); } } class ValueExpression : Expression { string key; string value; this(string key , string value) { this.key = key; this.value = value; } override string toString() { return key ~ " = " ~ value ; } } class JoinExpression : Expression { JoinMethod _join; string _table; string _tableAlias; string _on; this(JoinMethod join,string table,string tableAlias,string on) { _join = join; _table = table; _tableAlias = tableAlias; _on = on; } override string toString() { string str = " " ~ _join ~ " " ~ _table ~ " " ~ _tableAlias ~ " "; if(_join != JoinMethod.CrossJoin) str ~= " ON " ~ _on ~ " "; return str; } } class MultiWhereExpression : Expression { Relation _relation; MultiWhereExpression[] childs; WhereExpression expr; override string toString() { if(childs.length){ auto len = childs.length; int i = 0; string str; foreach(child;childs) { str ~= child.toString; if( i < len-1 )str ~= (_relation == Relation.And ? " AND " : " OR "); i++; } return "(" ~ str ~ ")"; }else{ return "(" ~ expr.toString ~ ")"; } } MultiWhereExpression eq(string key,string value) { if(value == null) expr = new WhereExpression(key,"is",null); else expr = new WhereExpression(key,"=",value); return this; } MultiWhereExpression ne(string key,string value) { if(value == null) expr = new WhereExpression(key,"is not",null); else expr = new WhereExpression(key,"!=",value); return this; } MultiWhereExpression gt(string key,string value) { expr = new WhereExpression(key,">",value); return this; } MultiWhereExpression lt(string key,string value) { expr = new WhereExpression(key,"<",value); return this; } MultiWhereExpression ge(string key,string value) { expr = new WhereExpression(key,">=",value); return this; } MultiWhereExpression le(string key,string value) { expr = new WhereExpression(key,"<=",value); return this; } MultiWhereExpression like(string key,string value) { expr = new WhereExpression(key,"like",value); return this; } MultiWhereExpression andX(T...)(T args) { _relation = Relation.And; foreach(v;args) { childs ~= v; } return this; } MultiWhereExpression orX(T...)(T args) { _relation = Relation.Or; foreach(v;args) { childs ~= v; } return this; } }
D
module iup.button; import iup.canvas; import iup.control; import iup.core; import iup.image; import iup.c.core; import iup.c.api; import toolkit.event; import toolkit.drawing; import std.string; import std.traits; /** */ public interface IIupButton : IIupObject { } /** */ public class IupButtonBase : IupStandardControl { protected class IupAttributes : super.IupAttributes { enum Alignment = "ALIGNMENT"; enum Flat = "FLAT"; enum Image = "IMAGE"; enum ImInactive = "IMINACTIVE"; enum ImPress = "IMPRESS"; enum ImagePosition = "IMAGEPOSITION"; enum Markup = "MARKUP"; } this() { super(); } this(string title) { super(title); } /* ************* Properties *************** */ version(GTK) { /** allows the title string to contains pango markup commands. Works only if a mnemonic is NOT defined in the title. Can be "YES" or "NO". Default: "NO". */ @property { public bool canMarkup () { return getAttribute(IupAttributes.Markup) == FlagIdentifiers.Yes; } public void canMarkup (bool value) { setAttribute(IupAttributes.Markup, value ? FlagIdentifiers.Yes : FlagIdentifiers.No); } } } /** */ @property { public bool isFlat() { return getAttribute(IupAttributes.Flat) == FlagIdentifiers.Yes; } public void isFlat(bool value) { setAttribute(IupAttributes.Flat, value ? FlagIdentifiers.Yes : FlagIdentifiers.No); } } /** Image name. If set before map defines the behavior of the button to contain an image. The natural size will be size of the image in pixels, plus the button borders. Use IupSetHandle or IupSetAttributeHandle to associate an image to a name. See also IupImage. If TITLE is also defined and not empty both will be shown (except in Motif). (GTK 2.6) */ @property { public string image() { return getAttribute(IupAttributes.Image); } public void image(string value) { setAttribute(IupAttributes.Image, value); } public void image(iup.image.IupImage value) { setHandleAttribute(IupAttributes.Image, value); } } /** Image name of the element when inactive. If it is not defined then the IMAGE is used and the colors will be replaced by a modified version of the background color creating the disabled effect. GTK will also change the inactive image to look like other inactive objects. (GTK 2.6) */ @property { public string imageInactive() { return getAttribute(IupAttributes.ImInactive); } public void imageInactive(string value) { setAttribute(IupAttributes.ImInactive, value); } public void imageInactive(iup.image.IupImage value) { setHandleAttribute(IupAttributes.ImInactive, value); } } /** Image name of the pressed button. If IMPRESS and IMAGE are defined, the button borders are not shown and not computed in natural size. When the button is clicked the pressed image does not offset. In Motif the button will lose its focus feedback also. (GTK 2.6) */ @property { public string imagePressed() { return getAttribute(IupAttributes.ImPress); } public void imagePressed(string value) { setAttribute(IupAttributes.ImPress, value); } public void imagePressed(iup.image.IupImage value) { setHandleAttribute(IupAttributes.ImPress, value); } } /** Position of the image relative to the text when both are displayed. Can be: LEFT, RIGHT, TOP, BOTTOM. Default: LEFT. (since 3.0) (GTK 2.10) */ @property { public Position imagePosition() { string c = getAttribute(IupAttributes.ImagePosition); return PositionIdentifiers.convert(c); } public void imagePosition(Position value) { setStrAttribute(IupAttributes.ImagePosition, PositionIdentifiers.convert(value)); } } } /** Creates an interface element that is a button. When selected, this element activates a function in the application. Its visual presentation can contain a text and/or an image. */ public class IupButton : IupButtonBase, IIupButton { protected class IupCallbacks : super.IupCallbacks { enum Button = "BUTTON_CB"; } protected class IupAttributes : super.IupAttributes { enum IupButton = "IupButton"; } this() { super(); } this(string title) { super(title); } protected override Ihandle* createIupObject() { return iup.c.api.IupButton(null, null); } protected override void onCreated() { super.onCreated(); registerClickCallback(IupCallbacks.Action); } /* ************* Events *************** */ mixin EventCallback!(IupButton, "click"); /* ************* Properties *************** */ /** horizontal and vertical alignment. Possible values: "ALEFT", "ACENTER" and "ARIGHT", combined to "ATOP", "ACENTER" and "ABOTTOM". Default: "ACENTER:ACENTER". Partial values are also accepted, like "ARIGHT" or ":ATOP", the other value will be used from the current alignment. In Motif, vertical alignment is restricted to "ACENTER". In GTK, horizontal alignment for multiple lines will align only the text block. (since 3.0) */ @property { public ContentAlignment textAlignment() { return m_textAlignment; } public void textAlignment(ContentAlignment value) { m_textAlignment = value; setAttribute(IupAttributes.Alignment, AlignmentIdentifiers.convert(value)); } private ContentAlignment m_textAlignment; } } /** Creates an interface element that is a button, but it does not have native decorations. When selected, this element activates a function in the application. Its visual presentation can contain a text and/or an image. It behaves just like an IupButton, but since it is not a native control it has more flexibility for additional options. It can also behave like an IupToggle (without the checkmark). */ public class IupFlatButton : IupCanvasBase { protected class IupCallbacks : super.IupCallbacks { enum FlatAction = "FLAT_ACTION"; enum ValueChanged = "VALUECHANGED_CB"; } protected class IupAttributes : super.IupAttributes { enum IupFlatButton = "IupFlatButton"; enum Alignment = "ALIGNMENT"; enum BackImage = "BACKIMAGE"; enum BackImageHighlight = "BACKIMAGEHIGHLIGHT"; enum BackImageInactive = "BACKIMAGEINACTIVE"; enum BackImagePress = "BACKIMAGEPRESS"; enum BorderColor = "BORDERCOLOR"; enum BorderPsColor = "BORDERPSCOLOR"; enum BorderHlColor = "BORDERHLCOLOR"; enum BorderWidth = "BORDERWIDTH"; enum FitToBackImage = "FITTOBACKIMAGE"; enum FrontImage = "FRONTIMAGE"; enum FrontImageHighlight = "FRONTIMAGEHIGHLIGHT"; enum FrontImageInactive = "FRONTIMAGEINACTIVE"; enum FrontImagePress = "FRONTIMAGEPRESS"; enum HlColor = "HLCOLOR"; enum PsColor = "PSCOLOR"; enum Image = "IMAGE"; enum ImInactive = "IMINACTIVE"; enum ImPress = "IMPRESS"; enum ImagePosition = "IMAGEPOSITION"; enum Radio = "RADIO"; enum Spacing = "SPACING"; enum Toggle = "TOGGLE"; } this(){ super(); } this(string title) { super(title); } protected override Ihandle* createIupObject() { return iup.c.api.IupFlatButton(null); } protected override void onCreated() { super.onCreated(); registerClickCallback(IupCallbacks.FlatAction); } /* ************* Events *************** */ mixin EventCallback!(IupFlatButton, "click"); /* ************* Properties *************** */ /** image name to be used as background. It will be zoomed to fill the background (it does not includes the border). Use IupSetHandle or IupSetAttributeHandle to associate an image to a name. See also IupImage. */ @property { public string backImage() { return getAttribute(IupAttributes.BackImage); } public void backImage(string value) { setAttribute(IupAttributes.BackImage, value); } public void backImage(iup.image.IupImage value) { setHandleAttribute(IupAttributes.BackImage, value); } } /** background image name of the element in highlight state. If it is not defined then the BACKIMAGE is used. */ @property { public string backImageHighlight() { return getAttribute(IupAttributes.BackImageHighlight); } public void backImageHighlight(string value) { setAttribute(IupAttributes.BackImageHighlight, value); } public void backImageHighlight(iup.image.IupImage value) { setHandleAttribute(IupAttributes.BackImageHighlight, value); } } /** background image name of the element when inactive. If it is not defined then the BACKIMAGE is used and its colors will be replaced by a modified version creating the disabled effect. */ @property { public string backImageInactive() { return getAttribute(IupAttributes.BackImageInactive); } public void backImageInactive(string value) { setAttribute(IupAttributes.BackImageInactive, value); } public void backImageInactive(iup.image.IupImage value) { setHandleAttribute(IupAttributes.BackImageInactive, value); } } /** background image name of the element in pressed state. If it is not defined then the BACKIMAGE is used. */ @property { public string backImagePressed() { return getAttribute(IupAttributes.BackImagePress); } public void backImagePressed(string value) { setAttribute(IupAttributes.BackImagePress, value); } public void backImagePressed(iup.image.IupImage value) { setHandleAttribute(IupAttributes.BackImagePress, value); } } /** color used for borders. Default: "50 150 255". This is for the IupFlatButton drawn border. */ @property { Color borderColor() { string c = getAttribute(IupAttributes.BorderColor); return Color.parse(c); } void borderColor(Color value) { setAttribute(IupAttributes.BorderColor, value.toRgb()); } } /** color used for borders when pressed or selected. Default use BORDERCOLOR. (since 3.19) */ @property { Color borderPressedColor() { string c = getAttribute(IupAttributes.BorderPsColor); return Color.parse(c); } void borderPressedColor(Color value) { setAttribute(IupAttributes.BorderPsColor, value.toRgb()); } } /** color used for borders when highlighted. Default use BORDERCOLOR. (since 3.19) */ @property { Color borderHighlightedColor() { string c = getAttribute(IupAttributes.BorderHlColor); return Color.parse(c); } void borderHighlightedColor(Color value) { setAttribute(IupAttributes.BorderHlColor, value.toRgb()); } } /** line width used for borders. Default: "1". Any borders can be hidden by simply setting this value to 0. This is for the IupFlatButton drawn border.*/ @property { public int borderWidth() { return getIntAttribute(IupAttributes.BorderWidth); } public void borderWidth(int value) { setIntAttribute(IupAttributes.BorderWidth, value);} } /** enable the natural size to be computed from the BACKIMAGE. If BACKIMAGE is not defined will be ignored. When set to Yes it will set BORDERWIDTH to 0. Can be Yes or No. Default: No. */ @property { public bool canFitToBackImage() { return getAttribute(IupAttributes.FitToBackImage) == FlagIdentifiers.Yes; } public void canFitToBackImage(bool value) { setAttribute(IupAttributes.FitToBackImage, value ? FlagIdentifiers.Yes : FlagIdentifiers.No); } } /** image name to be used as foreground. It will be zoomed to fill the foreground (it does not includes the border). The foreground has the same are as the background, but it is drawn at last. Use IupSetHandle or IupSetAttributeHandle to associate an image to a name. See also IupImage. */ @property { public string frontImage() { return getAttribute(IupAttributes.FrontImage); } public void frontImage(string value) { setAttribute(IupAttributes.FrontImage, value); } public void frontImage(iup.image.IupImage value) { setHandleAttribute(IupAttributes.FrontImage, value); } } /** foreground image name of the element in highlight state. If it is not defined then the FRONTIMAGE is used. */ @property { public string frontImageHighlight() { return getAttribute(IupAttributes.FrontImageHighlight); } public void frontImageHighlight(string value) { setAttribute(IupAttributes.FrontImageHighlight, value); } public void frontImageHighlight(iup.image.IupImage value) { setHandleAttribute(IupAttributes.FrontImageHighlight, value); } } /** foreground image name of the element when inactive. If it is not defined then the FRONTIMAGE is used and its colors will be replaced by a modified version creating the disabled effect. */ @property { public string frontImageInactive() { return getAttribute(IupAttributes.FrontImageInactive); } public void frontImageInactive(string value) { setAttribute(IupAttributes.FrontImageInactive, value); } public void frontImageInactive(iup.image.IupImage value) { setHandleAttribute(IupAttributes.FrontImageInactive, value); } } /** foreground image name of the element in pressed state. If it is not defined then the FRONTIMAGE is used. */ @property { public string frontImagePressed() { return getAttribute(IupAttributes.FrontImagePress); } public void frontImagePressed(string value) { setAttribute(IupAttributes.FrontImagePress, value); } public void frontImagePressed(iup.image.IupImage value) { setHandleAttribute(IupAttributes.FrontImagePress, value); } } /** color used to indicate a highlight state. Default: "200 225 245". */ @property { Color highlightColor() { string c = getAttribute(IupAttributes.HlColor); return Color.parse(c); } void highlightColor(Color value) { setAttribute(IupAttributes.HlColor, value.toRgb()); } } /** Image name. If set before map defines the behavior of the button to contain an image. The natural size will be size of the image in pixels, plus the button borders. Use IupSetHandle or IupSetAttributeHandle to associate an image to a name. See also IupImage. If TITLE is also defined and not empty both will be shown (except in Motif). (GTK 2.6) */ @property { public string image() { return getAttribute(IupAttributes.Image); } public void image(string value) { setAttribute(IupAttributes.Image, value); } public void image(iup.image.IupImage value) { setHandleAttribute(IupAttributes.Image, value); } } /** Image name of the element when inactive. If it is not defined then the IMAGE is used and the colors will be replaced by a modified version of the background color creating the disabled effect. GTK will also change the inactive image to look like other inactive objects. (GTK 2.6) */ @property { public string imageInactive() { return getAttribute(IupAttributes.ImInactive); } public void imageInactive(string value) { setAttribute(IupAttributes.ImInactive, value); } public void imageInactive(iup.image.IupImage value) { setHandleAttribute(IupAttributes.ImInactive, value); } } /** Image name of the pressed button. If IMPRESS and IMAGE are defined, the button borders are not shown and not computed in natural size. When the button is clicked the pressed image does not offset. In Motif the button will lose its focus feedback also. (GTK 2.6) */ @property { public string imagePressed() { return getAttribute(IupAttributes.ImPress); } public void imagePressed(string value) { setAttribute(IupAttributes.ImPress, value); } public void imagePressed(iup.image.IupImage value) { setHandleAttribute(IupAttributes.ImPress, value); } } /** Position of the image relative to the text when both are displayed. Can be: LEFT, RIGHT, TOP, BOTTOM. Default: LEFT. (since 3.0) (GTK 2.10) */ @property { public Position imagePosition() { string c = getAttribute(IupAttributes.ImagePosition); return PositionIdentifiers.convert(c); } public void imagePosition(Position value) { setStrAttribute(IupAttributes.ImagePosition, PositionIdentifiers.convert(value)); } } /** Toggle's state. Values can be "ON", "OFF" or "TOGGLE". Default: "OFF". The TOGGLE option will invert the current state. Valid only when TOGGLE=Yes. Can only be set to Yes for a toggle inside a radio, it will automatically set to OFF the previous toggle that was ON. */ @property { public bool isChecked() { return getAttribute(IupAttributes.Value) == ToggleStateIdentifiers.On; } public void isChecked(bool value) { setAttribute(IupAttributes.Value, value ? ToggleStateIdentifiers.On : ToggleStateIdentifiers.Off); } } /** returns if the toggle is inside a radio. Can be "YES" or "NO". Valid only after the element is mapped and TOGGLE=Yes, before returns NULL. */ @property { public bool isRadioItem() { return getAttribute(IupAttributes.Radio) == FlagIdentifiers.Yes; } } /** enabled the toggle behavior. Default: NO. */ @property { public bool isToggle() { return getAttribute(IupAttributes.Toggle) == FlagIdentifiers.Yes; } public void isToggle(bool value) { setAttribute(IupAttributes.Toggle, value ? FlagIdentifiers.Yes : FlagIdentifiers.No); } } /** color used to indicate a press state. Default: "150 200 235". */ @property { Color pressColor() { string c = getAttribute(IupAttributes.PsColor); return Color.parse(c); } void pressColor(Color value) { setAttribute(IupAttributes.PsColor, value.toRgb()); } } /** defines the spacing between the image associated and the button's text. Default: "2". */ @property { public int spacing() { return getIntAttribute(IupAttributes.Spacing); } public void spacing(int value) { setIntAttribute(IupAttributes.Spacing, value);} } /** horizontal and vertical alignment. Possible values: "ALEFT", "ACENTER" and "ARIGHT", combined to "ATOP", "ACENTER" and "ABOTTOM". Default: "ACENTER:ACENTER". Partial values are also accepted, like "ARIGHT" or ":ATOP", the other value will be used from the current alignment. In Motif, vertical alignment is restricted to "ACENTER". In GTK, horizontal alignment for multiple lines will align only the text block. (since 3.0) */ @property { // TODO: public ContentAlignment textAlignment() { return m_textAlignment; } public void textAlignment(ContentAlignment value) { m_textAlignment = value; setAttribute(IupAttributes.Alignment, AlignmentIdentifiers.convert(value)); } private ContentAlignment m_textAlignment; } } /** Creates the toggle interface element. It is a two-state (on/off) button that, when selected, generates an action that activates a function in the associated application. Its visual representation can contain a text or an image. */ public class IupToggleButton : IupButtonBase { protected class IupAttributes : super.IupAttributes { enum IupToggleButton = "IupToggleButton"; enum RightButton = "RIGHTBUTTON"; enum ThreeState = "3STATE"; } this() { super(); } this(string title) { super(title); } /* ************* Protected methods *************** */ protected override Ihandle* createIupObject() { return iup.c.api.IupToggle(null, null); } protected override void onCreated() { super.onCreated(); registerCheckedCallback(IupCallbacks.Action); } /* ************* Events *************** */ /** state: 1 if the toggle's state was shifted to ON; 0 if it was shifted to OFF. If SHOW3STATE=YES, −1 if it was shifted to NOTDEF. */ public EventHandler!(CallbackEventArgs, ToggleState) checked; mixin EventCallbackAdapter!(IupToggleButton, "checked", int); private IupElementAction onChecked(int state) nothrow { IupElementAction r = IupElementAction.Default; try { auto callbackArgs = new CallbackEventArgs(); checked(this, callbackArgs, cast(ToggleState)state); r = callbackArgs.result; } catch(Exception ex) { /* do nothing. */ } return r; } /* ************* Properties *************** */ /** Toggle's state. Values can be "ON", "OFF" or "TOGGLE". If 3STATE=YES then can also be "NOTDEF". Default: "OFF". The TOGGLE option will invert the current state (since 3.7). In GTK if you change the state of a radio, the unchecked toggle will receive an ACTION callback notification. Can only be set to Yes for a toggle inside a radio, it will automatically set to OFF the previous toggle that was ON. */ @property { public bool isChecked() { return toggleState == ToggleState.On; } public void isChecked(bool value) { if(value) toggleState = ToggleState.On; else toggleState = ToggleState.Off; } } /// ditto @property { public ToggleState toggleState() { string v = getAttribute(IupAttributes.Value); return ToggleStateIdentifiers.convert(v); } } /// ditto @property { public void toggleState(ToggleState value) { setAttribute(IupAttributes.Value, ToggleStateIdentifiers.convert(value)); } } version(Windows) { /** place the check button at the right of the text. Can be "YES" or "NO". Default: "NO". */ @property { public bool hasRightButton() { return getAttribute(IupAttributes.RightButton) == FlagIdentifiers.Yes; } public void hasRightButton(bool value) { setAttribute(IupAttributes.RightButton, value ? FlagIdentifiers.Yes : FlagIdentifiers.No); } } } /** horizontal and vertical alignment when IMAGE is defined. Possible values: "ALEFT", "ACENTER" and "ARIGHT", combined to "ATOP", "ACENTER" and "ABOTTOM". Default: "ACENTER:ACENTER". Partial values are also accepted, like "ARIGHT" or ":ATOP", the other value will be used from the current alignment. In Motif, vertical alignment is restricted to "ACENTER". In Windows works only when Visual Styles is active. Text is always left aligned. (since 3.0) // BUG: must set isFlat to true. */ @property { public ContentAlignment imageAlignment() { return m_imageAlignment; } public void imageAlignment(ContentAlignment value) { m_imageAlignment = value; setAttribute(IupAttributes.Alignment, AlignmentIdentifiers.convert(value)); } private ContentAlignment m_imageAlignment; } /** Enable a three state toggle. Valid for toggles with text only and that do not belong to a radio. Can be "YES" or NO". Default: "NO". */ @property { public bool isThreeState() { return getAttribute(IupAttributes.ThreeState) == FlagIdentifiers.Yes; } public void isThreeState(bool value) { setAttribute(IupAttributes.ThreeState, value ? FlagIdentifiers.Yes : FlagIdentifiers.No); } } } alias IupToggle = IupToggleButton; /** */ class IupCheckBox : IupToggleButton { this() { super(); } this(string title) { super(title); } } /** */ class IupRadioButton : IupToggleButton { this() { super(); } this(string title) { super(title); } }
D
/* * This file is part of gtkD. * * gtkD is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 2.1 of the License, or * (at your option) any later version. * * gtkD is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with gtkD; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ // generated automatically - do not change // find conversion definition on APILookup.txt // implement new conversion functionalities on the wrap.utils pakage /* * Conversion parameters: * inFile = GstPad.html * outPack = gstreamer * outFile = Pad * strct = GstPad * realStrct= * ctorStrct= * clss = Pad * interf = * class Code: Yes * interface Code: No * template for: * extend = * implements: * prefixes: * - gst_pad_ * - gst_element_ * - gst_ * omit structs: * omit prefixes: * omit code: * - gst_pad_load_and_link * omit signals: * imports: * - gtkD.glib.Str * - gtkD.gstreamer.Element * - gtkD.gstreamer.MiniObject * - gtkD.gstreamer.PadTemplate * - gtkD.gstreamer.Caps * - gtkD.gstreamer.Buffer * - gtkD.gstreamer.Event * - gtkD.gstreamer.Query * - gtkD.glib.ListG * structWrap: * - GList* -> ListG * - GstBuffer* -> Buffer * - GstCaps* -> Caps * - GstElement* -> Element * - GstEvent* -> Event * - GstMiniObject* -> MiniObject * - GstPad* -> Pad * - GstPadTemplate* -> PadTemplate * - GstQuery* -> Query * module aliases: * local aliases: * overrides: */ module gtkD.gstreamer.Pad; public import gtkD.gstreamerc.gstreamertypes; private import gtkD.gstreamerc.gstreamer; private import gtkD.glib.ConstructionException; private import gtkD.gobject.Signals; public import gtkD.gtkc.gdktypes; private import gtkD.glib.Str; private import gtkD.gstreamer.Element; private import gtkD.gstreamer.MiniObject; private import gtkD.gstreamer.PadTemplate; private import gtkD.gstreamer.Caps; private import gtkD.gstreamer.Buffer; private import gtkD.gstreamer.Event; private import gtkD.gstreamer.Query; private import gtkD.glib.ListG; private import gtkD.gstreamer.ObjectGst; /** * Description * A GstElement is linked to other elements via "pads", which are extremely * light-weight generic link points. * After two pads are retrieved from an element with gst_element_get_pad(), * the pads can be link with gst_pad_link(). (For quick links, * you can also use gst_element_link(), which will make the obvious * link for you if it's straightforward.) * Pads are typically created from a GstPadTemplate with * gst_pad_new_from_template(). * Pads have GstCaps attached to it to describe the media type they are * capable of dealing with. gst_pad_get_caps() and gst_pad_set_caps() are * used to manipulate the caps of the pads. * Pads created from a pad template cannot set capabilities that are * incompatible with the pad template capabilities. * Pads without pad templates can be created with gst_pad_new(), * which takes a direction and a name as an argument. If the name is NULL, * then a guaranteed unique name will be assigned to it. * gst_pad_get_parent() will retrieve the GstElement that owns the pad. * A GstElement creating a pad will typically use the various * gst_pad_set_*_function() calls to register callbacks for various events * on the pads. * GstElements will use gst_pad_push() and gst_pad_pull_range() to push out * or pull in a buffer. * To send a GstEvent on a pad, use gst_pad_send_event() and * gst_pad_push_event(). * Last reviewed on 2006-07-06 (0.10.9) */ public class Pad : ObjectGst { /** the main Gtk struct */ protected GstPad* gstPad; public GstPad* getPadStruct() { return gstPad; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)gstPad; } /** * Sets our main struct and passes it to the parent class */ public this (GstPad* gstPad) { if(gstPad is null) { this = null; return; } //Check if there already is a D object for this gtk struct void* ptr = getDObject(cast(GObject*)gstPad); if( ptr !is null ) { this = cast(Pad)ptr; return; } super(cast(GstObject*)gstPad); this.gstPad = gstPad; } /** * Sets our main struct and passes it to the parent class. * This one is additional to make gtkD.gstreamer.Element addOnPadAdded() * working without changes. */ public this (GObject* gstPad) { super(cast(GstObject*)gstPad); this.gstPad = cast(GstPad*) gstPad; } /** * Queries a pad for the stream position. * This is a convenience function for gstreamerD. * Returns: * The current position in nanoseconds - GstFormat.TIME. */ public long queryPosition() { GstFormat form = GstFormat.TIME; long cur_pos; queryPosition( &form, &cur_pos ); return cur_pos; } /** * Queries a pad for the stream duration. * This is a convenience function for gstreamerD. * Returns: * The duration in nanoseconds - GstFormat.TIME. */ public long queryDuration() { GstFormat form = GstFormat.TIME; long cur_dur; queryDuration( &form, &cur_dur ); return cur_dur; } /** */ int[char[]] connectedSignals; bool delegate(MiniObject, Pad)[] onHaveDataListeners; /** * Signals that new data is available on the pad. This signal is used * internally for implementing pad probes. * See gst_pad_add_*_probe functions. */ void addOnHaveData(bool delegate(MiniObject, Pad) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { if ( !("have-data" in connectedSignals) ) { Signals.connectData( getStruct(), "have-data", cast(GCallback)&callBackHaveData, cast(void*)this, null, connectFlags); connectedSignals["have-data"] = 1; } onHaveDataListeners ~= dlg; } extern(C) static gboolean callBackHaveData(GstPad* padStruct, GstMiniObject* miniObj, Pad pad) { foreach ( bool delegate(MiniObject, Pad) dlg ; pad.onHaveDataListeners ) { if ( dlg(new MiniObject(miniObj), pad) ) { return 1; } } return 0; } void delegate(Pad, Pad)[] onLinkedListeners; /** * Signals that a pad has been linked to the peer pad. */ void addOnLinked(void delegate(Pad, Pad) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { if ( !("linked" in connectedSignals) ) { Signals.connectData( getStruct(), "linked", cast(GCallback)&callBackLinked, cast(void*)this, null, connectFlags); connectedSignals["linked"] = 1; } onLinkedListeners ~= dlg; } extern(C) static void callBackLinked(GstPad* padStruct, GstPad* peer, Pad pad) { foreach ( void delegate(Pad, Pad) dlg ; pad.onLinkedListeners ) { dlg(new Pad(peer), pad); } } void delegate(Pad)[] onRequestLinkListeners; /** * Signals that a pad connection has been requested. */ void addOnRequestLink(void delegate(Pad) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { if ( !("request-link" in connectedSignals) ) { Signals.connectData( getStruct(), "request-link", cast(GCallback)&callBackRequestLink, cast(void*)this, null, connectFlags); connectedSignals["request-link"] = 1; } onRequestLinkListeners ~= dlg; } extern(C) static void callBackRequestLink(GstPad* padStruct, Pad pad) { foreach ( void delegate(Pad) dlg ; pad.onRequestLinkListeners ) { dlg(pad); } } void delegate(Pad, Pad)[] onUnlinkedListeners; /** * Signals that a pad has been unlinked from the peer pad. * See Also * GstPadTemplate, GstElement, GstEvent */ void addOnUnlinked(void delegate(Pad, Pad) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { if ( !("unlinked" in connectedSignals) ) { Signals.connectData( getStruct(), "unlinked", cast(GCallback)&callBackUnlinked, cast(void*)this, null, connectFlags); connectedSignals["unlinked"] = 1; } onUnlinkedListeners ~= dlg; } extern(C) static void callBackUnlinked(GstPad* padStruct, GstPad* peer, Pad pad) { foreach ( void delegate(Pad, Pad) dlg ; pad.onUnlinkedListeners ) { dlg(new Pad(peer), pad); } } /** * Gets the direction of the pad. The direction of the pad is * decided at construction time so this function does not take * the LOCK. * Returns: the GstPadDirection of the pad.MT safe. */ public GstPadDirection getDirection() { // GstPadDirection gst_pad_get_direction (GstPad *pad); return gst_pad_get_direction(gstPad); } /** * Gets the parent of pad, cast to a GstElement. If a pad has no parent or * its parent is not an element, return NULL. * Returns: The parent of the pad. The caller has a reference on the parent, sounref when you're finished with it.MT safe. */ public Element getParentElement() { // GstElement* gst_pad_get_parent_element (GstPad *pad); auto p = gst_pad_get_parent_element(gstPad); if(p is null) { return null; } return new Element(cast(GstElement*) p); } /** * Gets the template for pad. * Returns: the GstPadTemplate from which this pad was instantiated, or NULLif this pad has no template.FIXME: currently returns an unrefcounted padtemplate. */ public PadTemplate getPadTemplate() { // GstPadTemplate* gst_pad_get_pad_template (GstPad *pad); auto p = gst_pad_get_pad_template(gstPad); if(p is null) { return null; } return new PadTemplate(cast(GstPadTemplate*) p); } /** * Links the source pad and the sink pad. * Params: * sinkpad = the sink GstPad to link. * Returns: A result code indicating if the connection worked or what went wrong.MT Safe. */ public GstPadLinkReturn link(Pad sinkpad) { // GstPadLinkReturn gst_pad_link (GstPad *srcpad, GstPad *sinkpad); return gst_pad_link(gstPad, (sinkpad is null) ? null : sinkpad.getPadStruct()); } /** * Unlinks the source pad from the sink pad. Will emit the "unlinked" signal on * both pads. * Params: * sinkpad = the sink GstPad to unlink. * Returns: TRUE if the pads were unlinked. This function returns FALSE ifthe pads were not linked together.MT safe. */ public int unlink(Pad sinkpad) { // gboolean gst_pad_unlink (GstPad *srcpad, GstPad *sinkpad); return gst_pad_unlink(gstPad, (sinkpad is null) ? null : sinkpad.getPadStruct()); } /** * Checks if a pad is linked to another pad or not. * Returns: TRUE if the pad is linked, FALSE otherwise.MT safe. */ public int isLinked() { // gboolean gst_pad_is_linked (GstPad *pad); return gst_pad_is_linked(gstPad); } /** * Checks if the source pad and the sink pad can be linked. * Both srcpad and sinkpad must be unlinked. * Params: * sinkpad = the sink GstPad to link. * Returns: TRUE if the pads can be linked, FALSE otherwise. */ public int canLink(Pad sinkpad) { // gboolean gst_pad_can_link (GstPad *srcpad, GstPad *sinkpad); return gst_pad_can_link(gstPad, (sinkpad is null) ? null : sinkpad.getPadStruct()); } /** * Gets the capabilities this pad can produce or consume. * Note that this method doesn't necessarily return the caps set by * gst_pad_set_caps() - use GST_PAD_CAPS for that instead. * gst_pad_get_caps returns all possible caps a pad can operate with, using * the pad's get_caps function; * this returns the pad template caps if not explicitly set. * Returns: a newly allocated copy of the GstCaps of this pad.MT safe. */ public Caps getCaps() { // GstCaps* gst_pad_get_caps (GstPad *pad); auto p = gst_pad_get_caps(gstPad); if(p is null) { return null; } return new Caps(cast(GstCaps*) p); } /** * Gets the capabilities of the allowed media types that can flow through * pad and its peer. * The allowed capabilities is calculated as the intersection of the results of * calling gst_pad_get_caps() on pad and its peer. The caller owns a reference * on the resulting caps. * Returns: the allowed GstCaps of the pad link. Unref the caps when you nolonger need it. This function returns NULL when pad has no peer.MT safe. */ public Caps getAllowedCaps() { // GstCaps* gst_pad_get_allowed_caps (GstPad *pad); auto p = gst_pad_get_allowed_caps(gstPad); if(p is null) { return null; } return new Caps(cast(GstCaps*) p); } /** * Gets the capabilities of the media type that currently flows through pad * and its peer. * This function can be used on both src and sinkpads. Note that srcpads are * always negotiated before sinkpads so it is possible that the negotiated caps * on the srcpad do not match the negotiated caps of the peer. * Returns: the negotiated GstCaps of the pad link. Free the caps whenyou no longer need it. This function returns NULL when the pad has nopeer or is not negotiated yet.MT safe. */ public Caps getNegotiatedCaps() { // GstCaps* gst_pad_get_negotiated_caps (GstPad *pad); auto p = gst_pad_get_negotiated_caps(gstPad); if(p is null) { return null; } return new Caps(cast(GstCaps*) p); } /** * Gets the capabilities for pad's template. * Returns: the GstCaps of this pad template. If you intend to keep a referenceon the caps, make a copy (see gst_caps_copy()). */ public Caps getPadTemplateCaps() { // const GstCaps* gst_pad_get_pad_template_caps (GstPad *pad); auto p = gst_pad_get_pad_template_caps(gstPad); if(p is null) { return null; } return new Caps(cast(GstCaps*) p); } /** * Sets the capabilities of this pad. The caps must be fixed. Any previous * caps on the pad will be unreffed. This function refs the caps so you should * unref if as soon as you don't need it anymore. * It is possible to set NULL caps, which will make the pad unnegotiated * again. * Params: * caps = a GstCaps to set. * Returns: TRUE if the caps could be set. FALSE if the caps were not fixedor bad parameters were provided to this function.MT safe. */ public int setCaps(Caps caps) { // gboolean gst_pad_set_caps (GstPad *pad, GstCaps *caps); return gst_pad_set_caps(gstPad, (caps is null) ? null : caps.getCapsStruct()); } /** * Gets the peer of pad. This function refs the peer pad so * you need to unref it after use. * Returns: the peer GstPad. Unref after usage.MT safe. */ public Pad getPeer() { // GstPad* gst_pad_get_peer (GstPad *pad); auto p = gst_pad_get_peer(gstPad); if(p is null) { return null; } return new Pad(cast(GstPad*) p); } /** * Gets the capabilities of the peer connected to this pad. * Returns: the GstCaps of the peer pad. This function returns a new caps, so usegst_caps_unref to get rid of it. this function returns NULL if there is nopeer pad. */ public Caps peerGetCaps() { // GstCaps* gst_pad_peer_get_caps (GstPad *pad); auto p = gst_pad_peer_get_caps(gstPad); if(p is null) { return null; } return new Caps(cast(GstCaps*) p); } /** * A helper function you can use that sets the * gst_pad_get_fixed_caps_func as the getcaps function for the * pad. This way the function will always return the negotiated caps * or in case the pad is not negotiated, the padtemplate caps. * Use this function on a pad that, once _set_caps() has been called * on it, cannot be renegotiated to something else. */ public void useFixedCaps() { // void gst_pad_use_fixed_caps (GstPad *pad); gst_pad_use_fixed_caps(gstPad); } /** * Query if a pad is active * Returns: TRUE if the pad is active.MT safe. */ public int isActive() { // gboolean gst_pad_is_active (GstPad *pad); return gst_pad_is_active(gstPad); } /** * Blocks or unblocks the dataflow on a pad. This function is * a shortcut for gst_pad_set_blocked_async() with a NULL * callback. * Params: * blocked = boolean indicating we should block or unblock * Returns: TRUE if the pad could be blocked. This function can fail wrong parameters were passed or the pad was already in the requested state.MT safe. */ public int setBlocked(int blocked) { // gboolean gst_pad_set_blocked (GstPad *pad, gboolean blocked); return gst_pad_set_blocked(gstPad, blocked); } /** * Blocks or unblocks the dataflow on a pad. The provided callback * is called when the operation succeeds; this happens right before the next * attempt at pushing a buffer on the pad. * This can take a while as the pad can only become blocked when real dataflow * is happening. * When the pipeline is stalled, for example in PAUSED, this can * take an indeterminate amount of time. * You can pass NULL as the callback to make this call block. Be careful with * this blocking call as it might not return for reasons stated above. * Params: * blocked = boolean indicating whether the pad should be blocked or unblocked * callback = GstPadBlockCallback that will be called when the * operation succeeds * userData = user data passed to the callback * Returns: TRUE if the pad could be blocked. This function can fail if wrong parameters were passed or the pad was already in the requested state.MT safe. */ public int setBlockedAsync(int blocked, GstPadBlockCallback callback, void* userData) { // gboolean gst_pad_set_blocked_async (GstPad *pad, gboolean blocked, GstPadBlockCallback callback, gpointer user_data); return gst_pad_set_blocked_async(gstPad, blocked, callback, userData); } /** * Checks if the pad is blocked or not. This function returns the * last requested state of the pad. It is not certain that the pad * is actually blocking at this point (see gst_pad_is_blocking()). * Returns: TRUE if the pad is blocked.MT safe. */ public int isBlocked() { // gboolean gst_pad_is_blocked (GstPad *pad); return gst_pad_is_blocked(gstPad); } /** * Checks if the pad is blocking or not. This is a guaranteed state * of whether the pad is actually blocking on a GstBuffer or a GstEvent. * Returns: TRUE if the pad is blocking.MT safe.Since 0.10.11 */ public int isBlocking() { // gboolean gst_pad_is_blocking (GstPad *pad); return gst_pad_is_blocking(gstPad); } /** * Adds a "data probe" to a pad. This function will be called whenever data * passes through a pad. In this case data means both events and buffers. The * probe will be called with the data as an argument, meaning handler should * have the same callback signature as the 'have-data' signal of GstPad. * Note that the data will have a reference count greater than 1, so it will * be immutable -- you must not change it. * For source pads, the probe will be called after the blocking function, if any * (see gst_pad_set_blocked_async()), but before looking up the peer to chain * to. For sink pads, the probe function will be called before configuring the * sink with new caps, if any, and before calling the pad's chain function. * Your data probe should return TRUE to let the data continue to flow, or FALSE * to drop it. Dropping data is rarely useful, but occasionally comes in handy * with events. * Although probes are implemented internally by connecting handler to the * have-data signal on the pad, if you want to remove a probe it is insufficient * to only call g_signal_handler_disconnect on the returned handler id. To * remove a probe, use the appropriate function, such as * gst_pad_remove_data_probe(). * Params: * handler = function to call when data is passed over pad * data = data to pass along with the handler * Returns: The handler id. */ public uint addDataProbe(GCallback handler, void* data) { // gulong gst_pad_add_data_probe (GstPad *pad, GCallback handler, gpointer data); return gst_pad_add_data_probe(gstPad, handler, data); } /** * Adds a probe that will be called for all buffers passing through a pad. See * gst_pad_add_data_probe() for more information. * Params: * handler = function to call when data is passed over pad * data = data to pass along with the handler * Returns: The handler id */ public uint addBufferProbe(GCallback handler, void* data) { // gulong gst_pad_add_buffer_probe (GstPad *pad, GCallback handler, gpointer data); return gst_pad_add_buffer_probe(gstPad, handler, data); } /** * Adds a probe that will be called for all events passing through a pad. See * gst_pad_add_data_probe() for more information. * Params: * handler = function to call when data is passed over pad * data = data to pass along with the handler * Returns: The handler id */ public uint addEventProbe(GCallback handler, void* data) { // gulong gst_pad_add_event_probe (GstPad *pad, GCallback handler, gpointer data); return gst_pad_add_event_probe(gstPad, handler, data); } /** * Removes a data probe from pad. * Params: * handlerId = handler id returned from gst_pad_add_data_probe */ public void removeDataProbe(uint handlerId) { // void gst_pad_remove_data_probe (GstPad *pad, guint handler_id); gst_pad_remove_data_probe(gstPad, handlerId); } /** * Removes a buffer probe from pad. * Params: * handlerId = handler id returned from gst_pad_add_buffer_probe */ public void removeBufferProbe(uint handlerId) { // void gst_pad_remove_buffer_probe (GstPad *pad, guint handler_id); gst_pad_remove_buffer_probe(gstPad, handlerId); } /** * Removes an event probe from pad. * Params: * handlerId = handler id returned from gst_pad_add_event_probe */ public void removeEventProbe(uint handlerId) { // void gst_pad_remove_event_probe (GstPad *pad, guint handler_id); gst_pad_remove_event_probe(gstPad, handlerId); } /** * Creates a new pad with the given name in the given direction. * If name is NULL, a guaranteed unique name (across all pads) * will be assigned. * This function makes a copy of the name so you can safely free the name. * Params: * name = the name of the new pad. * direction = the GstPadDirection of the pad. * Throws: ConstructionException GTK+ fails to create the object. */ public this (string name, GstPadDirection direction) { // GstPad* gst_pad_new (const gchar *name, GstPadDirection direction); auto p = gst_pad_new(Str.toStringz(name), direction); if(p is null) { throw new ConstructionException("null returned by gst_pad_new(Str.toStringz(name), direction)"); } this(cast(GstPad*) p); } /** * Creates a new pad with the given name from the given template. * If name is NULL, a guaranteed unique name (across all pads) * will be assigned. * This function makes a copy of the name so you can safely free the name. * Params: * templ = the pad template to use * name = the name of the element * Throws: ConstructionException GTK+ fails to create the object. */ public this (PadTemplate templ, string name) { // GstPad* gst_pad_new_from_template (GstPadTemplate *templ, const gchar *name); auto p = gst_pad_new_from_template((templ is null) ? null : templ.getPadTemplateStruct(), Str.toStringz(name)); if(p is null) { throw new ConstructionException("null returned by gst_pad_new_from_template((templ is null) ? null : templ.getPadTemplateStruct(), Str.toStringz(name))"); } this(cast(GstPad*) p); } /** * Creates a new pad with the given name from the given static template. * If name is NULL, a guaranteed unique name (across all pads) * will be assigned. * This function makes a copy of the name so you can safely free the name. * Params: * templ = the GstStaticPadTemplate to use * name = the name of the element * Throws: ConstructionException GTK+ fails to create the object. */ public this (GstStaticPadTemplate* templ, string name) { // GstPad* gst_pad_new_from_static_template (GstStaticPadTemplate *templ, const gchar *name); auto p = gst_pad_new_from_static_template(templ, Str.toStringz(name)); if(p is null) { throw new ConstructionException("null returned by gst_pad_new_from_static_template(templ, Str.toStringz(name))"); } this(cast(GstPad*) p); } /** * Allocates a new, empty buffer optimized to push to pad pad. This * function only works if pad is a source pad and has a peer. * A new, empty GstBuffer will be put in the buf argument. * You need to check the caps of the buffer after performing this * function and renegotiate to the format if needed. * Params: * offset = the offset of the new buffer in the stream * size = the size of the new buffer * caps = the caps of the new buffer * buf = a newly allocated buffer * Returns: a result code indicating success of the operation. Anyresult code other than GST_FLOW_OK is an error and buf shouldnot be used.An error can occur if the pad is not connected or when the downstreampeer elements cannot provide an acceptable buffer.MT safe. */ public GstFlowReturn allocBuffer(ulong offset, int size, Caps caps, GstBuffer** buf) { // GstFlowReturn gst_pad_alloc_buffer (GstPad *pad, guint64 offset, gint size, GstCaps *caps, GstBuffer **buf); return gst_pad_alloc_buffer(gstPad, offset, size, (caps is null) ? null : caps.getCapsStruct(), buf); } /** * In addition to the function gst_pad_alloc_buffer(), this function * automatically calls gst_pad_set_caps() when the caps of the * newly allocated buffer are different from the pad caps. * Params: * offset = the offset of the new buffer in the stream * size = the size of the new buffer * caps = the caps of the new buffer * buf = a newly allocated buffer * Returns: a result code indicating success of the operation. Anyresult code other than GST_FLOW_OK is an error and buf shouldnot be used.An error can occur if the pad is not connected or when the downstreampeer elements cannot provide an acceptable buffer.MT safe. */ public GstFlowReturn allocBufferAndSetCaps(ulong offset, int size, Caps caps, GstBuffer** buf) { // GstFlowReturn gst_pad_alloc_buffer_and_set_caps (GstPad *pad, guint64 offset, gint size, GstCaps *caps, GstBuffer **buf); return gst_pad_alloc_buffer_and_set_caps(gstPad, offset, size, (caps is null) ? null : caps.getCapsStruct(), buf); } /** * Sets the given bufferalloc function for the pad. Note that the * bufferalloc function can only be set on sinkpads. * Params: * bufalloc = the GstPadBufferAllocFunction to set. */ public void setBufferallocFunction(GstPadBufferAllocFunction bufalloc) { // void gst_pad_set_bufferalloc_function (GstPad *pad, GstPadBufferAllocFunction bufalloc); gst_pad_set_bufferalloc_function(gstPad, bufalloc); } /** * Sets the given chain function for the pad. The chain function is called to * process a GstBuffer input buffer. see GstPadChainFunction for more details. * Params: * chain = the GstPadChainFunction to set. */ public void setChainFunction(GstPadChainFunction chain) { // void gst_pad_set_chain_function (GstPad *pad, GstPadChainFunction chain); gst_pad_set_chain_function(gstPad, chain); } /** * Sets the given checkgetrange function for the pad. Implement this function on * a pad if you dynamically support getrange based scheduling on the pad. * Params: * check = the GstPadCheckGetRangeFunction to set. */ public void setCheckgetrangeFunction(GstPadCheckGetRangeFunction check) { // void gst_pad_set_checkgetrange_function (GstPad *pad, GstPadCheckGetRangeFunction check); gst_pad_set_checkgetrange_function(gstPad, check); } /** * When pad is flushing this function returns GST_FLOW_WRONG_STATE * immediatly. * Calls the getrange function of pad, see GstPadGetRangeFunction for a * description of a getrange function. If pad has no getrange function * installed (see gst_pad_set_getrange_function()) this function returns * GST_FLOW_NOT_SUPPORTED. * buffer's caps must either be unset or the same as what is already configured * on pad. Renegotiation within a running pull-mode pipeline is not supported. * Params: * offset = The start offset of the buffer * size = The length of the buffer * buffer = a pointer to hold the GstBuffer, returns GST_FLOW_ERROR if NULL. * Returns: a GstFlowReturn from the pad.MT safe. */ public GstFlowReturn getRange(ulong offset, uint size, GstBuffer** buffer) { // GstFlowReturn gst_pad_get_range (GstPad *pad, guint64 offset, guint size, GstBuffer **buffer); return gst_pad_get_range(gstPad, offset, size, buffer); } /** * Sets the given getrange function for the pad. The getrange function is called to * produce a new GstBuffer to start the processing pipeline. see * GstPadGetRangeFunction for a description of the getrange function. * Params: * get = the GstPadGetRangeFunction to set. */ public void setGetrangeFunction(GstPadGetRangeFunction get) { // void gst_pad_set_getrange_function (GstPad *pad, GstPadGetRangeFunction get); gst_pad_set_getrange_function(gstPad, get); } /** * Sets the given event handler for the pad. * Params: * event = the GstPadEventFunction to set. */ public void setEventFunction(GstPadEventFunction event) { // void gst_pad_set_event_function (GstPad *pad, GstPadEventFunction event); gst_pad_set_event_function(gstPad, event); } /** * Sets the given link function for the pad. It will be called when * the pad is linked with another pad. * The return value GST_PAD_LINK_OK should be used when the connection can be * made. * The return value GST_PAD_LINK_REFUSED should be used when the connection * cannot be made for some reason. * If link is installed on a source pad, it should call the GstPadLinkFunction * of the peer sink pad, if present. * Params: * link = the GstPadLinkFunction to set. */ public void setLinkFunction(GstPadLinkFunction link) { // void gst_pad_set_link_function (GstPad *pad, GstPadLinkFunction link); gst_pad_set_link_function(gstPad, link); } /** * Sets the given unlink function for the pad. It will be called * when the pad is unlinked. * Params: * unlink = the GstPadUnlinkFunction to set. */ public void setUnlinkFunction(GstPadUnlinkFunction unlink) { // void gst_pad_set_unlink_function (GstPad *pad, GstPadUnlinkFunction unlink); gst_pad_set_unlink_function(gstPad, unlink); } /** * Check if the given pad accepts the caps. * Params: * caps = a GstCaps to check on the pad * Returns: TRUE if the pad can accept the caps. */ public int acceptCaps(Caps caps) { // gboolean gst_pad_accept_caps (GstPad *pad, GstCaps *caps); return gst_pad_accept_caps(gstPad, (caps is null) ? null : caps.getCapsStruct()); } /** * Sets the given acceptcaps function for the pad. The acceptcaps function * will be called to check if the pad can accept the given caps. Setting the * acceptcaps function to NULL restores the default behaviour of allowing * any caps that matches the caps from gst_pad_get_caps. * Params: * acceptcaps = the GstPadAcceptCapsFunction to set. */ public void setAcceptcapsFunction(GstPadAcceptCapsFunction acceptcaps) { // void gst_pad_set_acceptcaps_function (GstPad *pad, GstPadAcceptCapsFunction acceptcaps); gst_pad_set_acceptcaps_function(gstPad, acceptcaps); } /** * Sets the given getcaps function for the pad. getcaps should return the * allowable caps for a pad in the context of the element's state, its link to * other elements, and the devices or files it has opened. These caps must be a * subset of the pad template caps. In the NULL state with no links, getcaps * should ideally return the same caps as the pad template. In rare * circumstances, an object property can affect the caps returned by getcaps, * but this is discouraged. * You do not need to call this function if pad's allowed caps are always the * same as the pad template caps. This can only be true if the padtemplate * has fixed simple caps. * For most filters, the caps returned by getcaps is directly affected by the * allowed caps on other pads. For demuxers and decoders, the caps returned by * the srcpad's getcaps function is directly related to the stream data. Again, * getcaps should return the most specific caps it reasonably can, since this * helps with autoplugging. * Note that the return value from getcaps is owned by the caller, so the caller * should unref the caps after usage. * Params: * getcaps = the GstPadGetCapsFunction to set. */ public void setGetcapsFunction(GstPadGetCapsFunction getcaps) { // void gst_pad_set_getcaps_function (GstPad *pad, GstPadGetCapsFunction getcaps); gst_pad_set_getcaps_function(gstPad, getcaps); } /** * Calls gst_pad_get_allowed_caps() for every other pad belonging to the * same element as pad, and returns the intersection of the results. * This function is useful as a default getcaps function for an element * that can handle any stream format, but requires all its pads to have * the same caps. Two such elements are tee and aggregator. * Returns: the intersection of the other pads' allowed caps. */ public Caps proxyGetcaps() { // GstCaps* gst_pad_proxy_getcaps (GstPad *pad); auto p = gst_pad_proxy_getcaps(gstPad); if(p is null) { return null; } return new Caps(cast(GstCaps*) p); } /** * Sets the given setcaps function for the pad. The setcaps function * will be called whenever a buffer with a new media type is pushed or * pulled from the pad. The pad/element needs to update its internal * structures to process the new media type. If this new type is not * acceptable, the setcaps function should return FALSE. * Params: * setcaps = the GstPadSetCapsFunction to set. */ public void setSetcapsFunction(GstPadSetCapsFunction setcaps) { // void gst_pad_set_setcaps_function (GstPad *pad, GstPadSetCapsFunction setcaps); gst_pad_set_setcaps_function(gstPad, setcaps); } /** * Calls gst_pad_set_caps() for every other pad belonging to the * same element as pad. If gst_pad_set_caps() fails on any pad, * the proxy setcaps fails. May be used only during negotiation. * Params: * caps = the GstCaps to link with * Returns: TRUE if sucessful */ public int proxySetcaps(Caps caps) { // gboolean gst_pad_proxy_setcaps (GstPad *pad, GstCaps *caps); return gst_pad_proxy_setcaps(gstPad, (caps is null) ? null : caps.getCapsStruct()); } /** * Fixate a caps on the given pad. Modifies the caps in place, so you should * make sure that the caps are actually writable (see gst_caps_make_writable()). * Params: * caps = the GstCaps to fixate */ public void fixateCaps(Caps caps) { // void gst_pad_fixate_caps (GstPad *pad, GstCaps *caps); gst_pad_fixate_caps(gstPad, (caps is null) ? null : caps.getCapsStruct()); } /** * Sets the given fixatecaps function for the pad. The fixatecaps function * will be called whenever the default values for a GstCaps needs to be * filled in. * Params: * fixatecaps = the GstPadFixateCapsFunction to set. */ public void setFixatecapsFunction(GstPadFixateCapsFunction fixatecaps) { // void gst_pad_set_fixatecaps_function (GstPad *pad, GstPadFixateCapsFunction fixatecaps); gst_pad_set_fixatecaps_function(gstPad, fixatecaps); } /** * A helper function you can use as a GetCaps function that * will return the currently negotiated caps or the padtemplate * when NULL. * Returns: The currently negotiated caps or the padtemplate. */ public Caps getFixedCapsFunc() { // GstCaps* gst_pad_get_fixed_caps_func (GstPad *pad); auto p = gst_pad_get_fixed_caps_func(gstPad); if(p is null) { return null; } return new Caps(cast(GstCaps*) p); } /** * Check if the peer of pad accepts caps. If pad has no peer, this function * returns TRUE. * Params: * caps = a GstCaps to check on the pad * Returns: TRUE if the peer of pad can accept the caps or pad has no peer. */ public int peerAcceptCaps(Caps caps) { // gboolean gst_pad_peer_accept_caps (GstPad *pad, GstCaps *caps); return gst_pad_peer_accept_caps(gstPad, (caps is null) ? null : caps.getCapsStruct()); } /** * Sets the given activate function for pad. The activate function will * dispatch to gst_pad_activate_push() or gst_pad_activate_pull() to perform * the actual activation. Only makes sense to set on sink pads. * Call this function if your sink pad can start a pull-based task. * Params: * activate = the GstPadActivateFunction to set. */ public void setActivateFunction(GstPadActivateFunction activate) { // void gst_pad_set_activate_function (GstPad *pad, GstPadActivateFunction activate); gst_pad_set_activate_function(gstPad, activate); } /** * Sets the given activate_push function for the pad. An activate_push function * prepares the element for pushing. See XXX part-activation.txt for details. * Params: * activatepush = the GstPadActivateModeFunction to set. */ public void setActivatepushFunction(GstPadActivateModeFunction activatepush) { // void gst_pad_set_activatepush_function (GstPad *pad, GstPadActivateModeFunction activatepush); gst_pad_set_activatepush_function(gstPad, activatepush); } /** * Sets the given activate_pull function for the pad. An activate_pull function * prepares the element and any upstream connections for pulling. See XXX * part-activation.txt for details. * Params: * activatepull = the GstPadActivateModeFunction to set. */ public void setActivatepullFunction(GstPadActivateModeFunction activatepull) { // void gst_pad_set_activatepull_function (GstPad *pad, GstPadActivateModeFunction activatepull); gst_pad_set_activatepull_function(gstPad, activatepull); } /** * Pushes a buffer to the peer of pad. * This function will call an installed pad block before triggering any * installed pad probes. * If the caps on buffer are different from the currently configured caps on * pad, this function will call any installed setcaps function on pad (see * gst_pad_set_setcaps_function()). In case of failure to renegotiate the new * format, this function returns GST_FLOW_NOT_NEGOTIATED. * The function proceeds calling gst_pad_chain() on the peer pad and returns the * value from that function. If pad has no peer, GST_FLOW_NOT_LINKED will be * returned. * In all cases, success or failure, the caller loses its reference to buffer * after calling this function. * Params: * buffer = the GstBuffer to push returns GST_FLOW_ERROR if not. * Returns: a GstFlowReturn from the peer pad.MT safe. */ public GstFlowReturn push(Buffer buffer) { // GstFlowReturn gst_pad_push (GstPad *pad, GstBuffer *buffer); return gst_pad_push(gstPad, (buffer is null) ? null : buffer.getBufferStruct()); } /** * Sends the event to the peer of the given pad. This function is * mainly used by elements to send events to their peer * elements. * This function takes owership of the provided event so you should * gst_event_ref() it if you want to reuse the event after this call. * Params: * event = the GstEvent to send to the pad. * Returns: TRUE if the event was handled.MT safe. */ public int pushEvent(Event event) { // gboolean gst_pad_push_event (GstPad *pad, GstEvent *event); return gst_pad_push_event(gstPad, (event is null) ? null : event.getEventStruct()); } /** * Checks if a gst_pad_pull_range() can be performed on the peer * source pad. This function is used by plugins that want to check * if they can use random access on the peer source pad. * The peer sourcepad can implement a custom GstPadCheckGetRangeFunction * if it needs to perform some logic to determine if pull_range is * possible. * Returns: a gboolean with the result.MT safe. */ public int checkPullRange() { // gboolean gst_pad_check_pull_range (GstPad *pad); return gst_pad_check_pull_range(gstPad); } /** * Pulls a buffer from the peer pad. * This function will first trigger the pad block signal if it was * installed. * When pad is not linked GST_FLOW_NOT_LINKED is returned else this * function returns the result of gst_pad_get_range() on the peer pad. * See gst_pad_get_range() for a list of return values and for the * semantics of the arguments of this function. * buffer's caps must either be unset or the same as what is already configured * on pad. Renegotiation within a running pull-mode pipeline is not supported. * Params: * offset = The start offset of the buffer * size = The length of the buffer * buffer = a pointer to hold the GstBuffer, returns GST_FLOW_ERROR if NULL. * Returns: a GstFlowReturn from the peer pad.When this function returns GST_FLOW_OK, buffer will contain a validGstBuffer that should be freed with gst_buffer_unref() after usage.buffer may not be used or freed when any other return value than GST_FLOW_OK is returned.MT safe. */ public GstFlowReturn pullRange(ulong offset, uint size, GstBuffer** buffer) { // GstFlowReturn gst_pad_pull_range (GstPad *pad, guint64 offset, guint size, GstBuffer **buffer); return gst_pad_pull_range(gstPad, offset, size, buffer); } /** * Activates or deactivates the given pad in pull mode via dispatching to the * pad's activatepullfunc. For use from within pad activation functions only. * When called on sink pads, will first proxy the call to the peer pad, which is * expected to activate its internally linked pads from within its activate_pull * function. * If you don't know what this is, you probably don't want to call it. * Params: * active = whether or not the pad should be active. * Returns: TRUE if the operation was successful.MT safe. */ public int activatePull(int active) { // gboolean gst_pad_activate_pull (GstPad *pad, gboolean active); return gst_pad_activate_pull(gstPad, active); } /** * Activates or deactivates the given pad in push mode via dispatching to the * pad's activatepushfunc. For use from within pad activation functions only. * If you don't know what this is, you probably don't want to call it. * Params: * active = whether the pad should be active or not. * Returns: TRUE if the operation was successful.MT safe. */ public int activatePush(int active) { // gboolean gst_pad_activate_push (GstPad *pad, gboolean active); return gst_pad_activate_push(gstPad, active); } /** * Sends the event to the pad. This function can be used * by applications to send events in the pipeline. * If pad is a source pad, event should be an upstream event. If pad is a * sink pad, event should be a downstream event. For example, you would not * send a GST_EVENT_EOS on a src pad; EOS events only propagate downstream. * Furthermore, some downstream events have to be serialized with data flow, * like EOS, while some can travel out-of-band, like GST_EVENT_FLUSH_START. If * the event needs to be serialized with data flow, this function will take the * pad's stream lock while calling its event function. * To find out whether an event type is upstream, downstream, or downstream and * serialized, see GstEventTypeFlags, gst_event_type_get_flags(), * GST_EVENT_IS_UPSTREAM, GST_EVENT_IS_DOWNSTREAM, and * GST_EVENT_IS_SERIALIZED. Note that in practice that an application or plugin * doesn't need to bother itself with this information; the core handles all * necessary locks and checks. * This function takes owership of the provided event so you should * gst_event_ref() it if you want to reuse the event after this call. * Params: * event = the GstEvent to send to the pad. * Returns: TRUE if the event was handled. */ public int sendEvent(Event event) { // gboolean gst_pad_send_event (GstPad *pad, GstEvent *event); return gst_pad_send_event(gstPad, (event is null) ? null : event.getEventStruct()); } /** * Invokes the default event handler for the given pad. End-of-stream and * discontinuity events are handled specially, and then the event is sent to all * pads internally linked to pad. Note that if there are many possible sink * pads that are internally linked to pad, only one will be sent an event. * Multi-sinkpad elements should implement custom event handlers. * Params: * event = the GstEvent to handle. * Returns: TRUE if the event was sent succesfully. */ public int eventDefault(Event event) { // gboolean gst_pad_event_default (GstPad *pad, GstEvent *event); return gst_pad_event_default(gstPad, (event is null) ? null : event.getEventStruct()); } /** * Dispatches a query to a pad. The query should have been allocated by the * caller via one of the type-specific allocation functions in gstquery.h. The * element is responsible for filling the query with an appropriate response, * which should then be parsed with a type-specific query parsing function. * Again, the caller is responsible for both the allocation and deallocation of * the query structure. * Params: * query = the GstQuery to perform. * Returns: TRUE if the query could be performed. */ public int query(Query query) { // gboolean gst_pad_query (GstPad *pad, GstQuery *query); return gst_pad_query(gstPad, (query is null) ? null : query.getQueryStruct()); } /** * Invokes the default query handler for the given pad. * The query is sent to all pads internally linked to pad. Note that * if there are many possible sink pads that are internally linked to * pad, only one will be sent the query. * Multi-sinkpad elements should implement custom query handlers. * Params: * query = the GstQuery to handle. * Returns: TRUE if the query was performed succesfully. */ public int queryDefault(Query query) { // gboolean gst_pad_query_default (GstPad *pad, GstQuery *query); return gst_pad_query_default(gstPad, (query is null) ? null : query.getQueryStruct()); } /** * Queries a pad for the stream position. * Params: * format = a pointer to the GstFormat asked for. * On return contains the GstFormat used. * cur = A location in which to store the current position, or NULL. * Returns: TRUE if the query could be performed. */ public int queryPosition(GstFormat* format, long* cur) { // gboolean gst_pad_query_position (GstPad *pad, GstFormat *format, gint64 *cur); return gst_pad_query_position(gstPad, format, cur); } /** * Queries a pad for the total stream duration. * Params: * format = a pointer to the GstFormat asked for. * On return contains the GstFormat used. * duration = A location in which to store the total duration, or NULL. * Returns: TRUE if the query could be performed. */ public int queryDuration(GstFormat* format, long* duration) { // gboolean gst_pad_query_duration (GstPad *pad, GstFormat *format, gint64 *duration); return gst_pad_query_duration(gstPad, format, duration); } /** * Queries a pad to convert src_val in src_format to dest_format. * Params: * srcFormat = a GstFormat to convert from. * srcVal = a value to convert. * destFormat = a pointer to the GstFormat to convert to. * destVal = a pointer to the result. * Returns: TRUE if the query could be performed. */ public int queryConvert(GstFormat srcFormat, long srcVal, GstFormat* destFormat, long* destVal) { // gboolean gst_pad_query_convert (GstPad *pad, GstFormat src_format, gint64 src_val, GstFormat *dest_format, gint64 *dest_val); return gst_pad_query_convert(gstPad, srcFormat, srcVal, destFormat, destVal); } /** * Queries the peer of a given sink pad for the stream position. * Params: * format = a pointer to the GstFormat asked for. * On return contains the GstFormat used. * cur = A location in which to store the current position, or NULL. * Returns: TRUE if the query could be performed. */ public int queryPeerPosition(GstFormat* format, long* cur) { // gboolean gst_pad_query_peer_position (GstPad *pad, GstFormat *format, gint64 *cur); return gst_pad_query_peer_position(gstPad, format, cur); } /** * Queries the peer pad of a given sink pad for the total stream duration. * Params: * format = a pointer to the GstFormat asked for. * On return contains the GstFormat used. * duration = A location in which to store the total duration, or NULL. * Returns: TRUE if the query could be performed. */ public int queryPeerDuration(GstFormat* format, long* duration) { // gboolean gst_pad_query_peer_duration (GstPad *pad, GstFormat *format, gint64 *duration); return gst_pad_query_peer_duration(gstPad, format, duration); } /** * Queries the peer pad of a given sink pad to convert src_val in src_format * to dest_format. * Params: * srcFormat = a GstFormat to convert from. * srcVal = a value to convert. * destFormat = a pointer to the GstFormat to convert to. * destVal = a pointer to the result. * Returns: TRUE if the query could be performed. */ public int queryPeerConvert(GstFormat srcFormat, long srcVal, GstFormat* destFormat, long* destVal) { // gboolean gst_pad_query_peer_convert (GstPad *pad, GstFormat src_format, gint64 src_val, GstFormat *dest_format, gint64 *dest_val); return gst_pad_query_peer_convert(gstPad, srcFormat, srcVal, destFormat, destVal); } /** * Set the given query function for the pad. * Params: * query = the GstPadQueryFunction to set. */ public void setQueryFunction(GstPadQueryFunction query) { // void gst_pad_set_query_function (GstPad *pad, GstPadQueryFunction query); gst_pad_set_query_function(gstPad, query); } /** * Set the given query type function for the pad. * Params: * typeFunc = the GstPadQueryTypeFunction to set. */ public void setQueryTypeFunction(GstPadQueryTypeFunction typeFunc) { // void gst_pad_set_query_type_function (GstPad *pad, GstPadQueryTypeFunction type_func); gst_pad_set_query_type_function(gstPad, typeFunc); } /** * Get an array of supported queries that can be performed * on this pad. * Returns: a zero-terminated array of GstQueryType. */ public GstQueryType* getQueryTypes() { // const GstQueryType* gst_pad_get_query_types (GstPad *pad); return gst_pad_get_query_types(gstPad); } /** * Invoke the default dispatcher for the query types on * the pad. * Returns: an zero-terminated array of GstQueryType, or NULL if none of theinternally-linked pads has a query types function. */ public GstQueryType* getQueryTypesDefault() { // const GstQueryType* gst_pad_get_query_types_default (GstPad *pad); return gst_pad_get_query_types_default(gstPad); } /** * Sets the given internal link function for the pad. * Params: * intlink = the GstPadIntLinkFunction to set. */ public void setInternalLinkFunction(GstPadIntLinkFunction intlink) { // void gst_pad_set_internal_link_function (GstPad *pad, GstPadIntLinkFunction intlink); gst_pad_set_internal_link_function(gstPad, intlink); } /** * Gets a list of pads to which the given pad is linked to * inside of the parent element. * The caller must free this list after use. * Returns: a newly allocated GList of pads.Not MT safe. */ public ListG getInternalLinks() { // GList* gst_pad_get_internal_links (GstPad *pad); auto p = gst_pad_get_internal_links(gstPad); if(p is null) { return null; } return new ListG(cast(GList*) p); } /** * Gets a list of pads to which the given pad is linked to * inside of the parent element. * This is the default handler, and thus returns a list of all of the * pads inside the parent element with opposite direction. * The caller must free this list after use. * Returns: a newly allocated GList of pads, or NULL if the pad has no parent.Not MT safe. */ public ListG getInternalLinksDefault() { // GList* gst_pad_get_internal_links_default (GstPad *pad); auto p = gst_pad_get_internal_links_default(gstPad); if(p is null) { return null; } return new ListG(cast(GList*) p); } /** * Invokes the given dispatcher function on each respective peer of * all pads that are internally linked to the given pad. * The GstPadDispatcherFunction should return TRUE when no further pads * need to be processed. * Params: * dispatch = the GstDispatcherFunction to call. * data = gpointer user data passed to the dispatcher function. * Returns: TRUE if one of the dispatcher functions returned TRUE. */ public int dispatcher(GstPadDispatcherFunction dispatch, void* data) { // gboolean gst_pad_dispatcher (GstPad *pad, GstPadDispatcherFunction dispatch, gpointer data); return gst_pad_dispatcher(gstPad, dispatch, data); } /** * Set the given private data gpointer on the pad. * This function can only be used by the element that owns the pad. * No locking is performed in this function. * Params: * priv = The private data to attach to the pad. */ public void setElementPrivate(void* priv) { // void gst_pad_set_element_private (GstPad *pad, gpointer priv); gst_pad_set_element_private(gstPad, priv); } /** * Gets the private data of a pad. * No locking is performed in this function. * Returns: a gpointer to the private data. */ public void* getElementPrivate() { // gpointer gst_pad_get_element_private (GstPad *pad); return gst_pad_get_element_private(gstPad); } /** * Chain a buffer to pad. * The function returns GST_FLOW_WRONG_STATE if the pad was flushing. * If the caps on buffer are different from the current caps on pad, this * function will call any setcaps function (see gst_pad_set_setcaps_function()) * installed on pad. If the new caps are not acceptable for pad, this function * returns GST_FLOW_NOT_NEGOTIATED. * The function proceeds calling the chain function installed on pad (see * gst_pad_set_chain_function()) and the return value of that function is * returned to the caller. GST_FLOW_NOT_SUPPORTED is returned if pad has no * chain function. * In all cases, success or failure, the caller loses its reference to buffer * after calling this function. * Params: * buffer = the GstBuffer to send, return GST_FLOW_ERROR if not. * Returns: a GstFlowReturn from the pad.MT safe. */ public GstFlowReturn chain(Buffer buffer) { // GstFlowReturn gst_pad_chain (GstPad *pad, GstBuffer *buffer); return gst_pad_chain(gstPad, (buffer is null) ? null : buffer.getBufferStruct()); } /** * Starts a task that repeatedly calls func with data. This function * is mostly used in pad activation functions to start the dataflow. * The GST_PAD_STREAM_LOCK of pad will automatically be acquired * before func is called. * Params: * func = the task function to call * data = data passed to the task function * Returns: a TRUE if the task could be started. */ public int startTask(GstTaskFunction func, void* data) { // gboolean gst_pad_start_task (GstPad *pad, GstTaskFunction func, gpointer data); return gst_pad_start_task(gstPad, func, data); } /** * Pause the task of pad. This function will also make sure that the * function executed by the task will effectively stop. * Returns: a TRUE if the task could be paused or FALSE when the padhas no task. */ public int pauseTask() { // gboolean gst_pad_pause_task (GstPad *pad); return gst_pad_pause_task(gstPad); } /** * Stop the task of pad. This function will also make sure that the * function executed by the task will effectively stop if not called * from the GstTaskFunction. * This function will deadlock if called from the GstTaskFunction of * the task. Use gst_task_pause() instead. * Regardless of whether the pad has a task, the stream lock is acquired and * released so as to ensure that streaming through this pad has finished. * Returns: a TRUE if the task could be stopped or FALSE on error. */ public int stopTask() { // gboolean gst_pad_stop_task (GstPad *pad); return gst_pad_stop_task(gstPad); } /** * Activates or deactivates the given pad. * Normally called from within core state change functions. * If active, makes sure the pad is active. If it is already active, either in * push or pull mode, just return. Otherwise dispatches to the pad's activate * function to perform the actual activation. * If not active, checks the pad's current mode and calls * gst_pad_activate_push() or gst_pad_activate_pull(), as appropriate, with a * FALSE argument. * Params: * active = whether or not the pad should be active. * Returns: TRUE if the operation was successful.MT safe. */ public int setActive(int active) { // gboolean gst_pad_set_active (GstPad *pad, gboolean active); return gst_pad_set_active(gstPad, active); } }
D
instance Mod_7041_RIT_Ritter_MT (Npc_Default) { // ------ NSC ------ name = NAME_RITTER; guild = GIL_PAL; id = 7041; voice = 4; flags = 0; //NPC_FLAG_IMMORTAL oder 0 npctype = NPCTYPE_MAIN; // ------ Attribute ------ B_SetAttributesToChapter (self, 4); //setzt Attribute und LEVEL entsprechend dem angegebenen Kapitel (1-6) // ------ Kampf-Taktik ------ fight_tactic = FAI_HUMAN_STRONG; // MASTER / STRONG / COWARD // ------ Equippte Waffen ------ //Munition wird automatisch generiert, darf aber angegeben werden EquipItem (self, ItMw_Schwert_03); // ------ Inventory ------ B_CreateAmbientInv (self); // ------ visuals ------ //Muss NACH Attributen kommen, weil in B_SetNpcVisual die Breite abh. v. STR skaliert wird B_SetNpcVisual (self, MALE, "Hum_Head_Bald", Face_N_Mordrag, BodyTex_P, ITAR_PAL_M); Mdl_SetModelFatness (self, 2); Mdl_ApplyOverlayMds (self, "Humans_Militia.mds"); // Tired / Militia / Mage / Arrogance / Relaxed // ------ NSC-relevante Talente vergeben ------ B_GiveNpcTalents (self); // ------ Kampf-Talente ------ //Der enthaltene B_AddFightSkill setzt Talent-Ani abhängig von TrefferChance% - alle Kampftalente werden gleichhoch gesetzt B_SetFightSkills (self, 75); //Grenzen für Talent-Level liegen bei 30 und 60 // ------ TA anmelden ------ daily_routine = Rtn_Start_7041; }; FUNC VOID Rtn_Start_7041 () { TA_Stand_Guarding (08,00,23,00, "OW_SAWHUT_MOLERAT_MOVEMENT6"); TA_Stand_Guarding (23,00,08,00, "OW_SAWHUT_MOLERAT_MOVEMENT6"); }; FUNC VOID Rtn_ToVM_7041 () { TA_Follow_Player (08,00,21,00,"OW_PATH_1_16"); TA_Follow_Player (21,00,08,00,"OW_PATH_1_16"); }; FUNC VOID Rtn_ToAustausch_7041 () { TA_Follow_Player (08,00,21,00,"WP_INTRO_FALL3"); TA_Follow_Player (21,00,08,00,"WP_INTRO_FALL3"); }; FUNC VOID Rtn_AtAustausch_7041 () { TA_Stand_ArmsCrossed (08,00,21,00,"WP_INTRO_FALL3"); TA_Stand_ArmsCrossed (21,00,08,00,"WP_INTRO_FALL3"); };
D
/** Provides vibe based applications with a central program entry point. This module is included automatically through the import 'vibe.d'. It will provide a default application entry point which parses command line arguments, reads the global vibe configuration file, and starts the event loop. The application itself then just has to initialize itself from within a 'static this' module constructor and perform the appropriate calls to listen for connections or other operations. If you want to provide your own main() function, you have to import 'vibe.vibe' instead of 'vibe.d'. Be sure to call start() at the end of your main function in this case. Also beware that any global configuration is not applied in this case and features such as priviledge lowering are not in place. 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.appmain; import vibe.core.args; import vibe.core.core; import vibe.core.log; import vibe.http.server; /** The predefined vibe.d application entry point. This function will automatically be executed if you import the module vibe.d in your code. It will perform default command line parsing and starts the event loop. */ int main(string[] args) { version(unittest){ logInfo("All unit tests were successful."); return 0; } else { processCommandLineArgs(args); logInfo("Running event loop..."); try { return runEventLoop(); } catch( Throwable th ){ logError("Unhandled exception in event loop: %s", th.toString()); return 1; } } }
D
/Users/blaketsuzaki/Development/ClassicKit/Browser/Build/Intermediates/IBDesignables/Intermediates.noindex/Browser.build/Debug-iphonesimulator/Browser.build/Objects-normal/x86_64/CKImageView.o : /Users/blaketsuzaki/Development/ClassicKit/Components/CKTextField.swift /Users/blaketsuzaki/Development/ClassicKit/Browser/Browser/AppDelegate.swift /Users/blaketsuzaki/Development/ClassicKit/Components/CKLabel.swift /Users/blaketsuzaki/Development/ClassicKit/Components/CKButton.swift /Users/blaketsuzaki/Development/ClassicKit/Components/CKImageButton.swift /Users/blaketsuzaki/Development/ClassicKit/Components/CKTextButton.swift /Users/blaketsuzaki/Development/ClassicKit/Components/CKVerticalScrollBar.swift /Users/blaketsuzaki/Development/ClassicKit/Components/CKHorizontalScrollBar.swift /Users/blaketsuzaki/Development/ClassicKit/Components/CKNavigationBar.swift /Users/blaketsuzaki/Development/ClassicKit/Browser/Browser/ViewController.swift /Users/blaketsuzaki/Development/ClassicKit/Components/CKDialogViewController.swift /Users/blaketsuzaki/Development/ClassicKit/Components/CKDefaults.swift /Users/blaketsuzaki/Development/ClassicKit/Components/CKView.swift /Users/blaketsuzaki/Development/ClassicKit/Components/CKImageView.swift /Users/blaketsuzaki/Development/ClassicKit/Components/CKFillableView.swift /Users/blaketsuzaki/Development/ClassicKit/Components/CKContentWrapperView.swift /Users/blaketsuzaki/Development/ClassicKit/Components/CKProgressView.swift /Users/blaketsuzaki/Development/ClassicKit/Components/CKStatusView.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/CoreMedia.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/simd.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreImage.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/QuartzCore.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Metal.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/AVFoundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreFoundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreAudio.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreGraphics.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/UIKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/SwiftOnoneSupport.swiftmodule /Users/blaketsuzaki/Development/ClassicKit/Browser/Build/Intermediates/IBDesignables/Products/Debug-iphonesimulator/YYImage/YYImage.framework/Headers/YYImage-umbrella.h /Users/blaketsuzaki/Development/ClassicKit/Browser/Build/Intermediates/IBDesignables/Products/Debug-iphonesimulator/YYImage/YYImage.framework/Headers/YYImage.h /Users/blaketsuzaki/Development/ClassicKit/Browser/Build/Intermediates/IBDesignables/Products/Debug-iphonesimulator/YYImage/YYImage.framework/Headers/YYFrameImage.h /Users/blaketsuzaki/Development/ClassicKit/Browser/Build/Intermediates/IBDesignables/Products/Debug-iphonesimulator/YYImage/YYImage.framework/Headers/YYSpriteSheetImage.h /Users/blaketsuzaki/Development/ClassicKit/Browser/Build/Intermediates/IBDesignables/Products/Debug-iphonesimulator/YYImage/YYImage.framework/Headers/YYImageCoder.h /Users/blaketsuzaki/Development/ClassicKit/Browser/Build/Intermediates/IBDesignables/Products/Debug-iphonesimulator/YYImage/YYImage.framework/Headers/YYAnimatedImageView.h /Users/blaketsuzaki/Development/ClassicKit/Browser/Build/Intermediates/IBDesignables/Products/Debug-iphonesimulator/YYImage/YYImage.framework/Modules/module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.3.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.3.sdk/System/Library/Frameworks/OpenGLES.framework/Headers/OpenGLES.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.3.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImage.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.3.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/QuartzCore.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.3.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.3.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.3.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.3.sdk/System/Library/Frameworks/AVFoundation.framework/Headers/AVFoundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.3.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.3.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.3.sdk/System/Library/Frameworks/WebKit.framework/Headers/WebKit.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.3.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.3.sdk/System/Library/Frameworks/AudioToolbox.framework/Headers/AudioToolbox.apinotes /Users/blaketsuzaki/Development/ClassicKit/Browser/Build/Intermediates/IBDesignables/Intermediates.noindex/Browser.build/Debug-iphonesimulator/Browser.build/Objects-normal/x86_64/CKImageView~partial.swiftmodule : /Users/blaketsuzaki/Development/ClassicKit/Components/CKTextField.swift /Users/blaketsuzaki/Development/ClassicKit/Browser/Browser/AppDelegate.swift /Users/blaketsuzaki/Development/ClassicKit/Components/CKLabel.swift /Users/blaketsuzaki/Development/ClassicKit/Components/CKButton.swift /Users/blaketsuzaki/Development/ClassicKit/Components/CKImageButton.swift /Users/blaketsuzaki/Development/ClassicKit/Components/CKTextButton.swift /Users/blaketsuzaki/Development/ClassicKit/Components/CKVerticalScrollBar.swift /Users/blaketsuzaki/Development/ClassicKit/Components/CKHorizontalScrollBar.swift /Users/blaketsuzaki/Development/ClassicKit/Components/CKNavigationBar.swift /Users/blaketsuzaki/Development/ClassicKit/Browser/Browser/ViewController.swift /Users/blaketsuzaki/Development/ClassicKit/Components/CKDialogViewController.swift /Users/blaketsuzaki/Development/ClassicKit/Components/CKDefaults.swift /Users/blaketsuzaki/Development/ClassicKit/Components/CKView.swift /Users/blaketsuzaki/Development/ClassicKit/Components/CKImageView.swift /Users/blaketsuzaki/Development/ClassicKit/Components/CKFillableView.swift /Users/blaketsuzaki/Development/ClassicKit/Components/CKContentWrapperView.swift /Users/blaketsuzaki/Development/ClassicKit/Components/CKProgressView.swift /Users/blaketsuzaki/Development/ClassicKit/Components/CKStatusView.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/CoreMedia.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/simd.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreImage.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/QuartzCore.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Metal.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/AVFoundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreFoundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreAudio.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreGraphics.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/UIKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/SwiftOnoneSupport.swiftmodule /Users/blaketsuzaki/Development/ClassicKit/Browser/Build/Intermediates/IBDesignables/Products/Debug-iphonesimulator/YYImage/YYImage.framework/Headers/YYImage-umbrella.h /Users/blaketsuzaki/Development/ClassicKit/Browser/Build/Intermediates/IBDesignables/Products/Debug-iphonesimulator/YYImage/YYImage.framework/Headers/YYImage.h /Users/blaketsuzaki/Development/ClassicKit/Browser/Build/Intermediates/IBDesignables/Products/Debug-iphonesimulator/YYImage/YYImage.framework/Headers/YYFrameImage.h /Users/blaketsuzaki/Development/ClassicKit/Browser/Build/Intermediates/IBDesignables/Products/Debug-iphonesimulator/YYImage/YYImage.framework/Headers/YYSpriteSheetImage.h /Users/blaketsuzaki/Development/ClassicKit/Browser/Build/Intermediates/IBDesignables/Products/Debug-iphonesimulator/YYImage/YYImage.framework/Headers/YYImageCoder.h /Users/blaketsuzaki/Development/ClassicKit/Browser/Build/Intermediates/IBDesignables/Products/Debug-iphonesimulator/YYImage/YYImage.framework/Headers/YYAnimatedImageView.h /Users/blaketsuzaki/Development/ClassicKit/Browser/Build/Intermediates/IBDesignables/Products/Debug-iphonesimulator/YYImage/YYImage.framework/Modules/module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.3.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.3.sdk/System/Library/Frameworks/OpenGLES.framework/Headers/OpenGLES.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.3.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImage.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.3.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/QuartzCore.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.3.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.3.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.3.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.3.sdk/System/Library/Frameworks/AVFoundation.framework/Headers/AVFoundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.3.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.3.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.3.sdk/System/Library/Frameworks/WebKit.framework/Headers/WebKit.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.3.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.3.sdk/System/Library/Frameworks/AudioToolbox.framework/Headers/AudioToolbox.apinotes /Users/blaketsuzaki/Development/ClassicKit/Browser/Build/Intermediates/IBDesignables/Intermediates.noindex/Browser.build/Debug-iphonesimulator/Browser.build/Objects-normal/x86_64/CKImageView~partial.swiftdoc : /Users/blaketsuzaki/Development/ClassicKit/Components/CKTextField.swift /Users/blaketsuzaki/Development/ClassicKit/Browser/Browser/AppDelegate.swift /Users/blaketsuzaki/Development/ClassicKit/Components/CKLabel.swift /Users/blaketsuzaki/Development/ClassicKit/Components/CKButton.swift /Users/blaketsuzaki/Development/ClassicKit/Components/CKImageButton.swift /Users/blaketsuzaki/Development/ClassicKit/Components/CKTextButton.swift /Users/blaketsuzaki/Development/ClassicKit/Components/CKVerticalScrollBar.swift /Users/blaketsuzaki/Development/ClassicKit/Components/CKHorizontalScrollBar.swift /Users/blaketsuzaki/Development/ClassicKit/Components/CKNavigationBar.swift /Users/blaketsuzaki/Development/ClassicKit/Browser/Browser/ViewController.swift /Users/blaketsuzaki/Development/ClassicKit/Components/CKDialogViewController.swift /Users/blaketsuzaki/Development/ClassicKit/Components/CKDefaults.swift /Users/blaketsuzaki/Development/ClassicKit/Components/CKView.swift /Users/blaketsuzaki/Development/ClassicKit/Components/CKImageView.swift /Users/blaketsuzaki/Development/ClassicKit/Components/CKFillableView.swift /Users/blaketsuzaki/Development/ClassicKit/Components/CKContentWrapperView.swift /Users/blaketsuzaki/Development/ClassicKit/Components/CKProgressView.swift /Users/blaketsuzaki/Development/ClassicKit/Components/CKStatusView.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/CoreMedia.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/simd.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreImage.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/QuartzCore.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Metal.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/AVFoundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreFoundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreAudio.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreGraphics.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/UIKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/SwiftOnoneSupport.swiftmodule /Users/blaketsuzaki/Development/ClassicKit/Browser/Build/Intermediates/IBDesignables/Products/Debug-iphonesimulator/YYImage/YYImage.framework/Headers/YYImage-umbrella.h /Users/blaketsuzaki/Development/ClassicKit/Browser/Build/Intermediates/IBDesignables/Products/Debug-iphonesimulator/YYImage/YYImage.framework/Headers/YYImage.h /Users/blaketsuzaki/Development/ClassicKit/Browser/Build/Intermediates/IBDesignables/Products/Debug-iphonesimulator/YYImage/YYImage.framework/Headers/YYFrameImage.h /Users/blaketsuzaki/Development/ClassicKit/Browser/Build/Intermediates/IBDesignables/Products/Debug-iphonesimulator/YYImage/YYImage.framework/Headers/YYSpriteSheetImage.h /Users/blaketsuzaki/Development/ClassicKit/Browser/Build/Intermediates/IBDesignables/Products/Debug-iphonesimulator/YYImage/YYImage.framework/Headers/YYImageCoder.h /Users/blaketsuzaki/Development/ClassicKit/Browser/Build/Intermediates/IBDesignables/Products/Debug-iphonesimulator/YYImage/YYImage.framework/Headers/YYAnimatedImageView.h /Users/blaketsuzaki/Development/ClassicKit/Browser/Build/Intermediates/IBDesignables/Products/Debug-iphonesimulator/YYImage/YYImage.framework/Modules/module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.3.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.3.sdk/System/Library/Frameworks/OpenGLES.framework/Headers/OpenGLES.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.3.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImage.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.3.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/QuartzCore.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.3.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.3.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.3.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.3.sdk/System/Library/Frameworks/AVFoundation.framework/Headers/AVFoundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.3.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.3.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.3.sdk/System/Library/Frameworks/WebKit.framework/Headers/WebKit.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.3.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.3.sdk/System/Library/Frameworks/AudioToolbox.framework/Headers/AudioToolbox.apinotes
D
/home/robin/substrate-node-template/target/release/deps/libp2p_plaintext-768f4e31b2ebf148.rmeta: /home/robin/.cargo/registry/src/github.com-1ecc6299db9ec823/libp2p-plaintext-0.22.0/src/lib.rs /home/robin/.cargo/registry/src/github.com-1ecc6299db9ec823/libp2p-plaintext-0.22.0/src/error.rs /home/robin/.cargo/registry/src/github.com-1ecc6299db9ec823/libp2p-plaintext-0.22.0/src/handshake.rs /home/robin/substrate-node-template/target/release/build/libp2p-plaintext-d6d7afc5808453cd/out/structs.rs /home/robin/substrate-node-template/target/release/deps/liblibp2p_plaintext-768f4e31b2ebf148.rlib: /home/robin/.cargo/registry/src/github.com-1ecc6299db9ec823/libp2p-plaintext-0.22.0/src/lib.rs /home/robin/.cargo/registry/src/github.com-1ecc6299db9ec823/libp2p-plaintext-0.22.0/src/error.rs /home/robin/.cargo/registry/src/github.com-1ecc6299db9ec823/libp2p-plaintext-0.22.0/src/handshake.rs /home/robin/substrate-node-template/target/release/build/libp2p-plaintext-d6d7afc5808453cd/out/structs.rs /home/robin/substrate-node-template/target/release/deps/libp2p_plaintext-768f4e31b2ebf148.d: /home/robin/.cargo/registry/src/github.com-1ecc6299db9ec823/libp2p-plaintext-0.22.0/src/lib.rs /home/robin/.cargo/registry/src/github.com-1ecc6299db9ec823/libp2p-plaintext-0.22.0/src/error.rs /home/robin/.cargo/registry/src/github.com-1ecc6299db9ec823/libp2p-plaintext-0.22.0/src/handshake.rs /home/robin/substrate-node-template/target/release/build/libp2p-plaintext-d6d7afc5808453cd/out/structs.rs /home/robin/.cargo/registry/src/github.com-1ecc6299db9ec823/libp2p-plaintext-0.22.0/src/lib.rs: /home/robin/.cargo/registry/src/github.com-1ecc6299db9ec823/libp2p-plaintext-0.22.0/src/error.rs: /home/robin/.cargo/registry/src/github.com-1ecc6299db9ec823/libp2p-plaintext-0.22.0/src/handshake.rs: /home/robin/substrate-node-template/target/release/build/libp2p-plaintext-d6d7afc5808453cd/out/structs.rs: # env-dep:OUT_DIR=/home/robin/substrate-node-template/target/release/build/libp2p-plaintext-d6d7afc5808453cd/out
D
/home/cmd/Programming/code/rust/udemy1_vars_bits/target/debug/deps/udemy1-7b883917cebac138.rmeta: src/main.rs /home/cmd/Programming/code/rust/udemy1_vars_bits/target/debug/deps/udemy1-7b883917cebac138.d: src/main.rs src/main.rs:
D
/home/hustccc/OS_Tutorial_Summer_of_Code/zcore_test/target/debug/deps/log-d570c862333248a7.rmeta: /home/hustccc/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/log-0.4.11/src/lib.rs /home/hustccc/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/log-0.4.11/src/macros.rs /home/hustccc/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/log-0.4.11/src/serde.rs /home/hustccc/OS_Tutorial_Summer_of_Code/zcore_test/target/debug/deps/liblog-d570c862333248a7.rlib: /home/hustccc/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/log-0.4.11/src/lib.rs /home/hustccc/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/log-0.4.11/src/macros.rs /home/hustccc/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/log-0.4.11/src/serde.rs /home/hustccc/OS_Tutorial_Summer_of_Code/zcore_test/target/debug/deps/log-d570c862333248a7.d: /home/hustccc/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/log-0.4.11/src/lib.rs /home/hustccc/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/log-0.4.11/src/macros.rs /home/hustccc/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/log-0.4.11/src/serde.rs /home/hustccc/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/log-0.4.11/src/lib.rs: /home/hustccc/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/log-0.4.11/src/macros.rs: /home/hustccc/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/log-0.4.11/src/serde.rs:
D
//////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library // Copyright (C) 2007-2012 Laurent Gomila (laurent.gom@gmail.com) // // This software is provided 'as-is', without any express or implied warranty. // In no event will the authors be held liable for any damages arising from the use of this software. // // Permission is granted to anyone to use this software for any purpose, // including commercial applications, and to alter it and redistribute it freely, // subject to the following restrictions: // // 1. The origin of this software must not be misrepresented; // you must not claim that you wrote the original software. // If you use this software in a product, an acknowledgment // in the product documentation would be appreciated but is not required. // // 2. Altered source versions must be plainly marked as such, // and must not be misrepresented as being the original software. // // 3. This notice may not be removed or altered from any source distribution. // //////////////////////////////////////////////////////////// module dcsfml.Audio.SoundBufferRecorder; extern(System): //////////////////////////////////////////////////////////// // Imports //////////////////////////////////////////////////////////// import dcsfml.Audio.Types; //////////////////////////////////////////////////////////// /// \brief Create a new sound buffer recorder /// /// \return A new sfSoundBufferRecorder object (NULL if failed) /// //////////////////////////////////////////////////////////// sfSoundBufferRecorder* sfSoundBufferRecorder_create(); //////////////////////////////////////////////////////////// /// \brief Destroy a sound buffer recorder /// /// \param soundBufferRecorder Sound buffer recorder to destroy /// //////////////////////////////////////////////////////////// void sfSoundBufferRecorder_destroy(sfSoundBufferRecorder* soundBufferRecorder); //////////////////////////////////////////////////////////// /// \brief Start the capture of a sound recorder recorder /// /// The \a sampleRate parameter defines the number of audio samples /// captured per second. The higher, the better the quality /// (for example, 44100 samples/sec is CD quality). /// This function uses its own thread so that it doesn't block /// the rest of the program while the capture runs. /// Please note that only one capture can happen at the same time. /// /// \param soundBufferRecorder Sound buffer recorder object /// \param sampleRate Desired capture rate, in number of samples per second /// //////////////////////////////////////////////////////////// void sfSoundBufferRecorder_start(sfSoundBufferRecorder* soundBufferRecorder, uint sampleRate); //////////////////////////////////////////////////////////// /// \brief Stop the capture of a sound recorder /// /// \param soundBufferRecorder Sound buffer recorder object /// //////////////////////////////////////////////////////////// void sfSoundBufferRecorder_stop(sfSoundBufferRecorder* soundBufferRecorder); //////////////////////////////////////////////////////////// /// \brief Get the sample rate of a sound buffer recorder /// /// The sample rate defines the number of audio samples /// captured per second. The higher, the better the quality /// (for example, 44100 samples/sec is CD quality). /// /// \param soundBufferRecorder Sound buffer recorder object /// /// \return Sample rate, in samples per second /// //////////////////////////////////////////////////////////// uint sfSoundBufferRecorder_getSampleRate(const(sfSoundBufferRecorder)* soundBufferRecorder); //////////////////////////////////////////////////////////// /// \brief Get the sound buffer containing the captured audio data /// /// The sound buffer is valid only after the capture has ended. /// This function provides a read-only access to the internal /// sound buffer, but it can be copied if you need to /// make any modification to it. /// /// \param soundBufferRecorder Sound buffer recorder object /// /// \return Read-only access to the sound buffer /// //////////////////////////////////////////////////////////// const(sfSoundBuffer)* sfSoundBufferRecorder_getBuffer(const(sfSoundBufferRecorder)* soundBufferRecorder);
D
#!/usr/bin/env rdmd // Computes average line length for standard input. import std.stdio; void main() { ulong lines = 0; double sumLength = 0; foreach (line; stdin.byLine()) { ++lines; sumLength += line.length; } writeln("Average line length: ", lines ? sumLength / lines : 0); }
D
/** * Provides an implicit conversion table for basic types. * * Used to determine integer promotions and common types. * * Specification: $(LINK2 https://dlang.org/spec/type.html#integer-promotions, Integer Promotions), * $(LINK2 https://dlang.org/spec/type.html#usual-arithmetic-conversions, Usual Arithmetic Conversions). * * Copyright: Copyright (C) 1999-2021 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/impcnvtab.d, _impcnvtab.d) * Documentation: https://dlang.org/phobos/dmd_impcnvtab.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/impcnvtab.d */ module dmd.impcnvtab; import dmd.astenums; import dmd.mtype; pure @nogc nothrow @safe: /************************************************* * If ty1 and ty2 are basic types, return the TY that both can * be implicitly converted to. * Params: * ty1 = first operand type * ty2 = second operand type * Returns: * ty = common type, else Terror */ TY implicitConvCommonTy(TY ty1, TY ty2) { return impCnvTab.impcnvResultTab[ty1][ty2]; } /************************************************* * If ty1 and ty2 are basic types, return the TY that ty1 can * be implicitly converted to to bring them to a common ty. * It's symmetric, i.e. the operands can be swapped. * Params: * ty1 = first operand type * ty2 = second operand type * Returns: * ty = what ty1 should be converted to, else Terror */ TY implicitConvTy1(TY ty1, TY ty2) { return impCnvTab.impcnvType1Tab[ty1][ty2]; } /******************************************************************************/ private: struct ImpCnvTab { TY[TMAX][TMAX] impcnvResultTab; TY[TMAX][TMAX] impcnvType1Tab; } enum ImpCnvTab impCnvTab = generateImpCnvTab(); ImpCnvTab generateImpCnvTab() { ImpCnvTab impCnvTab; // Set conversion tables foreach (i; 0 .. cast(size_t)TMAX) { foreach (j; 0 .. cast(size_t)TMAX) { impCnvTab.impcnvResultTab[i][j] = Terror; impCnvTab.impcnvType1Tab[i][j] = Terror; } } void X(TY t1, TY t2, TY nt1, TY nt2, TY rt) { impCnvTab.impcnvResultTab[t1][t2] = rt; impCnvTab.impcnvResultTab[t2][t1] = rt; impCnvTab.impcnvType1Tab[t1][t2] = nt1; impCnvTab.impcnvType1Tab[t2][t1] = nt2; } /* ======================= */ X(Tbool,Tbool, Tbool,Tbool, Tbool); X(Tbool,Tint8, Tint32,Tint32, Tint32); X(Tbool,Tuns8, Tint32,Tint32, Tint32); X(Tbool,Tint16, Tint32,Tint32, Tint32); X(Tbool,Tuns16, Tint32,Tint32, Tint32); X(Tbool,Tint32, Tint32,Tint32, Tint32); X(Tbool,Tuns32, Tuns32,Tuns32, Tuns32); X(Tbool,Tint64, Tint64,Tint64, Tint64); X(Tbool,Tuns64, Tuns64,Tuns64, Tuns64); X(Tbool,Tint128, Tint128,Tint128, Tint128); X(Tbool,Tuns128, Tuns128,Tuns128, Tuns128); X(Tbool,Tfloat32, Tfloat32,Tfloat32, Tfloat32); X(Tbool,Tfloat64, Tfloat64,Tfloat64, Tfloat64); X(Tbool,Tfloat80, Tfloat80,Tfloat80, Tfloat80); X(Tbool,Timaginary32, Tfloat32,Timaginary32, Tfloat32); X(Tbool,Timaginary64, Tfloat64,Timaginary64, Tfloat64); X(Tbool,Timaginary80, Tfloat80,Timaginary80, Tfloat80); X(Tbool,Tcomplex32, Tfloat32,Tcomplex32, Tcomplex32); X(Tbool,Tcomplex64, Tfloat64,Tcomplex64, Tcomplex64); X(Tbool,Tcomplex80, Tfloat80,Tcomplex80, Tcomplex80); /* ======================= */ X(Tint8,Tint8, Tint32,Tint32, Tint32); X(Tint8,Tuns8, Tint32,Tint32, Tint32); X(Tint8,Tint16, Tint32,Tint32, Tint32); X(Tint8,Tuns16, Tint32,Tint32, Tint32); X(Tint8,Tint32, Tint32,Tint32, Tint32); X(Tint8,Tuns32, Tuns32,Tuns32, Tuns32); X(Tint8,Tint64, Tint64,Tint64, Tint64); X(Tint8,Tuns64, Tuns64,Tuns64, Tuns64); X(Tint8,Tint128, Tint128,Tint128, Tint128); X(Tint8,Tuns128, Tuns128,Tuns128, Tuns128); X(Tint8,Tfloat32, Tfloat32,Tfloat32, Tfloat32); X(Tint8,Tfloat64, Tfloat64,Tfloat64, Tfloat64); X(Tint8,Tfloat80, Tfloat80,Tfloat80, Tfloat80); X(Tint8,Timaginary32, Tfloat32,Timaginary32, Tfloat32); X(Tint8,Timaginary64, Tfloat64,Timaginary64, Tfloat64); X(Tint8,Timaginary80, Tfloat80,Timaginary80, Tfloat80); X(Tint8,Tcomplex32, Tfloat32,Tcomplex32, Tcomplex32); X(Tint8,Tcomplex64, Tfloat64,Tcomplex64, Tcomplex64); X(Tint8,Tcomplex80, Tfloat80,Tcomplex80, Tcomplex80); /* ======================= */ X(Tuns8,Tuns8, Tint32,Tint32, Tint32); X(Tuns8,Tint16, Tint32,Tint32, Tint32); X(Tuns8,Tuns16, Tint32,Tint32, Tint32); X(Tuns8,Tint32, Tint32,Tint32, Tint32); X(Tuns8,Tuns32, Tuns32,Tuns32, Tuns32); X(Tuns8,Tint64, Tint64,Tint64, Tint64); X(Tuns8,Tuns64, Tuns64,Tuns64, Tuns64); X(Tuns8,Tint128, Tint128,Tint128, Tint128); X(Tuns8,Tuns128, Tuns128,Tuns128, Tuns128); X(Tuns8,Tfloat32, Tfloat32,Tfloat32, Tfloat32); X(Tuns8,Tfloat64, Tfloat64,Tfloat64, Tfloat64); X(Tuns8,Tfloat80, Tfloat80,Tfloat80, Tfloat80); X(Tuns8,Timaginary32, Tfloat32,Timaginary32, Tfloat32); X(Tuns8,Timaginary64, Tfloat64,Timaginary64, Tfloat64); X(Tuns8,Timaginary80, Tfloat80,Timaginary80, Tfloat80); X(Tuns8,Tcomplex32, Tfloat32,Tcomplex32, Tcomplex32); X(Tuns8,Tcomplex64, Tfloat64,Tcomplex64, Tcomplex64); X(Tuns8,Tcomplex80, Tfloat80,Tcomplex80, Tcomplex80); /* ======================= */ X(Tint16,Tint16, Tint32,Tint32, Tint32); X(Tint16,Tuns16, Tint32,Tint32, Tint32); X(Tint16,Tint32, Tint32,Tint32, Tint32); X(Tint16,Tuns32, Tuns32,Tuns32, Tuns32); X(Tint16,Tint64, Tint64,Tint64, Tint64); X(Tint16,Tuns64, Tuns64,Tuns64, Tuns64); X(Tint16,Tint128, Tint128,Tint128, Tint128); X(Tint16,Tuns128, Tuns128,Tuns128, Tuns128); X(Tint16,Tfloat32, Tfloat32,Tfloat32, Tfloat32); X(Tint16,Tfloat64, Tfloat64,Tfloat64, Tfloat64); X(Tint16,Tfloat80, Tfloat80,Tfloat80, Tfloat80); X(Tint16,Timaginary32, Tfloat32,Timaginary32, Tfloat32); X(Tint16,Timaginary64, Tfloat64,Timaginary64, Tfloat64); X(Tint16,Timaginary80, Tfloat80,Timaginary80, Tfloat80); X(Tint16,Tcomplex32, Tfloat32,Tcomplex32, Tcomplex32); X(Tint16,Tcomplex64, Tfloat64,Tcomplex64, Tcomplex64); X(Tint16,Tcomplex80, Tfloat80,Tcomplex80, Tcomplex80); /* ======================= */ X(Tuns16,Tuns16, Tint32,Tint32, Tint32); X(Tuns16,Tint32, Tint32,Tint32, Tint32); X(Tuns16,Tuns32, Tuns32,Tuns32, Tuns32); X(Tuns16,Tint64, Tint64,Tint64, Tint64); X(Tuns16,Tuns64, Tuns64,Tuns64, Tuns64); X(Tuns16,Tint128, Tint128,Tint128, Tint128); X(Tuns16,Tuns128, Tuns128,Tuns128, Tuns128); X(Tuns16,Tfloat32, Tfloat32,Tfloat32, Tfloat32); X(Tuns16,Tfloat64, Tfloat64,Tfloat64, Tfloat64); X(Tuns16,Tfloat80, Tfloat80,Tfloat80, Tfloat80); X(Tuns16,Timaginary32, Tfloat32,Timaginary32, Tfloat32); X(Tuns16,Timaginary64, Tfloat64,Timaginary64, Tfloat64); X(Tuns16,Timaginary80, Tfloat80,Timaginary80, Tfloat80); X(Tuns16,Tcomplex32, Tfloat32,Tcomplex32, Tcomplex32); X(Tuns16,Tcomplex64, Tfloat64,Tcomplex64, Tcomplex64); X(Tuns16,Tcomplex80, Tfloat80,Tcomplex80, Tcomplex80); /* ======================= */ X(Tint32,Tint32, Tint32,Tint32, Tint32); X(Tint32,Tuns32, Tuns32,Tuns32, Tuns32); X(Tint32,Tint64, Tint64,Tint64, Tint64); X(Tint32,Tuns64, Tuns64,Tuns64, Tuns64); X(Tint32,Tint128, Tint128,Tint128, Tint128); X(Tint32,Tuns128, Tuns128,Tuns128, Tuns128); X(Tint32,Tfloat32, Tfloat32,Tfloat32, Tfloat32); X(Tint32,Tfloat64, Tfloat64,Tfloat64, Tfloat64); X(Tint32,Tfloat80, Tfloat80,Tfloat80, Tfloat80); X(Tint32,Timaginary32, Tfloat32,Timaginary32, Tfloat32); X(Tint32,Timaginary64, Tfloat64,Timaginary64, Tfloat64); X(Tint32,Timaginary80, Tfloat80,Timaginary80, Tfloat80); X(Tint32,Tcomplex32, Tfloat32,Tcomplex32, Tcomplex32); X(Tint32,Tcomplex64, Tfloat64,Tcomplex64, Tcomplex64); X(Tint32,Tcomplex80, Tfloat80,Tcomplex80, Tcomplex80); /* ======================= */ X(Tuns32,Tuns32, Tuns32,Tuns32, Tuns32); X(Tuns32,Tint64, Tint64,Tint64, Tint64); X(Tuns32,Tuns64, Tuns64,Tuns64, Tuns64); X(Tuns32,Tint128, Tint128,Tint128, Tint128); X(Tuns32,Tuns128, Tuns128,Tuns128, Tuns128); X(Tuns32,Tfloat32, Tfloat32,Tfloat32, Tfloat32); X(Tuns32,Tfloat64, Tfloat64,Tfloat64, Tfloat64); X(Tuns32,Tfloat80, Tfloat80,Tfloat80, Tfloat80); X(Tuns32,Timaginary32, Tfloat32,Timaginary32, Tfloat32); X(Tuns32,Timaginary64, Tfloat64,Timaginary64, Tfloat64); X(Tuns32,Timaginary80, Tfloat80,Timaginary80, Tfloat80); X(Tuns32,Tcomplex32, Tfloat32,Tcomplex32, Tcomplex32); X(Tuns32,Tcomplex64, Tfloat64,Tcomplex64, Tcomplex64); X(Tuns32,Tcomplex80, Tfloat80,Tcomplex80, Tcomplex80); /* ======================= */ X(Tint64,Tint64, Tint64,Tint64, Tint64); X(Tint64,Tuns64, Tuns64,Tuns64, Tuns64); X(Tint64,Tint128, Tint128,Tint128, Tint128); X(Tint64,Tuns128, Tuns128,Tuns128, Tuns128); X(Tint64,Tfloat32, Tfloat32,Tfloat32, Tfloat32); X(Tint64,Tfloat64, Tfloat64,Tfloat64, Tfloat64); X(Tint64,Tfloat80, Tfloat80,Tfloat80, Tfloat80); X(Tint64,Timaginary32, Tfloat32,Timaginary32, Tfloat32); X(Tint64,Timaginary64, Tfloat64,Timaginary64, Tfloat64); X(Tint64,Timaginary80, Tfloat80,Timaginary80, Tfloat80); X(Tint64,Tcomplex32, Tfloat32,Tcomplex32, Tcomplex32); X(Tint64,Tcomplex64, Tfloat64,Tcomplex64, Tcomplex64); X(Tint64,Tcomplex80, Tfloat80,Tcomplex80, Tcomplex80); /* ======================= */ X(Tuns64,Tuns64, Tuns64,Tuns64, Tuns64); X(Tuns64,Tint128, Tint128,Tint128, Tint128); X(Tuns64,Tuns128, Tuns128,Tuns128, Tuns128); X(Tuns64,Tfloat32, Tfloat32,Tfloat32, Tfloat32); X(Tuns64,Tfloat64, Tfloat64,Tfloat64, Tfloat64); X(Tuns64,Tfloat80, Tfloat80,Tfloat80, Tfloat80); X(Tuns64,Timaginary32, Tfloat32,Timaginary32, Tfloat32); X(Tuns64,Timaginary64, Tfloat64,Timaginary64, Tfloat64); X(Tuns64,Timaginary80, Tfloat80,Timaginary80, Tfloat80); X(Tuns64,Tcomplex32, Tfloat32,Tcomplex32, Tcomplex32); X(Tuns64,Tcomplex64, Tfloat64,Tcomplex64, Tcomplex64); X(Tuns64,Tcomplex80, Tfloat80,Tcomplex80, Tcomplex80); /* ======================= */ X(Tint128,Tint128, Tint128,Tint128, Tint128); X(Tint128,Tuns128, Tuns128,Tuns128, Tuns128); X(Tint128,Tfloat32, Tfloat32,Tfloat32, Tfloat32); X(Tint128,Tfloat64, Tfloat64,Tfloat64, Tfloat64); X(Tint128,Tfloat80, Tfloat80,Tfloat80, Tfloat80); X(Tint128,Timaginary32, Tfloat32,Timaginary32, Tfloat32); X(Tint128,Timaginary64, Tfloat64,Timaginary64, Tfloat64); X(Tint128,Timaginary80, Tfloat80,Timaginary80, Tfloat80); X(Tint128,Tcomplex32, Tfloat32,Tcomplex32, Tcomplex32); X(Tint128,Tcomplex64, Tfloat64,Tcomplex64, Tcomplex64); X(Tint128,Tcomplex80, Tfloat80,Tcomplex80, Tcomplex80); /* ======================= */ X(Tuns128,Tuns128, Tuns128,Tuns128, Tuns128); X(Tuns128,Tfloat32, Tfloat32,Tfloat32, Tfloat32); X(Tuns128,Tfloat64, Tfloat64,Tfloat64, Tfloat64); X(Tuns128,Tfloat80, Tfloat80,Tfloat80, Tfloat80); X(Tuns128,Timaginary32, Tfloat32,Timaginary32, Tfloat32); X(Tuns128,Timaginary64, Tfloat64,Timaginary64, Tfloat64); X(Tuns128,Timaginary80, Tfloat80,Timaginary80, Tfloat80); X(Tuns128,Tcomplex32, Tfloat32,Tcomplex32, Tcomplex32); X(Tuns128,Tcomplex64, Tfloat64,Tcomplex64, Tcomplex64); X(Tuns128,Tcomplex80, Tfloat80,Tcomplex80, Tcomplex80); /* ======================= */ X(Tfloat32,Tfloat32, Tfloat32,Tfloat32, Tfloat32); X(Tfloat32,Tfloat64, Tfloat64,Tfloat64, Tfloat64); X(Tfloat32,Tfloat80, Tfloat80,Tfloat80, Tfloat80); X(Tfloat32,Timaginary32, Tfloat32,Timaginary32, Tfloat32); X(Tfloat32,Timaginary64, Tfloat64,Timaginary64, Tfloat64); X(Tfloat32,Timaginary80, Tfloat80,Timaginary80, Tfloat80); X(Tfloat32,Tcomplex32, Tfloat32,Tcomplex32, Tcomplex32); X(Tfloat32,Tcomplex64, Tfloat64,Tcomplex64, Tcomplex64); X(Tfloat32,Tcomplex80, Tfloat80,Tcomplex80, Tcomplex80); /* ======================= */ X(Tfloat64,Tfloat64, Tfloat64,Tfloat64, Tfloat64); X(Tfloat64,Tfloat80, Tfloat80,Tfloat80, Tfloat80); X(Tfloat64,Timaginary32, Tfloat64,Timaginary64, Tfloat64); X(Tfloat64,Timaginary64, Tfloat64,Timaginary64, Tfloat64); X(Tfloat64,Timaginary80, Tfloat80,Timaginary80, Tfloat80); X(Tfloat64,Tcomplex32, Tfloat64,Tcomplex64, Tcomplex64); X(Tfloat64,Tcomplex64, Tfloat64,Tcomplex64, Tcomplex64); X(Tfloat64,Tcomplex80, Tfloat80,Tcomplex80, Tcomplex80); /* ======================= */ X(Tfloat80,Tfloat80, Tfloat80,Tfloat80, Tfloat80); X(Tfloat80,Timaginary32, Tfloat80,Timaginary80, Tfloat80); X(Tfloat80,Timaginary64, Tfloat80,Timaginary80, Tfloat80); X(Tfloat80,Timaginary80, Tfloat80,Timaginary80, Tfloat80); X(Tfloat80,Tcomplex32, Tfloat80,Tcomplex80, Tcomplex80); X(Tfloat80,Tcomplex64, Tfloat80,Tcomplex80, Tcomplex80); X(Tfloat80,Tcomplex80, Tfloat80,Tcomplex80, Tcomplex80); /* ======================= */ X(Timaginary32,Timaginary32, Timaginary32,Timaginary32, Timaginary32); X(Timaginary32,Timaginary64, Timaginary64,Timaginary64, Timaginary64); X(Timaginary32,Timaginary80, Timaginary80,Timaginary80, Timaginary80); X(Timaginary32,Tcomplex32, Timaginary32,Tcomplex32, Tcomplex32); X(Timaginary32,Tcomplex64, Timaginary64,Tcomplex64, Tcomplex64); X(Timaginary32,Tcomplex80, Timaginary80,Tcomplex80, Tcomplex80); /* ======================= */ X(Timaginary64,Timaginary64, Timaginary64,Timaginary64, Timaginary64); X(Timaginary64,Timaginary80, Timaginary80,Timaginary80, Timaginary80); X(Timaginary64,Tcomplex32, Timaginary64,Tcomplex64, Tcomplex64); X(Timaginary64,Tcomplex64, Timaginary64,Tcomplex64, Tcomplex64); X(Timaginary64,Tcomplex80, Timaginary80,Tcomplex80, Tcomplex80); /* ======================= */ X(Timaginary80,Timaginary80, Timaginary80,Timaginary80, Timaginary80); X(Timaginary80,Tcomplex32, Timaginary80,Tcomplex80, Tcomplex80); X(Timaginary80,Tcomplex64, Timaginary80,Tcomplex80, Tcomplex80); X(Timaginary80,Tcomplex80, Timaginary80,Tcomplex80, Tcomplex80); /* ======================= */ X(Tcomplex32,Tcomplex32, Tcomplex32,Tcomplex32, Tcomplex32); X(Tcomplex32,Tcomplex64, Tcomplex64,Tcomplex64, Tcomplex64); X(Tcomplex32,Tcomplex80, Tcomplex80,Tcomplex80, Tcomplex80); /* ======================= */ X(Tcomplex64,Tcomplex64, Tcomplex64,Tcomplex64, Tcomplex64); X(Tcomplex64,Tcomplex80, Tcomplex80,Tcomplex80, Tcomplex80); /* ======================= */ X(Tcomplex80,Tcomplex80, Tcomplex80,Tcomplex80, Tcomplex80); return impCnvTab; }
D
// Written in the D programming language /++ $(SCRIPT inhibitQuickIndex = 1;) $(DIVC quickindex, $(BOOKTABLE, $(TR $(TH Category) $(TH Functions)) $(TR $(TD Time zones) $(TD $(LREF TimeZone) $(LREF UTC) $(LREF LocalTime) $(LREF PosixTimeZone) $(LREF WindowsTimeZone) $(LREF SimpleTimeZone) )) $(TR $(TD Utilities) $(TD $(LREF clearTZEnvVar) $(LREF parseTZConversions) $(LREF setTZEnvVar) $(LREF TZConversions) )) )) License: $(HTTP www.boost.org/LICENSE_1_0.txt, Boost License 1.0). Authors: $(HTTP jmdavisprog.com, Jonathan M Davis) Source: $(PHOBOSSRC std/datetime/timezone.d) +/ module std.datetime.timezone; import core.time : abs, convert, dur, Duration, hours, minutes; import std.datetime.systime : Clock, stdTimeToUnixTime, SysTime; import std.range.primitives : back, empty, front, isOutputRange, popFront; import std.traits : isIntegral, isSomeString, Unqual; version (Windows) { import core.stdc.time : time_t; import core.sys.windows.winbase; import core.sys.windows.winsock2; import std.windows.registry; // Uncomment and run unittests to print missing Windows TZ translations. // Please subscribe to Microsoft Daylight Saving Time & Time Zone Blog // (https://blogs.technet.microsoft.com/dst2007/) if you feel responsible // for updating the translations. // version = UpdateWindowsTZTranslations; } else version (Posix) { import core.sys.posix.signal : timespec; import core.sys.posix.sys.types : time_t; } version (StdUnittest) import std.exception : assertThrown; /++ Represents a time zone. It is used with $(REF SysTime,std,datetime,systime) to indicate the time zone of a $(REF SysTime,std,datetime,systime). +/ abstract class TimeZone { public: /++ The name of the time zone. Exactly how the time zone name is formatted depends on the derived class. In the case of $(LREF PosixTimeZone), it's the TZ Database name, whereas with $(LREF WindowsTimeZone), it's the name that Windows chose to give the registry key for that time zone (typically the name that they give $(LREF stdTime) if the OS is in English). For other time zone types, what it is depends on how they're implemented. See_Also: $(HTTP en.wikipedia.org/wiki/Tz_database, Wikipedia entry on TZ Database)<br> $(HTTP en.wikipedia.org/wiki/List_of_tz_database_time_zones, List of Time Zones) +/ @property string name() @safe const nothrow { return _name; } /++ Typically, the abbreviation (generally 3 or 4 letters) for the time zone when DST is $(I not) in effect (e.g. PST). It is not necessarily unique. However, on Windows, it may be the unabbreviated name (e.g. Pacific Standard Time). Regardless, it is not the same as name. +/ @property string stdName() @safe const nothrow { return _stdName; } /++ Typically, the abbreviation (generally 3 or 4 letters) for the time zone when DST $(I is) in effect (e.g. PDT). It is not necessarily unique. However, on Windows, it may be the unabbreviated name (e.g. Pacific Daylight Time). Regardless, it is not the same as name. +/ @property string dstName() @safe const nothrow { return _dstName; } /++ Whether this time zone has Daylight Savings Time at any point in time. Note that for some time zone types it may not have DST for current dates but will still return true for `hasDST` because the time zone did at some point have DST. +/ @property abstract bool hasDST() @safe const nothrow; /++ Takes the number of hnsecs (100 ns) since midnight, January 1st, 1 A.D. in UTC time (i.e. std time) and returns whether DST is effect in this time zone at the given point in time. Params: stdTime = The UTC time that needs to be checked for DST in this time zone. +/ abstract bool dstInEffect(long stdTime) @safe const nothrow; /++ Takes the number of hnsecs (100 ns) since midnight, January 1st, 1 A.D. in UTC time (i.e. std time) and converts it to this time zone's time. Params: stdTime = The UTC time that needs to be adjusted to this time zone's time. +/ abstract long utcToTZ(long stdTime) @safe const nothrow; /++ Takes the number of hnsecs (100 ns) since midnight, January 1st, 1 A.D. in this time zone's time and converts it to UTC (i.e. std time). Params: adjTime = The time in this time zone that needs to be adjusted to UTC time. +/ abstract long tzToUTC(long adjTime) @safe const nothrow; /++ Returns what the offset from UTC is at the given std time. It includes the DST offset in effect at that time (if any). Params: stdTime = The UTC time for which to get the offset from UTC for this time zone. +/ Duration utcOffsetAt(long stdTime) @safe const nothrow { return dur!"hnsecs"(utcToTZ(stdTime) - stdTime); } // The purpose of this is to handle the case where a Windows time zone is // new and exists on an up-to-date Windows box but does not exist on Windows // boxes which have not been properly updated. The "date added" is included // on the theory that we'll be able to remove them at some point in the // the future once enough time has passed, and that way, we know how much // time has passed. private static string _getOldName(string windowsTZName) @safe pure nothrow { switch (windowsTZName) { case "Belarus Standard Time": return "Kaliningrad Standard Time"; // Added 2014-10-08 case "Russia Time Zone 10": return "Magadan Standard Time"; // Added 2014-10-08 case "Russia Time Zone 11": return "Magadan Standard Time"; // Added 2014-10-08 case "Russia Time Zone 3": return "Russian Standard Time"; // Added 2014-10-08 default: return null; } } // Since reading in the time zone files could be expensive, most unit tests // are consolidated into this one unittest block which minimizes how often // it reads a time zone file. @system unittest { import core.exception : AssertError; import std.conv : to; import std.file : exists, isFile; import std.format : format; import std.path : chainPath; import std.stdio : writefln; import std.typecons : tuple; version (Posix) alias getTimeZone = PosixTimeZone.getTimeZone; else version (Windows) alias getTimeZone = WindowsTimeZone.getTimeZone; version (Posix) scope(exit) clearTZEnvVar(); static immutable(TimeZone) testTZ(string tzName, string stdName, string dstName, Duration utcOffset, Duration dstOffset, bool north = true) { scope(failure) writefln("Failed time zone: %s", tzName); version (Posix) { immutable tz = PosixTimeZone.getTimeZone(tzName); assert(tz.name == tzName); } else version (Windows) { immutable tz = WindowsTimeZone.getTimeZone(tzName); assert(tz.name == stdName); } immutable hasDST = dstOffset != Duration.zero; //assert(tz.stdName == stdName); //Locale-dependent //assert(tz.dstName == dstName); //Locale-dependent assert(tz.hasDST == hasDST); import std.datetime.date : DateTime; immutable stdDate = DateTime(2010, north ? 1 : 7, 1, 6, 0, 0); immutable dstDate = DateTime(2010, north ? 7 : 1, 1, 6, 0, 0); auto std = SysTime(stdDate, tz); auto dst = SysTime(dstDate, tz); auto stdUTC = SysTime(stdDate - utcOffset, UTC()); auto dstUTC = SysTime(stdDate - utcOffset + dstOffset, UTC()); assert(!std.dstInEffect); assert(dst.dstInEffect == hasDST); assert(tz.utcOffsetAt(std.stdTime) == utcOffset); assert(tz.utcOffsetAt(dst.stdTime) == utcOffset + dstOffset); assert(cast(DateTime) std == stdDate); assert(cast(DateTime) dst == dstDate); assert(std == stdUTC); version (Posix) { setTZEnvVar(tzName); static void testTM(scope const SysTime st) { import core.stdc.time : tm; import core.sys.posix.time : localtime_r; time_t unixTime = st.toUnixTime(); tm osTimeInfo = void; localtime_r(&unixTime, &osTimeInfo); tm ourTimeInfo = st.toTM(); assert(ourTimeInfo.tm_sec == osTimeInfo.tm_sec); assert(ourTimeInfo.tm_min == osTimeInfo.tm_min); assert(ourTimeInfo.tm_hour == osTimeInfo.tm_hour); assert(ourTimeInfo.tm_mday == osTimeInfo.tm_mday); assert(ourTimeInfo.tm_mon == osTimeInfo.tm_mon); assert(ourTimeInfo.tm_year == osTimeInfo.tm_year); assert(ourTimeInfo.tm_wday == osTimeInfo.tm_wday); assert(ourTimeInfo.tm_yday == osTimeInfo.tm_yday); assert(ourTimeInfo.tm_isdst == osTimeInfo.tm_isdst); assert(ourTimeInfo.tm_gmtoff == osTimeInfo.tm_gmtoff); assert(to!string(ourTimeInfo.tm_zone) == to!string(osTimeInfo.tm_zone)); } testTM(std); testTM(dst); // Apparently, right/ does not exist on Mac OS X. I don't know // whether or not it exists on FreeBSD. It's rather pointless // normally, since the Posix standard requires that leap seconds // be ignored, so it does make some sense that right/ wouldn't // be there, but since PosixTimeZone _does_ use leap seconds if // the time zone file does, we'll test that functionality if the // appropriate files exist. if (chainPath(PosixTimeZone.defaultTZDatabaseDir, "right", tzName).exists) { auto leapTZ = PosixTimeZone.getTimeZone("right/" ~ tzName); assert(leapTZ.name == "right/" ~ tzName); //assert(leapTZ.stdName == stdName); //Locale-dependent //assert(leapTZ.dstName == dstName); //Locale-dependent assert(leapTZ.hasDST == hasDST); auto leapSTD = SysTime(std.stdTime, leapTZ); auto leapDST = SysTime(dst.stdTime, leapTZ); assert(!leapSTD.dstInEffect); assert(leapDST.dstInEffect == hasDST); assert(leapSTD.stdTime == std.stdTime); assert(leapDST.stdTime == dst.stdTime); // Whenever a leap second is added/removed, // this will have to be adjusted. //enum leapDiff = convert!("seconds", "hnsecs")(25); //assert(leapSTD.adjTime - leapDiff == std.adjTime); //assert(leapDST.adjTime - leapDiff == dst.adjTime); } } return tz; } import std.datetime.date : DateTime; auto dstSwitches = [/+America/Los_Angeles+/ tuple(DateTime(2012, 3, 11), DateTime(2012, 11, 4), 2, 2), /+America/New_York+/ tuple(DateTime(2012, 3, 11), DateTime(2012, 11, 4), 2, 2), ///+America/Santiago+/ tuple(DateTime(2011, 8, 21), DateTime(2011, 5, 8), 0, 0), /+Europe/London+/ tuple(DateTime(2012, 3, 25), DateTime(2012, 10, 28), 1, 2), /+Europe/Paris+/ tuple(DateTime(2012, 3, 25), DateTime(2012, 10, 28), 2, 3), /+Australia/Adelaide+/ tuple(DateTime(2012, 10, 7), DateTime(2012, 4, 1), 2, 3)]; import std.datetime.date : DateTimeException; version (Posix) { version (FreeBSD) enum utcZone = "Etc/UTC"; else version (NetBSD) enum utcZone = "UTC"; else version (DragonFlyBSD) enum utcZone = "UTC"; else version (linux) enum utcZone = "UTC"; else version (OSX) enum utcZone = "UTC"; else version (Solaris) enum utcZone = "UTC"; else static assert(0, "The location of the UTC timezone file on this Posix platform must be set."); auto tzs = [testTZ("America/Los_Angeles", "PST", "PDT", dur!"hours"(-8), dur!"hours"(1)), testTZ("America/New_York", "EST", "EDT", dur!"hours"(-5), dur!"hours"(1)), //testTZ("America/Santiago", "CLT", "CLST", dur!"hours"(-4), dur!"hours"(1), false), testTZ("Europe/London", "GMT", "BST", dur!"hours"(0), dur!"hours"(1)), testTZ("Europe/Paris", "CET", "CEST", dur!"hours"(1), dur!"hours"(1)), // Per www.timeanddate.com, it should be "CST" and "CDT", // but the OS insists that it's "CST" for both. We should // probably figure out how to report an error in the TZ // database and report it. testTZ("Australia/Adelaide", "CST", "CST", dur!"hours"(9) + dur!"minutes"(30), dur!"hours"(1), false)]; testTZ(utcZone, "UTC", "UTC", dur!"hours"(0), dur!"hours"(0)); assertThrown!DateTimeException(PosixTimeZone.getTimeZone("hello_world")); } else version (Windows) { auto tzs = [testTZ("Pacific Standard Time", "Pacific Standard Time", "Pacific Daylight Time", dur!"hours"(-8), dur!"hours"(1)), testTZ("Eastern Standard Time", "Eastern Standard Time", "Eastern Daylight Time", dur!"hours"(-5), dur!"hours"(1)), //testTZ("Pacific SA Standard Time", "Pacific SA Standard Time", //"Pacific SA Daylight Time", dur!"hours"(-4), dur!"hours"(1), false), testTZ("GMT Standard Time", "GMT Standard Time", "GMT Daylight Time", dur!"hours"(0), dur!"hours"(1)), testTZ("Romance Standard Time", "Romance Standard Time", "Romance Daylight Time", dur!"hours"(1), dur!"hours"(1)), testTZ("Cen. Australia Standard Time", "Cen. Australia Standard Time", "Cen. Australia Daylight Time", dur!"hours"(9) + dur!"minutes"(30), dur!"hours"(1), false)]; testTZ("Greenwich Standard Time", "Greenwich Standard Time", "Greenwich Daylight Time", dur!"hours"(0), dur!"hours"(0)); assertThrown!DateTimeException(WindowsTimeZone.getTimeZone("hello_world")); } else assert(0, "OS not supported."); foreach (i; 0 .. tzs.length) { auto tz = tzs[i]; immutable spring = dstSwitches[i][2]; immutable fall = dstSwitches[i][3]; auto stdOffset = SysTime(dstSwitches[i][0] + dur!"days"(-1), tz).utcOffset; auto dstOffset = stdOffset + dur!"hours"(1); // Verify that creating a SysTime in the given time zone results // in a SysTime with the correct std time during and surrounding // a DST switch. foreach (hour; -12 .. 13) { import std.exception : enforce; auto st = SysTime(dstSwitches[i][0] + dur!"hours"(hour), tz); immutable targetHour = hour < 0 ? hour + 24 : hour; static void testHour(SysTime st, int hour, string tzName, size_t line = __LINE__) { enforce(st.hour == hour, new AssertError(format("[%s] [%s]: [%s] [%s]", st, tzName, st.hour, hour), __FILE__, line)); } void testOffset1(Duration offset, bool dstInEffect, size_t line = __LINE__) { AssertError msg(string tag) { return new AssertError(format("%s [%s] [%s]: [%s] [%s] [%s]", tag, st, tz.name, st.utcOffset, stdOffset, dstOffset), __FILE__, line); } enforce(st.dstInEffect == dstInEffect, msg("1")); enforce(st.utcOffset == offset, msg("2")); enforce((st + dur!"minutes"(1)).utcOffset == offset, msg("3")); } if (hour == spring) { testHour(st, spring + 1, tz.name); testHour(st + dur!"minutes"(1), spring + 1, tz.name); } else { testHour(st, targetHour, tz.name); testHour(st + dur!"minutes"(1), targetHour, tz.name); } if (hour < spring) testOffset1(stdOffset, false); else testOffset1(dstOffset, true); st = SysTime(dstSwitches[i][1] + dur!"hours"(hour), tz); testHour(st, targetHour, tz.name); // Verify that 01:00 is the first 01:00 (or whatever hour before the switch is). if (hour == fall - 1) testHour(st + dur!"hours"(1), targetHour, tz.name); if (hour < fall) testOffset1(dstOffset, true); else testOffset1(stdOffset, false); } // Verify that converting a time in UTC to a time in another // time zone results in the correct time during and surrounding // a DST switch. bool first = true; auto springSwitch = SysTime(dstSwitches[i][0] + dur!"hours"(spring), UTC()) - stdOffset; auto fallSwitch = SysTime(dstSwitches[i][1] + dur!"hours"(fall), UTC()) - dstOffset; // @@@BUG@@@ 3659 makes this necessary. auto fallSwitchMinus1 = fallSwitch - dur!"hours"(1); foreach (hour; -24 .. 25) { auto utc = SysTime(dstSwitches[i][0] + dur!"hours"(hour), UTC()); auto local = utc.toOtherTZ(tz); void testOffset2(Duration offset, size_t line = __LINE__) { AssertError msg(string tag) { return new AssertError(format("%s [%s] [%s]: [%s] [%s]", tag, hour, tz.name, utc, local), __FILE__, line); } import std.exception : enforce; enforce((utc + offset).hour == local.hour, msg("1")); enforce((utc + offset + dur!"minutes"(1)).hour == local.hour, msg("2")); } if (utc < springSwitch) testOffset2(stdOffset); else testOffset2(dstOffset); utc = SysTime(dstSwitches[i][1] + dur!"hours"(hour), UTC()); local = utc.toOtherTZ(tz); if (utc == fallSwitch || utc == fallSwitchMinus1) { if (first) { testOffset2(dstOffset); first = false; } else testOffset2(stdOffset); } else if (utc > fallSwitch) testOffset2(stdOffset); else testOffset2(dstOffset); } } } protected: /++ Params: name = The name of the time zone. stdName = The abbreviation for the time zone during std time. dstName = The abbreviation for the time zone during DST. +/ this(string name, string stdName, string dstName) @safe immutable pure { _name = name; _stdName = stdName; _dstName = dstName; } private: immutable string _name; immutable string _stdName; immutable string _dstName; } /++ A TimeZone which represents the current local time zone on the system running your program. This uses the underlying C calls to adjust the time rather than using specific D code based off of system settings to calculate the time such as $(LREF PosixTimeZone) and $(LREF WindowsTimeZone) do. That also means that it will use whatever the current time zone is on the system, even if the system's time zone changes while the program is running. +/ final class LocalTime : TimeZone { public: /++ $(LREF LocalTime) is a singleton class. $(LREF LocalTime) returns its only instance. +/ static immutable(LocalTime) opCall() @trusted pure nothrow { alias FuncType = immutable(LocalTime) function() @safe pure nothrow; return (cast(FuncType)&singleton)(); } version (StdDdoc) { /++ In principle, this is the name of the local time zone. However, this always returns the empty string. This is because time zones cannot be uniquely identified by the attributes given by the OS (such as the `stdName` and `dstName`), and neither Posix systems nor Windows systems provide an easy way to get the TZ Database name of the local time zone. See_Also: $(HTTP en.wikipedia.org/wiki/Tz_database, Wikipedia entry on TZ Database)<br> $(HTTP en.wikipedia.org/wiki/List_of_tz_database_time_zones, List of Time Zones) +/ @property override string name() @safe const nothrow; } /++ Typically, the abbreviation (generally 3 or 4 letters) for the time zone when DST is $(I not) in effect (e.g. PST). It is not necessarily unique. However, on Windows, it may be the unabbreviated name (e.g. Pacific Standard Time). Regardless, it is not the same as name. This property is overridden because the local time of the system could change while the program is running and we need to determine it dynamically rather than it being fixed like it would be with most time zones. +/ @property override string stdName() @trusted const nothrow { version (Posix) { import core.stdc.time : tzname; import std.conv : to; try return to!string(tzname[0]); catch (Exception e) assert(0, "to!string(tzname[0]) failed."); } else version (Windows) { TIME_ZONE_INFORMATION tzInfo; GetTimeZoneInformation(&tzInfo); // Cannot use to!string() like this should, probably due to bug // http://d.puremagic.com/issues/show_bug.cgi?id=5016 //return to!string(tzInfo.StandardName); wchar[32] str; foreach (i, ref wchar c; str) c = tzInfo.StandardName[i]; string retval; try { foreach (dchar c; str) { if (c == '\0') break; retval ~= c; } return retval; } catch (Exception e) assert(0, "GetTimeZoneInformation() returned invalid UTF-16."); } } @safe unittest { version (FreeBSD) { // A bug on FreeBSD 9+ makes it so that this test fails. // https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=168862 } else version (NetBSD) { // The same bug on NetBSD 7+ } else { assert(LocalTime().stdName !is null); version (Posix) { scope(exit) clearTZEnvVar(); setTZEnvVar("America/Los_Angeles"); assert(LocalTime().stdName == "PST"); setTZEnvVar("America/New_York"); assert(LocalTime().stdName == "EST"); } } } /++ Typically, the abbreviation (generally 3 or 4 letters) for the time zone when DST $(I is) in effect (e.g. PDT). It is not necessarily unique. However, on Windows, it may be the unabbreviated name (e.g. Pacific Daylight Time). Regardless, it is not the same as name. This property is overridden because the local time of the system could change while the program is running and we need to determine it dynamically rather than it being fixed like it would be with most time zones. +/ @property override string dstName() @trusted const nothrow { version (Posix) { import core.stdc.time : tzname; import std.conv : to; try return to!string(tzname[1]); catch (Exception e) assert(0, "to!string(tzname[1]) failed."); } else version (Windows) { TIME_ZONE_INFORMATION tzInfo; GetTimeZoneInformation(&tzInfo); // Cannot use to!string() like this should, probably due to bug // http://d.puremagic.com/issues/show_bug.cgi?id=5016 //return to!string(tzInfo.DaylightName); wchar[32] str; foreach (i, ref wchar c; str) c = tzInfo.DaylightName[i]; string retval; try { foreach (dchar c; str) { if (c == '\0') break; retval ~= c; } return retval; } catch (Exception e) assert(0, "GetTimeZoneInformation() returned invalid UTF-16."); } } @safe unittest { // tzname, called from dstName, isn't set by default for Musl. version (CRuntime_Musl) assert(LocalTime().dstName is null); else assert(LocalTime().dstName !is null); version (Posix) { scope(exit) clearTZEnvVar(); version (FreeBSD) { // A bug on FreeBSD 9+ makes it so that this test fails. // https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=168862 } else version (NetBSD) { // The same bug on NetBSD 7+ } else { setTZEnvVar("America/Los_Angeles"); assert(LocalTime().dstName == "PDT"); setTZEnvVar("America/New_York"); assert(LocalTime().dstName == "EDT"); } } } /++ Whether this time zone has Daylight Savings Time at any point in time. Note that for some time zone types it may not have DST for current dates but will still return true for `hasDST` because the time zone did at some point have DST. +/ @property override bool hasDST() @trusted const nothrow { version (Posix) { static if (is(typeof(daylight))) return cast(bool)(daylight); else { try { import std.datetime.date : Date; auto currYear = (cast(Date) Clock.currTime()).year; auto janOffset = SysTime(Date(currYear, 1, 4), cast(immutable) this).stdTime - SysTime(Date(currYear, 1, 4), UTC()).stdTime; auto julyOffset = SysTime(Date(currYear, 7, 4), cast(immutable) this).stdTime - SysTime(Date(currYear, 7, 4), UTC()).stdTime; return janOffset != julyOffset; } catch (Exception e) assert(0, "Clock.currTime() threw."); } } else version (Windows) { TIME_ZONE_INFORMATION tzInfo; GetTimeZoneInformation(&tzInfo); return tzInfo.DaylightDate.wMonth != 0; } } @safe unittest { LocalTime().hasDST; version (Posix) { scope(exit) clearTZEnvVar(); setTZEnvVar("America/Los_Angeles"); assert(LocalTime().hasDST); setTZEnvVar("America/New_York"); assert(LocalTime().hasDST); setTZEnvVar("UTC"); assert(!LocalTime().hasDST); } } /++ Takes the number of hnsecs (100 ns) since midnight, January 1st, 1 A.D. in UTC time (i.e. std time) and returns whether DST is in effect in this time zone at the given point in time. Params: stdTime = The UTC time that needs to be checked for DST in this time zone. +/ override bool dstInEffect(long stdTime) @trusted const nothrow { import core.stdc.time : tm; time_t unixTime = stdTimeToUnixTime(stdTime); version (Posix) { import core.sys.posix.time : localtime_r; tm timeInfo = void; localtime_r(&unixTime, &timeInfo); return cast(bool)(timeInfo.tm_isdst); } else version (Windows) { import core.stdc.time : localtime; // Apparently Windows isn't smart enough to deal with negative time_t. if (unixTime >= 0) { tm* timeInfo = localtime(&unixTime); if (timeInfo) return cast(bool)(timeInfo.tm_isdst); } TIME_ZONE_INFORMATION tzInfo; GetTimeZoneInformation(&tzInfo); return WindowsTimeZone._dstInEffect(&tzInfo, stdTime); } } @safe unittest { auto currTime = Clock.currStdTime; LocalTime().dstInEffect(currTime); } /++ Returns hnsecs in the local time zone using the standard C function calls on Posix systems and the standard Windows system calls on Windows systems to adjust the time to the appropriate time zone from std time. Params: stdTime = The UTC time that needs to be adjusted to this time zone's time. See_Also: `TimeZone.utcToTZ` +/ override long utcToTZ(long stdTime) @trusted const nothrow { version (Solaris) return stdTime + convert!("seconds", "hnsecs")(tm_gmtoff(stdTime)); else version (Posix) { import core.stdc.time : tm; import core.sys.posix.time : localtime_r; time_t unixTime = stdTimeToUnixTime(stdTime); tm timeInfo = void; localtime_r(&unixTime, &timeInfo); return stdTime + convert!("seconds", "hnsecs")(timeInfo.tm_gmtoff); } else version (Windows) { TIME_ZONE_INFORMATION tzInfo; GetTimeZoneInformation(&tzInfo); return WindowsTimeZone._utcToTZ(&tzInfo, stdTime, hasDST); } } @safe unittest { LocalTime().utcToTZ(0); } /++ Returns std time using the standard C function calls on Posix systems and the standard Windows system calls on Windows systems to adjust the time to UTC from the appropriate time zone. See_Also: `TimeZone.tzToUTC` Params: adjTime = The time in this time zone that needs to be adjusted to UTC time. +/ override long tzToUTC(long adjTime) @trusted const nothrow { version (Posix) { import core.stdc.time : tm; import core.sys.posix.time : localtime_r; time_t unixTime = stdTimeToUnixTime(adjTime); immutable past = unixTime - cast(time_t) convert!("days", "seconds")(1); tm timeInfo = void; localtime_r(past < unixTime ? &past : &unixTime, &timeInfo); immutable pastOffset = timeInfo.tm_gmtoff; immutable future = unixTime + cast(time_t) convert!("days", "seconds")(1); localtime_r(future > unixTime ? &future : &unixTime, &timeInfo); immutable futureOffset = timeInfo.tm_gmtoff; if (pastOffset == futureOffset) return adjTime - convert!("seconds", "hnsecs")(pastOffset); if (pastOffset < futureOffset) unixTime -= cast(time_t) convert!("hours", "seconds")(1); unixTime -= pastOffset; localtime_r(&unixTime, &timeInfo); return adjTime - convert!("seconds", "hnsecs")(timeInfo.tm_gmtoff); } else version (Windows) { TIME_ZONE_INFORMATION tzInfo; GetTimeZoneInformation(&tzInfo); return WindowsTimeZone._tzToUTC(&tzInfo, adjTime, hasDST); } } @safe unittest { import core.exception : AssertError; import std.format : format; import std.typecons : tuple; assert(LocalTime().tzToUTC(LocalTime().utcToTZ(0)) == 0); assert(LocalTime().utcToTZ(LocalTime().tzToUTC(0)) == 0); assert(LocalTime().tzToUTC(LocalTime().utcToTZ(0)) == 0); assert(LocalTime().utcToTZ(LocalTime().tzToUTC(0)) == 0); version (Posix) { scope(exit) clearTZEnvVar(); import std.datetime.date : DateTime; auto tzInfos = [tuple("America/Los_Angeles", DateTime(2012, 3, 11), DateTime(2012, 11, 4), 2, 2), tuple("America/New_York", DateTime(2012, 3, 11), DateTime(2012, 11, 4), 2, 2), //tuple("America/Santiago", DateTime(2011, 8, 21), DateTime(2011, 5, 8), 0, 0), tuple("Atlantic/Azores", DateTime(2011, 3, 27), DateTime(2011, 10, 30), 0, 1), tuple("Europe/London", DateTime(2012, 3, 25), DateTime(2012, 10, 28), 1, 2), tuple("Europe/Paris", DateTime(2012, 3, 25), DateTime(2012, 10, 28), 2, 3), tuple("Australia/Adelaide", DateTime(2012, 10, 7), DateTime(2012, 4, 1), 2, 3)]; foreach (i; 0 .. tzInfos.length) { import std.exception : enforce; auto tzName = tzInfos[i][0]; setTZEnvVar(tzName); immutable spring = tzInfos[i][3]; immutable fall = tzInfos[i][4]; auto stdOffset = SysTime(tzInfos[i][1] + dur!"hours"(-12)).utcOffset; auto dstOffset = stdOffset + dur!"hours"(1); // Verify that creating a SysTime in the given time zone results // in a SysTime with the correct std time during and surrounding // a DST switch. foreach (hour; -12 .. 13) { auto st = SysTime(tzInfos[i][1] + dur!"hours"(hour)); immutable targetHour = hour < 0 ? hour + 24 : hour; static void testHour(SysTime st, int hour, string tzName, size_t line = __LINE__) { enforce(st.hour == hour, new AssertError(format("[%s] [%s]: [%s] [%s]", st, tzName, st.hour, hour), __FILE__, line)); } void testOffset1(Duration offset, bool dstInEffect, size_t line = __LINE__) { AssertError msg(string tag) { return new AssertError(format("%s [%s] [%s]: [%s] [%s] [%s]", tag, st, tzName, st.utcOffset, stdOffset, dstOffset), __FILE__, line); } enforce(st.dstInEffect == dstInEffect, msg("1")); enforce(st.utcOffset == offset, msg("2")); enforce((st + dur!"minutes"(1)).utcOffset == offset, msg("3")); } if (hour == spring) { testHour(st, spring + 1, tzName); testHour(st + dur!"minutes"(1), spring + 1, tzName); } else { testHour(st, targetHour, tzName); testHour(st + dur!"minutes"(1), targetHour, tzName); } if (hour < spring) testOffset1(stdOffset, false); else testOffset1(dstOffset, true); st = SysTime(tzInfos[i][2] + dur!"hours"(hour)); testHour(st, targetHour, tzName); // Verify that 01:00 is the first 01:00 (or whatever hour before the switch is). if (hour == fall - 1) testHour(st + dur!"hours"(1), targetHour, tzName); if (hour < fall) testOffset1(dstOffset, true); else testOffset1(stdOffset, false); } // Verify that converting a time in UTC to a time in another // time zone results in the correct time during and surrounding // a DST switch. bool first = true; auto springSwitch = SysTime(tzInfos[i][1] + dur!"hours"(spring), UTC()) - stdOffset; auto fallSwitch = SysTime(tzInfos[i][2] + dur!"hours"(fall), UTC()) - dstOffset; // @@@BUG@@@ 3659 makes this necessary. auto fallSwitchMinus1 = fallSwitch - dur!"hours"(1); foreach (hour; -24 .. 25) { auto utc = SysTime(tzInfos[i][1] + dur!"hours"(hour), UTC()); auto local = utc.toLocalTime(); void testOffset2(Duration offset, size_t line = __LINE__) { AssertError msg(string tag) { return new AssertError(format("%s [%s] [%s]: [%s] [%s]", tag, hour, tzName, utc, local), __FILE__, line); } enforce((utc + offset).hour == local.hour, msg("1")); enforce((utc + offset + dur!"minutes"(1)).hour == local.hour, msg("2")); } if (utc < springSwitch) testOffset2(stdOffset); else testOffset2(dstOffset); utc = SysTime(tzInfos[i][2] + dur!"hours"(hour), UTC()); local = utc.toLocalTime(); if (utc == fallSwitch || utc == fallSwitchMinus1) { if (first) { testOffset2(dstOffset); first = false; } else testOffset2(stdOffset); } else if (utc > fallSwitch) testOffset2(stdOffset); else testOffset2(dstOffset); } } } } private: this() @safe immutable pure { super("", "", ""); } // This is done so that we can maintain purity in spite of doing an impure // operation the first time that LocalTime() is called. static immutable(LocalTime) singleton() @trusted { import core.stdc.time : tzset; import std.concurrency : initOnce; static instance = new immutable(LocalTime)(); static shared bool guard; initOnce!guard({tzset(); return true;}()); return instance; } // The Solaris version of struct tm has no tm_gmtoff field, so do it here version (Solaris) { long tm_gmtoff(long stdTime) @trusted const nothrow { import core.stdc.time : tm; import core.sys.posix.time : localtime_r, gmtime_r; time_t unixTime = stdTimeToUnixTime(stdTime); tm timeInfo = void; localtime_r(&unixTime, &timeInfo); tm timeInfoGmt = void; gmtime_r(&unixTime, &timeInfoGmt); return timeInfo.tm_sec - timeInfoGmt.tm_sec + convert!("minutes", "seconds")(timeInfo.tm_min - timeInfoGmt.tm_min) + convert!("hours", "seconds")(timeInfo.tm_hour - timeInfoGmt.tm_hour); } } } /++ A $(LREF TimeZone) which represents UTC. +/ final class UTC : TimeZone { public: /++ `UTC` is a singleton class. `UTC` returns its only instance. +/ static immutable(UTC) opCall() @safe pure nothrow { return _utc; } /++ Always returns false. +/ @property override bool hasDST() @safe const nothrow { return false; } /++ Always returns false. +/ override bool dstInEffect(long stdTime) @safe const nothrow { return false; } /++ Returns the given hnsecs without changing them at all. Params: stdTime = The UTC time that needs to be adjusted to this time zone's time. See_Also: `TimeZone.utcToTZ` +/ override long utcToTZ(long stdTime) @safe const nothrow { return stdTime; } @safe unittest { assert(UTC().utcToTZ(0) == 0); version (Posix) { scope(exit) clearTZEnvVar(); setTZEnvVar("UTC"); import std.datetime.date : Date; auto std = SysTime(Date(2010, 1, 1)); auto dst = SysTime(Date(2010, 7, 1)); assert(UTC().utcToTZ(std.stdTime) == std.stdTime); assert(UTC().utcToTZ(dst.stdTime) == dst.stdTime); } } /++ Returns the given hnsecs without changing them at all. See_Also: `TimeZone.tzToUTC` Params: adjTime = The time in this time zone that needs to be adjusted to UTC time. +/ override long tzToUTC(long adjTime) @safe const nothrow { return adjTime; } @safe unittest { assert(UTC().tzToUTC(0) == 0); version (Posix) { scope(exit) clearTZEnvVar(); setTZEnvVar("UTC"); import std.datetime.date : Date; auto std = SysTime(Date(2010, 1, 1)); auto dst = SysTime(Date(2010, 7, 1)); assert(UTC().tzToUTC(std.stdTime) == std.stdTime); assert(UTC().tzToUTC(dst.stdTime) == dst.stdTime); } } /++ Returns a $(REF Duration, core,time) of 0. Params: stdTime = The UTC time for which to get the offset from UTC for this time zone. +/ override Duration utcOffsetAt(long stdTime) @safe const nothrow { return dur!"hnsecs"(0); } private: this() @safe immutable pure { super("UTC", "UTC", "UTC"); } static immutable UTC _utc = new immutable(UTC)(); } /++ Represents a time zone with an offset (in minutes, west is negative) from UTC but no DST. It's primarily used as the time zone in the result of $(REF SysTime,std,datetime,systime)'s `fromISOString`, `fromISOExtString`, and `fromSimpleString`. `name` and `dstName` are always the empty string since this time zone has no DST, and while it may be meant to represent a time zone which is in the TZ Database, obviously it's not likely to be following the exact rules of any of the time zones in the TZ Database, so it makes no sense to set it. +/ final class SimpleTimeZone : TimeZone { public: /++ Always returns false. +/ @property override bool hasDST() @safe const nothrow { return false; } /++ Always returns false. +/ override bool dstInEffect(long stdTime) @safe const nothrow { return false; } /++ Takes the number of hnsecs (100 ns) since midnight, January 1st, 1 A.D. in UTC time (i.e. std time) and converts it to this time zone's time. Params: stdTime = The UTC time that needs to be adjusted to this time zone's time. +/ override long utcToTZ(long stdTime) @safe const nothrow { return stdTime + _utcOffset.total!"hnsecs"; } @safe unittest { auto west = new immutable SimpleTimeZone(dur!"hours"(-8)); auto east = new immutable SimpleTimeZone(dur!"hours"(8)); assert(west.utcToTZ(0) == -288_000_000_000L); assert(east.utcToTZ(0) == 288_000_000_000L); assert(west.utcToTZ(54_321_234_567_890L) == 54_033_234_567_890L); const cstz = west; assert(cstz.utcToTZ(50002) == west.utcToTZ(50002)); } /++ Takes the number of hnsecs (100 ns) since midnight, January 1st, 1 A.D. in this time zone's time and converts it to UTC (i.e. std time). Params: adjTime = The time in this time zone that needs to be adjusted to UTC time. +/ override long tzToUTC(long adjTime) @safe const nothrow { return adjTime - _utcOffset.total!"hnsecs"; } @safe unittest { auto west = new immutable SimpleTimeZone(dur!"hours"(-8)); auto east = new immutable SimpleTimeZone(dur!"hours"(8)); assert(west.tzToUTC(-288_000_000_000L) == 0); assert(east.tzToUTC(288_000_000_000L) == 0); assert(west.tzToUTC(54_033_234_567_890L) == 54_321_234_567_890L); const cstz = west; assert(cstz.tzToUTC(20005) == west.tzToUTC(20005)); } /++ Returns utcOffset as a $(REF Duration, core,time). Params: stdTime = The UTC time for which to get the offset from UTC for this time zone. +/ override Duration utcOffsetAt(long stdTime) @safe const nothrow { return _utcOffset; } /++ Params: utcOffset = This time zone's offset from UTC with west of UTC being negative (it is added to UTC to get the adjusted time). stdName = The `stdName` for this time zone. +/ this(Duration utcOffset, string stdName = "") @safe immutable pure { // FIXME This probably needs to be changed to something like (-12 - 13). import std.datetime.date : DateTimeException; import std.exception : enforce; enforce!DateTimeException(abs(utcOffset) < dur!"minutes"(1440), "Offset from UTC must be within range (-24:00 - 24:00)."); super("", stdName, ""); this._utcOffset = utcOffset; } @safe unittest { auto stz = new immutable SimpleTimeZone(dur!"hours"(-8), "PST"); assert(stz.name == ""); assert(stz.stdName == "PST"); assert(stz.dstName == ""); assert(stz.utcOffset == dur!"hours"(-8)); } /++ The amount of time the offset from UTC is (negative is west of UTC, positive is east). +/ @property Duration utcOffset() @safe const pure nothrow { return _utcOffset; } package: /+ Returns a time zone as a string with an offset from UTC. Time zone offsets will be in the form +HHMM or -HHMM. Params: utcOffset = The number of minutes offset from UTC (negative means west). +/ static string toISOString(Duration utcOffset) @safe pure { import std.array : appender; auto w = appender!string(); w.reserve(5); toISOString(w, utcOffset); return w.data; } // ditto static void toISOString(W)(ref W writer, Duration utcOffset) if (isOutputRange!(W, char)) { import std.datetime.date : DateTimeException; import std.exception : enforce; import std.format : formattedWrite; immutable absOffset = abs(utcOffset); enforce!DateTimeException(absOffset < dur!"minutes"(1440), "Offset from UTC must be within range (-24:00 - 24:00)."); int hours; int minutes; absOffset.split!("hours", "minutes")(hours, minutes); formattedWrite( writer, utcOffset < Duration.zero ? "-%02d%02d" : "+%02d%02d", hours, minutes ); } @safe unittest { static string testSTZInvalid(Duration offset) { return SimpleTimeZone.toISOString(offset); } import std.datetime.date : DateTimeException; assertThrown!DateTimeException(testSTZInvalid(dur!"minutes"(1440))); assertThrown!DateTimeException(testSTZInvalid(dur!"minutes"(-1440))); assert(toISOString(dur!"minutes"(0)) == "+0000"); assert(toISOString(dur!"minutes"(1)) == "+0001"); assert(toISOString(dur!"minutes"(10)) == "+0010"); assert(toISOString(dur!"minutes"(59)) == "+0059"); assert(toISOString(dur!"minutes"(60)) == "+0100"); assert(toISOString(dur!"minutes"(90)) == "+0130"); assert(toISOString(dur!"minutes"(120)) == "+0200"); assert(toISOString(dur!"minutes"(480)) == "+0800"); assert(toISOString(dur!"minutes"(1439)) == "+2359"); assert(toISOString(dur!"minutes"(-1)) == "-0001"); assert(toISOString(dur!"minutes"(-10)) == "-0010"); assert(toISOString(dur!"minutes"(-59)) == "-0059"); assert(toISOString(dur!"minutes"(-60)) == "-0100"); assert(toISOString(dur!"minutes"(-90)) == "-0130"); assert(toISOString(dur!"minutes"(-120)) == "-0200"); assert(toISOString(dur!"minutes"(-480)) == "-0800"); assert(toISOString(dur!"minutes"(-1439)) == "-2359"); } /+ Returns a time zone as a string with an offset from UTC. Time zone offsets will be in the form +HH:MM or -HH:MM. Params: utcOffset = The number of minutes offset from UTC (negative means west). +/ static string toISOExtString(Duration utcOffset) @safe pure { import std.array : appender; auto w = appender!string(); w.reserve(6); toISOExtString(w, utcOffset); return w.data; } // ditto static void toISOExtString(W)(ref W writer, Duration utcOffset) { import std.datetime.date : DateTimeException; import std.format : formattedWrite; import std.exception : enforce; immutable absOffset = abs(utcOffset); enforce!DateTimeException(absOffset < dur!"minutes"(1440), "Offset from UTC must be within range (-24:00 - 24:00)."); int hours; int minutes; absOffset.split!("hours", "minutes")(hours, minutes); formattedWrite( writer, utcOffset < Duration.zero ? "-%02d:%02d" : "+%02d:%02d", hours, minutes ); } @safe unittest { static string testSTZInvalid(Duration offset) { return SimpleTimeZone.toISOExtString(offset); } import std.datetime.date : DateTimeException; assertThrown!DateTimeException(testSTZInvalid(dur!"minutes"(1440))); assertThrown!DateTimeException(testSTZInvalid(dur!"minutes"(-1440))); assert(toISOExtString(dur!"minutes"(0)) == "+00:00"); assert(toISOExtString(dur!"minutes"(1)) == "+00:01"); assert(toISOExtString(dur!"minutes"(10)) == "+00:10"); assert(toISOExtString(dur!"minutes"(59)) == "+00:59"); assert(toISOExtString(dur!"minutes"(60)) == "+01:00"); assert(toISOExtString(dur!"minutes"(90)) == "+01:30"); assert(toISOExtString(dur!"minutes"(120)) == "+02:00"); assert(toISOExtString(dur!"minutes"(480)) == "+08:00"); assert(toISOExtString(dur!"minutes"(1439)) == "+23:59"); assert(toISOExtString(dur!"minutes"(-1)) == "-00:01"); assert(toISOExtString(dur!"minutes"(-10)) == "-00:10"); assert(toISOExtString(dur!"minutes"(-59)) == "-00:59"); assert(toISOExtString(dur!"minutes"(-60)) == "-01:00"); assert(toISOExtString(dur!"minutes"(-90)) == "-01:30"); assert(toISOExtString(dur!"minutes"(-120)) == "-02:00"); assert(toISOExtString(dur!"minutes"(-480)) == "-08:00"); assert(toISOExtString(dur!"minutes"(-1439)) == "-23:59"); } /+ Takes a time zone as a string with an offset from UTC and returns a $(LREF SimpleTimeZone) which matches. The accepted formats for time zone offsets are +HH, -HH, +HHMM, and -HHMM. Params: isoString = A string which represents a time zone in the ISO format. +/ static immutable(SimpleTimeZone) fromISOString(S)(S isoString) @safe pure if (isSomeString!S) { import std.algorithm.searching : startsWith; import std.conv : text, to, ConvException; import std.datetime.date : DateTimeException; import std.exception : enforce; auto whichSign = isoString.startsWith('-', '+'); enforce!DateTimeException(whichSign > 0, text("Invalid ISO String ", isoString)); isoString = isoString[1 .. $]; auto sign = whichSign == 1 ? -1 : 1; int hours; int minutes; try { // cast to int from uint is used because it checks for // non digits without extra loops if (isoString.length == 2) { hours = cast(int) to!uint(isoString); } else if (isoString.length == 4) { hours = cast(int) to!uint(isoString[0 .. 2]); minutes = cast(int) to!uint(isoString[2 .. 4]); } else { throw new DateTimeException(text("Invalid ISO String ", isoString)); } } catch (ConvException) { throw new DateTimeException(text("Invalid ISO String ", isoString)); } enforce!DateTimeException(hours < 24 && minutes < 60, text("Invalid ISO String ", isoString)); return new immutable SimpleTimeZone(sign * (dur!"hours"(hours) + dur!"minutes"(minutes))); } @safe unittest { import core.exception : AssertError; import std.format : format; foreach (str; ["", "Z", "-", "+", "-:", "+:", "-1:", "+1:", "+1", "-1", "-24:00", "+24:00", "-24", "+24", "-2400", "+2400", "1", "+1", "-1", "+9", "-9", "+1:0", "+01:0", "+1:00", "+01:000", "+01:60", "-1:0", "-01:0", "-1:00", "-01:000", "-01:60", "000", "00000", "0160", "-0160", " +08:00", "+ 08:00", "+08 :00", "+08: 00", "+08:00 ", " -08:00", "- 08:00", "-08 :00", "-08: 00", "-08:00 ", " +0800", "+ 0800", "+08 00", "+08 00", "+0800 ", " -0800", "- 0800", "-08 00", "-08 00", "-0800 ", "+ab:cd", "+abcd", "+0Z:00", "+Z", "+00Z", "-ab:cd", "+abcd", "-0Z:00", "-Z", "-00Z", "01:00", "12:00", "23:59"]) { import std.datetime.date : DateTimeException; assertThrown!DateTimeException(SimpleTimeZone.fromISOString(str), format("[%s]", str)); } static void test(string str, Duration utcOffset, size_t line = __LINE__) { if (SimpleTimeZone.fromISOString(str).utcOffset != (new immutable SimpleTimeZone(utcOffset)).utcOffset) throw new AssertError("unittest failure", __FILE__, line); } test("+0000", Duration.zero); test("+0001", minutes(1)); test("+0010", minutes(10)); test("+0059", minutes(59)); test("+0100", hours(1)); test("+0130", hours(1) + minutes(30)); test("+0200", hours(2)); test("+0800", hours(8)); test("+2359", hours(23) + minutes(59)); test("-0001", minutes(-1)); test("-0010", minutes(-10)); test("-0059", minutes(-59)); test("-0100", hours(-1)); test("-0130", hours(-1) - minutes(30)); test("-0200", hours(-2)); test("-0800", hours(-8)); test("-2359", hours(-23) - minutes(59)); test("+00", Duration.zero); test("+01", hours(1)); test("+02", hours(2)); test("+12", hours(12)); test("+23", hours(23)); test("-00", Duration.zero); test("-01", hours(-1)); test("-02", hours(-2)); test("-12", hours(-12)); test("-23", hours(-23)); } @safe unittest { import core.exception : AssertError; import std.format : format; static void test(scope const string isoString, int expectedOffset, size_t line = __LINE__) { auto stz = SimpleTimeZone.fromISOExtString(isoString); if (stz.utcOffset != dur!"minutes"(expectedOffset)) throw new AssertError(format("unittest failure: wrong offset [%s]", stz.utcOffset), __FILE__, line); auto result = SimpleTimeZone.toISOExtString(stz.utcOffset); if (result != isoString) throw new AssertError(format("unittest failure: [%s] != [%s]", result, isoString), __FILE__, line); } test("+00:00", 0); test("+00:01", 1); test("+00:10", 10); test("+00:59", 59); test("+01:00", 60); test("+01:30", 90); test("+02:00", 120); test("+08:00", 480); test("+08:00", 480); test("+23:59", 1439); test("-00:01", -1); test("-00:10", -10); test("-00:59", -59); test("-01:00", -60); test("-01:30", -90); test("-02:00", -120); test("-08:00", -480); test("-08:00", -480); test("-23:59", -1439); } /+ Takes a time zone as a string with an offset from UTC and returns a $(LREF SimpleTimeZone) which matches. The accepted formats for time zone offsets are +HH, -HH, +HH:MM, and -HH:MM. Params: isoExtString = A string which represents a time zone in the ISO format. +/ static immutable(SimpleTimeZone) fromISOExtString(S)(S isoExtString) @safe pure if (isSomeString!S) { import std.algorithm.searching : startsWith; import std.conv : ConvException, to; import std.datetime.date : DateTimeException; import std.exception : enforce; import std.format : format; import std.string : indexOf; auto whichSign = isoExtString.startsWith('-', '+'); enforce!DateTimeException(whichSign > 0, format("Invalid ISO String: %s", isoExtString)); auto sign = whichSign == 1 ? -1 : 1; isoExtString = isoExtString[1 .. $]; enforce!DateTimeException(!isoExtString.empty, format("Invalid ISO String: %s", isoExtString)); immutable colon = isoExtString.indexOf(':'); S hoursStr; S minutesStr; int hours, minutes; if (colon != -1) { hoursStr = isoExtString[0 .. colon]; minutesStr = isoExtString[colon + 1 .. $]; enforce!DateTimeException(minutesStr.length == 2, format("Invalid ISO String: %s", isoExtString)); } else { hoursStr = isoExtString; } enforce!DateTimeException(hoursStr.length == 2, format("Invalid ISO String: %s", isoExtString)); try { // cast to int from uint is used because it checks for // non digits without extra loops hours = cast(int) to!uint(hoursStr); minutes = cast(int) (minutesStr.empty ? 0 : to!uint(minutesStr)); } catch (ConvException) { throw new DateTimeException(format("Invalid ISO String: %s", isoExtString)); } enforce!DateTimeException(hours < 24 && minutes < 60, format("Invalid ISO String: %s", isoExtString)); return new immutable SimpleTimeZone(sign * (dur!"hours"(hours) + dur!"minutes"(minutes))); } @safe unittest { import core.exception : AssertError; import std.format : format; foreach (str; ["", "Z", "-", "+", "-:", "+:", "-1:", "+1:", "+1", "-1", "-24:00", "+24:00", "-24", "+24", "-2400", "-2400", "1", "+1", "-1", "+9", "-9", "+1:0", "+01:0", "+1:00", "+01:000", "+01:60", "-1:0", "-01:0", "-1:00", "-01:000", "-01:60", "000", "00000", "0160", "-0160", " +08:00", "+ 08:00", "+08 :00", "+08: 00", "+08:00 ", " -08:00", "- 08:00", "-08 :00", "-08: 00", "-08:00 ", " +0800", "+ 0800", "+08 00", "+08 00", "+0800 ", " -0800", "- 0800", "-08 00", "-08 00", "-0800 ", "+ab:cd", "abcd", "+0Z:00", "+Z", "+00Z", "-ab:cd", "abcd", "-0Z:00", "-Z", "-00Z", "0100", "1200", "2359"]) { import std.datetime.date : DateTimeException; assertThrown!DateTimeException(SimpleTimeZone.fromISOExtString(str), format("[%s]", str)); } static void test(string str, Duration utcOffset, size_t line = __LINE__) { if (SimpleTimeZone.fromISOExtString(str).utcOffset != (new immutable SimpleTimeZone(utcOffset)).utcOffset) throw new AssertError("unittest failure", __FILE__, line); } test("+00:00", Duration.zero); test("+00:01", minutes(1)); test("+00:10", minutes(10)); test("+00:59", minutes(59)); test("+01:00", hours(1)); test("+01:30", hours(1) + minutes(30)); test("+02:00", hours(2)); test("+08:00", hours(8)); test("+23:59", hours(23) + minutes(59)); test("-00:01", minutes(-1)); test("-00:10", minutes(-10)); test("-00:59", minutes(-59)); test("-01:00", hours(-1)); test("-01:30", hours(-1) - minutes(30)); test("-02:00", hours(-2)); test("-08:00", hours(-8)); test("-23:59", hours(-23) - minutes(59)); test("+00", Duration.zero); test("+01", hours(1)); test("+02", hours(2)); test("+12", hours(12)); test("+23", hours(23)); test("-00", Duration.zero); test("-01", hours(-1)); test("-02", hours(-2)); test("-12", hours(-12)); test("-23", hours(-23)); } @safe unittest { import core.exception : AssertError; import std.format : format; static void test(scope const string isoExtString, int expectedOffset, size_t line = __LINE__) { auto stz = SimpleTimeZone.fromISOExtString(isoExtString); if (stz.utcOffset != dur!"minutes"(expectedOffset)) throw new AssertError(format("unittest failure: wrong offset [%s]", stz.utcOffset), __FILE__, line); auto result = SimpleTimeZone.toISOExtString(stz.utcOffset); if (result != isoExtString) throw new AssertError(format("unittest failure: [%s] != [%s]", result, isoExtString), __FILE__, line); } test("+00:00", 0); test("+00:01", 1); test("+00:10", 10); test("+00:59", 59); test("+01:00", 60); test("+01:30", 90); test("+02:00", 120); test("+08:00", 480); test("+08:00", 480); test("+23:59", 1439); test("-00:01", -1); test("-00:10", -10); test("-00:59", -59); test("-01:00", -60); test("-01:30", -90); test("-02:00", -120); test("-08:00", -480); test("-08:00", -480); test("-23:59", -1439); } private: immutable Duration _utcOffset; } /++ Represents a time zone from a TZ Database time zone file. Files from the TZ Database are how Posix systems hold their time zone information. Unfortunately, Windows does not use the TZ Database. To use the TZ Database, use `PosixTimeZone` (which reads its information from the TZ Database files on disk) on Windows by providing the TZ Database files and telling `PosixTimeZone.getTimeZone` where the directory holding them is. To get a `PosixTimeZone`, call `PosixTimeZone.getTimeZone` (which allows specifying the location the time zone files). Note: Unless your system's local time zone deals with leap seconds (which is highly unlikely), then the only way to get a time zone which takes leap seconds into account is to use `PosixTimeZone` with a time zone whose name starts with "right/". Those time zone files do include leap seconds, and `PosixTimeZone` will take them into account (though posix systems which use a "right/" time zone as their local time zone will $(I not) take leap seconds into account even though they're in the file). See_Also: $(HTTP www.iana.org/time-zones, Home of the TZ Database files)<br> $(HTTP en.wikipedia.org/wiki/Tz_database, Wikipedia entry on TZ Database)<br> $(HTTP en.wikipedia.org/wiki/List_of_tz_database_time_zones, List of Time Zones) +/ final class PosixTimeZone : TimeZone { import std.algorithm.searching : countUntil, canFind, startsWith; import std.file : isDir, isFile, exists, dirEntries, SpanMode, DirEntry; import std.path : extension; import std.stdio : File; import std.string : strip, representation; import std.traits : isArray, isSomeChar; public: /++ Whether this time zone has Daylight Savings Time at any point in time. Note that for some time zone types it may not have DST for current dates but will still return true for `hasDST` because the time zone did at some point have DST. +/ @property override bool hasDST() @safe const nothrow { return _hasDST; } /++ Takes the number of hnsecs (100 ns) since midnight, January 1st, 1 A.D. in UTC time (i.e. std time) and returns whether DST is in effect in this time zone at the given point in time. Params: stdTime = The UTC time that needs to be checked for DST in this time zone. +/ override bool dstInEffect(long stdTime) @safe const nothrow { assert(!_transitions.empty); immutable unixTime = stdTimeToUnixTime(stdTime); immutable found = countUntil!"b < a.timeT"(_transitions, unixTime); if (found == -1) return _transitions.back.ttInfo.isDST; immutable transition = found == 0 ? _transitions[0] : _transitions[found - 1]; return transition.ttInfo.isDST; } /++ Takes the number of hnsecs (100 ns) since midnight, January 1st, 1 A.D. in UTC time (i.e. std time) and converts it to this time zone's time. Params: stdTime = The UTC time that needs to be adjusted to this time zone's time. +/ override long utcToTZ(long stdTime) @safe const nothrow { assert(!_transitions.empty); immutable leapSecs = calculateLeapSeconds(stdTime); immutable unixTime = stdTimeToUnixTime(stdTime); immutable found = countUntil!"b < a.timeT"(_transitions, unixTime); if (found == -1) return stdTime + convert!("seconds", "hnsecs")(_transitions.back.ttInfo.utcOffset + leapSecs); immutable transition = found == 0 ? _transitions[0] : _transitions[found - 1]; return stdTime + convert!("seconds", "hnsecs")(transition.ttInfo.utcOffset + leapSecs); } /++ Takes the number of hnsecs (100 ns) since midnight, January 1st, 1 A.D. in this time zone's time and converts it to UTC (i.e. std time). Params: adjTime = The time in this time zone that needs to be adjusted to UTC time. +/ override long tzToUTC(long adjTime) @safe const nothrow { assert(!_transitions.empty, "UTC offset's not available"); immutable leapSecs = calculateLeapSeconds(adjTime); time_t unixTime = stdTimeToUnixTime(adjTime); immutable past = unixTime - convert!("days", "seconds")(1); immutable future = unixTime + convert!("days", "seconds")(1); immutable pastFound = countUntil!"b < a.timeT"(_transitions, past); if (pastFound == -1) return adjTime - convert!("seconds", "hnsecs")(_transitions.back.ttInfo.utcOffset + leapSecs); immutable futureFound = countUntil!"b < a.timeT"(_transitions[pastFound .. $], future); immutable pastTrans = pastFound == 0 ? _transitions[0] : _transitions[pastFound - 1]; if (futureFound == 0) return adjTime - convert!("seconds", "hnsecs")(pastTrans.ttInfo.utcOffset + leapSecs); immutable futureTrans = futureFound == -1 ? _transitions.back : _transitions[pastFound + futureFound - 1]; immutable pastOffset = pastTrans.ttInfo.utcOffset; if (pastOffset < futureTrans.ttInfo.utcOffset) unixTime -= convert!("hours", "seconds")(1); immutable found = countUntil!"b < a.timeT"(_transitions[pastFound .. $], unixTime - pastOffset); if (found == -1) return adjTime - convert!("seconds", "hnsecs")(_transitions.back.ttInfo.utcOffset + leapSecs); immutable transition = found == 0 ? pastTrans : _transitions[pastFound + found - 1]; return adjTime - convert!("seconds", "hnsecs")(transition.ttInfo.utcOffset + leapSecs); } version (StdDdoc) { /++ The default directory where the TZ Database files are stored. It's empty for Windows, since Windows doesn't have them. You can also use the TZDatabaseDir version to pass an arbitrary path at compile-time, rather than hard-coding it here. Android concatenates all time zone data into a single file called tzdata and stores it in the directory below. +/ enum defaultTZDatabaseDir = ""; } else version (TZDatabaseDir) { import std.string : strip; enum defaultTZDatabaseDir = strip(import("TZDatabaseDirFile")); } else version (Android) { enum defaultTZDatabaseDir = "/system/usr/share/zoneinfo/"; } else version (Solaris) { enum defaultTZDatabaseDir = "/usr/share/lib/zoneinfo/"; } else version (Posix) { enum defaultTZDatabaseDir = "/usr/share/zoneinfo/"; } else version (Windows) { enum defaultTZDatabaseDir = ""; } /++ Returns a $(LREF TimeZone) with the give name per the TZ Database. The time zone information is fetched from the TZ Database time zone files in the given directory. See_Also: $(HTTP en.wikipedia.org/wiki/Tz_database, Wikipedia entry on TZ Database)<br> $(HTTP en.wikipedia.org/wiki/List_of_tz_database_time_zones, List of Time Zones) Params: name = The TZ Database name of the desired time zone tzDatabaseDir = The directory where the TZ Database files are located. Because these files are not located on Windows systems, provide them and give their location here to use $(LREF PosixTimeZone)s. Throws: $(REF DateTimeException,std,datetime,date) if the given time zone could not be found or `FileException` if the TZ Database file could not be opened. +/ // TODO make it possible for tzDatabaseDir to be gzipped tar file rather than an uncompressed // directory. static immutable(PosixTimeZone) getTimeZone(string name, string tzDatabaseDir = defaultTZDatabaseDir) @trusted { import std.algorithm.sorting : sort; import std.conv : to; import std.datetime.date : DateTimeException; import std.exception : enforce; import std.format : format; import std.path : asNormalizedPath, chainPath; import std.range : retro; name = strip(name); enforce(tzDatabaseDir.exists(), new DateTimeException(format("Directory %s does not exist.", tzDatabaseDir))); enforce(tzDatabaseDir.isDir, new DateTimeException(format("%s is not a directory.", tzDatabaseDir))); version (Android) { auto tzfileOffset = name in tzdataIndex(tzDatabaseDir); enforce(tzfileOffset, new DateTimeException(format("The time zone %s is not listed.", name))); string tzFilename = separate_index ? "zoneinfo.dat" : "tzdata"; const file = asNormalizedPath(chainPath(tzDatabaseDir, tzFilename)).to!string; } else const file = asNormalizedPath(chainPath(tzDatabaseDir, name)).to!string; enforce(file.exists(), new DateTimeException(format("File %s does not exist.", file))); enforce(file.isFile, new DateTimeException(format("%s is not a file.", file))); auto tzFile = File(file); version (Android) tzFile.seek(*tzfileOffset); immutable gmtZone = name.representation().canFind("GMT"); import std.datetime.date : DateTimeException; try { _enforceValidTZFile(readVal!(char[])(tzFile, 4) == "TZif"); immutable char tzFileVersion = readVal!char(tzFile); _enforceValidTZFile(tzFileVersion == '\0' || tzFileVersion == '2' || tzFileVersion == '3'); { auto zeroBlock = readVal!(ubyte[])(tzFile, 15); bool allZeroes = true; foreach (val; zeroBlock) { if (val != 0) { allZeroes = false; break; } } _enforceValidTZFile(allZeroes); } // The number of UTC/local indicators stored in the file. auto tzh_ttisgmtcnt = readVal!int(tzFile); // The number of standard/wall indicators stored in the file. auto tzh_ttisstdcnt = readVal!int(tzFile); // The number of leap seconds for which data is stored in the file. auto tzh_leapcnt = readVal!int(tzFile); // The number of "transition times" for which data is stored in the file. auto tzh_timecnt = readVal!int(tzFile); // The number of "local time types" for which data is stored in the file (must not be zero). auto tzh_typecnt = readVal!int(tzFile); _enforceValidTZFile(tzh_typecnt != 0); // The number of characters of "timezone abbreviation strings" stored in the file. auto tzh_charcnt = readVal!int(tzFile); // time_ts where DST transitions occur. auto transitionTimeTs = new long[](tzh_timecnt); foreach (ref transition; transitionTimeTs) transition = readVal!int(tzFile); // Indices into ttinfo structs indicating the changes // to be made at the corresponding DST transition. auto ttInfoIndices = new ubyte[](tzh_timecnt); foreach (ref ttInfoIndex; ttInfoIndices) ttInfoIndex = readVal!ubyte(tzFile); // ttinfos which give info on DST transitions. auto tempTTInfos = new TempTTInfo[](tzh_typecnt); foreach (ref ttInfo; tempTTInfos) ttInfo = readVal!TempTTInfo(tzFile); // The array of time zone abbreviation characters. auto tzAbbrevChars = readVal!(char[])(tzFile, tzh_charcnt); auto leapSeconds = new LeapSecond[](tzh_leapcnt); foreach (ref leapSecond; leapSeconds) { // The time_t when the leap second occurs. auto timeT = readVal!int(tzFile); // The total number of leap seconds to be applied after // the corresponding leap second. auto total = readVal!int(tzFile); leapSecond = LeapSecond(timeT, total); } // Indicate whether each corresponding DST transition were specified // in standard time or wall clock time. auto transitionIsStd = new bool[](tzh_ttisstdcnt); foreach (ref isStd; transitionIsStd) isStd = readVal!bool(tzFile); // Indicate whether each corresponding DST transition associated with // local time types are specified in UTC or local time. auto transitionInUTC = new bool[](tzh_ttisgmtcnt); foreach (ref inUTC; transitionInUTC) inUTC = readVal!bool(tzFile); _enforceValidTZFile(!tzFile.eof); // If version 2 or 3, the information is duplicated in 64-bit. if (tzFileVersion == '2' || tzFileVersion == '3') { _enforceValidTZFile(readVal!(char[])(tzFile, 4) == "TZif"); immutable char tzFileVersion2 = readVal!(char)(tzFile); _enforceValidTZFile(tzFileVersion2 == '2' || tzFileVersion2 == '3'); { auto zeroBlock = readVal!(ubyte[])(tzFile, 15); bool allZeroes = true; foreach (val; zeroBlock) { if (val != 0) { allZeroes = false; break; } } _enforceValidTZFile(allZeroes); } // The number of UTC/local indicators stored in the file. tzh_ttisgmtcnt = readVal!int(tzFile); // The number of standard/wall indicators stored in the file. tzh_ttisstdcnt = readVal!int(tzFile); // The number of leap seconds for which data is stored in the file. tzh_leapcnt = readVal!int(tzFile); // The number of "transition times" for which data is stored in the file. tzh_timecnt = readVal!int(tzFile); // The number of "local time types" for which data is stored in the file (must not be zero). tzh_typecnt = readVal!int(tzFile); _enforceValidTZFile(tzh_typecnt != 0); // The number of characters of "timezone abbreviation strings" stored in the file. tzh_charcnt = readVal!int(tzFile); // time_ts where DST transitions occur. transitionTimeTs = new long[](tzh_timecnt); foreach (ref transition; transitionTimeTs) transition = readVal!long(tzFile); // Indices into ttinfo structs indicating the changes // to be made at the corresponding DST transition. ttInfoIndices = new ubyte[](tzh_timecnt); foreach (ref ttInfoIndex; ttInfoIndices) ttInfoIndex = readVal!ubyte(tzFile); // ttinfos which give info on DST transitions. tempTTInfos = new TempTTInfo[](tzh_typecnt); foreach (ref ttInfo; tempTTInfos) ttInfo = readVal!TempTTInfo(tzFile); // The array of time zone abbreviation characters. tzAbbrevChars = readVal!(char[])(tzFile, tzh_charcnt); leapSeconds = new LeapSecond[](tzh_leapcnt); foreach (ref leapSecond; leapSeconds) { // The time_t when the leap second occurs. auto timeT = readVal!long(tzFile); // The total number of leap seconds to be applied after // the corresponding leap second. auto total = readVal!int(tzFile); leapSecond = LeapSecond(timeT, total); } // Indicate whether each corresponding DST transition were specified // in standard time or wall clock time. transitionIsStd = new bool[](tzh_ttisstdcnt); foreach (ref isStd; transitionIsStd) isStd = readVal!bool(tzFile); // Indicate whether each corresponding DST transition associated with // local time types are specified in UTC or local time. transitionInUTC = new bool[](tzh_ttisgmtcnt); foreach (ref inUTC; transitionInUTC) inUTC = readVal!bool(tzFile); } _enforceValidTZFile(tzFile.readln().strip().empty); cast(void) tzFile.readln(); version (Android) { // Android uses a single file for all timezone data, so the file // doesn't end here. } else { _enforceValidTZFile(tzFile.readln().strip().empty); _enforceValidTZFile(tzFile.eof); } auto transitionTypes = new TransitionType*[](tempTTInfos.length); foreach (i, ref ttype; transitionTypes) { bool isStd = false; if (i < transitionIsStd.length && !transitionIsStd.empty) isStd = transitionIsStd[i]; bool inUTC = false; if (i < transitionInUTC.length && !transitionInUTC.empty) inUTC = transitionInUTC[i]; ttype = new TransitionType(isStd, inUTC); } auto ttInfos = new immutable(TTInfo)*[](tempTTInfos.length); foreach (i, ref ttInfo; ttInfos) { auto tempTTInfo = tempTTInfos[i]; if (gmtZone) tempTTInfo.tt_gmtoff = -tempTTInfo.tt_gmtoff; auto abbrevChars = tzAbbrevChars[tempTTInfo.tt_abbrind .. $]; string abbrev = abbrevChars[0 .. abbrevChars.countUntil('\0')].idup; ttInfo = new immutable(TTInfo)(tempTTInfos[i], abbrev); } auto tempTransitions = new TempTransition[](transitionTimeTs.length); foreach (i, ref tempTransition; tempTransitions) { immutable ttiIndex = ttInfoIndices[i]; auto transitionTimeT = transitionTimeTs[i]; auto ttype = transitionTypes[ttiIndex]; auto ttInfo = ttInfos[ttiIndex]; tempTransition = TempTransition(transitionTimeT, ttInfo, ttype); } if (tempTransitions.empty) { _enforceValidTZFile(ttInfos.length == 1 && transitionTypes.length == 1); tempTransitions ~= TempTransition(0, ttInfos[0], transitionTypes[0]); } sort!"a.timeT < b.timeT"(tempTransitions); sort!"a.timeT < b.timeT"(leapSeconds); auto transitions = new Transition[](tempTransitions.length); foreach (i, ref transition; transitions) { auto tempTransition = tempTransitions[i]; auto transitionTimeT = tempTransition.timeT; auto ttInfo = tempTransition.ttInfo; _enforceValidTZFile(i == 0 || transitionTimeT > tempTransitions[i - 1].timeT); transition = Transition(transitionTimeT, ttInfo); } string stdName; string dstName; bool hasDST = false; foreach (transition; retro(transitions)) { auto ttInfo = transition.ttInfo; if (ttInfo.isDST) { if (dstName.empty) dstName = ttInfo.abbrev; hasDST = true; } else { if (stdName.empty) stdName = ttInfo.abbrev; } if (!stdName.empty && !dstName.empty) break; } return new immutable PosixTimeZone(transitions.idup, leapSeconds.idup, name, stdName, dstName, hasDST); } catch (DateTimeException dte) throw dte; catch (Exception e) throw new DateTimeException("Not a valid TZ data file", __FILE__, __LINE__, e); } /// @safe unittest { version (Posix) { auto tz = PosixTimeZone.getTimeZone("America/Los_Angeles"); assert(tz.name == "America/Los_Angeles"); assert(tz.stdName == "PST"); assert(tz.dstName == "PDT"); } } /++ Returns a list of the names of the time zones installed on the system. Providing a sub-name narrows down the list of time zones (which can number in the thousands). For example, passing in "America" as the sub-name returns only the time zones which begin with "America". Params: subName = The first part of the desired time zones. tzDatabaseDir = The directory where the TZ Database files are located. Throws: `FileException` if it fails to read from disk. +/ static string[] getInstalledTZNames(string subName = "", string tzDatabaseDir = defaultTZDatabaseDir) @trusted { import std.algorithm.sorting : sort; import std.array : appender; import std.exception : enforce; import std.format : format; version (Posix) subName = strip(subName); else version (Windows) { import std.array : replace; import std.path : dirSeparator; subName = replace(strip(subName), "/", dirSeparator); } import std.datetime.date : DateTimeException; enforce(tzDatabaseDir.exists(), new DateTimeException(format("Directory %s does not exist.", tzDatabaseDir))); enforce(tzDatabaseDir.isDir, new DateTimeException(format("%s is not a directory.", tzDatabaseDir))); auto timezones = appender!(string[])(); version (Android) { import std.algorithm.iteration : filter; import std.algorithm.mutation : copy; tzdataIndex(tzDatabaseDir).byKey.filter!(a => a.startsWith(subName)).copy(timezones); } else { import std.path : baseName; foreach (DirEntry de; dirEntries(tzDatabaseDir, SpanMode.depth)) { if (de.isFile) { auto tzName = de.name[tzDatabaseDir.length .. $]; if (!tzName.extension().empty || !tzName.startsWith(subName) || baseName(tzName) == "leapseconds" || tzName == "+VERSION") { continue; } timezones.put(tzName); } } } sort(timezones.data); return timezones.data; } version (Posix) @system unittest { import std.exception : assertNotThrown; import std.stdio : writefln; static void testPTZSuccess(string tzName) { scope(failure) writefln("TZName which threw: %s", tzName); PosixTimeZone.getTimeZone(tzName); } static void testPTZFailure(string tzName) { scope(success) writefln("TZName which was supposed to throw: %s", tzName); PosixTimeZone.getTimeZone(tzName); } auto tzNames = getInstalledTZNames(); import std.datetime.date : DateTimeException; foreach (tzName; tzNames) assertNotThrown!DateTimeException(testPTZSuccess(tzName)); // No timezone directories on Android, just a single tzdata file version (Android) {} else { foreach (DirEntry de; dirEntries(defaultTZDatabaseDir, SpanMode.depth)) { if (de.isFile) { auto tzName = de.name[defaultTZDatabaseDir.length .. $]; if (!canFind(tzNames, tzName)) assertThrown!DateTimeException(testPTZFailure(tzName)); } } } } private: /+ Holds information on when a time transition occures (usually a transition to or from DST) as well as a pointer to the `TTInfo` which holds information on the utc offset past the transition. +/ struct Transition { this(long timeT, immutable (TTInfo)* ttInfo) @safe pure { this.timeT = timeT; this.ttInfo = ttInfo; } long timeT; immutable (TTInfo)* ttInfo; } /+ Holds information on when a leap second occurs. +/ struct LeapSecond { this(long timeT, int total) @safe pure { this.timeT = timeT; this.total = total; } long timeT; int total; } /+ Holds information on the utc offset after a transition as well as whether DST is in effect after that transition. +/ struct TTInfo { this(scope const TempTTInfo tempTTInfo, string abbrev) @safe immutable pure { utcOffset = tempTTInfo.tt_gmtoff; isDST = tempTTInfo.tt_isdst; this.abbrev = abbrev; } immutable int utcOffset; // Offset from UTC. immutable bool isDST; // Whether DST is in effect. immutable string abbrev; // The current abbreviation for the time zone. } /+ Struct used to hold information relating to `TTInfo` while organizing the time zone information prior to putting it in its final form. +/ struct TempTTInfo { this(int gmtOff, bool isDST, ubyte abbrInd) @safe pure { tt_gmtoff = gmtOff; tt_isdst = isDST; tt_abbrind = abbrInd; } int tt_gmtoff; bool tt_isdst; ubyte tt_abbrind; } /+ Struct used to hold information relating to `Transition` while organizing the time zone information prior to putting it in its final form. +/ struct TempTransition { this(long timeT, immutable (TTInfo)* ttInfo, TransitionType* ttype) @safe pure { this.timeT = timeT; this.ttInfo = ttInfo; this.ttype = ttype; } long timeT; immutable (TTInfo)* ttInfo; TransitionType* ttype; } /+ Struct used to hold information relating to `Transition` and `TTInfo` while organizing the time zone information prior to putting it in its final form. +/ struct TransitionType { this(bool isStd, bool inUTC) @safe pure { this.isStd = isStd; this.inUTC = inUTC; } // Whether the transition is in std time (as opposed to wall clock time). bool isStd; // Whether the transition is in UTC (as opposed to local time). bool inUTC; } /+ Reads an int from a TZ file. +/ static T readVal(T)(ref File tzFile) @trusted if ((isIntegral!T || isSomeChar!T) || is(Unqual!T == bool)) { import std.bitmanip : bigEndianToNative; T[1] buff; _enforceValidTZFile(!tzFile.eof); tzFile.rawRead(buff); return bigEndianToNative!T(cast(ubyte[T.sizeof]) buff); } /+ Reads an array of values from a TZ file. +/ static T readVal(T)(ref File tzFile, size_t length) @trusted if (isArray!T) { auto buff = new T(length); _enforceValidTZFile(!tzFile.eof); tzFile.rawRead(buff); return buff; } /+ Reads a `TempTTInfo` from a TZ file. +/ static T readVal(T)(ref File tzFile) @safe if (is(T == TempTTInfo)) { return TempTTInfo(readVal!int(tzFile), readVal!bool(tzFile), readVal!ubyte(tzFile)); } /+ Throws: $(REF DateTimeException,std,datetime,date) if `result` is false. +/ static void _enforceValidTZFile(bool result, size_t line = __LINE__) @safe pure { import std.datetime.date : DateTimeException; if (!result) throw new DateTimeException("Not a valid tzdata file.", __FILE__, line); } int calculateLeapSeconds(long stdTime) @safe const pure nothrow { if (_leapSeconds.empty) return 0; immutable unixTime = stdTimeToUnixTime(stdTime); if (_leapSeconds.front.timeT >= unixTime) return 0; immutable found = countUntil!"b < a.timeT"(_leapSeconds, unixTime); if (found == -1) return _leapSeconds.back.total; immutable leapSecond = found == 0 ? _leapSeconds[0] : _leapSeconds[found - 1]; return leapSecond.total; } this(immutable Transition[] transitions, immutable LeapSecond[] leapSeconds, string name, string stdName, string dstName, bool hasDST) @safe immutable pure { if (dstName.empty && !stdName.empty) dstName = stdName; else if (stdName.empty && !dstName.empty) stdName = dstName; super(name, stdName, dstName); if (!transitions.empty) { foreach (i, transition; transitions[0 .. $-1]) _enforceValidTZFile(transition.timeT < transitions[i + 1].timeT); } foreach (i, leapSecond; leapSeconds) _enforceValidTZFile(i == leapSeconds.length - 1 || leapSecond.timeT < leapSeconds[i + 1].timeT); _transitions = transitions; _leapSeconds = leapSeconds; _hasDST = hasDST; } // Android concatenates the usual timezone directories into a single file, // tzdata, along with an index to jump to each timezone's offset. In older // versions of Android, the index was stored in a separate file, zoneinfo.idx, // whereas now it's stored at the beginning of tzdata. version (Android) { // Keep track of whether there's a separate index, zoneinfo.idx. Only // check this after calling tzdataIndex, as it's initialized there. static shared bool separate_index; // Extracts the name of each time zone and the offset where its data is // located in the tzdata file from the index and caches it for later. static const(uint[string]) tzdataIndex(string tzDir) { import std.concurrency : initOnce; __gshared uint[string] _tzIndex; // _tzIndex is initialized once and then shared across all threads. initOnce!_tzIndex( { import std.conv : to; import std.format : format; import std.path : asNormalizedPath, chainPath; enum indexEntrySize = 52; const combinedFile = asNormalizedPath(chainPath(tzDir, "tzdata")).to!string; const indexFile = asNormalizedPath(chainPath(tzDir, "zoneinfo.idx")).to!string; File tzFile; uint indexEntries, dataOffset; uint[string] initIndex; // Check for the combined file tzdata, which stores the index // and the time zone data together. if (combinedFile.exists() && combinedFile.isFile) { tzFile = File(combinedFile); _enforceValidTZFile(readVal!(char[])(tzFile, 6) == "tzdata"); auto tzDataVersion = readVal!(char[])(tzFile, 6); _enforceValidTZFile(tzDataVersion[5] == '\0'); uint indexOffset = readVal!uint(tzFile); dataOffset = readVal!uint(tzFile); readVal!uint(tzFile); indexEntries = (dataOffset - indexOffset) / indexEntrySize; separate_index = false; } else if (indexFile.exists() && indexFile.isFile) { tzFile = File(indexFile); indexEntries = to!uint(tzFile.size/indexEntrySize); separate_index = true; } else { throw new DateTimeException(format("Both timezone files %s and %s do not exist.", combinedFile, indexFile)); } foreach (_; 0 .. indexEntries) { string tzName = to!string(readVal!(char[])(tzFile, 40).ptr); uint tzOffset = readVal!uint(tzFile); readVal!(uint[])(tzFile, 2); initIndex[tzName] = dataOffset + tzOffset; } initIndex.rehash; return initIndex; }()); return _tzIndex; } } // List of times when the utc offset changes. immutable Transition[] _transitions; // List of leap second occurrences. immutable LeapSecond[] _leapSeconds; // Whether DST is in effect for this time zone at any point in time. immutable bool _hasDST; } version (StdDdoc) { /++ $(BLUE This class is Windows-Only.) Represents a time zone from the Windows registry. Unfortunately, Windows does not use the TZ Database. To use the TZ Database, use $(LREF PosixTimeZone) (which reads its information from the TZ Database files on disk) on Windows by providing the TZ Database files and telling `PosixTimeZone.getTimeZone` where the directory holding them is. The TZ Database files and Windows' time zone information frequently do not match. Windows has many errors with regards to when DST switches occur (especially for historical dates). Also, the TZ Database files include far more time zones than Windows does. So, for accurate time zone information, use the TZ Database files with $(LREF PosixTimeZone) rather than `WindowsTimeZone`. However, because `WindowsTimeZone` uses Windows system calls to deal with the time, it's far more likely to match the behavior of other Windows programs. Be aware of the differences when selecting a method. `WindowsTimeZone` does not exist on Posix systems. To get a `WindowsTimeZone`, call `WindowsTimeZone.getTimeZone`. See_Also: $(HTTP www.iana.org/time-zones, Home of the TZ Database files) +/ final class WindowsTimeZone : TimeZone { public: /++ Whether this time zone has Daylight Savings Time at any point in time. Note that for some time zone types it may not have DST for current dates but will still return true for `hasDST` because the time zone did at some point have DST. +/ @property override bool hasDST() @safe const nothrow; /++ Takes the number of hnsecs (100 ns) since midnight, January 1st, 1 A.D. in UTC time (i.e. std time) and returns whether DST is in effect in this time zone at the given point in time. Params: stdTime = The UTC time that needs to be checked for DST in this time zone. +/ override bool dstInEffect(long stdTime) @safe const nothrow; /++ Takes the number of hnsecs (100 ns) since midnight, January 1st, 1 A.D. in UTC time (i.e. std time) and converts it to this time zone's time. Params: stdTime = The UTC time that needs to be adjusted to this time zone's time. +/ override long utcToTZ(long stdTime) @safe const nothrow; /++ Takes the number of hnsecs (100 ns) since midnight, January 1st, 1 A.D. in this time zone's time and converts it to UTC (i.e. std time). Params: adjTime = The time in this time zone that needs to be adjusted to UTC time. +/ override long tzToUTC(long adjTime) @safe const nothrow; /++ Returns a $(LREF TimeZone) with the given name per the Windows time zone names. The time zone information is fetched from the Windows registry. See_Also: $(HTTP en.wikipedia.org/wiki/Tz_database, Wikipedia entry on TZ Database)<br> $(HTTP en.wikipedia.org/wiki/List_of_tz_database_time_zones, List of Time Zones) Params: name = The TZ Database name of the desired time zone. Throws: $(REF DateTimeException,std,datetime,date) if the given time zone could not be found. Example: -------------------- auto tz = WindowsTimeZone.getTimeZone("Pacific Standard Time"); -------------------- +/ static immutable(WindowsTimeZone) getTimeZone(string name) @safe; /++ Returns a list of the names of the time zones installed on the system. The list returned by WindowsTimeZone contains the Windows TZ names, not the TZ Database names. However, `TimeZone.getinstalledTZNames` will return the TZ Database names which are equivalent to the Windows TZ names. +/ static string[] getInstalledTZNames() @safe; private: version (Windows) {} else alias TIME_ZONE_INFORMATION = void*; static bool _dstInEffect(const TIME_ZONE_INFORMATION* tzInfo, long stdTime) nothrow; static long _utcToTZ(const TIME_ZONE_INFORMATION* tzInfo, long stdTime, bool hasDST) nothrow; static long _tzToUTC(const TIME_ZONE_INFORMATION* tzInfo, long adjTime, bool hasDST) nothrow; this() immutable pure { super("", "", ""); } } } else version (Windows) { final class WindowsTimeZone : TimeZone { import std.algorithm.sorting : sort; import std.array : appender; import std.conv : to; import std.format : format; public: @property override bool hasDST() @safe const nothrow { return _tzInfo.DaylightDate.wMonth != 0; } override bool dstInEffect(long stdTime) @safe const nothrow { return _dstInEffect(&_tzInfo, stdTime); } override long utcToTZ(long stdTime) @safe const nothrow { return _utcToTZ(&_tzInfo, stdTime, hasDST); } override long tzToUTC(long adjTime) @safe const nothrow { return _tzToUTC(&_tzInfo, adjTime, hasDST); } static immutable(WindowsTimeZone) getTimeZone(string name) @trusted { scope baseKey = Registry.localMachine.getKey(`Software\Microsoft\Windows NT\CurrentVersion\Time Zones`); foreach (tzKeyName; baseKey.keyNames) { if (tzKeyName != name) continue; scope tzKey = baseKey.getKey(tzKeyName); scope stdVal = tzKey.getValue("Std"); auto stdName = stdVal.value_SZ; scope dstVal = tzKey.getValue("Dlt"); auto dstName = dstVal.value_SZ; scope tziVal = tzKey.getValue("TZI"); auto binVal = tziVal.value_BINARY; assert(binVal.length == REG_TZI_FORMAT.sizeof, "Unexpected size while getTimeZone with name " ~ name); auto tziFmt = cast(REG_TZI_FORMAT*) binVal.ptr; TIME_ZONE_INFORMATION tzInfo; auto wstdName = stdName.to!wstring; auto wdstName = dstName.to!wstring; auto wstdNameLen = wstdName.length > 32 ? 32 : wstdName.length; auto wdstNameLen = wdstName.length > 32 ? 32 : wdstName.length; tzInfo.Bias = tziFmt.Bias; tzInfo.StandardName[0 .. wstdNameLen] = wstdName[0 .. wstdNameLen]; tzInfo.StandardName[wstdNameLen .. $] = '\0'; tzInfo.StandardDate = tziFmt.StandardDate; tzInfo.StandardBias = tziFmt.StandardBias; tzInfo.DaylightName[0 .. wdstNameLen] = wdstName[0 .. wdstNameLen]; tzInfo.DaylightName[wdstNameLen .. $] = '\0'; tzInfo.DaylightDate = tziFmt.DaylightDate; tzInfo.DaylightBias = tziFmt.DaylightBias; return new immutable WindowsTimeZone(name, tzInfo); } import std.datetime.date : DateTimeException; throw new DateTimeException(format("Failed to find time zone: %s", name)); } static string[] getInstalledTZNames() @trusted { auto timezones = appender!(string[])(); scope baseKey = Registry.localMachine.getKey(`Software\Microsoft\Windows NT\CurrentVersion\Time Zones`); foreach (tzKeyName; baseKey.keyNames) timezones.put(tzKeyName); sort(timezones.data); return timezones.data; } @safe unittest { import std.exception : assertNotThrown; import std.stdio : writefln; static void testWTZSuccess(string tzName) { scope(failure) writefln("TZName which threw: %s", tzName); WindowsTimeZone.getTimeZone(tzName); } auto tzNames = getInstalledTZNames(); import std.datetime.date : DateTimeException; foreach (tzName; tzNames) assertNotThrown!DateTimeException(testWTZSuccess(tzName)); } private: static bool _dstInEffect(const TIME_ZONE_INFORMATION* tzInfo, long stdTime) @trusted nothrow { try { if (tzInfo.DaylightDate.wMonth == 0) return false; import std.datetime.date : DateTime, Month; auto utcDateTime = cast(DateTime) SysTime(stdTime, UTC()); //The limits of what SystemTimeToTzSpecificLocalTime will accept. if (utcDateTime.year < 1601) { import std.datetime.date : Month; if (utcDateTime.month == Month.feb && utcDateTime.day == 29) utcDateTime.day = 28; utcDateTime.year = 1601; } else if (utcDateTime.year > 30_827) { if (utcDateTime.month == Month.feb && utcDateTime.day == 29) utcDateTime.day = 28; utcDateTime.year = 30_827; } //SystemTimeToTzSpecificLocalTime doesn't act correctly at the //beginning or end of the year (bleh). Unless some bizarre time //zone changes DST on January 1st or December 31st, this should //fix the problem. if (utcDateTime.month == Month.jan) { if (utcDateTime.day == 1) utcDateTime.day = 2; } else if (utcDateTime.month == Month.dec && utcDateTime.day == 31) utcDateTime.day = 30; SYSTEMTIME utcTime = void; SYSTEMTIME otherTime = void; utcTime.wYear = utcDateTime.year; utcTime.wMonth = utcDateTime.month; utcTime.wDay = utcDateTime.day; utcTime.wHour = utcDateTime.hour; utcTime.wMinute = utcDateTime.minute; utcTime.wSecond = utcDateTime.second; utcTime.wMilliseconds = 0; immutable result = SystemTimeToTzSpecificLocalTime(cast(TIME_ZONE_INFORMATION*) tzInfo, &utcTime, &otherTime); assert(result, "Failed to create SystemTimeToTzSpecificLocalTime"); immutable otherDateTime = DateTime(otherTime.wYear, otherTime.wMonth, otherTime.wDay, otherTime.wHour, otherTime.wMinute, otherTime.wSecond); immutable diff = utcDateTime - otherDateTime; immutable minutes = diff.total!"minutes" - tzInfo.Bias; if (minutes == tzInfo.DaylightBias) return true; assert(minutes == tzInfo.StandardBias, "Unexpected difference"); return false; } catch (Exception e) assert(0, "DateTime's constructor threw."); } @system unittest { TIME_ZONE_INFORMATION tzInfo; GetTimeZoneInformation(&tzInfo); import std.datetime.date : DateTime; foreach (year; [1600, 1601, 30_827, 30_828]) WindowsTimeZone._dstInEffect(&tzInfo, SysTime(DateTime(year, 1, 1)).stdTime); } static long _utcToTZ(const TIME_ZONE_INFORMATION* tzInfo, long stdTime, bool hasDST) @safe nothrow { if (hasDST && WindowsTimeZone._dstInEffect(tzInfo, stdTime)) return stdTime - convert!("minutes", "hnsecs")(tzInfo.Bias + tzInfo.DaylightBias); return stdTime - convert!("minutes", "hnsecs")(tzInfo.Bias + tzInfo.StandardBias); } static long _tzToUTC(const TIME_ZONE_INFORMATION* tzInfo, long adjTime, bool hasDST) @trusted nothrow { if (hasDST) { try { import std.datetime.date : DateTime, Month; bool dstInEffectForLocalDateTime(DateTime localDateTime) { // The limits of what SystemTimeToTzSpecificLocalTime will accept. if (localDateTime.year < 1601) { if (localDateTime.month == Month.feb && localDateTime.day == 29) localDateTime.day = 28; localDateTime.year = 1601; } else if (localDateTime.year > 30_827) { if (localDateTime.month == Month.feb && localDateTime.day == 29) localDateTime.day = 28; localDateTime.year = 30_827; } // SystemTimeToTzSpecificLocalTime doesn't act correctly at the // beginning or end of the year (bleh). Unless some bizarre time // zone changes DST on January 1st or December 31st, this should // fix the problem. if (localDateTime.month == Month.jan) { if (localDateTime.day == 1) localDateTime.day = 2; } else if (localDateTime.month == Month.dec && localDateTime.day == 31) localDateTime.day = 30; SYSTEMTIME utcTime = void; SYSTEMTIME localTime = void; localTime.wYear = localDateTime.year; localTime.wMonth = localDateTime.month; localTime.wDay = localDateTime.day; localTime.wHour = localDateTime.hour; localTime.wMinute = localDateTime.minute; localTime.wSecond = localDateTime.second; localTime.wMilliseconds = 0; immutable result = TzSpecificLocalTimeToSystemTime(cast(TIME_ZONE_INFORMATION*) tzInfo, &localTime, &utcTime); assert(result); assert(result, "Failed to create _tzToUTC"); immutable utcDateTime = DateTime(utcTime.wYear, utcTime.wMonth, utcTime.wDay, utcTime.wHour, utcTime.wMinute, utcTime.wSecond); immutable diff = localDateTime - utcDateTime; immutable minutes = -tzInfo.Bias - diff.total!"minutes"; if (minutes == tzInfo.DaylightBias) return true; assert(minutes == tzInfo.StandardBias, "Unexpected difference"); return false; } import std.datetime.date : DateTime; auto localDateTime = cast(DateTime) SysTime(adjTime, UTC()); auto localDateTimeBefore = localDateTime - dur!"hours"(1); auto localDateTimeAfter = localDateTime + dur!"hours"(1); auto dstInEffectNow = dstInEffectForLocalDateTime(localDateTime); auto dstInEffectBefore = dstInEffectForLocalDateTime(localDateTimeBefore); auto dstInEffectAfter = dstInEffectForLocalDateTime(localDateTimeAfter); bool isDST; if (dstInEffectBefore && dstInEffectNow && dstInEffectAfter) isDST = true; else if (!dstInEffectBefore && !dstInEffectNow && !dstInEffectAfter) isDST = false; else if (!dstInEffectBefore && dstInEffectAfter) isDST = false; else if (dstInEffectBefore && !dstInEffectAfter) isDST = dstInEffectNow; else assert(0, "Bad Logic."); if (isDST) return adjTime + convert!("minutes", "hnsecs")(tzInfo.Bias + tzInfo.DaylightBias); } catch (Exception e) assert(0, "SysTime's constructor threw."); } return adjTime + convert!("minutes", "hnsecs")(tzInfo.Bias + tzInfo.StandardBias); } this(string name, TIME_ZONE_INFORMATION tzInfo) @trusted immutable pure { super(name, to!string(tzInfo.StandardName.ptr), to!string(tzInfo.DaylightName.ptr)); _tzInfo = tzInfo; } TIME_ZONE_INFORMATION _tzInfo; } } version (StdDdoc) { /++ $(BLUE This function is Posix-Only.) Sets the local time zone on Posix systems with the TZ Database name by setting the TZ environment variable. Unfortunately, there is no way to do it on Windows using the TZ Database name, so this function only exists on Posix systems. +/ void setTZEnvVar(string tzDatabaseName) @safe nothrow; /++ $(BLUE This function is Posix-Only.) Clears the TZ environment variable. +/ void clearTZEnvVar() @safe nothrow; } else version (Posix) { void setTZEnvVar(string tzDatabaseName) @trusted nothrow { import core.stdc.time : tzset; import core.sys.posix.stdlib : setenv; import std.internal.cstring : tempCString; import std.path : asNormalizedPath, chainPath; version (Android) auto value = asNormalizedPath(tzDatabaseName); else auto value = asNormalizedPath(chainPath(PosixTimeZone.defaultTZDatabaseDir, tzDatabaseName)); setenv("TZ", value.tempCString(), 1); tzset(); } void clearTZEnvVar() @trusted nothrow { import core.stdc.time : tzset; import core.sys.posix.stdlib : unsetenv; unsetenv("TZ"); tzset(); } } /++ Provides the conversions between the IANA time zone database time zone names (which POSIX systems use) and the time zone names that Windows uses. Windows uses a different set of time zone names than the IANA time zone database does, and how they correspond to one another changes over time (particularly when Microsoft updates Windows). $(HTTP unicode.org/cldr/data/common/supplemental/windowsZones.xml, windowsZones.xml) provides the current conversions (which may or may not match up with what's on a particular Windows box depending on how up-to-date it is), and parseTZConversions reads in those conversions from windowsZones.xml so that a D program can use those conversions. However, it should be noted that the time zone information on Windows is frequently less accurate than that in the IANA time zone database, and if someone really wants accurate time zone information, they should use the IANA time zone database files with $(LREF PosixTimeZone) on Windows rather than $(LREF WindowsTimeZone), whereas $(LREF WindowsTimeZone) makes more sense when trying to match what Windows will think the time is in a specific time zone. Also, the IANA time zone database has a lot more time zones than Windows does. Params: windowsZonesXMLText = The text from $(HTTP unicode.org/cldr/data/common/supplemental/windowsZones.xml, windowsZones.xml) Throws: Exception if there is an error while parsing the given XML. -------------------- // Parse the conversions from a local file. auto text = std.file.readText("path/to/windowsZones.xml"); auto conversions = parseTZConversions(text); // Alternatively, grab the XML file from the web at runtime // and parse it so that it's guaranteed to be up-to-date, though // that has the downside that the code needs to worry about the // site being down or unicode.org changing the URL. auto url = "http://unicode.org/cldr/data/common/supplemental/windowsZones.xml"; auto conversions2 = parseTZConversions(std.net.curl.get(url)); -------------------- +/ struct TZConversions { /++ The key is the Windows time zone name, and the value is a list of IANA TZ database names which are close (currently only ever one, but it allows for multiple in case it's ever necessary). +/ string[][string] toWindows; /++ The key is the IANA time zone database name, and the value is a list of Windows time zone names which are close (usually only one, but it could be multiple). +/ string[][string] fromWindows; } /++ ditto +/ TZConversions parseTZConversions(string windowsZonesXMLText) @safe pure { // This is a bit hacky, since it doesn't properly read XML, but it avoids // needing to pull in std.xml (which we're theoretically replacing at some // point anyway). import std.algorithm.iteration : uniq; import std.algorithm.searching : find; import std.algorithm.sorting : sort; import std.array : array, split; import std.string : lineSplitter; string[][string] win2Nix; string[][string] nix2Win; immutable f1 = `<mapZone other="`; immutable f2 = `type="`; foreach (line; windowsZonesXMLText.lineSplitter()) { import std.exception : enforce; // Sample line: // <mapZone other="Canada Central Standard Time" territory="CA" type="America/Regina America/Swift_Current"/> line = line.find(f1); if (line.empty) continue; line = line[f1.length .. $]; auto next = line.find('"'); enforce(!next.empty, "Error parsing. Text does not appear to be from windowsZones.xml"); auto win = line[0 .. $ - next.length]; line = next.find(f2); enforce(!line.empty, "Error parsing. Text does not appear to be from windowsZones.xml"); line = line[f2.length .. $]; next = line.find('"'); enforce(!next.empty, "Error parsing. Text does not appear to be from windowsZones.xml"); auto nixes = line[0 .. $ - next.length].split(); if (auto n = win in win2Nix) *n ~= nixes; else win2Nix[win] = nixes; foreach (nix; nixes) { if (auto w = nix in nix2Win) *w ~= win; else nix2Win[nix] = [win]; } } foreach (key, ref value; nix2Win) value = value.sort().uniq().array(); foreach (key, ref value; win2Nix) value = value.sort().uniq().array(); return TZConversions(nix2Win, win2Nix); } @safe unittest { import std.algorithm.comparison : equal; import std.algorithm.iteration : uniq; import std.algorithm.sorting : isSorted; // Reduced text from http://unicode.org/cldr/data/common/supplemental/windowsZones.xml auto sampleFileText = `<?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE supplementalData SYSTEM "../../common/dtd/ldmlSupplemental.dtd"> <!-- Copyright © 1991-2013 Unicode, Inc. CLDR data files are interpreted according to the LDML specification (http://unicode.org/reports/tr35/) For terms of use, see http://www.unicode.org/copyright.html --> <supplementalData> <version number="$Revision$"/> <windowsZones> <mapTimezones otherVersion="7df0005" typeVersion="2015g"> <!-- (UTC-12:00) International Date Line West --> <mapZone other="Dateline Standard Time" territory="001" type="Etc/GMT+12"/> <mapZone other="Dateline Standard Time" territory="ZZ" type="Etc/GMT+12"/> <!-- (UTC-11:00) Coordinated Universal Time-11 --> <mapZone other="UTC-11" territory="001" type="Etc/GMT+11"/> <mapZone other="UTC-11" territory="AS" type="Pacific/Pago_Pago"/> <mapZone other="UTC-11" territory="NU" type="Pacific/Niue"/> <mapZone other="UTC-11" territory="UM" type="Pacific/Midway"/> <mapZone other="UTC-11" territory="ZZ" type="Etc/GMT+11"/> <!-- (UTC-10:00) Hawaii --> <mapZone other="Hawaiian Standard Time" territory="001" type="Pacific/Honolulu"/> <mapZone other="Hawaiian Standard Time" territory="CK" type="Pacific/Rarotonga"/> <mapZone other="Hawaiian Standard Time" territory="PF" type="Pacific/Tahiti"/> <mapZone other="Hawaiian Standard Time" territory="UM" type="Pacific/Johnston"/> <mapZone other="Hawaiian Standard Time" territory="US" type="Pacific/Honolulu"/> <mapZone other="Hawaiian Standard Time" territory="ZZ" type="Etc/GMT+10"/> <!-- (UTC-09:00) Alaska --> <mapZone other="Alaskan Standard Time" territory="001" type="America/Anchorage"/> <mapZone other="Alaskan Standard Time" territory="US" ` ~ `type="America/Anchorage America/Juneau America/Nome America/Sitka America/Yakutat"/> </mapTimezones> </windowsZones> </supplementalData>`; auto tzConversions = parseTZConversions(sampleFileText); assert(tzConversions.toWindows.length == 15); assert(tzConversions.toWindows["America/Anchorage"] == ["Alaskan Standard Time"]); assert(tzConversions.toWindows["America/Juneau"] == ["Alaskan Standard Time"]); assert(tzConversions.toWindows["America/Nome"] == ["Alaskan Standard Time"]); assert(tzConversions.toWindows["America/Sitka"] == ["Alaskan Standard Time"]); assert(tzConversions.toWindows["America/Yakutat"] == ["Alaskan Standard Time"]); assert(tzConversions.toWindows["Etc/GMT+10"] == ["Hawaiian Standard Time"]); assert(tzConversions.toWindows["Etc/GMT+11"] == ["UTC-11"]); assert(tzConversions.toWindows["Etc/GMT+12"] == ["Dateline Standard Time"]); assert(tzConversions.toWindows["Pacific/Honolulu"] == ["Hawaiian Standard Time"]); assert(tzConversions.toWindows["Pacific/Johnston"] == ["Hawaiian Standard Time"]); assert(tzConversions.toWindows["Pacific/Midway"] == ["UTC-11"]); assert(tzConversions.toWindows["Pacific/Niue"] == ["UTC-11"]); assert(tzConversions.toWindows["Pacific/Pago_Pago"] == ["UTC-11"]); assert(tzConversions.toWindows["Pacific/Rarotonga"] == ["Hawaiian Standard Time"]); assert(tzConversions.toWindows["Pacific/Tahiti"] == ["Hawaiian Standard Time"]); assert(tzConversions.fromWindows.length == 4); assert(tzConversions.fromWindows["Alaskan Standard Time"] == ["America/Anchorage", "America/Juneau", "America/Nome", "America/Sitka", "America/Yakutat"]); assert(tzConversions.fromWindows["Dateline Standard Time"] == ["Etc/GMT+12"]); assert(tzConversions.fromWindows["Hawaiian Standard Time"] == ["Etc/GMT+10", "Pacific/Honolulu", "Pacific/Johnston", "Pacific/Rarotonga", "Pacific/Tahiti"]); assert(tzConversions.fromWindows["UTC-11"] == ["Etc/GMT+11", "Pacific/Midway", "Pacific/Niue", "Pacific/Pago_Pago"]); foreach (key, value; tzConversions.fromWindows) { assert(value.isSorted, key); assert(equal(value.uniq(), value), key); } }
D
# FIXED gap.obj: C:/ti/BleToWifiGateway_1.0.0_20_oct_16/src/example/blefi/npi/gap.c gap.obj: C:/ti/ccsv6/tools/compiler/arm_15.12.3.LTS/include/stdio.h gap.obj: C:/ti/ccsv6/tools/compiler/arm_15.12.3.LTS/include/linkage.h gap.obj: C:/ti/ccsv6/tools/compiler/arm_15.12.3.LTS/include/stdarg.h gap.obj: C:/ti/ccsv6/tools/compiler/arm_15.12.3.LTS/include/stdlib.h gap.obj: C:/ti/BleToWifiGateway_1.0.0_20_oct_16/src/example/blefi/npi/include/gap.h gap.obj: C:/ti/BleToWifiGateway_1.0.0_20_oct_16/src/example/blefi/npi/include/hci.h gap.obj: C:/ti/BleToWifiGateway_1.0.0_20_oct_16/src/example/blefi/include/datatypes.h gap.obj: C:/ti/BleToWifiGateway_1.0.0_20_oct_16/src/example/common/uart_if.h gap.obj: C:/ti/BleToWifiGateway_1.0.0_20_oct_16/src/example/blefi/npi/include/sm.h gap.obj: C:/ti/BleToWifiGateway_1.0.0_20_oct_16/src/example/blefi/npi/include/att.h gap.obj: C:/ti/BleToWifiGateway_1.0.0_20_oct_16/src/example/blefi/npi/include/l2cap.h gap.obj: C:/ti/BleToWifiGateway_1.0.0_20_oct_16/src/example/blefi/npi/include/ble_events.h gap.obj: C:/ti/BleToWifiGateway_1.0.0_20_oct_16/src/example/blefi/npi/gap_packets.h C:/ti/BleToWifiGateway_1.0.0_20_oct_16/src/example/blefi/npi/gap.c: C:/ti/ccsv6/tools/compiler/arm_15.12.3.LTS/include/stdio.h: C:/ti/ccsv6/tools/compiler/arm_15.12.3.LTS/include/linkage.h: C:/ti/ccsv6/tools/compiler/arm_15.12.3.LTS/include/stdarg.h: C:/ti/ccsv6/tools/compiler/arm_15.12.3.LTS/include/stdlib.h: C:/ti/BleToWifiGateway_1.0.0_20_oct_16/src/example/blefi/npi/include/gap.h: C:/ti/BleToWifiGateway_1.0.0_20_oct_16/src/example/blefi/npi/include/hci.h: C:/ti/BleToWifiGateway_1.0.0_20_oct_16/src/example/blefi/include/datatypes.h: C:/ti/BleToWifiGateway_1.0.0_20_oct_16/src/example/common/uart_if.h: C:/ti/BleToWifiGateway_1.0.0_20_oct_16/src/example/blefi/npi/include/sm.h: C:/ti/BleToWifiGateway_1.0.0_20_oct_16/src/example/blefi/npi/include/att.h: C:/ti/BleToWifiGateway_1.0.0_20_oct_16/src/example/blefi/npi/include/l2cap.h: C:/ti/BleToWifiGateway_1.0.0_20_oct_16/src/example/blefi/npi/include/ble_events.h: C:/ti/BleToWifiGateway_1.0.0_20_oct_16/src/example/blefi/npi/gap_packets.h:
D
/** * TODO */ module graphics.adapters.adapter; import core, components, graphics, utility; import gl3n.linalg; import derelict.opengl3.gl3; import std.algorithm, std.array; /** * TODO */ abstract class Adapter { private: GLDeviceContext _deviceContext; GLRenderContext _renderContext; uint _width, _screenWidth; uint _height, _screenHeight; bool _fullscreen, _backfaceCulling, _vsync; uint _deferredFrameBuffer; uint _diffuseRenderTexture; //Alpha channel stores Specular map average uint _normalRenderTexture; //Alpha channel stores nothing important uint _depthRenderTexture; // Do not add properties for: shared UserInterface[] uis; public: /// TODO mixin( Property!_deviceContext ); /// TODO mixin( Property!_renderContext ); /// TODO mixin( Property!_width ); /// TODO mixin( Property!_screenWidth ); /// TODO mixin( Property!_height ); /// TODO mixin( Property!_screenHeight ); /// TODO mixin( Property!_fullscreen ); /// TODO mixin( Property!_backfaceCulling ); /// TODO mixin( Property!_vsync ); /// TODO mixin( Property!_deferredFrameBuffer ); /// TODO mixin( Property!_diffuseRenderTexture ); /// TODO mixin( Property!_normalRenderTexture ); /// TODO mixin( Property!_depthRenderTexture ); /** * TODO */ abstract void initialize(); /** * TODO */ abstract void shutdown(); /** * TODO */ abstract void resize(); /** * TODO */ abstract void reload(); /** * TODO */ abstract void swapBuffers(); /** * TODO */ abstract void openWindow(); /** * TODO */ abstract void closeWindow(); /** * TODO */ abstract void messageLoop(); /** * TODO */ final void initializeDeferredRendering() { //http://www.opengl-tutorial.org/intermediate-tutorials/tutorial-14-render-to-texture/ //Create the frame buffer, which will contain the textures to render to deferredFrameBuffer = 0; glGenFramebuffers( 1, &_deferredFrameBuffer ); glBindFramebuffer( GL_FRAMEBUFFER, _deferredFrameBuffer ); //Generate our 3 textures glGenTextures( 1, &_diffuseRenderTexture ); glGenTextures( 1, &_normalRenderTexture ); glGenTextures( 1, &_depthRenderTexture ); //For each texture, we bind it to our active texture, and set the format and filtering glBindTexture( GL_TEXTURE_2D, _diffuseRenderTexture ); glTexImage2D( GL_TEXTURE_2D, 0, GL_RGBA8, width, height, 0, GL_RGBA, GL_UNSIGNED_BYTE, null ); glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST ); glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST ); glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE ); glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE ); glBindTexture( GL_TEXTURE_2D, _normalRenderTexture ); glTexImage2D( GL_TEXTURE_2D, 0, GL_RGB16F, width, height, 0, GL_RGB, GL_FLOAT, null ); glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST ); glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST ); glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE ); glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE ); glBindTexture( GL_TEXTURE_2D, _depthRenderTexture ); glTexImage2D( GL_TEXTURE_2D, 0, GL_DEPTH_COMPONENT32, width, height, 0, GL_DEPTH_COMPONENT, GL_FLOAT, null ); glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST ); glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST ); glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE ); glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE ); //And finally set all of these to our frameBuffer glFramebufferTexture2D( GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, _diffuseRenderTexture, 0 ); glFramebufferTexture2D( GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT1, GL_TEXTURE_2D, _normalRenderTexture, 0 ); glFramebufferTexture2D( GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, GL_TEXTURE_2D, _depthRenderTexture, 0 ); GLenum[ 2 ] DrawBuffers = [ GL_COLOR_ATTACHMENT0, GL_COLOR_ATTACHMENT1 ]; glDrawBuffers( 2, DrawBuffers.ptr ); auto status = glCheckFramebufferStatus(GL_FRAMEBUFFER); if(status != GL_FRAMEBUFFER_COMPLETE ) { string mapFramebufferError(int code) { switch(code) { case(GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT): return "GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT"; case(GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT): return "GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT"; case(GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER): return "GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER"; case(GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER): return "GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER"; case(GL_FRAMEBUFFER_UNSUPPORTED): return "GL_FRAMEBUFFER_UNSUPPORTED"; case(GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE): return "GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE"; case(GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS): return "GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS"; default: return "UNKNOWN"; } } logFatal( "Deffered rendering Frame Buffer was not initialized correctly. Error: ", mapFramebufferError(status) ); assert(false); } } /** * Sets up the render pipeline. */ final void beginDraw() { } /** * Called after all desired objects are drawn. * Handles lighting and post processing. */ final void endDraw() { if( !DGame.instance.activeScene ) { logWarning( "No active scene." ); return; } auto scene = DGame.instance.activeScene; if( !scene.camera ) { logWarning( "No camera on active scene." ); return; } auto objsWithLights = scene.objects .filter!(obj => obj.stateFlags.drawLight && obj.light) .map!(obj => obj.light); auto getOfType( Type )() { return objsWithLights .filter!(obj => typeid(obj) == typeid(Type)) .map!(obj => cast(shared Type)obj); } auto ambientLights = getOfType!AmbientLight; auto directionalLights = getOfType!DirectionalLight; auto pointLights = getOfType!PointLight; auto spotLights = getOfType!SpotLight; shared mat4 projection = scene.camera.perspectiveMatrix; shared mat4 invProj = scene.camera.inversePerspectiveMatrix; /** * TODO */ void geometryPass() { foreach( object; scene.objects ) { if( object.mesh && object.stateFlags.drawMesh ) { // set the shader Shader shader = object.mesh.animated ? Shaders.animatedGeometry : Shaders.geometry; glUseProgram( shader.programID ); glBindVertexArray( object.mesh.glVertexArray ); shared mat4 worldView = scene.camera.viewMatrix * object.transform.matrix; shader.bindUniformMatrix4fv( shader.WorldView, worldView ); shader.bindUniformMatrix4fv( shader.WorldViewProjection, projection * worldView ); shader.bindUniform1ui( shader.ObjectId, object.id ); if( object.mesh.animated ) shader.bindUniformMatrix4fvArray( shader.Bones, object.animation.currBoneTransforms ); shader.bindMaterial( object.material ); glDrawElements( GL_TRIANGLES, object.mesh.numVertices, GL_UNSIGNED_INT, null ); glBindVertexArray(0); } } } /** * TODO */ void lightPass() { /** * TODO */ void bindGeometryOutputs( Shader shader ) { // diffuse glUniform1i( shader.DiffuseTexture, 0 ); glActiveTexture( GL_TEXTURE0 ); glBindTexture( GL_TEXTURE_2D, _diffuseRenderTexture ); // normal glUniform1i( shader.NormalTexture, 1 ); glActiveTexture( GL_TEXTURE1 ); glBindTexture( GL_TEXTURE_2D, _normalRenderTexture ); // depth glUniform1i( shader.DepthTexture, 2 ); glActiveTexture( GL_TEXTURE2 ); glBindTexture( GL_TEXTURE_2D, _depthRenderTexture ); } // Ambient Light if( !ambientLights.empty ) { auto shader = Shaders.ambientLight; glUseProgram( shader.programID ); bindGeometryOutputs( shader ); shader.bindAmbientLight( ambientLights.front ); // bind the window mesh for ambient lights glBindVertexArray( Assets.unitSquare.glVertexArray ); glDrawElements( GL_TRIANGLES, Assets.unitSquare.numVertices, GL_UNSIGNED_INT, null ); ambientLights.popFront; if( !ambientLights.empty ) { logWarning( "Only one ambient light per scene is utilized." ); } } // Directional Lights if( !directionalLights.empty ) { auto shader = Shaders.directionalLight; glUseProgram( shader.programID ); bindGeometryOutputs( shader ); // bind inverseProj for rebuilding world positions from pixel locations shader.bindUniformMatrix4fv( shader.InverseProjection, invProj ); shader.bindUniform2f( shader.ProjectionConstants, scene.camera.projectionConstants ); // bind the window mesh for directional lights glBindVertexArray( Assets.unitSquare.glVertexArray ); // bind and draw directional lights foreach( light; directionalLights ) { shader.bindDirectionalLight( light, scene.camera.viewMatrix ); glDrawElements( GL_TRIANGLES, Assets.unitSquare.numVertices, GL_UNSIGNED_INT, null ); } } // Point Lights if( !pointLights.empty ) { auto shader = Shaders.pointLight; glUseProgram( shader.programID ); bindGeometryOutputs( shader ); // bind WorldView for creating the View rays for reconstruction position shader.bindUniform2f( shader.ProjectionConstants, scene.camera.projectionConstants ); // bind the sphere mesh for point lights glBindVertexArray( Assets.unitSquare.glVertexArray ); // bind and draw point lights foreach( light; pointLights ) { // logInfo(light.owner.name); shader.bindUniformMatrix4fv( shader.WorldView, scene.camera.viewMatrix * light.getTransform() ); shader.bindUniformMatrix4fv( shader.WorldViewProjection, projection * scene.camera.viewMatrix * light.getTransform() ); shader.bindPointLight( light, scene.camera.viewMatrix ); glDrawElements( GL_TRIANGLES, Assets.unitSquare.numVertices, GL_UNSIGNED_INT, null ); } } // Spot Lights if( !spotLights.empty ) { // TODO } } /** * TODO */ void uiPass() { Shader shader = Shaders.userInterface; glUseProgram( shader.programID ); glBindVertexArray( Assets.unitSquare.glVertexArray ); foreach( ui; uis ) { shader.bindUniformMatrix4fv( shader.WorldProj, scene.camera.orthogonalMatrix * ui.scaleMat ); shader.bindUI( ui ); glDrawElements( GL_TRIANGLES, Assets.unitSquare.numVertices, GL_UNSIGNED_INT, null ); } glBindVertexArray(0); } glBindFramebuffer( GL_FRAMEBUFFER, _deferredFrameBuffer ); // must be called before glClear to clear the depth buffer, otherwise depth buffer won't be cleared glDepthMask( GL_TRUE ); glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT ); glEnable( GL_DEPTH_TEST ); glDisable( GL_BLEND ); geometryPass(); // settings for light pass glDepthMask( GL_FALSE ); glDisable( GL_DEPTH_TEST ); glEnable( GL_BLEND ); glBlendFunc( GL_ONE, GL_ONE ); //This line switches back to the default framebuffer glBindFramebuffer( GL_FRAMEBUFFER, 0 ); glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT ); lightPass(); glBlendFunc( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA ); //glBlendEquation( GL_FUNC_ADD ); uiPass(); // put it on the screen swapBuffers(); // clean up glBindVertexArray(0); glUseProgram(0); uis = []; } /* * Adds a UI to be drawn over the objects in the scene * UIs will be drawn ( and overlap ) in the order they are added */ final void addUI( shared UserInterface ui ) { uis ~= ui; } protected: /** * TODO */ final void loadProperties() { fullscreen = Config.get!bool( "Display.Fullscreen" ); if( fullscreen ) { width = screenWidth; height = screenHeight; } else { width = Config.get!uint( "Display.Width" ); height = Config.get!uint( "Display.Height" ); } backfaceCulling = Config.get!bool( "Graphics.BackfaceCulling" ); vsync = Config.get!bool( "Graphics.VSync" ); } }
D
module gfm.opengl.matrixstack; import gfm.math.smallvector; import gfm.math.smallmatrix; import gfm.common.memory; // A matrix stack designed to replace fixed-pipeline own matrix stacks. // Create one for GL_PROJECTION and one for GL_MODELVIEW, and there you go. // For performance reason, no runtime check for emptyness/fullness, only asserts // M should be a matrix type // TODO: rotations final class MatrixStack(size_t R, T) if (R == 3 || R == 4) { public { alias SmallMatrix!(R, R, T) matrix_t; this(size_t depth = 32) { assert(depth > 0); size_t memNeeded = matrix_t.sizeof * depth * 2; void* data = alignedMalloc(memNeeded * 2, 64); _matrices = cast(matrix_t*)data; _invMatrices = cast(matrix_t*)(data + memNeeded); _top = 0; loadIdentity(); } ~this() { alignedFree(_matrices); } // replacement for glLoadIdentity void loadIdentity() { _matrices[0] = mat4d.IDENTITY; _invMatrices[0] = mat4d.IDENTITY; } // replacement for glPushMatrix void push() pure nothrow { assert(_top + 1 < _depth); _matrices[_top + 1] = _matrices[_top]; _invMatrices[_top + 1] = _invMatrices[_top]; ++_top; } // replacement for glPopMatrix void pop() pure nothrow { assert(_top > 0); --_top; } // return top matrix matrix_t top() pure const nothrow { return _matrices[_top]; } // return top matrix inverted matrix_t invTop() pure const nothrow { return _invMatrices[_top]; } // replacement for glMultMatrix void mult(matrix_t m) { _matrices[_top] = _matrices[_top] * m; _invMatrices[_top] = _invMatrices[_top] * m.inverse(); } // same as mult() but with provided inverse void mult(matrix_t m, matrix_t invM) { _matrices[_top] = _matrices[_top] * m; _invMatrices[_top] = _invMatrices[_top] * invM; } static if (R >= 3) { void translate(SmallVector!(R-1, T) v) { mult(matrix_t.makeTranslate(v), matrix_t.makeTranslate(-v)); } void scale(SmallVector!(R-1, T) v) { mult(matrix_t.makeScale(v), matrix_t.makeScale(1 / v)); } } } private { size_t _top; // index of top matrix size_t _depth; matrix_t* _matrices; matrix_t* _invMatrices; } } unittest { auto s = new MatrixStack!(4u, double)(); s.loadIdentity(); s.push(); s.pop(); }
D
/* * Hunt - A refined core library for D programming language. * * Copyright (C) 2018-2019 HuntLabs * * Website: https://www.huntlabs.net/ * * Licensed under the Apache-2.0 License. * */ module hunt.event.EventLoop; import hunt.event.selector; import hunt.io.channel.Common; import hunt.logging.ConsoleLogger; import hunt.util.worker; import core.thread; import std.parallelism; import std.random; import core.atomic; /** * */ final class EventLoop : AbstractSelector { private static shared int idCounter = 0; this() { int id = atomicOp!("+=")(idCounter, 1); super(id-1, 1); } this(Worker worker) { int id = atomicOp!("+=")(idCounter, 1); super(id-1, 1, worker); } this(size_t id, size_t divider, Worker worker = null) { super(id, divider, worker); } override void stop() { if(isStopping()) { version (HUNT_IO_DEBUG) warningf("The event loop %d is stopping.", getId()); return; } if(isSelfThread()) { version (HUNT_IO_DEBUG) infof("Try to stop the event loop %d in another thread", getId()); auto stopTask = task(&stop); std.parallelism.taskPool.put(stopTask); } else { version (HUNT_IO_DEBUG) warningf("Stopping event loop %d...", getId()); super.stop(); } } }
D
//*************************************************************************** // Info EXIT //*************************************************************************** INSTANCE Info_Gorn_EXIT (C_INFO) { npc = PC_Fighter; nr = 999; condition = Info_Gorn_EXIT_Condition; information = Info_Gorn_EXIT_Info; important = 0; permanent = 1; description = DIALOG_ENDE; }; FUNC INT Info_Gorn_EXIT_Condition() { return 1; }; func VOID Info_Gorn_EXIT_Info() { if self.aivar[AIV_PARTYMEMBER] { AI_Output (self, other,"Info_Gorn_EXIT_09_01"); //Do boju! } else { AI_Output (self, other,"Info_Gorn_EXIT_09_02"); //Do zobaczenia. }; AI_StopProcessInfos ( self ); }; //************************************* // 1. Begrüßung //************************************* instance DIA_Gorn_First (C_INFO) { npc = PC_Fighter; nr = 1; condition = Dia_Gorn_First_Condition; information = Dia_Gorn_First_Info; permanent = 0; important = 1; }; FUNC int DIA_Gorn_First_Condition() { if (Kapitel < 3) { return 1; }; }; func void DIA_Gorn_First_Info() { AI_Output (self, other,"DIA_Gorn_First_09_00"); //Hej, Nowa twarz. AI_Output (other, self,"DIA_Gorn_First_15_01"); //Kim jesteś? AI_Output (self, other,"DIA_Gorn_First_09_02"); //Nazywam się Gorn. Jestem najemnikiem w służbie magów. }; //************************************* // Leben //************************************* instance DIA_Gorn_Leben (C_INFO) { npc = PC_Fighter; nr = 2; condition = Dia_Gorn_Leben_Condition; information = Dia_Gorn_Leben_Info; permanent = 0; description = "Czym się zajmują Najemnicy?"; }; FUNC int DIA_Gorn_Leben_Condition() { if (Npc_KnowsInfo(hero, DIA_Gorn_First)) { return 1; }; }; func void DIA_Gorn_Leben_Info() { AI_Output (other, self,"DIA_Gorn_Leben_15_00"); //Czym się zajmują Najemnicy? AI_Output (self, other,"DIA_Gorn_Leben_09_01"); //Lee zawarł z Magami umowę. Zatrudnia najlepszych wojowników z całej kolonii - czyli nas. AI_Output (self, other,"DIA_Gorn_Leben_09_02"); //Pilnujemy, żeby nikt nie przeszkadzał Kretom w pracy i dbamy o bezpieczeństwo Magów. AI_Output (self, other,"DIA_Gorn_Leben_09_03"); //Magowie natomiast przygotowują plan, który pozwoli się nam stąd wyrwać. Jako wynagrodzenie otrzymujemy trochę rudy. }; //************************************* // Hütte (Shrike) //************************************* var int Gorn_ShrikesHut; //************************************* instance DIA_Gorn_Hut (C_INFO) { npc = PC_Fighter; nr = 3; condition = Dia_Gorn_Hut_Condition; information = Dia_Gorn_Hut_Info; permanent = 0; description = "Czy w Obozie są jeszcze wolne miejsca?"; }; FUNC int DIA_Gorn_Hut_Condition() { if (Npc_KnowsInfo(hero, DIA_Gorn_First)) { return 1; }; }; func void DIA_Gorn_Hut_Info() { AI_Output (other, self,"DIA_Gorn_Hut_15_00"); //Czy w Obozie są jeszcze wolne miejsca, czy będę musiał wykopać kogoś z jego chaty? AI_Output (self, other,"DIA_Gorn_Hut_09_01"); //Chyba będziesz musiał. Jeśli naprawdę chcesz to zrobić, zacznij od Krzykacza. AI_Output (self, other,"DIA_Gorn_Hut_09_02"); //Złapał dla siebie chatę przy samym wejściu do jaskini. Była pusta, ale tak naprawdę należała do nas. AI_Output (other, self,"DIA_Gorn_Hut_15_03"); //Nas? AI_Output (self, other,"DIA_Gorn_Hut_09_04"); //No nas, Najemników. Najemnicy i Szkodniki starają się nie włazić sobie w drogę. Ludzie Laresa nie mają wstępu do tej części obozu. AI_Output (self, other,"DIA_Gorn_Hut_09_05"); //W sumie to drobiazg, ale sukinsyn nie zapytał nawet o pozwolenie. Tym Szkodnikom nie można pozwolić na zbyt wiele, bo zrobią się nie do wytrzymania. Log_CreateTopic (CH1_ShrikesHut, LOG_MISSION); Log_SetTopicStatus (CH1_ShrikesHut, LOG_RUNNING); B_LogEntry (CH1_ShrikesHut, "Najemnik imieniem Gorn opowiedział mi o niejakim Krzykaczu, który przywłaszczył sobie jedną z chat. Jako że mam pozwolenie Gorna, żaden Najemnik nie będzie mi przeszkadzał w 'przekonywaniu' Krzykacza, żeby zmienił lokal."); Gorn_ShrikesHut = LOG_RUNNING; }; //************************************* // Hütte LEER (Shrike) //************************************* instance DIA_Gorn_HutFree (C_INFO) { npc = PC_Fighter; nr = 3; condition = Dia_Gorn_HutFree_Condition; information = Dia_Gorn_HutFree_Info; permanent = 0; description = "Krzykacz przeniósł się już do innej chaty."; }; FUNC int DIA_Gorn_HutFree_Condition() { if (Npc_KnowsInfo(hero, DIA_Shrike_GetLost)) { return 1; }; }; func void DIA_Gorn_HutFree_Info() { AI_Output (other, self,"DIA_Gorn_HutFree_15_00"); //Krzykacz przeniósł się już do innej chaty. AI_Output (self, other,"DIA_Gorn_HutFree_09_01"); //Świetnie! Przed chwilą Torlof powiedział, że zamierza pokazać temu chłoptasiowi, gdzie jest jego miejsce. Gorn_ShrikesHut = LOG_SUCCESS; Log_SetTopicStatus (CH1_ShrikesHut, LOG_SUCCESS); B_LogEntry (CH1_ShrikesHut, "Wykopując Krzykacza z jego chaty wprawiłem Gorna w dobry humor. To chyba porządny człowiek - twardy, ale uczciwy. W przyszłości będę się trzymał blisko niego."); B_GiveXP (XP_ReportedKickedShrike); }; //************************************* // Söldner werden //************************************* instance DIA_Gorn_BecomeSLD (C_INFO) { npc = PC_Fighter; nr = 5; condition = Dia_Gorn_BecomeSLD_Condition; information = Dia_Gorn_BecomeSLD_Info; permanent = 0; description = "Co mam zrobić, żeby zostać członkiem Nowego Obozu?"; }; FUNC int DIA_Gorn_BecomeSLD_Condition() { if Npc_KnowsInfo(hero, DIA_Gorn_First) && (Npc_GetTrueGuild(hero) == GIL_NONE) { return 1; }; }; func void DIA_Gorn_BecomeSLD_Info() { AI_Output (other, self,"DIA_Gorn_BecomeSLD_15_00"); //Co mam zrobić, żeby zostać członkiem Nowego Obozu? AI_Output (self, other,"DIA_Gorn_BecomeSLD_09_01"); //Musisz trochę popracować nad swoimi umiejętnościami bojowymi, zanim Lee zgodzi się cię przyjąć. Nieważne w jakiej broni się specjalizujesz, byleś był w tym dobry. AI_Output (self, other,"DIA_Gorn_BecomeSLD_09_02"); //Oprócz tego powinieneś mieć chociaż ogólne pojęcie o życiu w kolonii, układach między obozami, i takie tam... AI_Output (self, other,"DIA_Gorn_BecomeSLD_09_03"); //Jeśli nie interesują cię inne obozy, spróbuj na początek dołączyć do Szkodników. Na zostanie Najemnikiem jeszcze przyjdzie czas. }; /* //************************************* // PERM //************************************* instance DIA_Gorn_PERM (C_INFO) { npc = PC_Fighter; nr = 1; condition = Dia_Gorn_PERM_Condition; information = Dia_Gorn_PERM_Info; permanent = 1; description = ""; }; FUNC int DIA_Gorn_PERM_Condition() { return 1; }; func void DIA_Gorn_PERM_Info() { AI_Output (other, self,"DIA_Gorn_PERM_15_00"); // AI_Output (self, other,"DIA_Gorn_PERM_09_01"); // }; */ //************************************* // TRADE //************************************* var int Gorn_Trade; //************************************* instance DIA_Gorn_TRADE (C_INFO) { npc = PC_Fighter; nr = 800; condition = Dia_Gorn_TRADE_Condition; information = Dia_Gorn_TRADE_Info; permanent = 1; description = DIALOG_TRADE; trade = 1; }; FUNC int DIA_Gorn_TRADE_Condition() { //if (Npc_KnowsInfo(hero,DIA_Gorn_DuHehler)) //{ //return 1; //***Man darf NICHT seine Waffe weggkaufen oder so... //}; }; func void DIA_Gorn_TRADE_Info() { AI_Output (other, self,"DIA_Gorn_TRADE_15_00"); //Masz więcej tego towaru? AI_Output (self, other,"DIA_Gorn_TRADE_09_01"); //Całe mnóstwo. Chcesz kupić? }; //************************************* // DU Hehler? //************************************* instance DIA_Gorn_DuHehler (C_INFO) { npc = PC_Fighter; nr = 1; condition = Dia_Gorn_DuHehler_Condition; information = Dia_Gorn_DuHehler_Info; permanent = 0; description = "Jak to możliwe, że wziąłeś udział w jednym z napadów?"; }; FUNC int DIA_Gorn_DuHehler_Condition() { if (Npc_KnowsInfo(hero,ORG_801_Lares_BringListAnteil)) { return 1; }; }; func void DIA_Gorn_DuHehler_Info() { AI_Output (other, self,"DIA_Gorn_DuHehler_15_00"); //Jak to możliwe, że wziąłeś udział w jednym z napadów zorganizowanych przez tę bandę? AI_Output (self, other,"DIA_Gorn_DuHehler_09_01"); //A kto twierdzi, że wziąłem? AI_Output (other, self,"DIA_Gorn_DuHehler_15_02"); //Skąd mógłbyś wziąć taką ilość towaru, gdybyś nie uczestniczył w napadzie. AI_Output (self, other,"DIA_Gorn_DuHehler_09_03"); //Naprawdę myślisz, że taką ilość towaru można zebrać po JEDNYM głupim napadzie? AI_Output (other, self,"DIA_Gorn_DuHehler_15_04"); //To znaczy, że uczestniczysz w nich regularnie? AI_Output (self, other,"DIA_Gorn_DuHehler_09_05"); //Nawet gdyby tak było, nie mógł bym ci o tym powiedzieć. Lee dałby mi zdrowo popalić. AI_Output (other, self,"DIA_Gorn_DuHehler_15_06"); //Rozumiem. CreateInvItems(self, ItFoApple, 21); B_GiveInvItems (self,other, ItFoApple,21); //Notwendig für Screenausgabe Npc_RemoveInvItems (other, ItFoApple,21); CreateInvItems(other, ItMw_1H_LightGuardsSword_03, 1); CreateInvItems(other, ItFoApple, 5); CreateInvItems(other, ItFoLoaf, 5); CreateInvItems(other, ItFoCheese, 5); CreateInvItems(other, ItFoBeer, 5); }; //##################################################################### //## //## //## KAPITEL 3 //## //## //##################################################################### //*************************************************************************** // Info NCWAIT //*************************************************************************** INSTANCE Info_Gorn_NCWAIT (C_INFO) { npc = PC_Fighter; nr = 1; condition = Info_Gorn_NCWAIT_Condition; information = Info_Gorn_NCWAIT_Info; important = 1; permanent = 0; }; FUNC INT Info_Gorn_NCWAIT_Condition() { if (Npc_GetDistToWP(self,"NC_PATH52")<1000) { return TRUE; }; }; func VOID Info_Gorn_NCWAIT_Info() { AI_GotoNpc (self, hero); AI_Output (self, other,"Info_Gorn_NCWAIT_09_01"); //Ach, to ty! Mój przyjaciel z obozu na bagnie, Lester, doniósł mi o twoich dokonaniach. AI_Output (self, other,"Info_Gorn_NCWAIT_09_02"); //Jak na kogoś, kto jest tu od niedawna, zaszedłeś całkiem daleko. AI_Output (other, self,"Info_Gorn_NCWAIT_15_03"); //Parę razy zaszedłem nawet na skraj własnego grobu. }; //*************************************************************************** // Info MAGES //*************************************************************************** INSTANCE Info_Gorn_MAGES (C_INFO) { npc = PC_Fighter; condition = Info_Gorn_MAGES_Condition; information = Info_Gorn_MAGES_Info; important = 0; permanent = 0; description = "Mam ważną wiadomość dla Magów Wody!"; }; FUNC INT Info_Gorn_MAGES_Condition() { if (Npc_KnowsInfo(hero, Info_Gorn_NCWAIT)) { return TRUE; }; }; func VOID Info_Gorn_MAGES_Info() { AI_Output (other, self,"Info_Gorn_MAGES_15_01"); //Mam ważną wiadomość dla Magów Wody! AI_Output (self, other,"Info_Gorn_MAGES_09_02"); //W takim razie powinieneś zgłosić się do Saturasa. To najwyższy z Magów Wody. Jak go znam, siedzi teraz nad jakąś magiczną księgą albo czymś w tym stylu. AI_Output (self, other,"Info_Gorn_MAGES_09_03"); //Ale niezależnie od tego jak ważne są wieści, które przynosisz, strażnicy z górnego poziomu nie pozwolą ci się z nim zobaczyć. AI_Output (other, self,"Info_Gorn_MAGES_15_04"); //A nie mógłbyś się za mną wstawić? AI_Output (self, other,"Info_Gorn_MAGES_09_05"); //Ja nie, ale Cronos, strażnik rudy może udzielić ci pozwolenia na spotkanie z Saturasem. }; //*************************************************************************** // Info CRONOS //*************************************************************************** INSTANCE Info_Gorn_CRONOS (C_INFO) { npc = PC_Fighter; condition = Info_Gorn_CRONOS_Condition; information = Info_Gorn_CRONOS_Info; important = 0; permanent = 0; description = "Gdzie znajdę tego 'strażnika rudy'?"; }; FUNC INT Info_Gorn_CRONOS_Condition() { if (Npc_KnowsInfo(hero, Info_Gorn_MAGES)) { return TRUE; }; }; func VOID Info_Gorn_CRONOS_Info() { AI_Output (other, self,"Info_Gorn_CRONOS_15_01"); //Gdzie znajdę tego "strażnika rudy"? AI_Output (self, other,"Info_Gorn_CRONOS_09_01a");//Idąc stąd trafisz na wielką jaskinię mieszkalną, niedaleko tamy. AI_Output (self, other,"Info_Gorn_CRONOS_09_02"); //Cronos przebywa zwykle obok kraty broniącej dostępu do kopca rudy. AI_Output (self, other,"Info_Gorn_CRONOS_09_03"); //Ale to nieco arogancki człowiek. Będziesz musiał go jakoś przekonać, że twoja wiadomość jest naprawdę ważna. VAR C_NPC Cronos; Cronos = Hlp_GetNpc(KdW_604_Cronos); Cronos.aivar[AIV_FINDABLE] = TRUE; B_LogEntry (CH3_EscapePlanNC, "Gorn radzi mi iść wprost do Arcymistrza Magów Wody, niejakiego Saturasa. Cronos, Strażnik Rudy, może mi załatwić audiencję. Znajdę go w centrum obozu, przy kracie nad kopcem rudy."); Npc_ExchangeRoutine (self, "start"); }; //*************************************************************************** // Info RUINWAIT //*************************************************************************** INSTANCE Info_Gorn_RUINWAIT (C_INFO) { npc = PC_Fighter; nr = 2; condition = Info_Gorn_RUINWAIT_Condition; information = Info_Gorn_RUINWAIT_Info; important = 1; permanent = 0; }; FUNC INT Info_Gorn_RUINWAIT_Condition() { if (Npc_GetDistToWP(self,"OW_PATH_ABYSS_4")<1000) { return 1; }; }; func VOID Info_Gorn_RUINWAIT_Info() { AI_GotoNpc (self, hero); AI_Output (self, other,"Info_Gorn_RUINWAIT_09_01"); //Cześć, żółtodziobie. Jak widzisz kolonia to bardzo małe miejsce. AI_Output (self, other,"Info_Gorn_RUINWAIT_09_02"); //Cały czas wpada się na tych samych ludzi. }; //*************************************************************************** // Info RUINWHAT //*************************************************************************** INSTANCE Info_Gorn_RUINWHAT (C_INFO) { npc = PC_Fighter; condition = Info_Gorn_RUINWHAT_Condition; information = Info_Gorn_RUINWHAT_Info; important = 0; permanent = 0; description = "Co tu robisz?"; }; FUNC INT Info_Gorn_RUINWHAT_Condition() { if (Npc_KnowsInfo(hero, Info_Gorn_RUINWAIT)) { return 1; }; }; func VOID Info_Gorn_RUINWHAT_Info() { AI_Output (other, self,"Info_Gorn_RUINWHAT_15_01"); //Co tu robisz? AI_Output (self, other,"Info_Gorn_RUINWHAT_09_02"); //Och, podążam śladem pewnej prastarej legendy. AI_Output (other, self,"Info_Gorn_RUINWHAT_15_03"); //Legendy? AI_Output (self, other,"Info_Gorn_RUINWHAT_09_04"); //Tak, Milten - mój kumpel ze Starego Obozu, powiedział mi, że kiedyś ten teren zamieszkiwali mnisi. AI_Output (self, other,"Info_Gorn_RUINWHAT_09_05"); //Oczywiście to było na długo przed powstaniem Bariery. AI_Output (self, other,"Info_Gorn_RUINWHAT_09_06"); //Ponoć czczono tutaj bóstwo, które pozwalało mnichom przybierać postać zwierząt. AI_Output (self, other,"Info_Gorn_RUINWHAT_09_07"); //Założę się, że są tu jeszcze jakieś skarby pozostałe po dawnych czasach. if (!Npc_KnowsInfo(hero, Info_Gorn_RUINFOCUS)) { AI_Output (self, other,"Info_Gorn_RUINWHAT_09_08"); //A co ciebie tu sprowadza? }; }; //*************************************************************************** // Info RUINFOCUS //*************************************************************************** INSTANCE Info_Gorn_RUINFOCUS (C_INFO) { npc = PC_Fighter; condition = Info_Gorn_RUINFOCUS_Condition; information = Info_Gorn_RUINFOCUS_Info; important = 0; permanent = 0; description = "Szukam magicznego kamienia ogniskującego."; }; FUNC INT Info_Gorn_RUINFOCUS_Condition() { if (Npc_KnowsInfo(hero, Info_Gorn_RUINWAIT)) { return 1; }; }; func VOID Info_Gorn_RUINFOCUS_Info() { AI_Output (other, self,"Info_Gorn_RUINFOCUS_15_01"); //Szukam magicznego kamienia ogniskującego. AI_Output (other, self,"Info_Gorn_RUINFOCUS_15_02"); //Powinien być gdzieś w okolicy. AI_Output (self, other,"Info_Gorn_RUINFOCUS_09_03"); //Przedmiot, którego szukasz może znajdować się na terenie starego klasztoru, za tym kanionem. }; //*************************************************************************** // Info RUINJOIN //*************************************************************************** INSTANCE Info_Gorn_RUINJOIN (C_INFO) { npc = PC_Fighter; condition = Info_Gorn_RUINJOIN_Condition; information = Info_Gorn_RUINJOIN_Info; important = 0; permanent = 0; description = "Moglibyśmy wybrać się tam razem."; }; FUNC INT Info_Gorn_RUINJOIN_Condition() { if (Npc_KnowsInfo(hero, Info_Gorn_RUINFOCUS) && Npc_KnowsInfo(hero, Info_Gorn_RUINWHAT)) { return 1; }; }; func VOID Info_Gorn_RUINJOIN_Info() { AI_Output (other, self,"Info_Gorn_RUINJOIN_15_01"); //Moglibyśmy wybrać się tam razem. AI_Output (self, other,"Info_Gorn_RUINJOIN_09_02"); //Dobry pomysł. Cała okolica aż roi się od zębaczy. AI_Output (self, other,"Info_Gorn_RUINJOIN_09_03"); //W pojedynkę nie powinny stwarzać kłopotu wytrawnemu myśliwemu, ale te bestie zwykle polują całymi stadami. AI_Output (self, other,"Info_Gorn_RUINJOIN_09_04"); //A grupa zębaczy potrafi rozerwać na strzępy nawet bardzo doświadczonego wojownika. AI_Output (other, self,"Info_Gorn_RUINJOIN_15_05"); //Zatem pójdziemy tam razem? AI_Output (self, other,"Info_Gorn_RUINJOIN_09_06"); //Dobra, ale zanim przejdziemy po tym pniu, chciałbym przyjrzeć się uważniej temu kanionowi. Lubię wiedzieć, co mam za plecami. AI_Output (self, other,"Info_Gorn_RUINJOIN_09_07"); //Chodź za mną. Odkryłem ścieżkę, która nas tam zaprowadzi. Log_CreateTopic (CH3_MonasteryRuin, LOG_MISSION); Log_SetTopicStatus (CH3_MonasteryRuin, LOG_RUNNING); B_LogEntry (CH3_MonasteryRuin, "W pobliżu ruin starego klasztoru spotkałem Najemnika Gorna. Zamierza rozejrzeć się po ruinach w poszukiwaniu starych skarbów."); B_LogEntry (CH3_MonasteryRuin, "Od tej pory będziemy podróżować razem. Gorn uprzedził mnie o stadach zębaczy nawiedzających te tereny."); self.aivar[AIV_PARTYMEMBER] = TRUE; AI_StopProcessInfos(self); Npc_ExchangeRoutine(self, "RuinAbyss"); }; //*************************************************************************** // Info RUINABYSS //*************************************************************************** INSTANCE Info_Gorn_RUINABYSS (C_INFO) { npc = PC_Fighter; condition = Info_Gorn_RUINABYSS_Condition; information = Info_Gorn_RUINABYSS_Info; important = 1; permanent = 0; }; FUNC INT Info_Gorn_RUINABYSS_Condition() { if (Npc_KnowsInfo(hero, Info_Gorn_RUINJOIN) && (Npc_GetDistToWP(self,"OW_ABYSS_TO_CAVE_MOVE6")<1000) ) { return 1; }; }; func VOID Info_Gorn_RUINABYSS_Info() { AI_GotoNpc (self, hero); AI_Output (self, other,"Info_Gorn_RUINABYSS_09_01"); //To się nazywa szczęście! Najwyraźniej ta jaskinia była wykorzystywana jako składowisko. AI_Output (self, other,"Info_Gorn_RUINABYSS_09_02"); //Możesz teraz prowadzić do klasztoru. Chciałem mieć pewność, że nie spotkają nas jakieś paskudne niespodzianki w drodze powrotnej. B_LogEntry (CH3_MonasteryRuin, "Odkryliśmy ukrytą jaskinię! Pośród innych rzeczy, znaleźliśmy również dwa zwoje z zaklęciami i klucz!"); AI_StopProcessInfos (self); Npc_ExchangeRoutine (self, "RuinFollow"); }; //*************************************************************************** // Info RUINLEAVE //*************************************************************************** INSTANCE Info_Gorn_RUINLEAVE (C_INFO) { npc = PC_Fighter; condition = Info_Gorn_RUINLEAVE_Condition; information = Info_Gorn_RUINLEAVE_Info; important = 1; permanent = 0; }; FUNC INT Info_Gorn_RUINLEAVE_Condition() { if Npc_KnowsInfo(hero, Info_Gorn_RUINJOIN) && (Npc_GetDistToWP(hero,"OW_PATH_175_MEATBUG")>15000) && !Npc_KnowsInfo(hero, Info_Gorn_RUINGATE) { return 1; }; }; func VOID Info_Gorn_RUINLEAVE_Info() { AI_GotoNpc (self, hero); AI_Output (self, other,"Info_Gorn_RUINLEAVE_09_01"); //Widzę, że ten stary klasztor przestał cię już interesować. AI_Output (self, other,"Info_Gorn_RUINLEAVE_09_02"); //Zatem dalej pójdę sam. AI_Output (self, other,"Info_Gorn_RUINLEAVE_09_03"); //Gdybyś zmienił zdanie, możesz mnie dogonić. self.aivar[AIV_PARTYMEMBER] = FALSE; Npc_ExchangeRoutine(self, "RuinWall"); AI_StopProcessInfos(self); }; //*************************************************************************** // Info RUINWALL //*************************************************************************** INSTANCE Info_Gorn_RUINWALL (C_INFO) { npc = PC_Fighter; condition = Info_Gorn_RUINWALL_Condition; information = Info_Gorn_RUINWALL_Info; important = 1; permanent = 0; }; FUNC INT Info_Gorn_RUINWALL_Condition() { if ( (Npc_KnowsInfo(hero, Info_Gorn_RUINJOIN) || Npc_KnowsInfo(hero, Info_Gorn_RUINLEAVE)) && (Npc_GetDistToWP(hero,"OW_PATH_175_GATE1")<1000) ) { return 1; }; }; func VOID Info_Gorn_RUINWALL_Info() { AI_GotoNpc (self, hero); AI_Output (self, other,"Info_Gorn_RUINWALL_09_01"); //Cholerna brama. Ponoć nikomu jeszcze nie udało się jej otworzyć. AI_Output (self, other,"Info_Gorn_RUINWALL_09_02"); //Te bestyjki pod drugiej stronie są pewnie jedynymi istotami, którym udało się dostać do środka. B_LogEntry (CH3_MonasteryRuin, "Stoimy przed zamkniętą bramą. Wygląda na to, że nie da się jej otworzyć od zewnątrz."); AI_StopProcessInfos (self); Npc_ExchangeRoutine (self, "RuinWall"); }; //*************************************************************************** // Info RUINWALLWHAT //*************************************************************************** INSTANCE Info_Gorn_RUINWALLWHAT (C_INFO) { npc = PC_Fighter; condition = Info_Gorn_RUINWALLWHAT_Condition; information = Info_Gorn_RUINWALLWHAT_Info; important = 0; permanent = 1; description = "I co teraz?"; }; FUNC INT Info_Gorn_RUINWALLWHAT_Condition() { if ( Npc_KnowsInfo(hero, Info_Gorn_RUINWALL) && !Npc_KnowsInfo(hero, Info_Gorn_RUINGATE) ) { return TRUE; }; }; func VOID Info_Gorn_RUINWALLWHAT_Info() { AI_Output (other, self,"Info_Gorn_RUINWALLWHAT_15_01"); //I co teraz? AI_Output (self, other,"Info_Gorn_RUINWALLWHAT_09_02"); //Musisz znaleźć jakiś sposób na przedostanie się na drugą stronę bramy. }; //*************************************************************************** // Info RUINLEDGE //*************************************************************************** INSTANCE Info_Gorn_RUINLEDGE (C_INFO) { npc = PC_Fighter; condition = Info_Gorn_RUINLEDGE_Condition; information = Info_Gorn_RUINLEDGE_Info; important = 1; permanent = 0; }; FUNC INT Info_Gorn_RUINLEDGE_Condition() { if ( Npc_KnowsInfo(hero, Info_Gorn_RUINJOIN) && !Npc_KnowsInfo(hero, Info_Gorn_RUINSUCCESS) && (Npc_GetDistToWP(hero,"OW_MONSTER_NAVIGATE_02")<1000) ) { return 1; }; }; func VOID Info_Gorn_RUINLEDGE_Info() { AI_GotoNpc (self, hero); AI_Output (self, other,"Info_Gorn_RUINLEDGE_09_01"); //Na górze jest chyba jakaś platforma. Ale wątpię, żeby udało się nam wspiąć tak wysoko. AI_Output (self, other,"Info_Gorn_RUINLEDGE_09_02"); //Musimy znaleźć inną drogę. AI_StopProcessInfos(self); }; //*************************************************************************** // Info RUINPLATFORM //*************************************************************************** INSTANCE Info_Gorn_RUINPLATFORM (C_INFO) { npc = PC_Fighter; condition = Info_Gorn_RUINPLATFORM_Condition; information = Info_Gorn_RUINPLATFORM_Info; important = 1; permanent = 0; }; FUNC INT Info_Gorn_RUINPLATFORM_Condition() { if ( Npc_KnowsInfo(hero, Info_Gorn_RUINJOIN) && !Npc_KnowsInfo(hero, Info_Gorn_RUINSUCCESS) && (Npc_GetDistToWP(hero,"OW_PATH_176_TEMPELFOCUS4")<300) ) { return 1; }; }; func VOID Info_Gorn_RUINPLATFORM_Info() { AI_GotoNpc (self, hero); AI_Output (self, other,"Info_Gorn_RUINPLATFORM_09_01"); //To mi wygląda na jakiś piedestał. AI_Output (self, other,"Info_Gorn_RUINPLATFORM_09_02"); //Może leżał tu kiedyś artefakt, którego szukasz. AI_StopProcessInfos(self); }; //*************************************************************************** // Info RUINGATE //*************************************************************************** INSTANCE Info_Gorn_RUINGATE (C_INFO) { npc = PC_Fighter; condition = Info_Gorn_RUINGATE_Condition; information = Info_Gorn_RUINGATE_Info; important = 1; permanent = 0; }; FUNC INT Info_Gorn_RUINGATE_Condition() { if ( (Npc_KnowsInfo(hero, Info_Gorn_RUINJOIN) || Npc_KnowsInfo(hero, Info_Gorn_RUINLEAVE)) && MonasteryRuin_GateOpen ) { return TRUE; }; }; func VOID Info_Gorn_RUINGATE_Info() { AI_GotoNpc (self, hero); AI_Output (self, other,"Info_Gorn_RUINGATE_09_01"); //Widzę, że udało ci się otworzyć tę bramę. To zaklęcie, którego użyłeś było całkiem sprytne. AI_Output (other, self,"Info_Gorn_RUINGATE_15_02"); //No, możemy iść dalej. B_LogEntry (CH3_MonasteryRuin, "Przy pomocy jednego ze zwojów znalezionych w jaskini, zamieniłem się w chrząszcza. W ten sposób udało mi się dostać na teren klasztoru przez wyrwę w murze."); B_LogEntry (CH3_MonasteryRuin, "Brama została otwarta."); self.aivar[AIV_PARTYMEMBER] = TRUE; Npc_ExchangeRoutine (self, "RuinFollowInside"); AI_StopProcessInfos (self); }; //*************************************************************************** // Info RUINLEAVEINSIDE //*************************************************************************** INSTANCE Info_Gorn_RUINLEAVEINSIDE (C_INFO) { npc = PC_Fighter; condition = Info_Gorn_RUINLEAVEINSIDE_Condition; information = Info_Gorn_RUINLEAVEINSIDE_Info; important = 1; permanent = 0; }; FUNC INT Info_Gorn_RUINLEAVEINSIDE_Condition() { if Npc_KnowsInfo(hero, Info_Gorn_RUINGATE) && (Npc_GetDistToWP(hero,"OW_PATH_ABYSS_CROSS_6")<1000) && !Npc_HasItems(hero, Focus_4) { return TRUE; }; }; func VOID Info_Gorn_RUINLEAVEINSIDE_Info() { AI_GotoNpc (self, hero); AI_Output (self, other,"Info_Gorn_RUINLEAVEINSIDE_09_01"); //Widzę, że ten stary klasztor przestał cię już interesować. AI_Output (self, other,"Info_Gorn_RUINLEAVEINSIDE_09_02"); //Dalej pójdę sam. AI_Output (self, other,"Info_Gorn_RUINLEAVEINSIDE_09_03"); //Gdybyś zmienił zdanie, możesz mnie dogonić. self.aivar[AIV_PARTYMEMBER] = FALSE; Npc_ExchangeRoutine(self, "RuinStay"); AI_StopProcessInfos(self); }; //*************************************************************************** // Info RUINSUCCESS //*************************************************************************** INSTANCE Info_Gorn_RUINSUCCESS (C_INFO) { npc = PC_Fighter; condition = Info_Gorn_RUINSUCCESS_Condition; information = Info_Gorn_RUINSUCCESS_Info; important = 1; permanent = 0; }; FUNC INT Info_Gorn_RUINSUCCESS_Condition() { if ( Npc_KnowsInfo(hero, Info_Gorn_RUINJOIN) && Npc_HasItems (hero, Focus_4) ) { return TRUE; }; }; func VOID Info_Gorn_RUINSUCCESS_Info() { AI_GotoNpc (self, hero); AI_Output (self, other,"Info_Gorn_RUINSUCCESS_09_01"); //A więc znalazłeś swój magiczny artefakt! AI_Output (other, self,"Info_Gorn_RUINSUCCESS_15_02"); //Tak. Muszę zanieść ten kamień ogniskujący do Magów Wody. AI_Output (self, other,"Info_Gorn_RUINSUCCESS_09_03"); //Pójdę kawałek z tobą. B_LogEntry (CH3_MonasteryRuin, "Znalazłem kamień ogniskujący! Gorn będzie mi jeszcze trochę towarzyszył."); AI_StopProcessInfos (self); Npc_ExchangeRoutine (self, "RuinYard"); Wld_InsertNpc (YoungTroll, "OW_PATH_176"); }; //*************************************************************************** // Info RUINTROLL //*************************************************************************** INSTANCE Info_Gorn_RUINTROLL (C_INFO) { npc = PC_Fighter; condition = Info_Gorn_RUINTROLL_Condition; information = Info_Gorn_RUINTROLL_Info; important = 1; permanent = 0; }; FUNC INT Info_Gorn_RUINTROLL_Condition() { if ( Npc_KnowsInfo(hero, Info_Gorn_RUINSUCCESS) && (Npc_GetDistToWP(hero,"OW_PATH_SNAPPER04_SPAWN01")<1000) ) { return TRUE; }; }; func VOID Info_Gorn_RUINTROLL_Info() { AI_GotoNpc (self, hero); AI_Output (self, other,"Info_Gorn_RUINTROLL_09_01"); //O JASNA CHOLERA! A co to za monstrum? AI_Output (other, self,"Info_Gorn_RUINTROLL_15_02"); //Skąd się tu wzięło coś takiego? AI_Output (self, other,"Info_Gorn_RUINTROLL_09_03"); //To mi wygląda na jednego z tych niezniszczalnych Trolli, ale jest trochę mniejsze. AI_Output (self, other,"Info_Gorn_RUINTROLL_09_04"); //Trudno, jeśli chcemy się stąd wydostać, musimy go jakoś minąć. AI_StopProcessInfos (self); AI_DrawWeapon (self); AI_SetWalkmode (self, NPC_RUN); //AI_GotoWP (self, "OW_PATH_176"); }; //*************************************************************************** // Info RUINVICTORY //*************************************************************************** INSTANCE Info_Gorn_RUINVICTORY (C_INFO) { npc = PC_Fighter; condition = Info_Gorn_RUINVICTORY_Condition; information = Info_Gorn_RUINVICTORY_Info; important = 1; permanent = 0; }; FUNC INT Info_Gorn_RUINVICTORY_Condition() { var C_NPC yTroll; yTroll = Hlp_GetNpc(YoungTroll); if Npc_KnowsInfo(hero, Info_Gorn_RUINTROLL) && Npc_IsDead(yTroll) { return TRUE; }; }; func VOID Info_Gorn_RUINVICTORY_Info() { AI_GotoNpc (self, hero); AI_Output (self, other,"Info_Gorn_RUINVICTORY_09_01"); //Nie było łatwo! AI_Output (other, self,"Info_Gorn_RUINVICTORY_15_02"); //Tak, ale w końcu się nam udało! To chyba był jakiś młody Troll. AI_Output (self, other,"Info_Gorn_RUINVICTORY_09_03"); //... Więc pewnie nie chciałbyś wpaść na jego rodziców, co? AI_Output (other, self,"Info_Gorn_RUINVICTORY_15_04"); //Raczej nie! AI_Output (self, other,"Info_Gorn_RUINVICTORY_09_05"); //Tutaj nasze drogi się rozchodzą. Chcę tu trochę zostać i rozejrzeć się po okolicy. AI_Output (self, other,"Info_Gorn_RUINVICTORY_09_06"); //Ale na pewno jeszcze się spotkamy. Do zobaczenia, przyjacielu. B_LogEntry (CH3_MonasteryRuin, "W drodze powrotnej, na dziedzińcu klasztoru, spotkaliśmy młodego trolla. Stoczyliśmy z nim ciężką walkę, ale koniec końców - zwyciężyliśmy!"); B_LogEntry (CH3_MonasteryRuin, "Nasze drogi tutaj się rozchodzą. Mam przeczucie, że już niedługo spotkamy się znowu."); self.aivar[AIV_PARTYMEMBER] = FALSE; Npc_ExchangeRoutine (self, "RuinStay"); AI_StopProcessInfos (self); }; //##################################################################### //## //## //## KAPITEL 4 //## //## //##################################################################### //--------------------------------------------------------------------- // Info DIEGOMILTEN //--------------------------------------------------------------------- INSTANCE Info_Gorn_DIEGOMILTEN (C_INFO) { npc = PC_Fighter; condition = Info_Gorn_DIEGOMILTEN_Condition; information = Info_Gorn_DIEGOMILTEN_Info; important = 0; permanent = 0; description = "Spotkałem Diego i Miltena przed Starym Obozem!"; }; FUNC INT Info_Gorn_DIEGOMILTEN_Condition() { if Npc_KnowsInfo(hero, Info_Diego_OCFAVOR) { return TRUE; }; }; func VOID Info_Gorn_DIEGOMILTEN_Info() { AI_Output (hero,self,"Info_Gorn_DIEGOMILTEN_15_01"); //Spotkałem Diego i Miltena przed Starym Obozem! AI_Output (self,hero,"Info_Gorn_DIEGOMILTEN_09_02"); //To dobra wiadomość! AI_Output (hero,self,"Info_Gorn_DIEGOMILTEN_15_03"); //Mają się spotkać z tobą i z Lesterem w zwykłym miejscu. AI_Output (self,hero,"Info_Gorn_DIEGOMILTEN_09_04"); //Dzięki. W dzisiejszych czasach nie ma nic cenniejszego niż kilku oddanych przyjaciół. AI_Output (self,hero,"Info_Gorn_DIEGOMILTEN_09_05"); //Jesteś już prawie jednym z nas. Udowodniłeś, że można na tobie polegać! B_GiveXP (XP_MessageForGorn); if (warned_gorn_or_lester == FALSE) { warned_gorn_or_lester = TRUE ; } else { B_LogEntry (CH4_4Friends, "Poinformowałem Lestera i Gorna o spotkaniu z ich przyjaciółmi. Moje zadanie skończone. Dalej będą musieli radzić sobie sami..."); Log_SetTopicStatus (CH4_4Friends, LOG_SUCCESS); }; }; //--------------------------------------------------------------------- // Info FREEMINE //--------------------------------------------------------------------- INSTANCE Info_Gorn_FREEMINE (C_INFO) { npc = PC_Fighter; condition = Info_Gorn_FREEMINE_Condition; information = Info_Gorn_FREEMINE_Info; important = 0; permanent = 0; description = "Co zobaczyłeś w Wolnej Kopalni?"; }; FUNC INT Info_Gorn_FREEMINE_Condition() { if Npc_KnowsInfo(hero, Info_Saturas_AMBUSH) && !FindXardas { return TRUE; }; }; func VOID Info_Gorn_FREEMINE_Info() { AI_Output (hero,self,"Info_Gorn_FREEMINE_15_01"); //Co zobaczyłeś w Wolnej Kopalni? AI_Output (self,hero,"Info_Gorn_FREEMINE_09_02"); //Po powrocie ze starego klasztoru chciałem złożyć wizytę Okylowi, szefowi Wolnej Kopalni. AI_Output (self,hero,"Info_Gorn_FREEMINE_09_03"); //Ale gdy dotarłem na miejsce, zastałem tylko stygnące ciała. AI_Output (self,hero,"Info_Gorn_FREEMINE_09_04"); //Dostrzegłem kilku Strażników okopujących się przy wejściu do kopalni. AI_Output (hero,self,"Info_Gorn_FREEMINE_15_05"); //Jak to możliwe, że duży oddział Najemników uległ garstce Strażników? AI_Output (self,hero,"Info_Gorn_FREEMINE_09_06"); //To musiała być jakaś zasadzka. W końcu kto mógłby się spodziewać ataku od strony gór? AI_Output (self,hero,"Info_Gorn_FREEMINE_09_07"); //Element zaskoczenia może zwielokrotnić zdolności bojowe oddziału. }; //--------------------------------------------------------------------- // Info GUARDNC //--------------------------------------------------------------------- INSTANCE Info_Gorn_GUARDNC (C_INFO) { npc = PC_Fighter; condition = Info_Gorn_GUARDNC_Condition; information = Info_Gorn_GUARDNC_Info; important = 0; permanent = 0; description = "Co zamierzasz robić dalej?"; }; FUNC INT Info_Gorn_GUARDNC_Condition() { if Npc_KnowsInfo(hero, Info_Saturas_AMBUSH) { return TRUE; }; }; func VOID Info_Gorn_GUARDNC_Info() { AI_Output (hero,self,"Info_Gorn_GUARDNC_15_01"); //Co zamierzasz robić dalej? AI_Output (self,hero,"Info_Gorn_GUARDNC_09_02"); //Musimy zmienić całą naszą strategię obrony. To trochę potrwa. AI_Output (self,hero,"Info_Gorn_GUARDNC_09_03"); //Dopóki Lee nie zdoła przeorganizować swoich oddziałów, dołączę do prowizorycznej straży Corda. AI_Output (hero,self,"Info_Gorn_GUARDNC_15_04"); //Przygotowujecie się do kontrataku? AI_Output (self,hero,"Info_Gorn_GUARDNC_09_05"); //Jeszcze nie, ale wkrótce na pewno to zrobimy. AI_Output (self,hero,"Info_Gorn_GUARDNC_09_06"); //Gdybyś mnie kiedyś potrzebował, zacznij tutaj i idź w stronę kopalni. Będę tam stał na straży. B_Story_CordsPost (); AI_StopProcessInfos (self); }; //--------------------------------------------------------------------- // Info GUARDNCRUNNING //--------------------------------------------------------------------- INSTANCE Info_Gorn_GUARDNCRUNNING (C_INFO) { npc = PC_Fighter; condition = Info_Gorn_GUARDNCRUNNING_Condition; information = Info_Gorn_GUARDNCRUNNING_Info; important = 0; permanent = 1; description = "Jak leci?"; }; FUNC INT Info_Gorn_GUARDNCRUNNING_Condition() { if Npc_KnowsInfo(hero, Info_Gorn_GUARDNC) && !UrShak_SpokeOfUluMulu { return TRUE; }; }; func VOID Info_Gorn_GUARDNCRUNNING_Info() { AI_Output (hero,self,"Info_Gorn_GUARDNCRUNNING_15_01"); //Jak leci? AI_Output (self,hero,"Info_Gorn_GUARDNCRUNNING_09_02"); //Na razie cicho. W Wolnej Kopalni nic się nie rusza. AI_Output (self,hero,"Info_Gorn_GUARDNCRUNNING_09_03"); //Lee zajmuje się jeszcze organizacją naszej obrony! }; //--------------------------------------------------------------------- // Info POST //--------------------------------------------------------------------- INSTANCE Info_Gorn_POST (C_INFO) { npc = PC_Fighter; condition = Info_Gorn_POST_Condition; information = Info_Gorn_POST_Info; important = 1; permanent = 0; }; FUNC INT Info_Gorn_POST_Condition() { if (UrShak_SpokeOfUluMulu) { return TRUE; }; }; func VOID Info_Gorn_POST_Info() { AI_GotoNpc (self, hero); AI_Output (self, hero,"Info_Gorn_POST_09_01"); //Przybywasz w samą porę! Przygotowujemy się do kontruderzenia. AI_Output (self, hero,"Info_Gorn_POST_09_02"); //Na początek spróbujemy odbić Wolną Kopalnię. }; //--------------------------------------------------------------------- // Info TAKEBACK //--------------------------------------------------------------------- INSTANCE Info_Gorn_TAKEBACK (C_INFO) { npc = PC_Fighter; condition = Info_Gorn_TAKEBACK_Condition; information = Info_Gorn_TAKEBACK_Info; important = 0; permanent = 0; description = "Zamierzacie ją zdobyć we czterech? A gdzie są wszyscy Najemnicy?"; }; FUNC INT Info_Gorn_TAKEBACK_Condition() { if (Npc_KnowsInfo(hero, Info_Gorn_POST)) { return TRUE; }; }; func VOID Info_Gorn_TAKEBACK_Info() { AI_Output (hero, self,"Info_Gorn_TAKEBACK_15_01"); //Zamierzacie ją zdobyć we czterech? A gdzie są wszyscy Najemnicy? AI_Output (self, hero,"Info_Gorn_TAKEBACK_09_02"); //Uderzenie od frontu nie ma szans powodzenia. Ludzie Gomeza za dobrze się okopali. AI_Output (self, hero,"Info_Gorn_TAKEBACK_09_03"); //Spróbujemy zaatakować po cichu, zabijając jednego strażnika po drugim. Może się uda... AI_Output (self, hero,"Info_Gorn_TAKEBACK_09_04"); //Lee kazał mi przekazać ci wiadomość. var int guild; guild = Npc_GetTrueGuild(hero); if (guild == GIL_SLD) { AI_Output (self, hero,"Info_Gorn_TAKEBACK_09_05"); //Jako jeden z naszych najlepszych Najemników zostałeś wyznaczony do udziału w tej misji. } else if (guild == GIL_KDW) { AI_Output (self, hero,"Info_Gorn_TAKEBACK_09_06"); //Jako Mag z Kręgu Wody i doświadczony wojownik, zostałeś wybrany do udziału w tej misji. } else if (guild == GIL_ORG) { AI_Output (self, hero,"Info_Gorn_TAKEBACK_09_07"); //Jako jeden z naszych najlepszych Szkodników zostałeś wybrany do udziału w tej misji. } else { AI_Output (self, hero,"Info_Gorn_TAKEBACK_09_08"); //Choć nie jesteś jednym z nas, wielokrotnie oddałeś nam nieocenione przysługi. AI_Output (self, hero,"Info_Gorn_TAKEBACK_09_09"); //Dlatego chcemy cię prosić o udział w tej misji. }; AI_Output (self, hero,"Info_Gorn_TAKEBACK_09_10"); //Pójdę z tobą. Razem może się nam udać. }; //--------------------------------------------------------------------- // Info SECOND //--------------------------------------------------------------------- INSTANCE Info_Gorn_SECOND (C_INFO) { npc = PC_Fighter; condition = Info_Gorn_SECOND_Condition; information = Info_Gorn_SECOND_Info; important = 0; permanent = 0; description = "Na początek? A co zamierzacie robić później?"; }; FUNC INT Info_Gorn_SECOND_Condition() { if (Npc_KnowsInfo(hero, Info_Gorn_POST)) { return TRUE; }; }; func VOID Info_Gorn_SECOND_Info() { AI_Output (hero, self,"Info_Gorn_SECOND_15_01"); //Na początek? A co zamierzacie robić później? AI_Output (self, hero,"Info_Gorn_SECOND_09_02"); //Jak tylko odbijemy kopalnię, spróbujemy odnaleźć ścieżkę, którą przyszli ludzie Gomeza! AI_Output (self, hero,"Info_Gorn_SECOND_09_03"); //Kiedy ustawimy przy niej straż, będziemy bezpieczni. AI_Output (hero, self,"Info_Gorn_SECOND_15_04"); //Rozumiem. }; //--------------------------------------------------------------------- // Info WHYME //--------------------------------------------------------------------- INSTANCE Info_Gorn_WHYME (C_INFO) { npc = PC_Fighter; condition = Info_Gorn_WHYME_Condition; information = Info_Gorn_WHYME_Info; important = 0; permanent = 0; description = "Dlaczego właśnie ja?!"; }; FUNC INT Info_Gorn_WHYME_Condition() { if (Npc_KnowsInfo(hero, Info_Gorn_TAKEBACK)) { return TRUE; }; }; func VOID Info_Gorn_WHYME_Info() { AI_Output (hero, self,"Info_Gorn_WHYME_15_01"); //Dlaczego właśnie ja?! AI_Output (self, hero,"Info_Gorn_WHYME_09_02"); //Wielokrotnie udowodniłeś, że jesteś silnym i przebiegłym wojownikiem! AI_Output (self, hero,"Info_Gorn_WHYME_09_03"); //Poza tym znasz Stary Obóz i jego strażników lepiej niż ktokolwiek z nas. AI_Output (self, hero,"Info_Gorn_WHYME_09_04"); //Trudno o kogoś lepszego niż ty! }; //--------------------------------------------------------------------- // Info KICKBUTT //--------------------------------------------------------------------- INSTANCE Info_Gorn_KICKBUTT (C_INFO) { npc = PC_Fighter; condition = Info_Gorn_KICKBUTT_Condition; information = Info_Gorn_KICKBUTT_Info; important = 0; permanent = 0; description = "No dobrze, chodźmy. Nauczymy tych nieproszonych gości dobrych manier."; }; FUNC INT Info_Gorn_KICKBUTT_Condition() { if Npc_KnowsInfo(hero, Info_Gorn_WHYME) && !Npc_KnowsInfo(hero, Info_Gorn_MYWAY) { return TRUE; }; }; func VOID Info_Gorn_KICKBUTT_Info() { AI_Output (hero, self,"Info_Gorn_KICKBUTT_15_01"); //No dobrze, chodźmy. Nauczymy tych nieproszonych gości dobrych manier. AI_Output (self, hero,"Info_Gorn_KICKBUTT_09_02"); //Wiedziałem, że można na ciebie liczyć. AI_Output (self, hero,"Info_Gorn_KICKBUTT_09_03"); //Weź ten klucz. Otwiera stróżówkę przy wejściu do kopalni. B_Story_GornJoins (); }; //--------------------------------------------------------------------- // Info MYWAY //--------------------------------------------------------------------- INSTANCE Info_Gorn_MYWAY (C_INFO) { npc = PC_Fighter; condition = Info_Gorn_MYWAY_Condition; information = Info_Gorn_MYWAY_Info; important = 0; permanent = 0; description = "Czemu nie. I tak muszę dostać się do kopalni!"; }; FUNC INT Info_Gorn_MYWAY_Condition() { if Npc_KnowsInfo(hero, Info_Gorn_WHYME) && !Npc_KnowsInfo(hero, Info_Gorn_KICKBUTT) { return TRUE; }; }; func VOID Info_Gorn_MYWAY_Info() { AI_Output (hero, self,"Info_Gorn_MYWAY_15_01"); //Czemu nie. I tak muszę dostać się do kopalni! AI_Output (self, hero,"Info_Gorn_MYWAY_09_02"); //Nieważne DLACZEGO to robisz. Cieszę się, że jesteś z nami! AI_Output (self, hero,"Info_Gorn_MYWAY_09_03"); //Weź ten klucz. Otwiera stróżówkę przy wejściu do kopalni. B_Story_GornJoins (); }; //--------------------------------------------------------------------- // Info WOLF //--------------------------------------------------------------------- INSTANCE Info_Gorn_WOLF (C_INFO) { npc = PC_Fighter; condition = Info_Gorn_WOLF_Condition; information = Info_Gorn_WOLF_Info; important = 1; permanent = 0; }; FUNC INT Info_Gorn_WOLF_Condition() { if Gorn_JoinedForFM && (Npc_GetDistToWP(hero, "OW_PATH_076")<500) { return TRUE; }; }; func VOID Info_Gorn_WOLF_Info() { AI_GotoNpc (self, hero); AI_Output (self, hero,"Info_Gorn_WOLF_09_01"); //Ach, prawie zapomniałem! AI_Output (self, hero,"Info_Gorn_WOLF_09_02"); //Wilk chce z tobą koniecznie porozmawiać, zanim ruszymy do kopalni. Info_ClearChoices (Info_Gorn_WOLF); Info_AddChoice (Info_Gorn_WOLF, "To może zaczekać, mamy teraz ważniejsze sprawy na głowie.", Info_Gorn_WOLF_FM); Info_AddChoice (Info_Gorn_WOLF, "Więc lepiej do niego zajrzę.", Info_Gorn_WOLF_WOLF); B_LogEntry (CH4_UluMulu, "Wilk chce ze mną porozmawiać zanim ruszę do kopalni. Powinienem chyba do niego zajrzeć."); Gorn_GotoWolf = TRUE; }; func void Info_Gorn_WOLF_FM () { AI_Output (hero, self,"Info_Gorn_WOLF_15_04"); //To może zaczekać, mamy teraz ważniejsze sprawy na głowie. AI_Output (self, hero,"Info_Gorn_WOLF_09_05"); //Jak chcesz! AI_StopProcessInfos (self); }; func void Info_Gorn_WOLF_WOLF () { AI_Output (hero, self,"Info_Gorn_WOLF_15_06"); //Więc lepiej do niego zajrzę. AI_Output (self, hero,"Info_Gorn_WOLF_09_07"); //W porządku. Zaczekam na ciebie tutaj. Gorn_JoinedForFM = FALSE; self.aivar[AIV_PARTYMEMBER] = FALSE; Npc_ExchangeRoutine (self, "GuardNC"); AI_StopProcessInfos (self); }; //--------------------------------------------------------------------- // Info LEAVEFORPOST //--------------------------------------------------------------------- INSTANCE Info_Gorn_LEAVEFORPOST (C_INFO) { npc = PC_Fighter; condition = Info_Gorn_LEAVEFORPOST_Condition; information = Info_Gorn_LEAVEFORPOST_Info; important = 1; permanent = 1; }; FUNC INT Info_Gorn_LEAVEFORPOST_Condition() { if Gorn_JoinedForFM && (Npc_GetDistToWP(hero, "OW_PATH_074")<2000) && (FreemineOrc_LookingUlumulu != LOG_RUNNING) { return TRUE; }; }; func VOID Info_Gorn_LEAVEFORPOST_Info() { AI_GotoNpc (self, hero); if (Npc_KnowsInfo(hero,Info_Gorn_WOLF)) { AI_Output (self, hero,"Info_Gorn_LEAVEFORPOST_09_01"); //Widzę, że jednak nie chcesz porozmawiać z Wilkiem! } else { AI_Output (self, hero,"Info_Gorn_LEAVEFORPOST_09_02"); //Idziesz w złą stronę! Mamy iść prosto do kopalni! }; AI_Output (self, hero,"Info_Gorn_LEAVEFORPOST_09_03"); //Zaczekam na ciebie przy prowizorycznym punkcie strażniczym! Gorn_JoinedForFM = FALSE; self.aivar[AIV_PARTYMEMBER] = FALSE; Npc_ExchangeRoutine (self, "GuardNC"); AI_StopProcessInfos (self); }; //--------------------------------------------------------------------- // Info REJOINFORFM //--------------------------------------------------------------------- INSTANCE Info_Gorn_REJOINFORFM (C_INFO) { npc = PC_Fighter; condition = Info_Gorn_REJOINFORFM_Condition; information = Info_Gorn_REJOINFORFM_Info; important = 0; permanent = 1; description = "Ruszamy do kopalni!"; }; FUNC INT Info_Gorn_REJOINFORFM_Condition() { if (Npc_KnowsInfo (hero, Info_Gorn_MYWAY) || Npc_KnowsInfo(hero, Info_Gorn_KICKBUTT)) && (Npc_GetDistToWP(hero, "OW_PATH_075_GUARD4")<1000) && (!Gorn_JoinedForFM) { return TRUE; }; }; func VOID Info_Gorn_REJOINFORFM_Info() { AI_Output (hero, self,"Info_Gorn_REJOINFORFM_15_01"); //Ruszamy do kopalni! AI_Output (self, hero,"Info_Gorn_REJOINFORFM_09_02"); //Pora przepędzić stamtąd ludzi Gomeza! AI_Output (self, hero,"Info_Gorn_REJOINFORFM_09_03"); //Idź przodem. Pójdę za tobą. Gorn_JoinedForFM = TRUE; self.aivar[AIV_PARTYMEMBER] = TRUE; Npc_ExchangeRoutine (self, "FollowToFMC"); AI_StopProcessInfos (self); }; //--------------------------------------------------------------------- // Info RAZOR //--------------------------------------------------------------------- INSTANCE Info_Gorn_RAZOR (C_INFO) { npc = PC_Fighter; condition = Info_Gorn_RAZOR_Condition; information = Info_Gorn_RAZOR_Info; important = 1; permanent = 0; }; FUNC INT Info_Gorn_RAZOR_Condition() { if Gorn_JoinedForFM && (Npc_GetDistToWP(hero, "OW_PATH_3000")<1000) { return TRUE; }; }; func VOID Info_Gorn_RAZOR_Info() { AI_GotoNpc (self, hero); AI_Output (self, hero,"Info_Gorn_RAZOR_09_01"); //UWAGA! BRZYTWY! AI_Output (self, hero,"Info_Gorn_RAZOR_09_02"); //Polują w stadach, jak zębacze, tylko gryzą znacznie mocniej! AI_Output (self, hero,"Info_Gorn_RAZOR_09_03"); //Powinniśmy się najpierw z nimi rozprawić. Znasz mnie - lubię wiedzieć, co mam za plecami. AI_StopProcessInfos (self); }; //--------------------------------------------------------------------- // Info FMCENTRANCE //--------------------------------------------------------------------- INSTANCE Info_Gorn_FMCENTRANCE (C_INFO) { npc = PC_Fighter; condition = Info_Gorn_FMCENTRANCE_Condition; information = Info_Gorn_FMCENTRANCE_Info; important = 1; permanent = 0; }; FUNC INT Info_Gorn_FMCENTRANCE_Condition() { if Gorn_JoinedForFM && (Npc_GetDistToWP(hero, "FMC_ENTRANCE")<1000) { return TRUE; }; }; func VOID Info_Gorn_FMCENTRANCE_Info() { AI_GotoNpc (self, hero); AI_Output (self, hero,"Info_Gorn_FMCENTRANCE_09_01"); //Zaczekaj! Widzisz te wszystkie ciała? AI_Output (self, hero,"Info_Gorn_FMCENTRANCE_09_02"); //Idź do wejścia do kopalni. Ja zaczekam tutaj i przypilnuję, żeby ktoś lub coś nie zaszło nas od tyłu. AI_Output (self, hero,"Info_Gorn_FMCENTRANCE_09_03"); //Kiedy już zejdziesz na dół, pójdę za tobą. Npc_ExchangeRoutine (self, "WaitFMC"); AI_StopProcessInfos (self); }; //--------------------------------------------------------------------- // Info FMGATE //--------------------------------------------------------------------- INSTANCE Info_Gorn_FMGATE (C_INFO) { npc = PC_Fighter; condition = Info_Gorn_FMGATE_Condition; information = Info_Gorn_FMGATE_Info; important = 1; permanent = 0; }; FUNC INT Info_Gorn_FMGATE_Condition() { if Gorn_JoinedForFM && !FM_GateOpen && (Npc_GetDistToWP(hero, "FMC_FM_ENTRANCE")<1000) { return TRUE; }; }; func VOID Info_Gorn_FMGATE_Info() { AI_GotoNpc (self, hero); AI_Output (self, hero,"Info_Gorn_FMGATE_09_01"); //Usłyszałem odgłosy walki i przybiegłem najszybciej jak mogłem! AI_Output (hero, self,"Info_Gorn_FMGATE_15_02"); //Stary znajomy... Rachunek wyrównany. AI_Output (self, hero,"Info_Gorn_FMGATE_09_03"); //Dobra, otwieraj bramę. Je będę tu stał na straży! Npc_ExchangeRoutine (self, "WaitFM"); AI_StopProcessInfos (self); }; //--------------------------------------------------------------------- // Info AFTERFM //--------------------------------------------------------------------- INSTANCE Info_Gorn_AFTERFM (C_INFO) { npc = PC_Fighter; condition = Info_Gorn_AFTERFM_Condition; information = Info_Gorn_AFTERFM_Info; important = 1; permanent = 0; }; FUNC INT Info_Gorn_AFTERFM_Condition() { if FreemineOrc_LookingUlumulu { return TRUE; }; }; func VOID Info_Gorn_AFTERFM_Info() { AI_GotoNpc (self, hero); AI_Output (self, hero,"Info_Gorn_AFTERFM_09_01"); //Stary, to się dopiero nazywa trudna walka! AI_Output (self, hero,"Info_Gorn_AFTERFM_09_02"); //Nie spodziewałem się, że Strażnicy Gomeza będą stawiali tak zaciekły opór. AI_Output (hero, self,"Info_Gorn_AFTERFM_15_03"); //Grunt, że kopalnia znowu jest w naszych rękach. AI_Output (self, hero,"Info_Gorn_AFTERFM_09_04"); //Zostanę tutaj i dopilnuję, żeby tak już zostało! B_Story_LeftFM (); Lee_freeminereport = 1; //jetzt kann der SC Lee über die befreite Mine informieren. ***Björn*** AI_StopProcessInfos (self); }; //--------------------------------------------------------------------- // Info FMWATCH //--------------------------------------------------------------------- INSTANCE Info_Gorn_FMWATCH (C_INFO) { npc = PC_Fighter; condition = Info_Gorn_FMWATCH_Condition; information = Info_Gorn_FMWATCH_Info; important = 0; permanent = 1; description = "Co słychać?"; }; FUNC INT Info_Gorn_FMWATCH_Condition() { if Npc_KnowsInfo(hero, Info_Gorn_AFTERFM) { return TRUE; }; }; func VOID Info_Gorn_FMWATCH_Info() { AI_Output (hero,self,"Info_Gorn_FMWATCH_15_01"); //Co słychać? AI_Output (self,hero,"Info_Gorn_FMWATCH_09_02"); //Na razie cicho. W Wolnej Kopalni nic się nie rusza. AI_Output (self,hero,"Info_Gorn_FMWATCH_09_03"); //Lee powinien niedługo podesłać tu posiłki. AI_Output (self,hero,"Info_Gorn_FMWATCH_09_04"); //Póki co postaram się tutaj rozgościć. }; //--------------------------------------------------------------------- // Info FOUNDULUMULU //--------------------------------------------------------------------- INSTANCE Info_Gorn_FOUNDULUMULU (C_INFO) { npc = PC_Fighter; condition = Info_Gorn_FOUNDULUMULU_Condition; information = Info_Gorn_FOUNDULUMULU_Info; important = 1; permanent = 0; }; FUNC INT Info_Gorn_FOUNDULUMULU_Condition() { if (FreemineOrc_LookingUlumulu == LOG_SUCCESS) { return TRUE; }; }; func VOID Info_Gorn_FOUNDULUMULU_Info() { AI_GotoNpc (self, hero); AI_Output (self, hero,"Info_Gorn_FOUNDULUMULU_09_01"); //Masz przy sobie ciekawą ozdóbkę. Orkowa, prawda? AI_Output (self, hero,"Info_Gorn_FOUNDULUMULU_09_02"); //To od tego niewolnika z kopalni? AI_Output (hero, self,"Info_Gorn_FOUNDULUMULU_15_03"); //To orkowy symbol przyjaźni. Przy jego pomocy zamierzam dostać się do miasta Orków. AI_Output (self, hero,"Info_Gorn_FOUNDULUMULU_09_04"); //Oby tylko Orkowie uszanowali to... COŚ! B_Kapitelwechsel (5); AI_StopProcessInfos (self); };
D
/Users/ozgun/Desktop/IOSCase/build/Pods.build/Debug-iphonesimulator/RxSwift.build/Objects-normal/x86_64/PriorityQueue.o : /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/Amb.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/SingleAsync.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/DistinctUntilChanged.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/Deferred.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Deprecated.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/Enumerated.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Traits/Maybe.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/AsMaybe.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/Sequence.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/Platform/DataStructures/InfiniteSequence.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Traits/ObservableType+PrimitiveSequence.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Traits/PrimitiveSequence.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/Debounce.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/Reduce.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/Range.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/Merge.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/Take.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Cancelable.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Disposable.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Disposables/ScheduledDisposable.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Disposables/CompositeDisposable.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Disposables/SerialDisposable.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Disposables/BooleanDisposable.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Disposables/SubscriptionDisposable.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Disposables/NopDisposable.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Disposables/AnonymousDisposable.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Disposables/SingleAssignmentDisposable.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Disposables/RefCountDisposable.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Disposables/BinaryDisposable.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Traits/Completable.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observable.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/GroupedObservable.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Traits/Single.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/AsSingle.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/TakeWhile.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/SkipWhile.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/Sample.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/Throttle.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/ShareReplayScope.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Concurrency/SynchronizedUnsubscribeType.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Schedulers/Internal/InvocableType.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/ObservableType.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/ConnectableObservableType.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/ObservableConvertibleType.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Concurrency/SynchronizedDisposeType.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Schedulers/Internal/ScheduledItemType.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Concurrency/SynchronizedOnType.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/SchedulerType.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/ImmediateSchedulerType.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Concurrency/LockOwnerType.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Schedulers/VirtualTimeConverterType.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/ObserverType.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Subjects/SubjectType.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Disposables/DisposeBase.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observers/ObserverBase.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/Create.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/Generate.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/Platform/DataStructures/Queue.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/Platform/DataStructures/PriorityQueue.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Reactive.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/Materialize.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/Dematerialize.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/AddRef.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/Platform/DataStructures/Bag.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Disposables/DisposeBag.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/Using.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/Debug.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/Catch.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Date+Dispatch.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/Switch.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/StartWith.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Concurrency/Lock.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Concurrency/AsyncLock.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/Platform/RecursiveLock.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/Sink.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observers/TailRecursiveSink.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/Optional.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/TakeUntil.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/SkipUntil.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Schedulers/Internal/ScheduledItem.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Schedulers/Internal/InvocableScheduledItem.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/WithLatestFrom.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/SubscribeOn.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/ObserveOn.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/Scan.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Traits/Completable+AndThen.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/RetryWhen.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/Platform/Platform.Darwin.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Schedulers/SchedulerServices+Emulation.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Schedulers/Internal/DispatchQueueConfiguration.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/Zip+Collection.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/CombineLatest+Collection.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/DelaySubscription.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/Do.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/Map.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/CompactMap.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/Zip.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/Skip.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/Producer.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/Buffer.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Schedulers/CurrentThreadScheduler.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Schedulers/VirtualTimeScheduler.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Schedulers/SerialDispatchQueueScheduler.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Schedulers/ConcurrentDispatchQueueScheduler.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Schedulers/OperationQueueScheduler.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Schedulers/RecursiveScheduler.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Schedulers/HistoricalScheduler.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Schedulers/MainScheduler.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Schedulers/ConcurrentMainScheduler.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/Timer.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/Filter.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Schedulers/HistoricalSchedulerTimeConverter.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/Never.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observers/AnonymousObserver.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/AnyObserver.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/Error.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Disposables/Disposables.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/ObservableType+Extensions.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/Platform/DispatchQueue+Extensions.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Errors.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/ElementAt.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/Concat.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/Repeat.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Subjects/AsyncSubject.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Subjects/PublishSubject.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Subjects/BehaviorSubject.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Subjects/ReplaySubject.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/Platform/AtomicInt.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Event.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/SwiftSupport/SwiftSupport.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/TakeLast.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/Multicast.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/CombineLatest.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/First.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/Just.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/Timeout.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/Window.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Extensions/Bag+Rx.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Rx.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/RxMutableBox.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/Platform/Platform.Linux.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/GroupBy.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/Delay.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/ToArray.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Traits/PrimitiveSequence+Zip+arity.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/Zip+arity.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/CombineLatest+arity.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/Empty.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/SwitchIfEmpty.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/DefaultIfEmpty.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/ObjectiveC.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/CoreImage.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/QuartzCore.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Dispatch.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Metal.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Darwin.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Foundation.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/CoreFoundation.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/CoreGraphics.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Swift.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/UIKit.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/SwiftOnoneSupport.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Combine.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Users/ozgun/Desktop/IOSCase/Pods/Target\ Support\ Files/RxSwift/RxSwift-umbrella.h /Users/ozgun/Desktop/IOSCase/build/Pods.build/Debug-iphonesimulator/RxSwift.build/unextended-module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.6.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.6.sdk/System/Library/Frameworks/OpenGLES.framework/Headers/OpenGLES.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.6.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImage.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.6.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/QuartzCore.apinotes /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/apinotes/Dispatch.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.6.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.6.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.6.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.6.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.6.sdk/System/Library/Frameworks/UserNotifications.framework/Headers/UserNotifications.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.6.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.6.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.6.sdk/System/Library/Frameworks/Security.framework/Headers/Security.apinotes /Users/ozgun/Desktop/IOSCase/build/Pods.build/Debug-iphonesimulator/RxSwift.build/Objects-normal/x86_64/PriorityQueue~partial.swiftmodule : /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/Amb.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/SingleAsync.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/DistinctUntilChanged.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/Deferred.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Deprecated.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/Enumerated.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Traits/Maybe.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/AsMaybe.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/Sequence.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/Platform/DataStructures/InfiniteSequence.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Traits/ObservableType+PrimitiveSequence.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Traits/PrimitiveSequence.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/Debounce.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/Reduce.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/Range.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/Merge.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/Take.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Cancelable.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Disposable.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Disposables/ScheduledDisposable.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Disposables/CompositeDisposable.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Disposables/SerialDisposable.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Disposables/BooleanDisposable.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Disposables/SubscriptionDisposable.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Disposables/NopDisposable.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Disposables/AnonymousDisposable.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Disposables/SingleAssignmentDisposable.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Disposables/RefCountDisposable.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Disposables/BinaryDisposable.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Traits/Completable.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observable.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/GroupedObservable.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Traits/Single.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/AsSingle.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/TakeWhile.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/SkipWhile.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/Sample.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/Throttle.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/ShareReplayScope.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Concurrency/SynchronizedUnsubscribeType.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Schedulers/Internal/InvocableType.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/ObservableType.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/ConnectableObservableType.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/ObservableConvertibleType.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Concurrency/SynchronizedDisposeType.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Schedulers/Internal/ScheduledItemType.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Concurrency/SynchronizedOnType.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/SchedulerType.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/ImmediateSchedulerType.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Concurrency/LockOwnerType.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Schedulers/VirtualTimeConverterType.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/ObserverType.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Subjects/SubjectType.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Disposables/DisposeBase.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observers/ObserverBase.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/Create.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/Generate.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/Platform/DataStructures/Queue.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/Platform/DataStructures/PriorityQueue.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Reactive.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/Materialize.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/Dematerialize.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/AddRef.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/Platform/DataStructures/Bag.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Disposables/DisposeBag.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/Using.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/Debug.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/Catch.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Date+Dispatch.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/Switch.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/StartWith.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Concurrency/Lock.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Concurrency/AsyncLock.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/Platform/RecursiveLock.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/Sink.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observers/TailRecursiveSink.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/Optional.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/TakeUntil.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/SkipUntil.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Schedulers/Internal/ScheduledItem.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Schedulers/Internal/InvocableScheduledItem.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/WithLatestFrom.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/SubscribeOn.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/ObserveOn.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/Scan.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Traits/Completable+AndThen.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/RetryWhen.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/Platform/Platform.Darwin.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Schedulers/SchedulerServices+Emulation.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Schedulers/Internal/DispatchQueueConfiguration.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/Zip+Collection.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/CombineLatest+Collection.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/DelaySubscription.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/Do.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/Map.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/CompactMap.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/Zip.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/Skip.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/Producer.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/Buffer.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Schedulers/CurrentThreadScheduler.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Schedulers/VirtualTimeScheduler.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Schedulers/SerialDispatchQueueScheduler.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Schedulers/ConcurrentDispatchQueueScheduler.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Schedulers/OperationQueueScheduler.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Schedulers/RecursiveScheduler.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Schedulers/HistoricalScheduler.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Schedulers/MainScheduler.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Schedulers/ConcurrentMainScheduler.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/Timer.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/Filter.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Schedulers/HistoricalSchedulerTimeConverter.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/Never.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observers/AnonymousObserver.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/AnyObserver.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/Error.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Disposables/Disposables.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/ObservableType+Extensions.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/Platform/DispatchQueue+Extensions.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Errors.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/ElementAt.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/Concat.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/Repeat.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Subjects/AsyncSubject.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Subjects/PublishSubject.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Subjects/BehaviorSubject.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Subjects/ReplaySubject.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/Platform/AtomicInt.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Event.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/SwiftSupport/SwiftSupport.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/TakeLast.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/Multicast.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/CombineLatest.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/First.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/Just.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/Timeout.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/Window.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Extensions/Bag+Rx.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Rx.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/RxMutableBox.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/Platform/Platform.Linux.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/GroupBy.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/Delay.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/ToArray.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Traits/PrimitiveSequence+Zip+arity.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/Zip+arity.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/CombineLatest+arity.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/Empty.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/SwitchIfEmpty.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/DefaultIfEmpty.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/ObjectiveC.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/CoreImage.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/QuartzCore.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Dispatch.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Metal.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Darwin.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Foundation.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/CoreFoundation.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/CoreGraphics.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Swift.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/UIKit.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/SwiftOnoneSupport.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Combine.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Users/ozgun/Desktop/IOSCase/Pods/Target\ Support\ Files/RxSwift/RxSwift-umbrella.h /Users/ozgun/Desktop/IOSCase/build/Pods.build/Debug-iphonesimulator/RxSwift.build/unextended-module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.6.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.6.sdk/System/Library/Frameworks/OpenGLES.framework/Headers/OpenGLES.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.6.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImage.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.6.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/QuartzCore.apinotes /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/apinotes/Dispatch.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.6.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.6.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.6.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.6.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.6.sdk/System/Library/Frameworks/UserNotifications.framework/Headers/UserNotifications.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.6.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.6.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.6.sdk/System/Library/Frameworks/Security.framework/Headers/Security.apinotes /Users/ozgun/Desktop/IOSCase/build/Pods.build/Debug-iphonesimulator/RxSwift.build/Objects-normal/x86_64/PriorityQueue~partial.swiftdoc : /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/Amb.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/SingleAsync.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/DistinctUntilChanged.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/Deferred.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Deprecated.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/Enumerated.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Traits/Maybe.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/AsMaybe.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/Sequence.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/Platform/DataStructures/InfiniteSequence.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Traits/ObservableType+PrimitiveSequence.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Traits/PrimitiveSequence.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/Debounce.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/Reduce.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/Range.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/Merge.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/Take.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Cancelable.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Disposable.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Disposables/ScheduledDisposable.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Disposables/CompositeDisposable.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Disposables/SerialDisposable.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Disposables/BooleanDisposable.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Disposables/SubscriptionDisposable.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Disposables/NopDisposable.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Disposables/AnonymousDisposable.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Disposables/SingleAssignmentDisposable.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Disposables/RefCountDisposable.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Disposables/BinaryDisposable.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Traits/Completable.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observable.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/GroupedObservable.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Traits/Single.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/AsSingle.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/TakeWhile.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/SkipWhile.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/Sample.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/Throttle.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/ShareReplayScope.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Concurrency/SynchronizedUnsubscribeType.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Schedulers/Internal/InvocableType.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/ObservableType.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/ConnectableObservableType.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/ObservableConvertibleType.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Concurrency/SynchronizedDisposeType.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Schedulers/Internal/ScheduledItemType.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Concurrency/SynchronizedOnType.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/SchedulerType.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/ImmediateSchedulerType.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Concurrency/LockOwnerType.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Schedulers/VirtualTimeConverterType.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/ObserverType.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Subjects/SubjectType.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Disposables/DisposeBase.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observers/ObserverBase.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/Create.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/Generate.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/Platform/DataStructures/Queue.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/Platform/DataStructures/PriorityQueue.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Reactive.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/Materialize.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/Dematerialize.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/AddRef.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/Platform/DataStructures/Bag.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Disposables/DisposeBag.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/Using.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/Debug.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/Catch.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Date+Dispatch.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/Switch.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/StartWith.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Concurrency/Lock.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Concurrency/AsyncLock.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/Platform/RecursiveLock.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/Sink.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observers/TailRecursiveSink.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/Optional.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/TakeUntil.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/SkipUntil.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Schedulers/Internal/ScheduledItem.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Schedulers/Internal/InvocableScheduledItem.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/WithLatestFrom.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/SubscribeOn.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/ObserveOn.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/Scan.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Traits/Completable+AndThen.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/RetryWhen.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/Platform/Platform.Darwin.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Schedulers/SchedulerServices+Emulation.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Schedulers/Internal/DispatchQueueConfiguration.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/Zip+Collection.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/CombineLatest+Collection.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/DelaySubscription.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/Do.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/Map.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/CompactMap.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/Zip.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/Skip.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/Producer.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/Buffer.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Schedulers/CurrentThreadScheduler.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Schedulers/VirtualTimeScheduler.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Schedulers/SerialDispatchQueueScheduler.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Schedulers/ConcurrentDispatchQueueScheduler.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Schedulers/OperationQueueScheduler.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Schedulers/RecursiveScheduler.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Schedulers/HistoricalScheduler.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Schedulers/MainScheduler.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Schedulers/ConcurrentMainScheduler.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/Timer.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/Filter.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Schedulers/HistoricalSchedulerTimeConverter.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/Never.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observers/AnonymousObserver.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/AnyObserver.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/Error.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Disposables/Disposables.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/ObservableType+Extensions.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/Platform/DispatchQueue+Extensions.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Errors.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/ElementAt.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/Concat.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/Repeat.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Subjects/AsyncSubject.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Subjects/PublishSubject.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Subjects/BehaviorSubject.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Subjects/ReplaySubject.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/Platform/AtomicInt.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Event.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/SwiftSupport/SwiftSupport.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/TakeLast.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/Multicast.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/CombineLatest.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/First.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/Just.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/Timeout.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/Window.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Extensions/Bag+Rx.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Rx.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/RxMutableBox.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/Platform/Platform.Linux.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/GroupBy.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/Delay.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/ToArray.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Traits/PrimitiveSequence+Zip+arity.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/Zip+arity.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/CombineLatest+arity.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/Empty.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/SwitchIfEmpty.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/DefaultIfEmpty.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/ObjectiveC.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/CoreImage.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/QuartzCore.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Dispatch.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Metal.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Darwin.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Foundation.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/CoreFoundation.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/CoreGraphics.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Swift.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/UIKit.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/SwiftOnoneSupport.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Combine.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Users/ozgun/Desktop/IOSCase/Pods/Target\ Support\ Files/RxSwift/RxSwift-umbrella.h /Users/ozgun/Desktop/IOSCase/build/Pods.build/Debug-iphonesimulator/RxSwift.build/unextended-module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.6.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.6.sdk/System/Library/Frameworks/OpenGLES.framework/Headers/OpenGLES.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.6.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImage.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.6.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/QuartzCore.apinotes /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/apinotes/Dispatch.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.6.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.6.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.6.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.6.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.6.sdk/System/Library/Frameworks/UserNotifications.framework/Headers/UserNotifications.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.6.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.6.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.6.sdk/System/Library/Frameworks/Security.framework/Headers/Security.apinotes /Users/ozgun/Desktop/IOSCase/build/Pods.build/Debug-iphonesimulator/RxSwift.build/Objects-normal/x86_64/PriorityQueue~partial.swiftsourceinfo : /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/Amb.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/SingleAsync.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/DistinctUntilChanged.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/Deferred.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Deprecated.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/Enumerated.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Traits/Maybe.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/AsMaybe.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/Sequence.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/Platform/DataStructures/InfiniteSequence.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Traits/ObservableType+PrimitiveSequence.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Traits/PrimitiveSequence.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/Debounce.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/Reduce.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/Range.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/Merge.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/Take.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Cancelable.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Disposable.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Disposables/ScheduledDisposable.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Disposables/CompositeDisposable.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Disposables/SerialDisposable.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Disposables/BooleanDisposable.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Disposables/SubscriptionDisposable.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Disposables/NopDisposable.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Disposables/AnonymousDisposable.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Disposables/SingleAssignmentDisposable.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Disposables/RefCountDisposable.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Disposables/BinaryDisposable.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Traits/Completable.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observable.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/GroupedObservable.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Traits/Single.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/AsSingle.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/TakeWhile.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/SkipWhile.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/Sample.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/Throttle.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/ShareReplayScope.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Concurrency/SynchronizedUnsubscribeType.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Schedulers/Internal/InvocableType.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/ObservableType.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/ConnectableObservableType.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/ObservableConvertibleType.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Concurrency/SynchronizedDisposeType.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Schedulers/Internal/ScheduledItemType.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Concurrency/SynchronizedOnType.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/SchedulerType.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/ImmediateSchedulerType.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Concurrency/LockOwnerType.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Schedulers/VirtualTimeConverterType.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/ObserverType.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Subjects/SubjectType.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Disposables/DisposeBase.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observers/ObserverBase.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/Create.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/Generate.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/Platform/DataStructures/Queue.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/Platform/DataStructures/PriorityQueue.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Reactive.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/Materialize.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/Dematerialize.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/AddRef.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/Platform/DataStructures/Bag.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Disposables/DisposeBag.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/Using.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/Debug.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/Catch.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Date+Dispatch.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/Switch.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/StartWith.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Concurrency/Lock.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Concurrency/AsyncLock.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/Platform/RecursiveLock.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/Sink.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observers/TailRecursiveSink.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/Optional.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/TakeUntil.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/SkipUntil.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Schedulers/Internal/ScheduledItem.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Schedulers/Internal/InvocableScheduledItem.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/WithLatestFrom.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/SubscribeOn.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/ObserveOn.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/Scan.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Traits/Completable+AndThen.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/RetryWhen.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/Platform/Platform.Darwin.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Schedulers/SchedulerServices+Emulation.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Schedulers/Internal/DispatchQueueConfiguration.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/Zip+Collection.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/CombineLatest+Collection.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/DelaySubscription.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/Do.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/Map.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/CompactMap.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/Zip.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/Skip.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/Producer.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/Buffer.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Schedulers/CurrentThreadScheduler.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Schedulers/VirtualTimeScheduler.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Schedulers/SerialDispatchQueueScheduler.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Schedulers/ConcurrentDispatchQueueScheduler.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Schedulers/OperationQueueScheduler.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Schedulers/RecursiveScheduler.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Schedulers/HistoricalScheduler.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Schedulers/MainScheduler.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Schedulers/ConcurrentMainScheduler.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/Timer.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/Filter.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Schedulers/HistoricalSchedulerTimeConverter.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/Never.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observers/AnonymousObserver.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/AnyObserver.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/Error.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Disposables/Disposables.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/ObservableType+Extensions.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/Platform/DispatchQueue+Extensions.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Errors.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/ElementAt.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/Concat.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/Repeat.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Subjects/AsyncSubject.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Subjects/PublishSubject.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Subjects/BehaviorSubject.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Subjects/ReplaySubject.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/Platform/AtomicInt.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Event.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/SwiftSupport/SwiftSupport.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/TakeLast.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/Multicast.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/CombineLatest.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/First.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/Just.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/Timeout.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/Window.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Extensions/Bag+Rx.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Rx.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/RxMutableBox.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/Platform/Platform.Linux.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/GroupBy.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/Delay.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/ToArray.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Traits/PrimitiveSequence+Zip+arity.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/Zip+arity.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/CombineLatest+arity.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/Empty.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/SwitchIfEmpty.swift /Users/ozgun/Desktop/IOSCase/Pods/RxSwift/RxSwift/Observables/DefaultIfEmpty.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/ObjectiveC.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/CoreImage.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/QuartzCore.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Dispatch.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Metal.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Darwin.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Foundation.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/CoreFoundation.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/CoreGraphics.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Swift.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/UIKit.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/SwiftOnoneSupport.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Combine.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Users/ozgun/Desktop/IOSCase/Pods/Target\ Support\ Files/RxSwift/RxSwift-umbrella.h /Users/ozgun/Desktop/IOSCase/build/Pods.build/Debug-iphonesimulator/RxSwift.build/unextended-module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.6.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.6.sdk/System/Library/Frameworks/OpenGLES.framework/Headers/OpenGLES.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.6.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImage.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.6.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/QuartzCore.apinotes /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/apinotes/Dispatch.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.6.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.6.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.6.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.6.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.6.sdk/System/Library/Frameworks/UserNotifications.framework/Headers/UserNotifications.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.6.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.6.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.6.sdk/System/Library/Frameworks/Security.framework/Headers/Security.apinotes
D
func void FF_ApplyOnceS(var func function) { if(!FF_Active(function)) { FF_Apply(function); }; }; func void PerFrameFunctions() { PrintDebug_S("TRIGGER7>>DayShift"); DayShift(Wld_GetDay()); }; func void PerFrame_Init() { PrintDebug_S("PerFrame>> Sprint_Init"); FF_ApplyOnceS(Sprint_Init); PrintDebug_S("PerFrame>>Hide Bars "); FF_ApplyOnceS(Bar_Hided); FF_ApplyOnceS(PerFrameFunctions); PrintDebug_S("PerFrame>> Render Bars"); FF_ApplyOnceS(Bars_PerFrameHandle); PrintDebug_S("PerFrame>> FadeScreen_Function"); FF_ApplyOnceS(FadeScreen_Function); PrintDebug_S("PerFrame>> Close Menu"); FF_ApplyOnceS(CloseNewMenu); FF_ApplyOnceS(CinemaScope); FF_ApplyOnceS(Menu_PerFrame); FF_ApplyOnceS(Quivers_PerFrame_Handle); /**************No PerFrame*************/ PrintDebug_S("Potions_Minus>>Debugs"); FF_ApplyOnceExt(Trigger_Potions,1000,-1); PrintDebug_S("Potions_Texture>>Debugs"); FF_ApplyOnceExt(ReTexturePotions,500,-1); PrintDebug_S("Regenerate_Sprint>>Debugs"); FF_ApplyOnceExt(Sprint_Regenerate,100,-1); PrintDebug_S("Regenerate>>Debugs"); FF_ApplyOnceExt(RegenerateFunction,2000,-1); PrintDebug_S("Regenerate_HP>>Debugs"); FF_ApplyOnceExt(RegenerateFunctionHP,2000,-1); FF_ApplyOnceExt(ChangeAttribute_Trigger,1250,-1); PrintDebug_S("Print_Infos_Trigger>>Debugs"); FF_ApplyOnceExt(Print_Infos_Trigger,520,-1); };
D
/Users/go7hic/workspace/Github/Rust-in-action/kt/target/release/build/libc-7dad24dccf1e5506/build_script_build-7dad24dccf1e5506: /Users/go7hic/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/libc-0.2.121/build.rs /Users/go7hic/workspace/Github/Rust-in-action/kt/target/release/build/libc-7dad24dccf1e5506/build_script_build-7dad24dccf1e5506.d: /Users/go7hic/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/libc-0.2.121/build.rs /Users/go7hic/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/libc-0.2.121/build.rs:
D
// https://issues.dlang.org/show_bug.cgi?id=19441 struct S1 { int a; long b; alias a this; } struct S2 { S1 v; alias v this; } void main() { auto x = S2(S1(1, 12345678)); assert(x.a == 1 && x.b == 12345678); // prints: 1 12345678 S1 y; y = x; assert(y.a == 1 && y.b == 12345678); y = x.v; assert(y.a == 1 && y.b == 12345678); }
D
module hunt.markdown.ext.front.matter.YamlFrontMatterExtension; import hunt.markdown.Extension; // import hunt.markdown.ext.front.matter.internal.YamlFrontMatterBlockParser; import hunt.markdown.parser.Parser; import hunt.markdown.renderer.html.HtmlRenderer; /** * Extension for YAML-like metadata. * <p> * Create it with {@link #create()} and then configure it on the builders * ({@link hunt.markdown.parser.Parser.Builder#extensions(Iterable)}, * {@link HtmlRenderer.Builder#extensions(Iterable)}). * </p> * <p> * The parsed metadata is turned into {@link YamlFrontMatterNode}. You can access the metadata using {@link YamlFrontMatterVisitor}. * </p> */ class YamlFrontMatterExtension : Parser.ParserExtension { private this() { } override public void extend(Parser.Builder parserBuilder) { parserBuilder.customBlockParserFactory(new YamlFrontMatterBlockParser.Factory()); } public static Extension create() { return new YamlFrontMatterExtension(); } }
D
// **************** // ZS_Follow_Player // **************** func void engeltalk () { if (self.guild == GIL_OUT) { Wld_PlayEffect ("MFX_engel_HEAVENLIGHT2", self, self, 0, 0, 0, FALSE); B_RemoveNpc(self); } else { B_RemoveNpc(self); }; }; FUNC void B_Engelfollow () { if (Npc_GetDistToNpc(self, hero) < self.aivar[AIV_FollowDist]) && (self.aivar[AIV_TAPOSITION] == FALSE) { Npc_ClearAIQueue (self); AI_StandUp (self); self.aivar[AIV_TAPOSITION] = TRUE; } else { B_AssessPlayer (); }; }; // --------------------------------- func void B_AssessFollowFightSound_Engel() { if (Npc_IsPlayer(other)) || (Npc_IsPlayer(victim)) || (other.aivar[AIV_PARTYMEMBER] == TRUE) || (victim.aivar[AIV_PARTYMEMBER] == TRUE) { B_AssessFightSound (); }; }; // --------------------------------- // -------------------------- func void ZS_Engel () { self.senses = SENSE_SEE|SENSE_HEAR|SENSE_SMELL; self.senses_range = 2000; B_UseHat (self); Npc_SetPercTime (self, 0.3); Perception_Set_Minimal(); Npc_PercEnable (self, PERC_ASSESSPLAYER, B_Engelfollow); Npc_PercEnable (self, PERC_ASSESSENEMY, B_AssessEnemy); Npc_PercEnable (self, PERC_ASSESSTALK, engelTalk); Npc_PercEnable (self, PERC_MOVEMOB, B_MoveMob); //lokale Wahrnehmungen Npc_PercEnable (self, PERC_ASSESSFIGHTSOUND , B_AssessFollowFightSound_Engel); //Npc_PercEnable (self, PERC_MOVENPC, B_MoveFollowNpc); B_ResetAll (self); AI_StandUp (self); AI_SetWalkmode (self, NPC_RUN); self.aivar[AIV_PARTYMEMBER] = TRUE; // ------ init aivars ------ if (self.aivar[AIV_FollowDist] == 0) { self.aivar[AIV_FollowDist] = 500; if (self.guild == GIL_OUT) { self.attribute[ATR_HITPOINTS_MAX] = 500 + 50; if (self.attribute[ATR_HITPOINTS] >= self.attribute[ATR_HITPOINTS_MAX]-50) { self.attribute[ATR_HITPOINTS] = 500 + 50; Wld_PlayEffect ("MFX_engel_HEAVENLIGHT", self, self, 0, 0, 0, FALSE); }; } else { self.attribute[ATR_HITPOINTS_MAX] +=50; if (self.attribute[ATR_HITPOINTS]>=self.attribute[ATR_HITPOINTS_MAX]-50) { self.attribute[ATR_HITPOINTS]+=50; }; AI_ReadyMeleeWeapon(self); }; }; }; func int ZS_Engel_Loop () { if (Npc_GetDistToNpc (self, hero) > self.aivar[AIV_FollowDist]) { // ------ normale Behandlung ------ if (!C_BodyStateContains(self, BS_SWIM)) { AI_SetWalkmode (self, NPC_RUN); }; AI_GotoNpc (self, hero); self.aivar[AIV_TAPOSITION] = FALSE; } else { if (Npc_GetStateTime(self) > 1) { B_TurnToNpc (self, hero); if (self.guild == GIL_OUT) { if (hero.attribute[ATR_MANA] > 0) { hero.attribute[ATR_MANA] -= 2; } else { Wld_PlayEffect ("MFX_engel_HEAVENLIGHT2", self, self, 0, 0, 0, FALSE); B_RemoveNpc(self); }; } else { if (Npc_IsInFightMode (self, FMODE_NONE)) { AI_ReadyMeleeWeapon (self); }; }; Npc_SetStateTime (self, 0); }; }; return LOOP_CONTINUE; }; func void ZS_Engel_End () { };
D
var int B_RemoveQuarhodron_OneTime; var int B_RemoveRhademes_OneTime; func void B_RemoveGhost() { if(Ghost_SCKnowsHow2GetInAdanosTempel == TRUE) { if((SC_SummonedAncientGhost == TRUE) && (B_RemoveQuarhodron_OneTime == FALSE)) { AI_Teleport(NONE_ADDON_111_Quarhodron,"TOT"); B_RemoveNpc(NONE_ADDON_111_Quarhodron); Snd_Play("MFX_GhostVoice"); Snd_Play("MFX_Firestorm_Cast"); B_RemoveQuarhodron_OneTime = TRUE; GhostAttackWarn = 0; }; }; if(ADW_ADANOSTEMPEL_STONEGRD_TRIGG_FUNC_01_OneTime == TRUE) { if((SC_TookRhademesTrap == TRUE) && (B_RemoveRhademes_OneTime == FALSE)) { AI_Teleport(NONE_ADDON_112_Rhademes,"TOT"); B_RemoveNpc(NONE_ADDON_112_Rhademes); if(SC_TalkedToRhademAfter == TRUE) { Snd_Play("MFX_GhostVoice"); Snd_Play("MFX_Firestorm_Cast"); }; B_RemoveRhademes_OneTime = TRUE; GhostAttackWarn = 0; }; }; };
D
/Users/abelfernandez/projects/vapor-server/Hello/.build/debug/Branches.build/Branch.swift.o : /Users/abelfernandez/projects/vapor-server/Hello/.build/checkouts/routing.git-5366657101075133678/Sources/Branches/Branch.swift /Users/abelfernandez/projects/vapor-server/Hello/.build/checkouts/routing.git-5366657101075133678/Sources/Branches/SubBranchMap.swift /Users/abelfernandez/projects/vapor-server/Hello/.build/checkouts/routing.git-5366657101075133678/Sources/Branches/Branch+Paths.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/ObjectiveC.apinotesc /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Dispatch.apinotesc /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Foundation.apinotesc /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/CoreGraphics.apinotesc /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/CoreText.apinotesc /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/ObjectiveC.swiftmodule /Users/abelfernandez/projects/vapor-server/Hello/.build/debug/libc.swiftmodule /Users/abelfernandez/projects/vapor-server/Hello/.build/debug/Node.swiftmodule /Users/abelfernandez/projects/vapor-server/Hello/.build/debug/PathIndexable.swiftmodule /Users/abelfernandez/projects/vapor-server/Hello/.build/debug/Core.swiftmodule /Users/abelfernandez/projects/vapor-server/Hello/.build/debug/Debugging.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Dispatch.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/CoreGraphics.swiftmodule /Users/abelfernandez/projects/vapor-server/Hello/.build/debug/Bits.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/IOKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/SwiftOnoneSupport.swiftmodule /Users/abelfernandez/projects/vapor-server/Hello/.build/checkouts/ctls.git-9210868160426949823/module.modulemap /Users/abelfernandez/projects/vapor-server/Hello/.build/debug/CHTTP.build/module.modulemap /Users/abelfernandez/projects/vapor-server/Hello/.build/debug/CSQLite.build/module.modulemap /Users/abelfernandez/projects/vapor-server/Hello/.build/debug/Branches.build/Branch~partial.swiftmodule : /Users/abelfernandez/projects/vapor-server/Hello/.build/checkouts/routing.git-5366657101075133678/Sources/Branches/Branch.swift /Users/abelfernandez/projects/vapor-server/Hello/.build/checkouts/routing.git-5366657101075133678/Sources/Branches/SubBranchMap.swift /Users/abelfernandez/projects/vapor-server/Hello/.build/checkouts/routing.git-5366657101075133678/Sources/Branches/Branch+Paths.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/ObjectiveC.apinotesc /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Dispatch.apinotesc /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Foundation.apinotesc /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/CoreGraphics.apinotesc /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/CoreText.apinotesc /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/ObjectiveC.swiftmodule /Users/abelfernandez/projects/vapor-server/Hello/.build/debug/libc.swiftmodule /Users/abelfernandez/projects/vapor-server/Hello/.build/debug/Node.swiftmodule /Users/abelfernandez/projects/vapor-server/Hello/.build/debug/PathIndexable.swiftmodule /Users/abelfernandez/projects/vapor-server/Hello/.build/debug/Core.swiftmodule /Users/abelfernandez/projects/vapor-server/Hello/.build/debug/Debugging.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Dispatch.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/CoreGraphics.swiftmodule /Users/abelfernandez/projects/vapor-server/Hello/.build/debug/Bits.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/IOKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/SwiftOnoneSupport.swiftmodule /Users/abelfernandez/projects/vapor-server/Hello/.build/checkouts/ctls.git-9210868160426949823/module.modulemap /Users/abelfernandez/projects/vapor-server/Hello/.build/debug/CHTTP.build/module.modulemap /Users/abelfernandez/projects/vapor-server/Hello/.build/debug/CSQLite.build/module.modulemap /Users/abelfernandez/projects/vapor-server/Hello/.build/debug/Branches.build/Branch~partial.swiftdoc : /Users/abelfernandez/projects/vapor-server/Hello/.build/checkouts/routing.git-5366657101075133678/Sources/Branches/Branch.swift /Users/abelfernandez/projects/vapor-server/Hello/.build/checkouts/routing.git-5366657101075133678/Sources/Branches/SubBranchMap.swift /Users/abelfernandez/projects/vapor-server/Hello/.build/checkouts/routing.git-5366657101075133678/Sources/Branches/Branch+Paths.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/ObjectiveC.apinotesc /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Dispatch.apinotesc /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Foundation.apinotesc /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/CoreGraphics.apinotesc /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/CoreText.apinotesc /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/ObjectiveC.swiftmodule /Users/abelfernandez/projects/vapor-server/Hello/.build/debug/libc.swiftmodule /Users/abelfernandez/projects/vapor-server/Hello/.build/debug/Node.swiftmodule /Users/abelfernandez/projects/vapor-server/Hello/.build/debug/PathIndexable.swiftmodule /Users/abelfernandez/projects/vapor-server/Hello/.build/debug/Core.swiftmodule /Users/abelfernandez/projects/vapor-server/Hello/.build/debug/Debugging.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Dispatch.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/CoreGraphics.swiftmodule /Users/abelfernandez/projects/vapor-server/Hello/.build/debug/Bits.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/IOKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/SwiftOnoneSupport.swiftmodule /Users/abelfernandez/projects/vapor-server/Hello/.build/checkouts/ctls.git-9210868160426949823/module.modulemap /Users/abelfernandez/projects/vapor-server/Hello/.build/debug/CHTTP.build/module.modulemap /Users/abelfernandez/projects/vapor-server/Hello/.build/debug/CSQLite.build/module.modulemap
D
// REQUIRED_ARGS: -dip25 /* TEST_OUTPUT: --- fail_compilation/retref2.d(21): Error: function retref2.D.foo does not override any function, did you mean to override 'retref2.C.foo'? fail_compilation/retref2.d(22): Error: function retref2.D.bar does not override any function, did you mean to override 'retref2.C.bar'? --- */ class C { ref int foo(ref int); ref int bar(); } class D : C { override ref int foo(return ref int); override ref int bar() return; }
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_mul_int_lit16_3.java .class public dot.junit.opcodes.mul_int_lit16.d.T_mul_int_lit16_3 .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(F)I .limit regs 9 mul-int/lit16 v0, v8, 130 return v0 .end method
D
/** Dynamic Variant array. Copyright: Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) Copyright (c) 2017-2018 Godot-D contributors License: $(LINK2 https://opensource.org/licenses/MIT, MIT License) */ module godot.core.array; import godot.c; import godot.core.variant; import godot.core.poolarrays; /** Generic array, contains several elements of any type, accessible by numerical index starting at 0. Negative indices can be used to count from the right, like in Python. Arrays are always passed by reference. */ struct Array { int opApply(int delegate(size_t, ref Variant) dg) { foreach(i; 0..length) { Variant* v = cast(Variant*)&(this[i]); int res = dg(cast(size_t)i, *v); if(res) return res; } return 0; } int opApply(int delegate(size_t, const(Variant)) dg) const { foreach(i; 0..length) { int res = dg(cast(size_t)i, this[i]); if(res) return res; } return 0; } int opApply(int delegate(ref Variant) dg) { foreach(i; 0..length) { Variant* v = cast(Variant*)&(this[i]); int res = dg(*v); if(res) return res; } return 0; } int opApply(int delegate(const(Variant)) dg) const { foreach(i; 0..length) { int res = dg(this[i]); if(res) return res; } return 0; } @nogc nothrow: package(godot) godot_array _godot_array; @disable this(); this(this) { const godot_array tmp = _godot_array; _godot_api.godot_array_new_copy(&_godot_array, &tmp); } Array opAssign(in Array other) { _godot_api.godot_array_destroy(&_godot_array); _godot_api.godot_array_new_copy(&_godot_array, &other._godot_array); return this; } /++ Assigning null empties the Array variable, but unlike `clear`, does not destroy the original memory unless it was the only remaining reference. Equivalent to assigning empty_array. +/ Array opAssign(in typeof(null) n) { return opAssign(empty_array); } static Array empty_array() { Array ret = void; _godot_api.godot_array_new(&ret._godot_array); return ret; } this(in typeof(null) n) { _godot_api.godot_array_new(&_godot_array); } this(in PoolByteArray a) { _godot_api.godot_array_new_pool_byte_array(&_godot_array, &a._godot_array); } this(in PoolIntArray a) { _godot_api.godot_array_new_pool_int_array(&_godot_array, &a._godot_array); } this(in PoolRealArray a) { _godot_api.godot_array_new_pool_real_array(&_godot_array, &a._godot_array); } this(in PoolStringArray a) { _godot_api.godot_array_new_pool_string_array(&_godot_array, &a._godot_array); } this(in PoolVector2Array a) { _godot_api.godot_array_new_pool_vector2_array(&_godot_array, &a._godot_array); } this(in PoolVector3Array a) { _godot_api.godot_array_new_pool_vector3_array(&_godot_array, &a._godot_array); } this(in PoolColorArray a) { _godot_api.godot_array_new_pool_color_array(&_godot_array, &a._godot_array); } auto ref inout(Variant) opIndex(size_t idx) inout { godot_variant* v = _godot_api.godot_array_operator_index(cast(godot_array*)&_godot_array, cast(int)idx); return *cast(inout(Variant)*)v; } void opIndexAssign(T)(auto ref T value, in size_t idx) if(is(T : Variant) || Variant.compatibleToGodot!T) { Variant v = Variant(value); _godot_api.godot_array_set(&_godot_array, cast(int)idx, &v._godot_variant); } void append(T)(auto ref T t) if(is(T : Variant) || Variant.compatibleToGodot!T) { Variant v = Variant(t); _godot_api.godot_array_append(&_godot_array, &v._godot_variant); } alias opOpAssign(string op : "~") = append; void clear() { _godot_api.godot_array_clear(&_godot_array); } size_t count(in Variant v) { return _godot_api.godot_array_count(&_godot_array, &v._godot_variant); } bool empty() const { return cast(bool)_godot_api.godot_array_empty(&_godot_array); } void erase(Variant v) { _godot_api.godot_array_erase(&_godot_array, &v._godot_variant); } Variant front() const { godot_variant v = _godot_api.godot_array_front(&_godot_array); return cast(Variant)v; } Variant back() const { godot_variant v = _godot_api.godot_array_back(&_godot_array); return cast(Variant)v; } int find(in Variant what, size_t from) { return _godot_api.godot_array_find(&_godot_array, &what._godot_variant, cast(int)from); } int findLast(in Variant what) { return _godot_api.godot_array_find_last(&_godot_array, &what._godot_variant); } bool has(in Variant what) const { return cast(bool)_godot_api.godot_array_has(&_godot_array, &what._godot_variant); } uint hash() const { return _godot_api.godot_array_hash(&_godot_array); } void insert(const size_t pos, Variant value) { _godot_api.godot_array_insert(&_godot_array, cast(int)pos, &value._godot_variant); } void invert() { _godot_api.godot_array_invert(&_godot_array); } Variant popBack() { godot_variant v = _godot_api.godot_array_pop_back(&_godot_array); return cast(Variant)v; } Variant popFront() { godot_variant v = _godot_api.godot_array_pop_front(&_godot_array); return cast(Variant)v; } void pushBack(Variant v) { _godot_api.godot_array_push_back(&_godot_array, &v._godot_variant); } void pushFront(Variant v) { _godot_api.godot_array_push_front(&_godot_array, &v._godot_variant); } void remove(size_t idx) { _godot_api.godot_array_remove(&_godot_array, cast(int)idx); } size_t size() const { return _godot_api.godot_array_size(&_godot_array); } alias length = size; // D-style `length` void resize(size_t size) { _godot_api.godot_array_resize(&_godot_array, cast(int)size); } int rfind(in Variant what, size_t from) { return _godot_api.godot_array_rfind(&_godot_array, &what._godot_variant, cast(int)from); } void sort() { _godot_api.godot_array_sort(&_godot_array); } /+void sort_custom(godot.Object obj, in ref String func) { _godot_api.godot_array_sort_custom(&_godot_array, obj, &func._godot_string); }+/ /// Allocate a new separate copy of the Array Array dup() const { Array ret = empty_array; size_t l = size(); ret.resize(l); foreach(vi; 0..l) { ret[vi] = this[vi]; } return ret; } ~this() { _godot_api.godot_array_destroy(&_godot_array); } }
D
/* Copyright (c) 2019-2020 Timur Gafarov Boost Software License - Version 1.0 - August 17th, 2003 Permission is hereby granted, free of charge, to any person or organization obtaining a copy of the software and accompanying documentation covered by this license (the "Software") to use, reproduce, display, distribute, execute, and transmit the Software, and to prepare derivative works of the Software, and to permit third-parties to whom the Software is furnished to do so, all subject to the following: The copyright notices in the Software and this entire statement, including the above license grant, this restriction and the following disclaimer, must be included in all copies of the Software, in whole or in part, and all derivative works of the Software, unless such copies or derivative works are solely in the form of machine-executable object code generated by a source language processor. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ module dagon.postproc.shaders.glow; import std.stdio; import dlib.core.memory; import dlib.core.ownership; import dlib.math.vector; import dlib.math.matrix; import dlib.math.transformation; import dlib.math.interpolation; import dlib.image.color; import dlib.text.str; import dagon.core.bindings; import dagon.graphics.shader; import dagon.graphics.state; import dagon.render.framebuffer; class GlowShader: Shader { String vs, fs; bool enabled = true; float intensity = 1.0f; Framebuffer blurredBuffer; this(Owner owner) { vs = Shader.load("data/__internal/shaders/Glow/Glow.vert.glsl"); fs = Shader.load("data/__internal/shaders/Glow/Glow.frag.glsl"); auto myProgram = New!ShaderProgram(vs, fs, this); super(myProgram, owner); } ~this() { vs.free(); fs.free(); } override void bindParameters(GraphicsState* state) { setParameter("viewSize", state.resolution); setParameter("enabled", enabled); setParameter("intensity", intensity); // Texture 0 - color buffer glActiveTexture(GL_TEXTURE0); glBindTexture(GL_TEXTURE_2D, state.colorTexture); setParameter("colorBuffer", 0); // Texture 1 - blurred buffer if (blurredBuffer) { glActiveTexture(GL_TEXTURE1); glBindTexture(GL_TEXTURE_2D, blurredBuffer.colorTexture); setParameter("blurredBuffer", 1); } glActiveTexture(GL_TEXTURE0); super.bindParameters(state); } override void unbindParameters(GraphicsState* state) { super.unbindParameters(state); glActiveTexture(GL_TEXTURE0); glBindTexture(GL_TEXTURE_2D, 0); glActiveTexture(GL_TEXTURE1); glBindTexture(GL_TEXTURE_2D, 0); glActiveTexture(GL_TEXTURE0); } }
D
/Users/kushalashok/Documents/References/github/lunchtime/DerivedData/LunchTime/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/Alamofire.build/Objects-normal/x86_64/ParameterEncoding.o : /Users/kushalashok/Documents/References/github/lunchtime/Pods/Alamofire/Source/MultipartFormData.swift /Users/kushalashok/Documents/References/github/lunchtime/Pods/Alamofire/Source/Timeline.swift /Users/kushalashok/Documents/References/github/lunchtime/Pods/Alamofire/Source/DispatchQueue+Alamofire.swift /Users/kushalashok/Documents/References/github/lunchtime/Pods/Alamofire/Source/Alamofire.swift /Users/kushalashok/Documents/References/github/lunchtime/Pods/Alamofire/Source/Response.swift /Users/kushalashok/Documents/References/github/lunchtime/Pods/Alamofire/Source/TaskDelegate.swift /Users/kushalashok/Documents/References/github/lunchtime/Pods/Alamofire/Source/SessionDelegate.swift /Users/kushalashok/Documents/References/github/lunchtime/Pods/Alamofire/Source/ParameterEncoding.swift /Users/kushalashok/Documents/References/github/lunchtime/Pods/Alamofire/Source/Validation.swift /Users/kushalashok/Documents/References/github/lunchtime/Pods/Alamofire/Source/ResponseSerialization.swift /Users/kushalashok/Documents/References/github/lunchtime/Pods/Alamofire/Source/SessionManager.swift /Users/kushalashok/Documents/References/github/lunchtime/Pods/Alamofire/Source/NetworkReachabilityManager.swift /Users/kushalashok/Documents/References/github/lunchtime/Pods/Alamofire/Source/AFError.swift /Users/kushalashok/Documents/References/github/lunchtime/Pods/Alamofire/Source/Notifications.swift /Users/kushalashok/Documents/References/github/lunchtime/Pods/Alamofire/Source/Result.swift /Users/kushalashok/Documents/References/github/lunchtime/Pods/Alamofire/Source/Request.swift /Users/kushalashok/Documents/References/github/lunchtime/Pods/Alamofire/Source/ServerTrustPolicy.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.apinotesc /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/ObjectiveC.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreImage.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/QuartzCore.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Metal.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreFoundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreGraphics.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/UIKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/SwiftOnoneSupport.swiftmodule /Users/kushalashok/Documents/References/github/lunchtime/Pods/Target\ Support\ Files/Alamofire/Alamofire-umbrella.h /Users/kushalashok/Documents/References/github/lunchtime/DerivedData/LunchTime/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/Alamofire.build/unextended-module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/OpenGLES.framework/Headers/OpenGLES.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImage.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/QuartzCore.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Users/kushalashok/Documents/References/github/lunchtime/DerivedData/LunchTime/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/Alamofire.build/Objects-normal/x86_64/ParameterEncoding~partial.swiftmodule : /Users/kushalashok/Documents/References/github/lunchtime/Pods/Alamofire/Source/MultipartFormData.swift /Users/kushalashok/Documents/References/github/lunchtime/Pods/Alamofire/Source/Timeline.swift /Users/kushalashok/Documents/References/github/lunchtime/Pods/Alamofire/Source/DispatchQueue+Alamofire.swift /Users/kushalashok/Documents/References/github/lunchtime/Pods/Alamofire/Source/Alamofire.swift /Users/kushalashok/Documents/References/github/lunchtime/Pods/Alamofire/Source/Response.swift /Users/kushalashok/Documents/References/github/lunchtime/Pods/Alamofire/Source/TaskDelegate.swift /Users/kushalashok/Documents/References/github/lunchtime/Pods/Alamofire/Source/SessionDelegate.swift /Users/kushalashok/Documents/References/github/lunchtime/Pods/Alamofire/Source/ParameterEncoding.swift /Users/kushalashok/Documents/References/github/lunchtime/Pods/Alamofire/Source/Validation.swift /Users/kushalashok/Documents/References/github/lunchtime/Pods/Alamofire/Source/ResponseSerialization.swift /Users/kushalashok/Documents/References/github/lunchtime/Pods/Alamofire/Source/SessionManager.swift /Users/kushalashok/Documents/References/github/lunchtime/Pods/Alamofire/Source/NetworkReachabilityManager.swift /Users/kushalashok/Documents/References/github/lunchtime/Pods/Alamofire/Source/AFError.swift /Users/kushalashok/Documents/References/github/lunchtime/Pods/Alamofire/Source/Notifications.swift /Users/kushalashok/Documents/References/github/lunchtime/Pods/Alamofire/Source/Result.swift /Users/kushalashok/Documents/References/github/lunchtime/Pods/Alamofire/Source/Request.swift /Users/kushalashok/Documents/References/github/lunchtime/Pods/Alamofire/Source/ServerTrustPolicy.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.apinotesc /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/ObjectiveC.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreImage.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/QuartzCore.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Metal.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreFoundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreGraphics.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/UIKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/SwiftOnoneSupport.swiftmodule /Users/kushalashok/Documents/References/github/lunchtime/Pods/Target\ Support\ Files/Alamofire/Alamofire-umbrella.h /Users/kushalashok/Documents/References/github/lunchtime/DerivedData/LunchTime/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/Alamofire.build/unextended-module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/OpenGLES.framework/Headers/OpenGLES.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImage.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/QuartzCore.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Users/kushalashok/Documents/References/github/lunchtime/DerivedData/LunchTime/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/Alamofire.build/Objects-normal/x86_64/ParameterEncoding~partial.swiftdoc : /Users/kushalashok/Documents/References/github/lunchtime/Pods/Alamofire/Source/MultipartFormData.swift /Users/kushalashok/Documents/References/github/lunchtime/Pods/Alamofire/Source/Timeline.swift /Users/kushalashok/Documents/References/github/lunchtime/Pods/Alamofire/Source/DispatchQueue+Alamofire.swift /Users/kushalashok/Documents/References/github/lunchtime/Pods/Alamofire/Source/Alamofire.swift /Users/kushalashok/Documents/References/github/lunchtime/Pods/Alamofire/Source/Response.swift /Users/kushalashok/Documents/References/github/lunchtime/Pods/Alamofire/Source/TaskDelegate.swift /Users/kushalashok/Documents/References/github/lunchtime/Pods/Alamofire/Source/SessionDelegate.swift /Users/kushalashok/Documents/References/github/lunchtime/Pods/Alamofire/Source/ParameterEncoding.swift /Users/kushalashok/Documents/References/github/lunchtime/Pods/Alamofire/Source/Validation.swift /Users/kushalashok/Documents/References/github/lunchtime/Pods/Alamofire/Source/ResponseSerialization.swift /Users/kushalashok/Documents/References/github/lunchtime/Pods/Alamofire/Source/SessionManager.swift /Users/kushalashok/Documents/References/github/lunchtime/Pods/Alamofire/Source/NetworkReachabilityManager.swift /Users/kushalashok/Documents/References/github/lunchtime/Pods/Alamofire/Source/AFError.swift /Users/kushalashok/Documents/References/github/lunchtime/Pods/Alamofire/Source/Notifications.swift /Users/kushalashok/Documents/References/github/lunchtime/Pods/Alamofire/Source/Result.swift /Users/kushalashok/Documents/References/github/lunchtime/Pods/Alamofire/Source/Request.swift /Users/kushalashok/Documents/References/github/lunchtime/Pods/Alamofire/Source/ServerTrustPolicy.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.apinotesc /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/ObjectiveC.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreImage.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/QuartzCore.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Metal.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreFoundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreGraphics.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/UIKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/SwiftOnoneSupport.swiftmodule /Users/kushalashok/Documents/References/github/lunchtime/Pods/Target\ Support\ Files/Alamofire/Alamofire-umbrella.h /Users/kushalashok/Documents/References/github/lunchtime/DerivedData/LunchTime/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/Alamofire.build/unextended-module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/OpenGLES.framework/Headers/OpenGLES.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImage.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/QuartzCore.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes
D
// Copyright © 2011, Jakob Bornecrantz. All rights reserved. // See copyright notice in src/charge/charge.d (GPLv2 only). module miners.isle.world; import charge.charge; import charge.math.noise; import miners.world; import miners.options; import miners.builder.beta; import miners.terrain.beta; import miners.terrain.chunk; import miners.terrain.common; import miners.importer.info; /** * World containing a infite floating island world. */ class IsleWorld : World { public: BetaTerrain bt; public: this(Options opts) { this.spawn = Point3d(-10, 64, -10); super(opts); auto builder = new BetaMeshBuilder(); t = bt = new BetaTerrain(this, opts, &newChunk, builder); // Find the actuall spawn height auto x = cast(int)spawn.x; auto y = cast(int)spawn.y; auto z = cast(int)spawn.z; auto xPos = x < 0 ? (x - 15) / 16 : x / 16; auto yPos = y < 0 ? (y - 15) / 16 : y / 16; auto zPos = z < 0 ? (z - 15) / 16 : z / 16; bt.setCenter(xPos, yPos, zPos); bt.loadChunk(xPos, zPos); auto p = bt.getTypePointer(x, z); bool foundFilled; for (int i = y; i < 128; i++) { if (tile[p[i]].filled) { foundFilled = true; continue; } if (tile[p[i+1]].filled) continue; if (!foundFilled) continue; spawn.y = i; break; } } void newChunk(Chunk c) { // Allocte valid data for the chunk c.allocBlocksAndData(); // For each block pillar in the chunk. for (int x; x < 16; x++) { for (int z; z < 16; z++) { // Get the pointer to the first block in a pillar. auto ptr = c.getTypePointerUnsafe(x, z); // Go from local chunk coords to global scaled coords. auto xU = (x + c.xPos * 16) / 64.0; auto zU = (z + c.zPos * 16) / 64.0; // Get the noise value for this location. auto g = pnoise(xU, 0, zU); g += 1; g *= 64.0; g += 5; for (int y = 64; y > g; y--) ptr[y] = 1; } } c.valid = true; c.loaded = true; } }
D
/** * Compiler implementation of the * $(LINK2 http://www.dlang.org, D programming language). * * Copyright: Copyright (C) 1999-2018 by The D Language Foundation, All Rights Reserved * Authors: $(LINK2 http://www.digitalmars.com, Walter Bright) * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/expressionsem.d, _expressionsem.d) * Documentation: https://dlang.org/phobos/dmd_expressionsem.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/expressionsem.d */ module dmd.expressionsem; import core.stdc.stdio; import core.stdc.string; import dmd.access; import dmd.aggregate; import dmd.aliasthis; import dmd.arrayop; import dmd.arraytypes; import dmd.attrib; import dmd.astcodegen; import dmd.canthrow; import dmd.ctorflow; import dmd.dscope; import dmd.dsymbol; import dmd.declaration; import dmd.dclass; import dmd.dcast; import dmd.delegatize; import dmd.denum; import dmd.dimport; import dmd.dmangle; import dmd.dmodule; import dmd.dstruct; import dmd.dsymbolsem; import dmd.dtemplate; import dmd.errors; import dmd.escape; import dmd.expression; import dmd.func; import dmd.globals; import dmd.hdrgen; import dmd.id; import dmd.identifier; import dmd.imphint; import dmd.inline; import dmd.intrange; import dmd.mtype; import dmd.nspace; import dmd.opover; import dmd.optimize; import dmd.parse; import dmd.root.ctfloat; import dmd.root.file; import dmd.root.filename; import dmd.root.outbuffer; import dmd.root.rootobject; import dmd.semantic2; import dmd.semantic3; import dmd.sideeffect; import dmd.safe; import dmd.target; import dmd.tokens; import dmd.traits; import dmd.typesem; import dmd.typinf; import dmd.utf; import dmd.utils; import dmd.visitor; enum LOGSEMANTIC = false; /*************************************** * Pull out any properties. */ private Expression resolvePropertiesX(Scope* sc, Expression e1, Expression e2 = null) { //printf("resolvePropertiesX, e1 = %s %s, e2 = %s\n", Token.toChars(e1.op), e1.toChars(), e2 ? e2.toChars() : null); Loc loc = e1.loc; OverloadSet os; Dsymbol s; Objects* tiargs; Type tthis; if (e1.op == TOK.dot) { DotExp de = cast(DotExp)e1; if (de.e2.op == TOK.overloadSet) { tiargs = null; tthis = de.e1.type; os = (cast(OverExp)de.e2).vars; goto Los; } } else if (e1.op == TOK.overloadSet) { tiargs = null; tthis = null; os = (cast(OverExp)e1).vars; Los: assert(os); FuncDeclaration fd = null; if (e2) { e2 = e2.expressionSemantic(sc); if (e2.op == TOK.error) return new ErrorExp(); e2 = resolveProperties(sc, e2); Expressions a; a.push(e2); for (size_t i = 0; i < os.a.dim; i++) { FuncDeclaration f = resolveFuncCall(loc, sc, os.a[i], tiargs, tthis, &a, 1); if (f) { if (f.errors) return new ErrorExp(); fd = f; assert(fd.type.ty == Tfunction); } } if (fd) { Expression e = new CallExp(loc, e1, e2); return e.expressionSemantic(sc); } } { for (size_t i = 0; i < os.a.dim; i++) { FuncDeclaration f = resolveFuncCall(loc, sc, os.a[i], tiargs, tthis, null, 1); if (f) { if (f.errors) return new ErrorExp(); fd = f; assert(fd.type.ty == Tfunction); TypeFunction tf = cast(TypeFunction)fd.type; if (!tf.isref && e2) goto Leproplvalue; } } if (fd) { Expression e = new CallExp(loc, e1); if (e2) e = new AssignExp(loc, e, e2); return e.expressionSemantic(sc); } } if (e2) goto Leprop; } else if (e1.op == TOK.dotTemplateInstance) { DotTemplateInstanceExp dti = cast(DotTemplateInstanceExp)e1; if (!dti.findTempDecl(sc)) goto Leprop; if (!dti.ti.semanticTiargs(sc)) goto Leprop; tiargs = dti.ti.tiargs; tthis = dti.e1.type; if ((os = dti.ti.tempdecl.isOverloadSet()) !is null) goto Los; if ((s = dti.ti.tempdecl) !is null) goto Lfd; } else if (e1.op == TOK.dotTemplateDeclaration) { DotTemplateExp dte = cast(DotTemplateExp)e1; s = dte.td; tiargs = null; tthis = dte.e1.type; goto Lfd; } else if (e1.op == TOK.scope_) { s = (cast(ScopeExp)e1).sds; TemplateInstance ti = s.isTemplateInstance(); if (ti && !ti.semanticRun && ti.tempdecl) { //assert(ti.needsTypeInference(sc)); if (!ti.semanticTiargs(sc)) goto Leprop; tiargs = ti.tiargs; tthis = null; if ((os = ti.tempdecl.isOverloadSet()) !is null) goto Los; if ((s = ti.tempdecl) !is null) goto Lfd; } } else if (e1.op == TOK.template_) { s = (cast(TemplateExp)e1).td; tiargs = null; tthis = null; goto Lfd; } else if (e1.op == TOK.dotVariable && e1.type && e1.type.toBasetype().ty == Tfunction) { DotVarExp dve = cast(DotVarExp)e1; s = dve.var.isFuncDeclaration(); tiargs = null; tthis = dve.e1.type; goto Lfd; } else if (e1.op == TOK.variable && e1.type && e1.type.toBasetype().ty == Tfunction) { s = (cast(VarExp)e1).var.isFuncDeclaration(); tiargs = null; tthis = null; Lfd: assert(s); if (e2) { e2 = e2.expressionSemantic(sc); if (e2.op == TOK.error) return new ErrorExp(); e2 = resolveProperties(sc, e2); Expressions a; a.push(e2); FuncDeclaration fd = resolveFuncCall(loc, sc, s, tiargs, tthis, &a, 1); if (fd && fd.type) { if (fd.errors) return new ErrorExp(); assert(fd.type.ty == Tfunction); Expression e = new CallExp(loc, e1, e2); return e.expressionSemantic(sc); } } { FuncDeclaration fd = resolveFuncCall(loc, sc, s, tiargs, tthis, null, 1); if (fd && fd.type) { if (fd.errors) return new ErrorExp(); assert(fd.type.ty == Tfunction); TypeFunction tf = cast(TypeFunction)fd.type; if (!e2 || tf.isref) { Expression e = new CallExp(loc, e1); if (e2) e = new AssignExp(loc, e, e2); return e.expressionSemantic(sc); } } } if (FuncDeclaration fd = s.isFuncDeclaration()) { // Keep better diagnostic message for invalid property usage of functions assert(fd.type.ty == Tfunction); Expression e = new CallExp(loc, e1, e2); return e.expressionSemantic(sc); } if (e2) goto Leprop; } if (e1.op == TOK.variable) { VarExp ve = cast(VarExp)e1; VarDeclaration v = ve.var.isVarDeclaration(); if (v && ve.checkPurity(sc, v)) return new ErrorExp(); } if (e2) return null; if (e1.type && e1.op != TOK.type) // function type is not a property { /* Look for e1 being a lazy parameter; rewrite as delegate call */ if (e1.op == TOK.variable) { VarExp ve = cast(VarExp)e1; if (ve.var.storage_class & STC.lazy_) { Expression e = new CallExp(loc, e1); return e.expressionSemantic(sc); } } else if (e1.op == TOK.dotVariable) { // Check for reading overlapped pointer field in @safe code. if (checkUnsafeAccess(sc, e1, true, true)) return new ErrorExp(); } else if (e1.op == TOK.dot) { e1.error("expression has no value"); return new ErrorExp(); } else if (e1.op == TOK.call) { CallExp ce = cast(CallExp)e1; // Check for reading overlapped pointer field in @safe code. if (checkUnsafeAccess(sc, ce.e1, true, true)) return new ErrorExp(); } } if (!e1.type) { error(loc, "cannot resolve type for %s", e1.toChars()); e1 = new ErrorExp(); } return e1; Leprop: error(loc, "not a property %s", e1.toChars()); return new ErrorExp(); Leproplvalue: error(loc, "%s is not an lvalue", e1.toChars()); return new ErrorExp(); } extern (C++) Expression resolveProperties(Scope* sc, Expression e) { //printf("resolveProperties(%s)\n", e.toChars()); e = resolvePropertiesX(sc, e); if (e.checkRightThis(sc)) return new ErrorExp(); return e; } /**************************************** * The common type is determined by applying ?: to each pair. * Output: * exps[] properties resolved, implicitly cast to common type, rewritten in place * *pt if pt is not NULL, set to the common type * Returns: * true a semantic error was detected */ private bool arrayExpressionToCommonType(Scope* sc, Expressions* exps, Type* pt) { /* Still have a problem with: * ubyte[][] = [ cast(ubyte[])"hello", [1]]; * which works if the array literal is initialized top down with the ubyte[][] * type, but fails with this function doing bottom up typing. */ //printf("arrayExpressionToCommonType()\n"); scope IntegerExp integerexp = new IntegerExp(0); scope CondExp condexp = new CondExp(Loc.initial, integerexp, null, null); Type t0 = null; Expression e0 = null; size_t j0 = ~0; for (size_t i = 0; i < exps.dim; i++) { Expression e = (*exps)[i]; if (!e) continue; e = resolveProperties(sc, e); if (!e.type) { e.error("`%s` has no value", e.toChars()); t0 = Type.terror; continue; } if (e.op == TOK.type) { e.checkValue(); // report an error "type T has no value" t0 = Type.terror; continue; } if (e.type.ty == Tvoid) { // void expressions do not concur to the determination of the common // type. continue; } if (checkNonAssignmentArrayOp(e)) { t0 = Type.terror; continue; } e = doCopyOrMove(sc, e); if (t0 && !t0.equals(e.type)) { /* This applies ?: to merge the types. It's backwards; * ?: should call this function to merge types. */ condexp.type = null; condexp.e1 = e0; condexp.e2 = e; condexp.loc = e.loc; Expression ex = condexp.expressionSemantic(sc); if (ex.op == TOK.error) e = ex; else { (*exps)[j0] = condexp.e1; e = condexp.e2; } } j0 = i; e0 = e; t0 = e.type; if (e.op != TOK.error) (*exps)[i] = e; } if (!t0) t0 = Type.tvoid; // [] is typed as void[] else if (t0.ty != Terror) { for (size_t i = 0; i < exps.dim; i++) { Expression e = (*exps)[i]; if (!e) continue; e = e.implicitCastTo(sc, t0); //assert(e.op != TOK.error); if (e.op == TOK.error) { /* https://issues.dlang.org/show_bug.cgi?id=13024 * a workaround for the bug in typeMerge - * it should paint e1 and e2 by deduced common type, * but doesn't in this particular case. */ t0 = Type.terror; break; } (*exps)[i] = e; } } if (pt) *pt = t0; return (t0 == Type.terror); } /**************************************** * Preprocess arguments to function. * Output: * exps[] tuples expanded, properties resolved, rewritten in place * Returns: * true a semantic error occurred */ private bool preFunctionParameters(Scope* sc, Expressions* exps) { bool err = false; if (exps) { expandTuples(exps); for (size_t i = 0; i < exps.dim; i++) { Expression arg = (*exps)[i]; arg = resolveProperties(sc, arg); if (arg.op == TOK.type) { arg.error("cannot pass type `%s` as a function argument", arg.toChars()); arg = new ErrorExp(); err = true; } else if (checkNonAssignmentArrayOp(arg)) { arg = new ErrorExp(); err = true; } (*exps)[i] = arg; } } return err; } /******************************************** * Issue an error if default construction is disabled for type t. * Default construction is required for arrays and 'out' parameters. * Returns: * true an error was issued */ private bool checkDefCtor(Loc loc, Type t) { t = t.baseElemOf(); if (t.ty == Tstruct) { StructDeclaration sd = (cast(TypeStruct)t).sym; if (sd.noDefaultCtor) { sd.error(loc, "default construction is disabled"); return true; } } return false; } /**************************************** * Now that we know the exact type of the function we're calling, * the arguments[] need to be adjusted: * 1. implicitly convert argument to the corresponding parameter type * 2. add default arguments for any missing arguments * 3. do default promotions on arguments corresponding to ... * 4. add hidden _arguments[] argument * 5. call copy constructor for struct value arguments * Input: * tf type of the function * fd the function being called, NULL if called indirectly * Output: * *prettype return type of function * *peprefix expression to execute before arguments[] are evaluated, NULL if none * Returns: * true errors happened */ private bool functionParameters(Loc loc, Scope* sc, TypeFunction tf, Type tthis, Expressions* arguments, FuncDeclaration fd, Type* prettype, Expression* peprefix) { //printf("functionParameters() %s\n", fd ? fd.toChars() : ""); assert(arguments); assert(fd || tf.next); size_t nargs = arguments ? arguments.dim : 0; size_t nparams = Parameter.dim(tf.parameters); uint olderrors = global.errors; bool err = false; *prettype = Type.terror; Expression eprefix = null; *peprefix = null; if (nargs > nparams && tf.varargs == 0) { error(loc, "expected %llu arguments, not %llu for non-variadic function type `%s`", cast(ulong)nparams, cast(ulong)nargs, tf.toChars()); return true; } // If inferring return type, and semantic3() needs to be run if not already run if (!tf.next && fd.inferRetType) { fd.functionSemantic(); } else if (fd && fd.parent) { TemplateInstance ti = fd.parent.isTemplateInstance(); if (ti && ti.tempdecl) { fd.functionSemantic3(); } } bool isCtorCall = fd && fd.needThis() && fd.isCtorDeclaration(); size_t n = (nargs > nparams) ? nargs : nparams; // n = max(nargs, nparams) /* If the function return type has wildcards in it, we'll need to figure out the actual type * based on the actual argument types. */ MOD wildmatch = 0; if (tthis && tf.isWild() && !isCtorCall) { Type t = tthis; if (t.isImmutable()) wildmatch = MODFlags.immutable_; else if (t.isWildConst()) wildmatch = MODFlags.wildconst; else if (t.isWild()) wildmatch = MODFlags.wild; else if (t.isConst()) wildmatch = MODFlags.const_; else wildmatch = MODFlags.mutable; } int done = 0; for (size_t i = 0; i < n; i++) { Expression arg; if (i < nargs) arg = (*arguments)[i]; else arg = null; if (i < nparams) { Parameter p = Parameter.getNth(tf.parameters, i); if (!arg) { if (!p.defaultArg) { if (tf.varargs == 2 && i + 1 == nparams) goto L2; error(loc, "expected %llu function arguments, not %llu", cast(ulong)nparams, cast(ulong)nargs); return true; } arg = p.defaultArg; arg = inlineCopy(arg, sc); // __FILE__, __LINE__, __MODULE__, __FUNCTION__, and __PRETTY_FUNCTION__ arg = arg.resolveLoc(loc, sc); arguments.push(arg); nargs++; } if (tf.varargs == 2 && i + 1 == nparams) // https://dlang.org/spec/function.html#variadic { //printf("\t\tvarargs == 2, p.type = '%s'\n", p.type.toChars()); { MATCH m; if ((m = arg.implicitConvTo(p.type)) > MATCH.nomatch) { if (p.type.nextOf() && arg.implicitConvTo(p.type.nextOf()) >= m) goto L2; else if (nargs != nparams) { error(loc, "expected %llu function arguments, not %llu", cast(ulong)nparams, cast(ulong)nargs); return true; } goto L1; } } L2: Type tb = p.type.toBasetype(); Type tret = p.isLazyArray(); switch (tb.ty) { case Tsarray: case Tarray: { /* Create a static array variable v of type arg.type: * T[dim] __arrayArg = [ arguments[i], ..., arguments[nargs-1] ]; * * The array literal in the initializer of the hidden variable * is now optimized. * https://issues.dlang.org/show_bug.cgi?id=2356 */ Type tbn = (cast(TypeArray)tb).next; Type tsa = tbn.sarrayOf(nargs - i); auto elements = new Expressions(); elements.setDim(nargs - i); for (size_t u = 0; u < elements.dim; u++) { Expression a = (*arguments)[i + u]; if (tret && a.implicitConvTo(tret)) { a = a.implicitCastTo(sc, tret); a = a.optimize(WANTvalue); a = toDelegate(a, a.type, sc); } else a = a.implicitCastTo(sc, tbn); (*elements)[u] = a; } // https://issues.dlang.org/show_bug.cgi?id=14395 // Convert to a static array literal, or its slice. arg = new ArrayLiteralExp(loc, elements); arg.type = tsa; if (tb.ty == Tarray) { arg = new SliceExp(loc, arg, null, null); arg.type = p.type; } break; } case Tclass: { /* Set arg to be: * new Tclass(arg0, arg1, ..., argn) */ auto args = new Expressions(); args.setDim(nargs - i); for (size_t u = i; u < nargs; u++) (*args)[u - i] = (*arguments)[u]; arg = new NewExp(loc, null, null, p.type, args); break; } default: if (!arg) { error(loc, "not enough arguments"); return true; } break; } arg = arg.expressionSemantic(sc); //printf("\targ = '%s'\n", arg.toChars()); arguments.setDim(i + 1); (*arguments)[i] = arg; nargs = i + 1; done = 1; } L1: if (!(p.storageClass & STC.lazy_ && p.type.ty == Tvoid)) { bool isRef = (p.storageClass & (STC.ref_ | STC.out_)) != 0; if (ubyte wm = arg.type.deduceWild(p.type, isRef)) { if (wildmatch) wildmatch = MODmerge(wildmatch, wm); else wildmatch = wm; //printf("[%d] p = %s, a = %s, wm = %d, wildmatch = %d\n", i, p.type.toChars(), arg.type.toChars(), wm, wildmatch); } } } if (done) break; } if ((wildmatch == MODFlags.mutable || wildmatch == MODFlags.immutable_) && tf.next.hasWild() && (tf.isref || !tf.next.implicitConvTo(tf.next.immutableOf()))) { if (fd) { /* If the called function may return the reference to * outer inout data, it should be rejected. * * void foo(ref inout(int) x) { * ref inout(int) bar(inout(int)) { return x; } * struct S { ref inout(int) bar() inout { return x; } } * bar(int.init) = 1; // bad! * S().bar() = 1; // bad! * } */ Dsymbol s = null; if (fd.isThis() || fd.isNested()) s = fd.toParent2(); for (; s; s = s.toParent2()) { if (auto ad = s.isAggregateDeclaration()) { if (ad.isNested()) continue; break; } if (auto ff = s.isFuncDeclaration()) { if ((cast(TypeFunction)ff.type).iswild) goto Linouterr; if (ff.isNested() || ff.isThis()) continue; } break; } } else if (tf.isWild()) { Linouterr: const(char)* s = wildmatch == MODFlags.mutable ? "mutable" : MODtoChars(wildmatch); error(loc, "modify `inout` to `%s` is not allowed inside `inout` function", s); return true; } } assert(nargs >= nparams); for (size_t i = 0; i < nargs; i++) { Expression arg = (*arguments)[i]; assert(arg); if (i < nparams) { Parameter p = Parameter.getNth(tf.parameters, i); if (!(p.storageClass & STC.lazy_ && p.type.ty == Tvoid)) { Type tprm = p.type; if (p.type.hasWild()) tprm = p.type.substWildTo(wildmatch); if (!tprm.equals(arg.type)) { //printf("arg.type = %s, p.type = %s\n", arg.type.toChars(), p.type.toChars()); arg = arg.implicitCastTo(sc, tprm); arg = arg.optimize(WANTvalue, (p.storageClass & (STC.ref_ | STC.out_)) != 0); } } if (p.storageClass & STC.ref_) { arg = arg.toLvalue(sc, arg); // Look for mutable misaligned pointer, etc., in @safe mode err |= checkUnsafeAccess(sc, arg, false, true); } else if (p.storageClass & STC.out_) { Type t = arg.type; if (!t.isMutable() || !t.isAssignable()) // check blit assignable { arg.error("cannot modify struct `%s` with immutable members", arg.toChars()); err = true; } else { // Look for misaligned pointer, etc., in @safe mode err |= checkUnsafeAccess(sc, arg, false, true); err |= checkDefCtor(arg.loc, t); // t must be default constructible } arg = arg.toLvalue(sc, arg); } else if (p.storageClass & STC.lazy_) { // Convert lazy argument to a delegate if (p.type.ty == Tvoid) arg = toDelegate(arg, p.type, sc); else arg = toDelegate(arg, arg.type, sc); } //printf("arg: %s\n", arg.toChars()); //printf("type: %s\n", arg.type.toChars()); //printf("param: %s\n", p.toChars()); if (tf.parameterEscapes(tthis, p)) { /* Argument value can escape from the called function. * Check arg to see if it matters. */ if (global.params.vsafe) err |= checkParamArgumentEscape(sc, fd, p.ident, arg, false); } else { /* Argument value cannot escape from the called function. */ Expression a = arg; if (a.op == TOK.cast_) a = (cast(CastExp)a).e1; if (a.op == TOK.function_) { /* Function literals can only appear once, so if this * appearance was scoped, there cannot be any others. */ FuncExp fe = cast(FuncExp)a; fe.fd.tookAddressOf = 0; } else if (a.op == TOK.delegate_) { /* For passing a delegate to a scoped parameter, * this doesn't count as taking the address of it. * We only worry about 'escaping' references to the function. */ DelegateExp de = cast(DelegateExp)a; if (de.e1.op == TOK.variable) { VarExp ve = cast(VarExp)de.e1; FuncDeclaration f = ve.var.isFuncDeclaration(); if (f) { f.tookAddressOf--; //printf("--tookAddressOf = %d\n", f.tookAddressOf); } } } } arg = arg.optimize(WANTvalue, (p.storageClass & (STC.ref_ | STC.out_)) != 0); } else { // These will be the trailing ... arguments // If not D linkage, do promotions if (tf.linkage != LINK.d) { // Promote bytes, words, etc., to ints arg = integralPromotions(arg, sc); // Promote floats to doubles switch (arg.type.ty) { case Tfloat32: arg = arg.castTo(sc, Type.tfloat64); break; case Timaginary32: arg = arg.castTo(sc, Type.timaginary64); break; default: break; } if (tf.varargs == 1) { const(char)* p = tf.linkage == LINK.c ? "extern(C)" : "extern(C++)"; if (arg.type.ty == Tarray) { arg.error("cannot pass dynamic arrays to `%s` vararg functions", p); err = true; } if (arg.type.ty == Tsarray) { arg.error("cannot pass static arrays to `%s` vararg functions", p); err = true; } } } // Do not allow types that need destructors if (arg.type.needsDestruction()) { arg.error("cannot pass types that need destruction as variadic arguments"); err = true; } // Convert static arrays to dynamic arrays // BUG: I don't think this is right for D2 Type tb = arg.type.toBasetype(); if (tb.ty == Tsarray) { TypeSArray ts = cast(TypeSArray)tb; Type ta = ts.next.arrayOf(); if (ts.size(arg.loc) == 0) arg = new NullExp(arg.loc, ta); else arg = arg.castTo(sc, ta); } if (tb.ty == Tstruct) { //arg = callCpCtor(sc, arg); } // Give error for overloaded function addresses if (arg.op == TOK.symbolOffset) { SymOffExp se = cast(SymOffExp)arg; if (se.hasOverloads && !se.var.isFuncDeclaration().isUnique()) { arg.error("function `%s` is overloaded", arg.toChars()); err = true; } } if (arg.checkValue()) err = true; arg = arg.optimize(WANTvalue); } (*arguments)[i] = arg; } /* Remaining problems: * 1. order of evaluation - some function push L-to-R, others R-to-L. Until we resolve what array assignment does (which is * implemented by calling a function) we'll defer this for now. * 2. value structs (or static arrays of them) that need to be copy constructed * 3. value structs (or static arrays of them) that have destructors, and subsequent arguments that may throw before the * function gets called (functions normally destroy their parameters) * 2 and 3 are handled by doing the argument construction in 'eprefix' so that if a later argument throws, they are cleaned * up properly. Pushing arguments on the stack then cannot fail. */ if (1) { /* TODO: tackle problem 1) */ const bool leftToRight = true; // TODO: something like !fd.isArrayOp if (!leftToRight) assert(nargs == nparams); // no variadics for RTL order, as they would probably be evaluated LTR and so add complexity const ptrdiff_t start = (leftToRight ? 0 : cast(ptrdiff_t)nargs - 1); const ptrdiff_t end = (leftToRight ? cast(ptrdiff_t)nargs : -1); const ptrdiff_t step = (leftToRight ? 1 : -1); /* Compute indices of last throwing argument and first arg needing destruction. * Used to not set up destructors unless an arg needs destruction on a throw * in a later argument. */ ptrdiff_t lastthrow = -1; ptrdiff_t firstdtor = -1; for (ptrdiff_t i = start; i != end; i += step) { Expression arg = (*arguments)[i]; if (canThrow(arg, sc.func, false)) lastthrow = i; if (firstdtor == -1 && arg.type.needsDestruction()) { Parameter p = (i >= nparams ? null : Parameter.getNth(tf.parameters, i)); if (!(p && (p.storageClass & (STC.lazy_ | STC.ref_ | STC.out_)))) firstdtor = i; } } /* Does problem 3) apply to this call? */ const bool needsPrefix = (firstdtor >= 0 && lastthrow >= 0 && (lastthrow - firstdtor) * step > 0); /* If so, initialize 'eprefix' by declaring the gate */ VarDeclaration gate = null; if (needsPrefix) { // eprefix => bool __gate [= false] Identifier idtmp = Identifier.generateId("__gate"); gate = new VarDeclaration(loc, Type.tbool, idtmp, null); gate.storage_class |= STC.temp | STC.ctfe | STC.volatile_; gate.dsymbolSemantic(sc); auto ae = new DeclarationExp(loc, gate); eprefix = ae.expressionSemantic(sc); } for (ptrdiff_t i = start; i != end; i += step) { Expression arg = (*arguments)[i]; Parameter parameter = (i >= nparams ? null : Parameter.getNth(tf.parameters, i)); const bool isRef = (parameter && (parameter.storageClass & (STC.ref_ | STC.out_))); const bool isLazy = (parameter && (parameter.storageClass & STC.lazy_)); /* Skip lazy parameters */ if (isLazy) continue; /* Do we have a gate? Then we have a prefix and we're not yet past the last throwing arg. * Declare a temporary variable for this arg and append that declaration to 'eprefix', * which will implicitly take care of potential problem 2) for this arg. * 'eprefix' will therefore finally contain all args up to and including the last * potentially throwing arg, excluding all lazy parameters. */ if (gate) { const bool needsDtor = (!isRef && arg.type.needsDestruction() && i != lastthrow); /* Declare temporary 'auto __pfx = arg' (needsDtor) or 'auto __pfy = arg' (!needsDtor) */ auto tmp = copyToTemp(0, needsDtor ? "__pfx" : "__pfy", !isRef ? arg : arg.addressOf()); tmp.dsymbolSemantic(sc); /* Modify the destructor so it only runs if gate==false, i.e., * only if there was a throw while constructing the args */ if (!needsDtor) { if (tmp.edtor) { assert(i == lastthrow); tmp.edtor = null; } } else { // edtor => (__gate || edtor) assert(tmp.edtor); Expression e = tmp.edtor; e = new LogicalExp(e.loc, TOK.orOr, new VarExp(e.loc, gate), e); tmp.edtor = e.expressionSemantic(sc); //printf("edtor: %s\n", tmp.edtor.toChars()); } // eprefix => (eprefix, auto __pfx/y = arg) auto ae = new DeclarationExp(loc, tmp); eprefix = Expression.combine(eprefix, ae.expressionSemantic(sc)); // arg => __pfx/y arg = new VarExp(loc, tmp); arg = arg.expressionSemantic(sc); if (isRef) { arg = new PtrExp(loc, arg); arg = arg.expressionSemantic(sc); } /* Last throwing arg? Then finalize eprefix => (eprefix, gate = true), * i.e., disable the dtors right after constructing the last throwing arg. * From now on, the callee will take care of destructing the args because * the args are implicitly moved into function parameters. * * Set gate to null to let the next iterations know they don't need to * append to eprefix anymore. */ if (i == lastthrow) { auto e = new AssignExp(gate.loc, new VarExp(gate.loc, gate), new IntegerExp(gate.loc, 1, Type.tbool)); eprefix = Expression.combine(eprefix, e.expressionSemantic(sc)); gate = null; } } else { /* No gate, no prefix to append to. * Handle problem 2) by calling the copy constructor for value structs * (or static arrays of them) if appropriate. */ Type tv = arg.type.baseElemOf(); if (!isRef && tv.ty == Tstruct) arg = doCopyOrMove(sc, arg); } (*arguments)[i] = arg; } } //if (eprefix) printf("eprefix: %s\n", eprefix.toChars()); // If D linkage and variadic, add _arguments[] as first argument if (tf.linkage == LINK.d && tf.varargs == 1) { assert(arguments.dim >= nparams); auto args = new Parameters(); args.setDim(arguments.dim - nparams); for (size_t i = 0; i < arguments.dim - nparams; i++) { auto arg = new Parameter(STC.in_, (*arguments)[nparams + i].type, null, null); (*args)[i] = arg; } auto tup = new TypeTuple(args); Expression e = new TypeidExp(loc, tup); e = e.expressionSemantic(sc); arguments.insert(0, e); } Type tret = tf.next; if (isCtorCall) { //printf("[%s] fd = %s %s, %d %d %d\n", loc.toChars(), fd.toChars(), fd.type.toChars(), // wildmatch, tf.isWild(), fd.isReturnIsolated()); if (!tthis) { assert(sc.intypeof || global.errors); tthis = fd.isThis().type.addMod(fd.type.mod); } if (tf.isWild() && !fd.isReturnIsolated()) { if (wildmatch) tret = tret.substWildTo(wildmatch); int offset; if (!tret.implicitConvTo(tthis) && !(MODimplicitConv(tret.mod, tthis.mod) && tret.isBaseOf(tthis, &offset) && offset == 0)) { const(char)* s1 = tret.isNaked() ? " mutable" : tret.modToChars(); const(char)* s2 = tthis.isNaked() ? " mutable" : tthis.modToChars(); .error(loc, "`inout` constructor `%s` creates%s object, not%s", fd.toPrettyChars(), s1, s2); err = true; } } tret = tthis; } else if (wildmatch && tret) { /* Adjust function return type based on wildmatch */ //printf("wildmatch = x%x, tret = %s\n", wildmatch, tret.toChars()); tret = tret.substWildTo(wildmatch); } *prettype = tret; *peprefix = eprefix; return (err || olderrors != global.errors); } private Module loadStdMath() { static __gshared Import impStdMath = null; if (!impStdMath) { auto a = new Identifiers(); a.push(Id.std); auto s = new Import(Loc.initial, a, Id.math, null, false); s.load(null); if (s.mod) { s.mod.importAll(null); s.mod.dsymbolSemantic(null); } impStdMath = s; } return impStdMath.mod; } private extern (C++) final class ExpressionSemanticVisitor : Visitor { alias visit = Visitor.visit; Scope* sc; Expression result; this(Scope* sc) { this.sc = sc; } private void setError() { result = new ErrorExp(); } /************************** * Semantically analyze Expression. * Determine types, fold constants, etc. */ override void visit(Expression e) { static if (LOGSEMANTIC) { printf("Expression::semantic() %s\n", e.toChars()); } if (e.type) e.type = e.type.typeSemantic(e.loc, sc); else e.type = Type.tvoid; result = e; } override void visit(IntegerExp e) { assert(e.type); if (e.type.ty == Terror) return setError(); assert(e.type.deco); e.normalize(); result = e; } override void visit(RealExp e) { if (!e.type) e.type = Type.tfloat64; else e.type = e.type.typeSemantic(e.loc, sc); result = e; } override void visit(ComplexExp e) { if (!e.type) e.type = Type.tcomplex80; else e.type = e.type.typeSemantic(e.loc, sc); result = e; } override void visit(IdentifierExp exp) { static if (LOGSEMANTIC) { printf("IdentifierExp::semantic('%s')\n", exp.ident.toChars()); } if (exp.type) // This is used as the dummy expression { result = exp; return; } Dsymbol scopesym; Dsymbol s = sc.search(exp.loc, exp.ident, &scopesym); if (s) { if (s.errors) return setError(); Expression e; /* See if the symbol was a member of an enclosing 'with' */ WithScopeSymbol withsym = scopesym.isWithScopeSymbol(); if (withsym && withsym.withstate.wthis) { /* Disallow shadowing */ // First find the scope of the with Scope* scwith = sc; while (scwith.scopesym != scopesym) { scwith = scwith.enclosing; assert(scwith); } // Look at enclosing scopes for symbols with the same name, // in the same function for (Scope* scx = scwith; scx && scx.func == scwith.func; scx = scx.enclosing) { Dsymbol s2; if (scx.scopesym && scx.scopesym.symtab && (s2 = scx.scopesym.symtab.lookup(s.ident)) !is null && s != s2) { exp.error("with symbol `%s` is shadowing local symbol `%s`", s.toPrettyChars(), s2.toPrettyChars()); return setError(); } } s = s.toAlias(); // Same as wthis.ident // TODO: DotIdExp.semantic will find 'ident' from 'wthis' again. // The redudancy should be removed. e = new VarExp(exp.loc, withsym.withstate.wthis); e = new DotIdExp(exp.loc, e, exp.ident); e = e.expressionSemantic(sc); } else { if (withsym) { Declaration d = s.isDeclaration(); if (d) checkAccess(exp.loc, sc, null, d); } /* If f is really a function template, * then replace f with the function template declaration. */ FuncDeclaration f = s.isFuncDeclaration(); if (f) { TemplateDeclaration td = getFuncTemplateDecl(f); if (td) { if (td.overroot) // if not start of overloaded list of TemplateDeclaration's td = td.overroot; // then get the start e = new TemplateExp(exp.loc, td, f); e = e.expressionSemantic(sc); result = e; return; } } // Haven't done overload resolution yet, so pass 1 e = resolve(exp.loc, sc, s, true); } result = e; return; } if (hasThis(sc)) { AggregateDeclaration ad = sc.getStructClassScope(); if (ad && ad.aliasthis) { Expression e; e = new IdentifierExp(exp.loc, Id.This); e = new DotIdExp(exp.loc, e, ad.aliasthis.ident); e = new DotIdExp(exp.loc, e, exp.ident); e = e.trySemantic(sc); if (e) { result = e; return; } } } if (exp.ident == Id.ctfe) { if (sc.flags & SCOPE.ctfe) { exp.error("variable `__ctfe` cannot be read at compile time"); return setError(); } // Create the magic __ctfe bool variable auto vd = new VarDeclaration(exp.loc, Type.tbool, Id.ctfe, null); vd.storage_class |= STC.temp; vd.semanticRun = PASS.semanticdone; Expression e = new VarExp(exp.loc, vd); e = e.expressionSemantic(sc); result = e; return; } // If we've reached this point and are inside a with() scope then we may // try one last attempt by checking whether the 'wthis' object supports // dynamic dispatching via opDispatch. // This is done by rewriting this expression as wthis.ident. // The innermost with() scope of the hierarchy to satisfy the condition // above wins. // https://issues.dlang.org/show_bug.cgi?id=6400 for (Scope* sc2 = sc; sc2; sc2 = sc2.enclosing) { if (!sc2.scopesym) continue; if (auto ss = sc2.scopesym.isWithScopeSymbol()) { if (ss.withstate.wthis) { Expression e; e = new VarExp(exp.loc, ss.withstate.wthis); e = new DotIdExp(exp.loc, e, exp.ident); e = e.trySemantic(sc); if (e) { result = e; return; } } } } /* Look for what user might have meant */ if (const n = importHint(exp.ident.toChars())) exp.error("`%s` is not defined, perhaps `import %s;` is needed?", exp.ident.toChars(), n); else if (auto s2 = sc.search_correct(exp.ident)) exp.error("undefined identifier `%s`, did you mean %s `%s`?", exp.ident.toChars(), s2.kind(), s2.toChars()); else if (const p = Scope.search_correct_C(exp.ident)) exp.error("undefined identifier `%s`, did you mean `%s`?", exp.ident.toChars(), p); else exp.error("undefined identifier `%s`", exp.ident.toChars()); result = new ErrorExp(); } override void visit(DsymbolExp e) { result = resolve(e.loc, sc, e.s, e.hasOverloads); } override void visit(ThisExp e) { static if (LOGSEMANTIC) { printf("ThisExp::semantic()\n"); } if (e.type) { result = e; return; } FuncDeclaration fd = hasThis(sc); // fd is the uplevel function with the 'this' variable /* Special case for typeof(this) and typeof(super) since both * should work even if they are not inside a non-static member function */ if (!fd && sc.intypeof == 1) { // Find enclosing struct or class for (Dsymbol s = sc.getStructClassScope(); 1; s = s.parent) { if (!s) { e.error("`%s` is not in a class or struct scope", e.toChars()); goto Lerr; } ClassDeclaration cd = s.isClassDeclaration(); if (cd) { e.type = cd.type; result = e; return; } StructDeclaration sd = s.isStructDeclaration(); if (sd) { e.type = sd.type; result = e; return; } } } if (!fd) goto Lerr; assert(fd.vthis); e.var = fd.vthis; assert(e.var.parent); e.type = e.var.type; if (e.var.checkNestedReference(sc, e.loc)) return setError(); if (!sc.intypeof) sc.ctorflow.callSuper |= CSX.this_; result = e; return; Lerr: e.error("`this` is only defined in non-static member functions, not `%s`", sc.parent.toChars()); result = new ErrorExp(); } override void visit(SuperExp e) { static if (LOGSEMANTIC) { printf("SuperExp::semantic('%s')\n", e.toChars()); } if (e.type) { result = e; return; } FuncDeclaration fd = hasThis(sc); ClassDeclaration cd; Dsymbol s; /* Special case for typeof(this) and typeof(super) since both * should work even if they are not inside a non-static member function */ if (!fd && sc.intypeof == 1) { // Find enclosing class for (s = sc.getStructClassScope(); 1; s = s.parent) { if (!s) { e.error("`%s` is not in a class scope", e.toChars()); goto Lerr; } cd = s.isClassDeclaration(); if (cd) { cd = cd.baseClass; if (!cd) { e.error("class `%s` has no `super`", s.toChars()); goto Lerr; } e.type = cd.type; result = e; return; } } } if (!fd) goto Lerr; e.var = fd.vthis; assert(e.var && e.var.parent); s = fd.toParent(); while (s && s.isTemplateInstance()) s = s.toParent(); if (s.isTemplateDeclaration()) // allow inside template constraint s = s.toParent(); assert(s); cd = s.isClassDeclaration(); //printf("parent is %s %s\n", fd.toParent().kind(), fd.toParent().toChars()); if (!cd) goto Lerr; if (!cd.baseClass) { e.error("no base class for `%s`", cd.toChars()); e.type = e.var.type; } else { e.type = cd.baseClass.type; e.type = e.type.castMod(e.var.type.mod); } if (e.var.checkNestedReference(sc, e.loc)) return setError(); if (!sc.intypeof) sc.ctorflow.callSuper |= CSX.super_; result = e; return; Lerr: e.error("`super` is only allowed in non-static class member functions"); result = new ErrorExp(); } override void visit(NullExp e) { static if (LOGSEMANTIC) { printf("NullExp::semantic('%s')\n", e.toChars()); } // NULL is the same as (void *)0 if (e.type) { result = e; return; } e.type = Type.tnull; result = e; } override void visit(StringExp e) { static if (LOGSEMANTIC) { printf("StringExp::semantic() %s\n", e.toChars()); } if (e.type) { result = e; return; } OutBuffer buffer; size_t newlen = 0; const(char)* p; size_t u; dchar c; switch (e.postfix) { case 'd': for (u = 0; u < e.len;) { p = utf_decodeChar(e.string, e.len, u, c); if (p) { e.error("%s", p); return setError(); } else { buffer.write4(c); newlen++; } } buffer.write4(0); e.dstring = cast(dchar*)buffer.extractData(); e.len = newlen; e.sz = 4; e.type = new TypeDArray(Type.tdchar.immutableOf()); e.committed = 1; break; case 'w': for (u = 0; u < e.len;) { p = utf_decodeChar(e.string, e.len, u, c); if (p) { e.error("%s", p); return setError(); } else { buffer.writeUTF16(c); newlen++; if (c >= 0x10000) newlen++; } } buffer.writeUTF16(0); e.wstring = cast(wchar*)buffer.extractData(); e.len = newlen; e.sz = 2; e.type = new TypeDArray(Type.twchar.immutableOf()); e.committed = 1; break; case 'c': e.committed = 1; goto default; default: e.type = new TypeDArray(Type.tchar.immutableOf()); break; } e.type = e.type.typeSemantic(e.loc, sc); //type = type.immutableOf(); //printf("type = %s\n", type.toChars()); result = e; } override void visit(TupleExp exp) { static if (LOGSEMANTIC) { printf("+TupleExp::semantic(%s)\n", exp.toChars()); } if (exp.type) { result = exp; return; } if (exp.e0) exp.e0 = exp.e0.expressionSemantic(sc); // Run semantic() on each argument bool err = false; for (size_t i = 0; i < exp.exps.dim; i++) { Expression e = (*exp.exps)[i]; e = e.expressionSemantic(sc); if (!e.type) { exp.error("`%s` has no value", e.toChars()); err = true; } else if (e.op == TOK.error) err = true; else (*exp.exps)[i] = e; } if (err) return setError(); expandTuples(exp.exps); exp.type = new TypeTuple(exp.exps); exp.type = exp.type.typeSemantic(exp.loc, sc); //printf("-TupleExp::semantic(%s)\n", toChars()); result = exp; } override void visit(ArrayLiteralExp e) { static if (LOGSEMANTIC) { printf("ArrayLiteralExp::semantic('%s')\n", e.toChars()); } if (e.type) { result = e; return; } /* Perhaps an empty array literal [ ] should be rewritten as null? */ if (e.basis) e.basis = e.basis.expressionSemantic(sc); if (arrayExpressionSemantic(e.elements, sc) || (e.basis && e.basis.op == TOK.error)) return setError(); expandTuples(e.elements); Type t0; if (e.basis) e.elements.push(e.basis); bool err = arrayExpressionToCommonType(sc, e.elements, &t0); if (e.basis) e.basis = e.elements.pop(); if (err) return setError(); e.type = t0.arrayOf(); e.type = e.type.typeSemantic(e.loc, sc); /* Disallow array literals of type void being used. */ if (e.elements.dim > 0 && t0.ty == Tvoid) { e.error("`%s` of type `%s` has no value", e.toChars(), e.type.toChars()); return setError(); } semanticTypeInfo(sc, e.type); result = e; } override void visit(AssocArrayLiteralExp e) { static if (LOGSEMANTIC) { printf("AssocArrayLiteralExp::semantic('%s')\n", e.toChars()); } if (e.type) { result = e; return; } // Run semantic() on each element bool err_keys = arrayExpressionSemantic(e.keys, sc); bool err_vals = arrayExpressionSemantic(e.values, sc); if (err_keys || err_vals) return setError(); expandTuples(e.keys); expandTuples(e.values); if (e.keys.dim != e.values.dim) { e.error("number of keys is %u, must match number of values %u", e.keys.dim, e.values.dim); return setError(); } Type tkey = null; Type tvalue = null; err_keys = arrayExpressionToCommonType(sc, e.keys, &tkey); err_vals = arrayExpressionToCommonType(sc, e.values, &tvalue); if (err_keys || err_vals) return setError(); if (tkey == Type.terror || tvalue == Type.terror) return setError(); e.type = new TypeAArray(tvalue, tkey); e.type = e.type.typeSemantic(e.loc, sc); semanticTypeInfo(sc, e.type); if (global.params.vsafe) { if (checkAssocArrayLiteralEscape(sc, e, false)) return setError(); } result = e; } override void visit(StructLiteralExp e) { static if (LOGSEMANTIC) { printf("StructLiteralExp::semantic('%s')\n", e.toChars()); } if (e.type) { result = e; return; } e.sd.size(e.loc); if (e.sd.sizeok != Sizeok.done) return setError(); // run semantic() on each element if (arrayExpressionSemantic(e.elements, sc)) return setError(); expandTuples(e.elements); /* Fit elements[] to the corresponding type of field[]. */ if (!e.sd.fit(e.loc, sc, e.elements, e.stype)) return setError(); /* Fill out remainder of elements[] with default initializers for fields[] */ if (!e.sd.fill(e.loc, e.elements, false)) { /* An error in the initializer needs to be recorded as an error * in the enclosing function or template, since the initializer * will be part of the stuct declaration. */ global.increaseErrorCount(); return setError(); } if (checkFrameAccess(e.loc, sc, e.sd, e.elements.dim)) return setError(); e.type = e.stype ? e.stype : e.sd.type; result = e; } override void visit(TypeExp exp) { if (exp.type.ty == Terror) return setError(); //printf("TypeExp::semantic(%s)\n", type.toChars()); Expression e; Type t; Dsymbol s; exp.type.resolve(exp.loc, sc, &e, &t, &s, true); if (e) { //printf("e = %s %s\n", Token::toChars(e.op), e.toChars()); e = e.expressionSemantic(sc); } else if (t) { //printf("t = %d %s\n", t.ty, t.toChars()); exp.type = t.typeSemantic(exp.loc, sc); e = exp; } else if (s) { //printf("s = %s %s\n", s.kind(), s.toChars()); e = resolve(exp.loc, sc, s, true); } else assert(0); if (global.params.vcomplex) exp.type.checkComplexTransition(exp.loc, sc); result = e; } override void visit(ScopeExp exp) { static if (LOGSEMANTIC) { printf("+ScopeExp::semantic(%p '%s')\n", exp, exp.toChars()); } if (exp.type) { result = exp; return; } ScopeDsymbol sds2 = exp.sds; TemplateInstance ti = sds2.isTemplateInstance(); while (ti) { WithScopeSymbol withsym; if (!ti.findTempDecl(sc, &withsym) || !ti.semanticTiargs(sc)) return setError(); if (withsym && withsym.withstate.wthis) { Expression e = new VarExp(exp.loc, withsym.withstate.wthis); e = new DotTemplateInstanceExp(exp.loc, e, ti); result = e.expressionSemantic(sc); return; } if (ti.needsTypeInference(sc)) { if (TemplateDeclaration td = ti.tempdecl.isTemplateDeclaration()) { Dsymbol p = td.toParent2(); FuncDeclaration fdthis = hasThis(sc); AggregateDeclaration ad = p ? p.isAggregateDeclaration() : null; if (fdthis && ad && isAggregate(fdthis.vthis.type) == ad && (td._scope.stc & STC.static_) == 0) { Expression e = new DotTemplateInstanceExp(exp.loc, new ThisExp(exp.loc), ti.name, ti.tiargs); result = e.expressionSemantic(sc); return; } } else if (OverloadSet os = ti.tempdecl.isOverloadSet()) { FuncDeclaration fdthis = hasThis(sc); AggregateDeclaration ad = os.parent.isAggregateDeclaration(); if (fdthis && ad && isAggregate(fdthis.vthis.type) == ad) { Expression e = new DotTemplateInstanceExp(exp.loc, new ThisExp(exp.loc), ti.name, ti.tiargs); result = e.expressionSemantic(sc); return; } } // ti is an instance which requires IFTI. exp.sds = ti; exp.type = Type.tvoid; result = exp; return; } ti.dsymbolSemantic(sc); if (!ti.inst || ti.errors) return setError(); Dsymbol s = ti.toAlias(); if (s == ti) { exp.sds = ti; exp.type = Type.tvoid; result = exp; return; } sds2 = s.isScopeDsymbol(); if (sds2) { ti = sds2.isTemplateInstance(); //printf("+ sds2 = %s, '%s'\n", sds2.kind(), sds2.toChars()); continue; } if (auto v = s.isVarDeclaration()) { if (!v.type) { exp.error("forward reference of %s `%s`", v.kind(), v.toChars()); return setError(); } if ((v.storage_class & STC.manifest) && v._init) { /* When an instance that will be converted to a constant exists, * the instance representation "foo!tiargs" is treated like a * variable name, and its recursive appearance check (note that * it's equivalent with a recursive instantiation of foo) is done * separately from the circular initialization check for the * eponymous enum variable declaration. * * template foo(T) { * enum bool foo = foo; // recursive definition check (v.inuse) * } * template bar(T) { * enum bool bar = bar!T; // recursive instantiation check (ti.inuse) * } */ if (ti.inuse) { exp.error("recursive expansion of %s `%s`", ti.kind(), ti.toPrettyChars()); return setError(); } auto e = v.expandInitializer(exp.loc); ti.inuse++; e = e.expressionSemantic(sc); ti.inuse--; result = e; return; } } //printf("s = %s, '%s'\n", s.kind(), s.toChars()); auto e = resolve(exp.loc, sc, s, true); //printf("-1ScopeExp::semantic()\n"); result = e; return; } //printf("sds2 = %s, '%s'\n", sds2.kind(), sds2.toChars()); //printf("\tparent = '%s'\n", sds2.parent.toChars()); sds2.dsymbolSemantic(sc); // (Aggregate|Enum)Declaration if (auto t = sds2.getType()) { result = (new TypeExp(exp.loc, t)).expressionSemantic(sc); return; } if (auto td = sds2.isTemplateDeclaration()) { result = (new TemplateExp(exp.loc, td)).expressionSemantic(sc); return; } exp.sds = sds2; exp.type = Type.tvoid; //printf("-2ScopeExp::semantic() %s\n", toChars()); result = exp; } override void visit(NewExp exp) { static if (LOGSEMANTIC) { printf("NewExp::semantic() %s\n", exp.toChars()); if (exp.thisexp) printf("\tthisexp = %s\n", exp.thisexp.toChars()); printf("\tnewtype: %s\n", exp.newtype.toChars()); } if (exp.type) // if semantic() already run { result = exp; return; } // https://issues.dlang.org/show_bug.cgi?id=11581 // With the syntax `new T[edim]` or `thisexp.new T[edim]`, // T should be analyzed first and edim should go into arguments iff it's // not a tuple. Expression edim = null; if (!exp.arguments && exp.newtype.ty == Tsarray) { edim = (cast(TypeSArray)exp.newtype).dim; exp.newtype = (cast(TypeNext)exp.newtype).next; } ClassDeclaration cdthis = null; if (exp.thisexp) { exp.thisexp = exp.thisexp.expressionSemantic(sc); if (exp.thisexp.op == TOK.error) return setError(); cdthis = exp.thisexp.type.isClassHandle(); if (!cdthis) { exp.error("`this` for nested class must be a class type, not `%s`", exp.thisexp.type.toChars()); return setError(); } sc = sc.push(cdthis); exp.type = exp.newtype.typeSemantic(exp.loc, sc); sc = sc.pop(); } else { exp.type = exp.newtype.typeSemantic(exp.loc, sc); } if (exp.type.ty == Terror) return setError(); if (edim) { if (exp.type.toBasetype().ty == Ttuple) { // --> new T[edim] exp.type = new TypeSArray(exp.type, edim); exp.type = exp.type.typeSemantic(exp.loc, sc); if (exp.type.ty == Terror) return setError(); } else { // --> new T[](edim) exp.arguments = new Expressions(); exp.arguments.push(edim); exp.type = exp.type.arrayOf(); } } exp.newtype = exp.type; // in case type gets cast to something else Type tb = exp.type.toBasetype(); //printf("tb: %s, deco = %s\n", tb.toChars(), tb.deco); if (arrayExpressionSemantic(exp.newargs, sc) || preFunctionParameters(sc, exp.newargs)) { return setError(); } if (arrayExpressionSemantic(exp.arguments, sc) || preFunctionParameters(sc, exp.arguments)) { return setError(); } if (exp.thisexp && tb.ty != Tclass) { exp.error("`.new` is only for allocating nested classes, not `%s`", tb.toChars()); return setError(); } size_t nargs = exp.arguments ? exp.arguments.dim : 0; Expression newprefix = null; if (tb.ty == Tclass) { auto cd = (cast(TypeClass)tb).sym; cd.size(exp.loc); if (cd.sizeok != Sizeok.done) return setError(); if (!cd.ctor) cd.ctor = cd.searchCtor(); if (cd.noDefaultCtor && !nargs && !cd.defaultCtor) { exp.error("default construction is disabled for type `%s`", cd.type.toChars()); return setError(); } if (cd.isInterfaceDeclaration()) { exp.error("cannot create instance of interface `%s`", cd.toChars()); return setError(); } if (cd.isAbstract()) { exp.error("cannot create instance of abstract class `%s`", cd.toChars()); for (size_t i = 0; i < cd.vtbl.dim; i++) { FuncDeclaration fd = cd.vtbl[i].isFuncDeclaration(); if (fd && fd.isAbstract()) { errorSupplemental(exp.loc, "function `%s` is not implemented", fd.toFullSignature()); } } return setError(); } // checkDeprecated() is already done in newtype.typeSemantic(). if (cd.isNested()) { /* We need a 'this' pointer for the nested class. * Ensure we have the right one. */ Dsymbol s = cd.toParent2(); //printf("cd isNested, parent = %s '%s'\n", s.kind(), s.toPrettyChars()); if (auto cdn = s.isClassDeclaration()) { if (!cdthis) { // Supply an implicit 'this' and try again exp.thisexp = new ThisExp(exp.loc); for (Dsymbol sp = sc.parent; 1; sp = sp.parent) { if (!sp) { exp.error("outer class `%s` `this` needed to `new` nested class `%s`", cdn.toChars(), cd.toChars()); return setError(); } ClassDeclaration cdp = sp.isClassDeclaration(); if (!cdp) continue; if (cdp == cdn || cdn.isBaseOf(cdp, null)) break; // Add a '.outer' and try again exp.thisexp = new DotIdExp(exp.loc, exp.thisexp, Id.outer); } exp.thisexp = exp.thisexp.expressionSemantic(sc); if (exp.thisexp.op == TOK.error) return setError(); cdthis = exp.thisexp.type.isClassHandle(); } if (cdthis != cdn && !cdn.isBaseOf(cdthis, null)) { //printf("cdthis = %s\n", cdthis.toChars()); exp.error("`this` for nested class must be of type `%s`, not `%s`", cdn.toChars(), exp.thisexp.type.toChars()); return setError(); } if (!MODimplicitConv(exp.thisexp.type.mod, exp.newtype.mod)) { exp.error("nested type `%s` should have the same or weaker constancy as enclosing type `%s`", exp.newtype.toChars(), exp.thisexp.type.toChars()); return setError(); } } else if (exp.thisexp) { exp.error("`.new` is only for allocating nested classes"); return setError(); } else if (auto fdn = s.isFuncDeclaration()) { // make sure the parent context fdn of cd is reachable from sc if (!ensureStaticLinkTo(sc.parent, fdn)) { exp.error("outer function context of `%s` is needed to `new` nested class `%s`", fdn.toPrettyChars(), cd.toPrettyChars()); return setError(); } } else assert(0); } else if (exp.thisexp) { exp.error("`.new` is only for allocating nested classes"); return setError(); } if (cd.aggNew) { // Prepend the size argument to newargs[] Expression e = new IntegerExp(exp.loc, cd.size(exp.loc), Type.tsize_t); if (!exp.newargs) exp.newargs = new Expressions(); exp.newargs.shift(e); FuncDeclaration f = resolveFuncCall(exp.loc, sc, cd.aggNew, null, tb, exp.newargs); if (!f || f.errors) return setError(); checkFunctionAttributes(exp, sc, f); checkAccess(cd, exp.loc, sc, f); TypeFunction tf = cast(TypeFunction)f.type; Type rettype; if (functionParameters(exp.loc, sc, tf, null, exp.newargs, f, &rettype, &newprefix)) return setError(); exp.allocator = f.isNewDeclaration(); assert(exp.allocator); } else { if (exp.newargs && exp.newargs.dim) { exp.error("no allocator for `%s`", cd.toChars()); return setError(); } } if (cd.ctor) { FuncDeclaration f = resolveFuncCall(exp.loc, sc, cd.ctor, null, tb, exp.arguments, 0); if (!f || f.errors) return setError(); checkFunctionAttributes(exp, sc, f); checkAccess(cd, exp.loc, sc, f); TypeFunction tf = cast(TypeFunction)f.type; if (!exp.arguments) exp.arguments = new Expressions(); if (functionParameters(exp.loc, sc, tf, exp.type, exp.arguments, f, &exp.type, &exp.argprefix)) return setError(); exp.member = f.isCtorDeclaration(); assert(exp.member); } else { if (nargs) { exp.error("no constructor for `%s`", cd.toChars()); return setError(); } } } else if (tb.ty == Tstruct) { auto sd = (cast(TypeStruct)tb).sym; sd.size(exp.loc); if (sd.sizeok != Sizeok.done) return setError(); if (!sd.ctor) sd.ctor = sd.searchCtor(); if (sd.noDefaultCtor && !nargs) { exp.error("default construction is disabled for type `%s`", sd.type.toChars()); return setError(); } // checkDeprecated() is already done in newtype.typeSemantic(). if (sd.aggNew) { // Prepend the uint size argument to newargs[] Expression e = new IntegerExp(exp.loc, sd.size(exp.loc), Type.tsize_t); if (!exp.newargs) exp.newargs = new Expressions(); exp.newargs.shift(e); FuncDeclaration f = resolveFuncCall(exp.loc, sc, sd.aggNew, null, tb, exp.newargs); if (!f || f.errors) return setError(); checkFunctionAttributes(exp, sc, f); checkAccess(sd, exp.loc, sc, f); TypeFunction tf = cast(TypeFunction)f.type; Type rettype; if (functionParameters(exp.loc, sc, tf, null, exp.newargs, f, &rettype, &newprefix)) return setError(); exp.allocator = f.isNewDeclaration(); assert(exp.allocator); } else { if (exp.newargs && exp.newargs.dim) { exp.error("no allocator for `%s`", sd.toChars()); return setError(); } } if (sd.ctor && nargs) { FuncDeclaration f = resolveFuncCall(exp.loc, sc, sd.ctor, null, tb, exp.arguments, 0); if (!f || f.errors) return setError(); checkFunctionAttributes(exp, sc, f); checkAccess(sd, exp.loc, sc, f); TypeFunction tf = cast(TypeFunction)f.type; if (!exp.arguments) exp.arguments = new Expressions(); if (functionParameters(exp.loc, sc, tf, exp.type, exp.arguments, f, &exp.type, &exp.argprefix)) return setError(); exp.member = f.isCtorDeclaration(); assert(exp.member); if (checkFrameAccess(exp.loc, sc, sd, sd.fields.dim)) return setError(); } else { if (!exp.arguments) exp.arguments = new Expressions(); if (!sd.fit(exp.loc, sc, exp.arguments, tb)) return setError(); if (!sd.fill(exp.loc, exp.arguments, false)) return setError(); if (checkFrameAccess(exp.loc, sc, sd, exp.arguments ? exp.arguments.dim : 0)) return setError(); /* Since a `new` allocation may escape, check each of the arguments for escaping */ if (global.params.vsafe) { foreach (arg; *exp.arguments) { if (arg && checkNewEscape(sc, arg, false)) return setError(); } } } exp.type = exp.type.pointerTo(); } else if (tb.ty == Tarray && nargs) { Type tn = tb.nextOf().baseElemOf(); Dsymbol s = tn.toDsymbol(sc); AggregateDeclaration ad = s ? s.isAggregateDeclaration() : null; if (ad && ad.noDefaultCtor) { exp.error("default construction is disabled for type `%s`", tb.nextOf().toChars()); return setError(); } for (size_t i = 0; i < nargs; i++) { if (tb.ty != Tarray) { exp.error("too many arguments for array"); return setError(); } Expression arg = (*exp.arguments)[i]; arg = resolveProperties(sc, arg); arg = arg.implicitCastTo(sc, Type.tsize_t); arg = arg.optimize(WANTvalue); if (arg.op == TOK.int64 && cast(sinteger_t)arg.toInteger() < 0) { exp.error("negative array index `%s`", arg.toChars()); return setError(); } (*exp.arguments)[i] = arg; tb = (cast(TypeDArray)tb).next.toBasetype(); } } else if (tb.isscalar()) { if (!nargs) { } else if (nargs == 1) { Expression e = (*exp.arguments)[0]; e = e.implicitCastTo(sc, tb); (*exp.arguments)[0] = e; } else { exp.error("more than one argument for construction of `%s`", exp.type.toChars()); return setError(); } exp.type = exp.type.pointerTo(); } else { exp.error("new can only create structs, dynamic arrays or class objects, not `%s`'s", exp.type.toChars()); return setError(); } //printf("NewExp: '%s'\n", toChars()); //printf("NewExp:type '%s'\n", type.toChars()); semanticTypeInfo(sc, exp.type); if (newprefix) { result = Expression.combine(newprefix, exp); return; } result = exp; } override void visit(NewAnonClassExp e) { static if (LOGSEMANTIC) { printf("NewAnonClassExp::semantic() %s\n", e.toChars()); //printf("thisexp = %p\n", thisexp); //printf("type: %s\n", type.toChars()); } Expression d = new DeclarationExp(e.loc, e.cd); sc = sc.push(); // just create new scope sc.flags &= ~SCOPE.ctfe; // temporary stop CTFE d = d.expressionSemantic(sc); sc = sc.pop(); if (!e.cd.errors && sc.intypeof && !sc.parent.inNonRoot()) { ScopeDsymbol sds = sc.tinst ? cast(ScopeDsymbol)sc.tinst : sc._module; sds.members.push(e.cd); } Expression n = new NewExp(e.loc, e.thisexp, e.newargs, e.cd.type, e.arguments); Expression c = new CommaExp(e.loc, d, n); result = c.expressionSemantic(sc); } override void visit(SymOffExp e) { static if (LOGSEMANTIC) { printf("SymOffExp::semantic('%s')\n", e.toChars()); } //var.dsymbolSemantic(sc); if (!e.type) e.type = e.var.type.pointerTo(); if (auto v = e.var.isVarDeclaration()) { if (v.checkNestedReference(sc, e.loc)) return setError(); } else if (auto f = e.var.isFuncDeclaration()) { if (f.checkNestedReference(sc, e.loc)) return setError(); } result = e; } override void visit(VarExp e) { static if (LOGSEMANTIC) { printf("VarExp::semantic(%s)\n", e.toChars()); } if (auto fd = e.var.isFuncDeclaration()) { //printf("L%d fd = %s\n", __LINE__, f.toChars()); if (!fd.functionSemantic()) return setError(); } if (!e.type) e.type = e.var.type; if (e.type && !e.type.deco) e.type = e.type.typeSemantic(e.loc, sc); /* Fix for 1161 doesn't work because it causes protection * problems when instantiating imported templates passing private * variables as alias template parameters. */ //checkAccess(loc, sc, NULL, var); if (auto vd = e.var.isVarDeclaration()) { if (vd.checkNestedReference(sc, e.loc)) return setError(); // https://issues.dlang.org/show_bug.cgi?id=12025 // If the variable is not actually used in runtime code, // the purity violation error is redundant. //checkPurity(sc, vd); } else if (auto fd = e.var.isFuncDeclaration()) { // TODO: If fd isn't yet resolved its overload, the checkNestedReference // call would cause incorrect validation. // Maybe here should be moved in CallExp, or AddrExp for functions. if (fd.checkNestedReference(sc, e.loc)) return setError(); } else if (auto od = e.var.isOverDeclaration()) { e.type = Type.tvoid; // ambiguous type? } result = e; } override void visit(FuncExp exp) { static if (LOGSEMANTIC) { printf("FuncExp::semantic(%s)\n", exp.toChars()); if (exp.fd.treq) printf(" treq = %s\n", exp.fd.treq.toChars()); } if (exp.type) { result = exp; return; } Expression e = exp; uint olderrors; sc = sc.push(); // just create new scope sc.flags &= ~SCOPE.ctfe; // temporary stop CTFE sc.protection = Prot(Prot.Kind.public_); // https://issues.dlang.org/show_bug.cgi?id=12506 /* fd.treq might be incomplete type, * so should not semantic it. * void foo(T)(T delegate(int) dg){} * foo(a=>a); // in IFTI, treq == T delegate(int) */ //if (fd.treq) // fd.treq = fd.treq.dsymbolSemantic(loc, sc); exp.genIdent(sc); // Set target of return type inference if (exp.fd.treq && !exp.fd.type.nextOf()) { TypeFunction tfv = null; if (exp.fd.treq.ty == Tdelegate || (exp.fd.treq.ty == Tpointer && exp.fd.treq.nextOf().ty == Tfunction)) tfv = cast(TypeFunction)exp.fd.treq.nextOf(); if (tfv) { TypeFunction tfl = cast(TypeFunction)exp.fd.type; tfl.next = tfv.nextOf(); } } //printf("td = %p, treq = %p\n", td, fd.treq); if (exp.td) { assert(exp.td.parameters && exp.td.parameters.dim); exp.td.dsymbolSemantic(sc); exp.type = Type.tvoid; // temporary type if (exp.fd.treq) // defer type determination { FuncExp fe; if (exp.matchType(exp.fd.treq, sc, &fe) > MATCH.nomatch) e = fe; else e = new ErrorExp(); } goto Ldone; } olderrors = global.errors; exp.fd.dsymbolSemantic(sc); if (olderrors == global.errors) { exp.fd.semantic2(sc); if (olderrors == global.errors) exp.fd.semantic3(sc); } if (olderrors != global.errors) { if (exp.fd.type && exp.fd.type.ty == Tfunction && !exp.fd.type.nextOf()) (cast(TypeFunction)exp.fd.type).next = Type.terror; e = new ErrorExp(); goto Ldone; } // Type is a "delegate to" or "pointer to" the function literal if ((exp.fd.isNested() && exp.fd.tok == TOK.delegate_) || (exp.tok == TOK.reserved && exp.fd.treq && exp.fd.treq.ty == Tdelegate)) { exp.type = new TypeDelegate(exp.fd.type); exp.type = exp.type.typeSemantic(exp.loc, sc); exp.fd.tok = TOK.delegate_; } else { exp.type = new TypePointer(exp.fd.type); exp.type = exp.type.typeSemantic(exp.loc, sc); //type = fd.type.pointerTo(); /* A lambda expression deduced to function pointer might become * to a delegate literal implicitly. * * auto foo(void function() fp) { return 1; } * assert(foo({}) == 1); * * So, should keep fd.tok == TOKreserve if fd.treq == NULL. */ if (exp.fd.treq && exp.fd.treq.ty == Tpointer) { // change to non-nested exp.fd.tok = TOK.function_; exp.fd.vthis = null; } } exp.fd.tookAddressOf++; Ldone: sc = sc.pop(); result = e; } // used from CallExp::semantic() Expression callExpSemantic(FuncExp exp, Scope* sc, Expressions* arguments) { if ((!exp.type || exp.type == Type.tvoid) && exp.td && arguments && arguments.dim) { for (size_t k = 0; k < arguments.dim; k++) { Expression checkarg = (*arguments)[k]; if (checkarg.op == TOK.error) return checkarg; } exp.genIdent(sc); assert(exp.td.parameters && exp.td.parameters.dim); exp.td.dsymbolSemantic(sc); TypeFunction tfl = cast(TypeFunction)exp.fd.type; size_t dim = Parameter.dim(tfl.parameters); if (arguments.dim < dim) { // Default arguments are always typed, so they don't need inference. Parameter p = Parameter.getNth(tfl.parameters, arguments.dim); if (p.defaultArg) dim = arguments.dim; } if ((!tfl.varargs && arguments.dim == dim) || (tfl.varargs && arguments.dim >= dim)) { auto tiargs = new Objects(); tiargs.reserve(exp.td.parameters.dim); for (size_t i = 0; i < exp.td.parameters.dim; i++) { TemplateParameter tp = (*exp.td.parameters)[i]; for (size_t u = 0; u < dim; u++) { Parameter p = Parameter.getNth(tfl.parameters, u); if (p.type.ty == Tident && (cast(TypeIdentifier)p.type).ident == tp.ident) { Expression e = (*arguments)[u]; tiargs.push(e.type); u = dim; // break inner loop } } } auto ti = new TemplateInstance(exp.loc, exp.td, tiargs); return (new ScopeExp(exp.loc, ti)).expressionSemantic(sc); } exp.error("cannot infer function literal type"); return new ErrorExp(); } return exp.expressionSemantic(sc); } override void visit(CallExp exp) { static if (LOGSEMANTIC) { printf("CallExp::semantic() %s\n", exp.toChars()); } if (exp.type) { result = exp; return; // semantic() already run } version (none) { if (exp.arguments && exp.arguments.dim) { Expression earg = (*exp.arguments)[0]; earg.print(); if (earg.type) earg.type.print(); } } Type t1; Objects* tiargs = null; // initial list of template arguments Expression ethis = null; Type tthis = null; Expression e1org = exp.e1; if (exp.e1.op == TOK.comma) { /* Rewrite (a,b)(args) as (a,(b(args))) */ auto ce = cast(CommaExp)exp.e1; exp.e1 = ce.e2; ce.e2 = exp; result = ce.expressionSemantic(sc); return; } if (exp.e1.op == TOK.delegate_) { DelegateExp de = cast(DelegateExp)exp.e1; exp.e1 = new DotVarExp(de.loc, de.e1, de.func, de.hasOverloads); visit(exp); return; } if (exp.e1.op == TOK.function_) { if (arrayExpressionSemantic(exp.arguments, sc) || preFunctionParameters(sc, exp.arguments)) return setError(); // Run e1 semantic even if arguments have any errors FuncExp fe = cast(FuncExp)exp.e1; exp.e1 = callExpSemantic(fe, sc, exp.arguments); if (exp.e1.op == TOK.error) { result = exp.e1; return; } } if (Expression ex = resolveUFCS(sc, exp)) { result = ex; return; } /* This recognizes: * foo!(tiargs)(funcargs) */ if (exp.e1.op == TOK.scope_) { ScopeExp se = cast(ScopeExp)exp.e1; TemplateInstance ti = se.sds.isTemplateInstance(); if (ti) { /* Attempt to instantiate ti. If that works, go with it. * If not, go with partial explicit specialization. */ WithScopeSymbol withsym; if (!ti.findTempDecl(sc, &withsym) || !ti.semanticTiargs(sc)) return setError(); if (withsym && withsym.withstate.wthis) { exp.e1 = new VarExp(exp.e1.loc, withsym.withstate.wthis); exp.e1 = new DotTemplateInstanceExp(exp.e1.loc, exp.e1, ti); goto Ldotti; } if (ti.needsTypeInference(sc, 1)) { /* Go with partial explicit specialization */ tiargs = ti.tiargs; assert(ti.tempdecl); if (TemplateDeclaration td = ti.tempdecl.isTemplateDeclaration()) exp.e1 = new TemplateExp(exp.loc, td); else if (OverDeclaration od = ti.tempdecl.isOverDeclaration()) exp.e1 = new VarExp(exp.loc, od); else exp.e1 = new OverExp(exp.loc, ti.tempdecl.isOverloadSet()); } else { Expression e1x = exp.e1.expressionSemantic(sc); if (e1x.op == TOK.error) { result = e1x; return; } exp.e1 = e1x; } } } /* This recognizes: * expr.foo!(tiargs)(funcargs) */ Ldotti: if (exp.e1.op == TOK.dotTemplateInstance && !exp.e1.type) { DotTemplateInstanceExp se = cast(DotTemplateInstanceExp)exp.e1; TemplateInstance ti = se.ti; { /* Attempt to instantiate ti. If that works, go with it. * If not, go with partial explicit specialization. */ if (!se.findTempDecl(sc) || !ti.semanticTiargs(sc)) return setError(); if (ti.needsTypeInference(sc, 1)) { /* Go with partial explicit specialization */ tiargs = ti.tiargs; assert(ti.tempdecl); if (TemplateDeclaration td = ti.tempdecl.isTemplateDeclaration()) exp.e1 = new DotTemplateExp(exp.loc, se.e1, td); else if (OverDeclaration od = ti.tempdecl.isOverDeclaration()) { exp.e1 = new DotVarExp(exp.loc, se.e1, od, true); } else exp.e1 = new DotExp(exp.loc, se.e1, new OverExp(exp.loc, ti.tempdecl.isOverloadSet())); } else { Expression e1x = exp.e1.expressionSemantic(sc); if (e1x.op == TOK.error) { result = e1x; return; } exp.e1 = e1x; } } } Lagain: //printf("Lagain: %s\n", toChars()); exp.f = null; if (exp.e1.op == TOK.this_ || exp.e1.op == TOK.super_) { // semantic() run later for these } else { if (exp.e1.op == TOK.dotIdentifier) { DotIdExp die = cast(DotIdExp)exp.e1; exp.e1 = die.expressionSemantic(sc); /* Look for e1 having been rewritten to expr.opDispatch!(string) * We handle such earlier, so go back. * Note that in the rewrite, we carefully did not run semantic() on e1 */ if (exp.e1.op == TOK.dotTemplateInstance && !exp.e1.type) { goto Ldotti; } } else { static __gshared int nest; if (++nest > 500) { exp.error("recursive evaluation of `%s`", exp.toChars()); --nest; return setError(); } Expression ex = unaSemantic(exp, sc); --nest; if (ex) { result = ex; return; } } /* Look for e1 being a lazy parameter */ if (exp.e1.op == TOK.variable) { VarExp ve = cast(VarExp)exp.e1; if (ve.var.storage_class & STC.lazy_) { // lazy parameters can be called without violating purity and safety Type tw = ve.var.type; Type tc = ve.var.type.substWildTo(MODFlags.const_); auto tf = new TypeFunction(null, tc, 0, LINK.d, STC.safe | STC.pure_); (tf = cast(TypeFunction)tf.typeSemantic(exp.loc, sc)).next = tw; // hack for bug7757 auto t = new TypeDelegate(tf); ve.type = t.typeSemantic(exp.loc, sc); } VarDeclaration v = ve.var.isVarDeclaration(); if (v && ve.checkPurity(sc, v)) return setError(); } if (exp.e1.op == TOK.symbolOffset && (cast(SymOffExp)exp.e1).hasOverloads) { SymOffExp se = cast(SymOffExp)exp.e1; exp.e1 = new VarExp(se.loc, se.var, true); exp.e1 = exp.e1.expressionSemantic(sc); } else if (exp.e1.op == TOK.dot) { DotExp de = cast(DotExp)exp.e1; if (de.e2.op == TOK.overloadSet) { ethis = de.e1; tthis = de.e1.type; exp.e1 = de.e2; } } else if (exp.e1.op == TOK.star && exp.e1.type.ty == Tfunction) { // Rewrite (*fp)(arguments) to fp(arguments) exp.e1 = (cast(PtrExp)exp.e1).e1; } } t1 = exp.e1.type ? exp.e1.type.toBasetype() : null; if (exp.e1.op == TOK.error) { result = exp.e1; return; } if (arrayExpressionSemantic(exp.arguments, sc) || preFunctionParameters(sc, exp.arguments)) return setError(); // Check for call operator overload if (t1) { if (t1.ty == Tstruct) { auto sd = (cast(TypeStruct)t1).sym; sd.size(exp.loc); // Resolve forward references to construct object if (sd.sizeok != Sizeok.done) return setError(); if (!sd.ctor) sd.ctor = sd.searchCtor(); // First look for constructor if (exp.e1.op == TOK.type && sd.ctor) { if (!sd.noDefaultCtor && !(exp.arguments && exp.arguments.dim)) goto Lx; auto sle = new StructLiteralExp(exp.loc, sd, null, exp.e1.type); if (!sd.fill(exp.loc, sle.elements, true)) return setError(); if (checkFrameAccess(exp.loc, sc, sd, sle.elements.dim)) return setError(); // https://issues.dlang.org/show_bug.cgi?id=14556 // Set concrete type to avoid further redundant semantic(). sle.type = exp.e1.type; /* Constructor takes a mutable object, so don't use * the immutable initializer symbol. */ sle.useStaticInit = false; Expression e = sle; if (auto cf = sd.ctor.isCtorDeclaration()) { e = new DotVarExp(exp.loc, e, cf, true); } else if (auto td = sd.ctor.isTemplateDeclaration()) { e = new DotTemplateExp(exp.loc, e, td); } else if (auto os = sd.ctor.isOverloadSet()) { e = new DotExp(exp.loc, e, new OverExp(exp.loc, os)); } else assert(0); e = new CallExp(exp.loc, e, exp.arguments); e = e.expressionSemantic(sc); result = e; return; } // No constructor, look for overload of opCall if (search_function(sd, Id.call)) goto L1; // overload of opCall, therefore it's a call if (exp.e1.op != TOK.type) { if (sd.aliasthis && exp.e1.type != exp.att1) { if (!exp.att1 && exp.e1.type.checkAliasThisRec()) exp.att1 = exp.e1.type; exp.e1 = resolveAliasThis(sc, exp.e1); goto Lagain; } exp.error("%s `%s` does not overload ()", sd.kind(), sd.toChars()); return setError(); } /* It's a struct literal */ Lx: Expression e = new StructLiteralExp(exp.loc, sd, exp.arguments, exp.e1.type); e = e.expressionSemantic(sc); result = e; return; } else if (t1.ty == Tclass) { L1: // Rewrite as e1.call(arguments) Expression e = new DotIdExp(exp.loc, exp.e1, Id.call); e = new CallExp(exp.loc, e, exp.arguments); e = e.expressionSemantic(sc); result = e; return; } else if (exp.e1.op == TOK.type && t1.isscalar()) { Expression e; // Make sure to use the the enum type itself rather than its // base type // https://issues.dlang.org/show_bug.cgi?id=16346 if (exp.e1.type.ty == Tenum) { t1 = exp.e1.type; } if (!exp.arguments || exp.arguments.dim == 0) { e = t1.defaultInitLiteral(exp.loc); } else if (exp.arguments.dim == 1) { e = (*exp.arguments)[0]; e = e.implicitCastTo(sc, t1); e = new CastExp(exp.loc, e, t1); } else { exp.error("more than one argument for construction of `%s`", t1.toChars()); return setError(); } e = e.expressionSemantic(sc); result = e; return; } } static FuncDeclaration resolveOverloadSet(Loc loc, Scope* sc, OverloadSet os, Objects* tiargs, Type tthis, Expressions* arguments) { FuncDeclaration f = null; foreach (s; os.a) { if (tiargs && s.isFuncDeclaration()) continue; if (auto f2 = resolveFuncCall(loc, sc, s, tiargs, tthis, arguments, 1)) { if (f2.errors) return null; if (f) { /* Error if match in more than one overload set, * even if one is a 'better' match than the other. */ ScopeDsymbol.multiplyDefined(loc, f, f2); } else f = f2; } } if (!f) .error(loc, "no overload matches for `%s`", os.toChars()); else if (f.errors) f = null; return f; } if (exp.e1.op == TOK.dotVariable && t1.ty == Tfunction || exp.e1.op == TOK.dotTemplateDeclaration) { UnaExp ue = cast(UnaExp)exp.e1; Expression ue1 = ue.e1; Expression ue1old = ue1; // need for 'right this' check VarDeclaration v; if (ue1.op == TOK.variable && (v = (cast(VarExp)ue1).var.isVarDeclaration()) !is null && v.needThis()) { ue.e1 = new TypeExp(ue1.loc, ue1.type); ue1 = null; } DotVarExp dve; DotTemplateExp dte; Dsymbol s; if (exp.e1.op == TOK.dotVariable) { dve = cast(DotVarExp)exp.e1; dte = null; s = dve.var; tiargs = null; } else { dve = null; dte = cast(DotTemplateExp)exp.e1; s = dte.td; } // Do overload resolution exp.f = resolveFuncCall(exp.loc, sc, s, tiargs, ue1 ? ue1.type : null, exp.arguments); if (!exp.f || exp.f.errors || exp.f.type.ty == Terror) return setError(); if (exp.f.interfaceVirtual) { /* Cast 'this' to the type of the interface, and replace f with the interface's equivalent */ auto b = exp.f.interfaceVirtual; auto ad2 = b.sym; ue.e1 = ue.e1.castTo(sc, ad2.type.addMod(ue.e1.type.mod)); ue.e1 = ue.e1.expressionSemantic(sc); ue1 = ue.e1; auto vi = exp.f.findVtblIndex(&ad2.vtbl, cast(int)ad2.vtbl.dim); assert(vi >= 0); exp.f = ad2.vtbl[vi].isFuncDeclaration(); assert(exp.f); } if (exp.f.needThis()) { AggregateDeclaration ad = exp.f.toParent2().isAggregateDeclaration(); ue.e1 = getRightThis(exp.loc, sc, ad, ue.e1, exp.f); if (ue.e1.op == TOK.error) { result = ue.e1; return; } ethis = ue.e1; tthis = ue.e1.type; if (!(exp.f.type.ty == Tfunction && (cast(TypeFunction)exp.f.type).isscope)) { if (global.params.vsafe && checkParamArgumentEscape(sc, exp.f, Id.This, ethis, false)) return setError(); } } /* Cannot call public functions from inside invariant * (because then the invariant would have infinite recursion) */ if (sc.func && sc.func.isInvariantDeclaration() && ue.e1.op == TOK.this_ && exp.f.addPostInvariant()) { exp.error("cannot call `public`/`export` function `%s` from invariant", exp.f.toChars()); return setError(); } checkFunctionAttributes(exp, sc, exp.f); checkAccess(exp.loc, sc, ue.e1, exp.f); if (!exp.f.needThis()) { exp.e1 = Expression.combine(ue.e1, new VarExp(exp.loc, exp.f, false)); } else { if (ue1old.checkRightThis(sc)) return setError(); if (exp.e1.op == TOK.dotVariable) { dve.var = exp.f; exp.e1.type = exp.f.type; } else { exp.e1 = new DotVarExp(exp.loc, dte.e1, exp.f, false); exp.e1 = exp.e1.expressionSemantic(sc); if (exp.e1.op == TOK.error) return setError(); ue = cast(UnaExp)exp.e1; } version (none) { printf("ue.e1 = %s\n", ue.e1.toChars()); printf("f = %s\n", exp.f.toChars()); printf("t = %s\n", t.toChars()); printf("e1 = %s\n", exp.e1.toChars()); printf("e1.type = %s\n", exp.e1.type.toChars()); } // See if we need to adjust the 'this' pointer AggregateDeclaration ad = exp.f.isThis(); ClassDeclaration cd = ue.e1.type.isClassHandle(); if (ad && cd && ad.isClassDeclaration()) { if (ue.e1.op == TOK.dotType) { ue.e1 = (cast(DotTypeExp)ue.e1).e1; exp.directcall = true; } else if (ue.e1.op == TOK.super_) exp.directcall = true; else if ((cd.storage_class & STC.final_) != 0) // https://issues.dlang.org/show_bug.cgi?id=14211 exp.directcall = true; if (ad != cd) { ue.e1 = ue.e1.castTo(sc, ad.type.addMod(ue.e1.type.mod)); ue.e1 = ue.e1.expressionSemantic(sc); } } } // If we've got a pointer to a function then deference it // https://issues.dlang.org/show_bug.cgi?id=16483 if (exp.e1.type.ty == Tpointer && exp.e1.type.nextOf().ty == Tfunction) { Expression e = new PtrExp(exp.loc, exp.e1); e.type = exp.e1.type.nextOf(); exp.e1 = e; } t1 = exp.e1.type; } else if (exp.e1.op == TOK.super_ || exp.e1.op == TOK.this_) { auto ad = sc.func ? sc.func.isThis() : null; auto cd = ad ? ad.isClassDeclaration() : null; const bool isSuper = exp.e1.op == TOK.super_; if (isSuper) { // Base class constructor call if (!cd || !cd.baseClass || !sc.func.isCtorDeclaration()) { exp.error("super class constructor call must be in a constructor"); return setError(); } if (!cd.baseClass.ctor) { exp.error("no super class constructor for `%s`", cd.baseClass.toChars()); return setError(); } } else { // `this` call expression must be inside a // constructor if (!ad || !sc.func.isCtorDeclaration()) { exp.error("constructor call must be in a constructor"); return setError(); } // https://issues.dlang.org/show_bug.cgi?id=18719 // If `exp` is a call expression to another constructor // then it means that all struct/class fields will be // initialized after this call. foreach (ref field; sc.ctorflow.fieldinit) { field |= CSX.this_ctor | CSX.deprecate_18719; } } if (!sc.intypeof && !(sc.ctorflow.callSuper & CSX.halt)) { if (sc.inLoop || sc.ctorflow.callSuper & CSX.label) exp.error("constructor calls not allowed in loops or after labels"); if (sc.ctorflow.callSuper & (CSX.super_ctor | CSX.this_ctor)) exp.error("multiple constructor calls"); if ((sc.ctorflow.callSuper & CSX.return_) && !(sc.ctorflow.callSuper & CSX.any_ctor)) exp.error("an earlier `return` statement skips constructor"); sc.ctorflow.callSuper |= CSX.any_ctor | (isSuper ? CSX.super_ctor : CSX.this_ctor); } tthis = ad.type.addMod(sc.func.type.mod); auto ctor = isSuper ? cd.baseClass.ctor : ad.ctor; if (auto os = ctor.isOverloadSet()) exp.f = resolveOverloadSet(exp.loc, sc, os, null, tthis, exp.arguments); else exp.f = resolveFuncCall(exp.loc, sc, ctor, null, tthis, exp.arguments, 0); if (!exp.f || exp.f.errors) return setError(); checkFunctionAttributes(exp, sc, exp.f); checkAccess(exp.loc, sc, null, exp.f); exp.e1 = new DotVarExp(exp.e1.loc, exp.e1, exp.f, false); exp.e1 = exp.e1.expressionSemantic(sc); t1 = exp.e1.type; // BUG: this should really be done by checking the static // call graph if (exp.f == sc.func) { exp.error("cyclic constructor call"); return setError(); } } else if (exp.e1.op == TOK.overloadSet) { auto os = (cast(OverExp)exp.e1).vars; exp.f = resolveOverloadSet(exp.loc, sc, os, tiargs, tthis, exp.arguments); if (!exp.f) return setError(); if (ethis) exp.e1 = new DotVarExp(exp.loc, ethis, exp.f, false); else exp.e1 = new VarExp(exp.loc, exp.f, false); goto Lagain; } else if (!t1) { exp.error("function expected before `()`, not `%s`", exp.e1.toChars()); return setError(); } else if (t1.ty == Terror) { return setError(); } else if (t1.ty != Tfunction) { TypeFunction tf; const(char)* p; Dsymbol s; exp.f = null; if (exp.e1.op == TOK.function_) { // function literal that direct called is always inferred. assert((cast(FuncExp)exp.e1).fd); exp.f = (cast(FuncExp)exp.e1).fd; tf = cast(TypeFunction)exp.f.type; p = "function literal"; } else if (t1.ty == Tdelegate) { TypeDelegate td = cast(TypeDelegate)t1; assert(td.next.ty == Tfunction); tf = cast(TypeFunction)td.next; p = "delegate"; } else if (t1.ty == Tpointer && (cast(TypePointer)t1).next.ty == Tfunction) { tf = cast(TypeFunction)(cast(TypePointer)t1).next; p = "function pointer"; } else if (exp.e1.op == TOK.dotVariable && (cast(DotVarExp)exp.e1).var.isOverDeclaration()) { DotVarExp dve = cast(DotVarExp)exp.e1; exp.f = resolveFuncCall(exp.loc, sc, dve.var, tiargs, dve.e1.type, exp.arguments, 2); if (!exp.f) return setError(); if (exp.f.needThis()) { dve.var = exp.f; dve.type = exp.f.type; dve.hasOverloads = false; goto Lagain; } exp.e1 = new VarExp(dve.loc, exp.f, false); Expression e = new CommaExp(exp.loc, dve.e1, exp); result = e.expressionSemantic(sc); return; } else if (exp.e1.op == TOK.variable && (cast(VarExp)exp.e1).var.isOverDeclaration()) { s = (cast(VarExp)exp.e1).var; goto L2; } else if (exp.e1.op == TOK.template_) { s = (cast(TemplateExp)exp.e1).td; L2: exp.f = resolveFuncCall(exp.loc, sc, s, tiargs, null, exp.arguments); if (!exp.f || exp.f.errors) return setError(); if (exp.f.needThis()) { if (hasThis(sc)) { // Supply an implicit 'this', as in // this.ident exp.e1 = new DotVarExp(exp.loc, (new ThisExp(exp.loc)).expressionSemantic(sc), exp.f, false); goto Lagain; } else if (isNeedThisScope(sc, exp.f)) { exp.error("need `this` for `%s` of type `%s`", exp.f.toChars(), exp.f.type.toChars()); return setError(); } } exp.e1 = new VarExp(exp.e1.loc, exp.f, false); goto Lagain; } else { exp.error("function expected before `()`, not `%s` of type `%s`", exp.e1.toChars(), exp.e1.type.toChars()); return setError(); } const(char)* failMessage; if (!tf.callMatch(null, exp.arguments, 0, &failMessage)) { OutBuffer buf; buf.writeByte('('); argExpTypesToCBuffer(&buf, exp.arguments); buf.writeByte(')'); if (tthis) tthis.modToBuffer(&buf); //printf("tf = %s, args = %s\n", tf.deco, (*arguments)[0].type.deco); .error(exp.loc, "%s `%s%s` is not callable using argument types `%s`", p, exp.e1.toChars(), parametersTypeToChars(tf.parameters, tf.varargs), buf.peekString()); if (failMessage) errorSupplemental(exp.loc, failMessage); return setError(); } // Purity and safety check should run after testing arguments matching if (exp.f) { exp.checkPurity(sc, exp.f); exp.checkSafety(sc, exp.f); exp.checkNogc(sc, exp.f); if (exp.f.checkNestedReference(sc, exp.loc)) return setError(); } else if (sc.func && sc.intypeof != 1 && !(sc.flags & SCOPE.ctfe)) { bool err = false; if (!tf.purity && !(sc.flags & SCOPE.debug_) && sc.func.setImpure()) { exp.error("`pure` %s `%s` cannot call impure %s `%s`", sc.func.kind(), sc.func.toPrettyChars(), p, exp.e1.toChars()); err = true; } if (!tf.isnogc && sc.func.setGC() && !(sc.flags & SCOPE.debug_) ) { exp.error("`@nogc` %s `%s` cannot call non-@nogc %s `%s`", sc.func.kind(), sc.func.toPrettyChars(), p, exp.e1.toChars()); err = true; } if (tf.trust <= TRUST.system && sc.func.setUnsafe()) { exp.error("`@safe` %s `%s` cannot call `@system` %s `%s`", sc.func.kind(), sc.func.toPrettyChars(), p, exp.e1.toChars()); err = true; } if (err) return setError(); } if (t1.ty == Tpointer) { Expression e = new PtrExp(exp.loc, exp.e1); e.type = tf; exp.e1 = e; } t1 = tf; } else if (exp.e1.op == TOK.variable) { // Do overload resolution VarExp ve = cast(VarExp)exp.e1; exp.f = ve.var.isFuncDeclaration(); assert(exp.f); tiargs = null; if (exp.f.overnext) exp.f = resolveFuncCall(exp.loc, sc, exp.f, tiargs, null, exp.arguments, 2); else { exp.f = exp.f.toAliasFunc(); TypeFunction tf = cast(TypeFunction)exp.f.type; const(char)* failMessage; if (!tf.callMatch(null, exp.arguments, 0, &failMessage)) { OutBuffer buf; buf.writeByte('('); argExpTypesToCBuffer(&buf, exp.arguments); buf.writeByte(')'); //printf("tf = %s, args = %s\n", tf.deco, (*arguments)[0].type.deco); .error(exp.loc, "%s `%s%s` is not callable using argument types `%s`", exp.f.kind(), exp.f.toPrettyChars(), parametersTypeToChars(tf.parameters, tf.varargs), buf.peekString()); if (failMessage) errorSupplemental(exp.loc, failMessage); exp.f = null; } } if (!exp.f || exp.f.errors) return setError(); if (exp.f.needThis()) { // Change the ancestor lambdas to delegate before hasThis(sc) call. if (exp.f.checkNestedReference(sc, exp.loc)) return setError(); if (hasThis(sc)) { // Supply an implicit 'this', as in // this.ident exp.e1 = new DotVarExp(exp.loc, (new ThisExp(exp.loc)).expressionSemantic(sc), ve.var); // Note: we cannot use f directly, because further overload resolution // through the supplied 'this' may cause different result. goto Lagain; } else if (isNeedThisScope(sc, exp.f)) { exp.error("need `this` for `%s` of type `%s`", exp.f.toChars(), exp.f.type.toChars()); return setError(); } } checkFunctionAttributes(exp, sc, exp.f); checkAccess(exp.loc, sc, null, exp.f); if (exp.f.checkNestedReference(sc, exp.loc)) return setError(); ethis = null; tthis = null; if (ve.hasOverloads) { exp.e1 = new VarExp(ve.loc, exp.f, false); exp.e1.type = exp.f.type; } t1 = exp.f.type; } assert(t1.ty == Tfunction); Expression argprefix; if (!exp.arguments) exp.arguments = new Expressions(); if (functionParameters(exp.loc, sc, cast(TypeFunction)t1, tthis, exp.arguments, exp.f, &exp.type, &argprefix)) return setError(); if (!exp.type) { exp.e1 = e1org; // https://issues.dlang.org/show_bug.cgi?id=10922 // avoid recursive expression printing exp.error("forward reference to inferred return type of function call `%s`", exp.toChars()); return setError(); } if (exp.f && exp.f.tintro) { Type t = exp.type; int offset = 0; TypeFunction tf = cast(TypeFunction)exp.f.tintro; if (tf.next.isBaseOf(t, &offset) && offset) { exp.type = tf.next; result = Expression.combine(argprefix, exp.castTo(sc, t)); return; } } // Handle the case of a direct lambda call if (exp.f && exp.f.isFuncLiteralDeclaration() && sc.func && !sc.intypeof) { exp.f.tookAddressOf = 0; } result = Expression.combine(argprefix, exp); } override void visit(DeclarationExp e) { if (e.type) { result = e; return; } static if (LOGSEMANTIC) { printf("DeclarationExp::semantic() %s\n", e.toChars()); } uint olderrors = global.errors; /* This is here to support extern(linkage) declaration, * where the extern(linkage) winds up being an AttribDeclaration * wrapper. */ Dsymbol s = e.declaration; while (1) { AttribDeclaration ad = s.isAttribDeclaration(); if (ad) { if (ad.decl && ad.decl.dim == 1) { s = (*ad.decl)[0]; continue; } } break; } VarDeclaration v = s.isVarDeclaration(); if (v) { // Do semantic() on initializer first, so: // int a = a; // will be illegal. e.declaration.dsymbolSemantic(sc); s.parent = sc.parent; } //printf("inserting '%s' %p into sc = %p\n", s.toChars(), s, sc); // Insert into both local scope and function scope. // Must be unique in both. if (s.ident) { if (!sc.insert(s)) { e.error("declaration `%s` is already defined", s.toPrettyChars()); return setError(); } else if (sc.func) { // https://issues.dlang.org/show_bug.cgi?id=11720 // include Dataseg variables if ((s.isFuncDeclaration() || s.isAggregateDeclaration() || s.isEnumDeclaration() || v && v.isDataseg()) && !sc.func.localsymtab.insert(s)) { e.error("declaration `%s` is already defined in another scope in `%s`", s.toPrettyChars(), sc.func.toChars()); return setError(); } else { // Disallow shadowing for (Scope* scx = sc.enclosing; scx && scx.func == sc.func; scx = scx.enclosing) { Dsymbol s2; if (scx.scopesym && scx.scopesym.symtab && (s2 = scx.scopesym.symtab.lookup(s.ident)) !is null && s != s2) { // allow STC.local symbols to be shadowed // TODO: not really an optimal design auto decl = s2.isDeclaration(); if (!decl || !(decl.storage_class & STC.local)) { e.error("%s `%s` is shadowing %s `%s`", s.kind(), s.ident.toChars(), s2.kind(), s2.toPrettyChars()); return setError(); } } } } } } if (!s.isVarDeclaration()) { Scope* sc2 = sc; if (sc2.stc & (STC.pure_ | STC.nothrow_ | STC.nogc)) sc2 = sc.push(); sc2.stc &= ~(STC.pure_ | STC.nothrow_ | STC.nogc); e.declaration.dsymbolSemantic(sc2); if (sc2 != sc) sc2.pop(); s.parent = sc.parent; } if (global.errors == olderrors) { e.declaration.semantic2(sc); if (global.errors == olderrors) { e.declaration.semantic3(sc); } } // todo: error in declaration should be propagated. e.type = Type.tvoid; result = e; } override void visit(TypeidExp exp) { static if (LOGSEMANTIC) { printf("TypeidExp::semantic() %s\n", exp.toChars()); } Type ta = isType(exp.obj); Expression ea = isExpression(exp.obj); Dsymbol sa = isDsymbol(exp.obj); //printf("ta %p ea %p sa %p\n", ta, ea, sa); if (ta) { ta.resolve(exp.loc, sc, &ea, &ta, &sa, true); } if (ea) { if (auto sym = getDsymbol(ea)) ea = resolve(exp.loc, sc, sym, false); else ea = ea.expressionSemantic(sc); ea = resolveProperties(sc, ea); ta = ea.type; if (ea.op == TOK.type) ea = null; } if (!ta) { //printf("ta %p ea %p sa %p\n", ta, ea, sa); exp.error("no type for `typeid(%s)`", ea ? ea.toChars() : (sa ? sa.toChars() : "")); return setError(); } if (global.params.vcomplex) ta.checkComplexTransition(exp.loc, sc); Expression e; if (ea && ta.toBasetype().ty == Tclass) { /* Get the dynamic type, which is .classinfo */ ea = ea.expressionSemantic(sc); e = new TypeidExp(ea.loc, ea); e.type = Type.typeinfoclass.type; } else if (ta.ty == Terror) { e = new ErrorExp(); } else { // Handle this in the glue layer e = new TypeidExp(exp.loc, ta); e.type = getTypeInfoType(exp.loc, ta, sc); semanticTypeInfo(sc, ta); if (ea) { e = new CommaExp(exp.loc, ea, e); // execute ea e = e.expressionSemantic(sc); } } result = e; } override void visit(TraitsExp e) { result = semanticTraits(e, sc); } override void visit(HaltExp e) { static if (LOGSEMANTIC) { printf("HaltExp::semantic()\n"); } e.type = Type.tvoid; result = e; } override void visit(IsExp e) { /* is(targ id tok tspec) * is(targ id : tok2) * is(targ id == tok2) */ //printf("IsExp::semantic(%s)\n", toChars()); if (e.id && !(sc.flags & SCOPE.condition)) { e.error("can only declare type aliases within `static if` conditionals or `static assert`s"); return setError(); } Type tded = null; Scope* sc2 = sc.copy(); // keep sc.flags sc2.tinst = null; sc2.minst = null; sc2.flags |= SCOPE.fullinst; Type t = e.targ.trySemantic(e.loc, sc2); sc2.pop(); if (!t) goto Lno; // errors, so condition is false e.targ = t; if (e.tok2 != TOK.reserved) { switch (e.tok2) { case TOK.struct_: if (e.targ.ty != Tstruct) goto Lno; if ((cast(TypeStruct)e.targ).sym.isUnionDeclaration()) goto Lno; tded = e.targ; break; case TOK.union_: if (e.targ.ty != Tstruct) goto Lno; if (!(cast(TypeStruct)e.targ).sym.isUnionDeclaration()) goto Lno; tded = e.targ; break; case TOK.class_: if (e.targ.ty != Tclass) goto Lno; if ((cast(TypeClass)e.targ).sym.isInterfaceDeclaration()) goto Lno; tded = e.targ; break; case TOK.interface_: if (e.targ.ty != Tclass) goto Lno; if (!(cast(TypeClass)e.targ).sym.isInterfaceDeclaration()) goto Lno; tded = e.targ; break; case TOK.const_: if (!e.targ.isConst()) goto Lno; tded = e.targ; break; case TOK.immutable_: if (!e.targ.isImmutable()) goto Lno; tded = e.targ; break; case TOK.shared_: if (!e.targ.isShared()) goto Lno; tded = e.targ; break; case TOK.inout_: if (!e.targ.isWild()) goto Lno; tded = e.targ; break; case TOK.super_: // If class or interface, get the base class and interfaces if (e.targ.ty != Tclass) goto Lno; else { ClassDeclaration cd = (cast(TypeClass)e.targ).sym; auto args = new Parameters(); args.reserve(cd.baseclasses.dim); if (cd.semanticRun < PASS.semanticdone) cd.dsymbolSemantic(null); for (size_t i = 0; i < cd.baseclasses.dim; i++) { BaseClass* b = (*cd.baseclasses)[i]; args.push(new Parameter(STC.in_, b.type, null, null)); } tded = new TypeTuple(args); } break; case TOK.enum_: if (e.targ.ty != Tenum) goto Lno; if (e.id) tded = (cast(TypeEnum)e.targ).sym.getMemtype(e.loc); else tded = e.targ; if (tded.ty == Terror) return setError(); break; case TOK.delegate_: if (e.targ.ty != Tdelegate) goto Lno; tded = (cast(TypeDelegate)e.targ).next; // the underlying function type break; case TOK.function_: case TOK.parameters: { if (e.targ.ty != Tfunction) goto Lno; tded = e.targ; /* Generate tuple from function parameter types. */ assert(tded.ty == Tfunction); Parameters* params = (cast(TypeFunction)tded).parameters; size_t dim = Parameter.dim(params); auto args = new Parameters(); args.reserve(dim); for (size_t i = 0; i < dim; i++) { Parameter arg = Parameter.getNth(params, i); assert(arg && arg.type); /* If one of the default arguments was an error, don't return an invalid tuple */ if (e.tok2 == TOK.parameters && arg.defaultArg && arg.defaultArg.op == TOK.error) return setError(); args.push(new Parameter(arg.storageClass, arg.type, (e.tok2 == TOK.parameters) ? arg.ident : null, (e.tok2 == TOK.parameters) ? arg.defaultArg : null)); } tded = new TypeTuple(args); break; } case TOK.return_: /* Get the 'return type' for the function, * delegate, or pointer to function. */ if (e.targ.ty == Tfunction) tded = (cast(TypeFunction)e.targ).next; else if (e.targ.ty == Tdelegate) { tded = (cast(TypeDelegate)e.targ).next; tded = (cast(TypeFunction)tded).next; } else if (e.targ.ty == Tpointer && (cast(TypePointer)e.targ).next.ty == Tfunction) { tded = (cast(TypePointer)e.targ).next; tded = (cast(TypeFunction)tded).next; } else goto Lno; break; case TOK.argumentTypes: /* Generate a type tuple of the equivalent types used to determine if a * function argument of this type can be passed in registers. * The results of this are highly platform dependent, and intended * primarly for use in implementing va_arg(). */ tded = Target.toArgTypes(e.targ); if (!tded) goto Lno; // not valid for a parameter break; case TOK.vector: if (e.targ.ty != Tvector) goto Lno; tded = (cast(TypeVector)e.targ).basetype; break; default: assert(0); } // https://issues.dlang.org/show_bug.cgi?id=18753 if (tded) goto Lyes; goto Lno; } else if (e.tspec && !e.id && !(e.parameters && e.parameters.dim)) { /* Evaluate to true if targ matches tspec * is(targ == tspec) * is(targ : tspec) */ e.tspec = e.tspec.typeSemantic(e.loc, sc); //printf("targ = %s, %s\n", targ.toChars(), targ.deco); //printf("tspec = %s, %s\n", tspec.toChars(), tspec.deco); if (e.tok == TOK.colon) { if (e.targ.implicitConvTo(e.tspec)) goto Lyes; else goto Lno; } else /* == */ { if (e.targ.equals(e.tspec)) goto Lyes; else goto Lno; } } else if (e.tspec) { /* Evaluate to true if targ matches tspec. * If true, declare id as an alias for the specialized type. * is(targ == tspec, tpl) * is(targ : tspec, tpl) * is(targ id == tspec) * is(targ id : tspec) * is(targ id == tspec, tpl) * is(targ id : tspec, tpl) */ Identifier tid = e.id ? e.id : Identifier.generateId("__isexp_id"); e.parameters.insert(0, new TemplateTypeParameter(e.loc, tid, null, null)); Objects dedtypes; dedtypes.setDim(e.parameters.dim); dedtypes.zero(); MATCH m = deduceType(e.targ, sc, e.tspec, e.parameters, &dedtypes); //printf("targ: %s\n", targ.toChars()); //printf("tspec: %s\n", tspec.toChars()); if (m <= MATCH.nomatch || (m != MATCH.exact && e.tok == TOK.equal)) { goto Lno; } else { tded = cast(Type)dedtypes[0]; if (!tded) tded = e.targ; Objects tiargs; tiargs.setDim(1); tiargs[0] = e.targ; /* Declare trailing parameters */ for (size_t i = 1; i < e.parameters.dim; i++) { TemplateParameter tp = (*e.parameters)[i]; Declaration s = null; m = tp.matchArg(e.loc, sc, &tiargs, i, e.parameters, &dedtypes, &s); if (m <= MATCH.nomatch) goto Lno; s.dsymbolSemantic(sc); if (!sc.insert(s)) e.error("declaration `%s` is already defined", s.toChars()); unSpeculative(sc, s); } goto Lyes; } } else if (e.id) { /* Declare id as an alias for type targ. Evaluate to true * is(targ id) */ tded = e.targ; goto Lyes; } Lyes: if (e.id) { Dsymbol s; Tuple tup = isTuple(tded); if (tup) s = new TupleDeclaration(e.loc, e.id, &tup.objects); else s = new AliasDeclaration(e.loc, e.id, tded); s.dsymbolSemantic(sc); /* The reason for the !tup is unclear. It fails Phobos unittests if it is not there. * More investigation is needed. */ if (!tup && !sc.insert(s)) e.error("declaration `%s` is already defined", s.toChars()); unSpeculative(sc, s); } //printf("Lyes\n"); result = new IntegerExp(e.loc, 1, Type.tbool); return; Lno: //printf("Lno\n"); result = new IntegerExp(e.loc, 0, Type.tbool); } override void visit(BinAssignExp exp) { if (exp.type) { result = exp; return; } Expression e = exp.op_overload(sc); if (e) { result = e; return; } if (exp.e1.checkReadModifyWrite(exp.op, exp.e2)) return setError(); if (exp.e1.op == TOK.arrayLength) { // arr.length op= e2; e = ArrayLengthExp.rewriteOpAssign(exp); e = e.expressionSemantic(sc); result = e; return; } if (exp.e1.op == TOK.slice || exp.e1.type.ty == Tarray || exp.e1.type.ty == Tsarray) { if (checkNonAssignmentArrayOp(exp.e1)) return setError(); if (exp.e1.op == TOK.slice) (cast(SliceExp)exp.e1).arrayop = true; // T[] op= ... if (exp.e2.implicitConvTo(exp.e1.type.nextOf())) { // T[] op= T exp.e2 = exp.e2.castTo(sc, exp.e1.type.nextOf()); } else if (Expression ex = typeCombine(exp, sc)) { result = ex; return; } exp.type = exp.e1.type; result = arrayOp(exp, sc); return; } exp.e1 = exp.e1.expressionSemantic(sc); exp.e1 = exp.e1.optimize(WANTvalue); exp.e1 = exp.e1.modifiableLvalue(sc, exp.e1); exp.type = exp.e1.type; if (exp.checkScalar()) return setError(); int arith = (exp.op == TOK.addAssign || exp.op == TOK.minAssign || exp.op == TOK.mulAssign || exp.op == TOK.divAssign || exp.op == TOK.modAssign || exp.op == TOK.powAssign); int bitwise = (exp.op == TOK.andAssign || exp.op == TOK.orAssign || exp.op == TOK.xorAssign); int shift = (exp.op == TOK.leftShiftAssign || exp.op == TOK.rightShiftAssign || exp.op == TOK.unsignedRightShiftAssign); if (bitwise && exp.type.toBasetype().ty == Tbool) exp.e2 = exp.e2.implicitCastTo(sc, exp.type); else if (exp.checkNoBool()) return setError(); if ((exp.op == TOK.addAssign || exp.op == TOK.minAssign) && exp.e1.type.toBasetype().ty == Tpointer && exp.e2.type.toBasetype().isintegral()) { result = scaleFactor(exp, sc); return; } if (Expression ex = typeCombine(exp, sc)) { result = ex; return; } if (arith && exp.checkArithmeticBin()) return setError(); if ((bitwise || shift) && exp.checkIntegralBin()) return setError(); if (shift) { if (exp.e2.type.toBasetype().ty != Tvector) exp.e2 = exp.e2.castTo(sc, Type.tshiftcnt); } if (!Target.isVectorOpSupported(exp.type.toBasetype(), exp.op, exp.e2.type.toBasetype())) { result = exp.incompatibleTypes(); return; } if (exp.e1.op == TOK.error || exp.e2.op == TOK.error) return setError(); e = exp.checkOpAssignTypes(sc); if (e.op == TOK.error) { result = e; return; } assert(e.op == TOK.assign || e == exp); result = (cast(BinExp)e).reorderSettingAAElem(sc); } private Expression compileIt(CompileExp exp) { //printf("CompileExp::compileIt('%s')\n", exp.toChars()); auto se = semanticString(sc, exp.e1, "argument to mixin"); if (!se) return null; se = se.toUTF8(sc); uint errors = global.errors; scope p = new Parser!ASTCodegen(exp.loc, sc._module, se.toStringz(), false); p.nextToken(); //printf("p.loc.linnum = %d\n", p.loc.linnum); Expression e = p.parseExpression(); if (p.errors) { assert(global.errors != errors); // should have caught all these cases return null; } if (p.token.value != TOK.endOfFile) { exp.error("incomplete mixin expression `%s`", se.toChars()); return null; } return e; } override void visit(CompileExp exp) { static if (LOGSEMANTIC) { printf("CompileExp::semantic('%s')\n", exp.toChars()); } auto e = compileIt(exp); if (!e) return setError(); result = e.expressionSemantic(sc); } override void visit(ImportExp e) { static if (LOGSEMANTIC) { printf("ImportExp::semantic('%s')\n", e.toChars()); } auto se = semanticString(sc, e.e1, "file name argument"); if (!se) return setError(); se = se.toUTF8(sc); auto namez = se.toStringz().ptr; if (!global.params.fileImppath) { e.error("need `-J` switch to import text file `%s`", namez); return setError(); } /* Be wary of CWE-22: Improper Limitation of a Pathname to a Restricted Directory * ('Path Traversal') attacks. * http://cwe.mitre.org/data/definitions/22.html */ auto name = FileName.safeSearchPath(global.filePath, namez); if (!name) { e.error("file `%s` cannot be found or not in a path specified with `-J`", se.toChars()); return setError(); } sc._module.contentImportedFiles.push(name); if (global.params.verbose) message("file %.*s\t(%s)", cast(int)se.len, se.string, name); if (global.params.moduleDeps !is null) { OutBuffer* ob = global.params.moduleDeps; Module imod = sc.instantiatingModule(); if (!global.params.moduleDepsFile) ob.writestring("depsFile "); ob.writestring(imod.toPrettyChars()); ob.writestring(" ("); escapePath(ob, imod.srcfile.toChars()); ob.writestring(") : "); if (global.params.moduleDepsFile) ob.writestring("string : "); ob.write(se.string, se.len); ob.writestring(" ("); escapePath(ob, name); ob.writestring(")"); ob.writenl(); } { auto f = File(name); if (f.read()) { e.error("cannot read file `%s`", f.toChars()); return setError(); } else { f._ref = 1; se = new StringExp(e.loc, f.buffer, f.len); } } result = se.expressionSemantic(sc); } override void visit(AssertExp exp) { // https://dlang.org/spec/expression.html#assert_expressions static if (LOGSEMANTIC) { printf("AssertExp::semantic('%s')\n", exp.toChars()); } if (Expression ex = unaSemantic(exp, sc)) { result = ex; return; } exp.e1 = resolveProperties(sc, exp.e1); // BUG: see if we can do compile time elimination of the Assert exp.e1 = exp.e1.optimize(WANTvalue); exp.e1 = exp.e1.toBoolean(sc); if (exp.msg) { exp.msg = exp.msg.expressionSemantic(sc); exp.msg = resolveProperties(sc, exp.msg); exp.msg = exp.msg.implicitCastTo(sc, Type.tchar.constOf().arrayOf()); exp.msg = exp.msg.optimize(WANTvalue); } if (exp.e1.op == TOK.error) { result = exp.e1; return; } if (exp.msg && exp.msg.op == TOK.error) { result = exp.msg; return; } auto f1 = checkNonAssignmentArrayOp(exp.e1); auto f2 = exp.msg && checkNonAssignmentArrayOp(exp.msg); if (f1 || f2) return setError(); if (exp.e1.isBool(false)) { /* This is an `assert(0)` which means halt program execution */ FuncDeclaration fd = sc.parent.isFuncDeclaration(); if (fd) fd.hasReturnExp |= 4; sc.ctorflow.orCSX(CSX.halt); if (global.params.useAssert == CHECKENABLE.off) { Expression e = new HaltExp(exp.loc); e = e.expressionSemantic(sc); result = e; return; } } exp.type = Type.tvoid; result = exp; } override void visit(DotIdExp exp) { static if (LOGSEMANTIC) { printf("DotIdExp::semantic(this = %p, '%s')\n", exp, exp.toChars()); //printf("e1.op = %d, '%s'\n", e1.op, Token::toChars(e1.op)); } Expression e = exp.semanticY(sc, 1); if (e && isDotOpDispatch(e)) { uint errors = global.startGagging(); e = resolvePropertiesX(sc, e); if (global.endGagging(errors)) e = null; /* fall down to UFCS */ else { result = e; return; } } if (!e) // if failed to find the property { /* If ident is not a valid property, rewrite: * e1.ident * as: * .ident(e1) */ e = resolveUFCSProperties(sc, exp); } result = e; } override void visit(DotTemplateExp e) { if (Expression ex = unaSemantic(e, sc)) { result = ex; return; } result = e; } override void visit(DotVarExp exp) { static if (LOGSEMANTIC) { printf("DotVarExp::semantic('%s')\n", exp.toChars()); } if (exp.type) { result = exp; return; } exp.var = exp.var.toAlias().isDeclaration(); exp.e1 = exp.e1.expressionSemantic(sc); if (auto tup = exp.var.isTupleDeclaration()) { /* Replace: * e1.tuple(a, b, c) * with: * tuple(e1.a, e1.b, e1.c) */ Expression e0; Expression ev = sc.func ? extractSideEffect(sc, "__tup", e0, exp.e1) : exp.e1; auto exps = new Expressions(); exps.reserve(tup.objects.dim); for (size_t i = 0; i < tup.objects.dim; i++) { RootObject o = (*tup.objects)[i]; Expression e; if (o.dyncast() == DYNCAST.expression) { e = cast(Expression)o; if (e.op == TOK.dSymbol) { Dsymbol s = (cast(DsymbolExp)e).s; e = new DotVarExp(exp.loc, ev, s.isDeclaration()); } } else if (o.dyncast() == DYNCAST.dsymbol) { e = new DsymbolExp(exp.loc, cast(Dsymbol)o); } else if (o.dyncast() == DYNCAST.type) { e = new TypeExp(exp.loc, cast(Type)o); } else { exp.error("`%s` is not an expression", o.toChars()); return setError(); } exps.push(e); } Expression e = new TupleExp(exp.loc, e0, exps); e = e.expressionSemantic(sc); result = e; return; } exp.e1 = exp.e1.addDtorHook(sc); Type t1 = exp.e1.type; if (FuncDeclaration fd = exp.var.isFuncDeclaration()) { // for functions, do checks after overload resolution if (!fd.functionSemantic()) return setError(); /* https://issues.dlang.org/show_bug.cgi?id=13843 * If fd obviously has no overloads, we should * normalize AST, and it will give a chance to wrap fd with FuncExp. */ if (fd.isNested() || fd.isFuncLiteralDeclaration()) { // (e1, fd) auto e = resolve(exp.loc, sc, fd, false); result = Expression.combine(exp.e1, e); return; } exp.type = fd.type; assert(exp.type); } else if (OverDeclaration od = exp.var.isOverDeclaration()) { exp.type = Type.tvoid; // ambiguous type? } else { exp.type = exp.var.type; if (!exp.type && global.errors) // var is goofed up, just return error. return setError(); assert(exp.type); if (t1.ty == Tpointer) t1 = t1.nextOf(); exp.type = exp.type.addMod(t1.mod); Dsymbol vparent = exp.var.toParent(); AggregateDeclaration ad = vparent ? vparent.isAggregateDeclaration() : null; if (Expression e1x = getRightThis(exp.loc, sc, ad, exp.e1, exp.var, 1)) exp.e1 = e1x; else { /* Later checkRightThis will report correct error for invalid field variable access. */ Expression e = new VarExp(exp.loc, exp.var); e = e.expressionSemantic(sc); result = e; return; } checkAccess(exp.loc, sc, exp.e1, exp.var); VarDeclaration v = exp.var.isVarDeclaration(); if (v && (v.isDataseg() || (v.storage_class & STC.manifest))) { Expression e = expandVar(WANTvalue, v); if (e) { result = e; return; } } if (v && v.isDataseg()) // fix https://issues.dlang.org/show_bug.cgi?id=8238 { // (e1, v) checkAccess(exp.loc, sc, exp.e1, v); Expression e = new VarExp(exp.loc, v); e = new CommaExp(exp.loc, exp.e1, e); e = e.expressionSemantic(sc); result = e; return; } } //printf("-DotVarExp::semantic('%s')\n", toChars()); result = exp; } override void visit(DotTemplateInstanceExp exp) { static if (LOGSEMANTIC) { printf("DotTemplateInstanceExp::semantic('%s')\n", exp.toChars()); } // Indicate we need to resolve by UFCS. Expression e = exp.semanticY(sc, 1); if (!e) e = resolveUFCSProperties(sc, exp); result = e; } override void visit(DelegateExp e) { static if (LOGSEMANTIC) { printf("DelegateExp::semantic('%s')\n", e.toChars()); } if (e.type) { result = e; return; } e.e1 = e.e1.expressionSemantic(sc); e.type = new TypeDelegate(e.func.type); e.type = e.type.typeSemantic(e.loc, sc); FuncDeclaration f = e.func.toAliasFunc(); AggregateDeclaration ad = f.toParent().isAggregateDeclaration(); if (f.needThis()) e.e1 = getRightThis(e.loc, sc, ad, e.e1, f); /* A delegate takes the address of e.e1 in order to set the .ptr field * https://issues.dlang.org/show_bug.cgi?id=18575 */ if (global.params.vsafe && e.e1.type.toBasetype().ty == Tstruct) { if (auto v = expToVariable(e.e1)) { if (!checkAddressVar(sc, e, v)) return setError(); } } if (f.type.ty == Tfunction) { TypeFunction tf = cast(TypeFunction)f.type; if (!MODmethodConv(e.e1.type.mod, f.type.mod)) { OutBuffer thisBuf, funcBuf; MODMatchToBuffer(&thisBuf, e.e1.type.mod, tf.mod); MODMatchToBuffer(&funcBuf, tf.mod, e.e1.type.mod); e.error("%smethod `%s` is not callable using a %s`%s`", funcBuf.peekString(), f.toPrettyChars(), thisBuf.peekString(), e.e1.toChars()); return setError(); } } if (ad && ad.isClassDeclaration() && ad.type != e.e1.type) { // A downcast is required for interfaces // https://issues.dlang.org/show_bug.cgi?id=3706 e.e1 = new CastExp(e.loc, e.e1, ad.type); e.e1 = e.e1.expressionSemantic(sc); } result = e; } override void visit(DotTypeExp exp) { static if (LOGSEMANTIC) { printf("DotTypeExp::semantic('%s')\n", exp.toChars()); } if (exp.type) { result = exp; return; } if (auto e = unaSemantic(exp, sc)) { result = e; return; } exp.type = exp.sym.getType().addMod(exp.e1.type.mod); result = exp; } override void visit(AddrExp exp) { static if (LOGSEMANTIC) { printf("AddrExp::semantic('%s')\n", exp.toChars()); } if (exp.type) { result = exp; return; } if (Expression ex = unaSemantic(exp, sc)) { result = ex; return; } int wasCond = exp.e1.op == TOK.question; if (exp.e1.op == TOK.dotTemplateInstance) { DotTemplateInstanceExp dti = cast(DotTemplateInstanceExp)exp.e1; TemplateInstance ti = dti.ti; { //assert(ti.needsTypeInference(sc)); ti.dsymbolSemantic(sc); if (!ti.inst || ti.errors) // if template failed to expand return setError(); Dsymbol s = ti.toAlias(); FuncDeclaration f = s.isFuncDeclaration(); if (f) { exp.e1 = new DotVarExp(exp.e1.loc, dti.e1, f); exp.e1 = exp.e1.expressionSemantic(sc); } } } else if (exp.e1.op == TOK.scope_) { TemplateInstance ti = (cast(ScopeExp)exp.e1).sds.isTemplateInstance(); if (ti) { //assert(ti.needsTypeInference(sc)); ti.dsymbolSemantic(sc); if (!ti.inst || ti.errors) // if template failed to expand return setError(); Dsymbol s = ti.toAlias(); FuncDeclaration f = s.isFuncDeclaration(); if (f) { exp.e1 = new VarExp(exp.e1.loc, f); exp.e1 = exp.e1.expressionSemantic(sc); } } } exp.e1 = exp.e1.toLvalue(sc, null); if (exp.e1.op == TOK.error) { result = exp.e1; return; } if (checkNonAssignmentArrayOp(exp.e1)) return setError(); if (!exp.e1.type) { exp.error("cannot take address of `%s`", exp.e1.toChars()); return setError(); } bool hasOverloads; if (auto f = isFuncAddress(exp, &hasOverloads)) { if (!hasOverloads && f.checkForwardRef(exp.loc)) return setError(); } else if (!exp.e1.type.deco) { if (exp.e1.op == TOK.variable) { VarExp ve = cast(VarExp)exp.e1; Declaration d = ve.var; exp.error("forward reference to %s `%s`", d.kind(), d.toChars()); } else exp.error("forward reference to `%s`", exp.e1.toChars()); return setError(); } exp.type = exp.e1.type.pointerTo(); // See if this should really be a delegate if (exp.e1.op == TOK.dotVariable) { DotVarExp dve = cast(DotVarExp)exp.e1; FuncDeclaration f = dve.var.isFuncDeclaration(); if (f) { f = f.toAliasFunc(); // FIXME, should see overloads // https://issues.dlang.org/show_bug.cgi?id=1983 if (!dve.hasOverloads) f.tookAddressOf++; Expression e; if (f.needThis()) e = new DelegateExp(exp.loc, dve.e1, f, dve.hasOverloads); else // It is a function pointer. Convert &v.f() --> (v, &V.f()) e = new CommaExp(exp.loc, dve.e1, new AddrExp(exp.loc, new VarExp(exp.loc, f, dve.hasOverloads))); e = e.expressionSemantic(sc); result = e; return; } // Look for misaligned pointer in @safe mode if (checkUnsafeAccess(sc, dve, !exp.type.isMutable(), true)) return setError(); if (global.params.vsafe) { if (VarDeclaration v = expToVariable(dve.e1)) { if (!checkAddressVar(sc, exp, v)) return setError(); } } } else if (exp.e1.op == TOK.variable) { VarExp ve = cast(VarExp)exp.e1; VarDeclaration v = ve.var.isVarDeclaration(); if (v) { if (!checkAddressVar(sc, exp, v)) return setError(); ve.checkPurity(sc, v); } FuncDeclaration f = ve.var.isFuncDeclaration(); if (f) { /* Because nested functions cannot be overloaded, * mark here that we took its address because castTo() * may not be called with an exact match. */ if (!ve.hasOverloads || f.isNested()) f.tookAddressOf++; if (f.isNested()) { if (f.isFuncLiteralDeclaration()) { if (!f.FuncDeclaration.isNested()) { /* Supply a 'null' for a this pointer if no this is available */ Expression e = new DelegateExp(exp.loc, new NullExp(exp.loc, Type.tnull), f, ve.hasOverloads); e = e.expressionSemantic(sc); result = e; return; } } Expression e = new DelegateExp(exp.loc, exp.e1, f, ve.hasOverloads); e = e.expressionSemantic(sc); result = e; return; } if (f.needThis()) { if (hasThis(sc)) { /* Should probably supply 'this' after overload resolution, * not before. */ Expression ethis = new ThisExp(exp.loc); Expression e = new DelegateExp(exp.loc, ethis, f, ve.hasOverloads); e = e.expressionSemantic(sc); result = e; return; } if (sc.func && !sc.intypeof) { if (sc.func.setUnsafe()) { exp.error("`this` reference necessary to take address of member `%s` in `@safe` function `%s`", f.toChars(), sc.func.toChars()); } } } } } else if ((exp.e1.op == TOK.this_ || exp.e1.op == TOK.super_) && global.params.vsafe) { if (VarDeclaration v = expToVariable(exp.e1)) { if (!checkAddressVar(sc, exp, v)) return setError(); } } else if (exp.e1.op == TOK.call) { CallExp ce = cast(CallExp)exp.e1; if (ce.e1.type.ty == Tfunction) { TypeFunction tf = cast(TypeFunction)ce.e1.type; if (tf.isref && sc.func && !sc.intypeof && sc.func.setUnsafe()) { exp.error("cannot take address of `ref return` of `%s()` in `@safe` function `%s`", ce.e1.toChars(), sc.func.toChars()); } } } else if (exp.e1.op == TOK.index) { /* For: * int[3] a; * &a[i] * check 'a' the same as for a regular variable */ if (VarDeclaration v = expToVariable(exp.e1)) { if (global.params.vsafe && !checkAddressVar(sc, exp, v)) return setError(); exp.e1.checkPurity(sc, v); } } else if (wasCond) { /* a ? b : c was transformed to *(a ? &b : &c), but we still * need to do safety checks */ assert(exp.e1.op == TOK.star); PtrExp pe = cast(PtrExp)exp.e1; assert(pe.e1.op == TOK.question); CondExp ce = cast(CondExp)pe.e1; assert(ce.e1.op == TOK.address); assert(ce.e2.op == TOK.address); // Re-run semantic on the address expressions only ce.e1.type = null; ce.e1 = ce.e1.expressionSemantic(sc); ce.e2.type = null; ce.e2 = ce.e2.expressionSemantic(sc); } result = exp.optimize(WANTvalue); } override void visit(PtrExp exp) { static if (LOGSEMANTIC) { printf("PtrExp::semantic('%s')\n", exp.toChars()); } if (exp.type) { result = exp; return; } Expression e = exp.op_overload(sc); if (e) { result = e; return; } Type tb = exp.e1.type.toBasetype(); switch (tb.ty) { case Tpointer: exp.type = (cast(TypePointer)tb).next; break; case Tsarray: case Tarray: if (isNonAssignmentArrayOp(exp.e1)) goto default; exp.error("using `*` on an array is no longer supported; use `*(%s).ptr` instead", exp.e1.toChars()); exp.type = (cast(TypeArray)tb).next; exp.e1 = exp.e1.castTo(sc, exp.type.pointerTo()); break; case Terror: return setError(); default: exp.error("can only `*` a pointer, not a `%s`", exp.e1.type.toChars()); goto case Terror; } if (exp.checkValue()) return setError(); result = exp; } override void visit(NegExp exp) { static if (LOGSEMANTIC) { printf("NegExp::semantic('%s')\n", exp.toChars()); } if (exp.type) { result = exp; return; } Expression e = exp.op_overload(sc); if (e) { result = e; return; } fix16997(sc, exp); exp.type = exp.e1.type; Type tb = exp.type.toBasetype(); if (tb.ty == Tarray || tb.ty == Tsarray) { if (!isArrayOpValid(exp.e1)) { result = arrayOpInvalidError(exp); return; } result = exp; return; } if (!Target.isVectorOpSupported(tb, exp.op)) { result = exp.incompatibleTypes(); return; } if (exp.e1.checkNoBool()) return setError(); if (exp.e1.checkArithmetic()) return setError(); result = exp; } override void visit(UAddExp exp) { static if (LOGSEMANTIC) { printf("UAddExp::semantic('%s')\n", exp.toChars()); } assert(!exp.type); Expression e = exp.op_overload(sc); if (e) { result = e; return; } fix16997(sc, exp); if (!Target.isVectorOpSupported(exp.e1.type.toBasetype(), exp.op)) { result = exp.incompatibleTypes(); return; } if (exp.e1.checkNoBool()) return setError(); if (exp.e1.checkArithmetic()) return setError(); result = exp.e1; } override void visit(ComExp exp) { if (exp.type) { result = exp; return; } Expression e = exp.op_overload(sc); if (e) { result = e; return; } fix16997(sc, exp); exp.type = exp.e1.type; Type tb = exp.type.toBasetype(); if (tb.ty == Tarray || tb.ty == Tsarray) { if (!isArrayOpValid(exp.e1)) { result = arrayOpInvalidError(exp); return; } result = exp; return; } if (!Target.isVectorOpSupported(tb, exp.op)) { result = exp.incompatibleTypes(); return; } if (exp.e1.checkNoBool()) return setError(); if (exp.e1.checkIntegral()) return setError(); result = exp; } override void visit(NotExp e) { if (e.type) { result = e; return; } e.setNoderefOperand(); // Note there is no operator overload if (Expression ex = unaSemantic(e, sc)) { result = ex; return; } // for static alias this: https://issues.dlang.org/show_bug.cgi?id=17684 if (e.e1.op == TOK.type) e.e1 = resolveAliasThis(sc, e.e1); e.e1 = resolveProperties(sc, e.e1); e.e1 = e.e1.toBoolean(sc); if (e.e1.type == Type.terror) { result = e.e1; return; } if (!Target.isVectorOpSupported(e.e1.type.toBasetype(), e.op)) { result = e.incompatibleTypes(); } // https://issues.dlang.org/show_bug.cgi?id=13910 // Today NotExp can take an array as its operand. if (checkNonAssignmentArrayOp(e.e1)) return setError(); e.type = Type.tbool; result = e; } override void visit(DeleteExp exp) { if (!sc.isDeprecated) { // @@@DEPRECATED_2019-02@@@ // 1. Deprecation for 1 year // 2. Error for 1 year // 3. Removal of keyword, "delete" can be used for other identities if (!exp.isRAII) deprecation(exp.loc, "The `delete` keyword has been deprecated. Use `object.destroy()` (and `core.memory.GC.free()` if applicable) instead."); } if (Expression ex = unaSemantic(exp, sc)) { result = ex; return; } exp.e1 = resolveProperties(sc, exp.e1); exp.e1 = exp.e1.modifiableLvalue(sc, null); if (exp.e1.op == TOK.error) { result = exp.e1; return; } exp.type = Type.tvoid; AggregateDeclaration ad = null; Type tb = exp.e1.type.toBasetype(); switch (tb.ty) { case Tclass: { auto cd = (cast(TypeClass)tb).sym; if (cd.isCOMinterface()) { /* Because COM classes are deleted by IUnknown.Release() */ exp.error("cannot `delete` instance of COM interface `%s`", cd.toChars()); return setError(); } ad = cd; break; } case Tpointer: tb = (cast(TypePointer)tb).next.toBasetype(); if (tb.ty == Tstruct) { ad = (cast(TypeStruct)tb).sym; auto f = ad.aggDelete; auto fd = ad.dtor; if (!f) { semanticTypeInfo(sc, tb); break; } /* Construct: * ea = copy e1 to a tmp to do side effects only once * eb = call destructor * ec = call deallocator */ Expression ea = null; Expression eb = null; Expression ec = null; VarDeclaration v = null; if (fd && f) { v = copyToTemp(0, "__tmpea", exp.e1); v.dsymbolSemantic(sc); ea = new DeclarationExp(exp.loc, v); ea.type = v.type; } if (fd) { Expression e = ea ? new VarExp(exp.loc, v) : exp.e1; e = new DotVarExp(Loc.initial, e, fd, false); eb = new CallExp(exp.loc, e); eb = eb.expressionSemantic(sc); } if (f) { Type tpv = Type.tvoid.pointerTo(); Expression e = ea ? new VarExp(exp.loc, v) : exp.e1.castTo(sc, tpv); e = new CallExp(exp.loc, new VarExp(exp.loc, f, false), e); ec = e.expressionSemantic(sc); } ea = Expression.combine(ea, eb); ea = Expression.combine(ea, ec); assert(ea); result = ea; return; } break; case Tarray: { Type tv = tb.nextOf().baseElemOf(); if (tv.ty == Tstruct) { ad = (cast(TypeStruct)tv).sym; if (ad.dtor) semanticTypeInfo(sc, ad.type); } break; } default: exp.error("cannot delete type `%s`", exp.e1.type.toChars()); return setError(); } bool err = false; if (ad) { if (ad.dtor) { err |= exp.checkPurity(sc, ad.dtor); err |= exp.checkSafety(sc, ad.dtor); err |= exp.checkNogc(sc, ad.dtor); } if (ad.aggDelete && tb.ty != Tarray) { err |= exp.checkPurity(sc, ad.aggDelete); err |= exp.checkSafety(sc, ad.aggDelete); err |= exp.checkNogc(sc, ad.aggDelete); } if (err) return setError(); } if (!sc.intypeof && sc.func && !exp.isRAII && sc.func.setUnsafe()) { exp.error("`%s` is not `@safe` but is used in `@safe` function `%s`", exp.toChars(), sc.func.toChars()); err = true; } if (err) return setError(); result = exp; } override void visit(CastExp exp) { static if (LOGSEMANTIC) { printf("CastExp::semantic('%s')\n", exp.toChars()); } //static int x; assert(++x < 10); if (exp.type) { result = exp; return; } if (exp.to) { exp.to = exp.to.typeSemantic(exp.loc, sc); if (exp.to == Type.terror) return setError(); if (!exp.to.hasPointers()) exp.setNoderefOperand(); // When e1 is a template lambda, this cast may instantiate it with // the type 'to'. exp.e1 = inferType(exp.e1, exp.to); } if (auto e = unaSemantic(exp, sc)) { result = e; return; } auto e1x = resolveProperties(sc, exp.e1); if (e1x.op == TOK.error) { result = e1x; return; } if (e1x.checkType()) return setError(); exp.e1 = e1x; if (!exp.e1.type) { exp.error("cannot cast `%s`", exp.e1.toChars()); return setError(); } if (!exp.to) // Handle cast(const) and cast(immutable), etc. { exp.to = exp.e1.type.castMod(exp.mod); exp.to = exp.to.typeSemantic(exp.loc, sc); if (exp.to == Type.terror) return setError(); } if (exp.to.ty == Ttuple) { exp.error("cannot cast `%s` to tuple type `%s`", exp.e1.toChars(), exp.to.toChars()); return setError(); } // cast(void) is used to mark e1 as unused, so it is safe if (exp.to.ty == Tvoid) { exp.type = exp.to; result = exp; return; } if (!exp.to.equals(exp.e1.type) && exp.mod == cast(ubyte)~0) { if (Expression e = exp.op_overload(sc)) { result = e.implicitCastTo(sc, exp.to); return; } } Type t1b = exp.e1.type.toBasetype(); Type tob = exp.to.toBasetype(); if (tob.ty == Tstruct && !tob.equals(t1b)) { /* Look to replace: * cast(S)t * with: * S(t) */ // Rewrite as to.call(e1) Expression e = new TypeExp(exp.loc, exp.to); e = new CallExp(exp.loc, e, exp.e1); e = e.trySemantic(sc); if (e) { result = e; return; } } if (!t1b.equals(tob) && (t1b.ty == Tarray || t1b.ty == Tsarray)) { if (checkNonAssignmentArrayOp(exp.e1)) return setError(); } // Look for casting to a vector type if (tob.ty == Tvector && t1b.ty != Tvector) { result = new VectorExp(exp.loc, exp.e1, exp.to); return; } Expression ex = exp.e1.castTo(sc, exp.to); if (ex.op == TOK.error) { result = ex; return; } // Check for unsafe casts if (sc.func && !sc.intypeof && !isSafeCast(ex, t1b, tob) && sc.func.setUnsafe()) { exp.error("cast from `%s` to `%s` not allowed in safe code", exp.e1.type.toChars(), exp.to.toChars()); return setError(); } result = ex; } override void visit(VectorExp exp) { static if (LOGSEMANTIC) { printf("VectorExp::semantic('%s')\n", exp.toChars()); } if (exp.type) { result = exp; return; } exp.e1 = exp.e1.expressionSemantic(sc); exp.type = exp.to.typeSemantic(exp.loc, sc); if (exp.e1.op == TOK.error || exp.type.ty == Terror) { result = exp.e1; return; } Type tb = exp.type.toBasetype(); assert(tb.ty == Tvector); TypeVector tv = cast(TypeVector)tb; Type te = tv.elementType(); exp.dim = cast(int)(tv.size(exp.loc) / te.size(exp.loc)); bool checkElem(Expression elem) { if (elem.isConst() == 1) return false; exp.error("constant expression expected, not `%s`", elem.toChars()); return true; } exp.e1 = exp.e1.optimize(WANTvalue); bool res; if (exp.e1.op == TOK.arrayLiteral) { foreach (i; 0 .. exp.dim) { // Do not stop on first error - check all AST nodes even if error found res |= checkElem((cast(ArrayLiteralExp)exp.e1).getElement(i)); } } else if (exp.e1.type.ty == Tvoid) checkElem(exp.e1); result = res ? new ErrorExp() : exp; } override void visit(SliceExp exp) { static if (LOGSEMANTIC) { printf("SliceExp::semantic('%s')\n", exp.toChars()); } if (exp.type) { result = exp; return; } // operator overloading should be handled in ArrayExp already. if (Expression ex = unaSemantic(exp, sc)) { result = ex; return; } exp.e1 = resolveProperties(sc, exp.e1); if (exp.e1.op == TOK.type && exp.e1.type.ty != Ttuple) { if (exp.lwr || exp.upr) { exp.error("cannot slice type `%s`", exp.e1.toChars()); return setError(); } Expression e = new TypeExp(exp.loc, exp.e1.type.arrayOf()); result = e.expressionSemantic(sc); return; } if (!exp.lwr && !exp.upr) { if (exp.e1.op == TOK.arrayLiteral) { // Convert [a,b,c][] to [a,b,c] Type t1b = exp.e1.type.toBasetype(); Expression e = exp.e1; if (t1b.ty == Tsarray) { e = e.copy(); e.type = t1b.nextOf().arrayOf(); } result = e; return; } if (exp.e1.op == TOK.slice) { // Convert e[][] to e[] SliceExp se = cast(SliceExp)exp.e1; if (!se.lwr && !se.upr) { result = se; return; } } if (isArrayOpOperand(exp.e1)) { // Convert (a[]+b[])[] to a[]+b[] result = exp.e1; return; } } if (exp.e1.op == TOK.error) { result = exp.e1; return; } if (exp.e1.type.ty == Terror) return setError(); Type t1b = exp.e1.type.toBasetype(); if (t1b.ty == Tpointer) { if ((cast(TypePointer)t1b).next.ty == Tfunction) { exp.error("cannot slice function pointer `%s`", exp.e1.toChars()); return setError(); } if (!exp.lwr || !exp.upr) { exp.error("need upper and lower bound to slice pointer"); return setError(); } if (sc.func && !sc.intypeof && sc.func.setUnsafe()) { exp.error("pointer slicing not allowed in safe functions"); return setError(); } } else if (t1b.ty == Tarray) { } else if (t1b.ty == Tsarray) { if (!exp.arrayop && global.params.vsafe) { /* Slicing a static array is like taking the address of it. * Perform checks as if e[] was &e */ if (VarDeclaration v = expToVariable(exp.e1)) { if (exp.e1.op == TOK.dotVariable) { DotVarExp dve = cast(DotVarExp)exp.e1; if ((dve.e1.op == TOK.this_ || dve.e1.op == TOK.super_) && !(v.storage_class & STC.ref_)) { // because it's a class v = null; } } if (v && !checkAddressVar(sc, exp, v)) return setError(); } } } else if (t1b.ty == Ttuple) { if (!exp.lwr && !exp.upr) { result = exp.e1; return; } if (!exp.lwr || !exp.upr) { exp.error("need upper and lower bound to slice tuple"); return setError(); } } else if (t1b.ty == Tvector) { // Convert e1 to corresponding static array TypeVector tv1 = cast(TypeVector)t1b; t1b = tv1.basetype; t1b = t1b.castMod(tv1.mod); exp.e1.type = t1b; } else { exp.error("`%s` cannot be sliced with `[]`", t1b.ty == Tvoid ? exp.e1.toChars() : t1b.toChars()); return setError(); } /* Run semantic on lwr and upr. */ Scope* scx = sc; if (t1b.ty == Tsarray || t1b.ty == Tarray || t1b.ty == Ttuple) { // Create scope for 'length' variable ScopeDsymbol sym = new ArrayScopeSymbol(sc, exp); sym.loc = exp.loc; sym.parent = sc.scopesym; sc = sc.push(sym); } if (exp.lwr) { if (t1b.ty == Ttuple) sc = sc.startCTFE(); exp.lwr = exp.lwr.expressionSemantic(sc); exp.lwr = resolveProperties(sc, exp.lwr); if (t1b.ty == Ttuple) sc = sc.endCTFE(); exp.lwr = exp.lwr.implicitCastTo(sc, Type.tsize_t); } if (exp.upr) { if (t1b.ty == Ttuple) sc = sc.startCTFE(); exp.upr = exp.upr.expressionSemantic(sc); exp.upr = resolveProperties(sc, exp.upr); if (t1b.ty == Ttuple) sc = sc.endCTFE(); exp.upr = exp.upr.implicitCastTo(sc, Type.tsize_t); } if (sc != scx) sc = sc.pop(); if (exp.lwr && exp.lwr.type == Type.terror || exp.upr && exp.upr.type == Type.terror) return setError(); if (t1b.ty == Ttuple) { exp.lwr = exp.lwr.ctfeInterpret(); exp.upr = exp.upr.ctfeInterpret(); uinteger_t i1 = exp.lwr.toUInteger(); uinteger_t i2 = exp.upr.toUInteger(); TupleExp te; TypeTuple tup; size_t length; if (exp.e1.op == TOK.tuple) // slicing an expression tuple { te = cast(TupleExp)exp.e1; tup = null; length = te.exps.dim; } else if (exp.e1.op == TOK.type) // slicing a type tuple { te = null; tup = cast(TypeTuple)t1b; length = Parameter.dim(tup.arguments); } else assert(0); if (i2 < i1 || length < i2) { exp.error("string slice `[%llu .. %llu]` is out of bounds", i1, i2); return setError(); } size_t j1 = cast(size_t)i1; size_t j2 = cast(size_t)i2; Expression e; if (exp.e1.op == TOK.tuple) { auto exps = new Expressions(); exps.setDim(j2 - j1); for (size_t i = 0; i < j2 - j1; i++) { (*exps)[i] = (*te.exps)[j1 + i]; } e = new TupleExp(exp.loc, te.e0, exps); } else { auto args = new Parameters(); args.reserve(j2 - j1); for (size_t i = j1; i < j2; i++) { Parameter arg = Parameter.getNth(tup.arguments, i); args.push(arg); } e = new TypeExp(exp.e1.loc, new TypeTuple(args)); } e = e.expressionSemantic(sc); result = e; return; } exp.type = t1b.nextOf().arrayOf(); // Allow typedef[] -> typedef[] if (exp.type.equals(t1b)) exp.type = exp.e1.type; // We might know $ now setLengthVarIfKnown(exp.lengthVar, t1b); if (exp.lwr && exp.upr) { exp.lwr = exp.lwr.optimize(WANTvalue); exp.upr = exp.upr.optimize(WANTvalue); IntRange lwrRange = getIntRange(exp.lwr); IntRange uprRange = getIntRange(exp.upr); if (t1b.ty == Tsarray || t1b.ty == Tarray) { Expression el = new ArrayLengthExp(exp.loc, exp.e1); el = el.expressionSemantic(sc); el = el.optimize(WANTvalue); if (el.op == TOK.int64) { // Array length is known at compile-time. Upper is in bounds if it fits length. dinteger_t length = el.toInteger(); auto bounds = IntRange(SignExtendedNumber(0), SignExtendedNumber(length)); exp.upperIsInBounds = bounds.contains(uprRange); } else if (exp.upr.op == TOK.int64 && exp.upr.toInteger() == 0) { // Upper slice expression is '0'. Value is always in bounds. exp.upperIsInBounds = true; } else if (exp.upr.op == TOK.variable && (cast(VarExp)exp.upr).var.ident == Id.dollar) { // Upper slice expression is '$'. Value is always in bounds. exp.upperIsInBounds = true; } } else if (t1b.ty == Tpointer) { exp.upperIsInBounds = true; } else assert(0); exp.lowerIsLessThanUpper = (lwrRange.imax <= uprRange.imin); //printf("upperIsInBounds = %d lowerIsLessThanUpper = %d\n", exp.upperIsInBounds, exp.lowerIsLessThanUpper); } result = exp; } override void visit(ArrayLengthExp e) { static if (LOGSEMANTIC) { printf("ArrayLengthExp::semantic('%s')\n", e.toChars()); } if (e.type) { result = e; return; } if (Expression ex = unaSemantic(e, sc)) { result = ex; return; } e.e1 = resolveProperties(sc, e.e1); e.type = Type.tsize_t; result = e; } override void visit(ArrayExp exp) { static if (LOGSEMANTIC) { printf("ArrayExp::semantic('%s')\n", exp.toChars()); } assert(!exp.type); Expression e = exp.op_overload(sc); if (e) { result = e; return; } if (isAggregate(exp.e1.type)) exp.error("no `[]` operator overload for type `%s`", exp.e1.type.toChars()); else exp.error("only one index allowed to index `%s`", exp.e1.type.toChars()); result = new ErrorExp(); } override void visit(DotExp exp) { static if (LOGSEMANTIC) { printf("DotExp::semantic('%s')\n", exp.toChars()); if (exp.type) printf("\ttype = %s\n", exp.type.toChars()); } exp.e1 = exp.e1.expressionSemantic(sc); exp.e2 = exp.e2.expressionSemantic(sc); if (exp.e1.op == TOK.type) { result = exp.e2; return; } if (exp.e2.op == TOK.type) { result = exp.e2; return; } if (exp.e2.op == TOK.template_) { auto td = (cast(TemplateExp)exp.e2).td; Expression e = new DotTemplateExp(exp.loc, exp.e1, td); result = e.expressionSemantic(sc); return; } if (!exp.type) exp.type = exp.e2.type; result = exp; } override void visit(CommaExp e) { if (e.type) { result = e; return; } // Allow `((a,b),(x,y))` if (e.allowCommaExp) { CommaExp.allow(e.e1); CommaExp.allow(e.e2); } if (Expression ex = binSemanticProp(e, sc)) { result = ex; return; } e.e1 = e.e1.addDtorHook(sc); if (checkNonAssignmentArrayOp(e.e1)) return setError(); e.type = e.e2.type; if (e.type !is Type.tvoid && !e.allowCommaExp && !e.isGenerated) e.error("Using the result of a comma expression is not allowed"); result = e; } override void visit(IntervalExp e) { static if (LOGSEMANTIC) { printf("IntervalExp::semantic('%s')\n", e.toChars()); } if (e.type) { result = e; return; } Expression le = e.lwr; le = le.expressionSemantic(sc); le = resolveProperties(sc, le); Expression ue = e.upr; ue = ue.expressionSemantic(sc); ue = resolveProperties(sc, ue); if (le.op == TOK.error) { result = le; return; } if (ue.op == TOK.error) { result = ue; return; } e.lwr = le; e.upr = ue; e.type = Type.tvoid; result = e; } override void visit(DelegatePtrExp e) { static if (LOGSEMANTIC) { printf("DelegatePtrExp::semantic('%s')\n", e.toChars()); } if (!e.type) { unaSemantic(e, sc); e.e1 = resolveProperties(sc, e.e1); if (e.e1.op == TOK.error) { result = e.e1; return; } e.type = Type.tvoidptr; } result = e; } override void visit(DelegateFuncptrExp e) { static if (LOGSEMANTIC) { printf("DelegateFuncptrExp::semantic('%s')\n", e.toChars()); } if (!e.type) { unaSemantic(e, sc); e.e1 = resolveProperties(sc, e.e1); if (e.e1.op == TOK.error) { result = e.e1; return; } e.type = e.e1.type.nextOf().pointerTo(); } result = e; } override void visit(IndexExp exp) { static if (LOGSEMANTIC) { printf("IndexExp::semantic('%s')\n", exp.toChars()); } if (exp.type) { result = exp; return; } // operator overloading should be handled in ArrayExp already. if (!exp.e1.type) exp.e1 = exp.e1.expressionSemantic(sc); assert(exp.e1.type); // semantic() should already be run on it if (exp.e1.op == TOK.type && exp.e1.type.ty != Ttuple) { exp.e2 = exp.e2.expressionSemantic(sc); exp.e2 = resolveProperties(sc, exp.e2); Type nt; if (exp.e2.op == TOK.type) nt = new TypeAArray(exp.e1.type, exp.e2.type); else nt = new TypeSArray(exp.e1.type, exp.e2); Expression e = new TypeExp(exp.loc, nt); result = e.expressionSemantic(sc); return; } if (exp.e1.op == TOK.error) { result = exp.e1; return; } if (exp.e1.type.ty == Terror) return setError(); // Note that unlike C we do not implement the int[ptr] Type t1b = exp.e1.type.toBasetype(); if (t1b.ty == Tvector) { // Convert e1 to corresponding static array TypeVector tv1 = cast(TypeVector)t1b; t1b = tv1.basetype; t1b = t1b.castMod(tv1.mod); exp.e1.type = t1b; } /* Run semantic on e2 */ Scope* scx = sc; if (t1b.ty == Tsarray || t1b.ty == Tarray || t1b.ty == Ttuple) { // Create scope for 'length' variable ScopeDsymbol sym = new ArrayScopeSymbol(sc, exp); sym.loc = exp.loc; sym.parent = sc.scopesym; sc = sc.push(sym); } if (t1b.ty == Ttuple) sc = sc.startCTFE(); exp.e2 = exp.e2.expressionSemantic(sc); exp.e2 = resolveProperties(sc, exp.e2); if (t1b.ty == Ttuple) sc = sc.endCTFE(); if (exp.e2.op == TOK.tuple) { TupleExp te = cast(TupleExp)exp.e2; if (te.exps && te.exps.dim == 1) exp.e2 = Expression.combine(te.e0, (*te.exps)[0]); // bug 4444 fix } if (sc != scx) sc = sc.pop(); if (exp.e2.type == Type.terror) return setError(); if (checkNonAssignmentArrayOp(exp.e1)) return setError(); switch (t1b.ty) { case Tpointer: if ((cast(TypePointer)t1b).next.ty == Tfunction) { exp.error("cannot index function pointer `%s`", exp.e1.toChars()); return setError(); } exp.e2 = exp.e2.implicitCastTo(sc, Type.tsize_t); if (exp.e2.type == Type.terror) return setError(); exp.e2 = exp.e2.optimize(WANTvalue); if (exp.e2.op == TOK.int64 && exp.e2.toInteger() == 0) { } else if (sc.func && sc.func.setUnsafe()) { exp.error("safe function `%s` cannot index pointer `%s`", sc.func.toPrettyChars(), exp.e1.toChars()); return setError(); } exp.type = (cast(TypeNext)t1b).next; break; case Tarray: exp.e2 = exp.e2.implicitCastTo(sc, Type.tsize_t); if (exp.e2.type == Type.terror) return setError(); exp.type = (cast(TypeNext)t1b).next; break; case Tsarray: { exp.e2 = exp.e2.implicitCastTo(sc, Type.tsize_t); if (exp.e2.type == Type.terror) return setError(); exp.type = t1b.nextOf(); break; } case Taarray: { TypeAArray taa = cast(TypeAArray)t1b; /* We can skip the implicit conversion if they differ only by * constness * https://issues.dlang.org/show_bug.cgi?id=2684 * see also bug https://issues.dlang.org/show_bug.cgi?id=2954 b */ if (!arrayTypeCompatibleWithoutCasting(exp.e2.type, taa.index)) { exp.e2 = exp.e2.implicitCastTo(sc, taa.index); // type checking if (exp.e2.type == Type.terror) return setError(); } semanticTypeInfo(sc, taa); exp.type = taa.next; break; } case Ttuple: { exp.e2 = exp.e2.implicitCastTo(sc, Type.tsize_t); if (exp.e2.type == Type.terror) return setError(); exp.e2 = exp.e2.ctfeInterpret(); uinteger_t index = exp.e2.toUInteger(); TupleExp te; TypeTuple tup; size_t length; if (exp.e1.op == TOK.tuple) { te = cast(TupleExp)exp.e1; tup = null; length = te.exps.dim; } else if (exp.e1.op == TOK.type) { te = null; tup = cast(TypeTuple)t1b; length = Parameter.dim(tup.arguments); } else assert(0); if (length <= index) { exp.error("array index `[%llu]` is outside array bounds `[0 .. %llu]`", index, cast(ulong)length); return setError(); } Expression e; if (exp.e1.op == TOK.tuple) { e = (*te.exps)[cast(size_t)index]; e = Expression.combine(te.e0, e); } else e = new TypeExp(exp.e1.loc, Parameter.getNth(tup.arguments, cast(size_t)index).type); result = e; return; } default: exp.error("`%s` must be an array or pointer type, not `%s`", exp.e1.toChars(), exp.e1.type.toChars()); return setError(); } // We might know $ now setLengthVarIfKnown(exp.lengthVar, t1b); if (t1b.ty == Tsarray || t1b.ty == Tarray) { Expression el = new ArrayLengthExp(exp.loc, exp.e1); el = el.expressionSemantic(sc); el = el.optimize(WANTvalue); if (el.op == TOK.int64) { exp.e2 = exp.e2.optimize(WANTvalue); dinteger_t length = el.toInteger(); if (length) { auto bounds = IntRange(SignExtendedNumber(0), SignExtendedNumber(length - 1)); exp.indexIsInBounds = bounds.contains(getIntRange(exp.e2)); } } } result = exp; } override void visit(PostExp exp) { static if (LOGSEMANTIC) { printf("PostExp::semantic('%s')\n", exp.toChars()); } if (exp.type) { result = exp; return; } if (Expression ex = binSemantic(exp, sc)) { result = ex; return; } Expression e1x = resolveProperties(sc, exp.e1); if (e1x.op == TOK.error) { result = e1x; return; } exp.e1 = e1x; Expression e = exp.op_overload(sc); if (e) { result = e; return; } if (exp.e1.checkReadModifyWrite(exp.op)) return setError(); if (exp.e1.op == TOK.slice) { const(char)* s = exp.op == TOK.plusPlus ? "increment" : "decrement"; exp.error("cannot post-%s array slice `%s`, use pre-%s instead", s, exp.e1.toChars(), s); return setError(); } exp.e1 = exp.e1.optimize(WANTvalue); Type t1 = exp.e1.type.toBasetype(); if (t1.ty == Tclass || t1.ty == Tstruct || exp.e1.op == TOK.arrayLength) { /* Check for operator overloading, * but rewrite in terms of ++e instead of e++ */ /* If e1 is not trivial, take a reference to it */ Expression de = null; if (exp.e1.op != TOK.variable && exp.e1.op != TOK.arrayLength) { // ref v = e1; auto v = copyToTemp(STC.ref_, "__postref", exp.e1); de = new DeclarationExp(exp.loc, v); exp.e1 = new VarExp(exp.e1.loc, v); } /* Rewrite as: * auto tmp = e1; ++e1; tmp */ auto tmp = copyToTemp(0, "__pitmp", exp.e1); Expression ea = new DeclarationExp(exp.loc, tmp); Expression eb = exp.e1.syntaxCopy(); eb = new PreExp(exp.op == TOK.plusPlus ? TOK.prePlusPlus : TOK.preMinusMinus, exp.loc, eb); Expression ec = new VarExp(exp.loc, tmp); // Combine de,ea,eb,ec if (de) ea = new CommaExp(exp.loc, de, ea); e = new CommaExp(exp.loc, ea, eb); e = new CommaExp(exp.loc, e, ec); e = e.expressionSemantic(sc); result = e; return; } exp.e1 = exp.e1.modifiableLvalue(sc, exp.e1); e = exp; if (exp.e1.checkScalar()) return setError(); if (exp.e1.checkNoBool()) return setError(); if (exp.e1.type.ty == Tpointer) e = scaleFactor(exp, sc); else exp.e2 = exp.e2.castTo(sc, exp.e1.type); e.type = exp.e1.type; result = e; } override void visit(PreExp exp) { Expression e = exp.op_overload(sc); // printf("PreExp::semantic('%s')\n", toChars()); if (e) { result = e; return; } // Rewrite as e1+=1 or e1-=1 if (exp.op == TOK.prePlusPlus) e = new AddAssignExp(exp.loc, exp.e1, new IntegerExp(exp.loc, 1, Type.tint32)); else e = new MinAssignExp(exp.loc, exp.e1, new IntegerExp(exp.loc, 1, Type.tint32)); result = e.expressionSemantic(sc); } override void visit(AssignExp exp) { static if (LOGSEMANTIC) { printf("AssignExp::semantic('%s')\n", exp.toChars()); } //printf("exp.e1.op = %d, '%s'\n", exp.e1.op, Token.toChars(exp.e1.op)); //printf("exp.e2.op = %d, '%s'\n", exp.e2.op, Token.toChars(exp.e2.op)); if (exp.type) { result = exp; return; } Expression e1old = exp.e1; if (exp.e2.op == TOK.comma) { /* Rewrite to get rid of the comma from rvalue */ if (!(cast(CommaExp)exp.e2).isGenerated) exp.error("Using the result of a comma expression is not allowed"); Expression e0; exp.e2 = Expression.extractLast(exp.e2, &e0); Expression e = Expression.combine(e0, exp); result = e.expressionSemantic(sc); return; } /* Look for operator overloading of a[arguments] = e2. * Do it before e1.expressionSemantic() otherwise the ArrayExp will have been * converted to unary operator overloading already. */ if (exp.e1.op == TOK.array) { Expression res; ArrayExp ae = cast(ArrayExp)exp.e1; ae.e1 = ae.e1.expressionSemantic(sc); ae.e1 = resolveProperties(sc, ae.e1); Expression ae1old = ae.e1; const(bool) maybeSlice = (ae.arguments.dim == 0 || ae.arguments.dim == 1 && (*ae.arguments)[0].op == TOK.interval); IntervalExp ie = null; if (maybeSlice && ae.arguments.dim) { assert((*ae.arguments)[0].op == TOK.interval); ie = cast(IntervalExp)(*ae.arguments)[0]; } while (true) { if (ae.e1.op == TOK.error) { result = ae.e1; return; } 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.indexass)) { // Deal with $ res = resolveOpDollar(sc, ae, &e0); if (!res) // a[i..j] = e2 might be: a.opSliceAssign(e2, i, j) goto Lfallback; if (res.op == TOK.error) { result = res; return; } res = exp.e2.expressionSemantic(sc); if (res.op == TOK.error) { result = res; return; } exp.e2 = res; /* Rewrite (a[arguments] = e2) as: * a.opIndexAssign(e2, arguments) */ Expressions* a = ae.arguments.copy(); a.insert(0, exp.e2); res = new DotIdExp(exp.loc, ae.e1, Id.indexass); res = new CallExp(exp.loc, res, a); if (maybeSlice) // a[] = e2 might be: a.opSliceAssign(e2) res = res.trySemantic(sc); else res = res.expressionSemantic(sc); if (res) { res = Expression.combine(e0, res); result = res; return; } } Lfallback: if (maybeSlice && search_function(ad, Id.sliceass)) { // Deal with $ res = resolveOpDollar(sc, ae, ie, &e0); if (res.op == TOK.error) { result = res; return; } res = exp.e2.expressionSemantic(sc); if (res.op == TOK.error) { result = res; return; } exp.e2 = res; /* Rewrite (a[i..j] = e2) as: * a.opSliceAssign(e2, i, j) */ auto a = new Expressions(); a.push(exp.e2); if (ie) { a.push(ie.lwr); a.push(ie.upr); } res = new DotIdExp(exp.loc, ae.e1, Id.sliceass); res = new CallExp(exp.loc, res, a); res = res.expressionSemantic(sc); res = Expression.combine(e0, res); result = res; return; } // No operator overloading member function found yet, but // there might be an alias this to try. if (ad.aliasthis && t1b != ae.att1) { if (!ae.att1 && t1b.checkAliasThisRec()) ae.att1 = t1b; /* 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; } /* Run this.e1 semantic. */ { Expression e1x = exp.e1; /* With UFCS, e.f = value * Could mean: * .f(e, value) * or: * .f(e) = value */ if (e1x.op == TOK.dotTemplateInstance) { DotTemplateInstanceExp dti = cast(DotTemplateInstanceExp)e1x; Expression e = dti.semanticY(sc, 1); if (!e) { result = resolveUFCSProperties(sc, e1x, exp.e2); return; } e1x = e; } else if (e1x.op == TOK.dotIdentifier) { DotIdExp die = cast(DotIdExp)e1x; Expression e = die.semanticY(sc, 1); if (e && isDotOpDispatch(e)) { uint errors = global.startGagging(); e = resolvePropertiesX(sc, e, exp.e2); if (global.endGagging(errors)) e = null; /* fall down to UFCS */ else { result = e; return; } } if (!e) { result = resolveUFCSProperties(sc, e1x, exp.e2); return; } e1x = e; } else { if (e1x.op == TOK.slice) (cast(SliceExp)e1x).arrayop = true; e1x = e1x.expressionSemantic(sc); } /* We have f = value. * Could mean: * f(value) * or: * f() = value */ if (Expression e = resolvePropertiesX(sc, e1x, exp.e2)) { result = e; return; } if (e1x.checkRightThis(sc)) return setError(); exp.e1 = e1x; assert(exp.e1.type); } Type t1 = exp.e1.type.toBasetype(); /* Run this.e2 semantic. * Different from other binary expressions, the analysis of e2 * depends on the result of e1 in assignments. */ { Expression e2x = inferType(exp.e2, t1.baseElemOf()); e2x = e2x.expressionSemantic(sc); e2x = resolveProperties(sc, e2x); if (e2x.op == TOK.type) e2x = resolveAliasThis(sc, e2x); //https://issues.dlang.org/show_bug.cgi?id=17684 if (e2x.op == TOK.error) { result = e2x; return; } if (e2x.checkValue()) return setError(); exp.e2 = e2x; } /* Rewrite tuple assignment as a tuple of assignments. */ { Expression e2x = exp.e2; Ltupleassign: if (exp.e1.op == TOK.tuple && e2x.op == TOK.tuple) { TupleExp tup1 = cast(TupleExp)exp.e1; TupleExp tup2 = cast(TupleExp)e2x; size_t dim = tup1.exps.dim; Expression e = null; if (dim != tup2.exps.dim) { exp.error("mismatched tuple lengths, %d and %d", cast(int)dim, cast(int)tup2.exps.dim); return setError(); } if (dim == 0) { e = new IntegerExp(exp.loc, 0, Type.tint32); e = new CastExp(exp.loc, e, Type.tvoid); // avoid "has no effect" error e = Expression.combine(Expression.combine(tup1.e0, tup2.e0), e); } else { auto exps = new Expressions(); exps.setDim(dim); for (size_t i = 0; i < dim; i++) { Expression ex1 = (*tup1.exps)[i]; Expression ex2 = (*tup2.exps)[i]; (*exps)[i] = new AssignExp(exp.loc, ex1, ex2); } e = new TupleExp(exp.loc, Expression.combine(tup1.e0, tup2.e0), exps); } result = e.expressionSemantic(sc); return; } /* Look for form: e1 = e2.aliasthis. */ if (exp.e1.op == TOK.tuple) { TupleDeclaration td = isAliasThisTuple(e2x); if (!td) goto Lnomatch; assert(exp.e1.type.ty == Ttuple); TypeTuple tt = cast(TypeTuple)exp.e1.type; Expression e0; Expression ev = extractSideEffect(sc, "__tup", e0, e2x); auto iexps = new Expressions(); iexps.push(ev); for (size_t u = 0; u < iexps.dim; u++) { Lexpand: Expression e = (*iexps)[u]; Parameter arg = Parameter.getNth(tt.arguments, u); //printf("[%d] iexps.dim = %d, ", u, iexps.dim); //printf("e = (%s %s, %s), ", Token::tochars[e.op], e.toChars(), e.type.toChars()); //printf("arg = (%s, %s)\n", arg.toChars(), arg.type.toChars()); if (!arg || !e.type.implicitConvTo(arg.type)) { // expand initializer to tuple if (expandAliasThisTuples(iexps, u) != -1) { if (iexps.dim <= u) break; goto Lexpand; } goto Lnomatch; } } e2x = new TupleExp(e2x.loc, e0, iexps); e2x = e2x.expressionSemantic(sc); if (e2x.op == TOK.error) { result = e2x; return; } // Do not need to overwrite this.e2 goto Ltupleassign; } Lnomatch: } /* Inside constructor, if this is the first assignment of object field, * rewrite this to initializing the field. */ if (exp.op == TOK.assign && exp.e1.checkModifiable(sc) == 2) { //printf("[%s] change to init - %s\n", loc.toChars(), toChars()); exp.op = TOK.construct; // https://issues.dlang.org/show_bug.cgi?id=13515 // set Index::modifiable flag for complex AA element initialization if (exp.e1.op == TOK.index) { Expression e1x = (cast(IndexExp)exp.e1).markSettingAAElem(); if (e1x.op == TOK.error) { result = e1x; return; } } } else if (exp.op == TOK.construct && exp.e1.op == TOK.variable && (cast(VarExp)exp.e1).var.storage_class & (STC.out_ | STC.ref_)) { exp.memset |= MemorySet.referenceInit; } /* If it is an assignment from a 'foreign' type, * check for operator overloading. */ if (exp.memset & MemorySet.referenceInit) { // If this is an initialization of a reference, // do nothing } else if (t1.ty == Tstruct) { auto e1x = exp.e1; auto e2x = exp.e2; auto sd = (cast(TypeStruct)t1).sym; if (exp.op == TOK.construct) { Type t2 = e2x.type.toBasetype(); if (t2.ty == Tstruct && sd == (cast(TypeStruct)t2).sym) { sd.size(exp.loc); if (sd.sizeok != Sizeok.done) return setError(); if (!sd.ctor) sd.ctor = sd.searchCtor(); // https://issues.dlang.org/show_bug.cgi?id=15661 // Look for the form from last of comma chain. auto e2y = e2x; while (e2y.op == TOK.comma) e2y = (cast(CommaExp)e2y).e2; CallExp ce = (e2y.op == TOK.call) ? cast(CallExp)e2y : null; DotVarExp dve = (ce && ce.e1.op == TOK.dotVariable) ? cast(DotVarExp)ce.e1 : null; if (sd.ctor && ce && dve && dve.var.isCtorDeclaration() && e2y.type.implicitConvTo(t1)) { /* Look for form of constructor call which is: * __ctmp.ctor(arguments...) */ /* Before calling the constructor, initialize * variable with a bit copy of the default * initializer */ Expression einit; if (sd.zeroInit && !sd.isNested()) { // https://issues.dlang.org/show_bug.cgi?id=14606 // Always use BlitExp for the special expression: (struct = 0) einit = new IntegerExp(exp.loc, 0, Type.tint32); } else if (sd.isNested()) { auto sle = new StructLiteralExp(exp.loc, sd, null, t1); if (!sd.fill(exp.loc, sle.elements, true)) return setError(); if (checkFrameAccess(exp.loc, sc, sd, sle.elements.dim)) return setError(); sle.type = t1; einit = sle; } else { einit = t1.defaultInit(exp.loc); } auto ae = new BlitExp(exp.loc, exp.e1, einit); ae.type = e1x.type; /* Replace __ctmp being constructed with e1. * We need to copy constructor call expression, * because it may be used in other place. */ auto dvx = cast(DotVarExp)dve.copy(); dvx.e1 = e1x; auto cx = cast(CallExp)ce.copy(); cx.e1 = dvx; Expression e0; Expression.extractLast(e2x, &e0); auto e = Expression.combine(ae, cx); e = Expression.combine(e0, e); e = e.expressionSemantic(sc); result = e; return; } if (sd.postblit) { /* We have a copy constructor for this */ if (e2x.op == TOK.question) { /* Rewrite as: * a ? e1 = b : e1 = c; */ CondExp econd = cast(CondExp)e2x; Expression ea1 = new ConstructExp(econd.e1.loc, e1x, econd.e1); Expression ea2 = new ConstructExp(econd.e1.loc, e1x, econd.e2); Expression e = new CondExp(exp.loc, econd.econd, ea1, ea2); result = e.expressionSemantic(sc); return; } if (e2x.isLvalue()) { if (!e2x.type.implicitConvTo(e1x.type)) { exp.error("conversion error from `%s` to `%s`", e2x.type.toChars(), e1x.type.toChars()); return setError(); } /* Rewrite as: * (e1 = e2).postblit(); * * Blit assignment e1 = e2 returns a reference to the original e1, * then call the postblit on it. */ Expression e = e1x.copy(); e.type = e.type.mutableOf(); if (e.type.isShared && !sd.type.isShared) e.type = e.type.unSharedOf(); e = new BlitExp(exp.loc, e, e2x); e = new DotVarExp(exp.loc, e, sd.postblit, false); e = new CallExp(exp.loc, e); result = e.expressionSemantic(sc); return; } else { /* The struct value returned from the function is transferred * so should not call the destructor on it. */ e2x = valueNoDtor(e2x); } } } else if (!e2x.implicitConvTo(t1)) { sd.size(exp.loc); if (sd.sizeok != Sizeok.done) return setError(); if (!sd.ctor) sd.ctor = sd.searchCtor(); if (sd.ctor) { /* Look for implicit constructor call * Rewrite as: * e1 = init, e1.ctor(e2) */ Expression einit; einit = new BlitExp(exp.loc, e1x, e1x.type.defaultInit(exp.loc)); einit.type = e1x.type; Expression e; e = new DotIdExp(exp.loc, e1x, Id.ctor); e = new CallExp(exp.loc, e, e2x); e = new CommaExp(exp.loc, einit, e); e = e.expressionSemantic(sc); result = e; return; } if (search_function(sd, Id.call)) { /* Look for static opCall * https://issues.dlang.org/show_bug.cgi?id=2702 * Rewrite as: * e1 = typeof(e1).opCall(arguments) */ e2x = typeDotIdExp(e2x.loc, e1x.type, Id.call); e2x = new CallExp(exp.loc, e2x, exp.e2); e2x = e2x.expressionSemantic(sc); e2x = resolveProperties(sc, e2x); if (e2x.op == TOK.error) { result = e2x; return; } if (e2x.checkValue()) return setError(); } } else // https://issues.dlang.org/show_bug.cgi?id=11355 { AggregateDeclaration ad2 = isAggregate(e2x.type); if (ad2 && ad2.aliasthis && !(exp.att2 && e2x.type == exp.att2)) { if (!exp.att2 && exp.e2.type.checkAliasThisRec()) exp.att2 = exp.e2.type; /* Rewrite (e1 op e2) as: * (e1 op e2.aliasthis) */ exp.e2 = new DotIdExp(exp.e2.loc, exp.e2, ad2.aliasthis.ident); result = exp.expressionSemantic(sc); return; } } } else if (exp.op == TOK.assign) { if (e1x.op == TOK.index && (cast(IndexExp)e1x).e1.type.toBasetype().ty == Taarray) { /* * Rewrite: * aa[key] = e2; * as: * ref __aatmp = aa; * ref __aakey = key; * ref __aaval = e2; * (__aakey in __aatmp * ? __aatmp[__aakey].opAssign(__aaval) * : ConstructExp(__aatmp[__aakey], __aaval)); */ IndexExp ie = cast(IndexExp)e1x; Type t2 = e2x.type.toBasetype(); Expression e0 = null; Expression ea = extractSideEffect(sc, "__aatmp", e0, ie.e1); Expression ek = extractSideEffect(sc, "__aakey", e0, ie.e2); Expression ev = extractSideEffect(sc, "__aaval", e0, e2x); AssignExp ae = cast(AssignExp)exp.copy(); ae.e1 = new IndexExp(exp.loc, ea, ek); ae.e1 = ae.e1.expressionSemantic(sc); ae.e1 = ae.e1.optimize(WANTvalue); ae.e2 = ev; Expression e = ae.op_overload(sc); if (e) { Expression ey = null; if (t2.ty == Tstruct && sd == t2.toDsymbol(sc)) { ey = ev; } else if (!ev.implicitConvTo(ie.type) && sd.ctor) { // Look for implicit constructor call // Rewrite as S().ctor(e2) ey = new StructLiteralExp(exp.loc, sd, null); ey = new DotIdExp(exp.loc, ey, Id.ctor); ey = new CallExp(exp.loc, ey, ev); ey = ey.trySemantic(sc); } if (ey) { Expression ex; ex = new IndexExp(exp.loc, ea, ek); ex = ex.expressionSemantic(sc); ex = ex.optimize(WANTvalue); ex = ex.modifiableLvalue(sc, ex); // allocate new slot ey = new ConstructExp(exp.loc, ex, ey); ey = ey.expressionSemantic(sc); if (ey.op == TOK.error) { result = ey; return; } ex = e; // https://issues.dlang.org/show_bug.cgi?id=14144 // The whole expression should have the common type // of opAssign() return and assigned AA entry. // Even if there's no common type, expression should be typed as void. Type t = null; if (!typeMerge(sc, TOK.question, &t, &ex, &ey)) { ex = new CastExp(ex.loc, ex, Type.tvoid); ey = new CastExp(ey.loc, ey, Type.tvoid); } e = new CondExp(exp.loc, new InExp(exp.loc, ek, ea), ex, ey); } e = Expression.combine(e0, e); e = e.expressionSemantic(sc); result = e; return; } } else { Expression e = exp.op_overload(sc); if (e) { result = e; return; } } } else assert(exp.op == TOK.blit); exp.e1 = e1x; exp.e2 = e2x; } else if (t1.ty == Tclass) { // Disallow assignment operator overloads for same type if (exp.op == TOK.assign && !exp.e2.implicitConvTo(exp.e1.type)) { Expression e = exp.op_overload(sc); if (e) { result = e; return; } } } else if (t1.ty == Tsarray) { // SliceExp cannot have static array type without context inference. assert(exp.e1.op != TOK.slice); Expression e1x = exp.e1; Expression e2x = exp.e2; if (e2x.implicitConvTo(e1x.type)) { if (exp.op != TOK.blit && (e2x.op == TOK.slice && (cast(UnaExp)e2x).e1.isLvalue() || e2x.op == TOK.cast_ && (cast(UnaExp)e2x).e1.isLvalue() || e2x.op != TOK.slice && e2x.isLvalue())) { if (e1x.checkPostblit(sc, t1)) return setError(); } // e2 matches to t1 because of the implicit length match, so if (isUnaArrayOp(e2x.op) || isBinArrayOp(e2x.op)) { // convert e1 to e1[] // e.g. e1[] = a[] + b[]; auto sle = new SliceExp(e1x.loc, e1x, null, null); sle.arrayop = true; e1x = sle.expressionSemantic(sc); } else { // convert e2 to t1 later // e.g. e1 = [1, 2, 3]; } } else { if (e2x.implicitConvTo(t1.nextOf().arrayOf()) > MATCH.nomatch) { uinteger_t dim1 = (cast(TypeSArray)t1).dim.toInteger(); uinteger_t dim2 = dim1; if (e2x.op == TOK.arrayLiteral) { ArrayLiteralExp ale = cast(ArrayLiteralExp)e2x; dim2 = ale.elements ? ale.elements.dim : 0; } else if (e2x.op == TOK.slice) { Type tx = toStaticArrayType(cast(SliceExp)e2x); if (tx) dim2 = (cast(TypeSArray)tx).dim.toInteger(); } if (dim1 != dim2) { exp.error("mismatched array lengths, %d and %d", cast(int)dim1, cast(int)dim2); return setError(); } } // May be block or element-wise assignment, so // convert e1 to e1[] if (exp.op != TOK.assign) { // If multidimensional static array, treat as one large array dinteger_t dim = (cast(TypeSArray)t1).dim.toInteger(); Type t = t1; while (1) { t = t.nextOf().toBasetype(); if (t.ty != Tsarray) break; dim *= (cast(TypeSArray)t).dim.toInteger(); e1x.type = t.nextOf().sarrayOf(dim); } } auto sle = new SliceExp(e1x.loc, e1x, null, null); sle.arrayop = true; e1x = sle.expressionSemantic(sc); } if (e1x.op == TOK.error) { result = e1x; return; } if (e2x.op == TOK.error) { result = e2x; return; } exp.e1 = e1x; exp.e2 = e2x; t1 = e1x.type.toBasetype(); } /* Check the mutability of e1. */ if (exp.e1.op == TOK.arrayLength) { // e1 is not an lvalue, but we let code generator handle it ArrayLengthExp ale = cast(ArrayLengthExp)exp.e1; Expression ale1x = ale.e1; ale1x = ale1x.modifiableLvalue(sc, exp.e1); if (ale1x.op == TOK.error) { result = ale1x; return; } ale.e1 = ale1x; Type tn = ale.e1.type.toBasetype().nextOf(); checkDefCtor(ale.loc, tn); semanticTypeInfo(sc, tn); } else if (exp.e1.op == TOK.slice) { Type tn = exp.e1.type.nextOf(); if (exp.op == TOK.assign && !tn.isMutable()) { exp.error("slice `%s` is not mutable", exp.e1.toChars()); return setError(); } if (exp.op == TOK.assign && !tn.baseElemOf().isAssignable()) { exp.error("slice `%s` is not mutable, struct `%s` has immutable members", exp.e1.toChars(), tn.baseElemOf().toChars()); result = new ErrorExp(); return; } // For conditional operator, both branches need conversion. SliceExp se = cast(SliceExp)exp.e1; while (se.e1.op == TOK.slice) se = cast(SliceExp)se.e1; if (se.e1.op == TOK.question && se.e1.type.toBasetype().ty == Tsarray) { se.e1 = se.e1.modifiableLvalue(sc, exp.e1); if (se.e1.op == TOK.error) { result = se.e1; return; } } } else { if (t1.ty == Tsarray && exp.op == TOK.assign) { Type tn = exp.e1.type.nextOf(); if (tn && !tn.baseElemOf().isAssignable()) { exp.error("array `%s` is not mutable, struct `%s` has immutable members", exp.e1.toChars(), tn.baseElemOf().toChars()); result = new ErrorExp(); return; } } Expression e1x = exp.e1; // Try to do a decent error message with the expression // before it got constant folded if (e1x.op != TOK.variable) e1x = e1x.optimize(WANTvalue); if (exp.op == TOK.assign) e1x = e1x.modifiableLvalue(sc, e1old); if (e1x.op == TOK.error) { result = e1x; return; } exp.e1 = e1x; } /* Tweak e2 based on the type of e1. */ Expression e2x = exp.e2; Type t2 = e2x.type.toBasetype(); // If it is a array, get the element type. Note that it may be // multi-dimensional. Type telem = t1; while (telem.ty == Tarray) telem = telem.nextOf(); if (exp.e1.op == TOK.slice && t1.nextOf() && (telem.ty != Tvoid || e2x.op == TOK.null_) && e2x.implicitConvTo(t1.nextOf())) { // Check for block assignment. If it is of type void[], void[][], etc, // '= null' is the only allowable block assignment (Bug 7493) exp.memset |= MemorySet.blockAssign; // make it easy for back end to tell what this is e2x = e2x.implicitCastTo(sc, t1.nextOf()); if (exp.op != TOK.blit && e2x.isLvalue() && exp.e1.checkPostblit(sc, t1.nextOf())) return setError(); } else if (exp.e1.op == TOK.slice && (t2.ty == Tarray || t2.ty == Tsarray) && t2.nextOf().implicitConvTo(t1.nextOf())) { // Check element-wise assignment. /* If assigned elements number is known at compile time, * check the mismatch. */ SliceExp se1 = cast(SliceExp)exp.e1; TypeSArray tsa1 = cast(TypeSArray)toStaticArrayType(se1); TypeSArray tsa2 = null; if (e2x.op == TOK.arrayLiteral) tsa2 = cast(TypeSArray)t2.nextOf().sarrayOf((cast(ArrayLiteralExp)e2x).elements.dim); else if (e2x.op == TOK.slice) tsa2 = cast(TypeSArray)toStaticArrayType(cast(SliceExp)e2x); else if (t2.ty == Tsarray) tsa2 = cast(TypeSArray)t2; if (tsa1 && tsa2) { uinteger_t dim1 = tsa1.dim.toInteger(); uinteger_t dim2 = tsa2.dim.toInteger(); if (dim1 != dim2) { exp.error("mismatched array lengths, %d and %d", cast(int)dim1, cast(int)dim2); return setError(); } } if (exp.op != TOK.blit && (e2x.op == TOK.slice && (cast(UnaExp)e2x).e1.isLvalue() || e2x.op == TOK.cast_ && (cast(UnaExp)e2x).e1.isLvalue() || e2x.op != TOK.slice && e2x.isLvalue())) { if (exp.e1.checkPostblit(sc, t1.nextOf())) return setError(); } if (0 && global.params.warnings && !global.gag && exp.op == TOK.assign && e2x.op != TOK.slice && e2x.op != TOK.assign && e2x.op != TOK.arrayLiteral && e2x.op != TOK.string_ && !(e2x.op == TOK.add || e2x.op == TOK.min || e2x.op == TOK.mul || e2x.op == TOK.div || e2x.op == TOK.mod || e2x.op == TOK.xor || e2x.op == TOK.and || e2x.op == TOK.or || e2x.op == TOK.pow || e2x.op == TOK.tilde || e2x.op == TOK.negate)) { const(char)* e1str = exp.e1.toChars(); const(char)* e2str = e2x.toChars(); exp.warning("explicit element-wise assignment `%s = (%s)[]` is better than `%s = %s`", e1str, e2str, e1str, e2str); } Type t2n = t2.nextOf(); Type t1n = t1.nextOf(); int offset; if (t2n.equivalent(t1n) || t1n.isBaseOf(t2n, &offset) && offset == 0) { /* Allow copy of distinct qualifier elements. * eg. * char[] dst; const(char)[] src; * dst[] = src; * * class C {} class D : C {} * C[2] ca; D[] da; * ca[] = da; */ if (isArrayOpValid(e2x)) { // Don't add CastExp to keep AST for array operations e2x = e2x.copy(); e2x.type = exp.e1.type.constOf(); } else e2x = e2x.castTo(sc, exp.e1.type.constOf()); } else { /* https://issues.dlang.org/show_bug.cgi?id=15778 * A string literal has an array type of immutable * elements by default, and normally it cannot be convertible to * array type of mutable elements. But for element-wise assignment, * elements need to be const at best. So we should give a chance * to change code unit size for polysemous string literal. */ if (e2x.op == TOK.string_) e2x = e2x.implicitCastTo(sc, exp.e1.type.constOf()); else e2x = e2x.implicitCastTo(sc, exp.e1.type); } if (t1n.toBasetype.ty == Tvoid && t2n.toBasetype.ty == Tvoid) { if (!sc.intypeof && sc.func && sc.func.setUnsafe()) { exp.error("cannot copy `void[]` to `void[]` in `@safe` code"); return setError(); } } } else { if (0 && global.params.warnings && !global.gag && exp.op == TOK.assign && t1.ty == Tarray && t2.ty == Tsarray && e2x.op != TOK.slice && t2.implicitConvTo(t1)) { // Disallow ar[] = sa (Converted to ar[] = sa[]) // Disallow da = sa (Converted to da = sa[]) const(char)* e1str = exp.e1.toChars(); const(char)* e2str = e2x.toChars(); const(char)* atypestr = exp.e1.op == TOK.slice ? "element-wise" : "slice"; exp.warning("explicit %s assignment `%s = (%s)[]` is better than `%s = %s`", atypestr, e1str, e2str, e1str, e2str); } if (exp.op == TOK.blit) e2x = e2x.castTo(sc, exp.e1.type); else { e2x = e2x.implicitCastTo(sc, exp.e1.type); // Fix Issue 13435: https://issues.dlang.org/show_bug.cgi?id=13435 // If the implicit cast has failed and the assign expression is // the initialization of a struct member field if (e2x.op == TOK.error && exp.op == TOK.construct && t1.ty == Tstruct) { scope sd = (cast(TypeStruct)t1).sym; Dsymbol opAssign = search_function(sd, Id.assign); // and the struct defines an opAssign if (opAssign) { // offer more information about the cause of the problem errorSupplemental(exp.loc, "`%s` is the first assignment of `%s` therefore it represents its initialization", exp.toChars(), exp.e1.toChars()); errorSupplemental(exp.loc, "`opAssign` methods are not used for initialization, but for subsequent assignments"); } } } } if (e2x.op == TOK.error) { result = e2x; return; } exp.e2 = e2x; t2 = exp.e2.type.toBasetype(); /* Look for array operations */ if ((t2.ty == Tarray || t2.ty == Tsarray) && isArrayOpValid(exp.e2)) { // Look for valid array operations if (!(exp.memset & MemorySet.blockAssign) && exp.e1.op == TOK.slice && (isUnaArrayOp(exp.e2.op) || isBinArrayOp(exp.e2.op))) { exp.type = exp.e1.type; if (exp.op == TOK.construct) // https://issues.dlang.org/show_bug.cgi?id=10282 // tweak mutability of e1 element exp.e1.type = exp.e1.type.nextOf().mutableOf().arrayOf(); result = arrayOp(exp, sc); return; } // Drop invalid array operations in e2 // d = a[] + b[], d = (a[] + b[])[0..2], etc if (checkNonAssignmentArrayOp(exp.e2, !(exp.memset & MemorySet.blockAssign) && exp.op == TOK.assign)) return setError(); // Remains valid array assignments // d = d[], d = [1,2,3], etc } /* Don't allow assignment to classes that were allocated on the stack with: * scope Class c = new Class(); */ if (exp.e1.op == TOK.variable && exp.op == TOK.assign) { VarExp ve = cast(VarExp)exp.e1; VarDeclaration vd = ve.var.isVarDeclaration(); if (vd && (vd.onstack || vd.mynew)) { assert(t1.ty == Tclass); exp.error("cannot rebind scope variables"); } } if (exp.e1.op == TOK.variable && (cast(VarExp)exp.e1).var.ident == Id.ctfe) { exp.error("cannot modify compiler-generated variable `__ctfe`"); } exp.type = exp.e1.type; assert(exp.type); auto res = exp.op == TOK.assign ? exp.reorderSettingAAElem(sc) : exp; checkAssignEscape(sc, res, false); result = res; } override void visit(PowAssignExp exp) { if (exp.type) { result = exp; return; } Expression e = exp.op_overload(sc); if (e) { result = e; return; } if (exp.e1.checkReadModifyWrite(exp.op, exp.e2)) return setError(); assert(exp.e1.type && exp.e2.type); if (exp.e1.op == TOK.slice || exp.e1.type.ty == Tarray || exp.e1.type.ty == Tsarray) { if (checkNonAssignmentArrayOp(exp.e1)) return setError(); // T[] ^^= ... if (exp.e2.implicitConvTo(exp.e1.type.nextOf())) { // T[] ^^= T exp.e2 = exp.e2.castTo(sc, exp.e1.type.nextOf()); } else if (Expression ex = typeCombine(exp, sc)) { result = ex; return; } // Check element types are arithmetic Type tb1 = exp.e1.type.nextOf().toBasetype(); Type tb2 = exp.e2.type.toBasetype(); if (tb2.ty == Tarray || tb2.ty == Tsarray) tb2 = tb2.nextOf().toBasetype(); if ((tb1.isintegral() || tb1.isfloating()) && (tb2.isintegral() || tb2.isfloating())) { exp.type = exp.e1.type; result = arrayOp(exp, sc); return; } } else { exp.e1 = exp.e1.modifiableLvalue(sc, exp.e1); } if ((exp.e1.type.isintegral() || exp.e1.type.isfloating()) && (exp.e2.type.isintegral() || exp.e2.type.isfloating())) { Expression e0 = null; e = exp.reorderSettingAAElem(sc); e = Expression.extractLast(e, &e0); assert(e == exp); if (exp.e1.op == TOK.variable) { // Rewrite: e1 = e1 ^^ e2 e = new PowExp(exp.loc, exp.e1.syntaxCopy(), exp.e2); e = new AssignExp(exp.loc, exp.e1, e); } else { // Rewrite: ref tmp = e1; tmp = tmp ^^ e2 auto v = copyToTemp(STC.ref_, "__powtmp", exp.e1); auto de = new DeclarationExp(exp.e1.loc, v); auto ve = new VarExp(exp.e1.loc, v); e = new PowExp(exp.loc, ve, exp.e2); e = new AssignExp(exp.loc, new VarExp(exp.e1.loc, v), e); e = new CommaExp(exp.loc, de, e); } e = Expression.combine(e0, e); e = e.expressionSemantic(sc); result = e; return; } result = exp.incompatibleTypes(); } override void visit(CatAssignExp exp) { if (exp.type) { result = exp; return; } //printf("CatAssignExp::semantic() %s\n", exp.toChars()); Expression e = exp.op_overload(sc); if (e) { result = e; return; } if (exp.e1.op == TOK.slice) { SliceExp se = cast(SliceExp)exp.e1; if (se.e1.type.toBasetype().ty == Tsarray) { exp.error("cannot append to static array `%s`", se.e1.type.toChars()); return setError(); } } exp.e1 = exp.e1.modifiableLvalue(sc, exp.e1); if (exp.e1.op == TOK.error) { result = exp.e1; return; } if (exp.e2.op == TOK.error) { result = exp.e2; return; } if (checkNonAssignmentArrayOp(exp.e2)) return setError(); Type tb1 = exp.e1.type.toBasetype(); Type tb1next = tb1.nextOf(); Type tb2 = exp.e2.type.toBasetype(); /* Possibilities: * TOK.concatenateAssign: appending T[] to T[] * TOK.concatenateElemAssign: appending T to T[] * TOK.concatenateDcharAssign: appending dchar to T[] */ if ((tb1.ty == Tarray) && (tb2.ty == Tarray || tb2.ty == Tsarray) && (exp.e2.implicitConvTo(exp.e1.type) || (tb2.nextOf().implicitConvTo(tb1next) && (tb2.nextOf().size(Loc.initial) == tb1next.size(Loc.initial))))) { // TOK.concatenateAssign assert(exp.op == TOK.concatenateAssign); if (exp.e1.checkPostblit(sc, tb1next)) return setError(); exp.e2 = exp.e2.castTo(sc, exp.e1.type); } else if ((tb1.ty == Tarray) && exp.e2.implicitConvTo(tb1next)) { // Append element if (exp.e2.checkPostblit(sc, tb2)) return setError(); if (checkNewEscape(sc, exp.e2, false)) return setError(); exp.op = TOK.concatenateElemAssign; exp.e2 = exp.e2.castTo(sc, tb1next); exp.e2 = doCopyOrMove(sc, exp.e2); } else if (tb1.ty == Tarray && (tb1next.ty == Tchar || tb1next.ty == Twchar) && exp.e2.type.ty != tb1next.ty && exp.e2.implicitConvTo(Type.tdchar)) { // Append dchar to char[] or wchar[] exp.op = TOK.concatenateDcharAssign; exp.e2 = exp.e2.castTo(sc, Type.tdchar); /* Do not allow appending wchar to char[] because if wchar happens * to be a surrogate pair, nothing good can result. */ } else { exp.error("cannot append type `%s` to type `%s`", tb2.toChars(), tb1.toChars()); return setError(); } if (exp.e2.checkValue()) return setError(); exp.type = exp.e1.type; auto res = exp.reorderSettingAAElem(sc); if ((exp.op == TOK.concatenateElemAssign || exp.op == TOK.concatenateDcharAssign) && global.params.vsafe) checkAssignEscape(sc, res, false); result = res; } override void visit(AddExp exp) { static if (LOGSEMANTIC) { printf("AddExp::semantic('%s')\n", exp.toChars()); } if (exp.type) { result = exp; return; } if (Expression ex = binSemanticProp(exp, sc)) { result = ex; return; } Expression e = exp.op_overload(sc); if (e) { result = e; return; } Type tb1 = exp.e1.type.toBasetype(); Type tb2 = exp.e2.type.toBasetype(); bool err = false; if (tb1.ty == Tdelegate || tb1.ty == Tpointer && tb1.nextOf().ty == Tfunction) { err |= exp.e1.checkArithmetic(); } if (tb2.ty == Tdelegate || tb2.ty == Tpointer && tb2.nextOf().ty == Tfunction) { err |= exp.e2.checkArithmetic(); } if (err) return setError(); if (tb1.ty == Tpointer && exp.e2.type.isintegral() || tb2.ty == Tpointer && exp.e1.type.isintegral()) { result = scaleFactor(exp, sc); return; } if (tb1.ty == Tpointer && tb2.ty == Tpointer) { result = exp.incompatibleTypes(); return; } if (Expression ex = typeCombine(exp, sc)) { result = ex; return; } Type tb = exp.type.toBasetype(); if (tb.ty == Tarray || tb.ty == Tsarray) { if (!isArrayOpValid(exp)) { result = arrayOpInvalidError(exp); return; } result = exp; return; } tb1 = exp.e1.type.toBasetype(); if (!Target.isVectorOpSupported(tb1, exp.op, tb2)) { result = exp.incompatibleTypes(); return; } if ((tb1.isreal() && exp.e2.type.isimaginary()) || (tb1.isimaginary() && exp.e2.type.isreal())) { switch (exp.type.toBasetype().ty) { case Tfloat32: case Timaginary32: exp.type = Type.tcomplex32; break; case Tfloat64: case Timaginary64: exp.type = Type.tcomplex64; break; case Tfloat80: case Timaginary80: exp.type = Type.tcomplex80; break; default: assert(0); } } result = exp; } override void visit(MinExp exp) { static if (LOGSEMANTIC) { printf("MinExp::semantic('%s')\n", exp.toChars()); } if (exp.type) { result = exp; return; } if (Expression ex = binSemanticProp(exp, sc)) { result = ex; return; } Expression e = exp.op_overload(sc); if (e) { result = e; return; } Type t1 = exp.e1.type.toBasetype(); Type t2 = exp.e2.type.toBasetype(); bool err = false; if (t1.ty == Tdelegate || t1.ty == Tpointer && t1.nextOf().ty == Tfunction) { err |= exp.e1.checkArithmetic(); } if (t2.ty == Tdelegate || t2.ty == Tpointer && t2.nextOf().ty == Tfunction) { err |= exp.e2.checkArithmetic(); } if (err) return setError(); if (t1.ty == Tpointer) { if (t2.ty == Tpointer) { // https://dlang.org/spec/expression.html#add_expressions // "If both operands are pointers, and the operator is -, the pointers are // subtracted and the result is divided by the size of the type pointed to // by the operands. It is an error if the pointers point to different types." Type p1 = t1.nextOf(); Type p2 = t2.nextOf(); if (!p1.equivalent(p2)) { // Deprecation to remain for at least a year, after which this should be // changed to an error // See https://github.com/dlang/dmd/pull/7332 deprecation(exp.loc, "cannot subtract pointers to different types: `%s` and `%s`.", t1.toChars(), t2.toChars()); } // Need to divide the result by the stride // Replace (ptr - ptr) with (ptr - ptr) / stride d_int64 stride; // make sure pointer types are compatible if (Expression ex = typeCombine(exp, sc)) { result = ex; return; } exp.type = Type.tptrdiff_t; stride = t2.nextOf().size(); if (stride == 0) { e = new IntegerExp(exp.loc, 0, Type.tptrdiff_t); } else { e = new DivExp(exp.loc, exp, new IntegerExp(Loc.initial, stride, Type.tptrdiff_t)); e.type = Type.tptrdiff_t; } } else if (t2.isintegral()) e = scaleFactor(exp, sc); else { exp.error("can't subtract `%s` from pointer", t2.toChars()); e = new ErrorExp(); } result = e; return; } if (t2.ty == Tpointer) { exp.type = exp.e2.type; exp.error("can't subtract pointer from `%s`", exp.e1.type.toChars()); return setError(); } if (Expression ex = typeCombine(exp, sc)) { result = ex; return; } Type tb = exp.type.toBasetype(); if (tb.ty == Tarray || tb.ty == Tsarray) { if (!isArrayOpValid(exp)) { result = arrayOpInvalidError(exp); return; } result = exp; return; } t1 = exp.e1.type.toBasetype(); t2 = exp.e2.type.toBasetype(); if (!Target.isVectorOpSupported(t1, exp.op, t2)) { result = exp.incompatibleTypes(); return; } if ((t1.isreal() && t2.isimaginary()) || (t1.isimaginary() && t2.isreal())) { switch (exp.type.ty) { case Tfloat32: case Timaginary32: exp.type = Type.tcomplex32; break; case Tfloat64: case Timaginary64: exp.type = Type.tcomplex64; break; case Tfloat80: case Timaginary80: exp.type = Type.tcomplex80; break; default: assert(0); } } result = exp; return; } override void visit(CatExp exp) { // https://dlang.org/spec/expression.html#cat_expressions //printf("CatExp.semantic() %s\n", toChars()); if (exp.type) { result = exp; return; } if (Expression ex = binSemanticProp(exp, sc)) { result = ex; return; } Expression e = exp.op_overload(sc); if (e) { result = e; return; } Type tb1 = exp.e1.type.toBasetype(); Type tb2 = exp.e2.type.toBasetype(); auto f1 = checkNonAssignmentArrayOp(exp.e1); auto f2 = checkNonAssignmentArrayOp(exp.e2); if (f1 || f2) return setError(); /* BUG: Should handle things like: * char c; * c ~ ' ' * ' ' ~ c; */ version (none) { exp.e1.type.print(); exp.e2.type.print(); } Type tb1next = tb1.nextOf(); Type tb2next = tb2.nextOf(); // Check for: array ~ array if (tb1next && tb2next && (tb1next.implicitConvTo(tb2next) >= MATCH.constant || tb2next.implicitConvTo(tb1next) >= MATCH.constant || exp.e1.op == TOK.arrayLiteral && exp.e1.implicitConvTo(tb2) || exp.e2.op == TOK.arrayLiteral && exp.e2.implicitConvTo(tb1))) { /* https://issues.dlang.org/show_bug.cgi?id=9248 * Here to avoid the case of: * void*[] a = [cast(void*)1]; * void*[] b = [cast(void*)2]; * a ~ b; * becoming: * a ~ [cast(void*)b]; */ /* https://issues.dlang.org/show_bug.cgi?id=14682 * Also to avoid the case of: * int[][] a; * a ~ []; * becoming: * a ~ cast(int[])[]; */ goto Lpeer; } // Check for: array ~ element if ((tb1.ty == Tsarray || tb1.ty == Tarray) && tb2.ty != Tvoid) { if (exp.e1.op == TOK.arrayLiteral) { exp.e2 = doCopyOrMove(sc, exp.e2); // https://issues.dlang.org/show_bug.cgi?id=14686 // Postblit call appears in AST, and this is // finally translated to an ArrayLiteralExp in below optimize(). } else if (exp.e1.op == TOK.string_) { // No postblit call exists on character (integer) value. } else { if (exp.e2.checkPostblit(sc, tb2)) return setError(); // Postblit call will be done in runtime helper function } if (exp.e1.op == TOK.arrayLiteral && exp.e1.implicitConvTo(tb2.arrayOf())) { exp.e1 = exp.e1.implicitCastTo(sc, tb2.arrayOf()); exp.type = tb2.arrayOf(); goto L2elem; } if (exp.e2.implicitConvTo(tb1next) >= MATCH.convert) { exp.e2 = exp.e2.implicitCastTo(sc, tb1next); exp.type = tb1next.arrayOf(); L2elem: if (tb2.ty == Tarray || tb2.ty == Tsarray) { // Make e2 into [e2] exp.e2 = new ArrayLiteralExp(exp.e2.loc, exp.e2); exp.e2.type = exp.type; } else if (checkNewEscape(sc, exp.e2, false)) return setError(); result = exp.optimize(WANTvalue); return; } } // Check for: element ~ array if ((tb2.ty == Tsarray || tb2.ty == Tarray) && tb1.ty != Tvoid) { if (exp.e2.op == TOK.arrayLiteral) { exp.e1 = doCopyOrMove(sc, exp.e1); } else if (exp.e2.op == TOK.string_) { } else { if (exp.e1.checkPostblit(sc, tb1)) return setError(); } if (exp.e2.op == TOK.arrayLiteral && exp.e2.implicitConvTo(tb1.arrayOf())) { exp.e2 = exp.e2.implicitCastTo(sc, tb1.arrayOf()); exp.type = tb1.arrayOf(); goto L1elem; } if (exp.e1.implicitConvTo(tb2next) >= MATCH.convert) { exp.e1 = exp.e1.implicitCastTo(sc, tb2next); exp.type = tb2next.arrayOf(); L1elem: if (tb1.ty == Tarray || tb1.ty == Tsarray) { // Make e1 into [e1] exp.e1 = new ArrayLiteralExp(exp.e1.loc, exp.e1); exp.e1.type = exp.type; } else if (checkNewEscape(sc, exp.e1, false)) return setError(); result = exp.optimize(WANTvalue); return; } } Lpeer: if ((tb1.ty == Tsarray || tb1.ty == Tarray) && (tb2.ty == Tsarray || tb2.ty == Tarray) && (tb1next.mod || tb2next.mod) && (tb1next.mod != tb2next.mod)) { Type t1 = tb1next.mutableOf().constOf().arrayOf(); Type t2 = tb2next.mutableOf().constOf().arrayOf(); if (exp.e1.op == TOK.string_ && !(cast(StringExp)exp.e1).committed) exp.e1.type = t1; else exp.e1 = exp.e1.castTo(sc, t1); if (exp.e2.op == TOK.string_ && !(cast(StringExp)exp.e2).committed) exp.e2.type = t2; else exp.e2 = exp.e2.castTo(sc, t2); } if (Expression ex = typeCombine(exp, sc)) { result = ex; return; } exp.type = exp.type.toHeadMutable(); Type tb = exp.type.toBasetype(); if (tb.ty == Tsarray) exp.type = tb.nextOf().arrayOf(); if (exp.type.ty == Tarray && tb1next && tb2next && tb1next.mod != tb2next.mod) { exp.type = exp.type.nextOf().toHeadMutable().arrayOf(); } if (Type tbn = tb.nextOf()) { if (exp.checkPostblit(sc, tbn)) return setError(); } version (none) { exp.e1.type.print(); exp.e2.type.print(); exp.type.print(); exp.print(); } Type t1 = exp.e1.type.toBasetype(); Type t2 = exp.e2.type.toBasetype(); if ((t1.ty == Tarray || t1.ty == Tsarray) && (t2.ty == Tarray || t2.ty == Tsarray)) { // Normalize to ArrayLiteralExp or StringExp as far as possible e = exp.optimize(WANTvalue); } else { //printf("(%s) ~ (%s)\n", e1.toChars(), e2.toChars()); result = exp.incompatibleTypes(); return; } result = e; } override void visit(MulExp exp) { version (none) { printf("MulExp::semantic() %s\n", exp.toChars()); } if (exp.type) { result = exp; return; } if (Expression ex = binSemanticProp(exp, sc)) { result = ex; return; } Expression e = exp.op_overload(sc); if (e) { result = e; return; } if (Expression ex = typeCombine(exp, sc)) { result = ex; return; } Type tb = exp.type.toBasetype(); if (tb.ty == Tarray || tb.ty == Tsarray) { if (!isArrayOpValid(exp)) { result = arrayOpInvalidError(exp); return; } result = exp; return; } if (exp.checkArithmeticBin()) return setError(); if (exp.type.isfloating()) { Type t1 = exp.e1.type; Type t2 = exp.e2.type; if (t1.isreal()) { exp.type = t2; } else if (t2.isreal()) { exp.type = t1; } else if (t1.isimaginary()) { if (t2.isimaginary()) { switch (t1.toBasetype().ty) { case Timaginary32: exp.type = Type.tfloat32; break; case Timaginary64: exp.type = Type.tfloat64; break; case Timaginary80: exp.type = Type.tfloat80; break; default: assert(0); } // iy * iv = -yv exp.e1.type = exp.type; exp.e2.type = exp.type; e = new NegExp(exp.loc, exp); e = e.expressionSemantic(sc); result = e; return; } else exp.type = t2; // t2 is complex } else if (t2.isimaginary()) { exp.type = t1; // t1 is complex } } else if (!Target.isVectorOpSupported(tb, exp.op, exp.e2.type.toBasetype())) { result = exp.incompatibleTypes(); return; } result = exp; } override void visit(DivExp exp) { if (exp.type) { result = exp; return; } if (Expression ex = binSemanticProp(exp, sc)) { result = ex; return; } Expression e = exp.op_overload(sc); if (e) { result = e; return; } if (Expression ex = typeCombine(exp, sc)) { result = ex; return; } Type tb = exp.type.toBasetype(); if (tb.ty == Tarray || tb.ty == Tsarray) { if (!isArrayOpValid(exp)) { result = arrayOpInvalidError(exp); return; } result = exp; return; } if (exp.checkArithmeticBin()) return setError(); if (exp.type.isfloating()) { Type t1 = exp.e1.type; Type t2 = exp.e2.type; if (t1.isreal()) { exp.type = t2; if (t2.isimaginary()) { // x/iv = i(-x/v) exp.e2.type = t1; e = new NegExp(exp.loc, exp); e = e.expressionSemantic(sc); result = e; return; } } else if (t2.isreal()) { exp.type = t1; } else if (t1.isimaginary()) { if (t2.isimaginary()) { switch (t1.toBasetype().ty) { case Timaginary32: exp.type = Type.tfloat32; break; case Timaginary64: exp.type = Type.tfloat64; break; case Timaginary80: exp.type = Type.tfloat80; break; default: assert(0); } } else exp.type = t2; // t2 is complex } else if (t2.isimaginary()) { exp.type = t1; // t1 is complex } } else if (!Target.isVectorOpSupported(tb, exp.op, exp.e2.type.toBasetype())) { result = exp.incompatibleTypes(); return; } result = exp; } override void visit(ModExp exp) { if (exp.type) { result = exp; return; } if (Expression ex = binSemanticProp(exp, sc)) { result = ex; return; } Expression e = exp.op_overload(sc); if (e) { result = e; return; } if (Expression ex = typeCombine(exp, sc)) { result = ex; return; } Type tb = exp.type.toBasetype(); if (tb.ty == Tarray || tb.ty == Tsarray) { if (!isArrayOpValid(exp)) { result = arrayOpInvalidError(exp); return; } result = exp; return; } if (!Target.isVectorOpSupported(tb, exp.op, exp.e2.type.toBasetype())) { result = exp.incompatibleTypes(); return; } if (exp.checkArithmeticBin()) return setError(); if (exp.type.isfloating()) { exp.type = exp.e1.type; if (exp.e2.type.iscomplex()) { exp.error("cannot perform modulo complex arithmetic"); return setError(); } } result = exp; } override void visit(PowExp exp) { if (exp.type) { result = exp; return; } //printf("PowExp::semantic() %s\n", toChars()); if (Expression ex = binSemanticProp(exp, sc)) { result = ex; return; } Expression e = exp.op_overload(sc); if (e) { result = e; return; } if (Expression ex = typeCombine(exp, sc)) { result = ex; return; } Type tb = exp.type.toBasetype(); if (tb.ty == Tarray || tb.ty == Tsarray) { if (!isArrayOpValid(exp)) { result = arrayOpInvalidError(exp); return; } result = exp; return; } if (exp.checkArithmeticBin()) return setError(); if (!Target.isVectorOpSupported(tb, exp.op, exp.e2.type.toBasetype())) { result = exp.incompatibleTypes(); return; } // For built-in numeric types, there are several cases. // TODO: backend support, especially for e1 ^^ 2. // First, attempt to fold the expression. e = exp.optimize(WANTvalue); if (e.op != TOK.pow) { e = e.expressionSemantic(sc); result = e; return; } // Determine if we're raising to an integer power. sinteger_t intpow = 0; if (exp.e2.op == TOK.int64 && (cast(sinteger_t)exp.e2.toInteger() == 2 || cast(sinteger_t)exp.e2.toInteger() == 3)) intpow = exp.e2.toInteger(); else if (exp.e2.op == TOK.float64 && (exp.e2.toReal() == real_t(cast(sinteger_t)exp.e2.toReal()))) intpow = cast(sinteger_t)exp.e2.toReal(); // Deal with x^^2, x^^3 immediately, since they are of practical importance. if (intpow == 2 || intpow == 3) { // Replace x^^2 with (tmp = x, tmp*tmp) // Replace x^^3 with (tmp = x, tmp*tmp*tmp) auto tmp = copyToTemp(0, "__powtmp", exp.e1); Expression de = new DeclarationExp(exp.loc, tmp); Expression ve = new VarExp(exp.loc, tmp); /* Note that we're reusing ve. This should be ok. */ Expression me = new MulExp(exp.loc, ve, ve); if (intpow == 3) me = new MulExp(exp.loc, me, ve); e = new CommaExp(exp.loc, de, me); e = e.expressionSemantic(sc); result = e; return; } Module mmath = loadStdMath(); if (!mmath) { //error("requires std.math for ^^ operators"); //fatal(); // Leave handling of PowExp to the backend, or throw // an error gracefully if no backend support exists. if (Expression ex = typeCombine(exp, sc)) { result = ex; return; } result = exp; return; } e = new ScopeExp(exp.loc, mmath); if (exp.e2.op == TOK.float64 && exp.e2.toReal() == CTFloat.half) { // Replace e1 ^^ 0.5 with .std.math.sqrt(x) e = new CallExp(exp.loc, new DotIdExp(exp.loc, e, Id._sqrt), exp.e1); } else { // Replace e1 ^^ e2 with .std.math.pow(e1, e2) e = new CallExp(exp.loc, new DotIdExp(exp.loc, e, Id._pow), exp.e1, exp.e2); } e = e.expressionSemantic(sc); result = e; return; } override void visit(ShlExp exp) { //printf("ShlExp::semantic(), type = %p\n", type); if (exp.type) { result = exp; return; } if (Expression ex = binSemanticProp(exp, sc)) { result = ex; return; } Expression e = exp.op_overload(sc); if (e) { result = e; return; } if (exp.checkIntegralBin()) return setError(); if (!Target.isVectorOpSupported(exp.e1.type.toBasetype(), exp.op, exp.e2.type.toBasetype())) { result = exp.incompatibleTypes(); return; } exp.e1 = integralPromotions(exp.e1, sc); if (exp.e2.type.toBasetype().ty != Tvector) exp.e2 = exp.e2.castTo(sc, Type.tshiftcnt); exp.type = exp.e1.type; result = exp; } override void visit(ShrExp exp) { if (exp.type) { result = exp; return; } if (Expression ex = binSemanticProp(exp, sc)) { result = ex; return; } Expression e = exp.op_overload(sc); if (e) { result = e; return; } if (exp.checkIntegralBin()) return setError(); if (!Target.isVectorOpSupported(exp.e1.type.toBasetype(), exp.op, exp.e2.type.toBasetype())) { result = exp.incompatibleTypes(); return; } exp.e1 = integralPromotions(exp.e1, sc); if (exp.e2.type.toBasetype().ty != Tvector) exp.e2 = exp.e2.castTo(sc, Type.tshiftcnt); exp.type = exp.e1.type; result = exp; } override void visit(UshrExp exp) { if (exp.type) { result = exp; return; } if (Expression ex = binSemanticProp(exp, sc)) { result = ex; return; } Expression e = exp.op_overload(sc); if (e) { result = e; return; } if (exp.checkIntegralBin()) return setError(); if (!Target.isVectorOpSupported(exp.e1.type.toBasetype(), exp.op, exp.e2.type.toBasetype())) { result = exp.incompatibleTypes(); return; } exp.e1 = integralPromotions(exp.e1, sc); if (exp.e2.type.toBasetype().ty != Tvector) exp.e2 = exp.e2.castTo(sc, Type.tshiftcnt); exp.type = exp.e1.type; result = exp; } override void visit(AndExp exp) { if (exp.type) { result = exp; return; } if (Expression ex = binSemanticProp(exp, sc)) { result = ex; return; } Expression e = exp.op_overload(sc); if (e) { result = e; return; } if (exp.e1.type.toBasetype().ty == Tbool && exp.e2.type.toBasetype().ty == Tbool) { exp.type = exp.e1.type; result = exp; return; } if (Expression ex = typeCombine(exp, sc)) { result = ex; return; } Type tb = exp.type.toBasetype(); if (tb.ty == Tarray || tb.ty == Tsarray) { if (!isArrayOpValid(exp)) { result = arrayOpInvalidError(exp); return; } result = exp; return; } if (!Target.isVectorOpSupported(tb, exp.op, exp.e2.type.toBasetype())) { result = exp.incompatibleTypes(); return; } if (exp.checkIntegralBin()) return setError(); result = exp; } override void visit(OrExp exp) { if (exp.type) { result = exp; return; } if (Expression ex = binSemanticProp(exp, sc)) { result = ex; return; } Expression e = exp.op_overload(sc); if (e) { result = e; return; } if (exp.e1.type.toBasetype().ty == Tbool && exp.e2.type.toBasetype().ty == Tbool) { exp.type = exp.e1.type; result = exp; return; } if (Expression ex = typeCombine(exp, sc)) { result = ex; return; } Type tb = exp.type.toBasetype(); if (tb.ty == Tarray || tb.ty == Tsarray) { if (!isArrayOpValid(exp)) { result = arrayOpInvalidError(exp); return; } result = exp; return; } if (!Target.isVectorOpSupported(tb, exp.op, exp.e2.type.toBasetype())) { result = exp.incompatibleTypes(); return; } if (exp.checkIntegralBin()) return setError(); result = exp; } override void visit(XorExp exp) { if (exp.type) { result = exp; return; } if (Expression ex = binSemanticProp(exp, sc)) { result = ex; return; } Expression e = exp.op_overload(sc); if (e) { result = e; return; } if (exp.e1.type.toBasetype().ty == Tbool && exp.e2.type.toBasetype().ty == Tbool) { exp.type = exp.e1.type; result = exp; return; } if (Expression ex = typeCombine(exp, sc)) { result = ex; return; } Type tb = exp.type.toBasetype(); if (tb.ty == Tarray || tb.ty == Tsarray) { if (!isArrayOpValid(exp)) { result = arrayOpInvalidError(exp); return; } result = exp; return; } if (!Target.isVectorOpSupported(tb, exp.op, exp.e2.type.toBasetype())) { result = exp.incompatibleTypes(); return; } if (exp.checkIntegralBin()) return setError(); result = exp; } override void visit(LogicalExp exp) { if (exp.type) { result = exp; return; } exp.setNoderefOperands(); Expression e1x = exp.e1.expressionSemantic(sc); // for static alias this: https://issues.dlang.org/show_bug.cgi?id=17684 if (e1x.op == TOK.type) e1x = resolveAliasThis(sc, e1x); e1x = resolveProperties(sc, e1x); e1x = e1x.toBoolean(sc); if (sc.flags & SCOPE.condition) { /* If in static if, don't evaluate e2 if we don't have to. */ e1x = e1x.optimize(WANTvalue); if (e1x.isBool(exp.op == TOK.orOr)) { result = new IntegerExp(exp.loc, exp.op == TOK.orOr, Type.tbool); return; } } CtorFlow ctorflow = sc.ctorflow.clone(); Expression e2x = exp.e2.expressionSemantic(sc); sc.merge(exp.loc, ctorflow); ctorflow.freeFieldinit(); // for static alias this: https://issues.dlang.org/show_bug.cgi?id=17684 if (e2x.op == TOK.type) e2x = resolveAliasThis(sc, e2x); e2x = resolveProperties(sc, e2x); auto f1 = checkNonAssignmentArrayOp(e1x); auto f2 = checkNonAssignmentArrayOp(e2x); if (f1 || f2) return setError(); // Unless the right operand is 'void', the expression is converted to 'bool'. if (e2x.type.ty != Tvoid) e2x = e2x.toBoolean(sc); if (e2x.op == TOK.type || e2x.op == TOK.scope_) { exp.error("`%s` is not an expression", exp.e2.toChars()); return setError(); } if (e1x.op == TOK.error) { result = e1x; return; } if (e2x.op == TOK.error) { result = e2x; return; } // The result type is 'bool', unless the right operand has type 'void'. if (e2x.type.ty == Tvoid) exp.type = Type.tvoid; else exp.type = Type.tbool; exp.e1 = e1x; exp.e2 = e2x; result = exp; } override void visit(CmpExp exp) { static if (LOGSEMANTIC) { printf("CmpExp::semantic('%s')\n", exp.toChars()); } if (exp.type) { result = exp; return; } exp.setNoderefOperands(); if (Expression ex = binSemanticProp(exp, sc)) { result = ex; return; } Type t1 = exp.e1.type.toBasetype(); Type t2 = exp.e2.type.toBasetype(); if (t1.ty == Tclass && exp.e2.op == TOK.null_ || t2.ty == Tclass && exp.e1.op == TOK.null_) { exp.error("do not use `null` when comparing class types"); return setError(); } Expression e = exp.op_overload(sc); if (e) { if (!e.type.isscalar() && e.type.equals(exp.e1.type)) { exp.error("recursive `opCmp` expansion"); return setError(); } if (e.op == TOK.call) { e = new CmpExp(exp.op, exp.loc, e, new IntegerExp(exp.loc, 0, Type.tint32)); e = e.expressionSemantic(sc); } result = e; return; } if (Expression ex = typeCombine(exp, sc)) { result = ex; return; } auto f1 = checkNonAssignmentArrayOp(exp.e1); auto f2 = checkNonAssignmentArrayOp(exp.e2); if (f1 || f2) return setError(); exp.type = Type.tbool; // Special handling for array comparisons Expression arrayLowering = null; t1 = exp.e1.type.toBasetype(); t2 = exp.e2.type.toBasetype(); if ((t1.ty == Tarray || t1.ty == Tsarray || t1.ty == Tpointer) && (t2.ty == Tarray || t2.ty == Tsarray || t2.ty == Tpointer)) { Type t1next = t1.nextOf(); Type t2next = t2.nextOf(); if (t1next.implicitConvTo(t2next) < MATCH.constant && t2next.implicitConvTo(t1next) < MATCH.constant && (t1next.ty != Tvoid && t2next.ty != Tvoid)) { exp.error("array comparison type mismatch, `%s` vs `%s`", t1next.toChars(), t2next.toChars()); return setError(); } if ((t1.ty == Tarray || t1.ty == Tsarray) && (t2.ty == Tarray || t2.ty == Tsarray)) { // Lower to object.__cmp(e1, e2) Expression al = new IdentifierExp(exp.loc, Id.empty); al = new DotIdExp(exp.loc, al, Id.object); al = new DotIdExp(exp.loc, al, Id.__cmp); al = al.expressionSemantic(sc); auto arguments = new Expressions(); arguments.push(exp.e1); arguments.push(exp.e2); al = new CallExp(exp.loc, al, arguments); al = new CmpExp(exp.op, exp.loc, al, new IntegerExp(0)); arrayLowering = al; } } else if (t1.ty == Tstruct || t2.ty == Tstruct || (t1.ty == Tclass && t2.ty == Tclass)) { if (t2.ty == Tstruct) exp.error("need member function `opCmp()` for %s `%s` to compare", t2.toDsymbol(sc).kind(), t2.toChars()); else exp.error("need member function `opCmp()` for %s `%s` to compare", t1.toDsymbol(sc).kind(), t1.toChars()); return setError(); } else if (t1.iscomplex() || t2.iscomplex()) { exp.error("compare not defined for complex operands"); return setError(); } else if (t1.ty == Taarray || t2.ty == Taarray) { exp.error("`%s` is not defined for associative arrays", Token.toChars(exp.op)); return setError(); } else if (!Target.isVectorOpSupported(t1, exp.op, t2)) { result = exp.incompatibleTypes(); return; } else { bool r1 = exp.e1.checkValue(); bool r2 = exp.e2.checkValue(); if (r1 || r2) return setError(); } //printf("CmpExp: %s, type = %s\n", e.toChars(), e.type.toChars()); if (arrayLowering) { arrayLowering = arrayLowering.expressionSemantic(sc); result = arrayLowering; return; } result = exp; return; } override void visit(InExp exp) { if (exp.type) { result = exp; return; } if (Expression ex = binSemanticProp(exp, sc)) { result = ex; return; } Expression e = exp.op_overload(sc); if (e) { result = e; return; } Type t2b = exp.e2.type.toBasetype(); switch (t2b.ty) { case Taarray: { TypeAArray ta = cast(TypeAArray)t2b; // Special handling for array keys if (!arrayTypeCompatible(exp.e1.loc, exp.e1.type, ta.index)) { // Convert key to type of key exp.e1 = exp.e1.implicitCastTo(sc, ta.index); } semanticTypeInfo(sc, ta.index); // Return type is pointer to value exp.type = ta.nextOf().pointerTo(); break; } case Terror: return setError(); default: result = exp.incompatibleTypes(); return; } result = exp; } override void visit(RemoveExp e) { if (Expression ex = binSemantic(e, sc)) { result = ex; return; } result = e; } override void visit(EqualExp exp) { //printf("EqualExp::semantic('%s')\n", exp.toChars()); if (exp.type) { result = exp; return; } exp.setNoderefOperands(); if (auto e = binSemanticProp(exp, sc)) { result = e; return; } if (exp.e1.op == TOK.type || exp.e2.op == TOK.type) { result = exp.incompatibleTypes(); return; } { auto t1 = exp.e1.type; auto t2 = exp.e2.type; if (t1.ty == Tenum && t2.ty == Tenum && !t1.equivalent(t2)) exp.error("Comparison between different enumeration types `%s` and `%s`; If this behavior is intended consider using `std.conv.asOriginalType`", t1.toChars(), t2.toChars()); } /* Before checking for operator overloading, check to see if we're * comparing the addresses of two statics. If so, we can just see * if they are the same symbol. */ if (exp.e1.op == TOK.address && exp.e2.op == TOK.address) { AddrExp ae1 = cast(AddrExp)exp.e1; AddrExp ae2 = cast(AddrExp)exp.e2; if (ae1.e1.op == TOK.variable && ae2.e1.op == TOK.variable) { VarExp ve1 = cast(VarExp)ae1.e1; VarExp ve2 = cast(VarExp)ae2.e1; if (ve1.var == ve2.var) { // They are the same, result is 'true' for ==, 'false' for != result = new IntegerExp(exp.loc, (exp.op == TOK.equal), Type.tbool); return; } } } Type t1 = exp.e1.type.toBasetype(); Type t2 = exp.e2.type.toBasetype(); bool needsDirectEq(Type t1, Type t2) { Type t1n = t1.nextOf().toBasetype(); Type t2n = t2.nextOf().toBasetype(); if (((t1n.ty == Tchar || t1n.ty == Twchar || t1n.ty == Tdchar) && (t2n.ty == Tchar || t2n.ty == Twchar || t2n.ty == Tdchar)) || (t1n.ty == Tvoid || t2n.ty == Tvoid)) { return false; } if (t1n.constOf() != t2n.constOf()) return true; Type t = t1n; while (t.toBasetype().nextOf()) t = t.nextOf().toBasetype(); if (t.ty != Tstruct) return false; semanticTypeInfo(sc, t); return (cast(TypeStruct)t).sym.hasIdentityEquals; } if (auto e = exp.op_overload(sc)) { result = e; return; } if (!(t1.ty == Tarray && t2.ty == Tarray && needsDirectEq(t1, t2))) { if (auto e = typeCombine(exp, sc)) { result = e; return; } } auto f1 = checkNonAssignmentArrayOp(exp.e1); auto f2 = checkNonAssignmentArrayOp(exp.e2); if (f1 || f2) return setError(); exp.type = Type.tbool; // Special handling for array comparisons if (!(t1.ty == Tarray && t2.ty == Tarray && needsDirectEq(t1, t2))) { if (!arrayTypeCompatible(exp.loc, exp.e1.type, exp.e2.type)) { if (exp.e1.type != exp.e2.type && exp.e1.type.isfloating() && exp.e2.type.isfloating()) { // Cast both to complex exp.e1 = exp.e1.castTo(sc, Type.tcomplex80); exp.e2 = exp.e2.castTo(sc, Type.tcomplex80); } } } if (t1.ty == Tarray && t2.ty == Tarray) { //printf("Lowering to __equals %s %s\n", e1.toChars(), e2.toChars()); // For e1 and e2 of struct type, lowers e1 == e2 to object.__equals(e1, e2) // and e1 != e2 to !(object.__equals(e1, e2)). Expression __equals = new IdentifierExp(exp.loc, Id.empty); Identifier id = Identifier.idPool("__equals"); __equals = new DotIdExp(exp.loc, __equals, Id.object); __equals = new DotIdExp(exp.loc, __equals, id); auto arguments = new Expressions(); arguments.push(exp.e1); arguments.push(exp.e2); __equals = new CallExp(exp.loc, __equals, arguments); if (exp.op == TOK.notEqual) { __equals = new NotExp(exp.loc, __equals); } __equals = __equals.expressionSemantic(sc); result = __equals; return; } if (exp.e1.type.toBasetype().ty == Taarray) semanticTypeInfo(sc, exp.e1.type.toBasetype()); if (!Target.isVectorOpSupported(t1, exp.op, t2)) { result = exp.incompatibleTypes(); return; } result = exp; } override void visit(IdentityExp exp) { if (exp.type) { result = exp; return; } exp.setNoderefOperands(); if (auto e = binSemanticProp(exp, sc)) { result = e; return; } if (auto e = typeCombine(exp, sc)) { result = e; return; } auto f1 = checkNonAssignmentArrayOp(exp.e1); auto f2 = checkNonAssignmentArrayOp(exp.e2); if (f1 || f2) return setError(); exp.type = Type.tbool; if (exp.e1.type != exp.e2.type && exp.e1.type.isfloating() && exp.e2.type.isfloating()) { // Cast both to complex exp.e1 = exp.e1.castTo(sc, Type.tcomplex80); exp.e2 = exp.e2.castTo(sc, Type.tcomplex80); } auto tb1 = exp.e1.type.toBasetype(); auto tb2 = exp.e2.type.toBasetype(); if (!Target.isVectorOpSupported(tb1, exp.op, tb2)) { result = exp.incompatibleTypes(); return; } if (exp.e1.op == TOK.call) exp.e1 = (cast(CallExp)exp.e1).addDtorHook(sc); if (exp.e2.op == TOK.call) exp.e2 = (cast(CallExp)exp.e2).addDtorHook(sc); if (exp.e1.type.toBasetype().ty == Tsarray || exp.e2.type.toBasetype().ty == Tsarray) exp.deprecation("identity comparison of static arrays " ~ "implicitly coerces them to slices, " ~ "which are compared by reference"); result = exp; } override void visit(CondExp exp) { static if (LOGSEMANTIC) { printf("CondExp::semantic('%s')\n", exp.toChars()); } if (exp.type) { result = exp; return; } if (exp.econd.op == TOK.dotIdentifier) (cast(DotIdExp)exp.econd).noderef = true; Expression ec = exp.econd.expressionSemantic(sc); ec = resolveProperties(sc, ec); ec = ec.toBoolean(sc); CtorFlow ctorflow_root = sc.ctorflow.clone(); Expression e1x = exp.e1.expressionSemantic(sc); e1x = resolveProperties(sc, e1x); CtorFlow ctorflow1 = sc.ctorflow; sc.ctorflow = ctorflow_root; Expression e2x = exp.e2.expressionSemantic(sc); e2x = resolveProperties(sc, e2x); sc.merge(exp.loc, ctorflow1); ctorflow1.freeFieldinit(); if (ec.op == TOK.error) { result = ec; return; } if (ec.type == Type.terror) return setError(); exp.econd = ec; if (e1x.op == TOK.error) { result = e1x; return; } if (e1x.type == Type.terror) return setError(); exp.e1 = e1x; if (e2x.op == TOK.error) { result = e2x; return; } if (e2x.type == Type.terror) return setError(); exp.e2 = e2x; auto f0 = checkNonAssignmentArrayOp(exp.econd); auto f1 = checkNonAssignmentArrayOp(exp.e1); auto f2 = checkNonAssignmentArrayOp(exp.e2); if (f0 || f1 || f2) return setError(); Type t1 = exp.e1.type; Type t2 = exp.e2.type; // If either operand is void the result is void, we have to cast both // the expression to void so that we explicitly discard the expression // value if any // https://issues.dlang.org/show_bug.cgi?id=16598 if (t1.ty == Tvoid || t2.ty == Tvoid) { exp.type = Type.tvoid; exp.e1 = exp.e1.castTo(sc, exp.type); exp.e2 = exp.e2.castTo(sc, exp.type); } else if (t1 == t2) exp.type = t1; else { if (Expression ex = typeCombine(exp, sc)) { result = ex; return; } switch (exp.e1.type.toBasetype().ty) { case Tcomplex32: case Tcomplex64: case Tcomplex80: exp.e2 = exp.e2.castTo(sc, exp.e1.type); break; default: break; } switch (exp.e2.type.toBasetype().ty) { case Tcomplex32: case Tcomplex64: case Tcomplex80: exp.e1 = exp.e1.castTo(sc, exp.e2.type); break; default: break; } if (exp.type.toBasetype().ty == Tarray) { exp.e1 = exp.e1.castTo(sc, exp.type); exp.e2 = exp.e2.castTo(sc, exp.type); } } exp.type = exp.type.merge2(); version (none) { printf("res: %s\n", exp.type.toChars()); printf("e1 : %s\n", exp.e1.type.toChars()); printf("e2 : %s\n", exp.e2.type.toChars()); } /* https://issues.dlang.org/show_bug.cgi?id=14696 * If either e1 or e2 contain temporaries which need dtor, * make them conditional. * Rewrite: * cond ? (__tmp1 = ..., __tmp1) : (__tmp2 = ..., __tmp2) * to: * (auto __cond = cond) ? (... __tmp1) : (... __tmp2) * and replace edtors of __tmp1 and __tmp2 with: * __tmp1.edtor --> __cond && __tmp1.dtor() * __tmp2.edtor --> __cond || __tmp2.dtor() */ exp.hookDtors(sc); result = exp; } override void visit(FileInitExp e) { //printf("FileInitExp::semantic()\n"); e.type = Type.tstring; result = e; } override void visit(LineInitExp e) { e.type = Type.tint32; result = e; } override void visit(ModuleInitExp e) { //printf("ModuleInitExp::semantic()\n"); e.type = Type.tstring; result = e; } override void visit(FuncInitExp e) { //printf("FuncInitExp::semantic()\n"); e.type = Type.tstring; if (sc.func) { result = e.resolveLoc(Loc.initial, sc); return; } result = e; } override void visit(PrettyFuncInitExp e) { //printf("PrettyFuncInitExp::semantic()\n"); e.type = Type.tstring; if (sc.func) { result = e.resolveLoc(Loc.initial, sc); return; } result = e; } } /********************************** * Try to run semantic routines. * If they fail, return NULL. */ Expression trySemantic(Expression exp, Scope* sc) { //printf("+trySemantic(%s)\n", toChars()); uint errors = global.startGagging(); Expression e = expressionSemantic(exp, sc); if (global.endGagging(errors)) { e = null; } //printf("-trySemantic(%s)\n", toChars()); return e; } /************************** * Helper function for easy error propagation. * If error occurs, returns ErrorExp. Otherwise returns NULL. */ Expression unaSemantic(UnaExp e, Scope* sc) { static if (LOGSEMANTIC) { printf("UnaExp::semantic('%s')\n", e.toChars()); } Expression e1x = e.e1.expressionSemantic(sc); if (e1x.op == TOK.error) return e1x; e.e1 = e1x; return null; } /************************** * Helper function for easy error propagation. * If error occurs, returns ErrorExp. Otherwise returns NULL. */ Expression binSemantic(BinExp e, Scope* sc) { static if (LOGSEMANTIC) { printf("BinExp::semantic('%s')\n", e.toChars()); } Expression e1x = e.e1.expressionSemantic(sc); Expression e2x = e.e2.expressionSemantic(sc); // for static alias this: https://issues.dlang.org/show_bug.cgi?id=17684 if (e1x.op == TOK.type) e1x = resolveAliasThis(sc, e1x); if (e2x.op == TOK.type) e2x = resolveAliasThis(sc, e2x); if (e1x.op == TOK.error) return e1x; if (e2x.op == TOK.error) return e2x; e.e1 = e1x; e.e2 = e2x; return null; } Expression binSemanticProp(BinExp e, Scope* sc) { if (Expression ex = binSemantic(e, sc)) return ex; Expression e1x = resolveProperties(sc, e.e1); Expression e2x = resolveProperties(sc, e.e2); if (e1x.op == TOK.error) return e1x; if (e2x.op == TOK.error) return e2x; e.e1 = e1x; e.e2 = e2x; return null; } // entrypoint for semantic ExpressionSemanticVisitor extern (C++) Expression expressionSemantic(Expression e, Scope* sc) { scope v = new ExpressionSemanticVisitor(sc); e.accept(v); return v.result; } Expression semanticX(DotIdExp exp, Scope* sc) { //printf("DotIdExp::semanticX(this = %p, '%s')\n", this, toChars()); if (Expression ex = unaSemantic(exp, sc)) return ex; if (exp.ident == Id._mangleof) { // symbol.mangleof Dsymbol ds; switch (exp.e1.op) { case TOK.scope_: ds = (cast(ScopeExp)exp.e1).sds; goto L1; case TOK.variable: ds = (cast(VarExp)exp.e1).var; goto L1; case TOK.dotVariable: ds = (cast(DotVarExp)exp.e1).var; goto L1; case TOK.overloadSet: ds = (cast(OverExp)exp.e1).vars; goto L1; case TOK.template_: { TemplateExp te = cast(TemplateExp)exp.e1; ds = te.fd ? cast(Dsymbol)te.fd : te.td; } L1: { assert(ds); if (auto f = ds.isFuncDeclaration()) { if (f.checkForwardRef(exp.loc)) { return new ErrorExp(); } } OutBuffer buf; mangleToBuffer(ds, &buf); const s = buf.peekSlice(); Expression e = new StringExp(exp.loc, buf.extractString(), s.length); e = e.expressionSemantic(sc); return e; } default: break; } } if (exp.e1.op == TOK.variable && exp.e1.type.toBasetype().ty == Tsarray && exp.ident == Id.length) { // bypass checkPurity return exp.e1.type.dotExp(sc, exp.e1, exp.ident, exp.noderef ? Type.DotExpFlag.noDeref : 0); } if (exp.e1.op == TOK.dot) { } else { exp.e1 = resolvePropertiesX(sc, exp.e1); } if (exp.e1.op == TOK.tuple && exp.ident == Id.offsetof) { /* 'distribute' the .offsetof to each of the tuple elements. */ TupleExp te = cast(TupleExp)exp.e1; auto exps = new Expressions(); exps.setDim(te.exps.dim); for (size_t i = 0; i < exps.dim; i++) { Expression e = (*te.exps)[i]; e = e.expressionSemantic(sc); e = new DotIdExp(e.loc, e, Id.offsetof); (*exps)[i] = e; } // Don't evaluate te.e0 in runtime Expression e = new TupleExp(exp.loc, null, exps); e = e.expressionSemantic(sc); return e; } if (exp.e1.op == TOK.tuple && exp.ident == Id.length) { TupleExp te = cast(TupleExp)exp.e1; // Don't evaluate te.e0 in runtime Expression e = new IntegerExp(exp.loc, te.exps.dim, Type.tsize_t); return e; } // https://issues.dlang.org/show_bug.cgi?id=14416 // Template has no built-in properties except for 'stringof'. if ((exp.e1.op == TOK.dotTemplateDeclaration || exp.e1.op == TOK.template_) && exp.ident != Id.stringof) { exp.error("template `%s` does not have property `%s`", exp.e1.toChars(), exp.ident.toChars()); return new ErrorExp(); } if (!exp.e1.type) { exp.error("expression `%s` does not have property `%s`", exp.e1.toChars(), exp.ident.toChars()); return new ErrorExp(); } return exp; } // Resolve e1.ident without seeing UFCS. // If flag == 1, stop "not a property" error and return NULL. Expression semanticY(DotIdExp exp, Scope* sc, int flag) { //printf("DotIdExp::semanticY(this = %p, '%s')\n", exp, exp.toChars()); //{ static int z; fflush(stdout); if (++z == 10) *(char*)0=0; } /* Special case: rewrite this.id and super.id * to be classtype.id and baseclasstype.id * if we have no this pointer. */ if ((exp.e1.op == TOK.this_ || exp.e1.op == TOK.super_) && !hasThis(sc)) { if (AggregateDeclaration ad = sc.getStructClassScope()) { if (exp.e1.op == TOK.this_) { exp.e1 = new TypeExp(exp.e1.loc, ad.type); } else { ClassDeclaration cd = ad.isClassDeclaration(); if (cd && cd.baseClass) exp.e1 = new TypeExp(exp.e1.loc, cd.baseClass.type); } } } Expression e = semanticX(exp, sc); if (e != exp) return e; Expression eleft; Expression eright; if (exp.e1.op == TOK.dot) { DotExp de = cast(DotExp)exp.e1; eleft = de.e1; eright = de.e2; } else { eleft = null; eright = exp.e1; } Type t1b = exp.e1.type.toBasetype(); if (eright.op == TOK.scope_) // also used for template alias's { ScopeExp ie = cast(ScopeExp)eright; int flags = SearchLocalsOnly; /* Disable access to another module's private imports. * The check for 'is sds our current module' is because * the current module should have access to its own imports. */ if (ie.sds.isModule() && ie.sds != sc._module) flags |= IgnorePrivateImports; if (sc.flags & SCOPE.ignoresymbolvisibility) flags |= IgnoreSymbolVisibility; Dsymbol s = ie.sds.search(exp.loc, exp.ident, flags); /* Check for visibility before resolving aliases because public * aliases to private symbols are public. */ if (s && !(sc.flags & SCOPE.ignoresymbolvisibility) && !symbolIsVisible(sc._module, s)) { if (s.isDeclaration()) error(exp.loc, "`%s` is not visible from module `%s`", s.toPrettyChars(), sc._module.toChars()); else deprecation(exp.loc, "`%s` is not visible from module `%s`", s.toPrettyChars(), sc._module.toChars()); // s = null; } if (s) { if (auto p = s.isPackage()) checkAccess(exp.loc, sc, p); // if 's' is a tuple variable, the tuple is returned. s = s.toAlias(); exp.checkDeprecated(sc, s); exp.checkDisabled(sc, s); EnumMember em = s.isEnumMember(); if (em) { return em.getVarExp(exp.loc, sc); } VarDeclaration v = s.isVarDeclaration(); if (v) { //printf("DotIdExp:: Identifier '%s' is a variable, type '%s'\n", toChars(), v.type.toChars()); if (!v.type || !v.type.deco && v.inuse) { if (v.inuse) exp.error("circular reference to %s `%s`", v.kind(), v.toPrettyChars()); else exp.error("forward reference to %s `%s`", v.kind(), v.toPrettyChars()); return new ErrorExp(); } if (v.type.ty == Terror) return new ErrorExp(); if ((v.storage_class & STC.manifest) && v._init && !exp.wantsym) { /* Normally, the replacement of a symbol with its initializer is supposed to be in semantic2(). * Introduced by https://github.com/dlang/dmd/pull/5588 which should probably * be reverted. `wantsym` is the hack to work around the problem. */ if (v.inuse) { error(exp.loc, "circular initialization of %s `%s`", v.kind(), v.toPrettyChars()); return new ErrorExp(); } e = v.expandInitializer(exp.loc); v.inuse++; e = e.expressionSemantic(sc); v.inuse--; return e; } if (v.needThis()) { if (!eleft) eleft = new ThisExp(exp.loc); e = new DotVarExp(exp.loc, eleft, v); e = e.expressionSemantic(sc); } else { e = new VarExp(exp.loc, v); if (eleft) { e = new CommaExp(exp.loc, eleft, e); e.type = v.type; } } e = e.deref(); return e.expressionSemantic(sc); } FuncDeclaration f = s.isFuncDeclaration(); if (f) { //printf("it's a function\n"); if (!f.functionSemantic()) return new ErrorExp(); if (f.needThis()) { if (!eleft) eleft = new ThisExp(exp.loc); e = new DotVarExp(exp.loc, eleft, f, true); e = e.expressionSemantic(sc); } else { e = new VarExp(exp.loc, f, true); if (eleft) { e = new CommaExp(exp.loc, eleft, e); e.type = f.type; } } return e; } if (auto td = s.isTemplateDeclaration()) { if (eleft) e = new DotTemplateExp(exp.loc, eleft, td); else e = new TemplateExp(exp.loc, td); e = e.expressionSemantic(sc); return e; } if (OverDeclaration od = s.isOverDeclaration()) { e = new VarExp(exp.loc, od, true); if (eleft) { e = new CommaExp(exp.loc, eleft, e); e.type = Type.tvoid; // ambiguous type? } return e; } OverloadSet o = s.isOverloadSet(); if (o) { //printf("'%s' is an overload set\n", o.toChars()); return new OverExp(exp.loc, o); } if (auto t = s.getType()) { return (new TypeExp(exp.loc, t)).expressionSemantic(sc); } TupleDeclaration tup = s.isTupleDeclaration(); if (tup) { if (eleft) { e = new DotVarExp(exp.loc, eleft, tup); e = e.expressionSemantic(sc); return e; } e = new TupleExp(exp.loc, tup); e = e.expressionSemantic(sc); return e; } ScopeDsymbol sds = s.isScopeDsymbol(); if (sds) { //printf("it's a ScopeDsymbol %s\n", ident.toChars()); e = new ScopeExp(exp.loc, sds); e = e.expressionSemantic(sc); if (eleft) e = new DotExp(exp.loc, eleft, e); return e; } Import imp = s.isImport(); if (imp) { ie = new ScopeExp(exp.loc, imp.pkg); return ie.expressionSemantic(sc); } // BUG: handle other cases like in IdentifierExp::semantic() debug { printf("s = '%s', kind = '%s'\n", s.toChars(), s.kind()); } assert(0); } else if (exp.ident == Id.stringof) { const p = ie.toChars(); e = new StringExp(exp.loc, cast(char*)p, strlen(p)); e = e.expressionSemantic(sc); return e; } if (ie.sds.isPackage() || ie.sds.isImport() || ie.sds.isModule()) { flag = 0; } if (flag) return null; s = ie.sds.search_correct(exp.ident); if (s) exp.error("undefined identifier `%s` in %s `%s`, did you mean %s `%s`?", exp.ident.toChars(), ie.sds.kind(), ie.sds.toPrettyChars(), s.kind(), s.toChars()); else exp.error("undefined identifier `%s` in %s `%s`", exp.ident.toChars(), ie.sds.kind(), ie.sds.toPrettyChars()); return new ErrorExp(); } else if (t1b.ty == Tpointer && exp.e1.type.ty != Tenum && exp.ident != Id._init && exp.ident != Id.__sizeof && exp.ident != Id.__xalignof && exp.ident != Id.offsetof && exp.ident != Id._mangleof && exp.ident != Id.stringof) { Type t1bn = t1b.nextOf(); if (flag) { AggregateDeclaration ad = isAggregate(t1bn); if (ad && !ad.members) // https://issues.dlang.org/show_bug.cgi?id=11312 return null; } /* Rewrite: * p.ident * as: * (*p).ident */ if (flag && t1bn.ty == Tvoid) return null; e = new PtrExp(exp.loc, exp.e1); e = e.expressionSemantic(sc); return e.type.dotExp(sc, e, exp.ident, flag | (exp.noderef ? Type.DotExpFlag.noDeref : 0)); } else { if (exp.e1.op == TOK.type || exp.e1.op == TOK.template_) flag = 0; e = exp.e1.type.dotExp(sc, exp.e1, exp.ident, flag | (exp.noderef ? Type.DotExpFlag.noDeref : 0)); if (e) e = e.expressionSemantic(sc); return e; } } // Resolve e1.ident!tiargs without seeing UFCS. // If flag == 1, stop "not a property" error and return NULL. Expression semanticY(DotTemplateInstanceExp exp, Scope* sc, int flag) { static if (LOGSEMANTIC) { printf("DotTemplateInstanceExpY::semantic('%s')\n", exp.toChars()); } auto die = new DotIdExp(exp.loc, exp.e1, exp.ti.name); Expression e = die.semanticX(sc); if (e == die) { exp.e1 = die.e1; // take back Type t1b = exp.e1.type.toBasetype(); if (t1b.ty == Tarray || t1b.ty == Tsarray || t1b.ty == Taarray || t1b.ty == Tnull || (t1b.isTypeBasic() && t1b.ty != Tvoid)) { /* No built-in type has templatized properties, so do shortcut. * It is necessary in: 1024.max!"a < b" */ if (flag) return null; } e = die.semanticY(sc, flag); if (flag && e && isDotOpDispatch(e)) { /* opDispatch!tiargs would be a function template that needs IFTI, * so it's not a template */ e = null; /* fall down to UFCS */ } if (flag && !e) return null; } assert(e); L1: if (e.op == TOK.error) return e; if (e.op == TOK.dotVariable) { DotVarExp dve = cast(DotVarExp)e; if (FuncDeclaration fd = dve.var.isFuncDeclaration()) { TemplateDeclaration td = fd.findTemplateDeclRoot(); if (td) { e = new DotTemplateExp(dve.loc, dve.e1, td); e = e.expressionSemantic(sc); } } else if (OverDeclaration od = dve.var.isOverDeclaration()) { exp.e1 = dve.e1; // pull semantic() result if (!exp.findTempDecl(sc)) goto Lerr; if (exp.ti.needsTypeInference(sc)) return exp; exp.ti.dsymbolSemantic(sc); if (!exp.ti.inst || exp.ti.errors) // if template failed to expand return new ErrorExp(); Dsymbol s = exp.ti.toAlias(); Declaration v = s.isDeclaration(); if (v) { if (v.type && !v.type.deco) v.type = v.type.typeSemantic(v.loc, sc); e = new DotVarExp(exp.loc, exp.e1, v); e = e.expressionSemantic(sc); return e; } e = new ScopeExp(exp.loc, exp.ti); e = new DotExp(exp.loc, exp.e1, e); e = e.expressionSemantic(sc); return e; } } else if (e.op == TOK.variable) { VarExp ve = cast(VarExp)e; if (FuncDeclaration fd = ve.var.isFuncDeclaration()) { TemplateDeclaration td = fd.findTemplateDeclRoot(); if (td) { e = new TemplateExp(ve.loc, td); e = e.expressionSemantic(sc); } } else if (OverDeclaration od = ve.var.isOverDeclaration()) { exp.ti.tempdecl = od; e = new ScopeExp(exp.loc, exp.ti); e = e.expressionSemantic(sc); return e; } } if (e.op == TOK.dotTemplateDeclaration) { DotTemplateExp dte = cast(DotTemplateExp)e; exp.e1 = dte.e1; // pull semantic() result exp.ti.tempdecl = dte.td; if (!exp.ti.semanticTiargs(sc)) return new ErrorExp(); if (exp.ti.needsTypeInference(sc)) return exp; exp.ti.dsymbolSemantic(sc); if (!exp.ti.inst || exp.ti.errors) // if template failed to expand return new ErrorExp(); Dsymbol s = exp.ti.toAlias(); Declaration v = s.isDeclaration(); if (v && (v.isFuncDeclaration() || v.isVarDeclaration())) { e = new DotVarExp(exp.loc, exp.e1, v); e = e.expressionSemantic(sc); return e; } e = new ScopeExp(exp.loc, exp.ti); e = new DotExp(exp.loc, exp.e1, e); e = e.expressionSemantic(sc); return e; } else if (e.op == TOK.template_) { exp.ti.tempdecl = (cast(TemplateExp)e).td; e = new ScopeExp(exp.loc, exp.ti); e = e.expressionSemantic(sc); return e; } else if (e.op == TOK.dot) { DotExp de = cast(DotExp)e; if (de.e2.op == TOK.overloadSet) { if (!exp.findTempDecl(sc) || !exp.ti.semanticTiargs(sc)) { return new ErrorExp(); } if (exp.ti.needsTypeInference(sc)) return exp; exp.ti.dsymbolSemantic(sc); if (!exp.ti.inst || exp.ti.errors) // if template failed to expand return new ErrorExp(); Dsymbol s = exp.ti.toAlias(); Declaration v = s.isDeclaration(); if (v) { if (v.type && !v.type.deco) v.type = v.type.typeSemantic(v.loc, sc); e = new DotVarExp(exp.loc, exp.e1, v); e = e.expressionSemantic(sc); return e; } e = new ScopeExp(exp.loc, exp.ti); e = new DotExp(exp.loc, exp.e1, e); e = e.expressionSemantic(sc); return e; } } else if (e.op == TOK.overloadSet) { OverExp oe = cast(OverExp)e; exp.ti.tempdecl = oe.vars; e = new ScopeExp(exp.loc, exp.ti); e = e.expressionSemantic(sc); return e; } Lerr: exp.error("`%s` isn't a template", e.toChars()); return new ErrorExp(); } /**************************************************** * Determine if `exp`, which takes the address of `v`, can do so safely. * Params: * sc = context * exp = expression that takes the address of `v` * v = the variable getting its address taken * Returns: * `true` if ok, `false` for error */ private bool checkAddressVar(Scope* sc, UnaExp exp, VarDeclaration v) { //printf("checkAddressVar(exp: %s, v: %s)\n", exp.toChars(), v.toChars()); if (v) { if (!v.canTakeAddressOf()) { exp.error("cannot take address of `%s`", exp.e1.toChars()); return false; } if (sc.func && !sc.intypeof && !v.isDataseg()) { const(char)* p = v.isParameter() ? "parameter" : "local"; if (global.params.vsafe) { // Taking the address of v means it cannot be set to 'scope' later v.storage_class &= ~STC.maybescope; v.doNotInferScope = true; if (v.storage_class & STC.scope_ && sc.func.setUnsafe()) { exp.error("cannot take address of `scope` %s `%s` in `@safe` function `%s`", p, v.toChars(), sc.func.toChars()); return false; } } else if (sc.func.setUnsafe()) { exp.error("cannot take address of %s `%s` in `@safe` function `%s`", p, v.toChars(), sc.func.toChars()); return false; } } } return true; } /******************************* * Checks the attributes of a function. * Purity (`pure`), safety (`@safe`), no GC allocations(`@nogc`) * and usage of `deprecated` and `@disabled`-ed symbols are checked. * * Params: * exp = expression to check attributes for * sc = scope of the function * f = function to be checked * Returns: `true` if error occur. */ private bool checkFunctionAttributes(Expression exp, Scope* sc, FuncDeclaration f) { with(exp) { bool error = checkDisabled(sc, f); error |= checkDeprecated(sc, f); error |= checkPurity(sc, f); error |= checkSafety(sc, f); error |= checkNogc(sc, f); return error; } }
D
func void b_grantabsolution(var int location) { if((location == LOC_OLDCAMP) || (location == LOC_ALL)) { ABSOLUTIONLEVEL_OLDCAMP = ABSOLUTIONLEVEL_OLDCAMP + 1; PETZCOUNTER_OLDCAMP_MURDER = 0; PETZCOUNTER_OLDCAMP_THEFT = 0; PETZCOUNTER_OLDCAMP_ATTACK = 0; PETZCOUNTER_OLDCAMP_SHEEPKILLER = 0; }; if((location == LOC_CITY) || (location == LOC_ALL)) { ABSOLUTIONLEVEL_CITY = ABSOLUTIONLEVEL_CITY + 1; PETZCOUNTER_CITY_MURDER = 0; PETZCOUNTER_CITY_THEFT = 0; PETZCOUNTER_CITY_ATTACK = 0; PETZCOUNTER_CITY_SHEEPKILLER = 0; }; if((location == LOC_MONASTERY) || (location == LOC_ALL)) { ABSOLUTIONLEVEL_MONASTERY = ABSOLUTIONLEVEL_MONASTERY + 1; PETZCOUNTER_MONASTERY_MURDER = 0; PETZCOUNTER_MONASTERY_THEFT = 0; PETZCOUNTER_MONASTERY_ATTACK = 0; PETZCOUNTER_MONASTERY_SHEEPKILLER = 0; }; if((location == LOC_FARM) || (location == LOC_ALL)) { ABSOLUTIONLEVEL_FARM = ABSOLUTIONLEVEL_FARM + 1; PETZCOUNTER_FARM_MURDER = 0; PETZCOUNTER_FARM_THEFT = 0; PETZCOUNTER_FARM_ATTACK = 0; PETZCOUNTER_FARM_SHEEPKILLER = 0; }; };
D
module UnrealScript.Engine.MaterialExpressionTransformPosition; import ScriptClasses; import UnrealScript.Helpers; import UnrealScript.Engine.MaterialExpression; extern(C++) interface MaterialExpressionTransformPosition : MaterialExpression { public extern(D): private static __gshared ScriptClass mStaticClass; @property final static ScriptClass StaticClass() { mixin(MGSCC("Class Engine.MaterialExpressionTransformPosition")); } private static __gshared MaterialExpressionTransformPosition mDefaultProperties; @property final static MaterialExpressionTransformPosition DefaultProperties() { mixin(MGDPC("MaterialExpressionTransformPosition", "MaterialExpressionTransformPosition Engine.Default__MaterialExpressionTransformPosition")); } enum EMaterialPositionTransform : ubyte { TRANSFORMPOS_World = 0, TRANSFORMPOS_MAX = 1, } @property final auto ref { MaterialExpressionTransformPosition.EMaterialPositionTransform TransformType() { mixin(MGPC("MaterialExpressionTransformPosition.EMaterialPositionTransform", 136)); } MaterialExpression.ExpressionInput InputVar() { mixin(MGPC("MaterialExpression.ExpressionInput", 108)); } } }
D
(comparatives of `far') most remote in space or time or order to the greatest degree or extent or most advanced stage (`furthest' is used more often than `farthest' in this abstract sense to the greatest distance in space or time (`farthest' is used more often than `furthest' in this physical sense
D
void fun() { asm { int 80; } }
D
module derelict.opengl3.deprecatedConstants; private { import derelict.opengl3.types; } enum : GLenum { // 1.0 & 1.1 GL_2_BYTES = 0x1407, GL_3_BYTES = 0x1408, GL_4_BYTES = 0x1409, GL_QUADS = 0x0007, GL_QUAD_STRIP = 0x0008, GL_POLYGON = 0x0009, GL_VERTEX_ARRAY = 0x8074, GL_NORMAL_ARRAY = 0x8075, GL_COLOR_ARRAY = 0x8076, GL_INDEX_ARRAY = 0x8077, GL_TEXTURE_COORD_ARRAY = 0x8078, GL_EDGE_FLAG_ARRAY = 0x8079, GL_VERTEX_ARRAY_SIZE = 0x807A, GL_VERTEX_ARRAY_TYPE = 0x807B, GL_VERTEX_ARRAY_STRIDE = 0x807C, GL_NORMAL_ARRAY_TYPE = 0x807E, GL_NORMAL_ARRAY_STRIDE = 0x807F, GL_COLOR_ARRAY_SIZE = 0x8081, GL_COLOR_ARRAY_TYPE = 0x8082, GL_COLOR_ARRAY_STRIDE = 0x8083, GL_INDEX_ARRAY_TYPE = 0x8085, GL_INDEX_ARRAY_STRIDE = 0x8086, GL_TEXTURE_COORD_ARRAY_SIZE = 0x8088, GL_TEXTURE_COORD_ARRAY_TYPE = 0x8089, GL_TEXTURE_COORD_ARRAY_STRIDE = 0x808A, GL_EDGE_FLAG_ARRAY_STRIDE = 0x808C, GL_VERTEX_ARRAY_POINTER = 0x808E, GL_NORMAL_ARRAY_POINTER = 0x808F, GL_COLOR_ARRAY_POINTER = 0x8090, GL_INDEX_ARRAY_POINTER = 0x8091, GL_TEXTURE_COORD_ARRAY_POINTER = 0x8092, GL_EDGE_FLAG_ARRAY_POINTER = 0x8093, GL_V2F = 0x2A20, GL_V3F = 0x2A21, GL_C4UB_V2F = 0x2A22, GL_C4UB_V3F = 0x2A23, GL_C3F_V3F = 0x2A24, GL_N3F_V3F = 0x2A25, GL_C4F_N3F_V3F = 0x2A26, GL_T2F_V3F = 0x2A27, GL_T4F_V4F = 0x2A28, GL_T2F_C4UB_V3F = 0x2A29, GL_T2F_C3F_V3F = 0x2A2A, GL_T2F_N3F_V3F = 0x2A2B, GL_T2F_C4F_N3F_V3F = 0x2A2C, GL_T4F_C4F_N3F_V4F = 0x2A2D, GL_MATRIX_MODE = 0x0BA0, GL_MODELVIEW = 0x1700, GL_PROJECTION = 0x1701, GL_POINT_SMOOTH = 0x0B10, GL_LINE_STIPPLE = 0x0B24, GL_LINE_STIPPLE_PATTERN = 0x0B25, GL_LINE_STIPPLE_REPEAT = 0x0B26, GL_POLYGON_MODE = 0x0B40, GL_POLYGON_STIPPLE = 0x0B42, GL_EDGE_FLAG = 0x0B43, GL_COMPILE = 0x1300, GL_COMPILE_AND_EXECUTE = 0x1301, GL_LIST_BASE = 0x0B32, GL_LIST_INDEX = 0x0B33, GL_LIST_MODE = 0x0B30, GL_DEPTH_BITS = 0x0D56, GL_LIGHTING = 0x0B50, GL_LIGHT0 = 0x4000, GL_LIGHT1 = 0x4001, GL_LIGHT2 = 0x4002, GL_LIGHT3 = 0x4003, GL_LIGHT4 = 0x4004, GL_LIGHT5 = 0x4005, GL_LIGHT6 = 0x4006, GL_LIGHT7 = 0x4007, GL_SPOT_EXPONENT = 0x1205, GL_SPOT_CUTOFF = 0x1206, GL_CONSTANT_ATTENUATION = 0x1207, GL_LINEAR_ATTENUATION = 0x1208, GL_QUADRATIC_ATTENUATION = 0x1209, GL_AMBIENT = 0x1200, GL_DIFFUSE = 0x1201, GL_SPECULAR = 0x1202, GL_SHININESS = 0x1601, GL_EMISSION = 0x1600, GL_POSITION = 0x1203, GL_SPOT_DIRECTION = 0x1204, GL_AMBIENT_AND_DIFFUSE = 0x1602, GL_COLOR_INDEXES = 0x1603, GL_LIGHT_MODEL_TWO_SIDE = 0x0B52, GL_LIGHT_MODEL_LOCAL_VIEWER = 0x0B51, GL_LIGHT_MODEL_AMBIENT = 0x0B53, GL_SHADE_MODEL = 0x0B54, GL_FLAT = 0x1D00, GL_SMOOTH = 0x1D01, GL_COLOR_MATERIAL = 0x0B57, GL_COLOR_MATERIAL_FACE = 0x0B55, GL_COLOR_MATERIAL_PARAMETER = 0x0B56, GL_NORMALIZE = 0x0BA1, GL_ACCUM_RED_BITS = 0x0D58, GL_ACCUM_GREEN_BITS = 0x0D59, GL_ACCUM_BLUE_BITS = 0x0D5A, GL_ACCUM_ALPHA_BITS = 0x0D5B, GL_ACCUM_CLEAR_VALUE = 0x0B80, GL_ACCUM = 0x0100, GL_ADD = 0x0104, GL_LOAD = 0x0101, GL_MULT = 0x0103, GL_RETURN = 0x0102, GL_ALPHA_TEST = 0x0BC0, GL_ALPHA_TEST_REF = 0x0BC2, GL_ALPHA_TEST_FUNC = 0x0BC1, GL_ZERO = 0x0, GL_ONE = 0x1, GL_FEEDBACK = 0x1C01, GL_RENDER = 0x1C00, GL_SELECT = 0x1C02, GL_2D = 0x0600, GL_3D = 0x0601, GL_3D_COLOR = 0x0602, GL_3D_COLOR_TEXTURE = 0x0603, GL_4D_COLOR_TEXTURE = 0x0604, GL_POINT_TOKEN = 0x0701, GL_LINE_TOKEN = 0x0702, GL_LINE_RESET_TOKEN = 0x0707, GL_POLYGON_TOKEN = 0x0703, GL_BITMAP_TOKEN = 0x0704, GL_DRAW_PIXEL_TOKEN = 0x0705, GL_COPY_PIXEL_TOKEN = 0x0706, GL_PASS_THROUGH_TOKEN = 0x0700, GL_FEEDBACK_BUFFER_POINTER = 0x0DF0, GL_FEEDBACK_BUFFER_SIZE = 0x0DF1, GL_FEEDBACK_BUFFER_TYPE = 0x0DF2, GL_SELECTION_BUFFER_POINTER = 0x0DF3, GL_SELECTION_BUFFER_SIZE = 0x0DF4, GL_FOG = 0x0B60, GL_FOG_MODE = 0x0B65, GL_FOG_DENSITY = 0x0B62, GL_FOG_COLOR = 0x0B66, GL_FOG_INDEX = 0x0B61, GL_FOG_START = 0x0B63, GL_FOG_END = 0x0B64, GL_EXP = 0x0800, GL_EXP2 = 0x0801, GL_LOGIC_OP = 0x0BF1, GL_INDEX_LOGIC_OP = 0x0BF1, GL_STENCIL_BITS = 0x0D57, GL_NONE = 0x0, GL_AUX0 = 0x0409, GL_AUX1 = 0x040A, GL_AUX2 = 0x040B, GL_AUX3 = 0x040C, GL_COLOR_INDEX = 0x1900, GL_LUMINANCE = 0x1909, GL_LUMINANCE_ALPHA = 0x190A, GL_ALPHA_BITS = 0x0D55, GL_RED_BITS = 0x0D52, GL_GREEN_BITS = 0x0D53, GL_BLUE_BITS = 0x0D54, GL_INDEX_BITS = 0x0D51, GL_AUX_BUFFERS = 0x0C00, GL_BITMAP = 0x1A00, GL_MAX_LIST_NESTING = 0x0B31, GL_MAX_ATTRIB_STACK_DEPTH = 0x0D35, GL_MAX_MODELVIEW_STACK_DEPTH = 0x0D36, GL_MAX_NAME_STACK_DEPTH = 0x0D37, GL_MAX_PROJECTION_STACK_DEPTH = 0x0D38, GL_MAX_TEXTURE_STACK_DEPTH = 0x0D39, GL_MAX_EVAL_ORDER = 0x0D30, GL_MAX_LIGHTS = 0x0D31, GL_MAX_PIXEL_MAP_TABLE = 0x0D34, GL_MAX_CLIENT_ATTRIB_STACK_DEPTH = 0x0D3B, GL_ATTRIB_STACK_DEPTH = 0x0BB0, GL_CLIENT_ATTRIB_STACK_DEPTH = 0x0BB1, GL_CURRENT_INDEX = 0x0B01, GL_CURRENT_COLOR = 0x0B00, GL_CURRENT_NORMAL = 0x0B02, GL_CURRENT_RASTER_COLOR = 0x0B04, GL_CURRENT_RASTER_DISTANCE = 0x0B09, GL_CURRENT_RASTER_INDEX = 0x0B05, GL_CURRENT_RASTER_POSITION = 0x0B07, GL_CURRENT_RASTER_TEXTURE_COORDS = 0x0B06, GL_CURRENT_RASTER_POSITION_VALID = 0x0B08, GL_CURRENT_TEXTURE_COORDS = 0x0B03, GL_INDEX_CLEAR_VALUE = 0x0C20, GL_INDEX_MODE = 0x0C30, GL_INDEX_WRITEMASK = 0x0C21, GL_MODELVIEW_MATRIX = 0x0BA6, GL_MODELVIEW_STACK_DEPTH = 0x0BA3, GL_NAME_STACK_DEPTH = 0x0D70, GL_PROJECTION_MATRIX = 0x0BA7, GL_PROJECTION_STACK_DEPTH = 0x0BA4, GL_RENDER_MODE = 0x0C40, GL_RGBA_MODE = 0x0C31, GL_TEXTURE_MATRIX = 0x0BA8, GL_TEXTURE_STACK_DEPTH = 0x0BA5, GL_AUTO_NORMAL = 0x0D80, GL_MAP1_COLOR_4 = 0x0D90, GL_MAP1_GRID_DOMAIN = 0x0DD0, GL_MAP1_GRID_SEGMENTS = 0x0DD1, GL_MAP1_INDEX = 0x0D91, GL_MAP1_NORMAL = 0x0D92, GL_MAP1_TEXTURE_COORD_1 = 0x0D93, GL_MAP1_TEXTURE_COORD_2 = 0x0D94, GL_MAP1_TEXTURE_COORD_3 = 0x0D95, GL_MAP1_TEXTURE_COORD_4 = 0x0D96, GL_MAP1_VERTEX_3 = 0x0D97, GL_MAP1_VERTEX_4 = 0x0D98, GL_MAP2_COLOR_4 = 0x0DB0, GL_MAP2_GRID_DOMAIN = 0x0DD2, GL_MAP2_GRID_SEGMENTS = 0x0DD3, GL_MAP2_INDEX = 0x0DB1, GL_MAP2_NORMAL = 0x0DB2, GL_MAP2_TEXTURE_COORD_1 = 0x0DB3, GL_MAP2_TEXTURE_COORD_2 = 0x0DB4, GL_MAP2_TEXTURE_COORD_3 = 0x0DB5, GL_MAP2_TEXTURE_COORD_4 = 0x0DB6, GL_MAP2_VERTEX_3 = 0x0DB7, GL_MAP2_VERTEX_4 = 0x0DB8, GL_COEFF = 0x0A00, GL_DOMAIN = 0x0A02, GL_ORDER = 0x0A01, GL_FOG_HINT = 0x0C54, GL_PERSPECTIVE_CORRECTION_HINT = 0x0C50, GL_POINT_SMOOTH_HINT = 0x0C51, GL_MAP_COLOR = 0x0D10, GL_MAP_STENCIL = 0x0D11, GL_INDEX_SHIFT = 0x0D12, GL_INDEX_OFFSET = 0x0D13, GL_RED_SCALE = 0x0D14, GL_RED_BIAS = 0x0D15, GL_GREEN_SCALE = 0x0D18, GL_GREEN_BIAS = 0x0D19, GL_BLUE_SCALE = 0x0D1A, GL_BLUE_BIAS = 0x0D1B, GL_ALPHA_SCALE = 0x0D1C, GL_ALPHA_BIAS = 0x0D1D, GL_DEPTH_SCALE = 0x0D1E, GL_DEPTH_BIAS = 0x0D1F, GL_PIXEL_MAP_S_TO_S_SIZE = 0x0CB1, GL_PIXEL_MAP_I_TO_I_SIZE = 0x0CB0, GL_PIXEL_MAP_I_TO_R_SIZE = 0x0CB2, GL_PIXEL_MAP_I_TO_G_SIZE = 0x0CB3, GL_PIXEL_MAP_I_TO_B_SIZE = 0x0CB4, GL_PIXEL_MAP_I_TO_A_SIZE = 0x0CB5, GL_PIXEL_MAP_R_TO_R_SIZE = 0x0CB6, GL_PIXEL_MAP_G_TO_G_SIZE = 0x0CB7, GL_PIXEL_MAP_B_TO_B_SIZE = 0x0CB8, GL_PIXEL_MAP_A_TO_A_SIZE = 0x0CB9, GL_PIXEL_MAP_S_TO_S = 0x0C71, GL_PIXEL_MAP_I_TO_I = 0x0C70, GL_PIXEL_MAP_I_TO_R = 0x0C72, GL_PIXEL_MAP_I_TO_G = 0x0C73, GL_PIXEL_MAP_I_TO_B = 0x0C74, GL_PIXEL_MAP_I_TO_A = 0x0C75, GL_PIXEL_MAP_R_TO_R = 0x0C76, GL_PIXEL_MAP_G_TO_G = 0x0C77, GL_PIXEL_MAP_B_TO_B = 0x0C78, GL_PIXEL_MAP_A_TO_A = 0x0C79, GL_ZOOM_X = 0x0D16, GL_ZOOM_Y = 0x0D17, GL_TEXTURE_ENV = 0x2300, GL_TEXTURE_ENV_MODE = 0x2200, GL_TEXTURE_ENV_COLOR = 0x2201, GL_TEXTURE_GEN_S = 0x0C60, GL_TEXTURE_GEN_T = 0x0C61, GL_TEXTURE_GEN_MODE = 0x2500, GL_TEXTURE_BORDER = 0x1005, GL_TEXTURE_LUMINANCE_SIZE = 0x8060, GL_TEXTURE_INTENSITY_SIZE = 0x8061, GL_OBJECT_LINEAR = 0x2401, GL_OBJECT_PLANE = 0x2501, GL_EYE_LINEAR = 0x2400, GL_EYE_PLANE = 0x2502, GL_SPHERE_MAP = 0x2402, GL_DECAL = 0x2101, GL_MODULATE = 0x2100, GL_CLAMP = 0x2900, GL_S = 0x2000, GL_T = 0x2001, GL_R = 0x2002, GL_Q = 0x2003, GL_TEXTURE_GEN_R = 0x0C62, GL_TEXTURE_GEN_Q = 0x0C63, GL_STACK_OVERFLOW = 0x0503, GL_STACK_UNDERFLOW = 0x0504, GL_CURRENT_BIT = 0x00000001, GL_LINE_BIT = 0x00000004, GL_POLYGON_BIT = 0x00000008, GL_POLYGON_STIPPLE_BIT = 0x00000010, GL_PIXEL_MODE_BIT = 0x00000020, GL_LIGHTING_BIT = 0x00000040, GL_FOG_BIT = 0x00000080, GL_ACCUM_BUFFER_BIT = 0x00000200, GL_VIEWPORT_BIT = 0x00000800, GL_TRANSFORM_BIT = 0x00001000, GL_ENABLE_BIT = 0x00002000, GL_HINT_BIT = 0x00008000, GL_EVAL_BIT = 0x00010000, GL_LIST_BIT = 0x00020000, GL_TEXTURE_BIT = 0x00040000, GL_SCISSOR_BIT = 0x00080000, GL_ALL_ATTRIB_BITS = 0x000FFFFF, GL_TEXTURE_PRIORITY = 0x8066, GL_TEXTURE_RESIDENT = 0x8067, GL_ALPHA4 = 0x803B, GL_ALPHA8 = 0x803C, GL_ALPHA12 = 0x803D, GL_ALPHA16 = 0x803E, GL_LUMINANCE4 = 0x803F, GL_LUMINANCE8 = 0x8040, GL_LUMINANCE12 = 0x8041, GL_LUMINANCE16 = 0x8042, GL_LUMINANCE4_ALPHA4 = 0x8043, GL_LUMINANCE6_ALPHA2 = 0x8044, GL_LUMINANCE8_ALPHA8 = 0x8045, GL_LUMINANCE12_ALPHA4 = 0x8046, GL_LUMINANCE12_ALPHA12 = 0x8047, GL_LUMINANCE16_ALPHA16 = 0x8048, GL_INTENSITY = 0x8049, GL_INTENSITY4 = 0x804A, GL_INTENSITY8 = 0x804B, GL_INTENSITY12 = 0x804C, GL_INTENSITY16 = 0x804D, GL_ALL_CLIENT_ATTRIB_BITS = 0xFFFFFFFF, GL_CLIENT_ALL_ATTRIB_BITS = 0xFFFFFFFF, // 1.2 GL_RESCALE_NORMAL = 0x803A, GL_LIGHT_MODEL_COLOR_CONTROL = 0x81F8, GL_SINGLE_COLOR = 0x81F9, GL_SEPARATE_SPECULAR_COLOR = 0x81FA, GL_ALIASED_POINT_SIZE_RANGE = 0x846D, GL_CONSTANT_COLOR = 0x8001, GL_ONE_MINUS_CONSTANT_COLOR = 0x8002, GL_CONSTANT_ALPHA = 0x8003, GL_ONE_MINUS_CONSTANT_ALPHA = 0x8004, GL_BLEND_COLOR = 0x8005, GL_FUNC_ADD = 0x8006, GL_MIN = 0x8007, GL_MAX = 0x8008, GL_BLEND_EQUATION = 0x8009, GL_FUNC_SUBTRACT = 0x800A, GL_FUNC_REVERSE_SUBTRACT = 0x800B, GL_CONVOLUTION_1D = 0x8010, GL_CONVOLUTION_2D = 0x8011, GL_SEPARABLE_2D = 0x8012, GL_CONVOLUTION_BORDER_MODE = 0x8013, GL_CONVOLUTION_FILTER_SCALE = 0x8014, GL_CONVOLUTION_FILTER_BIAS = 0x8015, GL_REDUCE = 0x8016, GL_CONVOLUTION_FORMAT = 0x8017, GL_CONVOLUTION_WIDTH = 0x8018, GL_CONVOLUTION_HEIGHT = 0x8019, GL_MAX_CONVOLUTION_WIDTH = 0x801A, GL_MAX_CONVOLUTION_HEIGHT = 0x801B, GL_POST_CONVOLUTION_RED_SCALE = 0x801C, GL_POST_CONVOLUTION_GREEN_SCALE = 0x801D, GL_POST_CONVOLUTION_BLUE_SCALE = 0x801E, GL_POST_CONVOLUTION_ALPHA_SCALE = 0x801F, GL_POST_CONVOLUTION_RED_BIAS = 0x8020, GL_POST_CONVOLUTION_GREEN_BIAS = 0x8021, GL_POST_CONVOLUTION_BLUE_BIAS = 0x8022, GL_POST_CONVOLUTION_ALPHA_BIAS = 0x8023, GL_HISTOGRAM = 0x8024, GL_PROXY_HISTOGRAM = 0x8025, GL_HISTOGRAM_WIDTH = 0x8026, GL_HISTOGRAM_FORMAT = 0x8027, GL_HISTOGRAM_RED_SIZE = 0x8028, GL_HISTOGRAM_GREEN_SIZE = 0x8029, GL_HISTOGRAM_BLUE_SIZE = 0x802A, GL_HISTOGRAM_ALPHA_SIZE = 0x802B, GL_HISTOGRAM_LUMINANCE_SIZE = 0x802C, GL_HISTOGRAM_SINK = 0x802D, GL_MINMAX = 0x802E, GL_MINMAX_FORMAT = 0x802F, GL_MINMAX_SINK = 0x8030, GL_TABLE_TOO_LARGE = 0x8031, GL_COLOR_MATRIX = 0x80B1, GL_COLOR_MATRIX_STACK_DEPTH = 0x80B2, GL_MAX_COLOR_MATRIX_STACK_DEPTH = 0x80B3, GL_POST_COLOR_MATRIX_RED_SCALE = 0x80B4, GL_POST_COLOR_MATRIX_GREEN_SCALE = 0x80B5, GL_POST_COLOR_MATRIX_BLUE_SCALE = 0x80B6, GL_POST_COLOR_MATRIX_ALPHA_SCALE = 0x80B7, GL_POST_COLOR_MATRIX_RED_BIAS = 0x80B8, GL_POST_COLOR_MATRIX_GREEN_BIAS = 0x80B9, GL_POST_COLOR_MATRIX_BLUE_BIAS = 0x80BA, GL_POST_COLOR_MATRIX_ALPHA_BIAS = 0x80BB, GL_COLOR_TABLE = 0x80D0, GL_POST_CONVOLUTION_COLOR_TABLE = 0x80D1, GL_POST_COLOR_MATRIX_COLOR_TABLE = 0x80D2, GL_PROXY_COLOR_TABLE = 0x80D3, GL_PROXY_POST_CONVOLUTION_COLOR_TABLE = 0x80D4, GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE = 0x80D5, GL_COLOR_TABLE_SCALE = 0x80D6, GL_COLOR_TABLE_BIAS = 0x80D7, GL_COLOR_TABLE_FORMAT = 0x80D8, GL_COLOR_TABLE_WIDTH = 0x80D9, GL_COLOR_TABLE_RED_SIZE = 0x80DA, GL_COLOR_TABLE_GREEN_SIZE = 0x80DB, GL_COLOR_TABLE_BLUE_SIZE = 0x80DC, GL_COLOR_TABLE_ALPHA_SIZE = 0x80DD, GL_COLOR_TABLE_LUMINANCE_SIZE = 0x80DE, GL_COLOR_TABLE_INTENSITY_SIZE = 0x80DF, GL_CONSTANT_BORDER = 0x8151, GL_REPLICATE_BORDER = 0x8153, GL_CONVOLUTION_BORDER_COLOR = 0x8154, // 1.3 GL_CLIENT_ACTIVE_TEXTURE = 0x84E1, GL_MAX_TEXTURE_UNITS = 0x84E2, GL_TRANSPOSE_MODELVIEW_MATRIX = 0x84E3, GL_TRANSPOSE_PROJECTION_MATRIX = 0x84E4, GL_TRANSPOSE_TEXTURE_MATRIX = 0x84E5, GL_TRANSPOSE_COLOR_MATRIX = 0x84E6, GL_MULTISAMPLE_BIT = 0x20000000, GL_NORMAL_MAP = 0x8511, GL_REFLECTION_MAP = 0x8512, GL_COMPRESSED_ALPHA = 0x84E9, GL_COMPRESSED_LUMINANCE = 0x84EA, GL_COMPRESSED_LUMINANCE_ALPHA = 0x84EB, GL_COMPRESSED_INTENSITY = 0x84EC, GL_COMBINE = 0x8570, GL_COMBINE_RGB = 0x8571, GL_COMBINE_ALPHA = 0x8572, GL_SOURCE0_RGB = 0x8580, GL_SOURCE1_RGB = 0x8581, GL_SOURCE2_RGB = 0x8582, GL_SOURCE0_ALPHA = 0x8588, GL_SOURCE1_ALPHA = 0x8589, GL_SOURCE2_ALPHA = 0x858A, GL_OPERAND0_RGB = 0x8590, GL_OPERAND1_RGB = 0x8591, GL_OPERAND2_RGB = 0x8592, GL_OPERAND0_ALPHA = 0x8598, GL_OPERAND1_ALPHA = 0x8599, GL_OPERAND2_ALPHA = 0x859A, GL_RGB_SCALE = 0x8573, GL_ADD_SIGNED = 0x8574, GL_INTERPOLATE = 0x8575, GL_SUBTRACT = 0x84E7, GL_CONSTANT = 0x8576, GL_PRIMARY_COLOR = 0x8577, GL_PREVIOUS = 0x8578, GL_DOT3_RGB = 0x86AE, GL_DOT3_RGBA = 0x86AF, //Added. Not in vanilla Derelict3 GL_STENCIL_TEST_TWO_SIDE_EXT = 0x8910, GL_ACTIVE_STENCIL_FACE_EXT = 0x8911, // 1.4 GL_POINT_SIZE_MIN = 0x8126, GL_POINT_SIZE_MAX = 0x8127, GL_POINT_DISTANCE_ATTENUATION = 0x8129, GL_GENERATE_MIPMAP = 0x8191, GL_GENERATE_MIPMAP_HINT = 0x8192, GL_FOG_COORDINATE_SOURCE = 0x8450, GL_FOG_COORDINATE = 0x8451, GL_FRAGMENT_DEPTH = 0x8452, GL_CURRENT_FOG_COORDINATE = 0x8453, GL_FOG_COORDINATE_ARRAY_TYPE = 0x8454, GL_FOG_COORDINATE_ARRAY_STRIDE = 0x8455, GL_FOG_COORDINATE_ARRAY_POINTER = 0x8456, GL_FOG_COORDINATE_ARRAY = 0x8457, GL_COLOR_SUM = 0x8458, GL_CURRENT_SECONDARY_COLOR = 0x8459, GL_SECONDARY_COLOR_ARRAY_SIZE = 0x845A, GL_SECONDARY_COLOR_ARRAY_TYPE = 0x845B, GL_SECONDARY_COLOR_ARRAY_STRIDE = 0x845C, GL_SECONDARY_COLOR_ARRAY_POINTER = 0x845D, GL_SECONDARY_COLOR_ARRAY = 0x845E, GL_TEXTURE_FILTER_CONTROL = 0x8500, GL_DEPTH_TEXTURE_MODE = 0x884B, GL_COMPARE_R_TO_TEXTURE = 0x884E, // 1.5 GL_VERTEX_ARRAY_BUFFER_BINDING = 0x8896, GL_NORMAL_ARRAY_BUFFER_BINDING = 0x8897, GL_COLOR_ARRAY_BUFFER_BINDING = 0x8898, GL_INDEX_ARRAY_BUFFER_BINDING = 0x8899, GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING = 0x889A, GL_EDGE_FLAG_ARRAY_BUFFER_BINDING = 0x889B, GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING = 0x889C, GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING = 0x889D, GL_WEIGHT_ARRAY_BUFFER_BINDING = 0x889E, GL_FOG_COORD_SRC = 0x8450, GL_FOG_COORD = 0x8451, GL_CURRENT_FOG_COORD = 0x8453, GL_FOG_COORD_ARRAY_TYPE = 0x8454, GL_FOG_COORD_ARRAY_STRIDE = 0x8455, GL_FOG_COORD_ARRAY_POINTER = 0x8456, GL_FOG_COORD_ARRAY = 0x8457, GL_FOG_COORD_ARRAY_BUFFER_BINDING = 0x889D, GL_SRC0_RGB = 0x8580, GL_SRC1_RGB = 0x8581, GL_SRC2_RGB = 0x8582, GL_SRC0_ALPHA = 0x8588, GL_SRC1_ALPHA = 0x8589, GL_SRC2_ALPHA = 0x858A, // 2.0 GL_VERTEX_PROGRAM_TWO_SIDE = 0x8643, GL_POINT_SPRITE = 0x8861, GL_COORD_REPLACE = 0x8862, GL_MAX_TEXTURE_COORDS = 0x8871, // FIXME Added. Deprecated or not? GL_FRAGMENT_PROGRAM = 0x8804, GL_PROGRAM_ALU_INSTRUCTIONS = 0x8805, GL_PROGRAM_TEX_INSTRUCTIONS = 0x8806, GL_PROGRAM_TEX_INDIRECTIONS = 0x8807, GL_PROGRAM_NATIVE_ALU_INSTRUCTIONS = 0x8808, GL_PROGRAM_NATIVE_TEX_INSTRUCTIONS = 0x8809, GL_PROGRAM_NATIVE_TEX_INDIRECTIONS = 0x880A, GL_MAX_PROGRAM_ALU_INSTRUCTIONS = 0x880B, GL_MAX_PROGRAM_TEX_INSTRUCTIONS = 0x880C, GL_MAX_PROGRAM_TEX_INDIRECTIONS = 0x880D, GL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS = 0x880E, GL_MAX_PROGRAM_NATIVE_TEX_INSTRUCTIONS = 0x880F, GL_MAX_PROGRAM_NATIVE_TEX_INDIRECTIONS = 0x8810, GL_MAX_TEXTURE_IMAGE_UNITS = 0x8872, // 2.1 GL_CURRENT_RASTER_SECONDARY_COLOR = 0x845F, GL_SLUMINANCE_ALPHA = 0x8C44, GL_SLUMINANCE8_ALPHA8 = 0x8C45, GL_SLUMINANCE = 0x8C46, GL_SLUMINANCE8 = 0x8C47, GL_COMPRESSED_SLUMINANCE = 0x8C4A, GL_COMPRESSED_SLUMINANCE_ALPHA = 0x8C4B, // 3.0 GL_CLAMP_VERTEX_COLOR = 0x891A, GL_CLAMP_FRAGMENT_COLOR = 0x891B, GL_ALPHA_INTEGER = 0x8D97, GL_INDEX = 0x8222, GL_TEXTURE_LUMINANCE_TYPE = 0x8C14, GL_TEXTURE_INTENSITY_TYPE = 0x8C15, //extra stuff GL_RGBA = 0x1908, GL_PROGRAM_ERROR_POSITION_ARB = 0x864B, GL_PROGRAM_FORMAT_ASCII_ARB = 0x8875, GL_PROGRAM_ERROR_STRING_ARB = 0x8874, }
D
/* REQUIRED_ARGS: -preview=dip1000 */ /* TEST_OUTPUT: --- fail_compilation/retscope6.d(6007): Error: copying `& i` into allocated memory escapes a reference to local variable `i` --- */ #line 6000 // https://issues.dlang.org/show_bug.cgi?id=17795 int* test() @safe { int i; int*[][] arr = new int*[][](1); arr[0] ~= &i; return arr[0][0]; } /* TEST_OUTPUT: --- fail_compilation/retscope6.d(7034): Error: address of variable `i` assigned to `s` with longer lifetime fail_compilation/retscope6.d(7035): Error: address of variable `i` assigned to `s` with longer lifetime fail_compilation/retscope6.d(7025): Error: scope variable `_param_2` assigned to `ref` variable `t` with longer lifetime fail_compilation/retscope6.d(7037): Error: template instance `retscope6.S.emplace4!(int*)` error instantiating fail_compilation/retscope6.d(7037): Error: address of variable `i` assigned to `s` with longer lifetime --- */ #line 7000 alias T = int*; struct S { T payload; static void emplace(Args...)(ref S s, Args args) @safe { s.payload = args[0]; } void emplace2(Args...)(Args args) @safe { payload = args[0]; } static void emplace3(Args...)(S s, Args args) @safe { s.payload = args[0]; } static void emplace4(Args...)(scope ref S s, scope out S t, scope Args args) @safe { s.payload = args[0]; t.payload = args[0]; } } void foo() @safe { S s; int i; s.emplace(s, &i); s.emplace2(&i); s.emplace3(s, &i); s.emplace4(s, s, &i); } /* TEST_OUTPUT: --- fail_compilation/retscope6.d(8016): Error: address of variable `i` assigned to `p` with longer lifetime fail_compilation/retscope6.d(8031): Error: reference to local variable `i` assigned to non-scope parameter `p` calling `betty` fail_compilation/retscope6.d(8031): Error: reference to local variable `j` assigned to non-scope parameter `q` calling `betty` fail_compilation/retscope6.d(8021): which is assigned to non-scope parameter `p` fail_compilation/retscope6.d(8048): Error: reference to local variable `j` assigned to non-scope parameter `q` calling `archie` --- */ // https://issues.dlang.org/show_bug.cgi?id=19035 #line 8000 @safe { void escape(int*); /**********************/ void frank()(ref scope int* p, int* s) { p = s; // should error here } void testfrankly() { int* p; int i; frank(p, &i); } /**********************/ void betty()(int* p, int* q) { p = q; escape(p); } void testbetty() { int i; int j; betty(&i, &j); // should error on i and j } /**********************/ void archie()(int* p, int* q, int* r) { p = q; r = p; escape(q); } void testarchie() { int i; int j; int k; archie(&i, &j, &k); // should error on j } } /* TEST_OUTPUT: --- fail_compilation/retscope6.d(9023): Error: returning `fred(& i)` escapes a reference to local variable `i` --- */ #line 9000 @safe { alias T9 = S9!(); struct S9() { this(int* q) { this.p = q; } int* p; } auto fred(int* r) { return T9(r); } T9 testfred() { int i; auto j = fred(&i); // ok return fred(&i); // error } /* TEST_OUTPUT: --- fail_compilation/retscope6.d(10003): Error: scope variable `values` assigned to non-scope parameter `values` calling `escape` --- */ #line 10000 void variadicCaller(int[] values...) { escape(values); } void escape(int[] values) {} /* TEST_OUTPUT: --- fail_compilation/retscope6.d(11004): Error: address of variable `buffer` assigned to `secret` with longer lifetime --- */ #line 11000 void hmac(scope ubyte[] secret) { ubyte[10] buffer; secret = buffer[]; } } /* TEST_OUTPUT: --- fail_compilation/retscope6.d(12011): Error: returning `escape_m_20150(& x)` escapes a reference to local variable `x` fail_compilation/retscope6.d(12022): Error: returning `escape_c_20150(& x)` escapes a reference to local variable `x` --- */ #line 12000 // https://issues.dlang.org/show_bug.cgi?id=20150 int* escape_m_20150(int* r) @safe pure nothrow { return r; } int* f_m_20150() @safe nothrow { int x = 42; return escape_m_20150(&x); } const(int)* escape_c_20150(const int* r) @safe pure nothrow { return r; } const(int)* f_c_20150() @safe nothrow { int x = 42; return escape_c_20150(&x); } /* TEST_OUTPUT: --- fail_compilation/retscope6.d(13010): Error: reference to local variable `str` assigned to non-scope parameter `x` calling `f_throw` --- */ #line 13000 // https://issues.dlang.org/show_bug.cgi?id=22221 void f_throw(string x) @safe pure { throw new Exception(x); } void escape_throw_20150() @safe { immutable(char)[4] str; f_throw(str[]); } /* TEST_OUTPUT: --- fail_compilation/retscope6.d(14019): Error: scope variable `scopePtr` assigned to non-scope parameter `x` calling `noInfer23021` fail_compilation/retscope6.d(14009): which is not `scope` because of `*escapeHole = cast(const(int)*)x` fail_compilation/retscope6.d(14022): Error: scope variable `scopePtr` may not be returned --- */ #line 14000 // https://issues.dlang.org/show_bug.cgi?id=23021 ref int infer23021(ref int* x) @safe pure nothrow { return *x; } ref int noInfer23021(ref int* x, const(int)** escapeHole = null) @safe pure nothrow { *escapeHole = x; return *x; } ref int escape23021() @safe { scope int* scopePtr; int* nonScopePtr = null; // don't infer scope cast(void) noInfer23021(scopePtr); // error // ensure we infer return scope return infer23021(scopePtr); // error // ensure we do not infer return ref return infer23021(nonScopePtr); // no error } /******************************/
D
/** * \file lzma/vli.h * \brief Variable-length integer handling * * In the .xz format, most integers are encoded in a variable-length * representation, which is sometimes called little endian base-128 encoding. * This saves space when smaller values are more likely than bigger values. * * The encoding scheme encodes seven bits to every byte, using minimum * number of bytes required to represent the given value. Encodings that use * non-minimum number of bytes are invalid, thus every integer has exactly * one encoded representation. The maximum number of bits in a VLI is 63, * thus the vli argument must be less than or equal to UINT64_MAX / 2. You * should use LZMA_VLI_MAX for clarity. */ /* * Author: Lasse Collin * * This file has been put into the public domain. * You can do whatever you want with this file. * * See ../lzma.h for information about liblzma as a whole. */ module deimos.lzma_.vli; import deimos.lzma; extern(C): /** * \brief Maximum supported value of a variable-length integer */ enum LZMA_VLI_MAX = (ulong.max / 2); /** * \brief VLI value to denote that the value is unknown */ enum LZMA_VLI_UNKNOWN = ulong.max; /** * \brief Maximum supported encoded length of variable length integers */ enum LZMA_VLI_BYTES_MAX = 9; /** * \brief VLI constant suffix */ //#define LZMA_VLI_C(n) UINT64_C(n) /** * \brief Variable-length integer type * * Valid VLI values are in the range [0, LZMA_VLI_MAX]. Unknown value is * indicated with LZMA_VLI_UNKNOWN, which is the maximum value of the * underlaying integer type. * * lzma_vli will be uint64_t for the foreseeable future. If a bigger size * is needed in the future, it is guaranteed that 2 * LZMA_VLI_MAX will * not overflow lzma_vli. This simplifies integer overflow detection. */ alias ulong lzma_vli; /** * \brief Validate a variable-length integer * * This is useful to test that application has given acceptable values * for example in the uncompressed_size and compressed_size variables. * * \return True if the integer is representable as VLI or if it * indicates unknown value. */ bool lzma_vli_is_valid(lzma_vli vli) { return vli <= LZMA_VLI_MAX || (vli) == LZMA_VLI_UNKNOWN; } /** * \brief Encode a variable-length integer * * This function has two modes: single-call and multi-call. Single-call mode * encodes the whole integer at once; it is an error if the output buffer is * too small. Multi-call mode saves the position in *vli_pos, and thus it is * possible to continue encoding if the buffer becomes full before the whole * integer has been encoded. * * \param vli Integer to be encoded * \param vli_pos How many VLI-encoded bytes have already been written * out. When starting to encode a new integer in * multi-call mode, *vli_pos must be set to zero. * To use single-call encoding, set vli_pos to NULL. * \param out Beginning of the output buffer * \param out_pos The next byte will be written to out[*out_pos]. * \param out_size Size of the out buffer; the first byte into * which no data is written to is out[out_size]. * * \return Slightly different return values are used in multi-call and * single-call modes. * * Single-call (vli_pos == NULL): * - LZMA_OK: Integer successfully encoded. * - LZMA_PROG_ERROR: Arguments are not sane. This can be due * to too little output space; single-call mode doesn't use * LZMA_BUF_ERROR, since the application should have checked * the encoded size with lzma_vli_size(). * * Multi-call (vli_pos != NULL): * - LZMA_OK: So far all OK, but the integer is not * completely written out yet. * - LZMA_STREAM_END: Integer successfully encoded. * - LZMA_BUF_ERROR: No output space was provided. * - LZMA_PROG_ERROR: Arguments are not sane. */ nothrow lzma_ret lzma_vli_encode(lzma_vli vli, size_t *vli_pos, ubyte* out_, size_t *out_pos, size_t out_size); /** * \brief Decode a variable-length integer * * Like lzma_vli_encode(), this function has single-call and multi-call modes. * * \param vli Pointer to decoded integer. The decoder will * initialize it to zero when *vli_pos == 0, so * application isn't required to initialize *vli. * \param vli_pos How many bytes have already been decoded. When * starting to decode a new integer in multi-call * mode, *vli_pos must be initialized to zero. To * use single-call decoding, set vli_pos to NULL. * \param in Beginning of the input buffer * \param in_pos The next byte will be read from in[*in_pos]. * \param in_size Size of the input buffer; the first byte that * won't be read is in[in_size]. * * \return Slightly different return values are used in multi-call and * single-call modes. * * Single-call (vli_pos == NULL): * - LZMA_OK: Integer successfully decoded. * - LZMA_DATA_ERROR: Integer is corrupt. This includes hitting * the end of the input buffer before the whole integer was * decoded; providing no input at all will use LZMA_DATA_ERROR. * - LZMA_PROG_ERROR: Arguments are not sane. * * Multi-call (vli_pos != NULL): * - LZMA_OK: So far all OK, but the integer is not * completely decoded yet. * - LZMA_STREAM_END: Integer successfully decoded. * - LZMA_DATA_ERROR: Integer is corrupt. * - LZMA_BUF_ERROR: No input was provided. * - LZMA_PROG_ERROR: Arguments are not sane. */ nothrow lzma_ret lzma_vli_decode(lzma_vli *vli, size_t *vli_pos, const(ubyte)* in_, size_t *in_pos, size_t in_size); /** * \brief Get the number of bytes required to encode a VLI * * \return Number of bytes on success (1-9). If vli isn't valid, * zero is returned. */ nothrow pure uint lzma_vli_size(lzma_vli vli);
D
@safe import std.string, std.conv; const class Token { string name; int oldnum; TokenFeature feature; string str; this(string name, int oldnum = 0, TokenFeature feature = 0, string str = "") { this.name = name; this.oldnum = oldnum; this.feature = feature; this.str = str; } bool opEquals(Object rhs) const { return this is rhs; } string toString() const { return name; } } alias long TokenFeature; enum : TokenFeature { INFIX, ASSIGN, TERMOP, SUMOP } static Token[string] keywords; private string tokens(string[] ts...) { return join(ts, "\n"); } private string t(string name, int num = 0) { return t(name, 0, num); } private string t(string name, TokenFeature feature, int num) { return t(name, "", feature, num); } private string t(string name, string str, int num = 0) { return t(name, str, 0, num); } private string t(string name, string str, TokenFeature feature, int num) { string uname = name.toUpper(); string result = "static const(Token) " ~ uname ~ ";\n"; result ~= init(uname ~ ` = new Token("` ~ name ~ `", ` ~ to!string(num) ~ `, ` ~ to!string(feature) ~ `, "` ~ str ~ `");`); if (uname != name) result ~= "\n" ~ init(`keywords["` ~ name ~ `"] = cast(Token) ` ~ uname ~ `;`); return result; } private string init(string s) { return "static this() { " ~ s ~ " }"; } mixin(tokens( t("NIL"), t("EOF"), t("ERROR", 1000), t("IDENTIFIER", 1001), t("NUMBER", 1002), t("STRING", 1003), t("and", INFIX, 1004), t("or", INFIX, 1005), t("WHITE", 1006), t("COMMENT", 1007), t("NEWLINE", 1008), t("HASH", 35), t("COMMA", 44), t("COLON", 58), t("SEMICOLON", 59), t("Q_MARK", INFIX, 63), t("AT", 64), t("DOT", 46), t("R_PAREN", 41), t("L_PAREN", 40), t("R_BRACKET", 93), t("L_BRACKET", 91), t("R_CURLY", 125), t("L_CURLY", 123), t("IS", "is", TERMOP, 251), t("ISNT", "isnt", TERMOP, 252), t("MATCH", "=~", INFIX, 253), t("MATCHNOT", "!~", INFIX, 254), t("LT", "<", TERMOP, 6), t("LTE", "<=", TERMOP, 7), t("GT", ">", TERMOP, 8), t("GTE", ">=", TERMOP, 9), t("not", 10), t("INC", 140), t("DEC", 142), t("BITNOT", "~", 11), t("ADD", "+", INFIX, 240), t("SUB", "-", INFIX, 241), t("CAT", "$", INFIX, 242), t("MUL", "*", INFIX, 243), t("DIV", "/", INFIX, 244), t("MOD", "%", INFIX, 245), t("LSHIFT", "<<", INFIX, 246), t("RSHIFT", ">>", INFIX, 247), t("BITOR", "|", INFIX, 248), t("BITAND", "&", INFIX, 249), t("BITXOR", "^", INFIX, 250), t("EQ", "=", ASSIGN, 139), t("ADDEQ", "+=", ASSIGN, 128), t("SUBEQ", "-=", ASSIGN, 129), t("CATEQ", "$=", ASSIGN, 130), t("MULEQ", "*=", ASSIGN, 131), t("DIVEQ", "/=", ASSIGN, 132), t("MODEQ", "%=", ASSIGN, 133), t("LSHIFTEQ", "<<=", ASSIGN, 134), t("RSHIFTEQ", ">>=", ASSIGN, 135), t("BITOREQ", "|=", ASSIGN, 136), t("BITANDEQ", "&=", ASSIGN, 137), t("BITXOREQ", "^=", ASSIGN, 138), t("RANGETO", ".."), t("RANGELEN", "::"), // keywords t("if", 1), t("else", 2), t("while", 3), t("do", 4), t("for", 5), t("forever", 7), t("break", 8), t("continue", 9), t("switch", 10), t("case", 11), t("default", 12), t("function", 13), t("class", 14), t("catch", 15), t("dll", 16), t("struct", 17), t("callback", 18), t("new", 19), t("return", 20), t("try", 21), t("throw", 22), t("super", 23), t("true", 24), t("false", 25), t("in", 27), t("this", 29), // for queries t("view"), t("sview"), t("create"), t("ensure"), t("drop"), t("alter"), t("delete"), t("rename"), t("to"), t("unique"), t("cascade"), t("updates"), t("index"), t("key"), t("total", SUMOP), t("sort"), t("project"), t("max", SUMOP), t("min", SUMOP), t("minus"), t("intersect"), t("list", SUMOP), t("union"), t("remove"), t("history"), t("extend"), t("count", SUMOP), t("times"), t("by"), t("summarize"), t("where"), t("join"), t("leftjoin"), t("reverse"), t("average", SUMOP), t("into"), t("insert"), t("update"), t("set"), // for AST t("DATE"), t("SYMBOL"), t("CALL"), t("MEMBER"), t("SUBSCRIPT"), t("ARG"), t("FOR_IN"), t("RECORD"), t("OBJECT"), t("BINARYOP"), t("SELFREF"), t("ASSIGNOP"), t("PREINCDEC"), t("POSTINCDEC"), t("BLOCK"), t("RVALUE"), t("METHOD") )); unittest { import asserts; Assert(NIL.name, Is("NIL")); Assert(AND.oldnum, Is(1004)); Assert(MATCH.str, Is("=~")); Assert(keywords["view"], Is(VIEW)); }
D
/** * D header file for POSIX. * * Copyright: Copyright Sean Kelly 2005 - 2009. * License: $(HTTP www.boost.org/LICENSE_1_0.txt, Boost License 1.0). * Authors: Sean Kelly * Standards: The Open Group Base Specifications Issue 6, IEEE Std 1003.1, 2004 Edition */ /* Copyright Sean Kelly 2005 - 2009. * Distributed under the Boost Software License, Version 1.0. * (See accompanying file LICENSE or copy at * http://www.boost.org/LICENSE_1_0.txt) */ module core.sys.posix.ucontext; private import core.sys.posix.config; public import core.sys.posix.signal; // for sigset_t, stack_t private import core.stdc.stdint : uintptr_t; version (Posix): extern (C): nothrow: @nogc: @system: version (MIPS32) version = MIPS_Any; version (MIPS64) version = MIPS_Any; version (PPC) version = PPC_Any; version (PPC64) version = PPC_Any; version (RISCV32) version = RISCV_Any; version (RISCV64) version = RISCV_Any; version (S390) version = IBMZ_Any; version (SPARC) version = SPARC_Any; version (SPARC64) version = SPARC_Any; version (SystemZ) version = IBMZ_Any; version (X86) version = X86_Any; version (X86_64) version = X86_Any; // // XOpen (XSI) // /* mcontext_t struct ucontext_t { ucontext_t* uc_link; sigset_t uc_sigmask; stack_t uc_stack; mcontext_t uc_mcontext; } */ version (CRuntime_Glibc) { version (X86_64) { enum { REG_R8 = 0, REG_R9, REG_R10, REG_R11, REG_R12, REG_R13, REG_R14, REG_R15, REG_RDI, REG_RSI, REG_RBP, REG_RBX, REG_RDX, REG_RAX, REG_RCX, REG_RSP, REG_RIP, REG_EFL, REG_CSGSFS, /* Actually short cs, gs, fs, __pad0. */ REG_ERR, REG_TRAPNO, REG_OLDMASK, REG_CR2 } private { struct _libc_fpxreg { ushort[4] significand; ushort exponent; ushort[3] padding; } struct _libc_xmmreg { uint[4] element; } struct _libc_fpstate { ushort cwd; ushort swd; ushort ftw; ushort fop; ulong rip; ulong rdp; uint mxcsr; uint mxcr_mask; _libc_fpxreg[8] _st; _libc_xmmreg[16] _xmm; uint[24] padding; } enum NGREG = 23; alias c_long greg_t; alias greg_t[NGREG] gregset_t; alias _libc_fpstate* fpregset_t; } struct mcontext_t { gregset_t gregs; fpregset_t fpregs; c_ulong[8] __reserved1; } struct ucontext_t { c_ulong uc_flags; ucontext_t* uc_link; stack_t uc_stack; mcontext_t uc_mcontext; sigset_t uc_sigmask; _libc_fpstate __fpregs_mem; } } else version (X86) { enum { REG_GS = 0, REG_FS, REG_ES, REG_DS, REG_EDI, REG_ESI, REG_EBP, REG_ESP, REG_EBX, REG_EDX, REG_ECX, REG_EAX, REG_TRAPNO, REG_ERR, REG_EIP, REG_CS, REG_EFL, REG_UESP, REG_SS } private { struct _libc_fpreg { ushort[4] significand; ushort exponent; } struct _libc_fpstate { c_ulong cw; c_ulong sw; c_ulong tag; c_ulong ipoff; c_ulong cssel; c_ulong dataoff; c_ulong datasel; _libc_fpreg[8] _st; c_ulong status; } enum NGREG = 19; alias int greg_t; alias greg_t[NGREG] gregset_t; alias _libc_fpstate* fpregset_t; } struct mcontext_t { gregset_t gregs; fpregset_t fpregs; c_ulong oldmask; c_ulong cr2; } struct ucontext_t { c_ulong uc_flags; ucontext_t* uc_link; stack_t uc_stack; mcontext_t uc_mcontext; sigset_t uc_sigmask; _libc_fpstate __fpregs_mem; } } else version (HPPA) { private { enum NGREG = 80; enum NFPREG = 32; alias c_ulong greg_t; struct gregset_t { greg_t[32] g_regs; greg_t[8] sr_regs; greg_t[24] cr_regs; greg_t[16] g_pad; } struct fpregset_t { double[32] fpregs; } } struct mcontext_t { greg_t sc_flags; greg_t[32] sc_gr; fpregset_t sc_fr; greg_t[2] sc_iasq; greg_t[2] sc_iaoq; greg_t sc_sar; } struct ucontext_t { c_ulong uc_flags; ucontext_t* uc_link; stack_t uc_stack; mcontext_t uc_mcontext; sigset_t uc_sigmask; } } else version (MIPS32) { private { enum NGREG = 32; enum NFPREG = 32; alias ulong greg_t; alias greg_t[NGREG] gregset_t; struct fpregset_t { union fp_r_t { double[NFPREG] fp_dregs; static struct fp_fregs_t { float _fp_fregs; uint _fp_pad; } fp_fregs_t[NFPREG] fp_fregs; } fp_r_t fp_r; } } version (MIPS_O32) { struct mcontext_t { uint regmask; uint status; greg_t pc; gregset_t gregs; fpregset_t fpregs; uint fp_owned; uint fpc_csr; uint fpc_eir; uint used_math; uint dsp; greg_t mdhi; greg_t mdlo; c_ulong hi1; c_ulong lo1; c_ulong hi2; c_ulong lo2; c_ulong hi3; c_ulong lo3; } } else { struct mcontext_t { gregset_t gregs; fpregset_t fpregs; greg_t mdhi; greg_t hi1; greg_t hi2; greg_t hi3; greg_t mdlo; greg_t lo1; greg_t lo2; greg_t lo3; greg_t pc; uint fpc_csr; uint used_math; uint dsp; uint reserved; } } struct ucontext_t { c_ulong uc_flags; ucontext_t* uc_link; stack_t uc_stack; mcontext_t uc_mcontext; sigset_t uc_sigmask; } } else version (MIPS64) { private { enum NGREG = 32; enum NFPREG = 32; alias ulong greg_t; alias greg_t[NGREG] gregset_t; struct fpregset_t { union fp_r_t { double[NFPREG] fp_dregs; static struct fp_fregs_t { float _fp_fregs; uint _fp_pad; } fp_fregs_t[NFPREG] fp_fregs; } fp_r_t fp_r; } } struct mcontext_t { gregset_t gregs; fpregset_t fpregs; greg_t mdhi; greg_t hi1; greg_t hi2; greg_t hi3; greg_t mdlo; greg_t lo1; greg_t lo2; greg_t lo3; greg_t pc; uint fpc_csr; uint used_math; uint dsp; uint reserved; } struct ucontext_t { c_ulong uc_flags; ucontext_t* uc_link; stack_t uc_stack; mcontext_t uc_mcontext; sigset_t uc_sigmask; } } else version (PPC) { private { enum NGREG = 48; alias c_ulong greg_t; alias greg_t[NGREG] gregset_t; struct fpregset_t { double[32] fpregs; double fpscr; uint[2] _pad; } struct vrregset_t { uint[32][4] vrregs; uint vrsave; uint[2] __pad; uint vscr; } struct pt_regs { c_ulong[32] gpr; c_ulong nip; c_ulong msr; c_ulong orig_gpr3; c_ulong ctr; c_ulong link; c_ulong xer; c_ulong ccr; c_ulong mq; c_ulong trap; c_ulong dar; c_ulong dsisr; c_ulong result; } } struct mcontext_t { gregset_t gregs; fpregset_t fpregs; align(16) vrregset_t vrregs; } struct ucontext_t { c_ulong uc_flags; ucontext_t* uc_link; stack_t uc_stack; int[7] uc_pad; union uc_mcontext { pt_regs* regs; mcontext_t* uc_regs; } sigset_t uc_sigmask; char[mcontext_t.sizeof + 12] uc_reg_space = 0; } } else version (PPC64) { private { enum NGREG = 48; enum NFPREG = 33; enum NVRREG = 34; alias c_ulong greg_t; alias greg_t[NGREG] gregset_t; alias double[NFPREG] fpregset_t; struct vscr_t { uint[3] __pad; uint vscr_word; } struct vrregset_t { uint[32][4] vrregs; vscr_t vscr; uint vrsave; uint[3] __pad; } struct pt_regs { c_ulong[32] gpr; c_ulong nip; c_ulong msr; c_ulong orig_gpr3; c_ulong ctr; c_ulong link; c_ulong xer; c_ulong ccr; c_ulong softe; c_ulong trap; c_ulong dar; c_ulong dsisr; c_ulong result; } } struct mcontext_t { c_ulong[4] __unused; int signal; int __pad0; c_ulong handler; c_ulong oldmask; pt_regs* regs; gregset_t gp_regs; fpregset_t fp_regs; vrregset_t *v_regs; c_long[NVRREG+NVRREG+1] vmx_reserve; } struct ucontext_t { c_ulong uc_flags; ucontext_t* uc_link; stack_t uc_stack; sigset_t uc_sigmask; mcontext_t uc_mcontext; } } else version (ARM) { enum { R0 = 0, R1 = 1, R2 = 2, R3 = 3, R4 = 4, R5 = 5, R6 = 6, R7 = 7, R8 = 8, R9 = 9, R10 = 10, R11 = 11, R12 = 12, R13 = 13, R14 = 14, R15 = 15 } struct sigcontext { c_ulong trap_no; c_ulong error_code; c_ulong oldmask; c_ulong arm_r0; c_ulong arm_r1; c_ulong arm_r2; c_ulong arm_r3; c_ulong arm_r4; c_ulong arm_r5; c_ulong arm_r6; c_ulong arm_r7; c_ulong arm_r8; c_ulong arm_r9; c_ulong arm_r10; c_ulong arm_fp; c_ulong arm_ip; c_ulong arm_sp; c_ulong arm_lr; c_ulong arm_pc; c_ulong arm_cpsr; c_ulong fault_address; } //alias elf_fpregset_t fpregset_t; alias sigcontext mcontext_t; struct ucontext_t { c_ulong uc_flags; ucontext_t* uc_link; stack_t uc_stack; mcontext_t uc_mcontext; sigset_t uc_sigmask; align(8) c_ulong[128] uc_regspace; } } else version (AArch64) { alias int greg_t; struct sigcontext { ulong fault_address; /* AArch64 registers */ ulong[31] regs; ulong sp; ulong pc; ulong pstate; /* 4K reserved for FP/SIMD state and future expansion */ align(16) ubyte[4096] __reserved; } alias sigcontext mcontext_t; struct ucontext_t { c_ulong uc_flags; ucontext_t* uc_link; stack_t uc_stack; sigset_t uc_sigmask; mcontext_t uc_mcontext; } } else version (RISCV_Any) { private { alias c_ulong[32] __riscv_mc_gp_state; struct __riscv_mc_f_ext_state { uint[32] __f; uint __fcsr; } struct __riscv_mc_d_ext_state { ulong[32] __f; uint __fcsr; } struct __riscv_mc_q_ext_state { align(16) ulong[64] __f; uint __fcsr; uint[3] __reserved; } union __riscv_mc_fp_state { __riscv_mc_f_ext_state __f; __riscv_mc_d_ext_state __d; __riscv_mc_q_ext_state __q; } } struct mcontext_t { __riscv_mc_gp_state __gregs; __riscv_mc_fp_state __fpregs; } struct ucontext_t { c_ulong __uc_flags; ucontext_t* uc_link; stack_t uc_stack; sigset_t uc_sigmask; char[1024 / 8 - sigset_t.sizeof] __reserved = 0; mcontext_t uc_mcontext; } } else version (SPARC_Any) { enum MC_NGREG = 19; alias mc_greg_t = c_ulong; alias mc_gregset_t = mc_greg_t[MC_NGREG]; struct mc_fq { c_ulong* mcfq_addr; uint mcfq_insn; } struct mc_fpu_t { union mcfpu_fregs_t { uint[32] sregs; c_ulong[32] dregs; real[16] qregs; } mcfpu_fregs_t mcfpu_fregs; c_ulong mcfpu_fsr; c_ulong mcfpu_fprs; c_ulong mcfpu_gsr; mc_fq* mcfpu_fq; ubyte mcfpu_qcnt; ubyte mcfpu_qentsz; ubyte mcfpu_enab; } struct mcontext_t { mc_gregset_t mc_gregs; mc_greg_t mc_fp; mc_greg_t mc_i7; mc_fpu_t mc_fpregs; } struct ucontext_t { ucontext_t* uc_link; c_ulong uc_flags; c_ulong __uc_sigmask; mcontext_t uc_mcontext; stack_t uc_stack; sigset_t uc_sigmask; } /* Location of the users' stored registers relative to R0. * Usage is as an index into a gregset_t array. */ enum { REG_PSR = 0, REG_PC = 1, REG_nPC = 2, REG_Y = 3, REG_G1 = 4, REG_G2 = 5, REG_G3 = 6, REG_G4 = 7, REG_G5 = 8, REG_G6 = 9, REG_G7 = 10, REG_O0 = 11, REG_O1 = 12, REG_O2 = 13, REG_O3 = 14, REG_O4 = 15, REG_O5 = 16, REG_O6 = 17, REG_O7 = 18, REG_ASI = 19, REG_FPRS = 20, } enum NGREG = 21; alias greg_t = c_ulong; alias gregset_t = greg_t[NGREG]; } else version (IBMZ_Any) { public import core.sys.posix.signal : sigset_t; enum NGREG = 27; alias greg_t = c_ulong; alias gregset_t = align(8) greg_t[NGREG]; align(8) struct __psw_t { c_ulong mask; c_ulong addr; } union fpreg_t { double d; float f; } struct fpregset_t { uint fpc; fpreg_t[16] fprs; } struct mcontext_t { __psw_t psw; c_ulong[16] gregs; uint[16] aregs; fpregset_t fpregs; } struct ucontext { c_ulong uc_flags; ucontext* uc_link; stack_t uc_stack; mcontext_t uc_mcontext; sigset_t uc_sigmask; } alias ucontext_t = ucontext; } else static assert(0, "unimplemented"); } else version (CRuntime_Musl) { version (AArch64) { struct mcontext_t { real[18+256] __regs; } struct ucontext_t { c_ulong uc_flags; ucontext_t* uc_link; stack_t uc_stack; sigset_t uc_sigmask; mcontext_t uc_mcontext; } } else version (ARM) { struct mcontext_t { c_ulong[21] __regs; } struct ucontext_t { c_ulong uc_flags; ucontext_t* uc_link; stack_t uc_stack; mcontext_t uc_mcontext; sigset_t uc_sigmask; ulong[64] uc_regspace; } } else version (IBMZ_Any) { struct mcontext_t { c_ulong[18] __regs1; uint[18] __regs2; double[16] __regs3; } struct ucontext_t { c_ulong uc_flags; ucontext_t* uc_link; stack_t uc_stack; mcontext_t uc_mcontext; sigset_t uc_sigmask; } } else version (MIPS_Any) { version (MIPS_N32) { struct mcontext_t { ulong[32] __mc1; double[32] __mc2; ulong[9] __mc3; uint[4] __mc4; } } else version (MIPS64) { struct mcontext_t { ulong[32] __mc1; double[32] __mc2; ulong[9] __mc3; uint[4] __mc4; } } else { struct mcontext_t { uint[2] __mc1; ulong[65] __mc2; uint[5] __mc3; ulong[2] __mc4; uint[6] __mc5; } } struct ucontext_t { c_ulong uc_flags; ucontext_t* uc_link; stack_t uc_stack; mcontext_t uc_mcontext; sigset_t uc_sigmask; } } else version (X86) { struct mcontext_t { uint[22] __space; } struct ucontext_t { c_ulong uc_flags; ucontext_t* uc_link; stack_t uc_stack; mcontext_t uc_mcontext; sigset_t uc_sigmask; c_ulong[28] __fpregs_mem; } } else version (X86_64) { struct mcontext_t { ulong[32] __space; } struct ucontext_t { c_ulong uc_flags; ucontext_t* uc_link; stack_t uc_stack; mcontext_t uc_mcontext; sigset_t uc_sigmask; ulong[64] __fpregs_mem; } } else static assert(0, "unimplemented"); } else version (FreeBSD) { // <machine/ucontext.h> version (X86_64) { alias long __register_t; alias uint __uint32_t; alias ushort __uint16_t; struct mcontext_t { __register_t mc_onstack; __register_t mc_rdi; __register_t mc_rsi; __register_t mc_rdx; __register_t mc_rcx; __register_t mc_r8; __register_t mc_r9; __register_t mc_rax; __register_t mc_rbx; __register_t mc_rbp; __register_t mc_r10; __register_t mc_r11; __register_t mc_r12; __register_t mc_r13; __register_t mc_r14; __register_t mc_r15; __uint32_t mc_trapno; __uint16_t mc_fs; __uint16_t mc_gs; __register_t mc_addr; __uint32_t mc_flags; __uint16_t mc_es; __uint16_t mc_ds; __register_t mc_err; __register_t mc_rip; __register_t mc_cs; __register_t mc_rflags; __register_t mc_rsp; __register_t mc_ss; long mc_len; /* sizeof(mcontext_t) */ long mc_fpformat; long mc_ownedfp; align(16) long[64] mc_fpstate; __register_t mc_fsbase; __register_t mc_gsbase; long[6] mc_spare; } } else version (X86) { alias int __register_t; struct mcontext_t { __register_t mc_onstack; __register_t mc_gs; __register_t mc_fs; __register_t mc_es; __register_t mc_ds; __register_t mc_edi; __register_t mc_esi; __register_t mc_ebp; __register_t mc_isp; __register_t mc_ebx; __register_t mc_edx; __register_t mc_ecx; __register_t mc_eax; __register_t mc_trapno; __register_t mc_err; __register_t mc_eip; __register_t mc_cs; __register_t mc_eflags; __register_t mc_esp; __register_t mc_ss; int mc_len; int mc_fpformat; int mc_ownedfp; int[1] mc_spare1; align(16) int[128] mc_fpstate; __register_t mc_fsbase; __register_t mc_gsbase; int[6] mc_spare2; } } else version (AArch64) { alias __register_t = long; struct gpregs { __register_t[30] gp_x; __register_t gp_lr; __register_t gp_sp; __register_t gp_elr; uint gp_spsr; int gp_pad; } struct fpregs { ulong[2][32] fp_q; // __uint128_t uint fp_sr; uint fp_cr; int fp_flags; int fp_pad; } struct mcontext_t { gpregs mc_gpregs; fpregs mc_fpregs; int mc_flags; int mc_pad; ulong[8] mc_spare; } } else version (PPC_Any) { alias size_t __register_t; alias uint __uint32_t; alias ulong __uint64_t; struct mcontext_t { int mc_vers; int mc_flags; enum _MC_FP_VALID = 0x01; enum _MC_AV_VALID = 0x02; int mc_onstack; int mc_len; __uint64_t[32 * 2] mc_avec; __uint32_t[2] mc_av; __register_t[42] mc_frame; __uint64_t[33] mc_fpreg; __uint64_t[32] mc_vsxfpreg; } } // <ucontext.h> enum UCF_SWAPPED = 0x00000001; struct ucontext_t { sigset_t uc_sigmask; mcontext_t uc_mcontext; ucontext_t* uc_link; stack_t uc_stack; int uc_flags; int[4] __spare__; } } else version (NetBSD) { version (X86_64) { private { enum _NGREG = 26; alias __greg_t = c_ulong; alias __gregset_t = __greg_t[_NGREG]; alias __fpregset_t = align(8) ubyte[512]; } struct mcontext_t { __gregset_t __gregs; __greg_t _mc_tlsbase; __fpregset_t __fpregs; } } else version (X86) { private { enum _NGREG = 19; alias __greg_t = int; alias __gregset_t = __greg_t[_NGREG]; struct __fpregset_t { union fp_reg_set_t { struct fpchip_state_t { int[27] __fp_state; } struct fp_xmm_state_t { ubyte[512] __fp_xmm; } fpchip_state_t __fpchip_state; fp_xmm_state_t __fp_xmm_state; int[128] __fp_fpregs; } fp_reg_set_t __fp_reg_set; int[33] __fp_pad; } } struct mcontext_t { __gregset_t __gregs; __fpregset_t __fpregs; __greg_t _mc_tlsbase; } } struct ucontext_t { uint uc_flags; /* properties */ ucontext_t * uc_link; /* context to resume */ sigset_t uc_sigmask; /* signals blocked in this context */ stack_t uc_stack; /* the stack used by this context */ mcontext_t uc_mcontext; /* machine state */ /+ todo #if defined(_UC_MACHINE_PAD) long __uc_pad[_UC_MACHINE_PAD]; #endif +/ } } else version (OpenBSD) { version (Alpha) { struct sigcontext { c_long sc_cookie; c_long sc_mask; c_long sc_pc; c_long sc_ps; c_ulong[32] sc_regs; c_long sc_ownedfp; c_ulong[32] sc_fpregs; c_ulong sc_fpcr; c_ulong sc_fp_control; c_long[2] sc_reserved; c_long[8] sc_xxx; } } else version (X86_64) { struct sigcontext { c_long sc_rdi; c_long sc_rsi; c_long sc_rdx; c_long sc_rcx; c_long sc_r8; c_long sc_r9; c_long sc_r10; c_long sc_r11; c_long sc_r12; c_long sc_r13; c_long sc_r14; c_long sc_r15; c_long sc_rbp; c_long sc_rbx; c_long sc_rax; c_long sc_gs; c_long sc_fs; c_long sc_es; c_long sc_ds; c_long sc_trapno; c_long sc_err; c_long sc_rip; c_long sc_cs; c_long sc_rflags; c_long sc_rsp; c_long sc_ss; void* sc_fpstate; // struct fxsave64* int __sc_unused; int sc_mask; c_long sc_cookie; } } else version (AArch64) { struct sigcontext { int __sc_unused; int sc_mask; c_ulong sc_sp; c_ulong sc_lr; c_ulong sc_elr; c_ulong sc_spsr; c_ulong[30] sc_x; c_long sc_cookie; } } else version (ARM) { struct sigcontext { c_long sc_cookie; int sc_mask; uint sc_spsr; uint sc_r0; uint sc_r1; uint sc_r2; uint sc_r3; uint sc_r4; uint sc_r5; uint sc_r6; uint sc_r7; uint sc_r8; uint sc_r9; uint sc_r10; uint sc_r11; uint sc_r12; uint sc_usr_sp; uint sc_usr_lr; uint sc_svc_lr; uint sc_pc; uint sc_fpused; uint sc_fpscr; ulong[32] sc_fpreg; } } else version (HPPA) { struct sigcontext { c_ulong __sc_unused; c_long sc_mask; c_ulong sc_ps; c_ulong sc_fp; c_ulong sc_pcoqh; c_ulong sc_pcoqt; c_ulong[2] sc_resv; c_ulong[32] sc_regs; c_ulong[64] sc_fpregs; c_long sc_cookie; } } else version (X86) { struct sigcontext { int sc_gs; int sc_fs; int sc_es; int sc_ds; int sc_edi; int sc_esi; int sc_ebp; int sc_ebx; int sc_edx; int sc_ecx; int sc_eax; int sc_eip; int sc_cs; int sc_eflags; int sc_esp; int sc_ss; c_long sc_cookie; int sc_mask; int sc_trapno; int sc_err; void* sc_fpstate; // union savefpu* } } else version (PPC) { private struct trapframe { c_long[32] fixreg; c_long lr; c_long cr; c_long xer; c_long ctr; int srr0; int srr1; int dar; int dsisr; c_long exc; } struct sigcontext { c_long sc_cookie; int sc_mask; trapframe sc_frame; } } else version (SPARC64) { struct sigcontext { c_long sc_cookie; c_long sc_sp; c_long sc_pc; c_long sc_npc; c_long sc_tstate; c_long sc_g1; c_long sc_o0; int sc_mask; } } else static assert(false, "Architecture not supported."); alias ucontext_t = sigcontext; } else version (DragonFlyBSD) { // <machine/ucontext.h> version (X86_64) { alias long __register_t; alias uint __uint32_t; alias ushort __uint16_t; struct mcontext_t { __register_t mc_onstack; __register_t mc_rdi; __register_t mc_rsi; __register_t mc_rdx; __register_t mc_rcx; __register_t mc_r8; __register_t mc_r9; __register_t mc_rax; __register_t mc_rbx; __register_t mc_rbp; __register_t mc_r10; __register_t mc_r11; __register_t mc_r12; __register_t mc_r13; __register_t mc_r14; __register_t mc_r15; __register_t mc_xflags; __register_t mc_trapno; __register_t mc_addr; __register_t mc_flags; __register_t mc_err; __register_t mc_rip; __register_t mc_cs; __register_t mc_rflags; __register_t mc_rsp; __register_t mc_ss; uint mc_len; uint mc_fpformat; uint mc_ownedfp; uint mc_reserved; uint[8] mc_unused; int[256] mc_fpregs; } // __attribute__((aligned(64))); } else { static assert(0, "Only X86_64 support on DragonFlyBSD"); } // <ucontext.h> enum UCF_SWAPPED = 0x00000001; struct ucontext_t { sigset_t uc_sigmask; mcontext_t uc_mcontext; ucontext_t* uc_link; stack_t uc_stack; void function(ucontext_t *, void *) uc_cofunc; void* uc_arg; int[4] __spare__; } } else version (Solaris) { private import core.stdc.stdint; alias uint[4] upad128_t; version (SPARC64) { enum _NGREG = 21; alias long greg_t; } else version (SPARC) { enum _NGREG = 19; alias int greg_t; } else version (X86_64) { enum _NGREG = 28; alias long greg_t; } else version (X86) { enum _NGREG = 19; alias int greg_t; } else static assert(0, "unimplemented"); alias greg_t[_NGREG] gregset_t; version (SPARC64) { private { struct _fpq { uint *fpq_addr; uint fpq_instr; } struct fq { union { double whole; _fpq fpq; } } } struct fpregset_t { union { uint[32] fpu_regs; double[32] fpu_dregs; real[16] fpu_qregs; } fq *fpu_q; ulong fpu_fsr; ubyte fpu_qcnt; ubyte fpu_q_entrysize; ubyte fpu_en; } } else version (SPARC) { private { struct _fpq { uint *fpq_addr; uint fpq_instr; } struct fq { union { double whole; _fpq fpq; } } } struct fpregset_t { union { uint[32] fpu_regs; double[16] fpu_dregs; } fq *fpu_q; uint fpu_fsr; ubyte fpu_qcnt; ubyte fpu_q_entrysize; ubyte fpu_en; } } else version (X86_64) { private { union _u_st { ushort[5] fpr_16; upad128_t __fpr_pad; } } struct fpregset_t { union fp_reg_set { struct fpchip_state { ushort cw; ushort sw; ubyte fctw; ubyte __fx_rsvd; ushort fop; ulong rip; ulong rdp; uint mxcsr; uint mxcsr_mask; _u_st[8] st; upad128_t[16] xmm; upad128_t[6] __fx_ign2; uint status; uint xstatus; } uint[130] f_fpregs; } } } else version (X86) { struct fpregset_t { union u_fp_reg_set { struct s_fpchip_state { uint[27] state; uint status; uint mxcsr; uint xstatus; uint[2] __pad; upad128_t[8] xmm; } s_fpchip_state fpchip_state; struct s_fp_emul_space { ubyte[246] fp_emul; ubyte[2] fp_epad; } s_fp_emul_space fp_emul_space; uint[95] f_fpregs; } u_fp_reg_set fp_reg_set; } } else static assert(0, "unimplemented"); version (SPARC_Any) { private { struct rwindow { greg_t[8] rw_local; greg_t[8] rw_in; } struct gwindows_t { int wbcnt; greg_t[31] *spbuf; rwindow[31] wbuf; } struct xrs_t { uint xrs_id; caddr_t xrs_ptr; } struct cxrs_t { uint cxrs_id; caddr_t cxrs_ptr; } alias int64_t[16] asrset_t; } struct mcontext_t { gregset_t gregs; gwindows_t *gwins; fpregset_t fpregs; xrs_t xrs; version (SPARC64) { asrset_t asrs; cxrs_t cxrs; c_long[2] filler; } else version (SPARC) { cxrs_t cxrs; c_long[17] filler; } } } else version (X86_Any) { private { struct xrs_t { uint xrs_id; caddr_t xrs_ptr; } } struct mcontext_t { gregset_t gregs; fpregset_t fpregs; } } struct ucontext_t { version (SPARC_Any) uint uc_flags; else version (X86_Any) c_ulong uc_flags; ucontext_t *uc_link; sigset_t uc_sigmask; stack_t uc_stack; mcontext_t uc_mcontext; version (SPARC64) c_long[4] uc_filler; else version (SPARC) c_long[23] uc_filler; else version (X86_Any) { xrs_t uc_xrs; c_long[3] uc_filler; } } } else version (CRuntime_UClibc) { version (X86_64) { enum { REG_R8 = 0, REG_R9, REG_R10, REG_R11, REG_R12, REG_R13, REG_R14, REG_R15, REG_RDI, REG_RSI, REG_RBP, REG_RBX, REG_RDX, REG_RAX, REG_RCX, REG_RSP, REG_RIP, REG_EFL, REG_CSGSFS, /* Actually short cs, gs, fs, __pad0. */ REG_ERR, REG_TRAPNO, REG_OLDMASK, REG_CR2 } alias sigcontext mcontext_t; struct ucontext_t { c_ulong uc_flags; ucontext_t* uc_link; stack_t uc_stack; mcontext_t uc_mcontext; sigset_t uc_sigmask; } } else version (MIPS32) { alias greg_t = ulong; enum NGREG = 32; enum NFPREG = 32; alias gregset_t = greg_t[NGREG]; struct fpregset_t { union fp_r { double[NFPREG] fp_dregs; struct _fp_fregs { float _fp_fregs; uint _fp_pad; } _fp_fregs[NFPREG] fp_fregs; } } version (MIPS_O32) { struct mcontext_t { uint regmask; uint status; greg_t pc; gregset_t gregs; fpregset_t fpregs; uint fp_owned; uint fpc_csr; uint fpc_eir; uint used_math; uint dsp; greg_t mdhi; greg_t mdlo; c_ulong hi1; c_ulong lo1; c_ulong hi2; c_ulong lo2; c_ulong hi3; c_ulong lo3; } } else { struct mcontext_t { gregset_t gregs; fpregset_t fpregs; greg_t mdhi; greg_t hi1; greg_t hi2; greg_t hi3; greg_t mdlo; greg_t lo1; greg_t lo2; greg_t lo3; greg_t pc; uint fpc_csr; uint used_math; uint dsp; uint reserved; } } struct ucontext_t { c_ulong uc_flags; ucontext_t* uc_link; stack_t uc_stack; mcontext_t uc_mcontext; sigset_t uc_sigmask; } } else version (ARM) { enum { R0 = 0, R1 = 1, R2 = 2, R3 = 3, R4 = 4, R5 = 5, R6 = 6, R7 = 7, R8 = 8, R9 = 9, R10 = 10, R11 = 11, R12 = 12, R13 = 13, R14 = 14, R15 = 15 } struct sigcontext { c_ulong trap_no; c_ulong error_code; c_ulong oldmask; c_ulong arm_r0; c_ulong arm_r1; c_ulong arm_r2; c_ulong arm_r3; c_ulong arm_r4; c_ulong arm_r5; c_ulong arm_r6; c_ulong arm_r7; c_ulong arm_r8; c_ulong arm_r9; c_ulong arm_r10; c_ulong arm_fp; c_ulong arm_ip; c_ulong arm_sp; c_ulong arm_lr; c_ulong arm_pc; c_ulong arm_cpsr; c_ulong fault_address; } alias sigcontext mcontext_t; struct ucontext_t { c_ulong uc_flags; ucontext_t* uc_link; stack_t uc_stack; mcontext_t uc_mcontext; sigset_t uc_sigmask; align(8) c_ulong[128] uc_regspace; } } else static assert(0, "unimplemented"); } // // Obsolescent (OB) // /* int getcontext(ucontext_t*); void makecontext(ucontext_t*, void function(), int, ...); int setcontext(const scope ucontext_t*); int swapcontext(ucontext_t*, const scope ucontext_t*); */ static if ( is( ucontext_t ) ) { int getcontext(ucontext_t*); version (Solaris) { version (SPARC_Any) { void __makecontext_v2(ucontext_t*, void function(), int, ...); alias makecontext = __makecontext_v2; } else void makecontext(ucontext_t*, void function(), int, ...); } else void makecontext(ucontext_t*, void function(), int, ...); int setcontext(const scope ucontext_t*); int swapcontext(ucontext_t*, const scope ucontext_t*); } version (Solaris) { int walkcontext(const scope ucontext_t*, int function(uintptr_t, int, void*), void*); int addrtosymstr(uintptr_t, char*, int); int printstack(int); }
D
module drop_target.main; /** The project implements IDropTarget and receives a Drag & Drop operation. It uses an Edit control and allows dragging text into this application from another application. */ import core.runtime; import core.stdc.stdlib; import core.stdc.string; import std.conv; import std.exception; import std.stdio; import std.string; pragma(lib, "comctl32.lib"); pragma(lib, "ole32.lib"); pragma(lib, "gdi32.lib"); import win32.objidl; import win32.ole2; import win32.winbase; import win32.windef; import win32.wingdi; import win32.winuser; import win32.wtypes; import utils.com; import drop_target.target; import drop_target.resource; extern (Windows) int WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int iCmdShow) { int result; void exceptionHandler(Throwable e) { throw e; } try { Runtime.initialize(&exceptionHandler); result = myWinMain(hInstance, hPrevInstance, lpCmdLine, iCmdShow); Runtime.terminate(&exceptionHandler); } catch (Throwable o) { MessageBox(null, o.toString().toStringz, "Error", MB_OK | MB_ICONEXCLAMATION); result = 0; } return result; } enum APPNAME = "IDropTarget"; HWND hwndMain; HWND hwndEdit; HINSTANCE hInstance; char[200] szTextBuffer; int myWinMain(HINSTANCE hInst, HINSTANCE hPrev, LPSTR lpCmdLine, int nShowCmd) { enforce(OleInitialize(null) == S_OK); scope (exit) OleUninitialize(); MSG msg; hInstance = hInst; InitMainWnd(); CreateMainWnd(); while (GetMessage(&msg, null, 0, 0)) { TranslateMessage(&msg); DispatchMessage(&msg); } return 0; } void InitMainWnd() { WNDCLASSEX wc; wc.lpfnWndProc = &WndProc; wc.lpszClassName = APPNAME; wc.lpszMenuName = MAKEINTRESOURCE(IDR_MENU1); wc.hInstance = hInstance; RegisterClassEx(&wc); } void CreateMainWnd() { hwndMain = CreateWindowEx(0, APPNAME, APPNAME, WS_VISIBLE | WS_OVERLAPPEDWINDOW, CW_USEDEFAULT, CW_USEDEFAULT, 512, 200, null, null, hInstance, null); } extern (Windows) LRESULT WndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) { static IDropTarget pDropTarget; switch (msg) { case WM_CREATE: hwndEdit = CreateWindowEx(WS_EX_CLIENTEDGE, "EDIT", "", WS_CHILD | WS_VISIBLE | ES_MULTILINE | ES_WANTRETURN | WS_VSCROLL, 0, 0, 0, 0, hwnd, null, hInstance, null); SendMessage(hwndEdit, WM_SETFONT, cast(WPARAM)GetStockObject(ANSI_FIXED_FONT), 0); // make the Edit control into a DropTarget RegisterDropWindow(hwndEdit, &pDropTarget); SetFocus(hwndEdit); return TRUE; case WM_COMMAND: switch (LOWORD(wParam)) { case IDM_FILE_EXIT: CloseWindow(hwnd); return 0; case IDM_FILE_ABOUT: MessageBox(hwnd, "IDropTarget Test Application\r\n\r\n" "Copyright(c) 2004 by Catch22 Productions\t\r\n" "Written by J Brown.\r\n\r\n" "Homepage at www.catch22.net", APPNAME, MB_ICONINFORMATION); return 0; default: } break; case WM_CLOSE: // shut program down UnregisterDropWindow(hwndEdit, pDropTarget); DestroyWindow(hwnd); PostQuitMessage(0); return 0; case WM_SIZE: // resize editbox to fit in main window MoveWindow(hwndEdit, 0, 0, LOWORD(lParam), HIWORD(lParam), TRUE); return 0; default: } return DefWindowProc(hwnd, msg, wParam, lParam); }
D
/* REQUIRED_ARGS: -de PERMUTE_ARGS: */ /* TEST_OUTPUT: --- fail_compilation/retscope4.d(3007): Deprecation: slice of static array temporary returned by `func()` assigned to longer lived variable `a` --- */ #line 3000 // https://issues.dlang.org/show_bug.cgi?id=12625 int[16] func(); void foo() { int[] a = func(); }
D
/* TEST_OUTPUT: --- fail_compilation/fail3672.d(27): Error: read-modify-write operations are not allowed for `shared` variables. Use `core.atomic.atomicOp!"+="(*p, 1)` instead. fail_compilation/fail3672.d(31): Error: read-modify-write operations are not allowed for `shared` variables. Use `core.atomic.atomicOp!"+="(*sfp, 1)` instead. --- */ struct SF // should fail { void opOpAssign(string op, T)(T rhs) { } } struct SK // ok { void opOpAssign(string op, T)(T rhs) shared { } } void main() { shared int x; auto p = &x; *p += 1; // fail shared SF sf; auto sfp = &sf; *sfp += 1; // fail shared SK sk; auto skp = &sk; sk += 1; // ok *skp += 1; // ok }
D
import std.stdio; import std.string; import std.conv; import std.algorithm: canFind; void main() { string[] inputs = split(readln()); string A = inputs[0]; string B = inputs[1]; string C = inputs[2]; if(A[$-1] == B[0] && B[$-1] == C[0]) "YES".writeln; else "NO".writeln; }
D