code
stringlengths 3
10M
| language
stringclasses 31
values |
|---|---|
var int bennet_di_itemsgiven;
func void B_GiveTradeInv_Bennet_DI(var C_Npc slf)
{
if(bennet_di_itemsgiven == FALSE)
{
CreateInvItems(slf,ItMi_Gold,700);
CreateInvItems(slf,itmi_steelbar,7);
CreateInvItems(slf,itmi_leather,5);
CreateInvItems(slf,itmi_textile,4);
CreateInvItems(slf,ItRw_Arrow,140);
CreateInvItems(slf,ItRw_Bolt,140);
CreateInvItems(slf,ItMw_ElBastardo,1);
CreateInvItems(slf,ItMw_Folteraxt,1);
CreateInvItems(slf,ItMw_Zweihaender4,1);
CreateInvItems(slf,ItMw_Barbarenstreitaxt,1);
CreateInvItems(slf,ItMw_Berserkeraxt,1);
CreateInvItems(slf,ItMi_Nugget,4);
bennet_di_itemsgiven = TRUE;
};
};
|
D
|
module android.java.android.media.DrmInitData_d_interface;
import arsd.jni : IJavaObjectImplementation, JavaPackageId, JavaName, IJavaObject, ImportExportImpl, JavaInterfaceMembers;
static import arsd.jni;
import import1 = android.java.java.util.UUID_d_interface;
import import2 = android.java.java.lang.Class_d_interface;
import import0 = android.java.android.media.DrmInitData_SchemeInitData_d_interface;
final class DrmInitData : IJavaObject {
static immutable string[] _d_canCastTo = [
];
@Import import0.DrmInitData_SchemeInitData get(import1.UUID);
@Import import2.Class getClass();
@Import int hashCode();
@Import bool equals(IJavaObject);
@Import @JavaName("toString") string toString_();
override string toString() { return arsd.jni.javaObjectToString(this); }
@Import void notify();
@Import void notifyAll();
@Import void wait(long);
@Import void wait(long, int);
@Import void wait();
mixin IJavaObjectImplementation!(false);
public static immutable string _javaParameterString = "Landroid/media/DrmInitData;";
}
|
D
|
E: c63, c22, c57, c65, c0, c62, c5, c46, c47, c61, c3, c26, c42, c24, c18, c67, c23, c4, c55, c39, c16, c53, c34, c40, c21, c35.
p5(E,E)
c63,c22
c61,c57
c3,c5
c24,c42
.
p8(E,E)
c57,c65
c0,c62
c5,c62
c22,c46
c22,c47
c5,c26
c42,c24
c42,c26
c67,c46
c5,c24
c57,c24
c5,c46
c57,c26
c42,c62
c57,c62
c0,c47
c42,c65
c67,c26
c57,c47
c46,c24
c5,c18
c46,c47
c5,c65
c67,c18
c0,c65
c57,c18
c67,c65
c22,c65
c22,c26
c0,c46
c0,c26
c46,c62
c46,c65
c5,c47
c22,c24
c42,c18
c42,c46
c46,c18
c22,c18
c42,c47
c67,c24
c0,c18
c0,c24
c46,c26
c22,c62
c67,c62
c67,c47
c46,c46
c57,c46
.
p7(E,E)
c18,c18
c24,c24
c26,c26
c62,c62
c24,c55
c65,c39
c62,c46
c46,c46
c26,c53
c65,c65
c47,c47
.
p0(E,E)
c5,c23
c42,c4
c22,c16
c57,c23
.
p6(E,E)
c18,c18
c46,c46
c65,c65
.
p9(E,E)
c4,c42
c23,c5
c47,c46
c16,c22
c40,c0
c35,c67
c23,c57
.
p1(E,E)
c42,c24
c34,c26
c21,c65
c46,c62
.
|
D
|
module socket.network;
import std.stdio;
import std.string;
import std.socket;
class Network{
private:
ushort port;
Socket socket;
Socket client;
public:
this(ushort port = 8787){
this.port = port;
socket = new TcpSocket();
socket.setOption(SocketOptionLevel.SOCKET, SocketOption.REUSEADDR, true);
socket.bind(new InternetAddress(port));
}
int waitConnection(){
writeln("Wait connexion");
socket.listen(1);
client = socket.accept();
writeln("Connexion found");
return 0;
}
long sendData(char[] data){
if(data.length != 0){
writeln("Data send : ", data);
return client.send(data);
}
return 0;
}
char[] receiveData(){
char[] data = new char[4096];
auto result = client.receive(data);
if(result == 0){
return null;
}
//writeln("Result : ", result, " Data received : ", data[0..result]);
return data[0..result];
}
}
|
D
|
// This code has been mechanically translated from the original FORTRAN
// code at http://netlib.org/quadpack.
/** Authors: Lars Tandle Kyllingstad
Copyright: Copyright (c) 2009, Lars T. Kyllingstad. All rights reserved.
License: Boost License 1.0
*/
module scid.ports.quadpack.qags;
import std.conv;
import scid.ports.quadpack.qagse;
version(unittest)
{
import std.math;
import scid.core.testing;
}
///
void qags(Real, Func)(Func f, Real a, Real b, Real epsabs,Real epsrel,
out Real result, out Real abserr, out int neval, out int ier,
int limit, int lenw, out int last, int* iwork, Real* work)
{
//***begin prologue dqags
//***date written 800101 (yymmdd)
//***revision date 830518 (yymmdd)
//***category no. h2a1a1
//***keywords automatic integrator, general-purpose,
// (end-point) singularities, extrapolation,
// globally adaptive
//***author piessens,robert,appl. math. & progr. div. - k.u.leuven
// de doncker,elise,appl. math. & prog. div. - k.u.leuven
//***purpose the routine calculates an approximation result to a given
// definite integral i = integral of f over (a,b),
// hopefully satisfying following claim for accuracy
// abs(i-result).le.max(epsabs,epsrel*abs(i)).
//***description
//
// computation of a definite integral
// standard fortran subroutine
// double precision version
//
//
// parameters
// on entry
// f - double precision
// function subprogram defining the integrand
// function f(x). the actual name for f needs to be
// declared e x t e r n a l in the driver program.
//
// a - double precision
// lower limit of integration
//
// b - double precision
// upper limit of integration
//
// epsabs - double precision
// absolute accuracy requested
// epsrel - double precision
// relative accuracy requested
// if epsabs.le.0
// and epsrel.lt.max(50*rel.mach.acc.,0.5d-28),
// the routine will end with ier = 6.
//
// on return
// result - double precision
// approximation to the integral
//
// abserr - double precision
// estimate of the modulus of the absolute error,
// which should equal or exceed abs(i-result)
//
// neval - integer
// number of integrand evaluations
//
// ier - integer
// ier = 0 normal and reliable termination of the
// routine. it is assumed that the requested
// accuracy has been achieved.
// ier.gt.0 abnormal termination of the routine
// the estimates for integral and error are
// less reliable. it is assumed that the
// requested accuracy has not been achieved.
// error messages
// ier = 1 maximum number of subdivisions allowed
// has been achieved. one can allow more sub-
// divisions by increasing the value of limit
// (and taking the according dimension
// adjustments into account. however, if
// this yields no improvement it is advised
// to analyze the integrand in order to
// determine the integration difficulties. if
// the position of a local difficulty can be
// determined (e.g. singularity,
// discontinuity within the interval) one
// will probably gain from splitting up the
// interval at this point and calling the
// integrator on the subranges. if possible,
// an appropriate special-purpose integrator
// should be used, which is designed for
// handling the type of difficulty involved.
// = 2 the occurrence of roundoff error is detec-
// ted, which prevents the requested
// tolerance from being achieved.
// the error may be under-estimated.
// = 3 extremely bad integrand behaviour
// occurs at some points of the integration
// interval.
// = 4 the algorithm does not converge.
// roundoff error is detected in the
// extrapolation table. it is presumed that
// the requested tolerance cannot be
// achieved, and that the returned result is
// the best which can be obtained.
// = 5 the integral is probably divergent, or
// slowly convergent. it must be noted that
// divergence can occur with any other value
// of ier.
// = 6 the input is invalid, because
// (epsabs.le.0 and
// epsrel.lt.max(50*rel.mach.acc.,0.5d-28)
// or limit.lt.1 or lenw.lt.limit*4.
// result, abserr, neval, last are set to
// zero.except when limit or lenw is invalid,
// iwork(1), work(limit*2+1) and
// work(limit*3+1) are set to zero, work(1)
// is set to a and work(limit+1) to b.
//
// dimensioning parameters
// limit - integer
// dimensioning parameter for iwork
// limit determines the maximum number of subintervals
// in the partition of the given integration interval
// (a,b), limit.ge.1.
// if limit.lt.1, the routine will end with ier = 6.
//
// lenw - integer
// dimensioning parameter for work
// lenw must be at least limit*4.
// if lenw.lt.limit*4, the routine will end
// with ier = 6.
//
// last - integer
// on return, last equals the number of subintervals
// produced in the subdivision process, detemines the
// number of significant elements actually in the work
// arrays.
//
// work arrays
// iwork - integer
// vector of dimension at least limit, the first k
// elements of which contain pointers
// to the error estimates over the subintervals
// such that work(limit*3+iwork(1)),... ,
// work(limit*3+iwork(k)) form a decreasing
// sequence, with k = last if last.le.(limit/2+2),
// and k = limit+1-last otherwise
//
// work - double precision
// vector of dimension at least lenw
// on return
// work(1), ..., work(last) contain the left
// end-points of the subintervals in the
// partition of (a,b),
// work(limit+1), ..., work(limit+last) contain
// the right end-points,
// work(limit*2+1), ..., work(limit*2+last) contain
// the integral approximations over the subintervals,
// work(limit*3+1), ..., work(limit*3+last)
// contain the error estimates.
//
//***references (none)
//***routines called dqagse,xerror
//***end prologue dqags
//
//
int lvl=1,l1=1,l2=1,l3=1;
//
// check validity of limit and lenw.
//
//***first executable statement dqags
ier = 6;
neval = 0;
last = 0;
result = 0.0;
abserr = 0.0;
if(limit < 1 || lenw < limit*4) goto l10;
//
// prepare call for dqagse.
//
l1 = limit;
l2 = limit+l1;
l3 = limit+l2;
//
qagse!(Real,Func)(f,a,b,epsabs,epsrel,limit,result,abserr,neval,
ier,work,work+l1,work+l2,work+l3,iwork,last);
//
// call error handler if necessary.
//
lvl = 0;
l10: if(ier == 6) lvl = 1;
if(ier != 0)
throw new Exception("abnormal return from qags: "~to!string(ier));
return;
}
unittest
{
alias qags!(float, float delegate(float)) fqags;
alias qags!(double, double delegate(double)) dqags;
alias qags!(double, double function(double)) dfqags;
alias qags!(real, real delegate(real)) rqags;
}
unittest
{
double f(double x) { return x<=0.0 ? 0.0 : log(x)/sqrt(x); }
enum : double
{
a = 0.0,
b = 1.0,
epsabs = 0.0,
epsrel = 1e-10
}
double result, abserr;
int neval, ier;
enum
{
limit = 500,
lenw = 4*limit
}
int last;
int[limit] iwork;
double[lenw] work;
qags(&f, a, b, epsabs, epsrel, result, abserr, neval, ier,
limit, lenw, last, iwork.ptr, work.ptr);
check (isAccurate(result, abserr, -4.0, epsrel, epsabs));
}
|
D
|
/Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/SQLite.build/SQL/SQLiteFunction.swift.o : /Users/nice/HelloWord/.build/checkouts/sqlite.git--4454338443970141452/Sources/SQLite/Row/SQLiteData.swift /Users/nice/HelloWord/.build/checkouts/sqlite.git--4454338443970141452/Sources/SQLite/SQL/SQLiteGeneric.swift /Users/nice/HelloWord/.build/checkouts/sqlite.git--4454338443970141452/Sources/SQLite/Utilities/Deprecated.swift /Users/nice/HelloWord/.build/checkouts/sqlite.git--4454338443970141452/Sources/SQLite/SQL/SQLiteBind.swift /Users/nice/HelloWord/.build/checkouts/sqlite.git--4454338443970141452/Sources/SQLite/Database/SQLiteStorage.swift /Users/nice/HelloWord/.build/checkouts/sqlite.git--4454338443970141452/Sources/SQLite/SQL/SQLiteCreateTable.swift /Users/nice/HelloWord/.build/checkouts/sqlite.git--4454338443970141452/Sources/SQLite/SQL/SQLiteTable.swift /Users/nice/HelloWord/.build/checkouts/sqlite.git--4454338443970141452/Sources/SQLite/SQL/SQLiteAlterTable.swift /Users/nice/HelloWord/.build/checkouts/sqlite.git--4454338443970141452/Sources/SQLite/SQL/SQLiteDataTypeStaticRepresentable.swift /Users/nice/HelloWord/.build/checkouts/sqlite.git--4454338443970141452/Sources/SQLite/SQL/SQLiteQueryExpressionRepresentable.swift /Users/nice/HelloWord/.build/checkouts/sqlite.git--4454338443970141452/Sources/SQLite/Row/SQLiteDataConvertible.swift /Users/nice/HelloWord/.build/checkouts/sqlite.git--4454338443970141452/Sources/SQLite/Row/SQLiteDataType.swift /Users/nice/HelloWord/.build/checkouts/sqlite.git--4454338443970141452/Sources/SQLite/Database/SQLiteDatabase.swift /Users/nice/HelloWord/.build/checkouts/sqlite.git--4454338443970141452/Sources/SQLite/Database/DatabaseIdentifier+SQLite.swift /Users/nice/HelloWord/.build/checkouts/sqlite.git--4454338443970141452/Sources/SQLite/SQL/SQLiteBoolLiteral.swift /Users/nice/HelloWord/.build/checkouts/sqlite.git--4454338443970141452/Sources/SQLite/SQL/SQLiteDefaultLiteral.swift /Users/nice/HelloWord/.build/checkouts/sqlite.git--4454338443970141452/Sources/SQLite/Row/SQLiteColumn.swift /Users/nice/HelloWord/.build/checkouts/sqlite.git--4454338443970141452/Sources/SQLite/SQL/SQLiteCollation.swift /Users/nice/HelloWord/.build/checkouts/sqlite.git--4454338443970141452/Sources/SQLite/Database/SQLiteConnection.swift /Users/nice/HelloWord/.build/checkouts/sqlite.git--4454338443970141452/Sources/SQLite/SQL/SQLiteFunction.swift /Users/nice/HelloWord/.build/checkouts/sqlite.git--4454338443970141452/Sources/SQLite/SQL/SQLiteAlterTableBuilder.swift /Users/nice/HelloWord/.build/checkouts/sqlite.git--4454338443970141452/Sources/SQLite/Codable/SQLiteDataDecoder.swift /Users/nice/HelloWord/.build/checkouts/sqlite.git--4454338443970141452/Sources/SQLite/Codable/SQLiteRowDecoder.swift /Users/nice/HelloWord/.build/checkouts/sqlite.git--4454338443970141452/Sources/SQLite/Codable/SQLiteDataEncoder.swift /Users/nice/HelloWord/.build/checkouts/sqlite.git--4454338443970141452/Sources/SQLite/Utilities/SQLiteError.swift /Users/nice/HelloWord/.build/checkouts/sqlite.git--4454338443970141452/Sources/SQLite/Utilities/Exports.swift /Users/nice/HelloWord/.build/checkouts/sqlite.git--4454338443970141452/Sources/SQLite/Database/SQLiteStatement.swift /Users/nice/HelloWord/.build/checkouts/sqlite.git--4454338443970141452/Sources/SQLite/SQL/SQLiteDropIndex.swift /Users/nice/HelloWord/.build/checkouts/sqlite.git--4454338443970141452/Sources/SQLite/SQL/SQLitePrimaryKey.swift /Users/nice/HelloWord/.build/checkouts/sqlite.git--4454338443970141452/Sources/SQLite/SQL/SQLiteQuery.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Dispatch.apinotesc /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/ObjectiveC.swiftmodule /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/SQL.swiftmodule /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/NIO.swiftmodule /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/Async.swiftmodule /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/Service.swiftmodule /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/Core.swiftmodule /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/Debugging.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Dispatch.swiftmodule /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/COperatingSystem.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/CoreFoundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/CoreGraphics.swiftmodule /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/NIOConcurrencyHelpers.swiftmodule /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/Bits.swiftmodule /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/NIOFoundationCompat.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/IOKit.swiftmodule /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/DatabaseKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/SwiftOnoneSupport.swiftmodule /Users/nice/HelloWord/.build/checkouts/swift-nio.git-5005363973595484456/Sources/CNIOAtomics/include/cpp_magic.h /Users/nice/HelloWord/.build/checkouts/swift-nio.git-5005363973595484456/Sources/CNIODarwin/include/c_nio_darwin.h /Users/nice/HelloWord/.build/checkouts/swift-nio.git-5005363973595484456/Sources/CNIOAtomics/include/c-atomics.h /Users/nice/HelloWord/.build/checkouts/swift-nio.git-5005363973595484456/Sources/CNIOLinux/include/c_nio_linux.h /Users/nice/HelloWord/.build/checkouts/swift-nio-zlib-support.git--6556802241718767980/module.modulemap /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/CNIOSHA1.build/module.modulemap /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/CNIOOpenSSL.build/module.modulemap /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/CCryptoOpenSSL.build/module.modulemap /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/CNIOZlib.build/module.modulemap /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/CNIODarwin.build/module.modulemap /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/CNIOHTTPParser.build/module.modulemap /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/CNIOAtomics.build/module.modulemap /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/CNIOLinux.build/module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/ApplicationServices.framework/Headers/ApplicationServices.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Security.framework/Headers/Security.apinotes
/Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/SQLite.build/SQLiteFunction~partial.swiftmodule : /Users/nice/HelloWord/.build/checkouts/sqlite.git--4454338443970141452/Sources/SQLite/Row/SQLiteData.swift /Users/nice/HelloWord/.build/checkouts/sqlite.git--4454338443970141452/Sources/SQLite/SQL/SQLiteGeneric.swift /Users/nice/HelloWord/.build/checkouts/sqlite.git--4454338443970141452/Sources/SQLite/Utilities/Deprecated.swift /Users/nice/HelloWord/.build/checkouts/sqlite.git--4454338443970141452/Sources/SQLite/SQL/SQLiteBind.swift /Users/nice/HelloWord/.build/checkouts/sqlite.git--4454338443970141452/Sources/SQLite/Database/SQLiteStorage.swift /Users/nice/HelloWord/.build/checkouts/sqlite.git--4454338443970141452/Sources/SQLite/SQL/SQLiteCreateTable.swift /Users/nice/HelloWord/.build/checkouts/sqlite.git--4454338443970141452/Sources/SQLite/SQL/SQLiteTable.swift /Users/nice/HelloWord/.build/checkouts/sqlite.git--4454338443970141452/Sources/SQLite/SQL/SQLiteAlterTable.swift /Users/nice/HelloWord/.build/checkouts/sqlite.git--4454338443970141452/Sources/SQLite/SQL/SQLiteDataTypeStaticRepresentable.swift /Users/nice/HelloWord/.build/checkouts/sqlite.git--4454338443970141452/Sources/SQLite/SQL/SQLiteQueryExpressionRepresentable.swift /Users/nice/HelloWord/.build/checkouts/sqlite.git--4454338443970141452/Sources/SQLite/Row/SQLiteDataConvertible.swift /Users/nice/HelloWord/.build/checkouts/sqlite.git--4454338443970141452/Sources/SQLite/Row/SQLiteDataType.swift /Users/nice/HelloWord/.build/checkouts/sqlite.git--4454338443970141452/Sources/SQLite/Database/SQLiteDatabase.swift /Users/nice/HelloWord/.build/checkouts/sqlite.git--4454338443970141452/Sources/SQLite/Database/DatabaseIdentifier+SQLite.swift /Users/nice/HelloWord/.build/checkouts/sqlite.git--4454338443970141452/Sources/SQLite/SQL/SQLiteBoolLiteral.swift /Users/nice/HelloWord/.build/checkouts/sqlite.git--4454338443970141452/Sources/SQLite/SQL/SQLiteDefaultLiteral.swift /Users/nice/HelloWord/.build/checkouts/sqlite.git--4454338443970141452/Sources/SQLite/Row/SQLiteColumn.swift /Users/nice/HelloWord/.build/checkouts/sqlite.git--4454338443970141452/Sources/SQLite/SQL/SQLiteCollation.swift /Users/nice/HelloWord/.build/checkouts/sqlite.git--4454338443970141452/Sources/SQLite/Database/SQLiteConnection.swift /Users/nice/HelloWord/.build/checkouts/sqlite.git--4454338443970141452/Sources/SQLite/SQL/SQLiteFunction.swift /Users/nice/HelloWord/.build/checkouts/sqlite.git--4454338443970141452/Sources/SQLite/SQL/SQLiteAlterTableBuilder.swift /Users/nice/HelloWord/.build/checkouts/sqlite.git--4454338443970141452/Sources/SQLite/Codable/SQLiteDataDecoder.swift /Users/nice/HelloWord/.build/checkouts/sqlite.git--4454338443970141452/Sources/SQLite/Codable/SQLiteRowDecoder.swift /Users/nice/HelloWord/.build/checkouts/sqlite.git--4454338443970141452/Sources/SQLite/Codable/SQLiteDataEncoder.swift /Users/nice/HelloWord/.build/checkouts/sqlite.git--4454338443970141452/Sources/SQLite/Utilities/SQLiteError.swift /Users/nice/HelloWord/.build/checkouts/sqlite.git--4454338443970141452/Sources/SQLite/Utilities/Exports.swift /Users/nice/HelloWord/.build/checkouts/sqlite.git--4454338443970141452/Sources/SQLite/Database/SQLiteStatement.swift /Users/nice/HelloWord/.build/checkouts/sqlite.git--4454338443970141452/Sources/SQLite/SQL/SQLiteDropIndex.swift /Users/nice/HelloWord/.build/checkouts/sqlite.git--4454338443970141452/Sources/SQLite/SQL/SQLitePrimaryKey.swift /Users/nice/HelloWord/.build/checkouts/sqlite.git--4454338443970141452/Sources/SQLite/SQL/SQLiteQuery.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Dispatch.apinotesc /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/ObjectiveC.swiftmodule /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/SQL.swiftmodule /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/NIO.swiftmodule /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/Async.swiftmodule /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/Service.swiftmodule /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/Core.swiftmodule /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/Debugging.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Dispatch.swiftmodule /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/COperatingSystem.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/CoreFoundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/CoreGraphics.swiftmodule /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/NIOConcurrencyHelpers.swiftmodule /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/Bits.swiftmodule /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/NIOFoundationCompat.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/IOKit.swiftmodule /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/DatabaseKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/SwiftOnoneSupport.swiftmodule /Users/nice/HelloWord/.build/checkouts/swift-nio.git-5005363973595484456/Sources/CNIOAtomics/include/cpp_magic.h /Users/nice/HelloWord/.build/checkouts/swift-nio.git-5005363973595484456/Sources/CNIODarwin/include/c_nio_darwin.h /Users/nice/HelloWord/.build/checkouts/swift-nio.git-5005363973595484456/Sources/CNIOAtomics/include/c-atomics.h /Users/nice/HelloWord/.build/checkouts/swift-nio.git-5005363973595484456/Sources/CNIOLinux/include/c_nio_linux.h /Users/nice/HelloWord/.build/checkouts/swift-nio-zlib-support.git--6556802241718767980/module.modulemap /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/CNIOSHA1.build/module.modulemap /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/CNIOOpenSSL.build/module.modulemap /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/CCryptoOpenSSL.build/module.modulemap /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/CNIOZlib.build/module.modulemap /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/CNIODarwin.build/module.modulemap /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/CNIOHTTPParser.build/module.modulemap /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/CNIOAtomics.build/module.modulemap /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/CNIOLinux.build/module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/ApplicationServices.framework/Headers/ApplicationServices.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Security.framework/Headers/Security.apinotes
/Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/SQLite.build/SQLiteFunction~partial.swiftdoc : /Users/nice/HelloWord/.build/checkouts/sqlite.git--4454338443970141452/Sources/SQLite/Row/SQLiteData.swift /Users/nice/HelloWord/.build/checkouts/sqlite.git--4454338443970141452/Sources/SQLite/SQL/SQLiteGeneric.swift /Users/nice/HelloWord/.build/checkouts/sqlite.git--4454338443970141452/Sources/SQLite/Utilities/Deprecated.swift /Users/nice/HelloWord/.build/checkouts/sqlite.git--4454338443970141452/Sources/SQLite/SQL/SQLiteBind.swift /Users/nice/HelloWord/.build/checkouts/sqlite.git--4454338443970141452/Sources/SQLite/Database/SQLiteStorage.swift /Users/nice/HelloWord/.build/checkouts/sqlite.git--4454338443970141452/Sources/SQLite/SQL/SQLiteCreateTable.swift /Users/nice/HelloWord/.build/checkouts/sqlite.git--4454338443970141452/Sources/SQLite/SQL/SQLiteTable.swift /Users/nice/HelloWord/.build/checkouts/sqlite.git--4454338443970141452/Sources/SQLite/SQL/SQLiteAlterTable.swift /Users/nice/HelloWord/.build/checkouts/sqlite.git--4454338443970141452/Sources/SQLite/SQL/SQLiteDataTypeStaticRepresentable.swift /Users/nice/HelloWord/.build/checkouts/sqlite.git--4454338443970141452/Sources/SQLite/SQL/SQLiteQueryExpressionRepresentable.swift /Users/nice/HelloWord/.build/checkouts/sqlite.git--4454338443970141452/Sources/SQLite/Row/SQLiteDataConvertible.swift /Users/nice/HelloWord/.build/checkouts/sqlite.git--4454338443970141452/Sources/SQLite/Row/SQLiteDataType.swift /Users/nice/HelloWord/.build/checkouts/sqlite.git--4454338443970141452/Sources/SQLite/Database/SQLiteDatabase.swift /Users/nice/HelloWord/.build/checkouts/sqlite.git--4454338443970141452/Sources/SQLite/Database/DatabaseIdentifier+SQLite.swift /Users/nice/HelloWord/.build/checkouts/sqlite.git--4454338443970141452/Sources/SQLite/SQL/SQLiteBoolLiteral.swift /Users/nice/HelloWord/.build/checkouts/sqlite.git--4454338443970141452/Sources/SQLite/SQL/SQLiteDefaultLiteral.swift /Users/nice/HelloWord/.build/checkouts/sqlite.git--4454338443970141452/Sources/SQLite/Row/SQLiteColumn.swift /Users/nice/HelloWord/.build/checkouts/sqlite.git--4454338443970141452/Sources/SQLite/SQL/SQLiteCollation.swift /Users/nice/HelloWord/.build/checkouts/sqlite.git--4454338443970141452/Sources/SQLite/Database/SQLiteConnection.swift /Users/nice/HelloWord/.build/checkouts/sqlite.git--4454338443970141452/Sources/SQLite/SQL/SQLiteFunction.swift /Users/nice/HelloWord/.build/checkouts/sqlite.git--4454338443970141452/Sources/SQLite/SQL/SQLiteAlterTableBuilder.swift /Users/nice/HelloWord/.build/checkouts/sqlite.git--4454338443970141452/Sources/SQLite/Codable/SQLiteDataDecoder.swift /Users/nice/HelloWord/.build/checkouts/sqlite.git--4454338443970141452/Sources/SQLite/Codable/SQLiteRowDecoder.swift /Users/nice/HelloWord/.build/checkouts/sqlite.git--4454338443970141452/Sources/SQLite/Codable/SQLiteDataEncoder.swift /Users/nice/HelloWord/.build/checkouts/sqlite.git--4454338443970141452/Sources/SQLite/Utilities/SQLiteError.swift /Users/nice/HelloWord/.build/checkouts/sqlite.git--4454338443970141452/Sources/SQLite/Utilities/Exports.swift /Users/nice/HelloWord/.build/checkouts/sqlite.git--4454338443970141452/Sources/SQLite/Database/SQLiteStatement.swift /Users/nice/HelloWord/.build/checkouts/sqlite.git--4454338443970141452/Sources/SQLite/SQL/SQLiteDropIndex.swift /Users/nice/HelloWord/.build/checkouts/sqlite.git--4454338443970141452/Sources/SQLite/SQL/SQLitePrimaryKey.swift /Users/nice/HelloWord/.build/checkouts/sqlite.git--4454338443970141452/Sources/SQLite/SQL/SQLiteQuery.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Dispatch.apinotesc /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/ObjectiveC.swiftmodule /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/SQL.swiftmodule /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/NIO.swiftmodule /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/Async.swiftmodule /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/Service.swiftmodule /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/Core.swiftmodule /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/Debugging.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Dispatch.swiftmodule /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/COperatingSystem.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/CoreFoundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/CoreGraphics.swiftmodule /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/NIOConcurrencyHelpers.swiftmodule /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/Bits.swiftmodule /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/NIOFoundationCompat.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/IOKit.swiftmodule /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/DatabaseKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/SwiftOnoneSupport.swiftmodule /Users/nice/HelloWord/.build/checkouts/swift-nio.git-5005363973595484456/Sources/CNIOAtomics/include/cpp_magic.h /Users/nice/HelloWord/.build/checkouts/swift-nio.git-5005363973595484456/Sources/CNIODarwin/include/c_nio_darwin.h /Users/nice/HelloWord/.build/checkouts/swift-nio.git-5005363973595484456/Sources/CNIOAtomics/include/c-atomics.h /Users/nice/HelloWord/.build/checkouts/swift-nio.git-5005363973595484456/Sources/CNIOLinux/include/c_nio_linux.h /Users/nice/HelloWord/.build/checkouts/swift-nio-zlib-support.git--6556802241718767980/module.modulemap /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/CNIOSHA1.build/module.modulemap /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/CNIOOpenSSL.build/module.modulemap /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/CCryptoOpenSSL.build/module.modulemap /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/CNIOZlib.build/module.modulemap /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/CNIODarwin.build/module.modulemap /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/CNIOHTTPParser.build/module.modulemap /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/CNIOAtomics.build/module.modulemap /Users/nice/HelloWord/.build/x86_64-apple-macosx10.10/debug/CNIOLinux.build/module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/ApplicationServices.framework/Headers/ApplicationServices.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Security.framework/Headers/Security.apinotes
|
D
|
/* THIS FILE GENERATED BY bcd.gen */
module bcd.fltk2.LabelType;
align(4):
public import bcd.bind;
public import bcd.fltk2.FL_API;
public import bcd.fltk2.Rectangle;
public import bcd.fltk2.Flags;
extern (C) void _BCD_delete_N4fltk13EngravedLabelE(void *);
extern (C) void _BCD__ZNK4fltk13EngravedLabel4drawEPKcRKNS_9RectangleEi(void *This, char *, void *, int);
extern (C) void *_BCD_new__ZN4fltk13EngravedLabelC1EPKcPA3_Ki(char *, int [3] *);
extern (C) void _BCD_RI_N4fltk13EngravedLabelE(void *cd, void *dd);
extern (C) void _BCD_delete_N4fltk13EngravedLabelE__EngravedLabel_R(void *This);
extern (C) int _BCD_R__ZNK4fltk9LabelType4drawEPKcRKNS_9RectangleEi__EngravedLabel_R_CHECK(EngravedLabel_R x) {
union dp {
void delegate(char *, Rectangle, int) d;
struct { void *o; void *f; }
}
dp d; d.d = &x.draw;
return cast(int) (d.f != &EngravedLabel.draw);
}
extern (C) void _BCD_R__ZNK4fltk9LabelType4drawEPKcRKNS_9RectangleEi__EngravedLabel_R(EngravedLabel_R __D_class, char * _0, void *_1, int _2) {
__D_class.draw(_0, cast(Rectangle) new Rectangle(cast(ifloat) 0, _1), _2);
}
extern (C) void *_BCD_new__ZN4fltk13EngravedLabelC1EPKcPA3_Ki_R(char *, int [3] *);
extern (C) void _BCD_delete_N4fltk9LabelTypeE(void *);
extern (C) void _BCD_set__ZN4fltk9LabelType4nameE(void *, char *);
extern (C) char * _BCD_get__ZN4fltk9LabelType4nameE(void *);
extern (C) void _BCD_set__ZN4fltk9LabelType4nextE(void *, LabelType *);
extern (C) LabelType * _BCD_get__ZN4fltk9LabelType4nextE(void *);
extern (C) void _BCD_set__ZN4fltk9LabelType5firstE(void *, LabelType *);
extern (C) LabelType * _BCD_get__ZN4fltk9LabelType5firstE(void *);
extern (C) void _BCD__ZNK4fltk9LabelType4drawEPKcRKNS_9RectangleEi(void *This, char *, void *, int);
extern (C) void *_BCD_new__ZN4fltk9LabelTypeC1EPKc(char *);
extern (C) LabelType * _BCD__ZN4fltk9LabelType4findEPKc(char *);
extern (C) void _BCD_RI_N4fltk9LabelTypeE(void *cd, void *dd);
extern (C) void _BCD_delete_N4fltk9LabelTypeE__LabelType_R(void *This);
extern (C) int _BCD_R__ZNK4fltk9LabelType4drawEPKcRKNS_9RectangleEi__LabelType_R_CHECK(LabelType_R x) {
union dp {
void delegate(char *, Rectangle, int) d;
struct { void *o; void *f; }
}
dp d; d.d = &x.draw;
return cast(int) (d.f != &LabelType.draw);
}
extern (C) void _BCD_R__ZNK4fltk9LabelType4drawEPKcRKNS_9RectangleEi__LabelType_R(LabelType_R __D_class, char * _0, void *_1, int _2) {
__D_class.draw(_0, cast(Rectangle) new Rectangle(cast(ifloat) 0, _1), _2);
}
extern (C) void *_BCD_new__ZN4fltk9LabelTypeC1EPKc_R(char *);
class EngravedLabel : LabelType {
this(ifloat ignore) {
super(ignore);
}
this(ifloat ignore, void *x) {
super(ignore);
__C_data = x;
__C_data_owned = false;
}
~this() {
if (__C_data && __C_data_owned) _BCD_delete_N4fltk13EngravedLabelE(__C_data);
__C_data = null;
}
void draw(char * _0, Rectangle _1, int _2) {
_BCD__ZNK4fltk13EngravedLabel4drawEPKcRKNS_9RectangleEi(__C_data, _0, _1.__C_data, _2);
}
this(char * n, int [3] * p) {
super(cast(ifloat) 0);
__C_data = _BCD_new__ZN4fltk13EngravedLabelC1EPKcPA3_Ki(n, p);
__C_data_owned = true;
}
}
class EngravedLabel_R : EngravedLabel {
~this() {
if (__C_data && __C_data_owned) _BCD_delete_N4fltk13EngravedLabelE__EngravedLabel_R(__C_data);
__C_data = null;
}
this(char * n, int [3] * p) {
super(cast(ifloat) 0);
__C_data = _BCD_new__ZN4fltk13EngravedLabelC1EPKcPA3_Ki_R(n, p);
__C_data_owned = true;
_BCD_RI_N4fltk13EngravedLabelE(__C_data, cast(void *) this);
}
}
class LabelType : bcd.bind.BoundClass {
this(ifloat ignore) {
super(ignore);
}
this(ifloat ignore, void *x) {
super(ignore);
__C_data = x;
__C_data_owned = false;
}
~this() {
if (__C_data && __C_data_owned) _BCD_delete_N4fltk9LabelTypeE(__C_data);
__C_data = null;
}
void set_name(char * x) {
_BCD_set__ZN4fltk9LabelType4nameE(__C_data, x);
}
char * get_name() {
return _BCD_get__ZN4fltk9LabelType4nameE(__C_data);
}
void set_next(LabelType * x) {
_BCD_set__ZN4fltk9LabelType4nextE(__C_data, x);
}
LabelType * get_next() {
return _BCD_get__ZN4fltk9LabelType4nextE(__C_data);
}
void set_first(LabelType * x) {
_BCD_set__ZN4fltk9LabelType5firstE(__C_data, x);
}
LabelType * get_first() {
return _BCD_get__ZN4fltk9LabelType5firstE(__C_data);
}
void draw(char * _0, Rectangle _1, int _2) {
_BCD__ZNK4fltk9LabelType4drawEPKcRKNS_9RectangleEi(__C_data, _0, _1.__C_data, _2);
}
this(char * n) {
super(cast(ifloat) 0);
__C_data = _BCD_new__ZN4fltk9LabelTypeC1EPKc(n);
__C_data_owned = true;
}
static LabelType * find(char * name) {
return _BCD__ZN4fltk9LabelType4findEPKc(name);
}
}
class LabelType_R : LabelType {
~this() {
if (__C_data && __C_data_owned) _BCD_delete_N4fltk9LabelTypeE__LabelType_R(__C_data);
__C_data = null;
}
this(char * n) {
super(cast(ifloat) 0);
__C_data = _BCD_new__ZN4fltk9LabelTypeC1EPKc_R(n);
__C_data_owned = true;
_BCD_RI_N4fltk9LabelTypeE(__C_data, cast(void *) this);
}
}
|
D
|
module common;
void printChildren(T)(auto ref T cursorOrTU) {
import clang: TranslationUnit, Cursor;
import std.traits: Unqual;
static if(is(Unqual!T == TranslationUnit) || is(Unqual!T == Cursor)) {
import unit_threaded.io: writelnUt;
import std.algorithm: map;
import std.array: join;
import std.conv: text;
static if(is(Unqual!T == TranslationUnit))
const children = cursorOrTU.cursor.children;
else
const children = cursorOrTU.children;
writelnUt("\n", cursorOrTU, " children:\n[\n", children.map!(a => text(" ", a)).join(",\n"));
writelnUt("]\n");
}
}
void shouldMatch(T, K)(T obj, in K kind, in string spelling, in string file = __FILE__, in size_t line = __LINE__) {
import unit_threaded;
static assert(is(K == T.Kind));
obj.kind.shouldEqual(kind, file, line);
obj.spelling.shouldEqual(spelling, file, line);
}
|
D
|
import std.stdio;
import std.array;
import std.string;
import std.conv;
import std.algorithm;
import std.typecons;
import std.range;
void main() {
string[] input = readln().split;
int N = input[0].to!int();
int M = input[1].to!int();
Tuple!(int, int, int)[] iis = new Tuple!(int, int, int)[M];
for (int i = 0; i < M; i++) {
input = readln().split;
iis[i] = tuple(input[0].to!int, input[1].to!int, input[2].to!int);
}
int m1 = 0;
int m2;
foreach (p; iota(N).permutations){
m2 = 0;
for (int i = 0; i < M; i++)
if (p[iis[i][0]] < p[iis[i][1]])
m2 += iis[i][2];
if (m2 > m1)
m1 = m2;
}
writeln(m1);
}
|
D
|
/home/cypher/Desktop/solana_NFT/smart_contracts/nft-vault/target/rls/debug/deps/constant_time_eq-336b298ec9b56704.rmeta: /home/cypher/.cargo/registry/src/github.com-1ecc6299db9ec823/constant_time_eq-0.1.5/src/lib.rs
/home/cypher/Desktop/solana_NFT/smart_contracts/nft-vault/target/rls/debug/deps/constant_time_eq-336b298ec9b56704.d: /home/cypher/.cargo/registry/src/github.com-1ecc6299db9ec823/constant_time_eq-0.1.5/src/lib.rs
/home/cypher/.cargo/registry/src/github.com-1ecc6299db9ec823/constant_time_eq-0.1.5/src/lib.rs:
|
D
|
/+
+ ┌==============================┐
+ │ AUTO GENERATED! DO NOT EDIT! │
+ └==============================┘
+/
module bgfx;
import bindbc.bgfx.config;
import bindbc.common.types: va_list;
static import bgfx.fakeenum;
enum uint apiVersion = 121;
alias ViewID = ushort;
deprecated("Please use `ViewID` instead.") alias ViewId = ushort;
enum invalidHandle(T) = T(ushort.max);
alias ReleaseFn = void function(void* ptr, void* userData);
///Memory release callback.
///Color RGB/alpha/depth write. When it's not specified write will be disabled.
alias StateWrite_ = ulong;
enum StateWrite: StateWrite_{
r = 0x0000_0000_0000_0001, ///Enable R write.
g = 0x0000_0000_0000_0002, ///Enable G write.
b = 0x0000_0000_0000_0004, ///Enable B write.
a = 0x0000_0000_0000_0008, ///Enable alpha write.
z = 0x0000_0040_0000_0000, ///Enable depth write.
rgb = 0x0000_0000_0000_0007, ///Enable RGB write.
mask = 0x0000_0040_0000_000F, ///Write all channels mask.
}
///Depth test state. When `BGFX_STATE_DEPTH_` is not specified depth test will be disabled.
alias StateDepthTest_ = ulong;
enum StateDepthTest: StateDepthTest_{
less = 0x0000_0000_0000_0010, ///Enable depth test, less.
lEqual = 0x0000_0000_0000_0020, ///Enable depth test, less or equal.
equal = 0x0000_0000_0000_0030, ///Enable depth test, equal.
gEqual = 0x0000_0000_0000_0040, ///Enable depth test, greater or equal.
greater = 0x0000_0000_0000_0050, ///Enable depth test, greater.
notEqual = 0x0000_0000_0000_0060, ///Enable depth test, not equal.
never = 0x0000_0000_0000_0070, ///Enable depth test, never.
always = 0x0000_0000_0000_0080, ///Enable depth test, always.
shift = 4, ///Depth test state bit shift
mask = 0x0000_0000_0000_00F0, ///Depth test state bit mask
}
/**
Use BGFX_STATE_BLEND_FUNC(_src, _dst) or BGFX_STATE_BLEND_FUNC_SEPARATE(_srcRGB, _dstRGB, _srcA, _dstA)
helper macros.
*/
alias StateBlend_ = ulong;
enum StateBlend: StateBlend_{
zero = 0x0000_0000_0000_1000, ///0, 0, 0, 0
one = 0x0000_0000_0000_2000, ///1, 1, 1, 1
srcColor = 0x0000_0000_0000_3000, ///Rs, Gs, Bs, As
srcColour = srcColor,
invSrcColor = 0x0000_0000_0000_4000, ///1-Rs, 1-Gs, 1-Bs, 1-As
invSrcColour = invSrcColor,
srcAlpha = 0x0000_0000_0000_5000, ///As, As, As, As
invSrcAlpha = 0x0000_0000_0000_6000, ///1-As, 1-As, 1-As, 1-As
dstAlpha = 0x0000_0000_0000_7000, ///Ad, Ad, Ad, Ad
invDstAlpha = 0x0000_0000_0000_8000, ///1-Ad, 1-Ad, 1-Ad ,1-Ad
dstColor = 0x0000_0000_0000_9000, ///Rd, Gd, Bd, Ad
dstColour = dstColor,
invDstColor = 0x0000_0000_0000_A000, ///1-Rd, 1-Gd, 1-Bd, 1-Ad
invDstColour = invDstColor,
srcAlphaSat = 0x0000_0000_0000_B000, ///f, f, f, 1; f = min(As, 1-Ad)
factor = 0x0000_0000_0000_C000, ///Blend factor
invFactor = 0x0000_0000_0000_D000, ///1-Blend factor
shift = 12, ///Blend state bit shift
mask = 0x0000_0000_0FFF_F000, ///Blend state bit mask
}
/**
Use BGFX_STATE_BLEND_EQUATION(_equation) or BGFX_STATE_BLEND_EQUATION_SEPARATE(_equationRGB, _equationA)
helper macros.
*/
alias StateBlendEquation_ = ulong;
enum StateBlendEquation: StateBlendEquation_{
add = 0x0000_0000_0000_0000, ///Blend add: src + dst.
sub = 0x0000_0000_1000_0000, ///Blend subtract: src - dst.
revSub = 0x0000_0000_2000_0000, ///Blend reverse subtract: dst - src.
min = 0x0000_0000_3000_0000, ///Blend min: min(src, dst).
max = 0x0000_0000_4000_0000, ///Blend max: max(src, dst).
shift = 28, ///Blend equation bit shift
mask = 0x0000_0003_F000_0000, ///Blend equation bit mask
}
///Cull state. When `BGFX_STATE_CULL_*` is not specified culling will be disabled.
alias StateCull_ = ulong;
enum StateCull: StateCull_{
cw = 0x0000_0010_0000_0000, ///Cull clockwise triangles.
ccw = 0x0000_0020_0000_0000, ///Cull counter-clockwise triangles.
acw = ccw,
shift = 36, ///Culling mode bit shift
mask = 0x0000_0030_0000_0000, ///Culling mode bit mask
}
///Alpha reference value.
alias StateAlphaRef_ = ulong;
enum StateAlphaRef: StateAlphaRef_{
shift = 40, ///Alpha reference bit shift
mask = 0x0000_FF00_0000_0000, ///Alpha reference bit mask
}
StateAlphaRef_ toStateAlphaRef(ulong v){ return (v << StateAlphaRef.shift) & StateAlphaRef.mask; }
alias StatePT_ = ulong;
enum StatePT: StatePT_{
triStrip = 0x0001_0000_0000_0000, ///Tristrip.
lines = 0x0002_0000_0000_0000, ///Lines.
lineStrip = 0x0003_0000_0000_0000, ///Line strip.
points = 0x0004_0000_0000_0000, ///Points.
shift = 48, ///Primitive type bit shift
mask = 0x0007_0000_0000_0000, ///Primitive type bit mask
}
///Point size value.
alias StatePointSize_ = ulong;
enum StatePointSize: StatePointSize_{
shift = 52, ///Point size bit shift
mask = 0x00F0_0000_0000_0000, ///Point size bit mask
}
StatePointSize_ toStatePointSize(ulong v){ return (v << StatePointSize.shift) & StatePointSize.mask; }
/**
Enable MSAA write when writing into MSAA frame buffer.
This flag is ignored when not writing into MSAA frame buffer.
*/
alias State_ = ulong;
enum State: State_{
msaa = 0x0100_0000_0000_0000, ///Enable MSAA rasterization.
lineAA = 0x0200_0000_0000_0000, ///Enable line AA rasterization.
conservativeRaster = 0x0400_0000_0000_0000, ///Enable conservative rasterization.
none = 0x0000_0000_0000_0000, ///No state.
frontCCW = 0x0000_0080_0000_0000, ///Front counter-clockwise (default is clockwise).
frontACW = frontCCW,
blendIndependent = 0x0000_0004_0000_0000, ///Enable blend independent.
blendAlphaToCoverage = 0x0000_0008_0000_0000, ///Enable alpha to coverage.
/**
Default state is write to RGB, alpha, and depth with depth test less enabled, with clockwise
culling and MSAA (when writing into MSAA frame buffer, otherwise this flag is ignored).
*/
default_ = StateWrite.rgb | StateWrite.a | StateWrite.z | StateDepthTest.less | StateCull.cw | State.msaa,
mask = 0xFFFF_FFFF_FFFF_FFFF, ///State bit mask
}
///Do not use!
alias StateReserved_ = ulong;
enum StateReserved: StateReserved_{
shift = 61,
mask = 0xE000_0000_0000_0000,
}
///Set stencil ref value.
alias StencilFuncRef_ = uint;
enum StencilFuncRef: StencilFuncRef_{
shift = 0,
mask = 0x0000_00FF,
}
StencilFuncRef_ toStencilFuncRef(uint v){ return (v << StencilFuncRef.shift) & StencilFuncRef.mask; }
///Set stencil rmask value.
alias StencilFuncRmask_ = uint;
enum StencilFuncRmask: StencilFuncRmask_{
shift = 8,
mask = 0x0000_FF00,
}
StencilFuncRmask_ toStencilFuncRmask(uint v){ return (v << StencilFuncRmask.shift) & StencilFuncRmask.mask; }
alias Stencil_ = uint;
enum Stencil: Stencil_{
none = 0x0000_0000,
mask = 0xFFFF_FFFF,
default_ = 0x0000_0000,
}
alias StencilTest_ = uint;
enum StencilTest: StencilTest_{
less = 0x0001_0000, ///Enable stencil test, less.
lEqual = 0x0002_0000, ///Enable stencil test, less or equal.
equal = 0x0003_0000, ///Enable stencil test, equal.
gEqual = 0x0004_0000, ///Enable stencil test, greater or equal.
greater = 0x0005_0000, ///Enable stencil test, greater.
notEqual = 0x0006_0000, ///Enable stencil test, not equal.
never = 0x0007_0000, ///Enable stencil test, never.
always = 0x0008_0000, ///Enable stencil test, always.
shift = 16, ///Stencil test bit shift
mask = 0x000F_0000, ///Stencil test bit mask
}
alias StencilOpFailS_ = uint;
enum StencilOpFailS: StencilOpFailS_{
zero = 0x0000_0000, ///Zero.
keep = 0x0010_0000, ///Keep.
replace = 0x0020_0000, ///Replace.
incr = 0x0030_0000, ///Increment and wrap.
incrSat = 0x0040_0000, ///Increment and clamp.
decr = 0x0050_0000, ///Decrement and wrap.
decrSat = 0x0060_0000, ///Decrement and clamp.
invert = 0x0070_0000, ///Invert.
shift = 20, ///Stencil operation fail bit shift
mask = 0x00F0_0000, ///Stencil operation fail bit mask
}
alias StencilOpFailZ_ = uint;
enum StencilOpFailZ: StencilOpFailZ_{
zero = 0x0000_0000, ///Zero.
keep = 0x0100_0000, ///Keep.
replace = 0x0200_0000, ///Replace.
incr = 0x0300_0000, ///Increment and wrap.
incrSat = 0x0400_0000, ///Increment and clamp.
decr = 0x0500_0000, ///Decrement and wrap.
decrSat = 0x0600_0000, ///Decrement and clamp.
invert = 0x0700_0000, ///Invert.
shift = 24, ///Stencil operation depth fail bit shift
mask = 0x0F00_0000, ///Stencil operation depth fail bit mask
}
alias StencilOpPassZ_ = uint;
enum StencilOpPassZ: StencilOpPassZ_{
zero = 0x0000_0000, ///Zero.
keep = 0x1000_0000, ///Keep.
replace = 0x2000_0000, ///Replace.
incr = 0x3000_0000, ///Increment and wrap.
incrSat = 0x4000_0000, ///Increment and clamp.
decr = 0x5000_0000, ///Decrement and wrap.
decrSat = 0x6000_0000, ///Decrement and clamp.
invert = 0x7000_0000, ///Invert.
shift = 28, ///Stencil operation depth pass bit shift
mask = 0xF000_0000, ///Stencil operation depth pass bit mask
}
alias Clear_ = ushort;
enum Clear: Clear_{
none = 0x0000, ///No clear flags.
color = 0x0001, ///Clear color.
colour = color,
depth = 0x0002, ///Clear depth.
stencil = 0x0004, ///Clear stencil.
discardColor0 = 0x0008, ///Discard frame buffer attachment 0.
discardColour0 = discardColor0,
discardColor1 = 0x0010, ///Discard frame buffer attachment 1.
discardColour1 = discardColor1,
discardColor2 = 0x0020, ///Discard frame buffer attachment 2.
discardColour2 = discardColor2,
discardColor3 = 0x0040, ///Discard frame buffer attachment 3.
discardColour3 = discardColor3,
discardColor4 = 0x0080, ///Discard frame buffer attachment 4.
discardColour4 = discardColor4,
discardColor5 = 0x0100, ///Discard frame buffer attachment 5.
discardColour5 = discardColor5,
discardColor6 = 0x0200, ///Discard frame buffer attachment 6.
discardColour6 = discardColor6,
discardColor7 = 0x0400, ///Discard frame buffer attachment 7.
discardColour7 = discardColor7,
discardDepth = 0x0800, ///Discard frame buffer depth attachment.
discardStencil = 0x1000, ///Discard frame buffer stencil attachment.
discardColorMask = 0x07F8,
discardColourMask = discardColorMask,
discardMask = 0x1FF8,
}
/**
Rendering state discard. When state is preserved in submit, rendering states can be discarded
on a finer grain.
*/
alias Discard_ = ubyte;
enum Discard: Discard_{
none = 0x00, ///Preserve everything.
bindings = 0x01, ///Discard texture sampler and buffer bindings.
indexBuffer = 0x02, ///Discard index buffer.
instanceData = 0x04, ///Discard instance data.
state = 0x08, ///Discard state and uniform bindings.
transform = 0x10, ///Discard transform.
vertexStreams = 0x20, ///Discard vertex streams.
all = 0xFF, ///Discard all states.
}
alias Debug_ = uint;
enum Debug: Debug_{
none = 0x0000_0000, ///No debug.
wireframe = 0x0000_0001, ///Enable wireframe for all primitives.
/**
Enable infinitely fast hardware test. No draw calls will be submitted to driver.
It's useful when profiling to quickly assess bottleneck between CPU and GPU.
*/
ifh = 0x0000_0002,
stats = 0x0000_0004, ///Enable statistics display.
text = 0x0000_0008, ///Enable debug text display.
profiler = 0x0000_0010, ///Enable profiler. This causes per-view statistics to be collected, available through `bgfx::Stats::ViewStats`. This is unrelated to the profiler functions in `bgfx::CallbackI`.
}
alias BufferComputeFormat_ = ushort;
enum BufferComputeFormat: BufferComputeFormat_{
_8x1 = 0x0001, ///1 8-bit value
_8x2 = 0x0002, ///2 8-bit values
_8x4 = 0x0003, ///4 8-bit values
_16x1 = 0x0004, ///1 16-bit value
_16x2 = 0x0005, ///2 16-bit values
_16x4 = 0x0006, ///4 16-bit values
_32x1 = 0x0007, ///1 32-bit value
_32x2 = 0x0008, ///2 32-bit values
_32x4 = 0x0009, ///4 32-bit values
shift = 0,
mask = 0x000F,
}
alias BufferComputeType_ = ushort;
enum BufferComputeType: BufferComputeType_{
int_ = 0x0010, ///Type `int`.
uint_ = 0x0020, ///Type `uint`.
float_ = 0x0030, ///Type `float`.
shift = 4,
mask = 0x0030,
}
alias Buffer_ = ushort;
enum Buffer: Buffer_{
none = 0x0000,
computeRead = 0x0100, ///Buffer will be read by shader.
computeWrite = 0x0200, ///Buffer will be used for writing.
drawIndirect = 0x0400, ///Buffer will be used for storing draw indirect commands.
allowResize = 0x0800, ///Allow dynamic index/vertex buffer resize during update.
index32 = 0x1000, ///Index buffer contains 32-bit indices.
computeReadWrite = 0x0300,
}
alias Texture_ = ulong;
enum Texture: Texture_{
none = 0x0000_0000_0000_0000,
msaaSample = 0x0000_0008_0000_0000, ///Texture will be used for MSAA sampling.
rt = 0x0000_0010_0000_0000, ///Render target no MSAA.
computeWrite = 0x0000_1000_0000_0000, ///Texture will be used for compute write.
srgb = 0x0000_2000_0000_0000, ///Sample texture as sRGB.
blitDst = 0x0000_4000_0000_0000, ///Texture will be used as blit destination.
readBack = 0x0000_8000_0000_0000, ///Texture will be used for read back from GPU.
}
alias TextureRTMSAA_ = ulong;
enum TextureRTMSAA: TextureRTMSAA_{
x2 = 0x0000_0020_0000_0000, ///Render target MSAAx2 mode.
x4 = 0x0000_0030_0000_0000, ///Render target MSAAx4 mode.
x8 = 0x0000_0040_0000_0000, ///Render target MSAAx8 mode.
x16 = 0x0000_0050_0000_0000, ///Render target MSAAx16 mode.
shift = 36,
mask = 0x0000_0070_0000_0000,
}
alias TextureRT_ = ulong;
enum TextureRT: TextureRT_{
writeOnly = 0x0000_0080_0000_0000, ///Render target will be used for writing
shift = 36,
mask = 0x0000_00F0_0000_0000,
}
///Sampler flags.
alias SamplerU_ = uint;
enum SamplerU: SamplerU_{
mirror = 0x0000_0001, ///Wrap U mode: Mirror
clamp = 0x0000_0002, ///Wrap U mode: Clamp
border = 0x0000_0003, ///Wrap U mode: Border
shift = 0,
mask = 0x0000_0003,
}
alias SamplerV_ = uint;
enum SamplerV: SamplerV_{
mirror = 0x0000_0004, ///Wrap V mode: Mirror
clamp = 0x0000_0008, ///Wrap V mode: Clamp
border = 0x0000_000C, ///Wrap V mode: Border
shift = 2,
mask = 0x0000_000C,
}
alias SamplerW_ = uint;
enum SamplerW: SamplerW_{
mirror = 0x0000_0010, ///Wrap W mode: Mirror
clamp = 0x0000_0020, ///Wrap W mode: Clamp
border = 0x0000_0030, ///Wrap W mode: Border
shift = 4,
mask = 0x0000_0030,
}
alias SamplerMin_ = uint;
enum SamplerMin: SamplerMin_{
point = 0x0000_0040, ///Min sampling mode: Point
anisotropic = 0x0000_0080, ///Min sampling mode: Anisotropic
shift = 6,
mask = 0x0000_00C0,
}
alias SamplerMag_ = uint;
enum SamplerMag: SamplerMag_{
point = 0x0000_0100, ///Mag sampling mode: Point
anisotropic = 0x0000_0200, ///Mag sampling mode: Anisotropic
shift = 8,
mask = 0x0000_0300,
}
alias SamplerMIP_ = uint;
enum SamplerMIP: SamplerMIP_{
point = 0x0000_0400, ///Mip sampling mode: Point
shift = 10,
mask = 0x0000_0400,
}
alias SamplerCompare_ = uint;
enum SamplerCompare: SamplerCompare_{
less = 0x0001_0000, ///Compare when sampling depth texture: less.
lEqual = 0x0002_0000, ///Compare when sampling depth texture: less or equal.
equal = 0x0003_0000, ///Compare when sampling depth texture: equal.
gEqual = 0x0004_0000, ///Compare when sampling depth texture: greater or equal.
greater = 0x0005_0000, ///Compare when sampling depth texture: greater.
notEqual = 0x0006_0000, ///Compare when sampling depth texture: not equal.
never = 0x0007_0000, ///Compare when sampling depth texture: never.
always = 0x0008_0000, ///Compare when sampling depth texture: always.
shift = 16,
mask = 0x000F_0000,
}
alias SamplerBorderColor_ = uint;
enum SamplerBorderColor: SamplerBorderColor_{
shift = 24,
mask = 0x0F00_0000,
}
alias SamplerBorderColour = SamplerBorderColor;
SamplerBorderColor_ toSamplerBorderColor(uint v){ return (v << SamplerBorderColor.shift) & SamplerBorderColor.mask; }
alias toSamplerBorderColour = toSamplerBorderColor;
alias SamplerReserved_ = uint;
enum SamplerReserved: SamplerReserved_{
shift = 28,
mask = 0xF000_0000,
}
alias Sampler_ = uint;
enum Sampler: Sampler_{
none = 0x0000_0000,
sampleStencil = 0x0010_0000, ///Sample stencil instead of depth.
point = SamplerMin.point | SamplerMag.point | SamplerMIP.point,
uvwMirror = SamplerU.mirror | SamplerV.mirror | SamplerW.mirror,
uvwClamp = SamplerU.clamp | SamplerV.clamp | SamplerW.clamp,
uvwBorder = SamplerU.border | SamplerV.border | SamplerW.border,
bitsMask = SamplerU.mask | SamplerV.mask | SamplerW.mask | SamplerMin.mask | SamplerMag.mask | SamplerMIP.mask | SamplerCompare.mask,
}
alias ResetMSAA_ = uint;
enum ResetMSAA: ResetMSAA_{
x2 = 0x0000_0010, ///Enable 2x MSAA.
x4 = 0x0000_0020, ///Enable 4x MSAA.
x8 = 0x0000_0030, ///Enable 8x MSAA.
x16 = 0x0000_0040, ///Enable 16x MSAA.
shift = 4,
mask = 0x0000_0070,
}
alias Reset_ = uint;
enum Reset: Reset_{
none = 0x0000_0000, ///No reset flags.
fullscreen = 0x0000_0001, ///Not supported yet.
vsync = 0x0000_0080, ///Enable V-Sync.
maxAnisotropy = 0x0000_0100, ///Turn on/off max anisotropy.
capture = 0x0000_0200, ///Begin screen capture.
flushAfterRender = 0x0000_2000, ///Flush rendering after submitting to GPU.
/**
This flag specifies where flip occurs. Default behaviour is that flip occurs
before rendering new frame. This flag only has effect when `BGFX_CONFIG_MULTITHREADED=0`.
*/
flipAfterRender = 0x0000_4000,
srgbBackbuffer = 0x0000_8000, ///Enable sRGB backbuffer.
hdr10 = 0x0001_0000, ///Enable HDR10 rendering.
hiDPI = 0x0002_0000, ///Enable HiDPI rendering.
depthClamp = 0x0004_0000, ///Enable depth clamp.
suspend = 0x0008_0000, ///Suspend rendering.
transparentBackbuffer = 0x0010_0000, ///Transparent backbuffer. Availability depends on: `BGFX_CAPS_TRANSPARENT_BACKBUFFER`.
}
alias ResetFullscreen_ = uint;
enum ResetFullscreen: ResetFullscreen_{
shift = 0,
mask = 0x0000_0001,
}
alias ResetReserved_ = uint;
enum ResetReserved: ResetReserved_{
shift = 31, ///Internal bit shift
mask = 0x8000_0000, ///Internal bit mask
}
alias CapFlags_ = ulong;
enum CapFlags: CapFlags_{
alphaToCoverage = 0x0000_0000_0000_0001, ///Alpha to coverage is supported.
blendIndependent = 0x0000_0000_0000_0002, ///Blend independent is supported.
compute = 0x0000_0000_0000_0004, ///Compute shaders are supported.
conservativeRaster = 0x0000_0000_0000_0008, ///Conservative rasterization is supported.
drawIndirect = 0x0000_0000_0000_0010, ///Draw indirect is supported.
fragmentDepth = 0x0000_0000_0000_0020, ///Fragment depth is available in fragment shader.
fragmentOrdering = 0x0000_0000_0000_0040, ///Fragment ordering is available in fragment shader.
graphicsDebugger = 0x0000_0000_0000_0080, ///Graphics debugger is present.
hdr10 = 0x0000_0000_0000_0100, ///HDR10 rendering is supported.
hiDPI = 0x0000_0000_0000_0200, ///HiDPI rendering is supported.
imageRW = 0x0000_0000_0000_0400, ///Image Read/Write is supported.
index32 = 0x0000_0000_0000_0800, ///32-bit indices are supported.
instancing = 0x0000_0000_0000_1000, ///Instancing is supported.
occlusionQuery = 0x0000_0000_0000_2000, ///Occlusion query is supported.
rendererMultithreaded = 0x0000_0000_0000_4000, ///Renderer is on separate thread.
swapChain = 0x0000_0000_0000_8000, ///Multiple windows are supported.
texture2DArray = 0x0000_0000_0001_0000, ///2D texture array is supported.
texture3D = 0x0000_0000_0002_0000, ///3D textures are supported.
textureBlit = 0x0000_0000_0004_0000, ///Texture blit is supported.
transparentBackbuffer = 0x0000_0000_0008_0000, ///Transparent back buffer supported.
textureCompareReserved = 0x0000_0000_0010_0000,
textureCompareLEqual = 0x0000_0000_0020_0000, ///Texture compare less equal mode is supported.
textureCubeArray = 0x0000_0000_0040_0000, ///Cubemap texture array is supported.
textureDirectAccess = 0x0000_0000_0080_0000, ///CPU direct access to GPU texture memory.
textureReadBack = 0x0000_0000_0100_0000, ///Read-back texture is supported.
vertexAttribHalf = 0x0000_0000_0200_0000, ///Vertex attribute half-float is supported.
vertexAttribUint10 = 0x0000_0000_0400_0000, ///Vertex attribute 10_10_10_2 is supported.
vertexID = 0x0000_0000_0800_0000, ///Rendering with VertexID only is supported.
viewportLayerArray = 0x0000_0000_1000_0000, ///Viewport layer is available in vertex shader.
drawIndirectCount = 0x0000_0000_2000_0000, ///Draw indirect with indirect count is supported.
textureCompareAll = 0x0000_0000_0030_0000, ///All texture compare modes are supported.
}
alias CapsFormat_ = uint;
enum CapsFormat: CapsFormat_{
textureNone = 0x0000_0000, ///Texture format is not supported.
texture2D = 0x0000_0001, ///Texture format is supported.
texture2DSRGB = 0x0000_0002, ///Texture as sRGB format is supported.
texture2DEmulated = 0x0000_0004, ///Texture format is emulated.
texture3D = 0x0000_0008, ///Texture format is supported.
texture3DSRGB = 0x0000_0010, ///Texture as sRGB format is supported.
texture3DEmulated = 0x0000_0020, ///Texture format is emulated.
textureCube = 0x0000_0040, ///Texture format is supported.
textureCubeSRGB = 0x0000_0080, ///Texture as sRGB format is supported.
textureCubeEmulated = 0x0000_0100, ///Texture format is emulated.
textureVertex = 0x0000_0200, ///Texture format can be used from vertex shader.
textureImageRead = 0x0000_0400, ///Texture format can be used as image and read from.
textureImageWrite = 0x0000_0800, ///Texture format can be used as image and written to.
textureFramebuffer = 0x0000_1000, ///Texture format can be used as frame buffer.
textureFramebufferMSAA = 0x0000_2000, ///Texture format can be used as MSAA frame buffer.
textureMSAA = 0x0000_4000, ///Texture can be sampled as MSAA.
textureMIPAutogen = 0x0000_8000, ///Texture format supports auto-generated mips.
}
alias Resolve_ = ubyte;
enum Resolve: Resolve_{
none = 0x00, ///No resolve flags.
autoGenMIPs = 0x01, ///Auto-generate mip maps on resolve.
}
alias PCIID_ = ushort;
enum PCIID: PCIID_{
none = 0x0000, ///Autoselect adapter.
softwareRasterizer = 0x0001, ///Software rasterizer.
softwareRasteriser = softwareRasterizer,
amd = 0x1002, ///AMD adapter.
apple = 0x106B, ///Apple adapter.
intel = 0x8086, ///Intel adapter.
nvidia = 0x10DE, ///nVidia adapter.
microsoft = 0x1414, ///Microsoft adapter.
arm = 0x13B5, ///ARM adapter.
}
alias CubeMap_ = ubyte;
enum CubeMap: CubeMap_{
positiveX = 0x00, ///Cubemap +x.
negativeX = 0x01, ///Cubemap -x.
positiveY = 0x02, ///Cubemap +y.
negativeY = 0x03, ///Cubemap -y.
positiveZ = 0x04, ///Cubemap +z.
negativeZ = 0x05, ///Cubemap -z.
}
///Fatal error enum.
enum Fatal: bgfx.fakeenum.Fatal.Enum{
debugCheck = bgfx.fakeenum.Fatal.Enum.debugCheck,
invalidShader = bgfx.fakeenum.Fatal.Enum.invalidShader,
unableToInitialize = bgfx.fakeenum.Fatal.Enum.unableToInitialize,
unableToInitialise = bgfx.fakeenum.Fatal.Enum.unableToInitialize,
unableToCreateTexture = bgfx.fakeenum.Fatal.Enum.unableToCreateTexture,
deviceLost = bgfx.fakeenum.Fatal.Enum.deviceLost,
count = bgfx.fakeenum.Fatal.Enum.count,
}
///Renderer backend type enum.
enum RendererType: bgfx.fakeenum.RendererType.Enum{
noop = bgfx.fakeenum.RendererType.Enum.noop,
agc = bgfx.fakeenum.RendererType.Enum.agc,
direct3D9 = bgfx.fakeenum.RendererType.Enum.direct3D9,
direct3D11 = bgfx.fakeenum.RendererType.Enum.direct3D11,
direct3D12 = bgfx.fakeenum.RendererType.Enum.direct3D12,
gnm = bgfx.fakeenum.RendererType.Enum.gnm,
metal = bgfx.fakeenum.RendererType.Enum.metal,
nvn = bgfx.fakeenum.RendererType.Enum.nvn,
openGLES = bgfx.fakeenum.RendererType.Enum.openGLES,
openGL = bgfx.fakeenum.RendererType.Enum.openGL,
vulkan = bgfx.fakeenum.RendererType.Enum.vulkan,
webGPU = bgfx.fakeenum.RendererType.Enum.webGPU,
count = bgfx.fakeenum.RendererType.Enum.count,
}
///Access mode enum.
enum Access: bgfx.fakeenum.Access.Enum{
read = bgfx.fakeenum.Access.Enum.read,
write = bgfx.fakeenum.Access.Enum.write,
readWrite = bgfx.fakeenum.Access.Enum.readWrite,
count = bgfx.fakeenum.Access.Enum.count,
}
///Vertex attribute enum.
enum Attrib: bgfx.fakeenum.Attrib.Enum{
position = bgfx.fakeenum.Attrib.Enum.position,
normal = bgfx.fakeenum.Attrib.Enum.normal,
tangent = bgfx.fakeenum.Attrib.Enum.tangent,
bitangent = bgfx.fakeenum.Attrib.Enum.bitangent,
color0 = bgfx.fakeenum.Attrib.Enum.color0,
colour0 = bgfx.fakeenum.Attrib.Enum.color0,
color1 = bgfx.fakeenum.Attrib.Enum.color1,
colour1 = bgfx.fakeenum.Attrib.Enum.color1,
color2 = bgfx.fakeenum.Attrib.Enum.color2,
colour2 = bgfx.fakeenum.Attrib.Enum.color2,
color3 = bgfx.fakeenum.Attrib.Enum.color3,
colour3 = bgfx.fakeenum.Attrib.Enum.color3,
indices = bgfx.fakeenum.Attrib.Enum.indices,
weight = bgfx.fakeenum.Attrib.Enum.weight,
texCoord0 = bgfx.fakeenum.Attrib.Enum.texCoord0,
texCoord1 = bgfx.fakeenum.Attrib.Enum.texCoord1,
texCoord2 = bgfx.fakeenum.Attrib.Enum.texCoord2,
texCoord3 = bgfx.fakeenum.Attrib.Enum.texCoord3,
texCoord4 = bgfx.fakeenum.Attrib.Enum.texCoord4,
texCoord5 = bgfx.fakeenum.Attrib.Enum.texCoord5,
texCoord6 = bgfx.fakeenum.Attrib.Enum.texCoord6,
texCoord7 = bgfx.fakeenum.Attrib.Enum.texCoord7,
count = bgfx.fakeenum.Attrib.Enum.count,
}
///Vertex attribute type enum.
enum AttribType: bgfx.fakeenum.AttribType.Enum{
uint8 = bgfx.fakeenum.AttribType.Enum.uint8,
uint10 = bgfx.fakeenum.AttribType.Enum.uint10,
int16 = bgfx.fakeenum.AttribType.Enum.int16,
half = bgfx.fakeenum.AttribType.Enum.half,
float_ = bgfx.fakeenum.AttribType.Enum.float_,
count = bgfx.fakeenum.AttribType.Enum.count,
}
/**
Texture format enum.
Notation:
RGBA16S
^ ^ ^
| | +-- [ ]Unorm
| | [F]loat
| | [S]norm
| | [I]nt
| | [U]int
| +---- Number of bits per component
+-------- Components
@attention Availability depends on Caps (see: formats).
*/
enum TextureFormat: bgfx.fakeenum.TextureFormat.Enum{
bc1 = bgfx.fakeenum.TextureFormat.Enum.bc1,
bc2 = bgfx.fakeenum.TextureFormat.Enum.bc2,
bc3 = bgfx.fakeenum.TextureFormat.Enum.bc3,
bc4 = bgfx.fakeenum.TextureFormat.Enum.bc4,
bc5 = bgfx.fakeenum.TextureFormat.Enum.bc5,
bc6h = bgfx.fakeenum.TextureFormat.Enum.bc6h,
bc7 = bgfx.fakeenum.TextureFormat.Enum.bc7,
etc1 = bgfx.fakeenum.TextureFormat.Enum.etc1,
etc2 = bgfx.fakeenum.TextureFormat.Enum.etc2,
etc2a = bgfx.fakeenum.TextureFormat.Enum.etc2a,
etc2a1 = bgfx.fakeenum.TextureFormat.Enum.etc2a1,
ptc12 = bgfx.fakeenum.TextureFormat.Enum.ptc12,
ptc14 = bgfx.fakeenum.TextureFormat.Enum.ptc14,
ptc12a = bgfx.fakeenum.TextureFormat.Enum.ptc12a,
ptc14a = bgfx.fakeenum.TextureFormat.Enum.ptc14a,
ptc22 = bgfx.fakeenum.TextureFormat.Enum.ptc22,
ptc24 = bgfx.fakeenum.TextureFormat.Enum.ptc24,
atc = bgfx.fakeenum.TextureFormat.Enum.atc,
atce = bgfx.fakeenum.TextureFormat.Enum.atce,
atci = bgfx.fakeenum.TextureFormat.Enum.atci,
astc4x4 = bgfx.fakeenum.TextureFormat.Enum.astc4x4,
astc5x4 = bgfx.fakeenum.TextureFormat.Enum.astc5x4,
astc5x5 = bgfx.fakeenum.TextureFormat.Enum.astc5x5,
astc6x5 = bgfx.fakeenum.TextureFormat.Enum.astc6x5,
astc6x6 = bgfx.fakeenum.TextureFormat.Enum.astc6x6,
astc8x5 = bgfx.fakeenum.TextureFormat.Enum.astc8x5,
astc8x6 = bgfx.fakeenum.TextureFormat.Enum.astc8x6,
astc8x8 = bgfx.fakeenum.TextureFormat.Enum.astc8x8,
astc10x5 = bgfx.fakeenum.TextureFormat.Enum.astc10x5,
astc10x6 = bgfx.fakeenum.TextureFormat.Enum.astc10x6,
astc10x8 = bgfx.fakeenum.TextureFormat.Enum.astc10x8,
astc10x10 = bgfx.fakeenum.TextureFormat.Enum.astc10x10,
astc12x10 = bgfx.fakeenum.TextureFormat.Enum.astc12x10,
astc12x12 = bgfx.fakeenum.TextureFormat.Enum.astc12x12,
unknown = bgfx.fakeenum.TextureFormat.Enum.unknown,
r1 = bgfx.fakeenum.TextureFormat.Enum.r1,
a8 = bgfx.fakeenum.TextureFormat.Enum.a8,
r8 = bgfx.fakeenum.TextureFormat.Enum.r8,
r8i = bgfx.fakeenum.TextureFormat.Enum.r8i,
r8u = bgfx.fakeenum.TextureFormat.Enum.r8u,
r8s = bgfx.fakeenum.TextureFormat.Enum.r8s,
r16 = bgfx.fakeenum.TextureFormat.Enum.r16,
r16i = bgfx.fakeenum.TextureFormat.Enum.r16i,
r16u = bgfx.fakeenum.TextureFormat.Enum.r16u,
r16f = bgfx.fakeenum.TextureFormat.Enum.r16f,
r16s = bgfx.fakeenum.TextureFormat.Enum.r16s,
r32i = bgfx.fakeenum.TextureFormat.Enum.r32i,
r32u = bgfx.fakeenum.TextureFormat.Enum.r32u,
r32f = bgfx.fakeenum.TextureFormat.Enum.r32f,
rg8 = bgfx.fakeenum.TextureFormat.Enum.rg8,
rg8i = bgfx.fakeenum.TextureFormat.Enum.rg8i,
rg8u = bgfx.fakeenum.TextureFormat.Enum.rg8u,
rg8s = bgfx.fakeenum.TextureFormat.Enum.rg8s,
rg16 = bgfx.fakeenum.TextureFormat.Enum.rg16,
rg16i = bgfx.fakeenum.TextureFormat.Enum.rg16i,
rg16u = bgfx.fakeenum.TextureFormat.Enum.rg16u,
rg16f = bgfx.fakeenum.TextureFormat.Enum.rg16f,
rg16s = bgfx.fakeenum.TextureFormat.Enum.rg16s,
rg32i = bgfx.fakeenum.TextureFormat.Enum.rg32i,
rg32u = bgfx.fakeenum.TextureFormat.Enum.rg32u,
rg32f = bgfx.fakeenum.TextureFormat.Enum.rg32f,
rgb8 = bgfx.fakeenum.TextureFormat.Enum.rgb8,
rgb8i = bgfx.fakeenum.TextureFormat.Enum.rgb8i,
rgb8u = bgfx.fakeenum.TextureFormat.Enum.rgb8u,
rgb8s = bgfx.fakeenum.TextureFormat.Enum.rgb8s,
rgb9e5f = bgfx.fakeenum.TextureFormat.Enum.rgb9e5f,
bgra8 = bgfx.fakeenum.TextureFormat.Enum.bgra8,
rgba8 = bgfx.fakeenum.TextureFormat.Enum.rgba8,
rgba8i = bgfx.fakeenum.TextureFormat.Enum.rgba8i,
rgba8u = bgfx.fakeenum.TextureFormat.Enum.rgba8u,
rgba8s = bgfx.fakeenum.TextureFormat.Enum.rgba8s,
rgba16 = bgfx.fakeenum.TextureFormat.Enum.rgba16,
rgba16i = bgfx.fakeenum.TextureFormat.Enum.rgba16i,
rgba16u = bgfx.fakeenum.TextureFormat.Enum.rgba16u,
rgba16f = bgfx.fakeenum.TextureFormat.Enum.rgba16f,
rgba16s = bgfx.fakeenum.TextureFormat.Enum.rgba16s,
rgba32i = bgfx.fakeenum.TextureFormat.Enum.rgba32i,
rgba32u = bgfx.fakeenum.TextureFormat.Enum.rgba32u,
rgba32f = bgfx.fakeenum.TextureFormat.Enum.rgba32f,
b5g6r5 = bgfx.fakeenum.TextureFormat.Enum.b5g6r5,
r5g6b5 = bgfx.fakeenum.TextureFormat.Enum.r5g6b5,
bgra4 = bgfx.fakeenum.TextureFormat.Enum.bgra4,
rgba4 = bgfx.fakeenum.TextureFormat.Enum.rgba4,
bgr5a1 = bgfx.fakeenum.TextureFormat.Enum.bgr5a1,
rgb5a1 = bgfx.fakeenum.TextureFormat.Enum.rgb5a1,
rgb10a2 = bgfx.fakeenum.TextureFormat.Enum.rgb10a2,
rg11b10f = bgfx.fakeenum.TextureFormat.Enum.rg11b10f,
unknownDepth = bgfx.fakeenum.TextureFormat.Enum.unknownDepth,
d16 = bgfx.fakeenum.TextureFormat.Enum.d16,
d24 = bgfx.fakeenum.TextureFormat.Enum.d24,
d24s8 = bgfx.fakeenum.TextureFormat.Enum.d24s8,
d32 = bgfx.fakeenum.TextureFormat.Enum.d32,
d16f = bgfx.fakeenum.TextureFormat.Enum.d16f,
d24f = bgfx.fakeenum.TextureFormat.Enum.d24f,
d32f = bgfx.fakeenum.TextureFormat.Enum.d32f,
d0s8 = bgfx.fakeenum.TextureFormat.Enum.d0s8,
count = bgfx.fakeenum.TextureFormat.Enum.count,
}
///Uniform type enum.
enum UniformType: bgfx.fakeenum.UniformType.Enum{
sampler = bgfx.fakeenum.UniformType.Enum.sampler,
end = bgfx.fakeenum.UniformType.Enum.end,
vec4 = bgfx.fakeenum.UniformType.Enum.vec4,
mat3 = bgfx.fakeenum.UniformType.Enum.mat3,
mat4 = bgfx.fakeenum.UniformType.Enum.mat4,
count = bgfx.fakeenum.UniformType.Enum.count,
}
///Backbuffer ratio enum.
enum BackbufferRatio: bgfx.fakeenum.BackbufferRatio.Enum{
equal = bgfx.fakeenum.BackbufferRatio.Enum.equal,
half = bgfx.fakeenum.BackbufferRatio.Enum.half,
quarter = bgfx.fakeenum.BackbufferRatio.Enum.quarter,
eighth = bgfx.fakeenum.BackbufferRatio.Enum.eighth,
sixteenth = bgfx.fakeenum.BackbufferRatio.Enum.sixteenth,
double_ = bgfx.fakeenum.BackbufferRatio.Enum.double_,
count = bgfx.fakeenum.BackbufferRatio.Enum.count,
}
///Occlusion query result.
enum OcclusionQueryResult: bgfx.fakeenum.OcclusionQueryResult.Enum{
invisible = bgfx.fakeenum.OcclusionQueryResult.Enum.invisible,
visible = bgfx.fakeenum.OcclusionQueryResult.Enum.visible,
noResult = bgfx.fakeenum.OcclusionQueryResult.Enum.noResult,
count = bgfx.fakeenum.OcclusionQueryResult.Enum.count,
}
///Primitive topology.
enum Topology: bgfx.fakeenum.Topology.Enum{
triList = bgfx.fakeenum.Topology.Enum.triList,
triStrip = bgfx.fakeenum.Topology.Enum.triStrip,
lineList = bgfx.fakeenum.Topology.Enum.lineList,
lineStrip = bgfx.fakeenum.Topology.Enum.lineStrip,
pointList = bgfx.fakeenum.Topology.Enum.pointList,
count = bgfx.fakeenum.Topology.Enum.count,
}
///Topology conversion function.
enum TopologyConvert: bgfx.fakeenum.TopologyConvert.Enum{
triListFlipWinding = bgfx.fakeenum.TopologyConvert.Enum.triListFlipWinding,
triStripFlipWinding = bgfx.fakeenum.TopologyConvert.Enum.triStripFlipWinding,
triListToLineList = bgfx.fakeenum.TopologyConvert.Enum.triListToLineList,
triStripToTriList = bgfx.fakeenum.TopologyConvert.Enum.triStripToTriList,
lineStripToLineList = bgfx.fakeenum.TopologyConvert.Enum.lineStripToLineList,
count = bgfx.fakeenum.TopologyConvert.Enum.count,
}
///Topology sort order.
enum TopologySort: bgfx.fakeenum.TopologySort.Enum{
directionFrontToBackMin = bgfx.fakeenum.TopologySort.Enum.directionFrontToBackMin,
directionFrontToBackAvg = bgfx.fakeenum.TopologySort.Enum.directionFrontToBackAvg,
directionFrontToBackMax = bgfx.fakeenum.TopologySort.Enum.directionFrontToBackMax,
directionBackToFrontMin = bgfx.fakeenum.TopologySort.Enum.directionBackToFrontMin,
directionBackToFrontAvg = bgfx.fakeenum.TopologySort.Enum.directionBackToFrontAvg,
directionBackToFrontMax = bgfx.fakeenum.TopologySort.Enum.directionBackToFrontMax,
distanceFrontToBackMin = bgfx.fakeenum.TopologySort.Enum.distanceFrontToBackMin,
distanceFrontToBackAvg = bgfx.fakeenum.TopologySort.Enum.distanceFrontToBackAvg,
distanceFrontToBackMax = bgfx.fakeenum.TopologySort.Enum.distanceFrontToBackMax,
distanceBackToFrontMin = bgfx.fakeenum.TopologySort.Enum.distanceBackToFrontMin,
distanceBackToFrontAvg = bgfx.fakeenum.TopologySort.Enum.distanceBackToFrontAvg,
distanceBackToFrontMax = bgfx.fakeenum.TopologySort.Enum.distanceBackToFrontMax,
count = bgfx.fakeenum.TopologySort.Enum.count,
}
///View mode sets draw call sort order.
enum ViewMode: bgfx.fakeenum.ViewMode.Enum{
default_ = bgfx.fakeenum.ViewMode.Enum.default_,
sequential = bgfx.fakeenum.ViewMode.Enum.sequential,
depthAscending = bgfx.fakeenum.ViewMode.Enum.depthAscending,
depthDescending = bgfx.fakeenum.ViewMode.Enum.depthDescending,
count = bgfx.fakeenum.ViewMode.Enum.count,
}
///Render frame enum.
enum RenderFrame: bgfx.fakeenum.RenderFrame.Enum{
noContext = bgfx.fakeenum.RenderFrame.Enum.noContext,
render = bgfx.fakeenum.RenderFrame.Enum.render,
timeout = bgfx.fakeenum.RenderFrame.Enum.timeout,
exiting = bgfx.fakeenum.RenderFrame.Enum.exiting,
count = bgfx.fakeenum.RenderFrame.Enum.count,
}
extern(C++, "bgfx") struct DynamicIndexBufferHandle{
ushort idx;
}
extern(C++, "bgfx") struct DynamicVertexBufferHandle{
ushort idx;
}
extern(C++, "bgfx") struct FrameBufferHandle{
ushort idx;
}
extern(C++, "bgfx") struct IndexBufferHandle{
ushort idx;
}
extern(C++, "bgfx") struct IndirectBufferHandle{
ushort idx;
}
extern(C++, "bgfx") struct OcclusionQueryHandle{
ushort idx;
}
extern(C++, "bgfx") struct ProgramHandle{
ushort idx;
}
extern(C++, "bgfx") struct ShaderHandle{
ushort idx;
}
extern(C++, "bgfx") struct TextureHandle{
ushort idx;
}
extern(C++, "bgfx") struct UniformHandle{
ushort idx;
}
extern(C++, "bgfx") struct VertexBufferHandle{
ushort idx;
}
extern(C++, "bgfx") struct VertexLayoutHandle{
ushort idx;
}
pragma(inline,true) nothrow @nogc pure @safe{
StateBlend_ blendFuncSeparate(StateBlend_ srcRGB, StateBlend_ dstRGB, StateBlend_ srcA, StateBlend_ dstA){
return (srcRGB | ((dstRGB) << 4)) | ((srcA | (dstA << 4)) << 8);
}
///Blend equation separate.
StateBlendEquation_ blendEquationSeparate(StateBlendEquation_ equationRGB, StateBlendEquation_ equationA){
return equationRGB | (equationA << 3);
}
///Blend function.
StateBlend_ blendFunc(StateBlend_ src, StateBlend_ dst){ return blendFuncSeparate(src, dst, src, dst); }
///Blend equation.
StateBlendEquation_ blendEquation(StateBlendEquation_ equation){ return blendEquationSeparate(equation, equation); }
///Utility predefined blend modes.
enum StateBlendFunc: StateBlend_{
///Additive blending.
add = blendFunc(StateBlend.one, StateBlend.one),
///Alpha blend.
alpha = blendFunc(StateBlend.srcAlpha, StateBlend.invSrcAlpha),
///Selects darker color of blend.
darken = blendFunc(StateBlend.one, StateBlend.one) | blendEquation(StateBlendEquation.min),
///Selects lighter color of blend.
lighten = blendFunc(StateBlend.one, StateBlend.one) | blendEquation(StateBlendEquation.max),
///Multiplies colors.
multiply = blendFunc(StateBlend.dstColor, StateBlend.zero),
///Opaque pixels will cover the pixels directly below them without any math or algorithm applied to them.
normal = blendFunc(StateBlend.one, StateBlend.invSrcAlpha),
///Multiplies the inverse of the blend and base colors.
screen = blendFunc(StateBlend.one, StateBlend.invSrcColor),
///Decreases the brightness of the base color based on the value of the blend color.
linearBurn = blendFunc(StateBlend.dstColor, StateBlend.invDstColor) | blendEquation(StateBlendEquation.sub),
}
StateBlend_ blendFuncRTx(StateBlend_ src, StateBlend_ dst){
return cast(uint)(src >> StateBlend.shift) | (cast(uint)(dst >> StateBlend.shift) << 4);
}
StateBlend_ blendFuncRTxE(StateBlend_ src, StateBlend_ dst, StateBlendEquation_ equation){
return blendFuncRTx(src, dst) | (cast(uint)(equation >> StateBlendEquation.shift) << 8);
}
StateBlend_ blendFuncRT1(StateBlend_ src, StateBlend_ dst){ return blendFuncRTx(src, dst) << 0; }
StateBlend_ blendFuncRT2(StateBlend_ src, StateBlend_ dst){ return blendFuncRTx(src, dst) << 11; }
StateBlend_ blendFuncRT3(StateBlend_ src, StateBlend_ dst){ return blendFuncRTx(src, dst) << 22; }
StateBlend_ blendFuncRT1E(StateBlend_ src, StateBlend_ dst, StateBlendEquation_ equation){
return blendFuncRTxE(src, dst, equation) << 0;
}
StateBlend_ blendFuncRT2E(StateBlend_ src, StateBlend_ dst, StateBlendEquation_ equation){
return blendFuncRTxE(src, dst, equation) << 11;
}
StateBlend_ blendFuncRT3E(StateBlend_ src, StateBlend_ dst, StateBlendEquation_ equation){
return blendFuncRTxE(src, dst, equation) << 22;
}
}
///Renderer capabilities.
extern(C++, "bgfx") struct Caps{
///GPU info.
extern(C++) struct GPU{
ushort vendorID; ///Vendor PCI id. See `BGFX_PCI_ID_*`.
ushort deviceID; ///Device id.
}
///Renderer runtime limits.
extern(C++) struct Limits{
uint maxDrawCalls; ///Maximum number of draw calls.
uint maxBlits; ///Maximum number of blit calls.
uint maxTextureSize; ///Maximum texture size.
uint maxTextureLayers; ///Maximum texture layers.
uint maxViews; ///Maximum number of views.
uint maxFrameBuffers; ///Maximum number of frame buffer handles.
uint maxFBAttachments; ///Maximum number of frame buffer attachments.
uint maxPrograms; ///Maximum number of program handles.
uint maxShaders; ///Maximum number of shader handles.
uint maxTextures; ///Maximum number of texture handles.
uint maxTextureSamplers; ///Maximum number of texture samplers.
uint maxComputeBindings; ///Maximum number of compute bindings.
uint maxVertexLayouts; ///Maximum number of vertex format layouts.
uint maxVertexStreams; ///Maximum number of vertex streams.
uint maxIndexBuffers; ///Maximum number of index buffer handles.
uint maxVertexBuffers; ///Maximum number of vertex buffer handles.
uint maxDynamicIndexBuffers; ///Maximum number of dynamic index buffer handles.
uint maxDynamicVertexBuffers; ///Maximum number of dynamic vertex buffer handles.
uint maxUniforms; ///Maximum number of uniform handles.
uint maxOcclusionQueries; ///Maximum number of occlusion query handles.
uint maxEncoders; ///Maximum number of encoder threads.
uint minResourceCBSize; ///Minimum resource command buffer size.
uint transientVBSize; ///Maximum transient vertex buffer size.
uint transientIBSize; ///Maximum transient index buffer size.
}
RendererType rendererType; ///Renderer backend type. See: `bgfx::RendererType`
/**
Supported functionality.
@attention See `BGFX_CAPS_*` flags at https://bkaradzic.github.io/bgfx/bgfx.html#available-caps
*/
ulong supported;
ushort vendorID; ///Selected GPU vendor PCI id.
ushort deviceID; ///Selected GPU device id.
bool homogeneousDepth; ///True when NDC depth is in [-1, 1] range, otherwise its [0, 1].
bool originBottomLeft; ///True when NDC origin is at bottom left.
ubyte numGPUs; ///Number of enumerated GPUs.
GPU[4] gpu; ///Enumerated GPUs.
Limits limits; ///Renderer runtime limits.
/**
Supported texture format capabilities flags:
- `BGFX_CAPS_FORMAT_TEXTURE_NONE` - Texture format is not supported.
- `BGFX_CAPS_FORMAT_TEXTURE_2D` - Texture format is supported.
- `BGFX_CAPS_FORMAT_TEXTURE_2D_SRGB` - Texture as sRGB format is supported.
- `BGFX_CAPS_FORMAT_TEXTURE_2D_EMULATED` - Texture format is emulated.
- `BGFX_CAPS_FORMAT_TEXTURE_3D` - Texture format is supported.
- `BGFX_CAPS_FORMAT_TEXTURE_3D_SRGB` - Texture as sRGB format is supported.
- `BGFX_CAPS_FORMAT_TEXTURE_3D_EMULATED` - Texture format is emulated.
- `BGFX_CAPS_FORMAT_TEXTURE_CUBE` - Texture format is supported.
- `BGFX_CAPS_FORMAT_TEXTURE_CUBE_SRGB` - Texture as sRGB format is supported.
- `BGFX_CAPS_FORMAT_TEXTURE_CUBE_EMULATED` - Texture format is emulated.
- `BGFX_CAPS_FORMAT_TEXTURE_VERTEX` - Texture format can be used from vertex shader.
- `BGFX_CAPS_FORMAT_TEXTURE_IMAGE_READ` - Texture format can be used as image
and read from.
- `BGFX_CAPS_FORMAT_TEXTURE_IMAGE_WRITE` - Texture format can be used as image
and written to.
- `BGFX_CAPS_FORMAT_TEXTURE_FRAMEBUFFER` - Texture format can be used as frame
buffer.
- `BGFX_CAPS_FORMAT_TEXTURE_FRAMEBUFFER_MSAA` - Texture format can be used as MSAA
frame buffer.
- `BGFX_CAPS_FORMAT_TEXTURE_MSAA` - Texture can be sampled as MSAA.
- `BGFX_CAPS_FORMAT_TEXTURE_MIP_AUTOGEN` - Texture format supports auto-generated
mips.
*/
ushort[TextureFormat.count] formats;
}
///Internal data.
extern(C++, "bgfx") struct InternalData{
const(Caps)* caps; ///Renderer capabilities.
void* context; ///GL context, or D3D device.
}
///Platform data.
extern(C++, "bgfx") struct PlatformData{
void* ndt; ///Native display type (*nix specific).
/**
Native window handle. If `NULL`, bgfx will create a headless
context/device, provided the rendering API supports it.
*/
void* nwh;
/**
GL context, D3D device, or Vulkan device. If `NULL`, bgfx
will create context/device.
*/
void* context;
/**
GL back-buffer, or D3D render target view. If `NULL` bgfx will
create back-buffer color surface.
*/
void* backBuffer;
/**
Backbuffer depth/stencil. If `NULL`, bgfx will create a back-buffer
depth/stencil surface.
*/
void* backBufferDS;
}
///Backbuffer resolution and reset parameters.
extern(C++, "bgfx") struct Resolution{
TextureFormat format; ///Backbuffer format.
uint width; ///Backbuffer width.
uint height; ///Backbuffer height.
uint reset; ///Reset parameters.
ubyte numBackBuffers; ///Number of back buffers.
ubyte maxFrameLatency; ///Maximum frame latency.
ubyte debugTextScale; ///Scale factor for debug text.
extern(D) mixin(joinFnBinds((){
string[][] ret;
ret ~= makeFnBinds([
[q{void}, q{this}, q{}, `C++`],
], true);
return ret;
}(), typeof(this).stringof));
}
///Initialization parameters used by `bgfx::init`.
extern(C++, "bgfx") struct Init{
///Configurable runtime limits parameters.
extern(C++) struct Limits{
ushort maxEncoders; ///Maximum number of encoder threads.
uint minResourceCBSize; ///Minimum resource command buffer size.
uint transientVBSize; ///Maximum transient vertex buffer size.
uint transientIBSize; ///Maximum transient index buffer size.
}
/**
Select rendering backend. When set to RendererType::Count
a default rendering backend will be selected appropriate to the platform.
See: `bgfx::RendererType`
*/
RendererType type;
/**
Vendor PCI ID. If set to `BGFX_PCI_ID_NONE`, discrete and integrated
GPUs will be prioritised.
- `BGFX_PCI_ID_NONE` - Autoselect adapter.
- `BGFX_PCI_ID_SOFTWARE_RASTERIZER` - Software rasterizer.
- `BGFX_PCI_ID_AMD` - AMD adapter.
- `BGFX_PCI_ID_APPLE` - Apple adapter.
- `BGFX_PCI_ID_INTEL` - Intel adapter.
- `BGFX_PCI_ID_NVIDIA` - NVIDIA adapter.
- `BGFX_PCI_ID_MICROSOFT` - Microsoft adapter.
*/
ushort vendorID;
/**
Device ID. If set to 0 it will select first device, or device with
matching ID.
*/
ushort deviceID;
ulong capabilities; ///Capabilities initialization mask (default: UINT64_MAX).
bool debug_; ///Enable device for debugging.
bool profile; ///Enable device for profiling.
PlatformData platformData; ///Platform data.
Resolution resolution; ///Backbuffer resolution and reset parameters. See: `bgfx::Resolution`.
Limits limits; ///Configurable runtime limits parameters.
/**
Provide application specific callback interface.
See: `bgfx::CallbackI`
*/
void* callback;
/**
Custom allocator. When a custom allocator is not
specified, bgfx uses the CRT allocator. Bgfx assumes
custom allocator is thread safe.
*/
void* allocator;
extern(D) mixin(joinFnBinds((){
string[][] ret;
ret ~= makeFnBinds([
[q{void}, q{this}, q{}, `C++`],
], true);
return ret;
}(), typeof(this).stringof));
}
/**
Memory must be obtained by calling `bgfx::alloc`, `bgfx::copy`, or `bgfx::makeRef`.
@attention It is illegal to create this structure on stack and pass it to any bgfx API.
*/
extern(C++, "bgfx") struct Memory{
ubyte* data; ///Pointer to data.
uint size; ///Data size.
}
///Transient index buffer.
extern(C++, "bgfx") struct TransientIndexBuffer{
ubyte* data; ///Pointer to data.
uint size; ///Data size.
uint startIndex; ///First index.
IndexBufferHandle handle; ///Index buffer handle.
bool isIndex16; ///Index buffer format is 16-bits if true, otherwise it is 32-bit.
}
///Transient vertex buffer.
extern(C++, "bgfx") struct TransientVertexBuffer{
ubyte* data; ///Pointer to data.
uint size; ///Data size.
uint startVertex; ///First vertex.
ushort stride; ///Vertex stride.
VertexBufferHandle handle; ///Vertex buffer handle.
VertexLayoutHandle layoutHandle; ///Vertex layout handle.
}
///Instance data buffer info.
extern(C++, "bgfx") struct InstanceDataBuffer{
ubyte* data; ///Pointer to data.
uint size; ///Data size.
uint offset; ///Offset in vertex buffer.
uint num; ///Number of instances.
ushort stride; ///Vertex buffer stride.
VertexBufferHandle handle; ///Vertex buffer object handle.
}
///Texture info.
extern(C++, "bgfx") struct TextureInfo{
TextureFormat format; ///Texture format.
uint storageSize; ///Total amount of bytes required to store texture.
ushort width; ///Texture width.
ushort height; ///Texture height.
ushort depth; ///Texture depth.
ushort numLayers; ///Number of layers in texture array.
ubyte numMIPs; ///Number of MIP maps.
ubyte bitsPerPixel; ///Format bits per pixel.
bool cubeMap; ///Texture is cubemap.
}
///Uniform info.
extern(C++, "bgfx") struct UniformInfo{
char[256] name; ///Uniform name.
UniformType type; ///Uniform type.
ushort num; ///Number of elements in array.
}
///Frame buffer texture attachment info.
extern(C++, "bgfx") struct Attachment{
Access access; ///Attachment access. See `Access::Enum`.
TextureHandle handle; ///Render target texture handle.
ushort mip; ///Mip level.
ushort layer; ///Cubemap side or depth layer/slice to use.
ushort numLayers; ///Number of texture layer/slice(s) in array to use.
ubyte resolve; ///Resolve flags. See: `BGFX_RESOLVE_*`
extern(D) mixin(joinFnBinds((){
string[][] ret;
ret ~= makeFnBinds([
/**
Init attachment.
Params:
handle = Render target texture handle.
access = Access. See `Access::Enum`.
layer = Cubemap side or depth layer/slice to use.
numLayers = Number of texture layer/slice(s) in array to use.
mip = Mip level.
resolve = Resolve flags. See: `BGFX_RESOLVE_*`
*/
[q{void}, q{init}, q{TextureHandle handle, bgfx.fakeenum.Access.Enum access=Access.write, ushort layer=0, ushort numLayers=1, ushort mip=0, ubyte resolve=Resolve.autoGenMIPs}, `C++`],
], true);
return ret;
}(), typeof(this).stringof));
}
///Transform data.
extern(C++, "bgfx") struct Transform{
float* data; ///Pointer to first 4x4 matrix.
ushort num; ///Number of matrices.
}
///View stats.
extern(C++, "bgfx") struct ViewStats{
char[256] name; ///View name.
ViewID view; ///View id.
long cpuTimeBegin; ///CPU (submit) begin time.
long cpuTimeEnd; ///CPU (submit) end time.
long gpuTimeBegin; ///GPU begin time.
long gpuTimeEnd; ///GPU end time.
uint gpuFrameNum; ///Frame which generated gpuTimeBegin, gpuTimeEnd.
}
///Encoder stats.
extern(C++, "bgfx") struct EncoderStats{
long cpuTimeBegin; ///Encoder thread CPU submit begin time.
long cpuTimeEnd; ///Encoder thread CPU submit end time.
}
/**
Renderer statistics data.
@remarks All time values are high-resolution timestamps, while
time frequencies define timestamps-per-second for that hardware.
*/
extern(C++, "bgfx") struct Stats{
long cpuTimeFrame; ///CPU time between two `bgfx::frame` calls.
long cpuTimeBegin; ///Render thread CPU submit begin time.
long cpuTimeEnd; ///Render thread CPU submit end time.
long cpuTimerFreq; ///CPU timer frequency. Timestamps-per-second
long gpuTimeBegin; ///GPU frame begin time.
long gpuTimeEnd; ///GPU frame end time.
long gpuTimerFreq; ///GPU timer frequency.
long waitRender; ///Time spent waiting for render backend thread to finish issuing draw commands to underlying graphics API.
long waitSubmit; ///Time spent waiting for submit thread to advance to next frame.
uint numDraw; ///Number of draw calls submitted.
uint numCompute; ///Number of compute calls submitted.
uint numBlit; ///Number of blit calls submitted.
uint maxGpuLatency; ///GPU driver latency.
uint gpuFrameNum; ///Frame which generated gpuTimeBegin, gpuTimeEnd.
ushort numDynamicIndexBuffers; ///Number of used dynamic index buffers.
ushort numDynamicVertexBuffers; ///Number of used dynamic vertex buffers.
ushort numFrameBuffers; ///Number of used frame buffers.
ushort numIndexBuffers; ///Number of used index buffers.
ushort numOcclusionQueries; ///Number of used occlusion queries.
ushort numPrograms; ///Number of used programs.
ushort numShaders; ///Number of used shaders.
ushort numTextures; ///Number of used textures.
ushort numUniforms; ///Number of used uniforms.
ushort numVertexBuffers; ///Number of used vertex buffers.
ushort numVertexLayouts; ///Number of used vertex layouts.
long textureMemoryUsed; ///Estimate of texture memory used.
long rtMemoryUsed; ///Estimate of render target memory used.
int transientVBUsed; ///Amount of transient vertex buffer used.
int transientIBUsed; ///Amount of transient index buffer used.
uint[Topology.count] numPrims; ///Number of primitives rendered.
long gpuMemoryMax; ///Maximum available GPU memory for application.
long gpuMemoryUsed; ///Amount of GPU memory used by the application.
ushort width; ///Backbuffer width in pixels.
ushort height; ///Backbuffer height in pixels.
ushort textWidth; ///Debug text width in characters.
ushort textHeight; ///Debug text height in characters.
ushort numViews; ///Number of view stats.
ViewStats* viewStats; ///Array of View stats.
ubyte numEncoders; ///Number of encoders used during frame.
EncoderStats* encoderStats; ///Array of encoder stats.
}
///Vertex layout.
extern(C++, "bgfx") struct VertexLayout{
uint hash; ///Hash.
ushort stride; ///Stride.
ushort[Attrib.count] offset; ///Attribute offsets.
ushort[Attrib.count] attributes; ///Used attributes.
extern(D) mixin(joinFnBinds((){
string[][] ret;
ret ~= makeFnBinds([
[q{void}, q{this}, q{}, `C++`],
/**
Start VertexLayout.
Params:
rendererType = Renderer backend type. See: `bgfx::RendererType`
*/
[q{VertexLayout*}, q{begin}, q{bgfx.fakeenum.RendererType.Enum rendererType=RendererType.noop}, `C++`],
/**
Add attribute to VertexLayout.
Remarks: Must be called between begin/end.
Params:
attrib = Attribute semantics. See: `bgfx::Attrib`
num = Number of elements 1, 2, 3 or 4.
type = Element type.
normalized = When using fixed point AttribType (f.e. Uint8)
value will be normalized for vertex shader usage. When normalized
is set to true, AttribType::Uint8 value in range 0-255 will be
in range 0.0-1.0 in vertex shader.
asInt = Packaging rule for vertexPack, vertexUnpack, and
vertexConvert for AttribType::Uint8 and AttribType::Int16.
Unpacking code must be implemented inside vertex shader.
*/
[q{VertexLayout*}, q{add}, q{bgfx.fakeenum.Attrib.Enum attrib, ubyte num, bgfx.fakeenum.AttribType.Enum type, bool normalized=false, bool asInt=false}, `C++`],
/**
Decode attribute.
Params:
attrib = Attribute semantics. See: `bgfx::Attrib`
num = Number of elements.
type = Element type.
normalized = Attribute is normalized.
asInt = Attribute is packed as int.
*/
[q{void}, q{decode}, q{bgfx.fakeenum.Attrib.Enum attrib, ref ubyte num, ref bgfx.fakeenum.AttribType.Enum type, ref bool normalized, ref bool asInt}, `C++`, q{const}],
/**
Skip `_num` bytes in vertex stream.
Params:
num = Number of bytes to skip.
*/
[q{VertexLayout*}, q{skip}, q{ubyte num}, `C++`],
/**
End VertexLayout.
*/
[q{void}, q{end}, q{}, `C++`],
], true);
return ret;
}(), typeof(this).stringof));
}
/**
Encoders are used for submitting draw calls from multiple threads. Only one encoder
per thread should be used. Use `bgfx::begin()` to obtain an encoder for a thread.
*/
extern(C++, "bgfx") struct Encoder{
extern(D) mixin(joinFnBinds((){
string[][] ret;
ret ~= makeFnBinds([
/**
Sets a debug marker. This allows you to group graphics calls together for easy browsing in
graphics debugging tools.
Params:
marker = Marker string.
*/
[q{void}, q{setMarker}, q{const(char)* marker}, `C++`],
/**
Set render states for draw primitive.
Remarks:
1. To set up more complex states use:
`BGFX_STATE_ALPHA_REF(_ref)`,
`BGFX_STATE_POINT_SIZE(_size)`,
`BGFX_STATE_BLEND_FUNC(_src, _dst)`,
`BGFX_STATE_BLEND_FUNC_SEPARATE(_srcRGB, _dstRGB, _srcA, _dstA)`,
`BGFX_STATE_BLEND_EQUATION(_equation)`,
`BGFX_STATE_BLEND_EQUATION_SEPARATE(_equationRGB, _equationA)`
2. `BGFX_STATE_BLEND_EQUATION_ADD` is set when no other blend
equation is specified.
Params:
state = State flags. Default state for primitive type is
triangles. See: `BGFX_STATE_DEFAULT`.
- `BGFX_STATE_DEPTH_TEST_*` - Depth test function.
- `BGFX_STATE_BLEND_*` - See remark 1 about BGFX_STATE_BLEND_FUNC.
- `BGFX_STATE_BLEND_EQUATION_*` - See remark 2.
- `BGFX_STATE_CULL_*` - Backface culling mode.
- `BGFX_STATE_WRITE_*` - Enable R, G, B, A or Z write.
- `BGFX_STATE_MSAA` - Enable hardware multisample antialiasing.
- `BGFX_STATE_PT_[TRISTRIP/LINES/POINTS]` - Primitive type.
rgba = Sets blend factor used by `BGFX_STATE_BLEND_FACTOR` and
`BGFX_STATE_BLEND_INV_FACTOR` blend modes.
*/
[q{void}, q{setState}, q{ulong state, uint rgba=0}, `C++`],
/**
Set condition for rendering.
Params:
handle = Occlusion query handle.
visible = Render if occlusion query is visible.
*/
[q{void}, q{setCondition}, q{OcclusionQueryHandle handle, bool visible}, `C++`],
/**
Set stencil test state.
Params:
fstencil = Front stencil state.
bstencil = Back stencil state. If back is set to `BGFX_STENCIL_NONE`
_fstencil is applied to both front and back facing primitives.
*/
[q{void}, q{setStencil}, q{uint fstencil, uint bstencil=Stencil.none}, `C++`],
/**
Set scissor for draw primitive.
Remarks:
To scissor for all primitives in view see `bgfx::setViewScissor`.
Params:
x = Position x from the left corner of the window.
y = Position y from the top corner of the window.
width = Width of view scissor region.
height = Height of view scissor region.
*/
[q{ushort}, q{setScissor}, q{ushort x, ushort y, ushort width, ushort height}, `C++`],
/**
Set scissor from cache for draw primitive.
Remarks:
To scissor for all primitives in view see `bgfx::setViewScissor`.
Params:
cache = Index in scissor cache.
*/
[q{void}, q{setScissor}, q{ushort cache=ushort.max}, `C++`],
/**
Set model matrix for draw primitive. If it is not called,
the model will be rendered with an identity model matrix.
Params:
mtx = Pointer to first matrix in array.
num = Number of matrices in array.
*/
[q{uint}, q{setTransform}, q{const(void)* mtx, ushort num=1}, `C++`],
/**
Set model matrix from matrix cache for draw primitive.
Params:
cache = Index in matrix cache.
num = Number of matrices from cache.
*/
[q{void}, q{setTransform}, q{uint cache, ushort num=1}, `C++`],
/**
Reserve matrices in internal matrix cache.
Attention: Pointer returned can be modified until `bgfx::frame` is called.
Params:
transform = Pointer to `Transform` structure.
num = Number of matrices.
*/
[q{uint}, q{allocTransform}, q{Transform* transform, ushort num}, `C++`],
/**
Set shader uniform parameter for draw primitive.
Params:
handle = Uniform.
value = Pointer to uniform data.
num = Number of elements. Passing `UINT16_MAX` will
use the _num passed on uniform creation.
*/
[q{void}, q{setUniform}, q{UniformHandle handle, const(void)* value, ushort num=1}, `C++`],
/**
Set index buffer for draw primitive.
Params:
handle = Index buffer.
*/
[q{void}, q{setIndexBuffer}, q{IndexBufferHandle handle}, `C++`],
/**
Set index buffer for draw primitive.
Params:
handle = Index buffer.
firstIndex = First index to render.
numIndices = Number of indices to render.
*/
[q{void}, q{setIndexBuffer}, q{IndexBufferHandle handle, uint firstIndex, uint numIndices}, `C++`],
/**
Set index buffer for draw primitive.
Params:
handle = Dynamic index buffer.
*/
[q{void}, q{setIndexBuffer}, q{DynamicIndexBufferHandle handle}, `C++`],
/**
Set index buffer for draw primitive.
Params:
handle = Dynamic index buffer.
firstIndex = First index to render.
numIndices = Number of indices to render.
*/
[q{void}, q{setIndexBuffer}, q{DynamicIndexBufferHandle handle, uint firstIndex, uint numIndices}, `C++`],
/**
Set index buffer for draw primitive.
Params:
tib = Transient index buffer.
*/
[q{void}, q{setIndexBuffer}, q{const(TransientIndexBuffer)* tib}, `C++`],
/**
Set index buffer for draw primitive.
Params:
tib = Transient index buffer.
firstIndex = First index to render.
numIndices = Number of indices to render.
*/
[q{void}, q{setIndexBuffer}, q{const(TransientIndexBuffer)* tib, uint firstIndex, uint numIndices}, `C++`],
/**
Set vertex buffer for draw primitive.
Params:
stream = Vertex stream.
handle = Vertex buffer.
*/
[q{void}, q{setVertexBuffer}, q{ubyte stream, VertexBufferHandle handle}, `C++`],
/**
Set vertex buffer for draw primitive.
Params:
stream = Vertex stream.
handle = Vertex buffer.
startVertex = First vertex to render.
numVertices = Number of vertices to render.
layoutHandle = Vertex layout for aliasing vertex buffer. If invalid
handle is used, vertex layout used for creation
of vertex buffer will be used.
*/
[q{void}, q{setVertexBuffer}, q{ubyte stream, VertexBufferHandle handle, uint startVertex, uint numVertices, VertexLayoutHandle layoutHandle=invalidHandle!VertexLayoutHandle}, `C++`],
/**
Set vertex buffer for draw primitive.
Params:
stream = Vertex stream.
handle = Dynamic vertex buffer.
*/
[q{void}, q{setVertexBuffer}, q{ubyte stream, DynamicVertexBufferHandle handle}, `C++`],
[q{void}, q{setVertexBuffer}, q{ubyte stream, DynamicVertexBufferHandle handle, uint startVertex, uint numVertices, VertexLayoutHandle layoutHandle=invalidHandle!VertexLayoutHandle}, `C++`],
/**
Set vertex buffer for draw primitive.
Params:
stream = Vertex stream.
tvb = Transient vertex buffer.
*/
[q{void}, q{setVertexBuffer}, q{ubyte stream, const(TransientVertexBuffer)* tvb}, `C++`],
/**
Set vertex buffer for draw primitive.
Params:
stream = Vertex stream.
tvb = Transient vertex buffer.
startVertex = First vertex to render.
numVertices = Number of vertices to render.
layoutHandle = Vertex layout for aliasing vertex buffer. If invalid
handle is used, vertex layout used for creation
of vertex buffer will be used.
*/
[q{void}, q{setVertexBuffer}, q{ubyte stream, const(TransientVertexBuffer)* tvb, uint startVertex, uint numVertices, VertexLayoutHandle layoutHandle=invalidHandle!VertexLayoutHandle}, `C++`],
/**
Set number of vertices for auto generated vertices use in conjunction
with gl_VertexID.
Attention: Availability depends on: `BGFX_CAPS_VERTEX_ID`.
Params:
numVertices = Number of vertices.
*/
[q{void}, q{setVertexCount}, q{uint numVertices}, `C++`],
/**
Set instance data buffer for draw primitive.
Params:
idb = Transient instance data buffer.
*/
[q{void}, q{setInstanceDataBuffer}, q{const(InstanceDataBuffer)* idb}, `C++`],
/**
Set instance data buffer for draw primitive.
Params:
idb = Transient instance data buffer.
start = First instance data.
num = Number of data instances.
*/
[q{void}, q{setInstanceDataBuffer}, q{const(InstanceDataBuffer)* idb, uint start, uint num}, `C++`],
/**
Set instance data buffer for draw primitive.
Params:
handle = Vertex buffer.
startVertex = First instance data.
num = Number of data instances.
*/
[q{void}, q{setInstanceDataBuffer}, q{VertexBufferHandle handle, uint startVertex, uint num}, `C++`],
/**
Set instance data buffer for draw primitive.
Params:
handle = Dynamic vertex buffer.
startVertex = First instance data.
num = Number of data instances.
*/
[q{void}, q{setInstanceDataBuffer}, q{DynamicVertexBufferHandle handle, uint startVertex, uint num}, `C++`],
/**
Set number of instances for auto generated instances use in conjunction
with gl_InstanceID.
Attention: Availability depends on: `BGFX_CAPS_VERTEX_ID`.
*/
[q{void}, q{setInstanceCount}, q{uint numInstances}, `C++`],
/**
Set texture stage for draw primitive.
Params:
stage = Texture unit.
sampler = Program sampler.
handle = Texture handle.
flags = Texture sampling mode. Default value UINT32_MAX uses
texture sampling settings from the texture.
- `BGFX_SAMPLER_[U/V/W]_[MIRROR/CLAMP]` - Mirror or clamp to edge wrap
mode.
- `BGFX_SAMPLER_[MIN/MAG/MIP]_[POINT/ANISOTROPIC]` - Point or anisotropic
sampling.
*/
[q{void}, q{setTexture}, q{ubyte stage, UniformHandle sampler, TextureHandle handle, uint flags=uint.max}, `C++`],
/**
Submit an empty primitive for rendering. Uniforms and draw state
will be applied but no geometry will be submitted. Useful in cases
when no other draw/compute primitive is submitted to view, but it's
desired to execute clear view.
Remarks:
These empty draw calls will sort before ordinary draw calls.
Params:
id = View id.
*/
[q{void}, q{touch}, q{ViewID id}, `C++`],
/**
Submit primitive for rendering.
Params:
id = View id.
program = Program.
depth = Depth for sorting.
flags = Discard or preserve states. See `BGFX_DISCARD_*`.
*/
[q{void}, q{submit}, q{ViewID id, ProgramHandle program, uint depth=0, ubyte flags=Discard.all}, `C++`],
/**
Submit primitive with occlusion query for rendering.
Params:
id = View id.
program = Program.
occlusionQuery = Occlusion query.
depth = Depth for sorting.
flags = Discard or preserve states. See `BGFX_DISCARD_*`.
*/
[q{void}, q{submit}, q{ViewID id, ProgramHandle program, OcclusionQueryHandle occlusionQuery, uint depth=0, ubyte flags=Discard.all}, `C++`],
/**
Submit primitive for rendering with index and instance data info from
indirect buffer.
Attention: Availability depends on: `BGFX_CAPS_DRAW_INDIRECT`.
Params:
id = View id.
program = Program.
indirectHandle = Indirect buffer.
start = First element in indirect buffer.
num = Number of draws.
depth = Depth for sorting.
flags = Discard or preserve states. See `BGFX_DISCARD_*`.
*/
[q{void}, q{submit}, q{ViewID id, ProgramHandle program, IndirectBufferHandle indirectHandle, ushort start=0, ushort num=1, uint depth=0, ubyte flags=Discard.all}, `C++`],
/**
Submit primitive for rendering with index and instance data info and
draw count from indirect buffers.
Attention: Availability depends on: `BGFX_CAPS_DRAW_INDIRECT_COUNT`.
Params:
id = View id.
program = Program.
indirectHandle = Indirect buffer.
start = First element in indirect buffer.
numHandle = Buffer for number of draws. Must be
created with `BGFX_BUFFER_INDEX32` and `BGFX_BUFFER_DRAW_INDIRECT`.
numIndex = Element in number buffer.
numMax = Max number of draws.
depth = Depth for sorting.
flags = Discard or preserve states. See `BGFX_DISCARD_*`.
*/
[q{void}, q{submit}, q{ViewID id, ProgramHandle program, IndirectBufferHandle indirectHandle, ushort start, IndexBufferHandle numHandle, uint numIndex=0, ushort numMax=ushort.max, uint depth=0, ubyte flags=Discard.all}, `C++`],
/**
Set compute index buffer.
Params:
stage = Compute stage.
handle = Index buffer handle.
access = Buffer access. See `Access::Enum`.
*/
[q{void}, q{setBuffer}, q{ubyte stage, IndexBufferHandle handle, bgfx.fakeenum.Access.Enum access}, `C++`],
/**
Set compute vertex buffer.
Params:
stage = Compute stage.
handle = Vertex buffer handle.
access = Buffer access. See `Access::Enum`.
*/
[q{void}, q{setBuffer}, q{ubyte stage, VertexBufferHandle handle, bgfx.fakeenum.Access.Enum access}, `C++`],
/**
Set compute dynamic index buffer.
Params:
stage = Compute stage.
handle = Dynamic index buffer handle.
access = Buffer access. See `Access::Enum`.
*/
[q{void}, q{setBuffer}, q{ubyte stage, DynamicIndexBufferHandle handle, bgfx.fakeenum.Access.Enum access}, `C++`],
/**
Set compute dynamic vertex buffer.
Params:
stage = Compute stage.
handle = Dynamic vertex buffer handle.
access = Buffer access. See `Access::Enum`.
*/
[q{void}, q{setBuffer}, q{ubyte stage, DynamicVertexBufferHandle handle, bgfx.fakeenum.Access.Enum access}, `C++`],
/**
Set compute indirect buffer.
Params:
stage = Compute stage.
handle = Indirect buffer handle.
access = Buffer access. See `Access::Enum`.
*/
[q{void}, q{setBuffer}, q{ubyte stage, IndirectBufferHandle handle, bgfx.fakeenum.Access.Enum access}, `C++`],
/**
Set compute image from texture.
Params:
stage = Compute stage.
handle = Texture handle.
mip = Mip level.
access = Image access. See `Access::Enum`.
format = Texture format. See: `TextureFormat::Enum`.
*/
[q{void}, q{setImage}, q{ubyte stage, TextureHandle handle, ubyte mip, bgfx.fakeenum.Access.Enum access, bgfx.fakeenum.TextureFormat.Enum format=TextureFormat.count}, `C++`],
/**
Dispatch compute.
Params:
id = View id.
program = Compute program.
numX = Number of groups X.
numY = Number of groups Y.
numZ = Number of groups Z.
flags = Discard or preserve states. See `BGFX_DISCARD_*`.
*/
[q{void}, q{dispatch}, q{ViewID id, ProgramHandle program, uint numX=1, uint numY=1, uint numZ=1, ubyte flags=Discard.all}, `C++`],
/**
Dispatch compute indirect.
Params:
id = View id.
program = Compute program.
indirectHandle = Indirect buffer.
start = First element in indirect buffer.
num = Number of dispatches.
flags = Discard or preserve states. See `BGFX_DISCARD_*`.
*/
[q{void}, q{dispatch}, q{ViewID id, ProgramHandle program, IndirectBufferHandle indirectHandle, ushort start=0, ushort num=1, ubyte flags=Discard.all}, `C++`],
/**
Discard previously set state for draw or compute call.
Params:
flags = Discard or preserve states. See `BGFX_DISCARD_*`.
*/
[q{void}, q{discard}, q{ubyte flags=Discard.all}, `C++`],
/**
Blit 2D texture region between two 2D textures.
Attention: Destination texture must be created with `BGFX_TEXTURE_BLIT_DST` flag.
Attention: Availability depends on: `BGFX_CAPS_TEXTURE_BLIT`.
Params:
id = View id.
dst = Destination texture handle.
dstX = Destination texture X position.
dstY = Destination texture Y position.
src = Source texture handle.
srcX = Source texture X position.
srcY = Source texture Y position.
width = Width of region.
height = Height of region.
*/
[q{void}, q{blit}, q{ViewID id, TextureHandle dst, ushort dstX, ushort dstY, TextureHandle src, ushort srcX=0, ushort srcY=0, ushort width=ushort.max, ushort height=ushort.max}, `C++`],
/**
Blit 2D texture region between two 2D textures.
Attention: Destination texture must be created with `BGFX_TEXTURE_BLIT_DST` flag.
Attention: Availability depends on: `BGFX_CAPS_TEXTURE_BLIT`.
Params:
id = View id.
dst = Destination texture handle.
dstMIP = Destination texture mip level.
dstX = Destination texture X position.
dstY = Destination texture Y position.
dstZ = If texture is 2D this argument should be 0. If destination texture is cube
this argument represents destination texture cube face. For 3D texture this argument
represents destination texture Z position.
src = Source texture handle.
srcMIP = Source texture mip level.
srcX = Source texture X position.
srcY = Source texture Y position.
srcZ = If texture is 2D this argument should be 0. If source texture is cube
this argument represents source texture cube face. For 3D texture this argument
represents source texture Z position.
width = Width of region.
height = Height of region.
depth = If texture is 3D this argument represents depth of region, otherwise it's
unused.
*/
[q{void}, q{blit}, q{ViewID id, TextureHandle dst, ubyte dstMIP, ushort dstX, ushort dstY, ushort dstZ, TextureHandle src, ubyte srcMIP=0, ushort srcX=0, ushort srcY=0, ushort srcZ=0, ushort width=ushort.max, ushort height=ushort.max, ushort depth=ushort.max}, `C++`],
], true);
return ret;
}(), typeof(this).stringof));
}
mixin(joinFnBinds((){
string[][] ret;
ret ~= makeFnBinds([
/**
* Pack vertex attribute into vertex stream format.
Params:
input = Value to be packed into vertex stream.
inputNormalized = `true` if input value is already normalized.
attr = Attribute to pack.
layout = Vertex stream layout.
data = Destination vertex stream where data will be packed.
index = Vertex index that will be modified.
*/
[q{void}, q{vertexPack}, q{const(float)* input, bool inputNormalized, bgfx.fakeenum.Attrib.Enum attr, ref const VertexLayout layout, void* data, uint index=0}, `C++, "bgfx"`],
/**
* Unpack vertex attribute from vertex stream format.
Params:
output = Result of unpacking.
attr = Attribute to unpack.
layout = Vertex stream layout.
data = Source vertex stream from where data will be unpacked.
index = Vertex index that will be unpacked.
*/
[q{void}, q{vertexUnpack}, q{float* output, bgfx.fakeenum.Attrib.Enum attr, ref const VertexLayout layout, const(void)* data, uint index=0}, `C++, "bgfx"`],
/**
* Converts vertex stream data from one vertex stream format to another.
Params:
dstLayout = Destination vertex stream layout.
dstData = Destination vertex stream.
srcLayout = Source vertex stream layout.
srcData = Source vertex stream data.
num = Number of vertices to convert from source to destination.
*/
[q{void}, q{vertexConvert}, q{ref const VertexLayout dstLayout, void* dstData, ref const VertexLayout srcLayout, const(void)* srcData, uint num=1}, `C++, "bgfx"`],
/**
* Weld vertices.
Params:
output = Welded vertices remapping table. The size of buffer
must be the same as number of vertices.
layout = Vertex stream layout.
data = Vertex stream.
num = Number of vertices in vertex stream.
index32 = Set to `true` if input indices are 32-bit.
epsilon = Error tolerance for vertex position comparison.
*/
[q{uint}, q{weldVertices}, q{void* output, ref const VertexLayout layout, const(void)* data, uint num, bool index32, float epsilon=0.001f}, `C++, "bgfx"`],
/**
* Convert index buffer for use with different primitive topologies.
Params:
conversion = Conversion type, see `TopologyConvert::Enum`.
dst = Destination index buffer. If this argument is NULL
function will return number of indices after conversion.
dstSize = Destination index buffer in bytes. It must be
large enough to contain output indices. If destination size is
insufficient index buffer will be truncated.
indices = Source indices.
numIndices = Number of input indices.
index32 = Set to `true` if input indices are 32-bit.
*/
[q{uint}, q{topologyConvert}, q{bgfx.fakeenum.TopologyConvert.Enum conversion, void* dst, uint dstSize, const(void)* indices, uint numIndices, bool index32}, `C++, "bgfx"`],
/**
* Sort indices.
Params:
sort = Sort order, see `TopologySort::Enum`.
dst = Destination index buffer.
dstSize = Destination index buffer in bytes. It must be
large enough to contain output indices. If destination size is
insufficient index buffer will be truncated.
dir = Direction (vector must be normalized).
pos = Position.
vertices = Pointer to first vertex represented as
float x, y, z. Must contain at least number of vertices
referencende by index buffer.
stride = Vertex stride.
indices = Source indices.
numIndices = Number of input indices.
index32 = Set to `true` if input indices are 32-bit.
*/
[q{void}, q{topologySortTriList}, q{bgfx.fakeenum.TopologySort.Enum sort, void* dst, uint dstSize, const(float)* dir, const(float)* pos, const(void)* vertices, uint stride, const(void)* indices, uint numIndices, bool index32}, `C++, "bgfx"`],
/**
* Returns supported backend API renderers.
Params:
max = Maximum number of elements in _enum array.
enum_ = Array where supported renderers will be written.
*/
[q{ubyte}, q{getSupportedRenderers}, q{ubyte max=0, bgfx.fakeenum.RendererType.Enum* enum_=null}, `C++, "bgfx"`],
/**
* Returns name of renderer.
Params:
type = Renderer backend type. See: `bgfx::RendererType`
*/
[q{const(char)*}, q{getRendererName}, q{bgfx.fakeenum.RendererType.Enum type}, `C++, "bgfx"`],
/**
* Initialize the bgfx library.
Params:
init = Initialization parameters. See: `bgfx::Init` for more info.
*/
[q{bool}, q{init}, q{ref const Init init}, `C++, "bgfx"`],
/**
* Shutdown bgfx library.
*/
[q{void}, q{shutdown}, q{}, `C++, "bgfx"`],
/**
* Reset graphic settings and back-buffer size.
* Attention: This call doesn’t change the window size, it just resizes
* the back-buffer. Your windowing code controls the window size.
Params:
width = Back-buffer width.
height = Back-buffer height.
flags = See: `BGFX_RESET_*` for more info.
- `BGFX_RESET_NONE` - No reset flags.
- `BGFX_RESET_FULLSCREEN` - Not supported yet.
- `BGFX_RESET_MSAA_X[2/4/8/16]` - Enable 2, 4, 8 or 16 x MSAA.
- `BGFX_RESET_VSYNC` - Enable V-Sync.
- `BGFX_RESET_MAXANISOTROPY` - Turn on/off max anisotropy.
- `BGFX_RESET_CAPTURE` - Begin screen capture.
- `BGFX_RESET_FLUSH_AFTER_RENDER` - Flush rendering after submitting to GPU.
- `BGFX_RESET_FLIP_AFTER_RENDER` - This flag specifies where flip
occurs. Default behaviour is that flip occurs before rendering new
frame. This flag only has effect when `BGFX_CONFIG_MULTITHREADED=0`.
- `BGFX_RESET_SRGB_BACKBUFFER` - Enable sRGB back-buffer.
format = Texture format. See: `TextureFormat::Enum`.
*/
[q{void}, q{reset}, q{uint width, uint height, uint flags=Reset.none, bgfx.fakeenum.TextureFormat.Enum format=TextureFormat.count}, `C++, "bgfx"`],
/**
* Advance to next frame. When using multithreaded renderer, this call
* just swaps internal buffers, kicks render thread, and returns. In
* singlethreaded renderer this call does frame rendering.
Params:
capture = Capture frame with graphics debugger.
*/
[q{uint}, q{frame}, q{bool capture=false}, `C++, "bgfx"`],
/**
* Returns current renderer backend API type.
* Remarks:
* Library must be initialized.
*/
[q{RendererType}, q{getRendererType}, q{}, `C++, "bgfx"`],
/**
* Returns renderer capabilities.
* Remarks:
* Library must be initialized.
*/
[q{const(Caps)*}, q{getCaps}, q{}, `C++, "bgfx"`],
/**
* Returns performance counters.
* Attention: Pointer returned is valid until `bgfx::frame` is called.
*/
[q{const(Stats)*}, q{getStats}, q{}, `C++, "bgfx"`],
/**
* Allocate buffer to pass to bgfx calls. Data will be freed inside bgfx.
Params:
size = Size to allocate.
*/
[q{const(Memory)*}, q{alloc}, q{uint size}, `C++, "bgfx"`],
/**
* Allocate buffer and copy data into it. Data will be freed inside bgfx.
Params:
data = Pointer to data to be copied.
size = Size of data to be copied.
*/
[q{const(Memory)*}, q{copy}, q{const(void)* data, uint size}, `C++, "bgfx"`],
/**
* Make reference to data to pass to bgfx. Unlike `bgfx::alloc`, this call
* doesn't allocate memory for data. It just copies the _data pointer. You
* can pass `ReleaseFn` function pointer to release this memory after it's
* consumed, otherwise you must make sure _data is available for at least 2
* `bgfx::frame` calls. `ReleaseFn` function must be able to be called
* from any thread.
* Attention: Data passed must be available for at least 2 `bgfx::frame` calls.
Params:
data = Pointer to data.
size = Size of data.
releaseFn = Callback function to release memory after use.
userData = User data to be passed to callback function.
*/
[q{const(Memory)*}, q{makeRef}, q{const(void)* data, uint size, ReleaseFn releaseFn=null, void* userData=null}, `C++, "bgfx"`],
/**
* Set debug flags.
Params:
debug_ = Available flags:
- `BGFX_DEBUG_IFH` - Infinitely fast hardware. When this flag is set
all rendering calls will be skipped. This is useful when profiling
to quickly assess potential bottlenecks between CPU and GPU.
- `BGFX_DEBUG_PROFILER` - Enable profiler.
- `BGFX_DEBUG_STATS` - Display internal statistics.
- `BGFX_DEBUG_TEXT` - Display debug text.
- `BGFX_DEBUG_WIREFRAME` - Wireframe rendering. All rendering
primitives will be rendered as lines.
*/
[q{void}, q{setDebug}, q{uint debug_}, `C++, "bgfx"`],
/**
* Clear internal debug text buffer.
Params:
attr = Background color.
small = Default 8x16 or 8x8 font.
*/
[q{void}, q{dbgTextClear}, q{ubyte attr=0, bool small=false}, `C++, "bgfx"`],
/**
* Print formatted data to internal debug text character-buffer (VGA-compatible text mode).
Params:
x = Position x from the left corner of the window.
y = Position y from the top corner of the window.
attr = Color palette. Where top 4-bits represent index of background, and bottom
4-bits represent foreground color from standard VGA text palette (ANSI escape codes).
format = `printf` style format.
*/
[q{void}, q{dbgTextPrintf}, q{ushort x, ushort y, ubyte attr, const(char)* format, ...}, `C++, "bgfx"`],
/**
* Print formatted data from variable argument list to internal debug text character-buffer (VGA-compatible text mode).
Params:
x = Position x from the left corner of the window.
y = Position y from the top corner of the window.
attr = Color palette. Where top 4-bits represent index of background, and bottom
4-bits represent foreground color from standard VGA text palette (ANSI escape codes).
format = `printf` style format.
argList = Variable arguments list for format string.
*/
[q{void}, q{dbgTextPrintfVargs}, q{ushort x, ushort y, ubyte attr, const(char)* format, va_list argList}, `C++, "bgfx"`],
/**
* Draw image into internal debug text buffer.
Params:
x = Position x from the left corner of the window.
y = Position y from the top corner of the window.
width = Image width.
height = Image height.
data = Raw image data (character/attribute raw encoding).
pitch = Image pitch in bytes.
*/
[q{void}, q{dbgTextImage}, q{ushort x, ushort y, ushort width, ushort height, const(void)* data, ushort pitch}, `C++, "bgfx"`],
/**
* Create static index buffer.
Params:
mem = Index buffer data.
flags = Buffer creation flags.
- `BGFX_BUFFER_NONE` - No flags.
- `BGFX_BUFFER_COMPUTE_READ` - Buffer will be read from by compute shader.
- `BGFX_BUFFER_COMPUTE_WRITE` - Buffer will be written into by compute shader. When buffer
is created with `BGFX_BUFFER_COMPUTE_WRITE` flag it cannot be updated from CPU.
- `BGFX_BUFFER_COMPUTE_READ_WRITE` - Buffer will be used for read/write by compute shader.
- `BGFX_BUFFER_ALLOW_RESIZE` - Buffer will resize on buffer update if a different amount of
data is passed. If this flag is not specified, and more data is passed on update, the buffer
will be trimmed to fit the existing buffer size. This flag has effect only on dynamic
buffers.
- `BGFX_BUFFER_INDEX32` - Buffer is using 32-bit indices. This flag has effect only on
index buffers.
*/
[q{IndexBufferHandle}, q{createIndexBuffer}, q{const(Memory)* mem, ushort flags=Buffer.none}, `C++, "bgfx"`],
/**
* Set static index buffer debug name.
Params:
handle = Static index buffer handle.
name = Static index buffer name.
len = Static index buffer name length (if length is INT32_MAX, it's expected
that _name is zero terminated string.
*/
[q{void}, q{setName}, q{IndexBufferHandle handle, const(char)* name, int len=int.max}, `C++, "bgfx"`],
/**
* Destroy static index buffer.
Params:
handle = Static index buffer handle.
*/
[q{void}, q{destroy}, q{IndexBufferHandle handle}, `C++, "bgfx"`],
/**
* Create vertex layout.
Params:
layout = Vertex layout.
*/
[q{VertexLayoutHandle}, q{createVertexLayout}, q{ref const VertexLayout layout}, `C++, "bgfx"`],
/**
* Destroy vertex layout.
Params:
layoutHandle = Vertex layout handle.
*/
[q{void}, q{destroy}, q{VertexLayoutHandle layoutHandle}, `C++, "bgfx"`],
/**
* Create static vertex buffer.
Params:
mem = Vertex buffer data.
layout = Vertex layout.
flags = Buffer creation flags.
- `BGFX_BUFFER_NONE` - No flags.
- `BGFX_BUFFER_COMPUTE_READ` - Buffer will be read from by compute shader.
- `BGFX_BUFFER_COMPUTE_WRITE` - Buffer will be written into by compute shader. When buffer
is created with `BGFX_BUFFER_COMPUTE_WRITE` flag it cannot be updated from CPU.
- `BGFX_BUFFER_COMPUTE_READ_WRITE` - Buffer will be used for read/write by compute shader.
- `BGFX_BUFFER_ALLOW_RESIZE` - Buffer will resize on buffer update if a different amount of
data is passed. If this flag is not specified, and more data is passed on update, the buffer
will be trimmed to fit the existing buffer size. This flag has effect only on dynamic buffers.
- `BGFX_BUFFER_INDEX32` - Buffer is using 32-bit indices. This flag has effect only on index buffers.
*/
[q{VertexBufferHandle}, q{createVertexBuffer}, q{const(Memory)* mem, ref const VertexLayout layout, ushort flags=Buffer.none}, `C++, "bgfx"`],
/**
* Set static vertex buffer debug name.
Params:
handle = Static vertex buffer handle.
name = Static vertex buffer name.
len = Static vertex buffer name length (if length is INT32_MAX, it's expected
that _name is zero terminated string.
*/
[q{void}, q{setName}, q{VertexBufferHandle handle, const(char)* name, int len=int.max}, `C++, "bgfx"`],
/**
* Destroy static vertex buffer.
Params:
handle = Static vertex buffer handle.
*/
[q{void}, q{destroy}, q{VertexBufferHandle handle}, `C++, "bgfx"`],
/**
* Create empty dynamic index buffer.
Params:
num = Number of indices.
flags = Buffer creation flags.
- `BGFX_BUFFER_NONE` - No flags.
- `BGFX_BUFFER_COMPUTE_READ` - Buffer will be read from by compute shader.
- `BGFX_BUFFER_COMPUTE_WRITE` - Buffer will be written into by compute shader. When buffer
is created with `BGFX_BUFFER_COMPUTE_WRITE` flag it cannot be updated from CPU.
- `BGFX_BUFFER_COMPUTE_READ_WRITE` - Buffer will be used for read/write by compute shader.
- `BGFX_BUFFER_ALLOW_RESIZE` - Buffer will resize on buffer update if a different amount of
data is passed. If this flag is not specified, and more data is passed on update, the buffer
will be trimmed to fit the existing buffer size. This flag has effect only on dynamic
buffers.
- `BGFX_BUFFER_INDEX32` - Buffer is using 32-bit indices. This flag has effect only on
index buffers.
*/
[q{DynamicIndexBufferHandle}, q{createDynamicIndexBuffer}, q{uint num, ushort flags=Buffer.none}, `C++, "bgfx"`],
/**
* Create a dynamic index buffer and initialize it.
Params:
mem = Index buffer data.
flags = Buffer creation flags.
- `BGFX_BUFFER_NONE` - No flags.
- `BGFX_BUFFER_COMPUTE_READ` - Buffer will be read from by compute shader.
- `BGFX_BUFFER_COMPUTE_WRITE` - Buffer will be written into by compute shader. When buffer
is created with `BGFX_BUFFER_COMPUTE_WRITE` flag it cannot be updated from CPU.
- `BGFX_BUFFER_COMPUTE_READ_WRITE` - Buffer will be used for read/write by compute shader.
- `BGFX_BUFFER_ALLOW_RESIZE` - Buffer will resize on buffer update if a different amount of
data is passed. If this flag is not specified, and more data is passed on update, the buffer
will be trimmed to fit the existing buffer size. This flag has effect only on dynamic
buffers.
- `BGFX_BUFFER_INDEX32` - Buffer is using 32-bit indices. This flag has effect only on
index buffers.
*/
[q{DynamicIndexBufferHandle}, q{createDynamicIndexBuffer}, q{const(Memory)* mem, ushort flags=Buffer.none}, `C++, "bgfx"`],
/**
* Update dynamic index buffer.
Params:
handle = Dynamic index buffer handle.
startIndex = Start index.
mem = Index buffer data.
*/
[q{void}, q{update}, q{DynamicIndexBufferHandle handle, uint startIndex, const(Memory)* mem}, `C++, "bgfx"`],
/**
* Destroy dynamic index buffer.
Params:
handle = Dynamic index buffer handle.
*/
[q{void}, q{destroy}, q{DynamicIndexBufferHandle handle}, `C++, "bgfx"`],
/**
* Create empty dynamic vertex buffer.
Params:
num = Number of vertices.
layout = Vertex layout.
flags = Buffer creation flags.
- `BGFX_BUFFER_NONE` - No flags.
- `BGFX_BUFFER_COMPUTE_READ` - Buffer will be read from by compute shader.
- `BGFX_BUFFER_COMPUTE_WRITE` - Buffer will be written into by compute shader. When buffer
is created with `BGFX_BUFFER_COMPUTE_WRITE` flag it cannot be updated from CPU.
- `BGFX_BUFFER_COMPUTE_READ_WRITE` - Buffer will be used for read/write by compute shader.
- `BGFX_BUFFER_ALLOW_RESIZE` - Buffer will resize on buffer update if a different amount of
data is passed. If this flag is not specified, and more data is passed on update, the buffer
will be trimmed to fit the existing buffer size. This flag has effect only on dynamic
buffers.
- `BGFX_BUFFER_INDEX32` - Buffer is using 32-bit indices. This flag has effect only on
index buffers.
*/
[q{DynamicVertexBufferHandle}, q{createDynamicVertexBuffer}, q{uint num, ref const VertexLayout layout, ushort flags=Buffer.none}, `C++, "bgfx"`],
/**
* Create dynamic vertex buffer and initialize it.
Params:
mem = Vertex buffer data.
layout = Vertex layout.
flags = Buffer creation flags.
- `BGFX_BUFFER_NONE` - No flags.
- `BGFX_BUFFER_COMPUTE_READ` - Buffer will be read from by compute shader.
- `BGFX_BUFFER_COMPUTE_WRITE` - Buffer will be written into by compute shader. When buffer
is created with `BGFX_BUFFER_COMPUTE_WRITE` flag it cannot be updated from CPU.
- `BGFX_BUFFER_COMPUTE_READ_WRITE` - Buffer will be used for read/write by compute shader.
- `BGFX_BUFFER_ALLOW_RESIZE` - Buffer will resize on buffer update if a different amount of
data is passed. If this flag is not specified, and more data is passed on update, the buffer
will be trimmed to fit the existing buffer size. This flag has effect only on dynamic
buffers.
- `BGFX_BUFFER_INDEX32` - Buffer is using 32-bit indices. This flag has effect only on
index buffers.
*/
[q{DynamicVertexBufferHandle}, q{createDynamicVertexBuffer}, q{const(Memory)* mem, ref const VertexLayout layout, ushort flags=Buffer.none}, `C++, "bgfx"`],
/**
* Update dynamic vertex buffer.
Params:
handle = Dynamic vertex buffer handle.
startVertex = Start vertex.
mem = Vertex buffer data.
*/
[q{void}, q{update}, q{DynamicVertexBufferHandle handle, uint startVertex, const(Memory)* mem}, `C++, "bgfx"`],
/**
* Destroy dynamic vertex buffer.
Params:
handle = Dynamic vertex buffer handle.
*/
[q{void}, q{destroy}, q{DynamicVertexBufferHandle handle}, `C++, "bgfx"`],
/**
* Returns number of requested or maximum available indices.
Params:
num = Number of required indices.
index32 = Set to `true` if input indices will be 32-bit.
*/
[q{uint}, q{getAvailTransientIndexBuffer}, q{uint num, bool index32=false}, `C++, "bgfx"`],
/**
* Returns number of requested or maximum available vertices.
Params:
num = Number of required vertices.
layout = Vertex layout.
*/
[q{uint}, q{getAvailTransientVertexBuffer}, q{uint num, ref const VertexLayout layout}, `C++, "bgfx"`],
/**
* Returns number of requested or maximum available instance buffer slots.
Params:
num = Number of required instances.
stride = Stride per instance.
*/
[q{uint}, q{getAvailInstanceDataBuffer}, q{uint num, ushort stride}, `C++, "bgfx"`],
/**
* Allocate transient index buffer.
Params:
tib = TransientIndexBuffer structure will be filled, and will be valid
for the duration of frame, and can be reused for multiple draw
calls.
num = Number of indices to allocate.
index32 = Set to `true` if input indices will be 32-bit.
*/
[q{void}, q{allocTransientIndexBuffer}, q{TransientIndexBuffer* tib, uint num, bool index32=false}, `C++, "bgfx"`],
/**
* Allocate transient vertex buffer.
Params:
tvb = TransientVertexBuffer structure will be filled, and will be valid
for the duration of frame, and can be reused for multiple draw
calls.
num = Number of vertices to allocate.
layout = Vertex layout.
*/
[q{void}, q{allocTransientVertexBuffer}, q{TransientVertexBuffer* tvb, uint num, ref const VertexLayout layout}, `C++, "bgfx"`],
/**
* Check for required space and allocate transient vertex and index
* buffers. If both space requirements are satisfied function returns
* true.
Params:
tvb = TransientVertexBuffer structure will be filled, and will be valid
for the duration of frame, and can be reused for multiple draw
calls.
layout = Vertex layout.
numVertices = Number of vertices to allocate.
tib = TransientIndexBuffer structure will be filled, and will be valid
for the duration of frame, and can be reused for multiple draw
calls.
numIndices = Number of indices to allocate.
index32 = Set to `true` if input indices will be 32-bit.
*/
[q{bool}, q{allocTransientBuffers}, q{TransientVertexBuffer* tvb, ref const VertexLayout layout, uint numVertices, TransientIndexBuffer* tib, uint numIndices, bool index32=false}, `C++, "bgfx"`],
/**
* Allocate instance data buffer.
Params:
idb = InstanceDataBuffer structure will be filled, and will be valid
for duration of frame, and can be reused for multiple draw
calls.
num = Number of instances.
stride = Instance stride. Must be multiple of 16.
*/
[q{void}, q{allocInstanceDataBuffer}, q{InstanceDataBuffer* idb, uint num, ushort stride}, `C++, "bgfx"`],
/**
* Create draw indirect buffer.
Params:
num = Number of indirect calls.
*/
[q{IndirectBufferHandle}, q{createIndirectBuffer}, q{uint num}, `C++, "bgfx"`],
/**
* Destroy draw indirect buffer.
Params:
handle = Indirect buffer handle.
*/
[q{void}, q{destroy}, q{IndirectBufferHandle handle}, `C++, "bgfx"`],
/**
* Create shader from memory buffer.
Params:
mem = Shader binary.
*/
[q{ShaderHandle}, q{createShader}, q{const(Memory)* mem}, `C++, "bgfx"`],
/**
* Returns the number of uniforms and uniform handles used inside a shader.
* Remarks:
* Only non-predefined uniforms are returned.
Params:
handle = Shader handle.
uniforms = UniformHandle array where data will be stored.
max = Maximum capacity of array.
*/
[q{ushort}, q{getShaderUniforms}, q{ShaderHandle handle, UniformHandle* uniforms=null, ushort max=0}, `C++, "bgfx"`],
/**
* Set shader debug name.
Params:
handle = Shader handle.
name = Shader name.
len = Shader name length (if length is INT32_MAX, it's expected
that _name is zero terminated string).
*/
[q{void}, q{setName}, q{ShaderHandle handle, const(char)* name, int len=int.max}, `C++, "bgfx"`],
/**
* Destroy shader.
* Remarks: Once a shader program is created with _handle,
* it is safe to destroy that shader.
Params:
handle = Shader handle.
*/
[q{void}, q{destroy}, q{ShaderHandle handle}, `C++, "bgfx"`],
/**
* Create program with vertex and fragment shaders.
Params:
vsh = Vertex shader.
fsh = Fragment shader.
destroyShaders = If true, shaders will be destroyed when program is destroyed.
*/
[q{ProgramHandle}, q{createProgram}, q{ShaderHandle vsh, ShaderHandle fsh, bool destroyShaders=false}, `C++, "bgfx"`],
/**
* Create program with compute shader.
Params:
csh = Compute shader.
destroyShaders = If true, shaders will be destroyed when program is destroyed.
*/
[q{ProgramHandle}, q{createProgram}, q{ShaderHandle csh, bool destroyShaders=false}, `C++, "bgfx"`],
/**
* Destroy program.
Params:
handle = Program handle.
*/
[q{void}, q{destroy}, q{ProgramHandle handle}, `C++, "bgfx"`],
/**
* Validate texture parameters.
Params:
depth = Depth dimension of volume texture.
cubeMap = Indicates that texture contains cubemap.
numLayers = Number of layers in texture array.
format = Texture format. See: `TextureFormat::Enum`.
flags = Texture flags. See `BGFX_TEXTURE_*`.
*/
[q{bool}, q{isTextureValid}, q{ushort depth, bool cubeMap, ushort numLayers, bgfx.fakeenum.TextureFormat.Enum format, ulong flags}, `C++, "bgfx"`],
/**
* Validate frame buffer parameters.
Params:
num = Number of attachments.
attachment = Attachment texture info. See: `bgfx::Attachment`.
*/
[q{bool}, q{isFrameBufferValid}, q{ubyte num, const(Attachment)* attachment}, `C++, "bgfx"`],
/**
* Calculate amount of memory required for texture.
Params:
info = Resulting texture info structure. See: `TextureInfo`.
width = Width.
height = Height.
depth = Depth dimension of volume texture.
cubeMap = Indicates that texture contains cubemap.
hasMIPs = Indicates that texture contains full mip-map chain.
numLayers = Number of layers in texture array.
format = Texture format. See: `TextureFormat::Enum`.
*/
[q{void}, q{calcTextureSize}, q{ref TextureInfo info, ushort width, ushort height, ushort depth, bool cubeMap, bool hasMIPs, ushort numLayers, bgfx.fakeenum.TextureFormat.Enum format}, `C++, "bgfx"`],
/**
* Create texture from memory buffer.
Params:
mem = DDS, KTX or PVR texture binary data.
flags = Texture creation (see `BGFX_TEXTURE_*`.), and sampler (see `BGFX_SAMPLER_*`)
flags. Default texture sampling mode is linear, and wrap mode is repeat.
- `BGFX_SAMPLER_[U/V/W]_[MIRROR/CLAMP]` - Mirror or clamp to edge wrap
mode.
- `BGFX_SAMPLER_[MIN/MAG/MIP]_[POINT/ANISOTROPIC]` - Point or anisotropic
sampling.
skip = Skip top level mips when parsing texture.
info = When non-`NULL` is specified it returns parsed texture information.
*/
[q{TextureHandle}, q{createTexture}, q{const(Memory)* mem, ulong flags, ubyte skip=0, TextureInfo* info=null}, `C++, "bgfx"`],
/**
* Create 2D texture.
Params:
width = Width.
height = Height.
hasMIPs = Indicates that texture contains full mip-map chain.
numLayers = Number of layers in texture array. Must be 1 if caps
`BGFX_CAPS_TEXTURE_2D_ARRAY` flag is not set.
format = Texture format. See: `TextureFormat::Enum`.
flags = Texture creation (see `BGFX_TEXTURE_*`.), and sampler (see `BGFX_SAMPLER_*`)
flags. Default texture sampling mode is linear, and wrap mode is repeat.
- `BGFX_SAMPLER_[U/V/W]_[MIRROR/CLAMP]` - Mirror or clamp to edge wrap
mode.
- `BGFX_SAMPLER_[MIN/MAG/MIP]_[POINT/ANISOTROPIC]` - Point or anisotropic
sampling.
mem = Texture data. If `_mem` is non-NULL, created texture will be immutable. If
`_mem` is NULL content of the texture is uninitialized. When `_numLayers` is more than
1, expected memory layout is texture and all mips together for each array element.
*/
[q{TextureHandle}, q{createTexture2D}, q{ushort width, ushort height, bool hasMIPs, ushort numLayers, bgfx.fakeenum.TextureFormat.Enum format, ulong flags, const(Memory)* mem=null}, `C++, "bgfx"`],
/**
* Create texture with size based on back-buffer ratio. Texture will maintain ratio
* if back buffer resolution changes.
Params:
ratio = Texture size in respect to back-buffer size. See: `BackbufferRatio::Enum`.
hasMIPs = Indicates that texture contains full mip-map chain.
numLayers = Number of layers in texture array. Must be 1 if caps
`BGFX_CAPS_TEXTURE_2D_ARRAY` flag is not set.
format = Texture format. See: `TextureFormat::Enum`.
flags = Texture creation (see `BGFX_TEXTURE_*`.), and sampler (see `BGFX_SAMPLER_*`)
flags. Default texture sampling mode is linear, and wrap mode is repeat.
- `BGFX_SAMPLER_[U/V/W]_[MIRROR/CLAMP]` - Mirror or clamp to edge wrap
mode.
- `BGFX_SAMPLER_[MIN/MAG/MIP]_[POINT/ANISOTROPIC]` - Point or anisotropic
sampling.
*/
[q{TextureHandle}, q{createTexture2D}, q{bgfx.fakeenum.BackbufferRatio.Enum ratio, bool hasMIPs, ushort numLayers, bgfx.fakeenum.TextureFormat.Enum format, ulong flags=Texture.none|Sampler.none}, `C++, "bgfx"`],
/**
* Create 3D texture.
Params:
width = Width.
height = Height.
depth = Depth.
hasMIPs = Indicates that texture contains full mip-map chain.
format = Texture format. See: `TextureFormat::Enum`.
flags = Texture creation (see `BGFX_TEXTURE_*`.), and sampler (see `BGFX_SAMPLER_*`)
flags. Default texture sampling mode is linear, and wrap mode is repeat.
- `BGFX_SAMPLER_[U/V/W]_[MIRROR/CLAMP]` - Mirror or clamp to edge wrap
mode.
- `BGFX_SAMPLER_[MIN/MAG/MIP]_[POINT/ANISOTROPIC]` - Point or anisotropic
sampling.
mem = Texture data. If `_mem` is non-NULL, created texture will be immutable. If
`_mem` is NULL content of the texture is uninitialized. When `_numLayers` is more than
1, expected memory layout is texture and all mips together for each array element.
*/
[q{TextureHandle}, q{createTexture3D}, q{ushort width, ushort height, ushort depth, bool hasMIPs, bgfx.fakeenum.TextureFormat.Enum format, ulong flags=Texture.none|Sampler.none, const(Memory)* mem=null}, `C++, "bgfx"`],
/**
* Create Cube texture.
Params:
size = Cube side size.
hasMIPs = Indicates that texture contains full mip-map chain.
numLayers = Number of layers in texture array. Must be 1 if caps
`BGFX_CAPS_TEXTURE_2D_ARRAY` flag is not set.
format = Texture format. See: `TextureFormat::Enum`.
flags = Texture creation (see `BGFX_TEXTURE_*`.), and sampler (see `BGFX_SAMPLER_*`)
flags. Default texture sampling mode is linear, and wrap mode is repeat.
- `BGFX_SAMPLER_[U/V/W]_[MIRROR/CLAMP]` - Mirror or clamp to edge wrap
mode.
- `BGFX_SAMPLER_[MIN/MAG/MIP]_[POINT/ANISOTROPIC]` - Point or anisotropic
sampling.
mem = Texture data. If `_mem` is non-NULL, created texture will be immutable. If
`_mem` is NULL content of the texture is uninitialized. When `_numLayers` is more than
1, expected memory layout is texture and all mips together for each array element.
*/
[q{TextureHandle}, q{createTextureCube}, q{ushort size, bool hasMIPs, ushort numLayers, bgfx.fakeenum.TextureFormat.Enum format, ulong flags=Texture.none|Sampler.none, const(Memory)* mem=null}, `C++, "bgfx"`],
/**
* Update 2D texture.
* Attention: It's valid to update only mutable texture. See `bgfx::createTexture2D` for more info.
Params:
handle = Texture handle.
layer = Layer in texture array.
mip = Mip level.
x = X offset in texture.
y = Y offset in texture.
width = Width of texture block.
height = Height of texture block.
mem = Texture update data.
pitch = Pitch of input image (bytes). When _pitch is set to
UINT16_MAX, it will be calculated internally based on _width.
*/
[q{void}, q{updateTexture2D}, q{TextureHandle handle, ushort layer, ubyte mip, ushort x, ushort y, ushort width, ushort height, const(Memory)* mem, ushort pitch=ushort.max}, `C++, "bgfx"`],
/**
* Update 3D texture.
* Attention: It's valid to update only mutable texture. See `bgfx::createTexture3D` for more info.
Params:
handle = Texture handle.
mip = Mip level.
x = X offset in texture.
y = Y offset in texture.
z = Z offset in texture.
width = Width of texture block.
height = Height of texture block.
depth = Depth of texture block.
mem = Texture update data.
*/
[q{void}, q{updateTexture3D}, q{TextureHandle handle, ubyte mip, ushort x, ushort y, ushort z, ushort width, ushort height, ushort depth, const(Memory)* mem}, `C++, "bgfx"`],
/**
* Update Cube texture.
* Attention: It's valid to update only mutable texture. See `bgfx::createTextureCube` for more info.
Params:
handle = Texture handle.
layer = Layer in texture array.
side = Cubemap side `BGFX_CUBE_MAP_<POSITIVE or NEGATIVE>_<X, Y or Z>`,
where 0 is +X, 1 is -X, 2 is +Y, 3 is -Y, 4 is +Z, and 5 is -Z.
+----------+
|-z 2|
| ^ +y |
| | | Unfolded cube:
| +---->+x |
+----------+----------+----------+----------+
|+y 1|+y 4|+y 0|+y 5|
| ^ -x | ^ +z | ^ +x | ^ -z |
| | | | | | | | |
| +---->+z | +---->+x | +---->-z | +---->-x |
+----------+----------+----------+----------+
|+z 3|
| ^ -y |
| | |
| +---->+x |
+----------+
mip = Mip level.
x = X offset in texture.
y = Y offset in texture.
width = Width of texture block.
height = Height of texture block.
mem = Texture update data.
pitch = Pitch of input image (bytes). When _pitch is set to
UINT16_MAX, it will be calculated internally based on _width.
*/
[q{void}, q{updateTextureCube}, q{TextureHandle handle, ushort layer, ubyte side, ubyte mip, ushort x, ushort y, ushort width, ushort height, const(Memory)* mem, ushort pitch=ushort.max}, `C++, "bgfx"`],
/**
* Read back texture content.
* Attention: Texture must be created with `BGFX_TEXTURE_READ_BACK` flag.
* Attention: Availability depends on: `BGFX_CAPS_TEXTURE_READ_BACK`.
Params:
handle = Texture handle.
data = Destination buffer.
mip = Mip level.
*/
[q{uint}, q{readTexture}, q{TextureHandle handle, void* data, ubyte mip=0}, `C++, "bgfx"`],
/**
* Set texture debug name.
Params:
handle = Texture handle.
name = Texture name.
len = Texture name length (if length is INT32_MAX, it's expected
that _name is zero terminated string.
*/
[q{void}, q{setName}, q{TextureHandle handle, const(char)* name, int len=int.max}, `C++, "bgfx"`],
/**
* Returns texture direct access pointer.
* Attention: Availability depends on: `BGFX_CAPS_TEXTURE_DIRECT_ACCESS`. This feature
* is available on GPUs that have unified memory architecture (UMA) support.
Params:
handle = Texture handle.
*/
[q{void*}, q{getDirectAccessPtr}, q{TextureHandle handle}, `C++, "bgfx"`],
/**
* Destroy texture.
Params:
handle = Texture handle.
*/
[q{void}, q{destroy}, q{TextureHandle handle}, `C++, "bgfx"`],
/**
* Create frame buffer (simple).
Params:
width = Texture width.
height = Texture height.
format = Texture format. See: `TextureFormat::Enum`.
textureFlags = Texture creation (see `BGFX_TEXTURE_*`.), and sampler (see `BGFX_SAMPLER_*`)
flags. Default texture sampling mode is linear, and wrap mode is repeat.
- `BGFX_SAMPLER_[U/V/W]_[MIRROR/CLAMP]` - Mirror or clamp to edge wrap
mode.
- `BGFX_SAMPLER_[MIN/MAG/MIP]_[POINT/ANISOTROPIC]` - Point or anisotropic
sampling.
*/
[q{FrameBufferHandle}, q{createFrameBuffer}, q{ushort width, ushort height, bgfx.fakeenum.TextureFormat.Enum format, ulong textureFlags=SamplerU.clamp|SamplerV.clamp}, `C++, "bgfx"`],
/**
* Create frame buffer with size based on back-buffer ratio. Frame buffer will maintain ratio
* if back buffer resolution changes.
Params:
ratio = Frame buffer size in respect to back-buffer size. See:
`BackbufferRatio::Enum`.
format = Texture format. See: `TextureFormat::Enum`.
textureFlags = Texture creation (see `BGFX_TEXTURE_*`.), and sampler (see `BGFX_SAMPLER_*`)
flags. Default texture sampling mode is linear, and wrap mode is repeat.
- `BGFX_SAMPLER_[U/V/W]_[MIRROR/CLAMP]` - Mirror or clamp to edge wrap
mode.
- `BGFX_SAMPLER_[MIN/MAG/MIP]_[POINT/ANISOTROPIC]` - Point or anisotropic
sampling.
*/
[q{FrameBufferHandle}, q{createFrameBuffer}, q{bgfx.fakeenum.BackbufferRatio.Enum ratio, bgfx.fakeenum.TextureFormat.Enum format, ulong textureFlags=SamplerU.clamp|SamplerV.clamp}, `C++, "bgfx"`],
/**
* Create MRT frame buffer from texture handles (simple).
Params:
num = Number of texture handles.
handles = Texture attachments.
destroyTexture = If true, textures will be destroyed when
frame buffer is destroyed.
*/
[q{FrameBufferHandle}, q{createFrameBuffer}, q{ubyte num, const(TextureHandle)* handles, bool destroyTexture=false}, `C++, "bgfx"`],
/**
* Create MRT frame buffer from texture handles with specific layer and
* mip level.
Params:
num = Number of attachments.
attachment = Attachment texture info. See: `bgfx::Attachment`.
destroyTexture = If true, textures will be destroyed when
frame buffer is destroyed.
*/
[q{FrameBufferHandle}, q{createFrameBuffer}, q{ubyte num, const(Attachment)* attachment, bool destroyTexture=false}, `C++, "bgfx"`],
/**
* Create frame buffer for multiple window rendering.
* Remarks:
* Frame buffer cannot be used for sampling.
* Attention: Availability depends on: `BGFX_CAPS_SWAP_CHAIN`.
Params:
nwh = OS' target native window handle.
width = Window back buffer width.
height = Window back buffer height.
format = Window back buffer color format.
depthFormat = Window back buffer depth format.
*/
[q{FrameBufferHandle}, q{createFrameBuffer}, q{void* nwh, ushort width, ushort height, bgfx.fakeenum.TextureFormat.Enum format=TextureFormat.count, bgfx.fakeenum.TextureFormat.Enum depthFormat=TextureFormat.count}, `C++, "bgfx"`],
/**
* Set frame buffer debug name.
Params:
handle = Frame buffer handle.
name = Frame buffer name.
len = Frame buffer name length (if length is INT32_MAX, it's expected
that _name is zero terminated string.
*/
[q{void}, q{setName}, q{FrameBufferHandle handle, const(char)* name, int len=int.max}, `C++, "bgfx"`],
/**
* Obtain texture handle of frame buffer attachment.
Params:
handle = Frame buffer handle.
*/
[q{TextureHandle}, q{getTexture}, q{FrameBufferHandle handle, ubyte attachment=0}, `C++, "bgfx"`],
/**
* Destroy frame buffer.
Params:
handle = Frame buffer handle.
*/
[q{void}, q{destroy}, q{FrameBufferHandle handle}, `C++, "bgfx"`],
/**
* Create shader uniform parameter.
* Remarks:
* 1. Uniform names are unique. It's valid to call `bgfx::createUniform`
* multiple times with the same uniform name. The library will always
* return the same handle, but the handle reference count will be
* incremented. This means that the same number of `bgfx::destroyUniform`
* must be called to properly destroy the uniform.
* 2. Predefined uniforms (declared in `bgfx_shader.sh`):
* - `u_viewRect vec4(x, y, width, height)` - view rectangle for current
* view, in pixels.
* - `u_viewTexel vec4(1.0/width, 1.0/height, undef, undef)` - inverse
* width and height
* - `u_view mat4` - view matrix
* - `u_invView mat4` - inverted view matrix
* - `u_proj mat4` - projection matrix
* - `u_invProj mat4` - inverted projection matrix
* - `u_viewProj mat4` - concatenated view projection matrix
* - `u_invViewProj mat4` - concatenated inverted view projection matrix
* - `u_model mat4[BGFX_CONFIG_MAX_BONES]` - array of model matrices.
* - `u_modelView mat4` - concatenated model view matrix, only first
* model matrix from array is used.
* - `u_modelViewProj mat4` - concatenated model view projection matrix.
* - `u_alphaRef float` - alpha reference value for alpha test.
Params:
name = Uniform name in shader.
type = Type of uniform (See: `bgfx::UniformType`).
num = Number of elements in array.
*/
[q{UniformHandle}, q{createUniform}, q{const(char)* name, bgfx.fakeenum.UniformType.Enum type, ushort num=1}, `C++, "bgfx"`],
/**
* Retrieve uniform info.
Params:
handle = Handle to uniform object.
info = Uniform info.
*/
[q{void}, q{getUniformInfo}, q{UniformHandle handle, ref UniformInfo info}, `C++, "bgfx"`],
/**
* Destroy shader uniform parameter.
Params:
handle = Handle to uniform object.
*/
[q{void}, q{destroy}, q{UniformHandle handle}, `C++, "bgfx"`],
/**
* Create occlusion query.
*/
[q{OcclusionQueryHandle}, q{createOcclusionQuery}, q{}, `C++, "bgfx"`],
/**
* Retrieve occlusion query result from previous frame.
Params:
handle = Handle to occlusion query object.
result = Number of pixels that passed test. This argument
can be `NULL` if result of occlusion query is not needed.
*/
[q{OcclusionQueryResult}, q{getResult}, q{OcclusionQueryHandle handle, int* result=null}, `C++, "bgfx"`],
/**
* Destroy occlusion query.
Params:
handle = Handle to occlusion query object.
*/
[q{void}, q{destroy}, q{OcclusionQueryHandle handle}, `C++, "bgfx"`],
/**
* Set palette color value.
Params:
index = Index into palette.
rgba = RGBA floating point values.
*/
[q{void}, q{setPaletteColor}, q{ubyte index, const(float)* rgba}, `C++, "bgfx"`],
/**
* Set palette color value.
Params:
index = Index into palette.
rgba = Packed 32-bit RGBA value.
*/
[q{void}, q{setPaletteColor}, q{ubyte index, uint rgba}, `C++, "bgfx"`],
/**
* Set view name.
* Remarks:
* This is debug only feature.
* In graphics debugger view name will appear as:
* "nnnc <view name>"
* ^ ^ ^
* | +--- compute (C)
* +------ view id
Params:
id = View id.
name = View name.
*/
[q{void}, q{setViewName}, q{ViewID id, const(char)* name}, `C++, "bgfx"`],
/**
* Set view rectangle. Draw primitive outside view will be clipped.
Params:
id = View id.
x = Position x from the left corner of the window.
y = Position y from the top corner of the window.
width = Width of view port region.
height = Height of view port region.
*/
[q{void}, q{setViewRect}, q{ViewID id, ushort x, ushort y, ushort width, ushort height}, `C++, "bgfx"`],
/**
* Set view rectangle. Draw primitive outside view will be clipped.
Params:
id = View id.
x = Position x from the left corner of the window.
y = Position y from the top corner of the window.
ratio = Width and height will be set in respect to back-buffer size.
See: `BackbufferRatio::Enum`.
*/
[q{void}, q{setViewRect}, q{ViewID id, ushort x, ushort y, bgfx.fakeenum.BackbufferRatio.Enum ratio}, `C++, "bgfx"`],
/**
* Set view scissor. Draw primitive outside view will be clipped. When
* _x, _y, _width and _height are set to 0, scissor will be disabled.
Params:
id = View id.
x = Position x from the left corner of the window.
y = Position y from the top corner of the window.
width = Width of view scissor region.
height = Height of view scissor region.
*/
[q{void}, q{setViewScissor}, q{ViewID id, ushort x=0, ushort y=0, ushort width=0, ushort height=0}, `C++, "bgfx"`],
/**
* Set view clear flags.
Params:
id = View id.
flags = Clear flags. Use `BGFX_CLEAR_NONE` to remove any clear
operation. See: `BGFX_CLEAR_*`.
rgba = Color clear value.
depth = Depth clear value.
stencil = Stencil clear value.
*/
[q{void}, q{setViewClear}, q{ViewID id, ushort flags, uint rgba=0x000000ff, float depth=1.0f, ubyte stencil=0}, `C++, "bgfx"`],
/**
* Set view clear flags with different clear color for each
* frame buffer texture. `bgfx::setPaletteColor` must be used to set up a
* clear color palette.
Params:
id = View id.
flags = Clear flags. Use `BGFX_CLEAR_NONE` to remove any clear
operation. See: `BGFX_CLEAR_*`.
depth = Depth clear value.
stencil = Stencil clear value.
c0 = Palette index for frame buffer attachment 0.
c1 = Palette index for frame buffer attachment 1.
c2 = Palette index for frame buffer attachment 2.
c3 = Palette index for frame buffer attachment 3.
c4 = Palette index for frame buffer attachment 4.
c5 = Palette index for frame buffer attachment 5.
c6 = Palette index for frame buffer attachment 6.
c7 = Palette index for frame buffer attachment 7.
*/
[q{void}, q{setViewClear}, q{ViewID id, ushort flags, float depth, ubyte stencil, ubyte c0=ubyte.max, ubyte c1=ubyte.max, ubyte c2=ubyte.max, ubyte c3=ubyte.max, ubyte c4=ubyte.max, ubyte c5=ubyte.max, ubyte c6=ubyte.max, ubyte c7=ubyte.max}, `C++, "bgfx"`],
/**
* Set view sorting mode.
* Remarks:
* View mode must be set prior calling `bgfx::submit` for the view.
Params:
id = View id.
mode = View sort mode. See `ViewMode::Enum`.
*/
[q{void}, q{setViewMode}, q{ViewID id, bgfx.fakeenum.ViewMode.Enum mode=ViewMode.default_}, `C++, "bgfx"`],
/**
* Set view frame buffer.
* Remarks:
* Not persistent after `bgfx::reset` call.
Params:
id = View id.
handle = Frame buffer handle. Passing `BGFX_INVALID_HANDLE` as
frame buffer handle will draw primitives from this view into
default back buffer.
*/
[q{void}, q{setViewFrameBuffer}, q{ViewID id, FrameBufferHandle handle}, `C++, "bgfx"`],
/**
* Set view's view matrix and projection matrix,
* all draw primitives in this view will use these two matrices.
Params:
id = View id.
view = View matrix.
proj = Projection matrix.
*/
[q{void}, q{setViewTransform}, q{ViewID id, const(void)* view, const(void)* proj}, `C++, "bgfx"`],
/**
* Post submit view reordering.
Params:
id = First view id.
num = Number of views to remap.
order = View remap id table. Passing `NULL` will reset view ids
to default state.
*/
[q{void}, q{setViewOrder}, q{ViewID id=0, ushort num=ushort.max, const(ViewID)* order=null}, `C++, "bgfx"`],
/**
* Reset all view settings to default.
*/
[q{void}, q{resetView}, q{ViewID id}, `C++, "bgfx"`],
/**
* Begin submitting draw calls from thread.
Params:
forThread = Explicitly request an encoder for a worker thread.
*/
[q{Encoder*}, q{begin}, q{bool forThread=false}, `C++, "bgfx"`],
/**
* End submitting draw calls from thread.
Params:
encoder = Encoder.
*/
[q{void}, q{end}, q{Encoder* encoder}, `C++, "bgfx"`],
/**
* Request screen shot of window back buffer.
* Remarks:
* `bgfx::CallbackI::screenShot` must be implemented.
* Attention: Frame buffer handle must be created with OS' target native window handle.
Params:
handle = Frame buffer handle. If handle is `BGFX_INVALID_HANDLE` request will be
made for main window back buffer.
filePath = Will be passed to `bgfx::CallbackI::screenShot` callback.
*/
[q{void}, q{requestScreenShot}, q{FrameBufferHandle handle, const(char)* filePath}, `C++, "bgfx"`],
/**
* Render frame.
* Attention: `bgfx::renderFrame` is blocking call. It waits for
* `bgfx::frame` to be called from API thread to process frame.
* If timeout value is passed call will timeout and return even
* if `bgfx::frame` is not called.
* Warning: This call should be only used on platforms that don't
* allow creating separate rendering thread. If it is called before
* to bgfx::init, render thread won't be created by bgfx::init call.
Params:
msecs = Timeout in milliseconds.
*/
[q{RenderFrame}, q{renderFrame}, q{int msecs=-1}, `C++, "bgfx"`],
/**
* Set platform data.
* Warning: Must be called before `bgfx::init`.
Params:
data = Platform data.
*/
[q{void}, q{setPlatformData}, q{ref const PlatformData data}, `C++, "bgfx"`],
/**
* Get internal data for interop.
* Attention: It's expected you understand some bgfx internals before you
* use this call.
* Warning: Must be called only on render thread.
*/
[q{const(InternalData)*}, q{getInternalData}, q{}, `C++, "bgfx"`],
/**
* Override internal texture with externally created texture. Previously
* created internal texture will released.
* Attention: It's expected you understand some bgfx internals before you
* use this call.
* Warning: Must be called only on render thread.
Params:
handle = Texture handle.
ptr = Native API pointer to texture.
*/
[q{size_t}, q{overrideInternal}, q{TextureHandle handle, size_t ptr}, `C++, "bgfx"`],
/**
* Override internal texture by creating new texture. Previously created
* internal texture will released.
* Attention: It's expected you understand some bgfx internals before you
* use this call.
* Returns: Native API pointer to texture. If result is 0, texture is not created yet from the
* main thread.
* Warning: Must be called only on render thread.
Params:
handle = Texture handle.
width = Width.
height = Height.
numMIPs = Number of mip-maps.
format = Texture format. See: `TextureFormat::Enum`.
flags = Texture creation (see `BGFX_TEXTURE_*`.), and sampler (see `BGFX_SAMPLER_*`)
flags. Default texture sampling mode is linear, and wrap mode is repeat.
- `BGFX_SAMPLER_[U/V/W]_[MIRROR/CLAMP]` - Mirror or clamp to edge wrap
mode.
- `BGFX_SAMPLER_[MIN/MAG/MIP]_[POINT/ANISOTROPIC]` - Point or anisotropic
sampling.
*/
[q{size_t}, q{overrideInternal}, q{TextureHandle handle, ushort width, ushort height, ubyte numMIPs, bgfx.fakeenum.TextureFormat.Enum format, ulong flags}, `C++, "bgfx"`],
/**
* Sets a debug marker. This allows you to group graphics calls together for easy browsing in
* graphics debugging tools.
Params:
marker = Marker string.
*/
[q{void}, q{setMarker}, q{const(char)* marker}, `C++, "bgfx"`],
/**
* Set render states for draw primitive.
* Remarks:
* 1. To set up more complex states use:
* `BGFX_STATE_ALPHA_REF(_ref)`,
* `BGFX_STATE_POINT_SIZE(_size)`,
* `BGFX_STATE_BLEND_FUNC(_src, _dst)`,
* `BGFX_STATE_BLEND_FUNC_SEPARATE(_srcRGB, _dstRGB, _srcA, _dstA)`,
* `BGFX_STATE_BLEND_EQUATION(_equation)`,
* `BGFX_STATE_BLEND_EQUATION_SEPARATE(_equationRGB, _equationA)`
* 2. `BGFX_STATE_BLEND_EQUATION_ADD` is set when no other blend
* equation is specified.
Params:
state = State flags. Default state for primitive type is
triangles. See: `BGFX_STATE_DEFAULT`.
- `BGFX_STATE_DEPTH_TEST_*` - Depth test function.
- `BGFX_STATE_BLEND_*` - See remark 1 about BGFX_STATE_BLEND_FUNC.
- `BGFX_STATE_BLEND_EQUATION_*` - See remark 2.
- `BGFX_STATE_CULL_*` - Backface culling mode.
- `BGFX_STATE_WRITE_*` - Enable R, G, B, A or Z write.
- `BGFX_STATE_MSAA` - Enable hardware multisample antialiasing.
- `BGFX_STATE_PT_[TRISTRIP/LINES/POINTS]` - Primitive type.
rgba = Sets blend factor used by `BGFX_STATE_BLEND_FACTOR` and
`BGFX_STATE_BLEND_INV_FACTOR` blend modes.
*/
[q{void}, q{setState}, q{ulong state, uint rgba=0}, `C++, "bgfx"`],
/**
* Set condition for rendering.
Params:
handle = Occlusion query handle.
visible = Render if occlusion query is visible.
*/
[q{void}, q{setCondition}, q{OcclusionQueryHandle handle, bool visible}, `C++, "bgfx"`],
/**
* Set stencil test state.
Params:
fstencil = Front stencil state.
bstencil = Back stencil state. If back is set to `BGFX_STENCIL_NONE`
_fstencil is applied to both front and back facing primitives.
*/
[q{void}, q{setStencil}, q{uint fstencil, uint bstencil=Stencil.none}, `C++, "bgfx"`],
/**
* Set scissor for draw primitive.
* Remarks:
* To scissor for all primitives in view see `bgfx::setViewScissor`.
Params:
x = Position x from the left corner of the window.
y = Position y from the top corner of the window.
width = Width of view scissor region.
height = Height of view scissor region.
*/
[q{ushort}, q{setScissor}, q{ushort x, ushort y, ushort width, ushort height}, `C++, "bgfx"`],
/**
* Set scissor from cache for draw primitive.
* Remarks:
* To scissor for all primitives in view see `bgfx::setViewScissor`.
Params:
cache = Index in scissor cache.
*/
[q{void}, q{setScissor}, q{ushort cache=ushort.max}, `C++, "bgfx"`],
/**
* Set model matrix for draw primitive. If it is not called,
* the model will be rendered with an identity model matrix.
Params:
mtx = Pointer to first matrix in array.
num = Number of matrices in array.
*/
[q{uint}, q{setTransform}, q{const(void)* mtx, ushort num}, `C++, "bgfx"`],
/**
* Set model matrix from matrix cache for draw primitive.
Params:
cache = Index in matrix cache.
num = Number of matrices from cache.
*/
[q{void}, q{setTransform}, q{uint cache, ushort num=1}, `C++, "bgfx"`],
/**
* Reserve matrices in internal matrix cache.
* Attention: Pointer returned can be modified until `bgfx::frame` is called.
Params:
transform = Pointer to `Transform` structure.
num = Number of matrices.
*/
[q{uint}, q{allocTransform}, q{Transform* transform, ushort num}, `C++, "bgfx"`],
/**
* Set shader uniform parameter for draw primitive.
Params:
handle = Uniform.
value = Pointer to uniform data.
num = Number of elements. Passing `UINT16_MAX` will
use the _num passed on uniform creation.
*/
[q{void}, q{setUniform}, q{UniformHandle handle, const(void)* value, ushort num=1}, `C++, "bgfx"`],
/**
* Set index buffer for draw primitive.
Params:
handle = Index buffer.
*/
[q{void}, q{setIndexBuffer}, q{IndexBufferHandle handle}, `C++, "bgfx"`],
/**
* Set index buffer for draw primitive.
Params:
handle = Index buffer.
firstIndex = First index to render.
numIndices = Number of indices to render.
*/
[q{void}, q{setIndexBuffer}, q{IndexBufferHandle handle, uint firstIndex, uint numIndices}, `C++, "bgfx"`],
/**
* Set index buffer for draw primitive.
Params:
handle = Dynamic index buffer.
*/
[q{void}, q{setIndexBuffer}, q{DynamicIndexBufferHandle handle}, `C++, "bgfx"`],
/**
* Set index buffer for draw primitive.
Params:
handle = Dynamic index buffer.
firstIndex = First index to render.
numIndices = Number of indices to render.
*/
[q{void}, q{setIndexBuffer}, q{DynamicIndexBufferHandle handle, uint firstIndex, uint numIndices}, `C++, "bgfx"`],
/**
* Set index buffer for draw primitive.
Params:
tib = Transient index buffer.
*/
[q{void}, q{setIndexBuffer}, q{const(TransientIndexBuffer)* tib}, `C++, "bgfx"`],
/**
* Set index buffer for draw primitive.
Params:
tib = Transient index buffer.
firstIndex = First index to render.
numIndices = Number of indices to render.
*/
[q{void}, q{setIndexBuffer}, q{const(TransientIndexBuffer)* tib, uint firstIndex, uint numIndices}, `C++, "bgfx"`],
/**
* Set vertex buffer for draw primitive.
Params:
stream = Vertex stream.
handle = Vertex buffer.
*/
[q{void}, q{setVertexBuffer}, q{ubyte stream, VertexBufferHandle handle}, `C++, "bgfx"`],
/**
* Set vertex buffer for draw primitive.
Params:
stream = Vertex stream.
handle = Vertex buffer.
startVertex = First vertex to render.
numVertices = Number of vertices to render.
layoutHandle = Vertex layout for aliasing vertex buffer. If invalid
handle is used, vertex layout used for creation
of vertex buffer will be used.
*/
[q{void}, q{setVertexBuffer}, q{ubyte stream, VertexBufferHandle handle, uint startVertex, uint numVertices, VertexLayoutHandle layoutHandle=invalidHandle!VertexLayoutHandle}, `C++, "bgfx"`],
/**
* Set vertex buffer for draw primitive.
Params:
stream = Vertex stream.
handle = Dynamic vertex buffer.
*/
[q{void}, q{setVertexBuffer}, q{ubyte stream, DynamicVertexBufferHandle handle}, `C++, "bgfx"`],
/**
* Set vertex buffer for draw primitive.
Params:
stream = Vertex stream.
handle = Dynamic vertex buffer.
startVertex = First vertex to render.
numVertices = Number of vertices to render.
layoutHandle = Vertex layout for aliasing vertex buffer. If invalid
handle is used, vertex layout used for creation
of vertex buffer will be used.
*/
[q{void}, q{setVertexBuffer}, q{ubyte stream, DynamicVertexBufferHandle handle, uint startVertex, uint numVertices, VertexLayoutHandle layoutHandle=invalidHandle!VertexLayoutHandle}, `C++, "bgfx"`],
/**
* Set vertex buffer for draw primitive.
Params:
stream = Vertex stream.
tvb = Transient vertex buffer.
*/
[q{void}, q{setVertexBuffer}, q{ubyte stream, const(TransientVertexBuffer)* tvb}, `C++, "bgfx"`],
/**
* Set vertex buffer for draw primitive.
Params:
stream = Vertex stream.
tvb = Transient vertex buffer.
startVertex = First vertex to render.
numVertices = Number of vertices to render.
layoutHandle = Vertex layout for aliasing vertex buffer. If invalid
handle is used, vertex layout used for creation
of vertex buffer will be used.
*/
[q{void}, q{setVertexBuffer}, q{ubyte stream, const(TransientVertexBuffer)* tvb, uint startVertex, uint numVertices, VertexLayoutHandle layoutHandle=invalidHandle!VertexLayoutHandle}, `C++, "bgfx"`],
/**
* Set number of vertices for auto generated vertices use in conjunction
* with gl_VertexID.
* Attention: Availability depends on: `BGFX_CAPS_VERTEX_ID`.
Params:
numVertices = Number of vertices.
*/
[q{void}, q{setVertexCount}, q{uint numVertices}, `C++, "bgfx"`],
/**
* Set instance data buffer for draw primitive.
Params:
idb = Transient instance data buffer.
*/
[q{void}, q{setInstanceDataBuffer}, q{const(InstanceDataBuffer)* idb}, `C++, "bgfx"`],
/**
* Set instance data buffer for draw primitive.
Params:
idb = Transient instance data buffer.
start = First instance data.
num = Number of data instances.
*/
[q{void}, q{setInstanceDataBuffer}, q{const(InstanceDataBuffer)* idb, uint start, uint num}, `C++, "bgfx"`],
/**
* Set instance data buffer for draw primitive.
Params:
handle = Vertex buffer.
startVertex = First instance data.
num = Number of data instances.
*/
[q{void}, q{setInstanceDataBuffer}, q{VertexBufferHandle handle, uint startVertex, uint num}, `C++, "bgfx"`],
/**
* Set instance data buffer for draw primitive.
Params:
handle = Dynamic vertex buffer.
startVertex = First instance data.
num = Number of data instances.
*/
[q{void}, q{setInstanceDataBuffer}, q{DynamicVertexBufferHandle handle, uint startVertex, uint num}, `C++, "bgfx"`],
/**
* Set number of instances for auto generated instances use in conjunction
* with gl_InstanceID.
* Attention: Availability depends on: `BGFX_CAPS_VERTEX_ID`.
*/
[q{void}, q{setInstanceCount}, q{uint numInstances}, `C++, "bgfx"`],
/**
* Set texture stage for draw primitive.
Params:
stage = Texture unit.
sampler = Program sampler.
handle = Texture handle.
flags = Texture sampling mode. Default value UINT32_MAX uses
texture sampling settings from the texture.
- `BGFX_SAMPLER_[U/V/W]_[MIRROR/CLAMP]` - Mirror or clamp to edge wrap
mode.
- `BGFX_SAMPLER_[MIN/MAG/MIP]_[POINT/ANISOTROPIC]` - Point or anisotropic
sampling.
*/
[q{void}, q{setTexture}, q{ubyte stage, UniformHandle sampler, TextureHandle handle, uint flags=uint.max}, `C++, "bgfx"`],
/**
* Submit an empty primitive for rendering. Uniforms and draw state
* will be applied but no geometry will be submitted.
* Remarks:
* These empty draw calls will sort before ordinary draw calls.
Params:
id = View id.
*/
[q{void}, q{touch}, q{ViewID id}, `C++, "bgfx"`],
/**
* Submit primitive for rendering.
Params:
id = View id.
program = Program.
depth = Depth for sorting.
flags = Which states to discard for next draw. See `BGFX_DISCARD_*`.
*/
[q{void}, q{submit}, q{ViewID id, ProgramHandle program, uint depth=0, ubyte flags=Discard.all}, `C++, "bgfx"`],
/**
* Submit primitive with occlusion query for rendering.
Params:
id = View id.
program = Program.
occlusionQuery = Occlusion query.
depth = Depth for sorting.
flags = Which states to discard for next draw. See `BGFX_DISCARD_*`.
*/
[q{void}, q{submit}, q{ViewID id, ProgramHandle program, OcclusionQueryHandle occlusionQuery, uint depth=0, ubyte flags=Discard.all}, `C++, "bgfx"`],
/**
* Submit primitive for rendering with index and instance data info from
* indirect buffer.
* Attention: Availability depends on: `BGFX_CAPS_DRAW_INDIRECT`.
Params:
id = View id.
program = Program.
indirectHandle = Indirect buffer.
start = First element in indirect buffer.
num = Number of draws.
depth = Depth for sorting.
flags = Which states to discard for next draw. See `BGFX_DISCARD_*`.
*/
[q{void}, q{submit}, q{ViewID id, ProgramHandle program, IndirectBufferHandle indirectHandle, ushort start=0, ushort num=1, uint depth=0, ubyte flags=Discard.all}, `C++, "bgfx"`],
/**
* Submit primitive for rendering with index and instance data info and
* draw count from indirect buffers.
* Attention: Availability depends on: `BGFX_CAPS_DRAW_INDIRECT_COUNT`.
Params:
id = View id.
program = Program.
indirectHandle = Indirect buffer.
start = First element in indirect buffer.
numHandle = Buffer for number of draws. Must be
created with `BGFX_BUFFER_INDEX32` and `BGFX_BUFFER_DRAW_INDIRECT`.
numIndex = Element in number buffer.
numMax = Max number of draws.
depth = Depth for sorting.
flags = Which states to discard for next draw. See `BGFX_DISCARD_*`.
*/
[q{void}, q{submit}, q{ViewID id, ProgramHandle program, IndirectBufferHandle indirectHandle, ushort start, IndexBufferHandle numHandle, uint numIndex=0, ushort numMax=ushort.max, uint depth=0, ubyte flags=Discard.all}, `C++, "bgfx"`],
/**
* Set compute index buffer.
Params:
stage = Compute stage.
handle = Index buffer handle.
access = Buffer access. See `Access::Enum`.
*/
[q{void}, q{setBuffer}, q{ubyte stage, IndexBufferHandle handle, bgfx.fakeenum.Access.Enum access}, `C++, "bgfx"`],
/**
* Set compute vertex buffer.
Params:
stage = Compute stage.
handle = Vertex buffer handle.
access = Buffer access. See `Access::Enum`.
*/
[q{void}, q{setBuffer}, q{ubyte stage, VertexBufferHandle handle, bgfx.fakeenum.Access.Enum access}, `C++, "bgfx"`],
/**
* Set compute dynamic index buffer.
Params:
stage = Compute stage.
handle = Dynamic index buffer handle.
access = Buffer access. See `Access::Enum`.
*/
[q{void}, q{setBuffer}, q{ubyte stage, DynamicIndexBufferHandle handle, bgfx.fakeenum.Access.Enum access}, `C++, "bgfx"`],
/**
* Set compute dynamic vertex buffer.
Params:
stage = Compute stage.
handle = Dynamic vertex buffer handle.
access = Buffer access. See `Access::Enum`.
*/
[q{void}, q{setBuffer}, q{ubyte stage, DynamicVertexBufferHandle handle, bgfx.fakeenum.Access.Enum access}, `C++, "bgfx"`],
/**
* Set compute indirect buffer.
Params:
stage = Compute stage.
handle = Indirect buffer handle.
access = Buffer access. See `Access::Enum`.
*/
[q{void}, q{setBuffer}, q{ubyte stage, IndirectBufferHandle handle, bgfx.fakeenum.Access.Enum access}, `C++, "bgfx"`],
/**
* Set compute image from texture.
Params:
stage = Compute stage.
handle = Texture handle.
mip = Mip level.
access = Image access. See `Access::Enum`.
format = Texture format. See: `TextureFormat::Enum`.
*/
[q{void}, q{setImage}, q{ubyte stage, TextureHandle handle, ubyte mip, bgfx.fakeenum.Access.Enum access, bgfx.fakeenum.TextureFormat.Enum format=TextureFormat.count}, `C++, "bgfx"`],
/**
* Dispatch compute.
Params:
id = View id.
program = Compute program.
numX = Number of groups X.
numY = Number of groups Y.
numZ = Number of groups Z.
flags = Discard or preserve states. See `BGFX_DISCARD_*`.
*/
[q{void}, q{dispatch}, q{ViewID id, ProgramHandle program, uint numX=1, uint numY=1, uint numZ=1, ubyte flags=Discard.all}, `C++, "bgfx"`],
/**
* Dispatch compute indirect.
Params:
id = View id.
program = Compute program.
indirectHandle = Indirect buffer.
start = First element in indirect buffer.
num = Number of dispatches.
flags = Discard or preserve states. See `BGFX_DISCARD_*`.
*/
[q{void}, q{dispatch}, q{ViewID id, ProgramHandle program, IndirectBufferHandle indirectHandle, ushort start=0, ushort num=1, ubyte flags=Discard.all}, `C++, "bgfx"`],
/**
* Discard previously set state for draw or compute call.
Params:
flags = Draw/compute states to discard.
*/
[q{void}, q{discard}, q{ubyte flags=Discard.all}, `C++, "bgfx"`],
/**
* Blit 2D texture region between two 2D textures.
* Attention: Destination texture must be created with `BGFX_TEXTURE_BLIT_DST` flag.
* Attention: Availability depends on: `BGFX_CAPS_TEXTURE_BLIT`.
Params:
id = View id.
dst = Destination texture handle.
dstX = Destination texture X position.
dstY = Destination texture Y position.
src = Source texture handle.
srcX = Source texture X position.
srcY = Source texture Y position.
width = Width of region.
height = Height of region.
*/
[q{void}, q{blit}, q{ViewID id, TextureHandle dst, ushort dstX, ushort dstY, TextureHandle src, ushort srcX=0, ushort srcY=0, ushort width=ushort.max, ushort height=ushort.max}, `C++, "bgfx"`],
/**
* Blit 2D texture region between two 2D textures.
* Attention: Destination texture must be created with `BGFX_TEXTURE_BLIT_DST` flag.
* Attention: Availability depends on: `BGFX_CAPS_TEXTURE_BLIT`.
Params:
id = View id.
dst = Destination texture handle.
dstMIP = Destination texture mip level.
dstX = Destination texture X position.
dstY = Destination texture Y position.
dstZ = If texture is 2D this argument should be 0. If destination texture is cube
this argument represents destination texture cube face. For 3D texture this argument
represents destination texture Z position.
src = Source texture handle.
srcMIP = Source texture mip level.
srcX = Source texture X position.
srcY = Source texture Y position.
srcZ = If texture is 2D this argument should be 0. If source texture is cube
this argument represents source texture cube face. For 3D texture this argument
represents source texture Z position.
width = Width of region.
height = Height of region.
depth = If texture is 3D this argument represents depth of region, otherwise it's
unused.
*/
[q{void}, q{blit}, q{ViewID id, TextureHandle dst, ubyte dstMIP, ushort dstX, ushort dstY, ushort dstZ, TextureHandle src, ubyte srcMIP=0, ushort srcX=0, ushort srcY=0, ushort srcZ=0, ushort width=ushort.max, ushort height=ushort.max, ushort depth=ushort.max}, `C++, "bgfx"`],
]);
return ret;
}(), __MODULE__, "Resolution, Init, Attachment, VertexLayout, Encoder, "));
static if(!staticBinding):
import bindbc.loader;
debug{
mixin(makeDynloadFns("Bgfx", makeLibPaths(["bgfx-shared-libDebug", "bgfxDebug", "bgfx"]), [__MODULE__]));
}else{
mixin(makeDynloadFns("Bgfx", makeLibPaths(["bgfx-shared-libRelease", "bgfxRelease", "bgfx"]), [__MODULE__]));
}
|
D
|
/Users/zyang/SNGithub/Cosmos/Build/Intermediates/Cosmos.build/Debug-iphonesimulator/Cosmos.build/Objects-normal/x86_64/Movie.o : /Users/zyang/SNGithub/Cosmos/Cosmos/Curve.swift /Users/zyang/SNGithub/Cosmos/Cosmos/Shape+Creation.swift /Users/zyang/SNGithub/Cosmos/Cosmos/Wedge.swift /Users/zyang/SNGithub/Cosmos/Cosmos/Image.swift /Users/zyang/SNGithub/Cosmos/Cosmos/Checkerboard.swift /Users/zyang/SNGithub/Cosmos/Cosmos/RegularPolygon.swift /Users/zyang/SNGithub/Cosmos/Cosmos/EventSource.swift /Users/zyang/SNGithub/Cosmos/Cosmos/UIImage+AddRemove.swift /Users/zyang/SNGithub/Cosmos/Cosmos/Bloom.swift /Users/zyang/SNGithub/Cosmos/Cosmos/Rectangle.swift /Users/zyang/SNGithub/Cosmos/Cosmos/AstrologicalSignProvider.swift /Users/zyang/SNGithub/Cosmos/Cosmos/ScreenRecorder.swift /Users/zyang/SNGithub/Cosmos/Cosmos/ImageLayer.swift /Users/zyang/SNGithub/Cosmos/Cosmos/HueAdjust.swift /Users/zyang/SNGithub/Cosmos/Cosmos/QuadCurve.swift /Users/zyang/SNGithub/Cosmos/Cosmos/Vector.swift /Users/zyang/SNGithub/Cosmos/Cosmos/AppDelegate.swift /Users/zyang/SNGithub/Cosmos/Cosmos/View.swift /Users/zyang/SNGithub/Cosmos/Cosmos/Image+Filter.swift /Users/zyang/SNGithub/Cosmos/Cosmos/Stars.swift /Users/zyang/SNGithub/Cosmos/Cosmos/StarsBig.swift /Users/zyang/SNGithub/Cosmos/Cosmos/View+Shadow.swift /Users/zyang/SNGithub/Cosmos/Cosmos/StarsBackground.swift /Users/zyang/SNGithub/Cosmos/Cosmos/PlayerLayer.swift /Users/zyang/SNGithub/Cosmos/Cosmos/Sepia.swift /Users/zyang/SNGithub/Cosmos/Cosmos/StarsSmall.swift /Users/zyang/SNGithub/Cosmos/Cosmos/Transform.swift /Users/zyang/SNGithub/Cosmos/Cosmos/Pixel.swift /Users/zyang/SNGithub/Cosmos/Cosmos/Shape.swift /Users/zyang/SNGithub/Cosmos/Cosmos/Line.swift /Users/zyang/SNGithub/Cosmos/Cosmos/View+Animation.swift /Users/zyang/SNGithub/Cosmos/Cosmos/Arc.swift /Users/zyang/SNGithub/Cosmos/Cosmos/UIGestureRecognizer+Closure.swift /Users/zyang/SNGithub/Cosmos/Cosmos/MenuShadow.swift /Users/zyang/SNGithub/Cosmos/Cosmos/GradientLayer.swift /Users/zyang/SNGithub/Cosmos/Cosmos/StoredAnimation.swift /Users/zyang/SNGithub/Cosmos/Cosmos/MenuIcons.swift /Users/zyang/SNGithub/Cosmos/Cosmos/Ellipse.swift /Users/zyang/SNGithub/Cosmos/Cosmos/Foundation.swift /Users/zyang/SNGithub/Cosmos/Cosmos/View+Border.swift /Users/zyang/SNGithub/Cosmos/Cosmos/Rect.swift /Users/zyang/SNGithub/Cosmos/Cosmos/UIViewController+C4View.swift /Users/zyang/SNGithub/Cosmos/Cosmos/Size.swift /Users/zyang/SNGithub/Cosmos/Cosmos/TextShape.swift /Users/zyang/SNGithub/Cosmos/Cosmos/Image+Crop.swift /Users/zyang/SNGithub/Cosmos/Cosmos/Color.swift /Users/zyang/SNGithub/Cosmos/Cosmos/Star.swift /Users/zyang/SNGithub/Cosmos/Cosmos/Circle.swift /Users/zyang/SNGithub/Cosmos/Cosmos/LinearGradient.swift /Users/zyang/SNGithub/Cosmos/Cosmos/Font.swift /Users/zyang/SNGithub/Cosmos/Cosmos/Movie.swift /Users/zyang/SNGithub/Cosmos/Cosmos/Point.swift /Users/zyang/SNGithub/Cosmos/Cosmos/Sharpen.swift /Users/zyang/SNGithub/Cosmos/Cosmos/DotScreen.swift /Users/zyang/SNGithub/Cosmos/Cosmos/Filter.swift /Users/zyang/SNGithub/Cosmos/Cosmos/Timer.swift /Users/zyang/SNGithub/Cosmos/Cosmos/Path.swift /Users/zyang/SNGithub/Cosmos/Cosmos/InfiniteScrollView.swift /Users/zyang/SNGithub/Cosmos/Cosmos/UIView+AddRemove.swift /Users/zyang/SNGithub/Cosmos/Cosmos/MenuSelector.swift /Users/zyang/SNGithub/Cosmos/Cosmos/ViewAnimation.swift /Users/zyang/SNGithub/Cosmos/Cosmos/CanvasController.swift /Users/zyang/SNGithub/Cosmos/Cosmos/Animation.swift /Users/zyang/SNGithub/Cosmos/Cosmos/Generator.swift /Users/zyang/SNGithub/Cosmos/Cosmos/View+KeyValues.swift /Users/zyang/SNGithub/Cosmos/Cosmos/View+Render.swift /Users/zyang/SNGithub/Cosmos/Cosmos/InfoPanel.swift /Users/zyang/SNGithub/Cosmos/Cosmos/ColorBurn.swift /Users/zyang/SNGithub/Cosmos/Cosmos/Gradient.swift /Users/zyang/SNGithub/Cosmos/Cosmos/Triangle.swift /Users/zyang/SNGithub/Cosmos/Cosmos/Twirl.swift /Users/zyang/SNGithub/Cosmos/Cosmos/Menu.swift /Users/zyang/SNGithub/Cosmos/Cosmos/Math.swift /Users/zyang/SNGithub/Cosmos/Cosmos/SignLines.swift /Users/zyang/SNGithub/Cosmos/Cosmos/Polygon.swift /Users/zyang/SNGithub/Cosmos/Cosmos/Layer.swift /Users/zyang/SNGithub/Cosmos/Cosmos/ShapeLayer.swift /Users/zyang/SNGithub/Cosmos/Cosmos/Image+Generator.swift /Users/zyang/SNGithub/Cosmos/Cosmos/GaussianBlur.swift /Users/zyang/SNGithub/Cosmos/Cosmos/WorkSpace.swift /Users/zyang/SNGithub/Cosmos/Cosmos/UIImage+Color.swift /Users/zyang/SNGithub/Cosmos/Cosmos/AudioPlayer.swift /Users/zyang/SNGithub/Cosmos/Cosmos/MenuRings.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/ObjectiveC.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreGraphics.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/UIKit.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/AVFoundation.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/CoreAudio.swiftmodule
/Users/zyang/SNGithub/Cosmos/Build/Intermediates/Cosmos.build/Debug-iphonesimulator/Cosmos.build/Objects-normal/x86_64/Movie~partial.swiftmodule : /Users/zyang/SNGithub/Cosmos/Cosmos/Curve.swift /Users/zyang/SNGithub/Cosmos/Cosmos/Shape+Creation.swift /Users/zyang/SNGithub/Cosmos/Cosmos/Wedge.swift /Users/zyang/SNGithub/Cosmos/Cosmos/Image.swift /Users/zyang/SNGithub/Cosmos/Cosmos/Checkerboard.swift /Users/zyang/SNGithub/Cosmos/Cosmos/RegularPolygon.swift /Users/zyang/SNGithub/Cosmos/Cosmos/EventSource.swift /Users/zyang/SNGithub/Cosmos/Cosmos/UIImage+AddRemove.swift /Users/zyang/SNGithub/Cosmos/Cosmos/Bloom.swift /Users/zyang/SNGithub/Cosmos/Cosmos/Rectangle.swift /Users/zyang/SNGithub/Cosmos/Cosmos/AstrologicalSignProvider.swift /Users/zyang/SNGithub/Cosmos/Cosmos/ScreenRecorder.swift /Users/zyang/SNGithub/Cosmos/Cosmos/ImageLayer.swift /Users/zyang/SNGithub/Cosmos/Cosmos/HueAdjust.swift /Users/zyang/SNGithub/Cosmos/Cosmos/QuadCurve.swift /Users/zyang/SNGithub/Cosmos/Cosmos/Vector.swift /Users/zyang/SNGithub/Cosmos/Cosmos/AppDelegate.swift /Users/zyang/SNGithub/Cosmos/Cosmos/View.swift /Users/zyang/SNGithub/Cosmos/Cosmos/Image+Filter.swift /Users/zyang/SNGithub/Cosmos/Cosmos/Stars.swift /Users/zyang/SNGithub/Cosmos/Cosmos/StarsBig.swift /Users/zyang/SNGithub/Cosmos/Cosmos/View+Shadow.swift /Users/zyang/SNGithub/Cosmos/Cosmos/StarsBackground.swift /Users/zyang/SNGithub/Cosmos/Cosmos/PlayerLayer.swift /Users/zyang/SNGithub/Cosmos/Cosmos/Sepia.swift /Users/zyang/SNGithub/Cosmos/Cosmos/StarsSmall.swift /Users/zyang/SNGithub/Cosmos/Cosmos/Transform.swift /Users/zyang/SNGithub/Cosmos/Cosmos/Pixel.swift /Users/zyang/SNGithub/Cosmos/Cosmos/Shape.swift /Users/zyang/SNGithub/Cosmos/Cosmos/Line.swift /Users/zyang/SNGithub/Cosmos/Cosmos/View+Animation.swift /Users/zyang/SNGithub/Cosmos/Cosmos/Arc.swift /Users/zyang/SNGithub/Cosmos/Cosmos/UIGestureRecognizer+Closure.swift /Users/zyang/SNGithub/Cosmos/Cosmos/MenuShadow.swift /Users/zyang/SNGithub/Cosmos/Cosmos/GradientLayer.swift /Users/zyang/SNGithub/Cosmos/Cosmos/StoredAnimation.swift /Users/zyang/SNGithub/Cosmos/Cosmos/MenuIcons.swift /Users/zyang/SNGithub/Cosmos/Cosmos/Ellipse.swift /Users/zyang/SNGithub/Cosmos/Cosmos/Foundation.swift /Users/zyang/SNGithub/Cosmos/Cosmos/View+Border.swift /Users/zyang/SNGithub/Cosmos/Cosmos/Rect.swift /Users/zyang/SNGithub/Cosmos/Cosmos/UIViewController+C4View.swift /Users/zyang/SNGithub/Cosmos/Cosmos/Size.swift /Users/zyang/SNGithub/Cosmos/Cosmos/TextShape.swift /Users/zyang/SNGithub/Cosmos/Cosmos/Image+Crop.swift /Users/zyang/SNGithub/Cosmos/Cosmos/Color.swift /Users/zyang/SNGithub/Cosmos/Cosmos/Star.swift /Users/zyang/SNGithub/Cosmos/Cosmos/Circle.swift /Users/zyang/SNGithub/Cosmos/Cosmos/LinearGradient.swift /Users/zyang/SNGithub/Cosmos/Cosmos/Font.swift /Users/zyang/SNGithub/Cosmos/Cosmos/Movie.swift /Users/zyang/SNGithub/Cosmos/Cosmos/Point.swift /Users/zyang/SNGithub/Cosmos/Cosmos/Sharpen.swift /Users/zyang/SNGithub/Cosmos/Cosmos/DotScreen.swift /Users/zyang/SNGithub/Cosmos/Cosmos/Filter.swift /Users/zyang/SNGithub/Cosmos/Cosmos/Timer.swift /Users/zyang/SNGithub/Cosmos/Cosmos/Path.swift /Users/zyang/SNGithub/Cosmos/Cosmos/InfiniteScrollView.swift /Users/zyang/SNGithub/Cosmos/Cosmos/UIView+AddRemove.swift /Users/zyang/SNGithub/Cosmos/Cosmos/MenuSelector.swift /Users/zyang/SNGithub/Cosmos/Cosmos/ViewAnimation.swift /Users/zyang/SNGithub/Cosmos/Cosmos/CanvasController.swift /Users/zyang/SNGithub/Cosmos/Cosmos/Animation.swift /Users/zyang/SNGithub/Cosmos/Cosmos/Generator.swift /Users/zyang/SNGithub/Cosmos/Cosmos/View+KeyValues.swift /Users/zyang/SNGithub/Cosmos/Cosmos/View+Render.swift /Users/zyang/SNGithub/Cosmos/Cosmos/InfoPanel.swift /Users/zyang/SNGithub/Cosmos/Cosmos/ColorBurn.swift /Users/zyang/SNGithub/Cosmos/Cosmos/Gradient.swift /Users/zyang/SNGithub/Cosmos/Cosmos/Triangle.swift /Users/zyang/SNGithub/Cosmos/Cosmos/Twirl.swift /Users/zyang/SNGithub/Cosmos/Cosmos/Menu.swift /Users/zyang/SNGithub/Cosmos/Cosmos/Math.swift /Users/zyang/SNGithub/Cosmos/Cosmos/SignLines.swift /Users/zyang/SNGithub/Cosmos/Cosmos/Polygon.swift /Users/zyang/SNGithub/Cosmos/Cosmos/Layer.swift /Users/zyang/SNGithub/Cosmos/Cosmos/ShapeLayer.swift /Users/zyang/SNGithub/Cosmos/Cosmos/Image+Generator.swift /Users/zyang/SNGithub/Cosmos/Cosmos/GaussianBlur.swift /Users/zyang/SNGithub/Cosmos/Cosmos/WorkSpace.swift /Users/zyang/SNGithub/Cosmos/Cosmos/UIImage+Color.swift /Users/zyang/SNGithub/Cosmos/Cosmos/AudioPlayer.swift /Users/zyang/SNGithub/Cosmos/Cosmos/MenuRings.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/ObjectiveC.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreGraphics.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/UIKit.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/AVFoundation.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/CoreAudio.swiftmodule
/Users/zyang/SNGithub/Cosmos/Build/Intermediates/Cosmos.build/Debug-iphonesimulator/Cosmos.build/Objects-normal/x86_64/Movie~partial.swiftdoc : /Users/zyang/SNGithub/Cosmos/Cosmos/Curve.swift /Users/zyang/SNGithub/Cosmos/Cosmos/Shape+Creation.swift /Users/zyang/SNGithub/Cosmos/Cosmos/Wedge.swift /Users/zyang/SNGithub/Cosmos/Cosmos/Image.swift /Users/zyang/SNGithub/Cosmos/Cosmos/Checkerboard.swift /Users/zyang/SNGithub/Cosmos/Cosmos/RegularPolygon.swift /Users/zyang/SNGithub/Cosmos/Cosmos/EventSource.swift /Users/zyang/SNGithub/Cosmos/Cosmos/UIImage+AddRemove.swift /Users/zyang/SNGithub/Cosmos/Cosmos/Bloom.swift /Users/zyang/SNGithub/Cosmos/Cosmos/Rectangle.swift /Users/zyang/SNGithub/Cosmos/Cosmos/AstrologicalSignProvider.swift /Users/zyang/SNGithub/Cosmos/Cosmos/ScreenRecorder.swift /Users/zyang/SNGithub/Cosmos/Cosmos/ImageLayer.swift /Users/zyang/SNGithub/Cosmos/Cosmos/HueAdjust.swift /Users/zyang/SNGithub/Cosmos/Cosmos/QuadCurve.swift /Users/zyang/SNGithub/Cosmos/Cosmos/Vector.swift /Users/zyang/SNGithub/Cosmos/Cosmos/AppDelegate.swift /Users/zyang/SNGithub/Cosmos/Cosmos/View.swift /Users/zyang/SNGithub/Cosmos/Cosmos/Image+Filter.swift /Users/zyang/SNGithub/Cosmos/Cosmos/Stars.swift /Users/zyang/SNGithub/Cosmos/Cosmos/StarsBig.swift /Users/zyang/SNGithub/Cosmos/Cosmos/View+Shadow.swift /Users/zyang/SNGithub/Cosmos/Cosmos/StarsBackground.swift /Users/zyang/SNGithub/Cosmos/Cosmos/PlayerLayer.swift /Users/zyang/SNGithub/Cosmos/Cosmos/Sepia.swift /Users/zyang/SNGithub/Cosmos/Cosmos/StarsSmall.swift /Users/zyang/SNGithub/Cosmos/Cosmos/Transform.swift /Users/zyang/SNGithub/Cosmos/Cosmos/Pixel.swift /Users/zyang/SNGithub/Cosmos/Cosmos/Shape.swift /Users/zyang/SNGithub/Cosmos/Cosmos/Line.swift /Users/zyang/SNGithub/Cosmos/Cosmos/View+Animation.swift /Users/zyang/SNGithub/Cosmos/Cosmos/Arc.swift /Users/zyang/SNGithub/Cosmos/Cosmos/UIGestureRecognizer+Closure.swift /Users/zyang/SNGithub/Cosmos/Cosmos/MenuShadow.swift /Users/zyang/SNGithub/Cosmos/Cosmos/GradientLayer.swift /Users/zyang/SNGithub/Cosmos/Cosmos/StoredAnimation.swift /Users/zyang/SNGithub/Cosmos/Cosmos/MenuIcons.swift /Users/zyang/SNGithub/Cosmos/Cosmos/Ellipse.swift /Users/zyang/SNGithub/Cosmos/Cosmos/Foundation.swift /Users/zyang/SNGithub/Cosmos/Cosmos/View+Border.swift /Users/zyang/SNGithub/Cosmos/Cosmos/Rect.swift /Users/zyang/SNGithub/Cosmos/Cosmos/UIViewController+C4View.swift /Users/zyang/SNGithub/Cosmos/Cosmos/Size.swift /Users/zyang/SNGithub/Cosmos/Cosmos/TextShape.swift /Users/zyang/SNGithub/Cosmos/Cosmos/Image+Crop.swift /Users/zyang/SNGithub/Cosmos/Cosmos/Color.swift /Users/zyang/SNGithub/Cosmos/Cosmos/Star.swift /Users/zyang/SNGithub/Cosmos/Cosmos/Circle.swift /Users/zyang/SNGithub/Cosmos/Cosmos/LinearGradient.swift /Users/zyang/SNGithub/Cosmos/Cosmos/Font.swift /Users/zyang/SNGithub/Cosmos/Cosmos/Movie.swift /Users/zyang/SNGithub/Cosmos/Cosmos/Point.swift /Users/zyang/SNGithub/Cosmos/Cosmos/Sharpen.swift /Users/zyang/SNGithub/Cosmos/Cosmos/DotScreen.swift /Users/zyang/SNGithub/Cosmos/Cosmos/Filter.swift /Users/zyang/SNGithub/Cosmos/Cosmos/Timer.swift /Users/zyang/SNGithub/Cosmos/Cosmos/Path.swift /Users/zyang/SNGithub/Cosmos/Cosmos/InfiniteScrollView.swift /Users/zyang/SNGithub/Cosmos/Cosmos/UIView+AddRemove.swift /Users/zyang/SNGithub/Cosmos/Cosmos/MenuSelector.swift /Users/zyang/SNGithub/Cosmos/Cosmos/ViewAnimation.swift /Users/zyang/SNGithub/Cosmos/Cosmos/CanvasController.swift /Users/zyang/SNGithub/Cosmos/Cosmos/Animation.swift /Users/zyang/SNGithub/Cosmos/Cosmos/Generator.swift /Users/zyang/SNGithub/Cosmos/Cosmos/View+KeyValues.swift /Users/zyang/SNGithub/Cosmos/Cosmos/View+Render.swift /Users/zyang/SNGithub/Cosmos/Cosmos/InfoPanel.swift /Users/zyang/SNGithub/Cosmos/Cosmos/ColorBurn.swift /Users/zyang/SNGithub/Cosmos/Cosmos/Gradient.swift /Users/zyang/SNGithub/Cosmos/Cosmos/Triangle.swift /Users/zyang/SNGithub/Cosmos/Cosmos/Twirl.swift /Users/zyang/SNGithub/Cosmos/Cosmos/Menu.swift /Users/zyang/SNGithub/Cosmos/Cosmos/Math.swift /Users/zyang/SNGithub/Cosmos/Cosmos/SignLines.swift /Users/zyang/SNGithub/Cosmos/Cosmos/Polygon.swift /Users/zyang/SNGithub/Cosmos/Cosmos/Layer.swift /Users/zyang/SNGithub/Cosmos/Cosmos/ShapeLayer.swift /Users/zyang/SNGithub/Cosmos/Cosmos/Image+Generator.swift /Users/zyang/SNGithub/Cosmos/Cosmos/GaussianBlur.swift /Users/zyang/SNGithub/Cosmos/Cosmos/WorkSpace.swift /Users/zyang/SNGithub/Cosmos/Cosmos/UIImage+Color.swift /Users/zyang/SNGithub/Cosmos/Cosmos/AudioPlayer.swift /Users/zyang/SNGithub/Cosmos/Cosmos/MenuRings.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/ObjectiveC.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreGraphics.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/UIKit.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/AVFoundation.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/CoreAudio.swiftmodule
|
D
|
Long: location
Short: L
Help: Follow redirects
Protocols: HTTP
Category: http
---
If the server reports that the requested page has moved to a different
location (indicated with a Location: header and a 3XX response code), this
option will make curl redo the request on the new place. If used together with
--include or --head, headers from all requested pages will be shown. When
authentication is used, curl only sends its credentials to the initial
host. If a redirect takes curl to a different host, it won't be able to
intercept the user+password. See also --location-trusted on how to change
this. You can limit the amount of redirects to follow by using the
--max-redirs option.
When curl follows a redirect and if the request is a POST, it will send the
following request with a GET if the HTTP response was 301, 302, or 303. If the
response code was any other 3xx code, curl will re-send the following request
using the same unmodified method.
You can tell curl to not change POST requests to GET after a 30x response by
using the dedicated options for that: --post301, --post302 and --post303.
The method set with --request overrides the method curl would otherwise select
to use.
|
D
|
instance ORG_819_Drax(Npc_Default)
{
name[0] = "Drax";
npcType = npctype_main;
guild = GIL_ORG;
level = 3;
voice = 6;
id = 819;
attribute[ATR_STRENGTH] = 30;
attribute[ATR_DEXTERITY] = 30;
attribute[ATR_MANA_MAX] = 0;
attribute[ATR_MANA] = 0;
attribute[ATR_HITPOINTS_MAX] = 136;
attribute[ATR_HITPOINTS] = 136;
Mdl_SetVisual(self,"HUMANS.MDS");
Mdl_SetVisualBody(self,"hum_body_Naked0",0,1,"Hum_Head_FatBald",39,2,org_armor_l);
B_Scale(self);
Mdl_SetModelFatness(self,0);
aivar[AIV_IMPORTANT] = TRUE;
fight_tactic = FAI_HUMAN_Strong;
Npc_SetTalentSkill(self,NPC_TALENT_BOW,1);
Npc_SetTalentSkill(self,NPC_TALENT_1H,1);
CreateInvItems(self,ItKeLockpick,2);
CreateInvItems(self,ItMiNugget,14);
CreateInvItems(self,ItFoRice,6);
CreateInvItems(self,ItFoBooze,2);
CreateInvItems(self,ItLsTorch,3);
CreateInvItems(self,ItFo_Potion_Health_01,3);
CreateInvItem(self,ItMi_Stuff_Plate_01);
CreateInvItem(self,ItMi_Stuff_Cup_01);
CreateInvItem(self,ItFoLoaf);
CreateInvItem(self,ItAt_Claws_01);
EquipItem(self,ItMw_1H_Mace_03);
EquipItem(self,ItRw_Bow_Long_01);
CreateInvItems(self,ItAmArrow,20);
daily_routine = Rtn_Start_819;
};
func void Rtn_Start_819()
{
TA_Smalltalk(0,0,23,0,"OW_PATH_1_5_B");
TA_Smalltalk(23,0,0,0,"OW_PATH_1_5_B");
};
|
D
|
<?xml version="1.0" encoding="ASCII"?>
<di:SashWindowsMngr xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:di="http://www.eclipse.org/papyrus/0.7.0/sashdi">
<pageList>
<availablePage>
<emfPageIdentifier href="MVC.notation#_Ry90kLZBEeWZwYkJ7VRa0A"/>
</availablePage>
</pageList>
<sashModel currentSelection="//@sashModel/@windows.0/@children.0">
<windows>
<children xsi:type="di:TabFolder">
<children>
<emfPageIdentifier href="MVC.notation#_Ry90kLZBEeWZwYkJ7VRa0A"/>
</children>
</children>
</windows>
</sashModel>
</di:SashWindowsMngr>
|
D
|
module sceneparser.shapes.Cube;
import raytracer.Colors;
import raytracer.Materials;
import raytracer.Math;
import raytracer.MathShapes;
import raytracer.RTObject;
import raytracer.Vector;
import sceneparser.general.Context;
import sceneparser.general.Expression;
import sceneparser.general.ParameterList;
import sceneparser.general.Value;
import sceneparser.shapes.Shape;
import tango.io.Stdout;
import tango.text.convert.Format;
import Float = tango.text.convert.Float;
class Cube: Shape
{
private Vector center = {0, 0, 0};
private double length;
private Colors color = {0, 0, 0};
private double reflectivity = 0, transparency = 0;
Expression parameters;
public this(Context con, Expression expr)
{
super(con);
parameters = expr;
}
private void checkParameters()
{
try
{
ParameterList p_list = cast(ParameterList)parameters;
int i = 0;
if (p_list[i].isVector)
center = p_list[i++].toVector;
length = p_list[i++].toNumber;
if (p_list.length >= i + 1)
color = p_list[i++].toColor();
if (p_list.length >= i + 1)
reflectivity = p_list[i++].toNumber;
if (p_list.length >= i + 1)
transparency = p_list[i++].toNumber;
}
catch (TypeMismatchException)
{
Stdout("Error handling parameters to cube.").newline;
}
}
private RTObject createRTObject()
{
checkParameters();
RTObject object = new RTObject(new MathCube(center, length),
new SolidColorMaterial(color, reflectivity, transparency));
context.rt.applyCurrentTransformation(object);
return object;
}
public override ObjectReference getValue()
{
return new ObjectReference(createRTObject());
}
}
|
D
|
module mach.io.stream.asarray;
private:
import mach.traits : hasNumericLength;
import mach.text : text;
import mach.io.stream.exceptions;
import mach.io.stream.io;
import mach.io.stream.templates;
public:
/// Get the contents of a stream as an array.
auto asarray(Element = char, Stream)(auto ref Stream source) if(
isFiniteInputStream!Stream
){
Element[] array;
static if(hasNumericLength!Stream && isTellStream!Stream){ // Known length
array.length = (source.length - source.position) / Element.sizeof;
auto result = source.readbuffer(array);
if(result != array.length){
throw new StreamReadException(text(
"Failed to get stream contents as array. Expected ", array.length,
" elements but found ", result, "."
));
}
}else{ // Unknown but finite length
while(!source.eof){
Element element;
auto result = source.readbuffer(&element);
if(result != 1) break;
array ~= element;
}
}
return array;
}
/// Get the up to the first so many elements of a stream as an array.
auto asarray(Element = char, Stream)(auto ref Stream source, in size_t limit) if(
isInputStream!Stream
){
Element[] array;
static if(hasNumericLength!Stream){
static if(isTellStream!Stream) auto length = source.length - source.position;
else auto length = source.length;
length /= Element.sizeof;
array.reserve(length < limit ? length : limit);
}else{
array.reserve(limit);
}
while(array.length < limit){
Element element;
auto result = source.readbuffer(&element);
if(result != 1) break;
array ~= element;
}
return array;
}
version(unittest){
private:
import std.path;
import mach.test;
import mach.io.stream.filestream : FileStream;
enum string TestPath = __FILE_FULL_PATH__.dirName ~ "/range.txt";
}
unittest{
tests("Stream as array", {
tests("Implicit length", {
auto stream = FileStream(TestPath, "rb");
auto array = stream.asarray;
testeq(array.length, 85);
testeq(array[0..32], "I am used to validate unittests.");
stream.close;
});
tests("Explicit length", {
tests("Shorter than stream", {
auto stream = FileStream(TestPath, "rb");
auto array = stream.asarray(32);
testeq(array.length, 32);
testeq(array, "I am used to validate unittests.");
stream.close;
});
tests("Longer than stream", {
auto stream = FileStream(TestPath, "rb");
auto array = stream.asarray(100);
testeq(array.length, 85);
testeq(array[0..32], "I am used to validate unittests.");
stream.close;
});
});
});
}
|
D
|
<?xml version="1.0" encoding="ASCII" standalone="no"?>
<di:SashWindowsMngr xmlns:di="http://www.eclipse.org/papyrus/0.7.0/sashdi" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmi:version="2.0">
<pageList>
<availablePage>
<emfPageIdentifier href="VAR_17_BeT-9166248174.notation#_copSALmGEeKQQp7P9cQvNQ"/>
</availablePage>
</pageList>
<sashModel currentSelection="//@sashModel/@windows.0/@children.0">
<windows>
<children xsi:type="di:TabFolder">
<children>
<emfPageIdentifier href="VAR_17_BeT-9166248174.notation#_copSALmGEeKQQp7P9cQvNQ"/>
</children>
</children>
</windows>
</sashModel>
</di:SashWindowsMngr>
|
D
|
module ogre.materials._package;
/** \addtogroup Core
* @{
*/
/** \addtogroup Materials
* @{
*/
public
{
import ogre.materials.autoparamdatasource;
import ogre.materials.gpuprogram;
import ogre.materials.material;
import ogre.materials.materialmanager;
import ogre.materials.pass;
import ogre.materials.blendmode;
import ogre.materials.technique;
import ogre.materials.textureunitstate;
}
/** @} */
/** @} */
|
D
|
<?xml version="1.0" encoding="ASCII" standalone="no"?>
<di:SashWindowsMngr xmlns:di="http://www.eclipse.org/papyrus/0.7.0/sashdi" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmi:version="2.0">
<pageList>
<availablePage>
<emfPageIdentifier href="VAR_6_MobileMedia-6183634883.notation#_copSALmGEeKQQp7P9cQvNQ"/>
</availablePage>
</pageList>
<sashModel currentSelection="//@sashModel/@windows.0/@children.0">
<windows>
<children xsi:type="di:TabFolder">
<children>
<emfPageIdentifier href="VAR_6_MobileMedia-6183634883.notation#_copSALmGEeKQQp7P9cQvNQ"/>
</children>
</children>
</windows>
</sashModel>
</di:SashWindowsMngr>
|
D
|
/*************************************************************************/
/* godot.core.string */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* 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 godot.core.string;
import core.stdc.stddef : wchar_t;
import core.stdc.string : strlen;
import godot.c;
import std.traits;
struct String
{
package(godot) godot_string _godot_string;
/// postblit (Vector is CoW, so no data copying is done)
this(this)
{
godot_string other = _godot_string;
godot_string_new_copy(&_godot_string, &other);
}
package(godot) this(in godot_string str)
{
_godot_string = str;
}
/++
UTF-8 constructor. S can be a slice (like `string`) or a null-terminated pointer.
+/
this(S)(in S str) if(isImplicitlyConvertible!(S, const(char)[]) ||
isImplicitlyConvertible!(S, const(char)*))
{
static if(isImplicitlyConvertible!(S, const(char)[]))
{
const(char)[] contents = str;
godot_string_new_data(&_godot_string, contents.ptr, cast(int)contents.length);
}
else
{
const(char)* contents = str;
godot_string_new_data(&_godot_string, contents, cast(int)strlen(contents));
}
}
~this()
{
godot_string_destroy(&_godot_string);
}
void opAssign(in String other)
{
godot_string_destroy(&_godot_string);
godot_string_new_copy(&_godot_string, &other._godot_string);
}
/+String substr(int p_from,int p_chars) const
{
return String.empty; // todo
}
alias opSlice = substr;+/
ref wchar_t opIndex(in int idx)
{
return *godot_string_operator_index(&_godot_string, idx);
}
wchar_t opIndex(in int idx) const
{
return *godot_string_operator_index(cast(godot_string*) &_godot_string, idx);
}
int length() const
{
int len = 0;
godot_string_get_data(&_godot_string, null, &len);
return len;
}
int opCmp(in ref String s)
{
auto equal = godot_string_operator_equal(&_godot_string, &s._godot_string);
if(equal) return 0;
auto less = godot_string_operator_less(&_godot_string, &s._godot_string);
return less?(-1):1;
}
String opBinary(string op : "~")(in String other) const
{
String ret = void;
ret._godot_string = godot_string_operator_plus(&_godot_string, &other._godot_string);
return ret;
}
void opOpAssign(string op : "~")(in String other)
{
_godot_string = godot_string_operator_plus(&_godot_string, &other._godot_string);
}
const(char*) c_string() const
{
return godot_string_c_str(&_godot_string);
}
/*const(char[]) d_string() const
{
return godot_string_c_str(&_godot_string)[0..length];
}*/
}
|
D
|
/* THIS FILE GENERATED BY bcd.gen */
module bcd.fltk2.utf;
align(4):
public import bcd.bind;
public import bcd.fltk2.FL_API;
alias int function(void *, void *) _BCD_func__426;
|
D
|
module android.java.android.provider.ContactsContract_Contacts_Entity_d_interface;
import arsd.jni : IJavaObjectImplementation, JavaPackageId, JavaName, IJavaObject, ImportExportImpl, JavaInterfaceMembers;
static import arsd.jni;
import import0 = android.java.java.lang.Class_d_interface;
@JavaName("ContactsContract$Contacts$Entity")
final class ContactsContract_Contacts_Entity : IJavaObject {
static immutable string[] _d_canCastTo = [
"android/provider/BaseColumns",
"android/provider/ContactsContract$ContactsColumns",
"android/provider/ContactsContract$ContactNameColumns",
"android/provider/ContactsContract$RawContactsColumns",
"android/provider/ContactsContract$BaseSyncColumns",
"android/provider/ContactsContract$SyncColumns",
"android/provider/ContactsContract$DataColumns",
"android/provider/ContactsContract$StatusColumns",
"android/provider/ContactsContract$ContactOptionsColumns",
"android/provider/ContactsContract$ContactStatusColumns",
"android/provider/ContactsContract$DataUsageStatColumns",
];
@Import import0.Class getClass();
@Import int hashCode();
@Import bool equals(IJavaObject);
@Import @JavaName("toString") string toString_();
override string toString() { return arsd.jni.javaObjectToString(this); }
@Import void notify();
@Import void notifyAll();
@Import void wait(long);
@Import void wait(long, int);
@Import void wait();
mixin IJavaObjectImplementation!(false);
public static immutable string _javaParameterString = "Landroid/provider/ContactsContract$Contacts$Entity;";
}
|
D
|
instance Mod_971_RIT_Fajeth_NW (Npc_Default)
{
// ------ NSC ------
name = "Fajeth";
guild = GIL_PAL;
id = 971;
voice = 12;
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);
EquipItem (self, ItRw_Mil_Crossbow);
// ------ 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_Fighter", Face_N_Fingers, BodyTex_N, ITAR_PAL_M);
Mdl_SetModelFatness (self, 0);
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, 65); //Grenzen für Talent-Level liegen bei 30 und 60
// ------ TA anmelden ------
daily_routine = Rtn_Start_971;
};
FUNC VOID Rtn_Start_971 ()
{
TA_Stand_Guarding (08,00,23,00,"NW_CITY_UPTOWN_HUT_02_ENTRY");
TA_Stand_Guarding (23,00,08,00,"NW_CITY_UPTOWN_HUT_02_ENTRY");
};
|
D
|
/Users/Fklemke/swiftbenchmarkproject/vaporJSON/.build/debug/Configs.build/Node+Merge.swift.o : /Users/Fklemke/swiftbenchmarkproject/vaporJSON/.build/checkouts/vapor.git-5492988889259800272/Sources/Configs/Source.swift /Users/Fklemke/swiftbenchmarkproject/vaporJSON/.build/checkouts/vapor.git-5492988889259800272/Sources/Configs/Node+Merge.swift /Users/Fklemke/swiftbenchmarkproject/vaporJSON/.build/checkouts/vapor.git-5492988889259800272/Sources/Configs/KeyAccessible+Merge.swift /Users/Fklemke/swiftbenchmarkproject/vaporJSON/.build/checkouts/vapor.git-5492988889259800272/Sources/Configs/ConfigInitializable.swift /Users/Fklemke/swiftbenchmarkproject/vaporJSON/.build/checkouts/vapor.git-5492988889259800272/Sources/Configs/KeyAccessible.swift /Users/Fklemke/swiftbenchmarkproject/vaporJSON/.build/checkouts/vapor.git-5492988889259800272/Sources/Configs/Config.swift /Users/Fklemke/swiftbenchmarkproject/vaporJSON/.build/checkouts/vapor.git-5492988889259800272/Sources/Configs/ConfigError.swift /Users/Fklemke/swiftbenchmarkproject/vaporJSON/.build/checkouts/vapor.git-5492988889259800272/Sources/Configs/Config+Arguments.swift /Users/Fklemke/swiftbenchmarkproject/vaporJSON/.build/checkouts/vapor.git-5492988889259800272/Sources/Configs/Environment.swift /Users/Fklemke/swiftbenchmarkproject/vaporJSON/.build/checkouts/vapor.git-5492988889259800272/Sources/Configs/Env/Node+Env.swift /Users/Fklemke/swiftbenchmarkproject/vaporJSON/.build/checkouts/vapor.git-5492988889259800272/Sources/Configs/Env/String+Env.swift /Users/Fklemke/swiftbenchmarkproject/vaporJSON/.build/checkouts/vapor.git-5492988889259800272/Sources/Configs/Env/Env.swift /Users/Fklemke/swiftbenchmarkproject/vaporJSON/.build/checkouts/vapor.git-5492988889259800272/Sources/Configs/Config+Directory.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/Fklemke/swiftbenchmarkproject/vaporJSON/.build/debug/JSON.swiftmodule /Users/Fklemke/swiftbenchmarkproject/vaporJSON/.build/debug/libc.swiftmodule /Users/Fklemke/swiftbenchmarkproject/vaporJSON/.build/debug/Node.swiftmodule /Users/Fklemke/swiftbenchmarkproject/vaporJSON/.build/debug/PathIndexable.swiftmodule /Users/Fklemke/swiftbenchmarkproject/vaporJSON/.build/debug/Core.swiftmodule /Users/Fklemke/swiftbenchmarkproject/vaporJSON/.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/Fklemke/swiftbenchmarkproject/vaporJSON/.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/Fklemke/swiftbenchmarkproject/vaporJSON/.build/checkouts/ctls.git-9210868160426949823/module.modulemap /Users/Fklemke/swiftbenchmarkproject/vaporJSON/.build/debug/CHTTP.build/module.modulemap
/Users/Fklemke/swiftbenchmarkproject/vaporJSON/.build/debug/Configs.build/Node+Merge~partial.swiftmodule : /Users/Fklemke/swiftbenchmarkproject/vaporJSON/.build/checkouts/vapor.git-5492988889259800272/Sources/Configs/Source.swift /Users/Fklemke/swiftbenchmarkproject/vaporJSON/.build/checkouts/vapor.git-5492988889259800272/Sources/Configs/Node+Merge.swift /Users/Fklemke/swiftbenchmarkproject/vaporJSON/.build/checkouts/vapor.git-5492988889259800272/Sources/Configs/KeyAccessible+Merge.swift /Users/Fklemke/swiftbenchmarkproject/vaporJSON/.build/checkouts/vapor.git-5492988889259800272/Sources/Configs/ConfigInitializable.swift /Users/Fklemke/swiftbenchmarkproject/vaporJSON/.build/checkouts/vapor.git-5492988889259800272/Sources/Configs/KeyAccessible.swift /Users/Fklemke/swiftbenchmarkproject/vaporJSON/.build/checkouts/vapor.git-5492988889259800272/Sources/Configs/Config.swift /Users/Fklemke/swiftbenchmarkproject/vaporJSON/.build/checkouts/vapor.git-5492988889259800272/Sources/Configs/ConfigError.swift /Users/Fklemke/swiftbenchmarkproject/vaporJSON/.build/checkouts/vapor.git-5492988889259800272/Sources/Configs/Config+Arguments.swift /Users/Fklemke/swiftbenchmarkproject/vaporJSON/.build/checkouts/vapor.git-5492988889259800272/Sources/Configs/Environment.swift /Users/Fklemke/swiftbenchmarkproject/vaporJSON/.build/checkouts/vapor.git-5492988889259800272/Sources/Configs/Env/Node+Env.swift /Users/Fklemke/swiftbenchmarkproject/vaporJSON/.build/checkouts/vapor.git-5492988889259800272/Sources/Configs/Env/String+Env.swift /Users/Fklemke/swiftbenchmarkproject/vaporJSON/.build/checkouts/vapor.git-5492988889259800272/Sources/Configs/Env/Env.swift /Users/Fklemke/swiftbenchmarkproject/vaporJSON/.build/checkouts/vapor.git-5492988889259800272/Sources/Configs/Config+Directory.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/Fklemke/swiftbenchmarkproject/vaporJSON/.build/debug/JSON.swiftmodule /Users/Fklemke/swiftbenchmarkproject/vaporJSON/.build/debug/libc.swiftmodule /Users/Fklemke/swiftbenchmarkproject/vaporJSON/.build/debug/Node.swiftmodule /Users/Fklemke/swiftbenchmarkproject/vaporJSON/.build/debug/PathIndexable.swiftmodule /Users/Fklemke/swiftbenchmarkproject/vaporJSON/.build/debug/Core.swiftmodule /Users/Fklemke/swiftbenchmarkproject/vaporJSON/.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/Fklemke/swiftbenchmarkproject/vaporJSON/.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/Fklemke/swiftbenchmarkproject/vaporJSON/.build/checkouts/ctls.git-9210868160426949823/module.modulemap /Users/Fklemke/swiftbenchmarkproject/vaporJSON/.build/debug/CHTTP.build/module.modulemap
/Users/Fklemke/swiftbenchmarkproject/vaporJSON/.build/debug/Configs.build/Node+Merge~partial.swiftdoc : /Users/Fklemke/swiftbenchmarkproject/vaporJSON/.build/checkouts/vapor.git-5492988889259800272/Sources/Configs/Source.swift /Users/Fklemke/swiftbenchmarkproject/vaporJSON/.build/checkouts/vapor.git-5492988889259800272/Sources/Configs/Node+Merge.swift /Users/Fklemke/swiftbenchmarkproject/vaporJSON/.build/checkouts/vapor.git-5492988889259800272/Sources/Configs/KeyAccessible+Merge.swift /Users/Fklemke/swiftbenchmarkproject/vaporJSON/.build/checkouts/vapor.git-5492988889259800272/Sources/Configs/ConfigInitializable.swift /Users/Fklemke/swiftbenchmarkproject/vaporJSON/.build/checkouts/vapor.git-5492988889259800272/Sources/Configs/KeyAccessible.swift /Users/Fklemke/swiftbenchmarkproject/vaporJSON/.build/checkouts/vapor.git-5492988889259800272/Sources/Configs/Config.swift /Users/Fklemke/swiftbenchmarkproject/vaporJSON/.build/checkouts/vapor.git-5492988889259800272/Sources/Configs/ConfigError.swift /Users/Fklemke/swiftbenchmarkproject/vaporJSON/.build/checkouts/vapor.git-5492988889259800272/Sources/Configs/Config+Arguments.swift /Users/Fklemke/swiftbenchmarkproject/vaporJSON/.build/checkouts/vapor.git-5492988889259800272/Sources/Configs/Environment.swift /Users/Fklemke/swiftbenchmarkproject/vaporJSON/.build/checkouts/vapor.git-5492988889259800272/Sources/Configs/Env/Node+Env.swift /Users/Fklemke/swiftbenchmarkproject/vaporJSON/.build/checkouts/vapor.git-5492988889259800272/Sources/Configs/Env/String+Env.swift /Users/Fklemke/swiftbenchmarkproject/vaporJSON/.build/checkouts/vapor.git-5492988889259800272/Sources/Configs/Env/Env.swift /Users/Fklemke/swiftbenchmarkproject/vaporJSON/.build/checkouts/vapor.git-5492988889259800272/Sources/Configs/Config+Directory.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/Fklemke/swiftbenchmarkproject/vaporJSON/.build/debug/JSON.swiftmodule /Users/Fklemke/swiftbenchmarkproject/vaporJSON/.build/debug/libc.swiftmodule /Users/Fklemke/swiftbenchmarkproject/vaporJSON/.build/debug/Node.swiftmodule /Users/Fklemke/swiftbenchmarkproject/vaporJSON/.build/debug/PathIndexable.swiftmodule /Users/Fklemke/swiftbenchmarkproject/vaporJSON/.build/debug/Core.swiftmodule /Users/Fklemke/swiftbenchmarkproject/vaporJSON/.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/Fklemke/swiftbenchmarkproject/vaporJSON/.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/Fklemke/swiftbenchmarkproject/vaporJSON/.build/checkouts/ctls.git-9210868160426949823/module.modulemap /Users/Fklemke/swiftbenchmarkproject/vaporJSON/.build/debug/CHTTP.build/module.modulemap
|
D
|
/*
TEST_OUTPUT:
---
fail_compilation/staticassertargsfail.d(10): Error: incompatible types for `('x') : (new Object)`: `char` and `object.Object`
fail_compilation/staticassertargsfail.d(10): while evaluating `static assert` argument `['x', new Object] ~ ""`
---
*/
static assert(0, "abc", ['x', new Object] ~ "");
|
D
|
/Users/trietnguyen/Documents/Blockchain Development/NEAR OCT/minhtam/Simple_DAO/simple_dao/contract/target/debug/build/generic-array-73f850477afb8b54/build_script_build-73f850477afb8b54: /Users/trietnguyen/.cargo/registry/src/github.com-1ecc6299db9ec823/generic-array-0.14.4/build.rs
/Users/trietnguyen/Documents/Blockchain Development/NEAR OCT/minhtam/Simple_DAO/simple_dao/contract/target/debug/build/generic-array-73f850477afb8b54/build_script_build-73f850477afb8b54.d: /Users/trietnguyen/.cargo/registry/src/github.com-1ecc6299db9ec823/generic-array-0.14.4/build.rs
/Users/trietnguyen/.cargo/registry/src/github.com-1ecc6299db9ec823/generic-array-0.14.4/build.rs:
|
D
|
FUNC VOID B_EXPVerteiler (var C_NPC opfer, var C_NPC taeter)
{
if (!Hlp_IsValidNpc(taeter)) {
return;
};
if (Hlp_GetInstanceID(opfer) == Hlp_GetInstanceID(Lich_11008_NW))
&& (Mod_NL_HasKamm < 2) {
return;
};
if (C_NpcIsHero(taeter)) {
if (opfer.aivar[AIV_MM_REAL_ID] == ID_UNDEADORCWARRIOR) {
if (Hlp_GetInstanceID(opfer) == Hlp_GetInstanceID(UndeadOrcWarrior)) {
Spine_OverallSaveSetInt("UndeadOrcWarrior", 1);
};
if (Hlp_GetInstanceID(opfer) == Hlp_GetInstanceID(UndeadOrcPriest)) {
Spine_OverallSaveSetInt("UndeadOrcPriest", 1);
};
};
if (Hlp_GetInstanceID(opfer) == Hlp_GetInstanceID(Mod_10033_ORC_UndeadShamane_OGY))
|| (Hlp_GetInstanceID(opfer) == Hlp_GetInstanceID(Mod_10032_ORC_UndeadShamane_MT))
|| (Hlp_GetInstanceID(opfer) == Hlp_GetInstanceID(Mod_10039_ORC_UndeadShamane_OT)) {
Spine_OverallSaveSetInt("UndeadOrcPriest", 1);
};
if (Hlp_GetInstanceID(opfer) == Hlp_GetInstanceID(WaterOrc)) {
Spine_OverallSaveSetInt("WaterOrc", 1);
};
if (Hlp_GetInstanceID(opfer) == Hlp_GetInstanceID(OrcWarrior_Roam)) {
Spine_OverallSaveSetInt("OrcWarrior", 1);
};
if (Hlp_GetInstanceID(opfer) == Hlp_GetInstanceID(OrcShaman_Sit) || Hlp_GetInstanceID(opfer) == Hlp_GetInstanceID(OrcShaman_Pray)) {
Spine_OverallSaveSetInt("OrcShaman", 1);
};
if (Hlp_GetInstanceID(opfer) == Hlp_GetInstanceID(OrcElite_Roam) || Hlp_GetInstanceID(opfer) == Hlp_GetInstanceID(OrcElite_Rest)) {
Spine_OverallSaveSetInt("OrcElite", 1);
};
if (Hlp_GetInstanceID(opfer) == Hlp_GetInstanceID(Stoneguardian)) {
Spine_OverallSaveSetInt("Stoneguardian", 1);
};
if (Hlp_GetInstanceID(opfer) == Hlp_GetInstanceID(Erzguardian)) {
Spine_OverallSaveSetInt("Erzguardian", 1);
};
if (Hlp_GetInstanceID(opfer) == Hlp_GetInstanceID(Shadowbeast_Fire))
|| (Hlp_GetInstanceID(opfer) == Hlp_GetInstanceID(Shadowbeast_Addon_Fire_CanyonLib))
|| (Hlp_GetInstanceID(opfer) == Hlp_GetInstanceID(Feuerteufel_Balrog)) {
Spine_OverallSaveSetInt("Shadowbeast_Fire", 1);
};
if (Hlp_GetInstanceID(opfer) == Hlp_GetInstanceID(Razor)) {
Spine_OverallSaveSetInt("Razor", 1);
};
if (Hlp_GetInstanceID(opfer) == Hlp_GetInstanceID(OrcBiter)) {
Spine_OverallSaveSetInt("OrcBiter", 1);
};
if (Hlp_GetInstanceID(opfer) == Hlp_GetInstanceID(Keiler)) {
Spine_OverallSaveSetInt("Keiler", 1);
};
if (Hlp_GetInstanceID(opfer) == Hlp_GetInstanceID(Riesenkeiler)) {
Spine_OverallSaveSetInt("Riesenkeiler", 1);
};
if (Hlp_GetInstanceID(opfer) == Hlp_GetInstanceID(Icewolf) || Hlp_GetInstanceID(opfer) == Hlp_GetInstanceID(IcewolfEISGEBIET)) {
Spine_OverallSaveSetInt("Icewolf", 1);
};
if (Hlp_GetInstanceID(opfer) == Hlp_GetInstanceID(Gobbo_Warrior) || Hlp_GetInstanceID(opfer) == Hlp_GetInstanceID(Gobbo_Warrior_Visir)) {
Spine_OverallSaveSetInt("Gobbo_Warrior", 1);
};
if (Hlp_GetInstanceID(opfer) == Hlp_GetInstanceID(Giant_DesertRat)) {
Spine_OverallSaveSetInt("Giant_DesertRat", 1);
};
if (Hlp_GetInstanceID(opfer) == Hlp_GetInstanceID(Bloodhound)) {
Spine_OverallSaveSetInt("Bloodhound", 1);
};
if (Hlp_GetInstanceID(opfer) == Hlp_GetInstanceID(Blattcrawler)) {
Spine_OverallSaveSetInt("Blattcrawler", 1);
};
if (Hlp_GetInstanceID(opfer) == Hlp_GetInstanceID(Erznager)) {
Spine_OverallSaveSetInt("Erznager", 1);
};
if (opfer.aivar[AIV_MM_REAL_ID] == ID_INSEKT) {
Spine_OverallSaveSetInt("Insect", 1);
};
if (Hlp_GetInstanceID(opfer) == Hlp_GetInstanceID(Alligator)) {
Spine_OverallSaveSetInt("Alligator", 1);
};
if (Hlp_GetInstanceID(opfer) == Hlp_GetInstanceID(ZombieRandom) || Hlp_GetInstanceID(opfer) == Hlp_GetInstanceID(Zombie_OT)) {
Spine_OverallSaveSetInt("Zombie", 1);
};
if (opfer.aivar[AIV_MM_REAL_ID] == ID_ZIEGE) {
Spine_OverallSaveSetInt("Ziege", 1);
};
if (Hlp_GetInstanceID(opfer) == Hlp_GetInstanceID(Wolf) || Hlp_GetInstanceID(opfer) == Hlp_GetInstanceID(YWolf)) {
Spine_OverallSaveSetInt("Wolf", 1);
};
if (Hlp_GetInstanceID(opfer) == Hlp_GetInstanceID(Riesenwolf)) {
Spine_OverallSaveSetInt("Riesenwolf", 1);
};
if (Hlp_GetInstanceID(opfer) == Hlp_GetInstanceID(Wisp)) {
Spine_OverallSaveSetInt("Wisp", 1);
};
if (Hlp_GetInstanceID(opfer) == Hlp_GetInstanceID(Warg)) {
Spine_OverallSaveSetInt("Warg", 1);
};
if (Hlp_GetInstanceID(opfer) == Hlp_GetInstanceID(BlackWolf)) {
Spine_OverallSaveSetInt("BlackWolf", 1);
};
if (Hlp_GetInstanceID(opfer) == Hlp_GetInstanceID(Waran)) {
Spine_OverallSaveSetInt("Waran", 1);
};
if (Hlp_GetInstanceID(opfer) == Hlp_GetInstanceID(Truhe))
|| (Hlp_GetInstanceID(opfer) == Hlp_GetInstanceID(Truhe_Deppenhans)) {
Spine_OverallSaveSetInt("Truhe", 1);
};
if (Hlp_GetInstanceID(opfer) == Hlp_GetInstanceID(Troll_Black)) {
Spine_OverallSaveSetInt("Troll_Black", 1);
};
if (Hlp_GetInstanceID(opfer) == Hlp_GetInstanceID(Troll_Silber)) {
Spine_OverallSaveSetInt("Troll_Silber", 1);
};
if (Hlp_GetInstanceID(opfer) == Hlp_GetInstanceID(Troll)) {
Spine_OverallSaveSetInt("Troll", 1);
};
if (Hlp_GetInstanceID(opfer) == Hlp_GetInstanceID(Tiger_White)) {
Spine_OverallSaveSetInt("Tiger_White", 1);
};
if (Hlp_GetInstanceID(opfer) == Hlp_GetInstanceID(Swampshark)) {
Spine_OverallSaveSetInt("Swampshark", 1);
};
if (Hlp_GetInstanceID(opfer) == Hlp_GetInstanceID(Swampshark_Undead)) {
Spine_OverallSaveSetInt("Swampshark_Undead", 1);
};
if (Hlp_GetInstanceID(opfer) == Hlp_GetInstanceID(Lindwurm)) {
Spine_OverallSaveSetInt("Lindwurm", 1);
};
if (Hlp_GetInstanceID(opfer) == Hlp_GetInstanceID(Wurm)) {
Spine_OverallSaveSetInt("Wurm", 1);
};
if (Hlp_GetInstanceID(opfer) == Hlp_GetInstanceID(StoneGolem)) {
Spine_OverallSaveSetInt("StoneGolem", 1);
};
if (opfer.aivar[AIV_MM_REAL_ID] == ID_ERZGOLEM) {
Spine_OverallSaveSetInt("ErzGolem", 1);
};
if (Hlp_GetInstanceID(opfer) == Hlp_GetInstanceID(EisenGolem)) {
Spine_OverallSaveSetInt("EisenGolem", 1);
};
if (Hlp_GetInstanceID(opfer) == Hlp_GetInstanceID(Spider) || Hlp_GetInstanceID(opfer) == Hlp_GetInstanceID(Spider_01) || Hlp_GetInstanceID(opfer) == Hlp_GetInstanceID(Spider_Lib)) {
Spine_OverallSaveSetInt("Spider", 1);
};
if (Hlp_GetInstanceID(opfer) == Hlp_GetInstanceID(Spider_Big) || Hlp_GetInstanceID(opfer) == Hlp_GetInstanceID(Riesenspinne_XW_01) || Hlp_GetInstanceID(opfer) == Hlp_GetInstanceID(Riesenspinne_XW_02) || Hlp_GetInstanceID(opfer) == Hlp_GetInstanceID(Riesenspinne_XW_03) || Hlp_GetInstanceID(opfer) == Hlp_GetInstanceID(Riesenspinne_XW_04)) {
Spine_OverallSaveSetInt("Spider_Big", 1);
};
if (Hlp_GetInstanceID(opfer) == Hlp_GetInstanceID(Spider_Queen)) {
Spine_OverallSaveSetInt("Spider_Queen", 1);
};
if (Hlp_GetInstanceID(opfer) == Hlp_GetInstanceID(Dalma)) {
Spine_OverallSaveSetInt("Dalma", 1);
};
if (Hlp_GetInstanceID(opfer) == Hlp_GetInstanceID(Snapper)) {
Spine_OverallSaveSetInt("Snapper", 1);
};
if (Hlp_GetInstanceID(opfer) == Hlp_GetInstanceID(FeuerSnapper)) {
Spine_OverallSaveSetInt("FeuerSnapper", 1);
};
if (Hlp_GetInstanceID(opfer) == Hlp_GetInstanceID(WasserSnapper)) {
Spine_OverallSaveSetInt("WasserSnapper", 1);
};
if (Hlp_GetInstanceID(opfer) == Hlp_GetInstanceID(SchattenSnapper)) {
Spine_OverallSaveSetInt("SchattenSnapper", 1);
};
if (Hlp_GetInstanceID(opfer) == Hlp_GetInstanceID(Sleeper)) {
Spine_OverallSaveSetInt("Sleeper", 1);
};
if (Hlp_GetInstanceID(opfer) == Hlp_GetInstanceID(SkeletonMage)) {
Spine_OverallSaveSetInt("SkeletonMage", 1);
};
if (Hlp_GetInstanceID(opfer) == Hlp_GetInstanceID(Skeleton_Lord)) {
Spine_OverallSaveSetInt("Skeleton_Lord", 1);
};
if (Hlp_GetInstanceID(opfer) == Hlp_GetInstanceID(Skeleton_Lord_Ghost)) {
Spine_OverallSaveSetInt("Skeleton_Lord_Ghost", 1);
};
if (Hlp_GetInstanceID(opfer) == Hlp_GetInstanceID(Skeleton)) {
Spine_OverallSaveSetInt("Skeleton", 1);
};
if (Hlp_GetInstanceID(opfer) == Hlp_GetInstanceID(SkeletonWarrior)) {
Spine_OverallSaveSetInt("SkeletonWarrior", 1);
};
if (Hlp_GetInstanceID(opfer) == Hlp_GetInstanceID(Lesser_Skeleton)) {
Spine_OverallSaveSetInt("Lesser_Skeleton", 1);
};
if (Hlp_GetInstanceID(opfer) == Hlp_GetInstanceID(Sheep)) {
Spine_OverallSaveSetInt("Sheep", 1);
};
if (Hlp_GetInstanceID(opfer) == Hlp_GetInstanceID(Hammel)) {
Spine_OverallSaveSetInt("Hammel", 1);
};
if (Hlp_GetInstanceID(opfer) == Hlp_GetInstanceID(Shadowbeast_Skeleton)) {
Spine_OverallSaveSetInt("Shadowbeast_Skeleton", 1);
};
if (Hlp_GetInstanceID(opfer) == Hlp_GetInstanceID(Nightmare_Skeleton)) {
Spine_OverallSaveSetInt("Nightmare_Skeleton", 1);
};
if (Hlp_GetInstanceID(opfer) == Hlp_GetInstanceID(Shadowbeast)) {
Spine_OverallSaveSetInt("Shadowbeast", 1);
};
if (Hlp_GetInstanceID(opfer) == Hlp_GetInstanceID(Feuerlaeufer)) {
Spine_OverallSaveSetInt("Feuerlaeufer", 1);
};
if (Hlp_GetInstanceID(opfer) == Hlp_GetInstanceID(Wasserlaeufer)) {
Spine_OverallSaveSetInt("Wasserlaeufer", 1);
};
if (Hlp_GetInstanceID(opfer) == Hlp_GetInstanceID(Eislaeufer)) {
Spine_OverallSaveSetInt("Eislaeufer", 1);
};
if (Hlp_GetInstanceID(opfer) == Hlp_GetInstanceID(Nightmare)) {
Spine_OverallSaveSetInt("Nightmare", 1);
};
if (Hlp_GetInstanceID(opfer) == Hlp_GetInstanceID(Scavenger_Ice)) {
Spine_OverallSaveSetInt("Scavenger_Ice", 1);
};
if (Hlp_GetInstanceID(opfer) == Hlp_GetInstanceID(Scavenger_Demon)) {
Spine_OverallSaveSetInt("Scavenger_Demon", 1);
};
if (Hlp_GetInstanceID(opfer) == Hlp_GetInstanceID(Scavenger)) {
Spine_OverallSaveSetInt("Scavenger", 1);
};
if (Hlp_GetInstanceID(opfer) == Hlp_GetInstanceID(Rabbit)) {
Spine_OverallSaveSetInt("Rabbit", 1);
};
if (Hlp_GetInstanceID(opfer) == Hlp_GetInstanceID(Orcdog)) {
Spine_OverallSaveSetInt("Orcdog", 1);
};
if (Hlp_GetInstanceID(opfer) == Hlp_GetInstanceID(Molerat)) {
Spine_OverallSaveSetInt("Molerat", 1);
};
if (Hlp_GetInstanceID(opfer) == Hlp_GetInstanceID(Minotaurus) || Hlp_GetInstanceID(opfer) == Hlp_GetInstanceID(Minotaurus_Xeres)) {
Spine_OverallSaveSetInt("Minotaurus", 1);
};
if (Hlp_GetInstanceID(opfer) == Hlp_GetInstanceID(MinecrawlerWarrior)) {
Spine_OverallSaveSetInt("MinecrawlerWarrior", 1);
};
if (Hlp_GetInstanceID(opfer) == Hlp_GetInstanceID(MinecrawlerWarrior_Undead)) {
Spine_OverallSaveSetInt("MinecrawlerWarrior_Undead", 1);
};
if (Hlp_GetInstanceID(opfer) == Hlp_GetInstanceID(RedCrab)) {
Spine_OverallSaveSetInt("RedCrab", 1);
};
if (Hlp_GetInstanceID(opfer) == Hlp_GetInstanceID(MinecrawlerQueen)) {
Spine_OverallSaveSetInt("MinecrawlerQueen", 1);
};
if (Hlp_GetInstanceID(opfer) == Hlp_GetInstanceID(ErznagerQueen)) {
Spine_OverallSaveSetInt("ErznagerQueen", 1);
};
if (Hlp_GetInstanceID(opfer) == Hlp_GetInstanceID(Minecrawler)) {
Spine_OverallSaveSetInt("Minecrawler", 1);
};
if (Hlp_GetInstanceID(opfer) == Hlp_GetInstanceID(Kristallcrawler)) {
Spine_OverallSaveSetInt("Kristallcrawler", 1);
};
if (Hlp_GetInstanceID(opfer) == Hlp_GetInstanceID(Meatbug)) {
Spine_OverallSaveSetInt("Meatbug", 1);
};
if (opfer.aivar[AIV_MM_REAL_ID] == ID_LURKER) {
Spine_OverallSaveSetInt("Lurker", 1);
};
if (Hlp_GetInstanceID(opfer) == Hlp_GetInstanceID(Kobold)) {
Spine_OverallSaveSetInt("Kobold", 1);
};
if (opfer.aivar[AIV_MM_REAL_ID] == ID_ICEGOLEM) {
Spine_OverallSaveSetInt("IceGolem", 1);
};
if (Hlp_GetInstanceID(opfer) == Hlp_GetInstanceID(Harpie)) {
Spine_OverallSaveSetInt("Harpie", 1);
};
if (Hlp_GetInstanceID(opfer) == Hlp_GetInstanceID(Gobbo_Skeleton)) {
Spine_OverallSaveSetInt("Gobbo_Skeleton", 1);
};
if (Hlp_GetInstanceID(opfer) == Hlp_GetInstanceID(Gobbo_Green) || Hlp_GetInstanceID(opfer) == Hlp_GetInstanceID(YGobbo_Green)) {
Spine_OverallSaveSetInt("Gobbo_Green", 1);
};
if (Hlp_GetInstanceID(opfer) == Hlp_GetInstanceID(Gobbo_Matrone_01) || Hlp_GetInstanceID(opfer) == Hlp_GetInstanceID(Gobbo_Matrone_02) || Hlp_GetInstanceID(opfer) == Hlp_GetInstanceID(Gobbo_Matrone_03) || Hlp_GetInstanceID(opfer) == Hlp_GetInstanceID(Gobbo_Matrone_04)) {
Spine_OverallSaveSetInt("OrcWarrior", 1);
};
if (Hlp_GetInstanceID(opfer) == Hlp_GetInstanceID(Gobbo_Black)) {
Spine_OverallSaveSetInt("Gobbo_Black", 1);
};
if (Hlp_GetInstanceID(opfer) == Hlp_GetInstanceID(Giant_Rat)) {
Spine_OverallSaveSetInt("Giant_Rat", 1);
};
if (Hlp_GetInstanceID(opfer) == Hlp_GetInstanceID(Rat)) {
Spine_OverallSaveSetInt("Rat", 1);
};
if (Hlp_GetInstanceID(opfer) == Hlp_GetInstanceID(Giant_Bug)) {
Spine_OverallSaveSetInt("Giant_Bug", 1);
};
if (Hlp_GetInstanceID(opfer) == Hlp_GetInstanceID(FireWaran)) {
Spine_OverallSaveSetInt("FireWaran", 1);
};
if (Hlp_GetInstanceID(opfer) == Hlp_GetInstanceID(EisWaran)) {
Spine_OverallSaveSetInt("EisWaran", 1);
};
if (opfer.aivar[AIV_MM_REAL_ID] == ID_FIREGOLEM) {
Spine_OverallSaveSetInt("FireGolem", 1);
};
if (Hlp_GetInstanceID(opfer) == Hlp_GetInstanceID(Erdgigant)) {
Spine_OverallSaveSetInt("Erdgigant", 1);
};
if (Hlp_GetInstanceID(opfer) == Hlp_GetInstanceID(Eisdrachensnapper)) {
Spine_OverallSaveSetInt("Eisdrachensnapper", 1);
};
if (Hlp_GetInstanceID(opfer) == Hlp_GetInstanceID(DungeonHarpie)) {
Spine_OverallSaveSetInt("DungeonHarpie", 1);
};
if (Hlp_GetInstanceID(opfer) == Hlp_GetInstanceID(DragonSnapper)) {
Spine_OverallSaveSetInt("DragonSnapper", 1);
};
if (opfer.aivar[AIV_MM_REAL_ID] == ID_RazorSkelett || Hlp_GetInstanceID(opfer) == Hlp_GetInstanceID(SKELETRazor)) {
Spine_OverallSaveSetInt("RazorSkelett", 1);
};
if (Hlp_GetInstanceID(opfer) == Hlp_GetInstanceID(DemonLord)) {
Spine_OverallSaveSetInt("DemonLord", 1);
};
if (Hlp_GetInstanceID(opfer) == Hlp_GetInstanceID(DemonHigh)) {
Spine_OverallSaveSetInt("DemonHigh", 1);
};
if (Hlp_GetInstanceID(opfer) == Hlp_GetInstanceID(Demon)) {
Spine_OverallSaveSetInt("Demon", 1);
};
if (Hlp_GetInstanceID(opfer) == Hlp_GetInstanceID(LessDemon)) {
Spine_OverallSaveSetInt("LessDemon", 1);
};
if (opfer.aivar[AIV_MM_REAL_ID] == ID_Blutgolem) {
Spine_OverallSaveSetInt("Blutgolem", 1);
};
if (Hlp_GetInstanceID(opfer) == Hlp_GetInstanceID(Bloodfly)) {
Spine_OverallSaveSetInt("Bloodfly", 1);
};
if (Hlp_GetInstanceID(opfer) == Hlp_GetInstanceID(Balrog)) {
Spine_OverallSaveSetInt("Balrog", 1);
};
if (Hlp_GetInstanceID(opfer) == Hlp_GetInstanceID(Alraune)) {
Spine_OverallSaveSetInt("Alraune", 1);
};
if (Hlp_GetInstanceID(opfer) == Hlp_GetInstanceID(Swamprat)) {
Spine_OverallSaveSetInt("Swamprat", 1);
};
if (opfer.aivar[AIV_MM_REAL_ID] == ID_SWAMPGOLEM) {
Spine_OverallSaveSetInt("SwampGolem", 1);
};
if (Hlp_GetInstanceID(opfer) == Hlp_GetInstanceID(SwampDrone)) {
Spine_OverallSaveSetInt("SwampDrone", 1);
};
if (Hlp_GetInstanceID(opfer) == Hlp_GetInstanceID(Puma)) {
Spine_OverallSaveSetInt("Puma", 1);
};
if (Hlp_GetInstanceID(opfer) == Hlp_GetInstanceID(StonePuma)) {
Spine_OverallSaveSetInt("StonePuma", 1);
};
if (opfer.aivar[AIV_MM_REAL_ID] == ID_APFELBAUM) {
Spine_OverallSaveSetInt("Apfelbaum", 1);
};
if (Hlp_GetInstanceID(opfer) == Hlp_GetInstanceID(StoneGolemerz)) {
Spine_OverallSaveSetInt("StoneGolemerz", 1);
};
if (Hlp_GetInstanceID(opfer) == Hlp_GetInstanceID(XR_Kristallgolem)) {
Spine_OverallSaveSetInt("Kristallgolem", 1);
};
if (Hlp_GetInstanceID(opfer) == Hlp_GetInstanceID(UndeadOrcWarriorHorn)) {
Spine_OverallSaveSetInt("UndeadOrcWarriorHorn", 1);
};
if (Hlp_GetInstanceID(opfer) == Hlp_GetInstanceID(Hauertroll)) {
Spine_OverallSaveSetInt("Hauertroll", 1);
};
if (Hlp_GetInstanceID(opfer) == Hlp_GetInstanceID(Schattenwark)) {
Spine_OverallSaveSetInt("Schattenwark", 1);
};
if (Hlp_GetInstanceID(opfer) == Hlp_GetInstanceID(Zombie_Eisschnee)) {
Spine_OverallSaveSetInt("Zombie_Eisschnee", 1);
};
if (Hlp_GetInstanceID(opfer) == Hlp_GetInstanceID(SchneeHase)) {
Spine_OverallSaveSetInt("SchneeHase", 1);
};
CheckMonsterHunterAchievement();
};
if (opfer.guild == GIL_DRACONIAN)
&& (C_NpcIsHero(taeter))
&& (Mod_Echsis != 1)
{
Mod_Echsis = 1;
};
if (C_NpcIsHero(opfer))
&& (opfer.guild > GIL_SEPERATOR_HUM)
{
Mod_MonsterGekillt += 1;
};
if (Hlp_GetInstanceID(opfer) == Hlp_GetInstanceID(Giant_Rat_Friedel))
{
if (Hlp_GetInstanceID(taeter) == Hlp_GetInstanceID(Mod_7519_OUT_Tyrus_REL))
{
Mod_REL_Wettstreit_Tyrus += 1;
}
else if (Hlp_GetInstanceID(taeter) == Hlp_GetInstanceID(Mod_7518_OUT_Davon_REL))
{
Mod_REL_Wettstreit_Davon += 1;
}
else
{
Mod_REL_Wettstreit_Hero += 1;
};
};
if (opfer.guild < GIL_SEPERATOR_HUM)
&& (C_NpcIsHero(taeter))
&& (Piratenhut_Equipped == 1)
{
var int BlackbartsRandi;
BlackbartsRandi = Hlp_Random(21);
if (BlackbartsRandi == 0)
{
CreateInvItems (opfer, ItMi_GoldRing, 1);
}
else
{
CreateInvItems (opfer, ItMi_Gold, BlackbartsRandi);
};
};
if (Hlp_GetInstanceID(opfer) == Hlp_GetInstanceID(Mod_1082_BAU_Rufus_MT))
&& (C_NpcIsHero(taeter))
{
Mod_SLD_Rufus = 5;
};
if (Hlp_GetInstanceID(opfer) == Hlp_GetInstanceID(Swampshark_Undead))
&& (Npc_HasItems(hero, ItMi_SumpfhaiStein) == 1)
&& ((C_NpcIsHero(taeter))
|| (Hlp_GetInstanceID(taeter) == Hlp_GetInstanceID(Mod_1219_TPL_Templer_MT))
|| (Hlp_GetInstanceID(taeter) == Hlp_GetInstanceID(Mod_1218_TPL_Templer_MT)))
{
Mod_Sekte_UDS_Stein += 1;
};
var C_ITEM AxtTest;
AxtTest = Npc_GetReadiedWeapon(taeter);
if (Hlp_IsItem(AxtTest, ItMw_AxtDesUntergangs))
&& (Hlp_GetInstanceID(taeter) == Hlp_GetInstanceID(PC_Hero))
{
if (AxtDamage < 4650) {
AxtDamage += 2;
AxtUpgrade = 0;
};
};
if (taeter.guild == GIL_DRACONIAN)
&& (opfer.guild == GIL_SWAMPGOLEM)
{
opfer.exp += 1;
B_EchsenBody(taeter);
};
var int GiftChance;
GiftChance = 0;
// ------ Sumpfdrohne -------
if (opfer.aivar[AIV_MM_REAL_ID] == ID_SWAMPDRONE)
&& (GGD_Sumpfgasdrohne_Time == 0)
{
if (Npc_GetDistToNpc(taeter, opfer) < 300)
{
//opfer.attribute[ATR_HITPOINTS] -= 50;
//Npc_ChangeAttribute(opfer, ATR_HITPOINTS, -50);
// Wahrscheinlichkeit, eine Vergiftung zu erleiden
if (Gift == 0)
{
GiftChance = 100; //100%
}
else if (Gift == 1)
{
GiftChance = 85; //- 15%
}
else if (Gift == 2)
{
GiftChance = 72; //nochmal -15% vom Rest
}
else if (Gift == 3)
{
GiftChance = 61; //nochmal -15% vom Rest
};
if (Hlp_Random(100) < GiftChance)
{
// Zeit erhöhen
if (Giftdampf == 0)
{
GGD_Sumpfgasdrohne_Time += 10;
}
else if (Giftdampf == 1) // 20% weniger
{
GGD_Sumpfgasdrohne_Time += 8;
}
else if (Giftdampf == 2) // 40% weniger
{
GGD_Sumpfgasdrohne_Time += 6;
}
else if (Giftdampf == 3) // 60% weniger
{
GGD_Sumpfgasdrohne_Time += 4;
}
else if (Giftdampf == 4) // 80% weniger
{
GGD_Sumpfgasdrohne_Time += 2;
};
// neuer Schaden
if (Giftdampf == 0)
{
GGD_Sumpfgasdrohne_Damage = 20;
}
else if (Giftdampf == 1) // 10% weniger
{
GGD_Sumpfgasdrohne_Damage = 18;
}
else if (Giftdampf == 2) // noch mal 10% weniger
{
GGD_Sumpfgasdrohne_Damage += 16;
}
else if (Giftdampf == 3) // und noch mal 10% weniger
{
GGD_Sumpfgasdrohne_Damage = 14;
}
else if (Giftdampf == 4) // und noch mal 10% weniger
{
GGD_Sumpfgasdrohne_Damage = 13;
};
};
};
};
if (opfer.aivar[AIV_MM_REAL_ID] == ID_SWAMPGOLEM)
&& (GGD_Sumpfgolem_Time == 0)
{
if (Npc_GetDistToNpc(taeter, opfer) < 300)
&& (Mod_TrfSkeleton2 == 0)
{
//opfer.attribute[ATR_HITPOINTS] -= 50;
//Npc_ChangeAttribute(opfer, ATR_HITPOINTS, -50);
// Wahrscheinlichkeit, eine Vergiftung zu erleiden
if (Gift == 0)
{
GiftChance = 100; //100%
}
else if (Gift == 1)
{
GiftChance = 85; //- 15%
}
else if (Gift == 2)
{
GiftChance = 72; //nochmal -15% vom Rest
}
else if (Gift == 3)
{
GiftChance = 61; //nochmal -15% vom Rest
};
if (Hlp_Random(100) < GiftChance)
{
// Zeit erhöhen
if (Giftdampf == 0)
{
GGD_Sumpfgolem_Time += 10;
}
else if (Giftdampf == 1) // 20% weniger
{
GGD_Sumpfgolem_Time += 8;
}
else if (Giftdampf == 2) // 40% weniger
{
GGD_Sumpfgolem_Time += 6;
}
else if (Giftdampf == 3) // 60% weniger
{
GGD_Sumpfgolem_Time += 4;
}
else if (Giftdampf == 4) // 80% weniger
{
GGD_Sumpfgolem_Time += 2;
};
// neuer Schaden
if (Giftdampf == 0)
{
GGD_Sumpfgolem_Damage = 20;
}
else if (Giftdampf == 1) // 10% weniger
{
GGD_Sumpfgolem_Damage = 18;
}
else if (Giftdampf == 2) // noch mal 10% weniger
{
GGD_Sumpfgolem_Damage = 16;
}
else if (Giftdampf == 3) // und noch mal 10% weniger
{
GGD_Sumpfgolem_Damage = 14;
}
else if (Giftdampf == 4) // und noch mal 10% weniger
{
GGD_Sumpfgolem_Damage = 13;
};
};
};
};
if (Npc_IsPlayer(taeter))
{
opfer.aivar[AIV_KilledByPlayer] = TRUE;
};
// Weder Spieler, noch Partymember, noch Boss, noch mal draufgeschlagen
if (!Npc_IsPlayer(taeter))
&& (!C_NpcIsBossmonster(opfer))
&& (opfer.aivar[AIV_FLUGBLATTVERTEILT] == 0)
&& (taeter.aivar[AIV_Partymember] == FALSE)
{
return;
};
if (FinsternisPanzerhandschuh_Equipped)
&& (Wld_IsTime(22,00,05,00))
{
Wld_SpawnNpcRange (opfer, Summoned_Harpie, 1, 300);
};
// Schafe, Fleischwanzen und Ratten geben immer 5 XP
if ((opfer.aivar[AIV_VictoryXPGiven] == FALSE)
|| (opfer.aivar[AIV_VictoryXPGiven] == -1))
&& ((opfer.guild == GIL_SHEEP)
|| (opfer.guild == GIL_MEATBUG))
{
B_GivePlayerXP (5);
opfer.aivar[AIV_VictoryXPGiven] = TRUE;
};
// Im Schläfertempel ist auch noch alles festgeschrieben
if (opfer.aivar[AIV_VictoryXPGiven] == FALSE)
&& (HeroIstKeinZombie == FALSE)
&& (CurrentLevel == ORCTEMPEL_ZEN)
{
if (opfer.aivar[AIV_MM_REAL_ID] == ID_MINECRAWLER)
{
B_GivePlayerXP (15);
}
else if (opfer.aivar[AIV_MM_REAL_ID] == ID_MINECRAWLERWARRIOR)
{
B_GivePlayerXP (20);
}
else if (opfer.aivar[AIV_MM_REAL_ID] == ID_ZOMBIE)
{
B_GivePlayerXP (20);
};
opfer.aivar[AIV_VictoryXPGiven] = TRUE;
};
// respawnte Gegner geben immer nur 10 XP
if (opfer.aivar[AIV_VictoryXPGiven] == -1)
{
B_GivePlayerXP (10);
opfer.aivar[AIV_VictoryXPGiven] = TRUE;
};
// Bei eigenen Kills, Kills beschworener Monster oder wenn der Gegner Boss ist oder ich mal draufgehauen habe, gibt's volle XP
if ((Npc_IsPlayer(taeter))
|| (taeter.guild == GIL_SUMMONED_GOBBO_SKELETON)
|| (taeter.guild == GIL_SUMMONED_WOLF)
|| (taeter.guild == GIL_SUMMONED_SKELETON)
|| (taeter.guild == GIL_SUMMONED_GOLEM)
|| (taeter.guild == GIL_SUMMONED_DEMON)
|| (taeter.guild == GIL_SUMMONEDGUARDIAN)
|| (taeter.guild == GIL_SUMMONEDZOMBIE)
|| (C_NpcIsBossmonster(opfer))
|| (opfer.aivar[AIV_FLUGBLATTVERTEILT] == 1))
&& (opfer.aivar[AIV_VictoryXPGiven] == FALSE)
{
B_GivePlayerXP (opfer.level * XP_PER_VICTORY);
opfer.aivar[AIV_VictoryXPGiven] = TRUE;
};
if (taeter.aivar[AIV_PARTYMEMBER] == TRUE)
&& (opfer.aivar[AIV_VictoryXPGiven] == FALSE)
{
B_GivePlayerXP (opfer.level * XP_PER_VICTORY / 2);
opfer.aivar[AIV_VictoryXPGiven] = TRUE;
};
if (Hlp_GetInstanceID(opfer) == Hlp_GetInstanceID(Rabbit_Gomez))
{
if (Hlp_GetInstanceID(taeter) == Hlp_GetInstanceID(Mod_517_DMR_Gomez_MT))
{
Mod_Gomez_HasenKiller += 1;
}
else
{
Mod_Gomez_HasenKiller2 += 1;
};
};
};
|
D
|
/****************************************************************************
**
** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the QtXmlPatterns module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and Digia. For licensing terms and
** conditions see http://qt.digia.com/licensing. For further information
** use the contact form at http://qt.digia.com/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 or version 3 as published by the Free
** Software Foundation and appearing in the file LICENSE.LGPLv21 and
** LICENSE.LGPLv3 included in the packaging of this file. Please review the
** following information to ensure the GNU Lesser General Public License
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** In addition, as a special exception, Digia gives you certain additional
** rights. These rights are described in the Digia Qt LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
**
****************************************************************************/
#ifndef QSOURCELOCATION_H
#define QSOURCELOCATION_H
public import qt.QtCore.QMetaType;
public import qt.QtCore.QUrl;
public import qt.QtXmlPatterns.qtxmlpatternsglobal;
QT_BEGIN_NAMESPACE
class QSourceLocationPrivate;
class Q_XMLPATTERNS_EXPORT QSourceLocation
{
public:
QSourceLocation();
QSourceLocation(ref const(QSourceLocation) other);
QSourceLocation(ref const(QUrl) uri, int line = -1, int column = -1);
~QSourceLocation();
QSourceLocation &operator=(ref const(QSourceLocation) other);
bool operator==(ref const(QSourceLocation) other) const;
bool operator!=(ref const(QSourceLocation) other) const;
qint64 column() const;
void setColumn(qint64 newColumn);
qint64 line() const;
void setLine(qint64 newLine);
QUrl uri() const;
void setUri(ref const(QUrl) newUri);
bool isNull() const;
private:
union
{
qint64 m_line;
QSourceLocationPrivate *m_ptr;
};
qint64 m_column;
QUrl m_uri;
};
Q_XMLPATTERNS_EXPORT uint qHash(ref const(QSourceLocation) location);
#ifndef QT_NO_DEBUG_STREAM
Q_XMLPATTERNS_EXPORT QDebug operator<<(QDebug debug, ref const(QSourceLocation) sourceLocation);
#endif
Q_DECLARE_TYPEINFO(QSourceLocation, Q_MOVABLE_TYPE);
QT_END_NAMESPACE
Q_DECLARE_METATYPE(QSourceLocation) /* This macro must appear after QT_END_NAMESPACE. */
#endif
|
D
|
/**
* This module implements custom assertions via $(D shouldXXX) functions
* that throw exceptions containing information about why the assertion
* failed.
*/
module unit_threaded.assertions;
import unit_threaded.exception: fail, UnitTestException;
import std.traits; // too many to list
import std.range; // also
/**
* Verify that the condition is `true`.
* Throws: UnitTestException on failure.
*/
void shouldBeTrue(E)(lazy E condition, string file = __FILE__, in size_t line = __LINE__)
{
shouldEqual(cast(bool)condition, true, file, line);
}
///
@safe pure unittest
{
shouldBeTrue(true);
}
/**
* Verify that the condition is `false`.
* Throws: UnitTestException on failure.
*/
void shouldBeFalse(E)(lazy E condition, string file = __FILE__, in size_t line = __LINE__)
{
shouldEqual(cast(bool)condition, false, file, line);
}
///
@safe pure unittest
{
shouldBeFalse(false);
}
/**
* Verify that two values are the same.
* Throws: UnitTestException on failure
*/
void shouldEqual(V, E)(scope auto ref V value, scope auto ref E expected, string file = __FILE__, in size_t line = __LINE__)
{
if (!isEqual(value, expected))
{
const msg = formatValueInItsOwnLine("Expected: ", expected) ~
formatValueInItsOwnLine(" Got: ", value);
throw new UnitTestException(msg, file, line);
}
}
///
@safe pure unittest {
shouldEqual(true, true);
shouldEqual(false, false);
shouldEqual(1, 1) ;
shouldEqual("foo", "foo") ;
shouldEqual([2, 3], [2, 3]) ;
shouldEqual(iota(3), [0, 1, 2]);
shouldEqual([[0, 1], [0, 1, 2]], [[0, 1], [0, 1, 2]]);
shouldEqual([[0, 1], [0, 1, 2]], [iota(2), iota(3)]);
shouldEqual([iota(2), iota(3)], [[0, 1], [0, 1, 2]]);
}
/**
* Verify that two values are not the same.
* Throws: UnitTestException on failure
*/
void shouldNotEqual(V, E)(V value, E expected, string file = __FILE__, in size_t line = __LINE__)
{
if (isEqual(value, expected))
{
const msg = ["Value:",
formatValueInItsOwnLine("", value).join(""),
"is not expected to be equal to:",
formatValueInItsOwnLine("", expected).join("")
];
throw new UnitTestException(msg, file, line);
}
}
///
@safe pure unittest
{
shouldNotEqual(true, false);
shouldNotEqual(1, 2);
shouldNotEqual("f", "b");
shouldNotEqual([2, 3], [2, 3, 4]);
}
///
@safe unittest {
shouldNotEqual(1.0, 2.0);
}
/**
* Verify that the value is null.
* Throws: UnitTestException on failure
*/
void shouldBeNull(T)(in auto ref T value, string file = __FILE__, in size_t line = __LINE__)
{
if (value !is null)
fail("Value is not null", file, line);
}
///
@safe pure unittest
{
shouldBeNull(null);
}
/**
* Verify that the value is not null.
* Throws: UnitTestException on failure
*/
void shouldNotBeNull(T)(in auto ref T value, string file = __FILE__, in size_t line = __LINE__)
{
if (value is null)
fail("Value is null", file, line);
}
///
@safe pure unittest
{
class Foo
{
this(int i) { this.i = i; }
override string toString() const
{
import std.conv: to;
return i.to!string;
}
int i;
}
shouldNotBeNull(new Foo(4));
}
enum isLikeAssociativeArray(T, K) = is(typeof({
if(K.init in T) { }
if(K.init !in T) { }
}));
static assert(isLikeAssociativeArray!(string[string], string));
static assert(!isLikeAssociativeArray!(string[string], int));
/**
* Verify that the value is in the container.
* Throws: UnitTestException on failure
*/
void shouldBeIn(T, U)(in auto ref T value, in auto ref U container, string file = __FILE__, in size_t line = __LINE__)
if (isLikeAssociativeArray!(U, T))
{
import std.conv: to;
if (value !in container)
{
fail(formatValueInItsOwnLine("Value ", value) ~ formatValueInItsOwnLine("not in ", container),
file, line);
}
}
///
@safe pure unittest {
5.shouldBeIn([5: "foo"]);
struct AA {
int onlyKey;
bool opBinaryRight(string op)(in int key) const {
return key == onlyKey;
}
}
5.shouldBeIn(AA(5));
}
/**
* Verify that the value is in the container.
* Throws: UnitTestException on failure
*/
void shouldBeIn(T, U)(in auto ref T value, U container, string file = __FILE__, in size_t line = __LINE__)
if (!isLikeAssociativeArray!(U, T) && isInputRange!U)
{
import std.algorithm: find;
import std.conv: to;
if (find(container, value).empty)
{
fail(formatValueInItsOwnLine("Value ", value) ~ formatValueInItsOwnLine("not in ", container),
file, line);
}
}
///
@safe pure unittest
{
shouldBeIn(4, [1, 2, 4]);
shouldBeIn("foo", ["foo" : 1]);
}
/**
* Verify that the value is not in the container.
* Throws: UnitTestException on failure
*/
void shouldNotBeIn(T, U)(in auto ref T value, in auto ref U container,
string file = __FILE__, in size_t line = __LINE__)
if (isLikeAssociativeArray!(U, T))
{
import std.conv: to;
if (value in container)
{
fail(formatValueInItsOwnLine("Value ", value) ~ formatValueInItsOwnLine("is in ", container),
file, line);
}
}
///
@safe pure unittest {
5.shouldNotBeIn([4: "foo"]);
struct AA {
int onlyKey;
bool opBinaryRight(string op)(in int key) const {
return key == onlyKey;
}
}
5.shouldNotBeIn(AA(4));
}
/**
* Verify that the value is not in the container.
* Throws: UnitTestException on failure
*/
void shouldNotBeIn(T, U)(in auto ref T value, U container,
string file = __FILE__, in size_t line = __LINE__)
if (!isLikeAssociativeArray!(U, T) && isInputRange!U)
{
import std.algorithm: find;
import std.conv: to;
if (!find(container, value).empty)
{
fail(formatValueInItsOwnLine("Value ", value) ~ formatValueInItsOwnLine("is in ", container),
file, line);
}
}
///
@safe unittest
{
auto arrayRangeWithoutLength(T)(T[] array)
{
struct ArrayRangeWithoutLength(T)
{
private:
T[] array;
public:
T front() const @property
{
return array[0];
}
void popFront()
{
array = array[1 .. $];
}
bool empty() const @property
{
return array.empty;
}
}
return ArrayRangeWithoutLength!T(array);
}
shouldNotBeIn(3.5, [1.1, 2.2, 4.4]);
shouldNotBeIn(1.0, [2.0 : 1, 3.0 : 2]);
shouldNotBeIn(1, arrayRangeWithoutLength([2, 3, 4]));
}
private struct ThrownInfo
{
TypeInfo typeInfo;
string msg;
}
/**
* Verify that expr throws the templated Exception class.
* This succeeds if the expression throws a child class of
* the template parameter.
* Returns: A `ThrownInfo` containing info about the throwable
* Throws: UnitTestException on failure (when expr does not
* throw the expected exception)
*/
auto shouldThrow(T : Throwable = Exception, E)
(lazy E expr, string file = __FILE__, in size_t line = __LINE__)
{
import std.conv: text;
// separate in order to not be inside the @trusted
auto callThrew() { return threw!T(expr); }
void wrongThrowableType(scope Throwable t) {
fail(text("Expression threw ", typeid(t), " instead of the expected ", T.stringof, ":\n", t.msg), file, line);
}
void didntThrow() { fail("Expression did not throw", file, line); }
// insert dummy call outside @trusted to correctly infer the attributes of shouldThrow
if (false) {
callThrew();
wrongThrowableType(null);
didntThrow();
}
return () @trusted { // @trusted because of catching Throwable
try {
const result = callThrew();
if (result.threw)
return result.info;
}
catch(Throwable t)
wrongThrowableType(t);
didntThrow();
assert(0);
}();
}
///
@safe pure unittest {
void funcThrows(string msg) { throw new Exception(msg); }
try {
auto exceptionInfo = funcThrows("foo bar").shouldThrow;
assert(exceptionInfo.msg == "foo bar");
} catch(Exception e) {
assert(false, "should not have thrown anything and threw: " ~ e.msg);
}
}
///
@safe pure unittest {
void func() {}
try {
func.shouldThrow;
assert(false, "Should never get here");
} catch(Exception e)
assert(e.msg == "Expression did not throw");
}
///
@safe pure unittest {
void funcAsserts() { assert(false, "Oh noes"); }
try {
funcAsserts.shouldThrow;
assert(false, "Should never get here");
} catch(Exception e)
assert(e.msg ==
"Expression threw core.exception.AssertError instead of the expected Exception:\nOh noes");
}
/**
* Verify that expr throws the templated Exception class.
* This only succeeds if the expression throws an exception of
* the exact type of the template parameter.
* Returns: A `ThrownInfo` containing info about the throwable
* Throws: UnitTestException on failure (when expr does not
* throw the expected exception)
*/
auto shouldThrowExactly(T : Throwable = Exception, E)(lazy E expr,
string file = __FILE__, in size_t line = __LINE__)
{
import std.conv: text;
const threw = threw!T(expr);
if (!threw.threw)
fail("Expression did not throw", file, line);
//Object.opEquals is @system and impure
const sameType = () @trusted { return threw.info.typeInfo == typeid(T); }();
if (!sameType)
fail(text("Expression threw wrong type ", threw.info.typeInfo,
"instead of expected type ", typeid(T)), file, line);
return threw.info;
}
/**
* Verify that expr does not throw the templated Exception class.
* Throws: UnitTestException on failure
*/
void shouldNotThrow(T: Throwable = Exception, E)(lazy E expr,
string file = __FILE__, in size_t line = __LINE__)
{
if (threw!T(expr).threw)
fail("Expression threw", file, line);
}
/**
* Verify that an exception is thrown with the right message
*/
void shouldThrowWithMessage(T : Throwable = Exception, E)(lazy E expr,
string msg,
string file = __FILE__,
size_t line = __LINE__) {
auto threw = threw!T(expr);
if (!threw.threw)
fail("Expression did not throw", file, line);
threw.info.msg.shouldEqual(msg, file, line);
}
///
@safe pure unittest {
void funcThrows(string msg) { throw new Exception(msg); }
funcThrows("foo bar").shouldThrowWithMessage!Exception("foo bar");
funcThrows("foo bar").shouldThrowWithMessage("foo bar");
}
private auto threw(T : Throwable, E)(lazy E expr)
{
import std.typecons : tuple;
import std.array: array;
import std.conv: text;
auto ret = tuple!("threw", "info")(false, ThrownInfo.init);
// separate in order to not be inside the @trusted
void makeRet(scope T e) {
// the message might have to be copied because of lifetime issues
// .msg is sometimes a range, so .array
// but .array sometimes returns dchar[] (autodecoding), so .text
ret = typeof(ret)(true, ThrownInfo(typeid(e), e.msg.array.dup.text));
}
// insert dummy call outside @trusted to correctly infer the attributes of shouldThrow
if (false)
makeRet(null);
(() @trusted { // @trusted because of catching Throwable
try
expr();
catch (T e)
makeRet(e);
})();
return ret;
}
// Formats output in different lines
private string[] formatValueInItsOwnLine(T)(in string prefix, scope auto ref T value) {
import std.conv: to;
import std.traits: isSomeString;
import std.range.primitives: isInputRange;
static if(isSomeString!T) {
// isSomeString is true for wstring and dstring,
// so call .to!string anyway
return [ prefix ~ `"` ~ value.to!string ~ `"`];
} else static if(isInputRange!T) {
return formatRange(prefix, value);
} else {
return [prefix ~ convertToString(value)];
}
}
// helper function for non-copyable types
string convertToString(T)(scope auto ref T value) { // std.conv.to sometimes is @system
import std.conv: to;
import std.traits: Unqual, isFloatingPoint;
import std.format: format;
static if(isFloatingPoint!T) {
return format!"%.6f"(value);
} else static if(__traits(compiles, () @trusted { return value.to!string; }()))
return () @trusted { return value.to!string; }();
else static if(__traits(compiles, value.toString)) {
static if(isObject!T)
return () @trusted { return (cast(Unqual!T)value).toString; }();
else
return value.toString;
} else
return T.stringof ~ "<cannot print>";
}
private string[] formatRange(T)(in string prefix, scope auto ref T value) {
import std.conv: text;
import std.range: ElementType;
import std.algorithm: map, reduce, max;
//some versions of `text` are @system
auto defaultLines = () @trusted { return [prefix ~ value.text]; }();
static if (!isInputRange!(ElementType!T))
return defaultLines;
else
{
import std.array: array;
const maxElementSize = value.empty ? 0 : value.map!(a => a.array.length).reduce!max;
const tooBigForOneLine = (value.array.length > 5 && maxElementSize > 5) || maxElementSize > 10;
if (!tooBigForOneLine)
return defaultLines;
return [prefix ~ "["] ~
value.map!(a => formatValueInItsOwnLine(" ", a).join("") ~ ",").array ~
" ]";
}
}
private enum isObject(T) = is(T == class) || is(T == interface);
bool isEqual(V, E)(in auto ref V value, in auto ref E expected)
if (!isObject!V &&
!isFloatingPoint!V && !isFloatingPoint!E &&
is(typeof(value == expected) == bool))
{
return value == expected;
}
bool isEqual(V, E)(in V value, in E expected)
if (!isObject!V && (isFloatingPoint!V || isFloatingPoint!E) && is(typeof(value == expected) == bool))
{
return value == expected;
}
/**
* Verify that two floating point values are approximately equal
* Params:
* value = the value to check.
* expected = the expected value
* maxRelDiff = the maximum relative difference
* maxAbsDiff = the maximum absolute difference
* Throws: UnitTestException on failure
*/
void shouldApproxEqual(V, E)(in V value, in E expected, double maxRelDiff = 1e-2, double maxAbsDiff = 1e-5, string file = __FILE__, size_t line = __LINE__)
if (!isObject!V && (isFloatingPoint!V || isFloatingPoint!E) && is(typeof(value == expected) == bool))
{
import std.math: approxEqual;
if (!approxEqual(value, expected, maxRelDiff, maxAbsDiff))
{
const msg =
formatValueInItsOwnLine("Expected approx: ", expected) ~
formatValueInItsOwnLine(" Got : ", value);
throw new UnitTestException(msg, file, line);
}
}
///
@safe unittest {
1.0.shouldApproxEqual(1.0001);
}
bool isEqual(V, E)(scope V value, scope E expected)
if (isInputRange!V && isInputRange!E && !isSomeString!V &&
is(typeof(isEqual(value.front, expected.front))))
{
while (!value.empty && !expected.empty) {
if(!isEqual(value.front, expected.front)) return false;
value.popFront;
expected.popFront;
}
return value.empty && expected.empty;
}
bool isEqual(V, E)(scope V value, scope E expected)
if (!isObject!V && isInputRange!V && isInputRange!E && isSomeString!V && isSomeString!E &&
is(typeof(isEqual(value.front, expected.front))))
{
if(value.length != expected.length) return false;
// prevent auto-decoding
foreach(i; 0 .. value.length)
if(value[i] != expected[i]) return false;
return true;
}
template IsField(A...) if(A.length == 1) {
enum IsField = __traits(compiles, A[0].init);
}
bool isEqual(V, E)(scope V value, scope E expected)
if (isObject!V && isObject!E)
{
import std.meta: staticMap, Filter, staticIndexOf;
static assert(is(typeof(() { string s1 = value.toString; string s2 = expected.toString;})),
"Cannot compare instances of " ~ V.stringof ~
" or " ~ E.stringof ~ " unless toString is overridden for both");
if(value is null && expected !is null) return false;
if(value !is null && expected is null) return false;
if(value is null && expected is null) return true;
// If it has opEquals, use it
static if(staticIndexOf!("opEquals", __traits(derivedMembers, V)) != -1) {
return value.opEquals(expected);
} else {
template IsFieldOf(T, string s) {
static if(__traits(compiles, IsField!(typeof(__traits(getMember, T.init, s)))))
enum IsFieldOf = IsField!(typeof(__traits(getMember, T.init, s)));
else
enum IsFieldOf = false;
}
auto members(T)(T obj) {
import std.typecons: Tuple;
alias Member(string name) = typeof(__traits(getMember, T, name));
alias IsFieldOfT(string s) = IsFieldOf!(T, s);
alias FieldNames = Filter!(IsFieldOfT, __traits(allMembers, T));
alias FieldTypes = staticMap!(Member, FieldNames);
Tuple!FieldTypes ret;
foreach(i, name; FieldNames)
ret[i] = __traits(getMember, obj, name);
return ret;
}
static if(is(V == interface))
return false;
else
return members(value) == members(expected);
}
}
/**
* Verify that rng is empty.
* Throws: UnitTestException on failure.
*/
void shouldBeEmpty(R)(in auto ref R rng, string file = __FILE__, in size_t line = __LINE__)
if (isInputRange!R)
{
import std.conv: text;
if (!rng.empty)
fail(text("Range not empty: ", rng), file, line);
}
/**
* Verify that rng is empty.
* Throws: UnitTestException on failure.
*/
void shouldBeEmpty(R)(auto ref shared(R) rng, string file = __FILE__, in size_t line = __LINE__)
if (isInputRange!R)
{
import std.conv: text;
if (!rng.empty)
fail(text("Range not empty: ", rng), file, line);
}
/**
* Verify that aa is empty.
* Throws: UnitTestException on failure.
*/
void shouldBeEmpty(T)(auto ref T aa, string file = __FILE__, in size_t line = __LINE__)
if (isAssociativeArray!T)
{
//keys is @system
() @trusted{ if (!aa.keys.empty) fail("AA not empty", file, line); }();
}
///
@safe pure unittest
{
int[] ints;
string[] strings;
string[string] aa;
shouldBeEmpty(ints);
shouldBeEmpty(strings);
shouldBeEmpty(aa);
ints ~= 1;
strings ~= "foo";
aa["foo"] = "bar";
}
/**
* Verify that rng is not empty.
* Throws: UnitTestException on failure.
*/
void shouldNotBeEmpty(R)(R rng, string file = __FILE__, in size_t line = __LINE__)
if (isInputRange!R)
{
if (rng.empty)
fail("Range empty", file, line);
}
/**
* Verify that aa is not empty.
* Throws: UnitTestException on failure.
*/
void shouldNotBeEmpty(T)(in auto ref T aa, string file = __FILE__, in size_t line = __LINE__)
if (isAssociativeArray!T)
{
//keys is @system
() @trusted{ if (aa.keys.empty)
fail("AA empty", file, line); }();
}
///
@safe pure unittest
{
int[] ints;
string[] strings;
string[string] aa;
ints ~= 1;
strings ~= "foo";
aa["foo"] = "bar";
shouldNotBeEmpty(ints);
shouldNotBeEmpty(strings);
shouldNotBeEmpty(aa);
}
/**
* Verify that t is greater than u.
* Throws: UnitTestException on failure.
*/
void shouldBeGreaterThan(T, U)(in auto ref T t, in auto ref U u,
string file = __FILE__, in size_t line = __LINE__)
{
import std.conv: text;
if (t <= u)
fail(text(t, " is not > ", u), file, line);
}
///
@safe pure unittest
{
shouldBeGreaterThan(7, 5);
}
/**
* Verify that t is smaller than u.
* Throws: UnitTestException on failure.
*/
void shouldBeSmallerThan(T, U)(in auto ref T t, in auto ref U u,
string file = __FILE__, in size_t line = __LINE__)
{
import std.conv: text;
if (t >= u)
fail(text(t, " is not < ", u), file, line);
}
///
@safe pure unittest
{
shouldBeSmallerThan(5, 7);
}
/**
* Verify that t and u represent the same set (ordering is not important).
* Throws: UnitTestException on failure.
*/
void shouldBeSameSetAs(V, E)(auto ref V value, auto ref E expected, string file = __FILE__, in size_t line = __LINE__)
if (isInputRange!V && isInputRange!E && is(typeof(value.front != expected.front) == bool))
{
import std.algorithm: sort;
import std.array: array;
if (!isSameSet(value, expected))
{
static if(__traits(compiles, sort(expected.array)))
const expPrintRange = sort(expected.array).array;
else
alias expPrintRange = expected;
static if(__traits(compiles, sort(value.array)))
const actPrintRange = sort(value.array).array;
else
alias actPrintRange = value;
const msg = formatValueInItsOwnLine("Expected: ", expPrintRange) ~
formatValueInItsOwnLine(" Got: ", actPrintRange);
throw new UnitTestException(msg, file, line);
}
}
///
@safe pure unittest
{
import std.range: iota;
auto inOrder = iota(4);
auto noOrder = [2, 3, 0, 1];
auto oops = [2, 3, 4, 5];
inOrder.shouldBeSameSetAs(noOrder);
inOrder.shouldBeSameSetAs(oops).shouldThrow!UnitTestException;
struct Struct
{
int i;
}
[Struct(1), Struct(4)].shouldBeSameSetAs([Struct(4), Struct(1)]);
}
private bool isSameSet(T, U)(auto ref T t, auto ref U u) {
import std.algorithm: canFind;
//sort makes the element types have to implement opCmp
//instead, try one by one
auto ta = t.array;
auto ua = u.array;
if (ta.length != ua.length) return false;
foreach(element; ta)
{
if (!ua.canFind(element)) return false;
}
return true;
}
/**
* Verify that value and expected do not represent the same set (ordering is not important).
* Throws: UnitTestException on failure.
*/
void shouldNotBeSameSetAs(V, E)(auto ref V value, auto ref E expected, string file = __FILE__, in size_t line = __LINE__)
if (isInputRange!V && isInputRange!E && is(typeof(value.front != expected.front) == bool))
{
if (isSameSet(value, expected))
{
const msg = ["Value:",
formatValueInItsOwnLine("", value).join(""),
"is not expected to be equal to:",
formatValueInItsOwnLine("", expected).join("")
];
throw new UnitTestException(msg, file, line);
}
}
///
@safe pure unittest
{
auto inOrder = iota(4);
auto noOrder = [2, 3, 0, 1];
auto oops = [2, 3, 4, 5];
inOrder.shouldNotBeSameSetAs(oops);
inOrder.shouldNotBeSameSetAs(noOrder).shouldThrow!UnitTestException;
}
/**
If two strings represent the same JSON regardless of formatting
*/
void shouldBeSameJsonAs(in string actual,
in string expected,
string file = __FILE__,
in size_t line = __LINE__)
@trusted // not @safe pure due to parseJSON
{
import std.json: parseJSON, JSONException;
auto parse(in string str) {
try
return str.parseJSON;
catch(JSONException ex)
throw new UnitTestException("Error parsing JSON: " ~ ex.msg, file, line);
}
parse(actual).toPrettyString.shouldEqual(parse(expected).toPrettyString, file, line);
}
///
@safe unittest { // not pure because parseJSON isn't pure
`{"foo": "bar"}`.shouldBeSameJsonAs(`{"foo": "bar"}`);
`{"foo": "bar"}`.shouldBeSameJsonAs(`{"foo":"bar"}`);
`{"foo":"bar"}`.shouldBeSameJsonAs(`{"foo": "baz"}`).shouldThrow!UnitTestException;
try
`oops`.shouldBeSameJsonAs(`oops`);
catch(Exception e)
assert(e.msg == "Error parsing JSON: Unexpected character 'o'. (Line 1:1)");
}
auto should(V)(scope auto ref V value){
import std.functional: forward;
struct ShouldNot {
bool opEquals(U)(auto ref U other,
string file = __FILE__,
in size_t line = __LINE__)
{
shouldNotEqual(forward!value, other, file, line);
return true;
}
void opBinary(string op, R)(R range,
string file = __FILE__,
in size_t line = __LINE__) const if(op == "in") {
shouldNotBeIn(forward!value, range, file, line);
}
void opBinary(string op, R)(R range,
string file = __FILE__,
in size_t line = __LINE__) const
if(op == "~" && isInputRange!R)
{
shouldThrow!UnitTestException(shouldBeSameSetAs(forward!value, range), file, line);
}
void opBinary(string op, E)
(in E expected, string file = __FILE__, size_t line = __LINE__)
if (isFloatingPoint!E)
{
shouldThrow!UnitTestException(shouldApproxEqual(forward!value, expected), file, line);
}
}
struct Should {
bool opEquals(U)(auto ref U other,
string file = __FILE__,
in size_t line = __LINE__)
{
shouldEqual(forward!value, other, file, line);
return true;
}
void opBinary(string op, R)(R range,
string file = __FILE__,
in size_t line = __LINE__) const
if(op == "in")
{
shouldBeIn(forward!value, range, file, line);
}
void opBinary(string op, R)(R range,
string file = __FILE__,
in size_t line = __LINE__) const
if(op == "~" && isInputRange!R)
{
shouldBeSameSetAs(forward!value, range, file, line);
}
void opBinary(string op, E)
(in E expected, string file = __FILE__, size_t line = __LINE__)
if (isFloatingPoint!E)
{
shouldApproxEqual(forward!value, expected, 1e-2, 1e-5, file, line);
}
auto not() {
return ShouldNot();
}
}
return Should();
}
T be(T)(T sh) {
return sh;
}
///
@safe pure unittest {
1.should.be == 1;
1.should.not.be == 2;
1.should.be in [1, 2, 3];
4.should.not.be in [1, 2, 3];
}
/**
Asserts that `lowerBound` <= `actual` < `upperBound`
*/
void shouldBeBetween(A, L, U)
(auto ref A actual,
auto ref L lowerBound,
auto ref U upperBound,
string file = __FILE__,
in size_t line = __LINE__)
{
import std.conv: text;
if(actual < lowerBound || actual >= upperBound)
fail(text(actual, " is not between ", lowerBound, " and ", upperBound), file, line);
}
|
D
|
module dbi.Statement;
private import stdrus, text.Util;
private import dbi.DataBase, dbi.DBIException, dbi.Result;
/**
* Подготавливает инструкцию на SQL.
*
* Bugs:
* Инструкция сохраняется, не не подготавливается.
*
* Эта версия индекса игнорирует свой первый параметр.
*
* Обе формы связки нельзя использовать одновременно.
*
* Todo:
* make выполни/запрос("10", "20", 30); work (variable arguments for подвязing to ?, ?, ?, etc...)
*/
final class Инструкция
{
/**
* Создаёт новый экземпляр Инструкция.
*
* Params:
* бд = The бд подключение to use.
* эскюэл = The SQL code to подготовь.
*/
this (БазаДанных бд, ткст эскюэл) ;
/**
* Bind a _value to the следщ "?".
*
* Params:
* индекс = Currently ignored. This is a bug.
* значение = The _value to _подвяз.
*/
проц вяжи (т_мера индекс, ткст значение);
/**
* Bind a _value to a ":имя:".
*
* Params:
* fn = The имя to _подвяз значение to.
* значение = The _value to _подвяз.
*/
проц вяжи (ткст fn, ткст значение);
/**
* Execute a SQL statement that returns no результаты.
*/
проц выполни () ;
/**
* Query the бд.
*
* Returns:
* A Результат object with the queried information.
*/
Результат запрос () ;
private:
БазаДанных бд;
ткст эскюэл;
ткст[] подвязки;
ткст[] подвязкиПНн;
/**
* Escape a SQL statement.
*
* Params:
* текст = An unescaped SQL statement.
*
* Returns:
* The escaped form of текст.
*/
ткст искейп (ткст текст) ;
/**
* Replace every "?" in the current SQL statement with its bound значение.
*
* Returns:
* The current SQL statement with all occurences of "?" replaced.
*
* Todo:
* Raise an exception if подвязки.length != счёт(эскюэл, "?")
*/
ткст дайЭсКюЭлпоКМ () ;
/**
* Replace every ":имя:" in the current SQL statement with its bound значение.
*
* Returns:
* The current SQL statement with all occurences of ":имя:" replaced.
*
* Todo:
* Raise an exception if подвязки.length != (счёт(эскюэл, ":") * 2)
*/
ткст дайЭсКюЭлпоПН () ;
/**
* Replace all variables with their bound значения.
*
* Returns:
* The current SQL statement with all occurences of variables replaced.
*/
ткст дайЭсКюЭл () ;
/**
* Get the значение bound to a ":имя:".
*
* Params:
* fn = The ":имя:" to return the bound значение of.
*
* Returns:
* The bound значение of fn.
*
* Thряды:
* ИсклДБИ if fn is not bound
*/
ткст дайСвязанноеЗначение (ткст fn);
}
import stdrus;
unittest
{
проц s1 (ткст s)
{
скажифнс("%s", s);
}
проц s2 (ткст s)
{
скажифнс(" ...%s", s);
}
s1("dbi.Statement:");
Инструкция инстр = new Инструкция(пусто, "SELECT * FROM люди");
ткст резЭсКюЭл = "SELECT * FROM люди WHERE id = '10' OR имя LIKE 'John Mc\\'Donald'";
s2("искейп");
assert (инстр.искейп("John Mc'Donald") == "John Mc\\'Donald");
s2("простой эскюэл");
инстр = new Инструкция(пусто, "SELECT * FROM люди");
assert (инстр.дайЭсКюЭл() == "SELECT * FROM люди");
s2("вяжим по '?'");
инстр = new Инструкция(пусто, "SELECT * FROM люди WHERE id = ? OR имя LIKE ?");
инстр.вяжи(1, "10");
инстр.вяжи(2, "John Mc'Donald");
assert (инстр.дайЭсКюЭл() == резЭсКюЭл);
/+
s2("вяжи by '?' sent to дайЭсКюЭл via variable arguments");
инстр = new Инструкция("SELECT * FROM люди WHERE id = ? OR имя LIKE ?");
assert (инстр.дайЭсКюЭл("10", "John Mc'Donald") == резЭсКюЭл);
+/
s2("вяжим по ':имя_поля:'");
инстр = new Инструкция(пусто, "SELECT * FROM люди WHERE id = :id: OR имя LIKE :имя:");
инстр.вяжи("id", "10");
инстр.вяжи("имя", "John Mc'Donald");
assert (инстр.дайСвязанноеЗначение("имя") == "John Mc\\'Donald");
assert (инстр.дайЭсКюЭл() == резЭсКюЭл);
}
|
D
|
/******************************************************************************
This holds miscellaneous functionality used in the internal library and also
as part of the extended API. There are no public functions in here.
License:
Copyright (c) 2008 Jarrett Billingsley
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 amigos.minid.misc;
import Integer = tango.text.convert.Integer;
import tango.io.stream.Format;
import tango.math.Math;
import tango.stdc.ctype;
import tango.stdc.stdlib;
import tango.text.convert.Utf;
import tango.text.Util;
import Uni = tango.text.Unicode;
alias tango.text.Util.contains contains;
import amigos.minid.alloc;
import amigos.minid.ex;
import amigos.minid.interpreter;
import amigos.minid.types;
import amigos.minid.utils;
package void formatImpl(MDThread* t, uword numParams, uint delegate(char[]) sink)
{
auto formatter = t.vm.formatter;
void output(char[] fmt, uword param, bool isRaw)
{
auto tmp = (cast(char*)alloca(fmt.length + 1))[0 .. fmt.length + 1];
tmp[0] = '{';
tmp[1 .. $] = fmt[];
switch(type(t, param))
{
case MDValue.Type.Int: formatter.convert(sink, tmp, getInt(t, param)); break;
case MDValue.Type.Float: formatter.convert(sink, tmp, getFloat(t, param)); break;
case MDValue.Type.Char: formatter.convert(sink, tmp, getChar(t, param)); break;
default:
pushToString(t, param, isRaw);
formatter.convert(sink, tmp, getString(t, -1));
pop(t);
break;
}
}
auto formatStr = getString(t, 1);
uword autoIndex = 2;
uword begin = 0;
while(begin < formatStr.length)
{
// output anything outside the {}
auto fmtBegin = formatStr.locate('{', begin);
if(fmtBegin > begin)
{
formatter.convert(sink, "{}", formatStr[begin .. fmtBegin]);
begin = fmtBegin;
}
// did we run out of string?
if(fmtBegin == formatStr.length)
break;
// Check if it's an escaped {
if(formatStr[fmtBegin + 1] == '{')
{
begin = fmtBegin + 2;
formatter.convert(sink, "{}", "{");
continue;
}
// find the end of the {}
auto fmtEnd = formatStr.locate('}', fmtBegin + 1);
// onoz, unmatched {}
if(fmtEnd == formatStr.length)
{
formatter.convert(sink, "{{missing or misplaced '}'}{}", formatStr[fmtBegin .. $]);
break;
}
// chop off opening { on format spec but leave closing }
// this means fmtSpec.length will always be >= 1
auto fmtSpec = formatStr[fmtBegin + 1 .. fmtEnd + 1];
bool isRaw = false;
// check for {r and remove it if there
if(fmtSpec[0] == 'r')
{
isRaw = true;
fmtSpec = fmtSpec[1 .. $];
}
// check for parameter index and remove it if there
auto index = autoIndex;
if(isdigit(fmtSpec[0]))
{
uword j = 0;
for(; j < fmtSpec.length && isdigit(fmtSpec[j]); j++)
{}
index = Integer.atoi(fmtSpec[0 .. j]) + 2;
fmtSpec = fmtSpec[j .. $];
}
else
autoIndex++;
// output it (or see if it's an invalid index)
if(index > numParams)
formatter.convert(sink, "{{invalid index}");
else
output(fmtSpec, index, isRaw);
begin = fmtEnd + 1;
}
}
struct JSON
{
static:
struct Token
{
public uint type;
public uword line;
public uword col;
public enum
{
String,
Int,
Float,
True,
False,
Null,
Comma,
Colon,
LBrace,
RBrace,
LBracket,
RBracket,
EOF
}
public static const char[][] strings =
[
String: "ткст",
Int: "integer",
Float: "плав",
True: "вкл",
False: "выкл",
Null: "пусто",
Comma: ",",
Colon: ":",
LBrace: "{",
RBrace: "}",
LBracket: "[",
RBracket: "]",
EOF: "<EOF>"
];
}
struct Lexer
{
private MDThread* t;
private uword mLine;
private uword mCol;
private char[] mSource;
private uword mPosition;
private dchar mCharacter;
private Token mTok;
public void begin(MDThread* t, char[] source)
{
this.t = t;
mLine = 1;
mCol = 0;
mSource = source;
mPosition = 0;
nextChar();
next();
}
public Token* tok()
{
return &mTok;
}
public uword line()
{
return mLine;
}
public uword col()
{
return mCol;
}
public uint type()
{
return mTok.type;
}
public Token expect(uint t)
{
if(mTok.type != t)
expected(Token.strings[t]);
auto ret = mTok;
if(t != Token.EOF)
next();
return ret;
}
public void expected(char[] message)
{
throwException(t, "({}:{}): '{}' expected; found '{}' instead", mTok.line, mTok.col, message, Token.strings[mTok.type]);
}
public void next()
{
nextToken();
}
private bool isEOF()
{
return mCharacter == dchar.init;
}
private bool isWhitespace()
{
return (mCharacter == ' ') || (mCharacter == '\t') || isNewline();
}
private bool isNewline()
{
return (mCharacter == '\r') || (mCharacter == '\n');
}
private bool isHexDigit()
{
return ((mCharacter >= '0') && (mCharacter <= '9')) ||
((mCharacter >= 'a') && (mCharacter <= 'f')) ||
((mCharacter >= 'A') && (mCharacter <= 'F'));
}
private bool isDecimalDigit()
{
return (mCharacter >= '0') && (mCharacter <= '9');
}
private ubyte hexDigitToInt(dchar c)
{
assert((c >= '0' && c <= '9') || (c >= 'a' && c <= 'f') || (c >= 'A' && c <= 'F'), "hexDigitToInt");
if(c >= '0' && c <= '9')
return cast(ubyte)(c - '0');
if(Uni.isUpper(c))
return cast(ubyte)(c - 'A' + 10);
else
return cast(ubyte)(c - 'a' + 10);
}
private dchar readChar()
{
if(mPosition >= mSource.length)
return dchar.init;
else
{
uint ate = 0;
auto ret = Utf.decode(mSource[mPosition .. $], ate);
mPosition += ate;
return ret;
}
}
private void nextChar()
{
mCol++;
mCharacter = readChar();
}
private void nextLine()
{
while(isNewline() && !isEOF())
{
dchar old = mCharacter;
nextChar();
if(isNewline() && mCharacter != old)
nextChar();
mLine++;
mCol = 1;
}
}
private bool convertInt(dchar[] str, out mdint ret)
{
ret = 0;
foreach(c; str)
{
c -= '0';
auto newValue = ret * 10 + c;
if(newValue < ret)
return false;
ret = newValue;
}
return true;
}
private bool readNumLiteral()
{
bool neg = false;
// sign
if(mCharacter == '-')
{
neg = true;
nextChar();
if(!isDecimalDigit())
throwException(t, "({}:{}): incomplete number token", mLine, mCol);
}
// integral part
mdint iret = 0;
if(mCharacter == '0')
nextChar();
else
{
while(isDecimalDigit())
{
iret = (iret * 10) + (mCharacter - '0');
nextChar();
}
}
if(isEOF() || !contains(".eE"d, mCharacter))
{
pushInt(t, neg? -iret : iret);
return true;
}
// fraction
mdfloat fret = iret;
if(mCharacter == '.')
{
nextChar();
if(!isDecimalDigit())
throwException(t, "({}:{}): incomplete number token", mLine, mCol);
mdfloat frac = 0.0;
mdfloat mag = 10.0;
while(isDecimalDigit())
{
frac += (mCharacter - '0') / mag;
mag *= 10;
nextChar();
}
fret += frac;
}
// exponent
if(mCharacter == 'e' || mCharacter == 'E')
{
nextChar();
if(!isDecimalDigit() && mCharacter != '+' && mCharacter != '-')
throwException(t, "({}:{}): incomplete number token", mLine, mCol);
bool negExp = false;
if(mCharacter == '+')
nextChar();
else if(mCharacter == '-')
{
negExp = true;
nextChar();
}
if(!isDecimalDigit())
throwException(t, "({}:{}): incomplete number token", mLine, mCol);
mdfloat exp = 0;
while(isDecimalDigit())
{
exp = (exp * 10) + (mCharacter - '0');
nextChar();
}
fret = fret * pow(10, negExp? -exp : exp);
}
pushFloat(t, neg? -fret : fret);
return false;
}
private dchar readEscapeSequence(uword beginningLine, uword beginningCol)
{
uint readHexDigits(uint num)
{
uint ret = 0;
for(uint i = 0; i < num; i++)
{
if(!isHexDigit())
throwException(t, "({}:{}): Hexadecimal escape digits expected", mLine, mCol);
ret <<= 4;
ret |= hexDigitToInt(mCharacter);
nextChar();
}
return ret;
}
dchar ret;
assert(mCharacter == '\\', "escape seq - must start on backslash");
nextChar();
if(isEOF())
throwException(t, "({}:{}): Unterminated string literal", beginningLine, beginningCol);
switch(mCharacter)
{
case 'b': nextChar(); return '\b';
case 'f': nextChar(); return '\f';
case 'n': nextChar(); return '\n';
case 'r': nextChar(); return '\r';
case 't': nextChar(); return '\t';
case '\\': nextChar(); return '\\';
case '\"': nextChar(); return '\"';
case '/': nextChar(); return '/';
case 'u':
nextChar();
auto x = readHexDigits(4);
if(x >= 0xD800 && x < 0xDC00)
{
if(mCharacter != '\\')
throwException(t, "({}:{}): second surrogate pair character expected", mLine, mCol);
nextChar();
if(mCharacter != 'u')
throwException(t, "({}:{}): second surrogate pair character expected", mLine, mCol);
nextChar();
auto x2 = readHexDigits(4);
x &= ~0xD800;
x2 &= ~0xDC00;
ret = cast(dchar)(0x10000 + ((x << 10) | x2));
}
else if(x >= 0xDC00 && x < 0xE000)
throwException(t, "({}:{}): invalid surrogate pair sequence", mLine, mCol);
else
ret = cast(dchar)x;
break;
default:
throwException(t, "({}:{}): Invalid string escape sequence '\\{}'", mLine, mCol, mCharacter);
}
return ret;
}
private void readStringLiteral()
{
auto beginningLine = mLine;
auto beginningCol = mCol;
auto buf = StrBuffer(t);
// Skip opening quote
nextChar();
while(true)
{
if(isEOF())
throwException(t, "({}:{}): Unterminated string literal", beginningLine, beginningCol);
if(mCharacter == '\\')
buf.addChar(readEscapeSequence(beginningLine, beginningCol));
else if(mCharacter == '"')
break;
else if(mCharacter <= 0x1f)
throwException(t, "({}:{}): Invalid character in string token", mLine, mCol);
else
{
buf.addChar(mCharacter);
nextChar();
}
}
// Skip end quote
nextChar();
buf.finish();
}
private void nextToken()
{
while(true)
{
mTok.line = mLine;
mTok.col = mCol;
switch(mCharacter)
{
case '\r', '\n':
nextLine();
continue;
case '\"':
readStringLiteral();
mTok.type = Token.String;
return;
case '{':
nextChar();
mTok.type = Token.LBrace;
return;
case '}':
nextChar();
mTok.type = Token.RBrace;
return;
case '[':
nextChar();
mTok.type = Token.LBracket;
return;
case ']':
nextChar();
mTok.type = Token.RBracket;
return;
case ',':
nextChar();
mTok.type = Token.Comma;
return;
case ':':
nextChar();
mTok.type = Token.Colon;
return;
case dchar.init:
mTok.type = Token.EOF;
return;
case 't':
if(!mSource[mPosition .. $].startsWith("rue"))
throwException(t, "({}:{}): true expected", mLine, mCol);
nextChar();
nextChar();
nextChar();
nextChar();
mTok.type = Token.True;
pushBool(t, true);
return;
case 'f':
if(!mSource[mPosition .. $].startsWith("alse"))
throwException(t, "({}:{}): false expected", mLine, mCol);
nextChar();
nextChar();
nextChar();
nextChar();
nextChar();
mTok.type = Token.False;
pushBool(t, false);
return;
case 'n':
if(!mSource[mPosition .. $].startsWith("ull"))
throwException(t, "({}:{}): null expected", mLine, mCol);
nextChar();
nextChar();
nextChar();
nextChar();
mTok.type = Token.Null;
pushNull(t);
return;
case '-', '1', '2', '3', '4', '5', '6', '7', '8', '9':
if(readNumLiteral())
mTok.type = Token.Int;
else
mTok.type = Token.Float;
return;
default:
if(isWhitespace())
{
nextChar();
continue;
}
throwException(t, "({}:{}): Invalid character '{}'", mLine, mCol, mCharacter);
}
}
}
}
private void parseValue(MDThread* t, ref Lexer l)
{
switch(l.type)
{
case Token.String:
case Token.Int:
case Token.Float:
case Token.True:
case Token.False:
case Token.Null: l.next(); return;
case Token.LBrace: return parseObject(t, l);
case Token.LBracket: return parseArray(t, l);
default: throwException(t, "({}:{}): value expected", l.line, l.col);
}
}
private word parseArray(MDThread* t, ref Lexer l)
{
auto arr = newArray(t, 0);
l.expect(Token.LBracket);
if(l.type != Token.RBracket)
{
parseValue(t, l);
dup(t, arr);
pushNull(t);
rotate(t, 3, 2);
methodCall(t, -3, "добвк", 0);
while(l.type == Token.Comma)
{
l.next();
parseValue(t, l);
dup(t, arr);
pushNull(t);
rotate(t, 3, 2);
methodCall(t, -3, "добвк", 0);
}
}
l.expect(Token.RBracket);
return arr;
}
private void parsePair(MDThread* t, ref Lexer l)
{
l.expect(Token.String);
l.expect(Token.Colon);
parseValue(t, l);
}
private word parseObject(MDThread* t, ref Lexer l)
{
auto tab = newTable(t);
l.expect(Token.LBrace);
if(l.type != Token.RBrace)
{
parsePair(t, l);
idxa(t, tab);
while(l.type == Token.Comma)
{
l.next();
parsePair(t, l);
idxa(t, tab);
}
}
l.expect(Token.RBrace);
return tab;
}
package word load(MDThread* t, char[] source)
{
Lexer l;
l.begin(t, source);
word ret;
if(l.type == Token.LBrace)
ret = parseObject(t, l);
else if(l.type == Token.LBracket)
ret = parseArray(t, l);
else
throwException(t, "JSON must have an object or an array as its top-level value");
l.expect(Token.EOF);
return ret;
}
// Expects root to be at the top of the stack
package void save(T)(MDThread* t, word root, bool pretty, FormatOutput!(T) printer)
{
root = absIndex(t, root);
auto cycles = newTable(t);
word indent = 0;
void newline(word dir = 0)
{
printer.newline;
if(dir > 0)
indent++;
else if(dir < 0)
indent--;
for(word i = indent; i > 0; i--)
printer.print("\t");
}
void delegate(word) outputValue;
void outputTable(word tab)
{
printer.print("{");
if(pretty)
newline(1);
bool first = true;
dup(t, tab);
foreach(word k, word v; foreachLoop(t, 1))
{
if(!isString(t, k))
throwException(t, "All keys in a JSON table must be strings");
if(first)
first = false;
else
{
printer.print(",");
if(pretty)
newline();
}
outputValue(k);
if(pretty)
printer.print(": ");
else
printer.print(":");
outputValue(v);
}
if(pretty)
newline(-1);
printer.print("}");
}
void outputArray(word arr)
{
printer.print("[");
auto l = len(t, arr);
for(word i = 0; i < l; i++)
{
if(i > 0)
{
if(pretty)
printer.print(", ");
else
printer.print(",");
}
outputValue(idxi(t, arr, i));
pop(t);
}
printer.print("]");
}
void outputChar(dchar c)
{
switch(c)
{
case '\b': printer.print("\\b"); return;
case '\f': printer.print("\\f"); return;
case '\n': printer.print("\\n"); return;
case '\r': printer.print("\\r"); return;
case '\t': printer.print("\\t"); return;
case '"', '\\', '/':
printer.print("\\");
printer.print(c);
return;
default:
if(c > 0x7f)
printer.format("\\u{:x4}", cast(int)c);
else
printer.print(c);
return;
}
}
void _outputValue(word idx)
{
switch(type(t, idx))
{
case MDValue.Type.Null:
printer.print("пусто");
break;
case MDValue.Type.Bool:
printer.print(getBool(t, idx) ? "вкл" : "выкл");
break;
case MDValue.Type.Int:
printer.format("{}", getInt(t, idx));
break;
case MDValue.Type.Float:
printer.format("{}", getFloat(t, idx));
break;
case MDValue.Type.Char:
printer.print('"');
outputChar(getChar(t, idx));
printer.print('"');
break;
case MDValue.Type.String:
printer.print('"');
foreach(dchar c; getString(t, idx))
outputChar(c);
printer.print('"');
break;
case MDValue.Type.Table:
if(opin(t, idx, cycles))
throwException(t, "Table is cyclically referenced");
dup(t, idx);
pushBool(t, true);
idxa(t, cycles);
scope(exit)
{
dup(t, idx);
pushNull(t);
idxa(t, cycles);
}
outputTable(idx);
break;
case MDValue.Type.Array:
if(opin(t, idx, cycles))
throwException(t, "Array is cyclically referenced");
dup(t, idx);
pushBool(t, true);
idxa(t, cycles);
scope(exit)
{
dup(t, idx);
pushNull(t);
idxa(t, cycles);
}
outputArray(idx);
break;
default:
pushTypeString(t, idx);
throwException(t, "Type '{}' is not a valid type for conversion to JSON", getString(t, -1));
}
}
outputValue = &_outputValue;
if(isArray(t, root))
outputArray(root);
else if(isTable(t, root))
outputTable(root);
else
{
pushTypeString(t, root);
throwException(t, "Root element must be either a table or an array, not a '{}'", getString(t, -1));
}
printer.flush();
pop(t);
}
}
|
D
|
/Users/work/Projects/Hello/.build/x86_64-apple-macosx10.10/debug/Core.build/String+Utilities.swift.o : /Users/work/Projects/Hello/.build/checkouts/core.git-9210800844849382486/Sources/Core/Data+Base64URL.swift /Users/work/Projects/Hello/.build/checkouts/core.git-9210800844849382486/Sources/Core/NestedData.swift /Users/work/Projects/Hello/.build/checkouts/core.git-9210800844849382486/Sources/Core/Thread+Async.swift /Users/work/Projects/Hello/.build/checkouts/core.git-9210800844849382486/Sources/Core/Deprecated.swift /Users/work/Projects/Hello/.build/checkouts/core.git-9210800844849382486/Sources/Core/NotFound.swift /Users/work/Projects/Hello/.build/checkouts/core.git-9210800844849382486/Sources/Core/CodableReflection/ReflectionDecodable.swift /Users/work/Projects/Hello/.build/checkouts/core.git-9210800844849382486/Sources/Core/CodableReflection/Decodable+Reflectable.swift /Users/work/Projects/Hello/.build/checkouts/core.git-9210800844849382486/Sources/Core/Reflectable.swift /Users/work/Projects/Hello/.build/checkouts/core.git-9210800844849382486/Sources/Core/LosslessDataConvertible.swift /Users/work/Projects/Hello/.build/checkouts/core.git-9210800844849382486/Sources/Core/File.swift /Users/work/Projects/Hello/.build/checkouts/core.git-9210800844849382486/Sources/Core/MediaType.swift /Users/work/Projects/Hello/.build/checkouts/core.git-9210800844849382486/Sources/Core/OptionalType.swift /Users/work/Projects/Hello/.build/checkouts/core.git-9210800844849382486/Sources/Core/Process+Execute.swift /Users/work/Projects/Hello/.build/checkouts/core.git-9210800844849382486/Sources/Core/HeaderValue.swift /Users/work/Projects/Hello/.build/checkouts/core.git-9210800844849382486/Sources/Core/DirectoryConfig.swift /Users/work/Projects/Hello/.build/checkouts/core.git-9210800844849382486/Sources/Core/CaseInsensitiveString.swift /Users/work/Projects/Hello/.build/checkouts/core.git-9210800844849382486/Sources/Core/Future+Unwrap.swift /Users/work/Projects/Hello/.build/checkouts/core.git-9210800844849382486/Sources/Core/FutureEncoder.swift /Users/work/Projects/Hello/.build/checkouts/core.git-9210800844849382486/Sources/Core/CoreError.swift /Users/work/Projects/Hello/.build/checkouts/core.git-9210800844849382486/Sources/Core/String+Utilities.swift /Users/work/Projects/Hello/.build/checkouts/core.git-9210800844849382486/Sources/Core/DataCoders.swift /Users/work/Projects/Hello/.build/checkouts/core.git-9210800844849382486/Sources/Core/CodableReflection/ReflectionDecoders.swift /Users/work/Projects/Hello/.build/checkouts/core.git-9210800844849382486/Sources/Core/Exports.swift /Users/work/Projects/Hello/.build/checkouts/core.git-9210800844849382486/Sources/Core/Data+Hex.swift /Users/work/Projects/Hello/.build/checkouts/core.git-9210800844849382486/Sources/Core/BasicKey.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/work/Projects/Hello/.build/x86_64-apple-macosx10.10/debug/NIO.swiftmodule /Users/work/Projects/Hello/.build/x86_64-apple-macosx10.10/debug/Async.swiftmodule /Users/work/Projects/Hello/.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/work/Projects/Hello/.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/work/Projects/Hello/.build/x86_64-apple-macosx10.10/debug/NIOConcurrencyHelpers.swiftmodule /Users/work/Projects/Hello/.build/x86_64-apple-macosx10.10/debug/Bits.swiftmodule /Users/work/Projects/Hello/.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/work/Projects/Hello/.build/checkouts/swift-nio.git-3108475404973543938/Sources/CNIOAtomics/include/cpp_magic.h /Users/work/Projects/Hello/.build/checkouts/swift-nio.git-3108475404973543938/Sources/CNIODarwin/include/c_nio_darwin.h /Users/work/Projects/Hello/.build/checkouts/swift-nio.git-3108475404973543938/Sources/CNIOAtomics/include/c-atomics.h /Users/work/Projects/Hello/.build/checkouts/swift-nio.git-3108475404973543938/Sources/CNIOLinux/include/c_nio_linux.h /Users/work/Projects/Hello/.build/checkouts/swift-nio-zlib-support.git--1071467962839356487/module.modulemap /Users/work/Projects/Hello/.build/x86_64-apple-macosx10.10/debug/CNIOSHA1.build/module.modulemap /Users/work/Projects/Hello/.build/x86_64-apple-macosx10.10/debug/CNIOOpenSSL.build/module.modulemap /Users/work/Projects/Hello/.build/x86_64-apple-macosx10.10/debug/CNIOZlib.build/module.modulemap /Users/work/Projects/Hello/.build/x86_64-apple-macosx10.10/debug/CNIODarwin.build/module.modulemap /Users/work/Projects/Hello/.build/x86_64-apple-macosx10.10/debug/CNIOHTTPParser.build/module.modulemap /Users/work/Projects/Hello/.build/x86_64-apple-macosx10.10/debug/CNIOAtomics.build/module.modulemap /Users/work/Projects/Hello/.build/x86_64-apple-macosx10.10/debug/CNIOLinux.build/module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes
/Users/work/Projects/Hello/.build/x86_64-apple-macosx10.10/debug/Core.build/String+Utilities~partial.swiftmodule : /Users/work/Projects/Hello/.build/checkouts/core.git-9210800844849382486/Sources/Core/Data+Base64URL.swift /Users/work/Projects/Hello/.build/checkouts/core.git-9210800844849382486/Sources/Core/NestedData.swift /Users/work/Projects/Hello/.build/checkouts/core.git-9210800844849382486/Sources/Core/Thread+Async.swift /Users/work/Projects/Hello/.build/checkouts/core.git-9210800844849382486/Sources/Core/Deprecated.swift /Users/work/Projects/Hello/.build/checkouts/core.git-9210800844849382486/Sources/Core/NotFound.swift /Users/work/Projects/Hello/.build/checkouts/core.git-9210800844849382486/Sources/Core/CodableReflection/ReflectionDecodable.swift /Users/work/Projects/Hello/.build/checkouts/core.git-9210800844849382486/Sources/Core/CodableReflection/Decodable+Reflectable.swift /Users/work/Projects/Hello/.build/checkouts/core.git-9210800844849382486/Sources/Core/Reflectable.swift /Users/work/Projects/Hello/.build/checkouts/core.git-9210800844849382486/Sources/Core/LosslessDataConvertible.swift /Users/work/Projects/Hello/.build/checkouts/core.git-9210800844849382486/Sources/Core/File.swift /Users/work/Projects/Hello/.build/checkouts/core.git-9210800844849382486/Sources/Core/MediaType.swift /Users/work/Projects/Hello/.build/checkouts/core.git-9210800844849382486/Sources/Core/OptionalType.swift /Users/work/Projects/Hello/.build/checkouts/core.git-9210800844849382486/Sources/Core/Process+Execute.swift /Users/work/Projects/Hello/.build/checkouts/core.git-9210800844849382486/Sources/Core/HeaderValue.swift /Users/work/Projects/Hello/.build/checkouts/core.git-9210800844849382486/Sources/Core/DirectoryConfig.swift /Users/work/Projects/Hello/.build/checkouts/core.git-9210800844849382486/Sources/Core/CaseInsensitiveString.swift /Users/work/Projects/Hello/.build/checkouts/core.git-9210800844849382486/Sources/Core/Future+Unwrap.swift /Users/work/Projects/Hello/.build/checkouts/core.git-9210800844849382486/Sources/Core/FutureEncoder.swift /Users/work/Projects/Hello/.build/checkouts/core.git-9210800844849382486/Sources/Core/CoreError.swift /Users/work/Projects/Hello/.build/checkouts/core.git-9210800844849382486/Sources/Core/String+Utilities.swift /Users/work/Projects/Hello/.build/checkouts/core.git-9210800844849382486/Sources/Core/DataCoders.swift /Users/work/Projects/Hello/.build/checkouts/core.git-9210800844849382486/Sources/Core/CodableReflection/ReflectionDecoders.swift /Users/work/Projects/Hello/.build/checkouts/core.git-9210800844849382486/Sources/Core/Exports.swift /Users/work/Projects/Hello/.build/checkouts/core.git-9210800844849382486/Sources/Core/Data+Hex.swift /Users/work/Projects/Hello/.build/checkouts/core.git-9210800844849382486/Sources/Core/BasicKey.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/work/Projects/Hello/.build/x86_64-apple-macosx10.10/debug/NIO.swiftmodule /Users/work/Projects/Hello/.build/x86_64-apple-macosx10.10/debug/Async.swiftmodule /Users/work/Projects/Hello/.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/work/Projects/Hello/.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/work/Projects/Hello/.build/x86_64-apple-macosx10.10/debug/NIOConcurrencyHelpers.swiftmodule /Users/work/Projects/Hello/.build/x86_64-apple-macosx10.10/debug/Bits.swiftmodule /Users/work/Projects/Hello/.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/work/Projects/Hello/.build/checkouts/swift-nio.git-3108475404973543938/Sources/CNIOAtomics/include/cpp_magic.h /Users/work/Projects/Hello/.build/checkouts/swift-nio.git-3108475404973543938/Sources/CNIODarwin/include/c_nio_darwin.h /Users/work/Projects/Hello/.build/checkouts/swift-nio.git-3108475404973543938/Sources/CNIOAtomics/include/c-atomics.h /Users/work/Projects/Hello/.build/checkouts/swift-nio.git-3108475404973543938/Sources/CNIOLinux/include/c_nio_linux.h /Users/work/Projects/Hello/.build/checkouts/swift-nio-zlib-support.git--1071467962839356487/module.modulemap /Users/work/Projects/Hello/.build/x86_64-apple-macosx10.10/debug/CNIOSHA1.build/module.modulemap /Users/work/Projects/Hello/.build/x86_64-apple-macosx10.10/debug/CNIOOpenSSL.build/module.modulemap /Users/work/Projects/Hello/.build/x86_64-apple-macosx10.10/debug/CNIOZlib.build/module.modulemap /Users/work/Projects/Hello/.build/x86_64-apple-macosx10.10/debug/CNIODarwin.build/module.modulemap /Users/work/Projects/Hello/.build/x86_64-apple-macosx10.10/debug/CNIOHTTPParser.build/module.modulemap /Users/work/Projects/Hello/.build/x86_64-apple-macosx10.10/debug/CNIOAtomics.build/module.modulemap /Users/work/Projects/Hello/.build/x86_64-apple-macosx10.10/debug/CNIOLinux.build/module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes
/Users/work/Projects/Hello/.build/x86_64-apple-macosx10.10/debug/Core.build/String+Utilities~partial.swiftdoc : /Users/work/Projects/Hello/.build/checkouts/core.git-9210800844849382486/Sources/Core/Data+Base64URL.swift /Users/work/Projects/Hello/.build/checkouts/core.git-9210800844849382486/Sources/Core/NestedData.swift /Users/work/Projects/Hello/.build/checkouts/core.git-9210800844849382486/Sources/Core/Thread+Async.swift /Users/work/Projects/Hello/.build/checkouts/core.git-9210800844849382486/Sources/Core/Deprecated.swift /Users/work/Projects/Hello/.build/checkouts/core.git-9210800844849382486/Sources/Core/NotFound.swift /Users/work/Projects/Hello/.build/checkouts/core.git-9210800844849382486/Sources/Core/CodableReflection/ReflectionDecodable.swift /Users/work/Projects/Hello/.build/checkouts/core.git-9210800844849382486/Sources/Core/CodableReflection/Decodable+Reflectable.swift /Users/work/Projects/Hello/.build/checkouts/core.git-9210800844849382486/Sources/Core/Reflectable.swift /Users/work/Projects/Hello/.build/checkouts/core.git-9210800844849382486/Sources/Core/LosslessDataConvertible.swift /Users/work/Projects/Hello/.build/checkouts/core.git-9210800844849382486/Sources/Core/File.swift /Users/work/Projects/Hello/.build/checkouts/core.git-9210800844849382486/Sources/Core/MediaType.swift /Users/work/Projects/Hello/.build/checkouts/core.git-9210800844849382486/Sources/Core/OptionalType.swift /Users/work/Projects/Hello/.build/checkouts/core.git-9210800844849382486/Sources/Core/Process+Execute.swift /Users/work/Projects/Hello/.build/checkouts/core.git-9210800844849382486/Sources/Core/HeaderValue.swift /Users/work/Projects/Hello/.build/checkouts/core.git-9210800844849382486/Sources/Core/DirectoryConfig.swift /Users/work/Projects/Hello/.build/checkouts/core.git-9210800844849382486/Sources/Core/CaseInsensitiveString.swift /Users/work/Projects/Hello/.build/checkouts/core.git-9210800844849382486/Sources/Core/Future+Unwrap.swift /Users/work/Projects/Hello/.build/checkouts/core.git-9210800844849382486/Sources/Core/FutureEncoder.swift /Users/work/Projects/Hello/.build/checkouts/core.git-9210800844849382486/Sources/Core/CoreError.swift /Users/work/Projects/Hello/.build/checkouts/core.git-9210800844849382486/Sources/Core/String+Utilities.swift /Users/work/Projects/Hello/.build/checkouts/core.git-9210800844849382486/Sources/Core/DataCoders.swift /Users/work/Projects/Hello/.build/checkouts/core.git-9210800844849382486/Sources/Core/CodableReflection/ReflectionDecoders.swift /Users/work/Projects/Hello/.build/checkouts/core.git-9210800844849382486/Sources/Core/Exports.swift /Users/work/Projects/Hello/.build/checkouts/core.git-9210800844849382486/Sources/Core/Data+Hex.swift /Users/work/Projects/Hello/.build/checkouts/core.git-9210800844849382486/Sources/Core/BasicKey.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/work/Projects/Hello/.build/x86_64-apple-macosx10.10/debug/NIO.swiftmodule /Users/work/Projects/Hello/.build/x86_64-apple-macosx10.10/debug/Async.swiftmodule /Users/work/Projects/Hello/.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/work/Projects/Hello/.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/work/Projects/Hello/.build/x86_64-apple-macosx10.10/debug/NIOConcurrencyHelpers.swiftmodule /Users/work/Projects/Hello/.build/x86_64-apple-macosx10.10/debug/Bits.swiftmodule /Users/work/Projects/Hello/.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/work/Projects/Hello/.build/checkouts/swift-nio.git-3108475404973543938/Sources/CNIOAtomics/include/cpp_magic.h /Users/work/Projects/Hello/.build/checkouts/swift-nio.git-3108475404973543938/Sources/CNIODarwin/include/c_nio_darwin.h /Users/work/Projects/Hello/.build/checkouts/swift-nio.git-3108475404973543938/Sources/CNIOAtomics/include/c-atomics.h /Users/work/Projects/Hello/.build/checkouts/swift-nio.git-3108475404973543938/Sources/CNIOLinux/include/c_nio_linux.h /Users/work/Projects/Hello/.build/checkouts/swift-nio-zlib-support.git--1071467962839356487/module.modulemap /Users/work/Projects/Hello/.build/x86_64-apple-macosx10.10/debug/CNIOSHA1.build/module.modulemap /Users/work/Projects/Hello/.build/x86_64-apple-macosx10.10/debug/CNIOOpenSSL.build/module.modulemap /Users/work/Projects/Hello/.build/x86_64-apple-macosx10.10/debug/CNIOZlib.build/module.modulemap /Users/work/Projects/Hello/.build/x86_64-apple-macosx10.10/debug/CNIODarwin.build/module.modulemap /Users/work/Projects/Hello/.build/x86_64-apple-macosx10.10/debug/CNIOHTTPParser.build/module.modulemap /Users/work/Projects/Hello/.build/x86_64-apple-macosx10.10/debug/CNIOAtomics.build/module.modulemap /Users/work/Projects/Hello/.build/x86_64-apple-macosx10.10/debug/CNIOLinux.build/module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes
|
D
|
.source T_shl_int_5.java
.class public dot.junit.opcodes.shl_int.d.T_shl_int_5
.super java/lang/Object
.method public <init>()V
.limit regs 1
invoke-direct {v0}, java/lang/Object/<init>()V
return-void
.end method
.method public run(II)I
.limit regs 8
shl-int v0, v5, v7
return v0
.end method
|
D
|
//1
CHAIN IF ~InParty("rh#Isra2")
See("rh#Isra2")
!StateCheck("YxYve",CD_STATE_NOTVALID)
!StateCheck("rh#Isra2",CD_STATE_NOTVALID)
CombatCounter(0)
!See([ENEMY])
Global("G#XB.IsraYvetteToBBanter1","GLOBAL",0)~ THEN YxYv25B IsraYvetteToBBanter#1.1
@0 /* Do you still believe that love can conquer everything, Lady Isra? */
DO ~SetGlobal("G#XB.IsraYvetteToBBanter1","GLOBAL",1)~
==BRH#IS25 @1 /* Don't you, Yvette? */
==YxYv25B @2 /* I... */
= @3 /* There are some certain obstacles and--just look at Irenicus and Ellesime. They were together, but everything collapsed. There are moments when I'm afraid...that nothing can last forever. */
==BRH#IS25 @4 /* Sometimes it cannot, though I would not say always. We all have our tests to face. */
==YxYv25B @5 /* And what if we fail? */
==BRH#IS25 @6 /* That would depend upon the person, I think. */
==YxYv25B @7 /* ... */
==BRH#IS25 @8 /* Yvette, you need to trust yourself. Without that, nothing else is possible. */
EXIT
|
D
|
/Users/eligitelman/Documents/GitHub/crushd/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/SnapTimer.build/Objects-normal/x86_64/SnapTimerCircleLayer.o : /Users/eligitelman/Documents/GitHub/crushd/Pods/SnapTimer/SnapTimer/SnapTimerCircleLayer.swift /Users/eligitelman/Documents/GitHub/crushd/Pods/SnapTimer/SnapTimer/SnapTimerBorderLayer.swift /Users/eligitelman/Documents/GitHub/crushd/Pods/SnapTimer/SnapTimer/SnapTimerView.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/eligitelman/Documents/GitHub/crushd/Pods/Target\ Support\ Files/SnapTimer/SnapTimer-umbrella.h /Users/eligitelman/Documents/GitHub/crushd/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/SnapTimer.build/unextended-module.modulemap
/Users/eligitelman/Documents/GitHub/crushd/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/SnapTimer.build/Objects-normal/x86_64/SnapTimerCircleLayer~partial.swiftmodule : /Users/eligitelman/Documents/GitHub/crushd/Pods/SnapTimer/SnapTimer/SnapTimerCircleLayer.swift /Users/eligitelman/Documents/GitHub/crushd/Pods/SnapTimer/SnapTimer/SnapTimerBorderLayer.swift /Users/eligitelman/Documents/GitHub/crushd/Pods/SnapTimer/SnapTimer/SnapTimerView.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/eligitelman/Documents/GitHub/crushd/Pods/Target\ Support\ Files/SnapTimer/SnapTimer-umbrella.h /Users/eligitelman/Documents/GitHub/crushd/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/SnapTimer.build/unextended-module.modulemap
/Users/eligitelman/Documents/GitHub/crushd/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/SnapTimer.build/Objects-normal/x86_64/SnapTimerCircleLayer~partial.swiftdoc : /Users/eligitelman/Documents/GitHub/crushd/Pods/SnapTimer/SnapTimer/SnapTimerCircleLayer.swift /Users/eligitelman/Documents/GitHub/crushd/Pods/SnapTimer/SnapTimer/SnapTimerBorderLayer.swift /Users/eligitelman/Documents/GitHub/crushd/Pods/SnapTimer/SnapTimer/SnapTimerView.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/eligitelman/Documents/GitHub/crushd/Pods/Target\ Support\ Files/SnapTimer/SnapTimer-umbrella.h /Users/eligitelman/Documents/GitHub/crushd/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/SnapTimer.build/unextended-module.modulemap
|
D
|
<?xml version="1.0" encoding="ASCII" standalone="no"?>
<di:SashWindowsMngr xmlns:di="http://www.eclipse.org/papyrus/0.7.0/sashdi" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmi:version="2.0">
<pageList>
<availablePage>
<emfPageIdentifier href="VAR_7_BeT-7881463322.notation#_copSALmGEeKQQp7P9cQvNQ"/>
</availablePage>
</pageList>
<sashModel currentSelection="//@sashModel/@windows.0/@children.0">
<windows>
<children xsi:type="di:TabFolder">
<children>
<emfPageIdentifier href="VAR_7_BeT-7881463322.notation#_copSALmGEeKQQp7P9cQvNQ"/>
</children>
</children>
</windows>
</sashModel>
</di:SashWindowsMngr>
|
D
|
/+
+ Copyright (c) Charles Petzold, 1998.
+ Ported to the D Programming Language by Andrej Mitrovic, 2011.
+/
module name;
import core.memory;
import core.runtime;
import core.thread;
import std.algorithm : max, min;
import std.conv;
import std.math;
import std.range;
import std.string;
import std.utf;
pragma(lib, "gdi32.lib");
pragma(lib, "comdlg32.lib");
import core.sys.windows.windef;
import core.sys.windows.winuser;
import core.sys.windows.wingdi;
import core.sys.windows.winbase;
import core.sys.windows.commdlg;
import resource;
string appName = "UniChars";
string description = "Unicode Characters";
HINSTANCE hinst;
extern (Windows)
int WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int iCmdShow)
{
int result;
try
{
Runtime.initialize();
result = myWinMain(hInstance, hPrevInstance, lpCmdLine, iCmdShow);
Runtime.terminate();
}
catch (Throwable o)
{
MessageBox(null, o.toString().toUTF16z, "Error", MB_OK | MB_ICONEXCLAMATION);
result = 0;
}
return result;
}
int myWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int iCmdShow)
{
hinst = hInstance;
HACCEL hAccel;
HWND hwnd;
MSG msg;
WNDCLASS wndclass;
wndclass.style = CS_HREDRAW | CS_VREDRAW;
wndclass.lpfnWndProc = &WndProc;
wndclass.cbClsExtra = 0;
wndclass.cbWndExtra = 0;
wndclass.hInstance = hInstance;
wndclass.hIcon = LoadIcon(NULL, IDI_APPLICATION);
wndclass.hCursor = LoadCursor(NULL, IDC_ARROW);
wndclass.hbrBackground = cast(HBRUSH) GetStockObject(WHITE_BRUSH);
wndclass.lpszMenuName = appName.toUTF16z;
wndclass.lpszClassName = appName.toUTF16z;
if (!RegisterClass(&wndclass))
{
MessageBox(NULL, "This program requires Windows NT!", appName.toUTF16z, MB_ICONERROR);
return 0;
}
hwnd = CreateWindow(appName.toUTF16z, // window class name
description.toUTF16z, // window caption
WS_OVERLAPPEDWINDOW, // window style
CW_USEDEFAULT, // initial x position
CW_USEDEFAULT, // initial y position
CW_USEDEFAULT, // initial x size
CW_USEDEFAULT, // initial y size
NULL, // parent window handle
NULL, // window menu handle
hInstance, // program instance handle
NULL); // creation parameters
ShowWindow(hwnd, iCmdShow);
UpdateWindow(hwnd);
while (GetMessage(&msg, NULL, 0, 0))
{
TranslateMessage(&msg);
DispatchMessage(&msg);
}
return msg.wParam;
}
extern (Windows)
LRESULT WndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) nothrow
{
scope (failure) assert(0);
static CHOOSEFONT cf;
static int iPage;
static LOGFONT lf;
HDC hdc;
int cxChar, cyChar, x, y, i, cxLabels;
PAINTSTRUCT ps;
SIZE size;
string szBuffer;
TEXTMETRIC tm;
WCHAR ch;
switch (message)
{
case WM_CREATE:
hdc = GetDC(hwnd);
lf.lfHeight = -GetDeviceCaps(hdc, LOGPIXELSY) / 6; // 12 points
auto str = "Lucida Sans Unicode\0";
lf.lfFaceName[0..str.length] = str.toUTF16;
ReleaseDC(hwnd, hdc);
cf.hwndOwner = hwnd;
cf.lpLogFont = &lf;
cf.Flags = CF_INITTOLOGFONTSTRUCT | CF_SCREENFONTS;
SetScrollRange(hwnd, SB_VERT, 0, 255, FALSE);
SetScrollPos(hwnd, SB_VERT, iPage, TRUE );
return 0;
case WM_COMMAND:
switch (LOWORD(wParam))
{
case IDM_FONT:
if (ChooseFont(&cf))
InvalidateRect(hwnd, NULL, TRUE);
return 0;
default:
}
return 0;
case WM_VSCROLL:
switch (LOWORD(wParam))
{
case SB_LINEUP:
iPage -= 1; break;
case SB_LINEDOWN:
iPage += 1; break;
case SB_PAGEUP:
iPage -= 16; break;
case SB_PAGEDOWN:
iPage += 16; break;
case SB_THUMBPOSITION:
iPage = HIWORD(wParam); break;
default:
return 0;
}
iPage = max(0, min(iPage, 255));
SetScrollPos(hwnd, SB_VERT, iPage, TRUE);
InvalidateRect(hwnd, NULL, TRUE);
return 0;
case WM_PAINT:
hdc = BeginPaint(hwnd, &ps);
SelectObject(hdc, CreateFontIndirect(&lf));
GetTextMetrics(hdc, &tm);
cxChar = tm.tmMaxCharWidth;
cyChar = tm.tmHeight + tm.tmExternalLeading;
cxLabels = 0;
for (i = 0; i < 16; i++)
{
szBuffer = format(" 000%1X: ", i);
GetTextExtentPoint(hdc, szBuffer.toUTF16z, 7, &size);
cxLabels = max(cxLabels, size.cx);
}
for (y = 0; y < 16; y++)
{
szBuffer = format(" %03X_: ", 16 * iPage + y);
TextOut(hdc, 0, y * cyChar, szBuffer.toUTF16z, 7);
for (x = 0; x < 16; x++)
{
ch = cast(WCHAR)(256 * iPage + 16 * y + x);
TextOut(hdc, x * cxChar + cxLabels, y * cyChar, &ch, 1);
}
}
DeleteObject(SelectObject(hdc, GetStockObject(SYSTEM_FONT)));
EndPaint(hwnd, &ps);
return 0;
case WM_DESTROY:
PostQuitMessage(0);
return 0;
default:
}
return DefWindowProc(hwnd, message, wParam, lParam);
}
|
D
|
module routeguide.route_guiderpc;
// Generated by the gRPC dlang plugin.
// If you make any local change, they will be lost.
import routeguide.route_guide;
import std.array;
import grpc;
import google.protobuf;
import hunt.logging;
import core.thread;
class RouteGuideClient
{
this(Channel channel)
{
_channel = channel;
}
Feature GetFeature( Point request )
{
mixin(CM!( Feature , RouteGuideBase.SERVICE));
}
void GetFeature( Point request , void delegate(Status status , Feature response) dele)
{
mixin(CMA!(Feature , RouteGuideBase.SERVICE));
}
//rpc ListFeatures(Rectangle) returns (stream Feature) {}
//// server stream
ClientReader!Feature ListFeatures(Rectangle request){
mixin(CM1!(Feature ,RouteGuideBase.SERVICE));
};
//rpc RecordRoute(stream Point) returns (RouteSummary) {}
///client stream
ClientWriter!Point RecordRoute(ref RouteSummary response){
mixin(CM2!(Point ,RouteGuideBase.SERVICE));
}
//rpc RouteChat(stream RouteNote) returns (stream RouteNote) {}
/// clientServer stream
ClientReaderWriter!(RouteNote , RouteNote) RouteChat(){
mixin(CM3!(RouteNote ,RouteNote,RouteGuideBase.SERVICE));
}
private:
Channel _channel;
}
class RouteGuideBase : GrpcService
{
enum SERVICE = "routeguide.RouteGuide";
string getModule()
{
return SERVICE;
}
Status GetFeature( Point , ref Feature ){
return Status.OK;
}
Status ListFeatures(Rectangle , ServerWriter!Feature ) {
return Status.OK;
}
Status RecordRoute(ServerReader!Point , ref RouteSummary ){
return Status.OK;
}
Status RouteChat(ServerReaderWriter!(RouteNote , RouteNote)){
return Status.OK;
}
Status process(string method , GrpcStream stream)
{
switch(method)
{
mixin(SM!(Point , Feature , "GetFeature"));
mixin(SM1!(Rectangle , Feature , "ListFeatures"));
mixin(SM2!(Point , RouteSummary , "RecordRoute"));
mixin(SM3!(RouteNote , RouteNote , "RouteChat"));
mixin(NONE());
}
}
}
|
D
|
in a spontaneous manner
without advance preparation
|
D
|
a state of lawlessness and disorder (usually resulting from a failure of government)
illegality as a consequence of unlawful acts
|
D
|
/Users/kelvintan/Desktop/VIPER/Build/Intermediates.noindex/VIPER.build/Debug-iphonesimulator/VIPER.build/Objects-normal/x86_64/SceneDelegate.o : /Users/kelvintan/Desktop/VIPER/VIPER/SceneDelegate.swift /Users/kelvintan/Desktop/VIPER/VIPER/AppDelegate.swift /Users/kelvintan/Desktop/VIPER/VIPER/View/Cells/HomeTableViewCell.swift /Users/kelvintan/Desktop/VIPER/VIPER/View/Controller/Home/HomeViewController.swift /Users/kelvintan/Desktop/VIPER/VIPER/View/Controller/Detail/DetailViewController.swift /Users/kelvintan/Desktop/VIPER/VIPER/Presenter/HomePresenter.swift /Users/kelvintan/Desktop/VIPER/VIPER/Router/HomeRouter.swift /Users/kelvintan/Desktop/VIPER/VIPER/Interactor/HomeInteractor.swift /Users/kelvintan/Desktop/VIPER/VIPER/Entity/BucketList.swift /Users/kelvintan/Desktop/VIPER/VIPER/Extension/Date_Ext.swift /Users/kelvintan/Desktop/VIPER/VIPER/Extension/View_Ext.swift /Applications/Xcode_12.4.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/ObjectiveC.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode_12.4.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/CoreImage.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode_12.4.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Combine.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode_12.4.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/QuartzCore.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode_12.4.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Dispatch.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode_12.4.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Metal.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode_12.4.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Darwin.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode_12.4.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Foundation.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode_12.4.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/CoreFoundation.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode_12.4.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/CoreGraphics.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode_12.4.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Swift.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode_12.4.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/UIKit.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode_12.4.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/SwiftOnoneSupport.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode_12.4.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/usr/include/mach-o/dyld.modulemap /Applications/Xcode_12.4.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/usr/include/mach-o/compact_unwind_encoding.modulemap /Applications/Xcode_12.4.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode_12.4.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/System/Library/Frameworks/OpenGLES.framework/Headers/OpenGLES.apinotes /Applications/Xcode_12.4.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImage.apinotes /Applications/Xcode_12.4.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/QuartzCore.apinotes /Applications/Xcode_12.4.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/apinotes/Dispatch.apinotes /Applications/Xcode_12.4.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.apinotes /Applications/Xcode_12.4.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/usr/include/Darwin.apinotes /Applications/Xcode_12.4.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode_12.4.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode_12.4.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/System/Library/Frameworks/UserNotifications.framework/Headers/UserNotifications.apinotes /Applications/Xcode_12.4.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.apinotes /Applications/Xcode_12.4.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Applications/Xcode_12.4.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/System/Library/Frameworks/Security.framework/Headers/Security.apinotes
/Users/kelvintan/Desktop/VIPER/Build/Intermediates.noindex/VIPER.build/Debug-iphonesimulator/VIPER.build/Objects-normal/x86_64/SceneDelegate~partial.swiftmodule : /Users/kelvintan/Desktop/VIPER/VIPER/SceneDelegate.swift /Users/kelvintan/Desktop/VIPER/VIPER/AppDelegate.swift /Users/kelvintan/Desktop/VIPER/VIPER/View/Cells/HomeTableViewCell.swift /Users/kelvintan/Desktop/VIPER/VIPER/View/Controller/Home/HomeViewController.swift /Users/kelvintan/Desktop/VIPER/VIPER/View/Controller/Detail/DetailViewController.swift /Users/kelvintan/Desktop/VIPER/VIPER/Presenter/HomePresenter.swift /Users/kelvintan/Desktop/VIPER/VIPER/Router/HomeRouter.swift /Users/kelvintan/Desktop/VIPER/VIPER/Interactor/HomeInteractor.swift /Users/kelvintan/Desktop/VIPER/VIPER/Entity/BucketList.swift /Users/kelvintan/Desktop/VIPER/VIPER/Extension/Date_Ext.swift /Users/kelvintan/Desktop/VIPER/VIPER/Extension/View_Ext.swift /Applications/Xcode_12.4.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/ObjectiveC.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode_12.4.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/CoreImage.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode_12.4.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Combine.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode_12.4.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/QuartzCore.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode_12.4.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Dispatch.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode_12.4.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Metal.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode_12.4.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Darwin.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode_12.4.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Foundation.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode_12.4.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/CoreFoundation.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode_12.4.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/CoreGraphics.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode_12.4.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Swift.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode_12.4.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/UIKit.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode_12.4.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/SwiftOnoneSupport.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode_12.4.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/usr/include/mach-o/dyld.modulemap /Applications/Xcode_12.4.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/usr/include/mach-o/compact_unwind_encoding.modulemap /Applications/Xcode_12.4.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode_12.4.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/System/Library/Frameworks/OpenGLES.framework/Headers/OpenGLES.apinotes /Applications/Xcode_12.4.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImage.apinotes /Applications/Xcode_12.4.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/QuartzCore.apinotes /Applications/Xcode_12.4.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/apinotes/Dispatch.apinotes /Applications/Xcode_12.4.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.apinotes /Applications/Xcode_12.4.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/usr/include/Darwin.apinotes /Applications/Xcode_12.4.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode_12.4.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode_12.4.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/System/Library/Frameworks/UserNotifications.framework/Headers/UserNotifications.apinotes /Applications/Xcode_12.4.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.apinotes /Applications/Xcode_12.4.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Applications/Xcode_12.4.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/System/Library/Frameworks/Security.framework/Headers/Security.apinotes
/Users/kelvintan/Desktop/VIPER/Build/Intermediates.noindex/VIPER.build/Debug-iphonesimulator/VIPER.build/Objects-normal/x86_64/SceneDelegate~partial.swiftdoc : /Users/kelvintan/Desktop/VIPER/VIPER/SceneDelegate.swift /Users/kelvintan/Desktop/VIPER/VIPER/AppDelegate.swift /Users/kelvintan/Desktop/VIPER/VIPER/View/Cells/HomeTableViewCell.swift /Users/kelvintan/Desktop/VIPER/VIPER/View/Controller/Home/HomeViewController.swift /Users/kelvintan/Desktop/VIPER/VIPER/View/Controller/Detail/DetailViewController.swift /Users/kelvintan/Desktop/VIPER/VIPER/Presenter/HomePresenter.swift /Users/kelvintan/Desktop/VIPER/VIPER/Router/HomeRouter.swift /Users/kelvintan/Desktop/VIPER/VIPER/Interactor/HomeInteractor.swift /Users/kelvintan/Desktop/VIPER/VIPER/Entity/BucketList.swift /Users/kelvintan/Desktop/VIPER/VIPER/Extension/Date_Ext.swift /Users/kelvintan/Desktop/VIPER/VIPER/Extension/View_Ext.swift /Applications/Xcode_12.4.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/ObjectiveC.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode_12.4.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/CoreImage.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode_12.4.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Combine.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode_12.4.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/QuartzCore.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode_12.4.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Dispatch.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode_12.4.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Metal.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode_12.4.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Darwin.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode_12.4.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Foundation.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode_12.4.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/CoreFoundation.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode_12.4.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/CoreGraphics.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode_12.4.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Swift.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode_12.4.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/UIKit.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode_12.4.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/SwiftOnoneSupport.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode_12.4.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/usr/include/mach-o/dyld.modulemap /Applications/Xcode_12.4.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/usr/include/mach-o/compact_unwind_encoding.modulemap /Applications/Xcode_12.4.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode_12.4.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/System/Library/Frameworks/OpenGLES.framework/Headers/OpenGLES.apinotes /Applications/Xcode_12.4.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImage.apinotes /Applications/Xcode_12.4.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/QuartzCore.apinotes /Applications/Xcode_12.4.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/apinotes/Dispatch.apinotes /Applications/Xcode_12.4.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.apinotes /Applications/Xcode_12.4.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/usr/include/Darwin.apinotes /Applications/Xcode_12.4.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode_12.4.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode_12.4.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/System/Library/Frameworks/UserNotifications.framework/Headers/UserNotifications.apinotes /Applications/Xcode_12.4.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.apinotes /Applications/Xcode_12.4.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Applications/Xcode_12.4.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/System/Library/Frameworks/Security.framework/Headers/Security.apinotes
/Users/kelvintan/Desktop/VIPER/Build/Intermediates.noindex/VIPER.build/Debug-iphonesimulator/VIPER.build/Objects-normal/x86_64/SceneDelegate~partial.swiftsourceinfo : /Users/kelvintan/Desktop/VIPER/VIPER/SceneDelegate.swift /Users/kelvintan/Desktop/VIPER/VIPER/AppDelegate.swift /Users/kelvintan/Desktop/VIPER/VIPER/View/Cells/HomeTableViewCell.swift /Users/kelvintan/Desktop/VIPER/VIPER/View/Controller/Home/HomeViewController.swift /Users/kelvintan/Desktop/VIPER/VIPER/View/Controller/Detail/DetailViewController.swift /Users/kelvintan/Desktop/VIPER/VIPER/Presenter/HomePresenter.swift /Users/kelvintan/Desktop/VIPER/VIPER/Router/HomeRouter.swift /Users/kelvintan/Desktop/VIPER/VIPER/Interactor/HomeInteractor.swift /Users/kelvintan/Desktop/VIPER/VIPER/Entity/BucketList.swift /Users/kelvintan/Desktop/VIPER/VIPER/Extension/Date_Ext.swift /Users/kelvintan/Desktop/VIPER/VIPER/Extension/View_Ext.swift /Applications/Xcode_12.4.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/ObjectiveC.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode_12.4.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/CoreImage.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode_12.4.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Combine.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode_12.4.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/QuartzCore.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode_12.4.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Dispatch.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode_12.4.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Metal.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode_12.4.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Darwin.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode_12.4.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Foundation.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode_12.4.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/CoreFoundation.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode_12.4.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/CoreGraphics.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode_12.4.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Swift.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode_12.4.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/UIKit.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode_12.4.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/SwiftOnoneSupport.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode_12.4.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/usr/include/mach-o/dyld.modulemap /Applications/Xcode_12.4.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/usr/include/mach-o/compact_unwind_encoding.modulemap /Applications/Xcode_12.4.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode_12.4.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/System/Library/Frameworks/OpenGLES.framework/Headers/OpenGLES.apinotes /Applications/Xcode_12.4.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImage.apinotes /Applications/Xcode_12.4.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/QuartzCore.apinotes /Applications/Xcode_12.4.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/apinotes/Dispatch.apinotes /Applications/Xcode_12.4.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.apinotes /Applications/Xcode_12.4.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/usr/include/Darwin.apinotes /Applications/Xcode_12.4.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode_12.4.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode_12.4.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/System/Library/Frameworks/UserNotifications.framework/Headers/UserNotifications.apinotes /Applications/Xcode_12.4.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.apinotes /Applications/Xcode_12.4.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Applications/Xcode_12.4.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/System/Library/Frameworks/Security.framework/Headers/Security.apinotes
|
D
|
/*
* Copyright (c) 2004-2009 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.nv.texgen_emboss;
private
{
import derelict.opengl.gltypes;
import derelict.opengl.gl;
import derelict.util.wrapper;
}
private bool enabled = false;
struct NVTexgenEmboss
{
static bool load(char[] extString)
{
if(extString.findStr("GL_NV_texgen_emboss") == -1)
return false;
enabled = true;
return true;
}
static bool isEnabled()
{
return enabled;
}
}
version(DerelictGL_NoExtensionLoaders)
{
}
else
{
static this()
{
DerelictGL.registerExtensionLoader(&NVTexgenEmboss.load);
}
}
enum : GLenum
{
GL_EMBOSS_LIGHT_NV = 0x855D,
GL_EMBOSS_CONSTANT_NV = 0x855E,
GL_EMBOSS_MAP_NV = 0x855F,
}
|
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_float_to_long_7.java
.class public dot.junit.opcodes.float_to_long.d.T_float_to_long_7
.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)J
.limit regs 6
float-to-long v0, v5
return-wide v0
.end method
|
D
|
/**
Enum translation
*/
module dpp.cursor.enum_;
import dpp.from;
string[] translateEnumConstant(in from!"clang".Cursor cursor,
ref from!"dpp.runtime.context".Context context)
@safe pure
{
import clang: Cursor;
import std.conv: text;
assert(cursor.kind == Cursor.Kind.EnumConstantDecl);
return [cursor.spelling ~ ` = ` ~ text(cursor.enumConstantValue) ~ `, `];
}
|
D
|
module served.commands.file_search;
import served.extension;
import served.types;
import served.filereader;
import workspaced.api;
import workspaced.coms;
import std.algorithm : sort, uniq, startsWith, endsWith;
import std.path : isAbsolute, buildPath, buildNormalizedPath, stripExtension, baseName;
import std.string : translate, makeTransTable;
import fs = std.file;
import io = std.stdio;
@protocolMethod("served/searchFile")
string[] searchFile(string query)
{
if (!query.length)
return null;
if (query.isAbsolute)
{
if (fs.exists(query))
return [query];
else
return null;
}
string[] ret;
string[] importFiles, importPaths;
importPaths = selectedWorkspace.config.stdlibPath();
foreach (instance; backend.instances)
{
importFiles ~= instance.importFiles;
importPaths ~= instance.importPaths;
}
importFiles.sort!"a<b";
importPaths.sort!"a<b";
foreach (file; importFiles.uniq)
{
if (fs.exists(file) && fs.isFile(file))
if (file.endsWith(query))
{
auto rest = file[0 .. $ - query.length];
if (!rest.length || rest.endsWith("/", "\\"))
ret ~= file;
}
}
foreach (dir; importPaths.uniq)
{
if (fs.exists(dir) && fs.isDir(dir))
foreach (filename; fs.dirEntries(dir, fs.SpanMode.breadth))
if (filename.isFile)
{
auto file = buildPath(dir, filename);
if (file.endsWith(query))
{
auto rest = file[0 .. $ - query.length];
if (!rest.length || rest.endsWith("/", "\\"))
ret ~= file;
}
}
}
return ret;
}
private string[] cachedModuleFiles;
private string[string] modFileCache;
@protocolMethod("served/findFilesByModule")
string[] findFilesByModule(string module_)
{
if (!module_.length)
return null;
if (auto cache = module_ in modFileCache)
return [*cache];
ubyte[] buffer = new ubyte[8 * 1024];
scope (exit)
buffer.destroy();
string[] ret;
string[] importFiles, importPaths;
importPaths = selectedWorkspace.config.stdlibPath();
foreach (instance; backend.instances)
{
importFiles ~= instance.importFiles;
importPaths ~= instance.importPaths;
}
importFiles.sort!"a<b";
importPaths.sort!"a<b";
foreach (file; importFiles.uniq)
{
if (cachedModuleFiles.binarySearch(file) >= 0)
continue;
if (fs.exists(file) && fs.isFile(file))
{
auto fileMod = backend.get!ModulemanComponent.moduleName(
cast(string) file.readCodeWithBuffer(buffer));
if (fileMod.startsWith("std"))
{
modFileCache[fileMod] = file;
cachedModuleFiles.insertSorted(file);
}
if (fileMod == module_)
ret ~= file;
}
}
foreach (dir; importPaths.uniq)
{
if (fs.exists(dir) && fs.isDir(dir))
foreach (filename; fs.dirEntries(dir, fs.SpanMode.breadth))
if (filename.isFile)
{
auto file = buildPath(dir, filename);
if (cachedModuleFiles.binarySearch(file) >= 0)
continue;
auto fileMod = moduleNameForFile(file, dir, buffer);
if (fileMod.startsWith("std"))
{
modFileCache[fileMod] = file;
cachedModuleFiles.insertSorted(file);
}
if (fileMod == module_)
ret ~= file;
}
}
return ret;
}
private string moduleNameForFile(string file, string dir, ref ubyte[] buffer)
{
auto ret = backend.get!ModulemanComponent.moduleName(
cast(string) file.readCodeWithBuffer(buffer));
if (ret.length)
return ret;
file = buildNormalizedPath(file);
dir = buildNormalizedPath(dir);
if (file.startsWith(dir))
return file[dir.length .. $].stripExtension.translate(makeTransTable("/\\", ".."));
else
return baseName(file).stripExtension;
}
|
D
|
module android.java.android.media.AudioPlaybackCaptureConfiguration_Builder_d_interface;
import arsd.jni : IJavaObjectImplementation, JavaPackageId, JavaName, IJavaObject, ImportExportImpl, JavaInterfaceMembers;
static import arsd.jni;
import import2 = android.java.android.media.AudioPlaybackCaptureConfiguration_d_interface;
import import3 = android.java.java.lang.Class_d_interface;
import import1 = android.java.android.media.AudioPlaybackCaptureConfiguration_Builder_d_interface;
import import0 = android.java.android.media.projection.MediaProjection_d_interface;
@JavaName("AudioPlaybackCaptureConfiguration$Builder")
final class AudioPlaybackCaptureConfiguration_Builder : IJavaObject {
static immutable string[] _d_canCastTo = [
];
@Import this(import0.MediaProjection);
@Import import1.AudioPlaybackCaptureConfiguration_Builder addMatchingUsage(int);
@Import import1.AudioPlaybackCaptureConfiguration_Builder addMatchingUid(int);
@Import import1.AudioPlaybackCaptureConfiguration_Builder excludeUsage(int);
@Import import1.AudioPlaybackCaptureConfiguration_Builder excludeUid(int);
@Import import2.AudioPlaybackCaptureConfiguration build();
@Import import3.Class getClass();
@Import int hashCode();
@Import bool equals(IJavaObject);
@Import @JavaName("toString") string toString_();
override string toString() { return arsd.jni.javaObjectToString(this); }
@Import void notify();
@Import void notifyAll();
@Import void wait(long);
@Import void wait(long, int);
@Import void wait();
mixin IJavaObjectImplementation!(false);
public static immutable string _javaParameterString = "Landroid/media/AudioPlaybackCaptureConfiguration$Builder;";
}
|
D
|
import std.stdio, std.algorithm, std.conv, std.array, std.string, std.math, std.typecons, std.numeric;
void main()
{
auto nm = readln.split.to!(int[]);
auto N = nm[0];
auto M = nm[1];
writeln(N / (M + 1));
}
|
D
|
/Users/apple-1/Downloads/HouseKeeping/Build/Intermediates/HouseKeeping.build/Debug-iphonesimulator/HouseKeeping.build/Objects-normal/x86_64/viewCompletedChecklist.o : /Users/apple-1/Downloads/HouseKeeping/HouseKeeping/DetailsPending.swift /Users/apple-1/Downloads/HouseKeeping/HouseKeeping/tblAssignTasksPending.swift /Users/apple-1/Downloads/HouseKeeping/HouseKeeping/VCCells.swift /Users/apple-1/Downloads/HouseKeeping/HouseKeeping/currentTask.swift /Users/apple-1/Downloads/HouseKeeping/HouseKeeping/Forgotpassword.swift /Users/apple-1/Downloads/HouseKeeping/HouseKeeping/PageView3.swift /Users/apple-1/Downloads/HouseKeeping/HouseKeeping/PageView.swift /Users/apple-1/Downloads/HouseKeeping/HouseKeeping/ConversationsVC.swift /Users/apple-1/Downloads/HouseKeeping/HouseKeeping/WelcomeVC.swift /Users/apple-1/Downloads/HouseKeeping/HouseKeeping/CheckLists.swift /Users/apple-1/Downloads/HouseKeeping/HouseKeeping/LandingVC.swift /Users/apple-1/Downloads/HouseKeeping/HouseKeeping/workHistoryCell.swift /Users/apple-1/Downloads/HouseKeeping/HouseKeeping/Distribute.swift /Users/apple-1/Downloads/HouseKeeping/HouseKeeping/ViewController.swift /Users/apple-1/Downloads/HouseKeeping/HouseKeeping/tblHistoryAll.swift /Users/apple-1/Downloads/HouseKeeping/HouseKeeping/taskDescription.swift /Users/apple-1/Downloads/HouseKeeping/HouseKeeping/reassignTask.swift /Users/apple-1/Downloads/HouseKeeping/HouseKeeping/Message.swift /Users/apple-1/Downloads/HouseKeeping/HouseKeeping/AppDelegate.swift /Users/apple-1/Downloads/HouseKeeping/HouseKeeping/checkListCell.swift /Users/apple-1/Downloads/HouseKeeping/HouseKeeping/Conversation.swift /Users/apple-1/Downloads/HouseKeeping/HouseKeeping/individualEmpTask.swift /Users/apple-1/Downloads/HouseKeeping/HouseKeeping/tblAssignTasksAll.swift /Users/apple-1/Downloads/HouseKeeping/HouseKeeping/viewAdminTask.swift /Users/apple-1/Downloads/HouseKeeping/HouseKeeping/viewCompletedtask.swift /Users/apple-1/Downloads/HouseKeeping/HouseKeeping/FullSizeImage.swift /Users/apple-1/Downloads/HouseKeeping/HouseKeeping/AlertsViewController.swift /Users/apple-1/Downloads/HouseKeeping/HouseKeeping/viewTaskViewController.swift /Users/apple-1/Downloads/HouseKeeping/HouseKeeping/tblAssignTasksCompleted.swift /Users/apple-1/Downloads/HouseKeeping/HouseKeeping/tblHistoryCompleted.swift /Users/apple-1/Downloads/HouseKeeping/HouseKeeping/home.swift /Users/apple-1/Downloads/HouseKeeping/HouseKeeping/tblAssignTo.swift /Users/apple-1/Downloads/HouseKeeping/HouseKeeping/tblAssignToCell.swift /Users/apple-1/Downloads/HouseKeeping/HouseKeeping/PageView2.swift /Users/apple-1/Downloads/HouseKeeping/HouseKeeping/Helper\ Files.swift /Users/apple-1/Downloads/HouseKeeping/HouseKeeping/AllTasksCell.swift /Users/apple-1/Downloads/HouseKeeping/HouseKeeping/viewCompletedChecklist.swift /Users/apple-1/Downloads/HouseKeeping/HouseKeeping/EmployeeLoginHome.swift /Users/apple-1/Downloads/HouseKeeping/HouseKeeping/roomsCollectionViewCell.swift /Users/apple-1/Downloads/HouseKeeping/HouseKeeping/EmployeeLoginCell.swift /Users/apple-1/Downloads/HouseKeeping/HouseKeeping/DatePickerDialog.swift /Users/apple-1/Downloads/HouseKeeping/HouseKeeping/TBLViewEmpDND.swift /Users/apple-1/Downloads/HouseKeeping/HouseKeeping/TblViewEmplLoginPending.swift /Users/apple-1/Downloads/HouseKeeping/HouseKeeping/User.swift /Users/apple-1/Downloads/HouseKeeping/HouseKeeping/HADropDown.swift /Users/apple-1/Downloads/HouseKeeping/HouseKeeping/EmployeeDetails.swift /Users/apple-1/Downloads/HouseKeeping/HouseKeeping/tblHistoryDND.swift /Users/apple-1/Downloads/HouseKeeping/HouseKeeping/Distributetask.swift /Users/apple-1/Downloads/HouseKeeping/HouseKeeping/tblHistoryPending.swift /Users/apple-1/Downloads/HouseKeeping/HouseKeeping/ChatVC.swift /Users/apple-1/Downloads/HouseKeeping/HouseKeeping/NavVC.swift /Users/apple-1/Downloads/HouseKeeping/HouseKeeping/TaskType.swift /Users/apple-1/Downloads/HouseKeeping/HouseKeeping/tblAssignTasksOnProgress.swift /Users/apple-1/Downloads/HouseKeeping/HouseKeeping/getJSONAssignedTasks&Workers.swift /Users/apple-1/Downloads/HouseKeeping/HouseKeeping/WorkHistory.swift /Users/apple-1/Downloads/HouseKeeping/HouseKeeping/tblHistoryOnprogress.swift /Users/apple-1/Downloads/HouseKeeping/HouseKeeping/tblDoNotDistrub.swift /Users/apple-1/Downloads/HouseKeeping/HouseKeeping/TblViewEmplLoginCompleted.swift /Users/apple-1/Downloads/HouseKeeping/HouseKeeping/selectedHistory.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/SwiftOnoneSupport.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/UIKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Foundation.swiftmodule /Users/apple-1/Downloads/HouseKeeping/Pods/Firebase/Core/Sources/module.modulemap /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/ObjectiveC.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreGraphics.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/QuartzCore.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreImage.swiftmodule /Users/apple-1/Downloads/HouseKeeping/Build/Products/Debug-iphonesimulator/Alamofire/Alamofire.framework/Modules/Alamofire.swiftmodule/x86_64.swiftmodule /Users/apple-1/Downloads/HouseKeeping/Build/Products/Debug-iphonesimulator/Alamofire/Alamofire.framework/Headers/Alamofire-Swift.h /Users/apple-1/Downloads/HouseKeeping/Build/Products/Debug-iphonesimulator/Alamofire/Alamofire.framework/Headers/Alamofire-umbrella.h /Users/apple-1/Downloads/HouseKeeping/Build/Products/Debug-iphonesimulator/Alamofire/Alamofire.framework/Modules/module.modulemap /Users/apple-1/Downloads/HouseKeeping/Build/Products/Debug-iphonesimulator/SwiftyJSON/SwiftyJSON.framework/Modules/SwiftyJSON.swiftmodule/x86_64.swiftmodule /Users/apple-1/Downloads/HouseKeeping/Build/Products/Debug-iphonesimulator/SwiftyJSON/SwiftyJSON.framework/Headers/SwiftyJSON-Swift.h /Users/apple-1/Downloads/HouseKeeping/Build/Products/Debug-iphonesimulator/SwiftyJSON/SwiftyJSON.framework/Headers/SwiftyJSON-umbrella.h /Users/apple-1/Downloads/HouseKeeping/Build/Products/Debug-iphonesimulator/SwiftyJSON/SwiftyJSON.framework/Modules/module.modulemap /Users/apple-1/Downloads/HouseKeeping/Build/Products/Debug-iphonesimulator/Fusuma/Fusuma.framework/Modules/Fusuma.swiftmodule/x86_64.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/CoreMedia.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreAudio.swiftmodule /Users/apple-1/Downloads/HouseKeeping/Build/Products/Debug-iphonesimulator/Fusuma/Fusuma.framework/Headers/Fusuma-Swift.h /Users/apple-1/Downloads/HouseKeeping/Build/Products/Debug-iphonesimulator/Fusuma/Fusuma.framework/Headers/Fusuma-umbrella.h /Users/apple-1/Downloads/HouseKeeping/Build/Products/Debug-iphonesimulator/Fusuma/Fusuma.framework/Modules/module.modulemap /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Photos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreLocation.swiftmodule /Users/apple-1/Downloads/HouseKeeping/Build/Products/Debug-iphonesimulator/SwiftSpinner/SwiftSpinner.framework/Modules/SwiftSpinner.swiftmodule/x86_64.swiftmodule /Users/apple-1/Downloads/HouseKeeping/Build/Products/Debug-iphonesimulator/SwiftSpinner/SwiftSpinner.framework/Headers/SwiftSpinner-Swift.h /Users/apple-1/Downloads/HouseKeeping/Build/Products/Debug-iphonesimulator/SwiftSpinner/SwiftSpinner.framework/Headers/SwiftSpinner.h /Users/apple-1/Downloads/HouseKeeping/Build/Products/Debug-iphonesimulator/SwiftSpinner/SwiftSpinner.framework/Headers/SwiftSpinner-umbrella.h /Users/apple-1/Downloads/HouseKeeping/Build/Products/Debug-iphonesimulator/SwiftSpinner/SwiftSpinner.framework/Modules/module.modulemap /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseCore/Frameworks/FirebaseCore.framework/Headers/FIROptions.h /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseCore/Frameworks/FirebaseCore.framework/Headers/FIRLoggerLevel.h /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseCore/Frameworks/FirebaseCore.framework/Headers/FIRConfiguration.h /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseCore/Frameworks/FirebaseCore.framework/Headers/FIRApp.h /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseCore/Frameworks/FirebaseCore.framework/Headers/FIRCoreSwiftNameSupport.h /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseCore/Frameworks/FirebaseCore.framework/Headers/FIRAnalyticsConfiguration.h /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseCore/Frameworks/FirebaseCore.framework/Headers/FirebaseCore.h /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseCore/Frameworks/FirebaseCore.framework/Modules/module.modulemap /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseAnalytics/Frameworks/FirebaseAnalytics.framework/Headers/FIRUserPropertyNames.h /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseAnalytics/Frameworks/FirebaseAnalytics.framework/Headers/FIRParameterNames.h /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseAnalytics/Frameworks/FirebaseAnalytics.framework/Headers/FIREventNames.h /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseAnalytics/Frameworks/FirebaseAnalytics.framework/Headers/FIRAnalyticsSwiftNameSupport.h /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseAnalytics/Frameworks/FirebaseAnalytics.framework/Headers/FIRAnalytics.h /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseAnalytics/Frameworks/FirebaseAnalytics.framework/Headers/FIRAnalytics+AppDelegate.h /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseAnalytics/Frameworks/FirebaseAnalytics.framework/Headers/FIROptions.h /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseAnalytics/Frameworks/FirebaseAnalytics.framework/Headers/FIRConfiguration.h /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseAnalytics/Frameworks/FirebaseAnalytics.framework/Headers/FIRApp.h /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseAnalytics/Frameworks/FirebaseAnalytics.framework/Headers/FIRAnalyticsConfiguration.h /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseAnalytics/Frameworks/FirebaseAnalytics.framework/Headers/FirebaseAnalytics.h /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseAnalytics/Frameworks/FirebaseAnalytics.framework/Modules/module.modulemap /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseAuth/Frameworks/FirebaseAuth.framework/Headers/FirebaseAuthVersion.h /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseAuth/Frameworks/FirebaseAuth.framework/Headers/FIRUserInfo.h /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseAuth/Frameworks/FirebaseAuth.framework/Headers/FIRUser.h /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseAuth/Frameworks/FirebaseAuth.framework/Headers/FIRAuthDataResult.h /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseAuth/Frameworks/FirebaseAuth.framework/Headers/FIRAdditionalUserInfo.h /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseAuth/Frameworks/FirebaseAuth.framework/Headers/FIRTwitterAuthProvider.h /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseAuth/Frameworks/FirebaseAuth.framework/Headers/FIRAuthErrors.h /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseAuth/Frameworks/FirebaseAuth.framework/Headers/FIRAuthAPNSTokenType.h /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseAuth/Frameworks/FirebaseAuth.framework/Headers/FIRAuth.h /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseAuth/Frameworks/FirebaseAuth.framework/Headers/FIRPhoneAuthProvider.h /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseAuth/Frameworks/FirebaseAuth.framework/Headers/FIRAuthCredential.h /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseAuth/Frameworks/FirebaseAuth.framework/Headers/FIRPhoneAuthCredential.h /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseAuth/Frameworks/FirebaseAuth.framework/Headers/FIROAuthProvider.h /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseAuth/Frameworks/FirebaseAuth.framework/Headers/FIRGoogleAuthProvider.h /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseAuth/Frameworks/FirebaseAuth.framework/Headers/FIRGitHubAuthProvider.h /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseAuth/Frameworks/FirebaseAuth.framework/Headers/FIRFacebookAuthProvider.h /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseAuth/Frameworks/FirebaseAuth.framework/Headers/FIRAuthSwiftNameSupport.h /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseAuth/Frameworks/FirebaseAuth.framework/Headers/FIREmailAuthProvider.h /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseAuth/Frameworks/FirebaseAuth.framework/Headers/FirebaseAuth.h /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseAuth/Frameworks/FirebaseAuth.framework/Modules/module.modulemap /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseDatabase/Frameworks/FirebaseDatabase.framework/Headers/FIRServerValue.h /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseDatabase/Frameworks/FirebaseDatabase.framework/Headers/FIRTransactionResult.h /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseDatabase/Frameworks/FirebaseDatabase.framework/Headers/FIRMutableData.h /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseDatabase/Frameworks/FirebaseDatabase.framework/Headers/FIRDatabaseQuery.h /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseDatabase/Frameworks/FirebaseDatabase.framework/Headers/FIRDatabaseReference.h /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseDatabase/Frameworks/FirebaseDatabase.framework/Headers/FIRDatabase.h /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseDatabase/Frameworks/FirebaseDatabase.framework/Headers/FIRDataSnapshot.h /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseDatabase/Frameworks/FirebaseDatabase.framework/Headers/FIRDatabaseSwiftNameSupport.h /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseDatabase/Frameworks/FirebaseDatabase.framework/Headers/FIRDataEventType.h /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseDatabase/Frameworks/FirebaseDatabase.framework/Headers/FirebaseDatabase.h /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseDatabase/Frameworks/FirebaseDatabase.framework/Modules/module.modulemap /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseInstanceID/Frameworks/FirebaseInstanceID.framework/Headers/FIRInstanceID.h /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseInstanceID/Frameworks/FirebaseInstanceID.framework/Headers/FirebaseInstanceID.h /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseInstanceID/Frameworks/FirebaseInstanceID.framework/Modules/module.modulemap /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseMessaging/Frameworks/FirebaseMessaging.framework/Headers/FIRMessaging.h /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseMessaging/Frameworks/FirebaseMessaging.framework/Headers/FirebaseMessaging.h /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseMessaging/Frameworks/FirebaseMessaging.framework/Modules/module.modulemap /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseStorage/Frameworks/FirebaseStorage.framework/Headers/FIRStorageTaskSnapshot.h /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseStorage/Frameworks/FirebaseStorage.framework/Headers/FIRStorageUploadTask.h /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseStorage/Frameworks/FirebaseStorage.framework/Headers/FIRStorageReference.h /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseStorage/Frameworks/FirebaseStorage.framework/Headers/FIRStorageMetadata.h /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseStorage/Frameworks/FirebaseStorage.framework/Headers/FIRStorageTask.h /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseStorage/Frameworks/FirebaseStorage.framework/Headers/FIRStorageObservableTask.h /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseStorage/Frameworks/FirebaseStorage.framework/Headers/FIRStorageDownloadTask.h /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseStorage/Frameworks/FirebaseStorage.framework/Headers/FIRStorageSwiftNameSupport.h /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseStorage/Frameworks/FirebaseStorage.framework/Headers/FIRStorageConstants.h /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseStorage/Frameworks/FirebaseStorage.framework/Headers/FIRStorage.h /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseStorage/Frameworks/FirebaseStorage.framework/Headers/FirebaseStorage.h /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseStorage/Frameworks/FirebaseStorage.framework/Modules/module.modulemap /Users/apple-1/Downloads/HouseKeeping/Pods/Firebase/Core/Sources/Firebase.h /Users/apple-1/Downloads/HouseKeeping/Build/Products/Debug-iphonesimulator/LIHAlert/LIHAlert.framework/Modules/LIHAlert.swiftmodule/x86_64.swiftmodule /Users/apple-1/Downloads/HouseKeeping/Build/Products/Debug-iphonesimulator/LIHAlert/LIHAlert.framework/Headers/LIHAlert-Swift.h /Users/apple-1/Downloads/HouseKeeping/Build/Products/Debug-iphonesimulator/LIHAlert/LIHAlert.framework/Headers/LIHAlert-umbrella.h /Users/apple-1/Downloads/HouseKeeping/Build/Products/Debug-iphonesimulator/LIHAlert/LIHAlert.framework/Modules/module.modulemap /Users/apple-1/Downloads/HouseKeeping/Build/Products/Debug-iphonesimulator/ActionSheetPicker-3.0/ActionSheetPicker_3_0.framework/Headers/SWActionSheet.h /Users/apple-1/Downloads/HouseKeeping/Build/Products/Debug-iphonesimulator/ActionSheetPicker-3.0/ActionSheetPicker_3_0.framework/Headers/ActionSheetStringPicker.h /Users/apple-1/Downloads/HouseKeeping/Build/Products/Debug-iphonesimulator/ActionSheetPicker-3.0/ActionSheetPicker_3_0.framework/Headers/ActionSheetPicker.h /Users/apple-1/Downloads/HouseKeeping/Build/Products/Debug-iphonesimulator/ActionSheetPicker-3.0/ActionSheetPicker_3_0.framework/Headers/ActionSheetMultipleStringPicker.h /Users/apple-1/Downloads/HouseKeeping/Build/Products/Debug-iphonesimulator/ActionSheetPicker-3.0/ActionSheetPicker_3_0.framework/Headers/ActionSheetLocalePicker.h /Users/apple-1/Downloads/HouseKeeping/Build/Products/Debug-iphonesimulator/ActionSheetPicker-3.0/ActionSheetPicker_3_0.framework/Headers/DistancePickerView.h /Users/apple-1/Downloads/HouseKeeping/Build/Products/Debug-iphonesimulator/ActionSheetPicker-3.0/ActionSheetPicker_3_0.framework/Headers/ActionSheetDistancePicker.h /Users/apple-1/Downloads/HouseKeeping/Build/Products/Debug-iphonesimulator/ActionSheetPicker-3.0/ActionSheetPicker_3_0.framework/Headers/ActionSheetDatePicker.h /Users/apple-1/Downloads/HouseKeeping/Build/Products/Debug-iphonesimulator/ActionSheetPicker-3.0/ActionSheetPicker_3_0.framework/Headers/ActionSheetCustomPickerDelegate.h /Users/apple-1/Downloads/HouseKeeping/Build/Products/Debug-iphonesimulator/ActionSheetPicker-3.0/ActionSheetPicker_3_0.framework/Headers/ActionSheetCustomPicker.h /Users/apple-1/Downloads/HouseKeeping/Build/Products/Debug-iphonesimulator/ActionSheetPicker-3.0/ActionSheetPicker_3_0.framework/Headers/AbstractActionSheetPicker.h /Users/apple-1/Downloads/HouseKeeping/Build/Products/Debug-iphonesimulator/ActionSheetPicker-3.0/ActionSheetPicker_3_0.framework/Headers/ActionSheetPicker-3.0-umbrella.h /Users/apple-1/Downloads/HouseKeeping/Build/Products/Debug-iphonesimulator/ActionSheetPicker-3.0/ActionSheetPicker_3_0.framework/Modules/module.modulemap /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreData.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/MapKit.swiftmodule
/Users/apple-1/Downloads/HouseKeeping/Build/Intermediates/HouseKeeping.build/Debug-iphonesimulator/HouseKeeping.build/Objects-normal/x86_64/viewCompletedChecklist~partial.swiftmodule : /Users/apple-1/Downloads/HouseKeeping/HouseKeeping/DetailsPending.swift /Users/apple-1/Downloads/HouseKeeping/HouseKeeping/tblAssignTasksPending.swift /Users/apple-1/Downloads/HouseKeeping/HouseKeeping/VCCells.swift /Users/apple-1/Downloads/HouseKeeping/HouseKeeping/currentTask.swift /Users/apple-1/Downloads/HouseKeeping/HouseKeeping/Forgotpassword.swift /Users/apple-1/Downloads/HouseKeeping/HouseKeeping/PageView3.swift /Users/apple-1/Downloads/HouseKeeping/HouseKeeping/PageView.swift /Users/apple-1/Downloads/HouseKeeping/HouseKeeping/ConversationsVC.swift /Users/apple-1/Downloads/HouseKeeping/HouseKeeping/WelcomeVC.swift /Users/apple-1/Downloads/HouseKeeping/HouseKeeping/CheckLists.swift /Users/apple-1/Downloads/HouseKeeping/HouseKeeping/LandingVC.swift /Users/apple-1/Downloads/HouseKeeping/HouseKeeping/workHistoryCell.swift /Users/apple-1/Downloads/HouseKeeping/HouseKeeping/Distribute.swift /Users/apple-1/Downloads/HouseKeeping/HouseKeeping/ViewController.swift /Users/apple-1/Downloads/HouseKeeping/HouseKeeping/tblHistoryAll.swift /Users/apple-1/Downloads/HouseKeeping/HouseKeeping/taskDescription.swift /Users/apple-1/Downloads/HouseKeeping/HouseKeeping/reassignTask.swift /Users/apple-1/Downloads/HouseKeeping/HouseKeeping/Message.swift /Users/apple-1/Downloads/HouseKeeping/HouseKeeping/AppDelegate.swift /Users/apple-1/Downloads/HouseKeeping/HouseKeeping/checkListCell.swift /Users/apple-1/Downloads/HouseKeeping/HouseKeeping/Conversation.swift /Users/apple-1/Downloads/HouseKeeping/HouseKeeping/individualEmpTask.swift /Users/apple-1/Downloads/HouseKeeping/HouseKeeping/tblAssignTasksAll.swift /Users/apple-1/Downloads/HouseKeeping/HouseKeeping/viewAdminTask.swift /Users/apple-1/Downloads/HouseKeeping/HouseKeeping/viewCompletedtask.swift /Users/apple-1/Downloads/HouseKeeping/HouseKeeping/FullSizeImage.swift /Users/apple-1/Downloads/HouseKeeping/HouseKeeping/AlertsViewController.swift /Users/apple-1/Downloads/HouseKeeping/HouseKeeping/viewTaskViewController.swift /Users/apple-1/Downloads/HouseKeeping/HouseKeeping/tblAssignTasksCompleted.swift /Users/apple-1/Downloads/HouseKeeping/HouseKeeping/tblHistoryCompleted.swift /Users/apple-1/Downloads/HouseKeeping/HouseKeeping/home.swift /Users/apple-1/Downloads/HouseKeeping/HouseKeeping/tblAssignTo.swift /Users/apple-1/Downloads/HouseKeeping/HouseKeeping/tblAssignToCell.swift /Users/apple-1/Downloads/HouseKeeping/HouseKeeping/PageView2.swift /Users/apple-1/Downloads/HouseKeeping/HouseKeeping/Helper\ Files.swift /Users/apple-1/Downloads/HouseKeeping/HouseKeeping/AllTasksCell.swift /Users/apple-1/Downloads/HouseKeeping/HouseKeeping/viewCompletedChecklist.swift /Users/apple-1/Downloads/HouseKeeping/HouseKeeping/EmployeeLoginHome.swift /Users/apple-1/Downloads/HouseKeeping/HouseKeeping/roomsCollectionViewCell.swift /Users/apple-1/Downloads/HouseKeeping/HouseKeeping/EmployeeLoginCell.swift /Users/apple-1/Downloads/HouseKeeping/HouseKeeping/DatePickerDialog.swift /Users/apple-1/Downloads/HouseKeeping/HouseKeeping/TBLViewEmpDND.swift /Users/apple-1/Downloads/HouseKeeping/HouseKeeping/TblViewEmplLoginPending.swift /Users/apple-1/Downloads/HouseKeeping/HouseKeeping/User.swift /Users/apple-1/Downloads/HouseKeeping/HouseKeeping/HADropDown.swift /Users/apple-1/Downloads/HouseKeeping/HouseKeeping/EmployeeDetails.swift /Users/apple-1/Downloads/HouseKeeping/HouseKeeping/tblHistoryDND.swift /Users/apple-1/Downloads/HouseKeeping/HouseKeeping/Distributetask.swift /Users/apple-1/Downloads/HouseKeeping/HouseKeeping/tblHistoryPending.swift /Users/apple-1/Downloads/HouseKeeping/HouseKeeping/ChatVC.swift /Users/apple-1/Downloads/HouseKeeping/HouseKeeping/NavVC.swift /Users/apple-1/Downloads/HouseKeeping/HouseKeeping/TaskType.swift /Users/apple-1/Downloads/HouseKeeping/HouseKeeping/tblAssignTasksOnProgress.swift /Users/apple-1/Downloads/HouseKeeping/HouseKeeping/getJSONAssignedTasks&Workers.swift /Users/apple-1/Downloads/HouseKeeping/HouseKeeping/WorkHistory.swift /Users/apple-1/Downloads/HouseKeeping/HouseKeeping/tblHistoryOnprogress.swift /Users/apple-1/Downloads/HouseKeeping/HouseKeeping/tblDoNotDistrub.swift /Users/apple-1/Downloads/HouseKeeping/HouseKeeping/TblViewEmplLoginCompleted.swift /Users/apple-1/Downloads/HouseKeeping/HouseKeeping/selectedHistory.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/SwiftOnoneSupport.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/UIKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Foundation.swiftmodule /Users/apple-1/Downloads/HouseKeeping/Pods/Firebase/Core/Sources/module.modulemap /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/ObjectiveC.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreGraphics.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/QuartzCore.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreImage.swiftmodule /Users/apple-1/Downloads/HouseKeeping/Build/Products/Debug-iphonesimulator/Alamofire/Alamofire.framework/Modules/Alamofire.swiftmodule/x86_64.swiftmodule /Users/apple-1/Downloads/HouseKeeping/Build/Products/Debug-iphonesimulator/Alamofire/Alamofire.framework/Headers/Alamofire-Swift.h /Users/apple-1/Downloads/HouseKeeping/Build/Products/Debug-iphonesimulator/Alamofire/Alamofire.framework/Headers/Alamofire-umbrella.h /Users/apple-1/Downloads/HouseKeeping/Build/Products/Debug-iphonesimulator/Alamofire/Alamofire.framework/Modules/module.modulemap /Users/apple-1/Downloads/HouseKeeping/Build/Products/Debug-iphonesimulator/SwiftyJSON/SwiftyJSON.framework/Modules/SwiftyJSON.swiftmodule/x86_64.swiftmodule /Users/apple-1/Downloads/HouseKeeping/Build/Products/Debug-iphonesimulator/SwiftyJSON/SwiftyJSON.framework/Headers/SwiftyJSON-Swift.h /Users/apple-1/Downloads/HouseKeeping/Build/Products/Debug-iphonesimulator/SwiftyJSON/SwiftyJSON.framework/Headers/SwiftyJSON-umbrella.h /Users/apple-1/Downloads/HouseKeeping/Build/Products/Debug-iphonesimulator/SwiftyJSON/SwiftyJSON.framework/Modules/module.modulemap /Users/apple-1/Downloads/HouseKeeping/Build/Products/Debug-iphonesimulator/Fusuma/Fusuma.framework/Modules/Fusuma.swiftmodule/x86_64.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/CoreMedia.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreAudio.swiftmodule /Users/apple-1/Downloads/HouseKeeping/Build/Products/Debug-iphonesimulator/Fusuma/Fusuma.framework/Headers/Fusuma-Swift.h /Users/apple-1/Downloads/HouseKeeping/Build/Products/Debug-iphonesimulator/Fusuma/Fusuma.framework/Headers/Fusuma-umbrella.h /Users/apple-1/Downloads/HouseKeeping/Build/Products/Debug-iphonesimulator/Fusuma/Fusuma.framework/Modules/module.modulemap /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Photos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreLocation.swiftmodule /Users/apple-1/Downloads/HouseKeeping/Build/Products/Debug-iphonesimulator/SwiftSpinner/SwiftSpinner.framework/Modules/SwiftSpinner.swiftmodule/x86_64.swiftmodule /Users/apple-1/Downloads/HouseKeeping/Build/Products/Debug-iphonesimulator/SwiftSpinner/SwiftSpinner.framework/Headers/SwiftSpinner-Swift.h /Users/apple-1/Downloads/HouseKeeping/Build/Products/Debug-iphonesimulator/SwiftSpinner/SwiftSpinner.framework/Headers/SwiftSpinner.h /Users/apple-1/Downloads/HouseKeeping/Build/Products/Debug-iphonesimulator/SwiftSpinner/SwiftSpinner.framework/Headers/SwiftSpinner-umbrella.h /Users/apple-1/Downloads/HouseKeeping/Build/Products/Debug-iphonesimulator/SwiftSpinner/SwiftSpinner.framework/Modules/module.modulemap /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseCore/Frameworks/FirebaseCore.framework/Headers/FIROptions.h /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseCore/Frameworks/FirebaseCore.framework/Headers/FIRLoggerLevel.h /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseCore/Frameworks/FirebaseCore.framework/Headers/FIRConfiguration.h /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseCore/Frameworks/FirebaseCore.framework/Headers/FIRApp.h /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseCore/Frameworks/FirebaseCore.framework/Headers/FIRCoreSwiftNameSupport.h /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseCore/Frameworks/FirebaseCore.framework/Headers/FIRAnalyticsConfiguration.h /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseCore/Frameworks/FirebaseCore.framework/Headers/FirebaseCore.h /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseCore/Frameworks/FirebaseCore.framework/Modules/module.modulemap /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseAnalytics/Frameworks/FirebaseAnalytics.framework/Headers/FIRUserPropertyNames.h /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseAnalytics/Frameworks/FirebaseAnalytics.framework/Headers/FIRParameterNames.h /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseAnalytics/Frameworks/FirebaseAnalytics.framework/Headers/FIREventNames.h /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseAnalytics/Frameworks/FirebaseAnalytics.framework/Headers/FIRAnalyticsSwiftNameSupport.h /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseAnalytics/Frameworks/FirebaseAnalytics.framework/Headers/FIRAnalytics.h /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseAnalytics/Frameworks/FirebaseAnalytics.framework/Headers/FIRAnalytics+AppDelegate.h /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseAnalytics/Frameworks/FirebaseAnalytics.framework/Headers/FIROptions.h /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseAnalytics/Frameworks/FirebaseAnalytics.framework/Headers/FIRConfiguration.h /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseAnalytics/Frameworks/FirebaseAnalytics.framework/Headers/FIRApp.h /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseAnalytics/Frameworks/FirebaseAnalytics.framework/Headers/FIRAnalyticsConfiguration.h /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseAnalytics/Frameworks/FirebaseAnalytics.framework/Headers/FirebaseAnalytics.h /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseAnalytics/Frameworks/FirebaseAnalytics.framework/Modules/module.modulemap /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseAuth/Frameworks/FirebaseAuth.framework/Headers/FirebaseAuthVersion.h /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseAuth/Frameworks/FirebaseAuth.framework/Headers/FIRUserInfo.h /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseAuth/Frameworks/FirebaseAuth.framework/Headers/FIRUser.h /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseAuth/Frameworks/FirebaseAuth.framework/Headers/FIRAuthDataResult.h /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseAuth/Frameworks/FirebaseAuth.framework/Headers/FIRAdditionalUserInfo.h /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseAuth/Frameworks/FirebaseAuth.framework/Headers/FIRTwitterAuthProvider.h /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseAuth/Frameworks/FirebaseAuth.framework/Headers/FIRAuthErrors.h /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseAuth/Frameworks/FirebaseAuth.framework/Headers/FIRAuthAPNSTokenType.h /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseAuth/Frameworks/FirebaseAuth.framework/Headers/FIRAuth.h /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseAuth/Frameworks/FirebaseAuth.framework/Headers/FIRPhoneAuthProvider.h /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseAuth/Frameworks/FirebaseAuth.framework/Headers/FIRAuthCredential.h /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseAuth/Frameworks/FirebaseAuth.framework/Headers/FIRPhoneAuthCredential.h /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseAuth/Frameworks/FirebaseAuth.framework/Headers/FIROAuthProvider.h /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseAuth/Frameworks/FirebaseAuth.framework/Headers/FIRGoogleAuthProvider.h /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseAuth/Frameworks/FirebaseAuth.framework/Headers/FIRGitHubAuthProvider.h /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseAuth/Frameworks/FirebaseAuth.framework/Headers/FIRFacebookAuthProvider.h /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseAuth/Frameworks/FirebaseAuth.framework/Headers/FIRAuthSwiftNameSupport.h /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseAuth/Frameworks/FirebaseAuth.framework/Headers/FIREmailAuthProvider.h /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseAuth/Frameworks/FirebaseAuth.framework/Headers/FirebaseAuth.h /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseAuth/Frameworks/FirebaseAuth.framework/Modules/module.modulemap /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseDatabase/Frameworks/FirebaseDatabase.framework/Headers/FIRServerValue.h /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseDatabase/Frameworks/FirebaseDatabase.framework/Headers/FIRTransactionResult.h /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseDatabase/Frameworks/FirebaseDatabase.framework/Headers/FIRMutableData.h /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseDatabase/Frameworks/FirebaseDatabase.framework/Headers/FIRDatabaseQuery.h /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseDatabase/Frameworks/FirebaseDatabase.framework/Headers/FIRDatabaseReference.h /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseDatabase/Frameworks/FirebaseDatabase.framework/Headers/FIRDatabase.h /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseDatabase/Frameworks/FirebaseDatabase.framework/Headers/FIRDataSnapshot.h /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseDatabase/Frameworks/FirebaseDatabase.framework/Headers/FIRDatabaseSwiftNameSupport.h /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseDatabase/Frameworks/FirebaseDatabase.framework/Headers/FIRDataEventType.h /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseDatabase/Frameworks/FirebaseDatabase.framework/Headers/FirebaseDatabase.h /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseDatabase/Frameworks/FirebaseDatabase.framework/Modules/module.modulemap /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseInstanceID/Frameworks/FirebaseInstanceID.framework/Headers/FIRInstanceID.h /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseInstanceID/Frameworks/FirebaseInstanceID.framework/Headers/FirebaseInstanceID.h /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseInstanceID/Frameworks/FirebaseInstanceID.framework/Modules/module.modulemap /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseMessaging/Frameworks/FirebaseMessaging.framework/Headers/FIRMessaging.h /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseMessaging/Frameworks/FirebaseMessaging.framework/Headers/FirebaseMessaging.h /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseMessaging/Frameworks/FirebaseMessaging.framework/Modules/module.modulemap /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseStorage/Frameworks/FirebaseStorage.framework/Headers/FIRStorageTaskSnapshot.h /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseStorage/Frameworks/FirebaseStorage.framework/Headers/FIRStorageUploadTask.h /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseStorage/Frameworks/FirebaseStorage.framework/Headers/FIRStorageReference.h /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseStorage/Frameworks/FirebaseStorage.framework/Headers/FIRStorageMetadata.h /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseStorage/Frameworks/FirebaseStorage.framework/Headers/FIRStorageTask.h /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseStorage/Frameworks/FirebaseStorage.framework/Headers/FIRStorageObservableTask.h /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseStorage/Frameworks/FirebaseStorage.framework/Headers/FIRStorageDownloadTask.h /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseStorage/Frameworks/FirebaseStorage.framework/Headers/FIRStorageSwiftNameSupport.h /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseStorage/Frameworks/FirebaseStorage.framework/Headers/FIRStorageConstants.h /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseStorage/Frameworks/FirebaseStorage.framework/Headers/FIRStorage.h /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseStorage/Frameworks/FirebaseStorage.framework/Headers/FirebaseStorage.h /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseStorage/Frameworks/FirebaseStorage.framework/Modules/module.modulemap /Users/apple-1/Downloads/HouseKeeping/Pods/Firebase/Core/Sources/Firebase.h /Users/apple-1/Downloads/HouseKeeping/Build/Products/Debug-iphonesimulator/LIHAlert/LIHAlert.framework/Modules/LIHAlert.swiftmodule/x86_64.swiftmodule /Users/apple-1/Downloads/HouseKeeping/Build/Products/Debug-iphonesimulator/LIHAlert/LIHAlert.framework/Headers/LIHAlert-Swift.h /Users/apple-1/Downloads/HouseKeeping/Build/Products/Debug-iphonesimulator/LIHAlert/LIHAlert.framework/Headers/LIHAlert-umbrella.h /Users/apple-1/Downloads/HouseKeeping/Build/Products/Debug-iphonesimulator/LIHAlert/LIHAlert.framework/Modules/module.modulemap /Users/apple-1/Downloads/HouseKeeping/Build/Products/Debug-iphonesimulator/ActionSheetPicker-3.0/ActionSheetPicker_3_0.framework/Headers/SWActionSheet.h /Users/apple-1/Downloads/HouseKeeping/Build/Products/Debug-iphonesimulator/ActionSheetPicker-3.0/ActionSheetPicker_3_0.framework/Headers/ActionSheetStringPicker.h /Users/apple-1/Downloads/HouseKeeping/Build/Products/Debug-iphonesimulator/ActionSheetPicker-3.0/ActionSheetPicker_3_0.framework/Headers/ActionSheetPicker.h /Users/apple-1/Downloads/HouseKeeping/Build/Products/Debug-iphonesimulator/ActionSheetPicker-3.0/ActionSheetPicker_3_0.framework/Headers/ActionSheetMultipleStringPicker.h /Users/apple-1/Downloads/HouseKeeping/Build/Products/Debug-iphonesimulator/ActionSheetPicker-3.0/ActionSheetPicker_3_0.framework/Headers/ActionSheetLocalePicker.h /Users/apple-1/Downloads/HouseKeeping/Build/Products/Debug-iphonesimulator/ActionSheetPicker-3.0/ActionSheetPicker_3_0.framework/Headers/DistancePickerView.h /Users/apple-1/Downloads/HouseKeeping/Build/Products/Debug-iphonesimulator/ActionSheetPicker-3.0/ActionSheetPicker_3_0.framework/Headers/ActionSheetDistancePicker.h /Users/apple-1/Downloads/HouseKeeping/Build/Products/Debug-iphonesimulator/ActionSheetPicker-3.0/ActionSheetPicker_3_0.framework/Headers/ActionSheetDatePicker.h /Users/apple-1/Downloads/HouseKeeping/Build/Products/Debug-iphonesimulator/ActionSheetPicker-3.0/ActionSheetPicker_3_0.framework/Headers/ActionSheetCustomPickerDelegate.h /Users/apple-1/Downloads/HouseKeeping/Build/Products/Debug-iphonesimulator/ActionSheetPicker-3.0/ActionSheetPicker_3_0.framework/Headers/ActionSheetCustomPicker.h /Users/apple-1/Downloads/HouseKeeping/Build/Products/Debug-iphonesimulator/ActionSheetPicker-3.0/ActionSheetPicker_3_0.framework/Headers/AbstractActionSheetPicker.h /Users/apple-1/Downloads/HouseKeeping/Build/Products/Debug-iphonesimulator/ActionSheetPicker-3.0/ActionSheetPicker_3_0.framework/Headers/ActionSheetPicker-3.0-umbrella.h /Users/apple-1/Downloads/HouseKeeping/Build/Products/Debug-iphonesimulator/ActionSheetPicker-3.0/ActionSheetPicker_3_0.framework/Modules/module.modulemap /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreData.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/MapKit.swiftmodule
/Users/apple-1/Downloads/HouseKeeping/Build/Intermediates/HouseKeeping.build/Debug-iphonesimulator/HouseKeeping.build/Objects-normal/x86_64/viewCompletedChecklist~partial.swiftdoc : /Users/apple-1/Downloads/HouseKeeping/HouseKeeping/DetailsPending.swift /Users/apple-1/Downloads/HouseKeeping/HouseKeeping/tblAssignTasksPending.swift /Users/apple-1/Downloads/HouseKeeping/HouseKeeping/VCCells.swift /Users/apple-1/Downloads/HouseKeeping/HouseKeeping/currentTask.swift /Users/apple-1/Downloads/HouseKeeping/HouseKeeping/Forgotpassword.swift /Users/apple-1/Downloads/HouseKeeping/HouseKeeping/PageView3.swift /Users/apple-1/Downloads/HouseKeeping/HouseKeeping/PageView.swift /Users/apple-1/Downloads/HouseKeeping/HouseKeeping/ConversationsVC.swift /Users/apple-1/Downloads/HouseKeeping/HouseKeeping/WelcomeVC.swift /Users/apple-1/Downloads/HouseKeeping/HouseKeeping/CheckLists.swift /Users/apple-1/Downloads/HouseKeeping/HouseKeeping/LandingVC.swift /Users/apple-1/Downloads/HouseKeeping/HouseKeeping/workHistoryCell.swift /Users/apple-1/Downloads/HouseKeeping/HouseKeeping/Distribute.swift /Users/apple-1/Downloads/HouseKeeping/HouseKeeping/ViewController.swift /Users/apple-1/Downloads/HouseKeeping/HouseKeeping/tblHistoryAll.swift /Users/apple-1/Downloads/HouseKeeping/HouseKeeping/taskDescription.swift /Users/apple-1/Downloads/HouseKeeping/HouseKeeping/reassignTask.swift /Users/apple-1/Downloads/HouseKeeping/HouseKeeping/Message.swift /Users/apple-1/Downloads/HouseKeeping/HouseKeeping/AppDelegate.swift /Users/apple-1/Downloads/HouseKeeping/HouseKeeping/checkListCell.swift /Users/apple-1/Downloads/HouseKeeping/HouseKeeping/Conversation.swift /Users/apple-1/Downloads/HouseKeeping/HouseKeeping/individualEmpTask.swift /Users/apple-1/Downloads/HouseKeeping/HouseKeeping/tblAssignTasksAll.swift /Users/apple-1/Downloads/HouseKeeping/HouseKeeping/viewAdminTask.swift /Users/apple-1/Downloads/HouseKeeping/HouseKeeping/viewCompletedtask.swift /Users/apple-1/Downloads/HouseKeeping/HouseKeeping/FullSizeImage.swift /Users/apple-1/Downloads/HouseKeeping/HouseKeeping/AlertsViewController.swift /Users/apple-1/Downloads/HouseKeeping/HouseKeeping/viewTaskViewController.swift /Users/apple-1/Downloads/HouseKeeping/HouseKeeping/tblAssignTasksCompleted.swift /Users/apple-1/Downloads/HouseKeeping/HouseKeeping/tblHistoryCompleted.swift /Users/apple-1/Downloads/HouseKeeping/HouseKeeping/home.swift /Users/apple-1/Downloads/HouseKeeping/HouseKeeping/tblAssignTo.swift /Users/apple-1/Downloads/HouseKeeping/HouseKeeping/tblAssignToCell.swift /Users/apple-1/Downloads/HouseKeeping/HouseKeeping/PageView2.swift /Users/apple-1/Downloads/HouseKeeping/HouseKeeping/Helper\ Files.swift /Users/apple-1/Downloads/HouseKeeping/HouseKeeping/AllTasksCell.swift /Users/apple-1/Downloads/HouseKeeping/HouseKeeping/viewCompletedChecklist.swift /Users/apple-1/Downloads/HouseKeeping/HouseKeeping/EmployeeLoginHome.swift /Users/apple-1/Downloads/HouseKeeping/HouseKeeping/roomsCollectionViewCell.swift /Users/apple-1/Downloads/HouseKeeping/HouseKeeping/EmployeeLoginCell.swift /Users/apple-1/Downloads/HouseKeeping/HouseKeeping/DatePickerDialog.swift /Users/apple-1/Downloads/HouseKeeping/HouseKeeping/TBLViewEmpDND.swift /Users/apple-1/Downloads/HouseKeeping/HouseKeeping/TblViewEmplLoginPending.swift /Users/apple-1/Downloads/HouseKeeping/HouseKeeping/User.swift /Users/apple-1/Downloads/HouseKeeping/HouseKeeping/HADropDown.swift /Users/apple-1/Downloads/HouseKeeping/HouseKeeping/EmployeeDetails.swift /Users/apple-1/Downloads/HouseKeeping/HouseKeeping/tblHistoryDND.swift /Users/apple-1/Downloads/HouseKeeping/HouseKeeping/Distributetask.swift /Users/apple-1/Downloads/HouseKeeping/HouseKeeping/tblHistoryPending.swift /Users/apple-1/Downloads/HouseKeeping/HouseKeeping/ChatVC.swift /Users/apple-1/Downloads/HouseKeeping/HouseKeeping/NavVC.swift /Users/apple-1/Downloads/HouseKeeping/HouseKeeping/TaskType.swift /Users/apple-1/Downloads/HouseKeeping/HouseKeeping/tblAssignTasksOnProgress.swift /Users/apple-1/Downloads/HouseKeeping/HouseKeeping/getJSONAssignedTasks&Workers.swift /Users/apple-1/Downloads/HouseKeeping/HouseKeeping/WorkHistory.swift /Users/apple-1/Downloads/HouseKeeping/HouseKeeping/tblHistoryOnprogress.swift /Users/apple-1/Downloads/HouseKeeping/HouseKeeping/tblDoNotDistrub.swift /Users/apple-1/Downloads/HouseKeeping/HouseKeeping/TblViewEmplLoginCompleted.swift /Users/apple-1/Downloads/HouseKeeping/HouseKeeping/selectedHistory.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/SwiftOnoneSupport.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/UIKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Foundation.swiftmodule /Users/apple-1/Downloads/HouseKeeping/Pods/Firebase/Core/Sources/module.modulemap /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/ObjectiveC.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreGraphics.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/QuartzCore.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreImage.swiftmodule /Users/apple-1/Downloads/HouseKeeping/Build/Products/Debug-iphonesimulator/Alamofire/Alamofire.framework/Modules/Alamofire.swiftmodule/x86_64.swiftmodule /Users/apple-1/Downloads/HouseKeeping/Build/Products/Debug-iphonesimulator/Alamofire/Alamofire.framework/Headers/Alamofire-Swift.h /Users/apple-1/Downloads/HouseKeeping/Build/Products/Debug-iphonesimulator/Alamofire/Alamofire.framework/Headers/Alamofire-umbrella.h /Users/apple-1/Downloads/HouseKeeping/Build/Products/Debug-iphonesimulator/Alamofire/Alamofire.framework/Modules/module.modulemap /Users/apple-1/Downloads/HouseKeeping/Build/Products/Debug-iphonesimulator/SwiftyJSON/SwiftyJSON.framework/Modules/SwiftyJSON.swiftmodule/x86_64.swiftmodule /Users/apple-1/Downloads/HouseKeeping/Build/Products/Debug-iphonesimulator/SwiftyJSON/SwiftyJSON.framework/Headers/SwiftyJSON-Swift.h /Users/apple-1/Downloads/HouseKeeping/Build/Products/Debug-iphonesimulator/SwiftyJSON/SwiftyJSON.framework/Headers/SwiftyJSON-umbrella.h /Users/apple-1/Downloads/HouseKeeping/Build/Products/Debug-iphonesimulator/SwiftyJSON/SwiftyJSON.framework/Modules/module.modulemap /Users/apple-1/Downloads/HouseKeeping/Build/Products/Debug-iphonesimulator/Fusuma/Fusuma.framework/Modules/Fusuma.swiftmodule/x86_64.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/CoreMedia.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreAudio.swiftmodule /Users/apple-1/Downloads/HouseKeeping/Build/Products/Debug-iphonesimulator/Fusuma/Fusuma.framework/Headers/Fusuma-Swift.h /Users/apple-1/Downloads/HouseKeeping/Build/Products/Debug-iphonesimulator/Fusuma/Fusuma.framework/Headers/Fusuma-umbrella.h /Users/apple-1/Downloads/HouseKeeping/Build/Products/Debug-iphonesimulator/Fusuma/Fusuma.framework/Modules/module.modulemap /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Photos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreLocation.swiftmodule /Users/apple-1/Downloads/HouseKeeping/Build/Products/Debug-iphonesimulator/SwiftSpinner/SwiftSpinner.framework/Modules/SwiftSpinner.swiftmodule/x86_64.swiftmodule /Users/apple-1/Downloads/HouseKeeping/Build/Products/Debug-iphonesimulator/SwiftSpinner/SwiftSpinner.framework/Headers/SwiftSpinner-Swift.h /Users/apple-1/Downloads/HouseKeeping/Build/Products/Debug-iphonesimulator/SwiftSpinner/SwiftSpinner.framework/Headers/SwiftSpinner.h /Users/apple-1/Downloads/HouseKeeping/Build/Products/Debug-iphonesimulator/SwiftSpinner/SwiftSpinner.framework/Headers/SwiftSpinner-umbrella.h /Users/apple-1/Downloads/HouseKeeping/Build/Products/Debug-iphonesimulator/SwiftSpinner/SwiftSpinner.framework/Modules/module.modulemap /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseCore/Frameworks/FirebaseCore.framework/Headers/FIROptions.h /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseCore/Frameworks/FirebaseCore.framework/Headers/FIRLoggerLevel.h /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseCore/Frameworks/FirebaseCore.framework/Headers/FIRConfiguration.h /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseCore/Frameworks/FirebaseCore.framework/Headers/FIRApp.h /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseCore/Frameworks/FirebaseCore.framework/Headers/FIRCoreSwiftNameSupport.h /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseCore/Frameworks/FirebaseCore.framework/Headers/FIRAnalyticsConfiguration.h /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseCore/Frameworks/FirebaseCore.framework/Headers/FirebaseCore.h /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseCore/Frameworks/FirebaseCore.framework/Modules/module.modulemap /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseAnalytics/Frameworks/FirebaseAnalytics.framework/Headers/FIRUserPropertyNames.h /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseAnalytics/Frameworks/FirebaseAnalytics.framework/Headers/FIRParameterNames.h /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseAnalytics/Frameworks/FirebaseAnalytics.framework/Headers/FIREventNames.h /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseAnalytics/Frameworks/FirebaseAnalytics.framework/Headers/FIRAnalyticsSwiftNameSupport.h /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseAnalytics/Frameworks/FirebaseAnalytics.framework/Headers/FIRAnalytics.h /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseAnalytics/Frameworks/FirebaseAnalytics.framework/Headers/FIRAnalytics+AppDelegate.h /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseAnalytics/Frameworks/FirebaseAnalytics.framework/Headers/FIROptions.h /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseAnalytics/Frameworks/FirebaseAnalytics.framework/Headers/FIRConfiguration.h /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseAnalytics/Frameworks/FirebaseAnalytics.framework/Headers/FIRApp.h /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseAnalytics/Frameworks/FirebaseAnalytics.framework/Headers/FIRAnalyticsConfiguration.h /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseAnalytics/Frameworks/FirebaseAnalytics.framework/Headers/FirebaseAnalytics.h /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseAnalytics/Frameworks/FirebaseAnalytics.framework/Modules/module.modulemap /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseAuth/Frameworks/FirebaseAuth.framework/Headers/FirebaseAuthVersion.h /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseAuth/Frameworks/FirebaseAuth.framework/Headers/FIRUserInfo.h /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseAuth/Frameworks/FirebaseAuth.framework/Headers/FIRUser.h /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseAuth/Frameworks/FirebaseAuth.framework/Headers/FIRAuthDataResult.h /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseAuth/Frameworks/FirebaseAuth.framework/Headers/FIRAdditionalUserInfo.h /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseAuth/Frameworks/FirebaseAuth.framework/Headers/FIRTwitterAuthProvider.h /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseAuth/Frameworks/FirebaseAuth.framework/Headers/FIRAuthErrors.h /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseAuth/Frameworks/FirebaseAuth.framework/Headers/FIRAuthAPNSTokenType.h /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseAuth/Frameworks/FirebaseAuth.framework/Headers/FIRAuth.h /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseAuth/Frameworks/FirebaseAuth.framework/Headers/FIRPhoneAuthProvider.h /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseAuth/Frameworks/FirebaseAuth.framework/Headers/FIRAuthCredential.h /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseAuth/Frameworks/FirebaseAuth.framework/Headers/FIRPhoneAuthCredential.h /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseAuth/Frameworks/FirebaseAuth.framework/Headers/FIROAuthProvider.h /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseAuth/Frameworks/FirebaseAuth.framework/Headers/FIRGoogleAuthProvider.h /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseAuth/Frameworks/FirebaseAuth.framework/Headers/FIRGitHubAuthProvider.h /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseAuth/Frameworks/FirebaseAuth.framework/Headers/FIRFacebookAuthProvider.h /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseAuth/Frameworks/FirebaseAuth.framework/Headers/FIRAuthSwiftNameSupport.h /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseAuth/Frameworks/FirebaseAuth.framework/Headers/FIREmailAuthProvider.h /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseAuth/Frameworks/FirebaseAuth.framework/Headers/FirebaseAuth.h /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseAuth/Frameworks/FirebaseAuth.framework/Modules/module.modulemap /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseDatabase/Frameworks/FirebaseDatabase.framework/Headers/FIRServerValue.h /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseDatabase/Frameworks/FirebaseDatabase.framework/Headers/FIRTransactionResult.h /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseDatabase/Frameworks/FirebaseDatabase.framework/Headers/FIRMutableData.h /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseDatabase/Frameworks/FirebaseDatabase.framework/Headers/FIRDatabaseQuery.h /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseDatabase/Frameworks/FirebaseDatabase.framework/Headers/FIRDatabaseReference.h /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseDatabase/Frameworks/FirebaseDatabase.framework/Headers/FIRDatabase.h /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseDatabase/Frameworks/FirebaseDatabase.framework/Headers/FIRDataSnapshot.h /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseDatabase/Frameworks/FirebaseDatabase.framework/Headers/FIRDatabaseSwiftNameSupport.h /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseDatabase/Frameworks/FirebaseDatabase.framework/Headers/FIRDataEventType.h /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseDatabase/Frameworks/FirebaseDatabase.framework/Headers/FirebaseDatabase.h /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseDatabase/Frameworks/FirebaseDatabase.framework/Modules/module.modulemap /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseInstanceID/Frameworks/FirebaseInstanceID.framework/Headers/FIRInstanceID.h /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseInstanceID/Frameworks/FirebaseInstanceID.framework/Headers/FirebaseInstanceID.h /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseInstanceID/Frameworks/FirebaseInstanceID.framework/Modules/module.modulemap /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseMessaging/Frameworks/FirebaseMessaging.framework/Headers/FIRMessaging.h /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseMessaging/Frameworks/FirebaseMessaging.framework/Headers/FirebaseMessaging.h /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseMessaging/Frameworks/FirebaseMessaging.framework/Modules/module.modulemap /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseStorage/Frameworks/FirebaseStorage.framework/Headers/FIRStorageTaskSnapshot.h /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseStorage/Frameworks/FirebaseStorage.framework/Headers/FIRStorageUploadTask.h /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseStorage/Frameworks/FirebaseStorage.framework/Headers/FIRStorageReference.h /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseStorage/Frameworks/FirebaseStorage.framework/Headers/FIRStorageMetadata.h /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseStorage/Frameworks/FirebaseStorage.framework/Headers/FIRStorageTask.h /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseStorage/Frameworks/FirebaseStorage.framework/Headers/FIRStorageObservableTask.h /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseStorage/Frameworks/FirebaseStorage.framework/Headers/FIRStorageDownloadTask.h /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseStorage/Frameworks/FirebaseStorage.framework/Headers/FIRStorageSwiftNameSupport.h /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseStorage/Frameworks/FirebaseStorage.framework/Headers/FIRStorageConstants.h /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseStorage/Frameworks/FirebaseStorage.framework/Headers/FIRStorage.h /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseStorage/Frameworks/FirebaseStorage.framework/Headers/FirebaseStorage.h /Users/apple-1/Downloads/HouseKeeping/Pods/FirebaseStorage/Frameworks/FirebaseStorage.framework/Modules/module.modulemap /Users/apple-1/Downloads/HouseKeeping/Pods/Firebase/Core/Sources/Firebase.h /Users/apple-1/Downloads/HouseKeeping/Build/Products/Debug-iphonesimulator/LIHAlert/LIHAlert.framework/Modules/LIHAlert.swiftmodule/x86_64.swiftmodule /Users/apple-1/Downloads/HouseKeeping/Build/Products/Debug-iphonesimulator/LIHAlert/LIHAlert.framework/Headers/LIHAlert-Swift.h /Users/apple-1/Downloads/HouseKeeping/Build/Products/Debug-iphonesimulator/LIHAlert/LIHAlert.framework/Headers/LIHAlert-umbrella.h /Users/apple-1/Downloads/HouseKeeping/Build/Products/Debug-iphonesimulator/LIHAlert/LIHAlert.framework/Modules/module.modulemap /Users/apple-1/Downloads/HouseKeeping/Build/Products/Debug-iphonesimulator/ActionSheetPicker-3.0/ActionSheetPicker_3_0.framework/Headers/SWActionSheet.h /Users/apple-1/Downloads/HouseKeeping/Build/Products/Debug-iphonesimulator/ActionSheetPicker-3.0/ActionSheetPicker_3_0.framework/Headers/ActionSheetStringPicker.h /Users/apple-1/Downloads/HouseKeeping/Build/Products/Debug-iphonesimulator/ActionSheetPicker-3.0/ActionSheetPicker_3_0.framework/Headers/ActionSheetPicker.h /Users/apple-1/Downloads/HouseKeeping/Build/Products/Debug-iphonesimulator/ActionSheetPicker-3.0/ActionSheetPicker_3_0.framework/Headers/ActionSheetMultipleStringPicker.h /Users/apple-1/Downloads/HouseKeeping/Build/Products/Debug-iphonesimulator/ActionSheetPicker-3.0/ActionSheetPicker_3_0.framework/Headers/ActionSheetLocalePicker.h /Users/apple-1/Downloads/HouseKeeping/Build/Products/Debug-iphonesimulator/ActionSheetPicker-3.0/ActionSheetPicker_3_0.framework/Headers/DistancePickerView.h /Users/apple-1/Downloads/HouseKeeping/Build/Products/Debug-iphonesimulator/ActionSheetPicker-3.0/ActionSheetPicker_3_0.framework/Headers/ActionSheetDistancePicker.h /Users/apple-1/Downloads/HouseKeeping/Build/Products/Debug-iphonesimulator/ActionSheetPicker-3.0/ActionSheetPicker_3_0.framework/Headers/ActionSheetDatePicker.h /Users/apple-1/Downloads/HouseKeeping/Build/Products/Debug-iphonesimulator/ActionSheetPicker-3.0/ActionSheetPicker_3_0.framework/Headers/ActionSheetCustomPickerDelegate.h /Users/apple-1/Downloads/HouseKeeping/Build/Products/Debug-iphonesimulator/ActionSheetPicker-3.0/ActionSheetPicker_3_0.framework/Headers/ActionSheetCustomPicker.h /Users/apple-1/Downloads/HouseKeeping/Build/Products/Debug-iphonesimulator/ActionSheetPicker-3.0/ActionSheetPicker_3_0.framework/Headers/AbstractActionSheetPicker.h /Users/apple-1/Downloads/HouseKeeping/Build/Products/Debug-iphonesimulator/ActionSheetPicker-3.0/ActionSheetPicker_3_0.framework/Headers/ActionSheetPicker-3.0-umbrella.h /Users/apple-1/Downloads/HouseKeeping/Build/Products/Debug-iphonesimulator/ActionSheetPicker-3.0/ActionSheetPicker_3_0.framework/Modules/module.modulemap /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreData.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/MapKit.swiftmodule
|
D
|
; Copyright (C) 2008 The Android Open Source Project
;
; Licensed under the Apache License, Version 2.0 (the "License");
; you may not use this file except in compliance with the License.
; You may obtain a copy of the License at
;
; http://www.apache.org/licenses/LICENSE-2.0
;
; Unless required by applicable law or agreed to in writing, software
; distributed under the License is distributed on an "AS IS" BASIS,
; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
; See the License for the specific language governing permissions and
; limitations under the License.
.source T_invoke_direct_range_24.java
.class public dot.junit.opcodes.invoke_direct_range.d.T_invoke_direct_range_24
.super java/lang/Object
.method public <init>()V
.limit regs 2
invoke-direct {v1}, java/lang/Object/<init>()V
return-void
.end method
.method private test(II)I
.limit regs 7
const v0, 999
const v1, 888
const v2, 777
div-int v4, v5, v6
return v4
.end method
.method public run()I
.limit regs 7
const v0, 111
const v1, 222
const v2, 333
const-wide v4, 50
move-object v3, v6
invoke-direct {v3..v5}, dot/junit/opcodes/invoke_direct_range/d/T_invoke_direct_range_24/test(II)I
move-result v3
const v4, 2
if-ne v3, v4, Label30
const v4, 111
if-ne v0, v4, Label30
const v4, 222
if-ne v1, v4, Label30
const v4, 333
if-ne v2, v4, Label30
const v0, 1
return v0
Label30:
const v0, 0
return v0
.end method
|
D
|
module game.multiproxy;
import base.gameobject, base.renderproxy;
/**
* A basic multiplexer proxy. Allows a game object to have multiple render
* proxies attached to it.
*
* FIXME: Even this simple render proxy causes all sorts of seg faults.
* Something is really wrong here. This proxy can not be used safely right now.
*/
class MultiProxy : IRenderProxy {
SmartPtr!IRenderProxy target;
this(IRenderProxy target){
this.target = target;
}
override void extractDo(IGameObject object, IRendererExtractor extractor){
target.extractDo(object, extractor);
}
override void extractDo(IRenderable object, IRendererExtractor extractor){
target.extractDo(object, extractor);
}
/+
IRenderProxy[ubyte] targets;
void extract(IGameObject object, IRendererExtractor extractor){
foreach(proxy; targets)
proxy.extract(object, extractor);
}
void extract(IRenderable object, IRendererExtractor extractor){
assert(0, "MultiProxy is only for game objects, sorry");
}
void add(ubyte key, IRenderProxy proxy){
targets[key] = proxy;
}
void remove(ubyte key){
targets.remove(key);
}
+/
}
|
D
|
// Written by Christopher E. Miller
// See the included license.txt for copyright and license details.
module dfl.drawing;
import core.sys.windows.windows;
import core.sys.windows.com;
import core.sys.windows.ocidl;
import core.sys.windows.objfwd;
import core.sys.windows.objidl; // IStream
import core.sys.windows.olectl; // OleLoadPicture
import core.sys.windows.uuid; // IID_IPicture
import dfl.internal.dlib;
import dfl.internal.d2;
//import dfl.internal.winapi;
import dfl.exception; // new class!
import dfl.internal.utf;
import dfl.internal.com;
//import dfl.internal.wincom;
version (D_Version2) {
version = DFL_D2;
version = DFL_D2_AND_ABOVE;
} else version (D_Version3) {
version = DFL_D3;
version = DFL_D3_AND_ABOVE;
version = DFL_D2_AND_ABOVE;
} else version (D_Version4) {
version = DFL_D4;
version = DFL_D4_AND_ABOVE;
version = DFL_D3_AND_ABOVE;
version = DFL_D2_AND_ABOVE;
} else {
version = DFL_D1;
}
//version = DFL_D1_AND_ABOVE;
/// X and Y coordinate.
struct Point {
union {
struct {
LONG x;
LONG y;
}
POINT point; // package
}
/// Construct a new Point.
this(int x, int y) pure nothrow {
this.x = x;
this.y = y;
}
this(in POINT* pt) pure nothrow {
this.x = pt.x;
this.y = pt.y;
}
version (DFL_D2_AND_ABOVE) {
Dequ opEquals(ref ConstType!(Point) pt) const {
return x == pt.x && y == pt.y;
}
Dequ opEquals(Point pt) const {
return x == pt.x && y == pt.y;
}
} else {
Dequ opEquals(Point pt) {
return x == pt.x && y == pt.y;
}
}
Point opAdd(Size sz) const pure nothrow {
Point result;
result.x = x + sz.width;
result.y = y + sz.height;
return result;
}
Point opSub(Size sz) const pure nothrow {
Point result;
result.x = x - sz.width;
result.y = y - sz.height;
return result;
}
void opAddAssign(Size sz) pure nothrow {
x += sz.width;
y += sz.height;
}
void opSubAssign(Size sz) pure nothrow {
x -= sz.width;
y -= sz.height;
}
Point opNeg() const pure nothrow {
return Point(-x, -y);
}
}
/// Width and height.
struct Size {
int width;
int height;
SIZE size() const pure nothrow {
SIZE sz;
sz.cx = width;
sz.cy = height;
return sz;
}
void size(SIZE sz) pure nothrow {
width = sz.cx;
height = sz.cy;
}
/// Construct a new Size.
this(int width, int height) pure nothrow {
this.width = width;
this.height = height;
}
/// Construct a new Size.
this(in SIZE* size) pure nothrow {
this.width = size.cx;
this.height = size.cy;
}
version (DFL_D2_AND_ABOVE) {
Dequ opEquals(ref ConstType!(Size) sz) const {
return width == sz.width && height == sz.height;
}
Dequ opEquals(Size sz) const {
return width == sz.width && height == sz.height;
}
} else {
Dequ opEquals(Size sz) {
return width == sz.width && height == sz.height;
}
}
Size opAdd(Size sz) const pure nothrow {
Size result;
result.width = width + sz.width;
result.height = height + sz.height;
return result;
}
Size opSub(Size sz) const pure nothrow {
Size result;
result.width = width - sz.width;
result.height = height - sz.height;
return result;
}
void opAddAssign(Size sz) pure nothrow {
width += sz.width;
height += sz.height;
}
void opSubAssign(Size sz) pure nothrow {
width -= sz.width;
height -= sz.height;
}
}
/// X, Y, width and height rectangle dimensions.
struct Rect {
int x, y, width, height;
// Used internally.
void getRect(RECT* r) pure nothrow { // package
r.left = x;
r.right = x + width;
r.top = y;
r.bottom = y + height;
}
Point location() const pure nothrow @property {
return Point(x, y);
}
void location(Point pt) pure nothrow @property {
x = pt.x;
y = pt.y;
}
Size size() const pure nothrow @property {
return Size(width, height);
}
void size(Size sz) pure nothrow @property {
width = sz.width;
height = sz.height;
}
int right() const pure nothrow @property {
return x + width;
}
int bottom() const pure nothrow @property {
return y + height;
}
/// Construct a new Rect.
this(int x, int y, int width, int height) pure nothrow {
this.x = x;
this.y = y;
this.width = width;
this.height = height;
}
this(Point location, Size size) pure nothrow {
x = location.x;
y = location.y;
width = size.width;
height = size.height;
}
// Used internally.
this(in RECT* rect) pure nothrow { // package
x = rect.left;
y = rect.top;
width = rect.right - rect.left;
height = rect.bottom - rect.top;
}
/// Construct a new Rect from left, top, right and bottom values.
static Rect fromLTRB(int left, int top, int right, int bottom) pure nothrow {
Rect r;
r.x = left;
r.y = top;
r.width = right - left;
r.height = bottom - top;
return r;
}
version (DFL_D2_AND_ABOVE) {
Dequ opEquals(ref ConstType!(Rect) r) const {
return x == r.x && y == r.y && width == r.width && height == r.height;
}
Dequ opEquals(Rect r) const {
return x == r.x && y == r.y && width == r.width && height == r.height;
}
} else {
Dequ opEquals(Rect r) {
return x == r.x && y == r.y && width == r.width && height == r.height;
}
}
bool contains(int c_x, int c_y) const pure nothrow {
if (c_x >= x && c_y >= y) {
if (c_x <= right && c_y <= bottom) {
return true;
}
}
return false;
}
bool contains(Point pos) const pure nothrow {
return contains(pos.x, pos.y);
}
// Contained entirely within -this-.
bool contains(Rect r) const pure nothrow {
if (r.x >= x && r.y >= y) {
if (r.right <= right && r.bottom <= bottom) {
return true;
}
}
return false;
}
void inflate(int i_width, int i_height) pure nothrow {
x -= i_width;
width += i_width * 2;
y -= i_height;
height += i_height * 2;
}
void inflate(Size insz) pure nothrow {
inflate(insz.width, insz.height);
}
// Just tests if there's an intersection.
bool intersectsWith(Rect r) const pure nothrow {
if (r.right >= x && r.bottom >= y) {
if (r.y <= bottom && r.x <= right) {
return true;
}
}
return false;
}
void offset(int x, int y) pure nothrow {
this.x += x;
this.y += y;
}
void offset(Point pt) pure nothrow {
//return offset(pt.x, pt.y);
this.x += pt.x;
this.y += pt.y;
}
/+
// Modify -this- to include only the intersection
// of -this- and -r-.
void intersect(Rect r) {
}
+/
// void offset(Point), void offset(int, int)
// static Rect union(Rect, Rect)
}
unittest {
Rect r = Rect(3, 3, 3, 3);
assert(r.contains(3, 3));
assert(!r.contains(3, 2));
assert(r.contains(6, 6));
assert(!r.contains(6, 7));
assert(r.contains(r));
assert(r.contains(Rect(4, 4, 2, 2)));
assert(!r.contains(Rect(2, 4, 4, 2)));
assert(!r.contains(Rect(4, 3, 2, 4)));
r.inflate(2, 1);
assert(r.x == 1);
assert(r.right == 8);
assert(r.y == 2);
assert(r.bottom == 7);
r.inflate(-2, -1);
assert(r == Rect(3, 3, 3, 3));
assert(r.intersectsWith(Rect(4, 4, 2, 9)));
assert(r.intersectsWith(Rect(3, 3, 1, 1)));
assert(r.intersectsWith(Rect(0, 3, 3, 0)));
assert(r.intersectsWith(Rect(3, 2, 0, 1)));
assert(!r.intersectsWith(Rect(3, 1, 0, 1)));
assert(r.intersectsWith(Rect(5, 6, 1, 1)));
assert(!r.intersectsWith(Rect(7, 6, 1, 1)));
assert(!r.intersectsWith(Rect(6, 7, 1, 1)));
}
/// Color value representation
struct Color {
/// Red, green, blue and alpha channel color values.
@property ubyte r() nothrow {
validateColor();
return color.red;
}
@property ubyte g() nothrow {
validateColor();
return color.green;
}
@property ubyte b() nothrow {
validateColor();
return color.blue;
}
@property ubyte a() nothrow { /+ validateColor(); +/ return color.alpha;
}
/// Return the numeric color value.
COLORREF toArgb() nothrow {
validateColor();
return color.cref;
}
/// Return the numeric red, green and blue color value.
COLORREF toRgb() nothrow {
validateColor();
return color.cref & 0x00FFFFFF;
}
// Used internally.
HBRUSH createBrush() nothrow { // package
HBRUSH hbr;
if (_systemColorIndex == Color.INVAILD_SYSTEM_COLOR_INDEX) {
hbr = CreateSolidBrush(toRgb());
} else {
hbr = GetSysColorBrush(_systemColorIndex);
}
return hbr;
}
Color* Dthisptr(Color* t) pure nothrow {
return t;
}
Color* Dthisptr(ref Color t) pure nothrow {
return &t;
}
Color Dthisval(Color* t) pure nothrow {
return *t;
}
Color Dthisval(Color t) pure nothrow {
return t;
}
deprecated static Color opCall(COLORREF argb) {
Color nc;
nc.color.cref = argb;
return nc;
}
/// Construct a new color.
private this(_color c) pure nothrow {
color = c;
}
/// Construct a new color.
this(ubyte alpha, Color c) pure nothrow {
this = fromRgb(alpha, c.color.cref);
}
this(ubyte red, ubyte green, ubyte blue) pure nothrow {
this = fromArgb(0xff, red, green, blue);
}
this(ubyte alpha, ubyte red, ubyte green, ubyte blue) pure nothrow {
this = fromArgb(alpha, red, green, blue);
}
//alias opCall fromArgb;
static Color fromArgb(ubyte alpha, ubyte red, ubyte green, ubyte blue) pure nothrow {
return Color(_color((alpha << 24) | (blue << 16) | (green << 8) | red));
}
static Color fromRgb(COLORREF rgb) pure nothrow {
if (CLR_NONE == rgb) {
return empty;
}
return Color(_color(cast(COLORREF)(rgb | 0xff000000)));
}
static Color fromRgb(ubyte alpha, COLORREF rgb) pure nothrow {
return Color(_color(rgb | ((cast(COLORREF) alpha) << 24)));
}
static @property Color empty() pure nothrow {
return Color(0, 0, 0, 0);
}
/// Return a completely transparent color value.
static @property Color transparent() nothrow {
return Color.fromArgb(0, 0xFF, 0xFF, 0xFF);
}
deprecated alias blend = blendColor;
/// Blend colors; alpha channels are ignored.
// Blends the color channels half way.
// Does not consider alpha channels and discards them.
// The new blended color is returned; -this- Color is not modified.
Color blendColor(Color wc) nothrow {
if (Dthisval(this) == Color.empty) {
return wc;
}
if (wc == Color.empty) {
return Dthisval(this);
}
validateColor();
wc.validateColor();
return Color(cast(ubyte)((cast(uint) color.red + cast(uint) wc.color.red) >> 1),
cast(ubyte)((cast(uint) color.green + cast(uint) wc.color.green) >> 1),
cast(ubyte)((cast(uint) color.blue + cast(uint) wc.color.blue) >> 1));
}
/// Alpha blend this color with a background color to return a solid color (100% opaque).
// Blends with backColor if this color has opacity to produce a solid color.
// Returns the new solid color, or the original color if no opacity.
// If backColor has opacity, it is ignored.
// The new blended color is returned; -this- Color is not modified.
Color solidColor(Color backColor) nothrow {
//if(0x7F == this.color.alpha)
// return blendColor(backColor);
//if(Dthisval(this) == Color.empty) // Checked if(0 == this.color.alpha)
// return backColor;
if (0 == this.color.alpha) {
return backColor;
}
if (backColor == Color.empty) {
return Dthisval(this);
}
if (0xFF == this.color.alpha) {
return Dthisval(this);
}
validateColor();
backColor.validateColor();
float fa, ba;
fa = cast(float) color.alpha / 255.0;
ba = 1.0 - fa;
Color result;
result.color.alpha = 0xFF;
result.color.red = cast(ubyte)(this.color.red * fa + backColor.color.red * ba);
result.color.green = cast(ubyte)(this.color.green * fa + backColor.color.green * ba);
result.color.blue = cast(ubyte)(this.color.blue * fa + backColor.color.blue * ba);
return result;
}
package static Color systemColor(int colorIndex) pure nothrow {
Color c;
c.sysIndex = cast(ubyte) colorIndex;
c.color.alpha = 0xFF;
return c;
}
// Gets color index or INVAILD_SYSTEM_COLOR_INDEX.
package @property int _systemColorIndex() pure nothrow {
return sysIndex;
}
package enum ubyte INVAILD_SYSTEM_COLOR_INDEX = ubyte.max;
private:
union _color {
COLORREF cref;
struct {
align(1):
ubyte red;
ubyte green;
ubyte blue;
ubyte alpha;
}
}
static assert(_color.sizeof == uint.sizeof);
_color color;
ubyte sysIndex = INVAILD_SYSTEM_COLOR_INDEX;
void validateColor() nothrow {
if (sysIndex != INVAILD_SYSTEM_COLOR_INDEX) {
color.cref = GetSysColor(sysIndex);
//color.alpha = 0xFF; // Should already be set.
}
}
}
unittest {
enum red = Color.fromArgb(0xff, 0xff, 0x00, 0x00);
}
class SystemColors {
private this() {
}
static:
@property Color activeBorder() {
return Color.systemColor(COLOR_ACTIVEBORDER);
}
@property Color activeCaption() {
return Color.systemColor(COLOR_ACTIVECAPTION);
}
@property Color activeCaptionText() {
return Color.systemColor(COLOR_CAPTIONTEXT);
}
@property Color appWorkspace() {
return Color.systemColor(COLOR_APPWORKSPACE);
}
@property Color control() {
return Color.systemColor(COLOR_BTNFACE);
}
@property Color controlDark() {
return Color.systemColor(COLOR_BTNSHADOW);
}
@property Color controlDarkDark() {
return Color.systemColor(COLOR_3DDKSHADOW); // ?
}
@property Color controlLight() {
return Color.systemColor(COLOR_3DLIGHT);
}
@property Color controlLightLight() {
return Color.systemColor(COLOR_BTNHIGHLIGHT); // ?
}
@property Color controlText() {
return Color.systemColor(COLOR_BTNTEXT);
}
@property Color desktop() {
return Color.systemColor(COLOR_DESKTOP);
}
@property Color grayText() {
return Color.systemColor(COLOR_GRAYTEXT);
}
@property Color highlight() {
return Color.systemColor(COLOR_HIGHLIGHT);
}
@property Color highlightText() {
return Color.systemColor(COLOR_HIGHLIGHTTEXT);
}
@property Color hotTrack() {
return Color(0, 0, 0xFF); // ?
}
@property Color inactiveBorder() {
return Color.systemColor(COLOR_INACTIVEBORDER);
}
@property Color inactiveCaption() {
return Color.systemColor(COLOR_INACTIVECAPTION);
}
@property Color inactiveCaptionText() {
return Color.systemColor(COLOR_INACTIVECAPTIONTEXT);
}
@property Color info() {
return Color.systemColor(COLOR_INFOBK);
}
@property Color infoText() {
return Color.systemColor(COLOR_INFOTEXT);
}
@property Color menu() {
return Color.systemColor(COLOR_MENU);
}
@property Color menuText() {
return Color.systemColor(COLOR_MENUTEXT);
}
@property Color scrollBar() {
return Color.systemColor(CTLCOLOR_SCROLLBAR);
}
@property Color window() {
return Color.systemColor(COLOR_WINDOW);
}
@property Color windowFrame() {
return Color.systemColor(COLOR_WINDOWFRAME);
}
@property Color windowText() {
return Color.systemColor(COLOR_WINDOWTEXT);
}
}
class SystemIcons {
private this() {
}
static:
@property Icon application() {
return new Icon(LoadIcon(null, IDI_APPLICATION), false);
}
@property Icon error() {
return new Icon(LoadIcon(null, IDI_HAND), false);
}
@property Icon question() {
return new Icon(LoadIcon(null, IDI_QUESTION), false);
}
@property Icon warning() {
return new Icon(LoadIcon(null, IDI_EXCLAMATION), false);
}
@property Icon information() {
return new Icon(LoadIcon(null, IDI_INFORMATION), false);
}
}
/+
class ImageFormat {
/+
this(guid) {
}
final @property guid() {
return guid;
}
+/
static:
@property ImageFormat bmp() {
return null;
}
@property ImageFormat icon() {
return null;
}
}
+/
abstract class Image {
//flags(); // getter ???
/+
final @property ImageFormat rawFormat();
+/
static Bitmap fromHBitmap(HBITMAP hbm) { // package
return new Bitmap(hbm, false); // Not owned. Up to caller to manage or call dispose().
}
/+
static Image fromFile(Dstring file) {
return new Image(LoadImageA());
}
+/
void draw(Graphics g, Point pt);
void drawStretched(Graphics g, Rect r);
@property Size size();
@property int width() {
return size.width;
}
@property int height() {
return size.height;
}
int _imgtype(HGDIOBJ* ph) { // internal
if (ph) {
*ph = HGDIOBJ.init;
}
return 0; // 1 = bitmap; 2 = icon.
}
}
class Bitmap : Image {
// Load from a bmp file.
this(Dstring fileName) {
this.hbm = cast(HBITMAP) loadImage(null, fileName,
IMAGE_BITMAP, 0, 0, LR_LOADFROMFILE);
if (!this.hbm) {
throw new DflException("Unable to load bitmap from file '" ~ fileName ~ "'");
}
}
// Used internally.
this(HBITMAP hbm, bool owned = true) {
this.hbm = hbm;
this.owned = owned;
}
final @property HBITMAP handle() {
return hbm;
}
private void _getInfo(BITMAP* bm) {
if (GetObjectA(hbm, BITMAP.sizeof, bm) != BITMAP.sizeof) {
throw new DflException("Unable to get image information");
}
}
final override @property Size size() {
BITMAP bm;
_getInfo(&bm);
return Size(bm.bmWidth, bm.bmHeight);
}
final override @property int width() {
return size.width;
}
final override @property int height() {
return size.height;
}
private void _draw(Graphics g, Point pt, HDC memdc) {
HGDIOBJ hgo;
Size sz;
sz = size;
hgo = SelectObject(memdc, hbm);
BitBlt(g.handle, pt.x, pt.y, sz.width, sz.height, memdc, 0, 0, SRCCOPY);
SelectObject(memdc, hgo); // Old bitmap.
}
final override void draw(Graphics g, Point pt) {
HDC memdc;
memdc = CreateCompatibleDC(g.handle);
try {
_draw(g, pt, memdc);
}
finally {
DeleteDC(memdc);
}
}
// -tempMemGraphics- is used as a temporary Graphics instead of
// creating and destroying a temporary one for each call.
final void draw(Graphics g, Point pt, Graphics tempMemGraphics) {
_draw(g, pt, tempMemGraphics.handle);
}
private void _drawStretched(Graphics g, Rect r, HDC memdc) {
HGDIOBJ hgo;
Size sz;
int lstretch;
sz = size;
hgo = SelectObject(memdc, hbm);
lstretch = SetStretchBltMode(g.handle, COLORONCOLOR);
StretchBlt(g.handle, r.x, r.y, r.width, r.height, memdc, 0, 0, sz.width, sz.height,
SRCCOPY);
SetStretchBltMode(g.handle, lstretch);
SelectObject(memdc, hgo); // Old bitmap.
}
final override void drawStretched(Graphics g, Rect r) {
HDC memdc;
memdc = CreateCompatibleDC(g.handle);
try {
_drawStretched(g, r, memdc);
}
finally {
DeleteDC(memdc);
}
}
// -tempMemGraphics- is used as a temporary Graphics instead of
// creating and destroying a temporary one for each call.
final void drawStretched(Graphics g, Rect r, Graphics tempMemGraphics) {
_drawStretched(g, r, tempMemGraphics.handle);
}
void dispose() {
assert(owned);
DeleteObject(hbm);
hbm = null;
}
~this() {
if (owned) {
dispose();
}
}
override int _imgtype(HGDIOBJ* ph) { // internal
if (ph) {
*ph = cast(HGDIOBJ) hbm;
}
return 1;
}
private:
HBITMAP hbm;
bool owned = true;
}
final class EnhancedMetaFile : Image {
private:
HENHMETAFILE hemf;
ENHMETAHEADER emfh;
HDC hdcref;
bool owned;
public:
// Used internally.
this(HENHMETAFILE hemf, HDC hdcref = null, bool owned = true) {
this.hemf = hemf;
GetEnhMetaFileHeader(hemf, ENHMETAHEADER.sizeof, &emfh);
assert(hdcref || owned);
if (!hdcref) {
this.hdcref = GetDC(null);
this.owned = true;
}
}
/// Load from a emf file.
this(string fileName, HDC hdcref = null) {
import std.utf;
auto tmp = GetEnhMetaFileW(fileName.toUTF16z());
if (!tmp) {
throw new DflException("Unable to load EnhanceMetaFile from file '" ~ fileName ~ "'");
}
this(tmp, hdcref);
}
void dispose() {
DeleteEnhMetaFile(hemf);
hemf = null;
if (owned) {
ReleaseDC(null, hdcref);
}
}
~this() {
dispose();
}
final HENHMETAFILE handle() @property {
return hemf;
}
Rect bounds() const nothrow @property {
with (emfh) {
auto rc = RECT(MulDiv(rclBounds.left * 1000,
szlDevice.cx * GetDeviceCaps(cast(HDC) hdcref, HORZSIZE),
szlMicrometers.cx * GetDeviceCaps(cast(HDC) hdcref, HORZRES)),
MulDiv(rclBounds.top * 1000,
szlDevice.cy * GetDeviceCaps(cast(HDC) hdcref, VERTSIZE),
szlMicrometers.cy * GetDeviceCaps(cast(HDC) hdcref, VERTRES)),
MulDiv(rclBounds.right * 1000,
szlDevice.cx * GetDeviceCaps(cast(HDC) hdcref, HORZSIZE),
szlMicrometers.cx * GetDeviceCaps(cast(HDC) hdcref, HORZRES)),
MulDiv(rclBounds.bottom * 1000,
szlDevice.cy * GetDeviceCaps(cast(HDC) hdcref, VERTSIZE),
szlMicrometers.cy * GetDeviceCaps(cast(HDC) hdcref, VERTRES)));
return Rect(&rc);
}
}
override int width() const nothrow @property {
with (emfh)
return MulDiv(rclFrame.right - rclFrame.left, szlDevice.cx * 10, szlMicrometers.cx);
}
override int height() const nothrow @property {
with (emfh)
return MulDiv(rclFrame.bottom - rclFrame.top, szlDevice.cy * 10, szlMicrometers.cy);
}
override Size size() const nothrow @property {
return Size(width, height);
}
Rect frameRectangle() const nothrow @property {
with (emfh) {
return Rect(MulDiv(rclFrame.left, szlDevice.cx * 10,
szlMicrometers.cx), MulDiv(rclFrame.top, szlDevice.cy * 10,
szlMicrometers.cy), width, height);
}
}
override void draw(Graphics g, Point pt) {
auto sz = size;
RECT rc;
Rect(pt.x, pt.y, sz.width, sz.height).getRect(&rc);
PlayEnhMetaFile(g.handle, hemf, &rc);
}
override void drawStretched(Graphics g, Rect r) {
RECT rc;
r.getRect(&rc);
PlayEnhMetaFile(g.handle, hemf, &rc);
}
}
class Picture : Image {
// Note: requires OleInitialize(null).
// Throws exception on failure.
this(DStream stm) {
this.ipic = _fromDStream(stm);
if (!this.ipic) {
throw new DflException("Unable to load picture from stream");
}
}
// Throws exception on failure.
this(Dstring fileName) {
this.ipic = _fromFileName(fileName);
if (!this.ipic) {
throw new DflException("Unable to load picture from file '" ~ fileName ~ "'");
}
}
this(void[] mem) {
this.ipic = _fromMemory(mem);
if (!this.ipic) {
throw new DflException("Unable to load picture from memory");
}
}
private this(IPicture ipic) {
this.ipic = ipic;
}
// Returns null on failure instead of throwing exception.
static Picture fromStream(DStream stm) {
auto ipic = _fromDStream(stm);
if (!ipic) {
return null;
}
return new Picture(ipic);
}
// Returns null on failure instead of throwing exception.
static Picture fromFile(Dstring fileName) {
auto ipic = _fromFileName(fileName);
if (!ipic) {
return null;
}
return new Picture(ipic);
}
static Picture fromMemory(void[] mem) {
auto ipic = _fromMemory(mem);
if (!ipic) {
return null;
}
return new Picture(ipic);
}
final void draw(HDC hdc, Point pt) { // package
int lhx, lhy;
int width, height;
lhx = loghimX;
lhy = loghimY;
width = MAP_LOGHIM_TO_PIX(lhx, GetDeviceCaps(hdc, LOGPIXELSX));
height = MAP_LOGHIM_TO_PIX(lhy, GetDeviceCaps(hdc, LOGPIXELSY));
ipic.Render(hdc, pt.x, pt.y + height, width, -height, 0, 0, lhx, lhy, null);
}
final override void draw(Graphics g, Point pt) {
return draw(g.handle, pt);
}
final void drawStretched(HDC hdc, Rect r) { // package
int lhx, lhy;
lhx = loghimX;
lhy = loghimY;
ipic.Render(hdc, r.x, r.y + r.height, r.width, -r.height, 0, 0, lhx, lhy, null);
}
final override void drawStretched(Graphics g, Rect r) {
return drawStretched(g.handle, r);
}
final @property OLE_XSIZE_HIMETRIC loghimX() {
OLE_XSIZE_HIMETRIC xsz;
if (S_OK != ipic.get_Width(&xsz)) {
return 0; // ?
}
return xsz;
}
final @property OLE_YSIZE_HIMETRIC loghimY() {
OLE_YSIZE_HIMETRIC ysz;
if (S_OK != ipic.get_Height(&ysz)) {
return 0; // ?
}
return ysz;
}
final override @property int width() {
Graphics g;
int result;
g = Graphics.getScreen();
result = getWidth(g);
g.dispose();
return result;
}
final override @property int height() {
Graphics g;
int result;
g = Graphics.getScreen();
result = getHeight(g);
g.dispose();
return result;
}
final override @property Size size() {
Graphics g;
Size result;
g = Graphics.getScreen();
result = getSize(g);
g.dispose();
return result;
}
final int getWidth(HDC hdc) { // package
return MAP_LOGHIM_TO_PIX(loghimX, GetDeviceCaps(hdc, LOGPIXELSX));
}
final int getWidth(Graphics g) {
return getWidth(g.handle);
}
final int getHeight(HDC hdc) { // package
return MAP_LOGHIM_TO_PIX(loghimY, GetDeviceCaps(hdc, LOGPIXELSX));
}
final int getHeight(Graphics g) {
return getHeight(g.handle);
}
final Size getSize(HDC hdc) { // package
return Size(getWidth(hdc), getHeight(hdc));
}
final Size getSize(Graphics g) {
return Size(getWidth(g), getHeight(g));
}
void dispose() {
if (HBITMAP.init != _hbmimgtype) {
DeleteObject(_hbmimgtype);
_hbmimgtype = HBITMAP.init;
}
if (ipic) {
ipic.Release();
ipic = null;
}
}
~this() {
dispose();
}
final HBITMAP toHBitmap(HDC hdc) { // package
HDC memdc;
HBITMAP result;
HGDIOBJ oldbm;
memdc = CreateCompatibleDC(hdc);
if (!memdc) {
throw new DflException("Device error");
}
try {
Size sz;
sz = getSize(hdc);
result = CreateCompatibleBitmap(hdc, sz.width, sz.height);
if (!result) {
bad_bm:
throw new DflException("Unable to allocate image");
}
oldbm = SelectObject(memdc, result);
draw(memdc, Point(0, 0));
}
finally {
if (oldbm) {
SelectObject(memdc, oldbm);
}
DeleteDC(memdc);
}
return result;
}
final Bitmap toBitmap(HDC hdc) { // package
HBITMAP hbm;
hbm = toHBitmap(hdc);
if (!hbm) {
throw new DflException("Unable to create bitmap");
}
return new Bitmap(hbm, true); // Owned.
}
final Bitmap toBitmap() {
Bitmap result;
scope Graphics g = Graphics.getScreen();
result = toBitmap(g);
//g.dispose(); // scope'd
return result;
}
final Bitmap toBitmap(Graphics g) {
return toBitmap(g.handle);
}
HBITMAP _hbmimgtype;
override int _imgtype(HGDIOBJ* ph) { // internal
if (ph) {
if (HBITMAP.init == _hbmimgtype) {
scope Graphics g = Graphics.getScreen();
_hbmimgtype = toHBitmap(g.handle);
//g.dispose(); // scope'd
}
*ph = _hbmimgtype;
}
return 1;
}
private IPicture ipic = null;
static IPicture _fromIStream(IStream istm) {
IPicture ipic;
// IID_IPicture from uiid.d.
// if I use directy:
// REFIID refiid = &IID_IPicture;
// compiler complains
// is not a lvalue
const(GUID) X = {
0x7BF80980, 0xBF32, 0x101A, [0x8B, 0xBB, 0x00, 0xAA, 0x00, 0x30, 0x0C, 0xAB]};
REFIID refiid = &X;
switch (OleLoadPicture(istm, 0, FALSE, refiid, cast(void**)&ipic)) {
case S_OK:
return ipic;
debug (DFL_X) {
case E_OUTOFMEMORY:
debug assert(0, "Picture: Out of memory");
break;
case E_NOINTERFACE:
debug assert(0, "Picture: The object does not support the interface");
break;
case E_UNEXPECTED:
debug assert(0, "Picture: Unexpected error");
break;
case E_POINTER:
debug assert(0, "Picture: Invalid pointer");
break;
case E_FAIL:
debug assert(0, "Picture: Fail");
break;
}
default:
}
return null;
}
static IPicture _fromDStream(DStream stm) {
assert(stm !is null);
scope DStreamToIStream istm = new DStreamToIStream(stm);
return _fromIStream(istm);
}
static IPicture _fromFileName(Dstring fileName) {
// FIX: alias dfl.internal.winapi.HANDLE HANDLE; // Otherwise, odd conflict with wine.
HANDLE hf;
HANDLE hg;
void* pg;
DWORD dwsz, dw;
hf = dfl.internal.utf.createFile(fileName, GENERIC_READ,
FILE_SHARE_READ, null, OPEN_EXISTING, FILE_FLAG_SEQUENTIAL_SCAN, null);
if (!hf) {
return null;
}
dwsz = GetFileSize(hf, null);
if (0xFFFFFFFF == dwsz) {
failclose:
CloseHandle(hf);
return null;
}
hg = GlobalAlloc(GMEM_MOVEABLE, dwsz);
if (!hg) {
goto failclose;
}
pg = GlobalLock(hg);
if (!pg) {
CloseHandle(hf);
CloseHandle(hg);
return null;
}
if (!ReadFile(hf, pg, dwsz, &dw, null) || dwsz != dw) {
CloseHandle(hf);
GlobalUnlock(hg);
CloseHandle(hg);
return null;
}
CloseHandle(hf);
GlobalUnlock(hg);
IStream istm;
IPicture ipic;
if (S_OK != CreateStreamOnHGlobal(hg, TRUE, &istm)) {
CloseHandle(hg);
return null;
}
// Don't need to CloseHandle(hg) due to 2nd param being TRUE.
ipic = _fromIStream(istm);
istm.Release();
return ipic;
}
static IPicture _fromMemory(void[] mem) {
return _fromIStream(new MemoryIStream(mem));
}
}
enum TextTrimming : UINT {
NONE = 0,
ELLIPSIS = DT_END_ELLIPSIS,
ELLIPSIS_PATH = DT_PATH_ELLIPSIS,
}
enum TextFormatFlags : UINT {
NO_PREFIX = DT_NOPREFIX,
DIRECTION_RIGHT_TO_LEFT = DT_RTLREADING,
WORD_BREAK = DT_WORDBREAK,
SINGLE_LINE = DT_SINGLELINE,
NO_CLIP = DT_NOCLIP,
LINE_LIMIT = DT_EDITCONTROL,
}
enum TextAlignment : UINT {
LEFT = DT_LEFT, ///
RIGHT = DT_RIGHT,
CENTER = DT_CENTER,
TOP = DT_TOP, /// Single line only alignment.
BOTTOM = DT_BOTTOM,
MIDDLE = DT_VCENTER,
}
class TextFormat {
this() {
}
this(TextFormat tf) {
_trim = tf._trim;
_flags = tf._flags;
_align = tf._align;
_params = tf._params;
}
this(TextFormatFlags flags) {
_flags = flags;
}
static @property TextFormat genericDefault() {
TextFormat result;
result = new TextFormat;
result._trim = TextTrimming.NONE;
result._flags = TextFormatFlags.NO_PREFIX | TextFormatFlags.WORD_BREAK
| TextFormatFlags.NO_CLIP | TextFormatFlags.LINE_LIMIT;
return result;
}
static @property TextFormat genericTypographic() {
return new TextFormat;
}
final @property void alignment(TextAlignment ta) {
_align = ta;
}
final @property TextAlignment alignment() {
return _align;
}
final @property void formatFlags(TextFormatFlags tff) {
_flags = tff;
}
final @property TextFormatFlags formatFlags() {
return _flags;
}
final @property void trimming(TextTrimming tt) {
_trim = tt;
}
final @property TextTrimming trimming() {
return _trim;
}
// Units of the average character width.
final @property void tabLength(int tablen) {
_params.iTabLength = tablen;
}
final @property int tabLength() {
return _params.iTabLength;
}
// Units of the average character width.
final @property void leftMargin(int sz) {
_params.iLeftMargin = sz;
}
final @property int leftMargin() {
return _params.iLeftMargin;
}
// Units of the average character width.
final @property void rightMargin(int sz) {
_params.iRightMargin = sz;
}
final @property int rightMargin() {
return _params.iRightMargin;
}
private:
TextTrimming _trim = TextTrimming.NONE; // TextTrimming.CHARACTER.
TextFormatFlags _flags = TextFormatFlags.NO_PREFIX | TextFormatFlags.WORD_BREAK;
TextAlignment _align = TextAlignment.LEFT;
package DRAWTEXTPARAMS _params = {DRAWTEXTPARAMS.sizeof, 8, 0, 0};
}
class Screen {
static @property Screen primaryScreen() {
version (DFL_MULTIPLE_SCREENS) {
_getScreens();
if (_screens.length > 0) {
if (_screens.length == 1) {
return _screens[0];
}
MONITORINFO mi;
for (int i = 0; i < _screens.length; i++) {
_screens[i]._getInfo(mi);
if (mi.dwFlags & MONITORINFOF_PRIMARY) {
return _screens[i];
}
}
}
}
if (!_ps) {
_setPs();
}
return _ps;
}
@property Rect bounds() {
version (DFL_MULTIPLE_SCREENS) {
if (HMONITOR.init != hmonitor) {
MONITORINFO mi;
_getInfo(mi);
return Rect(&mi.rcMonitor);
}
}
RECT area;
if (!GetWindowRect(GetDesktopWindow(), &area)) {
assert(0);
}
return Rect(&area);
}
@property Rect workingArea() {
version (DFL_MULTIPLE_SCREENS) {
if (HMONITOR.init != hmonitor) {
MONITORINFO mi;
_getInfo(mi);
return Rect(&mi.rcWork);
}
}
RECT area;
if (!SystemParametersInfoA(SPI_GETWORKAREA, 0, &area, FALSE)) {
return bounds;
}
return Rect(&area);
}
version (DFL_MULTIPLE_SCREENS) {
debug {
static @property void fakeMultipleScreens(bool byes) {
if (byes) {
allScreens(); // Force populating.
if (_screens.length < 2) {
_screens ~= new Screen(HMFAKE);
}
}
}
static @property bool fakeMultipleScreens() {
return _screens.length > 1 && HMFAKE == _screens[1].hmonitor;
}
private enum HMONITOR HMFAKE = cast(HMONITOR) 1969253357;
}
static @property Screen[] allScreens() {
version (DFL_MULTIPLE_SCREENS) {
_getScreens();
if (_screens.length > 0) {
return _screens;
}
}
if (_screens.length < 1) {
synchronized {
_screens = new Screen[1];
if (!_ps) {
_setPs();
}
_screens[0] = _ps;
}
}
return _screens;
}
static Screen fromHandle(HWND hwnd) {
version (DFL_MULTIPLE_SCREENS) {
version (SUPPORTS_MULTIPLE_SCREENS) {
alias fromWindow = MonitorFromWindow;
} else {
auto fromWindow = cast(typeof(&MonitorFromWindow)) GetProcAddress(
GetModuleHandleA("user32.dll"), "MonitorFromWindow");
if (!fromWindow) {
//throw new DflException("Multiple screens not supported");
goto _def;
}
}
HMONITOR hm = fromWindow(hwnd, MONITOR_DEFAULTTOPRIMARY);
debug {
if (fakeMultipleScreens && hm == _screens[0].hmonitor) {
RECT rect;
if (GetWindowRect(hwnd, &rect)) {
Rect r = Rect(&rect);
if (_withinFakeScreen(r)) {
return _screens[1];
}
}
}
}
return _findScreen(hm);
}
_def:
return primaryScreen;
}
static Screen fromControl(IWindow ctrl) {
return fromHandle(ctrl.handle);
}
static Screen fromPoint(Point pt) {
version (DFL_MULTIPLE_SCREENS) {
version (SUPPORTS_MULTIPLE_SCREENS) {
alias fromPoint = MonitorFromPoint;
} else {
auto fromPoint = cast(typeof(&MonitorFromPoint)) GetProcAddress(
GetModuleHandleA("user32.dll"), "MonitorFromPoint");
if (!fromPoint) {
//throw new DflException("Multiple screens not supported");
goto _def;
}
}
HMONITOR hm = fromPoint(pt.point, MONITOR_DEFAULTTOPRIMARY);
debug {
if (fakeMultipleScreens && hm == _screens[0].hmonitor) {
Rect r = Rect(pt, Size(0, 0));
if (_withinFakeScreen(r)) {
return _screens[1];
}
}
}
return _findScreen(hm);
}
_def:
return primaryScreen;
}
static Screen fromRectangle(Rect r) {
version (DFL_MULTIPLE_SCREENS) {
version (SUPPORTS_MULTIPLE_SCREENS) {
alias fromRect = MonitorFromRect;
} else {
auto fromRect = cast(typeof(&MonitorFromRect)) GetProcAddress(
GetModuleHandleA("user32.dll"), "MonitorFromRect");
if (!fromRect) {
//throw new DflException("Multiple screens not supported");
goto _def;
}
}
RECT rect;
r.getRect(&rect);
HMONITOR hm = fromRect(&rect, MONITOR_DEFAULTTOPRIMARY);
debug {
if (fakeMultipleScreens && hm == _screens[0].hmonitor) {
if (_withinFakeScreen(r)) {
return _screens[1];
}
}
}
return _findScreen(hm);
}
_def:
return primaryScreen;
}
}
private:
static void _setPs() {
synchronized {
if (!_ps) {
_ps = new Screen();
}
}
}
this() {
}
this(HMONITOR hmonitor) {
this.hmonitor = hmonitor;
}
HMONITOR hmonitor;
static Screen _ps; // Primary screen; might not be used.
static Screen[] _screens;
version (DFL_MULTIPLE_SCREENS) {
bool foundThis = true; // Used during _getScreens callback.
static Screen _findScreen(HMONITOR hm) {
foreach (Screen s; allScreens) {
if (s.hmonitor == hm) {
return s;
}
}
return primaryScreen;
}
static void _getScreens() {
// Note: monitors can change, so always enum,
// but update the array by removing old ones and adding new ones.
for (int i = 0; i < _screens.length; i++) {
_screens[i].foundThis = false;
debug {
if (HMFAKE == _screens[i].hmonitor) {
_screens[i].foundThis = true;
}
}
}
version (SUPPORTS_MULTIPLE_SCREENS) {
pragma(msg, "DFL: multiple screens supported at compile time");
alias enumScreens = EnumDisplayMonitors;
} else {
auto enumScreens = cast(typeof(&EnumDisplayMonitors)) GetProcAddress(
GetModuleHandleA("user32.dll"), "EnumDisplayMonitors");
if (!enumScreens) {
//throw new DflException("Multiple screens not supported");
return;
}
}
if (!enumScreens(null, null, &_gettingScreens, 0)) {
//throw new DflException("Failed to enumerate screens");
return;
}
{
int numremoved = 0;
for (int i = 0; i < _screens.length; i++) {
if (!_screens[i].foundThis) {
numremoved++;
}
}
if (numremoved > 0) {
Screen[] newscreens = new Screen[_screens.length - numremoved];
for (int i = 0, nsi = 0; i < _screens.length; i++) {
if (_screens[i].foundThis) {
newscreens[nsi++] = _screens[i];
}
}
_screens = newscreens;
}
}
}
debug {
static bool _withinFakeScreen(Rect r) {
Rect fr = _screens[1].bounds;
//return r.right >= fr.x;
if (r.x >= fr.x) {
return true;
}
if (r.right < fr.x) {
return false;
}
{
// See which side it's in most.
RECT rect;
r.getRect(&rect);
RECT w0 = rect;
assert(w0.right >= fr.width);
w0.right = fr.width;
RECT w1 = rect;
assert(w1.left <= fr.width);
w1.left = fr.width;
return Rect(&w1).width > Rect(&w0).width;
}
}
}
void _getInfo(ref MONITORINFO info) {
version (SUPPORTS_MULTIPLE_SCREENS) {
alias getMI = GetMonitorInfoA;
} else {
auto getMI = cast(typeof(&GetMonitorInfoA)) GetProcAddress(
GetModuleHandleA("user32.dll"), "GetMonitorInfoA");
if (!getMI) {
throw new DflException(
"Error getting screen information (unable to find GetMonitorInfoA)");
}
}
info.cbSize = MONITORINFO.sizeof;
HMONITOR hm = hmonitor;
int fake = -1;
debug {
if (fakeMultipleScreens) {
if (HMFAKE == hm) {
fake = 1;
hm = _screens[0].hmonitor;
} else if (hm == _screens[0].hmonitor) {
fake = 0;
}
}
}
if (!getMI(hm, &info)) {
throw new DflException("Unable to get screen information");
}
debug {
if (1 == fake) {
info.dwFlags &= ~MONITORINFOF_PRIMARY;
{
Rect r = Rect(&info.rcMonitor);
int w = r.width >> 1;
r.x = r.x + w;
r.width = r.width - w;
r.getRect(&info.rcMonitor);
}
{
Rect r = Rect(&info.rcWork);
int w = r.width >> 1;
r.x = r.x + w;
r.width = r.width - w;
r.getRect(&info.rcWork);
}
} else if (0 == fake) {
{
Rect r = Rect(&info.rcMonitor);
int w = r.width >> 1;
r.width = r.width - w;
r.getRect(&info.rcMonitor);
}
{
Rect r = Rect(&info.rcWork);
int w = r.width >> 1;
r.width = r.width - w;
r.getRect(&info.rcWork);
}
}
}
}
}
}
version (DFL_MULTIPLE_SCREENS) {
private extern (Windows) BOOL _gettingScreens(HMONITOR hmonitor,
HDC hdcMonitor, LPRECT lprcMonitor, LPARAM dwData) nothrow {
for (int i = 0; i < Screen._screens.length; i++) {
if (hmonitor == Screen._screens[i].hmonitor) {
Screen._screens[i].foundThis = true;
return TRUE; // Continue.
}
}
// Didn't find it from old list, so add it.
Screen._screens ~= new Screen(hmonitor);
return TRUE; // Continue.
}
}
class Graphics {
// Used internally.
this(HDC hdc, bool owned = true) {
this.hdc = hdc;
this.owned = owned;
}
~this() {
if (owned) {
dispose();
}
}
// Used internally.
final void drawSizeGrip(int right, int bottom) { // package
Color light, dark;
int x, y;
light = SystemColors.controlLightLight;
dark = SystemColors.controlDark;
scope Pen lightPen = new Pen(light);
scope Pen darkPen = new Pen(dark);
x = right;
y = bottom;
x -= 3;
y -= 3;
drawLine(darkPen, x, bottom, right, y);
x--;
y--;
drawLine(darkPen, x, bottom, right, y);
drawLine(lightPen, x - 1, bottom, right, y - 1);
x -= 3;
y -= 3;
drawLine(darkPen, x, bottom, right, y);
x--;
y--;
drawLine(darkPen, x, bottom, right, y);
drawLine(lightPen, x - 1, bottom, right, y - 1);
x -= 3;
y -= 3;
drawLine(darkPen, x, bottom, right, y);
x--;
y--;
drawLine(darkPen, x, bottom, right, y);
drawLine(lightPen, x - 1, bottom, right, y - 1);
}
// Used internally.
// vSplit=true means the move grip moves left to right; false means top to bottom.
final void drawMoveGrip(Rect movableArea, bool vSplit = true, size_t count = 5) { // package
enum MSPACE = 4;
enum MWIDTH = 3;
enum MHEIGHT = 3;
if (!count || !movableArea.width || !movableArea.height) {
return;
}
Color norm, light, dark, ddark;
int x, y;
size_t iw;
norm = SystemColors.control;
light = SystemColors.controlLightLight.blendColor(norm); // center
//dark = SystemColors.controlDark.blendColor(norm); // top
ubyte ubmin(int ub) {
if (ub <= 0) {
return 0;
}
return cast(ubyte) ub;
}
dark = Color(ubmin(cast(int) norm.r - 0x10),
ubmin(cast(int) norm.g - 0x10), ubmin(cast(int) norm.b - 0x10));
//ddark = SystemColors.controlDarkDark; // bottom
ddark = SystemColors.controlDark.blendColor(Color(0x10, 0x10, 0x10)); // bottom
//scope Pen lightPen = new Pen(light);
scope Pen darkPen = new Pen(dark);
scope Pen ddarkPen = new Pen(ddark);
void drawSingleMoveGrip() {
Point[3] pts;
pts[0].x = x + MWIDTH - 2;
pts[0].y = y;
pts[1].x = x;
pts[1].y = y;
pts[2].x = x;
pts[2].y = y + MHEIGHT - 1;
drawLines(darkPen, pts);
pts[0].x = x + MWIDTH - 1;
pts[0].y = y + 1;
pts[1].x = pts[0].x;
pts[1].y = y + MHEIGHT - 1;
pts[2].x = x;
pts[2].y = pts[1].y;
drawLines(ddarkPen, pts);
fillRectangle(light, x + 1, y + 1, 1, 1);
}
if (vSplit) {
x = movableArea.x + (movableArea.width / 2 - MWIDTH / 2);
//y = movableArea.height / 2 - ((MWIDTH * count) + (MSPACE * (count - 1))) / 2;
y = movableArea.y + (movableArea.height / 2 - ((MWIDTH * count) + (MSPACE * count)) / 2);
for (iw = 0; iw != count; iw++) {
drawSingleMoveGrip();
y += MHEIGHT + MSPACE;
}
} else { // hSplit
//x = movableArea.width / 2 - ((MHEIGHT * count) + (MSPACE * (count - 1))) / 2;
x = movableArea.x + (movableArea.width / 2 - ((MHEIGHT * count) + (MSPACE * count)) / 2);
y = movableArea.y + (movableArea.height / 2 - MHEIGHT / 2);
for (iw = 0; iw != count; iw++) {
drawSingleMoveGrip();
x += MWIDTH + MSPACE;
}
}
}
package final TextFormat getCachedTextFormat() {
static TextFormat fmt = null;
if (!fmt) {
fmt = TextFormat.genericDefault;
}
return fmt;
}
// Windows 95/98/Me limits -text- to 8192 characters.
final void drawText(Dstring text, Font font, Color color, Rect r, TextFormat fmt) {
// Should SaveDC/RestoreDC be used instead?
COLORREF prevColor;
HFONT prevFont;
int prevBkMode;
prevColor = SetTextColor(hdc, color.toRgb());
prevFont = cast(HFONT) SelectObject(hdc, font ? font.handle : null);
prevBkMode = SetBkMode(hdc, TRANSPARENT);
RECT rect;
r.getRect(&rect);
dfl.internal.utf.drawTextEx(hdc, text, &rect,
DT_EXPANDTABS | DT_TABSTOP | fmt._trim | fmt._flags | fmt._align, &fmt._params);
// Reset stuff.
//if(CLR_INVALID != prevColor)
SetTextColor(hdc, prevColor);
//if(prevFont)
SelectObject(hdc, prevFont);
//if(prevBkMode)
SetBkMode(hdc, prevBkMode);
}
final void drawText(Dstring text, Font font, Color color, Rect r) {
return drawText(text, font, color, r, getCachedTextFormat());
}
final void drawTextDisabled(Dstring text, Font font, Color color,
Color backColor, Rect r, TextFormat fmt) {
r.offset(1, 1);
//drawText(text, font, Color(24, color).solidColor(backColor), r, fmt); // Lighter, lower one.
//drawText(text, font, Color.fromRgb(~color.toRgb() & 0xFFFFFF), r, fmt); // Lighter, lower one.
drawText(text, font, Color(192,
Color.fromRgb(~color.toRgb() & 0xFFFFFF)).solidColor(backColor), r, fmt); // Lighter, lower one.
r.offset(-1, -1);
drawText(text, font, Color(128, color).solidColor(backColor), r, fmt);
}
final void drawTextDisabled(Dstring text, Font font, Color color, Color backColor,
Rect r) {
return drawTextDisabled(text, font, color, backColor, r, getCachedTextFormat());
}
/+
final Size measureText(Dstring text, Font font) {
SIZE sz;
HFONT prevFont;
prevFont = cast(HFONT)SelectObject(hdc, font ? font.handle : null);
dfl.internal.utf.getTextExtentPoint32(hdc, text, &sz);
//if(prevFont)
SelectObject(hdc, prevFont);
return Size(sz.cx, sz.cy);
}
+/
private enum int DEFAULT_MEASURE_SIZE = short.max; // Has to be smaller because it's 16-bits on win9x.
final Size measureText(Dstring text, Font font, int maxWidth, TextFormat fmt) {
RECT rect;
HFONT prevFont;
rect.left = 0;
rect.top = 0;
rect.right = maxWidth;
rect.bottom = DEFAULT_MEASURE_SIZE;
prevFont = cast(HFONT) SelectObject(hdc, font ? font.handle : null);
if (!dfl.internal.utf.drawTextEx(hdc, text, &rect,
DT_EXPANDTABS | DT_TABSTOP | fmt._trim | fmt._flags | fmt._align | DT_CALCRECT | DT_NOCLIP,
&fmt._params)) {
//throw new DflException("Text measure error");
rect.left = 0;
rect.top = 0;
rect.right = 0;
rect.bottom = 0;
}
//if(prevFont)
SelectObject(hdc, prevFont);
return Size(rect.right - rect.left, rect.bottom - rect.top);
}
final Size measureText(Dstring text, Font font, TextFormat fmt) {
return measureText(text, font, DEFAULT_MEASURE_SIZE, fmt);
}
final Size measureText(Dstring text, Font font, int maxWidth) {
return measureText(text, font, maxWidth, getCachedTextFormat());
}
final Size measureText(Dstring text, Font font) {
return measureText(text, font, DEFAULT_MEASURE_SIZE, getCachedTextFormat());
}
/+
// Doesn't work... dfl.internal.utf.drawTextEx uses a different buffer!
// ///
final Dstring getTrimmedText(Dstring text, Font font, Rect r, TextFormat fmt) { // deprecated
switch(fmt.trimming) {
case TextTrimming.ELLIPSIS:
case TextTrimming.ELLIPSIS_PATH: {
char[] newtext;
RECT rect;
HFONT prevFont;
newtext = text.dup;
r.getRect(&rect);
prevFont = cast(HFONT)SelectObject(hdc, font ? font.handle : null);
// DT_CALCRECT needs to prevent it from actually drawing.
if(!dfl.internal.utf.drawTextEx(hdc, newtext, &rect, DT_EXPANDTABS | DT_TABSTOP |
fmt._trim | fmt._flags | fmt._align | DT_CALCRECT | DT_MODIFYSTRING | DT_NOCLIP, &fmt._params)) {
//throw new DflException("Text trimming error");
}
//if(prevFont)
SelectObject(hdc, prevFont);
for(size_t iw = 0; iw != newtext.length; iw++) {
if(!newtext[iw]) {
return newtext[0 .. iw];
}
}
//return newtext;
// There was no change, so no sense in keeping the duplicate.
delete newtext;
return text;
}
break;
default:
return text;
}
}
// ///
final Dstring getTrimmedText(Dstring text, Font font, Rect r, TextTrimming trim) {
scope fmt = new TextFormat(TextFormatFlags.NO_PREFIX | TextFormatFlags.WORD_BREAK |
TextFormatFlags.NO_CLIP | TextFormatFlags.LINE_LIMIT);
fmt.trimming = trim;
return getTrimmedText(text, font, r, fmt);
}
+/
final void drawIcon(Icon icon, Rect r) {
// DrawIconEx operates differently if the width or height is zero
// so bail out if zero and pretend the zero size icon was drawn.
int width = r.width;
if (!width) {
return;
}
int height = r.height;
if (!height) {
return;
}
DrawIconEx(handle, r.x, r.y, icon.handle, width, height, 0, null, DI_NORMAL);
}
final void drawIcon(Icon icon, int x, int y) {
DrawIconEx(handle, x, y, icon.handle, 0, 0, 0, null, DI_NORMAL);
}
final void fillRectangle(Brush brush, Rect r) {
fillRectangle(brush, r.x, r.y, r.width, r.height);
}
final void fillRectangle(Brush brush, int x, int y, int width, int height) {
RECT rect;
rect.left = x;
rect.right = x + width;
rect.top = y;
rect.bottom = y + height;
FillRect(handle, &rect, brush.handle);
}
// Extra function.
final void fillRectangle(Color color, Rect r) {
fillRectangle(color, r.x, r.y, r.width, r.height);
}
// Extra function.
final void fillRectangle(Color color, int x, int y, int width, int height) {
RECT rect;
int prevBkColor;
prevBkColor = SetBkColor(hdc, color.toRgb());
rect.left = x;
rect.top = y;
rect.right = x + width;
rect.bottom = y + height;
ExtTextOutA(hdc, x, y, ETO_OPAQUE, &rect, "", 0, null);
// Reset stuff.
//if(CLR_INVALID != prevBkColor)
SetBkColor(hdc, prevBkColor);
}
final void fillRegion(Brush brush, Region region) {
FillRgn(handle, region.handle, brush.handle);
}
static Graphics fromHwnd(HWND hwnd) {
return new CommonGraphics(hwnd, GetDC(hwnd));
}
/// Get the entire screen's Graphics for the primary monitor.
static Graphics getScreen() {
return new CommonGraphics(null, GetWindowDC(null));
}
final void drawLine(Pen pen, Point start, Point end) {
drawLine(pen, start.x, start.y, end.x, end.y);
}
final void drawLine(Pen pen, int startX, int startY, int endX, int endY) {
HPEN prevPen;
prevPen = SelectObject(hdc, pen.handle);
MoveToEx(hdc, startX, startY, null);
LineTo(hdc, endX, endY);
// Reset stuff.
SelectObject(hdc, prevPen);
}
// First two points is the first line, the other points link a line
// to the previous point.
final void drawLines(Pen pen, Point[] points) {
assert(points.length >= 2, "Not enough line points.");
HPEN prevPen;
int i;
prevPen = SelectObject(hdc, pen.handle);
MoveToEx(hdc, points[0].x, points[0].y, null);
for (i = 1;;) {
LineTo(hdc, points[i].x, points[i].y);
if (++i == points.length) {
break;
}
}
// Reset stuff.
SelectObject(hdc, prevPen);
}
final void drawArc(Pen pen, int x, int y, int width, int height, int arcX1,
int arcY1, int arcX2, int arcY2) {
HPEN prevPen;
prevPen = SelectObject(hdc, pen.handle);
Arc(hdc, x, y, x + width, y + height, arcX1, arcY1, arcX2, arcY2);
// Reset stuff.
SelectObject(hdc, prevPen);
}
final void drawArc(Pen pen, Rect r, Point arc1, Point arc2) {
drawArc(pen, r.x, r.y, r.width, r.height, arc1.x, arc1.y, arc2.x, arc2.y);
}
final void drawBezier(Pen pen, Point[4] points) {
HPEN prevPen;
POINT* cpts;
prevPen = SelectObject(hdc, pen.handle);
// This assumes a Point is laid out exactly like a POINT.
static assert(Point.sizeof == POINT.sizeof);
cpts = cast(POINT*) cast(Point*) points;
PolyBezier(hdc, cpts, 4);
// Reset stuff.
SelectObject(hdc, prevPen);
}
final void drawBezier(Pen pen, Point pt1, Point pt2, Point pt3, Point pt4) {
Point[4] points;
points[0] = pt1;
points[1] = pt2;
points[2] = pt3;
points[3] = pt4;
drawBezier(pen, points);
}
// First 4 points are the first bezier, each next 3 are the next
// beziers, using the previous last point as the starting point.
final void drawBeziers(Pen pen, Point[] points) {
if (points.length < 1 || (points.length - 1) % 3) {
assert(0); // Bad number of points.
//return; // Let PolyBezier() do what it wants with the bad number.
}
HPEN prevPen;
POINT* cpts;
prevPen = SelectObject(hdc, pen.handle);
// This assumes a Point is laid out exactly like a POINT.
static assert(Point.sizeof == POINT.sizeof);
cpts = cast(POINT*) cast(Point*) points;
PolyBezier(hdc, cpts, points.length);
// Reset stuff.
SelectObject(hdc, prevPen);
}
// TODO: drawCurve(), drawClosedCurve() ...
final void drawEllipse(Pen pen, Rect r) {
drawEllipse(pen, r.x, r.y, r.width, r.height);
}
final void drawEllipse(Pen pen, int x, int y, int width, int height) {
HPEN prevPen;
HBRUSH prevBrush;
prevPen = SelectObject(hdc, pen.handle);
prevBrush = SelectObject(hdc, cast(HBRUSH) GetStockObject(NULL_BRUSH)); // Don't fill it in.
Ellipse(hdc, x, y, x + width, y + height);
// Reset stuff.
SelectObject(hdc, prevPen);
SelectObject(hdc, prevBrush);
}
// TODO: drawPie()
final void drawPolygon(Pen pen, Point[] points) {
if (points.length < 2) {
assert(0); // Need at least 2 points.
//return;
}
HPEN prevPen;
HBRUSH prevBrush;
POINT* cpts;
prevPen = SelectObject(hdc, pen.handle);
prevBrush = SelectObject(hdc, cast(HBRUSH) GetStockObject(NULL_BRUSH)); // Don't fill it in.
// This assumes a Point is laid out exactly like a POINT.
static assert(Point.sizeof == POINT.sizeof);
cpts = cast(POINT*) cast(Point*) points;
Polygon(hdc, cpts, points.length);
// Reset stuff.
SelectObject(hdc, prevPen);
SelectObject(hdc, prevBrush);
}
final void drawRectangle(Pen pen, Rect r) {
drawRectangle(pen, r.x, r.y, r.width, r.height);
}
final void drawRectangle(Pen pen, int x, int y, int width, int height) {
HPEN prevPen;
HBRUSH prevBrush;
prevPen = SelectObject(hdc, pen.handle);
prevBrush = SelectObject(hdc, cast(HBRUSH) GetStockObject(NULL_BRUSH)); // Don't fill it in.
Rectangle(hdc, x, y, x + width, y + height);
// Reset stuff.
SelectObject(hdc, prevPen);
SelectObject(hdc, prevBrush);
}
/+
final void drawRectangle(Color c, Rect r) {
drawRectangle(c, r.x, r.y, r.width, r.height);
}
final void drawRectangle(Color c, int x, int y, int width, int height) {
}
+/
final void drawRectangles(Pen pen, Rect[] rs) {
HPEN prevPen;
HBRUSH prevBrush;
prevPen = SelectObject(hdc, pen.handle);
prevBrush = SelectObject(hdc, cast(HBRUSH) GetStockObject(NULL_BRUSH)); // Don't fill it in.
foreach (ref Rect r; rs) {
Rectangle(hdc, r.x, r.y, r.x + r.width, r.y + r.height);
}
// Reset stuff.
SelectObject(hdc, prevPen);
SelectObject(hdc, prevBrush);
}
// Force pending graphics operations.
final void flush() {
GdiFlush();
}
final Color getNearestColor(Color c) {
COLORREF cref;
cref = GetNearestColor(handle, c.toRgb());
if (CLR_INVALID == cref) {
return Color.empty;
}
return Color.fromRgb(c.a, cref); // Preserve alpha.
}
final Size getScaleSize(Font f) {
// http://support.microsoft.com/kb/125681
Size result;
version (DIALOG_BOX_SCALE) {
enum SAMPLE = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
result = measureText(SAMPLE, f);
result.width = (result.width / (SAMPLE.length / 2) + 1) / 2;
TEXTMETRICA tma;
if (GetTextMetricsA(handle, &tma)) {
result.height = tma.tmHeight;
}
} else {
enum SAMPLE = "Abcdefghijklmnopqrstuvwxyz";
result = measureText(SAMPLE, f);
result.width /= SAMPLE.length;
}
return result;
}
final bool copyTo(HDC dest, int destX, int destY, int width, int height,
int srcX = 0, int srcY = 0, DWORD rop = SRCCOPY) { // package
return cast(bool) BitBlt(dest, destX, destY,
width, height, this.handle, srcX, srcY, rop);
}
final bool copyTo(Graphics destGraphics, int destX, int destY, int width,
int height, int srcX = 0, int srcY = 0, DWORD rop = SRCCOPY) {
return copyTo(destGraphics.handle, destX, destY, width, height, srcX, srcY,
rop);
}
final bool copyTo(Graphics destGraphics, Rect bounds) {
return copyTo(destGraphics.handle, bounds.x, bounds.y, bounds.width, bounds.height);
}
final @property HDC handle() {
return hdc;
}
void dispose() {
assert(owned);
DeleteDC(hdc);
hdc = null;
}
private:
HDC hdc;
bool owned = true;
}
/// Graphics for a surface in memory.
class MemoryGraphics : Graphics {
// Graphics compatible with the current screen.
this(int width, int height) {
HDC hdc;
hdc = GetWindowDC(null);
scope (exit)
ReleaseDC(null, hdc);
this(width, height, hdc);
}
// graphicsCompatible cannot be another MemoryGraphics.
this(int width, int height, Graphics graphicsCompatible) {
if (cast(MemoryGraphics) graphicsCompatible) {
//throw new DflException("Graphics cannot be compatible with memory");
assert(0, "Graphics cannot be compatible with memory");
}
this(width, height, graphicsCompatible.handle);
}
// Used internally.
this(int width, int height, HDC hdcCompatible) { // package
_w = width;
_h = height;
hbm = CreateCompatibleBitmap(hdcCompatible, width, height);
if (!hbm) {
throw new DflException("Unable to allocate Graphics memory");
}
scope (failure) {
DeleteObject(hbm);
//hbm = HBITMAP.init;
}
HDC hdcc;
hdcc = CreateCompatibleDC(hdcCompatible);
if (!hdcc) {
throw new DflException("Unable to allocate Graphics");
}
scope (failure)
DeleteDC(hdcc);
hbmOld = SelectObject(hdcc, hbm);
scope (failure)
SelectObject(hdcc, hbmOld);
super(hdcc);
}
final @property int width() {
return _w;
}
final @property int height() {
return _h;
}
final Size size() {
return Size(_w, _h);
}
final @property HBITMAP hbitmap() { // getter // package
return hbm;
}
// Needs to copy so it can be selected into other DC`s.
final HBITMAP toHBitmap(HDC hdc) { // package
HDC memdc;
HBITMAP result;
HGDIOBJ oldbm;
memdc = CreateCompatibleDC(hdc);
if (!memdc) {
throw new DflException("Device error");
}
try {
result = CreateCompatibleBitmap(hdc, width, height);
if (!result) {
bad_bm:
throw new DflException("Unable to allocate image");
}
oldbm = SelectObject(memdc, result);
copyTo(memdc, 0, 0, width, height);
}
finally {
if (oldbm) {
SelectObject(memdc, oldbm);
}
DeleteDC(memdc);
}
return result;
}
final Bitmap toBitmap(HDC hdc) { // package
HBITMAP hbm;
hbm = toHBitmap(hdc);
if (!hbm) {
throw new DflException("Unable to create bitmap");
}
return new Bitmap(hbm, true); // Owned.
}
final Bitmap toBitmap() {
Graphics g;
Bitmap result;
g = Graphics.getScreen();
result = toBitmap(g);
g.dispose();
return result;
}
final Bitmap toBitmap(Graphics g) {
return toBitmap(g.handle);
}
override void dispose() {
SelectObject(hdc, hbmOld);
hbmOld = HGDIOBJ.init;
DeleteObject(hbm);
hbm = HBITMAP.init;
super.dispose();
}
private:
HGDIOBJ hbmOld;
HBITMAP hbm;
int _w, _h;
}
final class EmfGraphics : Graphics {
private:
HDC _hdc;
Rect _area;
public:
this(Graphics refGraphics = null, Rect area = Rect.init,
string filename = null, string description = null) {
_area = area;
RECT rc;
RECT* pRc;
HDC hdcref;
if (refGraphics) {
hdcref = refGraphics.handle;
} else {
hdcref = GetDC(null);
}
scope (exit) {
if (!refGraphics) {
ReleaseDC(null, hdcref);
}
}
if (area != Rect.init) {
auto tmphdc = CreateEnhMetaFileW(hdcref, null, null, null);
auto tmpemf = CloseEnhMetaFile(tmphdc);
ENHMETAHEADER tmphdr;
GetEnhMetaFileHeader(tmpemf, ENHMETAHEADER.sizeof, &tmphdr);
DeleteEnhMetaFile(tmpemf);
rc.left = MulDiv(_area.x, GetDeviceCaps(hdcref, HORZSIZE) * 100, tmphdr.szlDevice.cx);
rc.top = MulDiv(_area.y, GetDeviceCaps(hdcref, VERTSIZE) * 100, tmphdr.szlDevice.cy);
rc.right = MulDiv(_area.right, GetDeviceCaps(hdcref, HORZSIZE) * 100,
tmphdr.szlDevice.cx);
rc.bottom = MulDiv(_area.bottom, GetDeviceCaps(hdcref,
VERTSIZE) * 100, tmphdr.szlDevice.cy);
pRc = &rc;
}
import std.utf;
_hdc = CreateEnhMetaFileW(hdcref,
filename.length ? filename.toUTF16z() : null, pRc,
description.length ? description.toUTF16z() : null);
super(_hdc, false);
}
this(Rect area, string filename = null, string description = null) {
this(null, area, filename, description);
}
this(uint width, uint height, string filename = null, string description = null) {
this(null, Rect(0, 0, width, height), filename, description);
}
override void dispose() {
super.dispose();
if (_hdc) {
DeleteEnhMetaFile(CloseEnhMetaFile(_hdc));
}
}
Size size() const pure nothrow @property {
return _area.size;
}
uint width() const pure nothrow @property {
return _area.width;
}
uint height() const pure nothrow @property {
return _area.height;
}
Rect frameRectangle() const pure nothrow @property {
return _area;
}
EnhancedMetaFile toEnhancedMetaFile() {
return new EnhancedMetaFile(CloseEnhMetaFile(_hdc));
}
}
// Use with GetDC()/GetWindowDC()/GetDCEx() so that
// the HDC is properly released instead of deleted.
package class CommonGraphics : Graphics {
// Used internally.
this(HWND hwnd, HDC hdc, bool owned = true) {
super(hdc, owned);
this.hwnd = hwnd;
}
override void dispose() {
ReleaseDC(hwnd, hdc);
hdc = null;
}
package:
HWND hwnd;
}
class Icon : Image {
// Used internally.
this(HICON hi, bool owned = true) {
this.hi = hi;
this.owned = owned;
}
// Load from an ico file.
this(Dstring fileName) {
this.hi = cast(HICON) dfl.internal.utf.loadImage(null, fileName,
IMAGE_ICON, 0, 0, LR_LOADFROMFILE);
if (!this.hi) {
throw new DflException("Unable to load icon from file '" ~ fileName ~ "'");
}
}
deprecated static Icon fromHandle(HICON hi) {
return new Icon(hi, false); // Not owned. Up to caller to manage or call dispose().
}
// -bm- can be null.
// NOTE: the bitmaps in -ii- need to be deleted! _deleteBitmaps() is a shortcut.
private void _getInfo(ICONINFO* ii, BITMAP* bm = null) {
if (GetIconInfo(hi, ii)) {
if (!bm) {
return;
}
HBITMAP hbm;
if (ii.hbmColor) {
hbm = ii.hbmColor;
} else { // Monochrome.
hbm = ii.hbmMask;
}
if (GetObjectA(hbm, BITMAP.sizeof, bm) == BITMAP.sizeof) {
return;
}
}
// Fell through, failed.
throw new DflException("Unable to get image information");
}
private void _deleteBitmaps(ICONINFO* ii) {
DeleteObject(ii.hbmColor);
ii.hbmColor = null;
DeleteObject(ii.hbmMask);
ii.hbmMask = null;
}
final Bitmap toBitmap() {
ICONINFO ii;
BITMAP bm;
_getInfo(&ii, &bm);
// Not calling _deleteBitmaps() because I'm keeping one.
HBITMAP hbm;
if (ii.hbmColor) {
hbm = ii.hbmColor;
DeleteObject(ii.hbmMask);
} else { // Monochrome.
hbm = ii.hbmMask;
}
return new Bitmap(hbm, true); // Yes owned.
}
final override void draw(Graphics g, Point pt) {
g.drawIcon(this, pt.x, pt.y);
}
final override void drawStretched(Graphics g, Rect r) {
g.drawIcon(this, r);
}
final override @property Size size() {
ICONINFO ii;
BITMAP bm;
_getInfo(&ii, &bm);
_deleteBitmaps(&ii);
return Size(bm.bmWidth, bm.bmHeight);
}
final override @property int width() {
return size.width;
}
final override @property int height() {
return size.height;
}
~this() {
if (owned) {
dispose();
}
}
override int _imgtype(HGDIOBJ* ph) { // internal
if (ph) {
*ph = cast(HGDIOBJ) hi;
}
return 2;
}
void dispose() {
assert(owned);
DestroyIcon(hi);
hi = null;
}
final @property HICON handle() {
return hi;
}
private:
HICON hi;
bool owned = true;
}
enum GraphicsUnit : ubyte { // docmain ?
PIXEL,
DISPLAY, // 1/75 inch.
DOCUMENT, // 1/300 inch.
INCH, // 1 inch, der.
MILLIMETER, // 25.4 millimeters in 1 inch.
POINT, // 1/72 inch.
//WORLD, // ?
TWIP, // Extra. 1/1440 inch.
}
/+
// TODO: check if correct implementation.
enum GenericFontFamilies {
MONOSPACE = FF_MODERN,
SANS_SERIF = FF_ROMAN,
SERIF = FF_SWISS,
}
+/
/+
abstract class FontCollection {
abstract @property FontFamily[] families();
}
class FontFamily {
/+
this(GenericFontFamilies genericFamily) {
}
+/
this(Dstring name) {
}
this(Dstring name, FontCollection fontCollection) {
}
final @property Dstring name() {
}
static @property FontFamily[] families() {
}
/+
// TODO: implement.
static @property FontFamily genericMonospace() {
}
static @property FontFamily genericSansSerif() {
}
static @property FontFamily genericSerif() {
}
+/
}
+/
// Flags.
enum FontStyle : ubyte {
REGULAR = 0, ///
BOLD = 1,
ITALIC = 2,
UNDERLINE = 4,
STRIKEOUT = 8,
}
enum FontSmoothing {
DEFAULT = DEFAULT_QUALITY,
ON = ANTIALIASED_QUALITY,
OFF = NONANTIALIASED_QUALITY,
}
class Font {
// Used internally.
static void LOGFONTAtoLogFont(ref LogFont lf, LOGFONTA* plfa) { // package // deprecated
lf.lfa = *plfa;
lf.faceName = dfl.internal.utf.fromAnsiz(plfa.lfFaceName.ptr);
}
// Used internally.
static void LOGFONTWtoLogFont(ref LogFont lf, LOGFONTW* plfw) { // package // deprecated
lf.lfw = *plfw;
lf.faceName = dfl.internal.utf.fromUnicodez(plfw.lfFaceName.ptr);
}
// Used internally.
this(HFONT hf, LOGFONTA* plfa, bool owned = true) { // package // deprecated
LogFont lf;
LOGFONTAtoLogFont(lf, plfa);
this.hf = hf;
this.owned = owned;
this._unit = GraphicsUnit.POINT;
_fstyle = _style(lf);
_initLf(lf);
}
// Used internally.
this(HFONT hf, ref LogFont lf, bool owned = true) { // package
this.hf = hf;
this.owned = owned;
this._unit = GraphicsUnit.POINT;
_fstyle = _style(lf);
_initLf(lf);
}
// Used internally.
this(HFONT hf, bool owned = true) { // package
this.hf = hf;
this.owned = owned;
this._unit = GraphicsUnit.POINT;
LogFont lf;
_info(lf);
_fstyle = _style(lf);
_initLf(lf);
}
// Used internally.
this(LOGFONTA* plfa, bool owned = true) { // package // deprecated
LogFont lf;
LOGFONTAtoLogFont(lf, plfa);
this(_create(lf), lf, owned);
}
// Used internally.
this(ref LogFont lf, bool owned = true) { // package
this(_create(lf), lf, owned);
}
package static HFONT _create(ref LogFont lf) {
HFONT result;
result = dfl.internal.utf.createFontIndirect(lf);
if (!result) {
throw new DflException("Unable to create font");
}
return result;
}
private static void _style(ref LogFont lf, FontStyle style) {
lf.lf.lfWeight = (style & FontStyle.BOLD) ? FW_BOLD : FW_NORMAL;
lf.lf.lfItalic = (style & FontStyle.ITALIC) ? TRUE : FALSE;
lf.lf.lfUnderline = (style & FontStyle.UNDERLINE) ? TRUE : FALSE;
lf.lf.lfStrikeOut = (style & FontStyle.STRIKEOUT) ? TRUE : FALSE;
}
private static FontStyle _style(ref LogFont lf) {
FontStyle style = FontStyle.REGULAR;
if (lf.lf.lfWeight >= FW_BOLD) {
style |= FontStyle.BOLD;
}
if (lf.lf.lfItalic) {
style |= FontStyle.ITALIC;
}
if (lf.lf.lfUnderline) {
style |= FontStyle.UNDERLINE;
}
if (lf.lf.lfStrikeOut) {
style |= FontStyle.STRIKEOUT;
}
return style;
}
package void _info(LOGFONTA* lf) { // deprecated
if (GetObjectA(hf, LOGFONTA.sizeof, lf) != LOGFONTA.sizeof) {
throw new DflException("Unable to get font information");
}
}
package void _info(LOGFONTW* lf) { // deprecated
auto proc = cast(GetObjectWProc) GetProcAddress(GetModuleHandleA("gdi32.dll"),
"GetObjectW");
if (!proc || proc(hf, LOGFONTW.sizeof, lf) != LOGFONTW.sizeof) {
throw new DflException("Unable to get font information");
}
}
package void _info(ref LogFont lf) {
if (!dfl.internal.utf.getLogFont(hf, lf)) {
throw new DflException("Unable to get font information");
}
}
package static LONG getLfHeight(float emSize, GraphicsUnit unit) {
LONG result;
HDC hdc;
final switch (unit) {
case GraphicsUnit.PIXEL:
result = cast(LONG) emSize;
break;
case GraphicsUnit.POINT:
hdc = GetWindowDC(null);
result = MulDiv(cast(int)(emSize * 100), GetDeviceCaps(hdc, LOGPIXELSY),
72 * 100);
ReleaseDC(null, hdc);
break;
case GraphicsUnit.DISPLAY:
hdc = GetWindowDC(null);
result = MulDiv(cast(int)(emSize * 100), GetDeviceCaps(hdc, LOGPIXELSY),
75 * 100);
ReleaseDC(null, hdc);
break;
case GraphicsUnit.MILLIMETER:
hdc = GetWindowDC(null);
result = MulDiv(cast(int)(emSize * 100), GetDeviceCaps(hdc, LOGPIXELSY),
2540);
ReleaseDC(null, hdc);
break;
case GraphicsUnit.INCH:
hdc = GetWindowDC(null);
result = cast(LONG)(emSize * cast(float) GetDeviceCaps(hdc, LOGPIXELSY));
ReleaseDC(null, hdc);
break;
case GraphicsUnit.DOCUMENT:
hdc = GetWindowDC(null);
result = MulDiv(cast(int)(emSize * 100), GetDeviceCaps(hdc, LOGPIXELSY),
300 * 100);
ReleaseDC(null, hdc);
break;
case GraphicsUnit.TWIP:
hdc = GetWindowDC(null);
result = MulDiv(cast(int)(emSize * 100), GetDeviceCaps(hdc, LOGPIXELSY),
1440 * 100);
ReleaseDC(null, hdc);
break;
}
return result;
}
package static float getEmSize(HDC hdc, LONG lfHeight, GraphicsUnit toUnit) {
float result;
if (lfHeight < 0) {
lfHeight = -lfHeight;
}
final switch (toUnit) {
case GraphicsUnit.PIXEL:
result = cast(float) lfHeight;
break;
case GraphicsUnit.POINT:
result = cast(float) MulDiv(lfHeight, 72,
GetDeviceCaps(hdc, LOGPIXELSY));
break;
case GraphicsUnit.DISPLAY:
result = cast(float) MulDiv(lfHeight, 75,
GetDeviceCaps(hdc, LOGPIXELSY));
break;
case GraphicsUnit.MILLIMETER:
result = cast(float) MulDiv(lfHeight, 254,
GetDeviceCaps(hdc, LOGPIXELSY)) / 10.0;
break;
case GraphicsUnit.INCH:
result = cast(float) lfHeight / cast(float) GetDeviceCaps(hdc,
LOGPIXELSY);
break;
case GraphicsUnit.DOCUMENT:
result = cast(float) MulDiv(lfHeight, 300,
GetDeviceCaps(hdc, LOGPIXELSY));
break;
case GraphicsUnit.TWIP:
result = cast(float) MulDiv(lfHeight, 1440,
GetDeviceCaps(hdc, LOGPIXELSY));
break;
}
return result;
}
package static float getEmSize(LONG lfHeight, GraphicsUnit toUnit) {
if (GraphicsUnit.PIXEL == toUnit) {
if (lfHeight < 0) {
return cast(float)-lfHeight;
}
return cast(float) lfHeight;
}
HDC hdc;
hdc = GetWindowDC(null);
float result = getEmSize(hdc, lfHeight, toUnit);
ReleaseDC(null, hdc);
return result;
}
this(Font font, FontStyle style) {
LogFont lf;
_unit = font._unit;
font._info(lf);
_style(lf, style);
this(_create(lf));
_fstyle = style;
_initLf(font, lf);
}
this(Dstring name, float emSize, GraphicsUnit unit) {
this(name, emSize, FontStyle.REGULAR, unit);
}
this(Dstring name, float emSize, FontStyle style = FontStyle.REGULAR,
GraphicsUnit unit = GraphicsUnit.POINT) {
this(name, emSize, style, unit, DEFAULT_CHARSET, FontSmoothing.DEFAULT);
}
this(Dstring name, float emSize, FontStyle style, GraphicsUnit unit, FontSmoothing smoothing) {
this(name, emSize, style, unit, DEFAULT_CHARSET, smoothing);
}
//
// This is a somewhat internal function.
// -gdiCharSet- is one of *_CHARSET from wingdi.h
this(Dstring name, float emSize, FontStyle style, GraphicsUnit unit,
ubyte gdiCharSet, FontSmoothing smoothing = FontSmoothing.DEFAULT) {
LogFont lf;
lf.faceName = name;
lf.lf.lfCharSet = gdiCharSet;
lf.lf.lfQuality = cast(BYTE) smoothing;
lf.lf.lfOutPrecision = OUT_DEFAULT_PRECIS;
lf.lf.lfClipPrecision = CLIP_DEFAULT_PRECIS;
lf.lf.lfPitchAndFamily = DEFAULT_PITCH | FF_DONTCARE;
this(lf, emSize, style, unit);
}
//
// This is a somewhat internal function.
this(ref LogFont lf, float emSize, FontStyle style, GraphicsUnit unit) {
_unit = unit;
lf.lf.lfHeight = -getLfHeight(emSize, unit);
_style(lf, style);
this(_create(lf));
_fstyle = style;
_initLf(lf);
}
~this() {
if (owned) {
DeleteObject(hf);
}
}
final @property HFONT handle() {
return hf;
}
final @property GraphicsUnit unit() {
return _unit;
}
final @property float size() {
/+
LOGFONTA lf;
_info(&lf);
return getEmSize(lf.lf.lfHeight, _unit);
+/
return getEmSize(this.lfHeight, _unit);
}
final float getSize(GraphicsUnit unit) {
/+
LOGFONTA lf;
_info(&lf);
return getEmSize(lf.lf.lfHeight, unit);
+/
return getEmSize(this.lfHeight, unit);
}
final float getSize(GraphicsUnit unit, Graphics g) {
return getEmSize(g.handle, this.lfHeight, unit);
}
final @property FontStyle style() {
return _fstyle;
}
final @property Dstring name() {
return lfName;
}
final @property ubyte gdiCharSet() {
return lfCharSet;
}
/+
private void _initLf(LOGFONTA* lf) {
this.lfHeight = lf.lfHeight;
this.lfName = stringFromStringz(lf.lfFaceName.ptr).dup;
this.lfCharSet = lf.lfCharSet;
}
+/
private void _initLf(ref LogFont lf) {
this.lfHeight = lf.lf.lfHeight;
this.lfName = lf.faceName;
this.lfCharSet = lf.lf.lfCharSet;
}
/+
private void _initLf(Font otherfont, LOGFONTA* lf) {
this.lfHeight = otherfont.lfHeight;
this.lfName = otherfont.lfName;
this.lfCharSet = otherfont.lfCharSet;
}
+/
private void _initLf(Font otherfont, ref LogFont lf) {
this.lfHeight = otherfont.lfHeight;
this.lfName = otherfont.lfName;
this.lfCharSet = otherfont.lfCharSet;
}
private:
HFONT hf;
GraphicsUnit _unit;
bool owned = true;
FontStyle _fstyle;
LONG lfHeight;
Dstring lfName;
ubyte lfCharSet;
}
enum PenStyle : UINT {
SOLID = PS_SOLID, ///
DASH = PS_DASH,
DOT = PS_DOT,
DASH_DOT = PS_DASHDOT,
DASH_DOT_DOT = PS_DASHDOTDOT,
NULL = PS_NULL,
INSIDE_FRAME = PS_INSIDEFRAME,
}
// If the pen width is greater than 1 the style cannot have dashes or dots.
class Pen {
// Used internally.
this(HPEN hp, bool owned = true) {
this.hp = hp;
this.owned = owned;
}
this(Color color, int width = 1, PenStyle ps = PenStyle.SOLID) {
hp = CreatePen(ps, width, color.toRgb());
}
~this() {
if (owned) {
DeleteObject(hp);
}
}
final @property HPEN handle() {
return hp;
}
private:
HPEN hp;
bool owned = true;
}
class Brush {
// Used internally.
this(HBRUSH hb, bool owned = true) {
this.hb = hb;
this.owned = owned;
}
protected this() {
}
~this() {
if (owned) {
DeleteObject(hb);
}
}
final @property HBRUSH handle() {
return hb;
}
private:
HBRUSH hb;
bool owned = true;
}
class SolidBrush : Brush {
this(Color c) {
super(CreateSolidBrush(c.toRgb()));
}
/+
final @property void color(Color c) {
// delete..
super.hb = CreateSolidBrush(c.toRgb());
}
+/
final @property Color color() {
Color result;
LOGBRUSH lb;
if (GetObjectA(hb, lb.sizeof, &lb)) {
result = Color.fromRgb(lb.lbColor);
}
return result;
}
}
// PatternBrush has the win9x/ME limitation of not supporting images larger than 8x8 pixels.
// TextureBrush supports any size images but requires GDI+.
/+
class PatternBrush: Brush {
//CreatePatternBrush() ...
}
+/
/+
class TextureBrush: Brush {
// GDI+ ...
}
+/
enum HatchStyle : LONG {
HORIZONTAL = HS_HORIZONTAL, ///
VERTICAL = HS_VERTICAL,
FORWARD_DIAGONAL = HS_FDIAGONAL,
BACKWARD_DIAGONAL = HS_BDIAGONAL,
CROSS = HS_CROSS,
DIAGONAL_CROSS = HS_DIAGCROSS,
}
class HatchBrush : Brush {
this(HatchStyle hs, Color c) {
super(CreateHatchBrush(hs, c.toRgb()));
}
final @property Color foregroundColor() {
Color result;
LOGBRUSH lb;
if (GetObjectA(hb, lb.sizeof, &lb)) {
result = Color.fromRgb(lb.lbColor);
}
return result;
}
final @property HatchStyle hatchStyle() {
HatchStyle result;
LOGBRUSH lb;
if (GetObjectA(hb, lb.sizeof, &lb)) {
result = cast(HatchStyle) lb.lbHatch;
}
return result;
}
}
class Region {
// Used internally.
this(HRGN hrgn, bool owned = true) {
this.hrgn = hrgn;
this.owned = owned;
}
~this() {
if (owned) {
DeleteObject(hrgn);
}
}
final @property HRGN handle() {
return hrgn;
}
override Dequ opEquals(Object o) {
Region rgn = cast(Region) o;
if (!rgn) {
return 0; // Not equal.
}
return opEquals(rgn);
}
Dequ opEquals(Region rgn) {
return hrgn == rgn.hrgn;
}
private HRGN hrgn;
private bool owned = true;
}
// from wincom
private LONG MAP_LOGHIM_TO_PIX(LONG x, LONG logpixels) {
return MulDiv(logpixels, x, 2540);
}
|
D
|
const int LP_PER_LEVEL = 10;
const int HP_PER_LEVEL = 12;
const int XP_PER_LEVEL_UNCONSCIOUS = 5;
const int XP_PER_LEVEL_DEAD = 10;
func void B_GiveXP(var int add_xp)
{
var string msg;
PrintDebugNpc(PD_ZS_FRAME,"B_GiveXP");
if(hero.level == 0)
{
hero.exp_next = 500;
};
hero.exp = hero.exp + add_xp;
msg = NAME_XPGained;
msg = ConcatStrings(msg,IntToString(add_xp));
PrintScreen(msg,-1,_YPOS_MESSAGE_XPGAINED,"font_old_10_white.tga",_TIME_MESSAGE_XPGAINED);
if(hero.exp >= hero.exp_next)
{
hero.level = hero.level + 1;
hero.exp_next = hero.exp_next + ((hero.level + 1) * 500);
hero.attribute[ATR_HITPOINTS_MAX] = hero.attribute[ATR_HITPOINTS_MAX] + HP_PER_LEVEL;
hero.attribute[ATR_HITPOINTS] = hero.attribute[ATR_HITPOINTS] + HP_PER_LEVEL;
hero.lp = hero.lp + LP_PER_LEVEL;
PrintScreen(NAME_LevelUp,-1,_YPOS_MESSAGE_LEVELUP,"font_old_20_white.tga",_TIME_MESSAGE_LEVELUP);
Snd_Play("LevelUp");
};
};
func void B_DeathXP()
{
PrintDebugNpc(PD_ZS_FRAME,"B_DeathXP");
PrintGlobals(PD_ZS_Check);
if(C_NpcIsHuman(self) && Npc_WasInState(self,ZS_Unconscious))
{
PrintDebugNpc(PD_ZS_Check,"...Opfer ist bewußtloser Mensch!");
}
else
{
PrintDebugNpc(PD_ZS_Check,"...Opfer ist entweder nicht bewußtlos oder kein Mensch!");
B_GiveXP(self.level * XP_PER_LEVEL_DEAD);
};
};
func void B_UnconciousXP()
{
PrintDebugNpc(PD_ZS_FRAME,"B_UnconciousXP");
PrintGlobals(PD_ZS_Check);
if(!C_NpcIsHuman(self) || !self.aivar[AIV_WASDEFEATEDBYSC])
{
PrintDebugNpc(PD_ZS_Check,"...erster Sieg!");
B_GiveXP(self.level * XP_PER_LEVEL_DEAD);
};
};
|
D
|
/home/tyler/Documents/AdventOfCode/Rust/day_9_1/target/debug/deps/day_9_1-a9c2e1954ce34b92: src/main.rs
/home/tyler/Documents/AdventOfCode/Rust/day_9_1/target/debug/deps/day_9_1-a9c2e1954ce34b92.d: src/main.rs
src/main.rs:
|
D
|
/home/amplifix/projects/rust/hello_cargo/target/debug/deps/hello_cargo-387fde5a1b5926bf: src/main.rs
/home/amplifix/projects/rust/hello_cargo/target/debug/deps/hello_cargo-387fde5a1b5926bf.d: src/main.rs
src/main.rs:
|
D
|
/* REQUIRED_ARGS: -preview=dip1000
TEST_OUTPUT:
---
fail_compilation/test22910.d(17): Error: returning `&this.val` escapes a reference to parameter `this`
fail_compilation/test22910.d(15): perhaps change the `return scope` into `scope return`
---
*/
@safe:
struct S
{
int val;
int* ptr;
int* retScope() return scope
{
return &this.val;
}
}
|
D
|
instance Mod_1721_KDS_SchwarzerMagier_PAT (Npc_Default)
{
//-------- primary data --------
name = Name_SchwarzerMagier;
npctype = npctype_PAT_SchwarzerMagier;
guild = GIL_KDF;
level = 5;
voice = 3;
id = 1721;
//-------- abilities --------
B_SetAttributesToChapter (self, 5);
aivar[AIV_MagicUser] = MAGIC_ALWAYS;
//-------- visuals --------
// animations
Mdl_SetVisual (self,"HUMANS.MDS");
Mdl_ApplyOverlayMds (self,"Humans_Militia.mds");
// body mesh, head mesh, hairmesh, face-tex, hair-tex, skin
Mdl_SetVisualBody (self,"hum_body_Naked0",1,1,"Hum_Head_Fighter", 73, 1, SCHWARZMAGIERROBE);
Mdl_SetModelFatness (self, 0);
fight_tactic = FAI_HUMAN_STRONG;
//-------- Talents --------
B_SetFightSkills (self, 40);
EquipItem (self, ItMW_BeliarStab);
//-------- inventory --------
//-------------Daily Routine-------------
daily_routine = Rtn_start_1721;
};
FUNC VOID Rtn_start_1721 ()
{
TA_Circle (21,00,04,00,"WP_PAT_LAGER_06_02");
TA_Circle (04,00,21,00,"WP_PAT_LAGER_06_02");
};
FUNC VOID Rtn_Patherion_1721 ()
{
TA_Pick_FP (21,00,04,00,"WP_PAT_UNTERGRUND_20");
TA_Pick_FP (04,00,21,00,"WP_PAT_UNTERGRUND_20");
};
|
D
|
module directx.d3d11_1;
/*-------------------------------------------------------------------------------------
*
* Copyright (c) Microsoft Corporation
*
*-------------------------------------------------------------------------------------*/
import directx.dxgi1_2;
import directx.d3dcommon;
import directx.d3d11;
extern(C)
{
alias D3D11_COPY_FLAGS = int;
enum : D3D11_COPY_FLAGS
{
D3D11_COPY_NO_OVERWRITE = 0x1,
D3D11_COPY_DISCARD = 0x2
}
alias D3D11_LOGIC_OP = int;
enum : D3D11_LOGIC_OP
{
D3D11_LOGIC_OP_CLEAR = 0,
D3D11_LOGIC_OP_SET = ( D3D11_LOGIC_OP_CLEAR + 1 ) ,
D3D11_LOGIC_OP_COPY = ( D3D11_LOGIC_OP_SET + 1 ) ,
D3D11_LOGIC_OP_COPY_INVERTED = ( D3D11_LOGIC_OP_COPY + 1 ) ,
D3D11_LOGIC_OP_NOOP = ( D3D11_LOGIC_OP_COPY_INVERTED + 1 ) ,
D3D11_LOGIC_OP_INVERT = ( D3D11_LOGIC_OP_NOOP + 1 ) ,
D3D11_LOGIC_OP_AND = ( D3D11_LOGIC_OP_INVERT + 1 ) ,
D3D11_LOGIC_OP_NAND = ( D3D11_LOGIC_OP_AND + 1 ) ,
D3D11_LOGIC_OP_OR = ( D3D11_LOGIC_OP_NAND + 1 ) ,
D3D11_LOGIC_OP_NOR = ( D3D11_LOGIC_OP_OR + 1 ) ,
D3D11_LOGIC_OP_XOR = ( D3D11_LOGIC_OP_NOR + 1 ) ,
D3D11_LOGIC_OP_EQUIV = ( D3D11_LOGIC_OP_XOR + 1 ) ,
D3D11_LOGIC_OP_AND_REVERSE = ( D3D11_LOGIC_OP_EQUIV + 1 ) ,
D3D11_LOGIC_OP_AND_INVERTED = ( D3D11_LOGIC_OP_AND_REVERSE + 1 ) ,
D3D11_LOGIC_OP_OR_REVERSE = ( D3D11_LOGIC_OP_AND_INVERTED + 1 ) ,
D3D11_LOGIC_OP_OR_INVERTED = ( D3D11_LOGIC_OP_OR_REVERSE + 1 )
}
struct D3D11_RENDER_TARGET_BLEND_DESC1
{
BOOL BlendEnable;
BOOL LogicOpEnable;
D3D11_BLEND SrcBlend;
D3D11_BLEND DestBlend;
D3D11_BLEND_OP BlendOp;
D3D11_BLEND SrcBlendAlpha;
D3D11_BLEND DestBlendAlpha;
D3D11_BLEND_OP BlendOpAlpha;
D3D11_LOGIC_OP LogicOp;
UINT8 RenderTargetWriteMask;
}
struct D3D11_BLEND_DESC1
{
BOOL AlphaToCoverageEnable;
BOOL IndependentBlendEnable;
D3D11_RENDER_TARGET_BLEND_DESC1[8] RenderTarget;
}
} // extern C
version(D3D11_NO_HELPERS)
{
}
else
{
/*
class CD3D11_BLEND_DESC1 : D3D11_BLEND_DESC1
{
CD3D11_BLEND_DESC1()
{}
explicit CD3D11_BLEND_DESC1( const D3D11_BLEND_DESC1& o ) :
D3D11_BLEND_DESC1( o )
{}
explicit CD3D11_BLEND_DESC1( CD3D11_DEFAULT )
{
AlphaToCoverageEnable = FALSE;
IndependentBlendEnable = FALSE;
const D3D11_RENDER_TARGET_BLEND_DESC1 defaultRenderTargetBlendDesc =
{
FALSE,FALSE,
D3D11_BLEND_ONE, D3D11_BLEND_ZERO, D3D11_BLEND_OP_ADD,
D3D11_BLEND_ONE, D3D11_BLEND_ZERO, D3D11_BLEND_OP_ADD,
D3D11_LOGIC_OP_NOOP,
D3D11_COLOR_WRITE_ENABLE_ALL,
};
for (UINT i = 0; i < D3D11_SIMULTANEOUS_RENDER_TARGET_COUNT; ++i)
RenderTarget[ i ] = defaultRenderTargetBlendDesc;
}
~CD3D11_BLEND_DESC1() {}
operator const D3D11_BLEND_DESC1&() const { return *this; }
};
*/
}
mixin( uuid!(ID3D11BlendState1, "cc86fabe-da55-401d-85e7-e3c9de2877e9") );
interface ID3D11BlendState1 : ID3D11BlendState
{
extern(Windows):
public:
void GetDesc1(
/*out*/ D3D11_BLEND_DESC1* pDesc);
}
extern(C) struct D3D11_RASTERIZER_DESC1
{
D3D11_FILL_MODE FillMode;
D3D11_CULL_MODE CullMode;
BOOL FrontCounterClockwise;
INT DepthBias;
FLOAT DepthBiasClamp;
FLOAT SlopeScaledDepthBias;
BOOL DepthClipEnable;
BOOL ScissorEnable;
BOOL MultisampleEnable;
BOOL AntialiasedLineEnable;
UINT ForcedSampleCount;
}
// TODO: add helper struct or functions
/*
struct CD3D11_RASTERIZER_DESC1 : D3D11_RASTERIZER_DESC1
{
CD3D11_RASTERIZER_DESC1()
{}
explicit CD3D11_RASTERIZER_DESC1( const D3D11_RASTERIZER_DESC1& o ) :
D3D11_RASTERIZER_DESC1( o )
{}
explicit CD3D11_RASTERIZER_DESC1( CD3D11_DEFAULT )
{
FillMode = D3D11_FILL_SOLID;
CullMode = D3D11_CULL_BACK;
FrontCounterClockwise = FALSE;
DepthBias = D3D11_DEFAULT_DEPTH_BIAS;
DepthBiasClamp = D3D11_DEFAULT_DEPTH_BIAS_CLAMP;
SlopeScaledDepthBias = D3D11_DEFAULT_SLOPE_SCALED_DEPTH_BIAS;
DepthClipEnable = TRUE;
ScissorEnable = FALSE;
MultisampleEnable = FALSE;
AntialiasedLineEnable = FALSE;
ForcedSampleCount = 0;
}
explicit CD3D11_RASTERIZER_DESC1(
D3D11_FILL_MODE fillMode,
D3D11_CULL_MODE cullMode,
BOOL frontCounterClockwise,
INT depthBias,
FLOAT depthBiasClamp,
FLOAT slopeScaledDepthBias,
BOOL depthClipEnable,
BOOL scissorEnable,
BOOL multisampleEnable,
BOOL antialiasedLineEnable,
UINT forcedSampleCount )
{
FillMode = fillMode;
CullMode = cullMode;
FrontCounterClockwise = frontCounterClockwise;
DepthBias = depthBias;
DepthBiasClamp = depthBiasClamp;
SlopeScaledDepthBias = slopeScaledDepthBias;
DepthClipEnable = depthClipEnable;
ScissorEnable = scissorEnable;
MultisampleEnable = multisampleEnable;
AntialiasedLineEnable = antialiasedLineEnable;
ForcedSampleCount = forcedSampleCount;
}
~CD3D11_RASTERIZER_DESC1() {}
operator const D3D11_RASTERIZER_DESC1&() const { return *this; }
};
*/
mixin( uuid!(ID3D11RasterizerState1, "1217d7a6-5039-418c-b042-9cbe256afd6e") );
interface ID3D11RasterizerState1 : ID3D11RasterizerState
{
extern(Windows):
void GetDesc1(
/*out*/ D3D11_RASTERIZER_DESC1* pDesc);
}
alias D3D11_1_CREATE_DEVICE_CONTEXT_STATE_FLAG = int;
enum : D3D11_1_CREATE_DEVICE_CONTEXT_STATE_FLAG
{
D3D11_1_CREATE_DEVICE_CONTEXT_STATE_SINGLETHREADED = 0x1
}
mixin( uuid!(ID3DDeviceContextState, "5c1e0d8a-7c23-48f9-8c59-a92958ceff11") );
interface ID3DDeviceContextState : ID3D11DeviceChild
{
extern(Windows):
}
mixin( uuid!(ID3D11DeviceContext1, "bb2c6faa-b5fb-4082-8e6b-388b8cfa90e1") );
interface ID3D11DeviceContext1 : ID3D11DeviceContext
{
extern(Windows):
void CopySubresourceRegion1(
ID3D11Resource pDstResource,
UINT DstSubresource,
UINT DstX,
UINT DstY,
UINT DstZ,
ID3D11Resource pSrcResource,
UINT SrcSubresource,
const(D3D11_BOX)* pSrcBox,
UINT CopyFlags);
void UpdateSubresource1(
ID3D11Resource pDstResource,
UINT DstSubresource,
const(D3D11_BOX)* pDstBox,
const(void*) pSrcData,
UINT SrcRowPitch,
UINT SrcDepthPitch,
UINT CopyFlags);
void DiscardResource(
ID3D11Resource pResource);
void DiscardView(
ID3D11View pResourceView);
void VSSetConstantBuffers1(
UINT StartSlot,
UINT NumBuffers,
const(ID3D11Buffer)* ppConstantBuffers,
const(UINT)* pFirstConstant,
const(UINT)* pNumConstants);
void HSSetConstantBuffers1(
UINT StartSlot,
UINT NumBuffers,
const(ID3D11Buffer)* ppConstantBuffers,
const(UINT)* pFirstConstant,
const(UINT)* pNumConstants);
void DSSetConstantBuffers1(
UINT StartSlot,
UINT NumBuffers,
const(ID3D11Buffer)* ppConstantBuffers,
const(UINT)* pFirstConstant,
const(UINT)* pNumConstants);
void GSSetConstantBuffers1(
UINT StartSlot,
UINT NumBuffers,
const(ID3D11Buffer)* ppConstantBuffers,
const(UINT)* pFirstConstant,
const(UINT)* pNumConstants);
void PSSetConstantBuffers1(
UINT StartSlot,
UINT NumBuffers,
const(ID3D11Buffer)* ppConstantBuffers,
const(UINT)* pFirstConstant,
const(UINT)* pNumConstants);
void CSSetConstantBuffers1(
UINT StartSlot,
UINT NumBuffers,
const(ID3D11Buffer)* ppConstantBuffers,
const(UINT)* pFirstConstant,
const(UINT)* pNumConstants);
void VSGetConstantBuffers1(
UINT StartSlot,
UINT NumBuffers,
/*out*/ ID3D11Buffer* ppConstantBuffers,
/*out*/ UINT* pFirstConstant,
/*out*/ UINT* pNumConstants);
void HSGetConstantBuffers1(
UINT StartSlot,
UINT NumBuffers,
/*out*/ ID3D11Buffer* ppConstantBuffers,
/*out*/ UINT* pFirstConstant,
/*out*/ UINT* pNumConstants);
void DSGetConstantBuffers1(
UINT StartSlot,
UINT NumBuffers,
/*out*/ ID3D11Buffer* ppConstantBuffers,
/*out*/ UINT* pFirstConstant,
/*out*/ UINT* pNumConstants);
void GSGetConstantBuffers1(
UINT StartSlot,
UINT NumBuffers,
/*out*/ ID3D11Buffer* ppConstantBuffers,
/*out*/ UINT* pFirstConstant,
/*out*/ UINT* pNumConstants);
void PSGetConstantBuffers1(
UINT StartSlot,
UINT NumBuffers,
/*out*/ ID3D11Buffer* ppConstantBuffers,
/*out*/ UINT* pFirstConstant,
/*out*/ UINT* pNumConstants);
void CSGetConstantBuffers1(
UINT StartSlot,
UINT NumBuffers,
/*out*/ ID3D11Buffer* ppConstantBuffers,
/*out*/ UINT* pFirstConstant,
/*out*/ UINT* pNumConstants);
void SwapDeviceContextState(
ID3DDeviceContextState pState,
ID3DDeviceContextState* ppPreviousState) ;
void ClearView(
ID3D11View pView,
const(FLOAT)[4] Color,
const(D3D11_RECT)* pRect,
UINT NumRects);
void DiscardView1(
ID3D11View pResourceView,
const(D3D11_RECT)* pRects,
UINT NumRects);
}
mixin( uuid!(ID3D11Device1, "a04bfb29-08ef-43d6-a49c-a9bdbdcbe686") );
interface ID3D11Device1 : ID3D11Device
{
extern(Windows):
void GetImmediateContext1(
/*out*/ ID3D11DeviceContext1* ppImmediateContext);
HRESULT CreateDeferredContext1(
UINT ContextFlags,
/*out*/ ID3D11DeviceContext1* ppDeferredContext);
HRESULT CreateBlendState1(
const(D3D11_BLEND_DESC1)* pBlendStateDesc,
/*out*/ ID3D11BlendState1* ppBlendState);
HRESULT CreateRasterizerState1(
const(D3D11_RASTERIZER_DESC1)* pRasterizerDesc,
/*out*/ ID3D11RasterizerState1* ppRasterizerState);
HRESULT CreateDeviceContextState(
UINT Flags,
const(D3D_FEATURE_LEVEL)* pFeatureLevels,
UINT FeatureLevels,
UINT SDKVersion,
REFIID EmulatedInterface,
/*out*/ D3D_FEATURE_LEVEL* pChosenFeatureLevel,
/*out*/ ID3DDeviceContextState* ppContextState);
HRESULT OpenSharedResource1(
HANDLE hResource,
REFIID returnedInterface,
/*out*/ void** ppResource);
HRESULT OpenSharedResourceByName(
LPCWSTR lpName,
DWORD dwDesiredAccess,
REFIID returnedInterface,
/*out*/ void** ppResource);
}
mixin( uuid!(ID3DUserDefinedAnnotation, "b2daad8b-03d4-4dbf-95eb-32ab4b63d0ab") );
interface ID3DUserDefinedAnnotation : IUnknown
{
extern(Windows):
INT BeginEvent(
LPCWSTR Name);
INT EndEvent();
void SetMarker(
LPCWSTR Name);
BOOL GetStatus();
}
|
D
|
// Written in the D programming language.
/**
This module contains declaration of tabbed view controls.
TabItemWidget - single tab header in tab control
TabWidget
TabHost
TabControl
Synopsis:
----
import dlangui.widgets.tabs;
----
Copyright: Vadim Lopatin, 2014
License: Boost License 1.0
Authors: Vadim Lopatin, coolreader.org@gmail.com
*/
module dlangui.widgets.tabs;
import dlangui.core.signals;
import dlangui.widgets.layouts;
import dlangui.widgets.controls;
interface TabHandler {
void onTabChanged(string newActiveTabId, string previousTabId);
}
/// tab item metadata
class TabItem {
private string _iconRes;
private string _id;
private UIString _label;
private long _lastAccessTs;
this(string id, string labelRes, string iconRes = null) {
_id = id;
_label = labelRes;
_iconRes = iconRes;
}
this(string id, dstring labelRes, string iconRes = null) {
_id = id;
_label = labelRes;
_iconRes = iconRes;
_lastAccessTs = std.datetime.Clock.currStdTime;
}
@property string iconId() const { return _iconRes; }
@property string id() const { return _id; }
@property ref UIString text() { return _label; }
@property TabItem iconId(string id) { _iconRes = id; return this; }
@property TabItem id(string id) { _id = id; return this; }
@property long lastAccessTs() { return _lastAccessTs; }
@property void lastAccessTs(long ts) { _lastAccessTs = ts; }
void updateAccessTs() { _lastAccessTs = std.datetime.Clock.currStdTime; }
}
/// tab item widget - to show tab header
class TabItemWidget : HorizontalLayout {
private ImageWidget _icon;
private TextWidget _label;
private ImageButton _closeButton;
private TabItem _item;
private bool _enableCloseButton;
@property TabItem tabItem() { return _item; }
@property TabControl tabControl() { return cast(TabControl)parent; }
this(TabItem item, bool enableCloseButton = true) {
styleId = "TAB_UP_BUTTON";
_enableCloseButton = enableCloseButton;
_icon = new ImageWidget();
_label = new TextWidget();
_label.styleId = "TAB_UP_BUTTON_TEXT";
_label.state = State.Parent;
_closeButton = new ImageButton("CLOSE");
_closeButton.styleId = "BUTTON_TRANSPARENT";
_closeButton.drawableId = "close";
_closeButton.trackHover = true;
_closeButton.onClickListener = &onClick;
if (_enableCloseButton) {
_closeButton.visibility = Visibility.Gone;
} else {
_closeButton.visibility = Visibility.Visible;
}
addChild(_icon);
addChild(_label);
addChild(_closeButton);
setItem(item);
clickable = true;
trackHover = true;
}
protected bool onClick(Widget source) {
if (source.compareId("CLOSE")) {
Log.d("tab close button pressed");
}
return true;
}
protected void setItem(TabItem item) {
_item = item;
if (item.iconId !is null) {
_icon.visibility = Visibility.Visible;
_icon.drawableId = item.iconId;
} else {
_icon.visibility = Visibility.Gone;
}
_label.text = item.text;
id = item.id;
}
}
/// tab item list helper class
class TabItemList {
private TabItem[] _list;
private int _len;
this() {
}
/// get item by index
TabItem get(int index) {
if (index < 0 || index >= _len)
return null;
return _list[index];
}
/// get item by id
TabItem get(string id) {
int idx = indexById(id);
if (idx < 0)
return null;
return _list[idx];
}
@property int length() const { return _len; }
/// append new item
TabItemList add(TabItem item) {
return insert(item, -1);
}
/// insert new item to specified position
TabItemList insert(TabItem item, int index) {
if (index > _len || index < 0)
index = _len;
if (_list.length <= _len)
_list.length = _len + 4;
for (int i = _len; i > index; i--)
_list[i] = _list[i - 1];
_list[index] = item;
_len++;
return this;
}
/// remove item by index
TabItem remove(int index) {
TabItem res = _list[index];
for (int i = index; i < _len - 1; i++)
_list[i] = _list[i + 1];
_len--;
return res;
}
/// find tab index by id
int indexById(string id) {
import std.algorithm;
for (int i = 0; i < _len; i++) {
if (_list[i].id.equal(id))
return i;
}
return -1;
}
}
/// tab header - tab labels, with optional More button
class TabControl : WidgetGroup {
protected TabItemList _items;
protected ImageButton _moreButton;
protected bool _enableCloseButton;
protected TabItemWidget[] _sortedItems;
/// signal of tab change (e.g. by clicking on tab header)
Signal!TabHandler onTabChangedListener;
this(string ID) {
super(ID);
_items = new TabItemList();
_moreButton = new ImageButton("MORE", "tab_more");
_moreButton.styleId = "BUTTON_TRANSPARENT";
_moreButton.onClickListener = &onClick;
_moreButton.margins(Rect(3,3,3,6));
_enableCloseButton = true;
styleId = "TAB_UP";
addChild(_moreButton); // first child is always MORE button, the rest corresponds to tab list
}
/// returns tab count
@property int tabCount() const {
return _items.length;
}
/// returns tab item by id (null if index out of range)
TabItem tab(int index) {
return _items.get(index);
}
/// returns tab item by id (null if not found)
TabItem tab(string id) {
return _items.get(id);
}
/// get tab index by tab id (-1 if not found)
int tabIndex(string id) {
return _items.indexById(id);
}
protected void updateTabs() {
// TODO:
}
static bool accessTimeComparator(TabItemWidget a, TabItemWidget b) {
return (a.tabItem.lastAccessTs > b.tabItem.lastAccessTs);
}
protected TabItemWidget[] sortedItems() {
_sortedItems.length = _items.length;
for (int i = 0; i < _items.length; i++)
_sortedItems[i] = cast(TabItemWidget)_children.get(i + 1);
std.algorithm.sort!(accessTimeComparator)(_sortedItems);
return _sortedItems;
}
/// remove tab
TabControl removeTab(string id) {
int index = _items.indexById(id);
if (index >= 0) {
_children.remove(index + 1);
_items.remove(index);
requestLayout();
}
return this;
}
/// add new tab
TabControl addTab(TabItem item, int index = -1, bool enableCloseButton = false) {
_items.insert(item, index);
TabItemWidget widget = new TabItemWidget(item, enableCloseButton);
widget.parent = this;
widget.onClickListener = &onClick;
_children.insert(widget, index);
updateTabs();
requestLayout();
return this;
}
/// add new tab by id and label string
TabControl addTab(string id, dstring label, string iconId = null, bool enableCloseButton = false) {
TabItem item = new TabItem(id, label, iconId);
return addTab(item, -1, enableCloseButton);
}
/// add new tab by id and label string resource id
TabControl addTab(string id, string labelResourceId, string iconId = null, bool enableCloseButton = false) {
TabItem item = new TabItem(id, labelResourceId, iconId);
return addTab(item, -1, enableCloseButton);
}
protected bool onClick(Widget source) {
if (source.compareId("MORE")) {
Log.d("tab MORE button pressed");
return true;
}
string id = source.id;
int index = tabIndex(id);
if (index >= 0) {
selectTab(index);
}
return true;
}
/// Measure widget according to desired width and height constraints. (Step 1 of two phase layout).
override void measure(int parentWidth, int parentHeight) {
//Log.d("tabControl.measure enter");
Rect m = margins;
Rect p = padding;
// calc size constraints for children
int pwidth = parentWidth;
int pheight = parentHeight;
if (parentWidth != SIZE_UNSPECIFIED)
pwidth -= m.left + m.right + p.left + p.right;
if (parentHeight != SIZE_UNSPECIFIED)
pheight -= m.top + m.bottom + p.top + p.bottom;
// measure children
Point sz;
_moreButton.measure(pwidth, pheight);
sz.x = _moreButton.measuredWidth;
sz.y = _moreButton.measuredHeight;
pwidth -= sz.x;
for (int i = 1; i < _children.count; i++) {
Widget tab = _children.get(i);
tab.visibility = Visibility.Visible;
tab.measure(pwidth, pheight);
if (sz.y < tab.measuredHeight)
sz.y = tab.measuredHeight;
if (sz.x + tab.measuredWidth > pwidth)
break;
sz.x += tab.measuredWidth;
}
measuredContent(parentWidth, parentHeight, sz.x, sz.y);
//Log.d("tabControl.measure exit");
}
/// Set widget rectangle to specified value and layout widget contents. (Step 2 of two phase layout).
override void layout(Rect rc) {
//Log.d("tabControl.layout enter");
_needLayout = false;
if (visibility == Visibility.Gone) {
return;
}
_pos = rc;
applyMargins(rc);
applyPadding(rc);
// more button
Rect moreRc = rc;
moreRc.left = rc.right - _moreButton.measuredWidth;
_moreButton.layout(moreRc);
rc.right -= _moreButton.measuredWidth;
// tabs
int maxw = rc.width;
// measure and update visibility
TabItemWidget[] sorted = sortedItems();
int w = 0;
for (int i = 0; i < sorted.length; i++) {
TabItemWidget widget = sorted[i];
widget.visibility = Visibility.Visible;
widget.measure(rc.width, rc.height);
if (w + widget.measuredWidth < maxw) {
w += widget.measuredWidth;
} else {
widget.visibility = Visibility.Gone;
}
}
// layout visible items
for (int i = 1; i < _children.count; i++) {
TabItemWidget widget = cast(TabItemWidget)_children.get(i);
if (widget.visibility != Visibility.Visible)
continue;
w = widget.measuredWidth;
rc.right = rc.left + w;
widget.layout(rc);
rc.left += w;
}
//Log.d("tabControl.layout exit");
}
/// Draw widget at its position to buffer
override void onDraw(DrawBuf buf) {
//Log.d("tabControl.onDraw enter");
if (visibility != Visibility.Visible)
return;
super.onDraw(buf);
Rect rc = _pos;
applyMargins(rc);
applyPadding(rc);
auto saver = ClipRectSaver(buf, rc);
for (int i = 0; i < _children.count; i++) {
Widget item = _children.get(i);
if (item.visibility != Visibility.Visible)
continue;
item.onDraw(buf);
}
//Log.d("tabControl.onDraw exit");
}
protected string _selectedTabId;
void selectTab(int index) {
if (_children.get(index + 1).compareId(_selectedTabId))
return; // already selected
string previousSelectedTab = _selectedTabId;
for (int i = 1; i < _children.count; i++) {
if (index == i - 1) {
_children.get(i).state = State.Selected;
_selectedTabId = _children.get(i).id;
} else {
_children.get(i).state = State.Normal;
}
}
if (onTabChangedListener.assigned)
onTabChangedListener(_selectedTabId, previousSelectedTab);
}
}
/// container for widgets controlled by TabControl
class TabHost : FrameLayout, TabHandler {
this(string ID, TabControl tabControl = null) {
super(ID);
_tabControl = tabControl;
if (_tabControl !is null)
_tabControl.onTabChangedListener = &onTabChanged;
styleId = "TAB_HOST";
}
protected TabControl _tabControl;
/// get currently set control widget
@property TabControl tabControl() { return _tabControl; }
/// set new control widget
@property TabHost tabControl(TabControl newWidget) {
_tabControl = newWidget;
if (_tabControl !is null)
_tabControl.onTabChangedListener = &onTabChanged;
return this;
}
/// signal of tab change (e.g. by clicking on tab header)
Signal!TabHandler onTabChangedListener;
protected override void onTabChanged(string newActiveTabId, string previousTabId) {
if (newActiveTabId !is null) {
showChild(newActiveTabId, Visibility.Invisible, true);
}
if (onTabChangedListener.assigned)
onTabChangedListener(newActiveTabId, previousTabId);
}
/// remove tab
TabHost removeTab(string id) {
assert(_tabControl !is null, "No TabControl set for TabHost");
Widget child = removeChild(id);
if (child !is null) {
destroy(child);
}
_tabControl.removeTab(id);
requestLayout();
return this;
}
/// add new tab by id and label string
TabHost addTab(Widget widget, dstring label, string iconId = null, bool enableCloseButton = false) {
assert(_tabControl !is null, "No TabControl set for TabHost");
assert(widget.id !is null, "ID for tab host page is mandatory");
assert(_children.indexOf(id) == -1, "duplicate ID for tab host page");
_tabControl.addTab(widget.id, label, iconId, enableCloseButton);
widget.focusGroup = true; // doesn't allow move focus outside of tab content
addChild(widget);
return this;
}
/// add new tab by id and label string resource id
TabHost addTab(Widget widget, string labelResourceId, string iconId = null, bool enableCloseButton = false) {
assert(_tabControl !is null, "No TabControl set for TabHost");
assert(widget.id !is null, "ID for tab host page is mandatory");
assert(_children.indexOf(id) == -1, "duplicate ID for tab host page");
_tabControl.addTab(widget.id, labelResourceId, iconId, enableCloseButton);
addChild(widget);
return this;
}
/// select tab
void selectTab(string ID) {
int index = _tabControl.tabIndex(ID);
if (index != -1) {
_tabControl.selectTab(index);
}
}
// /// request relayout of widget and its children
// override void requestLayout() {
// Log.d("TabHost.requestLayout called");
// super.requestLayout();
// //_needLayout = true;
// }
// /// Set widget rectangle to specified value and layout widget contents. (Step 2 of two phase layout).
// override void layout(Rect rc) {
// Log.d("TabHost.layout() called");
// super.layout(rc);
// Log.d("after layout(): needLayout = ", needLayout);
// }
}
/// compound widget - contains from TabControl widget (tabs header) and TabHost (content pages)
class TabWidget : VerticalLayout, TabHandler {
protected TabControl _tabControl;
protected TabHost _tabHost;
this(string ID) {
super(ID);
_tabControl = new TabControl("TAB_CONTROL");
_tabHost = new TabHost("TAB_HOST", _tabControl);
_tabControl.onTabChangedListener.connect(this);
styleId = "TAB_WIDGET";
addChild(_tabControl);
addChild(_tabHost);
}
/// signal of tab change (e.g. by clicking on tab header)
Signal!TabHandler onTabChangedListener;
protected override void onTabChanged(string newActiveTabId, string previousTabId) {
// forward to listener
if (onTabChangedListener.assigned)
onTabChangedListener(newActiveTabId, previousTabId);
}
/// add new tab by id and label string resource id
TabWidget addTab(Widget widget, string labelResourceId, string iconId = null, bool enableCloseButton = false) {
_tabHost.addTab(widget, labelResourceId, iconId, enableCloseButton);
return this;
}
/// add new tab by id and label (raw value)
TabWidget addTab(Widget widget, dstring label, string iconId = null, bool enableCloseButton = false) {
_tabHost.addTab(widget, label, iconId, enableCloseButton);
return this;
}
/// remove tab by id
TabWidget removeTab(string id) {
_tabHost.removeTab(id);
requestLayout();
return this;
}
/// select tab
void selectTab(string ID) {
_tabHost.selectTab(ID);
}
/// returns tab item by id (null if index out of range)
TabItem tab(int index) {
return _tabControl.tab(index);
}
/// returns tab item by id (null if not found)
TabItem tab(string id) {
return _tabControl.tab(id);
}
/// get tab index by tab id (-1 if not found)
int tabIndex(string id) {
return _tabControl.tabIndex(id);
}
}
|
D
|
/Users/rrunfa/Desktop/RxIssuesSample/.build/x86_64-apple-macosx10.10/debug/Moya.build/Response.swift.o : /Users/rrunfa/Desktop/RxIssuesSample/.build/checkouts/Moya.git--5230867493987625585/Sources/Moya/MultipartFormData.swift /Users/rrunfa/Desktop/RxIssuesSample/.build/checkouts/Moya.git--5230867493987625585/Sources/Moya/URL+Moya.swift /Users/rrunfa/Desktop/RxIssuesSample/.build/checkouts/Moya.git--5230867493987625585/Sources/Moya/Image.swift /Users/rrunfa/Desktop/RxIssuesSample/.build/checkouts/Moya.git--5230867493987625585/Sources/Moya/AnyEncodable.swift /Users/rrunfa/Desktop/RxIssuesSample/.build/checkouts/Moya.git--5230867493987625585/Sources/Moya/Cancellable.swift /Users/rrunfa/Desktop/RxIssuesSample/.build/checkouts/Moya.git--5230867493987625585/Sources/Moya/ValidationType.swift /Users/rrunfa/Desktop/RxIssuesSample/.build/checkouts/Moya.git--5230867493987625585/Sources/Moya/TargetType.swift /Users/rrunfa/Desktop/RxIssuesSample/.build/checkouts/Moya.git--5230867493987625585/Sources/Moya/Moya+Alamofire.swift /Users/rrunfa/Desktop/RxIssuesSample/.build/checkouts/Moya.git--5230867493987625585/Sources/Moya/Response.swift /Users/rrunfa/Desktop/RxIssuesSample/.build/checkouts/Moya.git--5230867493987625585/Sources/Moya/URLRequest+Encoding.swift /Users/rrunfa/Desktop/RxIssuesSample/.build/checkouts/Moya.git--5230867493987625585/Sources/Moya/Task.swift /Users/rrunfa/Desktop/RxIssuesSample/.build/checkouts/Moya.git--5230867493987625585/Sources/Moya/MoyaProvider+Internal.swift /Users/rrunfa/Desktop/RxIssuesSample/.build/checkouts/Moya.git--5230867493987625585/Sources/Moya/Plugin.swift /Users/rrunfa/Desktop/RxIssuesSample/.build/checkouts/Moya.git--5230867493987625585/Sources/Moya/Plugins/AccessTokenPlugin.swift /Users/rrunfa/Desktop/RxIssuesSample/.build/checkouts/Moya.git--5230867493987625585/Sources/Moya/Plugins/NetworkLoggerPlugin.swift /Users/rrunfa/Desktop/RxIssuesSample/.build/checkouts/Moya.git--5230867493987625585/Sources/Moya/Plugins/CredentialsPlugin.swift /Users/rrunfa/Desktop/RxIssuesSample/.build/checkouts/Moya.git--5230867493987625585/Sources/Moya/Plugins/NetworkActivityPlugin.swift /Users/rrunfa/Desktop/RxIssuesSample/.build/checkouts/Moya.git--5230867493987625585/Sources/Moya/MoyaProvider.swift /Users/rrunfa/Desktop/RxIssuesSample/.build/checkouts/Moya.git--5230867493987625585/Sources/Moya/MoyaError.swift /Users/rrunfa/Desktop/RxIssuesSample/.build/checkouts/Moya.git--5230867493987625585/Sources/Moya/MoyaProvider+Defaults.swift /Users/rrunfa/Desktop/RxIssuesSample/.build/checkouts/Moya.git--5230867493987625585/Sources/Moya/MultiTarget.swift /Users/rrunfa/Desktop/RxIssuesSample/.build/checkouts/Moya.git--5230867493987625585/Sources/Moya/Endpoint.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/XPC.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/ObjectiveC.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/CoreData.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/CoreImage.swiftmodule /Users/rrunfa/Desktop/RxIssuesSample/.build/x86_64-apple-macosx10.10/debug/Alamofire.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/QuartzCore.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/Metal.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/CoreFoundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/CoreGraphics.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/IOKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/AppKit.swiftmodule /Users/rrunfa/Desktop/RxIssuesSample/.build/x86_64-apple-macosx10.10/debug/Result.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/SwiftOnoneSupport.swiftmodule /Users/rrunfa/Desktop/RxIssuesSample/.build/x86_64-apple-macosx10.10/debug/RxCocoaRuntime.build/module.modulemap /Users/rrunfa/Desktop/RxIssuesSample/.build/x86_64-apple-macosx10.10/debug/QuickSpecBase.build/module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/include/xpc/XPC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/CoreData.framework/Headers/CoreData.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImage.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/QuartzCore.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/AppKit.framework/Headers/AppKit.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes
/Users/rrunfa/Desktop/RxIssuesSample/.build/x86_64-apple-macosx10.10/debug/Moya.build/Response~partial.swiftmodule : /Users/rrunfa/Desktop/RxIssuesSample/.build/checkouts/Moya.git--5230867493987625585/Sources/Moya/MultipartFormData.swift /Users/rrunfa/Desktop/RxIssuesSample/.build/checkouts/Moya.git--5230867493987625585/Sources/Moya/URL+Moya.swift /Users/rrunfa/Desktop/RxIssuesSample/.build/checkouts/Moya.git--5230867493987625585/Sources/Moya/Image.swift /Users/rrunfa/Desktop/RxIssuesSample/.build/checkouts/Moya.git--5230867493987625585/Sources/Moya/AnyEncodable.swift /Users/rrunfa/Desktop/RxIssuesSample/.build/checkouts/Moya.git--5230867493987625585/Sources/Moya/Cancellable.swift /Users/rrunfa/Desktop/RxIssuesSample/.build/checkouts/Moya.git--5230867493987625585/Sources/Moya/ValidationType.swift /Users/rrunfa/Desktop/RxIssuesSample/.build/checkouts/Moya.git--5230867493987625585/Sources/Moya/TargetType.swift /Users/rrunfa/Desktop/RxIssuesSample/.build/checkouts/Moya.git--5230867493987625585/Sources/Moya/Moya+Alamofire.swift /Users/rrunfa/Desktop/RxIssuesSample/.build/checkouts/Moya.git--5230867493987625585/Sources/Moya/Response.swift /Users/rrunfa/Desktop/RxIssuesSample/.build/checkouts/Moya.git--5230867493987625585/Sources/Moya/URLRequest+Encoding.swift /Users/rrunfa/Desktop/RxIssuesSample/.build/checkouts/Moya.git--5230867493987625585/Sources/Moya/Task.swift /Users/rrunfa/Desktop/RxIssuesSample/.build/checkouts/Moya.git--5230867493987625585/Sources/Moya/MoyaProvider+Internal.swift /Users/rrunfa/Desktop/RxIssuesSample/.build/checkouts/Moya.git--5230867493987625585/Sources/Moya/Plugin.swift /Users/rrunfa/Desktop/RxIssuesSample/.build/checkouts/Moya.git--5230867493987625585/Sources/Moya/Plugins/AccessTokenPlugin.swift /Users/rrunfa/Desktop/RxIssuesSample/.build/checkouts/Moya.git--5230867493987625585/Sources/Moya/Plugins/NetworkLoggerPlugin.swift /Users/rrunfa/Desktop/RxIssuesSample/.build/checkouts/Moya.git--5230867493987625585/Sources/Moya/Plugins/CredentialsPlugin.swift /Users/rrunfa/Desktop/RxIssuesSample/.build/checkouts/Moya.git--5230867493987625585/Sources/Moya/Plugins/NetworkActivityPlugin.swift /Users/rrunfa/Desktop/RxIssuesSample/.build/checkouts/Moya.git--5230867493987625585/Sources/Moya/MoyaProvider.swift /Users/rrunfa/Desktop/RxIssuesSample/.build/checkouts/Moya.git--5230867493987625585/Sources/Moya/MoyaError.swift /Users/rrunfa/Desktop/RxIssuesSample/.build/checkouts/Moya.git--5230867493987625585/Sources/Moya/MoyaProvider+Defaults.swift /Users/rrunfa/Desktop/RxIssuesSample/.build/checkouts/Moya.git--5230867493987625585/Sources/Moya/MultiTarget.swift /Users/rrunfa/Desktop/RxIssuesSample/.build/checkouts/Moya.git--5230867493987625585/Sources/Moya/Endpoint.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/XPC.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/ObjectiveC.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/CoreData.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/CoreImage.swiftmodule /Users/rrunfa/Desktop/RxIssuesSample/.build/x86_64-apple-macosx10.10/debug/Alamofire.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/QuartzCore.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/Metal.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/CoreFoundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/CoreGraphics.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/IOKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/AppKit.swiftmodule /Users/rrunfa/Desktop/RxIssuesSample/.build/x86_64-apple-macosx10.10/debug/Result.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/SwiftOnoneSupport.swiftmodule /Users/rrunfa/Desktop/RxIssuesSample/.build/x86_64-apple-macosx10.10/debug/RxCocoaRuntime.build/module.modulemap /Users/rrunfa/Desktop/RxIssuesSample/.build/x86_64-apple-macosx10.10/debug/QuickSpecBase.build/module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/include/xpc/XPC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/CoreData.framework/Headers/CoreData.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImage.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/QuartzCore.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/AppKit.framework/Headers/AppKit.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes
/Users/rrunfa/Desktop/RxIssuesSample/.build/x86_64-apple-macosx10.10/debug/Moya.build/Response~partial.swiftdoc : /Users/rrunfa/Desktop/RxIssuesSample/.build/checkouts/Moya.git--5230867493987625585/Sources/Moya/MultipartFormData.swift /Users/rrunfa/Desktop/RxIssuesSample/.build/checkouts/Moya.git--5230867493987625585/Sources/Moya/URL+Moya.swift /Users/rrunfa/Desktop/RxIssuesSample/.build/checkouts/Moya.git--5230867493987625585/Sources/Moya/Image.swift /Users/rrunfa/Desktop/RxIssuesSample/.build/checkouts/Moya.git--5230867493987625585/Sources/Moya/AnyEncodable.swift /Users/rrunfa/Desktop/RxIssuesSample/.build/checkouts/Moya.git--5230867493987625585/Sources/Moya/Cancellable.swift /Users/rrunfa/Desktop/RxIssuesSample/.build/checkouts/Moya.git--5230867493987625585/Sources/Moya/ValidationType.swift /Users/rrunfa/Desktop/RxIssuesSample/.build/checkouts/Moya.git--5230867493987625585/Sources/Moya/TargetType.swift /Users/rrunfa/Desktop/RxIssuesSample/.build/checkouts/Moya.git--5230867493987625585/Sources/Moya/Moya+Alamofire.swift /Users/rrunfa/Desktop/RxIssuesSample/.build/checkouts/Moya.git--5230867493987625585/Sources/Moya/Response.swift /Users/rrunfa/Desktop/RxIssuesSample/.build/checkouts/Moya.git--5230867493987625585/Sources/Moya/URLRequest+Encoding.swift /Users/rrunfa/Desktop/RxIssuesSample/.build/checkouts/Moya.git--5230867493987625585/Sources/Moya/Task.swift /Users/rrunfa/Desktop/RxIssuesSample/.build/checkouts/Moya.git--5230867493987625585/Sources/Moya/MoyaProvider+Internal.swift /Users/rrunfa/Desktop/RxIssuesSample/.build/checkouts/Moya.git--5230867493987625585/Sources/Moya/Plugin.swift /Users/rrunfa/Desktop/RxIssuesSample/.build/checkouts/Moya.git--5230867493987625585/Sources/Moya/Plugins/AccessTokenPlugin.swift /Users/rrunfa/Desktop/RxIssuesSample/.build/checkouts/Moya.git--5230867493987625585/Sources/Moya/Plugins/NetworkLoggerPlugin.swift /Users/rrunfa/Desktop/RxIssuesSample/.build/checkouts/Moya.git--5230867493987625585/Sources/Moya/Plugins/CredentialsPlugin.swift /Users/rrunfa/Desktop/RxIssuesSample/.build/checkouts/Moya.git--5230867493987625585/Sources/Moya/Plugins/NetworkActivityPlugin.swift /Users/rrunfa/Desktop/RxIssuesSample/.build/checkouts/Moya.git--5230867493987625585/Sources/Moya/MoyaProvider.swift /Users/rrunfa/Desktop/RxIssuesSample/.build/checkouts/Moya.git--5230867493987625585/Sources/Moya/MoyaError.swift /Users/rrunfa/Desktop/RxIssuesSample/.build/checkouts/Moya.git--5230867493987625585/Sources/Moya/MoyaProvider+Defaults.swift /Users/rrunfa/Desktop/RxIssuesSample/.build/checkouts/Moya.git--5230867493987625585/Sources/Moya/MultiTarget.swift /Users/rrunfa/Desktop/RxIssuesSample/.build/checkouts/Moya.git--5230867493987625585/Sources/Moya/Endpoint.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/XPC.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/ObjectiveC.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/CoreData.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/CoreImage.swiftmodule /Users/rrunfa/Desktop/RxIssuesSample/.build/x86_64-apple-macosx10.10/debug/Alamofire.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/QuartzCore.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/Metal.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/CoreFoundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/CoreGraphics.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/IOKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/AppKit.swiftmodule /Users/rrunfa/Desktop/RxIssuesSample/.build/x86_64-apple-macosx10.10/debug/Result.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/SwiftOnoneSupport.swiftmodule /Users/rrunfa/Desktop/RxIssuesSample/.build/x86_64-apple-macosx10.10/debug/RxCocoaRuntime.build/module.modulemap /Users/rrunfa/Desktop/RxIssuesSample/.build/x86_64-apple-macosx10.10/debug/QuickSpecBase.build/module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/include/xpc/XPC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/CoreData.framework/Headers/CoreData.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImage.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/QuartzCore.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/AppKit.framework/Headers/AppKit.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes
|
D
|
*PADS-LIBRARY-PCB-DECALS-V9*
BGA312C113P42X31_4900X3600X340 I 0 0 0 2 9 0 292 292 0
-977.52 720.79 0 0 70.22 7.022 1 0 106 "Default Font"
REF-DES
-977.06 -799.41 0 0 70.19 7.019 1 0 107 "Default Font"
PART-TYPE
OPEN 2 5 26 -1
-964.57 708.66
-964.57 -708.66
OPEN 2 5 26 -1
-964.57 -708.66
964.57 -708.66
OPEN 2 5 26 -1
964.57 -708.66
964.57 708.66
OPEN 2 5 26 -1
964.57 708.66
-964.57 708.66
OPEN 2 1.97 20 -1
-974.41 718.5
-974.41 -718.5
OPEN 2 1.97 20 -1
-974.41 -718.5
974.41 -718.5
OPEN 2 1.97 20 -1
974.41 -718.5
974.41 718.5
OPEN 2 1.97 20 -1
974.41 718.5
-974.41 718.5
COPCIR 2 10 26 -1
-1005.91 669.29
-986.22 669.29
T -912.01 667.32 -912.01 667.32 PA1
T -511.61 667.32 -511.61 667.32 PA10
T -467.13 667.32 -467.13 667.32 PA11
T -422.64 667.32 -422.64 667.32 PA12
T -378.15 667.32 -378.15 667.32 PA13
T -333.66 667.32 -333.66 667.32 PA14
T -289.17 667.32 -289.17 667.32 PA15
T -244.69 667.32 -244.69 667.32 PA16
T -200.2 667.32 -200.2 667.32 PA17
T -155.71 667.32 -155.71 667.32 PA18
T -111.22 667.32 -111.22 667.32 PA19
T -867.52 667.32 -867.52 667.32 PA2
T -66.73 667.32 -66.73 667.32 PA20
T -22.24 667.32 -22.24 667.32 PA21
T 22.24 667.32 22.24 667.32 PA22
T 66.73 667.32 66.73 667.32 PA23
T 111.22 667.32 111.22 667.32 PA24
T 155.71 667.32 155.71 667.32 PA25
T 200.2 667.32 200.2 667.32 PA26
T 244.69 667.32 244.69 667.32 PA27
T 289.17 667.32 289.17 667.32 PA28
T 333.66 667.32 333.66 667.32 PA29
T -823.03 667.32 -823.03 667.32 PA3
T 378.15 667.32 378.15 667.32 PA30
T 422.64 667.32 422.64 667.32 PA31
T 467.13 667.32 467.13 667.32 PA32
T 511.61 667.32 511.61 667.32 PA33
T 556.1 667.32 556.1 667.32 PA34
T 600.59 667.32 600.59 667.32 PA35
T 645.08 667.32 645.08 667.32 PA36
T 689.57 667.32 689.57 667.32 PA37
T 734.06 667.32 734.06 667.32 PA38
T 778.54 667.32 778.54 667.32 PA39
T 823.03 667.32 823.03 667.32 PA40
T 867.52 667.32 867.52 667.32 PA41
T 912.01 667.32 912.01 667.32 PA42
T -734.06 667.32 -734.06 667.32 PA5
T -689.57 667.32 -689.57 667.32 PA6
T -645.08 667.32 -645.08 667.32 PA7
T -600.59 667.32 -600.59 667.32 PA8
T -556.1 667.32 -556.1 667.32 PA9
T -912.01 -222.44 -912.01 -222.44 PAA1
T -867.52 -222.44 -867.52 -222.44 PAA2
T 867.52 -222.44 867.52 -222.44 PAA41
T 912.01 -222.44 912.01 -222.44 PAA42
T -912.01 -266.93 -912.01 -266.93 PAB1
T -867.52 -266.93 -867.52 -266.93 PAB2
T 867.52 -266.93 867.52 -266.93 PAB41
T 912.01 -266.93 912.01 -266.93 PAB42
T -912.01 -311.42 -912.01 -311.42 PAC1
T -867.52 -311.42 -867.52 -311.42 PAC2
T 867.52 -311.42 867.52 -311.42 PAC41
T 912.01 -311.42 912.01 -311.42 PAC42
T -912.01 -355.91 -912.01 -355.91 PAD1
T -867.52 -355.91 -867.52 -355.91 PAD2
T 867.52 -355.91 867.52 -355.91 PAD41
T 912.01 -355.91 912.01 -355.91 PAD42
T -912.01 -400.39 -912.01 -400.39 PAE1
T -867.52 -400.39 -867.52 -400.39 PAE2
T 867.52 -400.39 867.52 -400.39 PAE41
T 912.01 -400.39 912.01 -400.39 PAE42
T -912.01 -444.88 -912.01 -444.88 PAF1
T -867.52 -444.88 -867.52 -444.88 PAF2
T 867.52 -444.88 867.52 -444.88 PAF41
T 912.01 -444.88 912.01 -444.88 PAF42
T -912.01 -489.37 -912.01 -489.37 PAG1
T -867.52 -489.37 -867.52 -489.37 PAG2
T 867.52 -489.37 867.52 -489.37 PAG41
T 912.01 -489.37 912.01 -489.37 PAG42
T -912.01 -533.86 -912.01 -533.86 PAH1
T -867.52 -533.86 -867.52 -533.86 PAH2
T 867.52 -533.86 867.52 -533.86 PAH41
T 912.01 -533.86 912.01 -533.86 PAH42
T -912.01 -578.35 -912.01 -578.35 PAJ1
T -867.52 -578.35 -867.52 -578.35 PAJ2
T 778.54 -578.35 778.54 -578.35 PAJ39
T 823.03 -578.35 823.03 -578.35 PAJ40
T 867.52 -578.35 867.52 -578.35 PAJ41
T 912.01 -578.35 912.01 -578.35 PAJ42
T -912.01 -622.83 -912.01 -622.83 PAK1
T -511.61 -622.83 -511.61 -622.83 PAK10
T -467.13 -622.83 -467.13 -622.83 PAK11
T -422.64 -622.83 -422.64 -622.83 PAK12
T -378.15 -622.83 -378.15 -622.83 PAK13
T -333.66 -622.83 -333.66 -622.83 PAK14
T -289.17 -622.83 -289.17 -622.83 PAK15
T -244.69 -622.83 -244.69 -622.83 PAK16
T -200.2 -622.83 -200.2 -622.83 PAK17
T -155.71 -622.83 -155.71 -622.83 PAK18
T -111.22 -622.83 -111.22 -622.83 PAK19
T -867.52 -622.83 -867.52 -622.83 PAK2
T -66.73 -622.83 -66.73 -622.83 PAK20
T -22.24 -622.83 -22.24 -622.83 PAK21
T 22.24 -622.83 22.24 -622.83 PAK22
T 66.73 -622.83 66.73 -622.83 PAK23
T 111.22 -622.83 111.22 -622.83 PAK24
T 155.71 -622.83 155.71 -622.83 PAK25
T 200.2 -622.83 200.2 -622.83 PAK26
T 244.69 -622.83 244.69 -622.83 PAK27
T 289.17 -622.83 289.17 -622.83 PAK28
T 333.66 -622.83 333.66 -622.83 PAK29
T -823.03 -622.83 -823.03 -622.83 PAK3
T 378.15 -622.83 378.15 -622.83 PAK30
T 422.64 -622.83 422.64 -622.83 PAK31
T 467.13 -622.83 467.13 -622.83 PAK32
T 511.61 -622.83 511.61 -622.83 PAK33
T 556.1 -622.83 556.1 -622.83 PAK34
T 600.59 -622.83 600.59 -622.83 PAK35
T 645.08 -622.83 645.08 -622.83 PAK36
T 689.57 -622.83 689.57 -622.83 PAK37
T 734.06 -622.83 734.06 -622.83 PAK38
T 778.54 -622.83 778.54 -622.83 PAK39
T -778.54 -622.83 -778.54 -622.83 PAK4
T 823.03 -622.83 823.03 -622.83 PAK40
T 867.52 -622.83 867.52 -622.83 PAK41
T 912.01 -622.83 912.01 -622.83 PAK42
T -734.06 -622.83 -734.06 -622.83 PAK5
T -689.57 -622.83 -689.57 -622.83 PAK6
T -645.08 -622.83 -645.08 -622.83 PAK7
T -600.59 -622.83 -600.59 -622.83 PAK8
T -556.1 -622.83 -556.1 -622.83 PAK9
T -912.01 -667.32 -912.01 -667.32 PAL1
T -511.61 -667.32 -511.61 -667.32 PAL10
T -467.13 -667.32 -467.13 -667.32 PAL11
T -422.64 -667.32 -422.64 -667.32 PAL12
T -378.15 -667.32 -378.15 -667.32 PAL13
T -333.66 -667.32 -333.66 -667.32 PAL14
T -289.17 -667.32 -289.17 -667.32 PAL15
T -244.69 -667.32 -244.69 -667.32 PAL16
T -200.2 -667.32 -200.2 -667.32 PAL17
T -155.71 -667.32 -155.71 -667.32 PAL18
T -111.22 -667.32 -111.22 -667.32 PAL19
T -867.52 -667.32 -867.52 -667.32 PAL2
T -66.73 -667.32 -66.73 -667.32 PAL20
T -22.24 -667.32 -22.24 -667.32 PAL21
T 22.24 -667.32 22.24 -667.32 PAL22
T 66.73 -667.32 66.73 -667.32 PAL23
T 111.22 -667.32 111.22 -667.32 PAL24
T 155.71 -667.32 155.71 -667.32 PAL25
T 200.2 -667.32 200.2 -667.32 PAL26
T 244.69 -667.32 244.69 -667.32 PAL27
T 289.17 -667.32 289.17 -667.32 PAL28
T 333.66 -667.32 333.66 -667.32 PAL29
T -823.03 -667.32 -823.03 -667.32 PAL3
T 378.15 -667.32 378.15 -667.32 PAL30
T 422.64 -667.32 422.64 -667.32 PAL31
T 467.13 -667.32 467.13 -667.32 PAL32
T 511.61 -667.32 511.61 -667.32 PAL33
T 556.1 -667.32 556.1 -667.32 PAL34
T 600.59 -667.32 600.59 -667.32 PAL35
T 645.08 -667.32 645.08 -667.32 PAL36
T 689.57 -667.32 689.57 -667.32 PAL37
T 734.06 -667.32 734.06 -667.32 PAL38
T 778.54 -667.32 778.54 -667.32 PAL39
T -778.54 -667.32 -778.54 -667.32 PAL4
T 823.03 -667.32 823.03 -667.32 PAL40
T 867.52 -667.32 867.52 -667.32 PAL41
T 912.01 -667.32 912.01 -667.32 PAL42
T -734.06 -667.32 -734.06 -667.32 PAL5
T -689.57 -667.32 -689.57 -667.32 PAL6
T -645.08 -667.32 -645.08 -667.32 PAL7
T -600.59 -667.32 -600.59 -667.32 PAL8
T -556.1 -667.32 -556.1 -667.32 PAL9
T -912.01 622.83 -912.01 622.83 PB1
T -511.61 622.83 -511.61 622.83 PB10
T -467.13 622.83 -467.13 622.83 PB11
T -422.64 622.83 -422.64 622.83 PB12
T -378.15 622.83 -378.15 622.83 PB13
T -333.66 622.83 -333.66 622.83 PB14
T -289.17 622.83 -289.17 622.83 PB15
T -244.69 622.83 -244.69 622.83 PB16
T -200.2 622.83 -200.2 622.83 PB17
T -155.71 622.83 -155.71 622.83 PB18
T -111.22 622.83 -111.22 622.83 PB19
T -867.52 622.83 -867.52 622.83 PB2
T -66.73 622.83 -66.73 622.83 PB20
T -22.24 622.83 -22.24 622.83 PB21
T 22.24 622.83 22.24 622.83 PB22
T 66.73 622.83 66.73 622.83 PB23
T 111.22 622.83 111.22 622.83 PB24
T 155.71 622.83 155.71 622.83 PB25
T 200.2 622.83 200.2 622.83 PB26
T 244.69 622.83 244.69 622.83 PB27
T 289.17 622.83 289.17 622.83 PB28
T 333.66 622.83 333.66 622.83 PB29
T -823.03 622.83 -823.03 622.83 PB3
T 378.15 622.83 378.15 622.83 PB30
T 422.64 622.83 422.64 622.83 PB31
T 467.13 622.83 467.13 622.83 PB32
T 511.61 622.83 511.61 622.83 PB33
T 556.1 622.83 556.1 622.83 PB34
T 600.59 622.83 600.59 622.83 PB35
T 645.08 622.83 645.08 622.83 PB36
T 689.57 622.83 689.57 622.83 PB37
T 734.06 622.83 734.06 622.83 PB38
T 778.54 622.83 778.54 622.83 PB39
T -778.54 622.83 -778.54 622.83 PB4
T 823.03 622.83 823.03 622.83 PB40
T 867.52 622.83 867.52 622.83 PB41
T 912.01 622.83 912.01 622.83 PB42
T -734.06 622.83 -734.06 622.83 PB5
T -689.57 622.83 -689.57 622.83 PB6
T -645.08 622.83 -645.08 622.83 PB7
T -600.59 622.83 -600.59 622.83 PB8
T -556.1 622.83 -556.1 622.83 PB9
T -912.01 578.35 -912.01 578.35 PC1
T 778.54 578.35 778.54 578.35 PC39
T 823.03 578.35 823.03 578.35 PC40
T 867.52 578.35 867.52 578.35 PC41
T 912.01 578.35 912.01 578.35 PC42
T -912.01 533.86 -912.01 533.86 PD1
T 867.52 533.86 867.52 533.86 PD41
T 912.01 533.86 912.01 533.86 PD42
T -912.01 489.37 -912.01 489.37 PE1
T -867.52 489.37 -867.52 489.37 PE2
T 867.52 489.37 867.52 489.37 PE41
T 912.01 489.37 912.01 489.37 PE42
T -912.01 444.88 -912.01 444.88 PF1
T -867.52 444.88 -867.52 444.88 PF2
T 867.52 444.88 867.52 444.88 PF41
T 912.01 444.88 912.01 444.88 PF42
T -912.01 400.39 -912.01 400.39 PG1
T 867.52 400.39 867.52 400.39 PG41
T 912.01 400.39 912.01 400.39 PG42
T -912.01 355.91 -912.01 355.91 PH1
T 867.52 355.91 867.52 355.91 PH41
T 912.01 355.91 912.01 355.91 PH42
T -912.01 311.42 -912.01 311.42 PJ1
T -867.52 311.42 -867.52 311.42 PJ2
T 867.52 311.42 867.52 311.42 PJ41
T 912.01 311.42 912.01 311.42 PJ42
T -912.01 266.93 -912.01 266.93 PK1
T -867.52 266.93 -867.52 266.93 PK2
T 867.52 266.93 867.52 266.93 PK41
T 912.01 266.93 912.01 266.93 PK42
T -912.01 222.44 -912.01 222.44 PL1
T -867.52 222.44 -867.52 222.44 PL2
T 867.52 222.44 867.52 222.44 PL41
T 912.01 222.44 912.01 222.44 PL42
T -912.01 177.95 -912.01 177.95 PM1
T -867.52 177.95 -867.52 177.95 PM2
T 867.52 177.95 867.52 177.95 PM41
T 912.01 177.95 912.01 177.95 PM42
T -912.01 133.46 -912.01 133.46 PN1
T -867.52 133.46 -867.52 133.46 PN2
T 867.52 133.46 867.52 133.46 PN41
T 912.01 133.46 912.01 133.46 PN42
T -912.01 88.98 -912.01 88.98 PP1
T 867.52 88.98 867.52 88.98 PP41
T 912.01 88.98 912.01 88.98 PP42
T -912.01 44.49 -912.01 44.49 PR1
T -867.52 44.49 -867.52 44.49 PR2
T 867.52 44.49 867.52 44.49 PR41
T 912.01 44.49 912.01 44.49 PR42
T -912.01 0 -912.01 0 PT1
T -867.52 0 -867.52 0 PT2
T 867.52 0 867.52 0 PT41
T 912.01 0 912.01 0 PT42
T -912.01 -44.49 -912.01 -44.49 PU1
T 867.52 -44.49 867.52 -44.49 PU41
T 912.01 -44.49 912.01 -44.49 PU42
T -912.01 -88.98 -912.01 -88.98 PV1
T 867.52 -88.98 867.52 -88.98 PV41
T 912.01 -88.98 912.01 -88.98 PV42
T -912.01 -133.46 -912.01 -133.46 PW1
T -867.52 -133.46 -867.52 -133.46 PW2
T 867.52 -133.46 867.52 -133.46 PW41
T 912.01 -133.46 912.01 -133.46 PW42
T -912.01 -177.95 -912.01 -177.95 PY1
T -867.52 -177.95 -867.52 -177.95 PY2
T 867.52 -177.95 867.52 -177.95 PY41
T 912.01 -177.95 912.01 -177.95 PY42
T 528.15 260.63 528.15 260.63 TP282
T 483.66 305.12 483.66 305.12 TP283
T 528.15 305.12 528.15 305.12 TP284
T 528.15 216.14 528.15 216.14 TP285
T 439.17 305.12 439.17 305.12 TP286
T 528.15 -260.63 528.15 -260.63 TP287
T -483.66 305.12 -483.66 305.12 TP288
T 483.66 -305.12 483.66 -305.12 TP289
T 439.17 -305.12 439.17 -305.12 TP290
T -394.69 -305.12 -394.69 -305.12 TP291
T -483.66 260.63 -483.66 260.63 TP292
T -394.69 305.12 -394.69 305.12 TP293
T -483.66 -216.14 -483.66 -216.14 TP294
T -439.17 305.12 -439.17 305.12 TP295
T -483.66 -305.12 -483.66 -305.12 TP296
T -483.66 -260.63 -483.66 -260.63 TP297
T -439.17 -305.12 -439.17 -305.12 TP298
T 528.15 -305.12 528.15 -305.12 TP299
T -483.66 216.14 -483.66 216.14 TP300
T 528.15 -216.14 528.15 -216.14 TP301
PAD 1 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 2 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 3 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 4 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 5 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 6 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 7 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 8 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 9 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 10 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 11 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 12 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 13 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 14 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 15 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 16 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 17 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 18 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 19 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 20 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 21 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 22 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 23 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 24 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 25 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 26 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 27 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 28 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 29 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 30 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 31 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 32 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 33 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 34 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 35 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 36 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 37 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 38 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 39 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 40 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 41 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 42 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 43 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 44 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 45 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 46 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 47 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 48 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 49 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 50 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 51 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 52 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 53 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 54 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 55 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 56 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 57 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 58 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 59 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 60 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 61 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 62 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 63 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 64 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 65 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 66 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 67 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 68 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 69 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 70 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 71 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 72 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 73 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 74 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 75 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 76 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 77 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 78 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 79 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 80 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 81 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 82 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 83 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 84 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 85 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 86 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 87 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 88 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 89 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 90 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 91 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 92 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 93 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 94 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 95 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 96 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 97 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 98 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 99 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 100 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 101 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 102 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 103 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 104 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 105 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 106 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 107 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 108 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 109 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 110 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 111 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 112 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 113 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 114 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 115 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 116 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 117 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 118 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 119 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 120 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 121 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 122 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 123 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 124 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 125 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 126 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 127 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 128 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 129 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 130 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 131 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 132 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 133 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 134 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 135 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 136 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 137 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 138 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 139 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 140 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 141 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 142 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 143 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 144 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 145 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 146 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 147 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 148 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 149 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 150 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 151 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 152 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 153 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 154 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 155 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 156 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 157 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 158 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 159 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 160 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 161 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 162 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 163 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 164 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 165 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 166 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 167 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 168 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 169 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 170 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 171 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 172 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 173 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 174 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 175 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 176 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 177 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 178 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 179 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 180 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 181 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 182 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 183 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 184 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 185 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 186 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 187 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 188 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 189 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 190 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 191 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 192 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 193 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 194 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 195 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 196 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 197 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 198 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 199 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 200 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 201 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 202 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 203 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 204 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 205 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 206 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 207 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 208 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 209 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 210 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 211 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 212 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 213 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 214 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 215 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 216 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 217 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 218 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 219 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 220 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 221 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 222 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 223 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 224 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 225 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 226 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 227 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 228 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 229 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 230 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 231 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 232 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 233 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 234 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 235 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 236 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 237 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 238 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 239 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 240 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 241 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 242 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 243 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 244 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 245 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 246 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 247 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 248 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 249 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 250 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 251 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 252 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 253 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 254 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 255 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 256 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 257 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 258 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 259 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 260 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 261 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 262 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 263 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 264 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 265 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 266 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 267 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 268 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 269 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 270 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 271 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 272 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 273 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 274 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 275 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 276 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 277 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 278 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 279 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 280 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 281 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 282 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 283 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 284 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 285 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 286 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 287 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 288 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 289 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 290 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 291 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
PAD 292 3 P 0
1 21.26 RF 10.62 0 21.26 0
21 21.26 RF 10.62 0 21.26 0
23 21.26 RF 10.62 0 21.26 0
*END*
|
D
|
/*******************************************************************************
copyright: Copyright (c) 2005 Kris. все rights reserved
license: BSD стиль: $(LICENSE)
version: Initial release: 2005
author: Kris, Keinfarbton
Модуль предоставляет систему общецелевого форматирования для
преобразования значений в текст, удобный для отображения. Есть поддержка
размещению, выравниванию и общих определителей формата для
чисел.
Выкладка может быть адаптирована путём конфигурирования различных указателей
и связанных с ней мета-данных. Это можно применить для plug in текст.локаль
для обработки частных форматов, дата/время и специфичных для культуры
преобразований.
The форматируй notation is influenced by that использован by the .NET
и ICU frameworks, rather than C-стиль printf or D-стиль
writef notation.
******************************************************************************/
module text.convert.Layout;
private import exception;
private import Utf = text.convert.Utf;
private import Плав = text.convert.Float,
Целое = text.convert.Integer;
private import io.model : ИПотокВывода;
version(СВариантом)
private import core.Variant;
version(СРасширениями)
private import text.convert.Extentions;
else
version (СДатойВременем)
{
private import time.Time;
private import text.convert.DateTime;
}
/*******************************************************************************
Platform issues ...
*******************************************************************************/
version (GNU)
{
private import tpl.args;
alias ук Арг;
alias спис_ва АргСписок;
}
else version(LDC)
{
private import tpl.args;
alias ук Арг;
alias спис_ва АргСписок;
}
else
{
alias ук Арг;
alias ук АргСписок;
}
/*******************************************************************************
Contains methods for replacing форматируй items in a ткст with ткст
equivalents of each аргумент.
*******************************************************************************/
class Выкладка(T)
{
public alias преобразуй opCall;
public alias бцел delegate (T[]) Сток;
static if (is (typeof(МестнДатаВремя)))
private МестнДатаВремя* датаВремя = &ДефДатаВремя;
/**********************************************************************
Return shared экземпляр
Note that this is not threadsafe, и that static-ctor
usage doesn't получи invoked appropriately (compiler bug)
**********************************************************************/
static Выкладка экземпляр ()
{
static Выкладка common;
if (common is пусто)
common = new Выкладка!(T);
return common;
}
/**********************************************************************
**********************************************************************/
public final T[] sprint (T[] результат, T[] строкаФмт, ...)
{
return vprint (результат, строкаФмт, _arguments, _argptr);
}
/**********************************************************************
**********************************************************************/
public final T[] vprint (T[] результат, T[] строкаФмт, ИнфОТипе[] аргументы, АргСписок арги)
{
T* p = результат.ptr;
цел available = результат.length;
бцел сток (T[] s)
{
цел длин = s.length;
if (длин > available)
длин = available;
available -= длин;
p [0..длин] = s[0..длин];
p += длин;
return длин;
}
преобразуй (&сток, аргументы, арги, строкаФмт);
return результат [0 .. p-результат.ptr];
}
/**********************************************************************
Replaces the _format item in a ткст with the ткст
equivalent of each аргумент.
Параметры:
строкаФмт = A ткст containing _format items.
арги = A список of аргументы.
Возвращает: A копируй of строкаФмт in which the items have been
replaced by the ткст equivalent of the аргументы.
Remarks: The строкаФмт parameter is embedded with _format
items of the form: $(BR)$(BR)
{индекс[,alignment][:_format-ткст]}$(BR)$(BR)
$(UL $(LI индекс $(BR)
An целое indicating the элемент in a список в_ _format.)
$(LI alignment $(BR)
An optional целое indicating the minimum width. The
результат is псеп_в_конце with пробелы if the length of the значение
is less than alignment.)
$(LI _format-ткст $(BR)
An optional ткст of formatting codes.)
)$(BR)
The leading и trailing braces are требуется. To include a
literal brace character, use two leading or trailing brace
characters.$(BR)$(BR)
If строкаФмт is "{0} bottles of beer on the wall" и the
аргумент is an цел with the значение of 99, the return значение
will be:$(BR) "99 bottles of beer on the wall".
**********************************************************************/
public final T[] преобразуй (T[] строкаФмт, ...)
{
return преобразуй (_arguments, _argptr, строкаФмт);
}
/**********************************************************************
**********************************************************************/
public final бцел преобразуй (Сток сток, T[] строкаФмт, ...)
{
return преобразуй (сток, _arguments, _argptr, строкаФмт);
}
/**********************************************************************
Tentative преобразуй using an ИПотокВывода as сток - may still be
removed.
Since: 0.99.7
**********************************************************************/
public final бцел преобразуй (ИПотокВывода вывод, T[] строкаФмт, ...)
{
бцел сток (T[] s)
{
return вывод.пиши(s);
}
return преобразуй (&сток, _arguments, _argptr, строкаФмт);
}
/**********************************************************************
**********************************************************************/
public final T[] преобразуй (ИнфОТипе[] аргументы, АргСписок арги, T[] строкаФмт)
{
T[] вывод;
бцел сток (T[] s)
{
вывод ~= s;
return s.length;
}
преобразуй (&сток, аргументы, арги, строкаФмт);
return вывод;
}
version (old)
{
/**********************************************************************
**********************************************************************/
public final T[] преобразуйОдин (T[] результат, ИнфОТипе иот, Арг арг)
{
return депешируй (результат, пусто, иот, арг);
}
}
/**********************************************************************
**********************************************************************/
public final бцел преобразуй (Сток сток, ИнфОТипе[] аргументы, АргСписок арги, T[] строкаФмт)
{
assert (строкаФмт, "пустой определитель формата");
assert (аргументы.length < 64, "слишком много аргов в Выкладка.преобразуй");
version (GNU)
{
union ArgU {цел i; байт b; дол l; крат s; проц[] a;
реал r; плав f; дво d;
кплав cf; кдво cd; креал cr;}
Арг[64] аргсписок =void;
ArgU[64] storedArgs =void;
foreach (i, арг; аргументы)
{
static if (is(typeof(арги.ptr)))
аргсписок[i] = арги.ptr;
else
аргсписок[i] = арги;
/* Since floating point типы don't live on
* the стэк, they must be использовался by the
* correct тип. */
бул преобразованый = нет;
switch (арг.classinfo.имя[9])
{
case КодТипа.FLOAT, КодТипа.IFLOAT:
storedArgs[i].f = ва_арг!(плав)(арги);
аргсписок[i] = &(storedArgs[i].f);
преобразованый = да;
break;
case КодТипа.CFLOAT:
storedArgs[i].cf = ва_арг!(кплав)(арги);
аргсписок[i] = &(storedArgs[i].cf);
преобразованый = да;
break;
case КодТипа.DOUBLE, КодТипа.IDOUBLE:
storedArgs[i].d = ва_арг!(дво)(арги);
аргсписок[i] = &(storedArgs[i].d);
преобразованый = да;
break;
case КодТипа.CDOUBLE:
storedArgs[i].cd = ва_арг!(кдво)(арги);
аргсписок[i] = &(storedArgs[i].cd);
преобразованый = да;
break;
case КодТипа.REAL, КодТипа.IREAL:
storedArgs[i].r = ва_арг!(реал)(арги);
аргсписок[i] = &(storedArgs[i].r);
преобразованый = да;
break;
case КодТипа.CREAL:
storedArgs[i].cr = ва_арг!(креал)(арги);
аргсписок[i] = &(storedArgs[i].cr);
преобразованый = да;
break;
default:
break;
}
if (! преобразованый)
{
switch (арг.tsize)
{
case 1:
storedArgs[i].b = ва_арг!(байт)(арги);
аргсписок[i] = &(storedArgs[i].b);
break;
case 2:
storedArgs[i].s = ва_арг!(крат)(арги);
аргсписок[i] = &(storedArgs[i].s);
break;
case 4:
storedArgs[i].i = ва_арг!(цел)(арги);
аргсписок[i] = &(storedArgs[i].i);
break;
case 8:
storedArgs[i].l = ва_арг!(дол)(арги);
аргсписок[i] = &(storedArgs[i].l);
break;
case 16:
assert((проц[]).sizeof==16,"Размер структуры не поддерживается"w);
storedArgs[i].a = ва_арг!(проц[])(арги);
аргсписок[i] = &(storedArgs[i].a);
break;
default:
assert (нет, "Неизвестный размер: " ~ Целое.вТкст (арг.tsize));
}
}
}
}
else
{
Арг[64] аргсписок =void;
foreach (i, арг; аргументы)
{
аргсписок[i] = арги;
арги += (арг.tsize + т_мера.sizeof - 1) & ~ (т_мера.sizeof - 1);
}
}
return разбор (строкаФмт, аргументы, аргсписок, сток);
}
/**********************************************************************
Parse the форматируй-ткст, излейting formatted арги и текст
fragments as we go
**********************************************************************/
private бцел разбор (T[] выкладка, ИнфОТипе[] иот, Арг[] арги, Сток сток)
{
T[512] результат =void;
цел length, nextIndex;
T* s = выкладка.ptr;
T* fragment = s;
T* конец = s + выкладка.length;
while (да)
{
while (s < конец && *s != '{')
++s;
// излей fragment
length += сток (fragment [0 .. s - fragment]);
// все готово?
if (s is конец)
break;
// проверь for "{{" и пропусти if so
if (*++s is '{')
{
fragment = s++;
continue;
}
цел индекс = 0;
бул indexed = нет;
// выкинь индекс
while (*s >= '0' && *s <= '9')
{
индекс = индекс * 10 + *s++ -'0';
indexed = да;
}
// пропусти пробелы
while (s < конец && *s is ' ')
++s;
бул crop;
бул left;
бул right;
цел width;
// имеется minimum or maximum width?
if (*s is ',' || *s is '.')
{
if (*s is '.')
crop = да;
while (++s < конец && *s is ' ') {}
if (*s is '-')
{
left = да;
++s;
}
else
right = да;
// получи width
while (*s >= '0' && *s <= '9')
width = width * 10 + *s++ -'0';
// пропусти пробелы
while (s < конец && *s is ' ')
++s;
}
T[] форматируй;
// имеется a форматируй ткст?
if (*s is ':' && s < конец)
{
T* fs = ++s;
// съешь everything up в_ closing brace
while (s < конец && *s != '}')
++s;
форматируй = fs [0 .. s - fs];
}
// insist on a closing brace
if (*s != '}')
{
length += сток ("{ошибочный формат}");
continue;
}
// проверь for default индекс & установи следщ default counter
if (! indexed)
индекс = nextIndex;
nextIndex = индекс + 1;
// следщ сим is старт of following fragment
fragment = ++s;
// укз alignment
проц излей (T[] стр)
{
цел pading = width - стр.length;
if (crop)
{
if (pading < 0)
{
if (left)
{
length += сток ("...");
length += сток (Utf.отрежьЛево (стр[-pading..$]));
}
else
{
length += сток (Utf.отрежьПраво (стр[0..width]));
length += сток ("...");
}
}
else
length += сток (стр);
}
else
{
// if right aligned, pad out with пробелы
if (right && pading > 0)
length += пробелы (сток, pading);
// излей formatted аргумент
length += сток (стр);
// finally, pad out on right
if (left && pading > 0)
length += пробелы (сток, pading);
}
}
// an astonishing число of typehacks needed в_ укз массивы :(
проц process (ИнфОТипе _ti, Арг _arg)
{
// Because Вариантs can contain AAs (и maybe
// even static массивы someday), we need в_
// process them here.
version (СВариантом)
{
if (_ti is typeid(Вариант))
{
// Unpack the variant и вперёд
auto vptr = cast(Вариант*)_arg;
auto innerTi = vptr.тип;
auto innerArg = vptr.ptr;
process (innerTi, innerArg);
}
}
if (_ti.classinfo.имя.length is 20 && _ti.classinfo.имя[9..$] == "StaticArray" )
{
auto tiStat = cast(TypeInfo_StaticArray)_ti;
auto p = _arg;
length += сток ("[");
for (цел i = 0; i < tiStat.длин; i++)
{
if (p !is _arg )
length += сток (", ");
process (tiStat.значение, p);
p += tiStat.tsize/tiStat.длин;
}
length += сток ("]");
}
else
if (_ti.classinfo.имя.length is 25 && _ti.classinfo.имя[9..$] == "AssociativeArray")
{
auto tiAsso = cast(TypeInfo_AssociativeArray)_ti;
auto tiKey = tiAsso.ключ;
auto tiVal = tiAsso.следщ();
// the knowledge of the internal k/v storage is использован
// so this might break if, that internal storage changes
alias ббайт AV; // any тип for ключ, значение might be ok, the размеры are corrected later
alias ббайт AK;
auto aa = *cast(AV[AK]*) _arg;
length += сток ("{");
бул первый = да;
цел roundUp (цел sz)
{
return (sz + (ук).sizeof -1) & ~((ук).sizeof - 1);
}
foreach (ref v; aa)
{
// the ключ is befor the значение, so substrace with fixed ключ размер из_ above
auto pk = cast(Арг)( &v - roundUp(AK.sizeof));
// сейчас the реал значение поз is plus the реал ключ размер
auto pv = cast(Арг)(pk + roundUp(tiKey.tsize()));
if (!первый)
length += сток (", ");
process (tiKey, pk);
length += сток (" => ");
process (tiVal, pv);
первый = нет;
}
length += сток ("}");
}
else
if (_ti.classinfo.имя[9] is КодТипа.ARRAY)
{
if (_ti is typeid(ткст))
излей (Utf.изТкст8 (*cast(ткст*) _arg, результат));
else
if (_ti is typeid(шим[]))
излей (Utf.изТкст16 (*cast(шим[]*) _arg, результат));
else
if (_ti is typeid(дим[]))
излей (Utf.изТкст32 (*cast(дим[]*) _arg, результат));
else
{
// for все non ткст Массив типы (включая ткст[])
auto масс = *cast(проц[]*)_arg;
auto длин = масс.length;
auto ptr = cast(Арг) масс.ptr;
auto elTi = _ti.следщ();
auto размер = elTi.tsize();
length += сток ("[");
while (длин > 0)
{
if (ptr !is масс.ptr)
length += сток (", ");
process (elTi, ptr);
длин -= 1;
ptr += размер;
}
length += сток ("]");
}
}
else
// the стандарт processing
излей (депешируй (результат, форматируй, _ti, _arg));
}
// process this аргумент
if (индекс >= иот.length)
излей ("{неверный индекс}");
else
process (иот[индекс], арги[индекс]);
}
return length;
}
/***********************************************************************
***********************************************************************/
private T[] депешируй (T[] результат, T[] формат, ИнфОТипе тип, Арг p)
{
switch (тип.classinfo.имя[9])
{
case КодТипа.BOOL:
static T[] t = "да";
static T[] f = "нет";
return (*cast(бул*) p) ? t : f;
case КодТипа.BYTE:
return целое (результат, *cast(байт*) p, формат, ббайт.max);
case КодТипа.VOID:
case КодТипа.UBYTE:
return целое (результат, *cast(ббайт*) p, формат, ббайт.max, "u");
case КодТипа.SHORT:
return целое (результат, *cast(крат*) p, формат, бкрат.max);
case КодТипа.USHORT:
return целое (результат, *cast(бкрат*) p, формат, бкрат.max, "u");
case КодТипа.INT:
return целое (результат, *cast(цел*) p, формат, бцел.max);
case КодТипа.UINT:
return целое (результат, *cast(бцел*) p, формат, бцел.max, "u");
case КодТипа.ULONG:
return целое (результат, *cast(дол*) p, формат, бдол.max, "u");
case КодТипа.LONG:
return целое (результат, *cast(дол*) p, формат, бдол.max);
case КодТипа.FLOAT:
return плавающее (результат, *cast(плав*) p, формат);
case КодТипа.IFLOAT:
return мнимое (результат, *cast(вплав*) p, формат);
case КодТипа.IDOUBLE:
return мнимое (результат, *cast(вдво*) p, формат);
case КодТипа.IREAL:
return мнимое (результат, *cast(вреал*) p, формат);
case КодТипа.CFLOAT:
return комплексное (результат, *cast(кплав*) p, формат);
case КодТипа.CDOUBLE:
return комплексное (результат, *cast(кдво*) p, формат);
case КодТипа.CREAL:
return комплексное (результат, *cast(креал*) p, формат);
case КодТипа.DOUBLE:
return плавающее (результат, *cast(дво*) p, формат);
case КодТипа.REAL:
return плавающее (результат, *cast(реал*) p, формат);
case КодТипа.CHAR:
return Utf.изТкст8 ((cast(сим*) p)[0..1], результат);
case КодТипа.WCHAR:
return Utf.изТкст16 ((cast(шим*) p)[0..1], результат);
case КодТипа.DCHAR:
return Utf.изТкст32 ((cast(дим*) p)[0..1], результат);
case КодТипа.POINTER:
return целое (результат, *cast(т_мера*) p, формат, т_мера.max, "x");
case КодТипа.CLASS:
auto c = *cast(Объект*) p;
if (c)
return Utf.изТкст8 (c.вТкст, результат);
break;
case КодТипа.STRUCT:
auto s = cast(TypeInfo_Struct) тип;
if (s.xtoString)
{
ткст delegate() вТкст;
вТкст.ptr = p;
вТкст.funcptr = cast(ткст function())s.xtoString;
return Utf.изТкст8 (вТкст(), результат);
}
goto default;
case КодТипа.INTERFACE:
auto x = *cast(ук*) p;
if (x)
{
auto pi = **cast(Interface ***) x;
auto o = cast(Объект)(*cast(ук*)p - pi.смещение);
return Utf.изТкст8 (o.вТкст, результат);
}
break;
case КодТипа.ENUM:
return депешируй (результат, формат, (cast(TypeInfo_Enum) тип).основа, p);
case КодТипа.TYPEDEF:
return депешируй (результат, формат, (cast(TypeInfo_Typedef) тип).основа, p);
default:
return неизвестное (результат, формат, тип, p);
}
return cast(T[]) "{пусто}"w;
}
/**********************************************************************
укз "неизвестное-тип" ошибки
**********************************************************************/
protected T[] неизвестное (T[] результат, T[] формат, ИнфОТипе тип, Арг p)
{
version (СРасширениями)
{
результат = Расширения!(T).run (тип, результат, p, формат);
return (результат) ? результат :
"{необрабатываемый тип аргумента: " ~ Utf.изТкст8 (тип.вТкст, результат) ~ "}";
}
else
version (СДатойВременем)
{
if (тип is typeid(Время))
{
static if (is (T == сим))
return датаВремя.форматируй(результат, *cast(Время*) p, формат);
else
{
// TODO: this needs в_ be cleaned up
сим[128] tmp0 =void;
сим[128] tmp1 =void;
return Utf.изТкст8(датаВремя.форматируй(tmp0, *cast(Время*) p, Utf.вТкст(формат, tmp1)), результат);
}
}
}
return "{необрабатываемый тип аргумента: " ~ Utf.изТкст8 (тип.вТкст, результат) ~ "}";
}
/**********************************************************************
Формат an целое значение
**********************************************************************/
protected T[] целое (T[] вывод, дол v, T[] формат, бдол маска = бдол.max, T[] def="d")
{
if (формат.length is 0)
формат = def;
if (формат[0] != 'd')
v &= маска;
return Целое.форматируй (вывод, v, формат);
}
/**********************************************************************
форматируй a floating-point значение. Defaults в_ 2 decimal places
**********************************************************************/
protected T[] плавающее (T[] вывод, реал v, T[] формат)
{
бцел dec = 2,
эксп = 10;
бул pad = да;
for (auto p=формат.ptr, e=p+формат.length; p < e; ++p)
switch (*p)
{
case '.':
pad = нет;
break;
case 'e':
case 'Е':
эксп = 0;
break;
case 'x':
case 'X':
дво d = v;
return целое (вывод, *cast(дол*) &d, "x#");
default:
auto c = *p;
if (c >= '0' && c <= '9')
{
dec = c - '0', c = p[1];
if (c >= '0' && c <= '9' && ++p < e)
dec = dec * 10 + c - '0';
}
break;
}
return Плав.форматируй (вывод, v, dec, эксп, pad);
}
/**********************************************************************
**********************************************************************/
private проц ошибка (ткст сооб)
{
throw new ИсклНелегальногоАргумента (сооб);
}
/**********************************************************************
**********************************************************************/
private бцел пробелы (Сток сток, цел счёт)
{
бцел возвр;
static const T[32] Spaces = ' ';
while (счёт > Spaces.length)
{
возвр += сток (Spaces);
счёт -= Spaces.length;
}
return возвр + сток (Spaces[0..счёт]);
}
/**********************************************************************
форматируй an мнимое значение
**********************************************************************/
private T[] мнимое (T[] результат, вреал знач, T[] формат)
{
return плавающийХвост (результат, знач.im, формат, "*1i");
}
/**********************************************************************
форматируй a комплексное значение
**********************************************************************/
private T[] комплексное (T[] результат, креал знач, T[] формат)
{
static бул signed (реал x)
{
static if (реал.sizeof is 4)
return ((*cast(бцел *)&x) & 0x8000_0000) != 0;
else
static if (реал.sizeof is 8)
return ((*cast(бдол *)&x) & 0x8000_0000_0000_0000) != 0;
else
{
auto pe = cast(ббайт *)&x;
return (pe[9] & 0x80) != 0;
}
}
static T[] plus = "+";
auto длин = плавающийХвост (результат, знач.re, формат, signed(знач.im) ? пусто : plus).length;
return результат [0 .. длин + плавающийХвост (результат[длин..$], знач.im, формат, "*1i").length];
}
/**********************************************************************
форматы a floating-point значение, и appends a хвост в_ it
**********************************************************************/
private T[] плавающийХвост (T[] результат, реал знач, T[] формат, T[] хвост)
{
assert (результат.length > хвост.length);
auto рез = плавающее (результат[0..$-хвост.length], знач, формат);
auto длин=рез.length;
if (рез.ptr!is результат.ptr)
результат[0..длин]=рез;
результат [длин .. длин + хвост.length] = хвост;
return результат [0 .. длин + хвост.length];
}
}
/*******************************************************************************
*******************************************************************************/
private enum КодТипа
{
EMPTY = 0,
VOID = 'v',
BOOL = 'b',
UBYTE = 'h',
BYTE = 'g',
USHORT = 't',
SHORT = 's',
UINT = 'k',
INT = 'i',
ULONG = 'm',
LONG = 'l',
REAL = 'e',
FLOAT = 'f',
DOUBLE = 'd',
CHAR = 'a',
WCHAR = 'u',
DCHAR = 'w',
ARRAY = 'A',
CLASS = 'C',
STRUCT = 'S',
ENUM = 'Е',
CONST = 'x',
INVARIANT = 'y',
DELEGATE = 'D',
FUNCTION = 'F',
POINTER = 'P',
TYPEDEF = 'T',
INTERFACE = 'I',
CFLOAT = 'q',
CDOUBLE = 'r',
CREAL = 'c',
IFLOAT = 'o',
IDOUBLE = 'p',
IREAL = 'j'
}
/*******************************************************************************
*******************************************************************************/
debug (UnitTest)
{
unittest
{
auto Форматировщик = Выкладка!(сим).экземпляр;
// basic выкладка tests
assert( Форматировщик( "abc" ) == "abc" );
assert( Форматировщик( "{0}", 1 ) == "1" );
assert( Форматировщик( "{0}", -1 ) == "-1" );
assert( Форматировщик( "{}", 1 ) == "1" );
assert( Форматировщик( "{} {}", 1, 2) == "1 2" );
assert( Форматировщик( "{} {0} {}", 1, 3) == "1 1 3" );
assert( Форматировщик( "{} {0} {} {}", 1, 3) == "1 1 3 {не_годится индекс}" );
assert( Форматировщик( "{} {0} {} {:x}", 1, 3) == "1 1 3 {не_годится индекс}" );
assert( Форматировщик( "{0}", да ) == "да" , Форматировщик( "{0}", да ));
assert( Форматировщик( "{0}", нет ) == "нет" );
assert( Форматировщик( "{0}", cast(байт)-128 ) == "-128" );
assert( Форматировщик( "{0}", cast(байт)127 ) == "127" );
assert( Форматировщик( "{0}", cast(ббайт)255 ) == "255" );
assert( Форматировщик( "{0}", cast(крат)-32768 ) == "-32768" );
assert( Форматировщик( "{0}", cast(крат)32767 ) == "32767" );
assert( Форматировщик( "{0}", cast(бкрат)65535 ) == "65535" );
assert( Форматировщик( "{0:x4}", cast(бкрат)0xafe ) == "0afe" );
assert( Форматировщик( "{0:X4}", cast(бкрат)0xafe ) == "0AFE" );
assert( Форматировщик( "{0}", -2147483648 ) == "-2147483648" );
assert( Форматировщик( "{0}", 2147483647 ) == "2147483647" );
assert( Форматировщик( "{0}", 4294967295 ) == "4294967295" );
// large целыйs
assert( Форматировщик( "{0}", -9223372036854775807L) == "-9223372036854775807" );
assert( Форматировщик( "{0}", 0x8000_0000_0000_0000L) == "9223372036854775808" );
assert( Форматировщик( "{0}", 9223372036854775807L ) == "9223372036854775807" );
assert( Форматировщик( "{0:X}", 0xFFFF_FFFF_FFFF_FFFF) == "FFFFFFFFFFFFFFFF" );
assert( Форматировщик( "{0:x}", 0xFFFF_FFFF_FFFF_FFFF) == "ffffffffffffffff" );
assert( Форматировщик( "{0:x}", 0xFFFF_1234_FFFF_FFFF) == "ffff1234ffffffff" );
assert( Форматировщик( "{0:x19}", 0x1234_FFFF_FFFF) == "00000001234ffffffff" );
assert( Форматировщик( "{0}", 18446744073709551615UL ) == "18446744073709551615" );
assert( Форматировщик( "{0}", 18446744073709551615UL ) == "18446744073709551615" );
// fragments before и after
assert( Форматировщик( "d{0}d", "s" ) == "dsd" );
assert( Форматировщик( "d{0}d", "1234567890" ) == "d1234567890d" );
// brace escaping
assert( Форматировщик( "d{0}d", "<ткст>" ) == "d<ткст>d");
assert( Форматировщик( "d{{0}d", "<ткст>" ) == "d{0}d");
assert( Форматировщик( "d{{{0}d", "<ткст>" ) == "d{<ткст>d");
assert( Форматировщик( "d{0}}d", "<ткст>" ) == "d<ткст>}d");
// hex conversions, where width indicates leading zeroes
assert( Форматировщик( "{0:x}", 0xafe0000 ) == "afe0000" );
assert( Форматировщик( "{0:x7}", 0xafe0000 ) == "afe0000" );
assert( Форматировщик( "{0:x8}", 0xafe0000 ) == "0afe0000" );
assert( Форматировщик( "{0:X8}", 0xafe0000 ) == "0AFE0000" );
assert( Форматировщик( "{0:X9}", 0xafe0000 ) == "00AFE0000" );
assert( Форматировщик( "{0:X13}", 0xafe0000 ) == "000000AFE0000" );
assert( Форматировщик( "{0:x13}", 0xafe0000 ) == "000000afe0000" );
// decimal width
assert( Форматировщик( "{0:d6}", 123 ) == "000123" );
assert( Форматировщик( "{0,7:d6}", 123 ) == " 000123" );
assert( Форматировщик( "{0,-7:d6}", 123 ) == "000123 " );
// width & знак combinations
assert( Форматировщик( "{0:d7}", -123 ) == "-0000123" );
assert( Форматировщик( "{0,7:d6}", 123 ) == " 000123" );
assert( Форматировщик( "{0,7:d7}", -123 ) == "-0000123" );
assert( Форматировщик( "{0,8:d7}", -123 ) == "-0000123" );
assert( Форматировщик( "{0,5:d7}", -123 ) == "-0000123" );
// Negative numbers in various bases
assert( Форматировщик( "{:b}", cast(байт) -1 ) == "11111111" );
assert( Форматировщик( "{:b}", cast(крат) -1 ) == "1111111111111111" );
assert( Форматировщик( "{:b}", cast(цел) -1 )
== "11111111111111111111111111111111" );
assert( Форматировщик( "{:b}", cast(дол) -1 )
== "1111111111111111111111111111111111111111111111111111111111111111" );
assert( Форматировщик( "{:o}", cast(байт) -1 ) == "377" );
assert( Форматировщик( "{:o}", cast(крат) -1 ) == "177777" );
assert( Форматировщик( "{:o}", cast(цел) -1 ) == "37777777777" );
assert( Форматировщик( "{:o}", cast(дол) -1 ) == "1777777777777777777777" );
assert( Форматировщик( "{:d}", cast(байт) -1 ) == "-1" );
assert( Форматировщик( "{:d}", cast(крат) -1 ) == "-1" );
assert( Форматировщик( "{:d}", cast(цел) -1 ) == "-1" );
assert( Форматировщик( "{:d}", cast(дол) -1 ) == "-1" );
assert( Форматировщик( "{:x}", cast(байт) -1 ) == "ff" );
assert( Форматировщик( "{:x}", cast(крат) -1 ) == "ffff" );
assert( Форматировщик( "{:x}", cast(цел) -1 ) == "ffffffff" );
assert( Форматировщик( "{:x}", cast(дол) -1 ) == "ffffffffffffffff" );
// аргумент индекс
assert( Форматировщик( "a{0}b{1}c{2}", "x", "y", "z" ) == "axbycz" );
assert( Форматировщик( "a{2}b{1}c{0}", "x", "y", "z" ) == "azbycx" );
assert( Форматировщик( "a{1}b{1}c{1}", "x", "y", "z" ) == "aybycy" );
// alignment does not ограничь the length
assert( Форматировщик( "{0,5}", "hellohello" ) == "hellohello" );
// alignment fills with пробелы
assert( Форматировщик( "->{0,-10}<-", "hello" ) == "->hello <-" );
assert( Форматировщик( "->{0,10}<-", "hello" ) == "-> hello<-" );
assert( Форматировщик( "->{0,-10}<-", 12345 ) == "->12345 <-" );
assert( Форматировщик( "->{0,10}<-", 12345 ) == "-> 12345<-" );
// chop at maximum specified length; вставь ellИПses when chopped
assert( Форматировщик( "->{.5}<-", "hello" ) == "->hello<-" );
assert( Форматировщик( "->{.4}<-", "hello" ) == "->hell...<-" );
assert( Форматировщик( "->{.-3}<-", "hello" ) == "->...llo<-" );
// width specifier indicates число of decimal places
assert( Форматировщик( "{0:f}", 1.23f ) == "1.23" );
assert( Форматировщик( "{0:f4}", 1.23456789L ) == "1.2346" );
assert( Форматировщик( "{0:e4}", 0.0001) == "1.0000e-04");
assert( Форматировщик( "{0:f}", 1.23f*1i ) == "1.23*1i");
assert( Форматировщик( "{0:f4}", 1.23456789L*1i ) == "1.2346*1i" );
assert( Форматировщик( "{0:e4}", 0.0001*1i) == "1.0000e-04*1i");
assert( Форматировщик( "{0:f}", 1.23f+1i ) == "1.23+1.00*1i" );
assert( Форматировщик( "{0:f4}", 1.23456789L+1i ) == "1.2346+1.0000*1i" );
assert( Форматировщик( "{0:e4}", 0.0001+1i) == "1.0000e-04+1.0000e+00*1i");
assert( Форматировщик( "{0:f}", 1.23f-1i ) == "1.23-1.00*1i" );
assert( Форматировщик( "{0:f4}", 1.23456789L-1i ) == "1.2346-1.0000*1i" );
assert( Форматировщик( "{0:e4}", 0.0001-1i) == "1.0000e-04-1.0000e+00*1i");
// 'f.' & 'e.' форматируй truncates zeroes из_ floating decimals
assert( Форматировщик( "{:f4.}", 1.230 ) == "1.23" );
assert( Форматировщик( "{:f6.}", 1.230 ) == "1.23" );
assert( Форматировщик( "{:f1.}", 1.230 ) == "1.2" );
assert( Форматировщик( "{:f.}", 1.233 ) == "1.23" );
assert( Форматировщик( "{:f.}", 1.237 ) == "1.24" );
assert( Форматировщик( "{:f.}", 1.000 ) == "1" );
assert( Форматировщик( "{:f2.}", 200.001 ) == "200");
// Массив вывод
цел[] a = [ 51, 52, 53, 54, 55 ];
assert( Форматировщик( "{}", a ) == "[51, 52, 53, 54, 55]" );
assert( Форматировщик( "{:x}", a ) == "[33, 34, 35, 36, 37]" );
assert( Форматировщик( "{,-4}", a ) == "[51 , 52 , 53 , 54 , 55 ]" );
assert( Форматировщик( "{,4}", a ) == "[ 51, 52, 53, 54, 55]" );
цел[][] b = [ [ 51, 52 ], [ 53, 54, 55 ] ];
assert( Форматировщик( "{}", b ) == "[[51, 52], [53, 54, 55]]" );
бкрат[3] c = [ cast(бкрат)51, 52, 53 ];
assert( Форматировщик( "{}", c ) == "[51, 52, 53]" );
// целое AA
бкрат[дол] d;
d[234] = 2;
d[345] = 3;
assert( Форматировщик( "{}", d ) == "{234 => 2, 345 => 3}" ||
Форматировщик( "{}", d ) == "{345 => 3, 234 => 2}");
// бул/ткст AA
бул[ткст] e;
e[ "ключ".dup ] = да;
e[ "значение".dup ] = нет;
assert( Форматировщик( "{}", e ) == "{ключ => да, значение => нет}" ||
Форматировщик( "{}", e ) == "{значение => нет, ключ => да}");
// ткст/дво AA
ткст[ дво ] f;
f[ 1.0 ] = "one".dup;
f[ 3.14 ] = "ПИ".dup;
assert( Форматировщик( "{}", f ) == "{1.00 => one, 3.14 => ПИ}" ||
Форматировщик( "{}", f ) == "{3.14 => ПИ, 1.00 => one}");
}
}
debug (Выкладка)
{
import io.Console;
static if (is (typeof(Время)))
import time.WallClock;
проц main ()
{
auto выкладка = Выкладка!(сим).экземпляр;
выкладка.преобразуй (Квывод.поток, "hi {}", "there\n");
Квывод (выкладка.sprint (new сим[1], "hi")).нс;
Квывод (выкладка.sprint (new сим[10], "{.4}", "hello")).нс;
Квывод (выкладка.sprint (new сим[10], "{.-4}", "hello")).нс;
Квывод (выкладка ("{:f1}", 3.0)).нс;
Квывод (выкладка ("{:g}", 3.00)).нс;
Квывод (выкладка ("{:f1}", -0.0)).нс;
Квывод (выкладка ("{:g1}", -0.0)).нс;
Квывод (выкладка ("{:d2}", 56)).нс;
Квывод (выкладка ("{:d4}", cast(байт) -56)).нс;
Квывод (выкладка ("{:f4}", 1.0e+12)).нс;
Квывод (выкладка ("{:f4}", 1.23e-2)).нс;
Квывод (выкладка ("{:f8}", 3.14159)).нс;
Квывод (выкладка ("{:e20}", 1.23e-3)).нс;
Квывод (выкладка ("{:e4.}", 1.23e-07)).нс;
Квывод (выкладка ("{:.}", 1.2)).нс;
Квывод (выкладка ("ptr:{}", &выкладка)).нс;
Квывод (выкладка ("бдол.max {}", бдол.max)).нс;
struct S
{
ткст вТкст () {return "foo";}
}
S s;
Квывод (выкладка ("struct: {}", s)).нс;
static if (is (typeof(Время)))
Квывод (выкладка ("время: {}", Куранты.сейчас)).нс;
}
}
|
D
|
# FIXED
ICall/icall.obj: C:/ti/simplelink/ble_sdk_2_02_01_18/src/components/icall/src/icall.c
ICall/icall.obj: C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/bios_6_46_01_38/packages/ti/sysbios/hal/Hwi.h
ICall/icall.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/std.h
ICall/icall.obj: C:/ti/ccsv7/tools/compiler/ti-cgt-arm_16.9.3.LTS/include/stdarg.h
ICall/icall.obj: C:/ti/ccsv7/tools/compiler/ti-cgt-arm_16.9.3.LTS/include/stddef.h
ICall/icall.obj: C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/bios_6_46_01_38/packages/ti/targets/arm/elf/std.h
ICall/icall.obj: C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/bios_6_46_01_38/packages/ti/targets/arm/elf/M3.h
ICall/icall.obj: C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/bios_6_46_01_38/packages/ti/targets/std.h
ICall/icall.obj: C:/ti/ccsv7/tools/compiler/ti-cgt-arm_16.9.3.LTS/include/stdint.h
ICall/icall.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/xdc.h
ICall/icall.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Types.h
ICall/icall.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Types__prologue.h
ICall/icall.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/package/package.defs.h
ICall/icall.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Types__epilogue.h
ICall/icall.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/IInstance.h
ICall/icall.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Types.h
ICall/icall.obj: C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/bios_6_46_01_38/packages/ti/sysbios/hal/Hwi__prologue.h
ICall/icall.obj: C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/bios_6_46_01_38/packages/ti/sysbios/hal/package/package.defs.h
ICall/icall.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Error.h
ICall/icall.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Types.h
ICall/icall.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Error__prologue.h
ICall/icall.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Main.h
ICall/icall.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Types.h
ICall/icall.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/IModule.h
ICall/icall.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Types.h
ICall/icall.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Types.h
ICall/icall.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/IHeap.h
ICall/icall.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Types.h
ICall/icall.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/IInstance.h
ICall/icall.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/IModule.h
ICall/icall.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Error.h
ICall/icall.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Memory.h
ICall/icall.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Types.h
ICall/icall.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/IModule.h
ICall/icall.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/IHeap.h
ICall/icall.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Error.h
ICall/icall.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/package/Memory_HeapProxy.h
ICall/icall.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Types.h
ICall/icall.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/IInstance.h
ICall/icall.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/IHeap.h
ICall/icall.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Error.h
ICall/icall.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/IGateProvider.h
ICall/icall.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Types.h
ICall/icall.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/IInstance.h
ICall/icall.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/IModule.h
ICall/icall.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/package/Main_Module_GateProxy.h
ICall/icall.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Types.h
ICall/icall.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/IInstance.h
ICall/icall.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/IGateProvider.h
ICall/icall.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/IModule.h
ICall/icall.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Types.h
ICall/icall.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Error__epilogue.h
ICall/icall.obj: C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/bios_6_46_01_38/packages/ti/sysbios/interfaces/IHwi.h
ICall/icall.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Types.h
ICall/icall.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/IInstance.h
ICall/icall.obj: C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/bios_6_46_01_38/packages/ti/sysbios/interfaces/package/package.defs.h
ICall/icall.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Error.h
ICall/icall.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/IModule.h
ICall/icall.obj: C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/bios_6_46_01_38/packages/ti/sysbios/hal/package/Hwi_HwiProxy.h
ICall/icall.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Types.h
ICall/icall.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/IInstance.h
ICall/icall.obj: C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/bios_6_46_01_38/packages/ti/sysbios/interfaces/IHwi.h
ICall/icall.obj: C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/bios_6_46_01_38/packages/ti/sysbios/hal/Hwi__epilogue.h
ICall/icall.obj: C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/bios_6_46_01_38/packages/ti/sysbios/family/arm/m3/Hwi.h
ICall/icall.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Types.h
ICall/icall.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/IInstance.h
ICall/icall.obj: C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/bios_6_46_01_38/packages/ti/sysbios/family/arm/m3/Hwi__prologue.h
ICall/icall.obj: C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/bios_6_46_01_38/packages/ti/sysbios/family/arm/m3/package/package.defs.h
ICall/icall.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Diags.h
ICall/icall.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Types.h
ICall/icall.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Diags__prologue.h
ICall/icall.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Main.h
ICall/icall.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/IModule.h
ICall/icall.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Types.h
ICall/icall.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Diags__epilogue.h
ICall/icall.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Log.h
ICall/icall.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Types.h
ICall/icall.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Log__prologue.h
ICall/icall.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Error.h
ICall/icall.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Main.h
ICall/icall.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Diags.h
ICall/icall.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/IModule.h
ICall/icall.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Diags.h
ICall/icall.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Types.h
ICall/icall.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Text.h
ICall/icall.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Types.h
ICall/icall.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/IModule.h
ICall/icall.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Types.h
ICall/icall.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Log__epilogue.h
ICall/icall.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Assert.h
ICall/icall.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Types.h
ICall/icall.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Assert__prologue.h
ICall/icall.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Main.h
ICall/icall.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Diags.h
ICall/icall.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/IModule.h
ICall/icall.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Diags.h
ICall/icall.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Error.h
ICall/icall.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Types.h
ICall/icall.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Assert__epilogue.h
ICall/icall.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Error.h
ICall/icall.obj: C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/bios_6_46_01_38/packages/ti/sysbios/BIOS.h
ICall/icall.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Types.h
ICall/icall.obj: C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/bios_6_46_01_38/packages/ti/sysbios/BIOS__prologue.h
ICall/icall.obj: C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/bios_6_46_01_38/packages/ti/sysbios/package/package.defs.h
ICall/icall.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Error.h
ICall/icall.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Types.h
ICall/icall.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/IModule.h
ICall/icall.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/IGateProvider.h
ICall/icall.obj: C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/bios_6_46_01_38/packages/ti/sysbios/package/BIOS_RtsGateProxy.h
ICall/icall.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Types.h
ICall/icall.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/IInstance.h
ICall/icall.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/IGateProvider.h
ICall/icall.obj: C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/bios_6_46_01_38/packages/ti/sysbios/BIOS__epilogue.h
ICall/icall.obj: C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/bios_6_46_01_38/packages/ti/sysbios/interfaces/IHwi.h
ICall/icall.obj: C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/bios_6_46_01_38/packages/ti/sysbios/family/arm/m3/Hwi__epilogue.h
ICall/icall.obj: C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/bios_6_46_01_38/packages/ti/sysbios/hal/package/Hwi_HwiProxy.h
ICall/icall.obj: C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/bios_6_46_01_38/packages/ti/sysbios/gates/GateHwi.h
ICall/icall.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Types.h
ICall/icall.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/IInstance.h
ICall/icall.obj: C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/bios_6_46_01_38/packages/ti/sysbios/gates/package/package.defs.h
ICall/icall.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/IGateProvider.h
ICall/icall.obj: C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/bios_6_46_01_38/packages/ti/sysbios/knl/Clock.h
ICall/icall.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Types.h
ICall/icall.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/IInstance.h
ICall/icall.obj: C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/bios_6_46_01_38/packages/ti/sysbios/knl/package/package.defs.h
ICall/icall.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Assert.h
ICall/icall.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Diags.h
ICall/icall.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Log.h
ICall/icall.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/IModule.h
ICall/icall.obj: C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/bios_6_46_01_38/packages/ti/sysbios/interfaces/ITimer.h
ICall/icall.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Types.h
ICall/icall.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/IInstance.h
ICall/icall.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Types.h
ICall/icall.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/IModule.h
ICall/icall.obj: C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/bios_6_46_01_38/packages/ti/sysbios/knl/Queue.h
ICall/icall.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Types.h
ICall/icall.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/IInstance.h
ICall/icall.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/IModule.h
ICall/icall.obj: C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/bios_6_46_01_38/packages/ti/sysbios/knl/Swi.h
ICall/icall.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Types.h
ICall/icall.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/IInstance.h
ICall/icall.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Error.h
ICall/icall.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Assert.h
ICall/icall.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Diags.h
ICall/icall.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Log.h
ICall/icall.obj: C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/bios_6_46_01_38/packages/ti/sysbios/knl/Queue.h
ICall/icall.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/IModule.h
ICall/icall.obj: C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/bios_6_46_01_38/packages/ti/sysbios/knl/package/Clock_TimerProxy.h
ICall/icall.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Types.h
ICall/icall.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/IInstance.h
ICall/icall.obj: C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/bios_6_46_01_38/packages/ti/sysbios/interfaces/ITimer.h
ICall/icall.obj: C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/bios_6_46_01_38/packages/ti/sysbios/knl/package/Clock_TimerProxy.h
ICall/icall.obj: C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/bios_6_46_01_38/packages/ti/sysbios/knl/Task.h
ICall/icall.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Types.h
ICall/icall.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/IInstance.h
ICall/icall.obj: C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/bios_6_46_01_38/packages/ti/sysbios/knl/Task__prologue.h
ICall/icall.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Error.h
ICall/icall.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Assert.h
ICall/icall.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Diags.h
ICall/icall.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Log.h
ICall/icall.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/IHeap.h
ICall/icall.obj: C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/bios_6_46_01_38/packages/ti/sysbios/knl/Queue.h
ICall/icall.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/IModule.h
ICall/icall.obj: C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/bios_6_46_01_38/packages/ti/sysbios/interfaces/ITaskSupport.h
ICall/icall.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Types.h
ICall/icall.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Error.h
ICall/icall.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/IModule.h
ICall/icall.obj: C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/bios_6_46_01_38/packages/ti/sysbios/knl/Clock.h
ICall/icall.obj: C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/bios_6_46_01_38/packages/ti/sysbios/knl/package/Task_SupportProxy.h
ICall/icall.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Types.h
ICall/icall.obj: C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/bios_6_46_01_38/packages/ti/sysbios/interfaces/ITaskSupport.h
ICall/icall.obj: C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/bios_6_46_01_38/packages/ti/sysbios/knl/Task__epilogue.h
ICall/icall.obj: C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/bios_6_46_01_38/packages/ti/sysbios/knl/package/Task_SupportProxy.h
ICall/icall.obj: C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/bios_6_46_01_38/packages/ti/sysbios/knl/Semaphore.h
ICall/icall.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Types.h
ICall/icall.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/IInstance.h
ICall/icall.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Diags.h
ICall/icall.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Log.h
ICall/icall.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Assert.h
ICall/icall.obj: C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/bios_6_46_01_38/packages/ti/sysbios/knl/Queue.h
ICall/icall.obj: C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/bios_6_46_01_38/packages/ti/sysbios/knl/Task.h
ICall/icall.obj: C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/bios_6_46_01_38/packages/ti/sysbios/knl/Clock.h
ICall/icall.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/IModule.h
ICall/icall.obj: C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/bios_6_46_01_38/packages/ti/sysbios/knl/Event.h
ICall/icall.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Types.h
ICall/icall.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/IInstance.h
ICall/icall.obj: C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/bios_6_46_01_38/packages/ti/sysbios/knl/Event__prologue.h
ICall/icall.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Assert.h
ICall/icall.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Diags.h
ICall/icall.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Log.h
ICall/icall.obj: C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/bios_6_46_01_38/packages/ti/sysbios/knl/Queue.h
ICall/icall.obj: C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/bios_6_46_01_38/packages/ti/sysbios/knl/Clock.h
ICall/icall.obj: C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/bios_6_46_01_38/packages/ti/sysbios/knl/Task.h
ICall/icall.obj: C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/IModule.h
ICall/icall.obj: C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/bios_6_46_01_38/packages/ti/sysbios/knl/Event__epilogue.h
ICall/icall.obj: C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/bios_6_46_01_38/packages/ti/sysbios/knl/Event.h
ICall/icall.obj: C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/bios_6_46_01_38/packages/ti/sysbios/BIOS.h
ICall/icall.obj: C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/bios_6_46_01_38/packages/ti/sysbios/package/BIOS_RtsGateProxy.h
ICall/icall.obj: C:/ti/simplelink/ble_sdk_2_02_01_18/src/components/icall/src/inc/icall.h
ICall/icall.obj: C:/ti/ccsv7/tools/compiler/ti-cgt-arm_16.9.3.LTS/include/stdbool.h
ICall/icall.obj: C:/ti/ccsv7/tools/compiler/ti-cgt-arm_16.9.3.LTS/include/stdlib.h
ICall/icall.obj: C:/ti/ccsv7/tools/compiler/ti-cgt-arm_16.9.3.LTS/include/linkage.h
ICall/icall.obj: C:/ti/simplelink/ble_sdk_2_02_01_18/src/components/hal/src/inc/hal_assert.h
ICall/icall.obj: C:/ti/simplelink/ble_sdk_2_02_01_18/src/components/hal/src/target/_common/hal_types.h
ICall/icall.obj: C:/ti/simplelink/ble_sdk_2_02_01_18/src/components/hal/src/target/_common/../_common/cc26xx/_hal_types.h
ICall/icall.obj: C:/ti/simplelink/ble_sdk_2_02_01_18/src/components/hal/src/inc/hal_defs.h
ICall/icall.obj: C:/ti/simplelink/ble_sdk_2_02_01_18/src/components/icall/src/icall_platform.h
ICall/icall.obj: C:/ti/ccsv7/tools/compiler/ti-cgt-arm_16.9.3.LTS/include/stdlib.h
ICall/icall.obj: C:/ti/simplelink/ble_sdk_2_02_01_18/src/icall/inc/icall_addrs.h
ICall/icall.obj: C:/ti/simplelink/ble_sdk_2_02_01_18/src/components/hal/src/target/_common/hal_types.h
ICall/icall.obj: C:/ti/simplelink/ble_sdk_2_02_01_18/src/icall/inc/ble_user_config.h
ICall/icall.obj: C:/ti/simplelink/ble_sdk_2_02_01_18/src/icall/inc/ble_dispatch.h
ICall/icall.obj: C:/ti/simplelink/ble_sdk_2_02_01_18/src/components/hal/src/target/_common/cc26xx/rf_hal.h
ICall/icall.obj: C:/ti/simplelink/ble_sdk_2_02_01_18/src/components/hal/src/target/_common/hal_types.h
ICall/icall.obj: C:/ti/simplelink/ble_sdk_2_02_01_18/src/target/board.h
ICall/icall.obj: C:/ti/simplelink/ble_sdk_2_02_01_18/src/target/./cc2650lp/cc2650lp_board.h
ICall/icall.obj: C:/ti/simplelink/ble_sdk_2_02_01_18/src/icall/inc/../../boards/CC2650_LAUNCHXL/Board.h
ICall/icall.obj: C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/tidrivers_cc13xx_cc26xx_2_20_01_10/packages/ti/drivers/Power.h
ICall/icall.obj: C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/tidrivers_cc13xx_cc26xx_2_20_01_10/packages/ti/drivers/utils/List.h
ICall/icall.obj: C:/ti/ccsv7/tools/compiler/ti-cgt-arm_16.9.3.LTS/include/stddef.h
ICall/icall.obj: C:/ti/simplelink/ble_sdk_2_02_01_18/src/icall/inc/../../boards/CC2650_LAUNCHXL/CC2650_LAUNCHXL.h
ICall/icall.obj: C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/tidrivers_cc13xx_cc26xx_2_20_01_10/packages/ti/drivers/PIN.h
ICall/icall.obj: C:/ti/ccsv7/tools/compiler/ti-cgt-arm_16.9.3.LTS/include/stddef.h
ICall/icall.obj: C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/cc26xxware_2_24_02_17393/driverlib/ioc.h
ICall/icall.obj: C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/cc26xxware_2_24_02_17393/inc/hw_types.h
ICall/icall.obj: C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/cc26xxware_2_24_02_17393/inc/hw_chip_def.h
ICall/icall.obj: C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/cc26xxware_2_24_02_17393/inc/hw_memmap.h
ICall/icall.obj: C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/cc26xxware_2_24_02_17393/inc/hw_ioc.h
ICall/icall.obj: C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/cc26xxware_2_24_02_17393/inc/hw_ints.h
ICall/icall.obj: C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/cc26xxware_2_24_02_17393/driverlib/interrupt.h
ICall/icall.obj: C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/cc26xxware_2_24_02_17393/inc/hw_nvic.h
ICall/icall.obj: C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/cc26xxware_2_24_02_17393/driverlib/debug.h
ICall/icall.obj: C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/cc26xxware_2_24_02_17393/driverlib/cpu.h
ICall/icall.obj: C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/cc26xxware_2_24_02_17393/inc/hw_cpu_scs.h
ICall/icall.obj: C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/cc26xxware_2_24_02_17393/driverlib/rom.h
ICall/icall.obj: C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/cc26xxware_2_24_02_17393/driverlib/gpio.h
ICall/icall.obj: C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/cc26xxware_2_24_02_17393/inc/hw_gpio.h
ICall/icall.obj: C:/ti/simplelink/ble_sdk_2_02_01_18/src/components/heapmgr/heapmgr.h
ICall/icall.obj: C:/ti/ccsv7/tools/compiler/ti-cgt-arm_16.9.3.LTS/include/string.h
C:/ti/simplelink/ble_sdk_2_02_01_18/src/components/icall/src/icall.c:
C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/bios_6_46_01_38/packages/ti/sysbios/hal/Hwi.h:
C:/ti/xdctools_3_32_00_06_core/packages/xdc/std.h:
C:/ti/ccsv7/tools/compiler/ti-cgt-arm_16.9.3.LTS/include/stdarg.h:
C:/ti/ccsv7/tools/compiler/ti-cgt-arm_16.9.3.LTS/include/stddef.h:
C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/bios_6_46_01_38/packages/ti/targets/arm/elf/std.h:
C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/bios_6_46_01_38/packages/ti/targets/arm/elf/M3.h:
C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/bios_6_46_01_38/packages/ti/targets/std.h:
C:/ti/ccsv7/tools/compiler/ti-cgt-arm_16.9.3.LTS/include/stdint.h:
C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/xdc.h:
C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Types.h:
C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Types__prologue.h:
C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/package/package.defs.h:
C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Types__epilogue.h:
C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/IInstance.h:
C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Types.h:
C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/bios_6_46_01_38/packages/ti/sysbios/hal/Hwi__prologue.h:
C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/bios_6_46_01_38/packages/ti/sysbios/hal/package/package.defs.h:
C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Error.h:
C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Types.h:
C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Error__prologue.h:
C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Main.h:
C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Types.h:
C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/IModule.h:
C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Types.h:
C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Types.h:
C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/IHeap.h:
C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Types.h:
C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/IInstance.h:
C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/IModule.h:
C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Error.h:
C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Memory.h:
C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Types.h:
C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/IModule.h:
C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/IHeap.h:
C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Error.h:
C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/package/Memory_HeapProxy.h:
C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Types.h:
C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/IInstance.h:
C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/IHeap.h:
C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Error.h:
C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/IGateProvider.h:
C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Types.h:
C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/IInstance.h:
C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/IModule.h:
C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/package/Main_Module_GateProxy.h:
C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Types.h:
C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/IInstance.h:
C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/IGateProvider.h:
C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/IModule.h:
C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Types.h:
C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Error__epilogue.h:
C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/bios_6_46_01_38/packages/ti/sysbios/interfaces/IHwi.h:
C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Types.h:
C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/IInstance.h:
C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/bios_6_46_01_38/packages/ti/sysbios/interfaces/package/package.defs.h:
C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Error.h:
C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/IModule.h:
C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/bios_6_46_01_38/packages/ti/sysbios/hal/package/Hwi_HwiProxy.h:
C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Types.h:
C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/IInstance.h:
C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/bios_6_46_01_38/packages/ti/sysbios/interfaces/IHwi.h:
C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/bios_6_46_01_38/packages/ti/sysbios/hal/Hwi__epilogue.h:
C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/bios_6_46_01_38/packages/ti/sysbios/family/arm/m3/Hwi.h:
C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Types.h:
C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/IInstance.h:
C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/bios_6_46_01_38/packages/ti/sysbios/family/arm/m3/Hwi__prologue.h:
C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/bios_6_46_01_38/packages/ti/sysbios/family/arm/m3/package/package.defs.h:
C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Diags.h:
C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Types.h:
C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Diags__prologue.h:
C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Main.h:
C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/IModule.h:
C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Types.h:
C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Diags__epilogue.h:
C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Log.h:
C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Types.h:
C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Log__prologue.h:
C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Error.h:
C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Main.h:
C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Diags.h:
C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/IModule.h:
C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Diags.h:
C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Types.h:
C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Text.h:
C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Types.h:
C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/IModule.h:
C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Types.h:
C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Log__epilogue.h:
C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Assert.h:
C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Types.h:
C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Assert__prologue.h:
C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Main.h:
C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Diags.h:
C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/IModule.h:
C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Diags.h:
C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Error.h:
C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Types.h:
C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Assert__epilogue.h:
C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Error.h:
C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/bios_6_46_01_38/packages/ti/sysbios/BIOS.h:
C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Types.h:
C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/bios_6_46_01_38/packages/ti/sysbios/BIOS__prologue.h:
C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/bios_6_46_01_38/packages/ti/sysbios/package/package.defs.h:
C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Error.h:
C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Types.h:
C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/IModule.h:
C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/IGateProvider.h:
C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/bios_6_46_01_38/packages/ti/sysbios/package/BIOS_RtsGateProxy.h:
C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Types.h:
C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/IInstance.h:
C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/IGateProvider.h:
C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/bios_6_46_01_38/packages/ti/sysbios/BIOS__epilogue.h:
C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/bios_6_46_01_38/packages/ti/sysbios/interfaces/IHwi.h:
C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/bios_6_46_01_38/packages/ti/sysbios/family/arm/m3/Hwi__epilogue.h:
C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/bios_6_46_01_38/packages/ti/sysbios/hal/package/Hwi_HwiProxy.h:
C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/bios_6_46_01_38/packages/ti/sysbios/gates/GateHwi.h:
C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Types.h:
C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/IInstance.h:
C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/bios_6_46_01_38/packages/ti/sysbios/gates/package/package.defs.h:
C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/IGateProvider.h:
C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/bios_6_46_01_38/packages/ti/sysbios/knl/Clock.h:
C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Types.h:
C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/IInstance.h:
C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/bios_6_46_01_38/packages/ti/sysbios/knl/package/package.defs.h:
C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Assert.h:
C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Diags.h:
C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Log.h:
C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/IModule.h:
C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/bios_6_46_01_38/packages/ti/sysbios/interfaces/ITimer.h:
C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Types.h:
C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/IInstance.h:
C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Types.h:
C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/IModule.h:
C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/bios_6_46_01_38/packages/ti/sysbios/knl/Queue.h:
C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Types.h:
C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/IInstance.h:
C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/IModule.h:
C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/bios_6_46_01_38/packages/ti/sysbios/knl/Swi.h:
C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Types.h:
C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/IInstance.h:
C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Error.h:
C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Assert.h:
C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Diags.h:
C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Log.h:
C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/bios_6_46_01_38/packages/ti/sysbios/knl/Queue.h:
C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/IModule.h:
C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/bios_6_46_01_38/packages/ti/sysbios/knl/package/Clock_TimerProxy.h:
C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Types.h:
C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/IInstance.h:
C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/bios_6_46_01_38/packages/ti/sysbios/interfaces/ITimer.h:
C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/bios_6_46_01_38/packages/ti/sysbios/knl/package/Clock_TimerProxy.h:
C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/bios_6_46_01_38/packages/ti/sysbios/knl/Task.h:
C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Types.h:
C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/IInstance.h:
C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/bios_6_46_01_38/packages/ti/sysbios/knl/Task__prologue.h:
C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Error.h:
C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Assert.h:
C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Diags.h:
C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Log.h:
C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/IHeap.h:
C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/bios_6_46_01_38/packages/ti/sysbios/knl/Queue.h:
C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/IModule.h:
C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/bios_6_46_01_38/packages/ti/sysbios/interfaces/ITaskSupport.h:
C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Types.h:
C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Error.h:
C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/IModule.h:
C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/bios_6_46_01_38/packages/ti/sysbios/knl/Clock.h:
C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/bios_6_46_01_38/packages/ti/sysbios/knl/package/Task_SupportProxy.h:
C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Types.h:
C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/bios_6_46_01_38/packages/ti/sysbios/interfaces/ITaskSupport.h:
C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/bios_6_46_01_38/packages/ti/sysbios/knl/Task__epilogue.h:
C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/bios_6_46_01_38/packages/ti/sysbios/knl/package/Task_SupportProxy.h:
C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/bios_6_46_01_38/packages/ti/sysbios/knl/Semaphore.h:
C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Types.h:
C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/IInstance.h:
C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Diags.h:
C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Log.h:
C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Assert.h:
C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/bios_6_46_01_38/packages/ti/sysbios/knl/Queue.h:
C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/bios_6_46_01_38/packages/ti/sysbios/knl/Task.h:
C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/bios_6_46_01_38/packages/ti/sysbios/knl/Clock.h:
C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/IModule.h:
C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/bios_6_46_01_38/packages/ti/sysbios/knl/Event.h:
C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Types.h:
C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/IInstance.h:
C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/bios_6_46_01_38/packages/ti/sysbios/knl/Event__prologue.h:
C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Assert.h:
C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Diags.h:
C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/Log.h:
C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/bios_6_46_01_38/packages/ti/sysbios/knl/Queue.h:
C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/bios_6_46_01_38/packages/ti/sysbios/knl/Clock.h:
C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/bios_6_46_01_38/packages/ti/sysbios/knl/Task.h:
C:/ti/xdctools_3_32_00_06_core/packages/xdc/runtime/IModule.h:
C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/bios_6_46_01_38/packages/ti/sysbios/knl/Event__epilogue.h:
C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/bios_6_46_01_38/packages/ti/sysbios/knl/Event.h:
C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/bios_6_46_01_38/packages/ti/sysbios/BIOS.h:
C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/bios_6_46_01_38/packages/ti/sysbios/package/BIOS_RtsGateProxy.h:
C:/ti/simplelink/ble_sdk_2_02_01_18/src/components/icall/src/inc/icall.h:
C:/ti/ccsv7/tools/compiler/ti-cgt-arm_16.9.3.LTS/include/stdbool.h:
C:/ti/ccsv7/tools/compiler/ti-cgt-arm_16.9.3.LTS/include/stdlib.h:
C:/ti/ccsv7/tools/compiler/ti-cgt-arm_16.9.3.LTS/include/linkage.h:
C:/ti/simplelink/ble_sdk_2_02_01_18/src/components/hal/src/inc/hal_assert.h:
C:/ti/simplelink/ble_sdk_2_02_01_18/src/components/hal/src/target/_common/hal_types.h:
C:/ti/simplelink/ble_sdk_2_02_01_18/src/components/hal/src/target/_common/../_common/cc26xx/_hal_types.h:
C:/ti/simplelink/ble_sdk_2_02_01_18/src/components/hal/src/inc/hal_defs.h:
C:/ti/simplelink/ble_sdk_2_02_01_18/src/components/icall/src/icall_platform.h:
C:/ti/ccsv7/tools/compiler/ti-cgt-arm_16.9.3.LTS/include/stdlib.h:
C:/ti/simplelink/ble_sdk_2_02_01_18/src/icall/inc/icall_addrs.h:
C:/ti/simplelink/ble_sdk_2_02_01_18/src/components/hal/src/target/_common/hal_types.h:
C:/ti/simplelink/ble_sdk_2_02_01_18/src/icall/inc/ble_user_config.h:
C:/ti/simplelink/ble_sdk_2_02_01_18/src/icall/inc/ble_dispatch.h:
C:/ti/simplelink/ble_sdk_2_02_01_18/src/components/hal/src/target/_common/cc26xx/rf_hal.h:
C:/ti/simplelink/ble_sdk_2_02_01_18/src/components/hal/src/target/_common/hal_types.h:
C:/ti/simplelink/ble_sdk_2_02_01_18/src/target/board.h:
C:/ti/simplelink/ble_sdk_2_02_01_18/src/target/./cc2650lp/cc2650lp_board.h:
C:/ti/simplelink/ble_sdk_2_02_01_18/src/icall/inc/../../boards/CC2650_LAUNCHXL/Board.h:
C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/tidrivers_cc13xx_cc26xx_2_20_01_10/packages/ti/drivers/Power.h:
C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/tidrivers_cc13xx_cc26xx_2_20_01_10/packages/ti/drivers/utils/List.h:
C:/ti/ccsv7/tools/compiler/ti-cgt-arm_16.9.3.LTS/include/stddef.h:
C:/ti/simplelink/ble_sdk_2_02_01_18/src/icall/inc/../../boards/CC2650_LAUNCHXL/CC2650_LAUNCHXL.h:
C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/tidrivers_cc13xx_cc26xx_2_20_01_10/packages/ti/drivers/PIN.h:
C:/ti/ccsv7/tools/compiler/ti-cgt-arm_16.9.3.LTS/include/stddef.h:
C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/cc26xxware_2_24_02_17393/driverlib/ioc.h:
C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/cc26xxware_2_24_02_17393/inc/hw_types.h:
C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/cc26xxware_2_24_02_17393/inc/hw_chip_def.h:
C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/cc26xxware_2_24_02_17393/inc/hw_memmap.h:
C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/cc26xxware_2_24_02_17393/inc/hw_ioc.h:
C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/cc26xxware_2_24_02_17393/inc/hw_ints.h:
C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/cc26xxware_2_24_02_17393/driverlib/interrupt.h:
C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/cc26xxware_2_24_02_17393/inc/hw_nvic.h:
C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/cc26xxware_2_24_02_17393/driverlib/debug.h:
C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/cc26xxware_2_24_02_17393/driverlib/cpu.h:
C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/cc26xxware_2_24_02_17393/inc/hw_cpu_scs.h:
C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/cc26xxware_2_24_02_17393/driverlib/rom.h:
C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/cc26xxware_2_24_02_17393/driverlib/gpio.h:
C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/cc26xxware_2_24_02_17393/inc/hw_gpio.h:
C:/ti/simplelink/ble_sdk_2_02_01_18/src/components/heapmgr/heapmgr.h:
C:/ti/ccsv7/tools/compiler/ti-cgt-arm_16.9.3.LTS/include/string.h:
|
D
|
module EditScene;
import Scene;
private import Sofu.Sofu;
private import Layer;
private import Brick;
private import SofuResource;
private import ImageResource;
private import Image;
private import std.stream;
private import derelict.sdl.sdl;
private import GameScene;
private import Vector;
private import Game;
private import BrickLayer;
private import Sprite;
private import Log;
private import MainMenu;
private import Button;
private import BrickObject;
class EditScene : Scene
{
this(Game game, char[] levelstring)
{
_level=loadSofu("levels/"~levelstring~".sofu");
_user=new Sofu.Map.Map(0,0,"");
super(game);
_buttonLayer=new Layer(this);
_return=0;
_levelstring=levelstring;
_brickLayer = new BrickLayer(this);
_userLayer = new BrickLayer(this);
_background = new Layer(this);
lastBrick=0;
_brick=false;
foreach(SofuObject object; _level.list("Decoration")) {
Map map = object.asMap();
wchar[] type = map.value("Type").toUTF16();
Sprite newSprite = new Sprite(map);
_background.addEntity(newSprite);
}
foreach(SofuObject object; _level.list("Enemies")) {
Map map = object.asMap();
wchar[] type = map.value("Type").toUTF16();
Sprite newSprite = new Sprite(map);
_background.addEntity(newSprite);
}
_dingsda = new Vector2d();
foreach(SofuObject object; _level.list("Pieces")) {
Value val = object.asValue();
BrickObject newBrick = new BrickObject(val.toUTF8());
_bricklist ~= newBrick;
//newBrick.split(new Vector2d(map.list("Position"),_userLayer);
}
foreach(SofuObject object; _level.list("World")) {
Map map = object.asMap();
Brick newBrick = new Brick(map);
_brickLayer.addEntity(newBrick);
}
_up=false;
_down=false;
_left=false;
_right=false;
_motion=false;
_titletime=_level.value("TitleTime").toDouble();
_title=loadImage(_level.value("Title").toUTF8());
_point = new Vector2d(_level.list("PlayerStart"));
_lemming=new Sprite(new Rect(_point,_point+new Vector2d(32,64)),new Animation(loadSofu("player.sofu").map("Animations").map("Idle")));
_buttonLayer.addEntity(_lemming);
Sofu.Map.Map editSceneData = loadSofu("EditScene.sofu");
_guiLayer = new Layer(this);
_startButton = new Button(editSceneData.map("StartButton"));
_guiLayer.addEntity(_startButton);
_homeButton = new Button(editSceneData.map("HomeButton"));
_guiLayer.addEntity(_homeButton);
}
void centerOnStart() {
_point = new Vector2d(_level.list("PlayerStart"));
}
void advance(double frametime)
{
if (_left) _point.x(_point.x()-(frametime/10));
if (_right) _point.x(_point.x()+(frametime/10));
if (_up) _point.y(_point.y()-(frametime/10));
if (_down) _point.y(_point.y()+(frametime/10));
bit release=false;
foreach (BrickObject object; _bricklist) {
if (object.clicked()) {
object.release();
release=true;
}
}
if (release) {
_userLayer.flush();
foreach (BrickObject object; _bricklist) {
if (object.set()) {
object.split(_userLayer);
}
}
}
_titletime-=frametime;
_brickLayer.advance(frametime);
_userLayer.advance(frametime);
_buttonLayer.advance(frametime);
_background.advance(frametime);
_brickLayer.centerOn(_point);
_buttonLayer.centerOn(_point);
_userLayer.centerOn(_point);
_background.centerOn(_point);
if (_lemming.clicked() || _startButton.clicked()) {
run();
}
if(_homeButton.clicked()) {
centerOnStart();
}
if (_brick) {
assert(lastBrick < _bricklist.length);
_bricklist[lastBrick].advance(frametime);
}
}
void draw()
{
_background.draw();
if (_titletime>0) _title.draw(new Vector2d(320-_title.width()/2,20));
_brickLayer.draw();
_userLayer.draw();
_buttonLayer.draw();
if (_brick) {
assert(lastBrick < _bricklist.length);
_bricklist[lastBrick].draw(_dingsda);
}
_guiLayer.draw();
}
void finish()
{
_finished = true;
}
bit finished() {
return _finished;
}
bit won() {
return _won;
}
void win() {
finish();
_won=true;
}
int returncode() {
if (_finished) {
return _return;
}
}
void run() {
save();
GameScene gamer=new GameScene(game(), this, _level, _user);
game().pushScene(gamer);
}
void save() {
_user.setAttribute("Bricks",_userLayer.getEntities());
//File file=new File("save/"~_levelstring~".sofu", FileMode.OutNew);
//char[] str = _user.outputString();
//file.writeBlock(str, str.length);
}
void keyDown(SDL_KeyboardEvent event) {
switch (event.keysym.sym) {
case SDLK_LEFT:_left=true;break;
case SDLK_RIGHT:_right=true;break;
case SDLK_UP:_up=true;break;
case SDLK_DOWN:_down=true;break;
case SDLK_SPACE:chooseBrick();break;
case SDLK_h:centerOnStart();break;
default:break;
}
}
void chooseBrick() {
//Log.log("%s","Choose Brick...");
if (!_brick) {
lastBrick=0;
}
else {
lastBrick++;
}
for (int i=lastBrick;i<_bricklist.length;i++) {
if (!_bricklist[i].set()) {
lastBrick=i;
_brick=true;
//Log.log("found:%d.\n",i);
return;
}
}
//Log.log("%s","No brick\n");
_brick=false;
lastBrick=0;
}
void keyUp(SDL_KeyboardEvent event) {
switch (event.keysym.sym) {
case SDLK_LEFT:_left=false;break;
case SDLK_RIGHT:_right=false;break;
case SDLK_UP:_up=false;break;
case SDLK_DOWN:_down=false;break;
case SDLK_ESCAPE:_finished=true;_return=0;save();break;
case SDLK_RETURN:run();break;
default:break;
}
}
void mouseMotion(Vector2d mousePosition, Vector2d mouseRel) {
_userLayer.mouseMotion(mousePosition,mouseRel);
_buttonLayer.mouseMotion(mousePosition,mouseRel);
if (_motion) {
_point+=-mouseRel;
}
if (_brick) {
_dingsda=mousePosition - _bricklist[lastBrick].extent().center();
}
_guiLayer.mouseMotion(mousePosition, mouseRel);
}
void lmbDown(Vector2d mousePosition) {
_userLayer.lmbDown(mousePosition);
_buttonLayer.lmbDown(mousePosition);
_guiLayer.lmbDown(mousePosition);
}
void lmbUp(Vector2d mousePosition) {
_userLayer.lmbUp(mousePosition);
_buttonLayer.lmbUp(mousePosition);
if (_brick) {
_bricklist[lastBrick].split(_point+mousePosition-new Vector2d(320,240) - _bricklist[lastBrick].extent().center(),_userLayer);
_brick=false;
}
_guiLayer.lmbUp(mousePosition);
}
void rmbDown(Vector2d mousePosition) {
_motion=true;
SDL_WM_GrabInput(SDL_GRAB_ON);;
}
void rmbUp(Vector2d mousePosition) {
_motion=false;
SDL_WM_GrabInput(SDL_GRAB_OFF);
}
private:
BrickLayer _brickLayer;
BrickLayer _userLayer;
Layer _buttonLayer;
Layer _background;
Layer _guiLayer;
Button _startButton;
Button _homeButton;
Sprite _lemming;
Sofu.Map.Map _user;
Sofu.Map.Map _level;
int _return;
bit _up;
bit _down;
bit _left;
bit _right;
bit _motion;
bit _brick;
bit _won=false;
BrickObject[] _bricklist;
int lastBrick;
Vector2d _point;
Vector2d _dingsda;
double _titletime;
Image _title;
bit _finished = false;
char[] _levelstring;
}
|
D
|
see with attention
under a moral obligation to someone
|
D
|
/**
Uses libasync
Copyright: © 2014 RejectedSoftware e.K., GlobecSys Inc
Authors: Sönke Ludwig, Etienne Cimon
License: Subject to the terms of the MIT license, as written in the included LICENSE.txt file.
*/
module vibe.core.drivers.libasync;
version(VibeLibasyncDriver):
import vibe.core.core;
import vibe.core.driver;
import vibe.core.drivers.threadedfile;
import vibe.core.drivers.timerqueue;
import vibe.core.log;
import vibe.utils.array : FixedRingBuffer;
import libasync : AsyncDirectoryWatcher, AsyncDNS, AsyncFile, AsyncSignal, AsyncTimer,
AsyncTCPConnection, AsyncTCPListener, AsyncUDPSocket, DWFileEvent, DWChangeInfo,
EventLoop, NetworkAddressLA = NetworkAddress, UDPEvent, TCPEvent, TCPOption, fd_t,
getThreadEventLoop;
import libasync.internals.memory;
import libasync.types : Status;
import std.algorithm : min, max;
import std.array;
import std.container : Array;
import std.conv;
import std.datetime;
import std.encoding;
import std.exception;
import std.string;
import std.stdio : File;
import std.typecons;
import core.atomic;
import core.memory;
import core.thread;
import core.sync.mutex;
import core.stdc.stdio;
import core.sys.posix.netinet.in_;
version (Posix) import core.sys.posix.sys.socket;
version (Windows) import core.sys.windows.winsock2;
private __gshared EventLoop gs_evLoop;
private EventLoop s_evLoop;
private DriverCore s_driverCore;
version(Windows) extern(C) {
FILE* _wfopen(const(wchar)* filename, in wchar* mode);
int _wchmod(in wchar*, int);
}
EventLoop getMainEventLoop() @trusted nothrow
{
if (s_evLoop is null)
return gs_evLoop;
return s_evLoop;
}
DriverCore getDriverCore() @safe nothrow
{
assert(s_driverCore !is null);
return s_driverCore;
}
private struct TimerInfo {
size_t refCount = 1;
void delegate() callback;
Task owner;
this(void delegate() callback) { this.callback = callback; }
}
/// one per thread
final class LibasyncDriver : EventDriver {
@trusted:
private {
bool m_break = false;
debug Thread m_ownerThread;
AsyncTimer m_timerEvent;
TimerQueue!TimerInfo m_timers;
SysTime m_nextSched = SysTime.max;
shared AsyncSignal m_exitSignal;
}
this(DriverCore core) nothrow
{
assert(!isControlThread, "Libasync driver created in control thread");
try {
import core.atomic : atomicOp;
if (!gs_mutex) {
import core.sync.mutex;
gs_mutex = new core.sync.mutex.Mutex;
gs_availID.reserve(32);
foreach (i; gs_availID.length .. gs_availID.capacity) {
gs_availID.insertBack(i + 1);
}
gs_maxID = 32;
}
}
catch (Throwable) {
assert(false, "Couldn't reserve necessary space for available Manual Events");
}
debug m_ownerThread = Thread.getThis();
s_driverCore = core;
s_evLoop = getThreadEventLoop();
if (!gs_evLoop)
gs_evLoop = s_evLoop;
m_exitSignal = new shared AsyncSignal(getMainEventLoop());
m_exitSignal.run({
m_break = true;
});
logTrace("Loaded libasync backend in thread %s", Thread.getThis().name);
}
static @property bool isControlThread() nothrow {
scope(failure) assert(false);
return Thread.getThis().isDaemon && Thread.getThis().name == "CmdProcessor";
}
override void dispose()
{
logTrace("Deleting event driver");
m_break = true;
getMainEventLoop().exit();
}
override int runEventLoop()
{
while(!m_break && getMainEventLoop().loop(int.max.msecs)){
processTimers();
getDriverCore().notifyIdle();
}
m_break = false;
logDebug("Event loop exit %d", m_break);
return 0;
}
override int runEventLoopOnce()
{
getMainEventLoop().loop(int.max.msecs);
processTimers();
getDriverCore().notifyIdle();
logTrace("runEventLoopOnce exit");
return 0;
}
override bool processEvents()
{
getMainEventLoop().loop(0.seconds);
processTimers();
if (m_break) {
m_break = false;
return false;
}
return true;
}
override void exitEventLoop()
{
logDebug("Exiting (%s)", m_break);
m_exitSignal.trigger();
}
override LibasyncFileStream openFile(Path path, FileMode mode)
{
return new LibasyncFileStream(path, mode);
}
override DirectoryWatcher watchDirectory(Path path, bool recursive)
{
return new LibasyncDirectoryWatcher(path, recursive);
}
/** Resolves the given host name or IP address string. */
override NetworkAddress resolveHost(string host, ushort family = 2, bool use_dns = true)
{
import libasync.types : isIPv6;
isIPv6 is_ipv6;
if (family == AF_INET6)
is_ipv6 = isIPv6.yes;
else
is_ipv6 = isIPv6.no;
import std.regex : regex, Captures, Regex, matchFirst, ctRegex;
import std.traits : ReturnType;
auto IPv4Regex = ctRegex!(`^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(\.|$)){4}$`, ``);
auto IPv6Regex = ctRegex!(`^([0-9A-Fa-f]{0,4}:){2,7}([0-9A-Fa-f]{1,4}$|((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(\.|$)){4})$`, ``);
auto ipv4 = matchFirst(host, IPv4Regex);
auto ipv6 = matchFirst(host, IPv6Regex);
if (!ipv4.empty)
{
if (!ipv4.empty)
is_ipv6 = isIPv6.no;
use_dns = false;
}
else if (!ipv6.empty)
{ // fixme: match host instead?
is_ipv6 = isIPv6.yes;
use_dns = false;
}
else
{
use_dns = true;
}
NetworkAddress ret;
if (use_dns) {
bool done;
struct DNSCallback {
Task waiter;
NetworkAddress* address;
bool* finished;
void handler(NetworkAddressLA addr) {
*address = NetworkAddress(addr);
*finished = true;
if (waiter != Task() && waiter != Task.getThis())
getDriverCore().resumeTask(waiter);
}
}
DNSCallback* cb = FreeListObjectAlloc!DNSCallback.alloc();
cb.waiter = Task.getThis();
cb.address = &ret;
cb.finished = &done;
// todo: remove the shared attribute to avoid GC?
shared AsyncDNS dns = new shared AsyncDNS(getMainEventLoop());
scope(exit) dns.destroy();
bool success = dns.handler(&cb.handler).resolveHost(host, is_ipv6);
if (!success || dns.status.code != Status.OK)
throw new Exception(dns.status.text);
while(!done)
getDriverCore.yieldForEvent();
if (dns.status.code != Status.OK)
throw new Exception(dns.status.text);
assert(ret != NetworkAddress.init);
assert(ret.family != 0);
logTrace("Async resolved address %s", ret.toString());
FreeListObjectAlloc!DNSCallback.free(cb);
if (ret.family == 0)
ret.family = family;
return ret;
}
else {
ret = NetworkAddress(getMainEventLoop().resolveIP(host, 0, is_ipv6));
if (ret.family == 0)
ret.family = family;
return ret;
}
}
override LibasyncTCPConnection connectTCP(NetworkAddress addr, NetworkAddress bind_addr)
{
AsyncTCPConnection conn = new AsyncTCPConnection(getMainEventLoop());
LibasyncTCPConnection tcp_connection = new LibasyncTCPConnection(conn, (TCPConnection conn) {
Task waiter = (cast(LibasyncTCPConnection) conn).m_settings.writer.task;
if (waiter != Task()) {
getDriverCore().resumeTask(waiter);
}
});
if (Task.getThis() != Task())
tcp_connection.m_settings.writer.acquire();
tcp_connection.m_tcpImpl.conn = conn;
//conn.local = bind_addr;
conn.ip(bind_addr.toAddressString(), bind_addr.port);
conn.peer = cast(NetworkAddressLA)addr;
enforce(conn.run(&tcp_connection.handler), "An error occured while starting a new connection: " ~ conn.error);
while (!tcp_connection.connected && !tcp_connection.m_error) getDriverCore().yieldForEvent();
enforce(!tcp_connection.m_error, tcp_connection.m_error);
tcp_connection.m_tcpImpl.localAddr = NetworkAddress(conn.local);
if (Task.getThis() != Task())
tcp_connection.m_settings.writer.release();
return tcp_connection;
}
override LibasyncTCPListener listenTCP(ushort port, void delegate(TCPConnection conn) @safe conn_callback, string address, TCPListenOptions options)
{
NetworkAddress localaddr = getEventDriver().resolveHost(address);
localaddr.port = port;
return new LibasyncTCPListener(localaddr, conn_callback, options);
}
override LibasyncUDPConnection listenUDP(ushort port, string bind_address = "0.0.0.0")
{
NetworkAddress localaddr = getEventDriver().resolveHost(bind_address);
localaddr.port = port;
AsyncUDPSocket sock = new AsyncUDPSocket(getMainEventLoop());
sock.local = cast(NetworkAddressLA)localaddr;
auto udp_connection = new LibasyncUDPConnection(sock);
sock.run(&udp_connection.handler);
return udp_connection;
}
override LibasyncManualEvent createManualEvent()
{
return new LibasyncManualEvent(this);
}
override FileDescriptorEvent createFileDescriptorEvent(int file_descriptor, FileDescriptorEvent.Trigger triggers, FileDescriptorEvent.Mode mode)
{
assert(false);
}
// The following timer implementation was adapted from the equivalent in libevent2.d
override size_t createTimer(void delegate() @safe callback) { return m_timers.create(TimerInfo(callback)); }
override void acquireTimer(size_t timer_id) { m_timers.getUserData(timer_id).refCount++; }
override void releaseTimer(size_t timer_id)
nothrow {
debug assert(m_ownerThread is Thread.getThis());
logTrace("Releasing timer %s", timer_id);
if (!--m_timers.getUserData(timer_id).refCount)
m_timers.destroy(timer_id);
}
override bool isTimerPending(size_t timer_id) nothrow { return m_timers.isPending(timer_id); }
override void rearmTimer(size_t timer_id, Duration dur, bool periodic)
{
debug assert(m_ownerThread is Thread.getThis());
if (!isTimerPending(timer_id)) acquireTimer(timer_id);
m_timers.schedule(timer_id, dur, periodic);
rescheduleTimerEvent(Clock.currTime(UTC()));
}
override void stopTimer(size_t timer_id)
{
logTrace("Stopping timer %s", timer_id);
if (m_timers.isPending(timer_id)) {
m_timers.unschedule(timer_id);
releaseTimer(timer_id);
}
}
override void waitTimer(size_t timer_id)
{
logTrace("Waiting for timer in %s", Task.getThis());
debug assert(m_ownerThread is Thread.getThis());
while (true) {
assert(!m_timers.isPeriodic(timer_id), "Cannot wait for a periodic timer.");
if (!m_timers.isPending(timer_id)) {
// logTrace("Timer is not pending");
return;
}
auto data = &m_timers.getUserData(timer_id);
assert(data.owner == Task.init, "Waiting for the same timer from multiple tasks is not supported.");
data.owner = Task.getThis();
scope (exit) m_timers.getUserData(timer_id).owner = Task.init;
getDriverCore().yieldForEvent();
}
}
/// If the timer has an owner, it will resume the task.
/// if the timer has a callback, it will run a new task.
private void processTimers()
{
if (!m_timers.anyPending) return;
logTrace("Processing due timers");
// process all timers that have expired up to now
auto now = Clock.currTime(UTC());
// event loop timer will need to be rescheduled because we'll process everything until now
m_nextSched = SysTime.max;
m_timers.consumeTimeouts(now, (timer, periodic, ref data) {
Task owner = data.owner;
auto callback = data.callback;
logTrace("Timer %s fired (%s/%s)", timer, owner != Task.init, callback !is null);
if (!periodic) releaseTimer(timer);
if (owner && owner.running && owner != Task.getThis()) {
if (Task.getThis == Task.init) getDriverCore().resumeTask(owner);
else getDriverCore().yieldAndResumeTask(owner);
}
if (callback) runTask(callback);
});
rescheduleTimerEvent(now);
}
private void rescheduleTimerEvent(SysTime now)
{
logTrace("Rescheduling timer event %s", Task.getThis());
// don't bother scheduling, the timers will be processed before leaving for the event loop
if (m_nextSched <= Clock.currTime(UTC()))
return;
bool first;
auto next = m_timers.getFirstTimeout();
Duration dur;
if (next == SysTime.max) return;
dur = max(1.msecs, next - now);
if (m_nextSched != next)
m_nextSched = next;
else return;
if (dur.total!"seconds"() >= int.max)
return; // will never trigger, don't bother
if (!m_timerEvent) {
//logTrace("creating new async timer");
m_timerEvent = new AsyncTimer(getMainEventLoop());
bool success = m_timerEvent.duration(dur).run(&onTimerTimeout);
assert(success, "Failed to run timer");
}
else {
//logTrace("rearming the same timer instance");
bool success = m_timerEvent.rearm(dur);
assert(success, "Failed to rearm timer");
}
//logTrace("Rescheduled timer event for %s seconds in thread '%s' :: task '%s'", dur.total!"usecs" * 1e-6, Thread.getThis().name, Task.getThis());
}
private void onTimerTimeout()
{
import std.encoding : sanitize;
logTrace("timer event fired");
try processTimers();
catch (Exception e) {
logError("Failed to process timers: %s", e.msg);
try logDiagnostic("Full error: %s", e.toString().sanitize); catch (Throwable) {}
}
}
}
/// Writes or reads asynchronously (in another thread) for sizes > 64kb to benefit from kernel page cache
/// in lower size operations.
final class LibasyncFileStream : FileStream {
@trusted:
import vibe.core.path : Path;
private {
Path m_path;
ulong m_size;
ulong m_offset = 0;
FileMode m_mode;
Task m_task;
Exception m_ex;
shared AsyncFile m_impl;
bool m_started;
bool m_truncated;
bool m_finished;
}
this(Path path, FileMode mode)
{
import std.file : getSize,exists;
if (mode != FileMode.createTrunc)
m_size = getSize(path.toNativeString());
else {
auto path_str = path.toNativeString();
if (exists(path_str))
removeFile(path);
{ // touch
import std.string : toStringz;
version(Windows) {
import std.utf : toUTF16z;
auto path_str_utf = path_str.toUTF16z();
FILE* f = _wfopen(path_str_utf, "w");
_wchmod(path_str_utf, S_IREAD|S_IWRITE);
}
else FILE * f = fopen(path_str.toStringz, "w");
fclose(f);
m_truncated = true;
}
}
m_path = path;
m_mode = mode;
m_impl = new shared AsyncFile(getMainEventLoop());
m_impl.onReady(&handler);
m_started = true;
}
~this()
{
try close();
catch (Exception e) { assert(false, e.msg); }
}
override @property Path path() const { return m_path; }
override @property bool isOpen() const { return m_started; }
override @property ulong size() const { return m_size; }
override @property bool readable() const { return m_mode != FileMode.append; }
override @property bool writable() const { return m_mode != FileMode.read; }
override void seek(ulong offset)
{
m_offset = offset;
}
override ulong tell() { return m_offset; }
override void close()
{
if (m_impl) {
m_impl.kill();
m_impl = null;
}
m_started = false;
if (m_task != Task() && Task.getThis() != Task())
getDriverCore().yieldAndResumeTask(m_task, new Exception("The file was closed during an operation"));
else if (m_task != Task() && Task.getThis() == Task())
getDriverCore().resumeTask(m_task, new Exception("The file was closed during an operation"));
}
override @property bool empty() const { assert(this.readable); return m_offset >= m_size; }
override @property ulong leastSize() const { assert(this.readable); return m_size - m_offset; }
override @property bool dataAvailableForRead() { return true; }
override const(ubyte)[] peek()
{
return null;
}
override size_t read(scope ubyte[] dst, IOMode)
{
scope(failure)
close();
assert(this.readable, "To read a file, it must be opened in a read-enabled mode.");
shared ubyte[] bytes = cast(shared) dst;
bool truncate_if_exists;
if (!m_truncated && m_mode == FileMode.createTrunc) {
truncate_if_exists = true;
m_truncated = true;
m_size = 0;
}
m_finished = false;
enforce(dst.length <= leastSize);
enforce(m_impl.read(m_path.toNativeString(), bytes, m_offset, true, truncate_if_exists), "Failed to read data from disk: " ~ m_impl.error);
if (!m_finished) {
acquire();
scope(exit) release();
getDriverCore().yieldForEvent();
}
m_finished = false;
if (m_ex) throw m_ex;
m_offset += dst.length;
assert(m_impl.offset == m_offset, "Incoherent offset returned from file reader: " ~ m_offset.to!string ~ "B assumed but the implementation is at: " ~ m_impl.offset.to!string ~ "B");
return dst.length;
}
alias Stream.write write;
override size_t write(in ubyte[] bytes_, IOMode)
{
assert(this.writable, "To write to a file, it must be opened in a write-enabled mode.");
shared const(ubyte)[] bytes = cast(shared const(ubyte)[]) bytes_;
bool truncate_if_exists;
if (!m_truncated && m_mode == FileMode.createTrunc) {
truncate_if_exists = true;
m_truncated = true;
m_size = 0;
}
m_finished = false;
if (m_mode == FileMode.append)
enforce(m_impl.append(m_path.toNativeString(), cast(shared ubyte[]) bytes, true, truncate_if_exists), "Failed to write data to disk: " ~ m_impl.error);
else
enforce(m_impl.write(m_path.toNativeString(), bytes, m_offset, true, truncate_if_exists), "Failed to write data to disk: " ~ m_impl.error);
if (!m_finished) {
acquire();
scope(exit) release();
getDriverCore().yieldForEvent();
}
m_finished = false;
if (m_ex) throw m_ex;
if (m_mode == FileMode.append) {
m_size += bytes.length;
}
else {
m_offset += bytes.length;
if (m_offset >= m_size)
m_size += m_offset - m_size;
assert(m_impl.offset == m_offset, "Incoherent offset returned from file writer.");
}
//assert(getSize(m_path.toNativeString()) == m_size, "Incoherency between local size and filesize: " ~ m_size.to!string ~ "B assumed for a file of size " ~ getSize(m_path.toNativeString()).to!string ~ "B");
return bytes_.length;
}
override void flush()
{
assert(this.writable, "To write to a file, it must be opened in a write-enabled mode.");
}
override void finalize()
{
if (this.writable)
flush();
}
void release()
{
assert(Task.getThis() == Task() || m_task == Task.getThis(), "Releasing FileStream that is not owned by the calling task.");
m_task = Task();
}
void acquire()
{
assert(Task.getThis() == Task() || m_task == Task(), "Acquiring FileStream that is already owned.");
m_task = Task.getThis();
}
private void handler() {
// This may be called by the event loop if read/write > 64kb and another thread was delegated
Exception ex;
if (m_impl.status.code != Status.OK)
ex = new Exception(m_impl.error);
m_finished = true;
if (m_task != Task())
getDriverCore().resumeTask(m_task, ex);
else m_ex = ex;
}
}
final class LibasyncDirectoryWatcher : DirectoryWatcher {
@trusted:
private {
Path m_path;
bool m_recursive;
Task m_task;
AsyncDirectoryWatcher m_impl;
Array!DirectoryChange m_changes;
Exception m_error;
}
this(Path path, bool recursive)
{
m_impl = new AsyncDirectoryWatcher(getMainEventLoop());
m_impl.run(&handler);
m_path = path;
m_recursive = recursive;
watch(path, recursive);
// logTrace("DirectoryWatcher called with: %s", path.toNativeString());
}
~this()
{
m_impl.kill();
}
override @property Path path() const { return m_path; }
override @property bool recursive() const { return m_recursive; }
void release()
{
assert(m_task == Task.getThis(), "Releasing FileStream that is not owned by the calling task.");
m_task = Task();
}
void acquire()
{
assert(m_task == Task(), "Acquiring FileStream that is already owned.");
m_task = Task.getThis();
}
bool amOwner()
{
return m_task == Task.getThis();
}
override bool readChanges(ref DirectoryChange[] dst, Duration timeout)
{
dst.length = 0;
assert(!amOwner());
if (m_error)
throw m_error;
acquire();
scope(exit) release();
void consumeChanges() {
if (m_impl.status.code == Status.ERROR) {
throw new Exception(m_impl.error);
}
foreach (ref change; m_changes[]) {
//logTrace("Adding change: %s", change.to!string);
dst ~= change;
}
//logTrace("Consumed change 1: %s", dst.to!string);
import std.array : array;
import std.algorithm : uniq;
dst = cast(DirectoryChange[]) uniq!((a, b) => a.path == b.path && a.type == b.type)(dst).array;
logTrace("Consumed change: %s", dst.to!string);
m_changes.clear();
}
if (!m_changes.empty) {
consumeChanges();
return true;
}
auto tm = getEventDriver().createTimer(null);
getEventDriver().m_timers.getUserData(tm).owner = Task.getThis();
getEventDriver().rearmTimer(tm, timeout, false);
while (m_changes.empty) {
getDriverCore().yieldForEvent();
if (!getEventDriver().isTimerPending(tm)) break;
}
if (!m_changes.empty) {
consumeChanges();
return true;
}
return false;
}
private void watch(Path path, bool recursive) {
m_impl.watchDir(path.toNativeString(), DWFileEvent.ALL, recursive);
}
private void handler() {
import std.stdio;
DWChangeInfo[] changes = allocArray!DWChangeInfo(manualAllocator(), 128);
scope(exit) freeArray(manualAllocator(), changes);
Exception ex;
try {
uint cnt;
do {
cnt = m_impl.readChanges(changes);
size_t i;
foreach (DWChangeInfo change; changes) {
DirectoryChange dc;
final switch (change.event){
case DWFileEvent.CREATED: dc.type = DirectoryChangeType.added; break;
case DWFileEvent.DELETED: dc.type = DirectoryChangeType.removed; break;
case DWFileEvent.MODIFIED: dc.type = DirectoryChangeType.modified; break;
case DWFileEvent.MOVED_FROM: dc.type = DirectoryChangeType.removed; break;
case DWFileEvent.MOVED_TO: dc.type = DirectoryChangeType.added; break;
case DWFileEvent.ALL: break; // impossible
case DWFileEvent.ERROR: throw new Exception(m_impl.error);
}
dc.path = Path(change.path);
//logTrace("Inserted %s absolute %s", dc.to!string, dc.path.absolute.to!string);
m_changes.insert(dc);
i++;
if (cnt == i) break;
}
} while(cnt == 0 && m_impl.status.code == Status.OK);
if (m_impl.status.code == Status.ERROR) {
ex = new Exception(m_impl.error);
}
}
catch (Exception e) {
ex = e;
}
if (m_task != Task()) getDriverCore().resumeTask(m_task, ex);
else m_error = ex;
}
}
final class LibasyncManualEvent : ManualEvent {
@trusted:
private {
shared(int) m_emitCount = 0;
shared(int) m_threadCount = 0;
shared(size_t) m_instance;
Array!(void*) ms_signals;
core.sync.mutex.Mutex m_mutex;
@property size_t instanceID() nothrow { return atomicLoad(m_instance); }
@property void instanceID(size_t instance) nothrow{ atomicStore(m_instance, instance); }
}
this(LibasyncDriver driver)
nothrow {
m_mutex = new core.sync.mutex.Mutex;
instanceID = generateID();
}
~this()
{
try {
recycleID(instanceID);
foreach (ref signal; ms_signals[]) {
if (signal) {
(cast(shared AsyncSignal) signal).kill();
signal = null;
}
}
} catch (Exception e) {
import std.stdio;
writefln("Exception thrown while finalizing LibasyncManualEvent: %s", e.msg);
}
}
override void emit()
{
scope (failure) assert(false); // synchronized is not nothrow on DMD 2.066 and below and Array is not nothrow at all
logTrace("Emitting signal");
atomicOp!"+="(m_emitCount, 1);
synchronized (m_mutex) {
logTrace("Looping signals. found: " ~ ms_signals.length.to!string);
foreach (ref signal; ms_signals[]) {
auto evloop = getMainEventLoop();
shared AsyncSignal sig = cast(shared AsyncSignal) signal;
if (!sig.trigger(evloop)) logError("Failed to trigger ManualEvent: %s", sig.error);
}
}
}
override void wait() { wait(m_emitCount); }
override int wait(int reference_emit_count) { return doWait!true(reference_emit_count); }
override int wait(Duration timeout, int reference_emit_count) { return doWait!true(timeout, reference_emit_count); }
override int waitUninterruptible(int reference_emit_count) { return doWait!false(reference_emit_count); }
override int waitUninterruptible(Duration timeout, int reference_emit_count) { return doWait!false(timeout, reference_emit_count); }
void acquire()
{
auto task = Task.getThis();
bool signal_exists;
size_t instance = instanceID;
if (s_eventWaiters.length <= instance)
expandWaiters();
logTrace("Acquire event ID#%d", instance);
auto taskList = s_eventWaiters[instance];
if (taskList.length > 0)
signal_exists = true;
if (!signal_exists) {
shared AsyncSignal sig = new shared AsyncSignal(getMainEventLoop());
sig.run(&onSignal);
synchronized (m_mutex) ms_signals.insertBack(cast(void*)sig);
}
s_eventWaiters[instance].insertBack(Task.getThis());
}
void release()
{
assert(amOwner(), "Releasing non-acquired signal.");
import std.algorithm : countUntil;
size_t instance = instanceID;
auto taskList = s_eventWaiters[instance];
auto idx = taskList[].countUntil!((a, b) => a == b)(Task.getThis());
logTrace("Release event ID#%d", instance);
s_eventWaiters[instance].linearRemove(taskList[idx .. idx+1]);
if (s_eventWaiters[instance].empty) {
removeMySignal();
}
}
bool amOwner()
{
import std.algorithm : countUntil;
size_t instance = instanceID;
if (s_eventWaiters.length <= instance) return false;
auto taskList = s_eventWaiters[instance];
if (taskList.length == 0) return false;
auto idx = taskList[].countUntil!((a, b) => a == b)(Task.getThis());
return idx != -1;
}
override @property int emitCount() const { return atomicLoad(m_emitCount); }
private int doWait(bool INTERRUPTIBLE)(int reference_emit_count)
{
try {
assert(!amOwner());
acquire();
scope(exit) release();
auto ec = this.emitCount;
while( ec == reference_emit_count ){
//synchronized(m_mutex) logTrace("Waiting for event with signal count: " ~ ms_signals.length.to!string);
static if (INTERRUPTIBLE) getDriverCore().yieldForEvent();
else getDriverCore().yieldForEventDeferThrow();
ec = this.emitCount;
}
return ec;
} catch (Exception e) {
static if (!INTERRUPTIBLE)
assert(false, e.msg); // still some function calls not marked nothrow
else throw e;
}
}
private int doWait(bool INTERRUPTIBLE)(Duration timeout, int reference_emit_count)
{
static if (!INTERRUPTIBLE) scope (failure) assert(false); // still some function calls not marked nothrow
assert(!amOwner());
acquire();
scope(exit) release();
auto tm = getEventDriver().createTimer(null);
scope (exit) getEventDriver().releaseTimer(tm);
getEventDriver().m_timers.getUserData(tm).owner = Task.getThis();
getEventDriver().rearmTimer(tm, timeout, false);
auto ec = this.emitCount;
while (ec == reference_emit_count) {
static if (INTERRUPTIBLE) getDriverCore().yieldForEvent();
else getDriverCore().yieldForEventDeferThrow();
ec = this.emitCount;
if (!getEventDriver().isTimerPending(tm)) break;
}
return ec;
}
private void removeMySignal() {
import std.algorithm : countUntil;
synchronized(m_mutex) {
auto idx = ms_signals[].countUntil!((void* a, LibasyncManualEvent b) { return ((cast(shared AsyncSignal) a).owner == Thread.getThis() && this is b);})(this);
if (idx >= 0)
ms_signals.linearRemove(ms_signals[idx .. idx+1]);
}
}
private void expandWaiters() {
size_t maxID;
synchronized(gs_mutex) maxID = gs_maxID;
s_eventWaiters.reserve(maxID);
logTrace("gs_maxID: %d", maxID);
size_t s_ev_len = s_eventWaiters.length;
size_t s_ev_cap = s_eventWaiters.capacity;
assert(maxID > s_eventWaiters.length);
foreach (i; s_ev_len .. s_ev_cap) {
s_eventWaiters.insertBack(Array!Task.init);
}
}
private void onSignal()
{
logTrace("Got signal in onSignal");
try {
auto thread = Thread.getThis();
auto core = getDriverCore();
size_t instance = instanceID;
logTrace("Got context: %d", instance);
foreach (Task task; s_eventWaiters[instance][]) {
logTrace("Task Found");
core.resumeTask(task);
}
} catch (Exception e) {
logError("Exception while handling signal event: %s", e.msg);
try logDebug("Full error: %s", sanitize(e.msg));
catch (Exception) {}
}
}
}
final class LibasyncTCPListener : TCPListener {
@trusted:
private {
NetworkAddress m_local;
void delegate(TCPConnection conn) @safe m_connectionCallback;
TCPListenOptions m_options;
AsyncTCPListener[] m_listeners;
fd_t socket;
}
this(NetworkAddress addr, void delegate(TCPConnection conn) @safe connection_callback, TCPListenOptions options)
{
m_connectionCallback = connection_callback;
m_options = options;
m_local = addr;
void function(shared LibasyncTCPListener) init = (shared LibasyncTCPListener ctxt){
synchronized(ctxt) {
LibasyncTCPListener ctxt2 = cast(LibasyncTCPListener)ctxt;
AsyncTCPListener listener = new AsyncTCPListener(getMainEventLoop(), ctxt2.socket);
listener.local = cast(NetworkAddressLA)ctxt2.m_local;
enforce(listener.run(&ctxt2.initConnection), "Failed to start listening to local socket: " ~ listener.error);
ctxt2.socket = listener.socket;
ctxt2.m_listeners ~= listener;
}
};
if (options & TCPListenOptions.distribute) runWorkerTaskDist(init, cast(shared) this);
else init(cast(shared) this);
}
override @property NetworkAddress bindAddress() { return m_local; }
@property void delegate(TCPConnection) connectionCallback() { return m_connectionCallback; }
private void delegate(TCPEvent) initConnection(AsyncTCPConnection conn) {
logTrace("Connection initialized in thread: " ~ Thread.getThis().name);
LibasyncTCPConnection native_conn = new LibasyncTCPConnection(conn, m_connectionCallback);
native_conn.m_tcpImpl.conn = conn;
native_conn.m_tcpImpl.localAddr = m_local;
return &native_conn.handler;
}
override void stopListening()
{
synchronized(this) {
foreach (listener; m_listeners) {
listener.kill();
listener = null;
}
}
}
}
final class LibasyncTCPConnection : TCPConnection/*, Buffered*/ {
@trusted:
private {
FixedRingBuffer!ubyte m_readBuffer;
ubyte[] m_buffer;
ubyte[] m_slice;
TCPConnectionImpl m_tcpImpl;
Settings m_settings;
bool m_closed = true;
bool m_mustRecv = true;
string m_error;
// The socket descriptor is unavailable to motivate low-level/API feature additions
// rather than high-lvl platform-dependent hacking
// fd_t socket;
}
ubyte[] readChunk(ubyte[] buffer = null)
{
logTrace("readBuf TCP: %d", buffer.length);
import std.algorithm : swap;
ubyte[] ret;
if (m_slice.length > 0) {
swap(ret, m_slice);
logTrace("readBuf returned instantly with slice length: %d", ret.length);
return ret;
}
if (m_readBuffer.length > 0) {
size_t amt = min(buffer.length, m_readBuffer.length);
m_readBuffer.read(buffer[0 .. amt]);
logTrace("readBuf returned with existing amount: %d", amt);
return buffer[0 .. amt];
}
if (buffer) {
m_buffer = buffer;
m_readBuffer.dispose();
}
leastSize();
swap(ret, m_slice);
logTrace("readBuf returned with buffered length: %d", ret.length);
return ret;
}
this(AsyncTCPConnection conn, void delegate(TCPConnection) @safe cb)
in { assert(conn !is null); }
body {
m_settings.onConnect = cb;
m_readBuffer.capacity = 64*1024;
}
private @property AsyncTCPConnection conn() {
return m_tcpImpl.conn;
}
// Using this setting completely disables the internal buffers as well
override @property void tcpNoDelay(bool enabled)
{
m_settings.tcpNoDelay = enabled;
conn.setOption(TCPOption.NODELAY, enabled);
}
override @property bool tcpNoDelay() const { return m_settings.tcpNoDelay; }
override @property void readTimeout(Duration dur)
{
m_settings.readTimeout = dur;
conn.setOption(TCPOption.TIMEOUT_RECV, dur);
}
override @property Duration readTimeout() const { return m_settings.readTimeout; }
override @property void keepAlive(bool enabled)
{
m_settings.keepAlive = enabled;
conn.setOption(TCPOption.KEEPALIVE_ENABLE, enabled);
}
override @property bool keepAlive() const { return m_settings.keepAlive; }
override @property bool connected() const { return !m_closed && m_tcpImpl.conn && m_tcpImpl.conn.isConnected; }
override @property bool dataAvailableForRead(){
logTrace("dataAvailableForRead");
m_settings.reader.acquire();
scope(exit) m_settings.reader.release();
return !readEmpty;
}
private @property bool readEmpty() {
return (m_buffer && !m_slice) || (!m_buffer && m_readBuffer.empty);
}
override @property string peerAddress() const { return m_tcpImpl.conn.peer.toString(); }
override @property NetworkAddress localAddress() const { return m_tcpImpl.localAddr; }
override @property NetworkAddress remoteAddress() const { return NetworkAddress(m_tcpImpl.conn.peer); }
override @property bool empty() { return leastSize == 0; }
override @property ulong leastSize()
{
logTrace("leastSize TCP");
m_settings.reader.acquire();
scope(exit) m_settings.reader.release();
while( m_readBuffer.empty ){
if (!connected)
return 0;
m_settings.reader.noExcept = true;
getDriverCore().yieldForEvent();
m_settings.reader.noExcept = false;
}
return (m_slice.length > 0) ? m_slice.length : m_readBuffer.length;
}
override void close()
{
logTrace("Close TCP enter");
// resume any reader, so that the read operation can be ended with a failure
Task reader = m_settings.reader.task;
while (m_settings.reader.isWaiting && reader.running) {
logTrace("resuming reader first");
getDriverCore().yieldAndResumeTask(reader);
}
// test if the connection is already closed
if (m_closed) {
logTrace("connection already closed.");
return;
}
//logTrace("closing");
m_settings.writer.acquire();
scope(exit) m_settings.writer.release();
// checkConnected();
m_readBuffer.dispose();
onClose(null, false);
}
override bool waitForData(Duration timeout = Duration.max)
{
// 0 seconds is max. CHanging this would be breaking, might as well use -1 for immediate
if (timeout == 0.seconds)
timeout = Duration.max;
logTrace("WaitForData enter, timeout %s :: Ptr %s", timeout.toString(), (cast(void*)this).to!string);
m_settings.reader.acquire();
auto _driver = getEventDriver();
auto tm = _driver.createTimer(null);
scope(exit) {
_driver.stopTimer(tm);
_driver.releaseTimer(tm);
m_settings.reader.release();
}
_driver.m_timers.getUserData(tm).owner = Task.getThis();
if (timeout != Duration.max) _driver.rearmTimer(tm, timeout, false);
logTrace("waitForData TCP");
while (m_readBuffer.empty) {
if (!connected) return false;
if (m_mustRecv)
onRead();
else {
//logTrace("Yielding for event in waitForData, waiting? %s", m_settings.reader.isWaiting);
m_settings.reader.noExcept = true;
getDriverCore().yieldForEvent();
m_settings.reader.noExcept = false;
}
if (timeout != Duration.max && !_driver.isTimerPending(tm)) {
logTrace("WaitForData TCP: timer signal");
return false;
}
}
if (m_readBuffer.empty && !connected) return false;
logTrace("WaitForData exit: fiber resumed with read buffer");
return !m_readBuffer.empty;
}
override const(ubyte)[] peek()
{
logTrace("Peek TCP enter");
m_settings.reader.acquire();
scope(exit) m_settings.reader.release();
if (!readEmpty)
return (m_slice.length > 0) ? cast(const(ubyte)[]) m_slice : m_readBuffer.peek();
else
return null;
}
override size_t read(scope ubyte[] dst, IOMode)
{
if (!dst.length) return 0;
assert(dst !is null && !m_slice);
logTrace("Read TCP");
m_settings.reader.acquire();
size_t len = 0;
scope(exit) m_settings.reader.release();
while( dst.length > 0 ){
while( m_readBuffer.empty ){
checkConnected();
if (m_mustRecv)
onRead();
else {
getDriverCore().yieldForEvent();
checkConnected();
}
}
size_t amt = min(dst.length, m_readBuffer.length);
m_readBuffer.read(dst[0 .. amt]);
dst = dst[amt .. $];
len += amt;
}
return len;
}
override size_t write(in ubyte[] bytes_, IOMode)
{
assert(bytes_ !is null);
logTrace("%s", "write enter");
m_settings.writer.acquire();
scope(exit) m_settings.writer.release();
checkConnected();
const(ubyte)[] bytes = bytes_;
logTrace("TCP write with %s bytes called", bytes.length);
bool first = true;
size_t offset;
size_t len = bytes.length;
do {
if (!first) {
getDriverCore().yieldForEvent();
}
checkConnected();
offset += conn.send(bytes[offset .. $]);
if (conn.hasError) {
throw new Exception(conn.error);
}
first = false;
} while (offset != len);
return len;
}
override void flush()
{
logTrace("%s", "Flush");
m_settings.writer.acquire();
scope(exit) m_settings.writer.release();
checkConnected();
}
override void finalize()
{
logTrace("%s", "finalize");
flush();
}
private void checkConnected()
{
enforce(connected, "The remote peer has closed the connection.");
logTrace("Check Connected");
}
private bool tryReadBuf() {
//logTrace("TryReadBuf with m_buffer: %s", m_buffer.length);
if (m_buffer) {
ubyte[] buf = m_buffer[m_slice.length .. $];
uint ret = conn.recv(buf);
logTrace("Received: %s", buf[0 .. ret]);
// check for overflow
if (ret == buf.length) {
logTrace("Overflow detected, revert to ring buffer");
m_slice = null;
m_readBuffer.capacity = 64*1024;
m_readBuffer.put(buf);
m_buffer = null;
return false; // cancel slices and revert to the fixed ring buffer
}
if (m_slice.length > 0) {
//logDebug("post-assign m_slice ");
m_slice = m_slice.ptr[0 .. m_slice.length + ret];
}
else {
//logDebug("using m_buffer");
m_slice = m_buffer[0 .. ret];
}
return true;
}
logTrace("TryReadBuf exit with %d bytes in m_slice, %d bytes in m_readBuffer ", m_slice.length, m_readBuffer.length);
return false;
}
private void onRead() {
m_mustRecv = true; // assume we didn't receive everything
if (tryReadBuf()) {
m_mustRecv = false;
return;
}
assert(!m_slice);
logTrace("OnRead with %s", m_readBuffer.freeSpace);
while( m_readBuffer.freeSpace > 0 ) {
ubyte[] dst = m_readBuffer.peekDst();
assert(dst.length <= int.max);
logTrace("Try to read up to bytes: %s", dst.length);
bool read_more;
do {
uint ret = conn.recv(dst);
if( ret > 0 ){
logTrace("received bytes: %s", ret);
m_readBuffer.putN(ret);
}
read_more = ret == dst.length;
// ret == 0! let's look for some errors
if (read_more) {
if (m_readBuffer.freeSpace == 0)
m_readBuffer.capacity = m_readBuffer.capacity*2;
dst = m_readBuffer.peekDst();
}
} while( read_more );
if (conn.status.code == Status.ASYNC) {
m_mustRecv = false; // we'll have to wait
break; // the kernel's buffer is empty
}
// ret == 0! let's look for some errors
else if (conn.status.code == Status.ASYNC) {
m_mustRecv = false; // we'll have to wait
break; // the kernel's buffer is empty
}
else if (conn.status.code != Status.OK) {
// We have a read error and the socket may now even be closed...
auto err = conn.error;
logTrace("receive error %s %s", err, conn.status.code);
throw new Exception("Socket error: " ~ conn.status.code.to!string);
}
else {
m_mustRecv = false;
break;
}
}
logTrace("OnRead exit with free bytes: %s", m_readBuffer.freeSpace);
}
/* The AsyncTCPConnection object will be automatically disposed when this returns.
* We're given some time to cleanup.
*/
private void onClose(in string msg = null, bool wake_ex = true) {
logTrace("onClose");
if (msg)
m_error = msg;
if (!m_closed) {
m_closed = true;
if (m_tcpImpl.conn && m_tcpImpl.conn.isConnected) {
m_tcpImpl.conn.kill(Task.getThis() != Task.init); // close the connection
m_tcpImpl.conn = null;
}
}
if (Task.getThis() != Task.init) {
return;
}
Exception ex;
if (!msg && wake_ex)
ex = new Exception("Connection closed");
else if (wake_ex) ex = new Exception(msg);
Task reader = m_settings.reader.task;
Task writer = m_settings.writer.task;
bool hasUniqueReader = m_settings.reader.isWaiting;
bool hasUniqueWriter = m_settings.writer.isWaiting && reader != writer;
if (hasUniqueWriter && Task.getThis() != writer && wake_ex) {
getDriverCore().resumeTask(writer, ex);
}
if (hasUniqueReader && Task.getThis() != reader) {
getDriverCore().resumeTask(reader, m_settings.reader.noExcept?null:ex);
}
}
void onConnect() {
scope(failure) onClose();
if (m_tcpImpl.conn && m_tcpImpl.conn.isConnected)
{
bool inbound = m_tcpImpl.conn.inbound;
try m_settings.onConnect(this);
catch ( Exception e) {
//logError(e.toString);
throw e;
}
catch ( Throwable e) {
logError("%s", e.toString);
throw e;
}
if (inbound) close();
}
logTrace("Finished callback");
}
void handler(TCPEvent ev) {
logTrace("Handler");
Exception ex;
final switch (ev) {
case TCPEvent.CONNECT:
m_closed = false;
// read & write are guaranteed to be successful on any platform at this point
if (m_tcpImpl.conn.inbound)
runTask(&onConnect);
else onConnect();
m_settings.onConnect = null;
break;
case TCPEvent.READ:
// fill the read buffer and resume any task if waiting
try onRead();
catch (Exception e) ex = e;
if (m_settings.reader.isWaiting)
getDriverCore().resumeTask(m_settings.reader.task, ex);
goto case TCPEvent.WRITE; // sometimes the kernel notified write with read events
case TCPEvent.WRITE:
// The kernel is ready to have some more data written, all we need to do is wake up the writer
if (m_settings.writer.isWaiting)
getDriverCore().resumeTask(m_settings.writer.task, ex);
break;
case TCPEvent.CLOSE:
m_closed = false;
onClose();
if (m_settings.onConnect)
m_settings.onConnect(this);
m_settings.onConnect = null;
break;
case TCPEvent.ERROR:
m_closed = false;
onClose(conn.error);
if (m_settings.onConnect)
m_settings.onConnect(this);
m_settings.onConnect = null;
break;
}
return;
}
struct Waiter {
Task task; // we can only have one task waiting for read/write operations
bool isWaiting; // if a task is actively waiting
bool noExcept;
void acquire() {
assert(!this.isWaiting, "Acquiring waiter that is already in use.");
if (Task.getThis() == Task()) return;
logTrace("%s", "Acquire waiter");
assert(!amOwner(), "Failed to acquire waiter in task: " ~ Task.getThis().fiber.to!string ~ ", it was busy with: " ~ this.task.to!string);
this.task = Task.getThis();
this.isWaiting = true;
}
void release() {
if (Task.getThis() == Task()) return;
logTrace("%s", "Release waiter");
assert(amOwner());
this.isWaiting = false;
}
bool amOwner() const {
if (this.isWaiting && this.task == Task.getThis())
return true;
return false;
}
}
struct Settings {
void delegate(TCPConnection) onConnect;
Duration readTimeout;
bool keepAlive;
bool tcpNoDelay;
Waiter reader;
Waiter writer;
}
struct TCPConnectionImpl {
NetworkAddress localAddr;
AsyncTCPConnection conn;
}
}
int total_conn;
final class LibasyncUDPConnection : UDPConnection {
@trusted:
private {
Task m_task;
AsyncUDPSocket m_udpImpl;
bool m_canBroadcast;
NetworkAddressLA m_peer;
bool m_waiting;
}
private @property AsyncUDPSocket socket() {
return m_udpImpl;
}
this(AsyncUDPSocket conn)
in { assert(conn !is null); }
body {
m_udpImpl = conn;
}
override @property string bindAddress() const {
return m_udpImpl.local.toAddressString();
}
override @property NetworkAddress localAddress() const { return NetworkAddress(m_udpImpl.local); }
override @property bool canBroadcast() const { return m_canBroadcast; }
override @property void canBroadcast(bool val)
{
socket.broadcast(val);
m_canBroadcast = val;
}
override void close()
{
socket.kill();
m_udpImpl = null;
}
bool amOwner() {
return m_task != Task() && m_task == Task.getThis();
}
void acquire()
{
assert(m_task == Task(), "Trying to acquire a UDP socket that is currently owned.");
m_task = Task.getThis();
}
void release()
{
assert(m_task != Task(), "Trying to release a UDP socket that is not owned.");
assert(m_task == Task.getThis(), "Trying to release a foreign UDP socket.");
m_task = Task();
}
override void connect(string host, ushort port)
{
// assert(m_peer == NetworkAddress.init, "Cannot connect to another peer");
NetworkAddress addr = getEventDriver().resolveHost(host, localAddress.family, true);
addr.port = port;
connect(addr);
}
override void connect(NetworkAddress addr)
{
m_peer = cast(NetworkAddressLA)addr;
}
override void send(in ubyte[] data, in NetworkAddress* peer_address = null)
{
assert(data.length <= int.max);
uint ret;
size_t retries = 3;
foreach (i; 0 .. retries) {
if( peer_address ){
auto pa = cast(NetworkAddressLA)*cast(NetworkAddress*)peer_address;
ret = socket.sendTo(data, pa);
} else {
ret = socket.sendTo(data, m_peer);
}
if (socket.status.code == Status.ASYNC) {
m_waiting = true;
getDriverCore().yieldForEvent();
}
else break;
}
logTrace("send ret: %s, %s", ret, socket.status.text);
enforce(socket.status.code == Status.OK, "Error sending UDP packet: " ~ socket.status.text);
enforce(ret == data.length, "Unable to send full packet.");
}
override ubyte[] recv(ubyte[] buf = null, NetworkAddress* peer_address = null)
{
return recv(Duration.max, buf, peer_address);
}
override ubyte[] recv(Duration timeout, ubyte[] buf = null, NetworkAddress* peer_address = null)
{
size_t tm = size_t.max;
auto m_driver = getEventDriver();
if (timeout != Duration.max && timeout > 0.seconds) {
tm = m_driver.createTimer(null);
m_driver.rearmTimer(tm, timeout, false);
m_driver.acquireTimer(tm);
}
acquire();
scope(exit) {
release();
if (tm != size_t.max) m_driver.releaseTimer(tm);
}
assert(buf.length <= int.max);
if( buf.length == 0 ) buf.length = 65507;
NetworkAddressLA from;
from.family = localAddress.family;
while(true){
auto ret = socket.recvFrom(buf, from);
if( ret > 0 ){
if( peer_address ) *peer_address = NetworkAddress(from);
return buf[0 .. ret];
}
else if( socket.status.code != Status.OK ){
auto err = socket.status.text;
logDebug("UDP recv err: %s", err);
enforce(socket.status.code == Status.ASYNC, "Error receiving UDP packet");
if (timeout != Duration.max) {
enforce(timeout > 0.seconds && m_driver.isTimerPending(tm), "UDP receive timeout.");
}
}
m_waiting = true;
getDriverCore().yieldForEvent();
}
}
void addMembership(ref NetworkAddress multiaddr)
{
assert(false, "TODO!");
}
@property void multicastLoopback(bool loop)
{
assert(false, "TODO!");
}
private void handler(UDPEvent ev)
{
logTrace("UDPConnection %p event", this);
Exception ex;
final switch (ev) {
case UDPEvent.READ:
if (m_waiting) {
m_waiting = false;
getDriverCore().resumeTask(m_task, null);
}
break;
case UDPEvent.WRITE:
if (m_waiting) {
m_waiting = false;
getDriverCore().resumeTask(m_task, null);
}
break;
case UDPEvent.ERROR:
getDriverCore.resumeTask(m_task, new Exception(socket.error));
break;
}
}
}
/* The following is used for LibasyncManualEvent */
import std.container : Array;
Array!(Array!Task) s_eventWaiters; // Task list in the current thread per instance ID
__gshared Array!size_t gs_availID;
__gshared size_t gs_maxID;
__gshared core.sync.mutex.Mutex gs_mutex;
private size_t generateID()
nothrow @trusted {
size_t idx;
import std.algorithm : max;
try {
size_t getIdx() {
if (!gs_availID.empty) {
immutable size_t ret = gs_availID.back;
gs_availID.removeBack();
return ret;
}
return 0;
}
synchronized(gs_mutex) {
idx = getIdx();
if (idx == 0) {
import std.range : iota;
gs_availID.insert( iota(gs_maxID + 1, max(32, gs_maxID * 2 + 1), 1) );
gs_maxID = gs_availID[$-1];
idx = getIdx();
}
}
} catch (Exception e) {
assert(false, "Failed to generate necessary ID for Manual Event waiters: " ~ e.msg);
}
return idx - 1;
}
void recycleID(size_t id)
@trusted nothrow {
try {
synchronized(gs_mutex) gs_availID.insert(id+1);
}
catch (Exception e) {
assert(false, "Error destroying Manual Event ID: " ~ id.to!string ~ " [" ~ e.msg ~ "]");
}
}
|
D
|
import eventcore.core;
import eventcore.internal.utils;
import std.functional : toDelegate;
import std.socket : InternetAddress;
import std.exception : enforce;
void main()
{
print("Starting up...");
auto addr = new InternetAddress("127.0.0.1", 8080);
auto listener = eventDriver.listenStream(addr, toDelegate(&onClientConnect));
enforce(listener != StreamListenSocketFD.invalid, "Failed to listen for connections.");
print("Listening for requests on port 8080...");
while (eventDriver.waiterCount)
eventDriver.processEvents();
}
void onClientConnect(StreamListenSocketFD listener, StreamSocketFD client)
@trusted /*@nogc*/ nothrow {
import core.stdc.stdlib;
auto handler = cast(ClientHandler*)calloc(1, ClientHandler.sizeof);
handler.client = client;
handler.handleConnection();
}
struct ClientHandler {
@safe: /*@nogc:*/ nothrow:
alias LineCallback = void delegate(ubyte[]);
StreamSocketFD client;
ubyte[512] linebuf = void;
size_t linefill = 0;
LineCallback onLine;
@disable this(this);
void handleConnection()
{
int fd = client;
//import core.thread;
//() @trusted { print("Connection %d %s", fd, cast(void*)Thread.getThis()); } ();
readLine(&onRequestLine);
}
void readLine(LineCallback on_line)
{
onLine = on_line;
if (linefill >= 2) onReadData(client, IOStatus.ok, 0);
else eventDriver.readSocket(client, linebuf[linefill .. $], IOMode.once, &onReadData);
}
void onRequestLine(ubyte[] ln)
{
//print("Request: %s", cast(char[])ln);
if (ln.length == 0) {
//print("Error: empty request line");
eventDriver.shutdownSocket(client);
eventDriver.releaseRef(client);
}
readLine(&onHeaderLine);
}
void onHeaderLine(ubyte[] ln)
{
if (ln.length == 0) {
auto reply = cast(const(ubyte)[])"HTTP/1.1 200 OK\r\nContent-Type: text/plain\r\nContent-Length: 13\r\nKeep-Alive: timeout=10\r\n\r\nHello, World!";
eventDriver.writeSocket(client, reply, IOMode.all, &onWriteFinished);
} else readLine(&onHeaderLine);
}
void onWriteFinished(StreamSocketFD fd, IOStatus status, size_t len)
{
readLine(&onRequestLine);
}
void onReadData(StreamSocketFD, IOStatus status, size_t bytes_read)
{
import std.algorithm : countUntil;
if (status != IOStatus.ok) {
print("Client disconnect");
eventDriver.shutdownSocket(client);
eventDriver.releaseRef(client);
return;
}
linefill += bytes_read;
assert(linefill <= linebuf.length);
auto idx = linebuf[0 .. linefill].countUntil(cast(const(ubyte)[])"\r\n");
if (idx >= 0) {
linebuf[linefill .. linefill + idx] = linebuf[0 .. idx];
foreach (i; 0 .. linefill - idx - 2)
linebuf[i] = linebuf[idx+2+i];
linefill -= idx + 2;
onLine(linebuf[linefill + idx + 2 .. linefill + idx + 2 + idx]);
} else if (linebuf.length - linefill > 0) {
eventDriver.readSocket(client, linebuf[linefill .. $], IOMode.once, &onReadData);
} else {
// ERROR: header line too long
print("Header line too long");
eventDriver.shutdownSocket(client);
eventDriver.releaseRef(client);
}
}
}
|
D
|
/**
* Compiler implementation of the
* $(LINK2 http://www.dlang.org, D programming language).
*
* Copyright: Copyright (c) 1999-2017 by Digital Mars, All Rights Reserved
* Authors: $(LINK2 http://www.digitalmars.com, Walter Bright)
* License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0)
* Source: $(DMDSRC _statement.d)
*/
module ddmd.statement;
import core.stdc.stdarg;
import core.stdc.stdio;
import ddmd.aggregate;
import ddmd.arraytypes;
import ddmd.attrib;
import ddmd.astcodegen;
import ddmd.gluelayer;
import ddmd.canthrow;
import ddmd.cond;
import ddmd.dclass;
import ddmd.declaration;
import ddmd.denum;
import ddmd.dimport;
import ddmd.dscope;
import ddmd.dsymbol;
import ddmd.dtemplate;
import ddmd.errors;
import ddmd.expression;
import ddmd.func;
import ddmd.globals;
import ddmd.hdrgen;
import ddmd.id;
import ddmd.identifier;
import ddmd.mtype;
import ddmd.parse;
import ddmd.root.outbuffer;
import ddmd.root.rootobject;
import ddmd.sapply;
import ddmd.sideeffect;
import ddmd.staticassert;
import ddmd.tokens;
import ddmd.visitor;
extern (C++) Identifier fixupLabelName(Scope* sc, Identifier ident)
{
uint flags = (sc.flags & SCOPEcontract);
const id = ident.toChars();
if (flags && flags != SCOPEinvariant && !(id[0] == '_' && id[1] == '_'))
{
/* CTFE requires FuncDeclaration::labtab for the interpretation.
* So fixing the label name inside in/out contracts is necessary
* for the uniqueness in labtab.
*/
const(char)* prefix = flags == SCOPErequire ? "__in_" : "__out_";
OutBuffer buf;
buf.printf("%s%s", prefix, ident.toChars());
ident = Identifier.idPool(buf.peekSlice());
}
return ident;
}
extern (C++) LabelStatement checkLabeledLoop(Scope* sc, Statement statement)
{
if (sc.slabel && sc.slabel.statement == statement)
{
return sc.slabel;
}
return null;
}
/***********************************************************
* Check an assignment is used as a condition.
* Intended to be use before the `semantic` call on `e`.
* Params:
* e = condition expression which is not yet run semantic analysis.
* Returns:
* `e` or ErrorExp.
*/
Expression checkAssignmentAsCondition(Expression e)
{
auto ec = e;
while (ec.op == TOKcomma)
ec = (cast(CommaExp)ec).e2;
if (ec.op == TOKassign)
{
ec.error("assignment cannot be used as a condition, perhaps `==` was meant?");
return new ErrorExp();
}
return e;
}
/// Return a type identifier reference to 'object.Throwable'
TypeIdentifier getThrowable()
{
auto tid = new TypeIdentifier(Loc(), Id.empty);
tid.addIdent(Id.object);
tid.addIdent(Id.Throwable);
return tid;
}
/***********************************************************
*/
extern (C++) abstract class Statement : RootObject
{
Loc loc;
override final DYNCAST dyncast() const
{
return DYNCAST.statement;
}
final extern (D) this(Loc loc)
{
this.loc = loc;
// If this is an in{} contract scope statement (skip for determining
// inlineStatus of a function body for header content)
}
Statement syntaxCopy()
{
assert(0);
}
override final void print()
{
fprintf(stderr, "%s\n", toChars());
fflush(stderr);
}
override final const(char)* toChars()
{
HdrGenState hgs;
OutBuffer buf;
.toCBuffer(this, &buf, &hgs);
return buf.extractString();
}
final void error(const(char)* format, ...)
{
va_list ap;
va_start(ap, format);
.verror(loc, format, ap);
va_end(ap);
}
final void warning(const(char)* format, ...)
{
va_list ap;
va_start(ap, format);
.vwarning(loc, format, ap);
va_end(ap);
}
final void deprecation(const(char)* format, ...)
{
va_list ap;
va_start(ap, format);
.vdeprecation(loc, format, ap);
va_end(ap);
}
Statement getRelatedLabeled()
{
return this;
}
bool hasBreak()
{
//printf("Statement::hasBreak()\n");
return false;
}
bool hasContinue()
{
return false;
}
/* ============================================== */
// true if statement uses exception handling
final bool usesEH()
{
extern (C++) final class UsesEH : StoppableVisitor
{
alias visit = super.visit;
public:
override void visit(Statement s)
{
}
override void visit(TryCatchStatement s)
{
stop = true;
}
override void visit(TryFinallyStatement s)
{
stop = true;
}
override void visit(OnScopeStatement s)
{
stop = true;
}
override void visit(SynchronizedStatement s)
{
stop = true;
}
}
scope UsesEH ueh = new UsesEH();
return walkPostorder(this, ueh);
}
/* ============================================== */
// true if statement 'comes from' somewhere else, like a goto
final bool comeFrom()
{
extern (C++) final class ComeFrom : StoppableVisitor
{
alias visit = super.visit;
public:
override void visit(Statement s)
{
}
override void visit(CaseStatement s)
{
stop = true;
}
override void visit(DefaultStatement s)
{
stop = true;
}
override void visit(LabelStatement s)
{
stop = true;
}
override void visit(AsmStatement s)
{
stop = true;
}
}
scope ComeFrom cf = new ComeFrom();
return walkPostorder(this, cf);
}
/* ============================================== */
// Return true if statement has executable code.
final bool hasCode()
{
extern (C++) final class HasCode : StoppableVisitor
{
alias visit = super.visit;
public:
override void visit(Statement s)
{
stop = true;
}
override void visit(ExpStatement s)
{
stop = s.exp !is null;
}
override void visit(CompoundStatement s)
{
}
override void visit(ScopeStatement s)
{
}
override void visit(ImportStatement s)
{
}
}
scope HasCode hc = new HasCode();
return walkPostorder(this, hc);
}
/****************************************
* If this statement has code that needs to run in a finally clause
* at the end of the current scope, return that code in the form of
* a Statement.
* Output:
* *sentry code executed upon entry to the scope
* *sexception code executed upon exit from the scope via exception
* *sfinally code executed in finally block
*/
Statement scopeCode(Scope* sc, Statement* sentry, Statement* sexception, Statement* sfinally)
{
//printf("Statement::scopeCode()\n");
//print();
*sentry = null;
*sexception = null;
*sfinally = null;
return this;
}
/*********************************
* Flatten out the scope by presenting the statement
* as an array of statements.
* Returns NULL if no flattening necessary.
*/
Statements* flatten(Scope* sc)
{
return null;
}
inout(Statement) last() inout nothrow pure
{
return this;
}
// Avoid dynamic_cast
ErrorStatement isErrorStatement()
{
return null;
}
inout(ScopeStatement) isScopeStatement() inout nothrow pure
{
return null;
}
ExpStatement isExpStatement()
{
return null;
}
inout(CompoundStatement) isCompoundStatement() inout nothrow pure
{
return null;
}
inout(ReturnStatement) isReturnStatement() inout nothrow pure
{
return null;
}
IfStatement isIfStatement()
{
return null;
}
CaseStatement isCaseStatement()
{
return null;
}
DefaultStatement isDefaultStatement()
{
return null;
}
LabelStatement isLabelStatement()
{
return null;
}
GotoDefaultStatement isGotoDefaultStatement() pure
{
return null;
}
GotoCaseStatement isGotoCaseStatement() pure
{
return null;
}
inout(BreakStatement) isBreakStatement() inout nothrow pure
{
return null;
}
DtorExpStatement isDtorExpStatement()
{
return null;
}
void accept(Visitor v)
{
v.visit(this);
}
}
/***********************************************************
* Any Statement that fails semantic() or has a component that is an ErrorExp or
* a TypeError should return an ErrorStatement from semantic().
*/
extern (C++) final class ErrorStatement : Statement
{
extern (D) this()
{
super(Loc());
assert(global.gaggedErrors || global.errors);
}
override Statement syntaxCopy()
{
return this;
}
override ErrorStatement isErrorStatement()
{
return this;
}
override void accept(Visitor v)
{
v.visit(this);
}
}
/***********************************************************
*/
extern (C++) final class PeelStatement : Statement
{
Statement s;
extern (D) this(Statement s)
{
super(s.loc);
this.s = s;
}
override void accept(Visitor v)
{
v.visit(this);
}
}
/***********************************************************
* Convert TemplateMixin members (== Dsymbols) to Statements.
*/
extern (C++) Statement toStatement(Dsymbol s)
{
extern (C++) final class ToStmt : Visitor
{
alias visit = super.visit;
public:
Statement result;
Statement visitMembers(Loc loc, Dsymbols* a)
{
if (!a)
return null;
auto statements = new Statements();
foreach (s; *a)
{
statements.push(toStatement(s));
}
return new CompoundStatement(loc, statements);
}
override void visit(Dsymbol s)
{
.error(Loc(), "Internal Compiler Error: cannot mixin %s `%s`\n", s.kind(), s.toChars());
result = new ErrorStatement();
}
override void visit(TemplateMixin tm)
{
auto a = new Statements();
foreach (m; *tm.members)
{
Statement s = toStatement(m);
if (s)
a.push(s);
}
result = new CompoundStatement(tm.loc, a);
}
/* An actual declaration symbol will be converted to DeclarationExp
* with ExpStatement.
*/
Statement declStmt(Dsymbol s)
{
auto de = new DeclarationExp(s.loc, s);
de.type = Type.tvoid; // avoid repeated semantic
return new ExpStatement(s.loc, de);
}
override void visit(VarDeclaration d)
{
result = declStmt(d);
}
override void visit(AggregateDeclaration d)
{
result = declStmt(d);
}
override void visit(FuncDeclaration d)
{
result = declStmt(d);
}
override void visit(EnumDeclaration d)
{
result = declStmt(d);
}
override void visit(AliasDeclaration d)
{
result = declStmt(d);
}
override void visit(TemplateDeclaration d)
{
result = declStmt(d);
}
/* All attributes have been already picked by the semantic analysis of
* 'bottom' declarations (function, struct, class, etc).
* So we don't have to copy them.
*/
override void visit(StorageClassDeclaration d)
{
result = visitMembers(d.loc, d.decl);
}
override void visit(DeprecatedDeclaration d)
{
result = visitMembers(d.loc, d.decl);
}
override void visit(LinkDeclaration d)
{
result = visitMembers(d.loc, d.decl);
}
override void visit(ProtDeclaration d)
{
result = visitMembers(d.loc, d.decl);
}
override void visit(AlignDeclaration d)
{
result = visitMembers(d.loc, d.decl);
}
override void visit(UserAttributeDeclaration d)
{
result = visitMembers(d.loc, d.decl);
}
override void visit(StaticAssert s)
{
}
override void visit(Import s)
{
}
override void visit(PragmaDeclaration d)
{
}
override void visit(ConditionalDeclaration d)
{
result = visitMembers(d.loc, d.include(null, null));
}
override void visit(StaticForeachDeclaration d)
{
assert(0,"TODO");
}
override void visit(CompileDeclaration d)
{
result = visitMembers(d.loc, d.include(null, null));
}
}
if (!s)
return null;
scope ToStmt v = new ToStmt();
s.accept(v);
return v.result;
}
/***********************************************************
*/
extern (C++) class ExpStatement : Statement
{
Expression exp;
final extern (D) this(Loc loc, Expression exp)
{
super(loc);
this.exp = exp;
}
final extern (D) this(Loc loc, Dsymbol declaration)
{
super(loc);
this.exp = new DeclarationExp(loc, declaration);
}
static ExpStatement create(Loc loc, Expression exp)
{
return new ExpStatement(loc, exp);
}
override Statement syntaxCopy()
{
return new ExpStatement(loc, exp ? exp.syntaxCopy() : null);
}
override final Statement scopeCode(Scope* sc, Statement* sentry, Statement* sexception, Statement* sfinally)
{
//printf("ExpStatement::scopeCode()\n");
//print();
*sentry = null;
*sexception = null;
*sfinally = null;
if (exp && exp.op == TOKdeclaration)
{
auto de = cast(DeclarationExp)exp;
auto v = de.declaration.isVarDeclaration();
if (v && !v.isDataseg())
{
if (v.needsScopeDtor())
{
//printf("dtor is: "); v.edtor.print();
*sfinally = new DtorExpStatement(loc, v.edtor, v);
v.storage_class |= STCnodtor; // don't add in dtor again
}
}
}
return this;
}
override final Statements* flatten(Scope* sc)
{
/* https://issues.dlang.org/show_bug.cgi?id=14243
* expand template mixin in statement scope
* to handle variable destructors.
*/
if (exp && exp.op == TOKdeclaration)
{
Dsymbol d = (cast(DeclarationExp)exp).declaration;
if (TemplateMixin tm = d.isTemplateMixin())
{
Expression e = exp.semantic(sc);
if (e.op == TOKerror || tm.errors)
{
auto a = new Statements();
a.push(new ErrorStatement());
return a;
}
assert(tm.members);
Statement s = toStatement(tm);
version (none)
{
OutBuffer buf;
buf.doindent = 1;
HdrGenState hgs;
hgs.hdrgen = true;
toCBuffer(s, &buf, &hgs);
printf("tm ==> s = %s\n", buf.peekString());
}
auto a = new Statements();
a.push(s);
return a;
}
}
return null;
}
override final ExpStatement isExpStatement()
{
return this;
}
override void accept(Visitor v)
{
v.visit(this);
}
}
/***********************************************************
*/
extern (C++) final class DtorExpStatement : ExpStatement
{
// Wraps an expression that is the destruction of 'var'
VarDeclaration var;
extern (D) this(Loc loc, Expression exp, VarDeclaration v)
{
super(loc, exp);
this.var = v;
}
override Statement syntaxCopy()
{
return new DtorExpStatement(loc, exp ? exp.syntaxCopy() : null, var);
}
override void accept(Visitor v)
{
v.visit(this);
}
override DtorExpStatement isDtorExpStatement()
{
return this;
}
}
/***********************************************************
*/
extern (C++) final class CompileStatement : Statement
{
Expression exp;
extern (D) this(Loc loc, Expression exp)
{
super(loc);
this.exp = exp;
}
override Statement syntaxCopy()
{
return new CompileStatement(loc, exp.syntaxCopy());
}
override Statements* flatten(Scope* sc)
{
//printf("CompileStatement::flatten() %s\n", exp.toChars());
auto errorStatements()
{
auto a = new Statements();
a.push(new ErrorStatement());
return a;
}
auto se = semanticString(sc, exp, "argument to mixin");
if (!se)
return errorStatements();
se = se.toUTF8(sc);
uint errors = global.errors;
scope p = new Parser!ASTCodegen(loc, sc._module, se.toStringz(), false);
p.nextToken();
auto a = new Statements();
while (p.token.value != TOKeof)
{
Statement s = p.parseStatement(PSsemi | PScurlyscope);
if (!s || p.errors)
{
assert(!p.errors || global.errors != errors); // make sure we caught all the cases
return errorStatements();
}
a.push(s);
}
return a;
}
override void accept(Visitor v)
{
v.visit(this);
}
}
/***********************************************************
*/
extern (C++) class CompoundStatement : Statement
{
Statements* statements;
/**
* Construct a `CompoundStatement` using an already existing
* array of `Statement`s
*
* Params:
* loc = Instantiation information
* s = An array of `Statement`s, that will referenced by this class
*/
final extern (D) this(Loc loc, Statements* s)
{
super(loc);
statements = s;
}
/**
* Construct a `CompoundStatement` from an array of `Statement`s
*
* Params:
* loc = Instantiation information
* s = A variadic array of `Statement`s, that will copied in this class
* The entries themselves will not be copied.
*/
final extern (D) this(Loc loc, Statement[] sts...)
{
super(loc);
statements = new Statements();
statements.reserve(sts.length);
foreach (s; sts)
statements.push(s);
}
static CompoundStatement create(Loc loc, Statement s1, Statement s2)
{
return new CompoundStatement(loc, s1, s2);
}
override Statement syntaxCopy()
{
auto a = new Statements();
a.setDim(statements.dim);
foreach (i, s; *statements)
{
(*a)[i] = s ? s.syntaxCopy() : null;
}
return new CompoundStatement(loc, a);
}
override Statements* flatten(Scope* sc)
{
return statements;
}
override final inout(ReturnStatement) isReturnStatement() inout nothrow pure
{
ReturnStatement rs = null;
foreach (s; *statements)
{
if (s)
{
rs = cast(ReturnStatement)s.isReturnStatement();
if (rs)
break;
}
}
return cast(inout)rs;
}
override final inout(Statement) last() inout nothrow pure
{
Statement s = null;
for (size_t i = statements.dim; i; --i)
{
s = cast(Statement)(*statements)[i - 1];
if (s)
{
s = cast(Statement)s.last();
if (s)
break;
}
}
return cast(inout)s;
}
override final inout(CompoundStatement) isCompoundStatement() inout nothrow pure
{
return this;
}
override void accept(Visitor v)
{
v.visit(this);
}
}
/***********************************************************
*/
extern (C++) final class CompoundDeclarationStatement : CompoundStatement
{
extern (D) this(Loc loc, Statements* s)
{
super(loc, s);
statements = s;
}
override Statement syntaxCopy()
{
auto a = new Statements();
a.setDim(statements.dim);
foreach (i, s; *statements)
{
(*a)[i] = s ? s.syntaxCopy() : null;
}
return new CompoundDeclarationStatement(loc, a);
}
override void accept(Visitor v)
{
v.visit(this);
}
}
/***********************************************************
* The purpose of this is so that continue will go to the next
* of the statements, and break will go to the end of the statements.
*/
extern (C++) final class UnrolledLoopStatement : Statement
{
Statements* statements;
extern (D) this(Loc loc, Statements* s)
{
super(loc);
statements = s;
}
override Statement syntaxCopy()
{
auto a = new Statements();
a.setDim(statements.dim);
foreach (i, s; *statements)
{
(*a)[i] = s ? s.syntaxCopy() : null;
}
return new UnrolledLoopStatement(loc, a);
}
override bool hasBreak()
{
return true;
}
override bool hasContinue()
{
return true;
}
override void accept(Visitor v)
{
v.visit(this);
}
}
/***********************************************************
*/
extern (C++) class ScopeStatement : Statement
{
Statement statement;
Loc endloc; // location of closing curly bracket
extern (D) this(Loc loc, Statement s, Loc endloc)
{
super(loc);
this.statement = s;
this.endloc = endloc;
}
override Statement syntaxCopy()
{
return new ScopeStatement(loc, statement ? statement.syntaxCopy() : null, endloc);
}
override inout(ScopeStatement) isScopeStatement() inout nothrow pure
{
return this;
}
override inout(ReturnStatement) isReturnStatement() inout nothrow pure
{
if (statement)
return statement.isReturnStatement();
return null;
}
override bool hasBreak()
{
//printf("ScopeStatement::hasBreak() %s\n", toChars());
return statement ? statement.hasBreak() : false;
}
override bool hasContinue()
{
return statement ? statement.hasContinue() : false;
}
override void accept(Visitor v)
{
v.visit(this);
}
}
/***********************************************************
* Scope that contains foreach index variables in a local scope and forwards other members.
* Also see: ddmd.attrib.ForwardingAttribDeclaration
*/
extern (C++) final class ForwardingStatement : Statement
{
ForwardingScopeDsymbol sym = null;
Statement statement;
extern (D) this(Loc loc, ForwardingScopeDsymbol sym, Statement s)
{
super(loc);
this.sym = sym;
assert(!!s);
statement = s;
}
extern (D) this(Loc loc, Statement s)
{
auto sym = new ForwardingScopeDsymbol(null);
sym.symtab = new DsymbolTable();
this(loc, sym, s);
}
override Statement syntaxCopy()
{
return new ForwardingStatement(loc, statement.syntaxCopy());
}
override Statement getRelatedLabeled()
{
if (!statement)
{
return null;
}
return statement.getRelatedLabeled();
}
override bool hasBreak()
{
if (!statement)
{
return false;
}
return statement.hasBreak();
}
override bool hasContinue()
{
if (!statement)
{
return false;
}
return statement.hasContinue();
}
override Statement scopeCode(Scope* sc, Statement* sentry, Statement* sexception, Statement* sfinally)
{
if (!statement)
{
return this;
}
sc = sc.push(sym);
statement = statement.scopeCode(sc, sentry, sexception, sfinally);
sc = sc.pop();
return statement ? this : null;
}
override inout(Statement) last() inout nothrow pure
{
if (!statement)
{
return null;
}
return statement.last();
}
override Statements* flatten(Scope* sc)
{
if (!statement)
{
return null;
}
sc = sc.push(sym);
auto a = statement.flatten(sc);
sc = sc.pop();
if (!a)
{
return a;
}
auto b = new Statements();
b.setDim(a.dim);
foreach (i, s; *a)
{
(*b)[i] = s ? new ForwardingStatement(s.loc, sym, s) : null;
}
return b;
}
override void accept(Visitor v){
v.visit(this);
}
}
/***********************************************************
*/
extern (C++) final class WhileStatement : Statement
{
Expression condition;
Statement _body;
Loc endloc; // location of closing curly bracket
extern (D) this(Loc loc, Expression c, Statement b, Loc endloc)
{
super(loc);
condition = c;
_body = b;
this.endloc = endloc;
}
override Statement syntaxCopy()
{
return new WhileStatement(loc,
condition.syntaxCopy(),
_body ? _body.syntaxCopy() : null,
endloc);
}
override bool hasBreak()
{
return true;
}
override bool hasContinue()
{
return true;
}
override void accept(Visitor v)
{
v.visit(this);
}
}
/***********************************************************
*/
extern (C++) final class DoStatement : Statement
{
Statement _body;
Expression condition;
Loc endloc; // location of ';' after while
extern (D) this(Loc loc, Statement b, Expression c, Loc endloc)
{
super(loc);
_body = b;
condition = c;
this.endloc = endloc;
}
override Statement syntaxCopy()
{
return new DoStatement(loc,
_body ? _body.syntaxCopy() : null,
condition.syntaxCopy(),
endloc);
}
override bool hasBreak()
{
return true;
}
override bool hasContinue()
{
return true;
}
override void accept(Visitor v)
{
v.visit(this);
}
}
/***********************************************************
*/
extern (C++) final class ForStatement : Statement
{
Statement _init;
Expression condition;
Expression increment;
Statement _body;
Loc endloc; // location of closing curly bracket
// When wrapped in try/finally clauses, this points to the outermost one,
// which may have an associated label. Internal break/continue statements
// treat that label as referring to this loop.
Statement relatedLabeled;
extern (D) this(Loc loc, Statement _init, Expression condition, Expression increment, Statement _body, Loc endloc)
{
super(loc);
this._init = _init;
this.condition = condition;
this.increment = increment;
this._body = _body;
this.endloc = endloc;
}
override Statement syntaxCopy()
{
return new ForStatement(loc,
_init ? _init.syntaxCopy() : null,
condition ? condition.syntaxCopy() : null,
increment ? increment.syntaxCopy() : null,
_body.syntaxCopy(),
endloc);
}
override Statement scopeCode(Scope* sc, Statement* sentry, Statement* sexception, Statement* sfinally)
{
//printf("ForStatement::scopeCode()\n");
Statement.scopeCode(sc, sentry, sexception, sfinally);
return this;
}
override Statement getRelatedLabeled()
{
return relatedLabeled ? relatedLabeled : this;
}
override bool hasBreak()
{
//printf("ForStatement::hasBreak()\n");
return true;
}
override bool hasContinue()
{
return true;
}
override void accept(Visitor v)
{
v.visit(this);
}
}
/***********************************************************
*/
extern (C++) final class ForeachStatement : Statement
{
TOK op; // TOKforeach or TOKforeach_reverse
Parameters* parameters; // array of Parameter*'s
Expression aggr;
Statement _body;
Loc endloc; // location of closing curly bracket
VarDeclaration key;
VarDeclaration value;
FuncDeclaration func; // function we're lexically in
Statements* cases; // put breaks, continues, gotos and returns here
ScopeStatements* gotos; // forward referenced goto's go here
extern (D) this(Loc loc, TOK op, Parameters* parameters, Expression aggr, Statement _body, Loc endloc)
{
super(loc);
this.op = op;
this.parameters = parameters;
this.aggr = aggr;
this._body = _body;
this.endloc = endloc;
}
override Statement syntaxCopy()
{
return new ForeachStatement(loc, op,
Parameter.arraySyntaxCopy(parameters),
aggr.syntaxCopy(),
_body ? _body.syntaxCopy() : null,
endloc);
}
bool checkForArgTypes()
{
bool result = false;
foreach (p; *parameters)
{
if (!p.type)
{
error("cannot infer type for `%s`", p.ident.toChars());
p.type = Type.terror;
result = true;
}
}
return result;
}
override bool hasBreak()
{
return true;
}
override bool hasContinue()
{
return true;
}
override void accept(Visitor v)
{
v.visit(this);
}
}
/***********************************************************
*/
extern (C++) final class ForeachRangeStatement : Statement
{
TOK op; // TOKforeach or TOKforeach_reverse
Parameter prm; // loop index variable
Expression lwr;
Expression upr;
Statement _body;
Loc endloc; // location of closing curly bracket
VarDeclaration key;
extern (D) this(Loc loc, TOK op, Parameter prm, Expression lwr, Expression upr, Statement _body, Loc endloc)
{
super(loc);
this.op = op;
this.prm = prm;
this.lwr = lwr;
this.upr = upr;
this._body = _body;
this.endloc = endloc;
}
override Statement syntaxCopy()
{
return new ForeachRangeStatement(loc, op, prm.syntaxCopy(), lwr.syntaxCopy(), upr.syntaxCopy(), _body ? _body.syntaxCopy() : null, endloc);
}
override bool hasBreak()
{
return true;
}
override bool hasContinue()
{
return true;
}
override void accept(Visitor v)
{
v.visit(this);
}
}
/***********************************************************
*/
extern (C++) final class IfStatement : Statement
{
Parameter prm;
Expression condition;
Statement ifbody;
Statement elsebody;
VarDeclaration match; // for MatchExpression results
Loc endloc; // location of closing curly bracket
extern (D) this(Loc loc, Parameter prm, Expression condition, Statement ifbody, Statement elsebody, Loc endloc)
{
super(loc);
this.prm = prm;
this.condition = condition;
this.ifbody = ifbody;
this.elsebody = elsebody;
this.endloc = endloc;
}
override Statement syntaxCopy()
{
return new IfStatement(loc,
prm ? prm.syntaxCopy() : null,
condition.syntaxCopy(),
ifbody ? ifbody.syntaxCopy() : null,
elsebody ? elsebody.syntaxCopy() : null,
endloc);
}
override IfStatement isIfStatement()
{
return this;
}
override void accept(Visitor v)
{
v.visit(this);
}
}
/***********************************************************
*/
extern (C++) final class ConditionalStatement : Statement
{
Condition condition;
Statement ifbody;
Statement elsebody;
extern (D) this(Loc loc, Condition condition, Statement ifbody, Statement elsebody)
{
super(loc);
this.condition = condition;
this.ifbody = ifbody;
this.elsebody = elsebody;
}
override Statement syntaxCopy()
{
return new ConditionalStatement(loc, condition.syntaxCopy(), ifbody.syntaxCopy(), elsebody ? elsebody.syntaxCopy() : null);
}
override Statements* flatten(Scope* sc)
{
Statement s;
//printf("ConditionalStatement::flatten()\n");
if (condition.include(sc, null))
{
DebugCondition dc = condition.isDebugCondition();
if (dc)
s = new DebugStatement(loc, ifbody);
else
s = ifbody;
}
else
s = elsebody;
auto a = new Statements();
a.push(s);
return a;
}
override void accept(Visitor v)
{
v.visit(this);
}
}
/***********************************************************
* Static foreach statements, like:
* void main(){
* static foreach(i; 0 .. 10)
* {
* pragma(msg, i);
* }
* }
*/
extern (C++) final class StaticForeachStatement : Statement
{
StaticForeach sfe;
bool cached = false;
Statements* cache = null;
extern (D) this(Loc loc, StaticForeach sfe)
{
super(loc);
this.sfe = sfe;
}
override Statement syntaxCopy()
{
return new StaticForeachStatement(loc,sfe.syntaxCopy());
}
override Statements* flatten(Scope* sc)
{
if (cached)
{
return cache;
}
sfe.prepare(sc);
if (sfe.ready())
{
import ddmd.statementsem;
auto s = makeTupleForeach!(true,false)(sc, sfe.aggrfe,sfe.needExpansion);
cached = true;
cache = s.flatten(sc);
if(cache) return cache;
cache = new Statements();
cache.push(s);
return cache;
}
else
{
cached = true;
cache = new Statements();
cache.push(new ErrorStatement());
return cache;
}
}
override void accept(Visitor v)
{
v.visit(this);
}
}
/***********************************************************
*/
extern (C++) final class PragmaStatement : Statement
{
Identifier ident;
Expressions* args; // array of Expression's
Statement _body;
extern (D) this(Loc loc, Identifier ident, Expressions* args, Statement _body)
{
super(loc);
this.ident = ident;
this.args = args;
this._body = _body;
}
override Statement syntaxCopy()
{
return new PragmaStatement(loc, ident, Expression.arraySyntaxCopy(args), _body ? _body.syntaxCopy() : null);
}
override void accept(Visitor v)
{
v.visit(this);
}
}
/***********************************************************
*/
extern (C++) final class StaticAssertStatement : Statement
{
StaticAssert sa;
extern (D) this(StaticAssert sa)
{
super(sa.loc);
this.sa = sa;
}
override Statement syntaxCopy()
{
return new StaticAssertStatement(cast(StaticAssert)sa.syntaxCopy(null));
}
override void accept(Visitor v)
{
v.visit(this);
}
}
/***********************************************************
*/
extern (C++) final class SwitchStatement : Statement
{
Expression condition;
Statement _body;
bool isFinal;
DefaultStatement sdefault;
TryFinallyStatement tf;
GotoCaseStatements gotoCases; // array of unresolved GotoCaseStatement's
CaseStatements* cases; // array of CaseStatement's
int hasNoDefault; // !=0 if no default statement
int hasVars; // !=0 if has variable case values
VarDeclaration lastVar;
extern (D) this(Loc loc, Expression c, Statement b, bool isFinal)
{
super(loc);
this.condition = c;
this._body = b;
this.isFinal = isFinal;
}
override Statement syntaxCopy()
{
return new SwitchStatement(loc, condition.syntaxCopy(), _body.syntaxCopy(), isFinal);
}
override bool hasBreak()
{
return true;
}
final bool checkLabel()
{
bool checkVar(VarDeclaration vd)
{
if (!vd || vd.isDataseg() || (vd.storage_class & STCmanifest))
return false;
VarDeclaration last = lastVar;
while (last && last != vd)
last = last.lastVar;
if (last == vd)
{
// All good, the label's scope has no variables
}
else if (vd.ident == Id.withSym)
{
deprecation("'switch' skips declaration of 'with' temporary at %s", vd.loc.toChars());
return true;
}
else
{
deprecation("'switch' skips declaration of variable %s at %s", vd.toPrettyChars(), vd.loc.toChars());
return true;
}
return false;
}
enum error = true;
if (sdefault && checkVar(sdefault.lastVar))
return !error; // return error once fully deprecated
foreach (scase; *cases)
{
if (scase && checkVar(scase.lastVar))
return !error; // return error once fully deprecated
}
return !error;
}
override void accept(Visitor v)
{
v.visit(this);
}
}
/***********************************************************
*/
extern (C++) final class CaseStatement : Statement
{
Expression exp;
Statement statement;
int index; // which case it is (since we sort this)
VarDeclaration lastVar;
extern (D) this(Loc loc, Expression exp, Statement s)
{
super(loc);
this.exp = exp;
this.statement = s;
}
override Statement syntaxCopy()
{
return new CaseStatement(loc, exp.syntaxCopy(), statement.syntaxCopy());
}
override int compare(RootObject obj)
{
// Sort cases so we can do an efficient lookup
CaseStatement cs2 = cast(CaseStatement)obj;
return exp.compare(cs2.exp);
}
override CaseStatement isCaseStatement()
{
return this;
}
override void accept(Visitor v)
{
v.visit(this);
}
}
/***********************************************************
*/
extern (C++) final class CaseRangeStatement : Statement
{
Expression first;
Expression last;
Statement statement;
extern (D) this(Loc loc, Expression first, Expression last, Statement s)
{
super(loc);
this.first = first;
this.last = last;
this.statement = s;
}
override Statement syntaxCopy()
{
return new CaseRangeStatement(loc, first.syntaxCopy(), last.syntaxCopy(), statement.syntaxCopy());
}
override void accept(Visitor v)
{
v.visit(this);
}
}
/***********************************************************
*/
extern (C++) final class DefaultStatement : Statement
{
Statement statement;
VarDeclaration lastVar;
extern (D) this(Loc loc, Statement s)
{
super(loc);
this.statement = s;
}
override Statement syntaxCopy()
{
return new DefaultStatement(loc, statement.syntaxCopy());
}
override DefaultStatement isDefaultStatement()
{
return this;
}
override void accept(Visitor v)
{
v.visit(this);
}
}
/***********************************************************
*/
extern (C++) final class GotoDefaultStatement : Statement
{
SwitchStatement sw;
extern (D) this(Loc loc)
{
super(loc);
}
override Statement syntaxCopy()
{
return new GotoDefaultStatement(loc);
}
override GotoDefaultStatement isGotoDefaultStatement() pure
{
return this;
}
override void accept(Visitor v)
{
v.visit(this);
}
}
/***********************************************************
*/
extern (C++) final class GotoCaseStatement : Statement
{
Expression exp; // null, or which case to goto
CaseStatement cs; // case statement it resolves to
extern (D) this(Loc loc, Expression exp)
{
super(loc);
this.exp = exp;
}
override Statement syntaxCopy()
{
return new GotoCaseStatement(loc, exp ? exp.syntaxCopy() : null);
}
override GotoCaseStatement isGotoCaseStatement() pure
{
return this;
}
override void accept(Visitor v)
{
v.visit(this);
}
}
/***********************************************************
*/
extern (C++) final class SwitchErrorStatement : Statement
{
extern (D) this(Loc loc)
{
super(loc);
}
override void accept(Visitor v)
{
v.visit(this);
}
}
/***********************************************************
*/
extern (C++) final class ReturnStatement : Statement
{
Expression exp;
size_t caseDim;
extern (D) this(Loc loc, Expression exp)
{
super(loc);
this.exp = exp;
}
override Statement syntaxCopy()
{
return new ReturnStatement(loc, exp ? exp.syntaxCopy() : null);
}
override inout(ReturnStatement) isReturnStatement() inout nothrow pure
{
return this;
}
override void accept(Visitor v)
{
v.visit(this);
}
}
/***********************************************************
*/
extern (C++) final class BreakStatement : Statement
{
Identifier ident;
extern (D) this(Loc loc, Identifier ident)
{
super(loc);
this.ident = ident;
}
override Statement syntaxCopy()
{
return new BreakStatement(loc, ident);
}
override inout(BreakStatement) isBreakStatement() inout nothrow pure
{
return this;
}
override void accept(Visitor v)
{
v.visit(this);
}
}
/***********************************************************
*/
extern (C++) final class ContinueStatement : Statement
{
Identifier ident;
extern (D) this(Loc loc, Identifier ident)
{
super(loc);
this.ident = ident;
}
override Statement syntaxCopy()
{
return new ContinueStatement(loc, ident);
}
override void accept(Visitor v)
{
v.visit(this);
}
}
/***********************************************************
*/
extern (C++) final class SynchronizedStatement : Statement
{
Expression exp;
Statement _body;
extern (D) this(Loc loc, Expression exp, Statement _body)
{
super(loc);
this.exp = exp;
this._body = _body;
}
override Statement syntaxCopy()
{
return new SynchronizedStatement(loc, exp ? exp.syntaxCopy() : null, _body ? _body.syntaxCopy() : null);
}
override bool hasBreak()
{
return false; //true;
}
override bool hasContinue()
{
return false; //true;
}
override void accept(Visitor v)
{
v.visit(this);
}
}
/***********************************************************
*/
extern (C++) final class WithStatement : Statement
{
Expression exp;
Statement _body;
VarDeclaration wthis;
Loc endloc;
extern (D) this(Loc loc, Expression exp, Statement _body, Loc endloc)
{
super(loc);
this.exp = exp;
this._body = _body;
this.endloc = endloc;
}
override Statement syntaxCopy()
{
return new WithStatement(loc, exp.syntaxCopy(), _body ? _body.syntaxCopy() : null, endloc);
}
override void accept(Visitor v)
{
v.visit(this);
}
}
/***********************************************************
*/
extern (C++) final class TryCatchStatement : Statement
{
Statement _body;
Catches* catches;
extern (D) this(Loc loc, Statement _body, Catches* catches)
{
super(loc);
this._body = _body;
this.catches = catches;
}
override Statement syntaxCopy()
{
auto a = new Catches();
a.setDim(catches.dim);
foreach (i, c; *catches)
{
(*a)[i] = c.syntaxCopy();
}
return new TryCatchStatement(loc, _body.syntaxCopy(), a);
}
override bool hasBreak()
{
return false;
}
override void accept(Visitor v)
{
v.visit(this);
}
}
/***********************************************************
*/
extern (C++) final class Catch : RootObject
{
Loc loc;
Type type;
Identifier ident;
VarDeclaration var;
Statement handler;
bool errors; // set if semantic processing errors
// was generated by the compiler, wasn't present in source code
bool internalCatch;
extern (D) this(Loc loc, Type t, Identifier id, Statement handler)
{
//printf("Catch(%s, loc = %s)\n", id.toChars(), loc.toChars());
this.loc = loc;
this.type = t;
this.ident = id;
this.handler = handler;
}
Catch syntaxCopy()
{
auto c = new Catch(loc, type ? type.syntaxCopy() : getThrowable(), ident, (handler ? handler.syntaxCopy() : null));
c.internalCatch = internalCatch;
return c;
}
}
/***********************************************************
*/
extern (C++) final class TryFinallyStatement : Statement
{
Statement _body;
Statement finalbody;
extern (D) this(Loc loc, Statement _body, Statement finalbody)
{
super(loc);
this._body = _body;
this.finalbody = finalbody;
}
static TryFinallyStatement create(Loc loc, Statement _body, Statement finalbody)
{
return new TryFinallyStatement(loc, _body, finalbody);
}
override Statement syntaxCopy()
{
return new TryFinallyStatement(loc, _body.syntaxCopy(), finalbody.syntaxCopy());
}
override bool hasBreak()
{
return false; //true;
}
override bool hasContinue()
{
return false; //true;
}
override void accept(Visitor v)
{
v.visit(this);
}
}
/***********************************************************
*/
extern (C++) final class OnScopeStatement : Statement
{
TOK tok;
Statement statement;
extern (D) this(Loc loc, TOK tok, Statement statement)
{
super(loc);
this.tok = tok;
this.statement = statement;
}
override Statement syntaxCopy()
{
return new OnScopeStatement(loc, tok, statement.syntaxCopy());
}
override Statement scopeCode(Scope* sc, Statement* sentry, Statement* sexception, Statement* sfinally)
{
//printf("OnScopeStatement::scopeCode()\n");
//print();
*sentry = null;
*sexception = null;
*sfinally = null;
Statement s = new PeelStatement(statement);
switch (tok)
{
case TOKon_scope_exit:
*sfinally = s;
break;
case TOKon_scope_failure:
*sexception = s;
break;
case TOKon_scope_success:
{
/* Create:
* sentry: bool x = false;
* sexception: x = true;
* sfinally: if (!x) statement;
*/
auto v = copyToTemp(0, "__os", new IntegerExp(Loc(), 0, Type.tbool));
v.semantic(sc);
*sentry = new ExpStatement(loc, v);
Expression e = new IntegerExp(Loc(), 1, Type.tbool);
e = new AssignExp(Loc(), new VarExp(Loc(), v), e);
*sexception = new ExpStatement(Loc(), e);
e = new VarExp(Loc(), v);
e = new NotExp(Loc(), e);
*sfinally = new IfStatement(Loc(), null, e, s, null, Loc());
break;
}
default:
assert(0);
}
return null;
}
override void accept(Visitor v)
{
v.visit(this);
}
}
/***********************************************************
*/
extern (C++) final class ThrowStatement : Statement
{
Expression exp;
// was generated by the compiler, wasn't present in source code
bool internalThrow;
extern (D) this(Loc loc, Expression exp)
{
super(loc);
this.exp = exp;
}
override Statement syntaxCopy()
{
auto s = new ThrowStatement(loc, exp.syntaxCopy());
s.internalThrow = internalThrow;
return s;
}
override void accept(Visitor v)
{
v.visit(this);
}
}
/***********************************************************
*/
extern (C++) final class DebugStatement : Statement
{
Statement statement;
extern (D) this(Loc loc, Statement statement)
{
super(loc);
this.statement = statement;
}
override Statement syntaxCopy()
{
return new DebugStatement(loc, statement ? statement.syntaxCopy() : null);
}
override Statements* flatten(Scope* sc)
{
Statements* a = statement ? statement.flatten(sc) : null;
if (a)
{
foreach (ref s; *a)
{
s = new DebugStatement(loc, s);
}
}
return a;
}
override void accept(Visitor v)
{
v.visit(this);
}
}
/***********************************************************
*/
extern (C++) final class GotoStatement : Statement
{
Identifier ident;
LabelDsymbol label;
TryFinallyStatement tf;
OnScopeStatement os;
VarDeclaration lastVar;
extern (D) this(Loc loc, Identifier ident)
{
super(loc);
this.ident = ident;
}
override Statement syntaxCopy()
{
return new GotoStatement(loc, ident);
}
final bool checkLabel()
{
if (!label.statement)
{
error("label `%s` is undefined", label.toChars());
return true;
}
if (label.statement.os != os)
{
if (os && os.tok == TOKon_scope_failure && !label.statement.os)
{
// Jump out from scope(failure) block is allowed.
}
else
{
if (label.statement.os)
error("cannot goto in to `%s` block", Token.toChars(label.statement.os.tok));
else
error("cannot goto out of `%s` block", Token.toChars(os.tok));
return true;
}
}
if (label.statement.tf != tf)
{
error("cannot goto in or out of `finally` block");
return true;
}
VarDeclaration vd = label.statement.lastVar;
if (!vd || vd.isDataseg() || (vd.storage_class & STCmanifest))
return false;
VarDeclaration last = lastVar;
while (last && last != vd)
last = last.lastVar;
if (last == vd)
{
// All good, the label's scope has no variables
}
else if (vd.storage_class & STCexptemp)
{
// Lifetime ends at end of expression, so no issue with skipping the statement
}
else if (vd.ident == Id.withSym)
{
error("`goto` skips declaration of `with` temporary at %s", vd.loc.toChars());
return true;
}
else
{
error("`goto` skips declaration of variable `%s` at %s", vd.toPrettyChars(), vd.loc.toChars());
return true;
}
return false;
}
override void accept(Visitor v)
{
v.visit(this);
}
}
/***********************************************************
*/
extern (C++) final class LabelStatement : Statement
{
Identifier ident;
Statement statement;
TryFinallyStatement tf;
OnScopeStatement os;
VarDeclaration lastVar;
Statement gotoTarget; // interpret
bool breaks; // someone did a 'break ident'
extern (D) this(Loc loc, Identifier ident, Statement statement)
{
super(loc);
this.ident = ident;
this.statement = statement;
}
override Statement syntaxCopy()
{
return new LabelStatement(loc, ident, statement ? statement.syntaxCopy() : null);
}
override Statements* flatten(Scope* sc)
{
Statements* a = null;
if (statement)
{
a = statement.flatten(sc);
if (a)
{
if (!a.dim)
{
a.push(new ExpStatement(loc, cast(Expression)null));
}
// reuse 'this' LabelStatement
this.statement = (*a)[0];
(*a)[0] = this;
}
}
return a;
}
override Statement scopeCode(Scope* sc, Statement* sentry, Statement* sexit, Statement* sfinally)
{
//printf("LabelStatement::scopeCode()\n");
if (statement)
statement = statement.scopeCode(sc, sentry, sexit, sfinally);
else
{
*sentry = null;
*sexit = null;
*sfinally = null;
}
return this;
}
override LabelStatement isLabelStatement()
{
return this;
}
override void accept(Visitor v)
{
v.visit(this);
}
}
/***********************************************************
*/
extern (C++) final class LabelDsymbol : Dsymbol
{
LabelStatement statement;
extern (D) this(Identifier ident)
{
super(ident);
}
static LabelDsymbol create(Identifier ident)
{
return new LabelDsymbol(ident);
}
// is this a LabelDsymbol()?
override LabelDsymbol isLabel()
{
return this;
}
override void accept(Visitor v)
{
v.visit(this);
}
}
/***********************************************************
*/
extern (C++) final class AsmStatement : Statement
{
Token* tokens;
code* asmcode;
uint asmalign; // alignment of this statement
uint regs; // mask of registers modified (must match regm_t in back end)
bool refparam; // true if function parameter is referenced
bool naked; // true if function is to be naked
extern (D) this(Loc loc, Token* tokens)
{
super(loc);
this.tokens = tokens;
}
override Statement syntaxCopy()
{
return new AsmStatement(loc, tokens);
}
override void accept(Visitor v)
{
v.visit(this);
}
}
/***********************************************************
* a complete asm {} block
*/
extern (C++) final class CompoundAsmStatement : CompoundStatement
{
StorageClass stc; // postfix attributes like nothrow/pure/@trusted
extern (D) this(Loc loc, Statements* s, StorageClass stc)
{
super(loc, s);
this.stc = stc;
}
override CompoundAsmStatement syntaxCopy()
{
auto a = new Statements();
a.setDim(statements.dim);
foreach (i, s; *statements)
{
(*a)[i] = s ? s.syntaxCopy() : null;
}
return new CompoundAsmStatement(loc, a, stc);
}
override Statements* flatten(Scope* sc)
{
return null;
}
override void accept(Visitor v)
{
v.visit(this);
}
}
/***********************************************************
*/
extern (C++) final class ImportStatement : Statement
{
Dsymbols* imports; // Array of Import's
extern (D) this(Loc loc, Dsymbols* imports)
{
super(loc);
this.imports = imports;
}
override Statement syntaxCopy()
{
auto m = new Dsymbols();
m.setDim(imports.dim);
foreach (i, s; *imports)
{
(*m)[i] = s.syntaxCopy(null);
}
return new ImportStatement(loc, m);
}
override void accept(Visitor v)
{
v.visit(this);
}
}
|
D
|
import std.stdio;
template Tuple(A...)
{
alias A Tuple;
}
template eval(A...)
{
const typeof(A[0]) eval = A[0];
}
/************************************************/
int Foo1(int i)
{
if (i == 0)
return 1;
else
return i * Foo1(i - 1);
}
void test1()
{
static int f = Foo1(5);
printf("%d %d\n", f, 5*4*3*2);
assert(f == 120);
}
/************************************************/
int find2(string s, char c)
{
if (s.length == 0)
return -1;
else if (c == s[0])
return 0;
else
return 1 + find2(s[1..$], c);
}
void test2()
{
static int f = find2("hello", 'l');
printf("%d\n", f);
assert(f == 2);
}
/************************************************/
int bar3(int i)
{
int j;
while (i)
{
j += i;
i--;
}
return j;
}
void test3()
{
static b = bar3(7);
printf("b = %d, %d\n", b, bar3(7));
assert(b == 28);
}
/************************************************/
int bar4(int i)
{
for (int j = 0; j < 10; j++)
i += j;
return i;
}
void test4()
{
static b = bar4(7);
printf("b = %d, %d\n", b, bar4(7));
assert(b == 52);
}
/************************************************/
int bar5(int i)
{
int j;
do
{
i += j;
j++;
} while (j < 10);
return i;
}
void test5()
{
static b = bar5(7);
printf("b = %d, %d\n", b, bar5(7));
assert(b == 52);
}
/************************************************/
int bar6(int i)
{
int j;
do
{
i += j;
j++;
if (j == 4)
break;
} while (j < 10);
return i;
}
void test6()
{
static b = bar6(7);
printf("b = %d, %d\n", b, bar6(7));
assert(b == 13);
}
/************************************************/
int bar7(int i)
{
int j;
do
{
i += j;
j++;
if (j == 4)
return 80;
} while (j < 10);
return i;
}
void test7()
{
static b = bar7(7);
printf("b = %d, %d\n", b, bar7(7));
assert(b == 80);
}
/************************************************/
int bar8(int i)
{
int j;
do
{
j++;
if (j == 4)
continue;
i += j;
} while (j < 10);
return i;
}
void test8()
{
static b = bar8(7);
printf("b = %d, %d\n", b, bar8(7));
assert(b == 58);
}
/************************************************/
int bar9(int i)
{
int j;
while (j < 10)
{
j++;
if (j == 4)
continue;
i += j;
}
return i;
}
void test9()
{
static b = bar9(7);
printf("b = %d, %d\n", b, bar9(7));
assert(b == 58);
}
/************************************************/
int bar10(int i)
{
int j;
while (j < 10)
{
j++;
if (j == 4)
break;
i += j;
}
return i;
}
void test10()
{
static b = bar10(7);
printf("b = %d, %d\n", b, bar10(7));
assert(b == 13);
}
/************************************************/
int bar11(int i)
{
int j;
while (j < 10)
{
j++;
if (j == 4)
return i << 3;
i += j;
}
return i;
}
void test11()
{
static b = bar11(7);
printf("b = %d, %d\n", b, bar11(7));
assert(b == 104);
}
/************************************************/
int bar12(int i)
{
for (int j; j < 10; j++)
{
if (j == 4)
return i << 3;
i += j;
}
return i;
}
void test12()
{
static b = bar12(7);
printf("b = %d, %d\n", b, bar12(7));
assert(b == 104);
}
/************************************************/
int bar13(int i)
{
for (int j; j < 10; j++)
{
if (j == 4)
break;
i += j;
}
return i;
}
void test13()
{
static b = bar13(7);
printf("b = %d, %d\n", b, bar13(7));
assert(b == 13);
}
/************************************************/
int bar14(int i)
{
for (int j; j < 10; j++)
{
if (j == 4)
continue;
i += j;
}
return i;
}
void test14()
{
static b = bar14(7);
printf("b = %d, %d\n", b, bar14(7));
assert(b == 48);
}
/************************************************/
int bar15(int i)
{
foreach (k, v; "hello")
{
i <<= 1;
if (k == 4)
continue;
i += v;
}
return i;
}
void test15()
{
static b = bar15(7);
printf("b = %d, %d\n", b, bar15(7));
assert(b == 3344);
}
/************************************************/
int bar16(int i)
{
foreach_reverse (k, v; "hello")
{
i <<= 1;
if (k == 4)
continue;
i += v;
}
return i;
}
void test16()
{
static b = bar16(7);
printf("b = %d, %d\n", b, bar16(7));
assert(b == 1826);
}
/************************************************/
int bar17(int i)
{
foreach (k, v; "hello")
{
i <<= 1;
if (k == 2)
break;
i += v;
}
return i;
}
void test17()
{
static b = bar17(7);
printf("b = %d, %d\n", b, bar17(7));
assert(b == 674);
}
/************************************************/
int bar18(int i)
{
foreach_reverse (k, v; "hello")
{
i <<= 1;
if (k == 2)
break;
i += v;
}
return i;
}
void test18()
{
static b = bar18(7);
printf("b = %d, %d\n", b, bar18(7));
assert(b == 716);
}
/************************************************/
int bar19(int i)
{
assert(i > 0);
foreach_reverse (k, v; "hello")
{
i <<= 1;
if (k == 2)
return 8;
i += v;
}
return i;
}
void test19()
{
static b = bar19(7);
printf("b = %d, %d\n", b, bar19(7));
assert(b == 8);
}
/************************************************/
int bar20(int i)
{
assert(i > 0);
foreach (k, v; "hello")
{
i <<= 1;
if (k == 2)
return 8;
i += v;
}
return i;
}
void test20()
{
static b = bar20(7);
printf("b = %d, %d\n", b, bar20(7));
assert(b == 8);
}
/************************************************/
int bar21(int i)
{
assert(i > 0);
foreach (v; Tuple!(57, 23, 8))
{
i <<= 1;
i += v;
}
return i;
}
void test21()
{
static b = bar21(7);
printf("b = %d, %d\n", b, bar21(7));
assert(b == 338);
}
/************************************************/
int bar22(int i)
{
assert(i > 0);
foreach_reverse (v; Tuple!(57, 23, 8))
{
i <<= 1;
i += v;
}
return i;
}
void test22()
{
static b = bar22(7);
printf("b = %d, %d\n", b, bar22(7));
assert(b == 191);
}
/************************************************/
int bar23(int i)
{
assert(i > 0);
foreach_reverse (v; Tuple!(57, 23, 8))
{
i <<= 1;
if (v == 23)
return i + 1;
i += v;
}
return i;
}
void test23()
{
static b = bar23(7);
printf("b = %d, %d\n", b, bar23(7));
assert(b == 45);
}
/************************************************/
int bar24(int i)
{
assert(i > 0);
foreach (v; Tuple!(57, 23, 8))
{
i <<= 1;
if (v == 23)
return i + 1;
i += v;
}
return i;
}
void test24()
{
static b = bar24(7);
printf("b = %d, %d\n", b, bar24(7));
assert(b == 143);
}
/************************************************/
int bar25(int i)
{
assert(i > 0);
foreach_reverse (v; Tuple!(57, 23, 8))
{
i <<= 1;
if (v == 23)
break;
i += v;
}
return i;
}
void test25()
{
static b = bar25(7);
printf("b = %d, %d\n", b, bar25(7));
assert(b == 44);
}
/************************************************/
int bar26(int i)
{
assert(i > 0);
foreach (v; Tuple!(57, 23, 8))
{
i <<= 1;
if (v == 23)
break;
i += v;
}
return i;
}
void test26()
{
static b = bar26(7);
printf("b = %d, %d\n", b, bar26(7));
assert(b == 142);
}
/************************************************/
int bar27(int i)
{
foreach_reverse (v; Tuple!(57, 23, 8))
{
i <<= 1;
if (v == 23)
continue;
i += v;
}
return i;
}
void test27()
{
static b = bar27(7);
printf("b = %d, %d\n", b, bar27(7));
assert(b == 145);
}
/************************************************/
int bar28(int i)
{
foreach (v; Tuple!(57, 23, 8))
{
i <<= 1;
if (v == 23)
continue;
i += v;
}
return i;
}
void test28()
{
static b = bar28(7);
printf("b = %d, %d\n", b, bar28(7));
assert(b == 292);
}
/************************************************/
int bar29(int i)
{
switch (i)
{
case 1:
i = 4;
break;
case 7:
i = 3;
break;
default: assert(0);
}
return i;
}
void test29()
{
static b = bar29(7);
printf("b = %d, %d\n", b, bar29(7));
assert(b == 3);
}
/************************************************/
int bar30(int i)
{
switch (i)
{
case 1:
i = 4;
break;
case 8:
i = 2;
break;
default:
i = 3;
break;
}
return i;
}
void test30()
{
static b = bar30(7);
printf("b = %d, %d\n", b, bar30(7));
assert(b == 3);
}
/************************************************/
int bar31(string s)
{ int i;
switch (s)
{
case "hello":
i = 4;
break;
case "betty":
i = 2;
break;
default:
i = 3;
break;
}
return i;
}
void test31()
{
static b = bar31("betty");
printf("b = %d, %d\n", b, bar31("betty"));
assert(b == 2);
}
/************************************************/
int bar32(int i)
{
switch (i)
{
case 7:
i = 4;
goto case;
case 5:
i = 2;
break;
default:
i = 3;
break;
}
return i;
}
void test32()
{
static b = bar32(7);
printf("b = %d, %d\n", b, bar32(7));
assert(b == 2);
}
/************************************************/
int bar33(int i)
{
switch (i)
{
case 5:
i = 2;
break;
case 7:
i = 4;
goto case 5;
default:
i = 3;
break;
}
return i;
}
void test33()
{
static b = bar33(7);
printf("b = %d, %d\n", b, bar33(7));
assert(b == 2);
}
/************************************************/
int bar34(int i)
{
switch (i)
{
default:
i = 3;
break;
case 5:
i = 2;
break;
case 7:
i = 4;
goto default;
}
return i;
}
void test34()
{
static b = bar34(7);
printf("b = %d, %d\n", b, bar34(7));
assert(b == 3);
}
/************************************************/
int bar35(int i)
{
L1:
switch (i)
{
default:
i = 3;
break;
case 5:
i = 2;
break;
case 3:
return 8;
case 7:
i = 4;
goto default;
}
goto L1;
}
void test35()
{
static b = bar35(7);
printf("b = %d, %d\n", b, bar35(7));
assert(b == 8);
}
/************************************************/
int square36(int x)
{
return x * x;
}
const int foo36 = square36(5);
void test36()
{
assert(foo36 == 25);
}
/************************************************/
string someCompileTimeFunction()
{
return "writefln(\"Wowza!\");";
}
void test37()
{
mixin(someCompileTimeFunction());
}
/************************************************/
string NReps(string x, int n)
{
string ret = "";
for (int i = 0; i < n; i++)
{
ret ~= x;
}
return ret;
}
void test38()
{
static x = NReps("3", 6);
assert(x == "333333");
}
/************************************************/
bool func39() { return true; }
static if (func39())
{
pragma(msg, "true");
}
else
{
pragma(msg, "false");
}
void test39()
{
}
/************************************************/
string UpToSpace(string x)
{
int i = 0;
while (i < x.length && x[i] != ' ')
{
i++;
}
return x[0..i];
}
void test40()
{
const y = UpToSpace("first space was after first");
writeln(y);
assert(y == "first");
}
/************************************************/
int bar41(ref int j)
{
return 5;
}
int foo41(int i)
{
int x;
x = 3;
bar41(x);
return i + x;
}
void test41()
{
const y = foo41(3);
writeln(y);
assert(y == 6);
}
/************************************************/
int bar42(ref int j)
{
return 5;
}
int foo42(int i)
{
int x;
x = 3;
bar42(x);
return i + x;
}
void test42()
{
const y = foo42(3);
writeln(y);
assert(y == 6);
}
/************************************************/
int bar(string a)
{
int v;
for (int i = 0; i < a.length; i++)
{
if (a[i] != ' ')
{
v += a.length;
}
}
return v;
}
void test43()
{
const int foo = bar("a b c d");
writeln(foo);
assert(foo == 28);
}
/************************************************/
string foo44() { return ("bar"); }
void test44()
{
const string bar = foo44();
assert(bar == "bar");
}
/************************************************/
int square45(int n) { return (n * n); }
void test45()
{
int bar = eval!(square45(5));
assert(bar == 25);
}
/************************************************/
const int[5] foo46 = [0,1,2,3,4];
void test46()
{
writeln(eval!(foo46[3]));
}
/************************************************/
string foo47()
{
string s;
s = s ~ 't';
return s ~ "foo";
}
void test47()
{
static const x = foo47();
pragma(msg, x);
assert(x == "tfoo");
}
/************************************************/
string foo48()
{
string s;
s = s ~ 't';
s = s.idup;
return s ~ "foo";
}
void test48()
{
static const x = foo48();
pragma(msg, x);
assert(x == "tfoo");
}
/************************************************/
dstring testd49(dstring input)
{
if (input[3..5] != "rt")
{
return input[1..3];
}
return "my";
}
void test49()
{
static x = testd49("hello");
writeln(x);
assert(x == "el");
}
/************************************************/
string makePostfix50(int x)
{
string first;
first = "bad";
if (x)
{
first = "ok";
makePostfix50(0);
}
return first;
}
void test50()
{
static const char [] q2 = makePostfix50(1);
static assert(q2 == "ok", q2);
}
/************************************************/
int exprLength(string s)
{
int numParens=0;
for (int i = 0; i < s.length; ++i)
{
if (s[i] == '(') { numParens++; }
if (s[i] == ')') { numParens--; }
if (numParens == 0) { return i; }
}
assert(0);
}
string makePostfix51(string operations)
{
if (operations.length < 2)
return "x";
int x = exprLength(operations);
string first="bad";
if (x > 0)
{
first = "ok";
string ignore = makePostfix51(operations[1..x]);
}
return first;
}
void test51()
{
string q = makePostfix51("(a+b)*c");
assert(q == "ok");
static const string q2 = makePostfix51("(a+b)*c");
static assert(q2 == "ok");
static assert(makePostfix51("(a+b)*c") == "ok");
}
/************************************************/
int foo52(ref int x)
{
x = 7;
return 3;
}
int bar52(int y)
{
y = 4;
foo52(y);
return y;
}
void test52()
{
printf("%d\n", bar52(2));
static assert(bar52(2) == 7);
}
/************************************************/
void bar53(out int x) { x = 2; }
int foo53() { int y; bar53(y); return y; }
void test53()
{
const int z = foo53();
assert(z == 2);
}
/************************************************/
void test54()
{
static assert(equals54("alphabet", "alphabet"));
}
bool equals54(string a, string b)
{
return (a == b);
}
/************************************************/
const string[2] foo55 = ["a", "b"];
string retsth55(int i) { return foo55[i]; }
void test55()
{
writeln(eval!(foo55[0]));
writeln(eval!(retsth55(0)));
}
/************************************************/
string retsth56(int i)
{
static const string[2] foo = ["a", "b"];
return foo[i];
}
void test56()
{
writeln(eval!(retsth56(0)));
}
/************************************************/
int g57()
{
pragma(msg, "g");
return 2;
}
const int a57 = g57();
void test57()
{
assert(a57 == 2);
}
/************************************************/
int[] Fun58(int x)
{
int[] result;
result ~= x + 1;
return result;
}
void test58()
{
static b = Fun58(1) ~ Fun58(2);
assert(b.length == 2);
assert(b[0] == 2);
assert(b[1] == 3);
writeln(b);
}
/************************************************/
int Index59()
{
int[] data = [1];
return data[0];
}
void test59()
{
static assert(Index59() == 1);
}
/************************************************/
string[int] foo60()
{
return [3:"hello", 4:"betty"];
}
void test60()
{
static assert(foo60()[3] == "hello");
static assert(foo60()[4] == "betty");
}
/************************************************/
string[int] foo61()
{
return [3:"hello", 4:"betty", 3:"world"];
}
void test61()
{
static assert(foo61()[3] == "world");
static assert(foo61()[4] == "betty");
}
/************************************************/
string foo62(int k)
{
string[int] aa;
aa = [3:"hello", 4:"betty"];
return aa[k];
}
void test62()
{
static assert(foo62(3) == "hello");
static assert(foo62(4) == "betty");
}
/************************************************/
void test63()
{
static auto x = foo63();
}
int foo63()
{
pragma(msg, "Crash!");
return 2;
}
/************************************************/
dstring testd64(dstring input)
{
debug int x = 10;
return "my";
}
void test64()
{
static x = testd64("hello");
}
/************************************************/
struct S65
{
int i;
int j = 3;
}
int foo(S65 s1, S65 s2)
{
return s1 == s2;
}
void test65()
{
static assert(foo(S65(1, 5), S65(1, 5)) == 1);
static assert(foo(S65(1, 5), S65(1, 4)) == 0);
}
/************************************************/
struct S66
{
int i;
int j = 3;
}
int foo66(S66 s1)
{
return s1.j;
}
void test66()
{
static assert(foo66(S66(1, 5)) == 5);
}
/************************************************/
struct S67
{
int i;
int j = 3;
}
int foo67(S67 s1)
{
s1.j = 3;
int i = (s1.j += 2);
assert(i == 5);
return s1.j + 4;
}
void test67()
{
static assert(foo67(S67(1, 5)) == 9);
}
/************************************************/
int foo68(int[] a)
{
a[1] = 3;
int x = (a[0] += 7);
assert(x == 8);
return a[0] + a[1];
}
void test68()
{
static assert(foo68( [1,5] ) == 11);
}
/************************************************/
int foo69(char[] a)
{
a[1] = 'c';
char x = (a[0] += 7);
assert(x == 'h');
assert(x == a[0]);
return a[0] + a[1] - 'a';
}
void test69()
{
static assert(foo69(['a', 'b']) == 'j');
}
/************************************************/
int foo70(int[string] a)
{
a["world"] = 5;
auto x = (a["hello"] += 7);
assert(x == 10);
assert(x == a["hello"]);
return a["hello"] + a["betty"] + a["world"];
}
void test70()
{
static assert(foo70(["hello":3, "betty":4]) == 19);
}
/************************************************/
size_t foo71(int[string] a)
{
return a.length;
}
void test71()
{
static assert(foo71(["hello":3, "betty":4]) == 2);
}
/************************************************/
string[] foo72(int[string] a)
{
return a.keys;
}
void test72()
{
static assert(foo72(["hello":3, "betty":4]) == ["hello", "betty"]);
}
/************************************************/
int[] foo73(int[string] a)
{
return a.values;
}
void test73()
{
static assert(foo73(["hello":3, "betty":4]) == [3, 4]);
}
/************************************************/
bool b74()
{
string a = "abc";
return (a[$-1] == 'c');
}
const c74 = b74();
void test74()
{
assert(c74 == true);
}
/************************************************/
struct FormatSpec
{
uint leading;
bool skip;
uint width;
char modifier;
char format;
uint formatStart;
uint formatLength;
uint length;
}
FormatSpec GetFormat(string s)
{
FormatSpec result;
return result;
}
FormatSpec GetFormat2(string s)
{
FormatSpec result = FormatSpec();
result.length = 0;
assert(result.length < s.length);
while (result.length < s.length)
{
++result.length;
}
return result;
}
void test75()
{
static FormatSpec spec = GetFormat("asd");
assert(spec.leading == 0);
assert(spec.modifier == char.init);
static FormatSpec spec2 = GetFormat2("asd");
assert(spec2.length == 3);
}
/************************************************/
int f76()
{
int[3] a = void;
a[0] = 1;
assert(a[0] == 1);
return 1;
}
const i76 = f76();
void test76()
{
}
/************************************************/
struct V77
{
int a;
int b;
}
V77 f77()
{
int q = 0;
int unused;
int unused2;
return V77(q, 0);
}
void test77()
{
const w = f77();
const v = f77().b;
}
/************************************************/
struct Bar78
{
int x;
}
int foo78()
{
Bar78 b = Bar78.init;
Bar78 c;
b.x = 1;
b = bar(b);
return b.x;
}
Bar78 bar(Bar78 b)
{
return b;
}
void test78()
{
static x = foo78();
}
/************************************************/
struct Bar79
{
int y,x;
}
int foo79()
{
Bar79 b = Bar79.init;
b.x = 100;
for (size_t i = 0; i < b.x; i++) { }
b.x++;
b.x = b.x + 1;
return b.x;
}
void test79()
{
static x = foo79();
printf("x = %d\n", x);
assert(x == 102);
}
/************************************************/
void test80()
{
}
/************************************************/
string foo81()
{
return "";
}
string rod81(string[] a)
{
return a[0];
}
void test81()
{
static x = rod81([foo81(), ""]);
assert(x == "");
}
/************************************************/
struct S82
{
string name;
}
const S82 item82 = {"item"};
string mixItemList82()
{
return item82.name;
}
const string s82 = mixItemList82();
void test82()
{
assert(s82 == "item");
}
/************************************************/
struct S83
{
string name;
}
const S83[] items83 =
[
{"item"},
];
string mixItemList83()
{
string s;
foreach (item; items83)
s ~= item.name;
return s;
}
const string s83 = mixItemList83();
void test83()
{
writeln(s83);
assert(s83 == "item");
}
/************************************************/
struct S84 { int a; }
int func84()
{
S84 [] s = [S84(7)];
return s[0].a; // Error: cannot evaluate func() at compile time
}
void test84()
{
const int x = func84();
assert(x == 7);
}
/************************************************/
struct S85
{
int a;
}
size_t func85()
{
S85 [] s;
s ~= S85(7);
return s.length;
}
void test85()
{
const size_t x = func85();
assert(x == 1);
}
/************************************************/
struct Bar86
{
int x;
char[] s;
}
char[] foo86()
{
Bar86 bar;
return bar.s;
}
void test86()
{
static x = foo86();
assert(x == null);
}
/************************************************/
struct Bar87
{
int x;
}
int foo87()
{
Bar87 bar;
bar.x += 1;
bar.x++;
return bar.x;
}
void test87()
{
static x = foo87();
assert(x == 2);
}
/************************************************/
int foo88()
{
char[] s;
int i;
if (s)
{
i |= 1;
}
if (s == null)
{
i |= 2;
}
if (s is null)
{
i |= 4;
}
if (s == "")
{
i |= 8;
}
if (s.length)
{
i |= 16;
}
if (s == ['c'][0..0])
{
i |= 32;
}
if (null == s)
{
i |= 64;
}
if (null is s)
{
i |= 128;
}
if ("" == s)
{
i |= 256;
}
if (['c'][0..0] == s)
{
i |= 512;
}
return i;
}
void test88()
{
static x = foo88();
printf("x = %x\n", x);
assert(x == (2|4|8|32|64|128|256|512));
}
/************************************************/
template Tuple89(T...)
{
alias T val;
}
alias Tuple89!(int) Tup89;
string gen89()
{
foreach (i, type; Tup89.val)
{
assert(i == 0);
assert(is(type == int));
}
return null;
}
void test89()
{
static const string text = gen89();
assert(text is null);
}
/************************************************/
string bar90(string z)
{
return z;
}
string foo90(string a, string b)
{
string f = a.length == 1 ? a: foo90("B", "C");
string g = b.length == 1 ? b: bar90(foo90("YYY", "A"));
return f;
}
void test90()
{
static const string xxx = foo90("A", "xxx");
printf("%.*s\n", xxx.length, xxx.ptr);
assert(xxx == "A");
}
/************************************************/
struct PR91
{
}
int foo91()
{
PR91 pr;
pr = PR91();
return 0;
}
void test91()
{
static const i = foo91();
}
/************************************************/
char find92(immutable(char)[7] buf)
{
return buf[3];
}
void test92()
{
static const pos = find92("abcdefg");
assert(pos == 'd');
}
/************************************************/
static string hello93()
{
string result = "";
int i = 0;
for (;;)
{
result ~= `abc`;
i += 1;
if (i == 3)
break;
}
return result;
}
void test93()
{
static string s = hello93();
assert(s == "abcabcabc");
}
/************************************************/
int foo94 (string[] list, string s)
{
if (list.length == 0)
return 1;
else
{
return 2 + foo94(list[1..$], list[0]);
}
}
void test94()
{
printf("test94\n");
static const int x = foo94(["a", "b"], "");
assert(x == 5);
}
/************************************************/
char[] func95(immutable char[] s)
{
char[] u = "".dup;
u ~= s;
u = u ~ s;
return u;
}
void test95()
{
mixin(func95("{}"));
}
/************************************************/
char[] func96(string s)
{
char[] u = "".dup;
u ~= s;
u = u ~ s;
return u;
}
void test96()
{
mixin(func96("{}"));
}
/************************************************/
string foo97()
{
string a;
a ~= "abc"; // ok
string[] b;
b ~= "abc"; // ok
string[][] c;
c ~= ["abc", "def"];
string[][] d = [];
d ~= ["abc", "def"]; // ok
return "abc";
}
void test97()
{
static const xx97 = foo97();
}
/************************************************/
immutable(int)[] foo98(immutable(int)[][] ss)
{
immutable(int)[] r;
r ~= ss[0]; // problem here
return r;
}
void test98()
{
const r = foo98([[1], [2]]);
}
/************************************************/
struct Number
{
public int value;
static Number opCall(int value)
{
Number n = void;
n.value = value;
return n;
}
}
class Crash
{
Number number = Number(0);
}
void test99()
{
}
/************************************************/
int[] map100 = ([4:true, 5:true]).keys;
bool[] foo100 = ([4:true, 5:true]).values;
void test100()
{
}
/************************************************/
int foo101()
{
immutable bool [int] map = [4:true, 5:true];
foreach (x; map.keys) {}
return 3;
}
static int x101 = foo101();
void test101()
{
}
/************************************************/
int foo102()
{
foreach (i; 0 .. 1)
return 1;
return 0;
}
static assert(foo102() == 1);
int bar102()
{
foreach_reverse (i; 0 .. 1)
return 1;
return 0;
}
static assert(bar102() == 1);
void test102()
{
}
/************************************************/
int foo103()
{
foreach (c; '0' .. '9') { }
foreach_reverse (c; '9' .. '0') { }
return 0;
}
enum x103 = foo103();
void test103()
{
}
/************************************************/
struct S
{
int x;
char y;
}
// Functions which should fail CTFE
int badfoo()
{
S[2] c;
int w = 4;
c[w].x = 6; // array bounds error
return 7;
}
int badglobal = 1;
int badfoo3()
{
S[2] c;
c[badglobal].x = 6; // global index error
return 7;
}
int badfoo4()
{
static S[2] c;
c[0].x = 6; // Cannot access static
return 7;
}
/+ // This doesn't compile at runtime
int badfoo5()
{
S[] c = void;
c[0].x = 6; // c is uninitialized, and not a static array.
return 1;
}
+/
int badfoo6()
{
S[] b = [S(7), S(15), S(56), S(12)];
b[-2..4] = S(17); // exceeding (negative) array bounds
return 1;
}
int badfoo7()
{
S[] b = [S(7), S(15), S(56), S(12), S(67)];
S[] c = [S(17), S(4)];
b[1..4] = c[]; // slice mismatch in dynamic array
return 1;
}
int badfoo8()
{
S[] b;
b[1..3] = [S(17), S(4)]; // slice assign to uninitialized dynamic array
return 1;
}
template Compileable(int z) { bool OK = true;}
static assert(!is(typeof(Compileable!(badfoo()).OK)));
static assert(!is(typeof(Compileable!(
(){
S[] c;
return c[7].x; // uninitialized error
}()).OK
)));
static assert( is(typeof(Compileable!(0).OK)));
static assert(!is(typeof(Compileable!(badfoo3()).OK)));
static assert(!is(typeof(Compileable!(badfoo4()).OK)));
//static assert(!is(typeof(Compileable!(badfoo5()).OK)));
static assert(!is(typeof(Compileable!(badfoo6()).OK)));
static assert(!is(typeof(Compileable!(badfoo7()).OK)));
static assert(!is(typeof(Compileable!(badfoo8()).OK)));
// Functions which should pass CTFE
int goodfoo1()
{
int[8] w; // use static array in CTFE
w[] = 7; // full slice assign
w[$ - 1] = 538; // use of $ in index assignment
assert(w[6] == 7);
return w[7];
}
static assert(goodfoo1() == 538);
int goodfoo2()
{
S[4] w = S(101); // Block-initialize array of structs
w[$ - 2].x = 917; // use $ in index member assignment
w[$ - 2].y = 58; // this must not clobber the prev assignment
return w[2].x; // check we got the correct one
}
static assert(goodfoo2() == 917);
static assert(is(typeof(Compileable!(
(){
S[4] w = void; // uninitialized array of structs
w[$ - 2].x = 217; // initialize one member
return w[2].x;
}()).OK
)));
int goodfoo4()
{
S[4] b = [S(7), S(15), S(56), S(12)]; // assign from array literal
assert(b[3] == S(12));
return b[2].x - 55;
}
static assert(goodfoo4()==1);
int goodfoo5()
{
S[4] b = [S(7), S(15), S(56), S(12)];
b[0..2] = [S(2), S(6)]; // slice assignment from array literal
assert(b[3] == S(12));
assert(b[1] == S(6));
return b[0].x;
}
static assert(goodfoo5() == 2);
static assert(goodfoo5() == 2); // check for memory corruption
int goodfoo6()
{
S[6] b = void;
b[2..5] = [S(2), S(6), S(17)]; // slice assign to uninitialized var
assert(b[4] == S(17));
return b[3].x;
}
static assert(goodfoo6() == 6);
int goodfoo7()
{
S[8] b = void;
b[2..5] = S(217); // slice assign to uninitialized var
assert(b[4] == S(217));
return b[3].x;
}
static assert(goodfoo7() == 217);
int goodfoo8()
{
S[] b = [S(7), S(15), S(56), S(12), S(67)];
b[2..4] = S(17); // dynamic array block slice assign
assert(b[3] == S(17));
assert(b[4] == S(67));
return b[0].x;
}
static assert(goodfoo8() == 7);
// --------- CTFE MEMBER FUNCTION TESTS --------
struct Q
{
int x;
char y;
int opAddAssign(int w)
{
x += w;
return x + w;
}
Q opSubAssign(int w)
{
x -= w;
version(D_Version2) { mixin("return this;"); } else { mixin("return *this;"); }
}
int boo() { return 4; }
int coo() { return x; }
int foo() { return coo(); }
int doo(int a)
{
Q z = Q(a, 'x');
z.x += 5;
return z.coo() + 3 * x;
}
void goo(int z) { x = z; }
int hoo(int y, int z) { return y + z; }
void joo(int z)
{
x += z;
}
}
int memtest1()
{
Q b = Q(15, 'a');
return b.hoo(3, 16); // simple const function
}
static assert(memtest1() == 19);
int memtest2()
{
Q b = Q(15, 'x');
b.x -= 10;
return b.coo();
}
static assert(memtest2() == 5);
int memtest3()
{
Q b = Q(15, 'x');
b.x -= 10;
return b.foo();
}
static assert(memtest3() == 5);
int memtest4()
{
Q b = Q(12, 'x');
return b.doo(514);
}
static assert(memtest4() == 519 + 3 * 12);
int memtest5()
{
Q b = Q(132, 'x');
b.goo(4178); // Call modifying member
return b.x;
}
static assert(memtest5() == 4178);
int memtest6()
{
Q q = Q(1);
q += 3; // operator overloading
return q.x;
}
static assert(memtest6() == 4);
static assert(!is(typeof(Compileable!(Q += 2).OK))); // Mustn't cause segfault
int memtest7()
{
Q q = Q(57);
q -= 35;
return q.x;
}
static assert(memtest7() == 57 - 35);
int memtest8()
{
Q[3] w;
w[2].x = 17;
w[2].joo(6); // Modify member of array
w[1].x += 18;
return w[2].coo();
}
static assert(memtest8() == 6 + 17);
// --------- CTFE REF PASSING TESTS --------
// https://issues.dlang.org/show_bug.cgi?id=1950 - CTFE doesn't work correctly for structs passed by ref
struct S1950
{
int x;
}
int foo1950()
{
S1950 s = S1950(5); // explicitly initialized
bar1950(s);
return s.x;
}
void bar1950(ref S1950 w)
{
w.x = 10;
}
static assert(foo1950() == 10); // OK <- Fails, x is 0
int foo1950b()
{
S1950 s; // uninitialized
bar1950(s);
return s.x;
}
static assert(foo1950b() == 10); // OK <- Fails, x is 0
// More extreme case, related to 1950
void bar1950c(ref int w)
{
w = 87;
}
int foo1950c()
{
int[5] x;
x[] = 56;
bar1950c(x[1]); // Non-trivial ref parameters
return x[1];
}
static assert(foo1950c() == 87);
void bar1950d(ref int[] w)
{
w[1..$] = 87;
w[0] += 15;
}
int foo1950d()
{
int[] x = [1, 2, 3, 4, 5];
x[1..$] = 56;
bar1950d(x); // Non-trivial ref parameters
assert(x[0] == 16);
return x[1];
}
static assert(foo1950d() == 87);
// Nested functions
int nested(int x)
{
int y = 3;
int inner(int w)
{
int z = 2;
++z;
y += w;
return x + 3;
}
int z = inner(14);
assert(y == 17);
inner(8);
assert(y == 17 + 8);
return z + y;
}
static assert(nested(7) == 17 + 8 + 10);
static assert(nested(7) == 17 + 8 + 10);
// Recursive nested functions
int nested2(int x)
{
int y = 3;
int inner(int w)
{
int z = 2;
++z;
++y;
if (w <= 1)
return x + 3;
else
return inner(w - 1);
}
int z = inner(14);
assert(y == 17);
inner(8);
assert(y == 17 + 8);
return z + y;
}
static assert(nested2(7) == 17 + 8 + 10);
// https://issues.dlang.org/show_bug.cgi?id=1605
// D1 & D2. break in switch with goto breaks in ctfe
int bug1605()
{
int i = 0;
while (true)
{
goto LABEL;
LABEL:
if (i != 0)
return i;
i = 27;
}
assert(i == 27);
return 88; // unreachable
}
static assert(bug1605() == 27);
// https://issues.dlang.org/show_bug.cgi?id=2564
// D2 only. CTFE: the index in a tuple foreach is uninitialized (bogus error)
// NOTE: Beware of optimizer bug 3264.
int bug2564()
{
version(D_Version2) { mixin("enum int Q = 0;"); }else {mixin("int Q = 0;"); }
string [2] s = ["a", "b"];
assert(s[Q].dup == "a");
return 0;
}
static int bug2564b = bug2564();
// https://issues.dlang.org/show_bug.cgi?id=1461
// D1 + D2. Local variable as template alias parameter breaks CTFE
void bug1461()
{
int x;
static assert(Gen1461!(x).generate() == null);
}
template Gen1461(alias A)
{
string generate()
{
return null;
}
}
/************************************************/
string foo104(string[] a...)
{
string result = "";
foreach (s; a)
result ~= s;
return result;
}
mixin (foo104("int ", "x;"));
/************************************************/
struct SwineFlu
{
int a;
int b;
}
struct Infection
{
SwineFlu y;
}
struct IveGotSwineFlu
{
Infection x;
int z;
int oink() { return x.y.a + 10; }
}
int quarantine()
{
IveGotSwineFlu d;
return d.oink();
}
struct Mexico
{
Infection x;
int z = 2;
int oink() { return z + x.y.b; }
}
int mediafrenzy()
{
Mexico m;
return m.oink;
}
static assert(quarantine() == 10);
static assert(mediafrenzy() == 2);
/************************************************/
int ctfeArrayTest(int z)
{
int[] a = new int[z];
a[$ - 3] = 6;
assert(a.length == z);
return a[$ - 3];
}
static assert(ctfeArrayTest(15) == 6);
/************************************************/
char bugzilla1298()
{
char [4] q = "abcd".dup;
char [4] r = ['a', 'b', 'c', 'd'];
assert(q == r);
q[0..2] = "xy";
q[2] += 3;
return q[2];
}
static assert(bugzilla1298() == 'f');
int bugzilla1790(Types...)()
{
foreach (T; Types)
{
}
return 0;
}
const int bugs1790 = bugzilla1790!("")();
char ctfeStrTest1()
{
char [8] s = void;
s[2..4] = 'x';
assert(s.length == 8);
return s[3];
}
static assert(ctfeStrTest1() == 'x');
//--------- DELEGATE TESTS ------
// Function + delegate literals inside CTFE
int delegtest1()
{
assert(function int(int a){ return 7 + a; }(16) == 23);
return delegate int(int a){ return 7 + a; }(6);
}
int delegtest2()
{
int innerfunc1()
{
return delegate int(int a){ return 7 + a; }(6);
}
int delegate() f = &innerfunc1;
return 3 * f();
}
int delegtest3()
{
int function() f = &delegtest1;
return 3 * f();
}
struct DelegStruct
{
int a;
int bar(int x) { return a + x; }
}
int delegtest4()
{
DelegStruct s;
s.a = 5;
auto f = &s.bar;
return f(3);
}
alias int delegate(int) DelegType;
// Test arrays of delegates
int delegtest5()
{
DelegStruct s;
s.a = 5;
DelegType[4] w;
w[] = &s.bar;
return w[2](3);
}
// Test arrays of structs of delegates
struct FoolishStruct
{
DelegType z;
}
int delegtest6()
{
DelegStruct s;
s.a = 5;
FoolishStruct[3] k;
DelegType u = &s.bar;
k[1].z = u;
return k[1].z(3);
}
static assert(delegtest1() == 13);
static assert(delegtest2() == 39);
static assert(delegtest3() == 39);
static assert(delegtest4() == 8);
static assert(delegtest5() == 8);
static assert(delegtest6() == 8);
// Function + delegate literals, module scope
static assert(function int(int a){ return 17 + a; }(16) == 33);
static assert( (int a){ return 7 + a; }(16) == 23);
// --- Test lazy ---
int lazyTest1(lazy int y)
{
return y + 1;
}
int lazyTest2(int x)
{
return lazyTest1(x);
}
static assert(lazyTest1(7) == 8);
static assert(lazyTest2(17) == 18);
/************************************************/
version(D_Version2)
{
// https://issues.dlang.org/show_bug.cgi?id=4020
// https://issues.dlang.org/show_bug.cgi?id=4027
// D2 only
struct PostblitCrash
{
int x;
mixin("this(this) { ++x; }");
}
int bug4020()
{
PostblitCrash f;
f.x = 3;
f = f;
f = f;
return f.x;
}
static assert(bug4020() == 5);
string delegate() bug4027(string s)
{
return { return s; };
}
// If it compiles, it must not generate wrong code on D2.
static if (is(typeof((){ static const s = bug4027("aaa")(); }()))) {
static assert(bug4027("aaa")() == "aaa");
static assert(bug4027("bbb")() == "bbb");
}
}
// ---
void bug4004a(ref int a)
{
assert(a == 7);
a += 3;
}
void bug4004b(ref int b)
{
b = 7;
bug4004a(b);
}
int bug4004c()
{
int offset = 5;
bug4004b(offset);
return offset;
}
static assert(bug4004c() == 10);
// ---
int bug4019()
{
int[int] aa;
aa[1] = 2;
aa[4] = 6;
return aa[1] + aa[4];
}
static assert(bug4019() == 8);
// ---
string delegate() bug4029a()
{
return { return "abc"[]; };
}
string bug4029()
{
return bug4029a()();
}
static assert(bug4029() == "abc");
/************************************************/
int bug4078()
{
int[] arr = new int[1];
return arr[0];
}
static assert(bug4078() == 0);
int bug4052()
{
int[] arr = new int[1];
int s;
foreach (x; arr)
s += x;
foreach (x; arr)
s += x * x;
return 4052;
}
static assert(bug4052() == 4052);
int bug4252()
{
char [] s = "abc".dup;
s[15] = 'd'; // Array bounds error
return 3;
}
static assert(!is(typeof(Compileable!(bug4252()))));
size_t setlen1()
{
int[] w = new int[4];
w[] = 7;
w.length = 6;
return 21 + w.length;
}
static assert(setlen1() == 27);
size_t setlen2()
{
int[] w;
w.length = 15;
assert(w[3] == 0);
w[2] = 8;
w[14] = 7;
w.length = 12; // check shrinking
assert(w[2] == 8);
return 2 + w.length;
}
static assert(setlen2() == 14);
/************************************************/
int bug4257(ref int x)
{
return 3;
}
int bug4257c(int x)
{
return 3;
}
struct Struct4257
{
int foo() { return 2; }
}
void bug4257b()
{
int y;
static assert(!is(typeof(Compileable!(bug4257(y)))));
static assert(!is(typeof(Compileable!(bug4257c(y)))));
Struct4257 s;
static assert(!is(typeof(Compileable!(s.foo()))));
}
/************************************************/
// https://issues.dlang.org/show_bug.cgi?id=5117
static int dummy5117 = test5117();
int test5117()
{
S5117 s;
s.change();
assert(s.value == 1); // (7) succeeds
R5117 r;
r.s.change();
assert(r.s.value == 1); // (11) fails, value == 0
return 0;
}
struct S5117
{
int value;
void change() { value = 1; }
}
struct R5117
{
S5117 s;
}
/************************************************/
enum dummy5117b = test5117b();
int test5117b()
{
S5117b s;
getRef5117b(s).change();
assert(s.value == 1); // fails, value == 0
return 0;
}
ref S5117b getRef5117b(return ref S5117b s) { return s; }
struct S5117b
{
int value;
void change() { value = 1; }
}
/************************************************/
// https://issues.dlang.org/show_bug.cgi?id=6439
struct A6439
{
this(uint a, uint b)
{
begin = a;
end = b;
}
union
{
struct
{
uint begin, end;
}
uint[2] arr;
}
}
void test6439()
{
enum y = A6439(10, 20);
A6439 y2 = A6439(10, 20);
assert(y2.begin == y.begin && y2.end == y.end); //passes
assert(y.arr != [0,0]);
assert(y.arr == [10,20]);
assert(y.arr == y2.arr);
}
/************************************************/
// from tests/fail_compilation/fail147
static assert(!is(typeof(Compileable!(
(int i){
int x = void;
++x; // used before initialization
return i + x;
}(3)
))));
// https://issues.dlang.org/show_bug.cgi?id=6504 regression
void test6504()
{
for (int i = 0; i < 3; ++i)
{
char[] x2 = "xxx" ~ ['c'];
assert(x2[1] == 'x');
x2[1] = 'q';
}
}
// https://issues.dlang.org/show_bug.cgi?id=8818 regression
void test8818()
{
static bool test()
{
string op1 = "aa";
string op2 = "b";
assert("b" >= "aa");
assert(op2 >= op1);
return true;
}
static assert(test());
assert(test());
}
/************************************************/
struct Test104Node
{
int val;
Test104Node* next;
}
Test104Node* CreateList(int[] arr)
{
if (!arr.length)
return null;
Test104Node* ret = new Test104Node;
ret.val = arr[0];
ret.next = CreateList(arr[1..$]);
return ret;
}
const(Test104Node)* root = CreateList([1, 2, 3, 4, 5]);
void test104()
{
assert(root.val == 1);
assert(root.next.val == 2);
assert(root.next.next.val == 3);
assert(root.next.next.next.val == 4);
assert(root.next.next.next.next.val == 5);
}
/************************************************/
interface ITest105a
{
string test105a() const;
}
class Test105a : ITest105a
{
char a;
int b;
char c = 'C';
int d = 42;
string test105a() const { return "test105a"; }
}
interface ITest105b
{
string test105b() const;
}
class Test105b : Test105a, ITest105b
{
char e;
int f;
this(char _e, int _f, char _a, int _b) pure
{
e = _e;
f = _f;
a = _a;
b = _b;
}
string test105b() const { return "test105b"; }
}
const Test105b t105b = new Test105b('E', 88, 'A', 99);
const Test105a t105a = new Test105b('E', 88, 'A', 99);
const ITest105b t105ib = new Test105b('E', 88, 'A', 99);
const ITest105a t105ia = new Test105b('E', 88, 'A', 99);
__gshared Test105b t105gs = new Test105b('E', 88, 'A', 99);
shared Test105b t105bs = new shared(Test105b)('E', 88, 'A', 99);
immutable Test105b t105bi = new immutable(Test105b)('E', 88, 'A', 99);
void test105()
{
assert(t105b.a == 'A');
assert(t105b.b == 99);
assert(t105b.c == 'C');
assert(t105b.d == 42);
assert(t105b.e == 'E');
assert(t105b.f == 88);
assert(t105b.test105a() == "test105a");
assert(t105b.test105b() == "test105b");
assert(t105a.a == 'A');
assert(t105a.b == 99);
assert(t105a.c == 'C');
assert(t105a.d == 42);
assert(t105a.test105a() == "test105a");
assert(t105ia.test105a() == "test105a");
assert(t105ib.test105b() == "test105b");
assert(t105a.classinfo is Test105b.classinfo);
//t105b.d = -1;
//assert(t105b.d == -1);
//assert(t105a.d == 42);
assert(t105gs.a == 'A');
assert(t105gs.b == 99);
assert(t105gs.c == 'C');
assert(t105gs.d == 42);
assert(t105gs.e == 'E');
assert(t105gs.f == 88);
assert(t105gs.test105a() == "test105a");
assert(t105gs.test105b() == "test105b");
assert(t105bs.a == 'A');
assert(t105bs.b == 99);
assert(t105bs.c == 'C');
assert(t105bs.d == 42);
assert(t105bs.e == 'E');
assert(t105bs.f == 88);
assert(t105bi.a == 'A');
assert(t105bi.b == 99);
assert(t105bi.c == 'C');
assert(t105bi.d == 42);
assert(t105bi.e == 'E');
assert(t105bi.f == 88);
assert(t105bi.test105a() == "test105a");
assert(t105bi.test105b() == "test105b");
}
int bug9938()
{
assert(t105ia.test105a() == "test105a");
return 1;
}
static assert(t105ia.test105a() == "test105a");
static assert(bug9938());
/************************************************/
struct Test106
{
Test106* f;
Test106* s;
}
Test106* ctfe106()
{
auto s = new Test106;
auto s2 = new Test106;
s.f = s2;
s.s = s2;
assert(s.f is s.s);
return s;
}
const(Test106)* t106 = ctfe106();
void test106()
{
assert(t106.f is t106.s);
}
/************************************************/
class Test107
{
Test107 a;
Test107 b;
this()
{
}
this(int)
{
a = new Test107();
b = a;
assert(a is b);
}
}
const Test107 t107 = new Test107(1);
void test107()
{
assert(t107.a is t107.b);
}
/************************************************/
/*
interface Getter
{
int getNum() const;
}
class Test108 : Getter
{
int f;
this(int v) inout
{
f = v;
}
int getNum() const
{
return f;
}
}
enum const(Test108) t108 = new Test108(38);
void test108()
{
const Test108 obj = t108;
assert(obj.classinfo is Test108.classinfo);
assert(obj.f == 38);
const Getter iobj = t108;
assert(iobj.getNum() == 38);
assert((cast(Object)iobj).classinfo is Test108.classinfo);
assert(t108 is t108);
}
*/
/***** https://issues.dlang.org/show_bug.cgi?id=5678 *****/
/*
struct Bug5678
{
this(int) {}
}
enum const(Bug5678)* b5678 = new const(Bug5678)(0);
void test5678()
{
assert(b5678 is b5678);
}*/
/************************************************/
class Test109C { this(){ this.c = this; } Test109C c; }
const t109c = new Test109C();
struct Test109S { this(int){ this.s = &this; } Test109S* s; }
const t109s = new Test109S(0);
pragma(msg, t109s); // Make sure there is no infinite recursion.
void test109()
{
assert(t109c.c is t109c);
assert(t109s.s is t109s);
}
/************************************************/
struct Test110f { int f1; Test110s f2; }
struct Test110s { this(int, int, int){} }
auto test110 = [Test110f(1, Test110s(1, 2, 3))];
/************************************************/
// https://issues.dlang.org/show_bug.cgi?id=6907
int test6907()
{
int dtor1;
class C { ~this() { ++dtor1; } }
// delete on Object
{ Object o; delete o; }
{ scope o = new Object(); }
{ Object o = new Object(); delete o; }
// delete on C
{ C c; delete c; }
{ { scope c = new C(); } assert(dtor1 == 1); }
{ { scope Object o = new C(); } assert(dtor1 == 2); }
{ C c = new C(); delete c; assert(dtor1 == 3); }
{ Object o = new C(); delete o; assert(dtor1 == 4); }
int dtor2;
struct S1 { ~this() { ++dtor2; } }
// delete on S1
{ S1* p; delete p; }
{ S1* p = new S1(); delete p; assert(dtor2 == 1); }
// delete on S1[]
{ S1[] a = [S1(), S1()]; delete a; assert(dtor2 == 3); }
return 1;
}
static assert(test6907());
/************************************************/
// https://issues.dlang.org/show_bug.cgi?id=9023
bool test9023()
{
string[][string] aas;
assert(aas.length == 0);
aas["a"] ~= "anything";
assert(aas.length == 1);
assert(aas["a"] == ["anything"]);
aas["a"] ~= "more";
assert(aas.length == 1);
assert(aas["a"] == ["anything", "more"]);
int[int] aan;
assert(aan.length == 0);
auto x = aan[0]++;
assert(x == 0);
assert(aan.length == 1);
assert(aan[0] == 1);
return true;
}
static assert(test9023());
/************************************************/
// https://issues.dlang.org/show_bug.cgi?id=15817
S[] split15817(S)(S s)
{
size_t istart;
S[] result;
foreach (i, c ; s)
result ~= s[istart .. i];
return result;
}
int test15817()
{
auto targets = `a1`.split15817;
uint[string] counts;
foreach (a; targets)
counts[a]++;
assert(counts == ["":1u, "a":1]);
return 1;
}
static assert(test15817());
/************************************************/
interface IBug9954
{
string foo() const;
}
class Bug9954 : IBug9954
{
string foo() const { return "hello"; }
}
IBug9954 makeIBug9954()
{
return new Bug9954;
}
const IBug9954 b9954 = makeIBug9954();
void test9954()
{
assert(b9954.foo() == "hello");
}
/************************************************/
// https://issues.dlang.org/show_bug.cgi?id=10483
struct Bug10483
{
int[3][4] val;
}
struct Outer10483
{
Bug10483 p = Bug10483(67);
}
int k10483a = Outer10483.init.p.val[2][2]; // ICE(expression.c)
void test10483()
{
int k10483b = Outer10483.init.p.val[2][2]; // Segfault (backend/type.c)
}
/************************************************/
struct S10669 { uint x; }
static const S10669 iid0_10669 = S10669(0);
class C10669
{
static const S10669 iid1_10669 = S10669(1);
};
const S10669 IID0_10669 = iid0_10669;
const S10669 IID1_10669 = C10669.iid1_10669;
/************************************************/
TypeInfo getTi()
{
return typeid(int);
}
auto t112 = getTi();
void test112()
{
assert(t112.toString() == "int");
}
/************************************************/
// https://issues.dlang.org/show_bug.cgi?id=10687
enum Foo10687 : uint { A, B, C, D, E }
immutable uint[5][] m10687 = [[0, 1, 2, 3, 4]];
void test10687()
{
static immutable uint[5] a1 = [0, 1, 2, 3, 4];
auto a2 = cast(immutable(Foo10687[5]))a1;
static a3 = cast(immutable(Foo10687[5]))a1;
auto foos1 = cast(immutable(Foo10687[5][]))m10687;
static foos2 = cast(immutable(Foo10687[5][]))m10687;
}
/************************************************/
void test113()
{
import core.math;
static void compare(real a, real b)
{
writefln("compare(%30.30f, %30.30f);", a, b);
assert(fabs(a - b) < 128 * real.epsilon);
}
static if (__traits(compiles, (){ enum real ctval1 = yl2x(3.14, 1); }))
{
enum real ctval1 = yl2x(3.14, 1);
enum real ctval2 = yl2x(2e1500L, 3);
enum real ctval3 = yl2x(1, 5);
real rtval1 = yl2x(3.14, 1);
real rtval2 = yl2x(2e1500L, 3);
real rtval3 = yl2x(1, 5);
compare(ctval1, rtval1);
compare(ctval2, rtval2);
compare(ctval3, rtval3);
}
static if (__traits(compiles, (){ enum real ctval4 = yl2xp1(3.14, 1); }))
{
enum real ctval4 = yl2xp1(3.14, 1);
enum real ctval5 = yl2xp1(2e1500L, 3);
enum real ctval6 = yl2xp1(1, 5);
real rtval4 = yl2xp1(3.14, 1);
real rtval5 = yl2xp1(2e1500L, 3);
real rtval6 = yl2xp1(1, 5);
compare(ctval4, rtval4);
compare(ctval5, rtval5);
compare(ctval6, rtval6);
}
}
/************************************************/
// https://issues.dlang.org/show_bug.cgi?id=14140
struct S14140
{
union
{
float[3][1] A;
float[3] flat;
}
this(in float[] args...)
{
flat[] = args[];
}
}
class C14140
{
union
{
float[3][1] A;
float[3] flat;
}
this(in float[] args...)
{
flat[] = args[];
}
}
immutable s14140 = S14140(0, 1, 0);
const c14140 = new C14140(0, 1, 0);
void test14140()
{
auto s = s14140;
assert(s.flat == [0, 1, 0]);
auto c = c14140;
assert(c.flat == [0, 1, 0]);
}
/************************************************/
// https://issues.dlang.org/show_bug.cgi?id=14862
struct S14862
{
union
{
struct { uint hi, lo; }
ulong data;
}
this(ulong data)
{
this.data = data;
}
}
void test14862()
{
S14862 s14862 = S14862(123UL);
enum S14862 e14862 = S14862(123UL);
static S14862 g14862 = S14862(123UL);
assert(s14862.data == 123UL); // OK
assert(e14862.data == 123UL); // OK
assert(g14862.data == 123UL); // OK <- fail
}
/************************************************/
// https://issues.dlang.org/show_bug.cgi?id=15681
void test15681()
{
static struct A { float value; }
static struct S
{
A[2] values;
this(float)
{
values[0].value = 0;
values[1].value = 1;
}
}
auto s1 = S(1.0f);
assert(s1.values[0].value == 0); // OK
assert(s1.values[1].value == 1); // OK
enum s2 = S(1.0f);
static assert(s2.values[0].value == 0); // OK <- NG
static assert(s2.values[1].value == 1); // OK
assert(s2.values[0].value == 0); // OK <- NG
assert(s2.values[1].value == 1); // OK
}
/************************************************/
int main()
{
test1();
test2();
test3();
test4();
test5();
test6();
test7();
test8();
test9();
test10();
test11();
test12();
test13();
test14();
test15();
test16();
test17();
test18();
test19();
test20();
test21();
test22();
test23();
test24();
test25();
test26();
test27();
test28();
test29();
test30();
test31();
test32();
test33();
test34();
test35();
test36();
test37();
test38();
test39();
test40();
test41();
test42();
test43();
test44();
test45();
test46();
test47();
test48();
test49();
test50();
test51();
test52();
test53();
test54();
test55();
test56();
test57();
test58();
test59();
test60();
test61();
test62();
test63();
test64();
test65();
test66();
test67();
test68();
test69();
test70();
test71();
test72();
test73();
test74();
test75();
test76();
test77();
test78();
test79();
test80();
test81();
test82();
test83();
test84();
test85();
test86();
test87();
test88();
test89();
test90();
test91();
test92();
test93();
test94();
test95();
test96();
test97();
test98();
test99();
test100();
test101();
test102();
test103();
test104();
test105();
test106();
test107();
//test108();
test109();
test112();
test113();
test6439();
test6504();
test8818();
test6907();
test9023();
test15817();
test9954();
test14140();
test14862();
test15681();
printf("Success\n");
return 0;
}
|
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.Graphics.Font;
extern(System):
////////////////////////////////////////////////////////////
// Imports
////////////////////////////////////////////////////////////
import dcsfml.Config;
import dcsfml.Graphics.Glyph;
import dcsfml.Graphics.Types;
import dcsfml.System.InputStream;
////////////////////////////////////////////////////////////
/// \brief Create a new font from a file
///
/// \param filename Path of the font file to load
///
/// \return A new sfFont object, or NULL if it failed
///
////////////////////////////////////////////////////////////
sfFont* sfFont_createFromFile(const(char)* filename);
////////////////////////////////////////////////////////////
/// \brief Create a new image font a file in memory
///
/// \param data Pointer to the file data in memory
/// \param sizeInBytes Size of the data to load, in bytes
///
/// \return A new sfFont object, or NULL if it failed
///
////////////////////////////////////////////////////////////
sfFont* sfFont_createFromMemory(const(void)* data, size_t sizeInBytes);
////////////////////////////////////////////////////////////
/// \brief Create a new image font a custom stream
///
/// \param stream Source stream to read from
///
/// \return A new sfFont object, or NULL if it failed
///
////////////////////////////////////////////////////////////
sfFont* sfFont_createFromStream(sfInputStream* stream);
////////////////////////////////////////////////////////////
/// \brief Copy an existing font
///
/// \param font Font to copy
///
/// \return Copied object
///
////////////////////////////////////////////////////////////
sfFont* sfFont_copy(sfFont* font);
////////////////////////////////////////////////////////////
/// \brief Destroy an existing font
///
/// \param font Font to delete
///
////////////////////////////////////////////////////////////
void sfFont_destroy(sfFont* font);
////////////////////////////////////////////////////////////
/// \brief Get a glyph in a font
///
/// \param font Source font
/// \param codePoint Unicode code point of the character to get
/// \param characterSize Character size, in pixels
/// \param bold Retrieve the bold version or the regular one?
///
/// \return The corresponding glyph
///
////////////////////////////////////////////////////////////
sfGlyph sfFont_getGlyph(sfFont* font, sfUint32 codePoint, uint characterSize, sfBool bold);
////////////////////////////////////////////////////////////
/// \brief Get the kerning value corresponding to a given pair of characters in a font
///
/// \param font Source font
/// \param first Unicode code point of the first character
/// \param second Unicode code point of the second character
/// \param characterSize Character size, in pixels
///
/// \return Kerning offset, in pixels
///
////////////////////////////////////////////////////////////
int sfFont_getKerning(sfFont* font, sfUint32 first, sfUint32 second, uint characterSize);
////////////////////////////////////////////////////////////
/// \brief Get the line spacing value
///
/// \param font Source font
/// \param codePoint Unicode code point of the character to get
/// \param characterSize Character size, in pixels
///
/// \return Line spacing, in pixels
///
////////////////////////////////////////////////////////////
int sfFont_getLineSpacing(sfFont* font, uint characterSize);
////////////////////////////////////////////////////////////
/// \brief Get the texture containing the glyphs of a given size in a font
///
/// \param font Source font
/// \param characterSize Character size, in pixels
///
/// \return Read-only pointer to the texture
///
////////////////////////////////////////////////////////////
const(sfTexture)* sfFont_getTexture(sfFont* font, uint characterSize);
////////////////////////////////////////////////////////////
/// \brief Get the built-in default font (Arial)
///
/// \return Pointer to the default font
///
////////////////////////////////////////////////////////////
sfFont* sfFont_getDefaultFont();
|
D
|
/Users/mohammadazam/Documents/Projects/StoryTellersAPICode/StoryTellersAPI/.build/debug/Leaf.build/Byte+Leaf.swift.o : /Users/mohammadazam/Documents/Projects/StoryTellersAPICode/StoryTellersAPI/Packages/Leaf-1.0.3/Sources/Leaf/Argument.swift /Users/mohammadazam/Documents/Projects/StoryTellersAPICode/StoryTellersAPI/Packages/Leaf-1.0.3/Sources/Leaf/Byte+Leaf.swift /Users/mohammadazam/Documents/Projects/StoryTellersAPICode/StoryTellersAPI/Packages/Leaf-1.0.3/Sources/Leaf/Constants.swift /Users/mohammadazam/Documents/Projects/StoryTellersAPICode/StoryTellersAPI/Packages/Leaf-1.0.3/Sources/Leaf/Context.swift /Users/mohammadazam/Documents/Projects/StoryTellersAPICode/StoryTellersAPI/Packages/Leaf-1.0.3/Sources/Leaf/HTMLEscape.swift /Users/mohammadazam/Documents/Projects/StoryTellersAPICode/StoryTellersAPI/Packages/Leaf-1.0.3/Sources/Leaf/Leaf.swift /Users/mohammadazam/Documents/Projects/StoryTellersAPICode/StoryTellersAPI/Packages/Leaf-1.0.3/Sources/Leaf/LeafComponent.swift /Users/mohammadazam/Documents/Projects/StoryTellersAPICode/StoryTellersAPI/Packages/Leaf-1.0.3/Sources/Leaf/LeafError.swift /Users/mohammadazam/Documents/Projects/StoryTellersAPICode/StoryTellersAPI/Packages/Leaf-1.0.3/Sources/Leaf/Link.swift /Users/mohammadazam/Documents/Projects/StoryTellersAPICode/StoryTellersAPI/Packages/Leaf-1.0.3/Sources/Leaf/List.swift /Users/mohammadazam/Documents/Projects/StoryTellersAPICode/StoryTellersAPI/Packages/Leaf-1.0.3/Sources/Leaf/Node+Rendered.swift /Users/mohammadazam/Documents/Projects/StoryTellersAPICode/StoryTellersAPI/Packages/Leaf-1.0.3/Sources/Leaf/NSData+File.swift /Users/mohammadazam/Documents/Projects/StoryTellersAPICode/StoryTellersAPI/Packages/Leaf-1.0.3/Sources/Leaf/Parameter.swift /Users/mohammadazam/Documents/Projects/StoryTellersAPICode/StoryTellersAPI/Packages/Leaf-1.0.3/Sources/Leaf/Stem+Render.swift /Users/mohammadazam/Documents/Projects/StoryTellersAPICode/StoryTellersAPI/Packages/Leaf-1.0.3/Sources/Leaf/Stem+Spawn.swift /Users/mohammadazam/Documents/Projects/StoryTellersAPICode/StoryTellersAPI/Packages/Leaf-1.0.3/Sources/Leaf/Stem.swift /Users/mohammadazam/Documents/Projects/StoryTellersAPICode/StoryTellersAPI/Packages/Leaf-1.0.3/Sources/Leaf/Buffer/Buffer+Leaf.swift /Users/mohammadazam/Documents/Projects/StoryTellersAPICode/StoryTellersAPI/Packages/Leaf-1.0.3/Sources/Leaf/Buffer/Buffer.swift /Users/mohammadazam/Documents/Projects/StoryTellersAPICode/StoryTellersAPI/Packages/Leaf-1.0.3/Sources/Leaf/Buffer/BufferProtocol.swift /Users/mohammadazam/Documents/Projects/StoryTellersAPICode/StoryTellersAPI/Packages/Leaf-1.0.3/Sources/Leaf/Tag/BasicTag.swift /Users/mohammadazam/Documents/Projects/StoryTellersAPICode/StoryTellersAPI/Packages/Leaf-1.0.3/Sources/Leaf/Tag/Tag.swift /Users/mohammadazam/Documents/Projects/StoryTellersAPICode/StoryTellersAPI/Packages/Leaf-1.0.3/Sources/Leaf/Tag/TagTemplate.swift /Users/mohammadazam/Documents/Projects/StoryTellersAPICode/StoryTellersAPI/Packages/Leaf-1.0.3/Sources/Leaf/Tag/Models/Else.swift /Users/mohammadazam/Documents/Projects/StoryTellersAPICode/StoryTellersAPI/Packages/Leaf-1.0.3/Sources/Leaf/Tag/Models/Embed.swift /Users/mohammadazam/Documents/Projects/StoryTellersAPICode/StoryTellersAPI/Packages/Leaf-1.0.3/Sources/Leaf/Tag/Models/Equal.swift /Users/mohammadazam/Documents/Projects/StoryTellersAPICode/StoryTellersAPI/Packages/Leaf-1.0.3/Sources/Leaf/Tag/Models/Export.swift /Users/mohammadazam/Documents/Projects/StoryTellersAPICode/StoryTellersAPI/Packages/Leaf-1.0.3/Sources/Leaf/Tag/Models/Extend.swift /Users/mohammadazam/Documents/Projects/StoryTellersAPICode/StoryTellersAPI/Packages/Leaf-1.0.3/Sources/Leaf/Tag/Models/If.swift /Users/mohammadazam/Documents/Projects/StoryTellersAPICode/StoryTellersAPI/Packages/Leaf-1.0.3/Sources/Leaf/Tag/Models/Import.swift /Users/mohammadazam/Documents/Projects/StoryTellersAPICode/StoryTellersAPI/Packages/Leaf-1.0.3/Sources/Leaf/Tag/Models/Index.swift /Users/mohammadazam/Documents/Projects/StoryTellersAPICode/StoryTellersAPI/Packages/Leaf-1.0.3/Sources/Leaf/Tag/Models/Loop.swift /Users/mohammadazam/Documents/Projects/StoryTellersAPICode/StoryTellersAPI/Packages/Leaf-1.0.3/Sources/Leaf/Tag/Models/Raw.swift /Users/mohammadazam/Documents/Projects/StoryTellersAPICode/StoryTellersAPI/Packages/Leaf-1.0.3/Sources/Leaf/Tag/Models/Uppercased.swift /Users/mohammadazam/Documents/Projects/StoryTellersAPICode/StoryTellersAPI/Packages/Leaf-1.0.3/Sources/Leaf/Tag/Models/Variable.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/SwiftOnoneSupport.swiftmodule /Users/mohammadazam/Documents/Projects/StoryTellersAPICode/StoryTellersAPI/.build/debug/Core.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Dispatch.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/ObjectiveC.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/CoreGraphics.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/IOKit.swiftmodule /Users/mohammadazam/Documents/Projects/StoryTellersAPICode/StoryTellersAPI/.build/debug/libc.swiftmodule /Users/mohammadazam/Documents/Projects/StoryTellersAPICode/StoryTellersAPI/.build/debug/Node.swiftmodule /Users/mohammadazam/Documents/Projects/StoryTellersAPICode/StoryTellersAPI/.build/debug/PathIndexable.swiftmodule /Users/mohammadazam/Documents/Projects/StoryTellersAPICode/StoryTellersAPI/.build/debug/Polymorphic.swiftmodule
/Users/mohammadazam/Documents/Projects/StoryTellersAPICode/StoryTellersAPI/.build/debug/Leaf.build/Byte+Leaf~partial.swiftmodule : /Users/mohammadazam/Documents/Projects/StoryTellersAPICode/StoryTellersAPI/Packages/Leaf-1.0.3/Sources/Leaf/Argument.swift /Users/mohammadazam/Documents/Projects/StoryTellersAPICode/StoryTellersAPI/Packages/Leaf-1.0.3/Sources/Leaf/Byte+Leaf.swift /Users/mohammadazam/Documents/Projects/StoryTellersAPICode/StoryTellersAPI/Packages/Leaf-1.0.3/Sources/Leaf/Constants.swift /Users/mohammadazam/Documents/Projects/StoryTellersAPICode/StoryTellersAPI/Packages/Leaf-1.0.3/Sources/Leaf/Context.swift /Users/mohammadazam/Documents/Projects/StoryTellersAPICode/StoryTellersAPI/Packages/Leaf-1.0.3/Sources/Leaf/HTMLEscape.swift /Users/mohammadazam/Documents/Projects/StoryTellersAPICode/StoryTellersAPI/Packages/Leaf-1.0.3/Sources/Leaf/Leaf.swift /Users/mohammadazam/Documents/Projects/StoryTellersAPICode/StoryTellersAPI/Packages/Leaf-1.0.3/Sources/Leaf/LeafComponent.swift /Users/mohammadazam/Documents/Projects/StoryTellersAPICode/StoryTellersAPI/Packages/Leaf-1.0.3/Sources/Leaf/LeafError.swift /Users/mohammadazam/Documents/Projects/StoryTellersAPICode/StoryTellersAPI/Packages/Leaf-1.0.3/Sources/Leaf/Link.swift /Users/mohammadazam/Documents/Projects/StoryTellersAPICode/StoryTellersAPI/Packages/Leaf-1.0.3/Sources/Leaf/List.swift /Users/mohammadazam/Documents/Projects/StoryTellersAPICode/StoryTellersAPI/Packages/Leaf-1.0.3/Sources/Leaf/Node+Rendered.swift /Users/mohammadazam/Documents/Projects/StoryTellersAPICode/StoryTellersAPI/Packages/Leaf-1.0.3/Sources/Leaf/NSData+File.swift /Users/mohammadazam/Documents/Projects/StoryTellersAPICode/StoryTellersAPI/Packages/Leaf-1.0.3/Sources/Leaf/Parameter.swift /Users/mohammadazam/Documents/Projects/StoryTellersAPICode/StoryTellersAPI/Packages/Leaf-1.0.3/Sources/Leaf/Stem+Render.swift /Users/mohammadazam/Documents/Projects/StoryTellersAPICode/StoryTellersAPI/Packages/Leaf-1.0.3/Sources/Leaf/Stem+Spawn.swift /Users/mohammadazam/Documents/Projects/StoryTellersAPICode/StoryTellersAPI/Packages/Leaf-1.0.3/Sources/Leaf/Stem.swift /Users/mohammadazam/Documents/Projects/StoryTellersAPICode/StoryTellersAPI/Packages/Leaf-1.0.3/Sources/Leaf/Buffer/Buffer+Leaf.swift /Users/mohammadazam/Documents/Projects/StoryTellersAPICode/StoryTellersAPI/Packages/Leaf-1.0.3/Sources/Leaf/Buffer/Buffer.swift /Users/mohammadazam/Documents/Projects/StoryTellersAPICode/StoryTellersAPI/Packages/Leaf-1.0.3/Sources/Leaf/Buffer/BufferProtocol.swift /Users/mohammadazam/Documents/Projects/StoryTellersAPICode/StoryTellersAPI/Packages/Leaf-1.0.3/Sources/Leaf/Tag/BasicTag.swift /Users/mohammadazam/Documents/Projects/StoryTellersAPICode/StoryTellersAPI/Packages/Leaf-1.0.3/Sources/Leaf/Tag/Tag.swift /Users/mohammadazam/Documents/Projects/StoryTellersAPICode/StoryTellersAPI/Packages/Leaf-1.0.3/Sources/Leaf/Tag/TagTemplate.swift /Users/mohammadazam/Documents/Projects/StoryTellersAPICode/StoryTellersAPI/Packages/Leaf-1.0.3/Sources/Leaf/Tag/Models/Else.swift /Users/mohammadazam/Documents/Projects/StoryTellersAPICode/StoryTellersAPI/Packages/Leaf-1.0.3/Sources/Leaf/Tag/Models/Embed.swift /Users/mohammadazam/Documents/Projects/StoryTellersAPICode/StoryTellersAPI/Packages/Leaf-1.0.3/Sources/Leaf/Tag/Models/Equal.swift /Users/mohammadazam/Documents/Projects/StoryTellersAPICode/StoryTellersAPI/Packages/Leaf-1.0.3/Sources/Leaf/Tag/Models/Export.swift /Users/mohammadazam/Documents/Projects/StoryTellersAPICode/StoryTellersAPI/Packages/Leaf-1.0.3/Sources/Leaf/Tag/Models/Extend.swift /Users/mohammadazam/Documents/Projects/StoryTellersAPICode/StoryTellersAPI/Packages/Leaf-1.0.3/Sources/Leaf/Tag/Models/If.swift /Users/mohammadazam/Documents/Projects/StoryTellersAPICode/StoryTellersAPI/Packages/Leaf-1.0.3/Sources/Leaf/Tag/Models/Import.swift /Users/mohammadazam/Documents/Projects/StoryTellersAPICode/StoryTellersAPI/Packages/Leaf-1.0.3/Sources/Leaf/Tag/Models/Index.swift /Users/mohammadazam/Documents/Projects/StoryTellersAPICode/StoryTellersAPI/Packages/Leaf-1.0.3/Sources/Leaf/Tag/Models/Loop.swift /Users/mohammadazam/Documents/Projects/StoryTellersAPICode/StoryTellersAPI/Packages/Leaf-1.0.3/Sources/Leaf/Tag/Models/Raw.swift /Users/mohammadazam/Documents/Projects/StoryTellersAPICode/StoryTellersAPI/Packages/Leaf-1.0.3/Sources/Leaf/Tag/Models/Uppercased.swift /Users/mohammadazam/Documents/Projects/StoryTellersAPICode/StoryTellersAPI/Packages/Leaf-1.0.3/Sources/Leaf/Tag/Models/Variable.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/SwiftOnoneSupport.swiftmodule /Users/mohammadazam/Documents/Projects/StoryTellersAPICode/StoryTellersAPI/.build/debug/Core.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Dispatch.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/ObjectiveC.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/CoreGraphics.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/IOKit.swiftmodule /Users/mohammadazam/Documents/Projects/StoryTellersAPICode/StoryTellersAPI/.build/debug/libc.swiftmodule /Users/mohammadazam/Documents/Projects/StoryTellersAPICode/StoryTellersAPI/.build/debug/Node.swiftmodule /Users/mohammadazam/Documents/Projects/StoryTellersAPICode/StoryTellersAPI/.build/debug/PathIndexable.swiftmodule /Users/mohammadazam/Documents/Projects/StoryTellersAPICode/StoryTellersAPI/.build/debug/Polymorphic.swiftmodule
/Users/mohammadazam/Documents/Projects/StoryTellersAPICode/StoryTellersAPI/.build/debug/Leaf.build/Byte+Leaf~partial.swiftdoc : /Users/mohammadazam/Documents/Projects/StoryTellersAPICode/StoryTellersAPI/Packages/Leaf-1.0.3/Sources/Leaf/Argument.swift /Users/mohammadazam/Documents/Projects/StoryTellersAPICode/StoryTellersAPI/Packages/Leaf-1.0.3/Sources/Leaf/Byte+Leaf.swift /Users/mohammadazam/Documents/Projects/StoryTellersAPICode/StoryTellersAPI/Packages/Leaf-1.0.3/Sources/Leaf/Constants.swift /Users/mohammadazam/Documents/Projects/StoryTellersAPICode/StoryTellersAPI/Packages/Leaf-1.0.3/Sources/Leaf/Context.swift /Users/mohammadazam/Documents/Projects/StoryTellersAPICode/StoryTellersAPI/Packages/Leaf-1.0.3/Sources/Leaf/HTMLEscape.swift /Users/mohammadazam/Documents/Projects/StoryTellersAPICode/StoryTellersAPI/Packages/Leaf-1.0.3/Sources/Leaf/Leaf.swift /Users/mohammadazam/Documents/Projects/StoryTellersAPICode/StoryTellersAPI/Packages/Leaf-1.0.3/Sources/Leaf/LeafComponent.swift /Users/mohammadazam/Documents/Projects/StoryTellersAPICode/StoryTellersAPI/Packages/Leaf-1.0.3/Sources/Leaf/LeafError.swift /Users/mohammadazam/Documents/Projects/StoryTellersAPICode/StoryTellersAPI/Packages/Leaf-1.0.3/Sources/Leaf/Link.swift /Users/mohammadazam/Documents/Projects/StoryTellersAPICode/StoryTellersAPI/Packages/Leaf-1.0.3/Sources/Leaf/List.swift /Users/mohammadazam/Documents/Projects/StoryTellersAPICode/StoryTellersAPI/Packages/Leaf-1.0.3/Sources/Leaf/Node+Rendered.swift /Users/mohammadazam/Documents/Projects/StoryTellersAPICode/StoryTellersAPI/Packages/Leaf-1.0.3/Sources/Leaf/NSData+File.swift /Users/mohammadazam/Documents/Projects/StoryTellersAPICode/StoryTellersAPI/Packages/Leaf-1.0.3/Sources/Leaf/Parameter.swift /Users/mohammadazam/Documents/Projects/StoryTellersAPICode/StoryTellersAPI/Packages/Leaf-1.0.3/Sources/Leaf/Stem+Render.swift /Users/mohammadazam/Documents/Projects/StoryTellersAPICode/StoryTellersAPI/Packages/Leaf-1.0.3/Sources/Leaf/Stem+Spawn.swift /Users/mohammadazam/Documents/Projects/StoryTellersAPICode/StoryTellersAPI/Packages/Leaf-1.0.3/Sources/Leaf/Stem.swift /Users/mohammadazam/Documents/Projects/StoryTellersAPICode/StoryTellersAPI/Packages/Leaf-1.0.3/Sources/Leaf/Buffer/Buffer+Leaf.swift /Users/mohammadazam/Documents/Projects/StoryTellersAPICode/StoryTellersAPI/Packages/Leaf-1.0.3/Sources/Leaf/Buffer/Buffer.swift /Users/mohammadazam/Documents/Projects/StoryTellersAPICode/StoryTellersAPI/Packages/Leaf-1.0.3/Sources/Leaf/Buffer/BufferProtocol.swift /Users/mohammadazam/Documents/Projects/StoryTellersAPICode/StoryTellersAPI/Packages/Leaf-1.0.3/Sources/Leaf/Tag/BasicTag.swift /Users/mohammadazam/Documents/Projects/StoryTellersAPICode/StoryTellersAPI/Packages/Leaf-1.0.3/Sources/Leaf/Tag/Tag.swift /Users/mohammadazam/Documents/Projects/StoryTellersAPICode/StoryTellersAPI/Packages/Leaf-1.0.3/Sources/Leaf/Tag/TagTemplate.swift /Users/mohammadazam/Documents/Projects/StoryTellersAPICode/StoryTellersAPI/Packages/Leaf-1.0.3/Sources/Leaf/Tag/Models/Else.swift /Users/mohammadazam/Documents/Projects/StoryTellersAPICode/StoryTellersAPI/Packages/Leaf-1.0.3/Sources/Leaf/Tag/Models/Embed.swift /Users/mohammadazam/Documents/Projects/StoryTellersAPICode/StoryTellersAPI/Packages/Leaf-1.0.3/Sources/Leaf/Tag/Models/Equal.swift /Users/mohammadazam/Documents/Projects/StoryTellersAPICode/StoryTellersAPI/Packages/Leaf-1.0.3/Sources/Leaf/Tag/Models/Export.swift /Users/mohammadazam/Documents/Projects/StoryTellersAPICode/StoryTellersAPI/Packages/Leaf-1.0.3/Sources/Leaf/Tag/Models/Extend.swift /Users/mohammadazam/Documents/Projects/StoryTellersAPICode/StoryTellersAPI/Packages/Leaf-1.0.3/Sources/Leaf/Tag/Models/If.swift /Users/mohammadazam/Documents/Projects/StoryTellersAPICode/StoryTellersAPI/Packages/Leaf-1.0.3/Sources/Leaf/Tag/Models/Import.swift /Users/mohammadazam/Documents/Projects/StoryTellersAPICode/StoryTellersAPI/Packages/Leaf-1.0.3/Sources/Leaf/Tag/Models/Index.swift /Users/mohammadazam/Documents/Projects/StoryTellersAPICode/StoryTellersAPI/Packages/Leaf-1.0.3/Sources/Leaf/Tag/Models/Loop.swift /Users/mohammadazam/Documents/Projects/StoryTellersAPICode/StoryTellersAPI/Packages/Leaf-1.0.3/Sources/Leaf/Tag/Models/Raw.swift /Users/mohammadazam/Documents/Projects/StoryTellersAPICode/StoryTellersAPI/Packages/Leaf-1.0.3/Sources/Leaf/Tag/Models/Uppercased.swift /Users/mohammadazam/Documents/Projects/StoryTellersAPICode/StoryTellersAPI/Packages/Leaf-1.0.3/Sources/Leaf/Tag/Models/Variable.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/SwiftOnoneSupport.swiftmodule /Users/mohammadazam/Documents/Projects/StoryTellersAPICode/StoryTellersAPI/.build/debug/Core.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Dispatch.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/ObjectiveC.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/CoreGraphics.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/IOKit.swiftmodule /Users/mohammadazam/Documents/Projects/StoryTellersAPICode/StoryTellersAPI/.build/debug/libc.swiftmodule /Users/mohammadazam/Documents/Projects/StoryTellersAPICode/StoryTellersAPI/.build/debug/Node.swiftmodule /Users/mohammadazam/Documents/Projects/StoryTellersAPICode/StoryTellersAPI/.build/debug/PathIndexable.swiftmodule /Users/mohammadazam/Documents/Projects/StoryTellersAPICode/StoryTellersAPI/.build/debug/Polymorphic.swiftmodule
|
D
|
/*
* Copyright 2019 Google LLC
* Copyright 2019 Mellanox Technologies Ltd
* Copyright 2022 Coverify Systems Technology
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
module riscv.gen.isa.rv32b_instr;
import riscv.gen.riscv_defines;
import uvm;
// Remaining bitmanip instructions of draft v.0.93 not ratified in v.1.00 (Zba, Zbb, Zbc, Zbs).
version (RISCV_INSTR_STRING_MIXIN) {
// LOGICAL instructions
mixin (riscv_b_instr_mixin(GORC, R_FORMAT, LOGICAL, RV32B));
mixin (riscv_b_instr_mixin(GORCI, I_FORMAT, LOGICAL, RV32B, UIMM));
mixin (riscv_b_instr_mixin(CMIX, R4_FORMAT, LOGICAL, RV32B));
mixin (riscv_b_instr_mixin(CMOV, R4_FORMAT, LOGICAL, RV32B));
mixin (riscv_b_instr_mixin(PACK, R_FORMAT, LOGICAL, RV32B));
mixin (riscv_b_instr_mixin(PACKU, R_FORMAT, LOGICAL, RV32B));
mixin (riscv_b_instr_mixin(PACKH, R_FORMAT, LOGICAL, RV32B));
mixin (riscv_b_instr_mixin(XPERM_N, R_FORMAT, LOGICAL, RV32B));
mixin (riscv_b_instr_mixin(XPERM_B, R_FORMAT, LOGICAL, RV32B));
mixin (riscv_b_instr_mixin(XPERM_H, R_FORMAT, LOGICAL, RV32B));
// SHIFT intructions
mixin (riscv_b_instr_mixin(SLO, R_FORMAT, SHIFT, RV32B));
mixin (riscv_b_instr_mixin(SRO, R_FORMAT, SHIFT, RV32B));
mixin (riscv_b_instr_mixin(SLOI, I_FORMAT, SHIFT, RV32B, UIMM));
mixin (riscv_b_instr_mixin(SROI, I_FORMAT, SHIFT, RV32B, UIMM));
mixin (riscv_b_instr_mixin(GREV, R_FORMAT, SHIFT, RV32B));
mixin (riscv_b_instr_mixin(GREVI, I_FORMAT, SHIFT, RV32B, UIMM));
mixin (riscv_b_instr_mixin(FSL, R4_FORMAT, SHIFT, RV32B));
mixin (riscv_b_instr_mixin(FSR, R4_FORMAT, SHIFT, RV32B));
mixin (riscv_b_instr_mixin(FSRI, I_FORMAT, SHIFT, RV32B, UIMM));
// ARITHMETIC intructions
mixin (riscv_b_instr_mixin(CRC32_B, R_FORMAT, ARITHMETIC, RV32B));
mixin (riscv_b_instr_mixin(CRC32_H, R_FORMAT, ARITHMETIC, RV32B));
mixin (riscv_b_instr_mixin(CRC32_W, R_FORMAT, ARITHMETIC, RV32B));
mixin (riscv_b_instr_mixin(CRC32C_B, R_FORMAT, ARITHMETIC, RV32B));
mixin (riscv_b_instr_mixin(CRC32C_H, R_FORMAT, ARITHMETIC, RV32B));
mixin (riscv_b_instr_mixin(CRC32C_W, R_FORMAT, ARITHMETIC, RV32B));
mixin (riscv_b_instr_mixin(SHFL, R_FORMAT, ARITHMETIC, RV32B));
mixin (riscv_b_instr_mixin(UNSHFL, R_FORMAT, ARITHMETIC, RV32B));
mixin (riscv_b_instr_mixin(SHFLI, I_FORMAT, ARITHMETIC, RV32B, UIMM));
mixin (riscv_b_instr_mixin(UNSHFLI, I_FORMAT, ARITHMETIC, RV32B, UIMM));
mixin (riscv_b_instr_mixin(BCOMPRESS, R_FORMAT, ARITHMETIC, RV32B));
mixin (riscv_b_instr_mixin(BDECOMPRESS, R_FORMAT, ARITHMETIC, RV32B));
mixin (riscv_b_instr_mixin(BFP, R_FORMAT, ARITHMETIC, RV32B));
}
else {
// LOGICAL instructions
class riscv_GORC_instr: riscv_b_instr
{ mixin RISCV_INSTR_MIXIN!(GORC, R_FORMAT, LOGICAL, RV32B); }
class riscv_GORCI_instr: riscv_b_instr
{ mixin RISCV_INSTR_MIXIN!(GORCI, I_FORMAT, LOGICAL, RV32B, UIMM); }
class riscv_CMIX_instr: riscv_b_instr
{ mixin RISCV_INSTR_MIXIN!(CMIX, R4_FORMAT, LOGICAL, RV32B); }
class riscv_CMOV_instr: riscv_b_instr
{ mixin RISCV_INSTR_MIXIN!(CMOV, R4_FORMAT, LOGICAL, RV32B); }
class riscv_PACK_instr: riscv_b_instr
{ mixin RISCV_INSTR_MIXIN!(PACK, R_FORMAT, LOGICAL, RV32B); }
class riscv_PACKU_instr: riscv_b_instr
{ mixin RISCV_INSTR_MIXIN!(PACKU, R_FORMAT, LOGICAL, RV32B); }
class riscv_PACKH_instr: riscv_b_instr
{ mixin RISCV_INSTR_MIXIN!(PACKH, R_FORMAT, LOGICAL, RV32B); }
class riscv_XPERM_N_instr: riscv_b_instr
{ mixin RISCV_INSTR_MIXIN!(XPERM_N, R_FORMAT, LOGICAL, RV32B); }
class riscv_XPERM_B_instr: riscv_b_instr
{ mixin RISCV_INSTR_MIXIN!(XPERM_B, R_FORMAT, LOGICAL, RV32B); }
class riscv_XPERM_H_instr: riscv_b_instr
{ mixin RISCV_INSTR_MIXIN!(XPERM_H, R_FORMAT, LOGICAL, RV32B); }
// SHIFT intructions
class riscv_SLO_instr: riscv_b_instr
{ mixin RISCV_INSTR_MIXIN!(SLO, R_FORMAT, SHIFT, RV32B); }
class riscv_SRO_instr: riscv_b_instr
{ mixin RISCV_INSTR_MIXIN!(SRO, R_FORMAT, SHIFT, RV32B); }
class riscv_SLOI_instr: riscv_b_instr
{ mixin RISCV_INSTR_MIXIN!(SLOI, I_FORMAT, SHIFT, RV32B, UIMM); }
class riscv_SROI_instr: riscv_b_instr
{ mixin RISCV_INSTR_MIXIN!(SROI, I_FORMAT, SHIFT, RV32B, UIMM); }
class riscv_GREV_instr: riscv_b_instr
{ mixin RISCV_INSTR_MIXIN!(GREV, R_FORMAT, SHIFT, RV32B); }
class riscv_GREVI_instr: riscv_b_instr
{ mixin RISCV_INSTR_MIXIN!(GREVI, I_FORMAT, SHIFT, RV32B, UIMM); }
class riscv_FSL_instr: riscv_b_instr
{ mixin RISCV_INSTR_MIXIN!(FSL, R4_FORMAT, SHIFT, RV32B); }
class riscv_FSR_instr: riscv_b_instr
{ mixin RISCV_INSTR_MIXIN!(FSR, R4_FORMAT, SHIFT, RV32B); }
class riscv_FSRI_instr: riscv_b_instr
{ mixin RISCV_INSTR_MIXIN!(FSRI, I_FORMAT, SHIFT, RV32B, UIMM); }
// ARITHMETIC intructions
class riscv_CRC32_B_instr: riscv_b_instr
{ mixin RISCV_INSTR_MIXIN!(CRC32_B, R_FORMAT, ARITHMETIC, RV32B); }
class riscv_CRC32_H_instr: riscv_b_instr
{ mixin RISCV_INSTR_MIXIN!(CRC32_H, R_FORMAT, ARITHMETIC, RV32B); }
class riscv_CRC32_W_instr: riscv_b_instr
{ mixin RISCV_INSTR_MIXIN!(CRC32_W, R_FORMAT, ARITHMETIC, RV32B); }
class riscv_CRC32C_B_instr: riscv_b_instr
{ mixin RISCV_INSTR_MIXIN!(CRC32C_B, R_FORMAT, ARITHMETIC, RV32B); }
class riscv_CRC32C_H_instr: riscv_b_instr
{ mixin RISCV_INSTR_MIXIN!(CRC32C_H, R_FORMAT, ARITHMETIC, RV32B); }
class riscv_CRC32C_W_instr: riscv_b_instr
{ mixin RISCV_INSTR_MIXIN!(CRC32C_W, R_FORMAT, ARITHMETIC, RV32B); }
class riscv_SHFL_instr: riscv_b_instr
{ mixin RISCV_INSTR_MIXIN!(SHFL, R_FORMAT, ARITHMETIC, RV32B); }
class riscv_UNSHFL_instr: riscv_b_instr
{ mixin RISCV_INSTR_MIXIN!(UNSHFL, R_FORMAT, ARITHMETIC, RV32B); }
class riscv_SHFLI_instr: riscv_b_instr
{ mixin RISCV_INSTR_MIXIN!(SHFLI, I_FORMAT, ARITHMETIC, RV32B, UIMM); }
class riscv_UNSHFLI_instr: riscv_b_instr
{ mixin RISCV_INSTR_MIXIN!(UNSHFLI, I_FORMAT, ARITHMETIC, RV32B, UIMM); }
class riscv_BCOMPRESS_instr: riscv_b_instr
{ mixin RISCV_INSTR_MIXIN!(BCOMPRESS, R_FORMAT, ARITHMETIC, RV32B); }
class riscv_BDECOMPRESS_instr: riscv_b_instr
{ mixin RISCV_INSTR_MIXIN!(BDECOMPRESS, R_FORMAT, ARITHMETIC, RV32B); }
class riscv_BFP_instr: riscv_b_instr
{ mixin RISCV_INSTR_MIXIN!(BFP, R_FORMAT, ARITHMETIC, RV32B); }
}
|
D
|
/Users/kirstenrichard/Desktop/substrate-moloch-dao/target/release/wbuild/target/release/deps/nodrop-b19c71fb354be1b2.rmeta: /Users/kirstenrichard/.cargo/registry/src/github.com-1ecc6299db9ec823/nodrop-0.1.14/src/lib.rs
/Users/kirstenrichard/Desktop/substrate-moloch-dao/target/release/wbuild/target/release/deps/libnodrop-b19c71fb354be1b2.rlib: /Users/kirstenrichard/.cargo/registry/src/github.com-1ecc6299db9ec823/nodrop-0.1.14/src/lib.rs
/Users/kirstenrichard/Desktop/substrate-moloch-dao/target/release/wbuild/target/release/deps/nodrop-b19c71fb354be1b2.d: /Users/kirstenrichard/.cargo/registry/src/github.com-1ecc6299db9ec823/nodrop-0.1.14/src/lib.rs
/Users/kirstenrichard/.cargo/registry/src/github.com-1ecc6299db9ec823/nodrop-0.1.14/src/lib.rs:
|
D
|
/Users/buhi/Documents/js_projects/buhichan.github.io/src/routes/demos/114514/target/release/build/syn-e98e458b20b19ae1/build_script_build-e98e458b20b19ae1: /Users/buhi/.cargo/registry/src/github.com-1ecc6299db9ec823/syn-1.0.16/build.rs
/Users/buhi/Documents/js_projects/buhichan.github.io/src/routes/demos/114514/target/release/build/syn-e98e458b20b19ae1/build_script_build-e98e458b20b19ae1.d: /Users/buhi/.cargo/registry/src/github.com-1ecc6299db9ec823/syn-1.0.16/build.rs
/Users/buhi/.cargo/registry/src/github.com-1ecc6299db9ec823/syn-1.0.16/build.rs:
|
D
|
import std.stdio, std.algorithm, std.conv, std.array, std.string, std.math, std.typecons, std.numeric;
struct PriorityQueue(alias _fun, T) {
import std.functional : binaryFun;
import std.algorithm : swap;
alias fun = binaryFun!_fun;
///
this(T[] ts) {
foreach (t; ts) enqueue(t);
}
///
PriorityQueue!(_fun, T) enqueue(T e) {
if (this.tree.length == 0) this.tree.length = 1;
if (this.tree.length == this.n) this.tree.length *= 2;
this.tree[this.n] = e;
auto i = this.n;
this.n += 1;
while (i) {
auto j = (i-1)/2;
if (fun(this.tree[i], this.tree[j])) {
swap(this.tree[i], this.tree[j]);
i = j;
} else break;
}
return this;
}
alias insertFront = enqueue;
alias insert = enqueue;
///
T dequeue() {
auto ret = this.tree[0];
this.n -= 1;
this.tree[0] = this.tree[this.n];
this.tree = this.tree[0..$-1];
size_t i;
for (;;) {
auto l = i*2+1;
auto r = i*2+2;
if (l >= this.n) break;
size_t j;
if (r >= this.n) {
j = l;
} else {
j = fun(this.tree[r], this.tree[l]) ? r : l;
}
if (fun(this.tree[j], this.tree[i])) {
swap(this.tree[i], this.tree[j]);
i = j;
} else break;
}
return ret;
}
///
@property
T front() {
return this.tree[0];
}
///
@property
bool empty() {
return this.n == 0;
}
///
void popFront() {
this.dequeue();
}
alias removeFront = popFront;
///
@property
size_t length() {
return this.n;
}
private:
size_t n;
T[] tree;
}
///
PriorityQueue!(fun, T) priority_queue(alias fun, T)(T[] ts = []) {
return PriorityQueue!(fun, T)(ts);
}
alias T = Tuple!(long, "t", long, "x", char, "st");
T[10^^5*4] TS;
void main()
{
auto nq = readln.split.to!(int[]);
auto N = nq[0];
auto Q = nq[1];
foreach (i; 0..N) {
auto stx = readln.split.to!(long[]);
auto x = stx[2];
TS[i] = T(stx[0]-x, x, 'S');
TS[N+i] = T(stx[1]-x, x, 'T');
}
sort!"a.t < b.t"(TS[0..N*2]);
size_t i;
auto QQ = priority_queue!("a < b", long)();
auto PP = priority_queue!("a < b", long)();
foreach (_; 0..Q) {
auto D = readln.chomp.to!long;
while (i < N*2 && TS[i].t <= D) {
if (TS[i].st == 'S') {
QQ.enqueue(TS[i].x);
} else {
if (QQ.front == TS[i].x) {
QQ.dequeue();
while (!PP.empty && !QQ.empty && QQ.front == PP.front) {
PP.dequeue();
QQ.dequeue();
}
} else {
PP.enqueue(TS[i].x);
}
}
++i;
}
if (QQ.empty) {
writeln("-1");
} else {
writeln(QQ.front);
}
}
}
|
D
|
<?xml version="1.0" encoding="ASCII" standalone="no"?>
<di:SashWindowsMngr xmlns:di="http://www.eclipse.org/papyrus/0.7.0/sashdi" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmi:version="2.0">
<pageList>
<availablePage>
<emfPageIdentifier href="VAR_8_BeT-4791728168.notation#_copSALmGEeKQQp7P9cQvNQ"/>
</availablePage>
</pageList>
<sashModel currentSelection="//@sashModel/@windows.0/@children.0">
<windows>
<children xsi:type="di:TabFolder">
<children>
<emfPageIdentifier href="VAR_8_BeT-4791728168.notation#_copSALmGEeKQQp7P9cQvNQ"/>
</children>
</children>
</windows>
</sashModel>
</di:SashWindowsMngr>
|
D
|
/Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/Runtime.build/Utilities/String+Extensions.swift.o : /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Metadata/Metadata.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Metadata/TupleMetadata.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Metadata/ProtocolMetadata.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Metadata/EnumMetadata.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Metadata/FuntionMetadata.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Metadata/ClassMetadata.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Metadata/StructMetadata.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Models/Kind.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Layouts/ValueWitnessTable.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Models/TypeInfoConvertible.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Metadata/MetadataType.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Metadata/NominalMetadataType.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Layouts/MetadataLayoutType.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Models/Case.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Factory/DefaultValue.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Pointers/Union.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Models/TypeInfo.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Models/FunctionInfo.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Models/PropertyInfo.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Layouts/TargetTypeGenericContextDescriptorHeader.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Layouts/ClassHeader.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Layouts/ProtocolTypeContainer.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Layouts/ExistentialContainter.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Pointers/RelativePointer.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Pointers/RelativeVectorPointer.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Pointers/Vector.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Layouts/FieldDescriptor.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Layouts/TypeDescriptor.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Layouts/EnumTypeDescriptor.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Layouts/ClassTypeDescriptor.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Layouts/StructTypeDescriptor.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Layouts/ProtocolDescriptor.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Utilities/String+Extensions.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Utilities/Pointer+Extensions.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Pointers/Pointers.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Utilities/GettersSetters.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Models/Errors.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Utilities/RetainCounts.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Layouts/TupleMetadataLayout.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Layouts/ProtocolMetadataLayout.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Layouts/EnumMetadataLayout.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Layouts/FunctionMetadataLayout.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Layouts/ClassMetadataLayout.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Layouts/StructMetadataLayout.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Factory/Factory.swift /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/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/CRuntime/Sources/CRuntime/CRuntime.h /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/usr/include/mach-o/dyld.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/CNIOSHA1.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/NIOHTTP1.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/NIOHTTP2.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/_Vapor3.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/NIOHPACK.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/FluentSQL.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/GraphQL.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/NIOSSL.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/CNIOBoringSSL.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/CCryptoBoringSSL.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/CJWTKitBoringSSL.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/FCM.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/BSON.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/FineJSON.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/NIO.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/MySQLNIO.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/SQLiteNIO.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/PostgresNIO.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/NIOTLS.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/APNS.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/JWT.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/CNIOExtrasZlib.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/Backtrace.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/CBacktrace.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/ProtocolConformance.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/Runtime.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/OpenCombine.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/ProtocolType.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/MongoKittenCore.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/MongoCore.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/WebSocketInfrastructure.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/ApodiniDatabase.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/ProtobufferCoding.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/Logging.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/Casting.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/OpenCombineDispatch.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/Apodini.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/SQLKitBenchmark.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/FluentBenchmark.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/COperatingSystem.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/MongoKitten.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/CNIODarwin.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/NIOHTTPCompression.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/OpenCombineFoundation.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/SwifCron.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/Crypto.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/_MongoKittenCrypto.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/CURLParser.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/RichJSONParser.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/CNIOHTTPParser.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/CMultipartParser.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/FluentMySQLDriver.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/FluentSQLiteDriver.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/FluentMongoDriver.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/FluentPostgresDriver.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/Vapor.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/XCTVapor.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/AssociatedTypeRequirementsVisitor.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/NIOExtras.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/Jobs.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/CNIOAtomics.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/Metrics.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/CoreMetrics.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/NIOTransportServices.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/NIOTestUtils.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/Yams.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/_NIO1APIShims.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/CNIOBoringSSLShims.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/CCryptoBoringSSLShims.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/Notifications.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/COpenCombineHelpers.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/NIOConcurrencyHelpers.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/ValuePointers.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/NIOFoundationCompat.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/NIOWebSocket.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/APNSwift.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/OpenAPIKit.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/SQLKit.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/MySQLKit.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/JWTKit.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/AsyncKit.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/ConsoleKit.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/SQLiteKit.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/RoutingKit.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/PostgresKit.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/WebSocketKit.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/FluentKit.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/MultipartKit.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/AsyncHTTPClient.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/DNSClient.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/MongoClient.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/Fluent.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/XCTFluent.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/CContext.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/Meow.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/CNIOLinux.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/CRuntime/Sources/CRuntime/module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/usr/include/mach-o/compact_unwind_encoding.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/usr/include/xpc/XPC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.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/MacOSX11.1.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/System/Library/Frameworks/ApplicationServices.framework/Headers/ApplicationServices.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/System/Library/Frameworks/Security.framework/Headers/Security.apinotes
/Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/Runtime.build/Utilities/String+Extensions~partial.swiftmodule : /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Metadata/Metadata.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Metadata/TupleMetadata.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Metadata/ProtocolMetadata.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Metadata/EnumMetadata.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Metadata/FuntionMetadata.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Metadata/ClassMetadata.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Metadata/StructMetadata.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Models/Kind.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Layouts/ValueWitnessTable.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Models/TypeInfoConvertible.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Metadata/MetadataType.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Metadata/NominalMetadataType.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Layouts/MetadataLayoutType.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Models/Case.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Factory/DefaultValue.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Pointers/Union.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Models/TypeInfo.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Models/FunctionInfo.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Models/PropertyInfo.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Layouts/TargetTypeGenericContextDescriptorHeader.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Layouts/ClassHeader.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Layouts/ProtocolTypeContainer.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Layouts/ExistentialContainter.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Pointers/RelativePointer.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Pointers/RelativeVectorPointer.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Pointers/Vector.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Layouts/FieldDescriptor.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Layouts/TypeDescriptor.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Layouts/EnumTypeDescriptor.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Layouts/ClassTypeDescriptor.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Layouts/StructTypeDescriptor.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Layouts/ProtocolDescriptor.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Utilities/String+Extensions.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Utilities/Pointer+Extensions.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Pointers/Pointers.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Utilities/GettersSetters.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Models/Errors.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Utilities/RetainCounts.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Layouts/TupleMetadataLayout.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Layouts/ProtocolMetadataLayout.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Layouts/EnumMetadataLayout.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Layouts/FunctionMetadataLayout.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Layouts/ClassMetadataLayout.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Layouts/StructMetadataLayout.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Factory/Factory.swift /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/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/CRuntime/Sources/CRuntime/CRuntime.h /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/usr/include/mach-o/dyld.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/CNIOSHA1.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/NIOHTTP1.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/NIOHTTP2.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/_Vapor3.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/NIOHPACK.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/FluentSQL.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/GraphQL.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/NIOSSL.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/CNIOBoringSSL.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/CCryptoBoringSSL.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/CJWTKitBoringSSL.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/FCM.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/BSON.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/FineJSON.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/NIO.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/MySQLNIO.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/SQLiteNIO.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/PostgresNIO.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/NIOTLS.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/APNS.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/JWT.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/CNIOExtrasZlib.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/Backtrace.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/CBacktrace.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/ProtocolConformance.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/Runtime.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/OpenCombine.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/ProtocolType.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/MongoKittenCore.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/MongoCore.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/WebSocketInfrastructure.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/ApodiniDatabase.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/ProtobufferCoding.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/Logging.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/Casting.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/OpenCombineDispatch.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/Apodini.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/SQLKitBenchmark.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/FluentBenchmark.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/COperatingSystem.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/MongoKitten.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/CNIODarwin.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/NIOHTTPCompression.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/OpenCombineFoundation.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/SwifCron.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/Crypto.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/_MongoKittenCrypto.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/CURLParser.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/RichJSONParser.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/CNIOHTTPParser.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/CMultipartParser.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/FluentMySQLDriver.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/FluentSQLiteDriver.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/FluentMongoDriver.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/FluentPostgresDriver.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/Vapor.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/XCTVapor.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/AssociatedTypeRequirementsVisitor.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/NIOExtras.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/Jobs.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/CNIOAtomics.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/Metrics.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/CoreMetrics.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/NIOTransportServices.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/NIOTestUtils.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/Yams.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/_NIO1APIShims.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/CNIOBoringSSLShims.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/CCryptoBoringSSLShims.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/Notifications.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/COpenCombineHelpers.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/NIOConcurrencyHelpers.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/ValuePointers.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/NIOFoundationCompat.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/NIOWebSocket.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/APNSwift.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/OpenAPIKit.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/SQLKit.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/MySQLKit.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/JWTKit.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/AsyncKit.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/ConsoleKit.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/SQLiteKit.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/RoutingKit.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/PostgresKit.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/WebSocketKit.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/FluentKit.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/MultipartKit.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/AsyncHTTPClient.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/DNSClient.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/MongoClient.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/Fluent.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/XCTFluent.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/CContext.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/Meow.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/CNIOLinux.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/CRuntime/Sources/CRuntime/module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/usr/include/mach-o/compact_unwind_encoding.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/usr/include/xpc/XPC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.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/MacOSX11.1.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/System/Library/Frameworks/ApplicationServices.framework/Headers/ApplicationServices.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/System/Library/Frameworks/Security.framework/Headers/Security.apinotes
/Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/Runtime.build/Utilities/String+Extensions~partial.swiftdoc : /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Metadata/Metadata.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Metadata/TupleMetadata.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Metadata/ProtocolMetadata.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Metadata/EnumMetadata.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Metadata/FuntionMetadata.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Metadata/ClassMetadata.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Metadata/StructMetadata.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Models/Kind.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Layouts/ValueWitnessTable.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Models/TypeInfoConvertible.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Metadata/MetadataType.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Metadata/NominalMetadataType.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Layouts/MetadataLayoutType.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Models/Case.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Factory/DefaultValue.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Pointers/Union.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Models/TypeInfo.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Models/FunctionInfo.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Models/PropertyInfo.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Layouts/TargetTypeGenericContextDescriptorHeader.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Layouts/ClassHeader.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Layouts/ProtocolTypeContainer.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Layouts/ExistentialContainter.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Pointers/RelativePointer.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Pointers/RelativeVectorPointer.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Pointers/Vector.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Layouts/FieldDescriptor.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Layouts/TypeDescriptor.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Layouts/EnumTypeDescriptor.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Layouts/ClassTypeDescriptor.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Layouts/StructTypeDescriptor.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Layouts/ProtocolDescriptor.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Utilities/String+Extensions.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Utilities/Pointer+Extensions.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Pointers/Pointers.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Utilities/GettersSetters.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Models/Errors.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Utilities/RetainCounts.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Layouts/TupleMetadataLayout.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Layouts/ProtocolMetadataLayout.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Layouts/EnumMetadataLayout.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Layouts/FunctionMetadataLayout.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Layouts/ClassMetadataLayout.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Layouts/StructMetadataLayout.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Factory/Factory.swift /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/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/CRuntime/Sources/CRuntime/CRuntime.h /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/usr/include/mach-o/dyld.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/CNIOSHA1.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/NIOHTTP1.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/NIOHTTP2.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/_Vapor3.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/NIOHPACK.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/FluentSQL.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/GraphQL.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/NIOSSL.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/CNIOBoringSSL.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/CCryptoBoringSSL.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/CJWTKitBoringSSL.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/FCM.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/BSON.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/FineJSON.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/NIO.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/MySQLNIO.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/SQLiteNIO.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/PostgresNIO.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/NIOTLS.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/APNS.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/JWT.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/CNIOExtrasZlib.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/Backtrace.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/CBacktrace.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/ProtocolConformance.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/Runtime.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/OpenCombine.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/ProtocolType.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/MongoKittenCore.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/MongoCore.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/WebSocketInfrastructure.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/ApodiniDatabase.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/ProtobufferCoding.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/Logging.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/Casting.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/OpenCombineDispatch.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/Apodini.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/SQLKitBenchmark.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/FluentBenchmark.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/COperatingSystem.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/MongoKitten.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/CNIODarwin.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/NIOHTTPCompression.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/OpenCombineFoundation.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/SwifCron.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/Crypto.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/_MongoKittenCrypto.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/CURLParser.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/RichJSONParser.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/CNIOHTTPParser.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/CMultipartParser.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/FluentMySQLDriver.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/FluentSQLiteDriver.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/FluentMongoDriver.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/FluentPostgresDriver.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/Vapor.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/XCTVapor.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/AssociatedTypeRequirementsVisitor.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/NIOExtras.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/Jobs.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/CNIOAtomics.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/Metrics.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/CoreMetrics.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/NIOTransportServices.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/NIOTestUtils.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/Yams.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/_NIO1APIShims.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/CNIOBoringSSLShims.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/CCryptoBoringSSLShims.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/Notifications.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/COpenCombineHelpers.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/NIOConcurrencyHelpers.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/ValuePointers.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/NIOFoundationCompat.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/NIOWebSocket.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/APNSwift.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/OpenAPIKit.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/SQLKit.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/MySQLKit.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/JWTKit.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/AsyncKit.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/ConsoleKit.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/SQLiteKit.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/RoutingKit.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/PostgresKit.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/WebSocketKit.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/FluentKit.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/MultipartKit.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/AsyncHTTPClient.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/DNSClient.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/MongoClient.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/Fluent.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/XCTFluent.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/CContext.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/Meow.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/CNIOLinux.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/CRuntime/Sources/CRuntime/module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/usr/include/mach-o/compact_unwind_encoding.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/usr/include/xpc/XPC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.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/MacOSX11.1.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/System/Library/Frameworks/ApplicationServices.framework/Headers/ApplicationServices.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/System/Library/Frameworks/Security.framework/Headers/Security.apinotes
/Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/Runtime.build/Utilities/String+Extensions~partial.swiftsourceinfo : /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Metadata/Metadata.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Metadata/TupleMetadata.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Metadata/ProtocolMetadata.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Metadata/EnumMetadata.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Metadata/FuntionMetadata.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Metadata/ClassMetadata.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Metadata/StructMetadata.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Models/Kind.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Layouts/ValueWitnessTable.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Models/TypeInfoConvertible.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Metadata/MetadataType.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Metadata/NominalMetadataType.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Layouts/MetadataLayoutType.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Models/Case.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Factory/DefaultValue.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Pointers/Union.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Models/TypeInfo.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Models/FunctionInfo.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Models/PropertyInfo.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Layouts/TargetTypeGenericContextDescriptorHeader.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Layouts/ClassHeader.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Layouts/ProtocolTypeContainer.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Layouts/ExistentialContainter.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Pointers/RelativePointer.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Pointers/RelativeVectorPointer.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Pointers/Vector.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Layouts/FieldDescriptor.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Layouts/TypeDescriptor.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Layouts/EnumTypeDescriptor.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Layouts/ClassTypeDescriptor.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Layouts/StructTypeDescriptor.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Layouts/ProtocolDescriptor.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Utilities/String+Extensions.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Utilities/Pointer+Extensions.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Pointers/Pointers.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Utilities/GettersSetters.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Models/Errors.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Utilities/RetainCounts.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Layouts/TupleMetadataLayout.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Layouts/ProtocolMetadataLayout.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Layouts/EnumMetadataLayout.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Layouts/FunctionMetadataLayout.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Layouts/ClassMetadataLayout.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Layouts/StructMetadataLayout.swift /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/Runtime/Sources/Runtime/Factory/Factory.swift /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/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/CRuntime/Sources/CRuntime/CRuntime.h /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/usr/include/mach-o/dyld.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/CNIOSHA1.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/NIOHTTP1.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/NIOHTTP2.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/_Vapor3.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/NIOHPACK.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/FluentSQL.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/GraphQL.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/NIOSSL.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/CNIOBoringSSL.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/CCryptoBoringSSL.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/CJWTKitBoringSSL.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/FCM.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/BSON.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/FineJSON.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/NIO.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/MySQLNIO.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/SQLiteNIO.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/PostgresNIO.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/NIOTLS.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/APNS.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/JWT.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/CNIOExtrasZlib.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/Backtrace.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/CBacktrace.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/ProtocolConformance.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/Runtime.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/OpenCombine.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/ProtocolType.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/MongoKittenCore.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/MongoCore.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/WebSocketInfrastructure.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/ApodiniDatabase.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/ProtobufferCoding.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/Logging.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/Casting.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/OpenCombineDispatch.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/Apodini.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/SQLKitBenchmark.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/FluentBenchmark.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/COperatingSystem.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/MongoKitten.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/CNIODarwin.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/NIOHTTPCompression.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/OpenCombineFoundation.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/SwifCron.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/Crypto.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/_MongoKittenCrypto.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/CURLParser.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/RichJSONParser.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/CNIOHTTPParser.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/CMultipartParser.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/FluentMySQLDriver.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/FluentSQLiteDriver.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/FluentMongoDriver.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/FluentPostgresDriver.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/Vapor.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/XCTVapor.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/AssociatedTypeRequirementsVisitor.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/NIOExtras.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/Jobs.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/CNIOAtomics.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/Metrics.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/CoreMetrics.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/NIOTransportServices.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/NIOTestUtils.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/Yams.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/_NIO1APIShims.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/CNIOBoringSSLShims.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/CCryptoBoringSSLShims.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/Notifications.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/COpenCombineHelpers.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/NIOConcurrencyHelpers.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/ValuePointers.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/NIOFoundationCompat.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/NIOWebSocket.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/APNSwift.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/OpenAPIKit.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/SQLKit.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/MySQLKit.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/JWTKit.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/AsyncKit.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/ConsoleKit.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/SQLiteKit.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/RoutingKit.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/PostgresKit.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/WebSocketKit.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/FluentKit.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/MultipartKit.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/AsyncHTTPClient.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/DNSClient.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/MongoClient.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/Fluent.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/XCTFluent.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/CContext.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/Meow.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/x86_64-apple-macosx/debug/CNIOLinux.build/module.modulemap /Users/sadikekinozbay/Documents/TUM/WS-2/Swift/Apodini-Example-Project/.build/checkouts/CRuntime/Sources/CRuntime/module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/usr/include/mach-o/compact_unwind_encoding.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/usr/include/xpc/XPC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.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/MacOSX11.1.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/System/Library/Frameworks/ApplicationServices.framework/Headers/ApplicationServices.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/System/Library/Frameworks/Security.framework/Headers/Security.apinotes
|
D
|
module UnrealScript.Engine.ParticleModuleMeshRotationRate;
import ScriptClasses;
import UnrealScript.Helpers;
import UnrealScript.Engine.ParticleModuleRotationRateBase;
import UnrealScript.Core.DistributionVector;
extern(C++) interface ParticleModuleMeshRotationRate : ParticleModuleRotationRateBase
{
public extern(D):
private static __gshared ScriptClass mStaticClass;
@property final static ScriptClass StaticClass() { mixin(MGSCC("Class Engine.ParticleModuleMeshRotationRate")); }
private static __gshared ParticleModuleMeshRotationRate mDefaultProperties;
@property final static ParticleModuleMeshRotationRate DefaultProperties() { mixin(MGDPC("ParticleModuleMeshRotationRate", "ParticleModuleMeshRotationRate Engine.Default__ParticleModuleMeshRotationRate")); }
@property final auto ref DistributionVector.RawDistributionVector StartRotationRate() { mixin(MGPC("DistributionVector.RawDistributionVector", 72)); }
}
|
D
|
///////////////////////////////////////////////////////////////////////
// Info EXIT
///////////////////////////////////////////////////////////////////////
INSTANCE DIA_Lee_DI_EXIT (C_INFO)
{
npc = SLD_800_Lee_DI;
nr = 999;
condition = DIA_Lee_DI_EXIT_Condition;
information = DIA_Lee_DI_EXIT_Info;
permanent = TRUE;
description = DIALOG_ENDE;
};
FUNC INT DIA_Lee_DI_EXIT_Condition()
{
return TRUE;
};
FUNC VOID DIA_Lee_DI_EXIT_Info()
{
AI_StopProcessInfos (self);
};
///////////////////////////////////////////////////////////////////////
// Info Hallo
///////////////////////////////////////////////////////////////////////
instance DIA_Lee_DI_Hallo (C_INFO)
{
npc = SLD_800_Lee_DI;
nr = 2;
condition = DIA_Lee_DI_Hallo_Condition;
information = DIA_Lee_DI_Hallo_Info;
description = "Co za práci si vezmeš?";
};
func int DIA_Lee_DI_Hallo_Condition ()
{
if (Npc_IsDead(UndeadDragon) == FALSE)
{
return TRUE;
};
};
func void DIA_Lee_DI_Hallo_Info ()
{
AI_Output (other, self, "DIA_Lee_DI_Hallo_15_00"); //Co za práci si vezmeš?
AI_Output (self, other, "DIA_Lee_DI_Hallo_04_01"); //Nękdo musí na loë dohlížet. Zůstanu tady a postarám se o to, aby tady zůstala, až se vrátíš.
};
///////////////////////////////////////////////////////////////////////
// Info PERM6
///////////////////////////////////////////////////////////////////////
instance DIA_Lee_DI_PERM6 (C_INFO)
{
npc = SLD_800_Lee_DI;
nr = 2;
condition = DIA_Lee_DI_PERM6_Condition;
information = DIA_Lee_DI_PERM6_Info;
permanent = TRUE;
description = "Co moje loë?";
};
func int DIA_Lee_DI_PERM6_Condition ()
{
if (Npc_KnowsInfo(other, DIA_Lee_DI_Hallo))
&& (Npc_IsDead(UndeadDragon) == FALSE)
{
return TRUE;
};
};
func void DIA_Lee_DI_PERM6_Info ()
{
AI_Output (other, self, "DIA_Lee_DI_PERM6_15_00"); //Co moje loë?
if (ORkSturmDI == FALSE)
{
AI_Output (self, other, "DIA_Lee_DI_PERM6_04_01"); //Neboj se. Mám všechno pod kontrolou.
}
else
{
AI_Output (self, other, "DIA_Lee_DI_PERM6_04_02"); //Všechno je v poâádku. Jen aă se ti mizerní skâeti vrátí. Uštędâím jim další výprask.
};
AI_StopProcessInfos (self);
};
//**************************************
// Ich will trainieren
//**************************************
INSTANCE DIA_Lee_DI_Teach(C_INFO)
{
npc = SLD_800_Lee_DI;
nr = 10;
condition = DIA_Lee_DI_Teach_Condition;
information = DIA_Lee_DI_Teach_Info;
permanent = TRUE;
description = "Potâebuji se vycvičit.";
};
FUNC INT DIA_Lee_DI_Teach_Condition()
{
if (Npc_IsDead(UndeadDragon) == FALSE)
{
return TRUE;
};
};
FUNC VOID DIA_Lee_DI_Teach_Info()
{
AI_Output (other,self ,"DIA_Lee_DI_Teach_15_00"); //Potâebuji se vycvičit.
AI_Output (self,other ,"DIA_Lee_DI_Teach_04_01"); //V čem pâesnę se chceš zlepšit?
Info_ClearChoices (DIA_Lee_DI_Teach);
Info_AddChoice (DIA_Lee_DI_Teach, DIALOG_BACK ,DIA_Lee_DI_Teach_Back);
Info_AddChoice (DIA_Lee_DI_Teach, B_BuildLearnString(PRINT_Learn2h1, B_GetLearnCostTalent(other, NPC_TALENT_2H, 1)) ,DIA_Lee_DI_Teach_2H_1);
Info_AddChoice (DIA_Lee_DI_Teach, B_BuildLearnString(PRINT_Learn2h5, B_GetLearnCostTalent(other, NPC_TALENT_2H, 5)) ,DIA_Lee_DI_Teach_2H_5);
Info_AddChoice (DIA_Lee_DI_Teach, B_BuildLearnString(PRINT_Learn1h1, B_GetLearnCostTalent(other, NPC_TALENT_1H, 1)) ,DIA_Lee_DI_Teach_1H_1);
Info_AddChoice (DIA_Lee_DI_Teach, B_BuildLearnString(PRINT_Learn1h5, B_GetLearnCostTalent(other, NPC_TALENT_1H, 5)) ,DIA_Lee_DI_Teach_1H_5);
};
FUNC VOID DIA_Lee_DI_Teach_1H_1 ()
{
if (B_TeachFightTalentPercent (self, other, NPC_TALENT_1H, 1, 100))
{
AI_Output (self ,other,"DIA_Lee_DI_Teach_1H_1_04_00"); //Tvoje obrana je strašná, ale bude to muset stačit.
};
Info_ClearChoices (DIA_Lee_DI_Teach);
Info_AddChoice (DIA_Lee_DI_Teach, DIALOG_BACK ,DIA_Lee_DI_Teach_Back);
Info_AddChoice (DIA_Lee_DI_Teach, B_BuildLearnString(PRINT_Learn2h1, B_GetLearnCostTalent(other, NPC_TALENT_2H, 1)) ,DIA_Lee_DI_Teach_2H_1);
Info_AddChoice (DIA_Lee_DI_Teach, B_BuildLearnString(PRINT_Learn2h5, B_GetLearnCostTalent(other, NPC_TALENT_2H, 5)) ,DIA_Lee_DI_Teach_2H_5);
Info_AddChoice (DIA_Lee_DI_Teach, B_BuildLearnString(PRINT_Learn1h1, B_GetLearnCostTalent(other, NPC_TALENT_1H, 1)) ,DIA_Lee_DI_Teach_1H_1);
Info_AddChoice (DIA_Lee_DI_Teach, B_BuildLearnString(PRINT_Learn1h5, B_GetLearnCostTalent(other, NPC_TALENT_1H, 5)) ,DIA_Lee_DI_Teach_1H_5);
};
FUNC VOID DIA_Lee_DI_Teach_1H_5 ()
{
if (B_TeachFightTalentPercent (self, other, NPC_TALENT_1H, 5, 100))
{
AI_Output (self ,other,"DIA_Lee_DI_Teach_1H_5_04_00"); //Máš moc tuhá zápęstí. Zbraŕ musíš držet volnęji.
};
Info_ClearChoices (DIA_Lee_DI_Teach);
Info_AddChoice (DIA_Lee_DI_Teach, DIALOG_BACK ,DIA_Lee_DI_Teach_Back);
Info_AddChoice (DIA_Lee_DI_Teach, B_BuildLearnString(PRINT_Learn2h1, B_GetLearnCostTalent(other, NPC_TALENT_2H, 1)) ,DIA_Lee_DI_Teach_2H_1);
Info_AddChoice (DIA_Lee_DI_Teach, B_BuildLearnString(PRINT_Learn2h5, B_GetLearnCostTalent(other, NPC_TALENT_2H, 5)) ,DIA_Lee_DI_Teach_2H_5);
Info_AddChoice (DIA_Lee_DI_Teach, B_BuildLearnString(PRINT_Learn1h1, B_GetLearnCostTalent(other, NPC_TALENT_1H, 1)) ,DIA_Lee_DI_Teach_1H_1);
Info_AddChoice (DIA_Lee_DI_Teach, B_BuildLearnString(PRINT_Learn1h5, B_GetLearnCostTalent(other, NPC_TALENT_1H, 5)) ,DIA_Lee_DI_Teach_1H_5);
};
FUNC VOID DIA_Lee_DI_Teach_2H_1 ()
{
if (B_TeachFightTalentPercent (self, other, NPC_TALENT_2H, 1, 100))
{
AI_Output(self,other,"DIA_DIA_Lee_DI_Teach_2H_1_04_00"); //Vždycky męj na pamęti, že švih vychází z boků, ne ze zápęstí.
};
Info_ClearChoices (DIA_Lee_DI_Teach);
Info_AddChoice (DIA_Lee_DI_Teach, DIALOG_BACK ,DIA_Lee_DI_Teach_Back);
Info_AddChoice (DIA_Lee_DI_Teach, B_BuildLearnString(PRINT_Learn2h1 , B_GetLearnCostTalent(other, NPC_TALENT_2H, 1)) ,DIA_Lee_DI_Teach_2H_1);
Info_AddChoice (DIA_Lee_DI_Teach, B_BuildLearnString(PRINT_Learn2h5 , B_GetLearnCostTalent(other, NPC_TALENT_2H, 5)) ,DIA_Lee_DI_Teach_2H_5);
Info_AddChoice (DIA_Lee_DI_Teach, B_BuildLearnString(PRINT_Learn1h1 , B_GetLearnCostTalent(other, NPC_TALENT_1H, 1)) ,DIA_Lee_DI_Teach_1H_1);
Info_AddChoice (DIA_Lee_DI_Teach, B_BuildLearnString(PRINT_Learn1h5 , B_GetLearnCostTalent(other, NPC_TALENT_1H, 5)) ,DIA_Lee_DI_Teach_1H_5);
};
FUNC VOID DIA_Lee_DI_Teach_2H_5 ()
{
if (B_TeachFightTalentPercent (self, other, NPC_TALENT_2H, 5, 100))
{
AI_Output(self,other,"DIA_Lee_DI_Teach_2H_5_04_00"); //I ten nejsilnęjší výpad je k ničemu, když nic nezasáhne. Svou sílu tedy používej s rozvahou.
};
Info_ClearChoices (DIA_Lee_DI_Teach);
Info_AddChoice (DIA_Lee_DI_Teach, DIALOG_BACK ,DIA_Lee_DI_Teach_Back);
Info_AddChoice (DIA_Lee_DI_Teach, B_BuildLearnString(PRINT_Learn2h1 , B_GetLearnCostTalent(other, NPC_TALENT_2H, 1)) ,DIA_Lee_DI_Teach_2H_1);
Info_AddChoice (DIA_Lee_DI_Teach, B_BuildLearnString(PRINT_Learn2h5, B_GetLearnCostTalent(other, NPC_TALENT_2H, 5)) ,DIA_Lee_DI_Teach_2H_5);
Info_AddChoice (DIA_Lee_DI_Teach, B_BuildLearnString(PRINT_Learn1h1 , B_GetLearnCostTalent(other, NPC_TALENT_1H, 1)) ,DIA_Lee_DI_Teach_1H_1);
Info_AddChoice (DIA_Lee_DI_Teach, B_BuildLearnString(PRINT_Learn1h5 , B_GetLearnCostTalent(other, NPC_TALENT_1H, 5)) ,DIA_Lee_DI_Teach_1H_5);
};
FUNC VOID DIA_Lee_DI_Teach_Back ()
{
Info_ClearChoices (DIA_Lee_DI_Teach);
};
///////////////////////////////////////////////////////////////////////
// Info UndeadDragonDead
///////////////////////////////////////////////////////////////////////
instance DIA_Lee_DI_UndeadDragonDead (C_INFO)
{
npc = SLD_800_Lee_DI;
nr = 2;
condition = DIA_Lee_DI_UndeadDragonDead_Condition;
information = DIA_Lee_DI_UndeadDragonDead_Info;
permanent = TRUE;
description = "Můžeme vyrazit. Nepâítel je mrtvý.";
};
func int DIA_Lee_DI_UndeadDragonDead_Condition ()
{
if (Npc_IsDead(UndeadDragon))
{
return TRUE;
};
};
var int DIA_Lee_DI_UndeadDragonDead_OneTime;
func void DIA_Lee_DI_UndeadDragonDead_Info ()
{
AI_Output (other ,self, "DIA_Lee_DI_UndeadDragonDead_15_00"); //Můžeme vyrazit. Nepâítel je mrtvý.
AI_Output (self ,other, "DIA_Lee_DI_UndeadDragonDead_04_01"); //Výbornę. V tom pâípadę âekni kapitánovi, aă zvedne kotvy.
if (DIA_Lee_DI_UndeadDragonDead_OneTime == FALSE)
&& (hero.guild == GIL_DJG)
{
AI_Output (self ,other, "DIA_Lee_DI_UndeadDragonDead_04_02"); //Vezmeš mę na pevninu, že?
AI_Output (other ,self, "DIA_Lee_DI_UndeadDragonDead_15_03"); //Ano. Khorinis to bez tebe zvládne.
//AI_Output (self ,other, "DIA_Lee_DI_UndeadDragonDead_04_04"); //Dann kann ich dem König endlich meine lang ersehnte Aufwartung machen. Er ist schon zu lange vor mir davon gelaufen.
AI_Output (self ,other, "DIA_Lee_Add_04_26"); //A pak se konečnę půjdu podívat na Krále.
AI_Output (self ,other, "DIA_Lee_Add_04_27"); //Na tuhle chvíli jsem čekal strašnę dlouho.
AI_Output (self ,other, "DIA_Lee_DI_UndeadDragonDead_04_05"); //Co myslíš? Nemęla by být trpęlivost nakonec odmęnęna?
AI_Output (other ,self, "DIA_Lee_DI_UndeadDragonDead_15_06"); //Trpęlivost a pár pádných argumentů.
AI_Output (self ,other, "DIA_Lee_DI_UndeadDragonDead_04_07"); //(zasmęje se) Jo. Bez trochy hrubé síly by to nešlo. Byla čest jít do bitvy po tvém boku.
DIA_Lee_DI_UndeadDragonDead_OneTime = TRUE;
};
AI_Output (self ,other, "DIA_Lee_DI_UndeadDragonDead_04_08"); //Snad se po tomhle dobrodružství naše cesty zase nękdy zkâíží.
AI_StopProcessInfos (self);
Npc_ExchangeRoutine (self,"Start");
};
// ************************************************************
// PICK POCKET
// ************************************************************
INSTANCE DIA_Lee_DI_PICKPOCKET (C_INFO)
{
npc = SLD_800_Lee_DI;
nr = 900;
condition = DIA_Lee_DI_PICKPOCKET_Condition;
information = DIA_Lee_DI_PICKPOCKET_Info;
permanent = TRUE;
description = Pickpocket_120;
};
FUNC INT DIA_Lee_DI_PICKPOCKET_Condition()
{
C_Beklauen (110, 570);
};
FUNC VOID DIA_Lee_DI_PICKPOCKET_Info()
{
Info_ClearChoices (DIA_Lee_DI_PICKPOCKET);
Info_AddChoice (DIA_Lee_DI_PICKPOCKET, DIALOG_BACK ,DIA_Lee_DI_PICKPOCKET_BACK);
Info_AddChoice (DIA_Lee_DI_PICKPOCKET, DIALOG_PICKPOCKET ,DIA_Lee_DI_PICKPOCKET_DoIt);
};
func void DIA_Lee_DI_PICKPOCKET_DoIt()
{
B_Beklauen ();
Info_ClearChoices (DIA_Lee_DI_PICKPOCKET);
};
func void DIA_Lee_DI_PICKPOCKET_BACK()
{
Info_ClearChoices (DIA_Lee_DI_PICKPOCKET);
};
|
D
|
//Written in the D programming language
/*
Regular expression pattern parser.
*/
module std.regex.internal.parser;
import std.regex.internal.ir;
import std.range.primitives, std.uni, std.meta,
std.traits, std.typecons, std.exception;
static import std.ascii;
// package relevant info from parser into a regex object
auto makeRegex(S, CG)(Parser!(S, CG) p)
{
Regex!(BasicElementOf!S) re;
auto g = p.g;
with(re)
{
ir = g.ir;
dict = g.dict;
ngroup = g.ngroup;
maxCounterDepth = g.counterDepth;
flags = p.re_flags;
charsets = g.charsets;
matchers = g.matchers;
backrefed = g.backrefed;
re.postprocess();
debug(std_regex_parser)
{
__ctfe || print();
}
//@@@BUG@@@ (not reduced)
//somehow just using validate _collides_ with std.utf.validate (!)
version(assert) re.validateRe();
}
return re;
}
// helper for unittest
auto makeRegex(S)(S arg)
if (isSomeString!S)
{
return makeRegex(Parser!(S, CodeGen)(arg, ""));
}
@system unittest
{
import std.algorithm.comparison : equal;
auto re = makeRegex(`(?P<name>\w+) = (?P<var>\d+)`);
auto nc = re.namedCaptures;
static assert(isRandomAccessRange!(typeof(nc)));
assert(!nc.empty);
assert(nc.length == 2);
assert(nc.equal(["name", "var"]));
assert(nc[0] == "name");
assert(nc[1..$].equal(["var"]));
re = makeRegex(`(\w+) (?P<named>\w+) (\w+)`);
nc = re.namedCaptures;
assert(nc.length == 1);
assert(nc[0] == "named");
assert(nc.front == "named");
assert(nc.back == "named");
re = makeRegex(`(\w+) (\w+)`);
nc = re.namedCaptures;
assert(nc.empty);
re = makeRegex(`(?P<year>\d{4})/(?P<month>\d{2})/(?P<day>\d{2})/`);
nc = re.namedCaptures;
auto cp = nc.save;
assert(nc.equal(cp));
nc.popFront();
assert(nc.equal(cp[1..$]));
nc.popBack();
assert(nc.equal(cp[1 .. $ - 1]));
}
@trusted void reverseBytecode()(Bytecode[] code)
{
Bytecode[] rev = new Bytecode[code.length];
uint revPc = cast(uint) rev.length;
Stack!(Tuple!(uint, uint, uint)) stack;
uint start = 0;
uint end = cast(uint) code.length;
for (;;)
{
for (uint pc = start; pc < end; )
{
immutable len = code[pc].length;
if (code[pc].code == IR.GotoEndOr)
break; //pick next alternation branch
if (code[pc].isAtom)
{
rev[revPc - len .. revPc] = code[pc .. pc + len];
revPc -= len;
pc += len;
}
else if (code[pc].isStart || code[pc].isEnd)
{
//skip over other embedded lookbehinds they are reversed
if (code[pc].code == IR.LookbehindStart
|| code[pc].code == IR.NeglookbehindStart)
{
immutable blockLen = len + code[pc].data
+ code[pc].pairedLength;
rev[revPc - blockLen .. revPc] = code[pc .. pc + blockLen];
pc += blockLen;
revPc -= blockLen;
continue;
}
immutable second = code[pc].indexOfPair(pc);
immutable secLen = code[second].length;
rev[revPc - secLen .. revPc] = code[second .. second + secLen];
revPc -= secLen;
if (code[pc].code == IR.OrStart)
{
//we pass len bytes forward, but secLen in reverse
immutable revStart = revPc - (second + len - secLen - pc);
uint r = revStart;
uint i = pc + IRL!(IR.OrStart);
while (code[i].code == IR.Option)
{
if (code[i - 1].code != IR.OrStart)
{
assert(code[i - 1].code == IR.GotoEndOr);
rev[r - 1] = code[i - 1];
}
rev[r] = code[i];
auto newStart = i + IRL!(IR.Option);
auto newEnd = newStart + code[i].data;
auto newRpc = r + code[i].data + IRL!(IR.Option);
if (code[newEnd].code != IR.OrEnd)
{
newRpc--;
}
stack.push(tuple(newStart, newEnd, newRpc));
r += code[i].data + IRL!(IR.Option);
i += code[i].data + IRL!(IR.Option);
}
pc = i;
revPc = revStart;
assert(code[pc].code == IR.OrEnd);
}
else
pc += len;
}
}
if (stack.empty)
break;
start = stack.top[0];
end = stack.top[1];
revPc = stack.top[2];
stack.pop();
}
code[] = rev[];
}
//test if a given string starts with hex number of maxDigit that's a valid codepoint
//returns it's value and skips these maxDigit chars on success, throws on failure
dchar parseUniHex(Char)(ref Char[] str, size_t maxDigit)
{
//std.conv.parse is both @system and bogus
enforce(str.length >= maxDigit,"incomplete escape sequence");
uint val;
for (int k = 0; k < maxDigit; k++)
{
immutable current = str[k];//accepts ascii only, so it's OK to index directly
if ('0' <= current && current <= '9')
val = val * 16 + current - '0';
else if ('a' <= current && current <= 'f')
val = val * 16 + current -'a' + 10;
else if ('A' <= current && current <= 'F')
val = val * 16 + current - 'A' + 10;
else
throw new Exception("invalid escape sequence");
}
enforce(val <= 0x10FFFF, "invalid codepoint");
str = str[maxDigit..$];
return val;
}
@system unittest //BUG canFind is system
{
import std.algorithm.searching : canFind;
string[] non_hex = [ "000j", "000z", "FffG", "0Z"];
string[] hex = [ "01", "ff", "00af", "10FFFF" ];
int[] value = [ 1, 0xFF, 0xAF, 0x10FFFF ];
foreach (v; non_hex)
assert(collectException(parseUniHex(v, v.length)).msg
.canFind("invalid escape sequence"));
foreach (i, v; hex)
assert(parseUniHex(v, v.length) == value[i]);
string over = "0011FFFF";
assert(collectException(parseUniHex(over, over.length)).msg
.canFind("invalid codepoint"));
}
auto caseEnclose(CodepointSet set)
{
auto cased = set & unicode.LC;
foreach (dchar ch; cased.byCodepoint)
{
foreach (c; simpleCaseFoldings(ch))
set |= c;
}
return set;
}
/+
fetch codepoint set corresponding to a name (InBlock or binary property)
+/
@trusted CodepointSet getUnicodeSet(in char[] name, bool negated, bool casefold)
{
CodepointSet s = unicode(name);
//FIXME: caseEnclose for new uni as Set | CaseEnclose(SET && LC)
if (casefold)
s = caseEnclose(s);
if (negated)
s = s.inverted;
return s;
}
//basic stack, just in case it gets used anywhere else then Parser
@trusted struct Stack(T)
{
T[] data;
@property bool empty(){ return data.empty; }
@property size_t length(){ return data.length; }
void push(T val){ data ~= val; }
T pop()
{
assert(!empty);
auto val = data[$ - 1];
data = data[0 .. $ - 1];
if (!__ctfe)
cast(void) data.assumeSafeAppend();
return val;
}
@property ref T top()
{
assert(!empty);
return data[$ - 1];
}
}
struct CodeGen
{
Bytecode[] ir; // resulting bytecode
Stack!(uint) fixupStack; // stack of opened start instructions
NamedGroup[] dict; // maps name -> user group number
Stack!(uint) groupStack; // stack of current number of group
uint nesting = 0; // group nesting level and repetitions step
uint lookaroundNest = 0; // nesting of lookaround
uint counterDepth = 0; // current depth of nested counted repetitions
CodepointSet[] charsets; // sets for char classes
const(CharMatcher)[] matchers; // matchers for char classes
uint[] backrefed; // bitarray for groups refered by backref
uint ngroup; // final number of groups (of all patterns)
void start(uint length)
{
if (!__ctfe)
ir.reserve((length*5+2)/4);
fixupStack.push(0);
groupStack.push(1);//0 - whole match
}
//mark referenced groups for latter processing
void markBackref(uint n)
{
if (n/32 >= backrefed.length)
backrefed.length = n/32 + 1;
backrefed[n / 32] |= 1 << (n & 31);
}
bool isOpenGroup(uint n)
{
import std.algorithm.searching : canFind;
// walk the fixup stack and see if there are groups labeled 'n'
// fixup '0' is reserved for alternations
return fixupStack.data[1..$].
canFind!(fix => ir[fix].code == IR.GroupStart && ir[fix].data == n)();
}
void put(Bytecode code)
{
enforce(ir.length < maxCompiledLength,
"maximum compiled pattern length is exceeded");
ir ~= code;
}
void putRaw(uint number)
{
enforce(ir.length < maxCompiledLength,
"maximum compiled pattern length is exceeded");
ir ~= Bytecode.fromRaw(number);
}
//try to generate optimal IR code for this CodepointSet
@trusted void charsetToIr(CodepointSet set)
{//@@@BUG@@@ writeln is @system
uint chars = cast(uint) set.length;
if (chars < Bytecode.maxSequence)
{
switch (chars)
{
case 1:
put(Bytecode(IR.Char, set.byCodepoint.front));
break;
case 0:
throw new RegexException("empty CodepointSet not allowed");
default:
foreach (ch; set.byCodepoint)
put(Bytecode(IR.OrChar, ch, chars));
}
}
else
{
import std.algorithm.searching : countUntil;
const ivals = set.byInterval;
immutable n = charsets.countUntil(set);
if (n >= 0)
{
if (ivals.length*2 > maxCharsetUsed)
put(Bytecode(IR.Trie, cast(uint) n));
else
put(Bytecode(IR.CodepointSet, cast(uint) n));
return;
}
if (ivals.length*2 > maxCharsetUsed)
{
auto t = getMatcher(set);
put(Bytecode(IR.Trie, cast(uint) matchers.length));
matchers ~= t;
debug(std_regex_allocation) writeln("Trie generated");
}
else
{
put(Bytecode(IR.CodepointSet, cast(uint) charsets.length));
matchers ~= CharMatcher.init;
}
charsets ~= set;
assert(charsets.length == matchers.length);
}
}
void genLogicGroup()
{
nesting++;
pushFixup(length);
put(Bytecode(IR.Nop, 0));
}
void genGroup()
{
nesting++;
pushFixup(length);
immutable nglob = groupStack.top++;
enforce(groupStack.top <= maxGroupNumber, "limit on number of submatches is exceeded");
put(Bytecode(IR.GroupStart, nglob));
}
void genNamedGroup(string name)
{
import std.array : insertInPlace;
import std.range : assumeSorted;
nesting++;
pushFixup(length);
immutable nglob = groupStack.top++;
enforce(groupStack.top <= maxGroupNumber, "limit on submatches is exceeded");
auto t = NamedGroup(name, nglob);
auto d = assumeSorted!"a.name < b.name"(dict);
immutable ind = d.lowerBound(t).length;
insertInPlace(dict, ind, t);
put(Bytecode(IR.GroupStart, nglob));
}
//generate code for start of lookaround: (?= (?! (?<= (?<!
void genLookaround(IR opcode)
{
nesting++;
pushFixup(length);
put(Bytecode(opcode, 0));
put(Bytecode.fromRaw(0));
put(Bytecode.fromRaw(0));
groupStack.push(0);
lookaroundNest++;
enforce(lookaroundNest <= maxLookaroundDepth,
"maximum lookaround depth is exceeded");
}
void endPattern(uint num)
{
import std.algorithm.comparison : max;
put(Bytecode(IR.End, num));
ngroup = max(ngroup, groupStack.top);
groupStack.top = 1; // reset group counter
}
//fixup lookaround with start at offset fix and append a proper *-End opcode
void fixLookaround(uint fix)
{
lookaroundNest--;
ir[fix] = Bytecode(ir[fix].code,
cast(uint) ir.length - fix - IRL!(IR.LookaheadStart));
auto g = groupStack.pop();
assert(!groupStack.empty);
ir[fix+1] = Bytecode.fromRaw(groupStack.top);
//groups are cumulative across lookarounds
ir[fix+2] = Bytecode.fromRaw(groupStack.top+g);
groupStack.top += g;
if (ir[fix].code == IR.LookbehindStart || ir[fix].code == IR.NeglookbehindStart)
{
reverseBytecode(ir[fix + IRL!(IR.LookbehindStart) .. $]);
}
put(ir[fix].paired);
}
// repetition of {1,1}
void fixRepetition(uint offset)
{
import std.algorithm.mutation : copy;
immutable replace = ir[offset].code == IR.Nop;
if (replace)
{
copy(ir[offset + 1 .. $], ir[offset .. $ - 1]);
ir.length -= 1;
}
}
// repetition of {x,y}
void fixRepetition(uint offset, uint min, uint max, bool greedy)
{
static import std.algorithm.comparison;
import std.algorithm.mutation : copy;
import std.array : insertInPlace;
immutable replace = ir[offset].code == IR.Nop;
immutable len = cast(uint) ir.length - offset - replace;
if (max != infinite)
{
if (min != 1 || max != 1)
{
Bytecode op = Bytecode(greedy ? IR.RepeatStart : IR.RepeatQStart, len);
if (replace)
ir[offset] = op;
else
insertInPlace(ir, offset, op);
put(Bytecode(greedy ? IR.RepeatEnd : IR.RepeatQEnd, len));
put(Bytecode.init); //hotspot
putRaw(1);
putRaw(min);
putRaw(max);
counterDepth = std.algorithm.comparison.max(counterDepth, nesting+1);
}
}
else if (min) //&& max is infinite
{
if (min != 1)
{
Bytecode op = Bytecode(greedy ? IR.RepeatStart : IR.RepeatQStart, len);
if (replace)
ir[offset] = op;
else
insertInPlace(ir, offset, op);
offset += 1;//so it still points to the repeated block
put(Bytecode(greedy ? IR.RepeatEnd : IR.RepeatQEnd, len));
put(Bytecode.init); //hotspot
putRaw(1);
putRaw(min);
putRaw(min);
counterDepth = std.algorithm.comparison.max(counterDepth, nesting+1);
}
else if (replace)
{
copy(ir[offset+1 .. $], ir[offset .. $-1]);
ir.length -= 1;
}
put(Bytecode(greedy ? IR.InfiniteStart : IR.InfiniteQStart, len));
enforce(ir.length + len < maxCompiledLength, "maximum compiled pattern length is exceeded");
ir ~= ir[offset .. offset+len];
//IR.InfinteX is always a hotspot
put(Bytecode(greedy ? IR.InfiniteEnd : IR.InfiniteQEnd, len));
put(Bytecode.init); //merge index
}
else//vanila {0,inf}
{
Bytecode op = Bytecode(greedy ? IR.InfiniteStart : IR.InfiniteQStart, len);
if (replace)
ir[offset] = op;
else
insertInPlace(ir, offset, op);
//IR.InfinteX is always a hotspot
put(Bytecode(greedy ? IR.InfiniteEnd : IR.InfiniteQEnd, len));
put(Bytecode.init); //merge index
}
}
void fixAlternation()
{
import std.array : insertInPlace;
uint fix = fixupStack.top;
if (ir.length > fix && ir[fix].code == IR.Option)
{
ir[fix] = Bytecode(ir[fix].code, cast(uint) ir.length - fix);
put(Bytecode(IR.GotoEndOr, 0));
fixupStack.top = cast(uint) ir.length; //replace latest fixup for Option
put(Bytecode(IR.Option, 0));
return;
}
uint len, orStart;
//start a new option
if (fixupStack.length == 1)
{//only root entry, effectively no fixup
len = cast(uint) ir.length + IRL!(IR.GotoEndOr);
orStart = 0;
}
else
{//IR.lookahead, etc. fixups that have length > 1, thus check ir[x].length
len = cast(uint) ir.length - fix - (ir[fix].length - 1);
orStart = fix + ir[fix].length;
}
insertInPlace(ir, orStart, Bytecode(IR.OrStart, 0), Bytecode(IR.Option, len));
assert(ir[orStart].code == IR.OrStart);
put(Bytecode(IR.GotoEndOr, 0));
fixupStack.push(orStart); //fixup for StartOR
fixupStack.push(cast(uint) ir.length); //for second Option
put(Bytecode(IR.Option, 0));
}
// finalizes IR.Option, fix points to the first option of sequence
void finishAlternation(uint fix)
{
enforce(ir[fix].code == IR.Option, "no matching ')'");
ir[fix] = Bytecode(ir[fix].code, cast(uint) ir.length - fix - IRL!(IR.OrStart));
fix = fixupStack.pop();
enforce(ir[fix].code == IR.OrStart, "no matching ')'");
ir[fix] = Bytecode(IR.OrStart, cast(uint) ir.length - fix - IRL!(IR.OrStart));
put(Bytecode(IR.OrEnd, cast(uint) ir.length - fix - IRL!(IR.OrStart)));
uint pc = fix + IRL!(IR.OrStart);
while (ir[pc].code == IR.Option)
{
pc = pc + ir[pc].data;
if (ir[pc].code != IR.GotoEndOr)
break;
ir[pc] = Bytecode(IR.GotoEndOr, cast(uint)(ir.length - pc - IRL!(IR.OrEnd)));
pc += IRL!(IR.GotoEndOr);
}
put(Bytecode.fromRaw(0));
}
// returns: (flag - repetition possible?, fixup of the start of this "group")
Tuple!(bool, uint) onClose()
{
nesting--;
uint fix = popFixup();
switch (ir[fix].code)
{
case IR.GroupStart:
put(Bytecode(IR.GroupEnd, ir[fix].data));
return tuple(true, fix);
case IR.LookaheadStart, IR.NeglookaheadStart, IR.LookbehindStart, IR.NeglookbehindStart:
assert(lookaroundNest);
fixLookaround(fix);
return tuple(false, 0u);
case IR.Option: //| xxx )
//two fixups: last option + full OR
finishAlternation(fix);
fix = topFixup;
switch (ir[fix].code)
{
case IR.GroupStart:
popFixup();
put(Bytecode(IR.GroupEnd, ir[fix].data));
return tuple(true, fix);
case IR.LookaheadStart, IR.NeglookaheadStart, IR.LookbehindStart, IR.NeglookbehindStart:
assert(lookaroundNest);
fix = popFixup();
fixLookaround(fix);
return tuple(false, 0u);
default://(?:xxx)
popFixup();
return tuple(true, fix);
}
default://(?:xxx)
return tuple(true, fix);
}
}
uint popFixup(){ return fixupStack.pop(); }
void pushFixup(uint val){ return fixupStack.push(val); }
@property uint topFixup(){ return fixupStack.top; }
@property size_t fixupLength(){ return fixupStack.data.length; }
@property uint length(){ return cast(uint) ir.length; }
}
// safety limits
enum maxGroupNumber = 2^^19;
enum maxLookaroundDepth = 16;
// *Bytecode.sizeof, i.e. 1Mb of bytecode alone
enum maxCompiledLength = 2^^18;
// amounts to up to 4 Mb of auxilary table for matching
enum maxCumulativeRepetitionLength = 2^^20;
// marker to indicate infinite repetition
enum infinite = ~0u;
struct Parser(R, Generator)
if (isForwardRange!R && is(ElementType!R : dchar))
{
dchar _current;
bool empty;
R pat, origin; //keep full pattern for pretty printing error messages
uint re_flags = 0; //global flags e.g. multiline + internal ones
Generator g;
@trusted this(S)(R pattern, S flags)
if (isSomeString!S)
{
pat = origin = pattern;
//reserve slightly more then avg as sampled from unittests
parseFlags(flags);
_current = ' ';//a safe default for freeform parsing
next();
g.start(cast(uint) pat.length);
try
{
parseRegex();
}
catch (Exception e)
{
error(e.msg);//also adds pattern location
}
g.endPattern(1);
}
@property dchar current(){ return _current; }
bool _next()
{
if (pat.empty)
{
empty = true;
return false;
}
_current = pat.front;
pat.popFront();
return true;
}
void skipSpace()
{
while (isWhite(current) && _next()){ }
}
bool next()
{
if (re_flags & RegexOption.freeform)
{
immutable r = _next();
skipSpace();
return r;
}
else
return _next();
}
//parsing number with basic overflow check
uint parseDecimal()
{
uint r = 0;
while (std.ascii.isDigit(current))
{
if (r >= (uint.max/10))
error("Overflow in decimal number");
r = 10*r + cast(uint)(current-'0');
if (!next())
break;
}
return r;
}
//parse control code of form \cXXX, c assumed to be the current symbol
dchar parseControlCode()
{
enforce(next(), "Unfinished escape sequence");
enforce(('a' <= current && current <= 'z') || ('A' <= current && current <= 'Z'),
"Only letters are allowed after \\c");
return current & 0x1f;
}
//
@trusted void parseFlags(S)(S flags)
{//@@@BUG@@@ text is @system
import std.conv : text;
foreach (ch; flags)//flags are ASCII anyway
{
L_FlagSwitch:
switch (ch)
{
foreach (i, op; __traits(allMembers, RegexOption))
{
case RegexOptionNames[i]:
if (re_flags & mixin("RegexOption."~op))
throw new RegexException(text("redundant flag specified: ",ch));
re_flags |= mixin("RegexOption."~op);
break L_FlagSwitch;
}
default:
throw new RegexException(text("unknown regex flag '",ch,"'"));
}
}
}
//parse and store IR for regex pattern
@trusted void parseRegex()
{
uint fix;//fixup pointer
while (!empty)
{
debug(std_regex_parser)
__ctfe || writeln("*LR*\nSource: ", pat, "\nStack: ",fixupStack.data);
switch (current)
{
case '(':
next();
if (current == '?')
{
next();
switch (current)
{
case '#':
for (;;)
{
if (!next())
error("Unexpected end of pattern");
if (current == ')')
{
next();
break;
}
}
break;
case ':':
g.genLogicGroup();
next();
break;
case '=':
g.genLookaround(IR.LookaheadStart);
next();
break;
case '!':
g.genLookaround(IR.NeglookaheadStart);
next();
break;
case 'P':
next();
if (current != '<')
error("Expected '<' in named group");
string name;
if (!next() || !(isAlpha(current) || current == '_'))
error("Expected alpha starting a named group");
name ~= current;
while (next() && (isAlpha(current) ||
current == '_' || std.ascii.isDigit(current)))
{
name ~= current;
}
if (current != '>')
error("Expected '>' closing named group");
next();
g.genNamedGroup(name);
break;
case '<':
next();
if (current == '=')
g.genLookaround(IR.LookbehindStart);
else if (current == '!')
g.genLookaround(IR.NeglookbehindStart);
else
error("'!' or '=' expected after '<'");
next();
break;
default:
uint enableFlags, disableFlags;
bool enable = true;
do
{
switch (current)
{
case 's':
if (enable)
enableFlags |= RegexOption.singleline;
else
disableFlags |= RegexOption.singleline;
break;
case 'x':
if (enable)
enableFlags |= RegexOption.freeform;
else
disableFlags |= RegexOption.freeform;
break;
case 'i':
if (enable)
enableFlags |= RegexOption.casefold;
else
disableFlags |= RegexOption.casefold;
break;
case 'm':
if (enable)
enableFlags |= RegexOption.multiline;
else
disableFlags |= RegexOption.multiline;
break;
case '-':
if (!enable)
error(" unexpected second '-' in flags");
enable = false;
break;
default:
error(" 's', 'x', 'i', 'm' or '-' expected after '(?' ");
}
next();
}while (current != ')');
next();
re_flags |= enableFlags;
re_flags &= ~disableFlags;
}
}
else
{
g.genGroup();
}
break;
case ')':
enforce(g.nesting, "Unmatched ')'");
next();
auto pair = g.onClose();
if (pair[0])
parseQuantifier(pair[1]);
break;
case '|':
next();
g.fixAlternation();
break;
default://no groups or whatever
immutable start = g.length;
parseAtom();
parseQuantifier(start);
}
}
if (g.fixupLength != 1)
{
fix = g.popFixup();
g.finishAlternation(fix);
enforce(g.fixupLength == 1, "no matching ')'");
}
}
//parse and store IR for atom-quantifier pair
@trusted void parseQuantifier(uint offset)
{//copy is @system
if (empty)
return g.fixRepetition(offset);
uint min, max;
switch (current)
{
case '*':
min = 0;
max = infinite;
break;
case '?':
min = 0;
max = 1;
break;
case '+':
min = 1;
max = infinite;
break;
case '{':
enforce(next(), "Unexpected end of regex pattern");
enforce(std.ascii.isDigit(current), "First number required in repetition");
min = parseDecimal();
if (current == '}')
max = min;
else if (current == ',')
{
next();
if (std.ascii.isDigit(current))
max = parseDecimal();
else if (current == '}')
max = infinite;
else
error("Unexpected symbol in regex pattern");
skipSpace();
if (current != '}')
error("Unmatched '{' in regex pattern");
}
else
error("Unexpected symbol in regex pattern");
if (min > max)
error("Illegal {n,m} quantifier");
break;
default:
g.fixRepetition(offset);
return;
}
bool greedy = true;
//check only if we managed to get new symbol
if (next() && current == '?')
{
greedy = false;
next();
}
g.fixRepetition(offset, min, max, greedy);
}
//parse and store IR for atom
void parseAtom()
{
if (empty)
return;
switch (current)
{
case '*', '?', '+', '|', '{', '}':
error("'*', '+', '?', '{', '}' not allowed in atom");
break;
case '.':
if (re_flags & RegexOption.singleline)
g.put(Bytecode(IR.Any, 0));
else
{
CodepointSet set;
g.charsetToIr(set.add('\n','\n'+1).add('\r', '\r'+1).inverted);
}
next();
break;
case '[':
parseCharset();
break;
case '\\':
enforce(_next(), "Unfinished escape sequence");
parseEscape();
break;
case '^':
if (re_flags & RegexOption.multiline)
g.put(Bytecode(IR.Bol, 0));
else
g.put(Bytecode(IR.Bof, 0));
next();
break;
case '$':
if (re_flags & RegexOption.multiline)
g.put(Bytecode(IR.Eol, 0));
else
g.put(Bytecode(IR.Eof, 0));
next();
break;
default:
//FIXME: getCommonCasing in new std uni
if (re_flags & RegexOption.casefold)
{
auto range = simpleCaseFoldings(current);
assert(range.length <= 5);
if (range.length == 1)
g.put(Bytecode(IR.Char, range.front));
else
foreach (v; range)
g.put(Bytecode(IR.OrChar, v, cast(uint) range.length));
}
else
g.put(Bytecode(IR.Char, current));
next();
}
}
//CodepointSet operations relatively in order of priority
enum Operator:uint {
Open = 0, Negate, Difference, SymDifference, Intersection, Union, None
}
//parse unit of CodepointSet spec, most notably escape sequences and char ranges
//also fetches next set operation
Tuple!(CodepointSet,Operator) parseCharTerm()
{
enum State{ Start, Char, Escape, CharDash, CharDashEscape,
PotentialTwinSymbolOperator }
Operator op = Operator.None;
dchar last;
CodepointSet set;
State state = State.Start;
static void addWithFlags(ref CodepointSet set, uint ch, uint re_flags)
{
if (re_flags & RegexOption.casefold)
{
auto range = simpleCaseFoldings(ch);
foreach (v; range)
set |= v;
}
else
set |= ch;
}
static Operator twinSymbolOperator(dchar symbol)
{
switch (symbol)
{
case '|':
return Operator.Union;
case '-':
return Operator.Difference;
case '~':
return Operator.SymDifference;
case '&':
return Operator.Intersection;
default:
assert(false);
}
}
L_CharTermLoop:
for (;;)
{
final switch (state)
{
case State.Start:
switch (current)
{
case '|':
case '-':
case '~':
case '&':
state = State.PotentialTwinSymbolOperator;
last = current;
break;
case '[':
op = Operator.Union;
goto case;
case ']':
break L_CharTermLoop;
case '\\':
state = State.Escape;
break;
default:
state = State.Char;
last = current;
}
break;
case State.Char:
// xxx last current xxx
switch (current)
{
case '|':
case '~':
case '&':
// then last is treated as normal char and added as implicit union
state = State.PotentialTwinSymbolOperator;
addWithFlags(set, last, re_flags);
last = current;
break;
case '-': // still need more info
state = State.CharDash;
break;
case '\\':
set |= last;
state = State.Escape;
break;
case '[':
op = Operator.Union;
goto case;
case ']':
addWithFlags(set, last, re_flags);
break L_CharTermLoop;
default:
state = State.Char;
addWithFlags(set, last, re_flags);
last = current;
}
break;
case State.PotentialTwinSymbolOperator:
// xxx last current xxxx
// where last = [|-&~]
if (current == last)
{
op = twinSymbolOperator(last);
next();//skip second twin char
break L_CharTermLoop;
}
goto case State.Char;
case State.Escape:
// xxx \ current xxx
switch (current)
{
case 'f':
last = '\f';
state = State.Char;
break;
case 'n':
last = '\n';
state = State.Char;
break;
case 'r':
last = '\r';
state = State.Char;
break;
case 't':
last = '\t';
state = State.Char;
break;
case 'v':
last = '\v';
state = State.Char;
break;
case 'c':
last = parseControlCode();
state = State.Char;
break;
foreach (val; Escapables)
{
case val:
}
last = current;
state = State.Char;
break;
case 'p':
set.add(parseUnicodePropertySpec(false));
state = State.Start;
continue L_CharTermLoop; //next char already fetched
case 'P':
set.add(parseUnicodePropertySpec(true));
state = State.Start;
continue L_CharTermLoop; //next char already fetched
case 'x':
last = parseUniHex(pat, 2);
state = State.Char;
break;
case 'u':
last = parseUniHex(pat, 4);
state = State.Char;
break;
case 'U':
last = parseUniHex(pat, 8);
state = State.Char;
break;
case 'd':
set.add(unicode.Nd);
state = State.Start;
break;
case 'D':
set.add(unicode.Nd.inverted);
state = State.Start;
break;
case 's':
set.add(unicode.White_Space);
state = State.Start;
break;
case 'S':
set.add(unicode.White_Space.inverted);
state = State.Start;
break;
case 'w':
set.add(wordCharacter);
state = State.Start;
break;
case 'W':
set.add(wordCharacter.inverted);
state = State.Start;
break;
default:
enforce(false, "invalid escape sequence");
}
break;
case State.CharDash:
// xxx last - current xxx
switch (current)
{
case '[':
op = Operator.Union;
goto case;
case ']':
//means dash is a single char not an interval specifier
addWithFlags(set, last, re_flags);
addWithFlags(set, '-', re_flags);
break L_CharTermLoop;
case '-'://set Difference again
addWithFlags(set, last, re_flags);
op = Operator.Difference;
next();//skip '-'
break L_CharTermLoop;
case '\\':
state = State.CharDashEscape;
break;
default:
enforce(last <= current, "inverted range");
if (re_flags & RegexOption.casefold)
{
for (uint ch = last; ch <= current; ch++)
addWithFlags(set, ch, re_flags);
}
else
set.add(last, current + 1);
state = State.Start;
}
break;
case State.CharDashEscape:
//xxx last - \ current xxx
uint end;
switch (current)
{
case 'f':
end = '\f';
break;
case 'n':
end = '\n';
break;
case 'r':
end = '\r';
break;
case 't':
end = '\t';
break;
case 'v':
end = '\v';
break;
foreach (val; Escapables)
{
case val:
}
end = current;
break;
case 'c':
end = parseControlCode();
break;
case 'x':
end = parseUniHex(pat, 2);
break;
case 'u':
end = parseUniHex(pat, 4);
break;
case 'U':
end = parseUniHex(pat, 8);
break;
default:
error("invalid escape sequence");
}
enforce(last <= end,"inverted range");
set.add(last, end + 1);
state = State.Start;
break;
}
enforce(next(), "unexpected end of CodepointSet");
}
return tuple(set, op);
}
alias ValStack = Stack!(CodepointSet);
alias OpStack = Stack!(Operator);
//parse and store IR for CodepointSet
void parseCharset()
{
const save = re_flags;
re_flags &= ~RegexOption.freeform; // stop ignoring whitespace if we did
parseCharsetImpl();
re_flags = save;
}
void parseCharsetImpl()
{
ValStack vstack;
OpStack opstack;
import std.functional : unaryFun;
//
static bool apply(Operator op, ref ValStack stack)
{
switch (op)
{
case Operator.Negate:
stack.top = stack.top.inverted;
break;
case Operator.Union:
auto s = stack.pop();//2nd operand
enforce(!stack.empty, "no operand for '||'");
stack.top.add(s);
break;
case Operator.Difference:
auto s = stack.pop();//2nd operand
enforce(!stack.empty, "no operand for '--'");
stack.top.sub(s);
break;
case Operator.SymDifference:
auto s = stack.pop();//2nd operand
enforce(!stack.empty, "no operand for '~~'");
stack.top ~= s;
break;
case Operator.Intersection:
auto s = stack.pop();//2nd operand
enforce(!stack.empty, "no operand for '&&'");
stack.top.intersect(s);
break;
default:
return false;
}
return true;
}
static bool unrollWhile(alias cond)(ref ValStack vstack, ref OpStack opstack)
{
while (cond(opstack.top))
{
if (!apply(opstack.pop(),vstack))
return false;//syntax error
if (opstack.empty)
return false;
}
return true;
}
L_CharsetLoop:
do
{
switch (current)
{
case '[':
opstack.push(Operator.Open);
enforce(next(), "unexpected end of character class");
if (current == '^')
{
opstack.push(Operator.Negate);
enforce(next(), "unexpected end of character class");
}
else if (current == ']') // []...] is special cased
{
enforce(next(), "wrong character set");
auto pair = parseCharTerm();
pair[0].add(']', ']'+1);
if (pair[1] != Operator.None)
{
if (opstack.top == Operator.Union)
unrollWhile!(unaryFun!"a == a.Union")(vstack, opstack);
opstack.push(pair[1]);
}
vstack.push(pair[0]);
}
break;
case ']':
enforce(unrollWhile!(unaryFun!"a != a.Open")(vstack, opstack),
"character class syntax error");
enforce(!opstack.empty, "unmatched ']'");
opstack.pop();
next();
if (opstack.empty)
break L_CharsetLoop;
auto pair = parseCharTerm();
if (!pair[0].empty)//not only operator e.g. -- or ~~
{
vstack.top.add(pair[0]);//apply union
}
if (pair[1] != Operator.None)
{
if (opstack.top == Operator.Union)
unrollWhile!(unaryFun!"a == a.Union")(vstack, opstack);
opstack.push(pair[1]);
}
break;
//
default://yet another pair of term(op)?
auto pair = parseCharTerm();
if (pair[1] != Operator.None)
{
if (opstack.top == Operator.Union)
unrollWhile!(unaryFun!"a == a.Union")(vstack, opstack);
opstack.push(pair[1]);
}
vstack.push(pair[0]);
}
}while (!empty || !opstack.empty);
while (!opstack.empty)
apply(opstack.pop(),vstack);
assert(vstack.length == 1);
g.charsetToIr(vstack.top);
}
//parse and generate IR for escape stand alone escape sequence
@trusted void parseEscape()
{//accesses array of appender
import std.algorithm.iteration : sum;
switch (current)
{
case 'f': next(); g.put(Bytecode(IR.Char, '\f')); break;
case 'n': next(); g.put(Bytecode(IR.Char, '\n')); break;
case 'r': next(); g.put(Bytecode(IR.Char, '\r')); break;
case 't': next(); g.put(Bytecode(IR.Char, '\t')); break;
case 'v': next(); g.put(Bytecode(IR.Char, '\v')); break;
case 'd':
next();
g.charsetToIr(unicode.Nd);
break;
case 'D':
next();
g.charsetToIr(unicode.Nd.inverted);
break;
case 'b': next(); g.put(Bytecode(IR.Wordboundary, 0)); break;
case 'B': next(); g.put(Bytecode(IR.Notwordboundary, 0)); break;
case 's':
next();
g.charsetToIr(unicode.White_Space);
break;
case 'S':
next();
g.charsetToIr(unicode.White_Space.inverted);
break;
case 'w':
next();
g.charsetToIr(wordCharacter);
break;
case 'W':
next();
g.charsetToIr(wordCharacter.inverted);
break;
case 'p': case 'P':
auto CodepointSet = parseUnicodePropertySpec(current == 'P');
g.charsetToIr(CodepointSet);
break;
case 'x':
immutable code = parseUniHex(pat, 2);
next();
g.put(Bytecode(IR.Char,code));
break;
case 'u': case 'U':
immutable code = parseUniHex(pat, current == 'u' ? 4 : 8);
next();
g.put(Bytecode(IR.Char, code));
break;
case 'c': //control codes
Bytecode code = Bytecode(IR.Char, parseControlCode());
next();
g.put(code);
break;
case '0':
next();
g.put(Bytecode(IR.Char, 0));//NUL character
break;
case '1': .. case '9':
uint nref = cast(uint) current - '0';
immutable maxBackref = sum(g.groupStack.data);
enforce(nref < maxBackref, "Backref to unseen group");
//perl's disambiguation rule i.e.
//get next digit only if there is such group number
while (nref < maxBackref && next() && std.ascii.isDigit(current))
{
nref = nref * 10 + current - '0';
}
if (nref >= maxBackref)
nref /= 10;
enforce(!g.isOpenGroup(nref), "Backref to open group");
uint localLimit = maxBackref - g.groupStack.top;
if (nref >= localLimit)
{
g.put(Bytecode(IR.Backref, nref-localLimit));
g.ir[$-1].setLocalRef();
}
else
g.put(Bytecode(IR.Backref, nref));
g.markBackref(nref);
break;
default:
if (current >= privateUseStart && current <= privateUseEnd)
{
g.endPattern(current - privateUseStart + 1);
break;
}
auto op = Bytecode(IR.Char, current);
next();
g.put(op);
}
}
//parse and return a CodepointSet for \p{...Property...} and \P{...Property..},
//\ - assumed to be processed, p - is current
CodepointSet parseUnicodePropertySpec(bool negated)
{
enum MAX_PROPERTY = 128;
char[MAX_PROPERTY] result;
uint k = 0;
enforce(next(), "eof parsing unicode property spec");
if (current == '{')
{
while (k < MAX_PROPERTY && next() && current !='}' && current !=':')
if (current != '-' && current != ' ' && current != '_')
result[k++] = cast(char) std.ascii.toLower(current);
enforce(k != MAX_PROPERTY, "invalid property name");
enforce(current == '}', "} expected ");
}
else
{//single char properties e.g.: \pL, \pN ...
enforce(current < 0x80, "invalid property name");
result[k++] = cast(char) current;
}
auto s = getUnicodeSet(result[0 .. k], negated,
cast(bool)(re_flags & RegexOption.casefold));
enforce(!s.empty, "unrecognized unicode property spec");
next();
return s;
}
//
@trusted void error(string msg)
{
import std.array : appender;
import std.format : formattedWrite;
auto app = appender!string();
formattedWrite(app, "%s\nPattern with error: `%s` <--HERE-- `%s`",
msg, origin[0..$-pat.length], pat);
throw new RegexException(app.data);
}
alias Char = BasicElementOf!R;
@property program()
{
return makeRegex(this);
}
}
/+
Postproces the IR, then optimize.
+/
@trusted void postprocess(Char)(ref Regex!Char zis)
{//@@@BUG@@@ write is @system
with(zis)
{
struct FixedStack(T)
{
T[] arr;
uint _top;
//this(T[] storage){ arr = storage; _top = -1; }
@property ref T top(){ assert(!empty); return arr[_top]; }
void push(T x){ arr[++_top] = x; }
T pop() { assert(!empty); return arr[_top--]; }
@property bool empty(){ return _top == -1; }
}
auto counterRange = FixedStack!uint(new uint[maxCounterDepth+1], -1);
counterRange.push(1);
ulong cumRange = 0;
for (uint i = 0; i < ir.length; i += ir[i].length)
{
if (ir[i].hotspot)
{
assert(i + 1 < ir.length,
"unexpected end of IR while looking for hotspot");
ir[i+1] = Bytecode.fromRaw(hotspotTableSize);
hotspotTableSize += counterRange.top;
}
switch (ir[i].code)
{
case IR.RepeatStart, IR.RepeatQStart:
uint repEnd = cast(uint)(i + ir[i].data + IRL!(IR.RepeatStart));
assert(ir[repEnd].code == ir[i].paired.code);
immutable max = ir[repEnd + 4].raw;
ir[repEnd+2].raw = counterRange.top;
ir[repEnd+3].raw *= counterRange.top;
ir[repEnd+4].raw *= counterRange.top;
ulong cntRange = cast(ulong)(max)*counterRange.top;
cumRange += cntRange;
enforce(cumRange < maxCumulativeRepetitionLength,
"repetition length limit is exceeded");
counterRange.push(cast(uint) cntRange + counterRange.top);
threadCount += counterRange.top;
break;
case IR.RepeatEnd, IR.RepeatQEnd:
threadCount += counterRange.top;
counterRange.pop();
break;
case IR.GroupStart:
if (isBackref(ir[i].data))
ir[i].setBackrefence();
threadCount += counterRange.top;
break;
case IR.GroupEnd:
if (isBackref(ir[i].data))
ir[i].setBackrefence();
threadCount += counterRange.top;
break;
default:
threadCount += counterRange.top;
}
}
checkIfOneShot();
if (!(flags & RegexInfo.oneShot))
kickstart = Kickstart!Char(zis, new uint[](256));
debug(std_regex_allocation) writefln("IR processed, max threads: %d", threadCount);
optimize(zis);
}
}
void fixupBytecode()(Bytecode[] ir)
{
Stack!uint fixups;
with(IR) for (uint i=0; i<ir.length; i+= ir[i].length)
{
if (ir[i].isStart || ir[i].code == Option)
fixups.push(i);
else if (ir[i].code == OrEnd)
{
// Alternatives need more care
auto j = fixups.pop(); // last Option
ir[j].data = i - j - ir[j].length;
j = fixups.pop(); // OrStart
ir[j].data = i - j - ir[j].length;
ir[i].data = ir[j].data;
// fixup all GotoEndOrs
j = j + IRL!(OrStart);
assert(ir[j].code == Option);
for (;;)
{
auto next = j + ir[j].data + IRL!(Option);
if (ir[next].code == IR.OrEnd)
break;
ir[next - IRL!(GotoEndOr)].data = i - next;
j = next;
}
}
else if (ir[i].code == GotoEndOr)
{
auto j = fixups.pop(); // Option
ir[j].data = i - j + IRL!(GotoEndOr)- IRL!(Option); // to the next option
}
else if (ir[i].isEnd)
{
auto j = fixups.pop();
ir[i].data = i - j - ir[j].length;
ir[j].data = ir[i].data;
}
}
assert(fixups.empty);
}
void optimize(Char)(ref Regex!Char zis)
{
import std.array : insertInPlace;
CodepointSet nextSet(uint idx)
{
CodepointSet set;
with(zis) with(IR)
Outer:
for (uint i = idx; i < ir.length; i += ir[i].length)
{
switch (ir[i].code)
{
case Char:
set.add(ir[i].data, ir[i].data+1);
goto default;
//TODO: OrChar
case Trie, CodepointSet:
set = zis.charsets[ir[i].data];
goto default;
case GroupStart,GroupEnd:
break;
default:
break Outer;
}
}
return set;
}
with(zis) with(IR) for (uint i = 0; i < ir.length; i += ir[i].length)
{
if (ir[i].code == InfiniteEnd)
{
auto set = nextSet(i+IRL!(InfiniteEnd));
if (!set.empty && set.length < 10_000)
{
ir[i] = Bytecode(InfiniteBloomEnd, ir[i].data);
ir[i - ir[i].data - IRL!(InfiniteStart)] =
Bytecode(InfiniteBloomStart, ir[i].data);
ir.insertInPlace(i+IRL!(InfiniteEnd),
Bytecode.fromRaw(cast(uint) zis.filters.length));
zis.filters ~= BitTable(set);
fixupBytecode(ir);
}
}
}
}
//IR code validator - proper nesting, illegal instructions, etc.
@trusted void validateRe(Char)(ref Regex!Char zis)
{//@@@BUG@@@ text is @system
import std.conv : text;
with(zis)
{
for (uint pc = 0; pc < ir.length; pc += ir[pc].length)
{
if (ir[pc].isStart || ir[pc].isEnd)
{
immutable dest = ir[pc].indexOfPair(pc);
assert(dest < ir.length, text("Wrong length in opcode at pc=",
pc, " ", dest, " vs ", ir.length));
assert(ir[dest].paired == ir[pc],
text("Wrong pairing of opcodes at pc=", pc, "and pc=", dest));
}
else if (ir[pc].isAtom)
{
}
else
assert(0, text("Unknown type of instruction at pc=", pc));
}
}
}
|
D
|
// Written in the D programming language.
/**
* This test program pulls in all the library modules in order to run the unit
* tests on them. Then, it prints out the arguments passed to main().
*
* Copyright: Copyright Digital Mars 2000 - 2009.
* License: <a href="http://www.boost.org/LICENSE_1_0.txt">Boost License 1.0</a>.
* Authors: $(WEB digitalmars.com, Walter Bright)
*
* Copyright Digital Mars 2000 - 2009.
* Distributed under the Boost Software License, Version 1.0.
* (See accompanying file LICENSE_1_0.txt or copy at
* http://www.boost.org/LICENSE_1_0.txt)
*/
public import std.base64;
public import std.compiler;
public import std.concurrency;
public import std.conv;
public import std.cstream;
public import std.datetime;
public import std.demangle;
public import std.file;
public import std.format;
public import std.getopt;
public import std.math;
public import std.mathspecial;
public import std.metastrings;
public import std.mmfile;
public import std.outbuffer;
public import std.parallelism;
public import std.path;
public import std.process;
public import std.random;
public import std.regex;
public import std.signals;
//public import std.slist;
public import std.socket;
public import std.socketstream;
public import std.stdint;
public import std.stdio;
public import std.stream;
public import std.string;
public import std.syserror;
public import std.system;
public import std.traits;
public import std.typetuple;
public import std.uni;
public import std.uri;
public import std.utf;
public import std.uuid;
public import std.variant;
public import std.zip;
public import std.zlib;
public import std.net.isemail;
public import std.net.curl;
public import std.digest.digest;
public import std.digest.crc;
public import std.digest.sha;
public import std.digest.md;
int main(char[][] args)
{
// Bring in unit test for module by referencing function in it
cmp("foo", "bar"); // string
const fcc = filenameCharCmp('a', 'b'); // path
const inn = isNaN(1.0); // math
std.conv.to!double("1.0"); // std.conv
OutBuffer b = new OutBuffer(); // outbuffer
auto r = regex(""); // regex
uint ranseed = std.random.unpredictableSeed;
thisTid;
int a[];
a.reverse; // adi
a.sort; // qsort
Clock.currTime(); // datetime
Exception e = new ReadException(""); // stream
din.eof(); // cstream
const ivd = isValidDchar(cast(dchar)0); // utf
std.uri.ascii2hex(0); // uri
std.zlib.adler32(0,null); // D.zlib
auto t = task!cmp("foo", "bar"); // parallelism
creal c = 3.0 + 4.0i;
c = sqrt(c);
assert(c.re == 2);
assert(c.im == 1);
printf("args.length = %d\n", args.length);
for (int i = 0; i < args.length; i++)
printf("args[%d] = '%s'\n", i, cast(char *)args[i]);
int[3] x;
x[0] = 3;
x[1] = 45;
x[2] = -1;
x.sort;
assert(x[0] == -1);
assert(x[1] == 3);
assert(x[2] == 45);
const sin3 = std.math.sin(3.0);
std.mathspecial.gamma(6.2);
std.demangle.demangle("hello");
const iaa = std.uni.isAlpha('A');
std.file.exists("foo");
foreach_reverse (dchar d; "hello"c) { }
foreach_reverse (k, dchar d; "hello"c) { }
std.signals.linkin();
bool isEmail = std.net.isemail.isEmail("abc");
auto http = std.net.curl.HTTP("dlang.org");
auto uuid = randomUUID();
auto md5 = md5Of("hello");
auto sha1 = sha1Of("hello");
auto crc = crc32Of("hello");
auto string = toHexString(crc);
puts("Success!");
return 0;
}
|
D
|
// ---------------------------------------------------------
// NPC 'PAL_1030_Auxiliary'
// ---------------------------------------------------------
instance PAL_1030_Auxiliary (C_NPC)
{
//-------- primary data --------
name = Name_Auxiliary;
guild = GIL_PALADIN;
npctype = NPCTYPE_GUARD;
level = 10;
voice = 7;
id = 1030;
//-------- attributes ----------
attribute [ATR_STRENGTH] = 60;
attribute [ATR_DEXTERITY] = 60;
attribute [ATR_MANA_MAX] = 0;
attribute [ATR_MANA] = 0;
attribute [ATR_HITPOINTS_MAX] = 200;
attribute [ATR_HITPOINTS] = 200;
attribute [ATR_REGENERATEMANA] = 0;
attribute [ATR_REGENERATEHP] = 0;
//-------- protection ----------
protection [PROT_EDGE] = 0;
protection [PROT_BLUNT] = 0;
protection [PROT_POINT] = 0;
protection [PROT_FIRE] = 0;
protection [PROT_MAGIC] = 0;
protection [PROT_FALL] = 0;
protection [PROT_FLY] = 0;
protection [PROT_BARRIER] = 0;
//-------- visuals -------------
Mdl_SetVisual (self, "humans.mds"); // basic animation file
Mdl_ApplyOverlayMds (self, "humans_militia.mds"); // overlay animation file
Mdl_SetVisualBody (self, "hum_body_naked0", 0, 1, "hum_head_fighter", 51, 2, PALL_ARMOR);
B_Scale (self); //auto-matching scale with strength
Mdl_SetModelFatness (self, 0);
//-------- talents -------------
Npc_SetTalentSkill (self, NPC_TALENT_1H, 1);
//-------- inventory -----------
EquipItem (self, ItMw_AuxiliaryMace);
//-------- ai ------------------
fight_tactic = FAI_HUMAN_STRONG;
daily_routine = Rtn_start_1030;
senses_range = 2000;
senses = SENSE_HEAR | SENSE_SEE;
};
// ---------------------------------------------------------
// daily routines
// ---------------------------------------------------------
func void Rtn_start_1030 ()
{
TA_GuardPassage (08, 00, 20, 00, "VP_GUARD_4");
TA_GuardPassage (20, 00, 08, 00, "VP_GUARD_4");
};
|
D
|
int main() {
double d1;
double d2;
int i1;
int i2;
bool b1;
bool b2;
double rd;
int ri;
ri = -2;
rd = -3.0;
d1 = 1.5741691;
d2 = -0.1245714;
i1 = ReadInteger();
i2 = ReadInteger();
ri = ri + (i1 % i2) * (i2 % i1);
rd = rd + itod((i1 * i2) % (btoi(i1 == i2) * 2 + 2)) * itod(ri) * d1;
i1 = ReadInteger();
i2 = ReadInteger();
ri = ri + (i1 % i2) * (i2 % i1);
rd = rd + itod((i1 * i2) % (btoi(i1 == i2) * 2 + 2)) * itod(ri) * d2;
i1 = ReadInteger();
i2 = ReadInteger();
ri = ri + (i1 % i2) * (i2 % i1);
rd = rd + itod((i1 * i2) % (btoi(i1 == i2) * 2 + 2)) * itod(ri) * d1;
i1 = ReadInteger();
i2 = ReadInteger();
ri = ri + (i1 % i2) * (i2 % i1);
rd = rd + itod((i1 * i2) % (btoi(i1 == i2) * 2 + 2)) * itod(ri) * d2;
i1 = ReadInteger();
i2 = ReadInteger();
ri = ri + (i1 % i2) * (i2 % i1);
rd = rd + itod((i1 * i2) % (btoi(i1 == i2) * 2 + 2)) * itod(ri) * d1;
i1 = ReadInteger();
i2 = ReadInteger();
ri = ri + (i1 % i2) * (i2 % i1);
rd = rd + itod((i1 * i2) % (btoi(i1 == i2) * 2 + 2)) * itod(ri) * d2;
Print(rd);
}
|
D
|
/Users/ryanstenberg/Desktop/School/CS\ M117/m117/CS_M117/DerivedData/CS_M117/Build/Intermediates/CS_M117.build/Debug-iphonesimulator/CS_M117.build/Objects-normal/x86_64/InitialViewController.o : /Users/ryanstenberg/Desktop/School/CS\ M117/m117/CS_M117/CS_M117/AppDelegate.swift /Users/ryanstenberg/Desktop/School/CS\ M117/m117/CS_M117/CS_M117/GameViewController.swift /Users/ryanstenberg/Desktop/School/CS\ M117/m117/CS_M117/CS_M117/InitialViewController.swift /Users/ryanstenberg/Desktop/School/CS\ M117/m117/CS_M117/CS_M117/InitialNavigationViewController.swift /Users/ryanstenberg/Desktop/School/CS\ M117/m117/CS_M117/CS_M117/GlobalVariables.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/ObjectiveC.apinotesc /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreData.apinotesc /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.apinotesc /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Foundation.apinotesc /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreGraphics.apinotesc /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/UIKit.apinotesc /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreText.apinotesc /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/ObjectiveC.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreData.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreImage.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/QuartzCore.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreGraphics.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/UIKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/SwiftOnoneSupport.swiftmodule
/Users/ryanstenberg/Desktop/School/CS\ M117/m117/CS_M117/DerivedData/CS_M117/Build/Intermediates/CS_M117.build/Debug-iphonesimulator/CS_M117.build/Objects-normal/x86_64/InitialViewController~partial.swiftmodule : /Users/ryanstenberg/Desktop/School/CS\ M117/m117/CS_M117/CS_M117/AppDelegate.swift /Users/ryanstenberg/Desktop/School/CS\ M117/m117/CS_M117/CS_M117/GameViewController.swift /Users/ryanstenberg/Desktop/School/CS\ M117/m117/CS_M117/CS_M117/InitialViewController.swift /Users/ryanstenberg/Desktop/School/CS\ M117/m117/CS_M117/CS_M117/InitialNavigationViewController.swift /Users/ryanstenberg/Desktop/School/CS\ M117/m117/CS_M117/CS_M117/GlobalVariables.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/ObjectiveC.apinotesc /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreData.apinotesc /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.apinotesc /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Foundation.apinotesc /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreGraphics.apinotesc /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/UIKit.apinotesc /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreText.apinotesc /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/ObjectiveC.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreData.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreImage.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/QuartzCore.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreGraphics.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/UIKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/SwiftOnoneSupport.swiftmodule
/Users/ryanstenberg/Desktop/School/CS\ M117/m117/CS_M117/DerivedData/CS_M117/Build/Intermediates/CS_M117.build/Debug-iphonesimulator/CS_M117.build/Objects-normal/x86_64/InitialViewController~partial.swiftdoc : /Users/ryanstenberg/Desktop/School/CS\ M117/m117/CS_M117/CS_M117/AppDelegate.swift /Users/ryanstenberg/Desktop/School/CS\ M117/m117/CS_M117/CS_M117/GameViewController.swift /Users/ryanstenberg/Desktop/School/CS\ M117/m117/CS_M117/CS_M117/InitialViewController.swift /Users/ryanstenberg/Desktop/School/CS\ M117/m117/CS_M117/CS_M117/InitialNavigationViewController.swift /Users/ryanstenberg/Desktop/School/CS\ M117/m117/CS_M117/CS_M117/GlobalVariables.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/ObjectiveC.apinotesc /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreData.apinotesc /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.apinotesc /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Foundation.apinotesc /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreGraphics.apinotesc /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/UIKit.apinotesc /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreText.apinotesc /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/ObjectiveC.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreData.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreImage.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/QuartzCore.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreGraphics.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/UIKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/SwiftOnoneSupport.swiftmodule
|
D
|
module cp.session;
import cp.base.logging;
interface IfSession
{
@property IfLogger logger();
}
class Session : IfSession
{
private IfLogger _logger;
this()
{
_logger = new Logger();
}
@property IfLogger logger()
{
return _logger;
}
}
|
D
|
/++
tagsnatcher.d
Author: Samuel Vargas
This module is responsible for parsing the SDLang
file via recursive descent and placing desired Tags into
several Array containers (aka ArrayList)
+/
module tagsnatcher;
import std.container, std.experimental.logger, global, sdlang;
class TagSnatcher {
private {
Array!Tag variables;
Array!Tag languages;
Array!Tag programs;
}
this(Tag root) {
recursiveDescend(root);
}
private {
void recursiveDescend(Tag tag) {
foreach (nested ; tag.all.tags) {
switch (nested.namespace) {
case "variables": variables.insertBack(nested); recursiveDescend(nested); break;
case "language": languages.insertBack(nested); recursiveDescend(nested); break;
case "program": programs.insertBack(nested); recursiveDescend(nested); break;
case "": /+ ignore the default namespace +/ break;
default: log(global.DEBUG, "unknown namespace: ", nested.namespace); break;
}
}
}
}
Array!Tag getVariables() { return variables; }
Array!Tag getLanguages() { return languages; }
Array!Tag getPrograms() { return programs; }
}
|
D
|
module dwt.internal.mozilla.nsIDOMText;
import dwt.internal.mozilla.Common;
import dwt.internal.mozilla.nsID;
import dwt.internal.mozilla.nsIDOMCharacterData;
const char[] NS_IDOMTEXT_IID_STR = "a6cf9082-15b3-11d2-932e-00805f8add32";
const nsIID NS_IDOMTEXT_IID=
{0xa6cf9082, 0x15b3, 0x11d2,
[ 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 ]};
interface nsIDOMText : nsIDOMCharacterData {
static const char[] IID_STR = NS_IDOMTEXT_IID_STR;
static const nsIID IID = NS_IDOMTEXT_IID;
extern(System):
nsresult SplitText(PRUint32 offset, nsIDOMText *_retval);
}
|
D
|
/Users/motoharu/Documents/work/twi/Build/Intermediates/twi.build/Debug-iphonesimulator/twi.build/Objects-normal/x86_64/AppDelegate.o : /Users/motoharu/Documents/work/twi/twi/ViewController.swift /Users/motoharu/Documents/work/twi/twi/AppDelegate.swift /Users/motoharu/Documents/work/twi/twi/Status.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/UIKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/Dispatch.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/ObjectiveC.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/CoreGraphics.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/Security.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/CoreImage.swiftmodule
/Users/motoharu/Documents/work/twi/Build/Intermediates/twi.build/Debug-iphonesimulator/twi.build/Objects-normal/x86_64/AppDelegate~partial.swiftmodule : /Users/motoharu/Documents/work/twi/twi/ViewController.swift /Users/motoharu/Documents/work/twi/twi/AppDelegate.swift /Users/motoharu/Documents/work/twi/twi/Status.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/UIKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/Dispatch.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/ObjectiveC.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/CoreGraphics.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/Security.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/CoreImage.swiftmodule
/Users/motoharu/Documents/work/twi/Build/Intermediates/twi.build/Debug-iphonesimulator/twi.build/Objects-normal/x86_64/AppDelegate~partial.swiftdoc : /Users/motoharu/Documents/work/twi/twi/ViewController.swift /Users/motoharu/Documents/work/twi/twi/AppDelegate.swift /Users/motoharu/Documents/work/twi/twi/Status.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/UIKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/Dispatch.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/ObjectiveC.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/CoreGraphics.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/Security.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/CoreImage.swiftmodule
|
D
|
// Copyright © 2011, Jakob Bornecrantz. All rights reserved.
// See copyright notice in src/charge/charge.d (GPLv2 only).
module charge.math.matrix3x3d;
import charge.math.vector3d;
import charge.math.point3d;
import charge.math.quatd;
struct Matrix3x3d
{
public:
union {
double[3][3] m;
struct {
double a, b, c;
double d, e, f;
double g, h, i;
}
}
public:
void opAssign(Quatd q)
{
a = 1 - 2 * q.y * q.y - 2 * q.z * q.z;
b = 2 * q.x * q.y - 2 * q.w * q.z;
c = 2 * q.x * q.z + 2 * q.w * q.y;
d = 2 * q.x * q.y + 2 * q.w * q.z;
e = 1 - 2 * q.x * q.x - 2 * q.z * q.z;
f = 2 * q.y * q.z - 2 * q.w * q.x;
g = 2 * q.x * q.z - 2 * q.w * q.y;
h = 2 * q.y * q.z + 2 * q.w * q.x;
i = 1 - 2 * q.x * q.x - 2 * q.y * q.y;
}
Vector3d opMul(Vector3d v)
{
Vector3d result;
result.x = v.x * m[0][0] + v.y * m[0][1] + v.z * m[0][2];
result.y = v.x * m[1][0] + v.y * m[1][1] + v.z * m[1][2];
result.z = v.x * m[2][0] + v.y * m[2][1] + v.z * m[2][2];
return result;
}
Point3d opMul(Point3d p)
{
Point3d result;
result.x = p.x * m[0][0] + p.y * m[0][1] + p.z * m[0][2];
result.y = p.x * m[1][0] + p.y * m[1][1] + p.z * m[1][2];
result.z = p.x * m[2][0] + p.y * m[2][1] + p.z * m[2][2];
return result;
}
void inverse()
{
Matrix3x3d temp;
temp.m[0][0] = m[1][1] * m[2][2] - m[1][2] * m[2][1];
temp.m[1][0] = m[1][2] * m[2][0] - m[1][0] * m[2][2];
temp.m[2][0] = m[1][0] * m[2][1] - m[1][1] * m[2][0];
temp.m[0][1] = m[0][2] * m[2][1] - m[0][1] * m[2][2];
temp.m[1][1] = m[0][0] * m[2][2] - m[0][2] * m[2][0];
temp.m[2][1] = m[0][1] * m[2][0] - m[0][0] * m[2][1];
temp.m[0][2] = m[0][1] * m[1][2] - m[0][2] * m[1][1];
temp.m[1][2] = m[0][2] * m[1][0] - m[0][0] * m[1][2];
temp.m[2][2] = m[0][0] * m[1][1] - m[0][1] * m[1][0];
auto det = m[0][0] * temp.m[0][0] +
m[0][1] * temp.m[1][0] +
m[0][2] * temp.m[2][0];
auto invDet = 1 / det;
m[0][0] = temp.m[0][0] * invDet;
m[1][0] = temp.m[1][0] * invDet;
m[2][0] = temp.m[2][0] * invDet;
m[0][1] = temp.m[0][1] * invDet;
m[1][1] = temp.m[1][1] * invDet;
m[2][1] = temp.m[2][1] * invDet;
m[0][2] = temp.m[0][2] * invDet;
m[1][2] = temp.m[1][2] * invDet;
m[2][2] = temp.m[2][2] * invDet;
}
}
|
D
|
/* $OpenBSD: x509.h,v 1.94 2023/03/10 16:43:02 tb Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
* This package is an SSL implementation written
* by Eric Young (eay@cryptsoft.com).
* The implementation was written so as to conform with Netscapes SSL.
*
* This library is free for commercial and non-commercial use as long as
* the following conditions are aheared to. The following conditions
* apply to all code found in this distribution, be it the RC4, RSA,
* lhash, DES, etc., code; not just the SSL code. The SSL documentation
* included with this distribution is covered by the same copyright terms
* except that the holder is Tim Hudson (tjh@cryptsoft.com).
*
* Copyright remains Eric Young's, and as such any Copyright notices in
* the code are not to be removed.
* If this package is used in a product, Eric Young should be given attribution
* as the author of the parts of the library used.
* This can be in the form of a textual message at program startup or
* in documentation (online or textual) provided with the package.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* "This product includes cryptographic software written by
* Eric Young (eay@cryptsoft.com)"
* The word 'cryptographic' can be left out if the rouines from the library
* being used are not cryptographic related :-).
* 4. If you include any Windows specific code (or a derivative thereof) from
* the apps directory (application code) you must include an acknowledgement:
* "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
*
* THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``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 AUTHOR 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.
*
* The licence and distribution terms for any publically available version or
* derivative of this code cannot be changed. i.e. this code cannot simply be
* copied and put under another distribution licence
* [including the GNU Public Licence.]
*/
/* ====================================================================
* Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
* ECDH support in OpenSSL originally developed by
* SUN MICROSYSTEMS, INC., and contributed to the OpenSSL project.
*/
module libressl.openssl.x509;
private static import core.stdc.config;
private static import libressl.compat.stdio;
private static import libressl.compat.time;
private static import libressl.openssl.x509v3;
public import libressl.openssl.asn1;
public import libressl.openssl.ec;
public import libressl.openssl.opensslconf;
public import libressl.openssl.ossl_typ;
public import libressl.openssl.pkcs7;
public import libressl.openssl.safestack;
public import libressl.openssl.stack;
public import libressl.openssl.x509_vfy;
enum HEADER_X509_H = true;
version (OPENSSL_NO_BUFFER) {
} else {
public import libressl.openssl.buffer;
}
version (OPENSSL_NO_EVP) {
private struct evp_cipher_info_st;
private alias EVP_CIPHER_INFO = .evp_cipher_info_st;
} else {
public import libressl.openssl.evp;
private alias EVP_CIPHER_INFO = libressl.openssl.evp.EVP_CIPHER_INFO;
}
version (OPENSSL_NO_BIO) {
} else {
public import libressl.openssl.bio;
}
version (OPENSSL_NO_EC) {
} else {
public import libressl.openssl.ec;
}
version (OPENSSL_NO_ECDSA) {
} else {
public import libressl.openssl.ecdsa;
}
version (OPENSSL_NO_ECDH) {
} else {
public import libressl.openssl.ecdh;
}
version (OPENSSL_NO_DEPRECATED) {
} else {
version (OPENSSL_NO_RSA) {
} else {
public import libressl.openssl.rsa;
}
version (OPENSSL_NO_DSA) {
} else {
public import libressl.openssl.dsa;
}
version (OPENSSL_NO_DH) {
} else {
public import libressl.openssl.dh;
}
}
version (OPENSSL_NO_SHA) {
} else {
public import libressl.openssl.sha;
}
extern (C):
nothrow @nogc:
//#if defined(_WIN32) && defined(__WINCRYPT_H__)
version (LIBRESSL_INTERNAL) {
} else {
//pragma(msg, "Warning, overriding WinCrypt defines");
}
//#undef libressl.openssl.ossl_typ.X509_NAME
//#undef X509_CERT_PAIR
//#undef X509_EXTENSIONS
//#endif
enum X509_FILETYPE_PEM = 1;
enum X509_FILETYPE_ASN1 = 2;
enum X509_FILETYPE_DEFAULT = 3;
enum X509v3_KU_DIGITAL_SIGNATURE = 0x0080;
enum X509v3_KU_NON_REPUDIATION = 0x0040;
enum X509v3_KU_KEY_ENCIPHERMENT = 0x0020;
enum X509v3_KU_DATA_ENCIPHERMENT = 0x0010;
enum X509v3_KU_KEY_AGREEMENT = 0x0008;
enum X509v3_KU_KEY_CERT_SIGN = 0x0004;
enum X509v3_KU_CRL_SIGN = 0x0002;
enum X509v3_KU_ENCIPHER_ONLY = 0x0001;
enum X509v3_KU_DECIPHER_ONLY = 0x8000;
enum X509v3_KU_UNDEF = 0xFFFF;
struct X509_algor_st
{
libressl.openssl.ossl_typ.ASN1_OBJECT* algorithm;
libressl.openssl.asn1.ASN1_TYPE* parameter;
}
alias X509_ALGORS = libressl.openssl.asn1.stack_st_X509_ALGOR;
struct X509_val_st
{
libressl.openssl.ossl_typ.ASN1_TIME* notBefore;
libressl.openssl.ossl_typ.ASN1_TIME* notAfter;
}
alias X509_VAL = .X509_val_st;
struct X509_sig_st;
alias X509_SIG = .X509_sig_st;
struct X509_name_entry_st;
alias X509_NAME_ENTRY = .X509_name_entry_st;
//DECLARE_STACK_OF(X509_NAME_ENTRY)
struct stack_st_X509_NAME_ENTRY
{
libressl.openssl.stack._STACK stack;
}
//DECLARE_STACK_OF(X509_NAME)
struct stack_st_X509_NAME
{
libressl.openssl.stack._STACK stack;
}
struct X509_extension_st;
alias X509_EXTENSION = .X509_extension_st;
alias X509_EXTENSIONS = .stack_st_X509_EXTENSION;
//DECLARE_STACK_OF(X509_EXTENSION)
struct stack_st_X509_EXTENSION
{
libressl.openssl.stack._STACK stack;
}
struct x509_attributes_st;
alias X509_ATTRIBUTE = .x509_attributes_st;
//DECLARE_STACK_OF(X509_ATTRIBUTE)
struct stack_st_X509_ATTRIBUTE
{
libressl.openssl.stack._STACK stack;
}
struct X509_req_info_st;
alias X509_REQ_INFO = .X509_req_info_st;
struct X509_req_st;
alias X509_REQ = .X509_req_st;
struct x509_cert_aux_st;
alias X509_CERT_AUX = .x509_cert_aux_st;
struct x509_cinf_st;
alias X509_CINF = .x509_cinf_st;
//DECLARE_STACK_OF(X509)
struct stack_st_X509
{
libressl.openssl.stack._STACK stack;
}
/* This is used for a table of trust checking functions */
struct x509_trust_st
{
int trust;
int flags;
int function(.x509_trust_st*, libressl.openssl.ossl_typ.X509*, int) check_trust;
char* name;
int arg1;
void* arg2;
}
alias X509_TRUST = .x509_trust_st;
//DECLARE_STACK_OF(X509_TRUST)
struct stack_st_X509_TRUST
{
libressl.openssl.stack._STACK stack;
}
/* standard trust ids */
/* OpenSSL changed this to 0 */
/**
* Only valid in purpose settings
*/
enum X509_TRUST_DEFAULT = -1;
enum X509_TRUST_COMPAT = 1;
enum X509_TRUST_SSL_CLIENT = 2;
enum X509_TRUST_SSL_SERVER = 3;
enum X509_TRUST_EMAIL = 4;
enum X509_TRUST_OBJECT_SIGN = 5;
enum X509_TRUST_OCSP_SIGN = 6;
enum X509_TRUST_OCSP_REQUEST = 7;
enum X509_TRUST_TSA = 8;
/* Keep these up to date! */
enum X509_TRUST_MIN = 1;
enum X509_TRUST_MAX = 8;
/* trust_flags values */
enum X509_TRUST_DYNAMIC = 1;
enum X509_TRUST_DYNAMIC_NAME = 2;
/* check_trust return codes */
enum X509_TRUST_TRUSTED = 1;
enum X509_TRUST_REJECTED = 2;
enum X509_TRUST_UNTRUSTED = 3;
/* Flags for X509_print_ex() */
enum X509_FLAG_COMPAT = 0;
enum X509_FLAG_NO_HEADER = 1L;
enum X509_FLAG_NO_VERSION = 1L << 1;
enum X509_FLAG_NO_SERIAL = 1L << 2;
enum X509_FLAG_NO_SIGNAME = 1L << 3;
enum X509_FLAG_NO_ISSUER = 1L << 4;
enum X509_FLAG_NO_VALIDITY = 1L << 5;
enum X509_FLAG_NO_SUBJECT = 1L << 6;
enum X509_FLAG_NO_PUBKEY = 1L << 7;
enum X509_FLAG_NO_EXTENSIONS = 1L << 8;
enum X509_FLAG_NO_SIGDUMP = 1L << 9;
enum X509_FLAG_NO_AUX = 1L << 10;
enum X509_FLAG_NO_ATTRIBUTES = 1L << 11;
/* Flags specific to X509_NAME_print_ex() */
/* The field separator information */
enum XN_FLAG_SEP_MASK = 0x0F << 16;
/**
* Traditional SSLeay: use old X509_NAME_print
*/
enum XN_FLAG_COMPAT = 0;
/**
* RFC2253 ,+
*/
enum XN_FLAG_SEP_COMMA_PLUS = 1 << 16;
/**
* ,+ spaced: more readable
*/
enum XN_FLAG_SEP_CPLUS_SPC = 2 << 16;
/**
* ;+ spaced
*/
enum XN_FLAG_SEP_SPLUS_SPC = 3 << 16;
/**
* One line per field
*/
enum XN_FLAG_SEP_MULTILINE = 4 << 16;
/**
* Reverse DN order
*/
enum XN_FLAG_DN_REV = 1 << 20;
/* How the field name is shown */
enum XN_FLAG_FN_MASK = 0x03 << 21;
/**
* Object short name
*/
enum XN_FLAG_FN_SN = 0;
/**
* Object long name
*/
enum XN_FLAG_FN_LN = 1 << 21;
/**
* Always use OIDs
*/
enum XN_FLAG_FN_OID = 2 << 21;
/**
* No field names
*/
enum XN_FLAG_FN_NONE = 3 << 21;
/**
* Put spaces round '='
*/
enum XN_FLAG_SPC_EQ = 1 << 23;
/*
* This determines if we dump fields we don't recognise:
* RFC2253 requires this.
*/
enum XN_FLAG_DUMP_UNKNOWN_FIELDS = 1 << 24;
/**
* Align field names to 20 characters
*/
enum XN_FLAG_FN_ALIGN = 1 << 25;
/* Complete set of RFC2253 flags */
enum XN_FLAG_RFC2253 = libressl.openssl.asn1.ASN1_STRFLGS_RFC2253 | .XN_FLAG_SEP_COMMA_PLUS | .XN_FLAG_DN_REV | .XN_FLAG_FN_SN | .XN_FLAG_DUMP_UNKNOWN_FIELDS;
/* readable oneline form */
enum XN_FLAG_ONELINE = libressl.openssl.asn1.ASN1_STRFLGS_RFC2253 | libressl.openssl.asn1.ASN1_STRFLGS_ESC_QUOTE | .XN_FLAG_SEP_CPLUS_SPC | .XN_FLAG_SPC_EQ | .XN_FLAG_FN_SN;
/* readable multiline form */
enum XN_FLAG_MULTILINE = libressl.openssl.asn1.ASN1_STRFLGS_ESC_CTRL | libressl.openssl.asn1.ASN1_STRFLGS_ESC_MSB | .XN_FLAG_SEP_MULTILINE | .XN_FLAG_SPC_EQ | .XN_FLAG_FN_LN | .XN_FLAG_FN_ALIGN;
//DECLARE_STACK_OF(X509_REVOKED)
struct stack_st_X509_REVOKED
{
libressl.openssl.stack._STACK stack;
}
struct X509_crl_info_st;
alias X509_CRL_INFO = .X509_crl_info_st;
alias stack_st_GENERAL_NAMES = libressl.openssl.x509v3.stack_st_GENERAL_NAMES;
//DECLARE_STACK_OF(X509_CRL)
struct stack_st_X509_CRL
{
libressl.openssl.stack._STACK stack;
}
struct private_key_st
{
int version_;
/* The PKCS#8 data types */
libressl.openssl.ossl_typ.X509_ALGOR* enc_algor;
/**
* encrypted pub key
*/
libressl.openssl.ossl_typ.ASN1_OCTET_STRING* enc_pkey;
/* When decrypted, the following will not be null */
libressl.openssl.ossl_typ.EVP_PKEY* dec_pkey;
/* used to encrypt and decrypt */
int key_length;
char* key_data;
/**
* true if we should auto free key_data
*/
int key_free;
/* expanded version of 'enc_algor' */
.EVP_CIPHER_INFO cipher;
int references;
}
alias X509_PKEY = .private_key_st;
version (OPENSSL_NO_EVP) {
struct X509_info_st;
} else {
struct X509_info_st
{
libressl.openssl.ossl_typ.X509* x509;
libressl.openssl.ossl_typ.X509_CRL* crl;
.X509_PKEY* x_pkey;
.EVP_CIPHER_INFO enc_cipher;
int enc_len;
char* enc_data;
int references;
}
//DECLARE_STACK_OF(X509_INFO)
struct stack_st_X509_INFO
{
libressl.openssl.stack._STACK stack;
}
}
alias X509_INFO = .X509_info_st;
/**
* The next 2 structures and their 8 routines were sent to me by
* Pat Richard <patr@x509.com> and are used to manipulate
* Netscapes spki structures - useful if you are writing a CA web page
*/
struct Netscape_spkac_st
{
libressl.openssl.ossl_typ.X509_PUBKEY* pubkey;
/**
* challenge sent in atlas >= PR2
*/
libressl.openssl.ossl_typ.ASN1_IA5STRING* challenge;
}
alias NETSCAPE_SPKAC = .Netscape_spkac_st;
struct Netscape_spki_st
{
/**
* signed public key and challenge
*/
.NETSCAPE_SPKAC* spkac;
libressl.openssl.ossl_typ.X509_ALGOR* sig_algor;
libressl.openssl.ossl_typ.ASN1_BIT_STRING* signature;
}
alias NETSCAPE_SPKI = .Netscape_spki_st;
/**
* Netscape certificate sequence structure
*/
struct Netscape_certificate_sequence
{
libressl.openssl.ossl_typ.ASN1_OBJECT* type;
.stack_st_X509* certs;
}
alias NETSCAPE_CERT_SEQUENCE = .Netscape_certificate_sequence;
/* Password based encryption structure */
struct PBEPARAM_st
{
libressl.openssl.ossl_typ.ASN1_OCTET_STRING* salt;
libressl.openssl.ossl_typ.ASN1_INTEGER* iter;
}
alias PBEPARAM = .PBEPARAM_st;
/**
* Password based encryption V2 structures
*/
struct PBE2PARAM_st
{
libressl.openssl.ossl_typ.X509_ALGOR* keyfunc;
libressl.openssl.ossl_typ.X509_ALGOR* encryption;
}
alias PBE2PARAM = .PBE2PARAM_st;
struct PBKDF2PARAM_st
{
/* Usually OCTET STRING but could be anything */
libressl.openssl.asn1.ASN1_TYPE* salt;
libressl.openssl.ossl_typ.ASN1_INTEGER* iter;
libressl.openssl.ossl_typ.ASN1_INTEGER* keylength;
libressl.openssl.ossl_typ.X509_ALGOR* prf;
}
alias PBKDF2PARAM = .PBKDF2PARAM_st;
/* ****/
alias X509_extract_key = .X509_get_pubkey;
alias X509_REQ_extract_key = .X509_REQ_get_pubkey;
alias X509_name_cmp = .X509_NAME_cmp;
int X509_CRL_up_ref(libressl.openssl.ossl_typ.X509_CRL* x);
int X509_CRL_get_signature_nid(const (libressl.openssl.ossl_typ.X509_CRL)* crl);
int i2d_re_X509_CRL_tbs(libressl.openssl.ossl_typ.X509_CRL* req, ubyte** pp);
const (.stack_st_X509_EXTENSION)* X509_CRL_get0_extensions(const (libressl.openssl.ossl_typ.X509_CRL)* crl);
core.stdc.config.c_long X509_CRL_get_version(const (libressl.openssl.ossl_typ.X509_CRL)* crl);
const (libressl.openssl.ossl_typ.ASN1_TIME)* X509_CRL_get0_lastUpdate(const (libressl.openssl.ossl_typ.X509_CRL)* crl);
const (libressl.openssl.ossl_typ.ASN1_TIME)* X509_CRL_get0_nextUpdate(const (libressl.openssl.ossl_typ.X509_CRL)* crl);
libressl.openssl.ossl_typ.ASN1_TIME* X509_CRL_get_lastUpdate(libressl.openssl.ossl_typ.X509_CRL* crl);
libressl.openssl.ossl_typ.ASN1_TIME* X509_CRL_get_nextUpdate(libressl.openssl.ossl_typ.X509_CRL* crl);
libressl.openssl.ossl_typ.X509_NAME* X509_CRL_get_issuer(const (libressl.openssl.ossl_typ.X509_CRL)* crl);
.stack_st_X509_REVOKED* X509_CRL_get_REVOKED(libressl.openssl.ossl_typ.X509_CRL* crl);
void X509_CRL_get0_signature(const (libressl.openssl.ossl_typ.X509_CRL)* crl, const (libressl.openssl.ossl_typ.ASN1_BIT_STRING)** psig, const (libressl.openssl.ossl_typ.X509_ALGOR)** palg);
const (libressl.openssl.ossl_typ.X509_ALGOR)* X509_CRL_get0_tbs_sigalg(const (libressl.openssl.ossl_typ.X509_CRL)* crl);
int X509_REQ_get_signature_nid(const (.X509_REQ)* req);
void X509_REQ_get0_signature(const (.X509_REQ)* req, const (libressl.openssl.ossl_typ.ASN1_BIT_STRING)** psig, const (libressl.openssl.ossl_typ.X509_ALGOR)** palg);
void X509_CRL_set_default_method(const (libressl.openssl.ossl_typ.X509_CRL_METHOD)* meth);
libressl.openssl.ossl_typ.X509_CRL_METHOD* X509_CRL_METHOD_new(int function(libressl.openssl.ossl_typ.X509_CRL* crl) nothrow @nogc crl_init, int function(libressl.openssl.ossl_typ.X509_CRL* crl) nothrow @nogc crl_free, int function(libressl.openssl.ossl_typ.X509_CRL* crl, libressl.openssl.ossl_typ.X509_REVOKED** ret, libressl.openssl.ossl_typ.ASN1_INTEGER* ser, libressl.openssl.ossl_typ.X509_NAME* issuer) nothrow @nogc crl_lookup, int function(libressl.openssl.ossl_typ.X509_CRL* crl, libressl.openssl.ossl_typ.EVP_PKEY* pk) nothrow @nogc crl_verify);
void X509_CRL_METHOD_free(libressl.openssl.ossl_typ.X509_CRL_METHOD* m);
void X509_CRL_set_meth_data(libressl.openssl.ossl_typ.X509_CRL* crl, void* dat);
void* X509_CRL_get_meth_data(libressl.openssl.ossl_typ.X509_CRL* crl);
libressl.openssl.ossl_typ.X509_PUBKEY* X509_get_X509_PUBKEY(const (libressl.openssl.ossl_typ.X509)* x);
const (char)* X509_verify_cert_error_string(core.stdc.config.c_long n);
version (OPENSSL_NO_EVP) {
} else {
int X509_verify(libressl.openssl.ossl_typ.X509* a, libressl.openssl.ossl_typ.EVP_PKEY* r);
int X509_REQ_verify(.X509_REQ* a, libressl.openssl.ossl_typ.EVP_PKEY* r);
int X509_CRL_verify(libressl.openssl.ossl_typ.X509_CRL* a, libressl.openssl.ossl_typ.EVP_PKEY* r);
int NETSCAPE_SPKI_verify(.NETSCAPE_SPKI* a, libressl.openssl.ossl_typ.EVP_PKEY* r);
.NETSCAPE_SPKI* NETSCAPE_SPKI_b64_decode(const (char)* str, int len);
char* NETSCAPE_SPKI_b64_encode(.NETSCAPE_SPKI* x);
libressl.openssl.ossl_typ.EVP_PKEY* NETSCAPE_SPKI_get_pubkey(.NETSCAPE_SPKI* x);
int NETSCAPE_SPKI_set_pubkey(.NETSCAPE_SPKI* x, libressl.openssl.ossl_typ.EVP_PKEY* pkey);
int NETSCAPE_SPKI_print(libressl.openssl.ossl_typ.BIO* out_, .NETSCAPE_SPKI* spki);
int X509_signature_dump(libressl.openssl.ossl_typ.BIO* bp, const (libressl.openssl.ossl_typ.ASN1_STRING)* sig, int indent);
int X509_signature_print(libressl.openssl.ossl_typ.BIO* bp, const (libressl.openssl.ossl_typ.X509_ALGOR)* alg, const (libressl.openssl.ossl_typ.ASN1_STRING)* sig);
int X509_sign(libressl.openssl.ossl_typ.X509* x, libressl.openssl.ossl_typ.EVP_PKEY* pkey, const (libressl.openssl.ossl_typ.EVP_MD)* md);
int X509_sign_ctx(libressl.openssl.ossl_typ.X509* x, libressl.openssl.ossl_typ.EVP_MD_CTX* ctx);
int X509_REQ_sign(.X509_REQ* x, libressl.openssl.ossl_typ.EVP_PKEY* pkey, const (libressl.openssl.ossl_typ.EVP_MD)* md);
int X509_REQ_sign_ctx(.X509_REQ* x, libressl.openssl.ossl_typ.EVP_MD_CTX* ctx);
int X509_CRL_sign(libressl.openssl.ossl_typ.X509_CRL* x, libressl.openssl.ossl_typ.EVP_PKEY* pkey, const (libressl.openssl.ossl_typ.EVP_MD)* md);
int X509_CRL_sign_ctx(libressl.openssl.ossl_typ.X509_CRL* x, libressl.openssl.ossl_typ.EVP_MD_CTX* ctx);
int NETSCAPE_SPKI_sign(.NETSCAPE_SPKI* x, libressl.openssl.ossl_typ.EVP_PKEY* pkey, const (libressl.openssl.ossl_typ.EVP_MD)* md);
int X509_pubkey_digest(const (libressl.openssl.ossl_typ.X509)* data, const (libressl.openssl.ossl_typ.EVP_MD)* type, ubyte* md, uint* len);
int X509_digest(const (libressl.openssl.ossl_typ.X509)* data, const (libressl.openssl.ossl_typ.EVP_MD)* type, ubyte* md, uint* len);
int X509_CRL_digest(const (libressl.openssl.ossl_typ.X509_CRL)* data, const (libressl.openssl.ossl_typ.EVP_MD)* type, ubyte* md, uint* len);
int X509_REQ_digest(const (.X509_REQ)* data, const (libressl.openssl.ossl_typ.EVP_MD)* type, ubyte* md, uint* len);
int X509_NAME_digest(const (libressl.openssl.ossl_typ.X509_NAME)* data, const (libressl.openssl.ossl_typ.EVP_MD)* type, ubyte* md, uint* len);
}
libressl.openssl.ossl_typ.X509* d2i_X509_fp(libressl.compat.stdio.FILE* fp, libressl.openssl.ossl_typ.X509** x509);
int i2d_X509_fp(libressl.compat.stdio.FILE* fp, libressl.openssl.ossl_typ.X509* x509);
libressl.openssl.ossl_typ.X509_CRL* d2i_X509_CRL_fp(libressl.compat.stdio.FILE* fp, libressl.openssl.ossl_typ.X509_CRL** crl);
int i2d_X509_CRL_fp(libressl.compat.stdio.FILE* fp, libressl.openssl.ossl_typ.X509_CRL* crl);
.X509_REQ* d2i_X509_REQ_fp(libressl.compat.stdio.FILE* fp, .X509_REQ** req);
int i2d_X509_REQ_fp(libressl.compat.stdio.FILE* fp, .X509_REQ* req);
version (OPENSSL_NO_RSA) {
} else {
libressl.openssl.ossl_typ.RSA* d2i_RSAPrivateKey_fp(libressl.compat.stdio.FILE* fp, libressl.openssl.ossl_typ.RSA** rsa);
int i2d_RSAPrivateKey_fp(libressl.compat.stdio.FILE* fp, libressl.openssl.ossl_typ.RSA* rsa);
libressl.openssl.ossl_typ.RSA* d2i_RSAPublicKey_fp(libressl.compat.stdio.FILE* fp, libressl.openssl.ossl_typ.RSA** rsa);
int i2d_RSAPublicKey_fp(libressl.compat.stdio.FILE* fp, libressl.openssl.ossl_typ.RSA* rsa);
libressl.openssl.ossl_typ.RSA* d2i_RSA_PUBKEY_fp(libressl.compat.stdio.FILE* fp, libressl.openssl.ossl_typ.RSA** rsa);
int i2d_RSA_PUBKEY_fp(libressl.compat.stdio.FILE* fp, libressl.openssl.ossl_typ.RSA* rsa);
}
version (OPENSSL_NO_DSA) {
} else {
libressl.openssl.ossl_typ.DSA* d2i_DSA_PUBKEY_fp(libressl.compat.stdio.FILE* fp, libressl.openssl.ossl_typ.DSA** dsa);
int i2d_DSA_PUBKEY_fp(libressl.compat.stdio.FILE* fp, libressl.openssl.ossl_typ.DSA* dsa);
libressl.openssl.ossl_typ.DSA* d2i_DSAPrivateKey_fp(libressl.compat.stdio.FILE* fp, libressl.openssl.ossl_typ.DSA** dsa);
int i2d_DSAPrivateKey_fp(libressl.compat.stdio.FILE* fp, libressl.openssl.ossl_typ.DSA* dsa);
}
version (OPENSSL_NO_EC) {
} else {
libressl.openssl.ec.EC_KEY* d2i_EC_PUBKEY_fp(libressl.compat.stdio.FILE* fp, libressl.openssl.ec.EC_KEY** eckey);
int i2d_EC_PUBKEY_fp(libressl.compat.stdio.FILE* fp, libressl.openssl.ec.EC_KEY* eckey);
libressl.openssl.ec.EC_KEY* d2i_ECPrivateKey_fp(libressl.compat.stdio.FILE* fp, libressl.openssl.ec.EC_KEY** eckey);
int i2d_ECPrivateKey_fp(libressl.compat.stdio.FILE* fp, libressl.openssl.ec.EC_KEY* eckey);
}
.X509_SIG* d2i_PKCS8_fp(libressl.compat.stdio.FILE* fp, .X509_SIG** p8);
int i2d_PKCS8_fp(libressl.compat.stdio.FILE* fp, .X509_SIG* p8);
libressl.openssl.ossl_typ.PKCS8_PRIV_KEY_INFO* d2i_PKCS8_PRIV_KEY_INFO_fp(libressl.compat.stdio.FILE* fp, libressl.openssl.ossl_typ.PKCS8_PRIV_KEY_INFO** p8inf);
int i2d_PKCS8_PRIV_KEY_INFO_fp(libressl.compat.stdio.FILE* fp, libressl.openssl.ossl_typ.PKCS8_PRIV_KEY_INFO* p8inf);
int i2d_PKCS8PrivateKeyInfo_fp(libressl.compat.stdio.FILE* fp, libressl.openssl.ossl_typ.EVP_PKEY* key);
int i2d_PrivateKey_fp(libressl.compat.stdio.FILE* fp, libressl.openssl.ossl_typ.EVP_PKEY* pkey);
libressl.openssl.ossl_typ.EVP_PKEY* d2i_PrivateKey_fp(libressl.compat.stdio.FILE* fp, libressl.openssl.ossl_typ.EVP_PKEY** a);
int i2d_PUBKEY_fp(libressl.compat.stdio.FILE* fp, libressl.openssl.ossl_typ.EVP_PKEY* pkey);
libressl.openssl.ossl_typ.EVP_PKEY* d2i_PUBKEY_fp(libressl.compat.stdio.FILE* fp, libressl.openssl.ossl_typ.EVP_PKEY** a);
version (OPENSSL_NO_BIO) {
} else {
libressl.openssl.ossl_typ.X509* d2i_X509_bio(libressl.openssl.ossl_typ.BIO* bp, libressl.openssl.ossl_typ.X509** x509);
int i2d_X509_bio(libressl.openssl.ossl_typ.BIO* bp, libressl.openssl.ossl_typ.X509* x509);
libressl.openssl.ossl_typ.X509_CRL* d2i_X509_CRL_bio(libressl.openssl.ossl_typ.BIO* bp, libressl.openssl.ossl_typ.X509_CRL** crl);
int i2d_X509_CRL_bio(libressl.openssl.ossl_typ.BIO* bp, libressl.openssl.ossl_typ.X509_CRL* crl);
.X509_REQ* d2i_X509_REQ_bio(libressl.openssl.ossl_typ.BIO* bp, .X509_REQ** req);
int i2d_X509_REQ_bio(libressl.openssl.ossl_typ.BIO* bp, .X509_REQ* req);
version (OPENSSL_NO_RSA) {
} else {
libressl.openssl.ossl_typ.RSA* d2i_RSAPrivateKey_bio(libressl.openssl.ossl_typ.BIO* bp, libressl.openssl.ossl_typ.RSA** rsa);
int i2d_RSAPrivateKey_bio(libressl.openssl.ossl_typ.BIO* bp, libressl.openssl.ossl_typ.RSA* rsa);
libressl.openssl.ossl_typ.RSA* d2i_RSAPublicKey_bio(libressl.openssl.ossl_typ.BIO* bp, libressl.openssl.ossl_typ.RSA** rsa);
int i2d_RSAPublicKey_bio(libressl.openssl.ossl_typ.BIO* bp, libressl.openssl.ossl_typ.RSA* rsa);
libressl.openssl.ossl_typ.RSA* d2i_RSA_PUBKEY_bio(libressl.openssl.ossl_typ.BIO* bp, libressl.openssl.ossl_typ.RSA** rsa);
int i2d_RSA_PUBKEY_bio(libressl.openssl.ossl_typ.BIO* bp, libressl.openssl.ossl_typ.RSA* rsa);
}
version (OPENSSL_NO_DSA) {
} else {
libressl.openssl.ossl_typ.DSA* d2i_DSA_PUBKEY_bio(libressl.openssl.ossl_typ.BIO* bp, libressl.openssl.ossl_typ.DSA** dsa);
int i2d_DSA_PUBKEY_bio(libressl.openssl.ossl_typ.BIO* bp, libressl.openssl.ossl_typ.DSA* dsa);
libressl.openssl.ossl_typ.DSA* d2i_DSAPrivateKey_bio(libressl.openssl.ossl_typ.BIO* bp, libressl.openssl.ossl_typ.DSA** dsa);
int i2d_DSAPrivateKey_bio(libressl.openssl.ossl_typ.BIO* bp, libressl.openssl.ossl_typ.DSA* dsa);
}
version (OPENSSL_NO_EC) {
} else {
libressl.openssl.ec.EC_KEY* d2i_EC_PUBKEY_bio(libressl.openssl.ossl_typ.BIO* bp, libressl.openssl.ec.EC_KEY** eckey);
int i2d_EC_PUBKEY_bio(libressl.openssl.ossl_typ.BIO* bp, libressl.openssl.ec.EC_KEY* eckey);
libressl.openssl.ec.EC_KEY* d2i_ECPrivateKey_bio(libressl.openssl.ossl_typ.BIO* bp, libressl.openssl.ec.EC_KEY** eckey);
int i2d_ECPrivateKey_bio(libressl.openssl.ossl_typ.BIO* bp, libressl.openssl.ec.EC_KEY* eckey);
}
.X509_SIG* d2i_PKCS8_bio(libressl.openssl.ossl_typ.BIO* bp, .X509_SIG** p8);
int i2d_PKCS8_bio(libressl.openssl.ossl_typ.BIO* bp, .X509_SIG* p8);
libressl.openssl.ossl_typ.PKCS8_PRIV_KEY_INFO* d2i_PKCS8_PRIV_KEY_INFO_bio(libressl.openssl.ossl_typ.BIO* bp, libressl.openssl.ossl_typ.PKCS8_PRIV_KEY_INFO** p8inf);
int i2d_PKCS8_PRIV_KEY_INFO_bio(libressl.openssl.ossl_typ.BIO* bp, libressl.openssl.ossl_typ.PKCS8_PRIV_KEY_INFO* p8inf);
int i2d_PKCS8PrivateKeyInfo_bio(libressl.openssl.ossl_typ.BIO* bp, libressl.openssl.ossl_typ.EVP_PKEY* key);
int i2d_PrivateKey_bio(libressl.openssl.ossl_typ.BIO* bp, libressl.openssl.ossl_typ.EVP_PKEY* pkey);
libressl.openssl.ossl_typ.EVP_PKEY* d2i_PrivateKey_bio(libressl.openssl.ossl_typ.BIO* bp, libressl.openssl.ossl_typ.EVP_PKEY** a);
int i2d_PUBKEY_bio(libressl.openssl.ossl_typ.BIO* bp, libressl.openssl.ossl_typ.EVP_PKEY* pkey);
libressl.openssl.ossl_typ.EVP_PKEY* d2i_PUBKEY_bio(libressl.openssl.ossl_typ.BIO* bp, libressl.openssl.ossl_typ.EVP_PKEY** a);
}
libressl.openssl.ossl_typ.X509* X509_dup(libressl.openssl.ossl_typ.X509* x509);
.X509_ATTRIBUTE* X509_ATTRIBUTE_dup(.X509_ATTRIBUTE* xa);
.X509_EXTENSION* X509_EXTENSION_dup(.X509_EXTENSION* ex);
libressl.openssl.ossl_typ.X509_CRL* X509_CRL_dup(libressl.openssl.ossl_typ.X509_CRL* crl);
.X509_REQ* X509_REQ_dup(.X509_REQ* req);
libressl.openssl.ossl_typ.X509_ALGOR* X509_ALGOR_dup(libressl.openssl.ossl_typ.X509_ALGOR* xn);
int X509_ALGOR_set0(libressl.openssl.ossl_typ.X509_ALGOR* alg, libressl.openssl.ossl_typ.ASN1_OBJECT* aobj, int ptype, void* pval);
void X509_ALGOR_get0(const (libressl.openssl.ossl_typ.ASN1_OBJECT)** paobj, int* pptype, const (void)** ppval, const (libressl.openssl.ossl_typ.X509_ALGOR)* algor);
void X509_ALGOR_set_md(libressl.openssl.ossl_typ.X509_ALGOR* alg, const (libressl.openssl.ossl_typ.EVP_MD)* md);
int X509_ALGOR_cmp(const (libressl.openssl.ossl_typ.X509_ALGOR)* a, const (libressl.openssl.ossl_typ.X509_ALGOR)* b);
libressl.openssl.ossl_typ.X509_NAME* X509_NAME_dup(libressl.openssl.ossl_typ.X509_NAME* xn);
int X509_NAME_get0_der(libressl.openssl.ossl_typ.X509_NAME* nm, const (ubyte)** pder, size_t* pderlen);
.X509_NAME_ENTRY* X509_NAME_ENTRY_dup(.X509_NAME_ENTRY* ne);
int X509_cmp_time(const (libressl.openssl.ossl_typ.ASN1_TIME)* s, libressl.compat.time.time_t* t);
int X509_cmp_current_time(const (libressl.openssl.ossl_typ.ASN1_TIME)* s);
libressl.openssl.ossl_typ.ASN1_TIME* X509_time_adj(libressl.openssl.ossl_typ.ASN1_TIME* s, core.stdc.config.c_long adj, libressl.compat.time.time_t* t);
libressl.openssl.ossl_typ.ASN1_TIME* X509_time_adj_ex(libressl.openssl.ossl_typ.ASN1_TIME* s, int offset_day, core.stdc.config.c_long offset_sec, libressl.compat.time.time_t* t);
libressl.openssl.ossl_typ.ASN1_TIME* X509_gmtime_adj(libressl.openssl.ossl_typ.ASN1_TIME* s, core.stdc.config.c_long adj);
const (char)* X509_get_default_cert_area();
const (char)* X509_get_default_cert_dir();
const (char)* X509_get_default_cert_file();
const (char)* X509_get_default_cert_dir_env();
const (char)* X509_get_default_cert_file_env();
const (char)* X509_get_default_private_dir();
.X509_REQ* X509_to_X509_REQ(libressl.openssl.ossl_typ.X509* x, libressl.openssl.ossl_typ.EVP_PKEY* pkey, const (libressl.openssl.ossl_typ.EVP_MD)* md);
libressl.openssl.ossl_typ.X509* X509_REQ_to_X509(.X509_REQ* r, int days, libressl.openssl.ossl_typ.EVP_PKEY* pkey);
libressl.openssl.ossl_typ.X509_ALGOR* X509_ALGOR_new();
void X509_ALGOR_free(libressl.openssl.ossl_typ.X509_ALGOR* a);
libressl.openssl.ossl_typ.X509_ALGOR* d2i_X509_ALGOR(libressl.openssl.ossl_typ.X509_ALGOR** a, const (ubyte)** in_, core.stdc.config.c_long len);
int i2d_X509_ALGOR(libressl.openssl.ossl_typ.X509_ALGOR* a, ubyte** out_);
extern __gshared const libressl.openssl.ossl_typ.ASN1_ITEM X509_ALGOR_it;
.X509_ALGORS* d2i_X509_ALGORS(.X509_ALGORS** a, const (ubyte)** in_, core.stdc.config.c_long len);
int i2d_X509_ALGORS(.X509_ALGORS* a, ubyte** out_);
extern __gshared const libressl.openssl.ossl_typ.ASN1_ITEM X509_ALGORS_it;
.X509_VAL* X509_VAL_new();
void X509_VAL_free(.X509_VAL* a);
.X509_VAL* d2i_X509_VAL(.X509_VAL** a, const (ubyte)** in_, core.stdc.config.c_long len);
int i2d_X509_VAL(.X509_VAL* a, ubyte** out_);
extern __gshared const libressl.openssl.ossl_typ.ASN1_ITEM X509_VAL_it;
libressl.openssl.ossl_typ.X509_PUBKEY* X509_PUBKEY_new();
void X509_PUBKEY_free(libressl.openssl.ossl_typ.X509_PUBKEY* a);
libressl.openssl.ossl_typ.X509_PUBKEY* d2i_X509_PUBKEY(libressl.openssl.ossl_typ.X509_PUBKEY** a, const (ubyte)** in_, core.stdc.config.c_long len);
int i2d_X509_PUBKEY(libressl.openssl.ossl_typ.X509_PUBKEY* a, ubyte** out_);
extern __gshared const libressl.openssl.ossl_typ.ASN1_ITEM X509_PUBKEY_it;
int X509_PUBKEY_set(libressl.openssl.ossl_typ.X509_PUBKEY** x, libressl.openssl.ossl_typ.EVP_PKEY* pkey);
libressl.openssl.ossl_typ.EVP_PKEY* X509_PUBKEY_get(libressl.openssl.ossl_typ.X509_PUBKEY* key);
libressl.openssl.ossl_typ.EVP_PKEY* X509_PUBKEY_get0(libressl.openssl.ossl_typ.X509_PUBKEY* key);
int X509_get_pubkey_parameters(libressl.openssl.ossl_typ.EVP_PKEY* pkey, .stack_st_X509 * chain);
int i2d_PUBKEY(libressl.openssl.ossl_typ.EVP_PKEY* a, ubyte** pp);
libressl.openssl.ossl_typ.EVP_PKEY* d2i_PUBKEY(libressl.openssl.ossl_typ.EVP_PKEY** a, const (ubyte)** pp, core.stdc.config.c_long length_);
version (OPENSSL_NO_RSA) {
} else {
int i2d_RSA_PUBKEY(libressl.openssl.ossl_typ.RSA* a, ubyte** pp);
libressl.openssl.ossl_typ.RSA* d2i_RSA_PUBKEY(libressl.openssl.ossl_typ.RSA** a, const (ubyte)** pp, core.stdc.config.c_long length_);
}
version (OPENSSL_NO_DSA) {
} else {
int i2d_DSA_PUBKEY(libressl.openssl.ossl_typ.DSA* a, ubyte** pp);
libressl.openssl.ossl_typ.DSA* d2i_DSA_PUBKEY(libressl.openssl.ossl_typ.DSA** a, const (ubyte)** pp, core.stdc.config.c_long length_);
}
version (OPENSSL_NO_EC) {
} else {
int i2d_EC_PUBKEY(libressl.openssl.ec.EC_KEY* a, ubyte** pp);
libressl.openssl.ec.EC_KEY* d2i_EC_PUBKEY(libressl.openssl.ec.EC_KEY** a, const (ubyte)** pp, core.stdc.config.c_long length_);
}
.X509_SIG* X509_SIG_new();
void X509_SIG_free(.X509_SIG* a);
.X509_SIG* d2i_X509_SIG(.X509_SIG** a, const (ubyte)** in_, core.stdc.config.c_long len);
int i2d_X509_SIG(.X509_SIG* a, ubyte** out_);
extern __gshared const libressl.openssl.ossl_typ.ASN1_ITEM X509_SIG_it;
void X509_SIG_get0(const (.X509_SIG)* sig, const (libressl.openssl.ossl_typ.X509_ALGOR)** palg, const (libressl.openssl.ossl_typ.ASN1_OCTET_STRING)** pdigest);
void X509_SIG_getm(.X509_SIG* sig, libressl.openssl.ossl_typ.X509_ALGOR** palg, libressl.openssl.ossl_typ.ASN1_OCTET_STRING** pdigest);
.X509_REQ_INFO* X509_REQ_INFO_new();
void X509_REQ_INFO_free(.X509_REQ_INFO* a);
.X509_REQ_INFO* d2i_X509_REQ_INFO(.X509_REQ_INFO** a, const (ubyte)** in_, core.stdc.config.c_long len);
int i2d_X509_REQ_INFO(.X509_REQ_INFO* a, ubyte** out_);
extern __gshared const libressl.openssl.ossl_typ.ASN1_ITEM X509_REQ_INFO_it;
.X509_REQ* X509_REQ_new();
void X509_REQ_free(.X509_REQ* a);
.X509_REQ* d2i_X509_REQ(.X509_REQ** a, const (ubyte)** in_, core.stdc.config.c_long len);
int i2d_X509_REQ(.X509_REQ* a, ubyte** out_);
extern __gshared const libressl.openssl.ossl_typ.ASN1_ITEM X509_REQ_it;
.X509_ATTRIBUTE* X509_ATTRIBUTE_new();
void X509_ATTRIBUTE_free(.X509_ATTRIBUTE* a);
.X509_ATTRIBUTE* d2i_X509_ATTRIBUTE(.X509_ATTRIBUTE** a, const (ubyte)** in_, core.stdc.config.c_long len);
int i2d_X509_ATTRIBUTE(.X509_ATTRIBUTE* a, ubyte** out_);
extern __gshared const libressl.openssl.ossl_typ.ASN1_ITEM X509_ATTRIBUTE_it;
.X509_ATTRIBUTE* X509_ATTRIBUTE_create(int nid, int atrtype, void* value);
.X509_EXTENSION* X509_EXTENSION_new();
void X509_EXTENSION_free(.X509_EXTENSION* a);
.X509_EXTENSION* d2i_X509_EXTENSION(.X509_EXTENSION** a, const (ubyte)** in_, core.stdc.config.c_long len);
int i2d_X509_EXTENSION(.X509_EXTENSION* a, ubyte** out_);
extern __gshared const libressl.openssl.ossl_typ.ASN1_ITEM X509_EXTENSION_it;
X509_EXTENSIONS* d2i_X509_EXTENSIONS(X509_EXTENSIONS** a, const (ubyte)** in_, core.stdc.config.c_long len);
int i2d_X509_EXTENSIONS(X509_EXTENSIONS* a, ubyte** out_);
extern __gshared const libressl.openssl.ossl_typ.ASN1_ITEM X509_EXTENSIONS_it;
.X509_NAME_ENTRY* X509_NAME_ENTRY_new();
void X509_NAME_ENTRY_free(.X509_NAME_ENTRY* a);
.X509_NAME_ENTRY* d2i_X509_NAME_ENTRY(.X509_NAME_ENTRY** a, const (ubyte)** in_, core.stdc.config.c_long len);
int i2d_X509_NAME_ENTRY(.X509_NAME_ENTRY* a, ubyte** out_);
extern __gshared const libressl.openssl.ossl_typ.ASN1_ITEM X509_NAME_ENTRY_it;
libressl.openssl.ossl_typ.X509_NAME* X509_NAME_new();
void X509_NAME_free(libressl.openssl.ossl_typ.X509_NAME* a);
libressl.openssl.ossl_typ.X509_NAME* d2i_X509_NAME(libressl.openssl.ossl_typ.X509_NAME** a, const (ubyte)** in_, core.stdc.config.c_long len);
int i2d_X509_NAME(libressl.openssl.ossl_typ.X509_NAME* a, ubyte** out_);
extern __gshared const libressl.openssl.ossl_typ.ASN1_ITEM X509_NAME_it;
int X509_NAME_set(libressl.openssl.ossl_typ.X509_NAME** xn, libressl.openssl.ossl_typ.X509_NAME* name);
.X509_CINF* X509_CINF_new();
void X509_CINF_free(.X509_CINF* a);
.X509_CINF* d2i_X509_CINF(.X509_CINF** a, const (ubyte)** in_, core.stdc.config.c_long len);
int i2d_X509_CINF(.X509_CINF* a, ubyte** out_);
extern __gshared const libressl.openssl.ossl_typ.ASN1_ITEM X509_CINF_it;
libressl.openssl.ossl_typ.X509* X509_new();
void X509_free(libressl.openssl.ossl_typ.X509* a);
libressl.openssl.ossl_typ.X509* d2i_X509(libressl.openssl.ossl_typ.X509** a, const (ubyte)** in_, core.stdc.config.c_long len);
int i2d_X509(libressl.openssl.ossl_typ.X509* a, ubyte** out_);
extern __gshared const libressl.openssl.ossl_typ.ASN1_ITEM X509_it;
.X509_CERT_AUX* X509_CERT_AUX_new();
void X509_CERT_AUX_free(.X509_CERT_AUX* a);
.X509_CERT_AUX* d2i_X509_CERT_AUX(.X509_CERT_AUX** a, const (ubyte)** in_, core.stdc.config.c_long len);
int i2d_X509_CERT_AUX(.X509_CERT_AUX* a, ubyte** out_);
extern __gshared const libressl.openssl.ossl_typ.ASN1_ITEM X509_CERT_AUX_it;
int X509_get_ex_new_index(core.stdc.config.c_long argl, void* argp, libressl.openssl.ossl_typ.CRYPTO_EX_new new_func, libressl.openssl.ossl_typ.CRYPTO_EX_dup dup_func, libressl.openssl.ossl_typ.CRYPTO_EX_free free_func);
int X509_set_ex_data(libressl.openssl.ossl_typ.X509* r, int idx, void* arg);
void* X509_get_ex_data(libressl.openssl.ossl_typ.X509* r, int idx);
int i2d_X509_AUX(libressl.openssl.ossl_typ.X509* a, ubyte** pp);
libressl.openssl.ossl_typ.X509* d2i_X509_AUX(libressl.openssl.ossl_typ.X509** a, const (ubyte)** pp, core.stdc.config.c_long length_);
int i2d_re_X509_tbs(libressl.openssl.ossl_typ.X509* x, ubyte** pp);
void X509_get0_signature(const (libressl.openssl.ossl_typ.ASN1_BIT_STRING)** psig, const (libressl.openssl.ossl_typ.X509_ALGOR)** palg, const (libressl.openssl.ossl_typ.X509)* x);
int X509_get_signature_nid(const (libressl.openssl.ossl_typ.X509)* x);
int X509_alias_set1(libressl.openssl.ossl_typ.X509* x, const (ubyte)* name, int len);
int X509_keyid_set1(libressl.openssl.ossl_typ.X509* x, const (ubyte)* id, int len);
ubyte* X509_alias_get0(libressl.openssl.ossl_typ.X509* x, int* len);
ubyte* X509_keyid_get0(libressl.openssl.ossl_typ.X509* x, int* len);
//int (*X509_TRUST_set_default(int function(int, libressl.openssl.ossl_typ.X509*, int) nothrow @nogc trust))(int, libressl.openssl.ossl_typ.X509*, int);
int X509_TRUST_set(int* t, int trust);
int X509_add1_trust_object(libressl.openssl.ossl_typ.X509* x, const (libressl.openssl.ossl_typ.ASN1_OBJECT)* obj);
int X509_add1_reject_object(libressl.openssl.ossl_typ.X509* x, const (libressl.openssl.ossl_typ.ASN1_OBJECT)* obj);
void X509_trust_clear(libressl.openssl.ossl_typ.X509* x);
void X509_reject_clear(libressl.openssl.ossl_typ.X509* x);
libressl.openssl.ossl_typ.X509_REVOKED* X509_REVOKED_new();
void X509_REVOKED_free(libressl.openssl.ossl_typ.X509_REVOKED* a);
libressl.openssl.ossl_typ.X509_REVOKED* X509_REVOKED_dup(libressl.openssl.ossl_typ.X509_REVOKED* a);
libressl.openssl.ossl_typ.X509_REVOKED* d2i_X509_REVOKED(libressl.openssl.ossl_typ.X509_REVOKED** a, const (ubyte)** in_, core.stdc.config.c_long len);
int i2d_X509_REVOKED(libressl.openssl.ossl_typ.X509_REVOKED* a, ubyte** out_);
extern __gshared const libressl.openssl.ossl_typ.ASN1_ITEM X509_REVOKED_it;
.X509_CRL_INFO* X509_CRL_INFO_new();
void X509_CRL_INFO_free(.X509_CRL_INFO* a);
.X509_CRL_INFO* d2i_X509_CRL_INFO(.X509_CRL_INFO** a, const (ubyte)** in_, core.stdc.config.c_long len);
int i2d_X509_CRL_INFO(.X509_CRL_INFO* a, ubyte** out_);
extern __gshared const libressl.openssl.ossl_typ.ASN1_ITEM X509_CRL_INFO_it;
libressl.openssl.ossl_typ.X509_CRL* X509_CRL_new();
void X509_CRL_free(libressl.openssl.ossl_typ.X509_CRL* a);
libressl.openssl.ossl_typ.X509_CRL* d2i_X509_CRL(libressl.openssl.ossl_typ.X509_CRL** a, const (ubyte)** in_, core.stdc.config.c_long len);
int i2d_X509_CRL(libressl.openssl.ossl_typ.X509_CRL* a, ubyte** out_);
extern __gshared const libressl.openssl.ossl_typ.ASN1_ITEM X509_CRL_it;
int X509_CRL_add0_revoked(libressl.openssl.ossl_typ.X509_CRL* crl, libressl.openssl.ossl_typ.X509_REVOKED* rev);
int X509_CRL_get0_by_serial(libressl.openssl.ossl_typ.X509_CRL* crl, libressl.openssl.ossl_typ.X509_REVOKED** ret, libressl.openssl.ossl_typ.ASN1_INTEGER* serial);
int X509_CRL_get0_by_cert(libressl.openssl.ossl_typ.X509_CRL* crl, libressl.openssl.ossl_typ.X509_REVOKED** ret, libressl.openssl.ossl_typ.X509* x);
.X509_PKEY* X509_PKEY_new();
void X509_PKEY_free(.X509_PKEY* a);
.NETSCAPE_SPKI* NETSCAPE_SPKI_new();
void NETSCAPE_SPKI_free(.NETSCAPE_SPKI* a);
.NETSCAPE_SPKI* d2i_NETSCAPE_SPKI(.NETSCAPE_SPKI** a, const (ubyte)** in_, core.stdc.config.c_long len);
int i2d_NETSCAPE_SPKI(.NETSCAPE_SPKI* a, ubyte** out_);
extern __gshared const libressl.openssl.ossl_typ.ASN1_ITEM NETSCAPE_SPKI_it;
.NETSCAPE_SPKAC* NETSCAPE_SPKAC_new();
void NETSCAPE_SPKAC_free(.NETSCAPE_SPKAC* a);
.NETSCAPE_SPKAC* d2i_NETSCAPE_SPKAC(.NETSCAPE_SPKAC** a, const (ubyte)** in_, core.stdc.config.c_long len);
int i2d_NETSCAPE_SPKAC(.NETSCAPE_SPKAC* a, ubyte** out_);
extern __gshared const libressl.openssl.ossl_typ.ASN1_ITEM NETSCAPE_SPKAC_it;
.NETSCAPE_CERT_SEQUENCE* NETSCAPE_CERT_SEQUENCE_new();
void NETSCAPE_CERT_SEQUENCE_free(.NETSCAPE_CERT_SEQUENCE* a);
.NETSCAPE_CERT_SEQUENCE* d2i_NETSCAPE_CERT_SEQUENCE(.NETSCAPE_CERT_SEQUENCE** a, const (ubyte)** in_, core.stdc.config.c_long len);
int i2d_NETSCAPE_CERT_SEQUENCE(.NETSCAPE_CERT_SEQUENCE* a, ubyte** out_);
extern __gshared const libressl.openssl.ossl_typ.ASN1_ITEM NETSCAPE_CERT_SEQUENCE_it;
version (OPENSSL_NO_EVP) {
} else {
.X509_INFO* X509_INFO_new();
void X509_INFO_free(.X509_INFO* a);
char* X509_NAME_oneline(const (libressl.openssl.ossl_typ.X509_NAME)* a, char* buf, int size);
int ASN1_item_digest(const (libressl.openssl.ossl_typ.ASN1_ITEM)* it, const (libressl.openssl.ossl_typ.EVP_MD)* type, void* data, ubyte* md, uint* len);
int ASN1_item_verify(const (libressl.openssl.ossl_typ.ASN1_ITEM)* it, libressl.openssl.ossl_typ.X509_ALGOR* algor1, libressl.openssl.ossl_typ.ASN1_BIT_STRING* signature, void* data, libressl.openssl.ossl_typ.EVP_PKEY* pkey);
int ASN1_item_sign(const (libressl.openssl.ossl_typ.ASN1_ITEM)* it, libressl.openssl.ossl_typ.X509_ALGOR* algor1, libressl.openssl.ossl_typ.X509_ALGOR* algor2, libressl.openssl.ossl_typ.ASN1_BIT_STRING* signature, void* data, libressl.openssl.ossl_typ.EVP_PKEY* pkey, const (libressl.openssl.ossl_typ.EVP_MD)* type);
int ASN1_item_sign_ctx(const (libressl.openssl.ossl_typ.ASN1_ITEM)* it, libressl.openssl.ossl_typ.X509_ALGOR* algor1, libressl.openssl.ossl_typ.X509_ALGOR* algor2, libressl.openssl.ossl_typ.ASN1_BIT_STRING* signature, void* asn, libressl.openssl.ossl_typ.EVP_MD_CTX* ctx);
}
const (.stack_st_X509_EXTENSION)* X509_get0_extensions(const (libressl.openssl.ossl_typ.X509)* x);
void X509_get0_uids(const (libressl.openssl.ossl_typ.X509)* x, const (libressl.openssl.ossl_typ.ASN1_BIT_STRING)** piuid, const (libressl.openssl.ossl_typ.ASN1_BIT_STRING)** psuid);
const (libressl.openssl.ossl_typ.X509_ALGOR)* X509_get0_tbs_sigalg(const (libressl.openssl.ossl_typ.X509)* x);
int X509_set_version(libressl.openssl.ossl_typ.X509* x, core.stdc.config.c_long version_);
core.stdc.config.c_long X509_get_version(const (libressl.openssl.ossl_typ.X509)* x);
int X509_set_serialNumber(libressl.openssl.ossl_typ.X509* x, libressl.openssl.ossl_typ.ASN1_INTEGER* serial);
libressl.openssl.ossl_typ.ASN1_INTEGER* X509_get_serialNumber(libressl.openssl.ossl_typ.X509* x);
const (libressl.openssl.ossl_typ.ASN1_INTEGER)* X509_get0_serialNumber(const (libressl.openssl.ossl_typ.X509)* x);
int X509_set_issuer_name(libressl.openssl.ossl_typ.X509* x, libressl.openssl.ossl_typ.X509_NAME* name);
libressl.openssl.ossl_typ.X509_NAME* X509_get_issuer_name(const (libressl.openssl.ossl_typ.X509)* a);
int X509_set_subject_name(libressl.openssl.ossl_typ.X509* x, libressl.openssl.ossl_typ.X509_NAME* name);
libressl.openssl.ossl_typ.X509_NAME* X509_get_subject_name(const (libressl.openssl.ossl_typ.X509)* a);
int X509_set_notBefore(libressl.openssl.ossl_typ.X509* x, const (libressl.openssl.ossl_typ.ASN1_TIME)* tm);
int X509_set1_notBefore(libressl.openssl.ossl_typ.X509* x, const (libressl.openssl.ossl_typ.ASN1_TIME)* tm);
int X509_set_notAfter(libressl.openssl.ossl_typ.X509* x, const (libressl.openssl.ossl_typ.ASN1_TIME)* tm);
int X509_set1_notAfter(libressl.openssl.ossl_typ.X509* x, const (libressl.openssl.ossl_typ.ASN1_TIME)* tm);
const (libressl.openssl.ossl_typ.ASN1_TIME)* X509_get0_notBefore(const (libressl.openssl.ossl_typ.X509)* x);
libressl.openssl.ossl_typ.ASN1_TIME* X509_getm_notBefore(const (libressl.openssl.ossl_typ.X509)* x);
const (libressl.openssl.ossl_typ.ASN1_TIME)* X509_get0_notAfter(const (libressl.openssl.ossl_typ.X509)* x);
libressl.openssl.ossl_typ.ASN1_TIME* X509_getm_notAfter(const (libressl.openssl.ossl_typ.X509)* x);
int X509_set_pubkey(libressl.openssl.ossl_typ.X509* x, libressl.openssl.ossl_typ.EVP_PKEY* pkey);
libressl.openssl.ossl_typ.EVP_PKEY* X509_get_pubkey(libressl.openssl.ossl_typ.X509* x);
libressl.openssl.ossl_typ.EVP_PKEY* X509_get0_pubkey(const (libressl.openssl.ossl_typ.X509)* x);
libressl.openssl.ossl_typ.ASN1_BIT_STRING* X509_get0_pubkey_bitstr(const (libressl.openssl.ossl_typ.X509)* x);
int X509_certificate_type(const (libressl.openssl.ossl_typ.X509)* x, const (libressl.openssl.ossl_typ.EVP_PKEY)* pubkey);
int X509_get_signature_type(const (libressl.openssl.ossl_typ.X509)* x);
alias X509_get_notBefore = .X509_getm_notBefore;
alias X509_get_notAfter = .X509_getm_notAfter;
int X509_REQ_set_version(.X509_REQ* x, core.stdc.config.c_long version_);
core.stdc.config.c_long X509_REQ_get_version(const (.X509_REQ)* x);
int X509_REQ_set_subject_name(.X509_REQ* req, libressl.openssl.ossl_typ.X509_NAME* name);
libressl.openssl.ossl_typ.X509_NAME* X509_REQ_get_subject_name(const (.X509_REQ)* x);
int X509_REQ_set_pubkey(.X509_REQ* x, libressl.openssl.ossl_typ.EVP_PKEY* pkey);
libressl.openssl.ossl_typ.EVP_PKEY* X509_REQ_get_pubkey(.X509_REQ* req);
int i2d_re_X509_REQ_tbs(.X509_REQ* req, ubyte** pp);
libressl.openssl.ossl_typ.EVP_PKEY* X509_REQ_get0_pubkey(.X509_REQ* req);
int X509_REQ_extension_nid(int nid);
int* X509_REQ_get_extension_nids();
void X509_REQ_set_extension_nids(int* nids);
.stack_st_X509_EXTENSION* X509_REQ_get_extensions(.X509_REQ* req);
int X509_REQ_add_extensions_nid(.X509_REQ* req, .stack_st_X509_EXTENSION * exts, int nid);
int X509_REQ_add_extensions(.X509_REQ* req, .stack_st_X509_EXTENSION * exts);
int X509_REQ_get_attr_count(const (.X509_REQ)* req);
int X509_REQ_get_attr_by_NID(const (.X509_REQ)* req, int nid, int lastpos);
int X509_REQ_get_attr_by_OBJ(const (.X509_REQ)* req, const (libressl.openssl.ossl_typ.ASN1_OBJECT)* obj, int lastpos);
.X509_ATTRIBUTE* X509_REQ_get_attr(const (.X509_REQ)* req, int loc);
.X509_ATTRIBUTE* X509_REQ_delete_attr(.X509_REQ* req, int loc);
int X509_REQ_add1_attr(.X509_REQ* req, .X509_ATTRIBUTE* attr);
int X509_REQ_add1_attr_by_OBJ(.X509_REQ* req, const (libressl.openssl.ossl_typ.ASN1_OBJECT)* obj, int type, const (ubyte)* bytes, int len);
int X509_REQ_add1_attr_by_NID(.X509_REQ* req, int nid, int type, const (ubyte)* bytes, int len);
int X509_REQ_add1_attr_by_txt(.X509_REQ* req, const (char)* attrname, int type, const (ubyte)* bytes, int len);
int X509_CRL_set_version(libressl.openssl.ossl_typ.X509_CRL* x, core.stdc.config.c_long version_);
int X509_CRL_set_issuer_name(libressl.openssl.ossl_typ.X509_CRL* x, libressl.openssl.ossl_typ.X509_NAME* name);
int X509_CRL_set_lastUpdate(libressl.openssl.ossl_typ.X509_CRL* x, const (libressl.openssl.ossl_typ.ASN1_TIME)* tm);
int X509_CRL_set1_lastUpdate(libressl.openssl.ossl_typ.X509_CRL* x, const (libressl.openssl.ossl_typ.ASN1_TIME)* tm);
int X509_CRL_set_nextUpdate(libressl.openssl.ossl_typ.X509_CRL* x, const (libressl.openssl.ossl_typ.ASN1_TIME)* tm);
int X509_CRL_set1_nextUpdate(libressl.openssl.ossl_typ.X509_CRL* x, const (libressl.openssl.ossl_typ.ASN1_TIME)* tm);
int X509_CRL_sort(libressl.openssl.ossl_typ.X509_CRL* crl);
const (.stack_st_X509_EXTENSION)* X509_REVOKED_get0_extensions(const (libressl.openssl.ossl_typ.X509_REVOKED)* x);
const (libressl.openssl.ossl_typ.ASN1_TIME)* X509_REVOKED_get0_revocationDate(const (libressl.openssl.ossl_typ.X509_REVOKED)* x);
const (libressl.openssl.ossl_typ.ASN1_INTEGER)* X509_REVOKED_get0_serialNumber(const (libressl.openssl.ossl_typ.X509_REVOKED)* x);
int X509_REVOKED_set_revocationDate(libressl.openssl.ossl_typ.X509_REVOKED* r, libressl.openssl.ossl_typ.ASN1_TIME* tm);
int X509_REVOKED_set_serialNumber(libressl.openssl.ossl_typ.X509_REVOKED* x, libressl.openssl.ossl_typ.ASN1_INTEGER* serial);
int X509_REQ_check_private_key(.X509_REQ* x509, libressl.openssl.ossl_typ.EVP_PKEY* pkey);
int X509_check_private_key(const (libressl.openssl.ossl_typ.X509)* x509, const (libressl.openssl.ossl_typ.EVP_PKEY)* pkey);
int X509_issuer_and_serial_cmp(const (libressl.openssl.ossl_typ.X509)* a, const (libressl.openssl.ossl_typ.X509)* b);
core.stdc.config.c_ulong X509_issuer_and_serial_hash(libressl.openssl.ossl_typ.X509* a);
int X509_issuer_name_cmp(const (libressl.openssl.ossl_typ.X509)* a, const (libressl.openssl.ossl_typ.X509)* b);
core.stdc.config.c_ulong X509_issuer_name_hash(libressl.openssl.ossl_typ.X509* a);
int X509_subject_name_cmp(const (libressl.openssl.ossl_typ.X509)* a, const (libressl.openssl.ossl_typ.X509)* b);
core.stdc.config.c_ulong X509_subject_name_hash(libressl.openssl.ossl_typ.X509* x);
version (OPENSSL_NO_MD5) {
} else {
core.stdc.config.c_ulong X509_issuer_name_hash_old(libressl.openssl.ossl_typ.X509* a);
core.stdc.config.c_ulong X509_subject_name_hash_old(libressl.openssl.ossl_typ.X509* x);
}
int X509_cmp(const (libressl.openssl.ossl_typ.X509)* a, const (libressl.openssl.ossl_typ.X509)* b);
int X509_NAME_cmp(const (libressl.openssl.ossl_typ.X509_NAME)* a, const (libressl.openssl.ossl_typ.X509_NAME)* b);
core.stdc.config.c_ulong X509_NAME_hash(libressl.openssl.ossl_typ.X509_NAME* x);
core.stdc.config.c_ulong X509_NAME_hash_old(libressl.openssl.ossl_typ.X509_NAME* x);
int X509_CRL_cmp(const (libressl.openssl.ossl_typ.X509_CRL)* a, const (libressl.openssl.ossl_typ.X509_CRL)* b);
int X509_CRL_match(const (libressl.openssl.ossl_typ.X509_CRL)* a, const (libressl.openssl.ossl_typ.X509_CRL)* b);
int X509_print_ex_fp(libressl.compat.stdio.FILE* bp, libressl.openssl.ossl_typ.X509* x, core.stdc.config.c_ulong nmflag, core.stdc.config.c_ulong cflag);
int X509_print_fp(libressl.compat.stdio.FILE* bp, libressl.openssl.ossl_typ.X509* x);
int X509_CRL_print_fp(libressl.compat.stdio.FILE* bp, libressl.openssl.ossl_typ.X509_CRL* x);
int X509_REQ_print_fp(libressl.compat.stdio.FILE* bp, .X509_REQ* req);
int X509_NAME_print_ex_fp(libressl.compat.stdio.FILE* fp, const (libressl.openssl.ossl_typ.X509_NAME)* nm, int indent, core.stdc.config.c_ulong flags);
version (OPENSSL_NO_BIO) {
} else {
int X509_NAME_print(libressl.openssl.ossl_typ.BIO* bp, const (libressl.openssl.ossl_typ.X509_NAME)* name, int obase);
int X509_NAME_print_ex(libressl.openssl.ossl_typ.BIO* out_, const (libressl.openssl.ossl_typ.X509_NAME)* nm, int indent, core.stdc.config.c_ulong flags);
int X509_print_ex(libressl.openssl.ossl_typ.BIO* bp, libressl.openssl.ossl_typ.X509* x, core.stdc.config.c_ulong nmflag, core.stdc.config.c_ulong cflag);
int X509_print(libressl.openssl.ossl_typ.BIO* bp, libressl.openssl.ossl_typ.X509* x);
int X509_ocspid_print(libressl.openssl.ossl_typ.BIO* bp, libressl.openssl.ossl_typ.X509* x);
int X509_CERT_AUX_print(libressl.openssl.ossl_typ.BIO* bp, .X509_CERT_AUX* x, int indent);
int X509_CRL_print(libressl.openssl.ossl_typ.BIO* bp, libressl.openssl.ossl_typ.X509_CRL* x);
int X509_REQ_print_ex(libressl.openssl.ossl_typ.BIO* bp, .X509_REQ* x, core.stdc.config.c_ulong nmflag, core.stdc.config.c_ulong cflag);
int X509_REQ_print(libressl.openssl.ossl_typ.BIO* bp, .X509_REQ* req);
}
int X509_NAME_entry_count(const (libressl.openssl.ossl_typ.X509_NAME)* name);
int X509_NAME_get_text_by_NID(libressl.openssl.ossl_typ.X509_NAME* name, int nid, char* buf, int len);
int X509_NAME_get_text_by_OBJ(libressl.openssl.ossl_typ.X509_NAME* name, const (libressl.openssl.ossl_typ.ASN1_OBJECT)* obj, char* buf, int len);
/*
* NOTE: you should be passing -1, not 0 as lastpos. The functions that use
* lastpos, search after that position on.
*/
int X509_NAME_get_index_by_NID(const (libressl.openssl.ossl_typ.X509_NAME)* name, int nid, int lastpos);
int X509_NAME_get_index_by_OBJ(const (libressl.openssl.ossl_typ.X509_NAME)* name, const (libressl.openssl.ossl_typ.ASN1_OBJECT)* obj, int lastpos);
.X509_NAME_ENTRY* X509_NAME_get_entry(const (libressl.openssl.ossl_typ.X509_NAME)* name, int loc);
.X509_NAME_ENTRY* X509_NAME_delete_entry(libressl.openssl.ossl_typ.X509_NAME* name, int loc);
int X509_NAME_add_entry(libressl.openssl.ossl_typ.X509_NAME* name, const (.X509_NAME_ENTRY)* ne, int loc, int set);
int X509_NAME_add_entry_by_OBJ(libressl.openssl.ossl_typ.X509_NAME* name, const (libressl.openssl.ossl_typ.ASN1_OBJECT)* obj, int type, const (ubyte)* bytes, int len, int loc, int set);
int X509_NAME_add_entry_by_NID(libressl.openssl.ossl_typ.X509_NAME* name, int nid, int type, const (ubyte)* bytes, int len, int loc, int set);
.X509_NAME_ENTRY* X509_NAME_ENTRY_create_by_txt(.X509_NAME_ENTRY** ne, const (char)* field, int type, const (ubyte)* bytes, int len);
.X509_NAME_ENTRY* X509_NAME_ENTRY_create_by_NID(.X509_NAME_ENTRY** ne, int nid, int type, const (ubyte)* bytes, int len);
int X509_NAME_add_entry_by_txt(libressl.openssl.ossl_typ.X509_NAME* name, const (char)* field, int type, const (ubyte)* bytes, int len, int loc, int set);
.X509_NAME_ENTRY* X509_NAME_ENTRY_create_by_OBJ(.X509_NAME_ENTRY** ne, const (libressl.openssl.ossl_typ.ASN1_OBJECT)* obj, int type, const (ubyte)* bytes, int len);
int X509_NAME_ENTRY_set_object(.X509_NAME_ENTRY* ne, const (libressl.openssl.ossl_typ.ASN1_OBJECT)* obj);
int X509_NAME_ENTRY_set_data(.X509_NAME_ENTRY* ne, int type, const (ubyte)* bytes, int len);
libressl.openssl.ossl_typ.ASN1_OBJECT* X509_NAME_ENTRY_get_object(const (.X509_NAME_ENTRY)* ne);
libressl.openssl.ossl_typ.ASN1_STRING* X509_NAME_ENTRY_get_data(const (.X509_NAME_ENTRY)* ne);
int X509_NAME_ENTRY_set(const (.X509_NAME_ENTRY)* ne);
int X509v3_get_ext_count(const (.stack_st_X509_EXTENSION)* x);
int X509v3_get_ext_by_NID(const (.stack_st_X509_EXTENSION)* x, int nid, int lastpos);
int X509v3_get_ext_by_OBJ(const (.stack_st_X509_EXTENSION)* x, const (libressl.openssl.ossl_typ.ASN1_OBJECT)* obj, int lastpos);
int X509v3_get_ext_by_critical(const (.stack_st_X509_EXTENSION)* x, int crit, int lastpos);
.X509_EXTENSION* X509v3_get_ext(const (.stack_st_X509_EXTENSION)* x, int loc);
.X509_EXTENSION* X509v3_delete_ext(.stack_st_X509_EXTENSION * x, int loc);
.stack_st_X509_EXTENSION* X509v3_add_ext(.stack_st_X509_EXTENSION** x, .X509_EXTENSION* ex, int loc);
int X509_get_ext_count(const (libressl.openssl.ossl_typ.X509)* x);
int X509_get_ext_by_NID(const (libressl.openssl.ossl_typ.X509)* x, int nid, int lastpos);
int X509_get_ext_by_OBJ(const (libressl.openssl.ossl_typ.X509)* x, const (libressl.openssl.ossl_typ.ASN1_OBJECT)* obj, int lastpos);
int X509_get_ext_by_critical(const (libressl.openssl.ossl_typ.X509)* x, int crit, int lastpos);
.X509_EXTENSION* X509_get_ext(const (libressl.openssl.ossl_typ.X509)* x, int loc);
.X509_EXTENSION* X509_delete_ext(libressl.openssl.ossl_typ.X509* x, int loc);
int X509_add_ext(libressl.openssl.ossl_typ.X509* x, .X509_EXTENSION* ex, int loc);
void* X509_get_ext_d2i(const (libressl.openssl.ossl_typ.X509)* x, int nid, int* crit, int* idx);
int X509_add1_ext_i2d(libressl.openssl.ossl_typ.X509* x, int nid, void* value, int crit, core.stdc.config.c_ulong flags);
int X509_CRL_get_ext_count(const (libressl.openssl.ossl_typ.X509_CRL)* x);
int X509_CRL_get_ext_by_NID(const (libressl.openssl.ossl_typ.X509_CRL)* x, int nid, int lastpos);
int X509_CRL_get_ext_by_OBJ(const (libressl.openssl.ossl_typ.X509_CRL)* x, const (libressl.openssl.ossl_typ.ASN1_OBJECT)* obj, int lastpos);
int X509_CRL_get_ext_by_critical(const (libressl.openssl.ossl_typ.X509_CRL)* x, int crit, int lastpos);
.X509_EXTENSION* X509_CRL_get_ext(const (libressl.openssl.ossl_typ.X509_CRL)* x, int loc);
.X509_EXTENSION* X509_CRL_delete_ext(libressl.openssl.ossl_typ.X509_CRL* x, int loc);
int X509_CRL_add_ext(libressl.openssl.ossl_typ.X509_CRL* x, .X509_EXTENSION* ex, int loc);
void* X509_CRL_get_ext_d2i(const (libressl.openssl.ossl_typ.X509_CRL)* x, int nid, int* crit, int* idx);
int X509_CRL_add1_ext_i2d(libressl.openssl.ossl_typ.X509_CRL* x, int nid, void* value, int crit, core.stdc.config.c_ulong flags);
int X509_REVOKED_get_ext_count(const (libressl.openssl.ossl_typ.X509_REVOKED)* x);
int X509_REVOKED_get_ext_by_NID(const (libressl.openssl.ossl_typ.X509_REVOKED)* x, int nid, int lastpos);
int X509_REVOKED_get_ext_by_OBJ(const (libressl.openssl.ossl_typ.X509_REVOKED)* x, const (libressl.openssl.ossl_typ.ASN1_OBJECT)* obj, int lastpos);
int X509_REVOKED_get_ext_by_critical(const (libressl.openssl.ossl_typ.X509_REVOKED)* x, int crit, int lastpos);
.X509_EXTENSION* X509_REVOKED_get_ext(const (libressl.openssl.ossl_typ.X509_REVOKED)* x, int loc);
.X509_EXTENSION* X509_REVOKED_delete_ext(libressl.openssl.ossl_typ.X509_REVOKED* x, int loc);
int X509_REVOKED_add_ext(libressl.openssl.ossl_typ.X509_REVOKED* x, .X509_EXTENSION* ex, int loc);
void* X509_REVOKED_get_ext_d2i(const (libressl.openssl.ossl_typ.X509_REVOKED)* x, int nid, int* crit, int* idx);
int X509_REVOKED_add1_ext_i2d(libressl.openssl.ossl_typ.X509_REVOKED* x, int nid, void* value, int crit, core.stdc.config.c_ulong flags);
.X509_EXTENSION* X509_EXTENSION_create_by_NID(.X509_EXTENSION** ex, int nid, int crit, libressl.openssl.ossl_typ.ASN1_OCTET_STRING* data);
.X509_EXTENSION* X509_EXTENSION_create_by_OBJ(.X509_EXTENSION** ex, const (libressl.openssl.ossl_typ.ASN1_OBJECT)* obj, int crit, libressl.openssl.ossl_typ.ASN1_OCTET_STRING* data);
int X509_EXTENSION_set_object(.X509_EXTENSION* ex, const (libressl.openssl.ossl_typ.ASN1_OBJECT)* obj);
int X509_EXTENSION_set_critical(.X509_EXTENSION* ex, int crit);
int X509_EXTENSION_set_data(.X509_EXTENSION* ex, libressl.openssl.ossl_typ.ASN1_OCTET_STRING* data);
libressl.openssl.ossl_typ.ASN1_OBJECT* X509_EXTENSION_get_object(.X509_EXTENSION* ex);
libressl.openssl.ossl_typ.ASN1_OCTET_STRING* X509_EXTENSION_get_data(.X509_EXTENSION* ne);
int X509_EXTENSION_get_critical(const (.X509_EXTENSION)* ex);
int X509at_get_attr_count(const (.stack_st_X509_ATTRIBUTE)* x);
int X509at_get_attr_by_NID(const (.stack_st_X509_ATTRIBUTE)* x, int nid, int lastpos);
int X509at_get_attr_by_OBJ(const (.stack_st_X509_ATTRIBUTE)* sk, const (libressl.openssl.ossl_typ.ASN1_OBJECT)* obj, int lastpos);
.X509_ATTRIBUTE* X509at_get_attr(const (.stack_st_X509_ATTRIBUTE)* x, int loc);
.X509_ATTRIBUTE* X509at_delete_attr(.stack_st_X509_ATTRIBUTE * x, int loc);
.stack_st_X509_ATTRIBUTE* X509at_add1_attr(.stack_st_X509_ATTRIBUTE** x, .X509_ATTRIBUTE* attr);
.stack_st_X509_ATTRIBUTE* X509at_add1_attr_by_OBJ(.stack_st_X509_ATTRIBUTE** x, const (libressl.openssl.ossl_typ.ASN1_OBJECT)* obj, int type, const (ubyte)* bytes, int len);
.stack_st_X509_ATTRIBUTE* X509at_add1_attr_by_NID(.stack_st_X509_ATTRIBUTE** x, int nid, int type, const (ubyte)* bytes, int len);
.stack_st_X509_ATTRIBUTE* X509at_add1_attr_by_txt(.stack_st_X509_ATTRIBUTE** x, const (char)* attrname, int type, const (ubyte)* bytes, int len);
void* X509at_get0_data_by_OBJ(.stack_st_X509_ATTRIBUTE * x, const (libressl.openssl.ossl_typ.ASN1_OBJECT)* obj, int lastpos, int type);
.X509_ATTRIBUTE* X509_ATTRIBUTE_create_by_NID(.X509_ATTRIBUTE** attr, int nid, int atrtype, const (void)* data, int len);
.X509_ATTRIBUTE* X509_ATTRIBUTE_create_by_OBJ(.X509_ATTRIBUTE** attr, const (libressl.openssl.ossl_typ.ASN1_OBJECT)* obj, int atrtype, const (void)* data, int len);
.X509_ATTRIBUTE* X509_ATTRIBUTE_create_by_txt(.X509_ATTRIBUTE** attr, const (char)* atrname, int type, const (ubyte)* bytes, int len);
int X509_ATTRIBUTE_set1_object(.X509_ATTRIBUTE* attr, const (libressl.openssl.ossl_typ.ASN1_OBJECT)* obj);
int X509_ATTRIBUTE_set1_data(.X509_ATTRIBUTE* attr, int attrtype, const (void)* data, int len);
void* X509_ATTRIBUTE_get0_data(.X509_ATTRIBUTE* attr, int idx, int atrtype, void* data);
int X509_ATTRIBUTE_count(const (.X509_ATTRIBUTE)* attr);
libressl.openssl.ossl_typ.ASN1_OBJECT* X509_ATTRIBUTE_get0_object(.X509_ATTRIBUTE* attr);
libressl.openssl.asn1.ASN1_TYPE* X509_ATTRIBUTE_get0_type(.X509_ATTRIBUTE* attr, int idx);
int EVP_PKEY_get_attr_count(const (libressl.openssl.ossl_typ.EVP_PKEY)* key);
int EVP_PKEY_get_attr_by_NID(const (libressl.openssl.ossl_typ.EVP_PKEY)* key, int nid, int lastpos);
int EVP_PKEY_get_attr_by_OBJ(const (libressl.openssl.ossl_typ.EVP_PKEY)* key, const (libressl.openssl.ossl_typ.ASN1_OBJECT)* obj, int lastpos);
.X509_ATTRIBUTE* EVP_PKEY_get_attr(const (libressl.openssl.ossl_typ.EVP_PKEY)* key, int loc);
.X509_ATTRIBUTE* EVP_PKEY_delete_attr(libressl.openssl.ossl_typ.EVP_PKEY* key, int loc);
int EVP_PKEY_add1_attr(libressl.openssl.ossl_typ.EVP_PKEY* key, .X509_ATTRIBUTE* attr);
int EVP_PKEY_add1_attr_by_OBJ(libressl.openssl.ossl_typ.EVP_PKEY* key, const (libressl.openssl.ossl_typ.ASN1_OBJECT)* obj, int type, const (ubyte)* bytes, int len);
int EVP_PKEY_add1_attr_by_NID(libressl.openssl.ossl_typ.EVP_PKEY* key, int nid, int type, const (ubyte)* bytes, int len);
int EVP_PKEY_add1_attr_by_txt(libressl.openssl.ossl_typ.EVP_PKEY* key, const (char)* attrname, int type, const (ubyte)* bytes, int len);
int X509_verify_cert(libressl.openssl.ossl_typ.X509_STORE_CTX* ctx);
/* lookup a cert from a X509 STACK */
libressl.openssl.ossl_typ.X509* X509_find_by_issuer_and_serial(.stack_st_X509* sk, libressl.openssl.ossl_typ.X509_NAME* name, libressl.openssl.ossl_typ.ASN1_INTEGER* serial);
libressl.openssl.ossl_typ.X509* X509_find_by_subject(.stack_st_X509* sk, libressl.openssl.ossl_typ.X509_NAME* name);
.PBEPARAM* PBEPARAM_new();
void PBEPARAM_free(.PBEPARAM* a);
.PBEPARAM* d2i_PBEPARAM(.PBEPARAM** a, const (ubyte)** in_, core.stdc.config.c_long len);
int i2d_PBEPARAM(.PBEPARAM* a, ubyte** out_);
extern __gshared const libressl.openssl.ossl_typ.ASN1_ITEM PBEPARAM_it;
.PBE2PARAM* PBE2PARAM_new();
void PBE2PARAM_free(.PBE2PARAM* a);
.PBE2PARAM* d2i_PBE2PARAM(.PBE2PARAM** a, const (ubyte)** in_, core.stdc.config.c_long len);
int i2d_PBE2PARAM(.PBE2PARAM* a, ubyte** out_);
extern __gshared const libressl.openssl.ossl_typ.ASN1_ITEM PBE2PARAM_it;
.PBKDF2PARAM* PBKDF2PARAM_new();
void PBKDF2PARAM_free(.PBKDF2PARAM* a);
.PBKDF2PARAM* d2i_PBKDF2PARAM(.PBKDF2PARAM** a, const (ubyte)** in_, core.stdc.config.c_long len);
int i2d_PBKDF2PARAM(.PBKDF2PARAM* a, ubyte** out_);
extern __gshared const libressl.openssl.ossl_typ.ASN1_ITEM PBKDF2PARAM_it;
int PKCS5_pbe_set0_algor(libressl.openssl.ossl_typ.X509_ALGOR* algor, int alg, int iter, const (ubyte)* salt, int saltlen);
libressl.openssl.ossl_typ.X509_ALGOR* PKCS5_pbe_set(int alg, int iter, const (ubyte)* salt, int saltlen);
libressl.openssl.ossl_typ.X509_ALGOR* PKCS5_pbe2_set(const (libressl.openssl.ossl_typ.EVP_CIPHER)* cipher, int iter, ubyte* salt, int saltlen);
libressl.openssl.ossl_typ.X509_ALGOR* PKCS5_pbe2_set_iv(const (libressl.openssl.ossl_typ.EVP_CIPHER)* cipher, int iter, ubyte* salt, int saltlen, ubyte* aiv, int prf_nid);
libressl.openssl.ossl_typ.X509_ALGOR* PKCS5_pbkdf2_set(int iter, ubyte* salt, int saltlen, int prf_nid, int keylen);
/* PKCS#8 utilities */
libressl.openssl.ossl_typ.PKCS8_PRIV_KEY_INFO* PKCS8_PRIV_KEY_INFO_new();
void PKCS8_PRIV_KEY_INFO_free(libressl.openssl.ossl_typ.PKCS8_PRIV_KEY_INFO* a);
libressl.openssl.ossl_typ.PKCS8_PRIV_KEY_INFO* d2i_PKCS8_PRIV_KEY_INFO(libressl.openssl.ossl_typ.PKCS8_PRIV_KEY_INFO** a, const (ubyte)** in_, core.stdc.config.c_long len);
int i2d_PKCS8_PRIV_KEY_INFO(libressl.openssl.ossl_typ.PKCS8_PRIV_KEY_INFO* a, ubyte** out_);
extern __gshared const libressl.openssl.ossl_typ.ASN1_ITEM PKCS8_PRIV_KEY_INFO_it;
libressl.openssl.ossl_typ.EVP_PKEY* EVP_PKCS82PKEY(const (libressl.openssl.ossl_typ.PKCS8_PRIV_KEY_INFO)* p8);
libressl.openssl.ossl_typ.PKCS8_PRIV_KEY_INFO* EVP_PKEY2PKCS8(libressl.openssl.ossl_typ.EVP_PKEY* pkey);
int PKCS8_pkey_set0(libressl.openssl.ossl_typ.PKCS8_PRIV_KEY_INFO* priv, libressl.openssl.ossl_typ.ASN1_OBJECT* aobj, int version_, int ptype, void* pval, ubyte* penc, int penclen);
int PKCS8_pkey_get0(const (libressl.openssl.ossl_typ.ASN1_OBJECT)** ppkalg, const (ubyte)** pk, int* ppklen, const (libressl.openssl.ossl_typ.X509_ALGOR)** pa, const (libressl.openssl.ossl_typ.PKCS8_PRIV_KEY_INFO)* p8);
const (.stack_st_X509_ATTRIBUTE)* PKCS8_pkey_get0_attrs(const (libressl.openssl.ossl_typ.PKCS8_PRIV_KEY_INFO)* p8);
int PKCS8_pkey_add1_attr_by_NID(libressl.openssl.ossl_typ.PKCS8_PRIV_KEY_INFO* p8, int nid, int type, const (ubyte)* bytes, int len);
int X509_PUBKEY_set0_param(libressl.openssl.ossl_typ.X509_PUBKEY* pub, libressl.openssl.ossl_typ.ASN1_OBJECT* aobj, int ptype, void* pval, ubyte* penc, int penclen);
int X509_PUBKEY_get0_param(libressl.openssl.ossl_typ.ASN1_OBJECT** ppkalg, const (ubyte)** pk, int* ppklen, libressl.openssl.ossl_typ.X509_ALGOR** pa, libressl.openssl.ossl_typ.X509_PUBKEY* pub);
int X509_check_trust(libressl.openssl.ossl_typ.X509* x, int id, int flags);
int X509_TRUST_get_count();
.X509_TRUST* X509_TRUST_get0(int idx);
int X509_TRUST_get_by_id(int id);
int X509_TRUST_add(int id, int flags, int function(.X509_TRUST*, libressl.openssl.ossl_typ.X509*, int) nothrow @nogc ck, const (char)* name, int arg1, void* arg2);
void X509_TRUST_cleanup();
int X509_TRUST_get_flags(const (.X509_TRUST)* xp);
char* X509_TRUST_get0_name(const (.X509_TRUST)* xp);
int X509_TRUST_get_trust(const (.X509_TRUST)* xp);
int X509_up_ref(libressl.openssl.ossl_typ.X509* x);
.stack_st_X509* X509_chain_up_ref(.stack_st_X509 * chain);
void ERR_load_X509_strings();
/* Error codes for the X509 functions. */
/* Function codes. */
enum X509_F_ADD_CERT_DIR = 100;
enum X509_F_BY_FILE_CTRL = 101;
enum X509_F_CHECK_POLICY = 145;
enum X509_F_DIR_CTRL = 102;
enum X509_F_GET_CERT_BY_SUBJECT = 103;
enum X509_F_NETSCAPE_SPKI_B64_DECODE = 129;
enum X509_F_NETSCAPE_SPKI_B64_ENCODE = 130;
enum X509_F_X509AT_ADD1_ATTR = 135;
enum X509_F_X509V3_ADD_EXT = 104;
enum X509_F_X509_ATTRIBUTE_CREATE_BY_NID = 136;
enum X509_F_X509_ATTRIBUTE_CREATE_BY_OBJ = 137;
enum X509_F_X509_ATTRIBUTE_CREATE_BY_TXT = 140;
enum X509_F_X509_ATTRIBUTE_GET0_DATA = 139;
enum X509_F_X509_ATTRIBUTE_SET1_DATA = 138;
enum X509_F_X509_CHECK_PRIVATE_KEY = 128;
enum X509_F_X509_CRL_PRINT_FP = 147;
enum X509_F_X509_EXTENSION_CREATE_BY_NID = 108;
enum X509_F_X509_EXTENSION_CREATE_BY_OBJ = 109;
enum X509_F_X509_GET_PUBKEY_PARAMETERS = 110;
enum X509_F_X509_LOAD_CERT_CRL_FILE = 132;
enum X509_F_X509_LOAD_CERT_FILE = 111;
enum X509_F_X509_LOAD_CRL_FILE = 112;
enum X509_F_X509_NAME_ADD_ENTRY = 113;
enum X509_F_X509_NAME_ENTRY_CREATE_BY_NID = 114;
enum X509_F_X509_NAME_ENTRY_CREATE_BY_TXT = 131;
enum X509_F_X509_NAME_ENTRY_SET_OBJECT = 115;
enum X509_F_X509_NAME_ONELINE = 116;
enum X509_F_X509_NAME_PRINT = 117;
enum X509_F_X509_PRINT_EX_FP = 118;
enum X509_F_X509_PUBKEY_GET = 119;
enum X509_F_X509_PUBKEY_SET = 120;
enum X509_F_X509_REQ_CHECK_PRIVATE_KEY = 144;
enum X509_F_X509_REQ_PRINT_EX = 121;
enum X509_F_X509_REQ_PRINT_FP = 122;
enum X509_F_X509_REQ_TO_X509 = 123;
enum X509_F_X509_STORE_ADD_CERT = 124;
enum X509_F_X509_STORE_ADD_CRL = 125;
enum X509_F_X509_STORE_CTX_GET1_ISSUER = 146;
enum X509_F_X509_STORE_CTX_INIT = 143;
enum X509_F_X509_STORE_CTX_NEW = 142;
enum X509_F_X509_STORE_CTX_PURPOSE_INHERIT = 134;
enum X509_F_X509_TO_X509_REQ = 126;
enum X509_F_X509_TRUST_ADD = 133;
enum X509_F_X509_TRUST_SET = 141;
enum X509_F_X509_VERIFY_CERT = 127;
/* Reason codes. */
enum X509_R_BAD_X509_FILETYPE = 100;
enum X509_R_BASE64_DECODE_ERROR = 118;
enum X509_R_CANT_CHECK_DH_KEY = 114;
enum X509_R_CERT_ALREADY_IN_HASH_TABLE = 101;
enum X509_R_ERR_ASN1_LIB = 102;
enum X509_R_INVALID_DIRECTORY = 113;
enum X509_R_INVALID_FIELD_NAME = 119;
enum X509_R_INVALID_TRUST = 123;
enum X509_R_KEY_TYPE_MISMATCH = 115;
enum X509_R_KEY_VALUES_MISMATCH = 116;
enum X509_R_LOADING_CERT_DIR = 103;
enum X509_R_LOADING_DEFAULTS = 104;
enum X509_R_METHOD_NOT_SUPPORTED = 124;
enum X509_R_NO_CERTIFICATE_OR_CRL_FOUND = 136;
enum X509_R_NO_CERT_SET_FOR_US_TO_VERIFY = 105;
enum X509_R_PUBLIC_KEY_DECODE_ERROR = 125;
enum X509_R_PUBLIC_KEY_ENCODE_ERROR = 126;
enum X509_R_SHOULD_RETRY = 106;
enum X509_R_UNABLE_TO_FIND_PARAMETERS_IN_CHAIN = 107;
enum X509_R_UNABLE_TO_GET_CERTS_PUBLIC_KEY = 108;
enum X509_R_UNKNOWN_KEY_TYPE = 117;
enum X509_R_UNKNOWN_NID = 109;
enum X509_R_UNKNOWN_PURPOSE_ID = 121;
enum X509_R_UNKNOWN_TRUST_ID = 120;
enum X509_R_UNSUPPORTED_ALGORITHM = 111;
enum X509_R_WRONG_LOOKUP_TYPE = 112;
enum X509_R_WRONG_TYPE = 122;
|
D
|
// Written in the D programming language.
/**
A one-stop shop for converting values from one type to another.
Copyright: Copyright Digital Mars 2007-.
License: $(WEB boost.org/LICENSE_1_0.txt, Boost License 1.0).
Authors: $(WEB digitalmars.com, Walter Bright),
$(WEB erdani.org, Andrei Alexandrescu),
Shin Fujishiro,
Adam D. Ruppe,
Kenji Hara
Source: $(PHOBOSSRC std/_conv.d)
Macros:
WIKI = Phobos/StdConv
*/
module std.conv;
public import std.ascii : LetterCase;
import std.range.constraints;
import std.traits;
import std.typetuple;
/* ************* Exceptions *************** */
/**
* Thrown on conversion errors.
*/
class ConvException : Exception
{
@safe pure nothrow
this(string s, string fn = __FILE__, size_t ln = __LINE__)
{
super(s, fn, ln);
}
}
private string convError_unexpected(S)(S source)
{
return source.empty ? "end of input" : text("'", source.front, "'");
}
private auto convError(S, T)(S source, string fn = __FILE__, size_t ln = __LINE__)
{
return new ConvException(
text("Unexpected ", convError_unexpected(source),
" when converting from type "~S.stringof~" to type "~T.stringof),
fn, ln);
}
private auto convError(S, T)(S source, int radix, string fn = __FILE__, size_t ln = __LINE__)
{
return new ConvException(
text("Unexpected ", convError_unexpected(source),
" when converting from type "~S.stringof~" base ", radix,
" to type "~T.stringof),
fn, ln);
}
@safe pure/* nothrow*/ // lazy parameter bug
private auto parseError(lazy string msg, string fn = __FILE__, size_t ln = __LINE__)
{
return new ConvException(text("Can't parse string: ", msg), fn, ln);
}
private void parseCheck(alias source)(dchar c, string fn = __FILE__, size_t ln = __LINE__)
{
if (source.empty)
throw parseError(text("unexpected end of input when expecting", "\"", c, "\""));
if (source.front != c)
throw parseError(text("\"", c, "\" is missing"), fn, ln);
source.popFront();
}
private
{
template isImaginary(T)
{
enum bool isImaginary = staticIndexOf!(Unqual!T,
ifloat, idouble, ireal) >= 0;
}
template isComplex(T)
{
enum bool isComplex = staticIndexOf!(Unqual!T,
cfloat, cdouble, creal) >= 0;
}
template isNarrowInteger(T)
{
enum bool isNarrowInteger = staticIndexOf!(Unqual!T,
byte, ubyte, short, ushort) >= 0;
}
T toStr(T, S)(S src)
if (isSomeString!T)
{
import std.format : FormatSpec, formatValue;
import std.array : appender;
auto w = appender!T();
FormatSpec!(ElementEncodingType!T) f;
formatValue(w, src, f);
return w.data;
}
template isExactSomeString(T)
{
enum isExactSomeString = isSomeString!T && !is(T == enum);
}
template isEnumStrToStr(S, T)
{
enum isEnumStrToStr = isImplicitlyConvertible!(S, T) &&
is(S == enum) && isExactSomeString!T;
}
template isNullToStr(S, T)
{
enum isNullToStr = isImplicitlyConvertible!(S, T) &&
(is(Unqual!S == typeof(null))) && isExactSomeString!T;
}
template isRawStaticArray(T, A...)
{
enum isRawStaticArray =
A.length == 0 &&
isStaticArray!T &&
!is(T == class) &&
!is(T == interface) &&
!is(T == struct) &&
!is(T == union);
}
}
/**
* Thrown on conversion overflow errors.
*/
class ConvOverflowException : ConvException
{
@safe pure nothrow
this(string s, string fn = __FILE__, size_t ln = __LINE__)
{
super(s, fn, ln);
}
}
/**
The $(D_PARAM to) family of functions converts a value from type
$(D_PARAM Source) to type $(D_PARAM Target). The source type is
deduced and the target type must be specified, for example the
expression $(D_PARAM to!int(42.0)) converts the number 42 from
$(D_PARAM double) to $(D_PARAM int). The conversion is "safe", i.e.,
it checks for overflow; $(D_PARAM to!int(4.2e10)) would throw the
$(D_PARAM ConvOverflowException) exception. Overflow checks are only
inserted when necessary, e.g., $(D_PARAM to!double(42)) does not do
any checking because any int fits in a double.
Converting a value to its own type (useful mostly for generic code)
simply returns its argument.
Example:
-------------------------
int a = 42;
auto b = to!int(a); // b is int with value 42
auto c = to!double(3.14); // c is double with value 3.14
-------------------------
Converting among numeric types is a safe way to cast them around.
Conversions from floating-point types to integral types allow loss of
precision (the fractional part of a floating-point number). The
conversion is truncating towards zero, the same way a cast would
truncate. (To round a floating point value when casting to an
integral, use $(D_PARAM roundTo).)
Examples:
-------------------------
int a = 420;
auto b = to!long(a); // same as long b = a;
auto c = to!byte(a / 10); // fine, c = 42
auto d = to!byte(a); // throw ConvOverflowException
double e = 4.2e6;
auto f = to!int(e); // f == 4200000
e = -3.14;
auto g = to!uint(e); // fails: floating-to-integral negative overflow
e = 3.14;
auto h = to!uint(e); // h = 3
e = 3.99;
h = to!uint(a); // h = 3
e = -3.99;
f = to!int(a); // f = -3
-------------------------
Conversions from integral types to floating-point types always
succeed, but might lose accuracy. The largest integers with a
predecessor representable in floating-point format are 2^24-1 for
float, 2^53-1 for double, and 2^64-1 for $(D_PARAM real) (when
$(D_PARAM real) is 80-bit, e.g. on Intel machines).
Example:
-------------------------
int a = 16_777_215; // 2^24 - 1, largest proper integer representable as float
assert(to!int(to!float(a)) == a);
assert(to!int(to!float(-a)) == -a);
a += 2;
assert(to!int(to!float(a)) == a); // fails!
-------------------------
Conversions from string to numeric types differ from the C equivalents
$(D_PARAM atoi()) and $(D_PARAM atol()) by checking for overflow and
not allowing whitespace.
For conversion of strings to signed types, the grammar recognized is:
<pre>
$(I Integer): $(I Sign UnsignedInteger)
$(I UnsignedInteger)
$(I Sign):
$(B +)
$(B -)
</pre>
For conversion to unsigned types, the grammar recognized is:
<pre>
$(I UnsignedInteger):
$(I DecimalDigit)
$(I DecimalDigit) $(I UnsignedInteger)
</pre>
Converting an array to another array type works by converting each
element in turn. Associative arrays can be converted to associative
arrays as long as keys and values can in turn be converted.
Example:
-------------------------
int[] a = ([1, 2, 3]).dup;
auto b = to!(float[])(a);
assert(b == [1.0f, 2, 3]);
string str = "1 2 3 4 5 6";
auto numbers = to!(double[])(split(str));
assert(numbers == [1.0, 2, 3, 4, 5, 6]);
int[string] c;
c["a"] = 1;
c["b"] = 2;
auto d = to!(double[wstring])(c);
assert(d["a"w] == 1 && d["b"w] == 2);
-------------------------
Conversions operate transitively, meaning that they work on arrays and
associative arrays of any complexity:
-------------------------
int[string][double[int[]]] a;
...
auto b = to!(short[wstring][string[double[]]])(a);
-------------------------
This conversion works because $(D_PARAM to!short) applies to an
$(D_PARAM int), $(D_PARAM to!wstring) applies to a $(D_PARAM
string), $(D_PARAM to!string) applies to a $(D_PARAM double), and
$(D_PARAM to!(double[])) applies to an $(D_PARAM int[]). The
conversion might throw an exception because $(D_PARAM to!short)
might fail the range check.
*/
/**
Entry point that dispatches to the appropriate conversion
primitive. Client code normally calls $(D _to!TargetType(value))
(and not some variant of $(D toImpl)).
*/
template to(T)
{
T to(A...)(A args)
if (!isRawStaticArray!A)
{
return toImpl!T(args);
}
// Fix issue 6175
T to(S)(ref S arg)
if (isRawStaticArray!S)
{
return toImpl!T(arg);
}
}
// Tests for issue 6175
@safe pure nothrow unittest
{
char[9] sarr = "blablabla";
auto darr = to!(char[])(sarr);
assert(sarr.ptr == darr.ptr);
assert(sarr.length == darr.length);
}
// Tests for issue 7348
@safe pure /+nothrow+/ unittest
{
assert(to!string(null) == "null");
assert(text(null) == "null");
}
// Tests for issue 11390
@safe pure /+nothrow+/ unittest
{
const(typeof(null)) ctn;
immutable(typeof(null)) itn;
assert(to!string(ctn) == "null");
assert(to!string(itn) == "null");
}
// Tests for issue 8729: do NOT skip leading WS
@safe pure unittest
{
import std.exception;
foreach (T; TypeTuple!(byte, ubyte, short, ushort, int, uint, long, ulong))
{
assertThrown!ConvException(to!T(" 0"));
assertThrown!ConvException(to!T(" 0", 8));
}
foreach (T; TypeTuple!(float, double, real))
{
assertThrown!ConvException(to!T(" 0"));
}
assertThrown!ConvException(to!bool(" true"));
alias NullType = typeof(null);
assertThrown!ConvException(to!NullType(" null"));
alias ARR = int[];
assertThrown!ConvException(to!ARR(" [1]"));
alias AA = int[int];
assertThrown!ConvException(to!AA(" [1:1]"));
}
/**
If the source type is implicitly convertible to the target type, $(D
to) simply performs the implicit conversion.
*/
T toImpl(T, S)(S value)
if (isImplicitlyConvertible!(S, T) &&
!isEnumStrToStr!(S, T) && !isNullToStr!(S, T))
{
template isSignedInt(T)
{
enum isSignedInt = isIntegral!T && isSigned!T;
}
alias isUnsignedInt = isUnsigned;
// Conversion from integer to integer, and changing its sign
static if (isUnsignedInt!S && isSignedInt!T && S.sizeof == T.sizeof)
{ // unsigned to signed & same size
import std.exception : enforce;
enforce(value <= cast(S)T.max,
new ConvOverflowException("Conversion positive overflow"));
}
else static if (isSignedInt!S && isUnsignedInt!T)
{ // signed to unsigned
import std.exception : enforce;
enforce(0 <= value,
new ConvOverflowException("Conversion negative overflow"));
}
return value;
}
@safe pure nothrow unittest
{
enum E { a } // Issue 9523 - Allow identity enum conversion
auto e = to!E(E.a);
assert(e == E.a);
}
@safe pure nothrow unittest
{
int a = 42;
auto b = to!long(a);
assert(a == b);
}
// Tests for issue 6377
@safe pure unittest
{
import std.exception;
// Conversion between same size
foreach (S; TypeTuple!(byte, short, int, long))
{
alias U = Unsigned!S;
foreach (Sint; TypeTuple!(S, const S, immutable S))
foreach (Uint; TypeTuple!(U, const U, immutable U))
{
// positive overflow
Uint un = Uint.max;
assertThrown!ConvOverflowException(to!Sint(un),
text(Sint.stringof, ' ', Uint.stringof, ' ', un));
// negative overflow
Sint sn = -1;
assertThrown!ConvOverflowException(to!Uint(sn),
text(Sint.stringof, ' ', Uint.stringof, ' ', un));
}
}
// Conversion between different size
foreach (i, S1; TypeTuple!(byte, short, int, long))
foreach ( S2; TypeTuple!(byte, short, int, long)[i+1..$])
{
alias U1 = Unsigned!S1;
alias U2 = Unsigned!S2;
static assert(U1.sizeof < S2.sizeof);
// small unsigned to big signed
foreach (Uint; TypeTuple!(U1, const U1, immutable U1))
foreach (Sint; TypeTuple!(S2, const S2, immutable S2))
{
Uint un = Uint.max;
assertNotThrown(to!Sint(un));
assert(to!Sint(un) == un);
}
// big unsigned to small signed
foreach (Uint; TypeTuple!(U2, const U2, immutable U2))
foreach (Sint; TypeTuple!(S1, const S1, immutable S1))
{
Uint un = Uint.max;
assertThrown(to!Sint(un));
}
static assert(S1.sizeof < U2.sizeof);
// small signed to big unsigned
foreach (Sint; TypeTuple!(S1, const S1, immutable S1))
foreach (Uint; TypeTuple!(U2, const U2, immutable U2))
{
Sint sn = -1;
assertThrown!ConvOverflowException(to!Uint(sn));
}
// big signed to small unsigned
foreach (Sint; TypeTuple!(S2, const S2, immutable S2))
foreach (Uint; TypeTuple!(U1, const U1, immutable U1))
{
Sint sn = -1;
assertThrown!ConvOverflowException(to!Uint(sn));
}
}
}
/*
Converting static arrays forwards to their dynamic counterparts.
*/
T toImpl(T, S)(ref S s)
if (isRawStaticArray!S)
{
return toImpl!(T, typeof(s[0])[])(s);
}
@safe pure nothrow unittest
{
char[4] test = ['a', 'b', 'c', 'd'];
static assert(!isInputRange!(Unqual!(char[4])));
assert(to!string(test) == test);
}
/**
When source type supports member template function opCast, is is used.
*/
T toImpl(T, S)(S value)
if (!isImplicitlyConvertible!(S, T) &&
is(typeof(S.init.opCast!T()) : T) &&
!isExactSomeString!T &&
!is(typeof(T(value))))
{
return value.opCast!T();
}
@safe pure unittest
{
static struct Test
{
struct T
{
this(S s) @safe pure { }
}
struct S
{
T opCast(U)() @safe pure { assert(false); }
}
}
to!(Test.T)(Test.S());
// make sure std.conv.to is doing the same thing as initialization
Test.S s;
Test.T t = s;
}
@safe pure unittest
{
class B
{
T opCast(T)() { return 43; }
}
auto b = new B;
assert(to!int(b) == 43);
struct S
{
T opCast(T)() { return 43; }
}
auto s = S();
assert(to!int(s) == 43);
}
/**
When target type supports 'converting construction', it is used.
$(UL $(LI If target type is struct, $(D T(value)) is used.)
$(LI If target type is class, $(D new T(value)) is used.))
*/
T toImpl(T, S)(S value)
if (!isImplicitlyConvertible!(S, T) &&
is(T == struct) && is(typeof(T(value))))
{
return T(value);
}
// Bugzilla 3961
@safe pure unittest
{
struct Int
{
int x;
}
Int i = to!Int(1);
static struct Int2
{
int x;
this(int x) @safe pure { this.x = x; }
}
Int2 i2 = to!Int2(1);
static struct Int3
{
int x;
static Int3 opCall(int x) @safe pure
{
Int3 i;
i.x = x;
return i;
}
}
Int3 i3 = to!Int3(1);
}
// Bugzilla 6808
@safe pure unittest
{
static struct FakeBigInt
{
this(string s) @safe pure {}
}
string s = "101";
auto i3 = to!FakeBigInt(s);
}
/// ditto
T toImpl(T, S)(S value)
if (!isImplicitlyConvertible!(S, T) &&
is(T == class) && is(typeof(new T(value))))
{
return new T(value);
}
@safe pure unittest
{
static struct S
{
int x;
}
static class C
{
int x;
this(int x) @safe pure { this.x = x; }
}
static class B
{
int value;
this(S src) @safe pure { value = src.x; }
this(C src) @safe pure { value = src.x; }
}
S s = S(1);
auto b1 = to!B(s); // == new B(s)
assert(b1.value == 1);
C c = new C(2);
auto b2 = to!B(c); // == new B(c)
assert(b2.value == 2);
auto c2 = to!C(3); // == new C(3)
assert(c2.x == 3);
}
@safe pure unittest
{
struct S
{
class A
{
this(B b) @safe pure {}
}
class B : A
{
this() @safe pure { super(this); }
}
}
S.B b = new S.B();
S.A a = to!(S.A)(b); // == cast(S.A)b
// (do not run construction conversion like new S.A(b))
assert(b is a);
static class C : Object
{
this() @safe pure {}
this(Object o) @safe pure {}
}
Object oc = new C();
C a2 = to!C(oc); // == new C(a)
// Construction conversion overrides down-casting conversion
assert(a2 !is a); //
}
/**
Object-to-object conversions by dynamic casting throw exception when the source is
non-null and the target is null.
*/
T toImpl(T, S)(S value)
if (!isImplicitlyConvertible!(S, T) &&
(is(S == class) || is(S == interface)) && !is(typeof(value.opCast!T()) : T) &&
(is(T == class) || is(T == interface)) && !is(typeof(new T(value))))
{
static if (is(T == immutable))
{
// immutable <- immutable
enum isModConvertible = is(S == immutable);
}
else static if (is(T == const))
{
static if (is(T == shared))
{
// shared const <- shared
// shared const <- shared const
// shared const <- immutable
enum isModConvertible = is(S == shared) || is(S == immutable);
}
else
{
// const <- mutable
// const <- immutable
enum isModConvertible = !is(S == shared);
}
}
else
{
static if (is(T == shared))
{
// shared <- shared mutable
enum isModConvertible = is(S == shared) && !is(S == const);
}
else
{
// (mutable) <- (mutable)
enum isModConvertible = is(Unqual!S == S);
}
}
static assert(isModConvertible, "Bad modifier conversion: "~S.stringof~" to "~T.stringof);
auto result = ()@trusted{ return cast(T) value; }();
if (!result && value)
{
throw new ConvException("Cannot convert object of static type "
~S.classinfo.name~" and dynamic type "~value.classinfo.name
~" to type "~T.classinfo.name);
}
return result;
}
@safe pure unittest
{
import std.exception;
// Testing object conversions
class A {}
class B : A {}
class C : A {}
A a1 = new A, a2 = new B, a3 = new C;
assert(to!B(a2) is a2);
assert(to!C(a3) is a3);
assertThrown!ConvException(to!B(a3));
}
// Unittest for 6288
@safe pure unittest
{
import std.exception;
alias Identity(T) = T;
alias toConst(T) = const T;
alias toShared(T) = shared T;
alias toSharedConst(T) = shared const T;
alias toImmutable(T) = immutable T;
template AddModifier(int n) if (0 <= n && n < 5)
{
static if (n == 0) alias AddModifier = Identity;
else static if (n == 1) alias AddModifier = toConst;
else static if (n == 2) alias AddModifier = toShared;
else static if (n == 3) alias AddModifier = toSharedConst;
else static if (n == 4) alias AddModifier = toImmutable;
}
interface I {}
interface J {}
class A {}
class B : A {}
class C : B, I, J {}
class D : I {}
foreach (m1; TypeTuple!(0,1,2,3,4)) // enumerate modifiers
foreach (m2; TypeTuple!(0,1,2,3,4)) // ditto
{
alias srcmod = AddModifier!m1;
alias tgtmod = AddModifier!m2;
//pragma(msg, srcmod!Object, " -> ", tgtmod!Object, ", convertible = ",
// isImplicitlyConvertible!(srcmod!Object, tgtmod!Object));
// Compile time convertible equals to modifier convertible.
static if (isImplicitlyConvertible!(srcmod!Object, tgtmod!Object))
{
// Test runtime conversions: class to class, class to interface,
// interface to class, and interface to interface
// Check that the runtime conversion to succeed
srcmod!A ac = new srcmod!C();
srcmod!I ic = new srcmod!C();
assert(to!(tgtmod!C)(ac) !is null); // A(c) to C
assert(to!(tgtmod!I)(ac) !is null); // A(c) to I
assert(to!(tgtmod!C)(ic) !is null); // I(c) to C
assert(to!(tgtmod!J)(ic) !is null); // I(c) to J
// Check that the runtime conversion fails
srcmod!A ab = new srcmod!B();
srcmod!I id = new srcmod!D();
assertThrown(to!(tgtmod!C)(ab)); // A(b) to C
assertThrown(to!(tgtmod!I)(ab)); // A(b) to I
assertThrown(to!(tgtmod!C)(id)); // I(d) to C
assertThrown(to!(tgtmod!J)(id)); // I(d) to J
}
else
{
// Check that the conversion is rejected statically
static assert(!is(typeof(to!(tgtmod!C)(srcmod!A.init)))); // A to C
static assert(!is(typeof(to!(tgtmod!I)(srcmod!A.init)))); // A to I
static assert(!is(typeof(to!(tgtmod!C)(srcmod!I.init)))); // I to C
static assert(!is(typeof(to!(tgtmod!J)(srcmod!I.init)))); // I to J
}
}
}
/**
Stringize conversion from all types is supported.
$(UL
$(LI String _to string conversion works for any two string types having
($(D char), $(D wchar), $(D dchar)) character widths and any
combination of qualifiers (mutable, $(D const), or $(D immutable)).)
$(LI Converts array (other than strings) to string.
Each element is converted by calling $(D to!T).)
$(LI Associative array to string conversion.
Each element is printed by calling $(D to!T).)
$(LI Object to string conversion calls $(D toString) against the object or
returns $(D "null") if the object is null.)
$(LI Struct to string conversion calls $(D toString) against the struct if
it is defined.)
$(LI For structs that do not define $(D toString), the conversion to string
produces the list of fields.)
$(LI Enumerated types are converted to strings as their symbolic names.)
$(LI Boolean values are printed as $(D "true") or $(D "false").)
$(LI $(D char), $(D wchar), $(D dchar) to a string type.)
$(LI Unsigned or signed integers to strings.
$(DL $(DT [special case])
$(DD Convert integral value to string in $(D_PARAM radix) radix.
radix must be a value from 2 to 36.
value is treated as a signed value only if radix is 10.
The characters A through Z are used to represent values 10 through 36
and their case is determined by the $(D_PARAM letterCase) parameter.)))
$(LI All floating point types to all string types.)
$(LI Pointer to string conversions prints the pointer as a $(D size_t) value.
If pointer is $(D char*), treat it as C-style strings.
In that case, this function is $(D @system).))
*/
T toImpl(T, S)(S value)
if (!(isImplicitlyConvertible!(S, T) &&
!isEnumStrToStr!(S, T) && !isNullToStr!(S, T)) &&
isExactSomeString!T)
{
static if (isExactSomeString!S && value[0].sizeof == ElementEncodingType!T.sizeof)
{
// string-to-string with incompatible qualifier conversion
static if (is(ElementEncodingType!T == immutable))
{
// conversion (mutable|const) -> immutable
return value.idup;
}
else
{
// conversion (immutable|const) -> mutable
return value.dup;
}
}
else static if (isExactSomeString!S)
{
import std.array : appender;
// other string-to-string
//Use Appender directly instead of toStr, which also uses a formatedWrite
auto w = appender!T();
w.put(value);
return w.data;
}
else static if (isIntegral!S && !is(S == enum))
{
// other integral-to-string conversions with default radix
return toImpl!(T, S)(value, 10);
}
else static if (is(S == void[]) || is(S == const(void)[]) || is(S == immutable(void)[]))
{
import core.stdc.string : memcpy;
import std.exception : enforce;
// Converting void array to string
alias Char = Unqual!(ElementEncodingType!T);
auto raw = cast(const(ubyte)[]) value;
enforce(raw.length % Char.sizeof == 0,
new ConvException("Alignment mismatch in converting a "
~ S.stringof ~ " to a "
~ T.stringof));
auto result = new Char[raw.length / Char.sizeof];
()@trusted{ memcpy(result.ptr, value.ptr, value.length); }();
return cast(T) result;
}
else static if (isPointer!S && is(S : const(char)*))
{
import core.stdc.string : strlen;
// It is unsafe because we cannot guarantee that the pointer is null terminated.
return value ? cast(T) value[0 .. strlen(value)].dup : cast(string)null;
}
else static if (isSomeString!T && is(S == enum))
{
static if (isSwitchable!(OriginalType!S) && EnumMembers!S.length <= 50)
{
switch(value)
{
foreach (member; NoDuplicates!(EnumMembers!S))
{
case member:
return to!T(enumRep!(immutable(T), S, member));
}
default:
}
}
else
{
foreach (member; EnumMembers!S)
{
if (value == member)
return to!T(enumRep!(immutable(T), S, member));
}
}
import std.format : FormatSpec, formatValue;
import std.array : appender;
//Default case, delegate to format
//Note: we don't call toStr directly, to avoid duplicate work.
auto app = appender!T();
app.put("cast(");
app.put(S.stringof);
app.put(')');
FormatSpec!char f;
formatValue(app, cast(OriginalType!S)value, f);
return app.data;
}
else
{
// other non-string values runs formatting
return toStr!T(value);
}
}
/*
Check whether type $(D T) can be used in a switch statement.
This is useful for compile-time generation of switch case statements.
*/
private template isSwitchable(E)
{
enum bool isSwitchable = is(typeof({
switch (E.init) { default: }
}));
}
//
unittest
{
static assert(isSwitchable!int);
static assert(!isSwitchable!double);
static assert(!isSwitchable!real);
}
//Static representation of the index I of the enum S,
//In representation T.
//T must be an immutable string (avoids un-necessary initializations).
private template enumRep(T, S, S value)
if (is (T == immutable) && isExactSomeString!T && is(S == enum))
{
static T enumRep = toStr!T(value);
}
@safe pure unittest
{
import std.exception;
void dg()
{
// string to string conversion
alias Chars = TypeTuple!(char, wchar, dchar);
foreach (LhsC; Chars)
{
alias LhStrings = TypeTuple!(LhsC[], const(LhsC)[], immutable(LhsC)[]);
foreach (Lhs; LhStrings)
{
foreach (RhsC; Chars)
{
alias RhStrings = TypeTuple!(RhsC[], const(RhsC)[], immutable(RhsC)[]);
foreach (Rhs; RhStrings)
{
Lhs s1 = to!Lhs("wyda");
Rhs s2 = to!Rhs(s1);
//writeln(Lhs.stringof, " -> ", Rhs.stringof);
assert(s1 == to!Lhs(s2));
}
}
}
}
foreach (T; Chars)
{
foreach (U; Chars)
{
T[] s1 = to!(T[])("Hello, world!");
auto s2 = to!(U[])(s1);
assert(s1 == to!(T[])(s2));
auto s3 = to!(const(U)[])(s1);
assert(s1 == to!(T[])(s3));
auto s4 = to!(immutable(U)[])(s1);
assert(s1 == to!(T[])(s4));
}
}
}
dg();
assertCTFEable!dg;
}
@safe pure unittest
{
// Conversion reinterpreting void array to string
auto a = "abcx"w;
const(void)[] b = a;
assert(b.length == 8);
auto c = to!(wchar[])(b);
assert(c == "abcx");
}
@system pure nothrow unittest
{
// char* to string conversion
assert(to!string(cast(char*) null) == "");
assert(to!string("foo\0".ptr) == "foo");
}
@safe pure /+nothrow+/ unittest
{
// Conversion representing bool value with string
bool b;
assert(to!string(b) == "false");
b = true;
assert(to!string(b) == "true");
}
@safe pure unittest
{
// Conversion representing character value with string
alias AllChars =
TypeTuple!( char, const( char), immutable( char),
wchar, const(wchar), immutable(wchar),
dchar, const(dchar), immutable(dchar));
foreach (Char1; AllChars)
{
foreach (Char2; AllChars)
{
Char1 c = 'a';
assert(to!(Char2[])(c)[0] == c);
}
uint x = 4;
assert(to!(Char1[])(x) == "4");
}
string s = "foo";
string s2;
foreach (char c; s)
{
s2 ~= to!string(c);
}
//printf("%.*s", s2);
assert(s2 == "foo");
}
@safe pure nothrow unittest
{
import std.exception;
// Conversion representing integer values with string
foreach (Int; TypeTuple!(ubyte, ushort, uint, ulong))
{
assert(to!string(Int(0)) == "0");
assert(to!string(Int(9)) == "9");
assert(to!string(Int(123)) == "123");
}
foreach (Int; TypeTuple!(byte, short, int, long))
{
assert(to!string(Int(0)) == "0");
assert(to!string(Int(9)) == "9");
assert(to!string(Int(123)) == "123");
assert(to!string(Int(-0)) == "0");
assert(to!string(Int(-9)) == "-9");
assert(to!string(Int(-123)) == "-123");
assert(to!string(const(Int)(6)) == "6");
}
assert(wtext(int.max) == "2147483647"w);
assert(wtext(int.min) == "-2147483648"w);
assert(to!string(0L) == "0");
assertCTFEable!(
{
assert(to!string(1uL << 62) == "4611686018427387904");
assert(to!string(0x100000000) == "4294967296");
assert(to!string(-138L) == "-138");
});
}
@safe pure /+nothrow+/ unittest
{
// Conversion representing dynamic/static array with string
long[] b = [ 1, 3, 5 ];
auto s = to!string(b);
assert(to!string(b) == "[1, 3, 5]", s);
}
/*@safe pure */unittest // sprintf issue
{
double[2] a = [ 1.5, 2.5 ];
assert(to!string(a) == "[1.5, 2.5]");
}
/*@safe pure */unittest
{
// Conversion representing associative array with string
int[string] a = ["0":1, "1":2];
assert(to!string(a) == `["0":1, "1":2]` ||
to!string(a) == `["1":2, "0":1]`);
}
unittest
{
// Conversion representing class object with string
class A
{
override string toString() const { return "an A"; }
}
A a;
assert(to!string(a) == "null");
a = new A;
assert(to!string(a) == "an A");
// Bug 7660
class C { override string toString() const { return "C"; } }
struct S { C c; alias c this; }
S s; s.c = new C();
assert(to!string(s) == "C");
}
unittest
{
// Conversion representing struct object with string
struct S1
{
string toString() { return "wyda"; }
}
assert(to!string(S1()) == "wyda");
struct S2
{
int a = 42;
float b = 43.5;
}
S2 s2;
assert(to!string(s2) == "S2(42, 43.5)");
// Test for issue 8080
struct S8080
{
short[4] data;
alias data this;
string toString() { return "<S>"; }
}
S8080 s8080;
assert(to!string(s8080) == "<S>");
}
/+nothrow+/ unittest
{
// Conversion representing enum value with string
enum EB : bool { a = true }
enum EU : uint { a = 0, b = 1, c = 2 } // base type is unsigned
enum EI : int { a = -1, b = 0, c = 1 } // base type is signed (bug 7909)
enum EF : real { a = 1.414, b = 1.732, c = 2.236 }
enum EC : char { a = 'x', b = 'y' }
enum ES : string { a = "aaa", b = "bbb" }
foreach (E; TypeTuple!(EB, EU, EI, EF, EC, ES))
{
assert(to! string(E.a) == "a"c);
assert(to!wstring(E.a) == "a"w);
assert(to!dstring(E.a) == "a"d);
}
// Test an value not corresponding to an enum member.
auto o = cast(EU)5;
assert(to! string(o) == "cast(EU)5"c);
assert(to!wstring(o) == "cast(EU)5"w);
assert(to!dstring(o) == "cast(EU)5"d);
}
unittest
{
enum E
{
foo,
doo = foo, // check duplicate switch statements
bar,
}
//Test regression 12494
assert(to!string(E.foo) == "foo");
assert(to!string(E.doo) == "foo");
assert(to!string(E.bar) == "bar");
foreach (S; TypeTuple!(string, wstring, dstring, const(char[]), const(wchar[]), const(dchar[])))
{
auto s1 = to!S(E.foo);
auto s2 = to!S(E.foo);
assert(s1 == s2);
// ensure we don't allocate when it's unnecessary
assert(s1 is s2);
}
foreach (S; TypeTuple!(char[], wchar[], dchar[]))
{
auto s1 = to!S(E.foo);
auto s2 = to!S(E.foo);
assert(s1 == s2);
// ensure each mutable array is unique
assert(s1 !is s2);
}
}
/// ditto
@trusted pure T toImpl(T, S)(S value, uint radix, LetterCase letterCase = LetterCase.upper)
if (isIntegral!S &&
isExactSomeString!T)
in
{
assert(radix >= 2 && radix <= 36);
}
body
{
alias EEType = Unqual!(ElementEncodingType!T);
T toStringRadixConvert(size_t bufLen, uint radix = 0, bool neg = false)(uint runtimeRadix = 0)
{
static if (neg)
ulong div = void, mValue = unsigned(-value);
else
Unsigned!(Unqual!S) div = void, mValue = unsigned(value);
size_t index = bufLen;
EEType[bufLen] buffer = void;
char baseChar = letterCase == LetterCase.lower ? 'a' : 'A';
char mod = void;
do
{
static if (radix == 0)
{
div = cast(S)(mValue / runtimeRadix );
mod = cast(ubyte)(mValue % runtimeRadix);
mod += mod < 10 ? '0' : baseChar - 10;
}
else static if (radix > 10)
{
div = cast(S)(mValue / radix );
mod = cast(ubyte)(mValue % radix);
mod += mod < 10 ? '0' : baseChar - 10;
}
else
{
div = cast(S)(mValue / radix);
mod = mValue % radix + '0';
}
buffer[--index] = cast(char)mod;
mValue = div;
} while (mValue);
static if (neg)
{
buffer[--index] = '-';
}
return cast(T)buffer[index .. $].dup;
}
switch(radix)
{
case 10:
if (value < 0)
return toStringRadixConvert!(S.sizeof * 3 + 1, 10, true)();
else
return toStringRadixConvert!(S.sizeof * 3, 10)();
case 16:
return toStringRadixConvert!(S.sizeof * 2, 16)();
case 2:
return toStringRadixConvert!(S.sizeof * 8, 2)();
case 8:
return toStringRadixConvert!(S.sizeof * 3, 8)();
default:
return toStringRadixConvert!(S.sizeof * 6)(radix);
}
}
@safe pure nothrow unittest
{
foreach (Int; TypeTuple!(uint, ulong))
{
assert(to!string(Int(16), 16) == "10");
assert(to!string(Int(15), 2u) == "1111");
assert(to!string(Int(1), 2u) == "1");
assert(to!string(Int(0x1234AF), 16u) == "1234AF");
assert(to!string(Int(0x1234BCD), 16u, LetterCase.upper) == "1234BCD");
assert(to!string(Int(0x1234AF), 16u, LetterCase.lower) == "1234af");
}
foreach (Int; TypeTuple!(int, long))
{
assert(to!string(Int(-10), 10u) == "-10");
}
assert(to!string(byte(-10), 16) == "F6");
assert(to!string(long.min) == "-9223372036854775808");
assert(to!string(long.max) == "9223372036854775807");
}
/**
Narrowing numeric-numeric conversions throw when the value does not
fit in the narrower type.
*/
T toImpl(T, S)(S value)
if (!isImplicitlyConvertible!(S, T) &&
(isNumeric!S || isSomeChar!S || isBoolean!S) &&
(isNumeric!T || isSomeChar!T || isBoolean!T) && !is(T == enum))
{
enum sSmallest = mostNegative!S;
enum tSmallest = mostNegative!T;
static if (sSmallest < 0)
{
// possible underflow converting from a signed
static if (tSmallest == 0)
{
immutable good = value >= 0;
}
else
{
static assert(tSmallest < 0);
immutable good = value >= tSmallest;
}
if (!good)
throw new ConvOverflowException("Conversion negative overflow");
}
static if (S.max > T.max)
{
// possible overflow
if (value > T.max)
throw new ConvOverflowException("Conversion positive overflow");
}
return (ref value)@trusted{ return cast(T) value; }(value);
}
@safe pure unittest
{
import std.exception;
dchar a = ' ';
assert(to!char(a) == ' ');
a = 300;
assert(collectException(to!char(a)));
dchar from0 = 'A';
char to0 = to!char(from0);
wchar from1 = 'A';
char to1 = to!char(from1);
char from2 = 'A';
char to2 = to!char(from2);
char from3 = 'A';
wchar to3 = to!wchar(from3);
char from4 = 'A';
dchar to4 = to!dchar(from4);
}
unittest
{
import std.exception;
// Narrowing conversions from enum -> integral should be allowed, but they
// should throw at runtime if the enum value doesn't fit in the target
// type.
enum E1 : ulong { A = 1, B = 1UL<<48, C = 0 }
assert(to!int(E1.A) == 1);
assert(to!bool(E1.A) == true);
assertThrown!ConvOverflowException(to!int(E1.B)); // E1.B overflows int
assertThrown!ConvOverflowException(to!bool(E1.B)); // E1.B overflows bool
assert(to!bool(E1.C) == false);
enum E2 : long { A = -1L<<48, B = -1<<31, C = 1<<31 }
assertThrown!ConvOverflowException(to!int(E2.A)); // E2.A overflows int
assertThrown!ConvOverflowException(to!uint(E2.B)); // E2.B overflows uint
assert(to!int(E2.B) == -1<<31); // but does not overflow int
assert(to!int(E2.C) == 1<<31); // E2.C does not overflow int
enum E3 : int { A = -1, B = 1, C = 255, D = 0 }
assertThrown!ConvOverflowException(to!ubyte(E3.A));
assertThrown!ConvOverflowException(to!bool(E3.A));
assert(to!byte(E3.A) == -1);
assert(to!byte(E3.B) == 1);
assert(to!ubyte(E3.C) == 255);
assert(to!bool(E3.B) == true);
assertThrown!ConvOverflowException(to!byte(E3.C));
assertThrown!ConvOverflowException(to!bool(E3.C));
assert(to!bool(E3.D) == false);
}
/**
Array-to-array conversion (except when target is a string type)
converts each element in turn by using $(D to).
*/
T toImpl(T, S)(S value)
if (!isImplicitlyConvertible!(S, T) &&
!isSomeString!S && isDynamicArray!S &&
!isExactSomeString!T && isArray!T)
{
alias E = typeof(T.init[0]);
static if (isStaticArray!T)
{
import std.string : format;
import std.exception : enforce;
auto res = to!(E[])(value);
enforce!ConvException(T.length == res.length,
format("Length mismatch when converting to static array: %s vs %s", T.length, res.length));
return res[0 .. T.length];
}
else
{
import std.array : appender;
auto w = appender!(E[])();
w.reserve(value.length);
foreach (i, ref e; value)
{
w.put(to!E(e));
}
return w.data;
}
}
@safe pure unittest
{
import std.exception;
// array to array conversions
uint[] a = ([ 1u, 2, 3 ]).dup;
auto b = to!(float[])(a);
assert(b == [ 1.0f, 2, 3 ]);
//auto c = to!(string[])(b);
//assert(c[0] == "1" && c[1] == "2" && c[2] == "3");
immutable(int)[3] d = [ 1, 2, 3 ];
b = to!(float[])(d);
assert(b == [ 1.0f, 2, 3 ]);
uint[][] e = [ a, a ];
auto f = to!(float[][])(e);
assert(f[0] == b && f[1] == b);
// Test for bug 8264
struct Wrap
{
string wrap;
alias wrap this;
}
Wrap[] warr = to!(Wrap[])(["foo", "bar"]); // should work
// Issue 12633
import std.conv : to;
const s2 = ["10", "20"];
immutable int[2] a3 = s2.to!(int[2]);
assert(a3 == [10, 20]);
// verify length mismatches are caught
immutable s4 = [1, 2, 3, 4];
foreach (i; [1, 4])
{
auto ex = collectException(s4[0 .. i].to!(int[2]));
assert(ex && ex.msg == "Length mismatch when converting to static array: 2 vs " ~ [cast(char)(i + '0')],
ex ? ex.msg : "Exception was not thrown!");
}
}
/*@safe pure */unittest
{
auto b = [ 1.0f, 2, 3 ];
auto c = to!(string[])(b);
assert(c[0] == "1" && c[1] == "2" && c[2] == "3");
}
/**
Associative array to associative array conversion converts each key
and each value in turn.
*/
T toImpl(T, S)(S value)
if (isAssociativeArray!S &&
isAssociativeArray!T && !is(T == enum))
{
/* This code is potentially unsafe.
*/
alias K2 = KeyType!T;
alias V2 = ValueType!T;
// While we are "building" the AA, we need to unqualify its values, and only re-qualify at the end
Unqual!V2[K2] result;
foreach (k1, v1; value)
{
// Cast values temporarily to Unqual!V2 to store them to result variable
result[to!K2(k1)] = cast(Unqual!V2) to!V2(v1);
}
// Cast back to original type
return cast(T)result;
}
@safe /*pure */unittest
{
// hash to hash conversions
int[string] a;
a["0"] = 1;
a["1"] = 2;
auto b = to!(double[dstring])(a);
assert(b["0"d] == 1 && b["1"d] == 2);
}
@safe /*pure */unittest // Bugzilla 8705, from doc
{
import std.exception;
int[string][double[int[]]] a;
auto b = to!(short[wstring][string[double[]]])(a);
a = [null:["hello":int.max]];
assertThrown!ConvOverflowException(to!(short[wstring][string[double[]]])(a));
}
unittest // Extra cases for AA with qualifiers conversion
{
int[][int[]] a;// = [[], []];
auto b = to!(immutable(short[])[immutable short[]])(a);
double[dstring][int[long[]]] c;
auto d = to!(immutable(short[immutable wstring])[immutable string[double[]]])(c);
}
private void testIntegralToFloating(Integral, Floating)()
{
Integral a = 42;
auto b = to!Floating(a);
assert(a == b);
assert(a == to!Integral(b));
}
private void testFloatingToIntegral(Floating, Integral)()
{
bool convFails(Source, Target, E)(Source src)
{
try
auto t = to!Target(src);
catch (E)
return true;
return false;
}
// convert some value
Floating a = 4.2e1;
auto b = to!Integral(a);
assert(is(typeof(b) == Integral) && b == 42);
// convert some negative value (if applicable)
a = -4.2e1;
static if (Integral.min < 0)
{
b = to!Integral(a);
assert(is(typeof(b) == Integral) && b == -42);
}
else
{
// no go for unsigned types
assert(convFails!(Floating, Integral, ConvOverflowException)(a));
}
// convert to the smallest integral value
a = 0.0 + Integral.min;
static if (Integral.min < 0)
{
a = -a; // -Integral.min not representable as an Integral
assert(convFails!(Floating, Integral, ConvOverflowException)(a)
|| Floating.sizeof <= Integral.sizeof);
}
a = 0.0 + Integral.min;
assert(to!Integral(a) == Integral.min);
--a; // no more representable as an Integral
assert(convFails!(Floating, Integral, ConvOverflowException)(a)
|| Floating.sizeof <= Integral.sizeof);
a = 0.0 + Integral.max;
// fwritefln(stderr, "%s a=%g, %s conv=%s", Floating.stringof, a,
// Integral.stringof, to!Integral(a));
assert(to!Integral(a) == Integral.max || Floating.sizeof <= Integral.sizeof);
++a; // no more representable as an Integral
assert(convFails!(Floating, Integral, ConvOverflowException)(a)
|| Floating.sizeof <= Integral.sizeof);
// convert a value with a fractional part
a = 3.14;
assert(to!Integral(a) == 3);
a = 3.99;
assert(to!Integral(a) == 3);
static if (Integral.min < 0)
{
a = -3.14;
assert(to!Integral(a) == -3);
a = -3.99;
assert(to!Integral(a) == -3);
}
}
@safe pure unittest
{
alias AllInts = TypeTuple!(byte, ubyte, short, ushort, int, uint, long, ulong);
alias AllFloats = TypeTuple!(float, double, real);
alias AllNumerics = TypeTuple!(AllInts, AllFloats);
// test with same type
{
foreach (T; AllNumerics)
{
T a = 42;
auto b = to!T(a);
assert(is(typeof(a) == typeof(b)) && a == b);
}
}
// test that floating-point numbers convert properly to largest ints
// see http://oregonstate.edu/~peterseb/mth351/docs/351s2001_fp80x87.html
// look for "largest fp integer with a predecessor"
{
// float
int a = 16_777_215; // 2^24 - 1
assert(to!int(to!float(a)) == a);
assert(to!int(to!float(-a)) == -a);
// double
long b = 9_007_199_254_740_991; // 2^53 - 1
assert(to!long(to!double(b)) == b);
assert(to!long(to!double(-b)) == -b);
// real
// @@@ BUG IN COMPILER @@@
// ulong c = 18_446_744_073_709_551_615UL; // 2^64 - 1
// assert(to!ulong(to!real(c)) == c);
// assert(to!ulong(-to!real(c)) == c);
}
// test conversions floating => integral
{
// AllInts[0 .. $ - 1] should be AllInts
// @@@ BUG IN COMPILER @@@
foreach (Integral; AllInts[0 .. $ - 1])
{
foreach (Floating; AllFloats)
{
testFloatingToIntegral!(Floating, Integral)();
}
}
}
// test conversion integral => floating
{
foreach (Integral; AllInts[0 .. $ - 1])
{
foreach (Floating; AllFloats)
{
testIntegralToFloating!(Integral, Floating)();
}
}
}
// test parsing
{
foreach (T; AllNumerics)
{
// from type immutable(char)[2]
auto a = to!T("42");
assert(a == 42);
// from type char[]
char[] s1 = "42".dup;
a = to!T(s1);
assert(a == 42);
// from type char[2]
char[2] s2;
s2[] = "42";
a = to!T(s2);
assert(a == 42);
// from type immutable(wchar)[2]
a = to!T("42"w);
assert(a == 42);
}
}
}
/*@safe pure */unittest
{
alias AllInts = TypeTuple!(byte, ubyte, short, ushort, int, uint, long, ulong);
alias AllFloats = TypeTuple!(float, double, real);
alias AllNumerics = TypeTuple!(AllInts, AllFloats);
// test conversions to string
{
foreach (T; AllNumerics)
{
T a = 42;
assert(to!string(a) == "42");
//assert(to!wstring(a) == "42"w);
//assert(to!dstring(a) == "42"d);
// array test
// T[] b = new T[2];
// b[0] = 42;
// b[1] = 33;
// assert(to!string(b) == "[42,33]");
}
}
// test array to string conversion
foreach (T ; AllNumerics)
{
auto a = [to!T(1), 2, 3];
assert(to!string(a) == "[1, 2, 3]");
}
// test enum to int conversion
// enum Testing { Test1, Test2 };
// Testing t;
// auto a = to!string(t);
// assert(a == "0");
}
/**
String to non-string conversion runs parsing.
$(UL
$(LI When the source is a wide string, it is first converted to a narrow
string and then parsed.)
$(LI When the source is a narrow string, normal text parsing occurs.))
*/
T toImpl(T, S)(S value)
if ( isExactSomeString!S && isDynamicArray!S &&
!isExactSomeString!T && is(typeof(parse!T(value))))
{
scope(success)
{
if (value.length)
{
throw convError!(S, T)(value);
}
}
return parse!T(value);
}
/// ditto
T toImpl(T, S)(S value, uint radix)
if ( isExactSomeString!S && isDynamicArray!S &&
!isExactSomeString!T && is(typeof(parse!T(value, radix))))
{
scope(success)
{
if (value.length)
{
throw convError!(S, T)(value);
}
}
return parse!T(value, radix);
}
@safe pure unittest
{
// Issue 6668 - ensure no collaterals thrown
try { to!uint("-1"); }
catch (ConvException e) { assert(e.next is null); }
}
@safe pure unittest
{
foreach (Str; TypeTuple!(string, wstring, dstring))
{
Str a = "123";
assert(to!int(a) == 123);
assert(to!double(a) == 123);
}
// 6255
auto n = to!int("FF", 16);
assert(n == 255);
}
/**
Convert a value that is implicitly convertible to the enum base type
into an Enum value. If the value does not match any enum member values
a ConvException is thrown.
Enums with floating-point or string base types are not supported.
*/
T toImpl(T, S)(S value)
if (is(T == enum) && !is(S == enum)
&& is(typeof(value == OriginalType!T.init))
&& !isFloatingPoint!(OriginalType!T) && !isSomeString!(OriginalType!T))
{
foreach (Member; EnumMembers!T)
{
if (Member == value)
return Member;
}
import std.string : format;
throw new ConvException(format("Value (%s) does not match any member value of enum '%s'", value, T.stringof));
}
@safe pure unittest
{
import std.exception;
enum En8143 : int { A = 10, B = 20, C = 30, D = 20 }
enum En8143[][] m3 = to!(En8143[][])([[10, 30], [30, 10]]);
static assert(m3 == [[En8143.A, En8143.C], [En8143.C, En8143.A]]);
En8143 en1 = to!En8143(10);
assert(en1 == En8143.A);
assertThrown!ConvException(to!En8143(5)); // matches none
En8143[][] m1 = to!(En8143[][])([[10, 30], [30, 10]]);
assert(m1 == [[En8143.A, En8143.C], [En8143.C, En8143.A]]);
}
/***************************************************************
Rounded conversion from floating point to integral.
Example:
---------------
assert(roundTo!int(3.14) == 3);
assert(roundTo!int(3.49) == 3);
assert(roundTo!int(3.5) == 4);
assert(roundTo!int(3.999) == 4);
assert(roundTo!int(-3.14) == -3);
assert(roundTo!int(-3.49) == -3);
assert(roundTo!int(-3.5) == -4);
assert(roundTo!int(-3.999) == -4);
---------------
Rounded conversions do not work with non-integral target types.
*/
template roundTo(Target)
{
Target roundTo(Source)(Source value)
{
import std.math : trunc;
static assert(isFloatingPoint!Source);
static assert(isIntegral!Target);
return to!Target(trunc(value + (value < 0 ? -0.5L : 0.5L)));
}
}
unittest
{
import std.exception;
assert(roundTo!int(3.14) == 3);
assert(roundTo!int(3.49) == 3);
assert(roundTo!int(3.5) == 4);
assert(roundTo!int(3.999) == 4);
assert(roundTo!int(-3.14) == -3);
assert(roundTo!int(-3.49) == -3);
assert(roundTo!int(-3.5) == -4);
assert(roundTo!int(-3.999) == -4);
assert(roundTo!(const int)(to!(const double)(-3.999)) == -4);
// boundary values
foreach (Int; TypeTuple!(byte, ubyte, short, ushort, int, uint))
{
assert(roundTo!Int(Int.min - 0.4L) == Int.min);
assert(roundTo!Int(Int.max + 0.4L) == Int.max);
assertThrown!ConvOverflowException(roundTo!Int(Int.min - 0.5L));
assertThrown!ConvOverflowException(roundTo!Int(Int.max + 0.5L));
}
}
/***************************************************************
* The $(D_PARAM parse) family of functions works quite like the
* $(D_PARAM to) family, except that (1) it only works with character ranges
* as input, (2) takes the input by reference and advances it to
* the position following the conversion, and (3) does not throw if it
* could not convert the entire input. It still throws if an overflow
* occurred during conversion or if no character of the input
* was meaningfully converted.
*
* Example:
* --------------
* string test = "123 \t 76.14";
* auto a = parse!uint(test);
* assert(a == 123);
* assert(test == " \t 76.14"); // parse bumps string
* munch(test, " \t\n\r"); // skip ws
* assert(test == "76.14");
* auto b = parse!double(test);
* assert(b == 76.14);
* assert(test == "");
* --------------
*/
Target parse(Target, Source)(ref Source s)
if (isInputRange!Source &&
isSomeChar!(ElementType!Source) &&
is(Unqual!Target == bool))
{
import std.ascii : toLower;
if (!s.empty)
{
auto c1 = toLower(s.front);
bool result = (c1 == 't');
if (result || c1 == 'f')
{
s.popFront();
foreach (c; result ? "rue" : "alse")
{
if (s.empty || toLower(s.front) != c)
goto Lerr;
s.popFront();
}
return result;
}
}
Lerr:
throw parseError("bool should be case-insensitive 'true' or 'false'");
}
unittest
{
import std.exception;
import std.algorithm : equal;
struct InputString
{
string _s;
@property auto front() { return _s.front; }
@property bool empty() { return _s.empty; }
void popFront() { _s.popFront(); }
}
auto s = InputString("trueFALSETrueFalsetRUEfALSE");
assert(parse!bool(s) == true);
assert(s.equal("FALSETrueFalsetRUEfALSE"));
assert(parse!bool(s) == false);
assert(s.equal("TrueFalsetRUEfALSE"));
assert(parse!bool(s) == true);
assert(s.equal("FalsetRUEfALSE"));
assert(parse!bool(s) == false);
assert(s.equal("tRUEfALSE"));
assert(parse!bool(s) == true);
assert(s.equal("fALSE"));
assert(parse!bool(s) == false);
assert(s.empty);
foreach (ss; ["tfalse", "ftrue", "t", "f", "tru", "fals", ""])
{
s = InputString(ss);
assertThrown!ConvException(parse!bool(s));
}
}
Target parse(Target, Source)(ref Source s)
if (isSomeChar!(ElementType!Source) &&
isIntegral!Target && !is(Target == enum))
{
static if (Target.sizeof < int.sizeof)
{
// smaller types are handled like integers
auto v = .parse!(Select!(Target.min < 0, int, uint))(s);
auto result = ()@trusted{ return cast(Target) v; }();
if (result == v)
return result;
throw new ConvOverflowException("Overflow in integral conversion");
}
else
{
// Larger than int types
static if (Target.min < 0)
bool sign = 0;
else
enum bool sign = 0;
enum char maxLastDigit = Target.min < 0 ? 7 : 5;
Unqual!(typeof(s.front)) c;
if (s.empty)
goto Lerr;
c = s.front;
s.popFront();
static if (Target.min < 0)
{
switch (c)
{
case '-':
sign = true;
goto case '+';
case '+':
if (s.empty)
goto Lerr;
c = s.front;
s.popFront();
break;
default:
break;
}
}
c -= '0';
if (c <= 9)
{
Target v = cast(Target)c;
while (!s.empty)
{
c = s.front - '0';
if (c > 9)
break;
if (v < Target.max/10 ||
(v == Target.max/10 && c <= maxLastDigit + sign))
{
v = cast(Target) (v * 10 + c);
s.popFront();
}
else
throw new ConvOverflowException("Overflow in integral conversion");
}
if (sign)
v = -v;
return v;
}
Lerr:
throw convError!(Source, Target)(s);
}
}
@safe pure unittest
{
string s = "123";
auto a = parse!int(s);
}
@safe pure unittest
{
foreach (Int; TypeTuple!(byte, ubyte, short, ushort, int, uint, long, ulong))
{
{
assert(to!Int("0") == 0);
static if (isSigned!Int)
{
assert(to!Int("+0") == 0);
assert(to!Int("-0") == 0);
}
}
static if (Int.sizeof >= byte.sizeof)
{
assert(to!Int("6") == 6);
assert(to!Int("23") == 23);
assert(to!Int("68") == 68);
assert(to!Int("127") == 0x7F);
static if (isUnsigned!Int)
{
assert(to!Int("255") == 0xFF);
}
static if (isSigned!Int)
{
assert(to!Int("+6") == 6);
assert(to!Int("+23") == 23);
assert(to!Int("+68") == 68);
assert(to!Int("+127") == 0x7F);
assert(to!Int("-6") == -6);
assert(to!Int("-23") == -23);
assert(to!Int("-68") == -68);
assert(to!Int("-128") == -128);
}
}
static if (Int.sizeof >= short.sizeof)
{
assert(to!Int("468") == 468);
assert(to!Int("32767") == 0x7FFF);
static if (isUnsigned!Int)
{
assert(to!Int("65535") == 0xFFFF);
}
static if (isSigned!Int)
{
assert(to!Int("+468") == 468);
assert(to!Int("+32767") == 0x7FFF);
assert(to!Int("-468") == -468);
assert(to!Int("-32768") == -32768);
}
}
static if (Int.sizeof >= int.sizeof)
{
assert(to!Int("2147483647") == 0x7FFFFFFF);
static if (isUnsigned!Int)
{
assert(to!Int("4294967295") == 0xFFFFFFFF);
}
static if (isSigned!Int)
{
assert(to!Int("+2147483647") == 0x7FFFFFFF);
assert(to!Int("-2147483648") == -2147483648);
}
}
static if (Int.sizeof >= long.sizeof)
{
assert(to!Int("9223372036854775807") == 0x7FFFFFFFFFFFFFFF);
static if (isUnsigned!Int)
{
assert(to!Int("18446744073709551615") == 0xFFFFFFFFFFFFFFFF);
}
static if (isSigned!Int)
{
assert(to!Int("+9223372036854775807") == 0x7FFFFFFFFFFFFFFF);
assert(to!Int("-9223372036854775808") == 0x8000000000000000);
}
}
}
}
@safe pure unittest
{
import std.exception;
// parsing error check
foreach (Int; TypeTuple!(byte, ubyte, short, ushort, int, uint, long, ulong))
{
{
immutable string[] errors1 =
[
"",
"-",
"+",
"-+",
" ",
" 0",
"0 ",
"- 0",
"1-",
"xx",
"123h",
"-+1",
"--1",
"+-1",
"++1",
];
foreach (j, s; errors1)
assertThrown!ConvException(to!Int(s));
}
// parse!SomeUnsigned cannot parse head sign.
static if (isUnsigned!Int)
{
immutable string[] errors2 =
[
"+5",
"-78",
];
foreach (j, s; errors2)
assertThrown!ConvException(to!Int(s));
}
}
// positive overflow check
foreach (i, Int; TypeTuple!(byte, ubyte, short, ushort, int, uint, long, ulong))
{
immutable string[] errors =
[
"128", // > byte.max
"256", // > ubyte.max
"32768", // > short.max
"65536", // > ushort.max
"2147483648", // > int.max
"4294967296", // > uint.max
"9223372036854775808", // > long.max
"18446744073709551616", // > ulong.max
];
foreach (j, s; errors[i..$])
assertThrown!ConvOverflowException(to!Int(s));
}
// negative overflow check
foreach (i, Int; TypeTuple!(byte, short, int, long))
{
immutable string[] errors =
[
"-129", // < byte.min
"-32769", // < short.min
"-2147483649", // < int.min
"-9223372036854775809", // < long.min
];
foreach (j, s; errors[i..$])
assertThrown!ConvOverflowException(to!Int(s));
}
}
@safe pure unittest
{
import std.exception;
assertCTFEable!({ string s = "1234abc"; assert(parse! int(s) == 1234 && s == "abc"); });
assertCTFEable!({ string s = "-1234abc"; assert(parse! int(s) == -1234 && s == "abc"); });
assertCTFEable!({ string s = "1234abc"; assert(parse!uint(s) == 1234 && s == "abc"); });
}
/// ditto
Target parse(Target, Source)(ref Source s, uint radix)
if (isSomeChar!(ElementType!Source) &&
isIntegral!Target && !is(Target == enum))
in
{
assert(radix >= 2 && radix <= 36);
}
body
{
import core.checkedint : mulu, addu;
if (radix == 10)
return parse!Target(s);
immutable uint beyond = (radix < 10 ? '0' : 'a'-10) + radix;
Target v = 0;
size_t atStart = true;
for (; !s.empty; s.popFront())
{
uint c = s.front;
if (c < '0')
break;
if (radix < 10)
{
if (c >= beyond)
break;
}
else
{
if (c > '9')
{
c |= 0x20;//poorman's tolower
if (c < 'a' || c >= beyond)
break;
c -= 'a'-10-'0';
}
}
bool overflow = false;
auto nextv = v.mulu(radix, overflow).addu(c - '0', overflow);
if (overflow || nextv > Target.max)
goto Loverflow;
v = cast(Target) nextv;
atStart = false;
}
if (atStart)
goto Lerr;
return v;
Loverflow:
throw new ConvOverflowException("Overflow in integral conversion");
Lerr:
throw convError!(Source, Target)(s, radix);
}
@safe pure unittest
{
// @@@BUG@@@ the size of China
// foreach (i; 2..37)
// {
// assert(parse!int("0",i) == 0);
// assert(parse!int("1",i) == 1);
// assert(parse!byte("10",i) == i);
// }
foreach (i; 2..37)
{
string s = "0";
assert(parse!int(s,i) == 0);
s = "1";
assert(parse!int(s,i) == 1);
s = "10";
assert(parse!byte(s,i) == i);
}
// Same @@@BUG@@@ as above
//assert(parse!int("0011001101101", 2) == 0b0011001101101);
// assert(parse!int("765",8) == 0765);
// assert(parse!int("fCDe",16) == 0xfcde);
auto s = "0011001101101";
assert(parse!int(s, 2) == 0b0011001101101);
s = "765";
assert(parse!int(s, 8) == octal!765);
s = "fCDe";
assert(parse!int(s, 16) == 0xfcde);
// 6609
s = "-42";
assert(parse!int(s, 10) == -42);
}
@safe pure unittest // bugzilla 7302
{
import std.range : cycle;
auto r = cycle("2A!");
auto u = parse!uint(r, 16);
assert(u == 42);
assert(r.front == '!');
}
@safe pure unittest // bugzilla 13163
{
import std.exception;
foreach (s; ["fff", "123"])
assertThrown!ConvOverflowException(s.parse!ubyte(16));
}
Target parse(Target, Source)(ref Source s)
if (isExactSomeString!Source &&
is(Target == enum))
{
import std.algorithm : startsWith;
Target result;
size_t longest_match = 0;
foreach (i, e; EnumMembers!Target)
{
auto ident = __traits(allMembers, Target)[i];
if (longest_match < ident.length && s.startsWith(ident))
{
result = e;
longest_match = ident.length ;
}
}
if (longest_match > 0)
{
s = s[longest_match .. $];
return result ;
}
throw new ConvException(
Target.stringof ~ " does not have a member named '"
~ to!string(s) ~ "'");
}
unittest
{
import std.exception;
enum EB : bool { a = true, b = false, c = a }
enum EU { a, b, c }
enum EI { a = -1, b = 0, c = 1 }
enum EF : real { a = 1.414, b = 1.732, c = 2.236 }
enum EC : char { a = 'a', b = 'b', c = 'c' }
enum ES : string { a = "aaa", b = "bbb", c = "ccc" }
foreach (E; TypeTuple!(EB, EU, EI, EF, EC, ES))
{
assert(to!E("a"c) == E.a);
assert(to!E("b"w) == E.b);
assert(to!E("c"d) == E.c);
assertThrown!ConvException(to!E("d"));
}
}
@safe pure unittest // bugzilla 4744
{
enum A { member1, member11, member111 }
assert(to!A("member1" ) == A.member1 );
assert(to!A("member11" ) == A.member11 );
assert(to!A("member111") == A.member111);
auto s = "member1111";
assert(parse!A(s) == A.member111 && s == "1");
}
Target parse(Target, Source)(ref Source p)
if (isInputRange!Source && isSomeChar!(ElementType!Source) && !is(Source == enum) &&
isFloatingPoint!Target && !is(Target == enum))
{
import std.ascii : isDigit, isAlpha, toLower, toUpper, isHexDigit;
import std.exception : enforce;
import core.stdc.math : HUGE_VAL;
static immutable real[14] negtab =
[ 1e-4096L,1e-2048L,1e-1024L,1e-512L,1e-256L,1e-128L,1e-64L,1e-32L,
1e-16L,1e-8L,1e-4L,1e-2L,1e-1L,1.0L ];
static immutable real[13] postab =
[ 1e+4096L,1e+2048L,1e+1024L,1e+512L,1e+256L,1e+128L,1e+64L,1e+32L,
1e+16L,1e+8L,1e+4L,1e+2L,1e+1L ];
// static immutable string infinity = "infinity";
// static immutable string nans = "nans";
ConvException bailOut()(string msg = null, string fn = __FILE__, size_t ln = __LINE__)
{
if (!msg)
msg = "Floating point conversion error";
return new ConvException(text(msg, " for input \"", p, "\"."), fn, ln);
}
enforce(!p.empty, bailOut());
char sign = 0; /* indicating + */
switch (p.front)
{
case '-':
sign++;
p.popFront();
enforce(!p.empty, bailOut());
if (toLower(p.front) == 'i')
goto case 'i';
enforce(!p.empty, bailOut());
break;
case '+':
p.popFront();
enforce(!p.empty, bailOut());
break;
case 'i': case 'I':
p.popFront();
enforce(!p.empty, bailOut());
if (toLower(p.front) == 'n')
{
p.popFront();
enforce(!p.empty, bailOut());
if (toLower(p.front) == 'f')
{
// 'inf'
p.popFront();
return sign ? -Target.infinity : Target.infinity;
}
}
goto default;
default: {}
}
bool isHex = false;
bool startsWithZero = p.front == '0';
if(startsWithZero)
{
p.popFront();
if(p.empty)
{
return (sign) ? -0.0 : 0.0;
}
isHex = p.front == 'x' || p.front == 'X';
}
real ldval = 0.0;
char dot = 0; /* if decimal point has been seen */
int exp = 0;
long msdec = 0, lsdec = 0;
ulong msscale = 1;
if (isHex)
{
int guard = 0;
int anydigits = 0;
uint ndigits = 0;
p.popFront();
while (!p.empty)
{
int i = p.front;
while (isHexDigit(i))
{
anydigits = 1;
i = isAlpha(i) ? ((i & ~0x20) - ('A' - 10)) : i - '0';
if (ndigits < 16)
{
msdec = msdec * 16 + i;
if (msdec)
ndigits++;
}
else if (ndigits == 16)
{
while (msdec >= 0)
{
exp--;
msdec <<= 1;
i <<= 1;
if (i & 0x10)
msdec |= 1;
}
guard = i << 4;
ndigits++;
exp += 4;
}
else
{
guard |= i;
exp += 4;
}
exp -= dot;
p.popFront();
if (p.empty)
break;
i = p.front;
if (i == '_')
{
p.popFront();
if (p.empty)
break;
i = p.front;
}
}
if (i == '.' && !dot)
{
p.popFront();
dot = 4;
}
else
break;
}
// Round up if (guard && (sticky || odd))
if (guard & 0x80 && (guard & 0x7F || msdec & 1))
{
msdec++;
if (msdec == 0) // overflow
{
msdec = 0x8000000000000000L;
exp++;
}
}
enforce(anydigits, bailOut());
enforce(!p.empty && (p.front == 'p' || p.front == 'P'),
bailOut("Floating point parsing: exponent is required"));
char sexp;
int e;
sexp = 0;
p.popFront();
if (!p.empty)
{
switch (p.front)
{
case '-': sexp++;
goto case;
case '+': p.popFront(); enforce(!p.empty,
new ConvException("Error converting input"~
" to floating point"));
break;
default: {}
}
}
ndigits = 0;
e = 0;
while (!p.empty && isDigit(p.front))
{
if (e < 0x7FFFFFFF / 10 - 10) // prevent integer overflow
{
e = e * 10 + p.front - '0';
}
p.popFront();
ndigits = 1;
}
exp += (sexp) ? -e : e;
enforce(ndigits, new ConvException("Error converting input"~
" to floating point"));
static if (real.mant_dig == 64)
{
if (msdec)
{
int e2 = 0x3FFF + 63;
// left justify mantissa
while (msdec >= 0)
{
msdec <<= 1;
e2--;
}
// Stuff mantissa directly into real
()@trusted{ *cast(long*)&ldval = msdec; }();
()@trusted{ (cast(ushort*)&ldval)[4] = cast(ushort) e2; }();
import std.math : ldexp;
// Exponent is power of 2, not power of 10
ldval = ldexp(ldval,exp);
}
}
else static if (real.mant_dig == 53)
{
if (msdec)
{
//Exponent bias + 52:
//After shifting 52 times left, exp must be 1
int e2 = 0x3FF + 52;
// right justify mantissa
// first 11 bits must be zero, rest is implied bit + mantissa
// shift one time less, do rounding, shift again
while ((msdec & 0xFFC0_0000_0000_0000) != 0)
{
msdec = ((cast(ulong)msdec) >> 1);
e2++;
}
//Have to shift one more time
//and do rounding
if((msdec & 0xFFE0_0000_0000_0000) != 0)
{
auto roundUp = (msdec & 0x1);
msdec = ((cast(ulong)msdec) >> 1);
e2++;
if(roundUp)
{
msdec += 1;
//If mantissa was 0b1111... and we added +1
//the mantissa should be 0b10000 (think of implicit bit)
//and the exponent increased
if((msdec & 0x0020_0000_0000_0000) != 0)
{
msdec = 0x0010_0000_0000_0000;
e2++;
}
}
}
// left justify mantissa
// bit 11 must be 1
while ((msdec & 0x0010_0000_0000_0000) == 0)
{
msdec <<= 1;
e2--;
}
// Stuff mantissa directly into double
// (first including implicit bit)
()@trusted{ *cast(long *)&ldval = msdec; }();
//Store exponent, now overwriting implicit bit
()@trusted{ *cast(long *)&ldval &= 0x000F_FFFF_FFFF_FFFF; }();
()@trusted{ *cast(long *)&ldval |= ((e2 & 0xFFFUL) << 52); }();
import std.math : ldexp;
// Exponent is power of 2, not power of 10
ldval = ldexp(ldval,exp);
}
}
else
static assert(false, "Floating point format of real type not supported");
goto L6;
}
else // not hex
{
if (toUpper(p.front) == 'N' && !startsWithZero)
{
// nan
p.popFront();
enforce(!p.empty && toUpper(p.front) == 'A',
new ConvException("error converting input to floating point"));
p.popFront();
enforce(!p.empty && toUpper(p.front) == 'N',
new ConvException("error converting input to floating point"));
// skip past the last 'n'
p.popFront();
return typeof(return).nan;
}
bool sawDigits = startsWithZero;
while (!p.empty)
{
int i = p.front;
while (isDigit(i))
{
sawDigits = true; /* must have at least 1 digit */
if (msdec < (0x7FFFFFFFFFFFL-10)/10)
msdec = msdec * 10 + (i - '0');
else if (msscale < (0xFFFFFFFF-10)/10)
{
lsdec = lsdec * 10 + (i - '0');
msscale *= 10;
}
else
{
exp++;
}
exp -= dot;
p.popFront();
if (p.empty)
break;
i = p.front;
if (i == '_')
{
p.popFront();
if (p.empty)
break;
i = p.front;
}
}
if (i == '.' && !dot)
{
p.popFront();
dot++;
}
else
{
break;
}
}
enforce(sawDigits, new ConvException("no digits seen"));
}
if (!p.empty && (p.front == 'e' || p.front == 'E'))
{
char sexp;
int e;
sexp = 0;
p.popFront();
enforce(!p.empty, new ConvException("Unexpected end of input"));
switch (p.front)
{
case '-': sexp++;
goto case;
case '+': p.popFront();
break;
default: {}
}
bool sawDigits = 0;
e = 0;
while (!p.empty && isDigit(p.front))
{
if (e < 0x7FFFFFFF / 10 - 10) // prevent integer overflow
{
e = e * 10 + p.front - '0';
}
p.popFront();
sawDigits = 1;
}
exp += (sexp) ? -e : e;
enforce(sawDigits, new ConvException("No digits seen."));
}
ldval = msdec;
if (msscale != 1) /* if stuff was accumulated in lsdec */
ldval = ldval * msscale + lsdec;
if (ldval)
{
uint u = 0;
int pow = 4096;
while (exp > 0)
{
while (exp >= pow)
{
ldval *= postab[u];
exp -= pow;
}
pow >>= 1;
u++;
}
while (exp < 0)
{
while (exp <= -pow)
{
ldval *= negtab[u];
enforce(ldval != 0, new ConvException("Range error"));
exp += pow;
}
pow >>= 1;
u++;
}
}
L6: // if overflow occurred
enforce(ldval != HUGE_VAL, new ConvException("Range error"));
L1:
return (sign) ? -ldval : ldval;
}
unittest
{
import std.exception;
import std.math : isNaN, fabs;
// Compare reals with given precision
bool feq(in real rx, in real ry, in real precision = 0.000001L)
{
if (rx == ry)
return 1;
if (isNaN(rx))
return cast(bool)isNaN(ry);
if (isNaN(ry))
return 0;
return cast(bool)(fabs(rx - ry) <= precision);
}
// Make given typed literal
F Literal(F)(F f)
{
return f;
}
foreach (Float; TypeTuple!(float, double, real))
{
assert(to!Float("123") == Literal!Float(123));
assert(to!Float("+123") == Literal!Float(+123));
assert(to!Float("-123") == Literal!Float(-123));
assert(to!Float("123e2") == Literal!Float(123e2));
assert(to!Float("123e+2") == Literal!Float(123e+2));
assert(to!Float("123e-2") == Literal!Float(123e-2));
assert(to!Float("123.") == Literal!Float(123.0));
assert(to!Float(".375") == Literal!Float(.375));
assert(to!Float("1.23375E+2") == Literal!Float(1.23375E+2));
assert(to!Float("0") is 0.0);
assert(to!Float("-0") is -0.0);
assert(isNaN(to!Float("nan")));
assertThrown!ConvException(to!Float("\x00"));
}
// min and max
float f = to!float("1.17549e-38");
assert(feq(cast(real)f, cast(real)1.17549e-38));
assert(feq(cast(real)f, cast(real)float.min_normal));
f = to!float("3.40282e+38");
assert(to!string(f) == to!string(3.40282e+38));
// min and max
double d = to!double("2.22508e-308");
assert(feq(cast(real)d, cast(real)2.22508e-308));
assert(feq(cast(real)d, cast(real)double.min_normal));
d = to!double("1.79769e+308");
assert(to!string(d) == to!string(1.79769e+308));
assert(to!string(d) == to!string(double.max));
assert(to!string(to!real(to!string(real.max / 2L))) == to!string(real.max / 2L));
// min and max
real r = to!real(to!string(real.min_normal));
assert(to!string(r) == to!string(real.min_normal));
r = to!real(to!string(real.max));
assert(to!string(r) == to!string(real.max));
}
//Tests for the double implementation
unittest
{
import core.stdc.stdlib, std.math;
static if(real.mant_dig == 53)
{
//Should be parsed exactly: 53 bit mantissa
string s = "0x1A_BCDE_F012_3456p10";
auto x = parse!real(s);
assert(x == 0x1A_BCDE_F012_3456p10L);
//1 bit is implicit
assert(((*cast(ulong*)&x) & 0x000F_FFFF_FFFF_FFFF) == 0xA_BCDE_F012_3456);
assert(strtod("0x1ABCDEF0123456p10", null) == x);
//Should be parsed exactly: 10 bit mantissa
s = "0x3FFp10";
x = parse!real(s);
assert(x == 0x03FFp10);
//1 bit is implicit
assert(((*cast(ulong*)&x) & 0x000F_FFFF_FFFF_FFFF) == 0x000F_F800_0000_0000);
assert(strtod("0x3FFp10", null) == x);
//60 bit mantissa, round up
s = "0xFFF_FFFF_FFFF_FFFFp10";
x = parse!real(s);
assert(approxEqual(x, 0xFFF_FFFF_FFFF_FFFFp10));
//1 bit is implicit
assert(((*cast(ulong*)&x) & 0x000F_FFFF_FFFF_FFFF) == 0x0000_0000_0000_0000);
assert(strtod("0xFFFFFFFFFFFFFFFp10", null) == x);
//60 bit mantissa, round down
s = "0xFFF_FFFF_FFFF_FF90p10";
x = parse!real(s);
assert(approxEqual(x, 0xFFF_FFFF_FFFF_FF90p10));
//1 bit is implicit
assert(((*cast(ulong*)&x) & 0x000F_FFFF_FFFF_FFFF) == 0x000F_FFFF_FFFF_FFFF);
assert(strtod("0xFFFFFFFFFFFFF90p10", null) == x);
//61 bit mantissa, round up 2
s = "0x1F0F_FFFF_FFFF_FFFFp10";
x = parse!real(s);
assert(approxEqual(x, 0x1F0F_FFFF_FFFF_FFFFp10));
//1 bit is implicit
assert(((*cast(ulong*)&x) & 0x000F_FFFF_FFFF_FFFF) == 0x000F_1000_0000_0000);
assert(strtod("0x1F0FFFFFFFFFFFFFp10", null) == x);
//61 bit mantissa, round down 2
s = "0x1F0F_FFFF_FFFF_FF10p10";
x = parse!real(s);
assert(approxEqual(x, 0x1F0F_FFFF_FFFF_FF10p10));
//1 bit is implicit
assert(((*cast(ulong*)&x) & 0x000F_FFFF_FFFF_FFFF) == 0x000F_0FFF_FFFF_FFFF);
assert(strtod("0x1F0FFFFFFFFFFF10p10", null) == x);
//Huge exponent
s = "0x1F_FFFF_FFFF_FFFFp900";
x = parse!real(s);
assert(strtod("0x1FFFFFFFFFFFFFp900", null) == x);
//exponent too big -> converror
s = "";
assertThrown!ConvException(x = parse!real(s));
assert(strtod("0x1FFFFFFFFFFFFFp1024", null) == real.infinity);
//-exponent too big -> 0
s = "0x1FFFFFFFFFFFFFp-2000";
x = parse!real(s);
assert(x == 0);
assert(strtod("0x1FFFFFFFFFFFFFp-2000", null) == x);
}
}
unittest
{
import core.stdc.errno;
import core.stdc.stdlib;
errno = 0; // In case it was set by another unittest in a different module.
struct longdouble
{
static if(real.mant_dig == 64)
{
ushort[5] value;
}
else static if(real.mant_dig == 53)
{
ushort[4] value;
}
else
static assert(false, "Not implemented");
}
real ld;
longdouble x;
real ld1;
longdouble x1;
int i;
static if(real.mant_dig == 64)
enum s = "0x1.FFFFFFFFFFFFFFFEp-16382";
else static if(real.mant_dig == 53)
enum s = "0x1.FFFFFFFFFFFFFFFEp-1000";
else
static assert(false, "Floating point format for real not supported");
auto s2 = s.idup;
ld = parse!real(s2);
assert(s2.empty);
x = *cast(longdouble *)&ld;
version (CRuntime_Microsoft)
ld1 = 0x1.FFFFFFFFFFFFFFFEp-16382L; // strtold currently mapped to strtod
else version (Android)
ld1 = 0x1.FFFFFFFFFFFFFFFEp-16382L; // strtold currently mapped to strtod
else
ld1 = strtold(s.ptr, null);
x1 = *cast(longdouble *)&ld1;
assert(x1 == x && ld1 == ld);
// for (i = 4; i >= 0; i--)
// {
// printf("%04x ", x.value[i]);
// }
// printf("\n");
assert(!errno);
s2 = "1.0e5";
ld = parse!real(s2);
assert(s2.empty);
x = *cast(longdouble *)&ld;
ld1 = strtold("1.0e5", null);
x1 = *cast(longdouble *)&ld1;
// for (i = 4; i >= 0; i--)
// {
// printf("%04x ", x.value[i]);
// }
// printf("\n");
}
@safe pure unittest
{
import std.exception;
// Bugzilla 4959
{
auto s = "0 ";
auto x = parse!double(s);
assert(s == " ");
assert(x == 0.0);
}
// Bugzilla 3369
assert(to!float("inf") == float.infinity);
assert(to!float("-inf") == -float.infinity);
// Bugzilla 6160
assert(6_5.536e3L == to!real("6_5.536e3")); // 2^16
assert(0x1000_000_000_p10 == to!real("0x1000_000_000_p10")); // 7.03687e+13
// Bugzilla 6258
assertThrown!ConvException(to!real("-"));
assertThrown!ConvException(to!real("in"));
// Bugzilla 7055
assertThrown!ConvException(to!float("INF2"));
//extra stress testing
auto ssOK = ["1.", "1.1.1", "1.e5", "2e1e", "2a", "2e1_1",
"inf", "-inf", "infa", "-infa", "inf2e2", "-inf2e2"];
auto ssKO = ["", " ", "2e", "2e+", "2e-", "2ee", "2e++1", "2e--1", "2e_1", "+inf"];
foreach (s; ssOK)
parse!double(s);
foreach (s; ssKO)
assertThrown!ConvException(parse!double(s));
}
/**
Parsing one character off a string returns the character and bumps the
string up one position.
*/
Target parse(Target, Source)(ref Source s)
if (isExactSomeString!Source &&
staticIndexOf!(Unqual!Target, dchar, Unqual!(ElementEncodingType!Source)) >= 0)
{
if (s.empty)
throw convError!(Source, Target)(s);
static if (is(Unqual!Target == dchar))
{
Target result = s.front;
s.popFront();
return result;
}
else
{
// Special case: okay so parse a Char off a Char[]
Target result = s[0];
s = s[1 .. $];
return result;
}
}
@safe pure unittest
{
foreach (Str; TypeTuple!(string, wstring, dstring))
{
foreach (Char; TypeTuple!(char, wchar, dchar))
{
static if (is(Unqual!Char == dchar) ||
Char.sizeof == ElementEncodingType!Str.sizeof)
{
Str s = "aaa";
assert(parse!Char(s) == 'a');
assert(s == "aa");
}
}
}
}
Target parse(Target, Source)(ref Source s)
if (!isSomeString!Source && isInputRange!Source && isSomeChar!(ElementType!Source) &&
isSomeChar!Target && Target.sizeof >= ElementType!Source.sizeof && !is(Target == enum))
{
if (s.empty)
throw convError!(Source, Target)(s);
Target result = s.front;
s.popFront();
return result;
}
/*
Tests for to!bool and parse!bool
*/
@safe pure unittest
{
import std.exception;
assert (to!bool("TruE") == true);
assert (to!bool("faLse"d) == false);
assertThrown!ConvException(to!bool("maybe"));
auto t = "TrueType";
assert (parse!bool(t) == true);
assert (t == "Type");
auto f = "False killer whale"d;
assert (parse!bool(f) == false);
assert (f == " killer whale"d);
auto m = "maybe";
assertThrown!ConvException(parse!bool(m));
assert (m == "maybe"); // m shouldn't change on failure
auto s = "true";
auto b = parse!(const(bool))(s);
assert(b == true);
}
// input range to null literal conversions
Target parse(Target, Source)(ref Source s)
if (isInputRange!Source &&
isSomeChar!(ElementType!Source) &&
is(Unqual!Target == typeof(null)))
{
import std.ascii : toLower;
foreach (c; "null")
{
if (s.empty || toLower(s.front) != c)
throw parseError("null should be case-insensitive 'null'");
s.popFront();
}
return null;
}
@safe pure unittest
{
import std.exception;
alias NullType = typeof(null);
auto s1 = "null";
assert(parse!NullType(s1) is null);
assert(s1 == "");
auto s2 = "NUll"d;
assert(parse!NullType(s2) is null);
assert(s2 == "");
auto m = "maybe";
assertThrown!ConvException(parse!NullType(m));
assert(m == "maybe"); // m shouldn't change on failure
auto s = "NULL";
assert(parse!(const NullType)(s) is null);
}
//Used internally by parse Array/AA, to remove ascii whites
package void skipWS(R)(ref R r)
{
import std.ascii : isWhite;
static if (isSomeString!R)
{
//Implementation inspired from stripLeft.
foreach (i, dchar c; r)
{
if (!isWhite(c))
{
r = r[i .. $];
return;
}
}
r = r[0 .. 0]; //Empty string with correct type.
return;
}
else
{
for (; !r.empty && isWhite(r.front); r.popFront())
{}
}
}
/**
* Parses an array from a string given the left bracket (default $(D
* '[')), right bracket (default $(D ']')), and element separator (by
* default $(D ',')).
*/
Target parse(Target, Source)(ref Source s, dchar lbracket = '[', dchar rbracket = ']', dchar comma = ',')
if (isExactSomeString!Source &&
isDynamicArray!Target && !is(Target == enum))
{
Target result;
parseCheck!s(lbracket);
skipWS(s);
if (s.empty)
throw convError!(Source, Target)(s);
if (s.front == rbracket)
{
s.popFront();
return result;
}
for (;; s.popFront(), skipWS(s))
{
result ~= parseElement!(ElementType!Target)(s);
skipWS(s);
if (s.empty)
throw convError!(Source, Target)(s);
if (s.front != comma)
break;
}
parseCheck!s(rbracket);
return result;
}
unittest
{
int[] a = [1, 2, 3, 4, 5];
auto s = to!string(a);
assert(to!(int[])(s) == a);
}
unittest
{
int[][] a = [ [1, 2] , [3], [4, 5] ];
auto s = to!string(a);
assert(to!(int[][])(s) == a);
}
unittest
{
int[][][] ia = [ [[1,2],[3,4],[5]] , [[6],[],[7,8,9]] , [[]] ];
char[] s = to!(char[])(ia);
int[][][] ia2;
ia2 = to!(typeof(ia2))(s);
assert( ia == ia2);
}
@safe pure unittest
{
auto s1 = `[['h', 'e', 'l', 'l', 'o'], "world"]`;
auto a1 = parse!(string[])(s1);
assert(a1 == ["hello", "world"]);
auto s2 = `["aaa", "bbb", "ccc"]`;
auto a2 = parse!(string[])(s2);
assert(a2 == ["aaa", "bbb", "ccc"]);
}
@safe pure unittest
{
import std.exception;
//Check proper failure
auto s = "[ 1 , 2 , 3 ]";
foreach (i ; 0..s.length-1)
{
auto ss = s[0 .. i];
assertThrown!ConvException(parse!(int[])(ss));
}
int[] arr = parse!(int[])(s);
}
@safe pure unittest
{
//Checks parsing of strings with escaped characters
string s1 = `[
"Contains a\0null!",
"tab\there",
"line\nbreak",
"backslash \\ slash / question \?",
"number \x35 five",
"unicode \u65E5 sun",
"very long \U000065E5 sun"
]`;
//Note: escaped characters purposefully replaced and isolated to guarantee
//there are no typos in the escape syntax
string[] s2 = [
"Contains a" ~ '\0' ~ "null!",
"tab" ~ '\t' ~ "here",
"line" ~ '\n' ~ "break",
"backslash " ~ '\\' ~ " slash / question ?",
"number 5 five",
"unicode 日 sun",
"very long 日 sun"
];
assert(s2 == parse!(string[])(s1));
assert(s1.empty);
}
/// ditto
Target parse(Target, Source)(ref Source s, dchar lbracket = '[', dchar rbracket = ']', dchar comma = ',')
if (isExactSomeString!Source &&
isStaticArray!Target && !is(Target == enum))
{
static if (hasIndirections!Target)
Target result = Target.init[0].init;
else
Target result = void;
parseCheck!s(lbracket);
skipWS(s);
if (s.empty)
throw convError!(Source, Target)(s);
if (s.front == rbracket)
{
static if (result.length != 0)
goto Lmanyerr;
else
{
s.popFront();
return result;
}
}
for (size_t i = 0; ; s.popFront(), skipWS(s))
{
if (i == result.length)
goto Lmanyerr;
result[i++] = parseElement!(ElementType!Target)(s);
skipWS(s);
if (s.empty)
throw convError!(Source, Target)(s);
if (s.front != comma)
{
if (i != result.length)
goto Lfewerr;
break;
}
}
parseCheck!s(rbracket);
return result;
Lmanyerr:
throw parseError(text("Too many elements in input, ", result.length, " elements expected."));
Lfewerr:
throw parseError(text("Too few elements in input, ", result.length, " elements expected."));
}
@safe pure unittest
{
import std.exception;
auto s1 = "[1,2,3,4]";
auto sa1 = parse!(int[4])(s1);
assert(sa1 == [1,2,3,4]);
auto s2 = "[[1],[2,3],[4]]";
auto sa2 = parse!(int[][3])(s2);
assert(sa2 == [[1],[2,3],[4]]);
auto s3 = "[1,2,3]";
assertThrown!ConvException(parse!(int[4])(s3));
auto s4 = "[1,2,3,4,5]";
assertThrown!ConvException(parse!(int[4])(s4));
}
/**
* Parses an associative array from a string given the left bracket (default $(D
* '[')), right bracket (default $(D ']')), key-value separator (default $(D
* ':')), and element seprator (by default $(D ',')).
*/
Target parse(Target, Source)(ref Source s, dchar lbracket = '[', dchar rbracket = ']', dchar keyval = ':', dchar comma = ',')
if (isExactSomeString!Source &&
isAssociativeArray!Target && !is(Target == enum))
{
alias KeyType = typeof(Target.init.keys[0]);
alias ValType = typeof(Target.init.values[0]);
Target result;
parseCheck!s(lbracket);
skipWS(s);
if (s.empty)
throw convError!(Source, Target)(s);
if (s.front == rbracket)
{
s.popFront();
return result;
}
for (;; s.popFront(), skipWS(s))
{
auto key = parseElement!KeyType(s);
skipWS(s);
parseCheck!s(keyval);
skipWS(s);
auto val = parseElement!ValType(s);
skipWS(s);
result[key] = val;
if (s.empty)
throw convError!(Source, Target)(s);
if (s.front != comma)
break;
}
parseCheck!s(rbracket);
return result;
}
@safe pure unittest
{
auto s1 = "[1:10, 2:20, 3:30]";
auto aa1 = parse!(int[int])(s1);
assert(aa1 == [1:10, 2:20, 3:30]);
auto s2 = `["aaa":10, "bbb":20, "ccc":30]`;
auto aa2 = parse!(int[string])(s2);
assert(aa2 == ["aaa":10, "bbb":20, "ccc":30]);
auto s3 = `["aaa":[1], "bbb":[2,3], "ccc":[4,5,6]]`;
auto aa3 = parse!(int[][string])(s3);
assert(aa3 == ["aaa":[1], "bbb":[2,3], "ccc":[4,5,6]]);
}
@safe pure unittest
{
import std.exception;
//Check proper failure
auto s = "[1:10, 2:20, 3:30]";
foreach (i ; 0 .. s.length-1)
{
auto ss = s[0 .. i];
assertThrown!ConvException(parse!(int[int])(ss));
}
int[int] aa = parse!(int[int])(s);
}
private dchar parseEscape(Source)(ref Source s)
if (isInputRange!Source && isSomeChar!(ElementType!Source))
{
parseCheck!s('\\');
if (s.empty)
throw parseError("Unterminated escape sequence");
dchar getHexDigit()(ref Source s_ = s) // workaround
{
import std.ascii : isAlpha, isHexDigit;
if (s_.empty)
throw parseError("Unterminated escape sequence");
s_.popFront();
if (s_.empty)
throw parseError("Unterminated escape sequence");
dchar c = s_.front;
if (!isHexDigit(c))
throw parseError("Hex digit is missing");
return isAlpha(c) ? ((c & ~0x20) - ('A' - 10)) : c - '0';
}
dchar result;
switch (s.front)
{
case '"': result = '\"'; break;
case '\'': result = '\''; break;
case '0': result = '\0'; break;
case '?': result = '\?'; break;
case '\\': result = '\\'; break;
case 'a': result = '\a'; break;
case 'b': result = '\b'; break;
case 'f': result = '\f'; break;
case 'n': result = '\n'; break;
case 'r': result = '\r'; break;
case 't': result = '\t'; break;
case 'v': result = '\v'; break;
case 'x':
result = getHexDigit() << 4;
result |= getHexDigit();
break;
case 'u':
result = getHexDigit() << 12;
result |= getHexDigit() << 8;
result |= getHexDigit() << 4;
result |= getHexDigit();
break;
case 'U':
result = getHexDigit() << 28;
result |= getHexDigit() << 24;
result |= getHexDigit() << 20;
result |= getHexDigit() << 16;
result |= getHexDigit() << 12;
result |= getHexDigit() << 8;
result |= getHexDigit() << 4;
result |= getHexDigit();
break;
default:
throw parseError("Unknown escape character " ~ to!string(s.front));
}
if (s.empty)
throw parseError("Unterminated escape sequence");
s.popFront();
return result;
}
@safe pure unittest
{
string[] s1 = [
`\"`, `\'`, `\?`, `\\`, `\a`, `\b`, `\f`, `\n`, `\r`, `\t`, `\v`, //Normal escapes
//`\141`, //@@@9621@@@ Octal escapes.
`\x61`,
`\u65E5`, `\U00012456`
//`\&`, `\"`, //@@@9621@@@ Named Character Entities.
];
const(dchar)[] s2 = [
'\"', '\'', '\?', '\\', '\a', '\b', '\f', '\n', '\r', '\t', '\v', //Normal escapes
//'\141', //@@@9621@@@ Octal escapes.
'\x61',
'\u65E5', '\U00012456'
//'\&', '\"', //@@@9621@@@ Named Character Entities.
];
foreach (i ; 0 .. s1.length)
{
assert(s2[i] == parseEscape(s1[i]));
assert(s1[i].empty);
}
}
@safe pure unittest
{
import std.exception;
string[] ss = [
`hello!`, //Not an escape
`\`, //Premature termination
`\/`, //Not an escape
`\gggg`, //Not an escape
`\xzz`, //Not an hex
`\x0`, //Premature hex end
`\XB9`, //Not legal hex syntax
`\u!!`, //Not a unicode hex
`\777`, //Octal is larger than a byte //Note: Throws, but simply because octals are unsupported
`\u123`, //Premature hex end
`\U123123` //Premature hex end
];
foreach (s ; ss)
assertThrown!ConvException(parseEscape(s));
}
// Undocumented
Target parseElement(Target, Source)(ref Source s)
if (isInputRange!Source && isSomeChar!(ElementType!Source) && !is(Source == enum) &&
isExactSomeString!Target)
{
import std.array : appender;
auto result = appender!Target();
// parse array of chars
if (s.empty)
throw convError!(Source, Target)(s);
if (s.front == '[')
return parse!Target(s);
parseCheck!s('\"');
if (s.empty)
throw convError!(Source, Target)(s);
if (s.front == '\"')
{
s.popFront();
return result.data;
}
while (true)
{
if (s.empty)
throw parseError("Unterminated quoted string");
switch (s.front)
{
case '\"':
s.popFront();
return result.data;
case '\\':
result.put(parseEscape(s));
break;
default:
result.put(s.front);
s.popFront();
break;
}
}
assert(0);
}
// ditto
Target parseElement(Target, Source)(ref Source s)
if (isInputRange!Source && isSomeChar!(ElementType!Source) && !is(Source == enum) &&
isSomeChar!Target && !is(Target == enum))
{
Target c;
parseCheck!s('\'');
if (s.empty)
throw convError!(Source, Target)(s);
if (s.front != '\\')
{
c = s.front;
s.popFront();
}
else
c = parseEscape(s);
parseCheck!s('\'');
return c;
}
// ditto
Target parseElement(Target, Source)(ref Source s)
if (isInputRange!Source && isSomeChar!(ElementType!Source) &&
!isSomeString!Target && !isSomeChar!Target)
{
return parse!Target(s);
}
/***************************************************************
* Convenience functions for converting any number and types of
* arguments into _text (the three character widths).
*/
string text(T...)(T args) { return textImpl!string(args); }
///ditto
wstring wtext(T...)(T args) { return textImpl!wstring(args); }
///ditto
dstring dtext(T...)(T args) { return textImpl!dstring(args); }
private S textImpl(S, U...)(U args)
{
static if (U.length == 0)
{
return null;
}
else
{
auto result = to!S(args[0]);
foreach (arg; args[1 .. $])
result ~= to!S(arg);
return result;
}
}
///
unittest
{
assert( text(42, ' ', 1.5, ": xyz") == "42 1.5: xyz"c);
assert(wtext(42, ' ', 1.5, ": xyz") == "42 1.5: xyz"w);
assert(dtext(42, ' ', 1.5, ": xyz") == "42 1.5: xyz"d);
}
unittest
{
assert(text() is null);
assert(wtext() is null);
assert(dtext() is null);
}
/***************************************************************
The $(D octal) facility is intended as an experimental facility to
replace _octal literals starting with $(D '0'), which many find
confusing. Using $(D octal!177) or $(D octal!"177") instead of $(D
0177) as an _octal literal makes code clearer and the intent more
visible. If use of this facility becomes predominant, a future
version of the language may deem old-style _octal literals deprecated.
The rules for strings are the usual for literals: If it can fit in an
$(D int), it is an $(D int). Otherwise, it is a $(D long). But, if the
user specifically asks for a $(D long) with the $(D L) suffix, always
give the $(D long). Give an unsigned iff it is asked for with the $(D
U) or $(D u) suffix. _Octals created from integers preserve the type
of the passed-in integral.
Example:
----
// same as 0177
auto x = octal!177;
// octal is a compile-time device
enum y = octal!160;
// Create an unsigned octal
auto z = octal!"1_000_000u";
----
*/
@property int octal(string num)()
if((octalFitsInInt!(num) && !literalIsLong!(num)) && !literalIsUnsigned!(num))
{
return octal!(int, num);
}
/// Ditto
@property long octal(string num)()
if((!octalFitsInInt!(num) || literalIsLong!(num)) && !literalIsUnsigned!(num))
{
return octal!(long, num);
}
/// Ditto
@property uint octal(string num)()
if((octalFitsInInt!(num) && !literalIsLong!(num)) && literalIsUnsigned!(num))
{
return octal!(int, num);
}
/// Ditto
@property ulong octal(string num)()
if((!octalFitsInInt!(num) || literalIsLong!(num)) && literalIsUnsigned!(num))
{
return octal!(long, num);
}
/// Ditto
template octal(alias s)
if (isIntegral!(typeof(s)))
{
enum auto octal = octal!(typeof(s), to!string(s));
}
/*
Takes a string, num, which is an octal literal, and returns its
value, in the type T specified.
So:
int a = octal!(int, "10");
assert(a == 8);
*/
@property T octal(T, string num)()
if (isOctalLiteral!num)
{
ulong pow = 1;
T value = 0;
for (int pos = num.length - 1; pos >= 0; pos--)
{
char s = num[pos];
if (s < '0' || s > '7') // we only care about digits; skip the rest
// safe to skip - this is checked out in the assert so these
// are just suffixes
continue;
value += pow * (s - '0');
pow *= 8;
}
return value;
}
/*
Take a look at int.max and int.max+1 in octal and the logic for this
function follows directly.
*/
template octalFitsInInt(string octalNum)
{
// note it is important to strip the literal of all
// non-numbers. kill the suffix and underscores lest they mess up
// the number of digits here that we depend on.
enum bool octalFitsInInt = strippedOctalLiteral(octalNum).length < 11 ||
strippedOctalLiteral(octalNum).length == 11 &&
strippedOctalLiteral(octalNum)[0] == '1';
}
string strippedOctalLiteral(string original)
{
string stripped = "";
foreach (c; original)
if (c >= '0' && c <= '7')
stripped ~= c;
return stripped;
}
template literalIsLong(string num)
{
static if (num.length > 1)
// can be xxL or xxLu according to spec
enum literalIsLong = (num[$-1] == 'L' || num[$-2] == 'L');
else
enum literalIsLong = false;
}
template literalIsUnsigned(string num)
{
static if (num.length > 1)
// can be xxU or xxUL according to spec
enum literalIsUnsigned = (num[$-1] == 'u' || num[$-2] == 'u')
// both cases are allowed too
|| (num[$-1] == 'U' || num[$-2] == 'U');
else
enum literalIsUnsigned = false;
}
/*
Returns if the given string is a correctly formatted octal literal.
The format is specified in lex.html. The leading zero is allowed, but
not required.
*/
bool isOctalLiteralString(string num)
{
if (num.length == 0)
return false;
// Must start with a number. To avoid confusion, literals that
// start with a '0' are not allowed
if (num[0] == '0' && num.length > 1)
return false;
if (num[0] < '0' || num[0] > '7')
return false;
foreach (i, c; num)
{
if ((c < '0' || c > '7') && c != '_') // not a legal character
{
if (i < num.length - 2)
return false;
else // gotta check for those suffixes
{
if (c != 'U' && c != 'u' && c != 'L')
return false;
if (i != num.length - 1)
{
// if we're not the last one, the next one must
// also be a suffix to be valid
char c2 = num[$-1];
if (c2 != 'U' && c2 != 'u' && c2 != 'L')
return false; // spam at the end of the string
if (c2 == c)
return false; // repeats are disallowed
}
}
}
}
return true;
}
/*
Returns true if the given compile time string is an octal literal.
*/
template isOctalLiteral(string num)
{
enum bool isOctalLiteral = isOctalLiteralString(num);
}
unittest
{
// ensure that you get the right types, even with embedded underscores
auto w = octal!"100_000_000_000";
static assert(!is(typeof(w) == int));
auto w2 = octal!"1_000_000_000";
static assert(is(typeof(w2) == int));
static assert(octal!"45" == 37);
static assert(octal!"0" == 0);
static assert(octal!"7" == 7);
static assert(octal!"10" == 8);
static assert(octal!"666" == 438);
static assert(octal!45 == 37);
static assert(octal!0 == 0);
static assert(octal!7 == 7);
static assert(octal!10 == 8);
static assert(octal!666 == 438);
static assert(octal!"66_6" == 438);
static assert(octal!2520046213 == 356535435);
static assert(octal!"2520046213" == 356535435);
static assert(octal!17777777777 == int.max);
static assert(!__traits(compiles, octal!823));
static assert(!__traits(compiles, octal!"823"));
static assert(!__traits(compiles, octal!"_823"));
static assert(!__traits(compiles, octal!"spam"));
static assert(!__traits(compiles, octal!"77%"));
int a;
long b;
// biggest value that should fit in an it
static assert(__traits(compiles, a = octal!"17777777777"));
// should not fit in the int
static assert(!__traits(compiles, a = octal!"20000000000"));
// ... but should fit in a long
static assert(__traits(compiles, b = octal!"20000000000"));
static assert(!__traits(compiles, a = octal!"1L"));
// this should pass, but it doesn't, since the int converter
// doesn't pass along its suffix to helper templates
//static assert(!__traits(compiles, a = octal!1L));
static assert(__traits(compiles, b = octal!"1L"));
static assert(__traits(compiles, b = octal!1L));
}
/+
emplaceRef is a package function for phobos internal use. It works like
emplace, but takes its argument by ref (as opposed to "by pointer").
This makes it easier to use, easier to be safe, and faster in a non-inline
build.
Furthermore, emplaceRef optionally takes a type paremeter, which specifies
the type we want to build. This helps to build qualified objects on mutable
buffer, without breaking the type system with unsafe casts.
+/
package ref UT emplaceRef(UT, Args...)(ref UT chunk, auto ref Args args)
if (is(UT == Unqual!UT))
{
return emplaceImpl!UT(chunk, args);
}
// ditto
package ref UT emplaceRef(T, UT, Args...)(ref UT chunk, auto ref Args args)
if (is(UT == Unqual!T) && !is(T == UT))
{
return emplaceImpl!T(chunk, args);
}
private template emplaceImpl(T)
{
alias UT = Unqual!T;
ref UT emplaceImpl()(ref UT chunk)
{
static assert (is(typeof({static T i;})),
format("Cannot emplace a %1$s because %1$s.this() is annotated with @disable.", T.stringof));
return emplaceInitializer(chunk);
}
static if (!is(T == struct))
ref UT emplaceImpl(Arg)(ref UT chunk, auto ref Arg arg)
{
static assert(is(typeof({T t = arg;})),
format("%s cannot be emplaced from a %s.", T.stringof, Arg.stringof));
static if (isStaticArray!T)
{
alias UArg = Unqual!Arg;
alias E = ElementEncodingType!(typeof(T.init[]));
alias UE = Unqual!E;
enum N = T.length;
static if (is(Arg : T))
{
//Matching static array
static if (!hasElaborateAssign!UT && isAssignable!(UT, Arg))
chunk = arg;
else static if (is(UArg == UT))
{
import core.stdc.string : memcpy;
memcpy(&chunk, &arg, T.sizeof);
static if (hasElaborateCopyConstructor!T)
typeid(T).postblit(cast(void*)&chunk);
}
else
.emplaceImpl!T(chunk, cast(T)arg);
}
else static if (is(Arg : E[]))
{
//Matching dynamic array
static if (!hasElaborateAssign!UT && is(typeof(chunk[] = arg[])))
chunk[] = arg[];
else static if (is(Unqual!(ElementEncodingType!Arg) == UE))
{
import core.stdc.string : memcpy;
assert(N == chunk.length, "Array length missmatch in emplace");
memcpy(cast(void*)&chunk, arg.ptr, T.sizeof);
static if (hasElaborateCopyConstructor!T)
typeid(T).postblit(cast(void*)&chunk);
}
else
.emplaceImpl!T(chunk, cast(E[])arg);
}
else static if (is(Arg : E))
{
//Case matching single element to array.
static if (!hasElaborateAssign!UT && is(typeof(chunk[] = arg)))
chunk[] = arg;
else static if (is(UArg == Unqual!E))
{
import core.stdc.string : memcpy;
//Note: We copy everything, and then postblit just once.
//This is as exception safe as what druntime can provide us.
foreach(i; 0 .. N)
memcpy(cast(void*)&(chunk[i]), &arg, E.sizeof);
static if (hasElaborateCopyConstructor!T)
typeid(T).postblit(cast(void*)&chunk);
}
else
//Alias this. Coerce.
.emplaceImpl!T(chunk, cast(E)arg);
}
else static if (is(typeof(.emplaceImpl!E(chunk[0], arg))))
{
//Final case for everything else:
//Types that don't match (int to uint[2])
//Recursion for multidimensions
static if (!hasElaborateAssign!UT && is(typeof(chunk[] = arg)))
chunk[] = arg;
else
foreach(i; 0 .. N)
.emplaceImpl!E(chunk[i], arg);
}
else
static assert(0, format("Sorry, this implementation doesn't know how to emplace a %s with a %s", T.stringof, Arg.stringof));
return chunk;
}
else
{
chunk = arg;
return chunk;
}
}
// ditto
static if (is(T == struct))
ref UT emplaceImpl(Args...)(ref UT chunk, auto ref Args args)
{
static if (Args.length == 1 && is(Args[0] : T) &&
is (typeof({T t = args[0];})) //Check for legal postblit
)
{
static if (is(Unqual!T == Unqual!(Args[0])))
{
//Types match exactly: we postblit
static if (!hasElaborateAssign!UT && isAssignable!(UT, T))
chunk = args[0];
else
{
import core.stdc.string : memcpy;
memcpy(&chunk, &args[0], T.sizeof);
static if (hasElaborateCopyConstructor!T)
typeid(T).postblit(&chunk);
}
}
else
//Alias this. Coerce to type T.
.emplaceImpl!T(chunk, cast(T)args[0]);
}
else static if (is(typeof(chunk.__ctor(args))))
{
// T defines a genuine constructor accepting args
// Go the classic route: write .init first, then call ctor
emplaceInitializer(chunk);
chunk.__ctor(args);
}
else static if (is(typeof(T.opCall(args))))
{
//Can be built calling opCall
emplaceOpCaller(chunk, args); //emplaceOpCaller is deprecated
}
else static if (is(typeof(T(args))))
{
// Struct without constructor that has one matching field for
// each argument. Individually emplace each field
emplaceInitializer(chunk);
foreach (i, ref field; chunk.tupleof[0 .. Args.length])
{
alias Field = typeof(field);
alias UField = Unqual!Field;
static if (is(Field == UField))
.emplaceImpl!Field(field, args[i]);
else
.emplaceImpl!Field(*cast(Unqual!Field*)&field, args[i]);
}
}
else
{
//We can't emplace. Try to diagnose a disabled postblit.
static assert(!(Args.length == 1 && is(Args[0] : T)),
format("Cannot emplace a %1$s because %1$s.this(this) is annotated with @disable.", T.stringof));
//We can't emplace.
static assert(false,
format("%s cannot be emplaced from %s.", T.stringof, Args[].stringof));
}
return chunk;
}
}
//emplace helper functions
private ref T emplaceInitializer(T)(ref T chunk) @trusted pure nothrow
{
static if (!hasElaborateAssign!T && isAssignable!T)
chunk = T.init;
else
{
import core.stdc.string : memcpy;
static immutable T init = T.init;
memcpy(&chunk, &init, T.sizeof);
}
return chunk;
}
private deprecated("Using static opCall for emplace is deprecated. Plase use emplace(chunk, T(args)) instead.")
ref T emplaceOpCaller(T, Args...)(ref T chunk, auto ref Args args)
{
static assert (is(typeof({T t = T.opCall(args);})),
format("%s.opCall does not return adequate data for construction.", T.stringof));
return emplaceImpl!T(chunk, chunk.opCall(args));
}
// emplace
/**
Given a pointer $(D chunk) to uninitialized memory (but already typed
as $(D T)), constructs an object of non-$(D class) type $(D T) at that
address.
Returns: A pointer to the newly constructed object (which is the same
as $(D chunk)).
*/
T* emplace(T)(T* chunk) @safe pure nothrow
{
emplaceImpl!T(*chunk);
return chunk;
}
/**
Given a pointer $(D chunk) to uninitialized memory (but already typed
as a non-class type $(D T)), constructs an object of type $(D T) at
that address from arguments $(D args).
This function can be $(D @trusted) if the corresponding constructor of
$(D T) is $(D @safe).
Returns: A pointer to the newly constructed object (which is the same
as $(D chunk)).
*/
T* emplace(T, Args...)(T* chunk, auto ref Args args)
if (!is(T == struct) && Args.length == 1)
{
emplaceImpl!T(*chunk, args);
return chunk;
}
/// ditto
T* emplace(T, Args...)(T* chunk, auto ref Args args)
if (is(T == struct))
{
emplaceImpl!T(*chunk, args);
return chunk;
}
version(unittest) private struct __conv_EmplaceTest
{
int i = 3;
this(int i)
{
assert(this.i == 3 && i == 5);
this.i = i;
}
this(int i, ref int j)
{
assert(i == 5 && j == 6);
this.i = i;
++j;
}
@disable:
this();
this(this);
void opAssign();
}
version(unittest) private class __conv_EmplaceTestClass
{
int i = 3;
this(int i)
{
assert(this.i == 3 && i == 5);
this.i = i;
}
this(int i, ref int j)
{
assert(i == 5 && j == 6);
this.i = i;
++j;
}
}
unittest
{
struct S { @disable this(); }
S s = void;
static assert(!__traits(compiles, emplace(&s)));
static assert( __traits(compiles, emplace(&s, S.init)));
}
unittest
{
interface I {}
class K : I {}
K k = void;
emplace(&k);
assert(k is null);
I i = void;
emplace(&i);
assert(i is null);
}
unittest
{
static struct S {int i = 5;}
S[2] s2 = void;
emplace(&s2);
assert(s2[0].i == 5 && s2[1].i == 5);
}
unittest
{
struct S1
{}
struct S2
{
void opAssign(S2);
}
S1 s1 = void;
S2 s2 = void;
S1[2] as1 = void;
S2[2] as2 = void;
emplace(&s1);
emplace(&s2);
emplace(&as1);
emplace(&as2);
}
unittest
{
static struct S1
{
this(this) @disable;
}
static struct S2
{
this() @disable;
}
S1[2] ss1 = void;
S2[2] ss2 = void;
static assert( __traits(compiles, emplace(&ss1)));
static assert(!__traits(compiles, emplace(&ss2)));
S1 s1 = S1.init;
S2 s2 = S2.init;
static assert(!__traits(compiles, emplace(&ss1, s1)));
static assert( __traits(compiles, emplace(&ss2, s2)));
}
unittest
{
struct S
{
immutable int i;
}
S s = void;
S[2] ss1 = void;
S[2] ss2 = void;
emplace(&s, 5);
emplace(&ss1, s);
emplace(&ss2, ss1);
}
//Start testing emplace-args here
unittest
{
int a;
int b = 42;
assert(*emplace!int(&a, b) == 42);
}
unittest
{
interface I {}
class K : I {}
K k = null, k2 = new K;
assert(k !is k2);
emplace!K(&k, k2);
assert(k is k2);
I i = null;
assert(i !is k);
emplace!I(&i, k);
assert(i is k);
}
unittest
{
static struct S
{
int i = 5;
void opAssign(S){assert(0);}
}
S[2] sa = void;
S[2] sb;
emplace(&sa, sb);
assert(sa[0].i == 5 && sa[1].i == 5);
}
//Start testing emplace-struct here
// Test constructor branch
unittest
{
struct S
{
double x = 5, y = 6;
this(int a, int b)
{
assert(x == 5 && y == 6);
x = a;
y = b;
}
}
auto s1 = new void[S.sizeof];
auto s2 = S(42, 43);
assert(*emplace!S(cast(S*) s1.ptr, s2) == s2);
assert(*emplace!S(cast(S*) s1, 44, 45) == S(44, 45));
}
unittest
{
__conv_EmplaceTest k = void;
emplace(&k, 5);
assert(k.i == 5);
}
unittest
{
int var = 6;
__conv_EmplaceTest k = void;
emplace(&k, 5, var);
assert(k.i == 5);
assert(var == 7);
}
// Test matching fields branch
unittest
{
struct S { uint n; }
S s;
emplace!S(&s, 2U);
assert(s.n == 2);
}
unittest
{
struct S { int a, b; this(int){} }
S s;
static assert(!__traits(compiles, emplace!S(&s, 2, 3)));
}
unittest
{
struct S { int a, b = 7; }
S s1 = void, s2 = void;
emplace!S(&s1, 2);
assert(s1.a == 2 && s1.b == 7);
emplace!S(&s2, 2, 3);
assert(s2.a == 2 && s2.b == 3);
}
//opAssign
unittest
{
static struct S
{
int i = 5;
void opAssign(int){assert(0);}
void opAssign(S){assert(0);}
}
S sa1 = void;
S sa2 = void;
S sb1 = S(1);
emplace(&sa1, sb1);
emplace(&sa2, 2);
assert(sa1.i == 1);
assert(sa2.i == 2);
}
//postblit precedence
unittest
{
//Works, but breaks in "-w -O" because of @@@9332@@@.
//Uncomment test when 9332 is fixed.
static struct S
{
int i;
this(S other){assert(false);}
this(int i){this.i = i;}
this(this){}
}
S a = void;
assert(is(typeof({S b = a;}))); //Postblit
assert(is(typeof({S b = S(a);}))); //Constructor
auto b = S(5);
emplace(&a, b);
assert(a.i == 5);
static struct S2
{
int* p;
this(const S2){};
}
static assert(!is(immutable S2 : S2));
S2 s2 = void;
immutable is2 = (immutable S2).init;
emplace(&s2, is2);
}
//nested structs and postblit
unittest
{
static struct S
{
int* p;
this(int i){p = [i].ptr;}
this(this)
{
if (p)
p = [*p].ptr;
}
}
static struct SS
{
S s;
void opAssign(const SS)
{
assert(0);
}
}
SS ssa = void;
SS ssb = SS(S(5));
emplace(&ssa, ssb);
assert(*ssa.s.p == 5);
assert(ssa.s.p != ssb.s.p);
}
//disabled postblit
unittest
{
static struct S1
{
int i;
@disable this(this);
}
S1 s1 = void;
static assert( __traits(compiles, emplace(&s1, 1)));
static assert(!__traits(compiles, emplace(&s1, S1.init)));
static struct S2
{
int i;
@disable this(this);
this(ref S2){}
}
S2 s2 = void;
static assert(!__traits(compiles, emplace(&s2, 1)));
static assert( __traits(compiles, emplace(&s2, S2.init)));
static struct SS1
{
S1 s;
}
SS1 ss1 = void;
static assert( __traits(compiles, emplace(&ss1)));
static assert(!__traits(compiles, emplace(&ss1, SS1.init)));
static struct SS2
{
S2 s;
}
SS2 ss2 = void;
static assert( __traits(compiles, emplace(&ss2)));
static assert(!__traits(compiles, emplace(&ss2, SS2.init)));
// SS1 sss1 = s1; //This doesn't compile
// SS1 sss1 = SS1(s1); //This doesn't compile
// So emplace shouldn't compile either
static assert(!__traits(compiles, emplace(&sss1, s1)));
static assert(!__traits(compiles, emplace(&sss2, s2)));
}
//Imutability
unittest
{
//Castable immutability
{
static struct S1
{
int i;
}
static assert(is( immutable(S1) : S1));
S1 sa = void;
auto sb = immutable(S1)(5);
emplace(&sa, sb);
assert(sa.i == 5);
}
//Un-castable immutability
{
static struct S2
{
int* p;
}
static assert(!is(immutable(S2) : S2));
S2 sa = void;
auto sb = immutable(S2)(null);
assert(!__traits(compiles, emplace(&sa, sb)));
}
}
unittest
{
static struct S
{
immutable int i;
immutable(int)* j;
}
S s = void;
emplace(&s, 1, null);
emplace(&s, 2, &s.i);
assert(s is S(2, &s.i));
}
//Context pointer
unittest
{
int i = 0;
{
struct S1
{
void foo(){++i;}
}
S1 sa = void;
S1 sb;
emplace(&sa, sb);
sa.foo();
assert(i == 1);
}
{
struct S2
{
void foo(){++i;}
this(this){}
}
S2 sa = void;
S2 sb;
emplace(&sa, sb);
sa.foo();
assert(i == 2);
}
////NOTE: THESE WILL COMPILE
////But will not correctly emplace the context pointer
////The problem lies with voldemort, and not emplace.
//{
// struct S3
// {
// int k;
// void foo(){++i;}
// }
//}
//S3 s3 = void;
//emplace(&s3); //S3.init has no context pointer information
//emplace(&s3, 1); //No way to obtain context pointer once inside emplace
}
//Alias this
unittest
{
static struct S
{
int i;
}
//By Ref
{
static struct SS1
{
int j;
S s;
alias s this;
}
S s = void;
SS1 ss = SS1(1, S(2));
emplace(&s, ss);
assert(s.i == 2);
}
//By Value
{
static struct SS2
{
int j;
S s;
S foo() @property{return s;}
alias foo this;
}
S s = void;
SS2 ss = SS2(1, S(2));
emplace(&s, ss);
assert(s.i == 2);
}
}
version(unittest)
{
//Ambiguity
struct __std_conv_S
{
int i;
this(__std_conv_SS ss) {assert(0);}
static opCall(__std_conv_SS ss)
{
__std_conv_S s; s.i = ss.j;
return s;
}
}
struct __std_conv_SS
{
int j;
__std_conv_S s;
ref __std_conv_S foo() @property {s.i = j; return s;}
alias foo this;
}
static assert(is(__std_conv_SS : __std_conv_S));
unittest
{
__std_conv_S s = void;
__std_conv_SS ss = __std_conv_SS(1);
__std_conv_S sTest1 = ss; //this calls "SS alias this" (and not "S.this(SS)")
emplace(&s, ss); //"alias this" should take precedence in emplace over "opCall"
assert(s.i == 1);
}
}
//Nested classes
unittest
{
class A{}
static struct S
{
A a;
}
S s1 = void;
S s2 = S(new A);
emplace(&s1, s2);
assert(s1.a is s2.a);
}
//safety & nothrow & CTFE
unittest
{
//emplace should be safe for anything with no elaborate opassign
static struct S1
{
int i;
}
static struct S2
{
int i;
this(int j)@safe nothrow{i = j;}
}
int i;
S1 s1 = void;
S2 s2 = void;
auto pi = &i;
auto ps1 = &s1;
auto ps2 = &s2;
void foo() @safe nothrow
{
emplace(pi);
emplace(pi, 5);
emplace(ps1);
emplace(ps1, 5);
emplace(ps1, S1.init);
emplace(ps2);
emplace(ps2, 5);
emplace(ps2, S2.init);
}
T bar(T)() @property
{
T t/+ = void+/; //CTFE void illegal
emplace(&t, 5);
return t;
}
enum a = bar!int;
enum b = bar!S1;
enum c = bar!S2;
}
unittest
{
struct S
{
int[2] get(){return [1, 2];}
alias get this;
}
struct SS
{
int[2] ii;
}
struct ISS
{
int[2] ii;
}
S s;
SS ss = void;
ISS iss = void;
emplace(&ss, s);
emplace(&iss, s);
assert(ss.ii == [1, 2]);
assert(iss.ii == [1, 2]);
}
//disable opAssign
unittest
{
static struct S
{
@disable void opAssign(S);
}
S s;
emplace(&s, S.init);
}
//opCall
unittest
{
int i;
//Without constructor
{
static struct S1
{
int i;
static S1 opCall(int*){assert(0);}
}
S1 s = void;
static assert(!__traits(compiles, emplace(&s, 1)));
static assert( __traits(compiles, emplace(&s, &i))); //(works, but deprected)
}
//With constructor
{
static struct S2
{
int i = 0;
static S2 opCall(int*){assert(0);}
static S2 opCall(int){assert(0);}
this(int i){this.i = i;}
}
S2 s = void;
static assert( __traits(compiles, emplace(&s, 1))); //(works, but deprected)
static assert( __traits(compiles, emplace(&s, &i))); //(works, but deprected)
emplace(&s, 1);
assert(s.i == 1);
}
//With postblit ambiguity
{
static struct S3
{
int i = 0;
static S3 opCall(ref S3){assert(0);}
}
S3 s = void;
static assert( __traits(compiles, emplace(&s, S3.init)));
}
}
unittest //@@@9559@@@
{
import std.algorithm : map;
import std.typecons : Nullable;
alias I = Nullable!int;
auto ints = [0, 1, 2].map!(i => i & 1 ? I.init : I(i))();
auto asArray = std.array.array(ints);
}
unittest //http://forum.dlang.org/thread/nxbdgtdlmwscocbiypjs@forum.dlang.org
{
import std.array : array;
import std.datetime : SysTime, UTC;
import std.math : isNaN;
static struct A
{
double i;
}
static struct B
{
invariant()
{
if(j == 0)
assert(a.i.isNaN, "why is 'j' zero?? and i is not NaN?");
else
assert(!a.i.isNaN);
}
SysTime when; // comment this line avoid the breakage
int j;
A a;
}
B b1 = B.init;
assert(&b1); // verify that default eyes invariants are ok;
auto b2 = B(SysTime(0, UTC()), 1, A(1));
assert(&b2);
auto b3 = B(SysTime(0, UTC()), 1, A(1));
assert(&b3);
auto arr = [b2, b3];
assert(arr[0].j == 1);
assert(arr[1].j == 1);
auto a2 = arr.array(); // << bang, invariant is raised, also if b2 and b3 are good
}
//static arrays
unittest
{
static struct S
{
int[2] ii;
}
static struct IS
{
immutable int[2] ii;
}
int[2] ii;
S s = void;
IS ims = void;
ubyte ub = 2;
emplace(&s, ub);
emplace(&s, ii);
emplace(&ims, ub);
emplace(&ims, ii);
uint[2] uu;
static assert(!__traits(compiles, {S ss = S(uu);}));
static assert(!__traits(compiles, emplace(&s, uu)));
}
unittest
{
int[2] sii;
int[2] sii2;
uint[2] uii;
uint[2] uii2;
emplace(&sii, 1);
emplace(&sii, 1U);
emplace(&uii, 1);
emplace(&uii, 1U);
emplace(&sii, sii2);
//emplace(&sii, uii2); //Sorry, this implementation doesn't know how to...
//emplace(&uii, sii2); //Sorry, this implementation doesn't know how to...
emplace(&uii, uii2);
emplace(&sii, sii2[]);
//emplace(&sii, uii2[]); //Sorry, this implementation doesn't know how to...
//emplace(&uii, sii2[]); //Sorry, this implementation doesn't know how to...
emplace(&uii, uii2[]);
}
unittest
{
bool allowDestruction = false;
struct S
{
int i;
this(this){}
~this(){assert(allowDestruction);}
}
S s = S(1);
S[2] ss1 = void;
S[2] ss2 = void;
S[2] ss3 = void;
emplace(&ss1, s);
emplace(&ss2, ss1);
emplace(&ss3, ss2[]);
assert(ss1[1] == s);
assert(ss2[1] == s);
assert(ss3[1] == s);
allowDestruction = true;
}
unittest
{
//Checks postblit, construction, and context pointer
int count = 0;
struct S
{
this(this)
{
++count;
}
~this()
{
--count;
}
}
S s;
{
S[4] ss = void;
emplace(&ss, s);
assert(count == 4);
}
assert(count == 0);
}
unittest
{
struct S
{
int i;
}
S s;
S[2][2][2] sss = void;
emplace(&sss, s);
}
unittest //Constness
{
import std.stdio;
int a = void;
emplaceRef!(const int)(a, 5);
immutable i = 5;
const(int)* p = void;
emplaceRef!(const int*)(p, &i);
struct S
{
int* p;
}
alias IS = immutable(S);
S s = void;
emplaceRef!IS(s, IS());
S[2] ss = void;
emplaceRef!(IS[2])(ss, IS());
IS[2] iss = IS.init;
emplaceRef!(IS[2])(ss, iss);
emplaceRef!(IS[2])(ss, iss[]);
}
unittest
{
int i;
emplaceRef(i);
emplaceRef!int(i);
emplaceRef(i, 5);
emplaceRef!int(i, 5);
}
private void testEmplaceChunk(void[] chunk, size_t typeSize, size_t typeAlignment, string typeName)
{
import std.string : format;
import std.exception : enforce;
enforce!ConvException(chunk.length >= typeSize,
format("emplace: Chunk size too small: %s < %s size = %s",
chunk.length, typeName, typeSize));
enforce!ConvException((cast(size_t) chunk.ptr) % typeAlignment == 0,
format("emplace: Misaligned memory block (0x%X): it must be %s-byte aligned for type %s",
chunk.ptr, typeAlignment, typeName));
}
/**
Given a raw memory area $(D chunk), constructs an object of $(D class)
type $(D T) at that address. The constructor is passed the arguments
$(D Args). The $(D chunk) must be as least as large as $(D T) needs
and should have an alignment multiple of $(D T)'s alignment. (The size
of a $(D class) instance is obtained by using $(D
__traits(classInstanceSize, T))).
This function can be $(D @trusted) if the corresponding constructor of
$(D T) is $(D @safe).
Returns: A pointer to the newly constructed object.
*/
T emplace(T, Args...)(void[] chunk, auto ref Args args)
if (is(T == class))
{
enum classSize = __traits(classInstanceSize, T);
testEmplaceChunk(chunk, classSize, classInstanceAlignment!T, T.stringof);
auto result = cast(T) chunk.ptr;
// Initialize the object in its pre-ctor state
(cast(byte[]) chunk)[0 .. classSize] = typeid(T).init[];
// Call the ctor if any
static if (is(typeof(result.__ctor(args))))
{
// T defines a genuine constructor accepting args
// Go the classic route: write .init first, then call ctor
result.__ctor(args);
}
else
{
static assert(args.length == 0 && !is(typeof(&T.__ctor)),
"Don't know how to initialize an object of type "
~ T.stringof ~ " with arguments " ~ Args.stringof);
}
return result;
}
unittest
{
int var = 6;
auto k = emplace!__conv_EmplaceTestClass(new void[__traits(classInstanceSize, __conv_EmplaceTestClass)], 5, var);
assert(k.i == 5);
assert(var == 7);
}
/**
Given a raw memory area $(D chunk), constructs an object of non-$(D
class) type $(D T) at that address. The constructor is passed the
arguments $(D args), if any. The $(D chunk) must be as least as large
as $(D T) needs and should have an alignment multiple of $(D T)'s
alignment.
This function can be $(D @trusted) if the corresponding constructor of
$(D T) is $(D @safe).
Returns: A pointer to the newly constructed object.
*/
T* emplace(T, Args...)(void[] chunk, auto ref Args args)
if (!is(T == class))
{
testEmplaceChunk(chunk, T.sizeof, T.alignof, T.stringof);
return emplace(cast(T*) chunk.ptr, args);
}
unittest
{
struct S
{
int a, b;
}
auto p = new void[S.sizeof];
S s;
s.a = 42;
s.b = 43;
auto s1 = emplace!S(p, s);
assert(s1.a == 42 && s1.b == 43);
}
unittest
{
int var = 6;
auto k = emplace!__conv_EmplaceTest(new void[__conv_EmplaceTest.sizeof], 5, var);
assert(k.i == 5);
assert(var == 7);
}
unittest
{
class A
{
int x = 5;
int y = 42;
this(int z)
{
assert(x == 5 && y == 42);
x = y = z;
}
}
void[] buf;
static byte[__traits(classInstanceSize, A)] sbuf;
buf = sbuf[];
auto a = emplace!A(buf, 55);
assert(a.x == 55 && a.y == 55);
// emplace in bigger buffer
buf = new byte[](__traits(classInstanceSize, A) + 10);
a = emplace!A(buf, 55);
assert(a.x == 55 && a.y == 55);
// need ctor args
static assert(!is(typeof(emplace!A(buf))));
}
unittest
{
import std.algorithm : equal, map;
// Check fix for http://d.puremagic.com/issues/show_bug.cgi?id=2971
assert(equal(map!(to!int)(["42", "34", "345"]), [42, 34, 345]));
}
// Undocumented for the time being
void toTextRange(T, W)(T value, W writer)
if (isIntegral!T && isOutputRange!(W, char))
{
char[value.sizeof * 4] buffer = void;
uint i = cast(uint) (buffer.length - 1);
bool negative = value < 0;
Unqual!(Unsigned!T) v = negative ? -value : value;
while (v >= 10)
{
auto c = cast(uint) (v % 10);
v /= 10;
buffer[i--] = cast(char) (c + '0');
}
buffer[i] = cast(char) (v + '0'); //hexDigits[cast(uint) v];
if (negative)
buffer[--i] = '-';
put(writer, buffer[i .. $]);
}
unittest
{
import std.array : appender;
auto result = appender!(char[])();
toTextRange(-1, result);
assert(result.data == "-1");
}
/**
Returns the corresponding _unsigned value for $(D x) (e.g. if $(D x) has type
$(D int), it returns $(D cast(uint) x)). The advantage compared to the cast
is that you do not need to rewrite the cast if $(D x) later changes type
(e.g from $(D int) to $(D long)).
Note that the result is always mutable even if the original type was const
or immutable. In order to retain the constness, use $(XREF traits, Unsigned).
*/
auto unsigned(T)(T x) if (isIntegral!T)
{
return cast(Unqual!(Unsigned!T))x;
}
///
unittest
{
immutable int s = 42;
auto u1 = unsigned(s); //not qualified
static assert(is(typeof(u1) == uint));
Unsigned!(typeof(s)) u2 = unsigned(s); //same qualification
static assert(is(typeof(u2) == immutable uint));
immutable u3 = unsigned(s); //explicitly qualified
}
unittest
{
foreach(T; TypeTuple!(byte, ubyte))
{
static assert(is(typeof(unsigned(cast(T)1)) == ubyte));
static assert(is(typeof(unsigned(cast(const T)1)) == ubyte));
static assert(is(typeof(unsigned(cast(immutable T)1)) == ubyte));
}
foreach(T; TypeTuple!(short, ushort))
{
static assert(is(typeof(unsigned(cast(T)1)) == ushort));
static assert(is(typeof(unsigned(cast(const T)1)) == ushort));
static assert(is(typeof(unsigned(cast(immutable T)1)) == ushort));
}
foreach(T; TypeTuple!(int, uint))
{
static assert(is(typeof(unsigned(cast(T)1)) == uint));
static assert(is(typeof(unsigned(cast(const T)1)) == uint));
static assert(is(typeof(unsigned(cast(immutable T)1)) == uint));
}
foreach(T; TypeTuple!(long, ulong))
{
static assert(is(typeof(unsigned(cast(T)1)) == ulong));
static assert(is(typeof(unsigned(cast(const T)1)) == ulong));
static assert(is(typeof(unsigned(cast(immutable T)1)) == ulong));
}
}
auto unsigned(T)(T x) if (isSomeChar!T)
{
// All characters are unsigned
static assert(T.min == 0);
return cast(Unqual!T) x;
}
unittest
{
foreach(T; TypeTuple!(char, wchar, dchar))
{
static assert(is(typeof(unsigned(cast(T)'A')) == T));
static assert(is(typeof(unsigned(cast(const T)'A')) == T));
static assert(is(typeof(unsigned(cast(immutable T)'A')) == T));
}
}
/**
Returns the corresponding _signed value for $(D x) (e.g. if $(D x) has type
$(D uint), it returns $(D cast(int) x)). The advantage compared to the cast
is that you do not need to rewrite the cast if $(D x) later changes type
(e.g from $(D uint) to $(D ulong)).
Note that the result is always mutable even if the original type was const
or immutable. In order to retain the constness, use $(XREF traits, Signed).
*/
auto signed(T)(T x) if (isIntegral!T)
{
return cast(Unqual!(Signed!T))x;
}
///
unittest
{
immutable uint u = 42;
auto s1 = signed(u); //not qualified
static assert(is(typeof(s1) == int));
Signed!(typeof(u)) s2 = signed(u); //same qualification
static assert(is(typeof(s2) == immutable int));
immutable s3 = signed(u); //explicitly qualified
}
unittest
{
foreach(T; TypeTuple!(byte, ubyte))
{
static assert(is(typeof(signed(cast(T)1)) == byte));
static assert(is(typeof(signed(cast(const T)1)) == byte));
static assert(is(typeof(signed(cast(immutable T)1)) == byte));
}
foreach(T; TypeTuple!(short, ushort))
{
static assert(is(typeof(signed(cast(T)1)) == short));
static assert(is(typeof(signed(cast(const T)1)) == short));
static assert(is(typeof(signed(cast(immutable T)1)) == short));
}
foreach(T; TypeTuple!(int, uint))
{
static assert(is(typeof(signed(cast(T)1)) == int));
static assert(is(typeof(signed(cast(const T)1)) == int));
static assert(is(typeof(signed(cast(immutable T)1)) == int));
}
foreach(T; TypeTuple!(long, ulong))
{
static assert(is(typeof(signed(cast(T)1)) == long));
static assert(is(typeof(signed(cast(const T)1)) == long));
static assert(is(typeof(signed(cast(immutable T)1)) == long));
}
}
unittest
{
// issue 10874
enum Test { a = 0 }
ulong l = 0;
auto t = l.to!Test;
}
|
D
|
module android.java.java.lang.InternalError;
public import android.java.java.lang.InternalError_d_interface;
import arsd.jni : ImportExportImpl;
mixin ImportExportImpl!InternalError;
import import4 = android.java.java.lang.Class;
import import3 = android.java.java.lang.StackTraceElement;
|
D
|
/*
* hunt-proton: AMQP Protocol library for D programming language.
*
* Copyright (C) 2018-2019 HuntLabs
*
* Website: https://www.huntlabs.net/
*
* Licensed under the Apache-2.0 License.
*
*/
module hunt.proton.codec.transaction.TransactionalStateType;
import hunt.collection.AbstractList;
import hunt.collection.List;
import hunt.proton.amqp.Binary;
import hunt.proton.amqp.Symbol;
import hunt.proton.amqp.UnsignedLong;
import hunt.proton.amqp.messaging.Outcome;
import hunt.proton.amqp.transaction.TransactionalState;
import hunt.proton.codec.AbstractDescribedType;
import hunt.proton.codec.DecodeException;
import hunt.proton.codec.Decoder;
import hunt.proton.codec.DescribedTypeConstructor;
import hunt.proton.codec.EncoderImpl;
import hunt.Object;
import hunt.logging;
import hunt.Exceptions;
import std.conv : to;
import std.concurrency : initOnce;
class TransactionalStateWrapper : AbstractList!Object
{
private TransactionalState _transactionalState;
this(TransactionalState transactionalState)
{
_transactionalState = transactionalState;
}
override
public Object get(int index)
{
switch(index)
{
case 0:
return _transactionalState.getTxnId();
case 1:
return cast(Object)(_transactionalState.getOutcome());
default:
return null;
}
// throw new IllegalStateException("Unknown index " ~ to!string(index));
}
override
public int size()
{
return _transactionalState.getOutcome() !is null
? 2
: 1;
}
}
class TransactionalStateType : AbstractDescribedType!(TransactionalState,IObject) , DescribedTypeConstructor!(TransactionalState)
{
//private static Object[] DESCRIPTORS =
//{
// UnsignedLong.valueOf(0x0000000000000034L), Symbol.valueOf("amqp:transactional-state:list"),
//};
//
//private static UnsignedLong DESCRIPTOR = UnsignedLong.valueOf(0x0000000000000034L);
static Object[] DESCRIPTORS() {
__gshared Object[] inst;
return initOnce!inst([UnsignedLong.valueOf(0x0000000000000034L), Symbol.valueOf("amqp:transactional-state:list")]);
}
static UnsignedLong DESCRIPTOR() {
__gshared UnsignedLong inst;
return initOnce!inst(UnsignedLong.valueOf(0x0000000000000034L));
}
this(EncoderImpl encoder)
{
super(encoder);
}
override
public UnsignedLong getDescriptor()
{
return DESCRIPTOR;
}
override
protected List!Object wrap(TransactionalState val)
{
return new TransactionalStateWrapper(val);
}
public TransactionalState newInstance(Object described)
{
List!Object l = cast(List!Object) described;
TransactionalState o = new TransactionalState();
if(l.isEmpty())
{
logError("The txn-id field cannot be omitted");
//throw new DecodeException("The txn-id field cannot be omitted");
}
switch(2 - l.size())
{
case 0:
o.setOutcome( cast(Outcome) l.get( 1 ) );
goto case;
case 1:
o.setTxnId( cast(Binary) l.get( 0 ) );
break;
default:
break;
}
return o;
}
public TypeInfo getTypeClass()
{
return typeid(TransactionalState);
}
public static void register(Decoder decoder, EncoderImpl encoder)
{
TransactionalStateType type = new TransactionalStateType(encoder);
//implementationMissing(false);
foreach(Object descriptor ; DESCRIPTORS)
{
decoder.registerDynamic(descriptor, type);
}
encoder.register(type);
}
}
|
D
|
import std.array : appender;
import std.process : executeShell;
import std.file : isFile, isDir, dirEntries, SpanMode, exists, read, rename;
import std.regex : regex, replaceAll;
import std.path : extension, buildPath, filenameCmp, dirName, setExtension;
import std.stdio : writeln;
import std.format : format;
import std.typecons : Tuple;
import std.digest.crc;
import std.string : toLower;
import std.range : tee, No, array, walkLength;
import std.algorithm : each, filter;
// third party library
import progress.bar;
/// データからハッシュ文字列を計算
string toHashString(HashKind)(ubyte[] data)
{
return data
.digest!HashKind
.toHexString!(Order.decreasing)
.dup;
}
/// ファイルをゴミ箱に移動
void moveToTrash(scope string name) @trusted
{
version(Windows) {
import core.sys.windows.shellapi;
import std.path : isValidPath, absolutePath;
import std.file : exists, FileException;
import std.utf : toUTF16;
if (!name.isValidPath || !name.exists) {
throw new FileException(name);
}
const path = name.absolutePath();
SHFILEOPSTRUCTW fileOp;
fileOp.wFunc = FO_DELETE;
fileOp.fFlags = FOF_SILENT | FOF_NOCONFIRMATION | FOF_NOERRORUI | FOF_NOCONFIRMMKDIR | FOF_ALLOWUNDO;
//Note: pFrom.typeof is PCZZTSTR
// This string must be double-null terminated.
//https://docs.microsoft.com/en-us/windows/win32/api/shellapi/ns-shellapi-shfileopstructw
wstring wPath = (path ~ "\0\0").toUTF16();
fileOp.pFrom = wPath.ptr;
int result = SHFileOperation(&fileOp);
if (result != 0) {
throw new FileException(path);
}
} else {
assert(false, "Sorry, windows only");
}
}
/// エントリーポイント
void main(string[] args)
{
// 日本語Windowsのコンソール文字化け対策
version(Windows)
{
import core.sys.windows.windows : GetConsoleOutputCP, SetConsoleOutputCP, CP_UTF8;
const beforeCP = GetConsoleOutputCP();
SetConsoleOutputCP( CP_UTF8 ); // or use "chcp 65001" instead
scope(exit) SetConsoleOutputCP( beforeCP );
}
auto log = appender!(string[])();
scope(exit) {
each!writeln(log);
executeShell("pause");
}
/// 処理ファイル数、リネーム数、重複ファイル数を記録
Tuple!(size_t, "target", size_t, "renamed", size_t, "duplicated") counter;
/// ファイル名をハッシュ文字列にリネーム
void tryRename(HashKind = CRC32)(string orgName)
{
// ファイル読み込み
auto data = cast(ubyte[])read(orgName);
auto hash = data.toHashString!HashKind;
// 拡張子の末尾(large|orig)対策
auto ext = replaceAll(
orgName.extension,
regex(`^\.(jpe?g|png|gif|bmp).*$`, "i"),
".$1"
);
// ファイル名のみ、ハッシュ文字列に置き換える
auto renName = buildPath(
orgName.dirName,
setExtension(hash, ext.toLower)
);
debug log.put( format!"[org:] %s"(orgName) );
// 既にリネーム済みなら何もしない
if ( ! filenameCmp(orgName, renName) )
return;
counter.target++;
if (!renName.exists)
{
// ファイル名をリネーム
orgName.rename(renName);
log.put( format!"[ren:] %s"(renName) );
counter.renamed++;
}
else
{
log.put( format!"[dup:] %s"(orgName) );
// ダブってたら新しい方をゴミ箱へ移動
auto old = cast(ubyte[])read(renName);
if (old.toHashString!HashKind == hash)
{
orgName.moveToTrash;
log.put( format!"[del:] %s"(orgName) );
}
counter.duplicated++;
}
}
if (args.length != 2 || ! args[1].isDir)
{
log.put( "フォルダをドラッグ&ドロップしてください。" );
return;
}
try
{
auto listdir = dirEntries(args[1], "*.{jpg,jpeg,png,gif,bmp}*", SpanMode.breadth)
.filter!(f => f.isFile)
.array;
with (new Bar) {
message = () => "リネームを実行しています";
max = listdir.walkLength;
start();
listdir.each!( (path) {
tryRename(path);
next();
} );
finish();
}
}
catch (Exception e)
{
log.put(e.msg);
return;
}
if (counter.target > 0)
{
log.put( format!"対象となる画像ファイル数 : %8d"(counter.target) );
log.put( format!"リネームした画像ファイル数 : %8d"(counter.renamed) );
log.put( "--------" );
log.put( format!"重複していた画像ファイル数 : %8d"(counter.duplicated) );
}
else
{
log.put( "画像ファイルが見つからないか、既にリネームされています。" );
log.put( "リネームされるのは、JPEG/PNG/GIF/BMPのファイルのみです。" );
}
}
|
D
|
#!/usr/bin/rdmd
/**
* License: Boost 1.0
*
* Copyright (c) 2009-2010 Eric Poggel, Changes 2011-2012 Ferdinand Majerech
*
* 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.
*
* Description:
*
* This is a D programming language build script that can be used
* to compile D source code.
* CDC is contained within a single file that can easily be
* distributed with projects. This simplifies the build process since no other
* tools are required. The main() function can be utilized to turn
* CDC into a custom build script for your project.
*
* CDC's only requirement is a D compiler. It is/will be supported on any
* operating system supported by the language. It works with dmd, ldc (soon),
* and gdc.
*
* CDC can be used just like dmd, except for the following improvements.
* <ul>
* <li>CDC can accept paths as as well as individual source files for compilation.
* Each path is recursively searched for source, library, object, and ddoc files.</li>
* <li>CDC automatically creates a modules.ddoc file for use with CandyDoc and
* similar documentation utilities.</li>
* <li>CDC defaults to use the compiler that was used to build itself. Compiler
* flags are passed straight through to that compiler.</li>
* <li>The -op flag is always used, to prevent name conflicts in object and doc files.</li>
* <li>Documentation files are all placed in the same folder with their full package
* names. This makes relative links between documents easier.</li>
* </ul>
* These DMD/LDC options are automatically translated to the correct GDC
* options, or handled manually:
* <dl>
* <dt>-c</dt> <dd>do not link</dd>
* <dt>-D</dt> <dd>generate documentation</dd>
* <dt>-Dddocdir</dt> <dd>write fully-qualified documentation files to docdir directory</dd>
* <dt>-Dfdocfile</dt> <dd>write fully-qualified documentation files to docfile file</dd>
* <dt>-lib</dt> <dd>Generate library rather than object files</dd>
* <dt>-Ipath</dt> <dd>where to look for imports</dd>
* <dt>-o-</dt> <dd>do not write object file.</dd>
* <dt>-offilename</dt><dd>name output file to filename</dd>
* <dt>-odobjdir</dt> <dd>write object & library files to directory objdir</dd>
* </dl>
*
* In addition, these optional flags have been added.
* <dl>
* <dt>--dmd</dt> <dd>Use dmd to compile</dd>
* <dt>--gdc</dt> <dd>Use gdc to compile</dd>
* <dt>--ldc</dt> <dd>Use ldc to compile</dd>
* </dl>
*
* Bugs:
* <ul>
* <li>Doesn't yet work with LDC. See dsource.org/projects/ldc/ticket/323</li>
* <li>Dmd writes out object files as foo/bar.o, while gdc writes foo.bar.o</li>
* <li>Dmd fails to write object files when -od is an absolute path.</li>
* </ul>
*
* TODO:
* <ul>
* <li>Add support for a --script argument to accept another .d file that calls cdc's functions.</li>
* <li>-Df option</li>
* <li>GDC - Remove dependancy on "ar" on windows? </li>
* <li>LDC - Scanning a folder for files is broken. </li>
* <li>Unittests</li>
* <li>More testing on paths with spaces. </li>
* </ul>
*
* API:
* Use any of these functions in your own build script.
*/
import core.stdc.stdlib;
import std.algorithm;
import std.array;
import std.exception;
import std.conv;
import std.file;
import std.format;
import std.path;
import std.process;
import std.range;
import std.regex;
import std.string;
import std.stdio : writeln;
alias std.process.system system;
///Name of the default compiler, which is the compiler used to build cdc.
version(DigitalMars){string compiler = "dmd";}
version(GNU){string compiler = "gdmd";}
version(LDC){string compiler = "ldmd";}
version(Windows)
{
///Valid object file extensions.
const string[] obj_ext = ["obj", "o"];
///Library extension.
const string lib_ext = ".lib";
///Binary executable extension.
const string bin_ext = "exe";
///Path separator character.
char file_separator ='\\';
}
else
{
///Valid object file extensions.
const string[] obj_ext = ["o"];
///Library extension.
const string lib_ext = ".a";
///Binary executable extension.
const string bin_ext = "";
///Path separator character.
char file_separator ='/';
}
void main(string[] args)
{
assert("defaults/dependencies/D-YAML/examples/resolver/main.d"
.match(".+?examples/.+?"));
scope(failure){help(); core.stdc.stdlib.exit(-1);}
string[] targets;
string[] extra_args = ["-w", "-wi"];
args = args[1 .. $];
foreach(arg; args)
{
if(arg[0] == '-') switch(arg)
{
case "--help", "-h": help(); return;
case "--dmd": compiler = "dmd"; break;
case "--gdc": compiler = "gdmd"; break;
case "--ldc": compiler = "ldmd"; break;
default: extra_args ~= arg;
}
else
{
targets ~= arg;
}
}
//TODO library builds, with and without defaults.
//if(targets.length == 0){targets = ["debug"];}
if(targets.length == 0) {targets = ["unittest"];}
auto dbg = ["-unittest", "-gc", "-debug"];
auto no_contracts = ["-release", "-gc"];
auto release = ["-O", "-inline", "-release", "-gc"];
auto releasenoinline = ["-O", "-release", "-gc"];
auto dependencies = cast(string[])[];
auto sources = ["entity", "util"];
// The testsbuiltin package depends on defaults.
// To create a build without the default builtin
// components/processes/resources, neither of these can be compiled in.
auto defaults = ["defaults", "testsbuiltin"];
auto baseIgnore = [".+?D-YAML/unittest.d",
".+?D-YAML/examples/.+?",
".+?D-YAML/test/.+?",
".+?D-YAML/cdc.d"];
void compile_(string[] files, string binaryName, string[] ignore,
const(string)[] modifiers)
{
auto args = modifiers.canFind("release") ? release :
modifiers.canFind("releasenoinline") ? releasenoinline :
modifiers.canFind("nocontracts") ? no_contracts :
dbg;
compile(args ~ extra_args ~ ("-of" ~ binaryName), files, ignore);
}
auto filesTest = dependencies ~ sources ~ defaults ~ ["test.d"];
void build(string[] targets ...)
{
foreach(target; targets)
{
writeln("processing target: ", target);
const parts = target.split("-");
switch(parts.front)
{
case "unittest":
compile_(filesTest, "unittest", baseIgnore, parts[1 .. $]);
break;
case "all":
compile_(filesTest, "unittest", baseIgnore, parts[1 .. $]);
break;
default:
writeln("unknown target: ", target);
writeln("available targets: 'unittest', 'all'");
break;
}
}
}
try{build(targets);}
catch(CompileException e) {writeln("Could not compile: ", e.msg);}
catch(ProcessException e) {writeln("Compilation failed: ", e.msg);}
writeln("DONE");
}
///Print help information.
void help()
{
string help =
"Tharsis build script\n"
"Changes Copyright (C) 2010-2013 Ferdinand Majerech\n"
"Based on CDC script Copyright (C) 2009-2010 Eric Poggel\n"
"Usage: cdc [OPTION ...] [EXTRA COMPILER OPTION ...] [TARGET ...]\n"
"By default, cdc uses the compiler it was built with to compile the project.\n"
"\n"
"Any options starting with '-' not parsed by the script will be\n"
"passed to the compiler used.\n"
"\n"
//"Optionally, build target can be specified, 'debug' is default.\n"
"Optionally, build target can be specified, 'unittest' is default.\n"
"Available build targets:\n"
" unittest Build unit tests.\n"
" all All of the above.\n"
"Build target name can be followed by a build type, separated by '-'.\n"
"The default build type is 'debug'.\n"
"Supported build types:\n"
" debug Build with debug symbols, no optimization,\n"
" and contracts/asserts\n"
" nocontracts A debug build without contracts/asserts\n"
" release A release build; no debug symbols or contracts,\n"
" full optimization.\n"
" releasenoinline A release build without function inlining.\n"
"\n"
"Available options:\n"
" -h --help Show this help information.\n"
" --gdc Use GDC for compilation.\n"
" --dmd Use DMD for compilation.\n"
" --ldc Use LDC for compilation. (not tested)\n"
"\n"
"Examples:\n"
" ./cdc unittest-debug"
" Builds a debug build of the unittests with the same compiler\n"
" that was used to build this script\n"
" ./cdc --gdc all-release\n"
" Builds a release build of all targets using GDC\n"
;
writeln(help);
}
/**
* Compile D code using the current compiler.
*
* Params: options = Compiler options.
* paths = Source and library files/directories. Directories
* are recursively searched.
* ignorePathExps = If a file path matches any of these regular
* expressions, it is ignored.
*
* Example:
* --------
* //Compile all source files in src/core along with src/main.d,
* //link with all library files in the libs folder
* //and generate documentation in the docs folder.
* compile(["src/core", "src/main.d", "libs"], ["-D", "-Dddocs"]);
* --------
*
* TODO Add a dry run option to just return an array of commands to execute.
*/
void compile(string[] options, string[] paths, string[] ignorePathExps)
{
//Convert src and lib paths to files
string[] sources, libs, ddocs;
foreach(src; paths)
{
enforceEx!CompileException(exists(src),
"Source file/folder \"" ~ src ~ "\" does not exist.");
//Directory of source or lib files
if(isDir(src))
{
sources ~= scan(src, [".d"], ignorePathExps);
ddocs ~= scan(src, [".ddoc"], ignorePathExps);
libs ~= scan(src, [lib_ext], ignorePathExps);
}
//File
else if(isFile(src))
{
string ext = src.extension();
if(ext == ".d"){sources ~= src;}
else if(ext == lib_ext){libs ~= src;}
}
}
//Add dl.a for dynamic linking on linux
version(linux){libs ~= ["-L-ldl"];}
//Combine all options, sources, ddocs, and libs
CompileOptions co = CompileOptions(options, sources);
options = co.get_options(compiler);
if(compiler == "gdc")
{
foreach(ref d; ddocs){d = "-fdoc-inc=" ~ d;}
//or should this only be version(Windows) ?
//TODO: Check in dmd and gdc
foreach(ref l; libs){l = "-L" ~ l;}
}
//Create modules.ddoc and add it to array of ddocs
if(co.generate_doc)
{
string modules = "MODULES = \n";
sources.sort;
foreach(src; sources)
{
//get filename
src = split(src, "\\.")[0];
src = src.replace("/", ".").replace("\\", ".");
modules ~= "\t$(MODULE " ~ src ~ ")\n";
}
scope(failure){remove("modules.ddoc");}
write("modules.ddoc", modules);
ddocs ~= "modules.ddoc";
}
string[] arguments = options ~ sources ~ ddocs ~ libs;
//Compile
if(compiler == "gdc")
{
//Add support for building libraries to gdc.
//GDC must build incrementally if creating documentation or a lib.
if(co.generate_lib || co.generate_doc || co.no_linking)
{
//Remove options we don't want to pass to gdc when building incrementally.
auto incremental_options =
array(filter!`a != "-lib" && !startsWith(a, "-o")`(options));
//Compile files individually, outputting full path names
string[] obj_files;
foreach(source; sources)
{
string obj = source.replace("/", ".")[0 .. $ - 2] ~ ".o";
string ddoc = obj[0 .. $ - 2];
if(co.obj_directory !is null)
{
obj = co.obj_directory ~ file_separator ~ obj;
}
obj_files ~= obj;
string[] exec = incremental_options ~ ["-o" ~ obj, "-c"] ~ [source];
//ensure doc files are always fully qualified.
if(co.generate_doc){exec ~= ddocs ~ ["-fdoc-file=" ~ ddoc ~ ".html"];}
//throws ProcessException on compile failure
execute(compiler, exec);
}
//use ar to join the .o files into a lib and cleanup obj files
//TODO: how to join on GDC windows?
if(co.generate_lib)
{
//since ar refuses to overwrite it.
remove(co.out_file);
execute("ar", "cq " ~ co.out_file ~ obj_files);
}
//Remove obj files if -c or -od not were supplied.
if(!co.obj_directory && !co.no_linking)
{
foreach(o; obj_files){remove(o);}
}
}
if(!co.generate_lib && !co.no_linking)
{
//Remove documentation arguments since they were handled above
execute_compiler(compiler,
array(filter!`!startsWith(a, "-fdoc", "-od")`(arguments)));
}
}
//Compilers other than gdc
else
{
execute_compiler(compiler, arguments);
//Move all html files in doc_path to the doc output folder
//and rename them with the "package.module" naming convention.
if(co.generate_doc) foreach(src; sources)
{
if(src.extension != ".d"){continue;}
string html = src[0 .. $ - 2] ~ ".html";
string dest = html.replace("/", ".").replace("\\", ".");
if(co.doc_directory.length > 0)
{
dest = co.doc_directory ~ file_separator ~ dest;
html = co.doc_directory ~ file_separator ~ html;
}
//TODO: Delete remaining folders where source files were placed.
if(html != dest)
{
copy(html, dest);
remove(html);
}
}
}
//Remove extra files
string basename = split(co.out_file, "/")[$ - 1];
if(co.generate_doc){remove("modules.ddoc");}
if(co.out_file && !(co.no_linking || co.obj_directory))
{
foreach(ext; obj_ext)
{
//Delete object files with same name as output file that dmd sometimes leaves.
try{remove(co.out_file.setExtension(ext));}
catch(FileException e){continue;}
}
}
}
/**
* Stores compiler options and translates them between compilers.
*
* Also enables -of and -op for easier handling.
*/
struct CompileOptions
{
public:
///Do not link.
bool no_linking;
///Generate documentation.
bool generate_doc;
///Write documentation to this directory.
string doc_directory;
///Write documentation to this file.
string doc_file;
///Generate library rather than object files.
bool generate_lib;
///Do not write object files.
bool no_objects;
///write object, library files to this directory.
string obj_directory;
///Name of output file.
string out_file;
private:
///Compiler options.
string[] options_;
public:
/**
* Construct CompileOptions from command line options.
*
* Params: options = Compiler command line options.
* sources = Source files to compile.
*/
this(string[] options, in string[] sources)
{
foreach(i, opt; options)
{
if(opt == "-c") {no_linking = true;}
else if(["-D", "-fdoc"].canFind(opt)) {generate_doc = true;}
else if(opt.startsWith("-Dd")) {doc_directory = opt[3..$];}
else if(opt.startsWith("-fdoc-dir=")) {doc_directory = opt[10..$];}
else if(opt.startsWith("-Df")) {doc_file = opt[3..$];}
else if(opt.startsWith("-fdoc-file=")) {doc_file = opt[11..$];}
else if(opt == "-lib") {generate_lib = true;}
else if(["-o-", "-fsyntax-only"].canFind(opt)){no_objects = true;}
else if(opt.startsWith("-of")) {out_file = opt[3..$];}
else if(opt.startsWith("-od")) {obj_directory = opt[3..$];}
else if(opt.startsWith("-o") && opt != "-op") {out_file = opt[2..$];}
options_ ~= opt;
}
//Set the -o (output filename) flag to the first source file if not already set.
//This matches the default behavior of dmd.
string ext = generate_lib ? lib_ext : bin_ext;
if(out_file.length == 0 && !no_linking && !no_objects && sources.length > 0)
{
out_file = sources[0].split("/").back.split("\\.")[0] ~ ext;
options_ ~= "-of" ~ out_file;
}
version (Windows)
{
auto dot = find(out_file, '.');
auto backslash = retro(find(retro(out_file), '/'));
if(dot <= backslash)
{
out_file ~= bin_ext;
}
}
}
/**
* Translate DMD compiler options to options of the target compiler.
*
* This function is incomplete. (what about -L? )
*
* Params: compiler = Compiler to translate to.
*
* Returns: Translated options.
*/
string[] get_options(in string compiler)
{
string[] result = options_.dup;
if(compiler != "gdc")
{
version(Windows) foreach(ref option; result)
{
option = option.startsWith("-of") ? option.replace("/", "\\") : option;
}
//ensure ddocs don't overwrite one another.
return result.canFind("-op") ? result : result ~ "-op";
}
//is gdc
auto translate = ["-Dd" : "-fdoc-dir=",
"-Df" : "-fdoc-file=",
"-debug=" : "-fdebug=",
"-debug" : "-fdebug", // will this still get selected?
"-inline" : "-finline-functions",
"-L" : "-Wl",
"-lib" : "",
"-O" : "-O3",
"-o-" : "-fsyntax-only",
"-of" : "-o ",
"-unittest" : "-funittest",
"-version" : "-fversion=",
"-version=" : "-fversion=",
"-wi" : "-Wextra",
"-w" : "-Wall",
"-gc" : "-g"];
//Perform option translation
foreach(ref option; result)
{
//remove unsupported -od
if(option.startsWith("-od")){option = "";}
if(option == "-D"){option = "-fdoc";}
//Options with a direct translation
else foreach(before, after; translate)
{
if(option.startsWith(before))
{
option = after ~ option[before.length..$];
break;
}
}
}
return result;
}
unittest
{
auto sources = ["foo.d"];
auto options = ["-D", "-inline", "-offoo"];
auto result = CompileOptions(options, sources).get_options("gdc");
assert(result[0 .. 3] == ["-fdoc", "-finline-functions", "-o foo"]);
}
}
///Thrown at errors in execution of other processes (e.g. compiler commands).
class CompileException : Exception
{
this(in string message, in string file, in size_t line){super(message, file, line);}
};
/**
* Wrapper around execute to write compile options to a file to get around max arg lenghts on Windows.
*
* Params: compiler = Compiler to execute.
* arguments = Compiler arguments.
*/
void execute_compiler(string compiler, string[] arguments)
{
try
{
version(Windows)
{
{
import std.stdio;
auto f = File("compile", "w");
foreach(arg; arguments)
{
writeln(arg);
f.write(arg, " ");
f.flush();
}
}
scope(exit){remove("compile");}
execute(compiler ~ " ", ["@compile"]);
}
else{execute(compiler, arguments);}
}
catch(ProcessException e)
{
writeln("Compiler failed: " ~ e.msg);
}
}
///Thrown at errors in execution of other processes (e.g. compiler commands).
class ProcessException : Exception {this(in string message){super(message);}};
/**
* Execute a command-line program and print its output.
*
* Params: command = The command to execute, e.g. "dmd".
* args = Arguments to pass to the command.
*
* Throws: ProcessException on failure or status code 1.
*/
void execute(string command, string[] args)
{
version(Windows)
{
if(command.startsWith("./")){command = command[2 .. $];}
}
string full = command ~ " " ~ args.join(" ");
writeln("CDC: " ~ full);
if(int status = system(full ~ "\0") != 0)
{
throw new ProcessException("Process " ~ command ~ " exited with status " ~
to!string(status));
}
}
/**
* Recursively get all files with specified extensions in directory and subdirectories.
*
* Params: directory = Absolute or relative path to the current directory.
* extensions = Extensions to match.
* ignorePathExps = If a file path matches any of these regular
* expressions, it is ignored.
*
* Returns: An array of paths (including filename) relative to directory.
*
* Bugs: LDC fails to return any results.
*/
string[] scan(string directory, string[] extensions, string[] ignorePathExps)
{
string[] result;
foreach(string name; dirEntries(directory, SpanMode.depth))
{
if(name.isFile &&
extensions.canFind!(e => name.endsWith(e)) &&
!ignorePathExps.canFind!(e => !name.match(e).empty))
{
result ~= name;
}
}
return result;
}
|
D
|
a distinct feature or element in a problem
a characteristic to be considered
the visual percept of a region
the beginning or duration or completion or repetition of the action of a verb
the feelings expressed on a person's face
|
D
|
/Users/svitlana/CocoaPods/ASAutoResizingTextView/Example/build/Pods.build/Debug-iphonesimulator/ASAutoResizingTextView.build/Objects-normal/x86_64/ASAutoResizingTextView.o : /Users/svitlana/CocoaPods/ASAutoResizingTextView/Pod/Classes/ASAutoResizingTextView.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Swift.swiftmodule /Users/svitlana/CocoaPods/ASAutoResizingTextView/Example/Pods/Target\ Support\ Files/ASAutoResizingTextView/ASAutoResizingTextView-umbrella.h /Users/svitlana/CocoaPods/ASAutoResizingTextView/Example/build/Pods.build/Debug-iphonesimulator/ASAutoResizingTextView.build/unextended-module.modulemap /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/UIKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/ObjectiveC.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreGraphics.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/QuartzCore.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreImage.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/SwiftOnoneSupport.swiftmodule
/Users/svitlana/CocoaPods/ASAutoResizingTextView/Example/build/Pods.build/Debug-iphonesimulator/ASAutoResizingTextView.build/Objects-normal/x86_64/ASAutoResizingTextView~partial.swiftmodule : /Users/svitlana/CocoaPods/ASAutoResizingTextView/Pod/Classes/ASAutoResizingTextView.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Swift.swiftmodule /Users/svitlana/CocoaPods/ASAutoResizingTextView/Example/Pods/Target\ Support\ Files/ASAutoResizingTextView/ASAutoResizingTextView-umbrella.h /Users/svitlana/CocoaPods/ASAutoResizingTextView/Example/build/Pods.build/Debug-iphonesimulator/ASAutoResizingTextView.build/unextended-module.modulemap /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/UIKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/ObjectiveC.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreGraphics.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/QuartzCore.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreImage.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/SwiftOnoneSupport.swiftmodule
/Users/svitlana/CocoaPods/ASAutoResizingTextView/Example/build/Pods.build/Debug-iphonesimulator/ASAutoResizingTextView.build/Objects-normal/x86_64/ASAutoResizingTextView~partial.swiftdoc : /Users/svitlana/CocoaPods/ASAutoResizingTextView/Pod/Classes/ASAutoResizingTextView.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Swift.swiftmodule /Users/svitlana/CocoaPods/ASAutoResizingTextView/Example/Pods/Target\ Support\ Files/ASAutoResizingTextView/ASAutoResizingTextView-umbrella.h /Users/svitlana/CocoaPods/ASAutoResizingTextView/Example/build/Pods.build/Debug-iphonesimulator/ASAutoResizingTextView.build/unextended-module.modulemap /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/UIKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/ObjectiveC.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreGraphics.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/QuartzCore.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreImage.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/SwiftOnoneSupport.swiftmodule
|
D
|
/Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/x86_64-apple-macosx10.10/debug/Node.build/Convertibles/Integer+Convertible.swift.o : /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/node.git-9175390252000121167/Sources/Node/StructuredData/StructuredData.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/node.git-9175390252000121167/Sources/Node/StructuredData/StructuredData+Polymorphic.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/node.git-9175390252000121167/Sources/Node/StructuredDataWrapper/StructuredDataWrapper+Polymorphic.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/node.git-9175390252000121167/Sources/Node/StructuredDataWrapper/StructuredDataWrapper+Convenience.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/node.git-9175390252000121167/Sources/Node/Core/Node.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/node.git-9175390252000121167/Sources/Node/StructuredData/StructuredData+Equatable.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/node.git-9175390252000121167/Sources/Node/StructuredDataWrapper/StructuredDataWrapper+Equatable.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/node.git-9175390252000121167/Sources/Node/Core/NodeRepresentable.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/node.git-9175390252000121167/Sources/Node/StructuredData/StructuredData+PathIndexable.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/node.git-9175390252000121167/Sources/Node/StructuredDataWrapper/StructuredDataWrapper+PathIndexable.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/node.git-9175390252000121167/Sources/Node/Core/NodeInitializable.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/node.git-9175390252000121167/Sources/Node/Convertibles/UUID+Convertible.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/node.git-9175390252000121167/Sources/Node/Convertibles/Schema+Convertible.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/node.git-9175390252000121167/Sources/Node/Convertibles/Date+Convertible.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/node.git-9175390252000121167/Sources/Node/Convertibles/String+Convertible.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/node.git-9175390252000121167/Sources/Node/Fuzzy/Optional+Convertible.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/node.git-9175390252000121167/Sources/Node/Convertibles/Bool+Convertible.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/node.git-9175390252000121167/Sources/Node/Convertibles/Integer+Convertible.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/node.git-9175390252000121167/Sources/Node/Convertibles/UnsignedInteger+Convertible.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/node.git-9175390252000121167/Sources/Node/Convertibles/SchemaWrapper+Convertible.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/node.git-9175390252000121167/Sources/Node/Fuzzy/Set+Convertible.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/node.git-9175390252000121167/Sources/Node/Convertibles/FloatingPoint+Convertible.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/node.git-9175390252000121167/Sources/Node/Fuzzy/Array+Convertible.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/node.git-9175390252000121167/Sources/Node/Fuzzy/Dictionary+Convertible.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/node.git-9175390252000121167/Sources/Node/Core/NodeConvertible.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/node.git-9175390252000121167/Sources/Node/Number/Number.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/node.git-9175390252000121167/Sources/Node/Utilities/Identifier.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/node.git-9175390252000121167/Sources/Node/StructuredDataWrapper/StructuredDataWrapper.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/node.git-9175390252000121167/Sources/Node/Fuzzy/FuzzyConverter.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/node.git-9175390252000121167/Sources/Node/StructuredDataWrapper/StructuredDataWrapper+Cases.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/node.git-9175390252000121167/Sources/Node/StructuredDataWrapper/StructuredDataWrapper+Literals.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/node.git-9175390252000121167/Sources/Node/Accessors/Getters.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/node.git-9175390252000121167/Sources/Node/Accessors/Setters.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/node.git-9175390252000121167/Sources/Node/Utilities/Errors.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/node.git-9175390252000121167/Sources/Node/Utilities/Exports.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/node.git-9175390252000121167/Sources/Node/StructuredData/StructuredData+Init.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/node.git-9175390252000121167/Sources/Node/Core/Context.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/node.git-9175390252000121167/Sources/Node/Fuzzy/Fuzzy+Any.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/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/x86_64-apple-macosx10.10/debug/libc.swiftmodule /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/x86_64-apple-macosx10.10/debug/PathIndexable.swiftmodule /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/x86_64-apple-macosx10.10/debug/Core.swiftmodule /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.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 /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/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/x86_64-apple-macosx10.10/debug/Bits.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/IOKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/SwiftOnoneSupport.swiftmodule /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/x86_64-apple-macosx10.10/debug/CHTTP.build/module.modulemap /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/x86_64-apple-macosx10.10/debug/CSQLite.build/module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes
/Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/x86_64-apple-macosx10.10/debug/Node.build/Integer+Convertible~partial.swiftmodule : /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/node.git-9175390252000121167/Sources/Node/StructuredData/StructuredData.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/node.git-9175390252000121167/Sources/Node/StructuredData/StructuredData+Polymorphic.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/node.git-9175390252000121167/Sources/Node/StructuredDataWrapper/StructuredDataWrapper+Polymorphic.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/node.git-9175390252000121167/Sources/Node/StructuredDataWrapper/StructuredDataWrapper+Convenience.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/node.git-9175390252000121167/Sources/Node/Core/Node.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/node.git-9175390252000121167/Sources/Node/StructuredData/StructuredData+Equatable.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/node.git-9175390252000121167/Sources/Node/StructuredDataWrapper/StructuredDataWrapper+Equatable.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/node.git-9175390252000121167/Sources/Node/Core/NodeRepresentable.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/node.git-9175390252000121167/Sources/Node/StructuredData/StructuredData+PathIndexable.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/node.git-9175390252000121167/Sources/Node/StructuredDataWrapper/StructuredDataWrapper+PathIndexable.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/node.git-9175390252000121167/Sources/Node/Core/NodeInitializable.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/node.git-9175390252000121167/Sources/Node/Convertibles/UUID+Convertible.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/node.git-9175390252000121167/Sources/Node/Convertibles/Schema+Convertible.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/node.git-9175390252000121167/Sources/Node/Convertibles/Date+Convertible.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/node.git-9175390252000121167/Sources/Node/Convertibles/String+Convertible.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/node.git-9175390252000121167/Sources/Node/Fuzzy/Optional+Convertible.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/node.git-9175390252000121167/Sources/Node/Convertibles/Bool+Convertible.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/node.git-9175390252000121167/Sources/Node/Convertibles/Integer+Convertible.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/node.git-9175390252000121167/Sources/Node/Convertibles/UnsignedInteger+Convertible.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/node.git-9175390252000121167/Sources/Node/Convertibles/SchemaWrapper+Convertible.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/node.git-9175390252000121167/Sources/Node/Fuzzy/Set+Convertible.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/node.git-9175390252000121167/Sources/Node/Convertibles/FloatingPoint+Convertible.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/node.git-9175390252000121167/Sources/Node/Fuzzy/Array+Convertible.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/node.git-9175390252000121167/Sources/Node/Fuzzy/Dictionary+Convertible.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/node.git-9175390252000121167/Sources/Node/Core/NodeConvertible.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/node.git-9175390252000121167/Sources/Node/Number/Number.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/node.git-9175390252000121167/Sources/Node/Utilities/Identifier.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/node.git-9175390252000121167/Sources/Node/StructuredDataWrapper/StructuredDataWrapper.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/node.git-9175390252000121167/Sources/Node/Fuzzy/FuzzyConverter.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/node.git-9175390252000121167/Sources/Node/StructuredDataWrapper/StructuredDataWrapper+Cases.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/node.git-9175390252000121167/Sources/Node/StructuredDataWrapper/StructuredDataWrapper+Literals.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/node.git-9175390252000121167/Sources/Node/Accessors/Getters.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/node.git-9175390252000121167/Sources/Node/Accessors/Setters.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/node.git-9175390252000121167/Sources/Node/Utilities/Errors.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/node.git-9175390252000121167/Sources/Node/Utilities/Exports.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/node.git-9175390252000121167/Sources/Node/StructuredData/StructuredData+Init.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/node.git-9175390252000121167/Sources/Node/Core/Context.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/node.git-9175390252000121167/Sources/Node/Fuzzy/Fuzzy+Any.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/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/x86_64-apple-macosx10.10/debug/libc.swiftmodule /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/x86_64-apple-macosx10.10/debug/PathIndexable.swiftmodule /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/x86_64-apple-macosx10.10/debug/Core.swiftmodule /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.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 /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/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/x86_64-apple-macosx10.10/debug/Bits.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/IOKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/SwiftOnoneSupport.swiftmodule /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/x86_64-apple-macosx10.10/debug/CHTTP.build/module.modulemap /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/x86_64-apple-macosx10.10/debug/CSQLite.build/module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes
/Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/x86_64-apple-macosx10.10/debug/Node.build/Integer+Convertible~partial.swiftdoc : /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/node.git-9175390252000121167/Sources/Node/StructuredData/StructuredData.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/node.git-9175390252000121167/Sources/Node/StructuredData/StructuredData+Polymorphic.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/node.git-9175390252000121167/Sources/Node/StructuredDataWrapper/StructuredDataWrapper+Polymorphic.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/node.git-9175390252000121167/Sources/Node/StructuredDataWrapper/StructuredDataWrapper+Convenience.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/node.git-9175390252000121167/Sources/Node/Core/Node.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/node.git-9175390252000121167/Sources/Node/StructuredData/StructuredData+Equatable.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/node.git-9175390252000121167/Sources/Node/StructuredDataWrapper/StructuredDataWrapper+Equatable.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/node.git-9175390252000121167/Sources/Node/Core/NodeRepresentable.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/node.git-9175390252000121167/Sources/Node/StructuredData/StructuredData+PathIndexable.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/node.git-9175390252000121167/Sources/Node/StructuredDataWrapper/StructuredDataWrapper+PathIndexable.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/node.git-9175390252000121167/Sources/Node/Core/NodeInitializable.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/node.git-9175390252000121167/Sources/Node/Convertibles/UUID+Convertible.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/node.git-9175390252000121167/Sources/Node/Convertibles/Schema+Convertible.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/node.git-9175390252000121167/Sources/Node/Convertibles/Date+Convertible.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/node.git-9175390252000121167/Sources/Node/Convertibles/String+Convertible.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/node.git-9175390252000121167/Sources/Node/Fuzzy/Optional+Convertible.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/node.git-9175390252000121167/Sources/Node/Convertibles/Bool+Convertible.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/node.git-9175390252000121167/Sources/Node/Convertibles/Integer+Convertible.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/node.git-9175390252000121167/Sources/Node/Convertibles/UnsignedInteger+Convertible.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/node.git-9175390252000121167/Sources/Node/Convertibles/SchemaWrapper+Convertible.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/node.git-9175390252000121167/Sources/Node/Fuzzy/Set+Convertible.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/node.git-9175390252000121167/Sources/Node/Convertibles/FloatingPoint+Convertible.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/node.git-9175390252000121167/Sources/Node/Fuzzy/Array+Convertible.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/node.git-9175390252000121167/Sources/Node/Fuzzy/Dictionary+Convertible.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/node.git-9175390252000121167/Sources/Node/Core/NodeConvertible.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/node.git-9175390252000121167/Sources/Node/Number/Number.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/node.git-9175390252000121167/Sources/Node/Utilities/Identifier.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/node.git-9175390252000121167/Sources/Node/StructuredDataWrapper/StructuredDataWrapper.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/node.git-9175390252000121167/Sources/Node/Fuzzy/FuzzyConverter.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/node.git-9175390252000121167/Sources/Node/StructuredDataWrapper/StructuredDataWrapper+Cases.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/node.git-9175390252000121167/Sources/Node/StructuredDataWrapper/StructuredDataWrapper+Literals.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/node.git-9175390252000121167/Sources/Node/Accessors/Getters.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/node.git-9175390252000121167/Sources/Node/Accessors/Setters.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/node.git-9175390252000121167/Sources/Node/Utilities/Errors.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/node.git-9175390252000121167/Sources/Node/Utilities/Exports.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/node.git-9175390252000121167/Sources/Node/StructuredData/StructuredData+Init.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/node.git-9175390252000121167/Sources/Node/Core/Context.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/node.git-9175390252000121167/Sources/Node/Fuzzy/Fuzzy+Any.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/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/x86_64-apple-macosx10.10/debug/libc.swiftmodule /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/x86_64-apple-macosx10.10/debug/PathIndexable.swiftmodule /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/x86_64-apple-macosx10.10/debug/Core.swiftmodule /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.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 /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/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/x86_64-apple-macosx10.10/debug/Bits.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/IOKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/SwiftOnoneSupport.swiftmodule /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/x86_64-apple-macosx10.10/debug/CHTTP.build/module.modulemap /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/x86_64-apple-macosx10.10/debug/CSQLite.build/module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes
|
D
|
module vulkan.imgui.imgui_memory_editor;
import vulkan.all;
/**
* D lang conversion (with changes and removals) of the following ImGui utility:
*
* https://github.com/ocornut/imgui_club/blob/master/imgui_memory_editor/imgui_memory_editor.h
*/
// Mini memory editor for Dear ImGui (to embed in your game/tools)
// Get latest version at http://www.github.com/ocornut/imgui_club
//
// Right-click anywhere to access the Options menu!
// You can adjust the keyboard repeat delay/rate in ImGuiIO.
// The code assume a mono-space font for simplicity!
// If you don't use the default font, use igPushFont()/PopFont() to switch to a mono-space font before calling this.
//
// Usage:
// // Create a window and draw memory editor inside it:
// static MemoryEditor mem_edit_1;
// static char data[0x10000];
// ulong data_size = 0x10000;
// mem_edit_1.DrawWindow("Memory Editor", data, data_size);
//
// Usage:
// // If you already have a window, use DrawContents() instead:
// static MemoryEditor mem_edit_2;
// igBegin("MyWindow")
// mem_edit_2.DrawContents(this, sizeof(*this), (ulong)this);
// igEnd();
//
// Changelog:
// - v0.10: initial version
// - v0.23 (2017/08/17): added to github. fixed right-arrow triggering a byte write.
// - v0.24 (2018/06/02): changed DragInt("Rows" to use a %d data format (which is desirable since imgui 1.61).
// - v0.25 (2018/07/11): fixed wording: all occurrences of "Rows" renamed to "Columns".
// - v0.26 (2018/08/02): fixed clicking on hex region
// - v0.30 (2018/08/02): added data preview for common data types
// - v0.31 (2018/10/10): added OptUpperCaseHex option to select lower/upper casing display [@samhocevar]
// - v0.32 (2018/10/10): changed signatures to use void* instead of unsigned char*
// - v0.33 (2018/10/10): added OptShowOptions option to hide all the interactive option setting.
// - v0.34 (2019/05/07): binary preview now applies endianness setting [@nicolasnoble]
// - v0.35 (2020/01/29): using ImGuiDataType available since Dear ImGui 1.69.
// - v0.36 (2020/05/05): minor tweaks, minor refactor.
// - v0.40 (2020/10/04): fix misuse of ImGuiListClipper API, broke with Dear ImGui 1.79. made cursor position appears on left-side of edit box. option popup appears on mouse release. fix MSVC warnings where _CRT_SECURE_NO_WARNINGS wasn't working in recent versions.
// - v0.41 (2020/10/05): fix when using with keyboard/gamepad navigation enabled.
// - v0.42 (2020/10/14): fix for . character in ASCII view always being greyed out.
// - v0.43 (2021/03/12): added OptFooterExtraHeight to allow for custom drawing at the bottom of the editor [@leiradel]
// - v0.44 (2021/03/12): use ImGuiInputTextFlags_AlwaysOverwrite in 1.82 + fix hardcoded width.
//
// Todo/Bugs:
// - This is generally old code, it should work but please don't use this as reference!
// - Arrows are being sent to the InputText() about to disappear which for LeftArrow makes the text cursor appear at position 1 for one frame.
// - Using InputText() is awkward and maybe overkill here, consider implementing something custom.
// #pragma once
import core.stdc.stdio : sprintf, snprintf, scanf, sscanf;
//enum _PRISizeT = "I";
enum _PRISizeT = "z";
final class MemoryEditor {
private:
enum DataFormat {
Bin = 0,
Dec = 1,
Hex = 2,
COUNT
}
struct Sizes {
int AddrDigitsCount;
float LineHeight = 0;
float GlyphWidth = 0;
float HexCellWidth = 0;
float SpacingBetweenMidCols = 0;
float PosHexStart = 0;
float PosHexEnd = 0;
float PosAsciiStart = 0;
float PosAsciiEnd = 0;
float WindowWidth = 0;
}
// [Internal State]
bool ContentsWidthChanged;
ulong DataPreviewAddr = cast(ulong)-1;
ulong DataEditingAddr = cast(ulong)-1;
bool DataEditingTakeFocus;
char[32] DataInputBuf;
char[32] AddrInputBuf;
ulong GotoAddr = cast(ulong)-1;
ulong HighlightMin = cast(ulong)-1, HighlightMax = cast(ulong)-1;
int PreviewEndianess;
ImFont* font;
public:
// Settings
bool Open = true; // set to false when DrawWindow() was closed. ignore if not using DrawWindow().
bool ReadOnly; // disable any editing.
int Cols = 16; // number of columns to display.
uint HighlightColor = 0xffff_ff32; // background color of highlighted bytes.
ImU8 delegate(ImU8* data, ulong off) ReadFn; // optional handler to read bytes.
void delegate(ImU8* data, ulong off, ImU8 d) WriteFn; // optional handler to write bytes.
bool delegate(ImU8* data, ulong off) HighlightFn; // optional handler to return Highlight property (to support non-contiguous highlighting).
ImGuiDataType PreviewDataType = ImGuiDataType_S32;
// Options
bool OptShowOptions = true; // display options button/context menu. when disabled, options will be locked unless you provide your own UI for them.
bool OptShowDataPreview = true; // display a footer previewing the decimal/binary/hex/float representation of the currently selected bytes.
bool OptShowHexII; // display values in HexII representation instead of regular hexadecimal: hide null/zero bytes, ascii values as ".X".
bool OptShowAscii = true; // display ASCII representation on the right side.
bool OptGreyOutZeroes = true; // display null/zero bytes using the TextDisabled color.
bool OptUpperCaseHex = true; // display hexadecimal values as "FF" instead of "ff".
int OptMidColsCount = 8; // set to 0 to disable extra spacing between every mid-cols.
int OptAddrDigitsCount; // number of addr digits to display (default calculated based on maximum displayed addr).
float OptFooterExtraHeight = 0; // space to reserve at the bottom of the widget to add custom widgets
this() {
DataInputBuf[] = 0;
AddrInputBuf[] = 0;
}
auto withFont(ImFont* font) {
this.font = font;
return this;
}
void scrollToAddress(ulong addr) {
GotoAddrAndHighlight(addr, addr);
}
// Draw window and contents
void DrawWindow(string title, void* mem_data, ulong memSize, ulong baseDisplayAddr = 0) {
Sizes s;
CalcSizes(&s, memSize, baseDisplayAddr);
igSetNextWindowSizeConstraints(ImVec2(0.0f, 0.0f), ImVec2(s.WindowWidth, float.max), null, null);
auto windowTitle = getTitle(title, memSize, baseDisplayAddr, s);
Open = true;
if (igBegin(windowTitle, &Open, ImGuiWindowFlags_NoScrollbar))
{
if(igIsWindowHovered(ImGuiHoveredFlags_RootAndChildWindows) && igIsMouseReleased(ImGuiMouseButton_Right)) {
igOpenPopup_Str("context", ImGuiPopupFlags_None);
}
DrawContents(mem_data, memSize, baseDisplayAddr);
if(ContentsWidthChanged) {
CalcSizes(&s, memSize, baseDisplayAddr);
igSetWindowSize_Vec2(ImVec2(s.WindowWidth, igoGetWindowSize().y), ImGuiCond_None);
}
}
igEnd();
}
// Draw contents only
void DrawContents(void* mem_data_void, ulong mem_size, ulong base_display_addr = 0x0000)
{
if (Cols < 1) Cols = 1;
ImU8* mem_data = cast(ImU8*)mem_data_void;
Sizes s;
CalcSizes(&s, mem_size, base_display_addr);
ImGuiStyle* style = igGetStyle();
// We begin into our scrolling region with the 'ImGuiWindowFlags_NoMove' in order to prevent click from moving the window.
// This is used as a facility since our main click detection code doesn't assign an ActiveId so the click would normally be caught as a window-move.
const float height_separator = style.ItemSpacing.y;
float footer_height = OptFooterExtraHeight;
if (OptShowOptions)
footer_height += height_separator + igGetFrameHeightWithSpacing() * 1;
if (OptShowDataPreview)
footer_height += height_separator + igGetFrameHeightWithSpacing() * 1 + igGetTextLineHeightWithSpacing() * 3;
igBeginChild_Str("##scrolling", ImVec2(0, -footer_height), false, ImGuiWindowFlags_NoMove | ImGuiWindowFlags_NoNav);
ImDrawList* draw_list = igGetWindowDrawList();
igPushStyleVar(ImGuiStyleVar_FramePadding, ImVec2(0, 0));
igPushStyleVar(ImGuiStyleVar_ItemSpacing, ImVec2(0, 0));
// We are not really using the clipper API correctly here,
// because we rely on visible_start_addr/visible_end_addr for our scrolling function.
int line_total_count = cast(int)((mem_size + Cols - 1) / Cols);
ImGuiListClipper clipper;
ImGuiListClipper_Begin(&clipper, line_total_count, s.LineHeight);
ImGuiListClipper_Step(&clipper);
ulong visible_start_addr = clipper.DisplayStart * Cols;
ulong visible_end_addr = clipper.DisplayEnd * Cols;
bool data_next = false;
if (ReadOnly || DataEditingAddr >= mem_size)
DataEditingAddr = cast(ulong)-1;
if (DataPreviewAddr >= mem_size)
DataPreviewAddr = cast(ulong)-1;
ulong preview_data_type_size = OptShowDataPreview ? DataTypeGetSize(PreviewDataType) : 0;
ulong data_editing_addr_backup = DataEditingAddr;
ulong data_editing_addr_next = cast(ulong)-1;
if (DataEditingAddr != cast(ulong)-1)
{
// Move cursor but only apply on next frame so scrolling with be synchronized (because currently we can't change the scrolling while the window is being rendered)
if (igoIsKeyPressed(igGetKeyIndex(ImGuiKey_UpArrow)) && DataEditingAddr >= cast(ulong)Cols) { data_editing_addr_next = DataEditingAddr - Cols; DataEditingTakeFocus = true; }
else if (igoIsKeyPressed(igGetKeyIndex(ImGuiKey_DownArrow)) && DataEditingAddr < mem_size - Cols) { data_editing_addr_next = DataEditingAddr + Cols; DataEditingTakeFocus = true; }
else if (igoIsKeyPressed(igGetKeyIndex(ImGuiKey_LeftArrow)) && DataEditingAddr > 0) { data_editing_addr_next = DataEditingAddr - 1; DataEditingTakeFocus = true; }
else if (igoIsKeyPressed(igGetKeyIndex(ImGuiKey_RightArrow)) && DataEditingAddr < mem_size - 1) { data_editing_addr_next = DataEditingAddr + 1; DataEditingTakeFocus = true; }
}
if (data_editing_addr_next != cast(ulong)-1 && (data_editing_addr_next / Cols) != (data_editing_addr_backup / Cols))
{
// Track cursor movements
const int scroll_offset = (cast(int)(data_editing_addr_next / Cols) - cast(int)(data_editing_addr_backup / Cols));
const bool scroll_desired = (scroll_offset < 0 && data_editing_addr_next < visible_start_addr + Cols * 2) || (scroll_offset > 0 && data_editing_addr_next > visible_end_addr - Cols * 2);
if (scroll_desired)
igSetScrollY_Float(igGetScrollY() + scroll_offset * s.LineHeight);
}
// Draw vertical separator
auto window_pos = igoGetWindowPos();
if (OptShowAscii) {
ImDrawList_AddLine(draw_list,
ImVec2(window_pos.x + s.PosAsciiStart - s.GlyphWidth, window_pos.y),
ImVec2(window_pos.x + s.PosAsciiStart - s.GlyphWidth, window_pos.y + 9999),
igGetColorU32(ImGuiCol_Border), 1.0f);
}
ImU32 color_text = igGetColorU32(ImGuiCol_Text);
ImU32 color_disabled = OptGreyOutZeroes ? igGetColorU32(ImGuiCol_TextDisabled) : color_text;
immutable(char)* format_address = OptUpperCaseHex ? "%0*" ~ _PRISizeT ~ "X: " : "%0*" ~ _PRISizeT ~ "x: ";
immutable(char)* format_data = OptUpperCaseHex ? "%0*" ~ _PRISizeT ~ "X" : "%0*" ~ _PRISizeT ~ "x";
immutable(char)* format_byte = OptUpperCaseHex ? "%02X" : "%02x";
immutable(char)* format_byte_space = OptUpperCaseHex ? "%02X " : "%02x ";
if(font)
igPushFont(font);
// display only visible lines
for (int line_i = clipper.DisplayStart; line_i < clipper.DisplayEnd; line_i++)
{
if (GotoAddr != cast(ulong)-1)
{
if (GotoAddr < mem_size)
{
// igBeginChildStr("##scrolling", ImVec2(0,0), true, ImGuiWindowFlags_None);
// igSetScrollFromPosYFloat(igoGetCursorStartPos().y + (GotoAddr / Cols) * igGetTextLineHeight(), 1.0f);
// igEndChild();
auto l = (GotoAddr / Cols) * igGetTextLineHeightWithSpacing();
igSetScrollY_Float(l);
DataEditingAddr = DataPreviewAddr = GotoAddr;
DataEditingTakeFocus = true;
}
GotoAddr = cast(ulong)-1;
}
ulong addr = cast(ulong)(line_i * Cols);
igText(format_address, s.AddrDigitsCount, base_display_addr + addr);
// Draw Hexadecimal
for (int n = 0; n < Cols && addr < mem_size; n++, addr++)
{
float byte_pos_x = s.PosHexStart + s.HexCellWidth * n;
if (OptMidColsCount > 0) {
byte_pos_x += cast(float)(n / OptMidColsCount) * s.SpacingBetweenMidCols;
}
igSameLine(byte_pos_x, 0);
// Draw highlight
bool is_highlight_from_user_range = (addr >= HighlightMin && addr < HighlightMax);
bool is_highlight_from_user_func = (HighlightFn && HighlightFn(mem_data, addr));
bool is_highlight_from_preview = (addr >= DataPreviewAddr && addr < DataPreviewAddr + preview_data_type_size);
if (is_highlight_from_user_range || is_highlight_from_user_func || is_highlight_from_preview)
{
ImVec2 pos = igoGetCursorScreenPos();
float highlight_width = s.GlyphWidth * 2;
bool is_next_byte_highlighted = (addr + 1 < mem_size) && ((HighlightMax != cast(ulong)-1 && addr + 1 < HighlightMax) || (HighlightFn && HighlightFn(mem_data, addr + 1)));
if (is_next_byte_highlighted || (n + 1 == Cols))
{
highlight_width = s.HexCellWidth;
if (OptMidColsCount > 0 && n > 0 && (n + 1) < Cols && ((n + 1) % OptMidColsCount) == 0)
highlight_width += s.SpacingBetweenMidCols;
}
ImDrawList_AddRectFilled(
draw_list,
pos,
ImVec2(pos.x + highlight_width, pos.y + s.LineHeight),
HighlightColor,
0f,
ImDrawListFlags_None);
}
if (DataEditingAddr == addr) {
// Display text input on current byte
bool data_write = false;
igPushID_Ptr(cast(void*)addr);
if (DataEditingTakeFocus)
{
igSetKeyboardFocusHere(0);
igCaptureKeyboardFromApp(true);
sprintf(AddrInputBuf.ptr, format_data, s.AddrDigitsCount, base_display_addr + addr);
sprintf(DataInputBuf.ptr, format_byte, ReadFn ? ReadFn(mem_data, addr) : mem_data[addr]);
}
struct UserData
{
// FIXME: We should have a way to retrieve the text edit cursor position more easily in the API, this is rather tedious. This is such a ugly mess we may be better off not using InputText() at all here.
extern(C)
static int Callback(ImGuiInputTextCallbackData* data) nothrow
{
UserData* user_data = cast(UserData*)data.UserData;
if (!ImGuiInputTextCallbackData_HasSelection(data))
user_data.CursorPos = data.CursorPos;
if (data.SelectionStart == 0 && data.SelectionEnd == data.BufTextLen)
{
// When not editing a byte, always rewrite its content (this is a bit tricky, since InputText technically "owns" the master copy of the buffer we edit it in there)
ImGuiInputTextCallbackData_DeleteChars(data, 0, data.BufTextLen);
ImGuiInputTextCallbackData_InsertChars(data, 0, cast(immutable(char)*)user_data.CurrentBufOverwrite.ptr, null);
data.SelectionStart = 0;
data.SelectionEnd = 2;
data.CursorPos = 0;
}
return 0;
}
char[3] CurrentBufOverwrite; // Input
int CursorPos; // Output
}
UserData user_data;
user_data.CursorPos = -1;
sprintf(user_data.CurrentBufOverwrite.ptr, format_byte, ReadFn ? ReadFn(mem_data, addr) : mem_data[addr]);
ImGuiInputTextFlags flags = ImGuiInputTextFlags_CharsHexadecimal | ImGuiInputTextFlags_EnterReturnsTrue | ImGuiInputTextFlags_AutoSelectAll | ImGuiInputTextFlags_NoHorizontalScroll | ImGuiInputTextFlags_CallbackAlways;
flags |= ImGuiInputTextFlags_AlwaysOverwrite;
igSetNextItemWidth(s.GlyphWidth * 2);
if (igInputText("##data", cast(immutable(char)*)DataInputBuf.ptr, DataInputBuf.length, flags, &UserData.Callback, &user_data)) {
data_write = data_next = true;
} else if (!DataEditingTakeFocus && !igIsItemActive()) {
DataEditingAddr = data_editing_addr_next = cast(ulong)-1;
}
DataEditingTakeFocus = false;
if (user_data.CursorPos >= 2)
data_write = data_next = true;
if (data_editing_addr_next != cast(ulong)-1)
data_write = data_next = false;
uint data_input_value = 0;
if (data_write && sscanf(DataInputBuf.ptr, "%X", &data_input_value) == 1)
{
if (WriteFn) {
WriteFn(mem_data, addr, cast(ImU8)data_input_value);
} else {
mem_data[addr] = cast(ImU8)data_input_value;
}
}
igPopID();
}
else
{
// NB: The trailing space is not visible but ensure there's no gap that the mouse cannot click on.
ImU8 b = ReadFn ? ReadFn(mem_data, addr) : mem_data[addr];
if (OptShowHexII)
{
if (b >= 32 && b < 128)
igText(".%c ", b);
else if (b == 0xFF && OptGreyOutZeroes)
igTextDisabled("## ");
else if (b == 0x00)
igText(" ");
else
igText(format_byte_space, b);
}
else
{
if (b == 0 && OptGreyOutZeroes)
igTextDisabled("00 ");
else
igText(format_byte_space, b);
}
if (!ReadOnly && igIsItemHovered(ImGuiHoveredFlags_None) && igIsMouseClicked(0, false))
{
DataEditingTakeFocus = true;
data_editing_addr_next = addr;
}
}
}
if (OptShowAscii)
{
// Draw ASCII values
igSameLine(s.PosAsciiStart, 0);
ImVec2 pos = igoGetCursorScreenPos();
addr = line_i * Cols;
igPushID_Int(line_i);
if (igInvisibleButton("ascii", ImVec2(s.PosAsciiEnd - s.PosAsciiStart, s.LineHeight), ImGuiButtonFlags_None))
{
DataEditingAddr = DataPreviewAddr = addr + cast(ulong)((igGetIO().MousePos.x - pos.x) / s.GlyphWidth);
DataEditingTakeFocus = true;
}
igPopID();
for (int n = 0; n < Cols && addr < mem_size; n++, addr++)
{
if (addr == DataEditingAddr)
{
ImDrawList_AddRectFilled(draw_list, pos, ImVec2(pos.x + s.GlyphWidth, pos.y + s.LineHeight), igGetColorU32(ImGuiCol_FrameBg), 1.0f, ImDrawFlags_RoundCornersNone);
ImDrawList_AddRectFilled(draw_list, pos, ImVec2(pos.x + s.GlyphWidth, pos.y + s.LineHeight), igGetColorU32(ImGuiCol_TextSelectedBg), 1.0f, ImDrawFlags_RoundCornersNone);
}
ubyte c = ReadFn ? ReadFn(mem_data, addr) : mem_data[addr];
char display_c = (c < 32 || c >= 128) ? '.' : c;
ImDrawList_AddText_Vec2(draw_list, pos, (display_c == c) ? color_text : color_disabled,
cast(immutable(char)*)&display_c, cast(immutable(char)*)&display_c + 1);
pos.x += s.GlyphWidth;
}
}
}
if(font)
igPopFont();
throwIf(ImGuiListClipper_Step(&clipper) != false);
ImGuiListClipper_End(&clipper);
igPopStyleVar(2);
igEndChild();
// Notify the main window of our ideal child content size (FIXME: we are missing an API to get the contents size from the child)
igSetCursorPosX(s.WindowWidth);
if (data_next && DataEditingAddr < mem_size)
{
DataEditingAddr = DataPreviewAddr = DataEditingAddr + 1;
DataEditingTakeFocus = true;
}
else if (data_editing_addr_next != cast(ulong)-1)
{
DataEditingAddr = DataPreviewAddr = data_editing_addr_next;
}
bool lock_show_data_preview = OptShowDataPreview;
if (OptShowOptions)
{
igSeparator();
DrawOptionsLine(&s, mem_size, base_display_addr);
}
if (lock_show_data_preview)
{
igSeparator();
DrawPreviewLine(&s, mem_data, mem_size, base_display_addr);
}
}
private:
immutable(char)* getTitle(string userTitle, ulong memSize, ulong baseDisplayAddr, ref Sizes s) {
string fmt = "%%s [%%0%sx to %%0%sx]".format(s.AddrDigitsCount, s.AddrDigitsCount);
string title = fmt.format(userTitle, baseDisplayAddr, baseDisplayAddr + memSize - 1);
return toStringz(title);
}
void GotoAddrAndHighlight(ulong addr_min, ulong addr_max) {
GotoAddr = addr_min;
HighlightMin = addr_min;
HighlightMax = addr_max;
}
void CalcSizes(Sizes* s, ulong mem_size, ulong base_display_addr)
{
ImGuiStyle* style = igGetStyle();
s.AddrDigitsCount = OptAddrDigitsCount;
if (s.AddrDigitsCount == 0)
for (ulong n = base_display_addr + mem_size - 1; n > 0; n >>= 4)
s.AddrDigitsCount++;
s.LineHeight = igGetTextLineHeight();
s.GlyphWidth = igoCalcTextSize("F").x + 1; // We assume the font is mono-space
s.HexCellWidth = cast(float)cast(int)(s.GlyphWidth * 2.0f); // "FF " we include trailing space in the width to easily catch clicks everywhere
s.SpacingBetweenMidCols = cast(float)cast(int)(s.HexCellWidth * 0.25f); // Every OptMidColsCount columns we add a bit of extra spacing
s.PosHexStart = (s.AddrDigitsCount + 2) * s.GlyphWidth;
s.PosHexEnd = s.PosHexStart + (s.HexCellWidth * Cols);
s.PosAsciiStart = s.PosAsciiEnd = s.PosHexEnd;
if (OptShowAscii)
{
s.PosAsciiStart = s.PosHexEnd + s.GlyphWidth * 1;
if (OptMidColsCount > 0)
s.PosAsciiStart += cast(float)((Cols + OptMidColsCount - 1) / OptMidColsCount) * s.SpacingBetweenMidCols;
s.PosAsciiEnd = s.PosAsciiStart + Cols * s.GlyphWidth;
}
s.WindowWidth = s.PosAsciiEnd + style.ScrollbarSize + style.WindowPadding.x * 2 + s.GlyphWidth;
}
void DrawOptionsLine(Sizes* s, ulong mem_size, ulong base_display_addr)
{
ImGuiStyle* style = igGetStyle();
// Options menu
if (igButton("Options", ImVec2(0,0))) {
igOpenPopup_Str("context", ImGuiPopupFlags_None);
}
if (igBeginPopup("context", ImGuiWindowFlags_None)) {
igSetNextItemWidth(s.GlyphWidth * 7 + style.FramePadding.x * 2.0f);
if (igDragInt("##cols", &Cols, 0.2f, 4, 32, "%d cols", ImGuiSliderFlags_None)) {
ContentsWidthChanged = true;
if (Cols < 1) Cols = 1;
}
igCheckbox("Show Data Preview", &OptShowDataPreview);
igCheckbox("Show HexII", &OptShowHexII);
if (igCheckbox("Show Ascii", &OptShowAscii)) {
ContentsWidthChanged = true;
}
igCheckbox("Grey out zeroes", &OptGreyOutZeroes);
igCheckbox("Uppercase Hex", &OptUpperCaseHex);
igEndPopup();
}
igSameLine(0, 10);
igSetNextItemWidth((8 + 1) * s.GlyphWidth + style.FramePadding.x * 2.0f);
if (igInputTextWithHint("##addr", "Address", cast(immutable(char)*)AddrInputBuf.ptr, AddrInputBuf.length, ImGuiInputTextFlags_CharsHexadecimal | ImGuiInputTextFlags_EnterReturnsTrue, null, null))
{
ulong goto_addr;
if (sscanf(AddrInputBuf.ptr, "%" ~ _PRISizeT ~ "X", &goto_addr) == 1)
{
GotoAddr = goto_addr - base_display_addr;
HighlightMin = HighlightMax = cast(ulong)-1;
}
}
// if (GotoAddr != cast(ulong)-1)
// {
// if (GotoAddr < mem_size)
// {
// igBeginChildStr("##scrolling", ImVec2(0,0), true, ImGuiWindowFlags_None);
// igSetScrollFromPosYFloat(igoGetCursorStartPos().y + (GotoAddr / Cols) * igGetTextLineHeight(), 1.0f);
// igEndChild();
// DataEditingAddr = DataPreviewAddr = GotoAddr;
// DataEditingTakeFocus = true;
// }
// GotoAddr = cast(ulong)-1;
// }
}
void DrawPreviewLine(Sizes* s, void* mem_data_void, ulong mem_size, ulong base_display_addr)
{
ImU8* mem_data = cast(ImU8*)mem_data_void;
ImGuiStyle* style = igGetStyle();
igAlignTextToFramePadding();
igText("Preview as:");
igSameLine(0,0);
igSetNextItemWidth((s.GlyphWidth * 10.0f) + style.FramePadding.x * 2.0f + style.ItemInnerSpacing.x);
if (igBeginCombo("##combo_type", DataTypeGetDesc(PreviewDataType), ImGuiComboFlags_HeightLargest))
{
for (int n = 0; n < ImGuiDataType_COUNT; n++)
if (igSelectable_Bool(DataTypeGetDesc(cast(ImGuiDataType)n), PreviewDataType == n, ImGuiSelectableFlags_None, ImVec2(0,0)))
PreviewDataType = cast(ImGuiDataType)n;
igEndCombo();
}
igSameLine(0,0);
igSetNextItemWidth((s.GlyphWidth * 6.0f) + style.FramePadding.x * 2.0f + style.ItemInnerSpacing.x);
igCombo_Str("##combo_endianess", &PreviewEndianess, "LE\0BE\0\0", 2);
string buf;
float x = s.GlyphWidth * 6.0f;
bool has_value = DataPreviewAddr != cast(ulong)-1;
if (has_value) {
buf = DrawPreviewData(DataPreviewAddr, mem_data, mem_size, PreviewDataType, DataFormat.Dec);
}
igText("Dec"); igSameLine(x,0); igTextUnformatted(has_value ? toStringz(buf) : "N/A", null);
if (has_value) {
buf = DrawPreviewData(DataPreviewAddr, mem_data, mem_size, PreviewDataType, DataFormat.Hex);
}
igText("Hex"); igSameLine(x,0); igTextUnformatted(has_value ? toStringz(buf) : "N/A", null);
if (has_value) {
buf = DrawPreviewData(DataPreviewAddr, mem_data, mem_size, PreviewDataType, DataFormat.Bin);
}
igText("Bin"); igSameLine(x,0); igTextUnformatted(has_value ? toStringz(buf) : "N/A", null);
}
// ┌─────────────────────────────────┐
// │ Utilities for Data Preview │
// └─────────────────────────────────┘
immutable(char)* DataTypeGetDesc(ImGuiDataType data_type)
{
immutable(char)*[] descs = [
"byte", "ubyte", "short", "ushort", "int", "uint", "long", "ulong", "float", "double" ];
throwIf(data_type < 0 || data_type >= ImGuiDataType_COUNT);
return descs[data_type];
}
int DataTypeGetSize(ImGuiDataType data_type)
{
int[] sizes = [ 1, 1, 2, 2, 4, 4, 8, 8, float.sizeof, double.sizeof ];
throwIf(data_type < 0 || data_type >= ImGuiDataType_COUNT);
return sizes[data_type];
}
const(char)* DataFormatGetDesc(DataFormat data_format)
{
const char*[] descs = [ "Bin", "Dec", "Hex" ];
throwIf(data_format < 0 || data_format >= DataFormat.COUNT);
return descs[data_format];
}
T convertEndianess(T)(T value, ulong size = 0) {
import core.bitop: bswap;
if(PreviewEndianess == 0) {
return value;
}
value = bswap(value);
value >>= ((8-size)*8);
return value;
}
ulong readDataLE(ulong addr, ImU8* mem_data, ulong size) {
import core.bitop: bswap;
ulong value;
foreach(i; 0..size) {
ubyte v;
if (ReadFn) {
v = ReadFn(mem_data, addr + i);
} else {
v = mem_data[addr+i];
}
value <<=8;
value |= v;
}
value = bswap(value);
value >>= ((8-size)*8);
return value;
}
string DrawPreviewData(ulong addr, ImU8* mem_data, ulong mem_size, ImGuiDataType data_type, DataFormat data_format)
{
int elem_size = DataTypeGetSize(data_type);
ulong size = addr + elem_size > mem_size ? mem_size - addr : elem_size;
// Copy the data value
ulong data = readDataLE(addr, mem_data, size);
ulong dataE = convertEndianess(data, size);
// Handle binary format
if (data_format == DataFormat.Bin) {
string s;
foreach(j; 0..size) {
s ~= "%08b ".format(dataE & 0xff);
dataE >>= 8;
}
return s;
}
// Handle decimal and hexadecimal formats
string result;
final switch (data_type)
{
case ImGuiDataType_S8:
{
byte int8 = dataE.as!byte;
if (data_format == DataFormat.Dec) result = "%s".format(int8);
if (data_format == DataFormat.Hex) result = "%02x".format(int8 & 0xFF);
break;
}
case ImGuiDataType_U8:
{
ubyte uint8 = dataE.as!ubyte;
if (data_format == DataFormat.Dec) result = "%s".format(uint8);
if (data_format == DataFormat.Hex) result = "%02x".format(uint8 & 0XFF);
break;
}
case ImGuiDataType_S16:
{
short int16 = dataE.as!short;
if (data_format == DataFormat.Dec) result = "%s".format(int16);
if (data_format == DataFormat.Hex) result = "%04x".format(int16 & 0xFFFF);
break;
}
case ImGuiDataType_U16:
{
ushort uint16 = dataE.as!ushort;
if (data_format == DataFormat.Dec) result = "%s".format(uint16);
if (data_format == DataFormat.Hex) result = "%04x".format(uint16 & 0xFFFF);
break;
}
case ImGuiDataType_S32:
{
int32_t int32 = dataE.as!int;
if (data_format == DataFormat.Dec) result = "%s".format(int32);
if (data_format == DataFormat.Hex) result = "%08x".format(int32);
break;
}
case ImGuiDataType_U32:
{
uint32_t uint32 = dataE.as!uint;
if (data_format == DataFormat.Dec) result = "%u".format(uint32);
if (data_format == DataFormat.Hex) result = "%08x".format(uint32);
break;
}
case ImGuiDataType_S64:
{
long int64 = dataE.as!long;
if (data_format == DataFormat.Dec) result = "%s".format(int64);
if (data_format == DataFormat.Hex) result = "%016x".format(int64);
break;
}
case ImGuiDataType_U64:
{
ulong uint64 = dataE.as!ulong;
if (data_format == DataFormat.Dec) result = "%s".format(uint64);
if (data_format == DataFormat.Hex) result = "%016x".format(uint64);
break;
}
case ImGuiDataType_Float:
{
float float32 = dataE.as!float;
if (data_format == DataFormat.Dec) result = "%f".format(float32);
if (data_format == DataFormat.Hex) result = "%a".format(float32);
break;
}
case ImGuiDataType_Double:
{
double float64 = dataE.as!double;
if (data_format == DataFormat.Dec) result = "%f".format(float64);
if (data_format == DataFormat.Hex) result = "%a".format(float64);
break;
}
}
return result;
}
}
|
D
|
/** DGui project file.
Copyright: Trogu Antonio Davide 2011-2013
License: $(HTTP boost.org/LICENSE_1_0.txt, Boost License 1.0).
Authors: Trogu Antonio Davide
*/
module dgui.label;
import std.string;
import dgui.core.controls.control;
enum LabelDrawMode: ubyte
{
normal = 0,
ownerDraw = 1,
}
class Label: Control
{
private LabelDrawMode _drawMode = LabelDrawMode.normal;
private TextAlignment _textAlign = TextAlignment.middle | TextAlignment.left;
alias @property Control.text text;
private bool _multiLine = false;
@property public override void text(string s)
{
super.text = s;
this._multiLine = false;
foreach(char ch; s)
{
if(ch == '\n' || ch == '\r')
{
this._multiLine = true;
break;
}
}
if(this.created)
{
this.invalidate();
}
}
@property public final LabelDrawMode drawMode()
{
return this._drawMode;
}
@property public final void drawMode(LabelDrawMode ldm)
{
this._drawMode = ldm;
}
@property public final TextAlignment alignment()
{
return this._textAlign;
}
@property public final void alignment(TextAlignment ta)
{
this._textAlign = ta;
if(this.created)
{
this.invalidate();
}
}
protected override void createControlParams(ref CreateControlParams ccp)
{
ccp.className = WC_DLABEL;
ccp.classStyle = ClassStyles.hRedraw | ClassStyles.vRedraw;
super.createControlParams(ccp);
}
protected override void onPaint(PaintEventArgs e)
{
super.onPaint(e);
if(this._drawMode is LabelDrawMode.normal)
{
Canvas c = e.canvas;
Rect r = Rect(nullPoint, this.clientSize);
scope TextFormat tf = new TextFormat(this._multiLine ? TextFormatFlags.wordBreak : TextFormatFlags.singleLine);
tf.alignment = this._textAlign;
scope SolidBrush sb = new SolidBrush(this.backColor);
c.fillRectangle(sb, r);
c.drawText(this.text, r, this.foreColor, this.font, tf);
}
}
}
|
D
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.