code
stringlengths 3
10M
| language
stringclasses 31
values |
|---|---|
module UnrealScript.Engine.RB_PulleyJointSetup;
import ScriptClasses;
import UnrealScript.Helpers;
import UnrealScript.Engine.RB_ConstraintSetup;
extern(C++) interface RB_PulleyJointSetup : RB_ConstraintSetup
{
public extern(D):
private static __gshared ScriptClass mStaticClass;
@property final static ScriptClass StaticClass() { mixin(MGSCC("Class Engine.RB_PulleyJointSetup")); }
private static __gshared RB_PulleyJointSetup mDefaultProperties;
@property final static RB_PulleyJointSetup DefaultProperties() { mixin(MGDPC("RB_PulleyJointSetup", "RB_PulleyJointSetup Engine.Default__RB_PulleyJointSetup")); }
}
|
D
|
/Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/x86_64-apple-macosx10.10/debug/Fluent.build/Query/QueryError.swift.o : /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/Utilities/UUID.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/Schema/Database+Schema.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/Schema/Blob.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/Schema/Field.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/Query/ComputedField.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/Query/Filter/NodeUtilities/Method+Node.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/Query/Filter/NodeUtilities/Filter+Node.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/Pagination/Query+Page.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/Pagination/Page.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/Entity/Storage.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/Entity/Timestampable.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/Pagination/Paginatable.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/Database/Transactable.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/Entity/SoftDeletable.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/Query/QueryRepresentable.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/Row/RowConvertible.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/Query/Filter/Filter+Scope.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/Schema/IdentifierType.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/Database/Database.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/Query/Aggregate.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/Query/Filter/NodeUtilities/Scope+String.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/Query/Filter/NodeUtilities/Relation+String.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/Query/Filter/NodeUtilities/Comparison+String.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/Query/Log.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/Query/Chunk.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/Pivot/PivotProtocol.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/Database/ThreadConnectionPool.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/Relations/Children.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/Query/Join.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/Preparation/Database+Preparation.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/Preparation/Preparation.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/Preparation/Migration.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/Query/Action.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/Database/Connection.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/Entity/KeyNamingConvention.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/Query/Filter/Comparison.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/Query/Filter/Query+Group.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/Schema/Builder.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/Schema/Modifier.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/Query/Filter/Query+Filter.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/Query/Filter/Filter.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/Database/Driver.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/SQLite/SQLiteDriver.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/SQL/SQLSerializer.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/SQL/GeneralSQLSerializer.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/SQLite/SQLiteSerializer.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/Relations/RelationError.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/Pagination/PaginationError.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/Preparation/PreparationError.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/Pivot/PivotError.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/Query/QueryError.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/Entity/EntityError.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/Schema/Creator.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/Database/Executor.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/Relations/Siblings.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/Utilities/Exports.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/Query/Distinct.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/Query/Limit.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/Relations/Parent.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/Pivot/Pivot.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/Pivot/DoublePivot.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/Query/Sort.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/Row/RowContext.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/Query/Raw.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/Row/Row.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/Schema/Index.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/Schema/ForeignKey.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/Query/Query.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/Entity/Entity.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/Entity/Dirty.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/Node.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/SQLite.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 /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/x86_64-apple-macosx10.10/debug/Random.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/CoreFoundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/CoreGraphics.swiftmodule /Users/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/checkouts/sqlite.git--8232814251736334455/Sources/CSQLite/include/sqlite3.h /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/Fluent.build/QueryError~partial.swiftmodule : /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/Utilities/UUID.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/Schema/Database+Schema.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/Schema/Blob.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/Schema/Field.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/Query/ComputedField.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/Query/Filter/NodeUtilities/Method+Node.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/Query/Filter/NodeUtilities/Filter+Node.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/Pagination/Query+Page.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/Pagination/Page.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/Entity/Storage.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/Entity/Timestampable.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/Pagination/Paginatable.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/Database/Transactable.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/Entity/SoftDeletable.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/Query/QueryRepresentable.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/Row/RowConvertible.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/Query/Filter/Filter+Scope.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/Schema/IdentifierType.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/Database/Database.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/Query/Aggregate.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/Query/Filter/NodeUtilities/Scope+String.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/Query/Filter/NodeUtilities/Relation+String.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/Query/Filter/NodeUtilities/Comparison+String.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/Query/Log.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/Query/Chunk.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/Pivot/PivotProtocol.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/Database/ThreadConnectionPool.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/Relations/Children.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/Query/Join.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/Preparation/Database+Preparation.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/Preparation/Preparation.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/Preparation/Migration.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/Query/Action.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/Database/Connection.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/Entity/KeyNamingConvention.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/Query/Filter/Comparison.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/Query/Filter/Query+Group.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/Schema/Builder.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/Schema/Modifier.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/Query/Filter/Query+Filter.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/Query/Filter/Filter.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/Database/Driver.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/SQLite/SQLiteDriver.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/SQL/SQLSerializer.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/SQL/GeneralSQLSerializer.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/SQLite/SQLiteSerializer.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/Relations/RelationError.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/Pagination/PaginationError.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/Preparation/PreparationError.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/Pivot/PivotError.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/Query/QueryError.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/Entity/EntityError.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/Schema/Creator.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/Database/Executor.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/Relations/Siblings.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/Utilities/Exports.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/Query/Distinct.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/Query/Limit.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/Relations/Parent.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/Pivot/Pivot.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/Pivot/DoublePivot.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/Query/Sort.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/Row/RowContext.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/Query/Raw.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/Row/Row.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/Schema/Index.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/Schema/ForeignKey.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/Query/Query.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/Entity/Entity.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/Entity/Dirty.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/Node.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/SQLite.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 /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/x86_64-apple-macosx10.10/debug/Random.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/CoreFoundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/CoreGraphics.swiftmodule /Users/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/checkouts/sqlite.git--8232814251736334455/Sources/CSQLite/include/sqlite3.h /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/Fluent.build/QueryError~partial.swiftdoc : /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/Utilities/UUID.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/Schema/Database+Schema.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/Schema/Blob.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/Schema/Field.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/Query/ComputedField.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/Query/Filter/NodeUtilities/Method+Node.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/Query/Filter/NodeUtilities/Filter+Node.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/Pagination/Query+Page.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/Pagination/Page.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/Entity/Storage.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/Entity/Timestampable.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/Pagination/Paginatable.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/Database/Transactable.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/Entity/SoftDeletable.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/Query/QueryRepresentable.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/Row/RowConvertible.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/Query/Filter/Filter+Scope.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/Schema/IdentifierType.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/Database/Database.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/Query/Aggregate.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/Query/Filter/NodeUtilities/Scope+String.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/Query/Filter/NodeUtilities/Relation+String.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/Query/Filter/NodeUtilities/Comparison+String.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/Query/Log.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/Query/Chunk.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/Pivot/PivotProtocol.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/Database/ThreadConnectionPool.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/Relations/Children.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/Query/Join.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/Preparation/Database+Preparation.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/Preparation/Preparation.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/Preparation/Migration.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/Query/Action.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/Database/Connection.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/Entity/KeyNamingConvention.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/Query/Filter/Comparison.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/Query/Filter/Query+Group.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/Schema/Builder.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/Schema/Modifier.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/Query/Filter/Query+Filter.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/Query/Filter/Filter.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/Database/Driver.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/SQLite/SQLiteDriver.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/SQL/SQLSerializer.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/SQL/GeneralSQLSerializer.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/SQLite/SQLiteSerializer.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/Relations/RelationError.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/Pagination/PaginationError.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/Preparation/PreparationError.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/Pivot/PivotError.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/Query/QueryError.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/Entity/EntityError.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/Schema/Creator.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/Database/Executor.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/Relations/Siblings.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/Utilities/Exports.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/Query/Distinct.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/Query/Limit.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/Relations/Parent.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/Pivot/Pivot.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/Pivot/DoublePivot.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/Query/Sort.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/Row/RowContext.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/Query/Raw.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/Row/Row.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/Schema/Index.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/Schema/ForeignKey.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/Query/Query.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/Entity/Entity.swift /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/Entity/Dirty.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/Node.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/SQLite.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 /Users/AleixDiaz/Desktop/VaporProject/LaSalleChat/.build/x86_64-apple-macosx10.10/debug/Random.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/CoreFoundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/CoreGraphics.swiftmodule /Users/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/checkouts/sqlite.git--8232814251736334455/Sources/CSQLite/include/sqlite3.h /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 ogre.image.pixelformat;
/** \addtogroup Core
* @{
*/
/** \addtogroup Image
* @{
*/
//TODO reduce-reuse
version(LittleEndian)
{
/** The pixel format used for images, textures, and render surfaces */
enum PixelFormat
{
/// Unknown pixel format.
PF_UNKNOWN = 0,
/// 8-bit pixel format, all bits luminance.
PF_L8 = 1,
PF_BYTE_L = PF_L8,
/// 16-bit pixel format, all bits luminance.
PF_L16 = 2,
PF_SHORT_L = PF_L16,
/// 8-bit pixel format, all bits alpha.
PF_A8 = 3,
PF_BYTE_A = PF_A8,
/// 8-bit pixel format, 4 bits alpha, 4 bits luminance.
PF_A4L4 = 4,
/// 2 byte pixel format, 1 byte luminance, 1 byte alpha
PF_BYTE_LA = 5,
/// 16-bit pixel format, 5 bits red, 6 bits green, 5 bits blue.
PF_R5G6B5 = 6,
/// 16-bit pixel format, 5 bits red, 6 bits green, 5 bits blue.
PF_B5G6R5 = 7,
/// 8-bit pixel format, 2 bits blue, 3 bits green, 3 bits red.
PF_R3G3B2 = 31,
/// 16-bit pixel format, 4 bits for alpha, red, green and blue.
PF_A4R4G4B4 = 8,
/// 16-bit pixel format, 5 bits for blue, green, red and 1 for alpha.
PF_A1R5G5B5 = 9,
/// 24-bit pixel format, 8 bits for red, green and blue.
PF_R8G8B8 = 10,
/// 24-bit pixel format, 8 bits for blue, green and red.
PF_B8G8R8 = 11,
/// 32-bit pixel format, 8 bits for alpha, red, green and blue.
PF_A8R8G8B8 = 12,
/// 32-bit pixel format, 8 bits for blue, green, red and alpha.
PF_A8B8G8R8 = 13,
/// 32-bit pixel format, 8 bits for blue, green, red and alpha.
PF_B8G8R8A8 = 14,
/// 32-bit pixel format, 8 bits for red, green, blue and alpha.
PF_R8G8B8A8 = 28,
/// 32-bit pixel format, 8 bits for red, 8 bits for green, 8 bits for blue
/// like PF_A8R8G8B8, but alpha will get discarded
PF_X8R8G8B8 = 26,
/// 32-bit pixel format, 8 bits for blue, 8 bits for green, 8 bits for red
/// like PF_A8B8G8R8, but alpha will get discarded
PF_X8B8G8R8 = 27,
//Little endian
/// 3 byte pixel format, 1 byte for red, 1 byte for green, 1 byte for blue
PF_BYTE_RGB = PF_B8G8R8,
/// 3 byte pixel format, 1 byte for blue, 1 byte for green, 1 byte for red
PF_BYTE_BGR = PF_R8G8B8,
/// 4 byte pixel format, 1 byte for blue, 1 byte for green, 1 byte for red and one byte for alpha
PF_BYTE_BGRA = PF_A8R8G8B8,
/// 4 byte pixel format, 1 byte for red, 1 byte for green, 1 byte for blue, and one byte for alpha
PF_BYTE_RGBA = PF_A8B8G8R8,
/// 32-bit pixel format, 2 bits for alpha, 10 bits for red, green and blue.
PF_A2R10G10B10 = 15,
/// 32-bit pixel format, 10 bits for blue, green and red, 2 bits for alpha.
PF_A2B10G10R10 = 16,
/// DDS (DirectDraw Surface) DXT1 format
PF_DXT1 = 17,
/// DDS (DirectDraw Surface) DXT2 format
PF_DXT2 = 18,
/// DDS (DirectDraw Surface) DXT3 format
PF_DXT3 = 19,
/// DDS (DirectDraw Surface) DXT4 format
PF_DXT4 = 20,
/// DDS (DirectDraw Surface) DXT5 format
PF_DXT5 = 21,
/// 16-bit pixel format, 16 bits (float) for red
PF_FLOAT16_R = 32,
/// 48-bit pixel format, 16 bits (float) for red, 16 bits (float) for green, 16 bits (float) for blue
PF_FLOAT16_RGB = 22,
/// 64-bit pixel format, 16 bits (float) for red, 16 bits (float) for green, 16 bits (float) for blue, 16 bits (float) for alpha
PF_FLOAT16_RGBA = 23,
// 32-bit pixel format, 32 bits (float) for red
PF_FLOAT32_R = 33,
/// 96-bit pixel format, 32 bits (float) for red, 32 bits (float) for green, 32 bits (float) for blue
PF_FLOAT32_RGB = 24,
/// 128-bit pixel format, 32 bits (float) for red, 32 bits (float) for green, 32 bits (float) for blue, 32 bits (float) for alpha
PF_FLOAT32_RGBA = 25,
/// 32-bit, 2-channel s10e5 floating point pixel format, 16-bit green, 16-bit red
PF_FLOAT16_GR = 35,
/// 64-bit, 2-channel floating point pixel format, 32-bit green, 32-bit red
PF_FLOAT32_GR = 36,
/// Depth texture format
PF_DEPTH = 29,
/// 64-bit pixel format, 16 bits for red, green, blue and alpha
PF_SHORT_RGBA = 30,
/// 32-bit pixel format, 16-bit green, 16-bit red
PF_SHORT_GR = 34,
/// 48-bit pixel format, 16 bits for red, green and blue
PF_SHORT_RGB = 37,
/// PVRTC (PowerVR) RGB 2 bpp
PF_PVRTC_RGB2 = 38,
/// PVRTC (PowerVR) RGBA 2 bpp
PF_PVRTC_RGBA2 = 39,
/// PVRTC (PowerVR) RGB 4 bpp
PF_PVRTC_RGB4 = 40,
/// PVRTC (PowerVR) RGBA 4 bpp
PF_PVRTC_RGBA4 = 41,
/// PVRTC (PowerVR) Version 2, 2 bpp
PF_PVRTC2_2BPP = 42,
/// PVRTC (PowerVR) Version 2, 4 bpp
PF_PVRTC2_4BPP = 43,
/// 32-bit pixel format, 11 bits (float) for red, 11 bits (float) for green, 10 bits (float) for blue
PF_R11G11B10_FLOAT = 44,
/// 8-bit pixel format, 8 bits red (unsigned int).
PF_R8_UINT = 45,
/// 16-bit pixel format, 8 bits red (unsigned int), 8 bits blue (unsigned int).
PF_R8G8_UINT = 46,
/// 24-bit pixel format, 8 bits red (unsigned int), 8 bits blue (unsigned int), 8 bits green (unsigned int).
PF_R8G8B8_UINT = 47,
/// 32-bit pixel format, 8 bits red (unsigned int), 8 bits blue (unsigned int), 8 bits green (unsigned int), 8 bits alpha (unsigned int).
PF_R8G8B8A8_UINT = 48,
/// 16-bit pixel format, 16 bits red (unsigned int).
PF_R16_UINT = 49,
/// 32-bit pixel format, 16 bits red (unsigned int), 16 bits blue (unsigned int).
PF_R16G16_UINT = 50,
/// 48-bit pixel format, 16 bits red (unsigned int), 16 bits blue (unsigned int), 16 bits green (unsigned int).
PF_R16G16B16_UINT = 51,
/// 64-bit pixel format, 16 bits red (unsigned int), 16 bits blue (unsigned int), 16 bits green (unsigned int), 16 bits alpha (unsigned int).
PF_R16G16B16A16_UINT = 52,
/// 32-bit pixel format, 32 bits red (unsigned int).
PF_R32_UINT = 53,
/// 64-bit pixel format, 32 bits red (unsigned int), 32 bits blue (unsigned int).
PF_R32G32_UINT = 54,
/// 96-bit pixel format, 32 bits red (unsigned int), 32 bits blue (unsigned int), 32 bits green (unsigned int).
PF_R32G32B32_UINT = 55,
/// 128-bit pixel format, 32 bits red (unsigned int), 32 bits blue (unsigned int), 32 bits green (unsigned int), 32 bits alpha (unsigned int).
PF_R32G32B32A32_UINT = 56,
/// 8-bit pixel format, 8 bits red (signed int).
PF_R8_SINT = 57,
/// 16-bit pixel format, 8 bits red (signed int), 8 bits blue (signed int).
PF_R8G8_SINT = 58,
/// 24-bit pixel format, 8 bits red (signed int), 8 bits blue (signed int), 8 bits green (signed int).
PF_R8G8B8_SINT = 59,
/// 32-bit pixel format, 8 bits red (signed int), 8 bits blue (signed int), 8 bits green (signed int), 8 bits alpha (signed int).
PF_R8G8B8A8_SINT = 60,
/// 16-bit pixel format, 16 bits red (signed int).
PF_R16_SINT = 61,
/// 32-bit pixel format, 16 bits red (signed int), 16 bits blue (signed int).
PF_R16G16_SINT = 62,
/// 48-bit pixel format, 16 bits red (signed int), 16 bits blue (signed int), 16 bits green (signed int).
PF_R16G16B16_SINT = 63,
/// 64-bit pixel format, 16 bits red (signed int), 16 bits blue (signed int), 16 bits green (signed int), 16 bits alpha (signed int).
PF_R16G16B16A16_SINT = 64,
/// 32-bit pixel format, 32 bits red (signed int).
PF_R32_SINT = 65,
/// 64-bit pixel format, 32 bits red (signed int), 32 bits blue (signed int).
PF_R32G32_SINT = 66,
/// 96-bit pixel format, 32 bits red (signed int), 32 bits blue (signed int), 32 bits green (signed int).
PF_R32G32B32_SINT = 67,
/// 128-bit pixel format, 32 bits red (signed int), 32 bits blue (signed int), 32 bits green (signed int), 32 bits alpha (signed int).
PF_R32G32B32A32_SINT = 68,
/// 32-bit pixel format, 9 bits for blue, green, red plus a 5 bit exponent.
PF_R9G9B9E5_SHAREDEXP = 69,
/// DDS (DirectDraw Surface) BC4 format (unsigned normalised)
PF_BC4_UNORM = 70,
/// DDS (DirectDraw Surface) BC4 format (signed normalised)
PF_BC4_SNORM = 71,
/// DDS (DirectDraw Surface) BC5 format (unsigned normalised)
PF_BC5_UNORM = 72,
/// DDS (DirectDraw Surface) BC5 format (signed normalised)
PF_BC5_SNORM = 73,
/// DDS (DirectDraw Surface) BC6H format (unsigned 16 bit float)
PF_BC6H_UF16 = 74,
/// DDS (DirectDraw Surface) BC6H format (signed 16 bit float)
PF_BC6H_SF16 = 75,
/// DDS (DirectDraw Surface) BC7 format (unsigned normalised)
PF_BC7_UNORM = 76,
/// DDS (DirectDraw Surface) BC7 format (unsigned normalised sRGB)
PF_BC7_UNORM_SRGB = 77,
/// 8-bit pixel format, all bits red.
PF_R8 = 78,
/// 16-bit pixel format, 8 bits red, 8 bits green.
PF_RG8 = 79,
/// 8-bit pixel format, 8 bits red (signed normalised int).
PF_R8_SNORM = 80,
/// 16-bit pixel format, 8 bits red (signed normalised int), 8 bits blue (signed normalised int).
PF_R8G8_SNORM = 81,
/// 24-bit pixel format, 8 bits red (signed normalised int), 8 bits blue (signed normalised int), 8 bits green (signed normalised int).
PF_R8G8B8_SNORM = 82,
/// 32-bit pixel format, 8 bits red (signed normalised int), 8 bits blue (signed normalised int), 8 bits green (signed normalised int), 8 bits alpha (signed normalised int).
PF_R8G8B8A8_SNORM = 83,
/// 16-bit pixel format, 16 bits red (signed normalised int).
PF_R16_SNORM = 84,
/// 32-bit pixel format, 16 bits red (signed normalised int), 16 bits blue (signed normalised int).
PF_R16G16_SNORM = 85,
/// 48-bit pixel format, 16 bits red (signed normalised int), 16 bits blue (signed normalised int), 16 bits green (signed normalised int).
PF_R16G16B16_SNORM = 86,
/// 64-bit pixel format, 16 bits red (signed normalised int), 16 bits blue (signed normalised int), 16 bits green (signed normalised int), 16 bits alpha (signed normalised int).
PF_R16G16B16A16_SNORM = 87,
/// ETC1 (Ericsson Texture Compression)
PF_ETC1_RGB8 = 88,
// Number of pixel formats currently defined
PF_COUNT = 89
}
}
else
{
/** The pixel format used for images, textures, and render surfaces */
enum PixelFormat
{
/// Unknown pixel format.
PF_UNKNOWN = 0,
/// 8-bit pixel format, all bits luminance.
PF_L8 = 1,
PF_BYTE_L = PF_L8,
/// 16-bit pixel format, all bits luminance.
PF_L16 = 2,
PF_SHORT_L = PF_L16,
/// 8-bit pixel format, all bits alpha.
PF_A8 = 3,
PF_BYTE_A = PF_A8,
/// 8-bit pixel format, 4 bits alpha, 4 bits luminance.
PF_A4L4 = 4,
/// 2 byte pixel format, 1 byte luminance, 1 byte alpha
PF_BYTE_LA = 5,
/// 16-bit pixel format, 5 bits red, 6 bits green, 5 bits blue.
PF_R5G6B5 = 6,
/// 16-bit pixel format, 5 bits red, 6 bits green, 5 bits blue.
PF_B5G6R5 = 7,
/// 8-bit pixel format, 2 bits blue, 3 bits green, 3 bits red.
PF_R3G3B2 = 31,
/// 16-bit pixel format, 4 bits for alpha, red, green and blue.
PF_A4R4G4B4 = 8,
/// 16-bit pixel format, 5 bits for blue, green, red and 1 for alpha.
PF_A1R5G5B5 = 9,
/// 24-bit pixel format, 8 bits for red, green and blue.
PF_R8G8B8 = 10,
/// 24-bit pixel format, 8 bits for blue, green and red.
PF_B8G8R8 = 11,
/// 32-bit pixel format, 8 bits for alpha, red, green and blue.
PF_A8R8G8B8 = 12,
/// 32-bit pixel format, 8 bits for blue, green, red and alpha.
PF_A8B8G8R8 = 13,
/// 32-bit pixel format, 8 bits for blue, green, red and alpha.
PF_B8G8R8A8 = 14,
/// 32-bit pixel format, 8 bits for red, green, blue and alpha.
PF_R8G8B8A8 = 28,
/// 32-bit pixel format, 8 bits for red, 8 bits for green, 8 bits for blue
/// like PF_A8R8G8B8, but alpha will get discarded
PF_X8R8G8B8 = 26,
/// 32-bit pixel format, 8 bits for blue, 8 bits for green, 8 bits for red
/// like PF_A8B8G8R8, but alpha will get discarded
PF_X8B8G8R8 = 27,
//Big endian
/// 3 byte pixel format, 1 byte for red, 1 byte for green, 1 byte for blue
PF_BYTE_RGB = PF_R8G8B8,
/// 3 byte pixel format, 1 byte for blue, 1 byte for green, 1 byte for red
PF_BYTE_BGR = PF_B8G8R8,
/// 4 byte pixel format, 1 byte for blue, 1 byte for green, 1 byte for red and one byte for alpha
PF_BYTE_BGRA = PF_B8G8R8A8,
/// 4 byte pixel format, 1 byte for red, 1 byte for green, 1 byte for blue, and one byte for alpha
PF_BYTE_RGBA = PF_R8G8B8A8,
/// 32-bit pixel format, 2 bits for alpha, 10 bits for red, green and blue.
PF_A2R10G10B10 = 15,
/// 32-bit pixel format, 10 bits for blue, green and red, 2 bits for alpha.
PF_A2B10G10R10 = 16,
/// DDS (DirectDraw Surface) DXT1 format
PF_DXT1 = 17,
/// DDS (DirectDraw Surface) DXT2 format
PF_DXT2 = 18,
/// DDS (DirectDraw Surface) DXT3 format
PF_DXT3 = 19,
/// DDS (DirectDraw Surface) DXT4 format
PF_DXT4 = 20,
/// DDS (DirectDraw Surface) DXT5 format
PF_DXT5 = 21,
/// 16-bit pixel format, 16 bits (float) for red
PF_FLOAT16_R = 32,
/// 48-bit pixel format, 16 bits (float) for red, 16 bits (float) for green, 16 bits (float) for blue
PF_FLOAT16_RGB = 22,
/// 64-bit pixel format, 16 bits (float) for red, 16 bits (float) for green, 16 bits (float) for blue, 16 bits (float) for alpha
PF_FLOAT16_RGBA = 23,
// 32-bit pixel format, 32 bits (float) for red
PF_FLOAT32_R = 33,
/// 96-bit pixel format, 32 bits (float) for red, 32 bits (float) for green, 32 bits (float) for blue
PF_FLOAT32_RGB = 24,
/// 128-bit pixel format, 32 bits (float) for red, 32 bits (float) for green, 32 bits (float) for blue, 32 bits (float) for alpha
PF_FLOAT32_RGBA = 25,
/// 32-bit, 2-channel s10e5 floating point pixel format, 16-bit green, 16-bit red
PF_FLOAT16_GR = 35,
/// 64-bit, 2-channel floating point pixel format, 32-bit green, 32-bit red
PF_FLOAT32_GR = 36,
/// Depth texture format
PF_DEPTH = 29,
/// 64-bit pixel format, 16 bits for red, green, blue and alpha
PF_SHORT_RGBA = 30,
/// 32-bit pixel format, 16-bit green, 16-bit red
PF_SHORT_GR = 34,
/// 48-bit pixel format, 16 bits for red, green and blue
PF_SHORT_RGB = 37,
/// PVRTC (PowerVR) RGB 2 bpp
PF_PVRTC_RGB2 = 38,
/// PVRTC (PowerVR) RGBA 2 bpp
PF_PVRTC_RGBA2 = 39,
/// PVRTC (PowerVR) RGB 4 bpp
PF_PVRTC_RGB4 = 40,
/// PVRTC (PowerVR) RGBA 4 bpp
PF_PVRTC_RGBA4 = 41,
/// PVRTC (PowerVR) Version 2, 2 bpp
PF_PVRTC2_2BPP = 42,
/// PVRTC (PowerVR) Version 2, 4 bpp
PF_PVRTC2_4BPP = 43,
/// 32-bit pixel format, 11 bits (float) for red, 11 bits (float) for green, 10 bits (float) for blue
PF_R11G11B10_FLOAT = 44,
/// 8-bit pixel format, 8 bits red (unsigned int).
PF_R8_UINT = 45,
/// 16-bit pixel format, 8 bits red (unsigned int), 8 bits blue (unsigned int).
PF_R8G8_UINT = 46,
/// 24-bit pixel format, 8 bits red (unsigned int), 8 bits blue (unsigned int), 8 bits green (unsigned int).
PF_R8G8B8_UINT = 47,
/// 32-bit pixel format, 8 bits red (unsigned int), 8 bits blue (unsigned int), 8 bits green (unsigned int), 8 bits alpha (unsigned int).
PF_R8G8B8A8_UINT = 48,
/// 16-bit pixel format, 16 bits red (unsigned int).
PF_R16_UINT = 49,
/// 32-bit pixel format, 16 bits red (unsigned int), 16 bits blue (unsigned int).
PF_R16G16_UINT = 50,
/// 48-bit pixel format, 16 bits red (unsigned int), 16 bits blue (unsigned int), 16 bits green (unsigned int).
PF_R16G16B16_UINT = 51,
/// 64-bit pixel format, 16 bits red (unsigned int), 16 bits blue (unsigned int), 16 bits green (unsigned int), 16 bits alpha (unsigned int).
PF_R16G16B16A16_UINT = 52,
/// 32-bit pixel format, 32 bits red (unsigned int).
PF_R32_UINT = 53,
/// 64-bit pixel format, 32 bits red (unsigned int), 32 bits blue (unsigned int).
PF_R32G32_UINT = 54,
/// 96-bit pixel format, 32 bits red (unsigned int), 32 bits blue (unsigned int), 32 bits green (unsigned int).
PF_R32G32B32_UINT = 55,
/// 128-bit pixel format, 32 bits red (unsigned int), 32 bits blue (unsigned int), 32 bits green (unsigned int), 32 bits alpha (unsigned int).
PF_R32G32B32A32_UINT = 56,
/// 8-bit pixel format, 8 bits red (signed int).
PF_R8_SINT = 57,
/// 16-bit pixel format, 8 bits red (signed int), 8 bits blue (signed int).
PF_R8G8_SINT = 58,
/// 24-bit pixel format, 8 bits red (signed int), 8 bits blue (signed int), 8 bits green (signed int).
PF_R8G8B8_SINT = 59,
/// 32-bit pixel format, 8 bits red (signed int), 8 bits blue (signed int), 8 bits green (signed int), 8 bits alpha (signed int).
PF_R8G8B8A8_SINT = 60,
/// 16-bit pixel format, 16 bits red (signed int).
PF_R16_SINT = 61,
/// 32-bit pixel format, 16 bits red (signed int), 16 bits blue (signed int).
PF_R16G16_SINT = 62,
/// 48-bit pixel format, 16 bits red (signed int), 16 bits blue (signed int), 16 bits green (signed int).
PF_R16G16B16_SINT = 63,
/// 64-bit pixel format, 16 bits red (signed int), 16 bits blue (signed int), 16 bits green (signed int), 16 bits alpha (signed int).
PF_R16G16B16A16_SINT = 64,
/// 32-bit pixel format, 32 bits red (signed int).
PF_R32_SINT = 65,
/// 64-bit pixel format, 32 bits red (signed int), 32 bits blue (signed int).
PF_R32G32_SINT = 66,
/// 96-bit pixel format, 32 bits red (signed int), 32 bits blue (signed int), 32 bits green (signed int).
PF_R32G32B32_SINT = 67,
/// 128-bit pixel format, 32 bits red (signed int), 32 bits blue (signed int), 32 bits green (signed int), 32 bits alpha (signed int).
PF_R32G32B32A32_SINT = 68,
/// 32-bit pixel format, 9 bits for blue, green, red plus a 5 bit exponent.
PF_R9G9B9E5_SHAREDEXP = 69,
/// DDS (DirectDraw Surface) BC4 format (unsigned normalised)
PF_BC4_UNORM = 70,
/// DDS (DirectDraw Surface) BC4 format (signed normalised)
PF_BC4_SNORM = 71,
/// DDS (DirectDraw Surface) BC5 format (unsigned normalised)
PF_BC5_UNORM = 72,
/// DDS (DirectDraw Surface) BC5 format (signed normalised)
PF_BC5_SNORM = 73,
/// DDS (DirectDraw Surface) BC6H format (unsigned 16 bit float)
PF_BC6H_UF16 = 74,
/// DDS (DirectDraw Surface) BC6H format (signed 16 bit float)
PF_BC6H_SF16 = 75,
/// DDS (DirectDraw Surface) BC7 format (unsigned normalised)
PF_BC7_UNORM = 76,
/// DDS (DirectDraw Surface) BC7 format (unsigned normalised sRGB)
PF_BC7_UNORM_SRGB = 77,
/// 8-bit pixel format, all bits red.
PF_R8 = 78,
/// 16-bit pixel format, 8 bits red, 8 bits green.
PF_RG8 = 79,
/// 8-bit pixel format, 8 bits red (signed normalised int).
PF_R8_SNORM = 80,
/// 16-bit pixel format, 8 bits red (signed normalised int), 8 bits blue (signed normalised int).
PF_R8G8_SNORM = 81,
/// 24-bit pixel format, 8 bits red (signed normalised int), 8 bits blue (signed normalised int), 8 bits green (signed normalised int).
PF_R8G8B8_SNORM = 82,
/// 32-bit pixel format, 8 bits red (signed normalised int), 8 bits blue (signed normalised int), 8 bits green (signed normalised int), 8 bits alpha (signed normalised int).
PF_R8G8B8A8_SNORM = 83,
/// 16-bit pixel format, 16 bits red (signed normalised int).
PF_R16_SNORM = 84,
/// 32-bit pixel format, 16 bits red (signed normalised int), 16 bits blue (signed normalised int).
PF_R16G16_SNORM = 85,
/// 48-bit pixel format, 16 bits red (signed normalised int), 16 bits blue (signed normalised int), 16 bits green (signed normalised int).
PF_R16G16B16_SNORM = 86,
/// 64-bit pixel format, 16 bits red (signed normalised int), 16 bits blue (signed normalised int), 16 bits green (signed normalised int), 16 bits alpha (signed normalised int).
PF_R16G16B16A16_SNORM = 87,
/// ETC1 (Ericsson Texture Compression)
PF_ETC1_RGB8 = 88,
// Number of pixel formats currently defined
PF_COUNT = 89
}
}
//typedef vector<PixelFormat>::type PixelFormatList;
alias PixelFormat[] PixelFormatList;
/**
* Flags defining some on/off properties of pixel formats
*/
enum PixelFormatFlags
{
/// This format has an alpha channel
PFF_HASALPHA = 0x00000001,
/** This format is compressed. This invalidates the values in elemBytes,
elemBits and the bit counts as these might not be fixed in a compressed format. */
PFF_COMPRESSED = 0x00000002,
/// This is a floating point format
PFF_FLOAT = 0x00000004,
/// This is a depth format (for depth textures)
PFF_DEPTH = 0x00000008,
/** Format is in native endian. Generally true for the 16, 24 and 32 bits
formats which can be represented as machine integers. */
PFF_NATIVEENDIAN = 0x00000010,
/** This is an intensity format instead of a RGB one. The luminance
replaces R,G and B. (but not A) */
PFF_LUMINANCE = 0x00000020,
/// This is an integer format
PFF_INTEGER = 0x00000040
}
/** Pixel component format */
enum PixelComponentType
{
PCT_BYTE = 0, /// Byte per component (8 bit fixed 0.0..1.0)
PCT_SHORT = 1, /// Short per component (16 bit fixed 0.0..1.0))
PCT_FLOAT16 = 2, /// 16 bit float per component
PCT_FLOAT32 = 3, /// 32 bit float per component
PCT_SINT = 4, /// Signed integer per component
PCT_UINT = 5, /// Unsigned integer per component
PCT_COUNT = 6 /// Number of pixel types
}
/** @} */
/** @} */
|
D
|
module hunt.framework.provider.ConfigServiceProvider;
import hunt.framework.config.ApplicationConfig;
import hunt.framework.config.ConfigManager;
import hunt.framework.provider.ServiceProvider;
import hunt.framework.Init;
import hunt.framework.routing;
import hunt.logging.ConsoleLogger;
import poodinis;
import std.array;
import std.file;
import std.path;
import std.parallelism : totalCPUs;
import std.process;
import std.range;
/**
*
*/
class ConfigServiceProvider : ServiceProvider {
private ApplicationConfig appConfig;
override void register() {
container.register!(ConfigManager).singleInstance();
container.register!(ApplicationConfig)(() {
ConfigManager configManager = container.resolve!(ConfigManager)();
return configManager.load!(ApplicationConfig);
}).singleInstance();
container.register!(RouteConfigManager)(() {
ConfigManager configManager = container.resolve!(ConfigManager)();
ApplicationConfig appConfig = container.resolve!(ApplicationConfig)();
RouteConfigManager routeConfig = new RouteConfigManager(appConfig);
routeConfig.basePath = configManager.configPath();
return routeConfig;
});
}
override void boot() {
ApplicationConfig appConfig = container.resolve!ApplicationConfig();
checkWorkerThreads(appConfig);
// update the config item with the environment variable if it exists
string value = environment.get(ENV_APP_NAME, "");
if(!value.empty) {
appConfig.application.name = value;
}
// value = environment.get(ENV_APP_VERSION, "");
// if(!value.empty) {
// appConfig.application.version = value;
// }
value = environment.get(ENV_APP_LANG, "");
if(!value.empty) {
appConfig.application.defaultLanguage = value;
}
value = environment.get(ENV_APP_KEY, "");
if(!value.empty) {
appConfig.application.secret = value;
}
}
private void checkWorkerThreads(ApplicationConfig appConfig) {
// Worker pool
int minThreadCount = totalCPUs / 4 + 1;
if (appConfig.http.workerThreads == 0)
appConfig.http.workerThreads = minThreadCount;
if (appConfig.http.workerThreads < minThreadCount) {
warningf("It's better to set the number of worker threads >= %d. The current is: %d",
minThreadCount, appConfig.http.workerThreads);
// appConfig.http.workerThreads = minThreadCount;
}
if (appConfig.http.workerThreads <= 1) {
appConfig.http.workerThreads = 2;
}
}
}
|
D
|
module luad.table;
import luad.c.all;
import luad.base;
import luad.stack;
import luad.conversions.structs;
/// Represents a Lua table.
struct LuaTable
{
/// LuaTable sub-types $(DPREF base, LuaObject) through this reference.
LuaObject object;
alias object this;
package this(lua_State* L, int idx)
{
//LuaObject.checkType(L, idx, LUA_TTABLE, "LuaTable");
object = LuaObject(L, idx);
}
/**
* Lookup a value in this table or in a sub-table of this table.
* Params:
* T = type of value
* args = list of keys, where all keys but the last one should result in a table
* Returns:
* $(D t[k]) where $(D t) is the table for the second-to-last parameter, and $(D k) is the last parameter
*
* Examples:
* ----------------------
auto execute = lua.get!LuaFunction("os", "execute");
execute(`echo hello, world!`);
* ----------------------
*/
auto ref T get(T, U...)(auto ref U args) @trusted
{
this.push();
foreach(ref key; args)
{
pushValue(this.state, key);
lua_gettable(this.state, -2);
}
auto ret = getValue!T(this.state, -1);
lua_pop(this.state, args.length + 1);
return ret;
}
/**
* Read a string value in this table without making a copy of the string.
* The read string is passed to $(D dg), and should not be escaped.
* If the value for $(D key) is not a string, $(D dg) is not called.
* Params:
* key = lookup _key
* dg = delegate to receive string
* Returns:
* $(D true) if the value for $(D key) was a string and passed to $(D dg), $(D false) otherwise
* Examples:
--------------------
t[2] = "two";
t.readString(2, str => assert(str == "two"));
--------------------
*/
bool readString(T)(T key, scope void delegate(in char[] str) dg) @trusted
{
this.push();
scope(exit) lua_pop(this.state, 1);
pushValue(this.state, key);
lua_gettable(this.state, -2);
scope(exit) lua_pop(this.state, 1);
if(lua_isstring(this.state, -1) == 0)
return false;
size_t len;
const(char)* cstr = lua_tolstring(this.state, -1, &len);
dg(cstr[0 .. len]);
return true;
}
/**
* Same as calling $(D get!LuaObject) with the same arguments.
* Examples:
* ---------------------
auto luapath = lua["package", "path"];
writefln("LUA_PATH:\n%s", luapath);
* ---------------------
* See_Also:
* $(MREF LuaTable.get)
*/
LuaObject opIndex(T...)(T args)
{
return get!LuaObject(args);
}
/**
* Set a key-value pair in this table.
* Params:
* key = key to _set
* value = value for $(D key)
*/
void set(T, U)(ref T key, ref U value) @trusted
{
this.push();
scope(success) lua_pop(this.state, 1);
pushValue(this.state, key);
pushValue(this.state, value);
lua_settable(this.state, -3);
}
/**
* Set a key-value pair this table or in a sub-table of this table.
* Params:
* value = value to set
* args = list of keys, where all keys but the last one should result in a table
* Returns:
* $(D t[k] = value), where $(D t) is the table for the second-to-last parameter in args,
* and $(D k) is the last parameter in args
*
* Examples:
* ----------------------
lua["string", "empty"] = (in char[] s){ return s.length == 0; };
lua.doString(`assert(string.empty(""))`);
* ----------------------
*/
void opIndexAssign(T, U...)(auto ref T value, auto ref U args) @trusted
{
this.push();
scope(success) lua_pop(this.state, 1);
foreach(i, ref arg; args)
{
static if(i != args.length - 1)
{
pushValue(this.state, arg);
lua_gettable(this.state, -2);
}
}
pushValue(this.state, args[$-1]);
pushValue(this.state, value);
lua_settable(this.state, -3);
lua_pop(this.state, args.length - 1);
}
/**
* Create struct of type $(D T) and fill its members with fields from this table.
*
* Struct fields that are not present in this table are left at their default value.
*
* Params:
* T = any struct type
*
* Returns:
* Newly created struct
*/
T toStruct(T)() @trusted if (is(T == struct))
{
push();
return popValue!T(this.state);
}
/**
* Fill a struct's members with fields from this table.
* Params:
* s = struct to fill
*/
void copyTo(T)(ref T s) @trusted if (is(T == struct))
{
push();
fillStruct(this.state, -1, s);
lua_pop(L, 1);
}
/**
* Set the metatable for this table.
* Params:
* meta = new metatable
*/
void setMetaTable(ref LuaTable meta) @trusted
in{ assert(this.state == meta.state); }
body
{
this.push();
meta.push();
lua_setmetatable(this.state, -2);
lua_pop(this.state, 1);
}
/**
* Get the metatable for this table.
* Returns:
* A reference to the metatable for this table. The reference is nil if this table has no metatable.
*/
LuaTable getMetaTable() @trusted
{
this.push();
scope(success) lua_pop(this.state, 1);
return lua_getmetatable(this.state, -1) == 0? LuaTable() : popValue!LuaTable(this.state);
}
/**
* Get the array length of the table.
*/
size_t length() @trusted
{
this.push();
size_t len = lua_objlen(this.state, -1);
lua_pop(this.state, 1);
return len;
}
/**
* Iterate over the values in this table.
*/
int opApply(T)(int delegate(ref T value) dg) @trusted
{
this.push();
lua_pushnil(this.state);
while(lua_next(this.state, -2) != 0)
{
auto value = popValue!T(this.state);
int result = dg(value);
if(result != 0)
{
lua_pop(this.state, 2);
return result;
}
}
lua_pop(this.state, 1);
return 0;
}
/**
* Iterate over the key-value pairs in this table.
*/
int opApply(T, U)(int delegate(ref U key, ref T value) dg) @trusted
{
this.push();
lua_pushnil(this.state);
while(lua_next(this.state, -2) != 0)
{
auto value = popValue!T(this.state);
auto key = getValue!U(this.state, -1);
int result = dg(key, value);
if(result != 0)
{
lua_pop(this.state, 2);
return result;
}
}
lua_pop(this.state, 1);
return 0;
}
}
unittest
{
lua_State* L = luaL_newstate();
scope(success)
{
assert(lua_gettop(L) == 0);
lua_close(L);
}
lua_newtable(L);
auto t = popValue!LuaTable(L);
assert(t.type == LuaType.Table);
t.set("foo", "bar");
assert(t.get!string("foo") == "bar");
t.set("foo", nil);
assert(t.get!LuaObject("foo").isNil);
t.set("foo", ["outer": ["inner": "hi!"]]);
auto s = t.get!(string)("foo", "outer", "inner");
assert(s == "hi!");
auto o = t["foo", "outer"];
assert(o.type == LuaType.Table);
t["foo", "outer", "inner"] = "hello!";
auto s2 = t.get!(string)("foo", "outer", "inner");
assert(s2 == "hello!");
// length
t.set("array", ["one", "two"]);
auto a = t.get!LuaTable("array");
assert(a.length == 2);
// readString
t[2] = "two";
bool success = t.readString(2, (in char[] str) {
assert(str == "two");
});
assert(success);
t[2] = true;
success = t.readString(2, (in char[] str) { assert(false); });
assert(!success);
// metatable
pushValue(L, ["__index": (LuaObject self, string key){
return key;
}]);
auto meta = popValue!LuaTable(L);
lua_newtable(L);
auto t2 = popValue!LuaTable(L);
t2.setMetaTable(meta);
auto test = t2.get!string("foobar");
assert(test == "foobar");
assert(t2.getMetaTable() == meta);
// opApply
auto input = [1, 2, 3];
pushValue(L, input);
auto applyTest = popValue!LuaTable(L);
int i = 0;
foreach(int v; applyTest)
{
assert(input[i++] == v);
}
auto inputWithKeys = ["one": 1, "two": 2, "three": 3];
pushValue(L, inputWithKeys);
auto applyTestKeys = popValue!LuaTable(L);
foreach(string key, int value; applyTestKeys)
{
assert(inputWithKeys[key] == value);
}
}
|
D
|
module input;
import termbox;
enum Action
{
LEFT,
RIGHT,
UP,
DOWN,
CLICK,
FLAG,
EXIT,
RESIZE,
OTHER
}
Action poll()
{
Event e;
pollEvent(&e);
if (e.type == EventType.resize)
return Action.RESIZE;
switch (e.key)
{
case Key.arrowLeft:
return Action.LEFT;
case Key.arrowRight:
return Action.RIGHT;
case Key.arrowUp:
return Action.UP;
case Key.arrowDown:
return Action.DOWN;
case Key.space:
case Key.enter:
return Action.CLICK;
case Key.esc:
return Action.EXIT;
default:
break;
}
switch (e.ch)
{
case 'f':
case 'p':
return Action.FLAG;
default:
return Action.OTHER;
}
}
|
D
|
/home/albertfega/Desktop/LaSalleChat/.build/x86_64-unknown-linux/debug/Console.build/Console/Console+Run.swift.o : /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Terminal/String+ANSI.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Utilities/Bool+Polymorphic.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Terminal/Terminal+Command.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Command/Command.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Command/Runnable.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Console/Style/Console+ConsoleStyle.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Console/Style/ConsoleStyle.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Command/Value.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Console/Console+Ask.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Terminal/ConsoleStyle+Terminal.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Terminal/ConsoleColor+Terminal.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Terminal/Terminal.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Console/Console+Ephemeral.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Console/ConsoleProtocol.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Stream/FileHandle+Stream.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Stream/Pipe+Stream.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Stream/Stream.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Utilities/String+Trim.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Console/Console+Confirm.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Command/Option.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Console/Console+Run.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Command/Group.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Bar/Bar.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Bar/Loading/Console+LoadingBar.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Bar/Loading/LoadingBar.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Bar/Progress/Console+ProgressBar.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Bar/Progress/ProgressBar.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Console/Clear/ConsoleClear.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Console/Console+Center.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Console/Color/ConsoleColor.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Console/ConsoleError.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Console/Console+Options.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Command/Argument.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Command/Command+Print.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Console/Console+Print.swift /home/albertfega/Desktop/LaSalleChat/.build/x86_64-unknown-linux/debug/libc.swiftmodule /usr/lib/swift/linux/x86_64/Glibc.swiftmodule /home/albertfega/Desktop/LaSalleChat/.build/x86_64-unknown-linux/debug/Core.swiftmodule /home/albertfega/Desktop/LaSalleChat/.build/x86_64-unknown-linux/debug/Debugging.swiftmodule /usr/lib/swift/linux/x86_64/Dispatch.swiftmodule /usr/lib/swift/linux/x86_64/Foundation.swiftmodule /home/albertfega/Desktop/LaSalleChat/.build/x86_64-unknown-linux/debug/Bits.swiftmodule /usr/lib/swift/linux/x86_64/Swift.swiftmodule /usr/lib/swift/linux/x86_64/SwiftOnoneSupport.swiftmodule /usr/lib/swift/linux/x86_64/glibc.modulemap /home/albertfega/Desktop/LaSalleChat/.build/x86_64-unknown-linux/debug/CHTTP.build/module.modulemap /home/albertfega/Desktop/LaSalleChat/.build/x86_64-unknown-linux/debug/CSQLite.build/module.modulemap
/home/albertfega/Desktop/LaSalleChat/.build/x86_64-unknown-linux/debug/Console.build/Console+Run~partial.swiftmodule : /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Terminal/String+ANSI.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Utilities/Bool+Polymorphic.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Terminal/Terminal+Command.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Command/Command.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Command/Runnable.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Console/Style/Console+ConsoleStyle.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Console/Style/ConsoleStyle.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Command/Value.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Console/Console+Ask.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Terminal/ConsoleStyle+Terminal.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Terminal/ConsoleColor+Terminal.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Terminal/Terminal.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Console/Console+Ephemeral.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Console/ConsoleProtocol.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Stream/FileHandle+Stream.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Stream/Pipe+Stream.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Stream/Stream.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Utilities/String+Trim.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Console/Console+Confirm.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Command/Option.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Console/Console+Run.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Command/Group.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Bar/Bar.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Bar/Loading/Console+LoadingBar.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Bar/Loading/LoadingBar.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Bar/Progress/Console+ProgressBar.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Bar/Progress/ProgressBar.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Console/Clear/ConsoleClear.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Console/Console+Center.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Console/Color/ConsoleColor.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Console/ConsoleError.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Console/Console+Options.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Command/Argument.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Command/Command+Print.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Console/Console+Print.swift /home/albertfega/Desktop/LaSalleChat/.build/x86_64-unknown-linux/debug/libc.swiftmodule /usr/lib/swift/linux/x86_64/Glibc.swiftmodule /home/albertfega/Desktop/LaSalleChat/.build/x86_64-unknown-linux/debug/Core.swiftmodule /home/albertfega/Desktop/LaSalleChat/.build/x86_64-unknown-linux/debug/Debugging.swiftmodule /usr/lib/swift/linux/x86_64/Dispatch.swiftmodule /usr/lib/swift/linux/x86_64/Foundation.swiftmodule /home/albertfega/Desktop/LaSalleChat/.build/x86_64-unknown-linux/debug/Bits.swiftmodule /usr/lib/swift/linux/x86_64/Swift.swiftmodule /usr/lib/swift/linux/x86_64/SwiftOnoneSupport.swiftmodule /usr/lib/swift/linux/x86_64/glibc.modulemap /home/albertfega/Desktop/LaSalleChat/.build/x86_64-unknown-linux/debug/CHTTP.build/module.modulemap /home/albertfega/Desktop/LaSalleChat/.build/x86_64-unknown-linux/debug/CSQLite.build/module.modulemap
/home/albertfega/Desktop/LaSalleChat/.build/x86_64-unknown-linux/debug/Console.build/Console+Run~partial.swiftdoc : /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Terminal/String+ANSI.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Utilities/Bool+Polymorphic.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Terminal/Terminal+Command.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Command/Command.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Command/Runnable.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Console/Style/Console+ConsoleStyle.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Console/Style/ConsoleStyle.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Command/Value.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Console/Console+Ask.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Terminal/ConsoleStyle+Terminal.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Terminal/ConsoleColor+Terminal.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Terminal/Terminal.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Console/Console+Ephemeral.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Console/ConsoleProtocol.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Stream/FileHandle+Stream.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Stream/Pipe+Stream.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Stream/Stream.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Utilities/String+Trim.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Console/Console+Confirm.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Command/Option.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Console/Console+Run.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Command/Group.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Bar/Bar.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Bar/Loading/Console+LoadingBar.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Bar/Loading/LoadingBar.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Bar/Progress/Console+ProgressBar.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Bar/Progress/ProgressBar.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Console/Clear/ConsoleClear.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Console/Console+Center.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Console/Color/ConsoleColor.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Console/ConsoleError.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Console/Console+Options.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Command/Argument.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Command/Command+Print.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/console.git-5126077550814951831/Sources/Console/Console/Console+Print.swift /home/albertfega/Desktop/LaSalleChat/.build/x86_64-unknown-linux/debug/libc.swiftmodule /usr/lib/swift/linux/x86_64/Glibc.swiftmodule /home/albertfega/Desktop/LaSalleChat/.build/x86_64-unknown-linux/debug/Core.swiftmodule /home/albertfega/Desktop/LaSalleChat/.build/x86_64-unknown-linux/debug/Debugging.swiftmodule /usr/lib/swift/linux/x86_64/Dispatch.swiftmodule /usr/lib/swift/linux/x86_64/Foundation.swiftmodule /home/albertfega/Desktop/LaSalleChat/.build/x86_64-unknown-linux/debug/Bits.swiftmodule /usr/lib/swift/linux/x86_64/Swift.swiftmodule /usr/lib/swift/linux/x86_64/SwiftOnoneSupport.swiftmodule /usr/lib/swift/linux/x86_64/glibc.modulemap /home/albertfega/Desktop/LaSalleChat/.build/x86_64-unknown-linux/debug/CHTTP.build/module.modulemap /home/albertfega/Desktop/LaSalleChat/.build/x86_64-unknown-linux/debug/CSQLite.build/module.modulemap
|
D
|
var int Wulfgar_ItemsGiven_Chapter_1;
var int Wulfgar_ItemsGiven_Chapter_2;
var int Wulfgar_ItemsGiven_Chapter_3;
var int Wulfgar_ItemsGiven_Chapter_4;
var int Wulfgar_ItemsGiven_Chapter_5;
FUNC VOID B_GiveTradeInv_Mod_Wulfgar_JL (var C_NPC slf)
{
if ((Kapitel >= 1)
&& (Wulfgar_ItemsGiven_Chapter_1 == FALSE))
{
CreateInvItems (slf, ItMi_Gold, 100);
CreateInvItems (slf,ItPo_Mana_01 ,10);
CreateInvItems (slf,ItPo_Health_01 ,10);
CreateInvItems (slf, ItPo_Health_Addon_04, 2);
CreateInvItems (slf, ItPo_Mana_Addon_04, 2);
// ------ Scrolls ------
CreateInvItems (slf,ItSc_Light ,6);
CreateInvItems (slf,ItSc_Sleep ,1);
CreateInvItems (slf,ItSc_Firebolt ,20);
CreateInvItems (slf,ItSc_Icebolt ,8);
CreateInvItems (slf,ItSc_InstantFireball ,10);
CreateInvItems (slf,ItSc_LightningFlash ,5);
CreateInvItems (slf,ItSc_HarmUndead ,3);
CreateInvItems (slf,ItSc_Firestorm ,3);
CreateInvItems (slf,ItSc_IceWave ,1);
CreateInvItems (slf,ItSc_Zap ,5);
CreateInvItems (slf,ItSc_IceCube ,3);
CreateInvItems (slf,ItSc_Windfist ,3);
CreateInvItems (slf,ItSc_IceWave ,1);
CreateInvItems (slf,ItSc_Firerain ,1);
CreateInvItems (slf,ItSc_Shrink ,1);
CreateInvItems (slf,ItSc_ThunderStorm ,1);
CreateInvItems (slf,ItSc_SumGobSkel ,1);
CreateInvItems (slf,ItSc_SumSkel ,1);
CreateInvItems (slf,ItSc_SumWolf ,1);
CreateInvItems (slf,ItSc_SumGol ,1);
CreateInvItems (slf,ItSc_SumDemon ,1);
CreateInvItems (slf, ItPo_ZufallsDrink, 1);
CreateInvItems (slf, ItPo_Gegengift, 2);
// ------ AmRiBe ------
CreateInvItems (slf,ItBe_Addon_Prot_MAGIC, 1);
CreateInvItems (slf,ItAm_Hp_Mana_01 ,1);
Wulfgar_ItemsGiven_Chapter_1 = TRUE;
};
if ((Kapitel >= 2)
&& Wulfgar_ItemsGiven_Chapter_2 == FALSE)
{
CreateInvItems (slf, ItMi_Gold, 60);
CreateInvItems (slf, ItPo_Health_Addon_04, 2);
CreateInvItems (slf, ItPo_Mana_Addon_04, 2);
CreateInvItems (slf,ItPo_Mana_01 ,15);
CreateInvItems (slf,ItPo_Mana_02 , 1);
CreateInvItems (slf,ItPo_Health_01 ,15);
CreateInvItems (slf,ItPo_Health_02 , 2);
CreateInvItems (slf,ItMi_ApfelTabak ,5);
CreateInvItems (slf, ItPo_Gegengift, 2);
Wulfgar_ItemsGiven_Chapter_2 = TRUE;
};
if ((Kapitel >= 3)
&& (Wulfgar_ItemsGiven_Chapter_3 == FALSE))
{
CreateInvItems (slf, ItMi_Gold, 120);
CreateInvItems (slf, ItPo_Health_Addon_04, 2);
CreateInvItems (slf, ItPo_Mana_Addon_04, 2);
CreateInvItems (slf,ItPo_Mana_01 ,25);
CreateInvItems (slf,ItPo_Mana_02 , 3);
CreateInvItems (slf,ItPo_Health_01 ,25);
CreateInvItems (slf,ItPo_Health_02 , 15);
CreateInvItems (slf, ItPo_Speed, 1);
CreateInvItems (slf, ItPo_Gegengift, 2);
Wulfgar_ItemsGiven_Chapter_3 = TRUE;
};
if ((Kapitel >= 4)
&& (Wulfgar_ItemsGiven_Chapter_4 == FALSE))
{
CreateInvItems (slf, ItMi_Gold, 220);
CreateInvItems (slf, ItPo_Health_Addon_04, 3);
CreateInvItems (slf, ItPo_Mana_Addon_04, 3);
CreateInvItems (slf,ItPo_Mana_01 ,35);
CreateInvItems (slf,ItPo_Mana_02 , 15);
CreateInvItems (slf,ItPo_Health_01 ,35);
CreateInvItems (slf,ItPo_Health_02 , 20);
CreateInvItems (slf,ItPo_Health_03 , 10);
CreateInvItems (slf, ItPo_Speed, 1);
CreateInvItems (slf, ItPo_Gegengift, 2);
CreateInvItems (slf, ItPo_ZufallsDrink, 1);
Wulfgar_ItemsGiven_Chapter_4 = TRUE;
};
if ((Kapitel >= 5)
&& (Wulfgar_ItemsGiven_Chapter_5 == FALSE))
{
CreateInvItems (slf, ItMi_Gold, 321);
CreateInvItems (slf, ItPo_Health_Addon_04, 5);
CreateInvItems (slf, ItPo_Mana_Addon_04, 5);
CreateInvItems (slf,ItPo_Mana_01 ,55);
CreateInvItems (slf,ItPo_Mana_02 , 35);
CreateInvItems (slf,ItPo_Mana_03 , 15);
CreateInvItems (slf,ItPo_Health_01 ,55);
CreateInvItems (slf,ItPo_Health_02 , 30);
CreateInvItems (slf,ItPo_Health_03 , 20);
CreateInvItems (slf, ItPo_Speed, 1);
CreateInvItems (slf, ItPo_Gegengift, 2);
Wulfgar_ItemsGiven_Chapter_5 = TRUE;
};
};
|
D
|
/** Fundamental operations for arbitrary-precision arithmetic
*
* These functions are for internal use only.
*/
/* Copyright Don Clugston 2008 - 2010.
* 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)
*/
/* References:
"Modern Computer Arithmetic" (MCA) is the primary reference for all
algorithms used in this library.
- R.P. Brent and P. Zimmermann, "Modern Computer Arithmetic",
Version 0.5.9, (Oct 2010).
- C. Burkinel and J. Ziegler, "Fast Recursive Division", MPI-I-98-1-022,
Max-Planck Institute fuer Informatik, (Oct 1998).
- G. Hanrot, M. Quercia, and P. Zimmermann, "The Middle Product Algorithm, I.",
INRIA 4664, (Dec 2002).
- M. Bodrato and A. Zanoni, "What about Toom-Cook Matrices Optimality?",
http://bodrato.it/papers (2006).
- A. Fog, "Optimizing subroutines in assembly language",
www.agner.org/optimize (2008).
- A. Fog, "The microarchitecture of Intel and AMD CPU's",
www.agner.org/optimize (2008).
- A. Fog, "Instruction tables: Lists of instruction latencies, throughputs
and micro-operation breakdowns for Intel and AMD CPU's.", www.agner.org/optimize (2008).
Idioms:
Many functions in this module use
'func(Tulong)(Tulong x) if (is(Tulong == ulong))' rather than 'func(ulong x)'
in order to disable implicit conversion.
*/
module std.internal.math.biguintcore;
version (D_InlineAsm_X86)
{
static import std.internal.math.biguintx86;
}
static import std.internal.math.biguintnoasm;
import std.internal.math.biguintnoasm : BigDigit, KARATSUBALIMIT,
KARATSUBASQUARELIMIT;
alias multibyteAdd = multibyteAddSub!('+');
alias multibyteSub = multibyteAddSub!('-');
private import std.traits;
private import std.range.primitives;
public import std.ascii : LetterCase;
import std.range.primitives;
import std.traits;
private:
// dipatchers to the right low-level primitives. Added to allow BigInt CTFE for
// 32 bit systems (issue 14767) although it's used by the other architectures too.
// See comments below in case it has to be refactored.
version (X86)
uint multibyteAddSub(char op)(uint[] dest, const(uint)[] src1, const (uint)[] src2, uint carry)
{
// must be checked before, otherwise D_InlineAsm_X86 is true.
if (__ctfe)
return std.internal.math.biguintnoasm.multibyteAddSub!op(dest, src1, src2, carry);
// Runtime.
else version (D_InlineAsm_X86)
return std.internal.math.biguintx86.multibyteAddSub!op(dest, src1, src2, carry);
// Runtime if no asm available.
else
return std.internal.math.biguintnoasm.multibyteAddSub!op(dest, src1, src2, carry);
}
// Any other architecture
else alias multibyteAddSub = std.internal.math.biguintnoasm.multibyteAddSub;
version (X86)
uint multibyteIncrementAssign(char op)(uint[] dest, uint carry)
{
if (__ctfe)
return std.internal.math.biguintnoasm.multibyteIncrementAssign!op(dest, carry);
else version (D_InlineAsm_X86)
return std.internal.math.biguintx86.multibyteIncrementAssign!op(dest, carry);
else
return std.internal.math.biguintnoasm.multibyteIncrementAssign!op(dest, carry);
}
else alias multibyteIncrementAssign = std.internal.math.biguintnoasm.multibyteIncrementAssign;
version (X86)
uint multibyteShl()(uint[] dest, const(uint)[] src, uint numbits)
{
if (__ctfe)
return std.internal.math.biguintnoasm.multibyteShl(dest, src, numbits);
else version (D_InlineAsm_X86)
return std.internal.math.biguintx86.multibyteShl(dest, src, numbits);
else
return std.internal.math.biguintnoasm.multibyteShl(dest, src, numbits);
}
else alias multibyteShl = std.internal.math.biguintnoasm.multibyteShl;
version (X86)
void multibyteShr()(uint[] dest, const(uint)[] src, uint numbits)
{
if (__ctfe)
std.internal.math.biguintnoasm.multibyteShr(dest, src, numbits);
else version (D_InlineAsm_X86)
std.internal.math.biguintx86.multibyteShr(dest, src, numbits);
else
std.internal.math.biguintnoasm.multibyteShr(dest, src, numbits);
}
else alias multibyteShr = std.internal.math.biguintnoasm.multibyteShr;
version (X86)
uint multibyteMul()(uint[] dest, const(uint)[] src, uint multiplier, uint carry)
{
if (__ctfe)
return std.internal.math.biguintnoasm.multibyteMul(dest, src, multiplier, carry);
else version (D_InlineAsm_X86)
return std.internal.math.biguintx86.multibyteMul(dest, src, multiplier, carry);
else
return std.internal.math.biguintnoasm.multibyteMul(dest, src, multiplier, carry);
}
else alias multibyteMul = std.internal.math.biguintnoasm.multibyteMul;
version (X86)
uint multibyteMulAdd(char op)(uint[] dest, const(uint)[] src, uint multiplier, uint carry)
{
if (__ctfe)
return std.internal.math.biguintnoasm.multibyteMulAdd!op(dest, src, multiplier, carry);
else version (D_InlineAsm_X86)
return std.internal.math.biguintx86.multibyteMulAdd!op(dest, src, multiplier, carry);
else
return std.internal.math.biguintnoasm.multibyteMulAdd!op(dest, src, multiplier, carry);
}
else alias multibyteMulAdd = std.internal.math.biguintnoasm.multibyteMulAdd;
version (X86)
void multibyteMultiplyAccumulate()(uint[] dest, const(uint)[] left, const(uint)[] right)
{
if (__ctfe)
std.internal.math.biguintnoasm.multibyteMultiplyAccumulate(dest, left, right);
else version (D_InlineAsm_X86)
std.internal.math.biguintx86.multibyteMultiplyAccumulate(dest, left, right);
else
std.internal.math.biguintnoasm.multibyteMultiplyAccumulate(dest, left, right);
}
else alias multibyteMultiplyAccumulate = std.internal.math.biguintnoasm.multibyteMultiplyAccumulate;
version (X86)
uint multibyteDivAssign()(uint[] dest, uint divisor, uint overflow)
{
if (__ctfe)
return std.internal.math.biguintnoasm.multibyteDivAssign(dest, divisor, overflow);
else version (D_InlineAsm_X86)
return std.internal.math.biguintx86.multibyteDivAssign(dest, divisor, overflow);
else
return std.internal.math.biguintnoasm.multibyteDivAssign(dest, divisor, overflow);
}
else alias multibyteDivAssign = std.internal.math.biguintnoasm.multibyteDivAssign;
version (X86)
void multibyteAddDiagonalSquares()(uint[] dest, const(uint)[] src)
{
if (__ctfe)
std.internal.math.biguintnoasm.multibyteAddDiagonalSquares(dest, src);
else version (D_InlineAsm_X86)
std.internal.math.biguintx86.multibyteAddDiagonalSquares(dest, src);
else
std.internal.math.biguintnoasm.multibyteAddDiagonalSquares(dest, src);
}
else alias multibyteAddDiagonalSquares = std.internal.math.biguintnoasm.multibyteAddDiagonalSquares;
version (X86)
void multibyteTriangleAccumulate()(uint[] dest, const(uint)[] x)
{
if (__ctfe)
std.internal.math.biguintnoasm.multibyteTriangleAccumulate(dest, x);
else version (D_InlineAsm_X86)
std.internal.math.biguintx86.multibyteTriangleAccumulate(dest, x);
else
std.internal.math.biguintnoasm.multibyteTriangleAccumulate(dest, x);
}
else alias multibyteTriangleAccumulate = std.internal.math.biguintnoasm.multibyteTriangleAccumulate;
version (X86)
void multibyteSquare()(BigDigit[] result, const(BigDigit)[] x)
{
if (__ctfe)
std.internal.math.biguintnoasm.multibyteSquare(result, x);
else version (D_InlineAsm_X86)
std.internal.math.biguintx86.multibyteSquare(result, x);
else
std.internal.math.biguintnoasm.multibyteSquare(result, x);
}
else alias multibyteSquare = std.internal.math.biguintnoasm.multibyteSquare;
// Limits for when to switch between algorithms.
// Half the size of the data cache.
@nogc nothrow pure size_t getCacheLimit()
{
import core.cpuid : dataCaches;
return (cast(size_t function() @nogc nothrow pure)
(() => dataCaches[0].size * 1024 / 2))();
}
enum size_t FASTDIVLIMIT = 100; // crossover to recursive division
// These constants are used by shift operations
static if (BigDigit.sizeof == int.sizeof)
{
enum { LG2BIGDIGITBITS = 5, BIGDIGITSHIFTMASK = 31 }
alias BIGHALFDIGIT = ushort;
}
else static if (BigDigit.sizeof == long.sizeof)
{
alias BIGHALFDIGIT = uint;
enum { LG2BIGDIGITBITS = 6, BIGDIGITSHIFTMASK = 63 }
}
else static assert(0, "Unsupported BigDigit size");
import std.exception : assumeUnique;
import std.traits : isIntegral;
enum BigDigitBits = BigDigit.sizeof*8;
template maxBigDigits(T)
if (isIntegral!T)
{
enum maxBigDigits = (T.sizeof+BigDigit.sizeof-1)/BigDigit.sizeof;
}
static immutable BigDigit[] ZERO = [0];
static immutable BigDigit[] ONE = [1];
static immutable BigDigit[] TWO = [2];
static immutable BigDigit[] TEN = [10];
public:
/// BigUint performs memory management and wraps the low-level calls.
struct BigUint
{
private:
pure invariant()
{
assert( data.length >= 1 && (data.length == 1 || data[$-1] != 0 ));
}
immutable(BigDigit) [] data = ZERO;
this(immutable(BigDigit) [] x) pure nothrow @nogc @safe
{
data = x;
}
package(std) // used from: std.bigint
this(T)(T x) pure nothrow @safe if (isIntegral!T)
{
opAssign(x);
}
enum trustedAssumeUnique = function(BigDigit[] input) pure @trusted @nogc {
return assumeUnique(input);
};
public:
// Length in uints
@property size_t uintLength() pure nothrow const @safe @nogc
{
static if (BigDigit.sizeof == uint.sizeof)
{
return data.length;
}
else static if (BigDigit.sizeof == ulong.sizeof)
{
return data.length * 2 -
((data[$-1] & 0xFFFF_FFFF_0000_0000L) ? 1 : 0);
}
}
@property size_t ulongLength() pure nothrow const @safe @nogc
{
static if (BigDigit.sizeof == uint.sizeof)
{
return (data.length + 1) >> 1;
}
else static if (BigDigit.sizeof == ulong.sizeof)
{
return data.length;
}
}
// The value at (cast(ulong[]) data)[n]
ulong peekUlong(size_t n) pure nothrow const @safe @nogc
{
static if (BigDigit.sizeof == int.sizeof)
{
if (data.length == n*2 + 1) return data[n*2];
return data[n*2] + ((cast(ulong) data[n*2 + 1]) << 32 );
}
else static if (BigDigit.sizeof == long.sizeof)
{
return data[n];
}
}
uint peekUint(size_t n) pure nothrow const @safe @nogc
{
static if (BigDigit.sizeof == int.sizeof)
{
return data[n];
}
else
{
immutable x = data[n >> 1];
return (n & 1) ? cast(uint)(x >> 32) : cast(uint) x;
}
}
///
void opAssign(Tulong)(Tulong u) pure nothrow @safe if (is (Tulong == ulong))
{
if (u == 0) data = ZERO;
else if (u == 1) data = ONE;
else if (u == 2) data = TWO;
else if (u == 10) data = TEN;
else
{
static if (BigDigit.sizeof == int.sizeof)
{
uint ulo = cast(uint)(u & 0xFFFF_FFFF);
uint uhi = cast(uint)(u >> 32);
if (uhi == 0)
{
data = [ulo];
}
else
{
data = [ulo, uhi];
}
}
else static if (BigDigit.sizeof == long.sizeof)
{
data = [u];
}
}
}
void opAssign(Tdummy = void)(BigUint y) pure nothrow @nogc @safe
{
this.data = y.data;
}
///
int opCmp(Tdummy = void)(const BigUint y) pure nothrow @nogc const @safe
{
if (data.length != y.data.length)
return (data.length > y.data.length) ? 1 : -1;
size_t k = highestDifferentDigit(data, y.data);
if (data[k] == y.data[k])
return 0;
return data[k] > y.data[k] ? 1 : -1;
}
///
int opCmp(Tulong)(Tulong y) pure nothrow @nogc const @safe if (is (Tulong == ulong))
{
if (data.length > maxBigDigits!Tulong)
return 1;
foreach_reverse (i; 0 .. maxBigDigits!Tulong)
{
BigDigit tmp = cast(BigDigit)(y>>(i*BigDigitBits));
if (tmp == 0)
if (data.length >= i+1)
{
// Since ZERO is [0], so we cannot simply return 1 here, as
// data[i] would be 0 for i == 0 in that case.
return (data[i] > 0) ? 1 : 0;
}
else
continue;
else
if (i+1 > data.length)
return -1;
else if (tmp != data[i])
return data[i] > tmp ? 1 : -1;
}
return 0;
}
bool opEquals(Tdummy = void)(ref const BigUint y) pure nothrow @nogc const @safe
{
return y.data[] == data[];
}
bool opEquals(Tdummy = void)(ulong y) pure nothrow @nogc const @safe
{
if (data.length > 2)
return false;
uint ylo = cast(uint)(y & 0xFFFF_FFFF);
uint yhi = cast(uint)(y >> 32);
if (data.length == 2 && data[1]!=yhi)
return false;
if (data.length == 1 && yhi != 0)
return false;
return (data[0] == ylo);
}
bool isZero() pure const nothrow @safe @nogc
{
return data.length == 1 && data[0] == 0;
}
size_t numBytes() pure nothrow const @safe @nogc
{
return data.length * BigDigit.sizeof;
}
// the extra bytes are added to the start of the string
char [] toDecimalString(int frontExtraBytes) const pure nothrow
{
immutable predictlength = 20+20*(data.length/2); // just over 19
char [] buff = new char[frontExtraBytes + predictlength];
ptrdiff_t sofar = biguintToDecimal(buff, data.dup);
return buff[sofar-frontExtraBytes..$];
}
/** Convert to a hex string, printing a minimum number of digits 'minPadding',
* allocating an additional 'frontExtraBytes' at the start of the string.
* Padding is done with padChar, which may be '0' or ' '.
* 'separator' is a digit separation character. If non-zero, it is inserted
* between every 8 digits.
* Separator characters do not contribute to the minPadding.
*/
char [] toHexString(int frontExtraBytes, char separator = 0,
int minPadding=0, char padChar = '0',
LetterCase letterCase = LetterCase.upper) const pure nothrow @safe
{
// Calculate number of extra padding bytes
size_t extraPad = (minPadding > data.length * 2 * BigDigit.sizeof)
? minPadding - data.length * 2 * BigDigit.sizeof : 0;
// Length not including separator bytes
size_t lenBytes = data.length * 2 * BigDigit.sizeof;
// Calculate number of separator bytes
size_t mainSeparatorBytes = separator ? (lenBytes / 8) - 1 : 0;
immutable totalSeparatorBytes = separator ? ((extraPad + lenBytes + 7) / 8) - 1: 0;
char [] buff = new char[lenBytes + extraPad + totalSeparatorBytes + frontExtraBytes];
biguintToHex(buff[$ - lenBytes - mainSeparatorBytes .. $], data, separator, letterCase);
if (extraPad > 0)
{
if (separator)
{
size_t start = frontExtraBytes; // first index to pad
if (extraPad &7)
{
// Do 1 to 7 extra zeros.
buff[frontExtraBytes .. frontExtraBytes + (extraPad & 7)] = padChar;
buff[frontExtraBytes + (extraPad & 7)] = (padChar == ' ' ? ' ' : separator);
start += (extraPad & 7) + 1;
}
for (int i=0; i< (extraPad >> 3); ++i)
{
buff[start .. start + 8] = padChar;
buff[start + 8] = (padChar == ' ' ? ' ' : separator);
start += 9;
}
}
else
{
buff[frontExtraBytes .. frontExtraBytes + extraPad]=padChar;
}
}
int z = frontExtraBytes;
if (lenBytes > minPadding)
{
// Strip leading zeros.
ptrdiff_t maxStrip = lenBytes - minPadding;
while (z< buff.length-1 && (buff[z]=='0' || buff[z]==padChar) && maxStrip>0)
{
++z;
--maxStrip;
}
}
if (padChar!='0')
{
// Convert leading zeros into padChars.
for (size_t k= z; k< buff.length-1 && (buff[k]=='0' || buff[k]==padChar); ++k)
{
if (buff[k]=='0') buff[k]=padChar;
}
}
return buff[z-frontExtraBytes..$];
}
/**
* Convert to an octal string.
*/
char[] toOctalString() const
{
auto predictLength = 1 + data.length*BigDigitBits / 3;
char[] buff = new char[predictLength];
size_t firstNonZero = biguintToOctal(buff, data);
return buff[firstNonZero .. $];
}
// return false if invalid character found
bool fromHexString(Range)(Range s) if (
isBidirectionalRange!Range && isSomeChar!(ElementType!Range))
{
import std.range : walkLength;
//Strip leading zeros
while (!s.empty && s.front == '0')
s.popFront;
if (s.empty)
{
data = ZERO;
return true;
}
immutable len = (s.save.walkLength + 15) / 4;
auto tmp = new BigDigit[len + 1];
uint part, sofar, partcount;
foreach_reverse (character; s)
{
if (character == '_')
continue;
uint x;
if (character >= '0' && character <= '9')
{
x = character - '0';
}
else if (character >= 'A' && character <= 'F')
{
x = character - 'A' + 10;
}
else if (character >= 'a' && character <= 'f')
{
x = character - 'a' + 10;
}
else
{
return false;
}
part >>= 4;
part |= (x << (32 - 4));
++partcount;
if (partcount == 8)
{
tmp[sofar] = part;
++sofar;
partcount = 0;
part = 0;
}
}
if (part)
{
for ( ; partcount != 8; ++partcount) part >>= 4;
tmp[sofar] = part;
++sofar;
}
if (sofar == 0)
data = ZERO;
else
data = trustedAssumeUnique(tmp[0 .. sofar]);
return true;
}
// return true if OK; false if erroneous characters found
bool fromDecimalString(Range)(Range s) if (
isForwardRange!Range && isSomeChar!(ElementType!Range))
{
import std.range : walkLength;
while (!s.empty && s.front == '0')
{
s.popFront;
}
if (s.empty)
{
data = ZERO;
return true;
}
auto predict_length = (18 * 2 + 2 * s.save.walkLength) / 19;
auto tmp = new BigDigit[predict_length];
tmp.length = biguintFromDecimal(tmp, s);
data = trustedAssumeUnique(tmp);
return true;
}
////////////////////////
//
// All of these member functions create a new BigUint.
// return x >> y
BigUint opShr(Tulong)(Tulong y) pure nothrow const if (is (Tulong == ulong))
{
assert(y>0);
uint bits = cast(uint) y & BIGDIGITSHIFTMASK;
if ((y >> LG2BIGDIGITBITS) >= data.length) return BigUint(ZERO);
uint words = cast(uint)(y >> LG2BIGDIGITBITS);
if (bits == 0)
{
return BigUint(data[words..$]);
}
else
{
uint [] result = new BigDigit[data.length - words];
multibyteShr(result, data[words..$], bits);
if (result.length > 1 && result[$-1] == 0)
return BigUint(trustedAssumeUnique(result[0 .. $-1]));
else
return BigUint(trustedAssumeUnique(result));
}
}
// return x << y
BigUint opShl(Tulong)(Tulong y) pure nothrow const if (is (Tulong == ulong))
{
assert(y>0);
if (isZero()) return this;
uint bits = cast(uint) y & BIGDIGITSHIFTMASK;
assert((y >> LG2BIGDIGITBITS) < cast(ulong)(uint.max));
uint words = cast(uint)(y >> LG2BIGDIGITBITS);
BigDigit [] result = new BigDigit[data.length + words+1];
result[0 .. words] = 0;
if (bits == 0)
{
result[words .. words+data.length] = data[];
return BigUint(trustedAssumeUnique(result[0 .. words+data.length]));
}
else
{
immutable c = multibyteShl(result[words .. words+data.length], data, bits);
if (c == 0) return BigUint(trustedAssumeUnique(result[0 .. words+data.length]));
result[$-1] = c;
return BigUint(trustedAssumeUnique(result));
}
}
// If wantSub is false, return x + y, leaving sign unchanged
// If wantSub is true, return abs(x - y), negating sign if x < y
static BigUint addOrSubInt(Tulong)(const BigUint x, Tulong y,
bool wantSub, ref bool sign) pure nothrow if (is(Tulong == ulong))
{
BigUint r;
if (wantSub)
{ // perform a subtraction
if (x.data.length > 2)
{
r.data = cast(immutable) subInt(x.data, y);
}
else
{ // could change sign!
ulong xx = x.data[0];
if (x.data.length > 1)
xx += (cast(ulong) x.data[1]) << 32;
ulong d;
if (xx <= y)
{
d = y - xx;
sign = !sign;
}
else
{
d = xx - y;
}
if (d == 0)
{
r = 0UL;
sign = false;
return r;
}
if (d > uint.max)
{
r.data = [cast(uint)(d & 0xFFFF_FFFF), cast(uint)(d >> 32)];
}
else
{
r.data = [cast(uint)(d & 0xFFFF_FFFF)];
}
}
}
else
{
r.data = cast(immutable) addInt(x.data, y);
}
return r;
}
// If wantSub is false, return x + y, leaving sign unchanged.
// If wantSub is true, return abs(x - y), negating sign if x<y
static BigUint addOrSub(BigUint x, BigUint y, bool wantSub, bool *sign)
pure nothrow
{
BigUint r;
if (wantSub)
{ // perform a subtraction
bool negative;
r.data = cast(immutable) sub(x.data, y.data, &negative);
*sign ^= negative;
if (r.isZero())
{
*sign = false;
}
}
else
{
r.data = cast(immutable) add(x.data, y.data);
}
return r;
}
// return x*y.
// y must not be zero.
static BigUint mulInt(T = ulong)(BigUint x, T y) pure nothrow
{
if (y == 0 || x == 0) return BigUint(ZERO);
uint hi = cast(uint)(y >>> 32);
uint lo = cast(uint)(y & 0xFFFF_FFFF);
uint [] result = new BigDigit[x.data.length+1+(hi != 0)];
result[x.data.length] = multibyteMul(result[0 .. x.data.length], x.data, lo, 0);
if (hi != 0)
{
result[x.data.length+1] = multibyteMulAdd!('+')(result[1 .. x.data.length+1],
x.data, hi, 0);
}
return BigUint(removeLeadingZeros(trustedAssumeUnique(result)));
}
/* return x * y.
*/
static BigUint mul(BigUint x, BigUint y) pure nothrow
{
if (y == 0 || x == 0)
return BigUint(ZERO);
auto len = x.data.length + y.data.length;
BigDigit [] result = new BigDigit[len];
if (y.data.length > x.data.length)
{
mulInternal(result, y.data, x.data);
}
else
{
if (x.data[]==y.data[]) squareInternal(result, x.data);
else mulInternal(result, x.data, y.data);
}
// the highest element could be zero,
// in which case we need to reduce the length
return BigUint(removeLeadingZeros(trustedAssumeUnique(result)));
}
// return x / y
static BigUint divInt(T)(BigUint x, T y_) pure nothrow
if ( is(Unqual!T == uint) )
{
uint y = y_;
if (y == 1)
return x;
uint [] result = new BigDigit[x.data.length];
if ((y&(-y))==y)
{
assert(y != 0, "BigUint division by zero");
// perfect power of 2
uint b = 0;
for (;y != 1; y>>=1)
{
++b;
}
multibyteShr(result, x.data, b);
}
else
{
result[] = x.data[];
cast(void) multibyteDivAssign(result, y, 0);
}
return BigUint(removeLeadingZeros(trustedAssumeUnique(result)));
}
static BigUint divInt(T)(BigUint x, T y) pure nothrow
if ( is(Unqual!T == ulong) )
{
if (y <= uint.max)
return divInt!uint(x, cast(uint) y);
if (x.data.length < 2)
return BigUint(ZERO);
uint hi = cast(uint)(y >>> 32);
uint lo = cast(uint)(y & 0xFFFF_FFFF);
immutable uint[2] z = [lo, hi];
BigDigit[] result = new BigDigit[x.data.length - z.length + 1];
divModInternal(result, null, x.data, z[]);
return BigUint(removeLeadingZeros(trustedAssumeUnique(result)));
}
// return x % y
static uint modInt(T)(BigUint x, T y_) pure if ( is(Unqual!T == uint) )
{
import core.memory : GC;
uint y = y_;
assert(y != 0);
if ((y&(-y)) == y)
{ // perfect power of 2
return x.data[0] & (y-1);
}
else
{
// horribly inefficient - malloc, copy, & store are unnecessary.
uint [] wasteful = new BigDigit[x.data.length];
wasteful[] = x.data[];
immutable rem = multibyteDivAssign(wasteful, y, 0);
() @trusted { GC.free(wasteful.ptr); } ();
return rem;
}
}
// return x / y
static BigUint div(BigUint x, BigUint y) pure nothrow
{
if (y.data.length > x.data.length)
return BigUint(ZERO);
if (y.data.length == 1)
return divInt(x, y.data[0]);
BigDigit [] result = new BigDigit[x.data.length - y.data.length + 1];
divModInternal(result, null, x.data, y.data);
return BigUint(removeLeadingZeros(trustedAssumeUnique(result)));
}
// return x % y
static BigUint mod(BigUint x, BigUint y) pure nothrow
{
if (y.data.length > x.data.length) return x;
if (y.data.length == 1)
{
return BigUint([modInt(x, y.data[0])]);
}
BigDigit [] result = new BigDigit[x.data.length - y.data.length + 1];
BigDigit [] rem = new BigDigit[y.data.length];
divModInternal(result, rem, x.data, y.data);
return BigUint(removeLeadingZeros(trustedAssumeUnique(rem)));
}
// Return x / y in quotient, x % y in remainder
static void divMod(BigUint x, BigUint y, out BigUint quotient, out BigUint remainder) pure nothrow
{
if (y.data.length > x.data.length)
{
quotient = 0uL;
remainder = x;
}
else if (y.data.length == 1)
{
quotient = divInt(x, y.data[0]);
remainder = BigUint([modInt(x, y.data[0])]);
}
else
{
BigDigit[] quot = new BigDigit[x.data.length - y.data.length + 1];
BigDigit[] rem = new BigDigit[y.data.length];
divModInternal(quot, rem, x.data, y.data);
quotient = BigUint(removeLeadingZeros(trustedAssumeUnique(quot)));
remainder = BigUint(removeLeadingZeros(trustedAssumeUnique(rem)));
}
}
// return x op y
static BigUint bitwiseOp(string op)(BigUint x, BigUint y, bool xSign, bool ySign, ref bool resultSign)
pure nothrow @safe if (op == "|" || op == "^" || op == "&")
{
auto d1 = includeSign(x.data, y.uintLength, xSign);
auto d2 = includeSign(y.data, x.uintLength, ySign);
foreach (i; 0 .. d1.length)
{
mixin("d1[i] " ~ op ~ "= d2[i];");
}
mixin("resultSign = xSign " ~ op ~ " ySign;");
if (resultSign)
{
twosComplement(d1, d1);
}
return BigUint(removeLeadingZeros(trustedAssumeUnique(d1)));
}
/**
* Return a BigUint which is x raised to the power of y.
* Method: Powers of 2 are removed from x, then left-to-right binary
* exponentiation is used.
* Memory allocation is minimized: at most one temporary BigUint is used.
*/
static BigUint pow(BigUint x, ulong y) pure nothrow
{
// Deal with the degenerate cases first.
if (y == 0) return BigUint(ONE);
if (y == 1) return x;
if (x == 0 || x == 1) return x;
BigUint result;
// Simplify, step 1: Remove all powers of 2.
uint firstnonzero = firstNonZeroDigit(x.data);
// Now we know x = x[firstnonzero..$] * (2^^(firstnonzero*BigDigitBits))
// where BigDigitBits = BigDigit.sizeof * 8
// See if x[firstnonzero..$] can now fit into a single digit.
bool singledigit = ((x.data.length - firstnonzero) == 1);
// If true, then x0 is that digit
// and the result will be (x0 ^^ y) * (2^^(firstnonzero*y*BigDigitBits))
BigDigit x0 = x.data[firstnonzero];
assert(x0 != 0);
// Length of the non-zero portion
size_t nonzerolength = x.data.length - firstnonzero;
ulong y0;
uint evenbits = 0; // number of even bits in the bottom of x
while (!(x0 & 1))
{
x0 >>= 1;
++evenbits;
}
if (x.data.length- firstnonzero == 2)
{
// Check for a single digit straddling a digit boundary
const BigDigit x1 = x.data[firstnonzero+1];
if ((x1 >> evenbits) == 0)
{
x0 |= (x1 << (BigDigit.sizeof * 8 - evenbits));
singledigit = true;
}
}
// Now if (singledigit), x^^y = (x0 ^^ y) * 2^^(evenbits * y) * 2^^(firstnonzero*y*BigDigitBits))
uint evenshiftbits = 0; // Total powers of 2 to shift by, at the end
// Simplify, step 2: For singledigits, see if we can trivially reduce y
BigDigit finalMultiplier = 1UL;
if (singledigit)
{
// x fits into a single digit. Raise it to the highest power we can
// that still fits into a single digit, then reduce the exponent accordingly.
// We're quite likely to have a residual multiply at the end.
// For example, 10^^100 = (((5^^13)^^7) * 5^^9) * 2^^100.
// and 5^^13 still fits into a uint.
evenshiftbits = cast(uint)( (evenbits * y) & BIGDIGITSHIFTMASK);
if (x0 == 1)
{ // Perfect power of 2
result = 1UL;
return result << (evenbits + firstnonzero * 8 * BigDigit.sizeof) * y;
}
immutable p = highestPowerBelowUintMax(x0);
if (y <= p)
{ // Just do it with pow
result = cast(ulong) intpow(x0, y);
if (evenbits + firstnonzero == 0)
return result;
return result << (evenbits + firstnonzero * 8 * BigDigit.sizeof) * y;
}
y0 = y / p;
finalMultiplier = intpow(x0, y - y0*p);
x0 = intpow(x0, p);
// Result is x0
nonzerolength = 1;
}
// Now if (singledigit), x^^y = finalMultiplier * (x0 ^^ y0) * 2^^(evenbits * y) * 2^^(firstnonzero*y*BigDigitBits))
// Perform a crude check for overflow and allocate result buffer.
// The length required is y * lg2(x) bits.
// which will always fit into y*x.length digits. But this is
// a gross overestimate if x is small (length 1 or 2) and the highest
// digit is nearly empty.
// A better estimate is:
// y * lg2(x[$-1]/BigDigit.max) + y * (x.length - 1) digits,
// and the first term is always between
// y * (bsr(x.data[$-1]) + 1) / BIGDIGITBITS and
// y * (bsr(x.data[$-1]) + 2) / BIGDIGITBITS
// For single digit payloads, we already have
// x^^y = finalMultiplier * (x0 ^^ y0) * 2^^(evenbits * y) * 2^^(firstnonzero*y*BigDigitBits))
// and x0 is almost a full digit, so it's a tight estimate.
// Number of digits is therefore 1 + x0.length*y0 + (evenbits*y)/BIGDIGIT + firstnonzero*y
// Note that the divisions must be rounded up.
// Estimated length in BigDigits
immutable estimatelength = singledigit
? 1 + y0 + ((evenbits*y + BigDigit.sizeof * 8 - 1) / (BigDigit.sizeof *8)) + firstnonzero*y
: x.data.length * y;
// Imprecise check for overflow. Makes the extreme cases easier to debug
// (less extreme overflow will result in an out of memory error).
if (estimatelength > uint.max/(4*BigDigit.sizeof))
assert(0, "Overflow in BigInt.pow");
// The result buffer includes space for all the trailing zeros
BigDigit [] resultBuffer = new BigDigit[cast(size_t) estimatelength];
// Do all the powers of 2!
size_t result_start = cast(size_t)( firstnonzero * y
+ (singledigit ? ((evenbits * y) >> LG2BIGDIGITBITS) : 0));
resultBuffer[0 .. result_start] = 0;
BigDigit [] t1 = resultBuffer[result_start..$];
BigDigit [] r1;
if (singledigit)
{
r1 = t1[0 .. 1];
r1[0] = x0;
y = y0;
}
else
{
// It's not worth right shifting by evenbits unless we also shrink the length after each
// multiply or squaring operation. That might still be worthwhile for large y.
r1 = t1[0 .. x.data.length - firstnonzero];
r1[0..$] = x.data[firstnonzero..$];
}
if (y>1)
{ // Set r1 = r1 ^^ y.
// The secondary buffer only needs space for the multiplication results
BigDigit [] t2 = new BigDigit[resultBuffer.length - result_start];
BigDigit [] r2;
int shifts = 63; // num bits in a long
while (!(y & 0x8000_0000_0000_0000L))
{
y <<= 1;
--shifts;
}
y <<=1;
while (y != 0)
{
// For each bit of y: Set r1 = r1 * r1
// If the bit is 1, set r1 = r1 * x
// Eg, if y is 0b101, result = ((x^^2)^^2)*x == x^^5.
// Optimization opportunity: if more than 2 bits in y are set,
// it's usually possible to reduce the number of multiplies
// by caching odd powers of x. eg for y = 54,
// (0b110110), set u = x^^3, and result is ((u^^8)*u)^^2
r2 = t2[0 .. r1.length*2];
squareInternal(r2, r1);
if (y & 0x8000_0000_0000_0000L)
{
r1 = t1[0 .. r2.length + nonzerolength];
if (singledigit)
{
r1[$-1] = multibyteMul(r1[0 .. $-1], r2, x0, 0);
}
else
{
mulInternal(r1, r2, x.data[firstnonzero..$]);
}
}
else
{
r1 = t1[0 .. r2.length];
r1[] = r2[];
}
y <<=1;
shifts--;
}
while (shifts>0)
{
r2 = t2[0 .. r1.length * 2];
squareInternal(r2, r1);
r1 = t1[0 .. r2.length];
r1[] = r2[];
--shifts;
}
}
if (finalMultiplier != 1)
{
const BigDigit carry = multibyteMul(r1, r1, finalMultiplier, 0);
if (carry)
{
r1 = t1[0 .. r1.length + 1];
r1[$-1] = carry;
}
}
if (evenshiftbits)
{
const BigDigit carry = multibyteShl(r1, r1, evenshiftbits);
if (carry != 0)
{
r1 = t1[0 .. r1.length + 1];
r1[$ - 1] = carry;
}
}
while (r1[$ - 1]==0)
{
r1=r1[0 .. $ - 1];
}
return BigUint(trustedAssumeUnique(resultBuffer[0 .. result_start + r1.length]));
}
// Implement toHash so that BigUint works properly as an AA key.
size_t toHash() const @nogc nothrow pure @safe
{
return .hashOf(data);
}
} // end BigUint
@safe pure nothrow unittest
{
// ulong comparison test
BigUint a = [1];
assert(a == 1);
assert(a < 0x8000_0000_0000_0000UL); // bug 9548
// bug 12234
BigUint z = [0];
assert(z == 0UL);
assert(!(z > 0UL));
assert(!(z < 0UL));
}
// Remove leading zeros from x, to restore the BigUint invariant
inout(BigDigit) [] removeLeadingZeros(inout(BigDigit) [] x) pure nothrow @safe
{
size_t k = x.length;
while (k>1 && x[k - 1]==0) --k;
return x[0 .. k];
}
pure @system unittest
{
BigUint r = BigUint([5]);
BigUint t = BigUint([7]);
BigUint s = BigUint.mod(r, t);
assert(s == 5);
}
@safe pure unittest
{
BigUint r;
r = 5UL;
assert(r.peekUlong(0) == 5UL);
assert(r.peekUint(0) == 5U);
r = 0x1234_5678_9ABC_DEF0UL;
assert(r.peekUlong(0) == 0x1234_5678_9ABC_DEF0UL);
assert(r.peekUint(0) == 0x9ABC_DEF0U);
}
// Pow tests
pure @system unittest
{
BigUint r, s;
r.fromHexString("80000000_00000001");
s = BigUint.pow(r, 5);
r.fromHexString("08000000_00000000_50000000_00000001_40000000_00000002_80000000"
~ "_00000002_80000000_00000001");
assert(s == r);
s = 10UL;
s = BigUint.pow(s, 39);
r.fromDecimalString("1000000000000000000000000000000000000000");
assert(s == r);
r.fromHexString("1_E1178E81_00000000");
s = BigUint.pow(r, 15); // Regression test: this used to overflow array bounds
r.fromDecimalString("000_000_00");
assert(r == 0);
r.fromDecimalString("0007");
assert(r == 7);
r.fromDecimalString("0");
assert(r == 0);
}
// Radix conversion tests
@safe pure unittest
{
BigUint r;
r.fromHexString("1_E1178E81_00000000");
assert(r.toHexString(0, '_', 0) == "1_E1178E81_00000000");
assert(r.toHexString(0, '_', 20) == "0001_E1178E81_00000000");
assert(r.toHexString(0, '_', 16+8) == "00000001_E1178E81_00000000");
assert(r.toHexString(0, '_', 16+9) == "0_00000001_E1178E81_00000000");
assert(r.toHexString(0, '_', 16+8+8) == "00000000_00000001_E1178E81_00000000");
assert(r.toHexString(0, '_', 16+8+8+1) == "0_00000000_00000001_E1178E81_00000000");
assert(r.toHexString(0, '_', 16+8+8+1, ' ') == " 1_E1178E81_00000000");
assert(r.toHexString(0, 0, 16+8+8+1) == "00000000000000001E1178E8100000000");
r = 0UL;
assert(r.toHexString(0, '_', 0) == "0");
assert(r.toHexString(0, '_', 7) == "0000000");
assert(r.toHexString(0, '_', 7, ' ') == " 0");
assert(r.toHexString(0, '#', 9) == "0#00000000");
assert(r.toHexString(0, 0, 9) == "000000000");
}
//
@safe pure unittest
{
BigUint r;
r.fromHexString("1_E1178E81_00000000");
assert(r.toHexString(0, '_', 0, '0', LetterCase.lower) == "1_e1178e81_00000000");
assert(r.toHexString(0, '_', 20, '0', LetterCase.lower) == "0001_e1178e81_00000000");
assert(r.toHexString(0, '_', 16+8, '0', LetterCase.lower) == "00000001_e1178e81_00000000");
assert(r.toHexString(0, '_', 16+9, '0', LetterCase.lower) == "0_00000001_e1178e81_00000000");
assert(r.toHexString(0, '_', 16+8+8, '0', LetterCase.lower) == "00000000_00000001_e1178e81_00000000");
assert(r.toHexString(0, '_', 16+8+8+1, '0', LetterCase.lower) == "0_00000000_00000001_e1178e81_00000000");
assert(r.toHexString(0, '_', 16+8+8+1, ' ', LetterCase.lower) == " 1_e1178e81_00000000");
assert(r.toHexString(0, 0, 16+8+8+1, '0', LetterCase.lower) == "00000000000000001e1178e8100000000");
r = 0UL;
assert(r.toHexString(0, '_', 0, '0', LetterCase.lower) == "0");
assert(r.toHexString(0, '_', 7, '0', LetterCase.lower) == "0000000");
assert(r.toHexString(0, '_', 7, ' ', LetterCase.lower) == " 0");
assert(r.toHexString(0, '#', 9, '0', LetterCase.lower) == "0#00000000");
assert(r.toHexString(0, 'Z', 9, '0', LetterCase.lower) == "0Z00000000");
assert(r.toHexString(0, 0, 9, '0', LetterCase.lower) == "000000000");
}
private:
void twosComplement(const(BigDigit) [] x, BigDigit[] result)
pure nothrow @safe
{
foreach (i; 0 .. x.length)
{
result[i] = ~x[i];
}
result[x.length..$] = BigDigit.max;
foreach (i; 0 .. result.length)
{
if (result[i] == BigDigit.max)
{
result[i] = 0;
}
else
{
result[i] += 1;
break;
}
}
}
// Encode BigInt as BigDigit array (sign and 2's complement)
BigDigit[] includeSign(const(BigDigit) [] x, size_t minSize, bool sign)
pure nothrow @safe
{
size_t length = (x.length > minSize) ? x.length : minSize;
BigDigit [] result = new BigDigit[length];
if (sign)
{
twosComplement(x, result);
}
else
{
result[0 .. x.length] = x;
}
return result;
}
// works for any type
T intpow(T)(T x, ulong n) pure nothrow @safe
{
T p;
switch (n)
{
case 0:
p = 1;
break;
case 1:
p = x;
break;
case 2:
p = x * x;
break;
default:
p = 1;
while (1)
{
if (n & 1)
p *= x;
n >>= 1;
if (!n)
break;
x *= x;
}
break;
}
return p;
}
// returns the maximum power of x that will fit in a uint.
int highestPowerBelowUintMax(uint x) pure nothrow @safe
{
assert(x>1);
static immutable ubyte [22] maxpwr = [ 31, 20, 15, 13, 12, 11, 10, 10, 9, 9,
8, 8, 8, 8, 7, 7, 7, 7, 7, 7, 7, 7];
if (x<24) return maxpwr[x-2];
if (x<41) return 6;
if (x<85) return 5;
if (x<256) return 4;
if (x<1626) return 3;
if (x<65_536) return 2;
return 1;
}
// returns the maximum power of x that will fit in a ulong.
int highestPowerBelowUlongMax(uint x) pure nothrow @safe
{
assert(x>1);
static immutable ubyte [39] maxpwr = [ 63, 40, 31, 27, 24, 22, 21, 20, 19, 18,
17, 17, 16, 16, 15, 15, 15, 15, 14, 14,
14, 14, 13, 13, 13, 13, 13, 13, 13, 12,
12, 12, 12, 12, 12, 12, 12, 12, 12];
if (x<41) return maxpwr[x-2];
if (x<57) return 11;
if (x<85) return 10;
if (x<139) return 9;
if (x<256) return 8;
if (x<566) return 7;
if (x<1626) return 6;
if (x<7132) return 5;
if (x<65_536) return 4;
if (x<2_642_246) return 3;
return 2;
}
version (unittest)
{
private int slowHighestPowerBelowUintMax(uint x) pure nothrow @safe
{
int pwr = 1;
for (ulong q = x;x*q < cast(ulong) uint.max; )
{
q*=x; ++pwr;
}
return pwr;
}
@safe pure unittest
{
assert(highestPowerBelowUintMax(10)==9);
for (int k=82; k<88; ++k)
{
assert(highestPowerBelowUintMax(k)== slowHighestPowerBelowUintMax(k));
}
}
}
/* General unsigned subtraction routine for bigints.
* Sets result = x - y. If the result is negative, negative will be true.
* Returns:
* unique memory
*/
BigDigit [] sub(const BigDigit [] x, const BigDigit [] y, bool *negative)
pure nothrow
{
if (x.length == y.length)
{
// There's a possibility of cancellation, if x and y are almost equal.
ptrdiff_t last = highestDifferentDigit(x, y);
BigDigit [] result = new BigDigit[last+1];
if (x[last] < y[last])
{ // we know result is negative
multibyteSub(result[0 .. last+1], y[0 .. last+1], x[0 .. last+1], 0);
*negative = true;
}
else
{ // positive or zero result
multibyteSub(result[0 .. last+1], x[0 .. last+1], y[0 .. last+1], 0);
*negative = false;
}
while (result.length > 1 && result[$-1] == 0)
{
result = result[0..$-1];
}
// if (result.length >1 && result[$-1]==0) return result[0..$-1];
return result;
}
// Lengths are different
const(BigDigit) [] large, small;
if (x.length < y.length)
{
*negative = true;
large = y; small = x;
}
else
{
*negative = false;
large = x; small = y;
}
// result.length will be equal to larger length, or could decrease by 1.
BigDigit [] result = new BigDigit[large.length];
BigDigit carry = multibyteSub(result[0 .. small.length], large[0 .. small.length], small, 0);
result[small.length..$] = large[small.length..$];
if (carry)
{
multibyteIncrementAssign!('-')(result[small.length..$], carry);
}
while (result.length > 1 && result[$-1] == 0)
{
result = result[0..$-1];
}
return result;
}
/*
* return a + b
* Returns:
* unique memory
*/
BigDigit [] add(const BigDigit [] a, const BigDigit [] b) pure nothrow
{
const(BigDigit) [] x, y;
if (a.length < b.length)
{
x = b; y = a;
}
else
{
x = a; y = b;
}
// now we know x.length > y.length
// create result. add 1 in case it overflows
BigDigit [] result = new BigDigit[x.length + 1];
BigDigit carry = multibyteAdd(result[0 .. y.length], x[0 .. y.length], y, 0);
if (x.length != y.length)
{
result[y.length..$-1]= x[y.length..$];
carry = multibyteIncrementAssign!('+')(result[y.length..$-1], carry);
}
if (carry)
{
result[$-1] = carry;
return result;
}
else
return result[0..$-1];
}
/** return x + y
*/
BigDigit [] addInt(const BigDigit[] x, ulong y) pure nothrow
{
uint hi = cast(uint)(y >>> 32);
uint lo = cast(uint)(y& 0xFFFF_FFFF);
auto len = x.length;
if (x.length < 2 && hi != 0) ++len;
BigDigit [] result = new BigDigit[len+1];
result[0 .. x.length] = x[];
if (x.length < 2 && hi != 0)
{
result[1]=hi;
hi=0;
}
uint carry = multibyteIncrementAssign!('+')(result[0..$-1], lo);
if (hi != 0) carry += multibyteIncrementAssign!('+')(result[1..$-1], hi);
if (carry)
{
result[$-1] = carry;
return result;
}
else
return result[0..$-1];
}
/** Return x - y.
* x must be greater than y.
*/
BigDigit [] subInt(const BigDigit[] x, ulong y) pure nothrow
{
uint hi = cast(uint)(y >>> 32);
uint lo = cast(uint)(y & 0xFFFF_FFFF);
BigDigit [] result = new BigDigit[x.length];
result[] = x[];
multibyteIncrementAssign!('-')(result[], lo);
if (hi)
multibyteIncrementAssign!('-')(result[1..$], hi);
if (result[$-1] == 0)
return result[0..$-1];
else
return result;
}
/** General unsigned multiply routine for bigints.
* Sets result = x * y.
*
* The length of y must not be larger than the length of x.
* Different algorithms are used, depending on the lengths of x and y.
* TODO: "Modern Computer Arithmetic" suggests the OddEvenKaratsuba algorithm for the
* unbalanced case. (But I doubt it would be faster in practice).
*
*/
void mulInternal(BigDigit[] result, const(BigDigit)[] x, const(BigDigit)[] y)
pure nothrow
{
import core.memory : GC;
assert( result.length == x.length + y.length );
assert( y.length > 0 );
assert( x.length >= y.length);
if (y.length <= KARATSUBALIMIT)
{
// Small multiplier, we'll just use the asm classic multiply.
if (y.length == 1)
{ // Trivial case, no cache effects to worry about
result[x.length] = multibyteMul(result[0 .. x.length], x, y[0], 0);
return;
}
immutable CACHELIMIT = getCacheLimit;
if (x.length + y.length < CACHELIMIT)
return mulSimple(result, x, y);
// If x is so big that it won't fit into the cache, we divide it into chunks
// Every chunk must be greater than y.length.
// We make the first chunk shorter, if necessary, to ensure this.
auto chunksize = CACHELIMIT / y.length;
immutable residual = x.length % chunksize;
if (residual < y.length)
{
chunksize -= y.length;
}
// Use schoolbook multiply.
mulSimple(result[0 .. chunksize + y.length], x[0 .. chunksize], y);
auto done = chunksize;
while (done < x.length)
{
// result[done .. done+ylength] already has a value.
chunksize = (done + (CACHELIMIT / y.length) < x.length) ? (CACHELIMIT / y.length) : x.length - done;
BigDigit [KARATSUBALIMIT] partial;
partial[0 .. y.length] = result[done .. done+y.length];
mulSimple(result[done .. done+chunksize+y.length], x[done .. done+chunksize], y);
addAssignSimple(result[done .. done+chunksize + y.length], partial[0 .. y.length]);
done += chunksize;
}
return;
}
immutable half = (x.length >> 1) + (x.length & 1);
if (2*y.length*y.length <= x.length*x.length)
{
// UNBALANCED MULTIPLY
// Use school multiply to cut into quasi-squares of Karatsuba-size
// or larger. The ratio of the two sides of the 'square' must be
// between 1.414:1 and 1:1. Use Karatsuba on each chunk.
//
// For maximum performance, we want the ratio to be as close to
// 1:1 as possible. To achieve this, we can either pad x or y.
// The best choice depends on the modulus x%y.
auto numchunks = x.length / y.length;
auto chunksize = y.length;
auto extra = x.length % y.length;
auto maxchunk = chunksize + extra;
bool paddingY; // true = we're padding Y, false = we're padding X.
bool isExtraSmall = extra * extra * 2 < y.length * y.length;
if (numchunks == 1 && isExtraSmall)
{
// We divide (x_first_half * y) and (x_last_half * y)
// between 1.414:1 and 1.707:1 (1.707 = 1+1/sqrt(2)).
// (1.414 ~ 1.707)/2:1 is balanced.
BigDigit [] scratchbuff = new BigDigit[karatsubaRequiredBuffSize(y.length) + y.length];
BigDigit [] partial = scratchbuff[$ - y.length .. $];
mulKaratsuba(result[0 .. half + y.length], y, x[0 .. half], scratchbuff);
partial[] = result[half .. half + y.length];
mulKaratsuba(result[half .. $], y, x[half .. $], scratchbuff);
BigDigit c = addAssignSimple(result[half .. half + y.length], partial);
if (c) multibyteIncrementAssign!('+')(result[half + y.length..$], c);
() @trusted { GC.free(scratchbuff.ptr); } ();
}
else
{
if (isExtraSmall)
{
// The leftover bit is small enough that it should be incorporated
// in the existing chunks.
// Make all the chunks a tiny bit bigger
// (We're padding y with zeros)
chunksize += extra / numchunks;
extra = x.length - chunksize*numchunks;
// there will probably be a few left over.
// Every chunk will either have size chunksize, or chunksize+1.
maxchunk = chunksize + 1;
paddingY = true;
assert(chunksize + extra + chunksize *(numchunks-1) == x.length );
}
else
{
// the extra bit is large enough that it's worth making a new chunk.
// (This means we're padding x with zeros, when doing the first one).
maxchunk = chunksize;
++numchunks;
paddingY = false;
assert(extra + chunksize *(numchunks-1) == x.length );
}
// We make the buffer a bit bigger so we have space for the partial sums.
BigDigit [] scratchbuff = new BigDigit[karatsubaRequiredBuffSize(maxchunk) + y.length];
BigDigit [] partial = scratchbuff[$ - y.length .. $];
size_t done; // how much of X have we done so far?
if (paddingY)
{
// If the first chunk is bigger, do it first. We're padding y.
mulKaratsuba(result[0 .. y.length + chunksize + (extra > 0 ? 1 : 0 )],
x[0 .. chunksize + (extra>0?1:0)], y, scratchbuff);
done = chunksize + (extra > 0 ? 1 : 0);
if (extra) --extra;
}
else
{ // We're padding X. Begin with the extra bit.
mulKaratsuba(result[0 .. y.length + extra], y, x[0 .. extra], scratchbuff);
done = extra;
extra = 0;
}
immutable basechunksize = chunksize;
while (done < x.length)
{
chunksize = basechunksize + (extra > 0 ? 1 : 0);
if (extra) --extra;
partial[] = result[done .. done+y.length];
mulKaratsuba(result[done .. done + y.length + chunksize],
x[done .. done+chunksize], y, scratchbuff);
addAssignSimple(result[done .. done + y.length + chunksize], partial);
done += chunksize;
}
() @trusted { GC.free(scratchbuff.ptr); } ();
}
}
else
{
// Balanced. Use Karatsuba directly.
BigDigit [] scratchbuff = new BigDigit[karatsubaRequiredBuffSize(x.length)];
mulKaratsuba(result, x, y, scratchbuff);
() @trusted { GC.free(scratchbuff.ptr); } ();
}
}
/** General unsigned squaring routine for BigInts.
* Sets result = x*x.
* NOTE: If the highest half-digit of x is zero, the highest digit of result will
* also be zero.
*/
void squareInternal(BigDigit[] result, const BigDigit[] x) pure nothrow
{
import core.memory : GC;
// Squaring is potentially half a multiply, plus add the squares of
// the diagonal elements.
assert(result.length == 2*x.length);
if (x.length <= KARATSUBASQUARELIMIT)
{
if (x.length == 1)
{
result[1] = multibyteMul(result[0 .. 1], x, x[0], 0);
return;
}
return squareSimple(result, x);
}
// The nice thing about squaring is that it always stays balanced
BigDigit [] scratchbuff = new BigDigit[karatsubaRequiredBuffSize(x.length)];
squareKaratsuba(result, x, scratchbuff);
() @trusted { GC.free(scratchbuff.ptr); } ();
}
import core.bitop : bsr;
/// if remainder is null, only calculate quotient.
void divModInternal(BigDigit [] quotient, BigDigit[] remainder, const BigDigit [] u,
const BigDigit [] v) pure nothrow
{
import core.memory : GC;
assert(quotient.length == u.length - v.length + 1);
assert(remainder == null || remainder.length == v.length);
assert(v.length > 1);
assert(u.length >= v.length);
// Normalize by shifting v left just enough so that
// its high-order bit is on, and shift u left the
// same amount. The highest bit of u will never be set.
BigDigit [] vn = new BigDigit[v.length];
BigDigit [] un = new BigDigit[u.length + 1];
// How much to left shift v, so that its MSB is set.
uint s = BIGDIGITSHIFTMASK - bsr(v[$-1]);
if (s != 0)
{
multibyteShl(vn, v, s);
un[$-1] = multibyteShl(un[0..$-1], u, s);
}
else
{
vn[] = v[];
un[0..$-1] = u[];
un[$-1] = 0;
}
if (quotient.length<FASTDIVLIMIT)
{
schoolbookDivMod(quotient, un, vn);
}
else
{
blockDivMod(quotient, un, vn);
}
// Unnormalize remainder, if required.
if (remainder != null)
{
if (s == 0) remainder[] = un[0 .. vn.length];
else multibyteShr(remainder, un[0 .. vn.length+1], s);
}
() @trusted { GC.free(un.ptr); GC.free(vn.ptr); } ();
}
pure @system unittest
{
immutable(uint) [] u = [0, 0xFFFF_FFFE, 0x8000_0000];
immutable(uint) [] v = [0xFFFF_FFFF, 0x8000_0000];
uint [] q = new uint[u.length - v.length + 1];
uint [] r = new uint[2];
divModInternal(q, r, u, v);
assert(q[]==[0xFFFF_FFFFu, 0]);
assert(r[]==[0xFFFF_FFFFu, 0x7FFF_FFFF]);
u = [0, 0xFFFF_FFFE, 0x8000_0001];
v = [0xFFFF_FFFF, 0x8000_0000];
divModInternal(q, r, u, v);
}
private:
// Converts a big uint to a hexadecimal string.
//
// Optionally, a separator character (eg, an underscore) may be added between
// every 8 digits.
// buff.length must be data.length*8 if separator is zero,
// or data.length*9 if separator is non-zero. It will be completely filled.
char [] biguintToHex(char [] buff, const BigDigit [] data, char separator=0,
LetterCase letterCase = LetterCase.upper) pure nothrow @safe
{
int x=0;
for (ptrdiff_t i=data.length - 1; i >= 0; --i)
{
toHexZeroPadded(buff[x .. x+8], data[i], letterCase);
x+=8;
if (separator)
{
if (i>0) buff[x] = separator;
++x;
}
}
return buff;
}
/**
* Convert a big uint into an octal string.
*
* Params:
* buff = The destination buffer for the octal string. Must be large enough to
* store the result, including leading zeroes, which is
* ceil(data.length * BigDigitBits / 3) characters.
* The buffer is filled from back to front, starting from `buff[$-1]`.
* data = The biguint to be converted.
*
* Returns: The index of the leading non-zero digit in `buff`. Will be
* `buff.length - 1` if the entire big uint is zero.
*/
size_t biguintToOctal(char[] buff, const(BigDigit)[] data)
pure nothrow @safe @nogc
{
ubyte carry = 0;
int shift = 0;
size_t penPos = buff.length - 1;
size_t lastNonZero = buff.length - 1;
pragma(inline) void output(uint digit) @nogc nothrow
{
if (digit != 0)
lastNonZero = penPos;
buff[penPos--] = cast(char)('0' + digit);
}
foreach (bigdigit; data)
{
if (shift < 0)
{
// Some bits were carried over from previous word.
assert(shift > -3);
output(((bigdigit << -shift) | carry) & 0b111);
shift += 3;
assert(shift > 0);
}
while (shift <= BigDigitBits - 3)
{
output((bigdigit >>> shift) & 0b111);
shift += 3;
}
if (shift < BigDigitBits)
{
// Some bits need to be carried forward.
carry = (bigdigit >>> shift) & 0b11;
}
shift -= BigDigitBits;
assert(shift >= -2 && shift <= 0);
}
if (shift < 0)
{
// Last word had bits that haven't been output yet.
assert(shift > -3);
output(carry);
}
return lastNonZero;
}
/** Convert a big uint into a decimal string.
*
* Params:
* data The biguint to be converted. Will be destroyed.
* buff The destination buffer for the decimal string. Must be
* large enough to store the result, including leading zeros.
* Will be filled backwards, starting from buff[$-1].
*
* buff.length must be >= (data.length*32)/log2(10) = 9.63296 * data.length.
* Returns:
* the lowest index of buff which was used.
*/
size_t biguintToDecimal(char [] buff, BigDigit [] data) pure nothrow
{
ptrdiff_t sofar = buff.length;
// Might be better to divide by (10^38/2^32) since that gives 38 digits for
// the price of 3 divisions and a shr; this version only gives 27 digits
// for 3 divisions.
while (data.length>1)
{
uint rem = multibyteDivAssign(data, 10_0000_0000, 0);
itoaZeroPadded(buff[sofar-9 .. sofar], rem);
sofar -= 9;
if (data[$-1] == 0 && data.length > 1)
{
data.length = data.length - 1;
}
}
itoaZeroPadded(buff[sofar-10 .. sofar], data[0]);
sofar -= 10;
// and strip off the leading zeros
while (sofar != buff.length-1 && buff[sofar] == '0')
sofar++;
return sofar;
}
/** Convert a decimal string into a big uint.
*
* Params:
* data The biguint to be receive the result. Must be large enough to
* store the result.
* s The decimal string. May contain _ or 0 .. 9
*
* The required length for the destination buffer is slightly less than
* 1 + s.length/log2(10) = 1 + s.length/3.3219.
*
* Returns:
* the highest index of data which was used.
*/
int biguintFromDecimal(Range)(BigDigit[] data, Range s)
if (
isInputRange!Range &&
isSomeChar!(ElementType!Range) &&
!isInfinite!Range)
in
{
static if (hasLength!Range)
assert((data.length >= 2) || (data.length == 1 && s.length == 1));
}
do
{
import std.conv : ConvException;
// Convert to base 1e19 = 10_000_000_000_000_000_000.
// (this is the largest power of 10 that will fit into a long).
// The length will be less than 1 + s.length/log2(10) = 1 + s.length/3.3219.
// 485 bits will only just fit into 146 decimal digits.
// As we convert the string, we record the number of digits we've seen in base 19:
// hi is the number of digits/19, lo is the extra digits (0 to 18).
// TODO: This is inefficient for very large strings (it is O(n^^2)).
// We should take advantage of fast multiplication once the numbers exceed
// Karatsuba size.
uint lo = 0; // number of powers of digits, 0 .. 18
uint x = 0;
ulong y = 0;
uint hi = 0; // number of base 1e19 digits
data[0] = 0; // initially number is 0.
if (data.length > 1)
data[1] = 0;
foreach (character; s)
{
if (character == '_')
continue;
if (character < '0' || character > '9')
throw new ConvException("invalid digit");
x *= 10;
x += character - '0';
++lo;
if (lo == 9)
{
y = x;
x = 0;
}
if (lo == 18)
{
y *= 10_0000_0000;
y += x;
x = 0;
}
if (lo == 19)
{
y *= 10;
y += x;
x = 0;
// Multiply existing number by 10^19, then add y1.
if (hi>0)
{
data[hi] = multibyteMul(data[0 .. hi], data[0 .. hi], 1_220_703_125*2u, 0); // 5^13*2 = 0x9184_E72A
++hi;
data[hi] = multibyteMul(data[0 .. hi], data[0 .. hi], 15_625*262_144u, 0); // 5^6*2^18 = 0xF424_0000
++hi;
}
else
hi = 2;
uint c = multibyteIncrementAssign!('+')(data[0 .. hi], cast(uint)(y&0xFFFF_FFFF));
c += multibyteIncrementAssign!('+')(data[1 .. hi], cast(uint)(y >> 32));
if (c != 0)
{
data[hi]=c;
++hi;
}
y = 0;
lo = 0;
}
}
// Now set y = all remaining digits.
if (lo >= 18)
{
}
else if (lo >= 9)
{
for (int k=9; k<lo; ++k) y*=10;
y+=x;
}
else
{
for (int k=0; k<lo; ++k) y*=10;
y+=x;
}
if (lo != 0)
{
if (hi == 0)
{
data[0] = cast(uint) y;
if (data.length == 1)
{
hi = 1;
}
else
{
data[1] = cast(uint)(y >>> 32);
hi=2;
}
}
else
{
while (lo>0)
{
immutable c = multibyteMul(data[0 .. hi], data[0 .. hi], 10, 0);
if (c != 0)
{
data[hi]=c;
++hi;
}
--lo;
}
uint c = multibyteIncrementAssign!('+')(data[0 .. hi], cast(uint)(y&0xFFFF_FFFF));
if (y > 0xFFFF_FFFFL)
{
c += multibyteIncrementAssign!('+')(data[1 .. hi], cast(uint)(y >> 32));
}
if (c != 0)
{
data[hi]=c;
++hi;
}
}
}
while (hi>1 && data[hi-1]==0)
--hi;
return hi;
}
private:
// ------------------------
// These in-place functions are only for internal use; they are incompatible
// with COW.
// Classic 'schoolbook' multiplication.
void mulSimple(BigDigit[] result, const(BigDigit) [] left,
const(BigDigit)[] right) pure nothrow
in
{
assert(result.length == left.length + right.length);
assert(right.length>1);
}
do
{
result[left.length] = multibyteMul(result[0 .. left.length], left, right[0], 0);
multibyteMultiplyAccumulate(result[1..$], left, right[1..$]);
}
// Classic 'schoolbook' squaring
void squareSimple(BigDigit[] result, const(BigDigit) [] x) pure nothrow
in
{
assert(result.length == 2*x.length);
assert(x.length>1);
}
do
{
multibyteSquare(result, x);
}
// add two uints of possibly different lengths. Result must be as long
// as the larger length.
// Returns carry (0 or 1).
uint addSimple(BigDigit[] result, const BigDigit [] left, const BigDigit [] right)
pure nothrow
in
{
assert(result.length == left.length);
assert(left.length >= right.length);
assert(right.length>0);
}
do
{
uint carry = multibyteAdd(result[0 .. right.length],
left[0 .. right.length], right, 0);
if (right.length < left.length)
{
result[right.length .. left.length] = left[right.length .. $];
carry = multibyteIncrementAssign!('+')(result[right.length..$], carry);
}
return carry;
}
// result = left - right
// returns carry (0 or 1)
BigDigit subSimple(BigDigit [] result,const(BigDigit) [] left,
const(BigDigit) [] right) pure nothrow
in
{
assert(result.length == left.length);
assert(left.length >= right.length);
assert(right.length>0);
}
do
{
BigDigit carry = multibyteSub(result[0 .. right.length],
left[0 .. right.length], right, 0);
if (right.length < left.length)
{
result[right.length .. left.length] = left[right.length .. $];
carry = multibyteIncrementAssign!('-')(result[right.length..$], carry);
} //else if (result.length == left.length+1) { result[$-1] = carry; carry=0; }
return carry;
}
/* result = result - right
* Returns carry = 1 if result was less than right.
*/
BigDigit subAssignSimple(BigDigit [] result, const(BigDigit) [] right)
pure nothrow
{
assert(result.length >= right.length);
uint c = multibyteSub(result[0 .. right.length], result[0 .. right.length], right, 0);
if (c && result.length > right.length)
c = multibyteIncrementAssign!('-')(result[right.length .. $], c);
return c;
}
/* result = result + right
*/
BigDigit addAssignSimple(BigDigit [] result, const(BigDigit) [] right)
pure nothrow
{
assert(result.length >= right.length);
uint c = multibyteAdd(result[0 .. right.length], result[0 .. right.length], right, 0);
if (c && result.length > right.length)
c = multibyteIncrementAssign!('+')(result[right.length .. $], c);
return c;
}
/* performs result += wantSub? - right : right;
*/
BigDigit addOrSubAssignSimple(BigDigit [] result, const(BigDigit) [] right,
bool wantSub) pure nothrow
{
if (wantSub)
return subAssignSimple(result, right);
else
return addAssignSimple(result, right);
}
// return true if x<y, considering leading zeros
bool less(const(BigDigit)[] x, const(BigDigit)[] y) pure nothrow
{
assert(x.length >= y.length);
auto k = x.length-1;
while (x[k]==0 && k >= y.length)
--k;
if (k >= y.length)
return false;
while (k>0 && x[k]==y[k])
--k;
return x[k] < y[k];
}
// Set result = abs(x-y), return true if result is negative(x<y), false if x <= y.
bool inplaceSub(BigDigit[] result, const(BigDigit)[] x, const(BigDigit)[] y)
pure nothrow
{
assert(result.length == ((x.length >= y.length) ? x.length : y.length));
size_t minlen;
bool negative;
if (x.length >= y.length)
{
minlen = y.length;
negative = less(x, y);
}
else
{
minlen = x.length;
negative = !less(y, x);
}
const (BigDigit)[] large, small;
if (negative)
{
large = y; small = x;
}
else
{
large = x; small = y;
}
BigDigit carry = multibyteSub(result[0 .. minlen], large[0 .. minlen], small[0 .. minlen], 0);
if (x.length != y.length)
{
result[minlen .. large.length]= large[minlen..$];
result[large.length..$] = 0;
if (carry)
multibyteIncrementAssign!('-')(result[minlen..$], carry);
}
return negative;
}
/* Determine how much space is required for the temporaries
* when performing a Karatsuba multiplication.
*/
size_t karatsubaRequiredBuffSize(size_t xlen) pure nothrow @safe
{
return xlen <= KARATSUBALIMIT ? 0 : 2*xlen; // - KARATSUBALIMIT+2;
}
/* Sets result = x*y, using Karatsuba multiplication.
* x must be longer or equal to y.
* Valid only for balanced multiplies, where x is not shorter than y.
* It is superior to schoolbook multiplication if and only if
* sqrt(2)*y.length > x.length > y.length.
* Karatsuba multiplication is O(n^1.59), whereas schoolbook is O(n^2)
* The maximum allowable length of x and y is uint.max; but better algorithms
* should be used far before that length is reached.
* Params:
* scratchbuff An array long enough to store all the temporaries. Will be destroyed.
*/
void mulKaratsuba(BigDigit [] result, const(BigDigit) [] x,
const(BigDigit)[] y, BigDigit [] scratchbuff) pure nothrow
{
assert(x.length >= y.length);
assert(result.length < uint.max, "Operands too large");
assert(result.length == x.length + y.length);
if (x.length <= KARATSUBALIMIT)
{
return mulSimple(result, x, y);
}
// Must be almost square (otherwise, a schoolbook iteration is better)
assert(2L * y.length * y.length > (x.length-1) * (x.length-1),
"Bigint Internal Error: Asymmetric Karatsuba");
// The subtractive version of Karatsuba multiply uses the following result:
// (Nx1 + x0)*(Ny1 + y0) = (N*N)*x1y1 + x0y0 + N * (x0y0 + x1y1 - mid)
// where mid = (x0-x1)*(y0-y1)
// requiring 3 multiplies of length N, instead of 4.
// The advantage of the subtractive over the additive version is that
// the mid multiply cannot exceed length N. But there are subtleties:
// (x0-x1),(y0-y1) may be negative or zero. To keep it simple, we
// retain all of the leading zeros in the subtractions
// half length, round up.
auto half = (x.length >> 1) + (x.length & 1);
const(BigDigit) [] x0 = x[0 .. half];
const(BigDigit) [] x1 = x[half .. $];
const(BigDigit) [] y0 = y[0 .. half];
const(BigDigit) [] y1 = y[half .. $];
BigDigit [] mid = scratchbuff[0 .. half*2];
BigDigit [] newscratchbuff = scratchbuff[half*2 .. $];
BigDigit [] resultLow = result[0 .. 2*half];
BigDigit [] resultHigh = result[2*half .. $];
// initially use result to store temporaries
BigDigit [] xdiff= result[0 .. half];
BigDigit [] ydiff = result[half .. half*2];
// First, we calculate mid, and sign of mid
immutable bool midNegative = inplaceSub(xdiff, x0, x1)
^ inplaceSub(ydiff, y0, y1);
mulKaratsuba(mid, xdiff, ydiff, newscratchbuff);
// Low half of result gets x0 * y0. High half gets x1 * y1
mulKaratsuba(resultLow, x0, y0, newscratchbuff);
if (2L * y1.length * y1.length < x1.length * x1.length)
{
// an asymmetric situation has been created.
// Worst case is if x:y = 1.414 : 1, then x1:y1 = 2.41 : 1.
// Applying one schoolbook multiply gives us two pieces each 1.2:1
if (y1.length <= KARATSUBALIMIT)
mulSimple(resultHigh, x1, y1);
else
{
// divide x1 in two, then use schoolbook multiply on the two pieces.
auto quarter = (x1.length >> 1) + (x1.length & 1);
immutable ysmaller = (quarter >= y1.length);
mulKaratsuba(resultHigh[0 .. quarter+y1.length], ysmaller ? x1[0 .. quarter] : y1,
ysmaller ? y1 : x1[0 .. quarter], newscratchbuff);
// Save the part which will be overwritten.
immutable ysmaller2 = ((x1.length - quarter) >= y1.length);
newscratchbuff[0 .. y1.length] = resultHigh[quarter .. quarter + y1.length];
mulKaratsuba(resultHigh[quarter..$], ysmaller2 ? x1[quarter..$] : y1,
ysmaller2 ? y1 : x1[quarter..$], newscratchbuff[y1.length..$]);
resultHigh[quarter..$].addAssignSimple(newscratchbuff[0 .. y1.length]);
}
}
else
mulKaratsuba(resultHigh, x1, y1, newscratchbuff);
/* We now have result = x0y0 + (N*N)*x1y1
Before adding or subtracting mid, we must calculate
result += N * (x0y0 + x1y1)
We can do this with three half-length additions. With a = x0y0, b = x1y1:
aHI aLO
+ aHI aLO
+ bHI bLO
+ bHI bLO
= R3 R2 R1 R0
R1 = aHI + bLO + aLO
R2 = aHI + bLO + aHI + carry_from_R1
R3 = bHi + carry_from_R2
It might actually be quicker to do it in two full-length additions:
newscratchbuff[2*half] = addSimple(newscratchbuff[0 .. 2*half], result[0 .. 2*half], result[2*half..$]);
addAssignSimple(result[half..$], newscratchbuff[0 .. 2*half+1]);
*/
BigDigit[] R1 = result[half .. half*2];
BigDigit[] R2 = result[half*2 .. half*3];
BigDigit[] R3 = result[half*3..$];
BigDigit c1 = multibyteAdd(R2, R2, R1, 0); // c1:R2 = R2 + R1
BigDigit c2 = multibyteAdd(R1, R2, result[0 .. half], 0); // c2:R1 = R2 + R1 + R0
BigDigit c3 = addAssignSimple(R2, R3); // R2 = R2 + R1 + R3
if (c1+c2)
multibyteIncrementAssign!('+')(result[half*2..$], c1+c2);
if (c1+c3)
multibyteIncrementAssign!('+')(R3, c1+c3);
// And finally we subtract mid
addOrSubAssignSimple(result[half..$], mid, !midNegative);
}
void squareKaratsuba(BigDigit [] result, const BigDigit [] x,
BigDigit [] scratchbuff) pure nothrow
{
// See mulKaratsuba for implementation comments.
// Squaring is simpler, since it never gets asymmetric.
assert(result.length < uint.max, "Operands too large");
assert(result.length == 2*x.length);
if (x.length <= KARATSUBASQUARELIMIT)
{
return squareSimple(result, x);
}
// half length, round up.
auto half = (x.length >> 1) + (x.length & 1);
const(BigDigit)[] x0 = x[0 .. half];
const(BigDigit)[] x1 = x[half .. $];
BigDigit [] mid = scratchbuff[0 .. half*2];
BigDigit [] newscratchbuff = scratchbuff[half*2 .. $];
// initially use result to store temporaries
BigDigit [] xdiff= result[0 .. half];
const BigDigit [] ydiff = result[half .. half*2];
// First, we calculate mid. We don't need its sign
inplaceSub(xdiff, x0, x1);
squareKaratsuba(mid, xdiff, newscratchbuff);
// Set result = x0x0 + (N*N)*x1x1
squareKaratsuba(result[0 .. 2*half], x0, newscratchbuff);
squareKaratsuba(result[2*half .. $], x1, newscratchbuff);
/* result += N * (x0x0 + x1x1)
Do this with three half-length additions. With a = x0x0, b = x1x1:
R1 = aHI + bLO + aLO
R2 = aHI + bLO + aHI + carry_from_R1
R3 = bHi + carry_from_R2
*/
BigDigit[] R1 = result[half .. half*2];
BigDigit[] R2 = result[half*2 .. half*3];
BigDigit[] R3 = result[half*3..$];
BigDigit c1 = multibyteAdd(R2, R2, R1, 0); // c1:R2 = R2 + R1
BigDigit c2 = multibyteAdd(R1, R2, result[0 .. half], 0); // c2:R1 = R2 + R1 + R0
BigDigit c3 = addAssignSimple(R2, R3); // R2 = R2 + R1 + R3
if (c1+c2) multibyteIncrementAssign!('+')(result[half*2..$], c1+c2);
if (c1+c3) multibyteIncrementAssign!('+')(R3, c1+c3);
// And finally we subtract mid, which is always positive
subAssignSimple(result[half..$], mid);
}
/* Knuth's Algorithm D, as presented in
* H.S. Warren, "Hacker's Delight", Addison-Wesley Professional (2002).
* Also described in "Modern Computer Arithmetic" 0.2, Exercise 1.8.18.
* Given u and v, calculates quotient = u / v, u = u % v.
* v must be normalized (ie, the MSB of v must be 1).
* The most significant words of quotient and u may be zero.
* u[0 .. v.length] holds the remainder.
*/
void schoolbookDivMod(BigDigit [] quotient, BigDigit [] u, in BigDigit [] v)
pure nothrow
{
assert(quotient.length == u.length - v.length);
assert(v.length > 1);
assert(u.length >= v.length);
assert((v[$-1]&0x8000_0000)!=0);
assert(u[$-1] < v[$-1]);
// BUG: This code only works if BigDigit is uint.
uint vhi = v[$-1];
uint vlo = v[$-2];
for (ptrdiff_t j = u.length - v.length - 1; j >= 0; j--)
{
// Compute estimate of quotient[j],
// qhat = (three most significant words of u)/(two most sig words of v).
uint qhat;
if (u[j + v.length] == vhi)
{
// uu/vhi could exceed uint.max (it will be 0x8000_0000 or 0x8000_0001)
qhat = uint.max;
}
else
{
uint ulo = u[j + v.length - 2];
version (D_InlineAsm_X86)
{
// Note: On DMD, this is only ~10% faster than the non-asm code.
uint *p = &u[j + v.length - 1];
asm pure nothrow
{
mov EAX, p;
mov EDX, [EAX+4];
mov EAX, [EAX];
div dword ptr [vhi];
mov qhat, EAX;
mov ECX, EDX;
div3by2correction:
mul dword ptr [vlo]; // EDX:EAX = qhat * vlo
sub EAX, ulo;
sbb EDX, ECX;
jbe div3by2done;
mov EAX, qhat;
dec EAX;
mov qhat, EAX;
add ECX, dword ptr [vhi];
jnc div3by2correction;
div3by2done: ;
}
}
else
{ // version (InlineAsm)
ulong uu = (cast(ulong)(u[j + v.length]) << 32) | u[j + v.length - 1];
immutable bigqhat = uu / vhi;
ulong rhat = uu - bigqhat * vhi;
qhat = cast(uint) bigqhat;
again:
if (cast(ulong) qhat * vlo > ((rhat << 32) + ulo))
{
--qhat;
rhat += vhi;
if (!(rhat & 0xFFFF_FFFF_0000_0000L))
goto again;
}
} // version (InlineAsm)
}
// Multiply and subtract.
uint carry = multibyteMulAdd!('-')(u[j .. j + v.length], v, qhat, 0);
if (u[j+v.length] < carry)
{
// If we subtracted too much, add back
--qhat;
carry -= multibyteAdd(u[j .. j + v.length],u[j .. j + v.length], v, 0);
}
quotient[j] = qhat;
u[j + v.length] = u[j + v.length] - carry;
}
}
private:
// TODO: Replace with a library call
void itoaZeroPadded(char[] output, uint value)
pure nothrow @safe @nogc
{
for (auto i = output.length; i--;)
{
if (value < 10)
{
output[i] = cast(char)(value + '0');
value = 0;
}
else
{
output[i] = cast(char)(value % 10 + '0');
value /= 10;
}
}
}
void toHexZeroPadded(char[] output, uint value,
LetterCase letterCase = LetterCase.upper) pure nothrow @safe
{
ptrdiff_t x = output.length - 1;
static immutable string upperHexDigits = "0123456789ABCDEF";
static immutable string lowerHexDigits = "0123456789abcdef";
for ( ; x >= 0; --x)
{
if (letterCase == LetterCase.upper)
{
output[x] = upperHexDigits[value & 0xF];
}
else
{
output[x] = lowerHexDigits[value & 0xF];
}
value >>= 4;
}
}
private:
// Returns the highest value of i for which left[i]!=right[i],
// or 0 if left[] == right[]
size_t highestDifferentDigit(const BigDigit [] left, const BigDigit [] right)
pure nothrow @nogc @safe
{
assert(left.length == right.length);
for (ptrdiff_t i = left.length - 1; i>0; --i)
{
if (left[i] != right[i])
return i;
}
return 0;
}
// Returns the lowest value of i for which x[i]!=0.
int firstNonZeroDigit(const BigDigit [] x) pure nothrow @nogc @safe
{
int k = 0;
while (x[k]==0)
{
++k;
assert(k<x.length);
}
return k;
}
/*
Calculate quotient and remainder of u / v using fast recursive division.
v must be normalised, and must be at least half as long as u.
Given u and v, v normalised, calculates quotient = u/v, u = u%v.
scratch is temporary storage space, length must be >= quotient + 1.
Returns:
u[0 .. v.length] is the remainder. u[v.length..$] is corrupted.
Implements algorithm 1.8 from MCA.
This algorithm has an annoying special case. After the first recursion, the
highest bit of the quotient may be set. This means that in the second
recursive call, the 'in' contract would be violated. (This happens only
when the top quarter of u is equal to the top half of v. A base 10
equivalent example of this situation is 5517/56; the first step gives
55/5 = 11). To maintain the in contract, we pad a zero to the top of both
u and the quotient. 'mayOverflow' indicates that that the special case
has occurred.
(In MCA, a different strategy is used: the in contract is weakened, and
schoolbookDivMod is more general: it allows the high bit of u to be set).
See also:
- C. Burkinel and J. Ziegler, "Fast Recursive Division", MPI-I-98-1-022,
Max-Planck Institute fuer Informatik, (Oct 1998).
*/
void recursiveDivMod(BigDigit[] quotient, BigDigit[] u, const(BigDigit)[] v,
BigDigit[] scratch, bool mayOverflow = false)
pure nothrow
in
{
// v must be normalized
assert(v.length > 1);
assert((v[$ - 1] & 0x8000_0000) != 0);
assert(!(u[$ - 1] & 0x8000_0000));
assert(quotient.length == u.length - v.length);
if (mayOverflow)
{
assert(u[$-1] == 0);
assert(u[$-2] & 0x8000_0000);
}
// Must be symmetric. Use block schoolbook division if not.
assert((mayOverflow ? u.length-1 : u.length) <= 2 * v.length);
assert((mayOverflow ? u.length-1 : u.length) >= v.length);
assert(scratch.length >= quotient.length + (mayOverflow ? 0 : 1));
}
do
{
if (quotient.length < FASTDIVLIMIT)
{
return schoolbookDivMod(quotient, u, v);
}
// Split quotient into two halves, but keep padding in the top half
auto k = (mayOverflow ? quotient.length - 1 : quotient.length) >> 1;
// RECURSION 1: Calculate the high half of the quotient
// Note that if u and quotient were padded, they remain padded during
// this call, so in contract is satisfied.
recursiveDivMod(quotient[k .. $], u[2 * k .. $], v[k .. $],
scratch, mayOverflow);
// quotient[k..$] is our guess at the high quotient.
// u[2*k .. 2.*k + v.length - k = k + v.length] is the high part of the
// first remainder. u[0 .. 2*k] is the low part.
// Calculate the full first remainder to be
// remainder - highQuotient * lowDivisor
// reducing highQuotient until the remainder is positive.
// The low part of the remainder, u[0 .. k], cannot be altered by this.
adjustRemainder(quotient[k .. $], u[k .. k + v.length], v, k,
scratch[0 .. quotient.length], mayOverflow);
// RECURSION 2: Calculate the low half of the quotient
// The full first remainder is now in u[0 .. k + v.length].
if (u[k + v.length - 1] & 0x8000_0000)
{
// Special case. The high quotient is 0x1_00...000 or 0x1_00...001.
// This means we need an extra quotient word for the next recursion.
// We need to restore the invariant for the recursive calls.
// We do this by padding both u and quotient. Extending u is trivial,
// because the higher words will not be used again. But for the
// quotient, we're clobbering the low word of the high quotient,
// so we need save it, and add it back in after the recursive call.
auto clobberedQuotient = quotient[k];
u[k+v.length] = 0;
recursiveDivMod(quotient[0 .. k+1], u[k .. k + v.length+1],
v[k .. $], scratch, true);
adjustRemainder(quotient[0 .. k+1], u[0 .. v.length], v, k,
scratch[0 .. 2 * k+1], true);
// Now add the quotient word that got clobbered earlier.
multibyteIncrementAssign!('+')(quotient[k..$], clobberedQuotient);
}
else
{
// The special case has NOT happened.
recursiveDivMod(quotient[0 .. k], u[k .. k + v.length], v[k .. $],
scratch, false);
// high remainder is in u[k .. k+(v.length-k)] == u[k .. v.length]
adjustRemainder(quotient[0 .. k], u[0 .. v.length], v, k,
scratch[0 .. 2 * k]);
}
}
// rem -= quot * v[0 .. k].
// If would make rem negative, decrease quot until rem is >= 0.
// Needs (quot.length * k) scratch space to store the result of the multiply.
void adjustRemainder(BigDigit[] quot, BigDigit[] rem, const(BigDigit)[] v,
ptrdiff_t k,
BigDigit[] scratch, bool mayOverflow = false) pure nothrow
{
assert(rem.length == v.length);
mulInternal(scratch, quot, v[0 .. k]);
uint carry = 0;
if (mayOverflow)
carry = scratch[$-1] + subAssignSimple(rem, scratch[0..$-1]);
else
carry = subAssignSimple(rem, scratch);
while (carry)
{
multibyteIncrementAssign!('-')(quot, 1); // quot--
carry -= multibyteAdd(rem, rem, v, 0);
}
}
// Cope with unbalanced division by performing block schoolbook division.
void blockDivMod(BigDigit [] quotient, BigDigit [] u, in BigDigit [] v)
pure nothrow
{
import core.memory : GC;
assert(quotient.length == u.length - v.length);
assert(v.length > 1);
assert(u.length >= v.length);
assert((v[$-1] & 0x8000_0000)!=0);
assert((u[$-1] & 0x8000_0000)==0);
BigDigit [] scratch = new BigDigit[v.length + 1];
// Perform block schoolbook division, with 'v.length' blocks.
auto m = u.length - v.length;
while (m > v.length)
{
immutable mayOverflow = (u[m + v.length -1 ] & 0x8000_0000)!=0;
BigDigit saveq;
if (mayOverflow)
{
u[m + v.length] = 0;
saveq = quotient[m];
}
recursiveDivMod(quotient[m-v.length .. m + (mayOverflow? 1: 0)],
u[m - v.length .. m + v.length + (mayOverflow? 1: 0)], v, scratch, mayOverflow);
if (mayOverflow)
{
assert(quotient[m] == 0);
quotient[m] = saveq;
}
m -= v.length;
}
recursiveDivMod(quotient[0 .. m], u[0 .. m + v.length], v, scratch);
() @trusted { GC.free(scratch.ptr); } ();
}
@system unittest
{
import core.stdc.stdio;
void printBiguint(const uint [] data)
{
char [] buff = biguintToHex(new char[data.length*9], data, '_');
printf("%.*s\n", buff.length, buff.ptr);
}
void printDecimalBigUint(BigUint data)
{
auto str = data.toDecimalString(0);
printf("%.*s\n", str.length, str.ptr);
}
uint [] a, b;
a = new uint[43];
b = new uint[179];
for (int i=0; i<a.length; ++i) a[i] = 0x1234_B6E9 + i;
for (int i=0; i<b.length; ++i) b[i] = 0x1BCD_8763 - i*546;
a[$-1] |= 0x8000_0000;
uint [] r = new uint[a.length];
uint [] q = new uint[b.length-a.length+1];
divModInternal(q, r, b, a);
q = q[0..$-1];
uint [] r1 = r.dup;
uint [] q1 = q.dup;
blockDivMod(q, b, a);
r = b[0 .. a.length];
assert(r[] == r1[]);
assert(q[] == q1[]);
}
// biguintToOctal
@safe unittest
{
enum bufSize = 5 * BigDigitBits / 3 + 1;
auto buf = new char[bufSize];
size_t i;
BigDigit[] data = [ 342391 ];
// Basic functionality with single word
i = biguintToOctal(buf, data);
assert(i == bufSize - 7 && buf[i .. $] == "1234567");
// Test carrying bits between words
data = [ 0x77053977, 0x39770539, 0x00000005 ];
i = biguintToOctal(buf, data);
assert(i == bufSize - 23 && buf[i .. $] == "12345670123456701234567");
// Test carried bits in the last word
data = [ 0x80000000 ];
i = biguintToOctal(buf, data);
assert(buf[i .. $] == "20000000000");
// Test boundary between 3rd and 4th word where the number of bits is
// divisible by 3 and no bits should be carried.
//
// The 0xC0000000's are for "poisoning" the carry to be non-zero when the
// rollover happens, so that if any bugs happen in wrongly adding the carry
// to the next word, non-zero bits will show up in the output.
data = [ 0xC0000000, 0xC0000000, 0xC0000000, 0x00000010 ];
i = biguintToOctal(buf, data);
assert(buf[i .. $] == "2060000000001400000000030000000000");
// Boundary case: 0
data = [ 0 ];
i = biguintToOctal(buf, data);
assert(buf[i .. $] == "0");
}
|
D
|
/**
* Forms the symbols available to all D programs. Includes Object, which is
* the root of the class object hierarchy. This module is implicitly
* imported.
* Macros:
* WIKI = Object
*
* Copyright: Copyright Digital Mars 2000 - 2011.
* License: <a href="http://www.boost.org/LICENSE_1_0.txt">Boost License 1.0</a>.
* Authors: Walter Bright, Sean Kelly
*/
/* Copyright Digital Mars 2000 - 2011.
* Distributed under the Boost Software License, Version 1.0.
* (See accompanying file LICENSE_1_0.txt or copy at
* http://www.boost.org/LICENSE_1_0.txt)
*/
module object;
//debug=PRINTF;
private
{
import core.atomic;
import core.stdc.string;
import core.stdc.stdlib;
import rt.util.hash;
import rt.util.string;
import rt.util.console;
debug(PRINTF) import core.stdc.stdio;
extern (C) void onOutOfMemoryError();
extern (C) Object _d_newclass(TypeInfo_Class ci);
extern (C) void _d_arrayshrinkfit(TypeInfo ti, void[] arr);
extern (C) size_t _d_arraysetcapacity(TypeInfo ti, size_t newcapacity, void *arrptr);
extern (C) void rt_finalize(void *data, bool det=true);
}
// NOTE: For some reason, this declaration method doesn't work
// in this particular file (and this file only). It must
// be a DMD thing.
//alias typeof(int.sizeof) size_t;
//alias typeof(cast(void*)0 - cast(void*)0) ptrdiff_t;
version(X86_64)
{
alias ulong size_t;
alias long ptrdiff_t;
alias long sizediff_t;
}
else
{
alias uint size_t;
alias int ptrdiff_t;
alias int sizediff_t;
}
alias size_t hash_t;
alias bool equals_t;
alias immutable(char)[] string;
alias immutable(wchar)[] wstring;
alias immutable(dchar)[] dstring;
/**
* All D class objects inherit from Object.
*/
class Object
{
/**
* Convert Object to a human readable string.
*/
string toString()
{
return this.classinfo.name;
}
/**
* Compute hash function for Object.
*/
hash_t toHash()
{
// BUG: this prevents a compacting GC from working, needs to be fixed
return cast(hash_t)cast(void*)this;
}
/**
* Compare with another Object obj.
* Returns:
* $(TABLE
* $(TR $(TD this < obj) $(TD < 0))
* $(TR $(TD this == obj) $(TD 0))
* $(TR $(TD this > obj) $(TD > 0))
* )
*/
int opCmp(Object o)
{
// BUG: this prevents a compacting GC from working, needs to be fixed
//return cast(int)cast(void*)this - cast(int)cast(void*)o;
throw new Exception("need opCmp for class " ~ this.classinfo.name);
//return this !is o;
}
/**
* Returns !=0 if this object does have the same contents as obj.
*/
equals_t opEquals(Object o)
{
return this is o;
}
equals_t opEquals(Object lhs, Object rhs)
{
if (lhs is rhs)
return true;
if (lhs is null || rhs is null)
return false;
if (typeid(lhs) == typeid(rhs))
return lhs.opEquals(rhs);
return lhs.opEquals(rhs) &&
rhs.opEquals(lhs);
}
interface Monitor
{
void lock();
void unlock();
}
/**
* Create instance of class specified by classname.
* The class must either have no constructors or have
* a default constructor.
* Returns:
* null if failed
*/
static Object factory(string classname)
{
auto ci = TypeInfo_Class.find(classname);
if (ci)
{
return ci.create();
}
return null;
}
}
/************************
* Returns true if lhs and rhs are equal.
*/
bool opEquals(Object lhs, Object rhs)
{
// If aliased to the same object or both null => equal
if (lhs is rhs) return true;
// If either is null => non-equal
if (lhs is null || rhs is null) return false;
// If same exact type => one call to method opEquals
if (typeid(lhs) is typeid(rhs) || typeid(lhs).opEquals(typeid(rhs)))
return lhs.opEquals(rhs);
// General case => symmetric calls to method opEquals
return lhs.opEquals(rhs) && rhs.opEquals(lhs);
}
bool opEquals(TypeInfo lhs, TypeInfo rhs)
{
// If aliased to the same object or both null => equal
if (lhs is rhs) return true;
// If either is null => non-equal
if (lhs is null || rhs is null) return false;
// If same exact type => one call to method opEquals
if (typeid(lhs) == typeid(rhs)) return lhs.opEquals(rhs);
//printf("%.*s and %.*s, %d %d\n", lhs.toString(), rhs.toString(), lhs.opEquals(rhs), rhs.opEquals(lhs));
// Factor out top level const
// (This still isn't right, should follow same rules as compiler does for type equality.)
TypeInfo_Const c = cast(TypeInfo_Const) lhs;
if (c)
lhs = c.base;
c = cast(TypeInfo_Const) rhs;
if (c)
rhs = c.base;
// General case => symmetric calls to method opEquals
return lhs.opEquals(rhs) && rhs.opEquals(lhs);
}
/**
* Information about an interface.
* When an object is accessed via an interface, an Interface* appears as the
* first entry in its vtbl.
*/
struct Interface
{
TypeInfo_Class classinfo; /// .classinfo for this interface (not for containing class)
void*[] vtbl;
ptrdiff_t offset; /// offset to Interface 'this' from Object 'this'
}
/**
* Runtime type information about a class. Can be retrieved for any class type
* or instance by using the .classinfo property.
* A pointer to this appears as the first entry in the class's vtbl[].
*/
alias TypeInfo_Class Classinfo;
/**
* Array of pairs giving the offset and type information for each
* member in an aggregate.
*/
struct OffsetTypeInfo
{
size_t offset; /// Offset of member from start of object
TypeInfo ti; /// TypeInfo for this member
}
/**
* Runtime type information about a type.
* Can be retrieved for any type using a
* <a href="../expression.html#typeidexpression">TypeidExpression</a>.
*/
class TypeInfo
{
override hash_t toHash()
{
auto data = this.toString();
return hashOf(data.ptr, data.length);
}
override int opCmp(Object o)
{
if (this is o)
return 0;
TypeInfo ti = cast(TypeInfo)o;
if (ti is null)
return 1;
return dstrcmp(this.toString(), ti.toString());
}
override equals_t opEquals(Object o)
{
/* TypeInfo instances are singletons, but duplicates can exist
* across DLL's. Therefore, comparing for a name match is
* sufficient.
*/
if (this is o)
return true;
TypeInfo ti = cast(TypeInfo)o;
return ti && this.toString() == ti.toString();
}
/// Returns a hash of the instance of a type.
hash_t getHash(in void* p) { return cast(hash_t)p; }
/// Compares two instances for equality.
equals_t equals(in void* p1, in void* p2) { return p1 == p2; }
/// Compares two instances for <, ==, or >.
int compare(in void* p1, in void* p2) { return 0; }
/// Returns size of the type.
size_t tsize() { return 0; }
/// Swaps two instances of the type.
void swap(void* p1, void* p2)
{
size_t n = tsize();
for (size_t i = 0; i < n; i++)
{
byte t = (cast(byte *)p1)[i];
(cast(byte*)p1)[i] = (cast(byte*)p2)[i];
(cast(byte*)p2)[i] = t;
}
}
/// Get TypeInfo for 'next' type, as defined by what kind of type this is,
/// null if none.
TypeInfo next() { return null; }
/// Return default initializer. If the type should be initialized to all zeros,
/// an array with a null ptr and a length equal to the type size will be returned.
void[] init() { return null; }
/// Get flags for type: 1 means GC should scan for pointers
uint flags() { return 0; }
/// Get type information on the contents of the type; null if not available
OffsetTypeInfo[] offTi() { return null; }
/// Run the destructor on the object and all its sub-objects
void destroy(void* p) {}
/// Run the postblit on the object and all its sub-objects
void postblit(void* p) {}
/// Return alignment of type
size_t talign() { return tsize(); }
/** Return internal info on arguments fitting into 8byte.
* See X86-64 ABI 3.2.3
*/
version (X86_64) int argTypes(out TypeInfo arg1, out TypeInfo arg2)
{ arg1 = this;
return 0;
}
}
class TypeInfo_Typedef : TypeInfo
{
override string toString() { return name; }
override equals_t opEquals(Object o)
{
TypeInfo_Typedef c;
return this is o ||
((c = cast(TypeInfo_Typedef)o) !is null &&
this.name == c.name &&
this.base == c.base);
}
override hash_t getHash(in void* p) { return base.getHash(p); }
override equals_t equals(in void* p1, in void* p2) { return base.equals(p1, p2); }
override int compare(in void* p1, in void* p2) { return base.compare(p1, p2); }
override size_t tsize() { return base.tsize(); }
override void swap(void* p1, void* p2) { return base.swap(p1, p2); }
override TypeInfo next() { return base.next(); }
override uint flags() { return base.flags(); }
override void[] init() { return m_init.length ? m_init : base.init(); }
override size_t talign() { return base.talign(); }
version (X86_64) override int argTypes(out TypeInfo arg1, out TypeInfo arg2)
{ return base.argTypes(arg1, arg2);
}
TypeInfo base;
string name;
void[] m_init;
}
class TypeInfo_Enum : TypeInfo_Typedef
{
}
class TypeInfo_Pointer : TypeInfo
{
override string toString() { return m_next.toString() ~ "*"; }
override equals_t opEquals(Object o)
{
TypeInfo_Pointer c;
return this is o ||
((c = cast(TypeInfo_Pointer)o) !is null &&
this.m_next == c.m_next);
}
override hash_t getHash(in void* p)
{
return cast(hash_t)*cast(void**)p;
}
override equals_t equals(in void* p1, in void* p2)
{
return *cast(void**)p1 == *cast(void**)p2;
}
override int compare(in void* p1, in void* p2)
{
if (*cast(void**)p1 < *cast(void**)p2)
return -1;
else if (*cast(void**)p1 > *cast(void**)p2)
return 1;
else
return 0;
}
override size_t tsize()
{
return (void*).sizeof;
}
override void swap(void* p1, void* p2)
{
void* tmp = *cast(void**)p1;
*cast(void**)p1 = *cast(void**)p2;
*cast(void**)p2 = tmp;
}
override TypeInfo next() { return m_next; }
override uint flags() { return 1; }
TypeInfo m_next;
}
class TypeInfo_Array : TypeInfo
{
override string toString() { return value.toString() ~ "[]"; }
override equals_t opEquals(Object o)
{
TypeInfo_Array c;
return this is o ||
((c = cast(TypeInfo_Array)o) !is null &&
this.value == c.value);
}
override hash_t getHash(in void* p)
{
void[] a = *cast(void[]*)p;
return hashOf(a.ptr, a.length);
}
override equals_t equals(in void* p1, in void* p2)
{
void[] a1 = *cast(void[]*)p1;
void[] a2 = *cast(void[]*)p2;
if (a1.length != a2.length)
return false;
size_t sz = value.tsize();
for (size_t i = 0; i < a1.length; i++)
{
if (!value.equals(a1.ptr + i * sz, a2.ptr + i * sz))
return false;
}
return true;
}
override int compare(in void* p1, in void* p2)
{
void[] a1 = *cast(void[]*)p1;
void[] a2 = *cast(void[]*)p2;
size_t sz = value.tsize();
size_t len = a1.length;
if (a2.length < len)
len = a2.length;
for (size_t u = 0; u < len; u++)
{
int result = value.compare(a1.ptr + u * sz, a2.ptr + u * sz);
if (result)
return result;
}
return cast(int)a1.length - cast(int)a2.length;
}
override size_t tsize()
{
return (void[]).sizeof;
}
override void swap(void* p1, void* p2)
{
void[] tmp = *cast(void[]*)p1;
*cast(void[]*)p1 = *cast(void[]*)p2;
*cast(void[]*)p2 = tmp;
}
TypeInfo value;
override TypeInfo next()
{
return value;
}
override uint flags() { return 1; }
override size_t talign()
{
return (void[]).alignof;
}
version (X86_64) override int argTypes(out TypeInfo arg1, out TypeInfo arg2)
{ //arg1 = typeid(size_t);
//arg2 = typeid(void*);
return 0;
}
}
class TypeInfo_StaticArray : TypeInfo
{
override string toString()
{
char[20] tmp = void;
return cast(string)(value.toString() ~ "[" ~ tmp.intToString(len) ~ "]");
}
override equals_t opEquals(Object o)
{
TypeInfo_StaticArray c;
return this is o ||
((c = cast(TypeInfo_StaticArray)o) !is null &&
this.len == c.len &&
this.value == c.value);
}
override hash_t getHash(in void* p)
{
size_t sz = value.tsize();
hash_t hash = 0;
for (size_t i = 0; i < len; i++)
hash += value.getHash(p + i * sz);
return hash;
}
override equals_t equals(in void* p1, in void* p2)
{
size_t sz = value.tsize();
for (size_t u = 0; u < len; u++)
{
if (!value.equals(p1 + u * sz, p2 + u * sz))
return false;
}
return true;
}
override int compare(in void* p1, in void* p2)
{
size_t sz = value.tsize();
for (size_t u = 0; u < len; u++)
{
int result = value.compare(p1 + u * sz, p2 + u * sz);
if (result)
return result;
}
return 0;
}
override size_t tsize()
{
return len * value.tsize();
}
override void swap(void* p1, void* p2)
{
void* tmp;
size_t sz = value.tsize();
ubyte[16] buffer;
void* pbuffer;
if (sz < buffer.sizeof)
tmp = buffer.ptr;
else
tmp = pbuffer = (new void[sz]).ptr;
for (size_t u = 0; u < len; u += sz)
{ size_t o = u * sz;
memcpy(tmp, p1 + o, sz);
memcpy(p1 + o, p2 + o, sz);
memcpy(p2 + o, tmp, sz);
}
if (pbuffer)
delete pbuffer;
}
override void[] init() { return value.init(); }
override TypeInfo next() { return value; }
override uint flags() { return value.flags(); }
override void destroy(void* p)
{
auto sz = value.tsize();
p += sz * len;
foreach (i; 0 .. len)
{
p -= sz;
value.destroy(p);
}
}
override void postblit(void* p)
{
auto sz = value.tsize();
foreach (i; 0 .. len)
{
value.postblit(p);
p += sz;
}
}
TypeInfo value;
size_t len;
override size_t talign()
{
return value.talign();
}
version (X86_64) override int argTypes(out TypeInfo arg1, out TypeInfo arg2)
{ arg1 = typeid(void*);
return 0;
}
}
class TypeInfo_AssociativeArray : TypeInfo
{
override string toString()
{
return cast(string)(next.toString() ~ "[" ~ key.toString() ~ "]");
}
override equals_t opEquals(Object o)
{
TypeInfo_AssociativeArray c;
return this is o ||
((c = cast(TypeInfo_AssociativeArray)o) !is null &&
this.key == c.key &&
this.value == c.value);
}
// BUG: need to add the rest of the functions
override size_t tsize()
{
return (char[int]).sizeof;
}
override TypeInfo next() { return value; }
override uint flags() { return 1; }
TypeInfo value;
TypeInfo key;
TypeInfo impl;
override size_t talign()
{
return (char[int]).alignof;
}
version (X86_64) override int argTypes(out TypeInfo arg1, out TypeInfo arg2)
{ arg1 = typeid(void*);
return 0;
}
}
class TypeInfo_Function : TypeInfo
{
override string toString()
{
return cast(string)(next.toString() ~ "()");
}
override equals_t opEquals(Object o)
{
TypeInfo_Function c;
return this is o ||
((c = cast(TypeInfo_Function)o) !is null &&
this.deco == c.deco);
}
// BUG: need to add the rest of the functions
override size_t tsize()
{
return 0; // no size for functions
}
TypeInfo next;
string deco;
}
class TypeInfo_Delegate : TypeInfo
{
override string toString()
{
return cast(string)(next.toString() ~ " delegate()");
}
override equals_t opEquals(Object o)
{
TypeInfo_Delegate c;
return this is o ||
((c = cast(TypeInfo_Delegate)o) !is null &&
this.deco == c.deco);
}
// BUG: need to add the rest of the functions
override size_t tsize()
{
alias int delegate() dg;
return dg.sizeof;
}
override uint flags() { return 1; }
TypeInfo next;
string deco;
override size_t talign()
{ alias int delegate() dg;
return dg.alignof;
}
version (X86_64) override int argTypes(out TypeInfo arg1, out TypeInfo arg2)
{ //arg1 = typeid(void*);
//arg2 = typeid(void*);
return 0;
}
}
/**
* Runtime type information about a class.
* Can be retrieved from an object instance by using the
* $(LINK2 ../property.html#classinfo, .classinfo) property.
*/
class TypeInfo_Class : TypeInfo
{
override string toString() { return info.name; }
override equals_t opEquals(Object o)
{
TypeInfo_Class c;
return this is o ||
((c = cast(TypeInfo_Class)o) !is null &&
this.info.name == c.info.name);
}
override hash_t getHash(in void* p)
{
Object o = *cast(Object*)p;
return o ? o.toHash() : 0;
}
override equals_t equals(in void* p1, in void* p2)
{
Object o1 = *cast(Object*)p1;
Object o2 = *cast(Object*)p2;
return (o1 is o2) || (o1 && o1.opEquals(o2));
}
override int compare(in void* p1, in void* p2)
{
Object o1 = *cast(Object*)p1;
Object o2 = *cast(Object*)p2;
int c = 0;
// Regard null references as always being "less than"
if (o1 !is o2)
{
if (o1)
{
if (!o2)
c = 1;
else
c = o1.opCmp(o2);
}
else
c = -1;
}
return c;
}
override size_t tsize()
{
return Object.sizeof;
}
override uint flags() { return 1; }
override OffsetTypeInfo[] offTi()
{
return m_offTi;
}
@property TypeInfo_Class info() { return this; }
@property TypeInfo typeinfo() { return this; }
byte[] init; /** class static initializer
* (init.length gives size in bytes of class)
*/
string name; /// class name
void*[] vtbl; /// virtual function pointer table
Interface[] interfaces; /// interfaces this class implements
TypeInfo_Class base; /// base class
void* destructor;
void function(Object) classInvariant;
uint m_flags;
// 1: // is IUnknown or is derived from IUnknown
// 2: // has no possible pointers into GC memory
// 4: // has offTi[] member
// 8: // has constructors
// 16: // has xgetMembers member
// 32: // has typeinfo member
void* deallocator;
OffsetTypeInfo[] m_offTi;
void function(Object) defaultConstructor; // default Constructor
const(MemberInfo[]) function(in char[]) xgetMembers;
/**
* Search all modules for TypeInfo_Class corresponding to classname.
* Returns: null if not found
*/
static TypeInfo_Class find(in char[] classname)
{
foreach (m; ModuleInfo)
{
if (m)
//writefln("module %s, %d", m.name, m.localClasses.length);
foreach (c; m.localClasses)
{
//writefln("\tclass %s", c.name);
if (c.name == classname)
return c;
}
}
return null;
}
/**
* Create instance of Object represented by 'this'.
*/
Object create()
{
if (m_flags & 8 && !defaultConstructor)
return null;
Object o = _d_newclass(this);
if (m_flags & 8 && defaultConstructor)
{
defaultConstructor(o);
}
return o;
}
/**
* Search for all members with the name 'name'.
* If name[] is null, return all members.
*/
const(MemberInfo[]) getMembers(in char[] name)
{
if (m_flags & 16 && xgetMembers)
return xgetMembers(name);
return null;
}
}
alias TypeInfo_Class ClassInfo;
class TypeInfo_Interface : TypeInfo
{
override string toString() { return info.name; }
override equals_t opEquals(Object o)
{
TypeInfo_Interface c;
return this is o ||
((c = cast(TypeInfo_Interface)o) !is null &&
this.info.name == c.classinfo.name);
}
override hash_t getHash(in void* p)
{
Interface* pi = **cast(Interface ***)*cast(void**)p;
Object o = cast(Object)(*cast(void**)p - pi.offset);
assert(o);
return o.toHash();
}
override equals_t equals(in void* p1, in void* p2)
{
Interface* pi = **cast(Interface ***)*cast(void**)p1;
Object o1 = cast(Object)(*cast(void**)p1 - pi.offset);
pi = **cast(Interface ***)*cast(void**)p2;
Object o2 = cast(Object)(*cast(void**)p2 - pi.offset);
return o1 == o2 || (o1 && o1.opCmp(o2) == 0);
}
override int compare(in void* p1, in void* p2)
{
Interface* pi = **cast(Interface ***)*cast(void**)p1;
Object o1 = cast(Object)(*cast(void**)p1 - pi.offset);
pi = **cast(Interface ***)*cast(void**)p2;
Object o2 = cast(Object)(*cast(void**)p2 - pi.offset);
int c = 0;
// Regard null references as always being "less than"
if (o1 != o2)
{
if (o1)
{
if (!o2)
c = 1;
else
c = o1.opCmp(o2);
}
else
c = -1;
}
return c;
}
override size_t tsize()
{
return Object.sizeof;
}
override uint flags() { return 1; }
TypeInfo_Class info;
}
class TypeInfo_Struct : TypeInfo
{
override string toString() { return name; }
override equals_t opEquals(Object o)
{
TypeInfo_Struct s;
return this is o ||
((s = cast(TypeInfo_Struct)o) !is null &&
this.name == s.name &&
this.init.length == s.init.length);
}
override hash_t getHash(in void* p)
{
assert(p);
if (xtoHash)
{
debug(PRINTF) printf("getHash() using xtoHash\n");
return (*xtoHash)(p);
}
else
{
debug(PRINTF) printf("getHash() using default hash\n");
return hashOf(p, init.length);
}
}
override equals_t equals(in void* p1, in void* p2)
{
if (p1 == p2)
return true;
else if (!p1 || !p2)
return false;
else if (xopEquals)
return (*xopEquals)(p1, p2);
else
// BUG: relies on the GC not moving objects
return memcmp(p1, p2, init.length) == 0;
}
override int compare(in void* p1, in void* p2)
{
// Regard null references as always being "less than"
if (p1 != p2)
{
if (p1)
{
if (!p2)
return true;
else if (xopCmp)
return (*xopCmp)(p2, p1);
else
// BUG: relies on the GC not moving objects
return memcmp(p1, p2, init.length);
}
else
return -1;
}
return 0;
}
override size_t tsize()
{
return init.length;
}
override void[] init() { return m_init; }
override uint flags() { return m_flags; }
override size_t talign() { return m_align; }
override void destroy(void* p)
{
if (xdtor)
(*xdtor)(p);
}
override void postblit(void* p)
{
if (xpostblit)
(*xpostblit)(p);
}
string name;
void[] m_init; // initializer; init.ptr == null if 0 initialize
hash_t function(in void*) xtoHash;
equals_t function(in void*, in void*) xopEquals;
int function(in void*, in void*) xopCmp;
char[] function(in void*) xtoString;
uint m_flags;
const(MemberInfo[]) function(in char[]) xgetMembers;
void function(void*) xdtor;
void function(void*) xpostblit;
uint m_align;
version (X86_64)
{
override int argTypes(out TypeInfo arg1, out TypeInfo arg2)
{ arg1 = m_arg1;
arg2 = m_arg2;
return 0;
}
TypeInfo m_arg1;
TypeInfo m_arg2;
}
}
class TypeInfo_Tuple : TypeInfo
{
TypeInfo[] elements;
override string toString()
{
string s = "(";
foreach (i, element; elements)
{
if (i)
s ~= ',';
s ~= element.toString();
}
s ~= ")";
return s;
}
override equals_t opEquals(Object o)
{
if (this is o)
return true;
auto t = cast(TypeInfo_Tuple)o;
if (t && elements.length == t.elements.length)
{
for (size_t i = 0; i < elements.length; i++)
{
if (elements[i] != t.elements[i])
return false;
}
return true;
}
return false;
}
override hash_t getHash(in void* p)
{
assert(0);
}
override equals_t equals(in void* p1, in void* p2)
{
assert(0);
}
override int compare(in void* p1, in void* p2)
{
assert(0);
}
override size_t tsize()
{
assert(0);
}
override void swap(void* p1, void* p2)
{
assert(0);
}
override void destroy(void* p)
{
assert(0);
}
override void postblit(void* p)
{
assert(0);
}
override size_t talign()
{
assert(0);
}
version (X86_64) override int argTypes(out TypeInfo arg1, out TypeInfo arg2)
{
assert(0);
}
}
class TypeInfo_Const : TypeInfo
{
override string toString()
{
return cast(string) ("const(" ~ base.toString() ~ ")");
}
//override equals_t opEquals(Object o) { return base.opEquals(o); }
override equals_t opEquals(Object o)
{
if (this is o)
return true;
if (typeid(this) != typeid(o))
return false;
auto t = cast(TypeInfo_Const)o;
if (base.opEquals(t.base))
{
return true;
}
return false;
}
override hash_t getHash(in void *p) { return base.getHash(p); }
override equals_t equals(in void *p1, in void *p2) { return base.equals(p1, p2); }
override int compare(in void *p1, in void *p2) { return base.compare(p1, p2); }
override size_t tsize() { return base.tsize(); }
override void swap(void *p1, void *p2) { return base.swap(p1, p2); }
override TypeInfo next() { return base.next(); }
override uint flags() { return base.flags(); }
override void[] init() { return base.init(); }
override size_t talign() { return base.talign(); }
version (X86_64) override int argTypes(out TypeInfo arg1, out TypeInfo arg2)
{ return base.argTypes(arg1, arg2);
}
TypeInfo base;
}
class TypeInfo_Invariant : TypeInfo_Const
{
override string toString()
{
return cast(string) ("immutable(" ~ base.toString() ~ ")");
}
}
class TypeInfo_Shared : TypeInfo_Const
{
override string toString()
{
return cast(string) ("shared(" ~ base.toString() ~ ")");
}
}
class TypeInfo_Inout : TypeInfo_Const
{
override string toString()
{
return cast(string) ("inout(" ~ base.toString() ~ ")");
}
}
abstract class MemberInfo
{
string name();
}
class MemberInfo_field : MemberInfo
{
this(string name, TypeInfo ti, size_t offset)
{
m_name = name;
m_typeinfo = ti;
m_offset = offset;
}
override string name() { return m_name; }
TypeInfo typeInfo() { return m_typeinfo; }
size_t offset() { return m_offset; }
string m_name;
TypeInfo m_typeinfo;
size_t m_offset;
}
class MemberInfo_function : MemberInfo
{
this(string name, TypeInfo ti, void* fp, uint flags)
{
m_name = name;
m_typeinfo = ti;
m_fp = fp;
m_flags = flags;
}
override string name() { return m_name; }
TypeInfo typeInfo() { return m_typeinfo; }
void* fp() { return m_fp; }
uint flags() { return m_flags; }
string m_name;
TypeInfo m_typeinfo;
void* m_fp;
uint m_flags;
}
///////////////////////////////////////////////////////////////////////////////
// Throwable
///////////////////////////////////////////////////////////////////////////////
class Throwable : Object
{
interface TraceInfo
{
int opApply(scope int delegate(ref char[]));
int opApply(scope int delegate(ref size_t, ref char[]));
string toString();
}
string msg;
string file;
size_t line;
TraceInfo info;
Throwable next;
this(string msg, Throwable next = null)
{
this.msg = msg;
this.next = next;
//this.info = _d_traceContext();
}
this(string msg, string file, size_t line, Throwable next = null)
{
this(msg, next);
this.file = file;
this.line = line;
//this.info = _d_traceContext();
}
override string toString()
{
char[20] tmp = void;
char[] buf;
if (file)
{
buf ~= this.classinfo.name ~ "@" ~ file ~ "(" ~ tmp.intToString(line) ~ ")";
}
else
{
buf ~= this.classinfo.name;
}
if (msg)
{
buf ~= ": " ~ msg;
}
if (info)
{
buf ~= "\n----------------";
foreach (t; info)
buf ~= "\n" ~ t;
}
return cast(string) buf;
}
}
alias Throwable.TraceInfo function(void* ptr) TraceHandler;
private __gshared TraceHandler traceHandler = null;
/**
* Overrides the default trace hander with a user-supplied version.
*
* Params:
* h = The new trace handler. Set to null to use the default handler.
*/
extern (C) void rt_setTraceHandler(TraceHandler h)
{
traceHandler = h;
}
/**
* Return the current trace handler
*/
extern (C) TraceHandler rt_getTraceHandler()
{
return traceHandler;
}
/**
* This function will be called when an exception is constructed. The
* user-supplied trace handler will be called if one has been supplied,
* otherwise no trace will be generated.
*
* Params:
* ptr = A pointer to the location from which to generate the trace, or null
* if the trace should be generated from within the trace handler
* itself.
*
* Returns:
* An object describing the current calling context or null if no handler is
* supplied.
*/
extern (C) Throwable.TraceInfo _d_traceContext(void* ptr = null)
{
if (traceHandler is null)
return null;
return traceHandler(ptr);
}
class Exception : Throwable
{
this(string msg, string file = __FILE__, size_t line = __LINE__, Throwable next = null)
{
super(msg, file, line, next);
}
this(string msg, Throwable next, string file = __FILE__, size_t line = __LINE__)
{
super(msg, file, line, next);
}
}
unittest
{
{
auto e = new Exception("msg");
assert(e.file == __FILE__);
assert(e.line == __LINE__ - 2);
assert(e.next is null);
assert(e.msg == "msg");
}
{
auto e = new Exception("msg", new Exception("It's an Excepton!"), "hello", 42);
assert(e.file == "hello");
assert(e.line == 42);
assert(e.next !is null);
assert(e.msg == "msg");
}
{
auto e = new Exception("msg", "hello", 42, new Exception("It's an Exception!"));
assert(e.file == "hello");
assert(e.line == 42);
assert(e.next !is null);
assert(e.msg == "msg");
}
}
class Error : Throwable
{
this(string msg, Throwable next = null)
{
super(msg, next);
bypassedException = null;
}
this(string msg, string file, size_t line, Throwable next = null)
{
super(msg, file, line, next);
bypassedException = null;
}
/// The first Exception which was bypassed when this Error was thrown,
/// or null if no Exceptions were pending.
Throwable bypassedException;
}
unittest
{
{
auto e = new Error("msg");
assert(e.file is null);
assert(e.line == 0);
assert(e.next is null);
assert(e.msg == "msg");
assert(e.bypassedException is null);
}
{
auto e = new Error("msg", new Exception("It's an Excepton!"));
assert(e.file is null);
assert(e.line == 0);
assert(e.next !is null);
assert(e.msg == "msg");
assert(e.bypassedException is null);
}
{
auto e = new Error("msg", "hello", 42, new Exception("It's an Exception!"));
assert(e.file == "hello");
assert(e.line == 42);
assert(e.next !is null);
assert(e.msg == "msg");
assert(e.bypassedException is null);
}
}
///////////////////////////////////////////////////////////////////////////////
// ModuleInfo
///////////////////////////////////////////////////////////////////////////////
enum
{
MIctorstart = 1, // we've started constructing it
MIctordone = 2, // finished construction
MIstandalone = 4, // module ctor does not depend on other module
// ctors being done first
MItlsctor = 8,
MItlsdtor = 0x10,
MIctor = 0x20,
MIdtor = 0x40,
MIxgetMembers = 0x80,
MIictor = 0x100,
MIunitTest = 0x200,
MIimportedModules = 0x400,
MIlocalClasses = 0x800,
MInew = 0x80000000 // it's the "new" layout
}
struct ModuleInfo
{
struct New
{
uint flags;
uint index; // index into _moduleinfo_array[]
/* Order of appearance, depending on flags
* tlsctor
* tlsdtor
* xgetMembers
* ctor
* dtor
* ictor
* importedModules
* localClasses
* name
*/
}
struct Old
{
string name;
ModuleInfo*[] importedModules;
TypeInfo_Class[] localClasses;
uint flags;
void function() ctor; // module shared static constructor (order dependent)
void function() dtor; // module shared static destructor
void function() unitTest; // module unit tests
void* xgetMembers; // module getMembers() function
void function() ictor; // module shared static constructor (order independent)
void function() tlsctor; // module thread local static constructor (order dependent)
void function() tlsdtor; // module thread local static destructor
uint index; // index into _moduleinfo_array[]
void*[1] reserved; // for future expansion
}
union
{
New n;
Old o;
}
@property isNew() { return n.flags & MInew; }
@property uint index() { return isNew ? n.index : o.index; }
@property void index(uint i) { if (isNew) n.index = i; else o.index = i; }
@property uint flags() { return isNew ? n.flags : o.flags; }
@property void flags(uint f) { if (isNew) n.flags = f; else o.flags = f; }
@property void function() tlsctor()
{
if (isNew)
{
if (n.flags & MItlsctor)
{
size_t off = New.sizeof;
return *cast(typeof(return)*)(cast(void*)(&this) + off);
}
return null;
}
else
return o.tlsctor;
}
@property void function() tlsdtor()
{
if (isNew)
{
if (n.flags & MItlsdtor)
{
size_t off = New.sizeof;
if (n.flags & MItlsctor)
off += o.tlsctor.sizeof;
return *cast(typeof(return)*)(cast(void*)(&this) + off);
}
return null;
}
else
return o.tlsdtor;
}
@property void* xgetMembers()
{
if (isNew)
{
if (n.flags & MIxgetMembers)
{
size_t off = New.sizeof;
if (n.flags & MItlsctor)
off += o.tlsctor.sizeof;
if (n.flags & MItlsdtor)
off += o.tlsdtor.sizeof;
return *cast(typeof(return)*)(cast(void*)(&this) + off);
}
return null;
}
return o.xgetMembers;
}
@property void function() ctor()
{
if (isNew)
{
if (n.flags & MIctor)
{
size_t off = New.sizeof;
if (n.flags & MItlsctor)
off += o.tlsctor.sizeof;
if (n.flags & MItlsdtor)
off += o.tlsdtor.sizeof;
if (n.flags & MIxgetMembers)
off += o.xgetMembers.sizeof;
return *cast(typeof(return)*)(cast(void*)(&this) + off);
}
return null;
}
return o.ctor;
}
@property void function() dtor()
{
if (isNew)
{
if (n.flags & MIdtor)
{
size_t off = New.sizeof;
if (n.flags & MItlsctor)
off += o.tlsctor.sizeof;
if (n.flags & MItlsdtor)
off += o.tlsdtor.sizeof;
if (n.flags & MIxgetMembers)
off += o.xgetMembers.sizeof;
if (n.flags & MIctor)
off += o.ctor.sizeof;
return *cast(typeof(return)*)(cast(void*)(&this) + off);
}
return null;
}
return o.ctor;
}
@property void function() ictor()
{
if (isNew)
{
if (n.flags & MIictor)
{
size_t off = New.sizeof;
if (n.flags & MItlsctor)
off += o.tlsctor.sizeof;
if (n.flags & MItlsdtor)
off += o.tlsdtor.sizeof;
if (n.flags & MIxgetMembers)
off += o.xgetMembers.sizeof;
if (n.flags & MIctor)
off += o.ctor.sizeof;
if (n.flags & MIdtor)
off += o.ctor.sizeof;
return *cast(typeof(return)*)(cast(void*)(&this) + off);
}
return null;
}
return o.ictor;
}
@property void function() unitTest()
{
if (isNew)
{
if (n.flags & MIunitTest)
{
size_t off = New.sizeof;
if (n.flags & MItlsctor)
off += o.tlsctor.sizeof;
if (n.flags & MItlsdtor)
off += o.tlsdtor.sizeof;
if (n.flags & MIxgetMembers)
off += o.xgetMembers.sizeof;
if (n.flags & MIctor)
off += o.ctor.sizeof;
if (n.flags & MIdtor)
off += o.ctor.sizeof;
if (n.flags & MIictor)
off += o.ictor.sizeof;
return *cast(typeof(return)*)(cast(void*)(&this) + off);
}
return null;
}
return o.unitTest;
}
@property ModuleInfo*[] importedModules()
{
if (isNew)
{
if (n.flags & MIimportedModules)
{
size_t off = New.sizeof;
if (n.flags & MItlsctor)
off += o.tlsctor.sizeof;
if (n.flags & MItlsdtor)
off += o.tlsdtor.sizeof;
if (n.flags & MIxgetMembers)
off += o.xgetMembers.sizeof;
if (n.flags & MIctor)
off += o.ctor.sizeof;
if (n.flags & MIdtor)
off += o.ctor.sizeof;
if (n.flags & MIictor)
off += o.ictor.sizeof;
if (n.flags & MIunitTest)
off += o.unitTest.sizeof;
auto plength = cast(size_t*)(cast(void*)(&this) + off);
ModuleInfo** pm = cast(ModuleInfo**)(plength + 1);
return pm[0 .. *plength];
}
return null;
}
return o.importedModules;
}
@property TypeInfo_Class[] localClasses()
{
if (isNew)
{
if (n.flags & MIlocalClasses)
{
size_t off = New.sizeof;
if (n.flags & MItlsctor)
off += o.tlsctor.sizeof;
if (n.flags & MItlsdtor)
off += o.tlsdtor.sizeof;
if (n.flags & MIxgetMembers)
off += o.xgetMembers.sizeof;
if (n.flags & MIctor)
off += o.ctor.sizeof;
if (n.flags & MIdtor)
off += o.ctor.sizeof;
if (n.flags & MIictor)
off += o.ictor.sizeof;
if (n.flags & MIunitTest)
off += o.unitTest.sizeof;
if (n.flags & MIimportedModules)
{
auto plength = cast(size_t*)(cast(void*)(&this) + off);
off += size_t.sizeof + *plength * plength.sizeof;
}
auto plength = cast(size_t*)(cast(void*)(&this) + off);
TypeInfo_Class* pt = cast(TypeInfo_Class*)(plength + 1);
return pt[0 .. *plength];
}
return null;
}
return o.localClasses;
}
@property string name()
{
if (isNew)
{
size_t off = New.sizeof;
if (n.flags & MItlsctor)
off += o.tlsctor.sizeof;
if (n.flags & MItlsdtor)
off += o.tlsdtor.sizeof;
if (n.flags & MIxgetMembers)
off += o.xgetMembers.sizeof;
if (n.flags & MIctor)
off += o.ctor.sizeof;
if (n.flags & MIdtor)
off += o.ctor.sizeof;
if (n.flags & MIictor)
off += o.ictor.sizeof;
if (n.flags & MIunitTest)
off += o.unitTest.sizeof;
if (n.flags & MIimportedModules)
{
auto plength = cast(size_t*)(cast(void*)(&this) + off);
off += size_t.sizeof + *plength * plength.sizeof;
}
if (n.flags & MIlocalClasses)
{
auto plength = cast(size_t*)(cast(void*)(&this) + off);
off += size_t.sizeof + *plength * plength.sizeof;
}
auto p = cast(immutable(char)*)(cast(void*)(&this) + off);
auto len = strlen(p);
return p[0 .. len];
}
return o.name;
}
static int opApply(scope int delegate(ref ModuleInfo*) dg)
{
int ret = 0;
foreach (m; _moduleinfo_array)
{
// TODO: Should null ModuleInfo be allowed?
if (m !is null)
{
ret = dg(m);
if (ret)
break;
}
}
return ret;
}
}
// Windows: this gets initialized by minit.asm
// Posix: this gets initialized in _moduleCtor()
extern (C) __gshared ModuleInfo*[] _moduleinfo_array;
version (linux)
{
// This linked list is created by a compiler generated function inserted
// into the .ctor list by the compiler.
struct ModuleReference
{
ModuleReference* next;
ModuleInfo* mod;
}
extern (C) __gshared ModuleReference* _Dmodule_ref; // start of linked list
}
version (FreeBSD)
{
// This linked list is created by a compiler generated function inserted
// into the .ctor list by the compiler.
struct ModuleReference
{
ModuleReference* next;
ModuleInfo* mod;
}
extern (C) __gshared ModuleReference* _Dmodule_ref; // start of linked list
}
version (Solaris)
{
// This linked list is created by a compiler generated function inserted
// into the .ctor list by the compiler.
struct ModuleReference
{
ModuleReference* next;
ModuleInfo* mod;
}
extern (C) __gshared ModuleReference* _Dmodule_ref; // start of linked list
}
version (OSX)
{
extern (C)
{
extern __gshared void* _minfo_beg;
extern __gshared void* _minfo_end;
}
}
__gshared ModuleInfo*[] _moduleinfo_dtors;
__gshared size_t _moduleinfo_dtors_i;
__gshared ModuleInfo*[] _moduleinfo_tlsdtors;
__gshared size_t _moduleinfo_tlsdtors_i;
// Register termination function pointers
extern (C) int _fatexit(void*);
/**
* Initialize the modules.
*/
extern (C) void _moduleCtor()
{
debug(PRINTF) printf("_moduleCtor()\n");
version (linux)
{
int len = 0;
ModuleReference *mr;
for (mr = _Dmodule_ref; mr; mr = mr.next)
len++;
_moduleinfo_array = new ModuleInfo*[len];
len = 0;
for (mr = _Dmodule_ref; mr; mr = mr.next)
{ _moduleinfo_array[len] = mr.mod;
len++;
}
}
version (FreeBSD)
{
int len = 0;
ModuleReference *mr;
for (mr = _Dmodule_ref; mr; mr = mr.next)
len++;
_moduleinfo_array = new ModuleInfo*[len];
len = 0;
for (mr = _Dmodule_ref; mr; mr = mr.next)
{ _moduleinfo_array[len] = mr.mod;
len++;
}
}
version (Solaris)
{
int len = 0;
ModuleReference *mr;
for (mr = _Dmodule_ref; mr; mr = mr.next)
len++;
_moduleinfo_array = new ModuleInfo*[len];
len = 0;
for (mr = _Dmodule_ref; mr; mr = mr.next)
{ _moduleinfo_array[len] = mr.mod;
len++;
}
}
version (OSX)
{
/* The ModuleInfo references are stored in the special segment
* __minfodata, which is bracketed by the segments __minfo_beg
* and __minfo_end. The variables _minfo_beg and _minfo_end
* are of zero size and are in the two bracketing segments,
* respectively.
*/
size_t length = cast(ModuleInfo**)&_minfo_end - cast(ModuleInfo**)&_minfo_beg;
_moduleinfo_array = (cast(ModuleInfo**)&_minfo_beg)[0 .. length];
debug printf("moduleinfo: ptr = %p, length = %d\n", _moduleinfo_array.ptr, _moduleinfo_array.length);
debug foreach (m; _moduleinfo_array)
{
// TODO: Should null ModuleInfo be allowed?
if (m !is null)
//printf("\t%p\n", m);
printf("\t%.*s\n", m.name);
}
}
version (Windows)
{
// Ensure module destructors also get called on program termination
//_fatexit(&_STD_moduleDtor);
}
//_moduleinfo_dtors = new ModuleInfo*[_moduleinfo_array.length];
//debug(PRINTF) printf("_moduleinfo_dtors = x%x\n", cast(void*)_moduleinfo_dtors);
// this will determine the constructor/destructor order, and check for
// cycles for both shared and TLS ctors
_checkModCtors();
_moduleIndependentCtors();
// now, call the module constructors in the designated order
foreach(i; 0.._moduleinfo_dtors_i)
{
ModuleInfo *mi = _moduleinfo_dtors[i];
if(mi.ctor)
(*mi.ctor)();
}
//_moduleCtor2(_moduleinfo_array, 0);
// NOTE: _moduleTlsCtor is now called manually by dmain2
//_moduleTlsCtor();
}
extern (C) void _moduleIndependentCtors()
{
debug(PRINTF) printf("_moduleIndependentCtors()\n");
foreach (m; _moduleinfo_array)
{
// TODO: Should null ModuleInfo be allowed?
if (m && m.ictor)
{
(*m.ictor)();
}
}
}
/********************************************
* Check for cycles on module constructors, and establish an order for module
* constructors.
*/
extern(C) void _checkModCtors()
{
// Create an array of modules that will determine the order of construction
// (and destruction in reverse).
auto dtors = _moduleinfo_dtors = new ModuleInfo*[_moduleinfo_array.length];
size_t dtoridx = 0;
// this pointer will identify the module where the cycle was detected.
ModuleInfo *cycleModule;
// allocate some stack arrays that will be used throughout the process.
ubyte* p = cast(ubyte *)alloca(_moduleinfo_array.length * ubyte.sizeof);
auto reachable = p[0.._moduleinfo_array.length];
p = cast(ubyte *)alloca(_moduleinfo_array.length * ubyte.sizeof);
auto flags = p[0.._moduleinfo_array.length];
// find all the non-trivial dependencies (that is, dependencies that have a
// ctor or dtor) of a given module. Doing this, we can 'skip over' the
// trivial modules to get at the non-trivial ones.
size_t _findDependencies(ModuleInfo *current, bool orig = true)
{
auto idx = current.index;
if(reachable[idx])
return 0;
size_t result = 0;
reachable[idx] = 1;
if(!orig && (flags[idx] & (MIctor | MIdtor)) && !(flags[idx] & MIstandalone))
// non-trivial, stop here
return result + 1;
foreach(ModuleInfo *m; current.importedModules)
{
result += _findDependencies(m, false);
}
return result;
}
void println(string msg[]...)
{
version(Windows)
immutable ret = "\r\n";
else
immutable ret = "\n";
foreach(m; msg)
{
// write message to stderr
console(m);
}
console(ret);
}
bool printCycle(ModuleInfo *current, ModuleInfo *target, bool orig = true)
{
if(reachable[current.index])
// already visited
return false;
if(current is target)
// found path
return true;
reachable[current.index] = 1;
if(!orig && (flags[current.index] & (MIctor | MIdtor)) && !(flags[current.index] & MIstandalone))
// don't go through modules with ctors/dtors that aren't
// standalone.
return false;
// search connections from current to see if we can get to target
foreach(m; current.importedModules)
{
if(printCycle(m, target, false))
{
// found the path, print this module
if(orig)
println("imported from ", current.name, " containing module ctor/dtor");
else
println(" imported from (", current.name, ")");
return true;
}
}
return false;
}
// This function will determine the order of construction/destruction and
// check for cycles.
bool _checkModCtors2(ModuleInfo *current)
{
// we only get called if current has a dtor or a ctor, so no need to
// check that. First, determine what non-trivial elements are
// reachable.
reachable[] = 0;
auto nmodules = _findDependencies(current);
// allocate the dependencies on the stack
ModuleInfo **p = cast(ModuleInfo **)alloca(nmodules * (ModuleInfo*).sizeof);
auto dependencies = p[0..nmodules];
uint depidx = 0;
// fill in the dependencies
foreach(i, r; reachable)
{
if(r)
{
ModuleInfo *m = _moduleinfo_array[i];
if(m !is current && (flags[i] & (MIctor | MIdtor)) && !(flags[i] & MIstandalone))
{
dependencies[depidx++] = m;
}
}
}
assert(depidx == nmodules);
// ok, now perform cycle detection
auto curidx = current.index;
flags[curidx] |= MIctorstart;
bool valid = true;
foreach(m; dependencies)
{
auto mflags = flags[m.index];
if(mflags & MIctorstart)
{
// found a cycle, but we don't care if the MIstandalone flag is
// set, this is a guarantee that there are no cycles in this
// module (not sure what triggers it)
println("Cyclic dependency in module ", m.name);
cycleModule = m;
valid = false;
// use the currently allocated dtor path to record the loop
// that contains module ctors/dtors only.
dtoridx = dtors.length;
}
else if(!(mflags & MIctordone))
{
valid = _checkModCtors2(m);
}
if(!valid)
{
// cycle detected, now, we must print in reverse order the
// module include cycle. For this, we need to traverse the
// graph of trivial modules again, this time printing them.
reachable[] = 0;
printCycle(current, m);
// record this as a module that was used in the loop.
dtors[--dtoridx] = current;
if(current is cycleModule)
{
// print the cycle
println("Cycle detected between modules with ctors/dtors:");
foreach(cm; dtors[dtoridx..$])
{
console(cm.name)(" -> ");
}
println(cycleModule.name);
throw new Exception("Aborting!");
}
return false;
}
}
flags[curidx] = (flags[curidx] & ~MIctorstart) | MIctordone;
// add this module to the construction order list
dtors[dtoridx++] = current;
return true;
}
void _checkModCtors3()
{
foreach(m; _moduleinfo_array)
{
// TODO: Should null ModuleInfo be allowed?
if (m is null) continue;
auto flag = flags[m.index];
if((flag & (MIctor | MIdtor)) && !(flag & MIctordone))
{
if(flag & MIstandalone)
{
// no need to run a check on this one, but we do need to call its ctor/dtor
dtors[dtoridx++] = m;
}
else
_checkModCtors2(m);
}
}
}
// ok, now we need to assign indexes, and also initialize the flags
foreach(uint i, m; _moduleinfo_array)
{
// TODO: Should null ModuleInfo be allowed?
if (m is null) continue;
m.index = i;
ubyte flag = m.flags & MIstandalone;
if(m.dtor)
flag |= MIdtor;
if(m.ctor)
flag |= MIctor;
flags[i] = flag;
}
// everything's all set up for shared ctors
_checkModCtors3();
// store the number of dtors/ctors
_moduleinfo_dtors_i = dtoridx;
// set up everything for tls ctors
dtors = _moduleinfo_tlsdtors = new ModuleInfo*[_moduleinfo_array.length];
dtoridx = 0;
foreach(i, m; _moduleinfo_array)
{
// TODO: Should null ModuleInfo be allowed?
if (m is null) continue;
ubyte flag = m.flags & MIstandalone;
if(m.tlsdtor)
flag |= MIdtor;
if(m.tlsctor)
flag |= MIctor;
flags[i] = flag;
}
// ok, run it
_checkModCtors3();
// store the number of dtors/ctors
_moduleinfo_tlsdtors_i = dtoridx;
}
/********************************************
* Run static constructors for thread local global data.
*/
extern (C) void _moduleTlsCtor()
{
// call the module constructors in the correct order as determined by the
// check routine.
foreach(i; 0.._moduleinfo_tlsdtors_i)
{
ModuleInfo *mi = _moduleinfo_tlsdtors[i];
if(mi.tlsctor)
(*mi.tlsctor)();
}
}
/**
* Destruct the modules.
*/
// Starting the name with "_STD" means under Posix a pointer to the
// function gets put in the .dtors segment.
extern (C) void _moduleDtor()
{
debug(PRINTF) printf("_moduleDtor(): %d modules\n", _moduleinfo_dtors_i);
// NOTE: _moduleTlsDtor is now called manually by dmain2
//_moduleTlsDtor();
for (auto i = _moduleinfo_dtors_i; i-- != 0;)
{
ModuleInfo* m = _moduleinfo_dtors[i];
debug(PRINTF) printf("\tmodule[%d] = '%.*s', x%x\n", i, m.name.length, m.name.ptr, m);
if (m.dtor)
{
(*m.dtor)();
}
}
debug(PRINTF) printf("_moduleDtor() done\n");
}
extern (C) void _moduleTlsDtor()
{
debug(PRINTF) printf("_moduleTlsDtor(): %d modules\n", _moduleinfo_tlsdtors_i);
version(none)
{
printf("_moduleinfo_tlsdtors = %d,%p\n", _moduleinfo_tlsdtors);
foreach (i,m; _moduleinfo_tlsdtors[0..11])
printf("[%d] = %p\n", i, m);
}
for (auto i = _moduleinfo_tlsdtors_i; i-- != 0;)
{
ModuleInfo* m = _moduleinfo_tlsdtors[i];
debug(PRINTF) printf("\tmodule[%d] = '%.*s', x%x\n", i, m.name.length, m.name.ptr, m);
if (m.tlsdtor)
{
(*m.tlsdtor)();
}
}
debug(PRINTF) printf("_moduleTlsDtor() done\n");
}
// Alias the TLS ctor and dtor using "rt_" prefixes, since these routines
// must be called by core.thread.
extern (C) void rt_moduleTlsCtor()
{
_moduleTlsCtor();
}
extern (C) void rt_moduleTlsDtor()
{
_moduleTlsDtor();
}
///////////////////////////////////////////////////////////////////////////////
// Monitor
///////////////////////////////////////////////////////////////////////////////
alias Object.Monitor IMonitor;
alias void delegate(Object) DEvent;
// NOTE: The dtor callback feature is only supported for monitors that are not
// supplied by the user. The assumption is that any object with a user-
// supplied monitor may have special storage or lifetime requirements and
// that as a result, storing references to local objects within Monitor
// may not be safe or desirable. Thus, devt is only valid if impl is
// null.
struct Monitor
{
IMonitor impl;
/* internal */
DEvent[] devt;
size_t refs;
/* stuff */
}
Monitor* getMonitor(Object h)
{
return cast(Monitor*) h.__monitor;
}
void setMonitor(Object h, Monitor* m)
{
h.__monitor = m;
}
void setSameMutex(shared Object ownee, shared Object owner)
in
{
assert(ownee.__monitor is null);
}
body
{
auto m = cast(shared(Monitor)*) owner.__monitor;
if (m is null)
{
_d_monitor_create(cast(Object) owner);
m = cast(shared(Monitor)*) owner.__monitor;
}
auto i = m.impl;
if (i is null)
{
atomicOp!("+=")(m.refs, cast(size_t)1);
ownee.__monitor = owner.__monitor;
return;
}
// If m.impl is set (ie. if this is a user-created monitor), assume
// the monitor is garbage collected and simply copy the reference.
ownee.__monitor = owner.__monitor;
}
extern (C) void _d_monitor_create(Object);
extern (C) void _d_monitor_destroy(Object);
extern (C) void _d_monitor_lock(Object);
extern (C) int _d_monitor_unlock(Object);
extern (C) void _d_monitordelete(Object h, bool det)
{
// det is true when the object is being destroyed deterministically (ie.
// when it is explicitly deleted or is a scope object whose time is up).
Monitor* m = getMonitor(h);
if (m !is null)
{
IMonitor i = m.impl;
if (i is null)
{
auto s = cast(shared(Monitor)*) m;
if(!atomicOp!("-=")(s.refs, cast(size_t) 1))
{
_d_monitor_devt(m, h);
_d_monitor_destroy(h);
setMonitor(h, null);
}
return;
}
// NOTE: Since a monitor can be shared via setSameMutex it isn't safe
// to explicitly delete user-created monitors--there's no
// refcount and it may have multiple owners.
/+
if (det && (cast(void*) i) !is (cast(void*) h))
delete i;
+/
setMonitor(h, null);
}
}
extern (C) void _d_monitorenter(Object h)
{
Monitor* m = getMonitor(h);
if (m is null)
{
_d_monitor_create(h);
m = getMonitor(h);
}
IMonitor i = m.impl;
if (i is null)
{
_d_monitor_lock(h);
return;
}
i.lock();
}
extern (C) void _d_monitorexit(Object h)
{
Monitor* m = getMonitor(h);
IMonitor i = m.impl;
if (i is null)
{
_d_monitor_unlock(h);
return;
}
i.unlock();
}
extern (C) void _d_monitor_devt(Monitor* m, Object h)
{
if (m.devt.length)
{
DEvent[] devt;
synchronized (h)
{
devt = m.devt;
m.devt = null;
}
foreach (v; devt)
{
if (v)
v(h);
}
free(devt.ptr);
}
}
extern (C) void rt_attachDisposeEvent(Object h, DEvent e)
{
synchronized (h)
{
Monitor* m = getMonitor(h);
assert(m.impl is null);
foreach (ref v; m.devt)
{
if (v is null || v == e)
{
v = e;
return;
}
}
auto len = m.devt.length + 4; // grow by 4 elements
auto pos = m.devt.length; // insert position
auto p = realloc(m.devt.ptr, DEvent.sizeof * len);
if (!p)
onOutOfMemoryError();
m.devt = (cast(DEvent*)p)[0 .. len];
m.devt[pos+1 .. len] = null;
m.devt[pos] = e;
}
}
extern (C) void rt_detachDisposeEvent(Object h, DEvent e)
{
synchronized (h)
{
Monitor* m = getMonitor(h);
assert(m.impl is null);
foreach (p, v; m.devt)
{
if (v == e)
{
memmove(&m.devt[p],
&m.devt[p+1],
(m.devt.length - p - 1) * DEvent.sizeof);
m.devt[$ - 1] = null;
return;
}
}
}
}
extern (C)
{
// from druntime/src/compiler/dmd/aaA.d
size_t _aaLen(void* p);
void* _aaGet(void** pp, TypeInfo keyti, size_t valuesize, ...);
void* _aaGetRvalue(void* p, TypeInfo keyti, size_t valuesize, ...);
void* _aaIn(void* p, TypeInfo keyti);
void _aaDel(void* p, TypeInfo keyti, ...);
void[] _aaValues(void* p, size_t keysize, size_t valuesize);
void[] _aaKeys(void* p, size_t keysize);
void* _aaRehash(void** pp, TypeInfo keyti);
extern (D) typedef scope int delegate(void *) _dg_t;
int _aaApply(void* aa, size_t keysize, _dg_t dg);
extern (D) typedef scope int delegate(void *, void *) _dg2_t;
int _aaApply2(void* aa, size_t keysize, _dg2_t dg);
void* _d_assocarrayliteralT(TypeInfo_AssociativeArray ti, size_t length, ...);
}
struct AssociativeArray(Key, Value)
{
void* p;
size_t length() @property { return _aaLen(p); }
Value[Key] rehash() @property
{
auto p = _aaRehash(&p, typeid(Value[Key]));
return *cast(Value[Key]*)(&p);
}
Value[] values() @property
{
auto a = _aaValues(p, Key.sizeof, Value.sizeof);
return *cast(Value[]*) &a;
}
Key[] keys() @property
{
auto a = _aaKeys(p, Key.sizeof);
return *cast(Key[]*) &a;
}
int opApply(scope int delegate(ref Key, ref Value) dg)
{
return _aaApply2(p, Key.sizeof, cast(_dg2_t)dg);
}
int opApply(scope int delegate(ref Value) dg)
{
return _aaApply(p, Key.sizeof, cast(_dg_t)dg);
}
int delegate(int delegate(ref Key) dg) byKey()
{
// Discard the Value part and just do the Key
int foo(int delegate(ref Key) dg)
{
int byKeydg(ref Key key, ref Value value)
{
return dg(key);
}
return _aaApply2(p, Key.sizeof, cast(_dg2_t)&byKeydg);
}
return &foo;
}
int delegate(int delegate(ref Value) dg) byValue()
{
return &opApply;
}
Value get(Key key, lazy Value defaultValue)
{
auto p = key in *cast(Value[Key]*)(&p);
return p ? *p : defaultValue;
}
static if (is(typeof({ Value[Key] r; r[Key.init] = Value.init; }())))
@property Value[Key] dup()
{
Value[Key] result;
foreach (k, v; this)
{
result[k] = v;
}
return result;
}
}
unittest
{
auto a = [ 1:"one", 2:"two", 3:"three" ];
auto b = a.dup;
assert(b == [ 1:"one", 2:"two", 3:"three" ]);
}
unittest
{
// test for bug 5925
const a = [4:0];
const b = [4:0];
assert(a == b);
}
void clear(T)(T obj) if (is(T == class))
{
rt_finalize(cast(void*)obj);
}
version(unittest) unittest
{
{
class A { string s = "A"; this() {} }
auto a = new A;
a.s = "asd";
clear(a);
assert(a.s == "A");
}
{
static bool destroyed = false;
class B
{
string s = "B";
this() {}
~this()
{
destroyed = true;
}
}
auto a = new B;
a.s = "asd";
clear(a);
assert(destroyed);
assert(a.s == "B");
}
// this test is invalid now that the default ctor is not run after clearing
version(none)
{
class C
{
string s;
this()
{
s = "C";
}
}
auto a = new C;
a.s = "asd";
clear(a);
assert(a.s == "C");
}
}
void clear(T)(ref T obj) if (is(T == struct))
{
static if (is(typeof(obj.__dtor())))
{
obj.__dtor();
}
auto buf = (cast(ubyte*) &obj)[0 .. T.sizeof];
auto init = cast(ubyte[])typeid(T).init();
if(init.ptr is null) // null ptr means initialize to 0s
buf[] = 0;
else
buf[] = init[];
}
version(unittest) unittest
{
{
struct A { string s = "A"; }
A a;
a.s = "asd";
clear(a);
assert(a.s == "A");
}
{
static bool destroyed = false;
struct B
{
string s = "B";
~this()
{
destroyed = true;
}
}
B a;
a.s = "asd";
clear(a);
assert(destroyed);
assert(a.s == "B");
}
}
void clear(T : U[n], U, size_t n)(ref T obj)
{
obj = T.init;
}
version(unittest) unittest
{
int[2] a;
a[0] = 1;
a[1] = 2;
clear(a);
assert(a == [ 0, 0 ]);
}
void clear(T)(ref T obj)
if (!is(T == struct) && !is(T == class) && !_isStaticArray!T)
{
obj = T.init;
}
template _isStaticArray(T : U[N], U, size_t N)
{
enum bool _isStaticArray = true;
}
template _isStaticArray(T)
{
enum bool _isStaticArray = false;
}
version(unittest) unittest
{
{
int a = 42;
clear(a);
assert(a == 0);
}
{
float a = 42;
clear(a);
assert(isnan(a));
}
}
version (unittest)
{
bool isnan(float x)
{
return x != x;
}
}
/**
* (Property) Get the current capacity of an array. The capacity is the number
* of elements that the array can grow to before the array must be
* extended/reallocated.
*/
@property size_t capacity(T)(T[] arr)
{
return _d_arraysetcapacity(typeid(T[]), 0, cast(void *)&arr);
}
/**
* Try to reserve capacity for an array. The capacity is the number of
* elements that the array can grow to before the array must be
* extended/reallocated.
*
* The return value is the new capacity of the array (which may be larger than
* the requested capacity).
*/
size_t reserve(T)(ref T[] arr, size_t newcapacity)
{
return _d_arraysetcapacity(typeid(T[]), newcapacity, cast(void *)&arr);
}
/**
* Assume that it is safe to append to this array. Appends made to this array
* after calling this function may append in place, even if the array was a
* slice of a larger array to begin with.
*
* Use this only when you are sure no elements are in use beyond the array in
* the memory block. If there are, those elements could be overwritten by
* appending to this array.
*
* Calling this function, and then using references to data located after the
* given array results in undefined behavior.
*/
void assumeSafeAppend(T)(T[] arr)
{
_d_arrayshrinkfit(typeid(T[]), *(cast(void[]*)&arr));
}
version (unittest) unittest
{
{
int[] arr;
auto newcap = arr.reserve(2000);
assert(newcap >= 2000);
assert(newcap == arr.capacity);
auto ptr = arr.ptr;
foreach(i; 0..2000)
arr ~= i;
assert(ptr == arr.ptr);
arr = arr[0..1];
arr.assumeSafeAppend();
arr ~= 5;
assert(ptr == arr.ptr);
}
}
version (none)
{
// enforce() copied from Phobos std.contracts for clear(), left out until
// we decide whether to use it.
T _enforce(T, string file = __FILE__, int line = __LINE__)
(T value, lazy const(char)[] msg = null)
{
if (!value) bailOut(file, line, msg);
return value;
}
T _enforce(T, string file = __FILE__, int line = __LINE__)
(T value, scope void delegate() dg)
{
if (!value) dg();
return value;
}
T _enforce(T)(T value, lazy Exception ex)
{
if (!value) throw ex();
return value;
}
private void _bailOut(string file, int line, in char[] msg)
{
char[21] buf;
throw new Exception(cast(string)(file ~ "(" ~ ulongToString(buf[], line) ~ "): " ~ (msg ? msg : "Enforcement failed")));
}
}
/***************************************
* Helper function used to see if two containers of different
* types have the same contents in the same sequence.
*/
bool _ArrayEq(T1, T2)(T1[] a1, T2[] a2)
{
if (a1.length != a2.length)
return false;
foreach(i, a; a1)
{
if (a != a2[i])
return false;
}
return true;
}
|
D
|
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 3.0.0
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
module vtkPointSetToLabelHierarchy;
static import vtkd_im;
static import core.stdc.config;
static import std.conv;
static import std.string;
static import std.conv;
static import std.string;
static import vtkObjectBase;
static import vtkTextProperty;
static import vtkLabelHierarchyAlgorithm;
class vtkPointSetToLabelHierarchy : vtkLabelHierarchyAlgorithm.vtkLabelHierarchyAlgorithm {
private void* swigCPtr;
public this(void* cObject, bool ownCObject) {
super(vtkd_im.vtkPointSetToLabelHierarchy_Upcast(cObject), ownCObject);
swigCPtr = cObject;
}
public static void* swigGetCPtr(vtkPointSetToLabelHierarchy obj) {
return (obj is null) ? null : obj.swigCPtr;
}
mixin vtkd_im.SwigOperatorDefinitions;
public override void dispose() {
synchronized(this) {
if (swigCPtr !is null) {
if (swigCMemOwn) {
swigCMemOwn = false;
throw new object.Exception("C++ destructor does not have public access");
}
swigCPtr = null;
super.dispose();
}
}
}
public static vtkPointSetToLabelHierarchy New() {
void* cPtr = vtkd_im.vtkPointSetToLabelHierarchy_New();
vtkPointSetToLabelHierarchy ret = (cPtr is null) ? null : new vtkPointSetToLabelHierarchy(cPtr, false);
return ret;
}
public static int IsTypeOf(string type) {
auto ret = vtkd_im.vtkPointSetToLabelHierarchy_IsTypeOf((type ? std.string.toStringz(type) : null));
return ret;
}
public static vtkPointSetToLabelHierarchy SafeDownCast(vtkObjectBase.vtkObjectBase o) {
void* cPtr = vtkd_im.vtkPointSetToLabelHierarchy_SafeDownCast(vtkObjectBase.vtkObjectBase.swigGetCPtr(o));
vtkPointSetToLabelHierarchy ret = (cPtr is null) ? null : new vtkPointSetToLabelHierarchy(cPtr, false);
return ret;
}
public vtkPointSetToLabelHierarchy NewInstance() const {
void* cPtr = vtkd_im.vtkPointSetToLabelHierarchy_NewInstance(cast(void*)swigCPtr);
vtkPointSetToLabelHierarchy ret = (cPtr is null) ? null : new vtkPointSetToLabelHierarchy(cPtr, false);
return ret;
}
alias vtkLabelHierarchyAlgorithm.vtkLabelHierarchyAlgorithm.NewInstance NewInstance;
public void SetTargetLabelCount(int _arg) {
vtkd_im.vtkPointSetToLabelHierarchy_SetTargetLabelCount(cast(void*)swigCPtr, _arg);
}
public int GetTargetLabelCount() {
auto ret = vtkd_im.vtkPointSetToLabelHierarchy_GetTargetLabelCount(cast(void*)swigCPtr);
return ret;
}
public void SetMaximumDepth(int _arg) {
vtkd_im.vtkPointSetToLabelHierarchy_SetMaximumDepth(cast(void*)swigCPtr, _arg);
}
public int GetMaximumDepth() {
auto ret = vtkd_im.vtkPointSetToLabelHierarchy_GetMaximumDepth(cast(void*)swigCPtr);
return ret;
}
public void SetUseUnicodeStrings(bool _arg) {
vtkd_im.vtkPointSetToLabelHierarchy_SetUseUnicodeStrings(cast(void*)swigCPtr, _arg);
}
public bool GetUseUnicodeStrings() {
bool ret = vtkd_im.vtkPointSetToLabelHierarchy_GetUseUnicodeStrings(cast(void*)swigCPtr) ? true : false;
return ret;
}
public void UseUnicodeStringsOn() {
vtkd_im.vtkPointSetToLabelHierarchy_UseUnicodeStringsOn(cast(void*)swigCPtr);
}
public void UseUnicodeStringsOff() {
vtkd_im.vtkPointSetToLabelHierarchy_UseUnicodeStringsOff(cast(void*)swigCPtr);
}
public void SetLabelArrayName(string name) {
vtkd_im.vtkPointSetToLabelHierarchy_SetLabelArrayName(cast(void*)swigCPtr, (name ? std.string.toStringz(name) : null));
}
public string GetLabelArrayName() {
string ret = std.conv.to!string(vtkd_im.vtkPointSetToLabelHierarchy_GetLabelArrayName(cast(void*)swigCPtr));
return ret;
}
public void SetSizeArrayName(string name) {
vtkd_im.vtkPointSetToLabelHierarchy_SetSizeArrayName(cast(void*)swigCPtr, (name ? std.string.toStringz(name) : null));
}
public string GetSizeArrayName() {
string ret = std.conv.to!string(vtkd_im.vtkPointSetToLabelHierarchy_GetSizeArrayName(cast(void*)swigCPtr));
return ret;
}
public void SetPriorityArrayName(string name) {
vtkd_im.vtkPointSetToLabelHierarchy_SetPriorityArrayName(cast(void*)swigCPtr, (name ? std.string.toStringz(name) : null));
}
public string GetPriorityArrayName() {
string ret = std.conv.to!string(vtkd_im.vtkPointSetToLabelHierarchy_GetPriorityArrayName(cast(void*)swigCPtr));
return ret;
}
public void SetIconIndexArrayName(string name) {
vtkd_im.vtkPointSetToLabelHierarchy_SetIconIndexArrayName(cast(void*)swigCPtr, (name ? std.string.toStringz(name) : null));
}
public string GetIconIndexArrayName() {
string ret = std.conv.to!string(vtkd_im.vtkPointSetToLabelHierarchy_GetIconIndexArrayName(cast(void*)swigCPtr));
return ret;
}
public void SetOrientationArrayName(string name) {
vtkd_im.vtkPointSetToLabelHierarchy_SetOrientationArrayName(cast(void*)swigCPtr, (name ? std.string.toStringz(name) : null));
}
public string GetOrientationArrayName() {
string ret = std.conv.to!string(vtkd_im.vtkPointSetToLabelHierarchy_GetOrientationArrayName(cast(void*)swigCPtr));
return ret;
}
public void SetBoundedSizeArrayName(string name) {
vtkd_im.vtkPointSetToLabelHierarchy_SetBoundedSizeArrayName(cast(void*)swigCPtr, (name ? std.string.toStringz(name) : null));
}
public string GetBoundedSizeArrayName() {
string ret = std.conv.to!string(vtkd_im.vtkPointSetToLabelHierarchy_GetBoundedSizeArrayName(cast(void*)swigCPtr));
return ret;
}
public void SetTextProperty(vtkTextProperty.vtkTextProperty tprop) {
vtkd_im.vtkPointSetToLabelHierarchy_SetTextProperty(cast(void*)swigCPtr, vtkTextProperty.vtkTextProperty.swigGetCPtr(tprop));
}
public vtkTextProperty.vtkTextProperty GetTextProperty() {
void* cPtr = vtkd_im.vtkPointSetToLabelHierarchy_GetTextProperty(cast(void*)swigCPtr);
vtkTextProperty.vtkTextProperty ret = (cPtr is null) ? null : new vtkTextProperty.vtkTextProperty(cPtr, false);
return ret;
}
}
|
D
|
module til.nodes.string;
import til.nodes;
debug
{
import std.stdio;
}
// A string without substitutions:
class String : ListItem
{
string repr;
this(string s)
{
this.repr = s;
this.type = ObjectType.String;
}
// Conversions:
override string toString()
{
return this.repr;
}
// Operators:
override ListItem operate(string operator, ListItem rhs, bool reversed)
{
if (reversed) return null;
if (rhs.type != ObjectType.String) return null;
/*
Remember: we are receiving and
already-evaluated value, so
it can only be a "simple"
String.
*/
auto t2 = cast(String)rhs;
return new BooleanAtom(this.repr == t2.repr);
}
//
override CommandContext evaluate(CommandContext context)
{
context.push(this);
return context;
}
template opCast(T : string)
{
string opCast()
{
return this.repr;
}
}
template opUnary(string operator)
{
override ListItem opUnary()
{
string newRepr;
string repr = to!string(this);
if (repr[0] == '-')
{
newRepr = repr[1..$];
}
else
{
newRepr = "-" ~ repr;
}
return new String(newRepr);
}
}
// -----------------------------
override ListItem extract(Items arguments)
{
if (arguments.length == 0) return this;
auto firstArgument = arguments[0];
if (firstArgument.type == ObjectType.Integer)
{
if (arguments.length == 2 && arguments[1].type == ObjectType.Integer)
{
auto idx1 = firstArgument.toInt;
auto idx2 = arguments[1].toInt;
return new String(this.repr[idx1..idx2]);
}
else if (arguments.length == 1)
{
auto idx = firstArgument.toInt;
return new String(this.repr[idx..idx+1]);
}
}
throw new Exception("not implemented");
}
}
class SubstString : String
{
string[] parts;
this(string[] parts)
{
super("");
this.parts = parts;
this.type = ObjectType.String;
}
// Operators:
override string toString()
{
return to!string(this.parts
.map!(x => to!string(x))
.joiner(""));
}
override CommandContext evaluate(CommandContext context)
{
string result;
string value;
debug {stderr.writeln("SubstString.evaluate: ", parts);}
foreach(part;parts)
{
if (part[0] != '$')
{
result ~= part;
}
else
{
auto key = part[1..$];
debug {
stderr.writeln(" key: ", key);
stderr.writeln(" escopo: ", context.escopo);
}
Items values = context.escopo[key];
if (values is null)
{
result ~= "<?" ~ key ~ "?>";
}
else
{
result ~= to!string(values
.map!(x => to!string(x))
.joiner(" "));
}
}
}
context.push(new String(result));
context.exitCode = ExitCode.Proceed;
return context;
}
}
|
D
|
test/ex4_3_5.ml: Miniml OUnit TypingTestGenerator
|
D
|
/Users/devmenon/Desktop/rust projects/rust-cli-spotify/target/debug/deps/cfg_if-0116836400fb5b1a.rmeta: /Users/devmenon/.cargo/registry/src/github.com-1ecc6299db9ec823/cfg-if-0.1.10/src/lib.rs
/Users/devmenon/Desktop/rust projects/rust-cli-spotify/target/debug/deps/libcfg_if-0116836400fb5b1a.rlib: /Users/devmenon/.cargo/registry/src/github.com-1ecc6299db9ec823/cfg-if-0.1.10/src/lib.rs
/Users/devmenon/Desktop/rust projects/rust-cli-spotify/target/debug/deps/cfg_if-0116836400fb5b1a.d: /Users/devmenon/.cargo/registry/src/github.com-1ecc6299db9ec823/cfg-if-0.1.10/src/lib.rs
/Users/devmenon/.cargo/registry/src/github.com-1ecc6299db9ec823/cfg-if-0.1.10/src/lib.rs:
|
D
|
func int C_AllCanyonRazorDead()
{
if((GregIsBack == TRUE) && Npc_IsDead(CanyonRazor01) && Npc_IsDead(CanyonRazor02) && Npc_IsDead(CanyonRazor03) && Npc_IsDead(CanyonRazor04) && Npc_IsDead(CanyonRazor05) && Npc_IsDead(CanyonRazor06) && Npc_IsDead(CanyonRazor07) && Npc_IsDead(CanyonRazor08) && Npc_IsDead(CanyonRazor09) && Npc_IsDead(CanyonRazor10))
{
return TRUE;
};
return FALSE;
};
func int C_IAmCanyonRazor(var C_Npc slf)
{
var C_Npc raz01;
var C_Npc raz02;
var C_Npc raz03;
var C_Npc raz04;
var C_Npc raz05;
var C_Npc raz06;
var C_Npc raz07;
var C_Npc raz08;
var C_Npc raz09;
var C_Npc raz10;
raz01 = Hlp_GetNpc(CanyonRazor01);
raz02 = Hlp_GetNpc(CanyonRazor02);
raz03 = Hlp_GetNpc(CanyonRazor03);
raz04 = Hlp_GetNpc(CanyonRazor04);
raz05 = Hlp_GetNpc(CanyonRazor05);
raz06 = Hlp_GetNpc(CanyonRazor06);
raz07 = Hlp_GetNpc(CanyonRazor07);
raz08 = Hlp_GetNpc(CanyonRazor08);
raz09 = Hlp_GetNpc(CanyonRazor09);
raz10 = Hlp_GetNpc(CanyonRazor10);
if((Hlp_GetInstanceID(slf) == Hlp_GetInstanceID(raz01)) || (Hlp_GetInstanceID(slf) == Hlp_GetInstanceID(raz02)) || (Hlp_GetInstanceID(slf) == Hlp_GetInstanceID(raz03)) || (Hlp_GetInstanceID(slf) == Hlp_GetInstanceID(raz04)) || (Hlp_GetInstanceID(slf) == Hlp_GetInstanceID(raz05)) || (Hlp_GetInstanceID(slf) == Hlp_GetInstanceID(raz06)) || (Hlp_GetInstanceID(slf) == Hlp_GetInstanceID(raz07)) || (Hlp_GetInstanceID(slf) == Hlp_GetInstanceID(raz08)) || (Hlp_GetInstanceID(slf) == Hlp_GetInstanceID(raz09)) || (Hlp_GetInstanceID(slf) == Hlp_GetInstanceID(raz10)))
{
return TRUE;
};
return FALSE;
};
func void B_CountCanyonRazor()
{
var string CanyonRazorText;
if(CanyonRazorBodyCount == 0)
{
AI_Print("С бритвозубами покончено!!!");
}
else
{
PRINTRAZORCOUNT = TRUE;
CanyonRazorText = ConcatStrings("Осталось ",b_formnumberstring(10 - CanyonRazorBodyCount));
PRINTRAZORCOUNT = FALSE;
AI_Print(CanyonRazorText);
};
};
|
D
|
module hunt.quartz;
public import hunt.quartz.Annotations;
public import hunt.quartz.CronExpression;
public import hunt.quartz.CronScheduleBuilder;
public import hunt.quartz.Exceptions;
public import hunt.quartz.ListenerManager;
public import hunt.quartz.Job;
public import hunt.quartz.JobBuilder;
public import hunt.quartz.JobDataMap;
public import hunt.quartz.JobDetail;
public import hunt.quartz.JobExecutionContext;
public import hunt.quartz.JobListener;
public import hunt.quartz.JobKey;
public import hunt.quartz.Scheduler;
public import hunt.quartz.SchedulerFactory;
public import hunt.quartz.SimpleScheduleBuilder;
public import hunt.quartz.StatefulJob;
public import hunt.quartz.Trigger;
public import hunt.quartz.TriggerBuilder;
public import hunt.quartz.TriggerKey;
public import hunt.quartz.dbstore;
public import hunt.quartz.impl;
public import hunt.quartz.simpl;
|
D
|
module dagon.resource.iqm;
import std.stdio;
import std.math;
import std.string;
import std.path;
import dlib.core.memory;
import dlib.core.stream;
import dlib.container.array;
import dlib.container.dict;
import dlib.filesystem.filesystem;
import dlib.math.vector;
import dlib.math.matrix;
import dlib.math.quaternion;
import dlib.math.interpolation;
import dagon.graphics.animmodel;
import dagon.graphics.texture;
import dagon.resource.asset;
import dagon.resource.serialization;
import dagon.resource.textureasset;
enum IQM_VERSION = 2;
struct IQMHeader
{
ubyte[16] magic;
uint ver;
uint filesize;
uint flags;
uint numText, ofsText;
uint numMeshes, ofsMeshes;
uint numVertexArrays, numVertices, ofsVertexArrays;
uint numTriangles, ofsTriangles, ofsAdjacency;
uint numJoints, ofsJoints;
uint numPoses, ofsPoses;
uint numAnims, ofsAnims;
uint numFrames, numFrameChannels, ofsFrames, ofsBounds;
uint numComment, ofsComment;
uint numExtensions, ofsExtensions;
}
struct IQMVertexArray
{
uint type;
uint flags;
uint format;
uint size;
uint offset;
}
alias uint[3] IQMTriangle;
struct IQMJoint
{
uint name;
int parent;
Vector3f translation;
Quaternionf rotation;
Vector3f scaling;
}
struct IQMMesh
{
uint name;
uint material;
uint firstVertex, numVertices;
uint firstTriangle, numTriangles;
}
alias ubyte[4] IQMBlendIndex;
alias ubyte[4] IQMBlendWeight;
enum
{
IQM_POSITION = 0,
IQM_TEXCOORD = 1,
IQM_NORMAL = 2,
IQM_TANGENT = 3,
IQM_BLENDINDEXES = 4,
IQM_BLENDWEIGHTS = 5,
IQM_COLOR = 6,
IQM_CUSTOM = 0x10
}
struct IQMPose
{
int parent;
uint mask;
float[10] channelOffset;
float[10] channelScale;
}
struct IQMAnim
{
uint name;
uint firstFrame;
uint numFrames;
float framerate;
uint flags;
}
//version = IQMDebug;
class IQMModel: AnimatedModel
{
DynamicArray!Vector3f vertices;
DynamicArray!Vector3f normals;
DynamicArray!Vector2f texcoords;
// TODO: tangents
DynamicArray!IQMBlendIndex blendIndices;
DynamicArray!IQMBlendWeight blendWeights;
IQMTriangle[] tris;
IQMVertexArray[] vas;
IQMMesh[] meshes;
AnimationFacegroup[] facegroups;
DynamicArray!IQMJoint joints;
Matrix4x4f[] baseFrame;
Matrix4x4f[] invBaseFrame;
Matrix4x4f[] frames;
uint numFrames;
ubyte[] textBuffer;
//Material[uint] material;
Dict!(IQMAnim, string) animations;
this(InputStream istrm, ReadOnlyFileSystem rofs, AssetManager mngr)
{
load(istrm, rofs, mngr);
}
~this()
{
release();
}
void release()
{
vertices.free();
normals.free();
texcoords.free();
blendIndices.free();
blendWeights.free();
if (tris.length) Delete(tris);
if (vas.length) Delete(vas);
if (meshes.length) Delete(meshes);
joints.free();
if (baseFrame.length) Delete(baseFrame);
if (invBaseFrame.length) Delete(invBaseFrame);
if (frames.length) Delete(frames);
if (textBuffer.length) Delete(textBuffer);
if (animations) Delete(animations);
if (facegroups) Delete(facegroups);
}
void load(InputStream istrm, ReadOnlyFileSystem rofs, AssetManager mngr)
{
// Header part
IQMHeader hdr = istrm.read!(IQMHeader, true);
version(IQMDebug)
{
writefln("hdr.magic: %s", cast(string)hdr.magic);
writefln("hdr.ver: %s", hdr.ver);
}
assert(cast(string)hdr.magic == "INTERQUAKEMODEL\0");
assert(hdr.ver == IQM_VERSION);
version(IQMDebug)
{
writefln("hdr.numText: %s", hdr.numText);
writefln("hdr.ofsText: %s", hdr.ofsText);
}
istrm.setPosition(hdr.ofsText);
textBuffer = New!(ubyte[])(hdr.numText);
istrm.fillArray(textBuffer);
version(IQMDebug)
writefln("text:\n%s", cast(string)textBuffer);
// FIXME:
//Delete(buf);
// Vertex data part
version(IQMDebug)
{
writefln("hdr.numVertexArrays: %s", hdr.numVertexArrays);
writefln("hdr.ofsVertexArrays: %s", hdr.ofsVertexArrays);
}
vas = New!(IQMVertexArray[])(hdr.numVertexArrays);
istrm.setPosition(hdr.ofsVertexArrays);
foreach(i; 0..hdr.numVertexArrays)
{
vas[i] = istrm.read!(IQMVertexArray, true);
}
// FIXME:
//Delete(vas);
foreach(i, va; vas)
{
version(IQMDebug)
{
writefln("Vertex array %s:", i);
writefln("va.type: %s", va.type);
writefln("va.flags: %s", va.flags);
writefln("va.format: %s", va.format);
writefln("va.size: %s", va.size);
writefln("va.offset: %s", va.offset);
writeln("---------------");
}
if (va.type == IQM_POSITION)
{
assert(va.size == 3);
// TODO: format asserion
auto verts = New!(Vector3f[])(hdr.numVertices);
istrm.setPosition(va.offset);
istrm.fillArray(verts);
vertices.append(verts);
Delete(verts);
}
else if (va.type == IQM_NORMAL)
{
assert(va.size == 3);
// TODO: format asserion
auto norms = New!(Vector3f[])(hdr.numVertices);
istrm.setPosition(va.offset);
istrm.fillArray(norms);
normals.append(norms);
Delete(norms);
}
else if (va.type == IQM_TEXCOORD)
{
assert(va.size == 2);
// TODO: format asserion
auto texs = New!(Vector2f[])(hdr.numVertices);
istrm.setPosition(va.offset);
istrm.fillArray(texs);
texcoords.append(texs);
Delete(texs);
}
/* TODO: IQM_TANGENT */
else if (va.type == IQM_BLENDINDEXES)
{
assert(va.size == 4);
// TODO: format asserion
auto bi = New!(IQMBlendIndex[])(hdr.numVertices);
istrm.setPosition(va.offset);
istrm.fillArray(bi);
blendIndices.append(bi);
Delete(bi);
}
else if (va.type == IQM_BLENDWEIGHTS)
{
assert(va.size == 4);
// TODO: format asserion
auto bw = New!(IQMBlendWeight[])(hdr.numVertices);
istrm.setPosition(va.offset);
istrm.fillArray(bw);
blendWeights.append(bw);
Delete(bw);
}
}
version(IQMDebug)
{
writefln("numVertices: %s", vertices.length);
writefln("numNormals: %s", normals.length);
writefln("numTexcoords: %s", texcoords.length);
writefln("hdr.numTriangles: %s", hdr.numTriangles);
writefln("hdr.ofsTriangles: %s", hdr.ofsTriangles);
}
tris = New!(IQMTriangle[])(hdr.numTriangles);
istrm.setPosition(hdr.ofsTriangles);
foreach(i; 0..hdr.numTriangles)
{
tris[i] = istrm.read!IQMTriangle;
uint tmp = tris[i][0];
tris[i][0] = tris[i][2];
tris[i][2] = tmp;
}
version(IQMDebug)
writefln("hdr.ofsAdjacency: %s", hdr.ofsAdjacency);
// Skeleton part
version(IQMDebug)
{
writefln("hdr.numJoints: %s", hdr.numJoints);
writefln("hdr.ofsJoints: %s", hdr.ofsJoints);
}
baseFrame = New!(Matrix4x4f[])(hdr.numJoints);
invBaseFrame = New!(Matrix4x4f[])(hdr.numJoints);
istrm.setPosition(hdr.ofsJoints);
foreach(i; 0..hdr.numJoints)
{
IQMJoint j = istrm.read!(IQMJoint, true);
j.rotation.normalize();
baseFrame[i] = transformationMatrix(j.rotation, j.translation, j.scaling);
invBaseFrame[i] = baseFrame[i].inverse;
if (j.parent >= 0)
{
baseFrame[i] = baseFrame[j.parent] * baseFrame[i];
invBaseFrame[i] = invBaseFrame[i] * invBaseFrame[j.parent];
}
assert(validMatrix(baseFrame[i]));
assert(validMatrix(invBaseFrame[i]));
assert(baseFrame[i].isAffine);
assert(invBaseFrame[i].isAffine);
joints.append(j);
}
// Meshes part
version(IQMDebug)
{
writefln("hdr.numMeshes: %s", hdr.numMeshes);
writefln("hdr.ofsMeshes: %s", hdr.ofsMeshes);
}
meshes = New!(IQMMesh[])(hdr.numMeshes);
facegroups = New!(AnimationFacegroup[])(meshes.length);
istrm.setPosition(hdr.ofsMeshes);
foreach(i; 0..hdr.numMeshes)
{
meshes[i] = istrm.read!(IQMMesh, true);
// Load texture
uint matIndex = meshes[i].material;
version(IQMDebug)
writefln("matIndex: %s", matIndex);
if (matIndex > 0)
{
char* texFilenamePtr = cast(char*)&textBuffer[matIndex];
string texFilename = cast(string)fromStringz(texFilenamePtr);
version(IQMDebug)
writefln("material: %s", texFilename);
facegroups[i].firstTriangle = meshes[i].firstTriangle;
facegroups[i].numTriangles = meshes[i].numTriangles;
facegroups[i].textureName = texFilename;
if (!mngr.assetExists(texFilename))
{
auto texAsset = New!TextureAsset(mngr.imageFactory);
mngr.addAsset(texAsset, texFilename);
texAsset.threadSafePartLoaded = mngr.loadAssetThreadSafePart(texAsset, texFilename);
facegroups[i].texture = texAsset.texture;
}
else
facegroups[i].texture = (cast(TextureAsset)mngr.getAsset(texFilename)).texture;
}
}
// Animation part
// Number of poses should be the same as bindpose joints
version(IQMDebug)
writefln("hdr.numPoses: %s", hdr.numPoses);
assert(hdr.numPoses == hdr.numJoints);
version(IQMDebug)
{
writefln("hdr.numFrames: %s", hdr.numFrames);
writefln("hdr.numFrameChannels: %s", hdr.numFrameChannels);
}
// Read poses
istrm.setPosition(hdr.ofsPoses);
IQMPose[] poses = New!(IQMPose[])(hdr.numPoses);
foreach(i; 0..hdr.numPoses)
{
poses[i] = istrm.read!(IQMPose, true);
}
// Read frames
numFrames = hdr.numFrames;
frames = New!(Matrix4x4f[])(hdr.numFrames * hdr.numPoses);
istrm.setPosition(hdr.ofsFrames);
uint fi = 0;
foreach(i; 0..hdr.numFrames)
foreach(j; 0..hdr.numPoses)
{
auto p = &poses[j];
Vector3f trans, scale;
Quaternionf rot;
trans.x = p.channelOffset[0]; if (p.mask & 0x01) trans.x += istrm.read!(ushort, true) * p.channelScale[0];
trans.y = p.channelOffset[1]; if (p.mask & 0x02) trans.y += istrm.read!(ushort, true) * p.channelScale[1];
trans.z = p.channelOffset[2]; if (p.mask & 0x04) trans.z += istrm.read!(ushort, true) * p.channelScale[2];
rot.x = p.channelOffset[3]; if(p.mask&0x08) rot.x += istrm.read!(ushort, true) * p.channelScale[3];
rot.y = p.channelOffset[4]; if(p.mask&0x10) rot.y += istrm.read!(ushort, true) * p.channelScale[4];
rot.z = p.channelOffset[5]; if(p.mask&0x20) rot.z += istrm.read!(ushort, true) * p.channelScale[5];
rot.w = p.channelOffset[6]; if(p.mask&0x40) rot.w += istrm.read!(ushort, true) * p.channelScale[6];
scale.x = p.channelOffset[7]; if(p.mask&0x80) scale.x += istrm.read!(ushort, true) * p.channelScale[7];
scale.y = p.channelOffset[8]; if(p.mask&0x100) scale.y += istrm.read!(ushort, true) * p.channelScale[8];
scale.z = p.channelOffset[9]; if(p.mask&0x200) scale.z += istrm.read!(ushort, true) * p.channelScale[9];
rot.normalize();
Matrix4x4f m = transformationMatrix(rot, trans, scale);
assert(validMatrix(m));
// Concatenate each pose with the inverse base pose to avoid doing this at animation time.
// If the joint has a parent, then it needs to be pre-concatenated with its parent's base pose.
if (p.parent >= 0)
frames[i * hdr.numPoses + j] =
baseFrame[p.parent] * m * invBaseFrame[j];
else
frames[i * hdr.numPoses + j] = m * invBaseFrame[j];
}
// Read animations
animations = New!(Dict!(IQMAnim, string));
istrm.setPosition(hdr.ofsAnims);
foreach(i; 0..hdr.numAnims)
{
IQMAnim anim = istrm.read!(IQMAnim, true);
char* namePtr = cast(char*)&textBuffer[anim.name];
string name = cast(string)fromStringz(namePtr);
version(IQMDebug)
{
writefln("anim.name: %s", name);
}
animations[name] = anim;
version(IQMDebug)
{
writefln("anim.firstFrame: %s", anim.firstFrame);
writefln("anim.numFrames: %s", anim.numFrames);
}
}
if (poses.length) Delete(poses);
}
Vector3f[] getVertices()
{
return vertices.data;
}
Vector3f[] getNormals()
{
return normals.data;
}
Vector2f[] getTexcoords()
{
return texcoords.data;
}
uint[3][] getTriangles()
{
return tris;
}
size_t numBones()
{
return joints.length;
}
AnimationFacegroup[] getFacegroups()
{
return facegroups;
}
uint numAnimationFrames()
{
return numFrames;
}
void calcBindPose(AnimationFrameData* data)
{
foreach(i, ref j; joints)
{
data.frame[i] = baseFrame[i] * invBaseFrame[i];
}
foreach(i, v; vertices)
{
auto bi = blendIndices[i];
auto bw = blendWeights[i];
float w = (cast(float)bw[0])/255.0f;
Matrix4x4f mat = multScalarAffine(data.frame[bi[0]], w);
for (uint j = 1; j < 4 && bw[j] > 0.0; j++)
{
w = (cast(float)bw[j])/255.0f;
auto tmp = multScalarAffine(data.frame[bi[j]], w);
mat = addMatrixAffine(mat, tmp);
}
assert(validMatrix(mat));
assert(mat.isAffine);
data.vertices[i] = vertices[i] * mat;
data.normals[i] = normals[i] * matrix4x4to3x3(mat);
data.normals[i].normalize();
}
}
void calcFrame(
uint f1,
uint f2,
float t,
AnimationFrameData* data)
{
Matrix4x4f* mat1 = &frames[f1 * joints.length];
Matrix4x4f* mat2 = &frames[f2 * joints.length];
// Interpolate between two frames
foreach(i, ref j; joints)
{
Matrix4x4f mat = mat1[i] * (1.0f - t) + mat2[i] * t;
if (j.parent >= 0)
data.frame[i] = data.frame[j.parent] * mat;
else
data.frame[i] = mat;
}
// Update vertex data
foreach(i, v; vertices)
{
auto bi = blendIndices[i];
auto bw = blendWeights[i];
float w = (cast(float)bw[0])/255.0f;
Matrix4x4f mat = multScalarAffine(data.frame[bi[0]], w);
for (uint j = 1; j < 4 && bw[j] > 0.0; j++)
{
w = (cast(float)bw[j])/255.0f;
auto tmp = multScalarAffine(data.frame[bi[j]], w);
mat = addMatrixAffine(mat, tmp);
}
assert(validMatrix(mat));
assert(mat.isAffine);
data.vertices[i] = vertices[i] * mat;
data.normals[i] = normals[i] * matrix4x4to3x3(mat);
data.normals[i].normalize();
}
}
void blendFrame(
uint f1,
uint f2,
float t,
AnimationFrameData* data,
float blendFactor)
{
Matrix4x4f* mat1 = &frames[f1 * joints.length];
Matrix4x4f* mat2 = &frames[f2 * joints.length];
// Interpolate between two frames
foreach(i, ref j; joints)
{
Matrix4x4f mat = mat1[i] * (1.0f - t) + mat2[i] * t;
if (j.parent >= 0)
data.frame[i] = data.frame[j.parent] * mat;
else
data.frame[i] = mat;
}
// Update vertex data
foreach(i, v; vertices)
{
auto bi = blendIndices[i];
auto bw = blendWeights[i];
float w = (cast(float)bw[0])/255.0f;
Matrix4x4f mat = multScalarAffine(data.frame[bi[0]], w);
for (uint j = 1; j < 4 && bw[j] > 0.0; j++)
{
w = (cast(float)bw[j])/255.0f;
auto tmp = multScalarAffine(data.frame[bi[j]], w);
mat = addMatrixAffine(mat, tmp);
}
assert(validMatrix(mat));
assert(mat.isAffine);
data.vertices[i] = lerp(data.vertices[i], vertices[i] * mat, blendFactor);
data.normals[i] = lerp(data.normals[i], normals[i] * matrix4x4to3x3(mat), blendFactor);
//data.normals[i].normalize();
}
}
bool getAnimation(string name, AnimationData* data)
{
if (!name.length)
{
data.firstFrame = 0;
data.numFrames = numFrames;
return true;
}
if (!(name in animations))
return false;
auto anim = animations[name];
data.firstFrame = anim.firstFrame;
data.numFrames = anim.numFrames;
data.framerate = anim.framerate;
return true;
}
}
class IQMAsset: Asset
{
IQMModel model;
this()
{
}
~this()
{
if (model)
Delete(model);
}
override bool loadThreadSafePart(string filename, InputStream istrm, ReadOnlyFileSystem fs, AssetManager mngr)
{
model = New!IQMModel(istrm, fs, mngr);
return true;
}
override bool loadThreadUnsafePart()
{
return true;
}
override void release()
{
if (model)
model.release();
}
}
bool fileExists(ReadOnlyFileSystem rofs, string filename)
{
FileStat stat;
return rofs.stat(filename, stat);
}
Matrix4x4f transformationMatrix(Quaternionf r, Vector3f t, Vector3f s)
{
Matrix4x4f res = Matrix4x4f.identity;
Matrix3x3f rm = r.toMatrix3x3;
res.a11 = rm.a11 * s.x; res.a12 = rm.a12 * s.x; res.a13 = rm.a13 * s.x;
res.a21 = rm.a21 * s.y; res.a22 = rm.a22 * s.y; res.a23 = rm.a23 * s.y;
res.a31 = rm.a31 * s.z; res.a32 = rm.a32 * s.z; res.a33 = rm.a33 * s.z;
res.a14 = t.x;
res.a24 = t.y;
res.a34 = t.z;
return res;
}
Matrix4x4f multScalarAffine(Matrix4x4f m, float s)
{
Matrix4x4f res = m;
res.a11 *= s; res.a12 *= s; res.a13 *= s;
res.a21 *= s; res.a22 *= s; res.a23 *= s;
res.a31 *= s; res.a32 *= s; res.a33 *= s;
res.a14 *= s;
res.a24 *= s;
res.a34 *= s;
return res;
}
Matrix4x4f addMatrixAffine(Matrix4x4f m1, Matrix4x4f m2)
{
Matrix4x4f res = m1;
res.a11 += m2.a11; res.a12 += m2.a12; res.a13 += m2.a13;
res.a21 += m2.a21; res.a22 += m2.a22; res.a23 += m2.a23;
res.a31 += m2.a31; res.a32 += m2.a32; res.a33 += m2.a33;
res.a14 += m2.a14;
res.a24 += m2.a24;
res.a34 += m2.a34;
return res;
}
bool validMatrix(T, size_t N)(Matrix!(T, N) m)
{
foreach (v; m.arrayof)
if (isNaN(v))
return false;
return true;
}
bool validVector(T, size_t N)(Vector!(T, N) vec)
{
foreach (v; vec.arrayof)
if (isNaN(v))
return false;
return true;
}
|
D
|
# FIXED
Startup/rom_jt.obj: C:/ti/simplelink/ble_sdk_2_02_01_18/src/rom/rom_jt.c
Startup/rom_jt.obj: C:/ti/simplelink/ble_sdk_2_02_01_18/src/rom/r1/rom_init.c
Startup/rom_jt.obj: C:/ti/simplelink/ble_sdk_2_02_01_18/src/inc/bcomdef.h
Startup/rom_jt.obj: C:/ti/simplelink/ble_sdk_2_02_01_18/src/components/osal/src/inc/comdef.h
Startup/rom_jt.obj: C:/ti/simplelink/ble_sdk_2_02_01_18/src/components/hal/src/target/_common/hal_types.h
Startup/rom_jt.obj: C:/ti/simplelink/ble_sdk_2_02_01_18/src/components/hal/src/target/_common/../_common/cc26xx/_hal_types.h
Startup/rom_jt.obj: C:/ti/ccsv7/tools/compiler/ti-cgt-arm_16.9.3.LTS/include/stdint.h
Startup/rom_jt.obj: C:/ti/simplelink/ble_sdk_2_02_01_18/src/components/hal/src/inc/hal_defs.h
Startup/rom_jt.obj: C:/ti/simplelink/ble_sdk_2_02_01_18/src/components/hal/src/target/_common/hal_types.h
Startup/rom_jt.obj: C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/cc26xxware_2_24_02_17393/inc/hw_types.h
Startup/rom_jt.obj: C:/ti/ccsv7/tools/compiler/ti-cgt-arm_16.9.3.LTS/include/stdbool.h
Startup/rom_jt.obj: C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/cc26xxware_2_24_02_17393/inc/hw_chip_def.h
Startup/rom_jt.obj: C:/ti/simplelink/ble_sdk_2_02_01_18/src/rom/rom_jt.h
Startup/rom_jt.obj: C:/ti/simplelink/ble_sdk_2_02_01_18/src/rom/map_direct.h
Startup/rom_jt.obj: C:/ti/simplelink/ble_sdk_2_02_01_18/src/common/cc26xx/onboard.h
Startup/rom_jt.obj: C:/ti/simplelink/ble_sdk_2_02_01_18/src/components/hal/src/target/_common/hal_mcu.h
Startup/rom_jt.obj: C:/ti/simplelink/ble_sdk_2_02_01_18/src/components/hal/src/target/_common/hal_types.h
Startup/rom_jt.obj: C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/cc26xxware_2_24_02_17393/inc/hw_nvic.h
Startup/rom_jt.obj: C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/cc26xxware_2_24_02_17393/inc/hw_ints.h
Startup/rom_jt.obj: C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/cc26xxware_2_24_02_17393/inc/hw_gpio.h
Startup/rom_jt.obj: C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/cc26xxware_2_24_02_17393/inc/hw_memmap.h
Startup/rom_jt.obj: C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/cc26xxware_2_24_02_17393/driverlib/systick.h
Startup/rom_jt.obj: C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/cc26xxware_2_24_02_17393/driverlib/debug.h
Startup/rom_jt.obj: C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/cc26xxware_2_24_02_17393/driverlib/interrupt.h
Startup/rom_jt.obj: C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/cc26xxware_2_24_02_17393/driverlib/cpu.h
Startup/rom_jt.obj: C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/cc26xxware_2_24_02_17393/inc/hw_cpu_scs.h
Startup/rom_jt.obj: C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/cc26xxware_2_24_02_17393/driverlib/rom.h
Startup/rom_jt.obj: C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/cc26xxware_2_24_02_17393/driverlib/uart.h
Startup/rom_jt.obj: C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/cc26xxware_2_24_02_17393/inc/hw_uart.h
Startup/rom_jt.obj: C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/cc26xxware_2_24_02_17393/driverlib/gpio.h
Startup/rom_jt.obj: C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/cc26xxware_2_24_02_17393/driverlib/flash.h
Startup/rom_jt.obj: C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/cc26xxware_2_24_02_17393/inc/hw_flash.h
Startup/rom_jt.obj: C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/cc26xxware_2_24_02_17393/inc/hw_aon_sysctl.h
Startup/rom_jt.obj: C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/cc26xxware_2_24_02_17393/inc/hw_fcfg1.h
Startup/rom_jt.obj: C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/cc26xxware_2_24_02_17393/driverlib/ioc.h
Startup/rom_jt.obj: C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/cc26xxware_2_24_02_17393/inc/hw_ioc.h
Startup/rom_jt.obj: C:/ti/simplelink/ble_sdk_2_02_01_18/src/components/icall/src/inc/ICall.h
Startup/rom_jt.obj: C:/ti/ccsv7/tools/compiler/ti-cgt-arm_16.9.3.LTS/include/stdlib.h
Startup/rom_jt.obj: C:/ti/ccsv7/tools/compiler/ti-cgt-arm_16.9.3.LTS/include/linkage.h
Startup/rom_jt.obj: C:/ti/simplelink/ble_sdk_2_02_01_18/src/components/hal/src/inc/hal_assert.h
Startup/rom_jt.obj: C:/ti/simplelink/ble_sdk_2_02_01_18/src/components/hal/src/target/_common/hal_types.h
Startup/rom_jt.obj: C:/ti/simplelink/ble_sdk_2_02_01_18/src/components/hal/src/inc/hal_sleep.h
Startup/rom_jt.obj: C:/ti/simplelink/ble_sdk_2_02_01_18/src/components/osal/src/inc/osal.h
Startup/rom_jt.obj: C:/ti/ccsv7/tools/compiler/ti-cgt-arm_16.9.3.LTS/include/limits.h
Startup/rom_jt.obj: C:/ti/simplelink/ble_sdk_2_02_01_18/src/components/osal/src/inc/OSAL_Memory.h
Startup/rom_jt.obj: C:/ti/simplelink/ble_sdk_2_02_01_18/src/components/osal/src/inc/OSAL_Timers.h
Startup/rom_jt.obj: C:/ti/simplelink/ble_sdk_2_02_01_18/src/components/osal/src/inc/osal_pwrmgr.h
Startup/rom_jt.obj: C:/ti/simplelink/ble_sdk_2_02_01_18/src/components/osal/src/inc/osal_bufmgr.h
Startup/rom_jt.obj: C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/cc26xxware_2_24_02_17393/driverlib/vims.h
Startup/rom_jt.obj: C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/cc26xxware_2_24_02_17393/inc/hw_vims.h
Startup/rom_jt.obj: C:/ti/simplelink/ble_sdk_2_02_01_18/src/inc/hci_tl.h
Startup/rom_jt.obj: C:/ti/simplelink/ble_sdk_2_02_01_18/src/inc/hci.h
Startup/rom_jt.obj: C:/ti/simplelink/ble_sdk_2_02_01_18/src/controller/cc26xx/inc/ll.h
Startup/rom_jt.obj: C:/ti/simplelink/ble_sdk_2_02_01_18/src/inc/hci_data.h
Startup/rom_jt.obj: C:/ti/simplelink/ble_sdk_2_02_01_18/src/inc/hci_event.h
Startup/rom_jt.obj: C:/ti/simplelink/ble_sdk_2_02_01_18/src/inc/hci_tl.h
Startup/rom_jt.obj: C:/ti/simplelink/ble_sdk_2_02_01_18/src/components/hal/src/target/_common/hal_trng_wrapper.h
Startup/rom_jt.obj: C:/ti/simplelink/ble_sdk_2_02_01_18/src/components/hal/src/target/_common/hal_types.h
Startup/rom_jt.obj: C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/cc26xxware_2_24_02_17393/driverlib/trng.h
Startup/rom_jt.obj: C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/cc26xxware_2_24_02_17393/inc/hw_trng.h
Startup/rom_jt.obj: C:/ti/simplelink/ble_sdk_2_02_01_18/src/components/hal/src/target/_common/cc26xx/mb.h
Startup/rom_jt.obj: C:/ti/simplelink/ble_sdk_2_02_01_18/src/components/hal/src/target/_common/hal_types.h
Startup/rom_jt.obj: C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/cc26xxware_2_24_02_17393/inc/hw_rfc_dbell.h
Startup/rom_jt.obj: C:/ti/simplelink/ble_sdk_2_02_01_18/src/components/hal/src/target/_common/cc26xx/rf_hal.h
Startup/rom_jt.obj: C:/ti/simplelink/ble_sdk_2_02_01_18/src/components/hal/src/target/_common/hal_types.h
Startup/rom_jt.obj: C:/ti/simplelink/ble_sdk_2_02_01_18/src/controller/cc26xx/inc/ll_config.h
Startup/rom_jt.obj: C:/ti/simplelink/ble_sdk_2_02_01_18/src/controller/cc26xx/inc/ll_user_config.h
Startup/rom_jt.obj: C:/ti/simplelink/ble_sdk_2_02_01_18/src/icall/inc/ble_user_config.h
Startup/rom_jt.obj: C:/ti/simplelink/ble_sdk_2_02_01_18/src/icall/inc/ble_dispatch.h
Startup/rom_jt.obj: C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/cc26xxware_2_24_02_17393/inc/hw_sysctl.h
Startup/rom_jt.obj: C:/ti/simplelink/ble_sdk_2_02_01_18/src/controller/cc26xx/inc/ll_sleep.h
Startup/rom_jt.obj: C:/ti/simplelink/ble_sdk_2_02_01_18/src/controller/cc26xx/inc/ll_scheduler.h
Startup/rom_jt.obj: C:/ti/simplelink/ble_sdk_2_02_01_18/src/inc/ecc_rom.h
Startup/rom_jt.obj: C:/ti/simplelink/ble_sdk_2_02_01_18/src/controller/cc26xx/inc/ll_common.h
Startup/rom_jt.obj: C:/ti/simplelink/ble_sdk_2_02_01_18/src/controller/cc26xx/inc/ll_enc.h
Startup/rom_jt.obj: C:/ti/simplelink/ble_sdk_2_02_01_18/src/controller/cc26xx/inc/ll_wl.h
Startup/rom_jt.obj: C:/ti/simplelink/ble_sdk_2_02_01_18/src/controller/cc26xx/inc/ll_timer_drift.h
Startup/rom_jt.obj: C:/ti/simplelink/ble_sdk_2_02_01_18/src/controller/cc26xx/inc/ble.h
Startup/rom_jt.obj: C:/ti/simplelink/ble_sdk_2_02_01_18/src/controller/cc26xx/inc/ll_rat.h
Startup/rom_jt.obj: C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/cc26xxware_2_24_02_17393/inc/hw_rfc_rat.h
Startup/rom_jt.obj: C:/ti/simplelink/ble_sdk_2_02_01_18/src/controller/cc26xx/inc/ll_privacy.h
Startup/rom_jt.obj: C:/ti/simplelink/ble_sdk_2_02_01_18/src/rom/r1/common_rom_init.c
Startup/rom_jt.obj: C:/ti/simplelink/ble_sdk_2_02_01_18/src/components/hal/src/target/_common/hal_types.h
Startup/rom_jt.obj: C:/ti/simplelink/ble_sdk_2_02_01_18/src/components/services/src/aes/cc26xx/aes.h
Startup/rom_jt.obj: C:/ti/simplelink/ble_sdk_2_02_01_18/src/components/services/src/aes/cc26xx/ccm.h
Startup/rom_jt.obj: C:/ti/simplelink/ble_sdk_2_02_01_18/src/components/services/src/aes/cc26xx/aes_ccm_api.h
C:/ti/simplelink/ble_sdk_2_02_01_18/src/rom/rom_jt.c:
C:/ti/simplelink/ble_sdk_2_02_01_18/src/rom/r1/rom_init.c:
C:/ti/simplelink/ble_sdk_2_02_01_18/src/inc/bcomdef.h:
C:/ti/simplelink/ble_sdk_2_02_01_18/src/components/osal/src/inc/comdef.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/ccsv7/tools/compiler/ti-cgt-arm_16.9.3.LTS/include/stdint.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/hal/src/target/_common/hal_types.h:
C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/cc26xxware_2_24_02_17393/inc/hw_types.h:
C:/ti/ccsv7/tools/compiler/ti-cgt-arm_16.9.3.LTS/include/stdbool.h:
C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/cc26xxware_2_24_02_17393/inc/hw_chip_def.h:
C:/ti/simplelink/ble_sdk_2_02_01_18/src/rom/rom_jt.h:
C:/ti/simplelink/ble_sdk_2_02_01_18/src/rom/map_direct.h:
C:/ti/simplelink/ble_sdk_2_02_01_18/src/common/cc26xx/onboard.h:
C:/ti/simplelink/ble_sdk_2_02_01_18/src/components/hal/src/target/_common/hal_mcu.h:
C:/ti/simplelink/ble_sdk_2_02_01_18/src/components/hal/src/target/_common/hal_types.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/inc/hw_ints.h:
C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/cc26xxware_2_24_02_17393/inc/hw_gpio.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/driverlib/systick.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/interrupt.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/uart.h:
C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/cc26xxware_2_24_02_17393/inc/hw_uart.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/driverlib/flash.h:
C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/cc26xxware_2_24_02_17393/inc/hw_flash.h:
C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/cc26xxware_2_24_02_17393/inc/hw_aon_sysctl.h:
C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/cc26xxware_2_24_02_17393/inc/hw_fcfg1.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_ioc.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/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/inc/hal_sleep.h:
C:/ti/simplelink/ble_sdk_2_02_01_18/src/components/osal/src/inc/osal.h:
C:/ti/ccsv7/tools/compiler/ti-cgt-arm_16.9.3.LTS/include/limits.h:
C:/ti/simplelink/ble_sdk_2_02_01_18/src/components/osal/src/inc/OSAL_Memory.h:
C:/ti/simplelink/ble_sdk_2_02_01_18/src/components/osal/src/inc/OSAL_Timers.h:
C:/ti/simplelink/ble_sdk_2_02_01_18/src/components/osal/src/inc/osal_pwrmgr.h:
C:/ti/simplelink/ble_sdk_2_02_01_18/src/components/osal/src/inc/osal_bufmgr.h:
C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/cc26xxware_2_24_02_17393/driverlib/vims.h:
C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/cc26xxware_2_24_02_17393/inc/hw_vims.h:
C:/ti/simplelink/ble_sdk_2_02_01_18/src/inc/hci_tl.h:
C:/ti/simplelink/ble_sdk_2_02_01_18/src/inc/hci.h:
C:/ti/simplelink/ble_sdk_2_02_01_18/src/controller/cc26xx/inc/ll.h:
C:/ti/simplelink/ble_sdk_2_02_01_18/src/inc/hci_data.h:
C:/ti/simplelink/ble_sdk_2_02_01_18/src/inc/hci_event.h:
C:/ti/simplelink/ble_sdk_2_02_01_18/src/inc/hci_tl.h:
C:/ti/simplelink/ble_sdk_2_02_01_18/src/components/hal/src/target/_common/hal_trng_wrapper.h:
C:/ti/simplelink/ble_sdk_2_02_01_18/src/components/hal/src/target/_common/hal_types.h:
C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/cc26xxware_2_24_02_17393/driverlib/trng.h:
C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/cc26xxware_2_24_02_17393/inc/hw_trng.h:
C:/ti/simplelink/ble_sdk_2_02_01_18/src/components/hal/src/target/_common/cc26xx/mb.h:
C:/ti/simplelink/ble_sdk_2_02_01_18/src/components/hal/src/target/_common/hal_types.h:
C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/cc26xxware_2_24_02_17393/inc/hw_rfc_dbell.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/controller/cc26xx/inc/ll_config.h:
C:/ti/simplelink/ble_sdk_2_02_01_18/src/controller/cc26xx/inc/ll_user_config.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/tirtos_cc13xx_cc26xx_2_20_01_08/products/cc26xxware_2_24_02_17393/inc/hw_sysctl.h:
C:/ti/simplelink/ble_sdk_2_02_01_18/src/controller/cc26xx/inc/ll_sleep.h:
C:/ti/simplelink/ble_sdk_2_02_01_18/src/controller/cc26xx/inc/ll_scheduler.h:
C:/ti/simplelink/ble_sdk_2_02_01_18/src/inc/ecc_rom.h:
C:/ti/simplelink/ble_sdk_2_02_01_18/src/controller/cc26xx/inc/ll_common.h:
C:/ti/simplelink/ble_sdk_2_02_01_18/src/controller/cc26xx/inc/ll_enc.h:
C:/ti/simplelink/ble_sdk_2_02_01_18/src/controller/cc26xx/inc/ll_wl.h:
C:/ti/simplelink/ble_sdk_2_02_01_18/src/controller/cc26xx/inc/ll_timer_drift.h:
C:/ti/simplelink/ble_sdk_2_02_01_18/src/controller/cc26xx/inc/ble.h:
C:/ti/simplelink/ble_sdk_2_02_01_18/src/controller/cc26xx/inc/ll_rat.h:
C:/ti/tirtos_cc13xx_cc26xx_2_20_01_08/products/cc26xxware_2_24_02_17393/inc/hw_rfc_rat.h:
C:/ti/simplelink/ble_sdk_2_02_01_18/src/controller/cc26xx/inc/ll_privacy.h:
C:/ti/simplelink/ble_sdk_2_02_01_18/src/rom/r1/common_rom_init.c:
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/services/src/aes/cc26xx/aes.h:
C:/ti/simplelink/ble_sdk_2_02_01_18/src/components/services/src/aes/cc26xx/ccm.h:
C:/ti/simplelink/ble_sdk_2_02_01_18/src/components/services/src/aes/cc26xx/aes_ccm_api.h:
|
D
|
/*
*******************************************************************************************
* Dgame (a D game framework) - Copyright (c) Randy Schütt
*
* This software is provided 'as-is', without any express or implied warranty.
* In no event will the authors be held liable for any damages arising from
* the use of this software.
*
* Permission is granted to anyone to use this software for any purpose,
* including commercial applications, and to alter it and redistribute it
* freely, subject to the following restrictions:
*
* 1. The origin of this software must not be misrepresented; you must not claim
* that you wrote the original software. If you use this software in a product,
* an acknowledgment in the product documentation would be appreciated but is
* not required.
*
* 2. Altered source versions must be plainly marked as such, and must not be
* misrepresented as being the original software.
*
* 3. This notice may not be removed or altered from any source distribution.
*******************************************************************************************
*/
module Dgame.Window.Internal.Init;
private:
import derelict.sdl2.sdl;
import derelict.opengl3.gl;
import derelict.sdl2.ttf;
import derelict.sdl2.image;
import derelict.sdl2.mixer;
import Dgame.Window.GLSettings;
import Dgame.Internal.Error;
shared static this() {
DerelictSDL2.load();
DerelictSDL2Image.load();
DerelictSDL2ttf.load();
DerelictSDL2Mixer.load();
DerelictGL.load();
}
shared static ~this() {
// quit SDL_image
IMG_Quit();
// quit SDL_ttf
TTF_Quit();
// quit SDL_mixer
Mix_ReserveChannels(0);
Mix_CloseAudio();
Mix_Quit();
// quit SDL
SDL_Quit();
DerelictSDL2Image.unload();
DerelictSDL2ttf.unload();
DerelictSDL2Mixer.unload();
DerelictSDL2.unload();
DerelictGL.unload();
}
bool _isGLInited = false;
bool _isSDLInited = false;
package(Dgame):
void _initSDL() {
if (_isSDLInited)
return;
import core.stdc.stdio : printf;
debug {
SDL_version sdlver = void;
SDL_GetVersion(&sdlver);
printf("SDL version: %d.%d.%d\n", sdlver.major, sdlver.minor, sdlver.patch);
}
scope(exit) _isSDLInited = true;
// Initialize SDL2
int result = SDL_Init(SDL_INIT_VIDEO | SDL_INIT_AUDIO);
assert_fmt(result == 0, "Error: SDL could not be initialized: %s\n", SDL_GetError());
// Initialize SDL_image
result = IMG_Init(IMG_INIT_JPG | IMG_INIT_PNG);
assert_fmt(result != 0, "Error: Failed to init the required jpg and png support: %s\n", IMG_GetError());
if ((result & IMG_INIT_JPG) == 0)
printf("Warning: No jpg support: %s\n", IMG_GetError());
else if ((result & IMG_INIT_PNG) == 0)
printf("Warning: No png support: %s\n", IMG_GetError());
// Initialize SDL_ttf
result = TTF_Init();
assert_fmt(result == 0, "Error: SDL_TTF could not be initialized: %s\n", Mix_GetError());
// Initialize SDL_mixer
result = Mix_Init(MIX_INIT_OGG | MIX_INIT_MP3);
assert_fmt(result != 0, "Error: Failed to init the required ogg and mp3 support: %s\n", Mix_GetError());
if ((result & MIX_INIT_OGG) == 0)
printf("Warning: No ogg support: %s\n", Mix_GetError());
else if ((result & MIX_INIT_MP3) == 0)
printf("Warning: No mp3 support: %s\n", Mix_GetError());
result = Mix_OpenAudio(22050, MIX_DEFAULT_FORMAT, MIX_DEFAULT_CHANNELS, 4096);
assert_fmt(result == 0, "Warning: Could not open Mix_OpenAudio: %s\n", Mix_GetError());
SDL_ClearError(); // Ignore XAudio2 error: http://redmine.audacious-media-player.org/issues/346
immutable int channels = Mix_AllocateChannels(256);
if (channels < 256)
printf("Warning: Could not reserve 256 channels, only %d. %s\n", channels, Mix_GetError());
}
@nogc
void _initGLAttr(ref GLSettings gl_settings) {
import core.stdc.stdio : printf;
// Mac does not allow deprecated functions / constants, so we have to set the version manually to 2.1
version (OSX) {
if (gl_settings.majorVersion == 0) {
gl_settings.majorVersion = 2;
gl_settings.minorVersion = 1;
}
}
if (gl_settings.majorVersion != 0) {
int result = SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, gl_settings.majorVersion);
assert_fmt(result == 0, "Error by initializing OpenGL: %s\n", SDL_GetError());
result = SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, gl_settings.minorVersion);
assert_fmt(result == 0, "Error by initializing OpenGL: %s\n", SDL_GetError());
}
if (gl_settings.antiAliasLevel > 0) {
int result = SDL_GL_SetAttribute(SDL_GL_MULTISAMPLEBUFFERS, 1);
assert_fmt(result == 0, "Error by initializing OpenGL: %s\n", SDL_GetError());
int max_samples;
glGetIntegerv(GL_MAX_SAMPLES, &max_samples);
if (gl_settings.antiAliasLevel > max_samples) {
printf("Your anti-alias level (%d) is too high and will be reduced to %d.\n",gl_settings.antiAliasLevel, max_samples);
gl_settings.antiAliasLevel = cast(ubyte) max_samples;
}
result = SDL_GL_SetAttribute(SDL_GL_MULTISAMPLESAMPLES, gl_settings.antiAliasLevel);
assert_fmt(result == 0, "Error by initializing OpenGL: %s\n", SDL_GetError());
}
int result = SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1);
assert_fmt(result == 0, "Error by initializing OpenGL: %s\n", SDL_GetError());
result = SDL_GL_SetAttribute(SDL_GL_ACCELERATED_VISUAL, 1);
assert_fmt(result == 0, "Error by initializing OpenGL: %s\n", SDL_GetError());
}
void _initGL() {
if (_isGLInited)
return;
debug import core.stdc.stdio : printf;
scope(exit) _isGLInited = true;
immutable GLVersion glver = DerelictGL.reload();
const char* glverstr = glGetString(GL_VERSION);
debug printf("Derelict loaded GL version: %d (%d), available GL version: %s\n", DerelictGL.loadedVersion, glver, glverstr);
version (OSX)
enum GLVersion NEEDED_GL_VERSION = GLVersion.GL21;
else
enum GLVersion NEEDED_GL_VERSION = GLVersion.GL30;
assert_fmt(glver >= NEEDED_GL_VERSION, "Your OpenGL version (%d) is too low. Need at least OpenGL 3.0.", glver);
glDisable(GL_DITHER);
glDisable(GL_LIGHTING);
glDisable(GL_DEPTH_TEST);
glDisable(GL_ALPHA_TEST);
glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
glEnable(GL_CULL_FACE);
glCullFace(GL_FRONT);
glEnable(GL_MULTISAMPLE);
//glShadeModel(GL_SMOOTH);
//glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
glEnableClientState(GL_VERTEX_ARRAY);
glEnableClientState(GL_COLOR_ARRAY);
glEnableClientState(GL_TEXTURE_COORD_ARRAY);
}
|
D
|
instance DIA_Addon_Riordian_EXIT(C_Info)
{
npc = KDW_1404_Addon_Riordian_NW;
nr = 999;
condition = DIA_Addon_Riordian_EXIT_Condition;
information = DIA_Addon_Riordian_EXIT_Info;
permanent = TRUE;
description = Dialog_Ende;
};
func int DIA_Addon_Riordian_EXIT_Condition()
{
return TRUE;
};
func void DIA_Addon_Riordian_EXIT_Info()
{
AI_StopProcessInfos(self);
};
instance DIA_Addon_Riordian_Hallo(C_Info)
{
npc = KDW_1404_Addon_Riordian_NW;
nr = 5;
condition = DIA_Addon_Riordian_Hallo_Condition;
information = DIA_Addon_Riordian_Hallo_Info;
description = "What are you doing?";
};
func int DIA_Addon_Riordian_Hallo_Condition()
{
return TRUE;
};
func void DIA_Addon_Riordian_Hallo_Info()
{
AI_Output(other,self,"DIA_Addon_Riordian_Hallo_15_00"); //What are you doing?
AI_Output(self,other,"DIA_Addon_Riordian_Hallo_10_01"); //I am studying the culture of the ancient people.
AI_Output(self,other,"DIA_Addon_Riordian_Hallo_10_02"); //Based on the inscriptions, they lived long before our time.
AI_Output(self,other,"DIA_Addon_Riordian_Hallo_10_03"); //I don't know exactly WHEN they erected these halls, but their civilization was highly developed.
AI_Output(self,other,"DIA_Addon_Riordian_Hallo_10_04"); //They built a city on the other side of the mountains. (considering) And a temple for Adanos.
};
instance DIA_Addon_Riordian_Alter(C_Info)
{
npc = KDW_1404_Addon_Riordian_NW;
nr = 6;
condition = DIA_Addon_Riordian_Alter_Condition;
information = DIA_Addon_Riordian_Alter_Info;
description = "How old do you think the building here is?";
};
func int DIA_Addon_Riordian_Alter_Condition()
{
if(Npc_KnowsInfo(other,DIA_Addon_Riordian_Hallo))
{
return TRUE;
};
};
func void DIA_Addon_Riordian_Alter_Info()
{
AI_Output(other,self,"DIA_Addon_Riordian_Alter_15_00"); //How old do you think the building here is?
AI_Output(self,other,"DIA_Addon_Riordian_Alter_10_01"); //Well. I still can't say exactly, but it must be several hundred years old.
};
instance DIA_Addon_Riordian_Atlantis(C_Info)
{
npc = KDW_1404_Addon_Riordian_NW;
nr = 4;
condition = DIA_Addon_Riordian_Atlantis_Condition;
information = DIA_Addon_Riordian_Atlantis_Info;
description = "A lost city on the island of Khorinis?";
};
func int DIA_Addon_Riordian_Atlantis_Condition()
{
if(Npc_KnowsInfo(other,DIA_Addon_Riordian_Hallo))
{
return TRUE;
};
};
func void DIA_Addon_Riordian_Atlantis_Info()
{
AI_Output(other,self,"DIA_Addon_Riordian_Atlantis_15_00"); //A lost city on the island of Khorinis?
AI_Output(self,other,"DIA_Addon_Riordian_Atlantis_10_01"); //Yes. Until now, we lived in the belief that we knew the whole island.
AI_Output(self,other,"DIA_Addon_Riordian_Atlantis_10_02"); //We assumed that the entire northeast of the island was one enormous mountain range.
AI_Output(self,other,"DIA_Addon_Riordian_Atlantis_10_03"); //But we were wrong.
AI_Output(self,other,"DIA_Addon_Riordian_Atlantis_10_04"); //Behind these mountains lies a valley. The city of the ancient people was located there.
AI_Output(self,other,"DIA_Addon_Riordian_Atlantis_10_05"); //(sighs) I would only too gladly see the buildings of the city, but they have probably fallen to dust long ago...
B_LogEntry(TOPIC_Addon_KDW,"The Water Mages suspect that an ancient lost city lies behind the portal.");
};
instance DIA_Addon_Riordian_SaturasWantYou(C_Info)
{
npc = KDW_1404_Addon_Riordian_NW;
nr = 5;
condition = DIA_Addon_Riordian_SaturasWantYou_Condition;
information = DIA_Addon_Riordian_SaturasWantYou_Info;
description = "Saturas wants to see you.";
};
func int DIA_Addon_Riordian_SaturasWantYou_Condition()
{
if(Npc_KnowsInfo(other,DIA_Addon_Riordian_Hallo) && (MIS_Addon_Saturas_BringRiordian2Me == LOG_Running))
{
return TRUE;
};
};
func void DIA_Addon_Riordian_SaturasWantYou_Info()
{
AI_Output(other,self,"DIA_Addon_Riordian_SaturasWantYou_15_00"); //Saturas wants to see you.
AI_Output(self,other,"DIA_Addon_Riordian_SaturasWantYou_10_01"); //Has he gotten further with his investigation? Then I will go to him immediately.
if(Nefarius_NW.aivar[AIV_TalkedToPlayer] == FALSE)
{
AI_Output(self,other,"DIA_Addon_Riordian_SaturasWantYou_10_02"); //If you want to learn more about this complex, talk to Nefarius.
AI_Output(self,other,"DIA_Addon_Riordian_SaturasWantYou_10_03"); //You'll find him farther back in these vaults.
};
AI_StopProcessInfos(self);
Npc_ExchangeRoutine(self,"Saturas");
MIS_Addon_Saturas_BringRiordian2Me = LOG_SUCCESS;
B_GivePlayerXP(XP_Ambient);
};
var int Riordian_PermNews;
instance DIA_Addon_Riordian_Perm(C_Info)
{
npc = KDW_1404_Addon_Riordian_NW;
nr = 99;
condition = DIA_Addon_Riordian_Perm_Condition;
information = DIA_Addon_Riordian_Perm_Info;
permanent = TRUE;
description = "Found out anything new?";
};
func int DIA_Addon_Riordian_Perm_Condition()
{
if(MIS_Addon_Saturas_BringRiordian2Me == LOG_SUCCESS)
{
return TRUE;
};
};
func void DIA_Addon_Riordian_Perm_Info()
{
AI_Output(other,self,"DIA_Addon_Riordian_Perm_15_00"); //Found out anything new?
if(Riordian_PermNews == FALSE)
{
AI_Output(self,other,"DIA_Addon_Riordian_Perm_10_01"); //It has been confirmed. The ancient culture did indeed believe in Adanos!
Riordian_PermNews = TRUE;
}
else
{
AI_Output(self,other,"DIA_Addon_Riordian_Perm_10_02"); //Not really. Come back again later.
};
AI_StopProcessInfos(self);
};
instance DIA_Addon_Riordian_TeachPre(C_Info)
{
npc = KDW_1404_Addon_Riordian_NW;
nr = 5;
condition = DIA_Addon_Riordian_TeachPre_Condition;
information = DIA_Addon_Riordian_TeachPre_Info;
description = "Vatras gave me this amulet of the searching will-o'-the-wisp...";
};
func int DIA_Addon_Riordian_TeachPre_Condition()
{
if(Npc_KnowsInfo(other,DIA_Addon_Riordian_Hallo) && Npc_HasItems(other,ItAm_Addon_WispDetector))
{
return TRUE;
};
};
func void DIA_Addon_Riordian_TeachPre_Info()
{
AI_Output(other,self,"DIA_Addon_Riordian_TeachPre_15_00"); //Vatras gave me this amulet of the searching will-o'-the-wisp...
AI_Output(self,other,"DIA_Addon_Riordian_TeachPre_10_01"); //Ah! (circumspectly) A rare artifact. You can use it to train the will-o'-the-wisp, did you know that?
AI_Output(other,self,"DIA_Addon_Riordian_TeachPre_15_02"); //Can you help me with that?
AI_Output(self,other,"DIA_Addon_Riordian_TeachPre_10_03"); //Gladly. I have worked with this sort of magic for a long time.
Riordian_Addon_TeachPlayer = TRUE;
Log_CreateTopic(TOPIC_Addon_KDWTeacher,LOG_NOTE);
B_LogEntry(TOPIC_Addon_KDWTeacher,LogText_Addon_RiordianTeach);
};
instance DIA_Addon_Riordian_Teach(C_Info)
{
npc = KDW_1404_Addon_Riordian_NW;
nr = 90;
condition = DIA_Addon_Riordian_Teach_Condition;
information = DIA_Addon_Riordian_Teach_Info;
permanent = TRUE;
description = "Show me how I can train my will-o'-the-wisp.";
};
var int DIA_Addon_Riordian_Teach_NoPerm;
func int DIA_Addon_Riordian_Teach_Condition()
{
if((Riordian_Addon_TeachPlayer == TRUE) && (DIA_Addon_Riordian_Teach_NoPerm == FALSE) && Npc_HasItems(other,ItAm_Addon_WispDetector))
{
return TRUE;
};
};
func void DIA_Addon_Riordian_Teach_Info()
{
B_DIA_Addon_Riordian_Teach_15_00();
if((player_talent_wispdetector[WISPSKILL_NF] == FALSE) || (player_talent_wispdetector[WISPSKILL_FF] == FALSE) || (player_talent_wispdetector[WISPSKILL_NONE] == FALSE) || (player_talent_wispdetector[WISPSKILL_RUNE] == FALSE) || (player_talent_wispdetector[WISPSKILL_MAGIC] == FALSE) || (player_talent_wispdetector[WISPSKILL_FOOD] == FALSE) || (player_talent_wispdetector[WISPSKILL_POTIONS] == FALSE))
{
Info_ClearChoices(DIA_Addon_Riordian_Teach);
Info_AddChoice(DIA_Addon_Riordian_Teach,Dialog_Back,DIA_Addon_Riordian_Teach_BACK);
B_DIA_Addon_Riordian_Teach_10_01();
if(player_talent_wispdetector[WISPSKILL_FF] == FALSE)
{
Info_AddChoice(DIA_Addon_Riordian_Teach,B_BuildLearnString(NAME_ADDON_WISPSKILL_FF,B_GetLearnCostTalent(other,NPC_TALENT_WISPDETECTOR,WISPSKILL_FF)),DIA_Addon_Riordian_Teach_WISPSKILL_FF);
};
if(player_talent_wispdetector[WISPSKILL_NONE] == FALSE)
{
Info_AddChoice(DIA_Addon_Riordian_Teach,B_BuildLearnString(NAME_ADDON_WISPSKILL_NONE,B_GetLearnCostTalent(other,NPC_TALENT_WISPDETECTOR,WISPSKILL_NONE)),DIA_Addon_Riordian_Teach_WISPSKILL_NONE);
};
if((player_talent_wispdetector[WISPSKILL_RUNE] == FALSE) && (wispskill_level >= 2))
{
Info_AddChoice(DIA_Addon_Riordian_Teach,B_BuildLearnString(NAME_ADDON_WISPSKILL_RUNE,B_GetLearnCostTalent(other,NPC_TALENT_WISPDETECTOR,WISPSKILL_RUNE)),DIA_Addon_Riordian_Teach_WISPSKILL_RUNE);
};
if((player_talent_wispdetector[WISPSKILL_MAGIC] == FALSE) && (wispskill_level >= 2))
{
Info_AddChoice(DIA_Addon_Riordian_Teach,B_BuildLearnString(NAME_ADDON_WISPSKILL_MAGIC,B_GetLearnCostTalent(other,NPC_TALENT_WISPDETECTOR,WISPSKILL_MAGIC)),DIA_Addon_Riordian_Teach_WISPSKILL_MAGIC);
};
if((player_talent_wispdetector[WISPSKILL_FOOD] == FALSE) && (wispskill_level >= 3))
{
Info_AddChoice(DIA_Addon_Riordian_Teach,B_BuildLearnString(NAME_ADDON_WISPSKILL_FOOD,B_GetLearnCostTalent(other,NPC_TALENT_WISPDETECTOR,WISPSKILL_FOOD)),DIA_Addon_Riordian_Teach_WISPSKILL_FOOD);
};
if((player_talent_wispdetector[WISPSKILL_POTIONS] == FALSE) && (wispskill_level >= 3))
{
Info_AddChoice(DIA_Addon_Riordian_Teach,B_BuildLearnString(NAME_ADDON_WISPSKILL_POTIONS,B_GetLearnCostTalent(other,NPC_TALENT_WISPDETECTOR,WISPSKILL_POTIONS)),DIA_Addon_Riordian_Teach_WISPSKILL_POTIONS);
};
}
else
{
B_DIA_Addon_Riordian_Teach_10_08();
DIA_Addon_Riordian_Teach_NoPerm = TRUE;
};
};
func void DIA_Addon_Riordian_Teach_WISPSKILL_X()
{
B_DIA_Addon_Riordian_Teach_WISPSKILL_X_10_00();
};
func void DIA_Addon_Riordian_Teach_BACK()
{
Info_ClearChoices(DIA_Addon_Riordian_Teach);
};
func void DIA_Addon_Riordian_Teach_WISPSKILL_FF()
{
if(B_TeachPlayerTalentWispDetector(self,other,WISPSKILL_FF))
{
if(wispskill_level < 2)
{
wispskill_level = 2;
};
DIA_Addon_Riordian_Teach_WISPSKILL_X();
};
Info_ClearChoices(DIA_Addon_Riordian_Teach);
};
func void DIA_Addon_Riordian_Teach_WISPSKILL_NONE()
{
if(B_TeachPlayerTalentWispDetector(self,other,WISPSKILL_NONE))
{
if(wispskill_level < 2)
{
wispskill_level = 2;
};
DIA_Addon_Riordian_Teach_WISPSKILL_X();
};
Info_ClearChoices(DIA_Addon_Riordian_Teach);
};
func void DIA_Addon_Riordian_Teach_WISPSKILL_RUNE()
{
if(B_TeachPlayerTalentWispDetector(self,other,WISPSKILL_RUNE))
{
if(wispskill_level < 3)
{
wispskill_level = 3;
};
DIA_Addon_Riordian_Teach_WISPSKILL_X();
};
Info_ClearChoices(DIA_Addon_Riordian_Teach);
};
func void DIA_Addon_Riordian_Teach_WISPSKILL_MAGIC()
{
if(B_TeachPlayerTalentWispDetector(self,other,WISPSKILL_MAGIC))
{
if(wispskill_level < 3)
{
wispskill_level = 3;
};
DIA_Addon_Riordian_Teach_WISPSKILL_X();
};
Info_ClearChoices(DIA_Addon_Riordian_Teach);
};
func void DIA_Addon_Riordian_Teach_WISPSKILL_FOOD()
{
if(B_TeachPlayerTalentWispDetector(self,other,WISPSKILL_FOOD))
{
DIA_Addon_Riordian_Teach_WISPSKILL_X();
};
Info_ClearChoices(DIA_Addon_Riordian_Teach);
};
func void DIA_Addon_Riordian_Teach_WISPSKILL_POTIONS()
{
if(B_TeachPlayerTalentWispDetector(self,other,WISPSKILL_POTIONS))
{
DIA_Addon_Riordian_Teach_WISPSKILL_X();
};
Info_ClearChoices(DIA_Addon_Riordian_Teach);
};
|
D
|
//#new
//#chapter not limited, and crash!
//#but args are strings already!
//#but what about "1Joh 2 3 - -1", the "-"'s get removed
//#not work
//#eg 'Gen 1 1 -' -- get whole chapter
//#clear the text file
//version = DUnit; // dep
version = OldVersion;
version = ModifyTitle; // '1John' to '1 John'
import std.stdio;
import std.string;
import std.array: split, replace;
import std.file;
import std.conv;
import std.ascii;
//import dunit;
import jeca.misc;
import base, book;
class Bible {
Book[] m_books;
size_t parseNumber(in size_t max, in size_t number) pure {
if (number < 0) {
//debug
// writeln("parse: ", max + number % max);
return max + number % max;
} else if (number > max-1){
return max-1; // or return parseNumber(max, number-max);
}
if (number == 0)
return 1;
return number;
}
/// returns 1 if input invalid
size_t toInt(in string str) {
scope(failure)
return 1;
return str.to!size_t();
}
// "1 Joh 2:3-4" - "1Joh 2 3 - 4" //#but what about "1Joh 2 3 - -1", the "-"'s get removed
string[] argReferenceToArgs(string str) {
string bookTitle;
bool alpha = false;
foreach(i, c; str) {
if (alpha == false && c.isAlpha()) {
alpha = true;
}
if (alpha && (i+1 == str.length || c == ' ') ) {
break;
}
if (c != ' ') {
bookTitle ~= c;
}
}
size_t[] inNum(string s) {
size_t i = bookTitle.length;
char[] cs = s[i..$].dup;
//int count;
foreach(ref c; cs) {
if (! c.isDigit()) {
c = ' ';
}
}
auto str = cs.idup;
auto result = str.split().to!(size_t[]);
return result;
}
auto nums = inNum(str);
string s;
foreach(i, n; nums) {
if (i == 2 && nums.length>2) {
s ~= " - ";
}
s ~= n.to!string() ~ " ";
}
auto result = (bookTitle~" "~s).split();
mixin(trace("result"));
return result;
}
int bookNumberFromTitle(string bookTitle) {
enum NA = -1; // Genesis
size_t bookNumber = NA;
bookTitle = replace(bookTitle, "|_", "");
foreach(i, book; m_books)
if (book.m_bookTitle.length >= bookTitle.length
&& book.m_bookTitle[0 .. bookTitle.length].toLower == bookTitle.toLower) {
bookNumber = i + 1;
break;
}
if (bookNumber == NA) {
writeln("No book match for '", bookTitle, "'");
return NA;
}
return bookNumber;
}
/// Enter verse ref (eg. 'Psal 32 1 - -1')
string argReference(string[] args) {
if (args.length == 0) {
writeln("I'm afraid that's quite out of the question!");
return "";
}
// eg Psal 32 1 - -1
if (args.length == 1) {
writeln("not whole books yet");
return "";
}
//args = "1 John 5 7".split();
//writeln(args);
if (args[0].length == 1) {
string num = args[0].to!string(); //#but args are strings already!
args[1]=num~args[1];
args = args[1..$];
//writeln(args);
}
enum NA = -1;
size_t bookNumber;
if (args[0].toLower() == "book") {
bookNumber = parseNumber(66 + 1, toInt(args[1])); //#note the '+ 1', because it is what the user put
args = args[1 .. $]; // pop the front
}
else {
bookNumber = bookNumberFromTitle(args[0]); // eg args[0] might be 'Genesis'
if (bookNumber == -1)
return "";
}
size_t chapterNumber = parseNumber(
m_books[bookNumber - 1].m_chapters.length + 1,
toInt(args[1]));
//writeln("bookNumber: ", bookNumber, " chapterNumber: ", chapterNumber);
//#why m_verses.length + 1
size_t verseNumber, verseNumber2;
/* eg Gen 1 */
if (args.length == 2) {
args.length += 3;
args[2]="1";
args[$-2]="-";
//#chapter not limited, and crash!
args[$-1]=(m_books[bookNumber - 1].m_chapters[chapterNumber - 1].m_verses.length).to!string();
}
if (args.length > 2) {
size_t vnum;
try {
vnum = parseNumber(m_books[bookNumber - 1].m_chapters[chapterNumber - 1].m_verses.length + 1
, toInt(args[2]));
if (bookNumber <= m_books.length
&& chapterNumber <= m_books[bookNumber - 1].m_chapters.length
//&& toInt(args[2]) <= m_books[bookNumber - 1].m_chapters[chapterNumber - 1].m_verses.length) {
) {
verseNumber = parseNumber(m_books[bookNumber - 1].m_chapters[chapterNumber - 1].m_verses.length + 1
, toInt(args[2]));
}
else debug
writeln("<zap>");
} // try
catch(Error er) {}
}
else
//whole chapter
verseNumber = 1,
verseNumber2 = m_books[bookNumber - 1].m_chapters[chapterNumber - 1].m_verses.length + 1;
//#eg 'Gen 1 1 -' -- get whole chapter
//if (args.length == 4)
// args ~= (m_books[bookNumber - 1].m_chapters[chapterNumber - 1].m_verses.length + 1).to!string;
if (args.length > 4)
verseNumber2 =
parseNumber(m_books[bookNumber - 1].m_chapters[chapterNumber - 1].m_verses.length + 1, toInt(args[4]));
// '- 1' before this and not after this
size_t dummyBook, dummyChapter;
reduceNumbers(bookNumber, chapterNumber, verseNumber, dummyBook, dummyChapter, verseNumber2);
string result;
if (args.length < 5) {
if (args.length == 2)
result = getVerseRange(bookNumber, chapterNumber, verseNumber, bookNumber, chapterNumber, verseNumber2);
else
result = getVerseRange(bookNumber, chapterNumber, verseNumber, bookNumber, chapterNumber, verseNumber);
}
else
result = getVerseRange(bookNumber, chapterNumber, verseNumber, bookNumber, chapterNumber, verseNumber2);
if (1==2)
writeln(result);
return result;
}
void reduceNumbers(ref size_t book, ref size_t chapter, ref size_t verse, ref size_t book2, ref size_t chapter2, ref size_t verse2) {
foreach(id; [&book, &chapter, &verse, &book2, &chapter2, &verse2])
--(*id);
}
//#new
string getReference(int bookNum, int chapterNum = 0, int verseNum = 0) {
return "";
}
Book getBook(int bookNum) {
//m_books[bookNumber - 1].m_chapters[chapterNumber - 1].m_verses.length + 1
return m_books[bookNum - 1]; // I removed the '- 1'
}
string getVerseRange(size_t book, size_t chapter, size_t verse, size_t book2, size_t chapter2, size_t verse2) {
scope(failure) {
writefln("get verse range: An error has happen!"
"\nBook: %s, chapter: %s, verse: %s, book2: %s, chapter2: %s, verse2: %s",
book, chapter, verse, book2, chapter2, verse2);
return "";
}
auto inBook = false,
inChapter = false,
inVerse = false;
string verses = "";
version(OldVersion)
{} else {
size_t cbook = book;
size_t cchapter = chapter;
size_t cverse = verse; // c for current
writeln("Start verse: book", book, " chapter: ", chapter, ", verse: ", verse);
writeln("End verse: book", book2, " chapter: ", chapter2, ", verse: ", verse2);
readln();
do {
writeln("Start: cbook", cbook, " cchapter: ", cchapter, ", cverse: ", cverse);
readln();
if (! inBook) {
verses ~= m_books[cbook].m_bookTitle ~ ' ' ~ m_books[cbook].m_chapters[cchapter].m_chapterTitle ~ ":";
inBook = true;
}
if (! inChapter) {
inChapter = true;
}
if (! inVerse) {
verses ~= m_books[cbook].m_chapters[cchapter].m_verses[cverse].m_verseTitle ~ (inVerse ? " " : " -- ") ~ m_books[cbook].m_chapters[cchapter].m_verses[cverse].m_verse ~ '\n';
inVerse = true;
}
cverse++;
//if (cbook == book2 && cchapter == chapter2 && cverse > verse2)
if (cverse == m_books[cbook].m_chapters[cchapter].m_verses.length) {
cverse = 0;
cchapter++;
if (cchapter == m_books[cbook].m_chapters.length) {
cchapter = 0;
cbook++;
if (cbook == book2) {
}
}
/+
if (cchapter == chapter2) {
cbook++;
if (cbook == book2) {
//this in handled with the while loop expression
}
}
+/
//inBook = false;
//inChapter = false;
inVerse = false;
} // if (cverse
// writeln("Start: cbook", cbook, " cchapter: ", cchapter, ", cverse: ", cverse);
// readln();
} while(!(cbook == book2 && cchapter == chapter2 && cverse == verse2 + 1));
} // version
/+
//not work very far
foreach(booko; m_books[book .. book + (book2 - book) + 1]) {
bookChange = chapterChange = verseChange = false;
verses ~= m_books[book].m_bookTitle ~ ' ' ~ m_books[book].m_chapters[chapter].m_chapterTitle ~ ":";
foreach(chaptero; booko.m_chapters[chapter .. chapter + (chapter2 - chapter) + 1])
foreach(verseo; chaptero.m_verses[verse .. verse + (verse2 - verse) + 1]) {
verses ~= verseo.m_verseTitle ~ (verseChange ? " " : " -- ") ~ verseo.m_verse ~ '\n';
verseChange = true;
}
}
+/
//just from within a chapter
version(OldVersion) {
inVerse = false;
string bookTitle = m_books[book].m_bookTitle;
version(ModifyTitle) {
if (bookTitle[0].isDigit()) {
bookTitle = bookTitle[0] ~ " " ~ bookTitle[1 .. $];
}
}
verses ~= bookTitle ~ ' ' ~ m_books[book].m_chapters[chapter].m_chapterTitle ~ ":";
foreach(verseo; m_books[book].m_chapters[chapter].m_verses[verse .. verse + (verse2 - verse) + 1]) {
verses ~= verseo.m_verseTitle ~ (inVerse ? " " : " -- ") ~ verseo.m_verse ~ '\n';
inVerse = true;
}
}
append("glean.txt", verses);
return verses;
}
}
version(DUnit)
class BibleTests {
mixin TestMixin;
//alias g_bible this; // this; //#not work here with DUnit
alias bible = g_bible;
void testNotesReferenceExpand() {
auto start ="I went |_John 11 35for a walk.";
auto conversion = convertReferencesFromNotesFile(start);
string test = "I went John 11:35 -@- Jesus wept.\nfor a walk.";
debug(0) {
writeln(" start>", [start], "<");
writeln("conversion>", [conversion], "<");
writeln(" test>", [test], "<");
}
assertEquals(conversion, test);
}
debug(10) {
void testParseReferencies() {
// Assert
with(bible)
assert(parseNumber( /+ number of chapters etc: +/ 10, /+ position +/ -1) == 9),
assert(parseNumber(10, -11) == 9),
assert(parseNumber(10, 0) == 0),
assert(parseNumber(10, 1) == 1);
}
void testParseInput() {
// Assert
with(bible)
assert(toInt("-1") == -1, "not -1"),
assert(toInt("1") == 1, "not 1"),
assert(toInt("a") == 1),
assert(toInt("a.2f") == 1),
assert(toInt("a.2-f") == 1),
assert(toInt("") == 1);
}
void testReduceByOne() {
int a,b,c,d,e,f;
a = b = c = d = e = f = 1;
bible.reduceNumbers(a,b,c,d,e,f);
int result = a+b+c+d+e+f;
assert(result == 0);
}
void testInputRef() {
enum End {fromStart, fromEnd}
with(bible) {
string vref(string str, End end = End.fromStart) {
string result = argReference(str.split());
writeln("'", result, "'");
//result = result[end == End.fromStart ? 0 : result.length - str.length
// .. end == End.fromStart ? str.length : result.length];
if (end == End.fromStart)
result = result[0 .. str.length];
//writeln("result - '", result, "'");
return result;
}
//assert(argReference("Genesis 1 1".split)[0 .. 11] == "Genesis 1:1");
//assert(argReference("Genesis 1".split
assert(vref("Genesis 1 1") == "Genesis 1:1");
assert(vref("genesis 2 1") == "Genesis 2:1");
assert(vref("Genesis -1 -1") == "Genesis 50:26");
//assert(vref("Genesis -1") == "Genesis 50:1");
assert(vref("Revelation -1 -1") == "Revelation 22:21");
assert(vref("Psalms 119 -1 ") == "Psalms 119:176");
}
}
} // debug 10
}
|
D
|
/**
* Copyright: Copyright (c) 2010-2011 Jacob Carlborg.
* Authors: Jacob Carlborg
* Version: Initial created: Jan 26, 2010
* License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost Software License 1.0)
*/
module orange.serialization.Serializer;
import std.conv;
import std.array;
import orange.core.Attribute;
import orange.serialization._;
import orange.serialization.archives.Archive;
import orange.util._;
import orange.util.collection.Array;
private
{
alias orange.util.CTFE.contains ctfeContains;
enum Mode
{
serializing,
deserializing
}
alias Mode.serializing serializing;
alias Mode.deserializing deserializing;
private char toUpper () (char c)
{
if (c >= 'a' && c <= 'z')
return cast(char) (c - 32);
return c;
}
}
/**
* This class represents a serializer. It's the main interface to the (de)serialization
* process and it's this class that actually performs most of the (de)serialization.
*
* The serializer is the frontend in the serialization process, it's independent of the
* underlying archive type. It's responsible for collecting and tracking all values that
* should be (de)serialized. It's the serializer that adds keys and ID's to all values,
* keeps track of references to make sure that a given value (of reference type) is only
* (de)serialized once.
*
* The serializer is also responsible for breaking up types that the underlying archive
* cannot handle, into primitive types that archive know how to (de)serialize.
*
* Keys are used by the serializer to associate a name with a value. It's used to
* deserialize values independently of the order of the fields of a class or struct.
* They can also be used by the user to give a name to a value. Keys are unique within
* it's scope.
*
* ID's are an unique identifier associated with each serialized value. The serializer
* uses the ID's to track values when (de)serializing reference types. An ID is unique
* across the whole serialized data.
*
* Examples:
* ---
* import std.stdio;
* import orange.serialization._;
* import orange.serialization.archives._;
*
* class Foo
* {
* int a;
* }
*
* void main ()
* {
* auto archive = new XmlArchive!();
* auto serializer = new Serializer;
*
* auto foo = new Foo;
* foo.a = 3;
*
* serializer.serialize(foo);
* auto foo2 = serializer.deserialize!(Foo)(archive.untypedData);
*
* writeln(foo2.a); // prints "3"
* assert(foo.a == foo2.a);
* }
* ---
*/
class Serializer
{
/// The type of error callback.
alias Archive.ErrorCallback ErrorCallback;
/// The type of the serialized data. This is an untyped format.
alias Archive.UntypedData Data;
/// The type of an ID.
alias Archive.Id Id;
/**
* This callback will be called when an unexpected event occurs, i.e. an expected element
* is missing in the deserialization process.
*
* Examples:
* ---
* auto archive = new XmlArchive!();
* auto serializer = new Serializer(archive);
* serializer.errorCallback = (SerializationException exception) {
* writeln(exception);
* throw exception;
* };
* ---
*/
ErrorCallback errorCallback ()
{
return archive.errorCallback;
}
/**
* This callback will be called when an unexpected event occurs, i.e. an expected element
* is missing in the deserialization process.
*
* Examples:
* ---
* auto archive = new XmlArchive!();
* auto serializer = new Serializer(archive);
* serializer.errorCallback = (SerializationException exception) {
* writeln(exception);
* throw exception;
* };
* ---
*/
ErrorCallback errorCallback (ErrorCallback errorCallback)
{
return archive.errorCallback = errorCallback;
}
private
{
struct ValueMeta
{
Id id = Id.max;
string key;
bool isValid ()
{
return id != Id.max && key.length > 0;
}
}
static
{
void function (Serializer serializer, in Object, Mode mode) [ClassInfo] registeredTypes;
RegisterBase[string] serializers;
RegisterBase[string] deserializers;
}
Archive archive_;
size_t keyCounter;
Id idCounter;
RegisterBase[string] overriddenSerializers;
RegisterBase[string] overriddenDeserializers;
Id[void*] serializedReferences;
void*[Id] deserializedReferences;
Array[Id] serializedArrays;
void[][Id] deserializedSlices;
void**[Id] deserializedPointers;
ValueMeta[void*] serializedValues;
const(void)*[Id] deserializedValues;
bool hasBegunSerializing;
bool hasBegunDeserializing;
void delegate (SerializationException exception) throwOnErrorCallback;
void delegate (SerializationException exception) doNothingOnErrorCallback;
Mode mode;
}
/**
* Creates a new serializer using the given archive.
*
* The archive is the backend of the (de)serialization process, it performs the low
* level (de)serialization of primitive values and it decides the final format of the
* serialized data.
*
* Params:
* archive = the archive that should be used for this serializer
*
* Examples:
* ---
* auto archive = new XmlArchive!();
* auto serializer = new Serializer(archive);
* ---
*/
this (Archive archive)
{
this.archive_ = archive;
throwOnErrorCallback = (SerializationException exception) { throw exception; };
doNothingOnErrorCallback = (SerializationException exception) { /* do nothing */ };
setThrowOnErrorCallback();
}
/**
* Registers the given type for (de)serialization.
*
* This method is used for register classes that will be (de)serialized through base
* class references, no other types need to be registered. If the the user tries to
* (de)serialize an instance through a base class reference which runtime type is not
* registered an exception will be thrown.
*
* Params:
* T = the type to register, must be a class
*
* Examples:
* ---
* class Base {}
* class Sub : Base {}
*
* Serializer.register!(Sub);
*
* auto archive = new XmlArchive!();
* auto serializer = new Serializer(archive);
*
* Base b = new Sub;
* serializer.serialize(b);
* ---
*
* See_Also: registerSerializer
* See_Also: registerDeserializer
*/
static void register (T : Object) ()
{
registeredTypes[T.classinfo] = &downcastSerialize!(T);
}
private static void downcastSerialize (U : Object) (Serializer serializer, in Object value, Mode mode)
{
alias Unqual!(U) T;
static if (!isNonSerialized!(T)())
{
auto casted = cast(T) value;
assert(casted);
assert(casted.classinfo is T.classinfo);
if (mode == serializing)
serializer.objectStructSerializeHelper(casted);
else
serializer.objectStructDeserializeHelper(casted);
}
}
/**
* Registers a serializer for the given type.
*
* The given callback will be called when a value of the given type is about to
* be serialized. This method can be used as an alternative to $(I register). This
* method can also be used as an alternative to Serializable.toData.
*
* This is method should also be used to perform custom serialization of third party
* types or when otherwise chaining an already existing type is not desired.
*
* Params:
* dg = the callback that will be called when value of the given type is about to be serialized
*
* Examples:
* ---
* class Base {}
* class Foo : Base {}
*
* auto archive = new XmlArchive!();
* auto serializer = new Serializer(archive);
*
* auto dg = (Base value, Serializer serializer, Data key) {
* // perform serialization
* };
*
* Serializer.registerSerializer!(Foo)(dg);
* ---
*
* See_Also: register
* See_Also: registerDeserializer
* See_Also: Serializable.toData
*/
static void registerSerializer (Derived, Base) (void delegate (Base, Serializer, Data) dg)
{
Serializer.serializers[typeid(Derived).toString] = toSerializeRegisterWrapper(dg);
}
/**
* Registers a serializer for the given type.
*
* The given callback will be called when a value of the given type is about to
* be serialized. This method can be used as an alternative to $(I register). This
* method can also be used as an alternative to Serializable.toData.
*
* This is method should also be used to perform custom serialization of third party
* types or when otherwise chaining an already existing type is not desired.
*
* Params:
* dg = the callback that will be called when value of the given type is about to be serialized
*
* Examples:
* ---
* class Base {}
* class Foo : Base {}
*
* auto archive = new XmlArchive!();
* auto serializer = new Serializer(archive);
*
* void func (Base value, Serializer serializer, Data key) {
* // perform serialization
* }
*
* Serializer.registerSerializer!(Foo)(&func);
* ---
*
* See_Also: register
* See_Also: registerDeserializer
* See_Also: Serializable.toData
*/
static void registerSerializer (Derived, Base) (void function (Base, Serializer, Data) func)
{
Serializer.serializers[typeid(Derived).toString] = toSerializeRegisterWrapper(func);
}
/**
* Registers a deserializer for the given type.
*
* The given callback will be called when a value of the given type is about to
* be deserialized. This method can be used as an alternative to $(I register). This
* method can also be used as an alternative to Serializable.fromData.
*
* This is method should also be used to perform custom deserialization of third party
* types or when otherwise chaining an already existing type is not desired.
*
* Params:
* dg = the callback that will be called when value of the given type is about to be deserialized
*
* Examples:
* ---
* class Base {}
* class Foo : Base {}
*
* auto archive = new XmlArchive!();
* auto serializer = new Serializer(archive);
*
* auto dg = (ref Base value, Serializer serializer, Data key) {
* // perform deserialization
* };
*
* Serializer.registerDeserializer!(Foo)(dg);
* ---
*
* See_Also: register
* See_Also: registerSerializer
* See_Also: Serializable.fromData
*/
static void registerDeserializer (Derived, Base) (void delegate (ref Base, Serializer, Data) dg)
{
Serializer.deserializers[typeid(Derived).toString] = toDeserializeRegisterWrapper(dg);
}
/**
* Registers a deserializer for the given type.
*
* The given callback will be called when a value of the given type is about to
* be deserialized. This method can be used as an alternative to $(I register). This
* method can also be used as an alternative to Serializable.fromData.
*
* This is method should also be used to perform custom deserialization of third party
* types or when otherwise chaining an already existing type is not desired.
*
* Params:
* dg = the callback that will be called when value of the given type is about to be deserialized
*
* Examples:
* ---
* class Base {}
* class Foo : Base {}
*
* auto archive = new XmlArchive!();
* auto serializer = new Serializer(archive);
*
* void func (ref Base value, Serializer serializer, Data key) {
* // perform deserialization
* }
*
* Serializer.registerDeserializer!(Foo)(&func);
* ---
*
* See_Also: register
* See_Also: registerSerializer
* See_Also: Serializable.fromData
*/
static void registerDeserializer (Derived, Base) (void function (ref Base, Serializer, Data) func)
{
Serializer.deserializers[typeid(Derived).toString] = toDeserializeRegisterWrapper(func);
}
/**
* Overrides a globally registered serializer for the given type with a serializer
* local to the receiver.
*
* The receiver will first check if a local serializer is registered, otherwise a global
* serializer will be used (if available).
*
* Params:
* dg = the callback that will be called when value of the given type is about to be serialized
*
* Examples:
* ---
* class Base {}
* class Foo : Base {}
*
* auto archive = new XmlArchive!();
* auto serializer = new Serializer(archive);
*
* auto dg = (Base value, Serializer serializer, Data key) {
* // perform serialization
* };
*
* Serializer.registerSerializer!(Foo)(dg);
*
* auto overrideDg = (Base value, Serializer serializer, Data key) {
* // this will override the above serializer
* }
*
* serializer.overrideSerializer!(Foo)(overrideDg);
* ---
*/
void overrideSerializer (Derived, Base) (void delegate (Base, Serializer, Data) dg)
{
overriddenSerializers[typeid(Derived).toString] = toSerializeRegisterWrapper(dg);
}
/**
* Overrides a globally registered serializer for the given type with a serializer
* local to the receiver.
*
* The receiver will first check if a local serializer is registered, otherwise a global
* serializer will be used (if available).
*
* Params:
* dg = the callback that will be called when value of the given type is about to be serialized
*
* Examples:
* ---
* class Base {}
* class Foo : Base {}
*
* auto archive = new XmlArchive!();
* auto serializer = new Serializer(archive);
*
* void func (Base value, Serializer serializer, Data key) {
* // perform serialization
* }
*
* Serializer.registerSerializer!(Foo)(&func);
*
* void overrideFunc (Base value, Serializer serializer, Data key) {
* // this will override the above serializer
* }
*
* serializer.overrideSerializer!(Foo)(&overrideFunc);
* ---
*/
void overrideSerializer (Derived, Base) (void function (Base, Serializer, Data) func)
{
overriddenSerializers[typeid(Derived).toString] = toSerializeRegisterWrapper(func);
}
/**
* Overrides a globally registered deserializer for the given type with a deserializer
* local to the receiver.
*
* The receiver will first check if a local deserializer is registered, otherwise a global
* deserializer will be used (if available).
*
* Params:
* dg = the callback that will be called when value of the given type is about to be deserialized
*
* Examples:
* ---
* class Base {}
* class Foo : Base {}
*
* auto archive = new XmlArchive!();
* auto serializer = new Serializer(archive);
*
* auto dg = (ref Base value, Serializer serializer, Data key) {
* // perform deserialization
* };
*
* Serializer.registerSerializer!(Foo)(dg);
*
* auto overrideDg = (ref Base value, Serializer serializer, Data key) {
* // this will override the above deserializer
* };
*
* serializer.overrideSerializer!(Foo)(overrideDg);
* ---
*/
void overrideDeserializer (Derived, Base) (void delegate (ref Base, Serializer, Data) dg)
{
overriddenDeserializers[typeid(Derived).toString] = toDeserializeRegisterWrapper(dg);
}
/**
* Overrides a globally registered deserializer for the given type with a deserializer
* local to the receiver.
*
* The receiver will first check if a local deserializer is registered, otherwise a global
* deserializer will be used (if available).
*
* Params:
* dg = the callback that will be called when value of the given type is about to be deserialized
*
* Examples:
* ---
* class Base {}
* class Foo : Base {}
*
* auto archive = new XmlArchive!();
* auto serializer = new Serializer(archive);
*
* void func (ref Base value, Serializer serializer, Data key) {
* // perform deserialization
* }
*
* Serializer.registerSerializer!(Foo)(&func);
*
* void overrideFunc (ref Base value, Serializer serializer, Data key) {
* // this will override the above deserializer
* }
*
* serializer.overrideSerializer!(Foo)(&overrideFunc);
* ---
*/
void overrideDeserializer (Derived, Base) (void function (ref Base, Serializer, Data) func)
{
overriddenDeserializers[typeid(Derived).toString] = toDeserializeRegisterWrapper(func);
}
/// Returns the receivers archive
Archive archive ()
{
return archive_;
}
/**
* Set the error callback to throw when an error occurs
*
* See_Also: setDoNothingOnErrorCallback
*/
void setThrowOnErrorCallback ()
{
errorCallback = throwOnErrorCallback;
}
/**
* Set the error callback do nothing when an error occurs
*
* See_Also: setThrowOnErrorCallback
*/
void setDoNothingOnErrorCallback ()
{
errorCallback = doNothingOnErrorCallback;
}
/**
* Resets all registered types registered via the "register" method
*
* See_Also: register
*/
static void resetRegisteredTypes ()
{
registeredTypes = null;
}
/**
* Resets all registered (de)serializers registered via the "registerSerializer" method.
* This method will not reset the overridden (de)serializers.
*
* See_Also: registerSerializer
* See_Also: registerDeserializer
*/
static void resetSerializers ()
{
serializers = null;
deserializers = null;
}
/**
* Resets the serializer.
*
* All internal data is reset, including the archive. After calling this method the
* serializer can be used to start a completely new (de)serialization process.
*/
void reset ()
{
resetCounters();
overriddenSerializers = null;
overriddenDeserializers = null;
serializedReferences = null;
deserializedReferences = null;
serializedArrays = null;
deserializedSlices = null;
serializedValues = null;
deserializedValues = null;
deserializedPointers = null;
hasBegunSerializing = false;
hasBegunDeserializing = false;
archive.reset;
mode = Mode.init;
}
/**
* Serializes the given value.
*
* Params:
* value = the value to serialize
* key = associates the value with the given key. This key can later be used to
* deserialize the value
*
* Examples:
* ---
* auto archive = new XmlArchive!();
* auto serializer = new Serializer(archive);
*
* serializer.serialize(1);
* serializer.serialize(2, "b");
* ---
*
* Returns: return the serialized data, in an untyped format.
*
* Throws: SerializationException if an error occurs
*/
Data serialize (T) (T value, string key = null)
{
mode = serializing;
if (!hasBegunSerializing)
hasBegunSerializing = true;
serializeInternal(value, key);
postProcess;
return archive.untypedData;
}
/**
* Serializes the base class(es) of an instance.
*
* This method is used when performing custom serialization of a given type. If this
* method is not called when performing custom serialization none of the instance's
* base classes will be serialized.
*
* Params:
* value = the instance which base class(es) should be serialized, usually $(D_CODE this)
*
* Examples:
* ---
* class Base {}
* class Sub : Base
* {
* void toData (Serializer serializer, Serializer.Data key)
* {
* // perform serialization
* serializer.serializeBase(this);
* }
* }
* ---
*
* Throws: SerializationException if an error occurs
*/
void serializeBase (T) (T value)
{
static if (isObject!(T) && !is(Unqual!(T) == Object))
serializeBaseTypes(value);
}
private void serializeInternal (U) (ref U value, string key = null, Id id = Id.max)
{
alias Unqual!(U) T;
if (!key)
key = nextKey;
if (id == Id.max)
id = nextId;
archive.beginArchiving();
static if (isObject!(T))
serializeObject(value, key, id);
else static if (isStruct!(T))
serializeStruct(value, key, id);
else static if (isString!(T))
serializeString(value, key, id);
else static if (isArray!(T))
serializeArray(value, key, id);
else static if (isAssociativeArray!(T))
serializeAssociativeArray(value, key, id);
else static if (isPrimitive!(T))
serializePrimitive(value, key, id);
else static if (isPointer!(T))
{
static if (isFunctionPointer!(T))
goto error;
else
serializePointer(value, key, id);
}
else static if (isEnum!(T))
serializeEnum(value, key, id);
else
{
error:
error(format!(`The type "`, T, `" cannot be serialized.`));
}
}
private void serializeObject (T) (T value, string key, Id id) if (isObject!(T))
{
auto typeName = typeid(T).toString;
static if (!isNonSerialized!(T)())
{
if (!value)
return archive.archiveNull(typeName, key);
auto reference = getSerializedReference(value);
if (reference != Id.max)
return archive.archiveReference(key, reference);
auto untypedValue = cast(Object) value;
auto runtimeType = untypedValue.classinfo.name;
addSerializedReference(value, id);
triggerEvents(value, {
archive.archiveObject(runtimeType, typeName, key, id, {
if (auto serializer = runtimeType in overriddenSerializers)
callSerializer(serializer, value, key);
else if (auto serializer = runtimeType in Serializer.serializers)
callSerializer(serializer, value, key);
else static if (isSerializable!(T))
value.toData(this, key);
else
{
if (isInterface!(T) || isBaseClass(value))
{
if (auto serializer = untypedValue.classinfo in registeredTypes)
(*serializer)(this, untypedValue, serializing);
else
error(`The object of the static type "` ~ typeName ~
`" have a different runtime type (` ~ runtimeType ~
`) and therefore needs to either register its type or register a serializer for its type "`
~ runtimeType ~ `".`);
}
else
objectStructSerializeHelper(value);
}
});
});
}
}
private void serializeStruct (T) (T value, string key, Id id)
{
static if (!isNonSerialized!(T)())
{
string type = typeid(T).toString;
triggerEvents(value, {
archive.archiveStruct(type, key, id, {
if (auto serializer = type in overriddenSerializers)
callSerializer(serializer, value, key);
else if (auto serializer = type in Serializer.serializers)
callSerializer(serializer, value, key);
else
{
static if (isSerializable!(T))
value.toData(this, key);
else
objectStructSerializeHelper(value);
}
});
});
}
}
private void serializeString (T) (T value, string key, Id id)
{
auto array = Array(cast(void*) value.ptr, value.length, ElementTypeOfArray!(T).sizeof);
archive.archive(value, key, id);
if (value.length > 0)
addSerializedArray(array, id);
}
private void serializeArray (T) (ref T value, string key, Id id)
{
auto array = Array(value.ptr, value.length, ElementTypeOfArray!(T).sizeof);
archive.archiveArray(array, arrayToString!(T), key, id, {
for (size_t i = 0; i < value.length; i++)
{
const e = value[i];
serializeInternal(e, toData(i));
}
});
if (value.length > 0)
addSerializedArray(array, id);
}
private void serializeAssociativeArray (T) (T value, string key, Id id)
{
auto reference = getSerializedReference(value);
if (reference != Id.max)
return archive.archiveReference(key, reference);
addSerializedReference(value, id);
string keyType = typeid(KeyTypeOfAssociativeArray!(T)).toString;
string valueType = typeid(ValueTypeOfAssociativeArray!(T)).toString;
archive.archiveAssociativeArray(keyType, valueType, value.length, key, id, {
size_t i;
foreach(k, v ; value)
{
archive.archiveAssociativeArrayKey(toData(i), {
serializeInternal(k, toData(i));
});
archive.archiveAssociativeArrayValue(toData(i), {
serializeInternal(v, toData(i));
});
i++;
}
});
}
private void serializePointer (T) (T value, string key, Id id)
{
if (!value)
return archive.archiveNull(typeid(T).toString, key);
auto reference = getSerializedReference(value);
if (reference != Id.max)
return archive.archiveReference(key, reference);
archive.archivePointer(key, id, {
if (auto serializer = key in overriddenSerializers)
callSerializer(serializer, value, key);
else if (auto serializer = key in Serializer.serializers)
callSerializer(serializer, value, key);
else static if (isSerializable!(T))
value.toData(this, key);
else
{
static if (isVoid!(BaseTypeOfPointer!(T)))
error(`The value with the key "` ~ to!(string)(key) ~ `"` ~
format!(` of the type "`, T, `" cannot be serialized on `,
`its own, either implement orange.serialization.Serializable`,
`.isSerializable or register a serializer.`));
else
{
auto valueMeta = getSerializedValue(value);
if (valueMeta.isValid)
archive.archiveReference(nextKey, valueMeta.id);
else
serializeInternal(*value, nextKey);
}
}
});
addSerializedReference(value, id);
}
private void serializeEnum (T) (T value, string key, Id id)
{
alias BaseTypeOfEnum!(T) EnumBaseType;
auto val = cast(EnumBaseType) value;
string type = typeid(T).toString;
archive.archiveEnum(val, type, key, id);
}
private void serializePrimitive (T) (T value, string key, Id id)
{
archive.archive(value, key, id);
}
/**
* Deserializes the given data to value of the given type.
*
* This is the main method used for deserializing data.
*
* Examples:
* ---
* auto archive = new XmlArchive!();
* auto serializer = new Serializer(archive);
*
* auto data = serializer.serialize(1);
* auto i = serializer.deserialize!(int)(data);
*
* assert(i == 1);
* ---
*
* Params:
* T = the type to deserialize the data into
* data = the serialized untyped data to deserialize
* key = the key associate with the value that was used during serialization.
* Do not specify a key if no key was used during serialization.
*
* Returns: the deserialized value. A different runtime type can be returned
* if the given type is a base class.
*
* Throws: SerializationException if an error occurs
*/
T deserialize (T) (Data data, string key = "")
{
mode = deserializing;
if (hasBegunSerializing && !hasBegunDeserializing)
resetCounters();
if (!hasBegunDeserializing)
hasBegunDeserializing = true;
if (key.empty())
key = nextKey;
archive.beginUnarchiving(data);
auto value = deserializeInternal!(T)(key);
deserializingPostProcess;
return value;
}
/**
* Deserializes the value with the given associated key.
*
* This method should only be called when performing custom an deserializing a value
* that is part of an class or struct. If this method is called before that actual
* deserialization process has begun an SerializationException will be thrown.
* Use this method if a key was specified during the serialization process.
*
* Examples:
* ---
* class Foo
* {
* int a;
*
* void fromData (Serializer serializer, Serializer.Data key)
* {
* a = serializer!(int)("a");
* }
* }
* ---
*
* Params:
* key = the key associate with the value that was used during serialization.
*
* Returns: the deserialized value. A different runtime type can be returned
* if the given type is a base class.
*
* Throws: SerializationException if this method is called before
* the actual deserialization process has begun.
*
* Throws: SerializationException if an error occurs
*/
T deserialize (T) (string key)
{
if (!hasBegunDeserializing)
error("Cannot deserialize without any data, this method should" ~
"only be called after deserialization has begun.");
return deserialize!(T)(archive.untypedData, key);
}
/**
* Deserializes the value with the given associated key.
*
* This method should only be called when performing custom an deserializing a value
* that is part of an class or struct. If this method is called before that actual
* deserialization process has begun an SerializationException will be thrown.
* Use this method if no key was specified during the serialization process.
*
* Examples:
* ---
* class Foo
* {
* int a;
*
* void fromData (Serializer serializer, Serializer.Data key)
* {
* a = serializer!(int)();
* }
* }
* ---
*
* Params:
* key = the key associate with the value that was used during serialization.
*
* Returns: the deserialized value. A different runtime type can be returned
* if the given type is a base class.
*
* Throws: SerializationException if this method is called before
* the actual deserialization process has begun.
*
* Throws: SerializationException if an error occurs
*/
T deserialize (T) ()
{
return deserialize!(T)("");
}
/**
* Deserializes the base class(es) of an instance.
*
* This method is used when performing custom deserialization of a given type. If this
* method is not called when performing custom deserialization none of the instance's
* base classes will be serialized.
*
* Params:
* value = the instance which base class(es) should be deserialized,
* usually $(D_CODE this)
*
* Examples:
* ---
* class Base {}
* class Sub : Base
* {
* void fromData (Serializer serializer, Serializer.Data key)
* {
* // perform deserialization
* serializer.deserializeBase(this);
* }
* }
* ---
*
* Throws: SerializationException if an error occurs
*/
void deserializeBase (T) (T value)
{
static if (isObject!(T) && !is(Unqual!(T) == Object))
deserializeBaseTypes(value);
}
private Unqual!(U) deserializeInternal (U, Key) (Key keyOrId)
{
Id dummy;
return deserializeInternal!(U, Key)(keyOrId, dummy);
}
private Unqual!(U) deserializeInternal (U, Key) (Key keyOrId, out Id id)
{
alias Unqual!(U) T;
static if (isObject!(T))
return deserializeObject!(T)(keyOrId, id);
else static if (isStruct!(T))
return deserializeStruct!(T)(keyOrId, id);
else static if (isString!(T))
return deserializeString!(T)(keyOrId, id);
else static if (isStaticArray!(T))
return deserializeStaticArray!(T)(keyOrId, id);
else static if (isArray!(T))
return deserializeArray!(T)(keyOrId, id);
else static if (isAssociativeArray!(T))
return deserializeAssociativeArray!(T)(keyOrId, id);
else static if (isPrimitive!(T))
return deserializePrimitive!(T)(keyOrId, id);
else static if (isPointer!(T))
{
static if (isFunctionPointer!(T))
goto error;
return deserializePointer!(T)(keyOrId, id).value;
}
else static if (isEnum!(T))
return deserializeEnum!(T)(keyOrId, id);
else
{
error:
error(format!(`The type "`, T, `" cannot be deserialized.`));
}
}
private Unqual!(U) deserializeObject (U, Key) (Key keyOrId, out Id id)
{
alias Unqual!(U) T;
static if (!isNonSerialized!(T)())
{
id = deserializeReference(keyOrId);
if (auto reference = getDeserializedReference!(T)(id))
return *reference;
T value;
Object untypedValue;
nextId;
archive.unarchiveObject(keyOrId, id, untypedValue, {
value = cast(T) untypedValue;
addDeserializedReference(value, id);
assert(untypedValue !is null, format!("Failed to unarchive object of type '", T, "' with key '") ~ to!(string)(keyOrId) ~ "'");
triggerEvents(value, {
auto runtimeType = untypedValue.classinfo.name;
auto runHelper = false;
static if (isString!(Key))
{
if (auto deserializer = runtimeType in overriddenDeserializers)
callSerializer(deserializer, value, keyOrId);
else if (auto deserializer = runtimeType in Serializer.deserializers)
callSerializer(deserializer, value, keyOrId);
else static if (isSerializable!(T))
value.fromData(this, keyOrId);
else
runHelper = true;
}
else
runHelper = true;
if (runHelper)
{
if (isInterface!(T) || isBaseClass(value))
{
if (auto deserializer = untypedValue.classinfo in registeredTypes)
(*deserializer)(this, untypedValue, deserializing);
else
error(`The object of the static type "` ~ typeid(T).toString ~
`" have a different runtime type (` ~ runtimeType ~
`) and therefore needs to either register its type or register a deserializer for its type "`
~ runtimeType ~ `".`);
}
else
objectStructDeserializeHelper(value);
}
});
});
return value;
}
return T.init;
}
private T deserializeStruct (T, U) (U key, out Id id)
{
T value;
static if (!isNonSerialized!(T)())
{
nextId;
id = archive.unarchiveStruct(key, {
triggerEvents(value, {
auto type = toData(typeid(T).toString);
auto runHelper = false;
static if (isString!(U))
{
if (auto deserializer = type in overriddenDeserializers)
callSerializer(deserializer, value, key);
else if (auto deserializer = type in Serializer.deserializers)
callSerializer(deserializer, value, key);
else
runHelper = true;
}
else
runHelper = true;
if (runHelper)
{
static if (isSerializable!(T))
value.fromData(this, key);
else
objectStructDeserializeHelper(value);
}
});
});
}
return value;
}
private T deserializeString (T) (string key, out Id id)
{
auto slice = deserializeSlice(key);
if (auto tmp = getDeserializedSlice!(T)(slice))
return tmp;
T value;
if (slice.id != size_t.max)
{
static if (is(T == string))
value = toSlice(archive.unarchiveString(slice.id), slice);
else static if (is(T == wstring))
value = toSlice(archive.unarchiveWstring(slice.id), slice);
else static if (is(T == dstring))
value = toSlice(archive.unarchiveDstring(slice.id), slice);
}
else
{
static if (is(T == string))
value = archive.unarchiveString(key, slice.id);
else static if (is(T == wstring))
value = archive.unarchiveWstring(key, slice.id);
else static if (is(T == dstring))
value = archive.unarchiveDstring(key, slice.id);
}
addDeserializedSlice(value, slice.id);
id = slice.id;
return value;
}
private T deserializeArray (T) (string key, out Id id)
{
auto slice = deserializeSlice(key);
if (auto tmp = getDeserializedSlice!(T)(slice))
return tmp;
alias ElementTypeOfArray!(T) E;
alias Unqual!(E) UnqualfiedE;
UnqualfiedE[] buffer;
T value;
auto dg = (size_t length) {
buffer.length = length;
foreach (i, ref e ; buffer)
e = deserializeInternal!(typeof(e))(toData(i));
};
if (slice.id != size_t.max) // Deserialize slice
{
id = slice.id;
archive.unarchiveArray(slice.id, dg);
assumeUnique(buffer, value);
addDeserializedSlice(value, slice.id);
return toSlice(value, slice);
}
else // Deserialize array
{
id = archive.unarchiveArray(key, dg);
if (auto arr = id in deserializedSlices)
return cast(T) *arr;
assumeUnique(buffer, value);
addDeserializedSlice(value, id);
return value;
}
}
private T deserializeStaticArray (T) (string key, out Id id)
{
T value;
id = archive.unarchiveArray(key, (size_t length) {
foreach (i, ref e ; value)
e = deserializeInternal!(typeof(e))(toData(i));
});
return value;
}
private T deserializeAssociativeArray (T) (string key, out Id id)
{
id = deserializeReference(key);
if (auto reference = getDeserializedReference!(T)(id))
return *reference;
alias KeyTypeOfAssociativeArray!(T) Key;
alias ValueTypeOfAssociativeArray!(T) Value;
alias Unqual!(Key) UKey;
alias Unqual!(Value) UValue;
UValue[UKey] buffer;
id = archive.unarchiveAssociativeArray(key, (size_t length) {
for (size_t i = 0; i < length; i++)
{
UKey aaKey;
UValue aaValue;
auto k = toData(i);
archive.unarchiveAssociativeArrayKey(k, {
aaKey = deserializeInternal!(Key)(k);
});
archive.unarchiveAssociativeArrayValue(k, {
aaValue = deserializeInternal!(Value)(k);
});
buffer[aaKey] = aaValue;
}
});
T value = buffer;
addDeserializedReference(value, id);
return value;
}
private Pointer!(T) deserializePointer (T) (string key)
{
auto pointeeId = deserializeReference(key);
if (auto reference = getDeserializedReference!(T)(pointeeId))
return Pointer!(T)(*reference, Id.max);
alias BaseTypeOfPointer!(T) BaseType;
alias Unqual!(BaseType) UnqualfiedBaseType;
auto pointer = new UnqualfiedBaseType;
auto pointerId = archive.unarchivePointer(key, {
if (auto deserializer = key in overriddenDeserializers)
callSerializer(deserializer, pointer, key);
else if (auto deserializer = key in Serializer.deserializers)
callSerializer(deserializer, pointer, key);
else static if (isSerializable!(T))
pointer.fromData(this, key);
else
{
static if (isVoid!(BaseTypeOfPointer!(T)))
error(`The value with the key "` ~ to!(string)(key) ~ `"` ~
format!(` of the type "`, T, `" cannot be ` ~
"deserialized on its own, either implement " ~
"orange.serialization.Serializable.isSerializable or " ~
"register a deserializer."));
else
{
auto k = nextKey;
pointeeId = deserializeReference(k);
if (pointeeId == Id.max)
*pointer = deserializeInternal!(UnqualfiedBaseType)(k);
}
}
});
if (pointeeId != Id.max)
*pointer = deserializeInternal!(UnqualfiedBaseType)(pointeeId);
addDeserializedReference(pointer, pointerId);
return Pointer!(T)(cast(T) pointer, pointerId, pointeeId);
}
private T deserializeEnum (T, U) (U keyOrId, out Id id)
{
alias BaseTypeOfEnum!(T) Enum;
enum functionName = toUpper(Enum.stringof[0]) ~ Enum.stringof[1 .. $];
static if (is(U == Id))
enum params = "(keyOrId);";
else
enum params = "(keyOrId, id);";
mixin("return cast(T) archive.unarchiveEnum" ~ functionName ~ params);
}
private T deserializePrimitive (T, U) (U keyOrId, out Id id)
{
enum functionName = toUpper(T.stringof[0]) ~ T.stringof[1 .. $];
static if (is(U == Id))
enum params = "(keyOrId);";
else
enum params = "(keyOrId, id);";
mixin("return archive.unarchive" ~ functionName ~ params);
}
private Id deserializeReference (string key)
{
return archive.unarchiveReference(key);
}
private Slice deserializeSlice (string key)
{
return archive.unarchiveSlice(key);
}
private void objectStructSerializeHelper (T) (ref T value)
{
static assert(isStruct!(T) || isObject!(T), format!(`The given value of the type "`, T, `" is not a valid type, the only valid types for this method are objects and structs.`));
enum nonSerializedFields = collectAnnotations!(T);
foreach (i, _ ; typeof(T.tupleof))
{
enum field = nameOfFieldAt!(T, i);
alias attributes = getAttributes!(T.tupleof[i]);
static if (attributes.contains!(nonSerialized) ||
ctfeContains!(string)(internalFields, field) ||
ctfeContains!(string)(nonSerializedFields, field))
{
continue;
}
alias typeof(T.tupleof[i]) Type;
auto id = nextId;
static if (isPointer!(Type))
auto pointer = value.tupleof[i];
else
auto pointer = &value.tupleof[i];
auto reference = getSerializedReference(value.tupleof[i]);
if (reference != Id.max)
archive.archiveReference(field, reference);
else
{
auto valueMeta = getSerializedValue(pointer);
if (valueMeta.isValid)
serializePointer(pointer, toData(field), id);
else
{
serializeInternal(value.tupleof[i], toData(field), id);
addSerializedValue(pointer, id, toData(keyCounter));
}
}
}
static if (isObject!(T) && !is(Unqual!(T) == Object))
serializeBaseTypes(value);
}
private void objectStructDeserializeHelper (T) (ref T value)
{
static assert(isStruct!(T) || isObject!(T), format!(`The given value of the type "`, T, `" is not a valid type, the only valid types for this method are objects and structs.`));
enum nonSerializedFields = collectAnnotations!(T);
static if (isObject!(T))
auto rawObject = cast(void*) value;
else
auto rawObject = cast(void*) &value;
foreach (i, _ ; typeof(T.tupleof))
{
enum field = nameOfFieldAt!(T, i);
alias attributes = getAttributes!(T.tupleof[i]);
static if (attributes.contains!(nonSerialized) ||
ctfeContains!(string)(internalFields, field) ||
ctfeContains!(string)(nonSerializedFields, field))
{
continue;
}
alias TypeOfField!(T, field) QualifiedType;
alias Unqual!(QualifiedType) Type;
auto id = deserializeReference(field);
auto isReference = id != Id.max;
auto offset = value.tupleof[i].offsetof;
auto fieldAddress = cast(Type*) (rawObject + offset);
static if (isPointer!(Type))
{
auto pointer = deserializePointer!(Type)(toData(field));
Type pointerValue;
if (pointer.hasPointee)
pointerValue = getDeserializedValue!(Type)(pointer.pointee);
else
pointerValue = pointer.value;
*fieldAddress = pointerValue;
addDeserializedPointer(value.tupleof[i], pointer.id);
}
else
{
auto pointer = getDeserializedPointer!(Type*)(id);
if (isReference && pointer)
{
*fieldAddress = **pointer;
*pointer = cast(Type*) &value.tupleof[i];
}
else
{
*fieldAddress = deserializeInternal!(Type)(toData(field), id);
addDeserializedValue(value.tupleof[i], id);
static if (isStaticArray!(Type))
addDeserializedSlice(value.tupleof[i], id);
}
}
}
static if (isObject!(T) && !is(Unqual!(T) == Object))
deserializeBaseTypes(value);
}
private void serializeBaseTypes (T) (inout T value) if (isObject!(T))
{
static if (hasNonObjectBaseType!(T))
{
alias Base = BaseTypeTupleOf!(T)[0];
archive.archiveBaseClass(typeid(Base).toString, nextKey, nextId);
inout Base base = value;
objectStructSerializeHelper(base);
}
}
private void deserializeBaseTypes (T) (T value) if (isObject!(T))
{
static if (hasNonObjectBaseType!(T))
{
alias Base = BaseTypeTupleOf!(T)[0];
archive.unarchiveBaseClass(nextKey);
Base base = value;
objectStructDeserializeHelper(base);
}
}
private void addSerializedReference (T) (T value, Id id)
{
alias Unqual!(T) Type;
static assert(isReference!(Type) || isAssociativeArray!(Type), format!(`The given type "`, T, `" is not a reference type, i.e. object, pointer or associative array.`));
serializedReferences[cast(void*) value] = id;
}
private void addDeserializedReference (T) (T value, Id id)
{
static assert(isReference!(T) || isAssociativeArray!(T), format!(`The given type "`, T, `" is not a reference type, i.e. object, pointer or associative array.`));
deserializedReferences[id] = cast(void*) value;
}
private void addDeserializedSlice (T) (ref T value, Id id)
{
static assert(isArray!(T) || isString!(T), format!(`The given type "`, T, `" is not a slice type, i.e. array or string.`));
deserializedSlices[id] = cast(void[]) value;
}
private void addSerializedValue (T) (T* value, Id id, string key)
{
serializedValues[value] = ValueMeta(id, key);
}
private void addDeserializedValue (T) (ref T value, Id id)
{
deserializedValues[id] = &value;
}
private void addDeserializedPointer (T) (ref T value, Id id)
{
deserializedPointers[id] = cast(void**) &value;
}
private Id getSerializedReference (T) (T value)
{
if (auto tmp = *(cast(void**) &value) in serializedReferences)
return *tmp;
return Id.max;
}
private ValueMeta getSerializedValue (T) (T* value)
{
if (auto tmp = value in serializedValues)
return *tmp;
return ValueMeta();
}
private T* getDeserializedReference (T) (Id id)
{
if (auto reference = id in deserializedReferences)
return cast(T*) reference;
return null;
}
private T getDeserializedSlice (T) (Slice slice)
{
if (auto array = slice.id in deserializedSlices)
{
auto typed = cast(T) *array;
return typed[slice.offset .. slice.offset + slice.length];
}
return null;
}
private T getDeserializedValue (T) (Id id)
{
if (auto value = id in deserializedValues)
return cast(T) *value;
return null;
}
private T* getDeserializedPointer (T) (Id id)
{
if (auto pointer = id in deserializedPointers)
return cast(T*) *pointer;
return null;
}
private T[] toSlice (T) (T[] array, Slice slice)
{
return array[slice.offset .. slice.offset + slice.length];
}
void callSerializer (T) (RegisterBase* baseWrapper, ref T value, string key)
{
if (mode == serializing)
{
auto wrapper = cast(SerializeRegisterWrapper!(T)) *baseWrapper;
wrapper(value, this, key);
}
else
{
auto wrapper = cast(DeserializeRegisterWrapper!(T)) *baseWrapper;
wrapper(value, this, key);
}
}
static private SerializeRegisterWrapper!(T) toSerializeRegisterWrapper (T) (void delegate (T, Serializer, Data) dg)
{
return new SerializeRegisterWrapper!(T)(dg);
}
static private SerializeRegisterWrapper!(T) toSerializeRegisterWrapper (T) (void function (T, Serializer, Data) func)
{
return new SerializeRegisterWrapper!(T)(func);
}
static private DeserializeRegisterWrapper!(T) toDeserializeRegisterWrapper (T) (void delegate (ref T, Serializer, Data) dg)
{
return new DeserializeRegisterWrapper!(T)(dg);
}
static private DeserializeRegisterWrapper!(T) toDeserializeRegisterWrapper (T) (void function (ref T, Serializer, Data) func)
{
return new DeserializeRegisterWrapper!(T)(func);
}
private void addSerializedArray (Array array, Id id)
{
serializedArrays[id] = array;
}
private void postProcess ()
{
postProcessArrays();
}
private void postProcessArrays ()
{
bool foundSlice = true;
foreach (sliceKey, slice ; serializedArrays)
{
foreach (arrayKey, array ; serializedArrays)
{
if (slice.isSliceOf(array) && slice != array)
{
auto s = Slice(slice.length, (slice.ptr - array.ptr) / slice.elementSize);
archive.archiveSlice(s, sliceKey, arrayKey);
foundSlice = true;
break;
}
else
foundSlice = false;
}
if (!foundSlice)
archive.postProcessArray(sliceKey);
}
}
private void deserializingPostProcess ()
{
deserializingPostProcessPointers;
}
private void deserializingPostProcessPointers ()
{
// foreach (pointeeId, pointee ; deserializedValues)
// {
// if (auto pointer = pointeeId in deserializedPointers)
// **pointer = pointee;
// }
}
private string arrayToString (T) ()
{
return typeid(ElementTypeOfArray!(T)).toString;
}
private bool isBaseClass (T) (T value)
{
return value.classinfo !is T.classinfo;
}
private Id nextId ()
{
return idCounter++;
}
private string nextKey ()
{
return toData(keyCounter++);
}
private void resetCounters ()
{
keyCounter = 0;
idCounter = 0;
}
private string toData (T) (T value)
{
return to!(string)(value);
}
private void triggerEvent (string name, T) (T value)
{
static assert (isObject!(T) || isStruct!(T), format!(`The given value of the type "`, T, `" is not a valid type, the only valid types for this method are objects and structs.`));
static if (hasAnnotation!(T, name))
{
mixin("auto event = T." ~ name ~ ";");
event(value);
}
}
private void triggertUdaEvent (alias event, T) (T value)
{
static assert (isObject!(T) || isStruct!(T), format!(`The given value of the type "`, T, `" is not a valid type, the only valid types for this method are objects and structs.`));
foreach (m ; __traits(allMembers, T))
{
static if (m != nonSerializedField)
{
mixin(`alias attrs = Attributes!(m, __traits(getAttributes, T.` ~ m ~ `));`);
static if (attrs.contains!(event))
__traits(getMember, value, m)();
}
}
}
private void triggerEvents (T) (T value, void delegate () dg)
{
if (mode == serializing)
{
triggerEvent!(onSerializingField)(value);
triggertUdaEvent!(onSerializing)(value);
}
else
{
triggerEvent!(onDeserializingField)(value);
triggertUdaEvent!(onDeserializing)(value);
}
dg();
if (mode == serializing)
{
triggerEvent!(onSerializedField)(value);
triggertUdaEvent!(onSerialized)(value);
}
else
{
triggerEvent!(onDeserializedField)(value);
triggertUdaEvent!(onDeserialized)(value);
}
}
private static bool isNonSerialized (T) ()
{
enum nonSerializedFields = collectAnnotations!(T);
return ctfeContains(nonSerializedFields, "this") || getAttributes!(T).contains!(nonSerialized);
}
private static template hasAnnotation (T, string annotation)
{
enum hasAnnotation = is(typeof({ mixin("const a = T." ~ annotation ~ ";"); }));
}
private static string[] collectAnnotations (T) ()
{
static assert (isObject!(T) || isStruct!(T), format!(`The given value of the type "`, T, `" is not a valid type, the only valid types for this method are objects and structs.`));
static if (hasAnnotation!(T, nonSerializedField))
return T.__nonSerialized;
else
return [];
}
private void error (string message, size_t line = __LINE__)
{
if (errorCallback)
errorCallback()(new SerializationException(message, __FILE__, line));
}
struct Pointer (T)
{
T value;
Id id = Id.max;
Id pointee = Id.max;
bool hasPointee ()
{
return pointee != Id.max;
}
}
private template hasNonObjectBaseType (T)
{
alias BaseTypes = BaseTypeTupleOf!(T);
enum hasNonObjectBaseType = BaseTypes.length > 0 &&
!is(Unqual!(BaseTypes[0]) == Object);
}
}
/**
* This struct is a type independent representation of an array. This struct is used
* when sending an array for archiving from the serializer to the archive.
*/
struct Array
{
const(void)* ptr;
/// The length of the array
size_t length;
/// The size of an individual element stored in the array, in bytes.
size_t elementSize;
/**
* Returns true if the given array is a slice of the receiver.
*
* Params:
* b = the array to check if it's a slice
*
* Returns: true if the given array is a slice of the receiver.
*/
bool isSliceOf (Array b)
{
return ptr >= b.ptr && ptr + length * elementSize <= b.ptr + b.length * b.elementSize;
}
}
/**
* This struct is a type independent representation of a slice. This struct is used
* when sending a slice for archiving from the serializer to the archive.
*/
struct Slice
{
/// The length of the slice.
size_t length;
/// The offset of the slice, i.e. where the slice begins in the array.
size_t offset;
/// The id of the slice. (Only used during unarchiving).
size_t id = size_t.max;
}
|
D
|
speaking softly without vibration of the vocal cords
a light noise, like the noise of silk clothing or leaves blowing in the wind
speak softly
|
D
|
/Users/pavelkurilov/Library/Mobile\ Documents/com~apple~CloudDocs/TestProjectForSibersCompanyByKurilovP/build/TestProjectForSibersCompanyByKurilovP.build/Debug-iphoneos/TestProjectForSibersCompanyByKurilovP.build/Objects-normal/arm64/DefaultCell.o : /Users/pavelkurilov/Library/Mobile\ Documents/com~apple~CloudDocs/TestProjectForSibersCompanyByKurilovP/TestProjectForSibersCompanyByKurilovP/Extensions/UIImageView+Cache.swift /Users/pavelkurilov/Library/Mobile\ Documents/com~apple~CloudDocs/TestProjectForSibersCompanyByKurilovP/TestProjectForSibersCompanyByKurilovP/Models/ErrorResponse.swift /Users/pavelkurilov/Library/Mobile\ Documents/com~apple~CloudDocs/TestProjectForSibersCompanyByKurilovP/TestProjectForSibersCompanyByKurilovP/AppDelegate.swift /Users/pavelkurilov/Library/Mobile\ Documents/com~apple~CloudDocs/TestProjectForSibersCompanyByKurilovP/TestProjectForSibersCompanyByKurilovP/Screens/CharacterImageScreen/CharactersImageViewModel.swift /Users/pavelkurilov/Library/Mobile\ Documents/com~apple~CloudDocs/TestProjectForSibersCompanyByKurilovP/TestProjectForSibersCompanyByKurilovP/Screens/CharacterDetailScreen/CharacterDetailViewModel.swift /Users/pavelkurilov/Library/Mobile\ Documents/com~apple~CloudDocs/TestProjectForSibersCompanyByKurilovP/TestProjectForSibersCompanyByKurilovP/Screens/CharacterDetailScreen/ChararcterDetailCellViewModels/CharacterImageCellViewModel.swift /Users/pavelkurilov/Library/Mobile\ Documents/com~apple~CloudDocs/TestProjectForSibersCompanyByKurilovP/TestProjectForSibersCompanyByKurilovP/Screens/CharactersListScreen/ChararcterCellViewModels/CharacterTableCellViewModel.swift /Users/pavelkurilov/Library/Mobile\ Documents/com~apple~CloudDocs/TestProjectForSibersCompanyByKurilovP/TestProjectForSibersCompanyByKurilovP/Screens/CharacterDetailScreen/ChararcterDetailCellViewModels/ChararcterDetailCellViewModel.swift /Users/pavelkurilov/Library/Mobile\ Documents/com~apple~CloudDocs/TestProjectForSibersCompanyByKurilovP/TestProjectForSibersCompanyByKurilovP/Screens/CharactersListScreen/CharactersListViewModel.swift /Users/pavelkurilov/Library/Mobile\ Documents/com~apple~CloudDocs/TestProjectForSibersCompanyByKurilovP/TestProjectForSibersCompanyByKurilovP/Screens/CharacterDetailScreen/Cells/CharacterImageTableCell.swift /Users/pavelkurilov/Library/Mobile\ Documents/com~apple~CloudDocs/TestProjectForSibersCompanyByKurilovP/TestProjectForSibersCompanyByKurilovP/Screens/CharacterDetailScreen/Cells/CharacterDetailTableCell.swift /Users/pavelkurilov/Library/Mobile\ Documents/com~apple~CloudDocs/TestProjectForSibersCompanyByKurilovP/TestProjectForSibersCompanyByKurilovP/Screens/CharactersListScreen/Cells/CharacterTableCell.swift /Users/pavelkurilov/Library/Mobile\ Documents/com~apple~CloudDocs/TestProjectForSibersCompanyByKurilovP/TestProjectForSibersCompanyByKurilovP/Base/DefaultCell.swift /Users/pavelkurilov/Library/Mobile\ Documents/com~apple~CloudDocs/TestProjectForSibersCompanyByKurilovP/TestProjectForSibersCompanyByKurilovP/Protocols/CharacterImageViewModelProtocol.swift /Users/pavelkurilov/Library/Mobile\ Documents/com~apple~CloudDocs/TestProjectForSibersCompanyByKurilovP/TestProjectForSibersCompanyByKurilovP/Protocols/CharacterDetailViewModelProtocol.swift /Users/pavelkurilov/Library/Mobile\ Documents/com~apple~CloudDocs/TestProjectForSibersCompanyByKurilovP/TestProjectForSibersCompanyByKurilovP/Protocols/CharacterDetailTableCellViewModelProtocol.swift /Users/pavelkurilov/Library/Mobile\ Documents/com~apple~CloudDocs/TestProjectForSibersCompanyByKurilovP/TestProjectForSibersCompanyByKurilovP/Protocols/CharactersListTableCellViewModelProtocol.swift /Users/pavelkurilov/Library/Mobile\ Documents/com~apple~CloudDocs/TestProjectForSibersCompanyByKurilovP/TestProjectForSibersCompanyByKurilovP/Protocols/CharactersListViewModelProtocol.swift /Users/pavelkurilov/Library/Mobile\ Documents/com~apple~CloudDocs/TestProjectForSibersCompanyByKurilovP/TestProjectForSibersCompanyByKurilovP/Helper/DiscardableImageCacheItem.swift /Users/pavelkurilov/Library/Mobile\ Documents/com~apple~CloudDocs/TestProjectForSibersCompanyByKurilovP/TestProjectForSibersCompanyByKurilovP/Models/Origin.swift /Users/pavelkurilov/Library/Mobile\ Documents/com~apple~CloudDocs/TestProjectForSibersCompanyByKurilovP/TestProjectForSibersCompanyByKurilovP/Models/Location.swift /Users/pavelkurilov/Library/Mobile\ Documents/com~apple~CloudDocs/TestProjectForSibersCompanyByKurilovP/TestProjectForSibersCompanyByKurilovP/Extensions/UITextField+ClearButton.swift /Users/pavelkurilov/Library/Mobile\ Documents/com~apple~CloudDocs/TestProjectForSibersCompanyByKurilovP/TestProjectForSibersCompanyByKurilovP/Models/Info.swift /Users/pavelkurilov/Library/Mobile\ Documents/com~apple~CloudDocs/TestProjectForSibersCompanyByKurilovP/TestProjectForSibersCompanyByKurilovP/Service/NetworkManager.swift /Users/pavelkurilov/Library/Mobile\ Documents/com~apple~CloudDocs/TestProjectForSibersCompanyByKurilovP/TestProjectForSibersCompanyByKurilovP/Screens/CharacterImageScreen/CharactersImageController.swift /Users/pavelkurilov/Library/Mobile\ Documents/com~apple~CloudDocs/TestProjectForSibersCompanyByKurilovP/TestProjectForSibersCompanyByKurilovP/Screens/CharacterDetailScreen/СharacterDetailController.swift /Users/pavelkurilov/Library/Mobile\ Documents/com~apple~CloudDocs/TestProjectForSibersCompanyByKurilovP/TestProjectForSibersCompanyByKurilovP/Screens/CharactersListScreen/CharactersListController.swift /Users/pavelkurilov/Library/Mobile\ Documents/com~apple~CloudDocs/TestProjectForSibersCompanyByKurilovP/TestProjectForSibersCompanyByKurilovP/Helper/HudHelper.swift /Users/pavelkurilov/Library/Mobile\ Documents/com~apple~CloudDocs/TestProjectForSibersCompanyByKurilovP/TestProjectForSibersCompanyByKurilovP/Models/Character.swift /Users/pavelkurilov/Library/Mobile\ Documents/com~apple~CloudDocs/TestProjectForSibersCompanyByKurilovP/TestProjectForSibersCompanyByKurilovP/Service/NetworkManagerError.swift /Users/pavelkurilov/Library/Mobile\ Documents/com~apple~CloudDocs/TestProjectForSibersCompanyByKurilovP/TestProjectForSibersCompanyByKurilovP/Screens/CharactersListScreen/CharactersListCoordinator.swift /Users/pavelkurilov/Library/Mobile\ Documents/com~apple~CloudDocs/TestProjectForSibersCompanyByKurilovP/TestProjectForSibersCompanyByKurilovP/Service/Requests/RequestFeeds.swift /Users/pavelkurilov/Library/Mobile\ Documents/com~apple~CloudDocs/TestProjectForSibersCompanyByKurilovP/TestProjectForSibersCompanyByKurilovP/Extensions/UIColor+AppColors.swift /Users/pavelkurilov/Library/Mobile\ Documents/com~apple~CloudDocs/TestProjectForSibersCompanyByKurilovP/TestProjectForSibersCompanyByKurilovP/Service/Requests/NetworkRequests.swift /Users/pavelkurilov/Library/Mobile\ Documents/com~apple~CloudDocs/TestProjectForSibersCompanyByKurilovP/TestProjectForSibersCompanyByKurilovP/Helper/ReachabilityConnect.swift /Users/pavelkurilov/Library/Mobile\ Documents/com~apple~CloudDocs/TestProjectForSibersCompanyByKurilovP/TestProjectForSibersCompanyByKurilovP/Service/Result.swift /Users/pavelkurilov/Library/Mobile\ Documents/com~apple~CloudDocs/TestProjectForSibersCompanyByKurilovP/TestProjectForSibersCompanyByKurilovP/Helper/Constant.swift /Users/pavelkurilov/Library/Mobile\ Documents/com~apple~CloudDocs/TestProjectForSibersCompanyByKurilovP/TestProjectForSibersCompanyByKurilovP/Service/NetworkEndpoint.swift /Users/pavelkurilov/Library/Mobile\ Documents/com~apple~CloudDocs/TestProjectForSibersCompanyByKurilovP/TestProjectForSibersCompanyByKurilovP/Base/Alert.swift /Users/pavelkurilov/Library/Mobile\ Documents/com~apple~CloudDocs/TestProjectForSibersCompanyByKurilovP/TestProjectForSibersCompanyByKurilovP/Screens/CharacterImageScreen/CharacterImageView.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/Dispatch.apinotesc /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/ObjectiveC.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/CoreImage.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/QuartzCore.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/Dispatch.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/Metal.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/CoreFoundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/CoreGraphics.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/UIKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/SwiftOnoneSupport.swiftmodule /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk/System/Library/Frameworks/OpenGLES.framework/Headers/OpenGLES.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImage.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/QuartzCore.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk/System/Library/Frameworks/Security.framework/Headers/Security.apinotes
/Users/pavelkurilov/Library/Mobile\ Documents/com~apple~CloudDocs/TestProjectForSibersCompanyByKurilovP/build/TestProjectForSibersCompanyByKurilovP.build/Debug-iphoneos/TestProjectForSibersCompanyByKurilovP.build/Objects-normal/arm64/DefaultCell~partial.swiftmodule : /Users/pavelkurilov/Library/Mobile\ Documents/com~apple~CloudDocs/TestProjectForSibersCompanyByKurilovP/TestProjectForSibersCompanyByKurilovP/Extensions/UIImageView+Cache.swift /Users/pavelkurilov/Library/Mobile\ Documents/com~apple~CloudDocs/TestProjectForSibersCompanyByKurilovP/TestProjectForSibersCompanyByKurilovP/Models/ErrorResponse.swift /Users/pavelkurilov/Library/Mobile\ Documents/com~apple~CloudDocs/TestProjectForSibersCompanyByKurilovP/TestProjectForSibersCompanyByKurilovP/AppDelegate.swift /Users/pavelkurilov/Library/Mobile\ Documents/com~apple~CloudDocs/TestProjectForSibersCompanyByKurilovP/TestProjectForSibersCompanyByKurilovP/Screens/CharacterImageScreen/CharactersImageViewModel.swift /Users/pavelkurilov/Library/Mobile\ Documents/com~apple~CloudDocs/TestProjectForSibersCompanyByKurilovP/TestProjectForSibersCompanyByKurilovP/Screens/CharacterDetailScreen/CharacterDetailViewModel.swift /Users/pavelkurilov/Library/Mobile\ Documents/com~apple~CloudDocs/TestProjectForSibersCompanyByKurilovP/TestProjectForSibersCompanyByKurilovP/Screens/CharacterDetailScreen/ChararcterDetailCellViewModels/CharacterImageCellViewModel.swift /Users/pavelkurilov/Library/Mobile\ Documents/com~apple~CloudDocs/TestProjectForSibersCompanyByKurilovP/TestProjectForSibersCompanyByKurilovP/Screens/CharactersListScreen/ChararcterCellViewModels/CharacterTableCellViewModel.swift /Users/pavelkurilov/Library/Mobile\ Documents/com~apple~CloudDocs/TestProjectForSibersCompanyByKurilovP/TestProjectForSibersCompanyByKurilovP/Screens/CharacterDetailScreen/ChararcterDetailCellViewModels/ChararcterDetailCellViewModel.swift /Users/pavelkurilov/Library/Mobile\ Documents/com~apple~CloudDocs/TestProjectForSibersCompanyByKurilovP/TestProjectForSibersCompanyByKurilovP/Screens/CharactersListScreen/CharactersListViewModel.swift /Users/pavelkurilov/Library/Mobile\ Documents/com~apple~CloudDocs/TestProjectForSibersCompanyByKurilovP/TestProjectForSibersCompanyByKurilovP/Screens/CharacterDetailScreen/Cells/CharacterImageTableCell.swift /Users/pavelkurilov/Library/Mobile\ Documents/com~apple~CloudDocs/TestProjectForSibersCompanyByKurilovP/TestProjectForSibersCompanyByKurilovP/Screens/CharacterDetailScreen/Cells/CharacterDetailTableCell.swift /Users/pavelkurilov/Library/Mobile\ Documents/com~apple~CloudDocs/TestProjectForSibersCompanyByKurilovP/TestProjectForSibersCompanyByKurilovP/Screens/CharactersListScreen/Cells/CharacterTableCell.swift /Users/pavelkurilov/Library/Mobile\ Documents/com~apple~CloudDocs/TestProjectForSibersCompanyByKurilovP/TestProjectForSibersCompanyByKurilovP/Base/DefaultCell.swift /Users/pavelkurilov/Library/Mobile\ Documents/com~apple~CloudDocs/TestProjectForSibersCompanyByKurilovP/TestProjectForSibersCompanyByKurilovP/Protocols/CharacterImageViewModelProtocol.swift /Users/pavelkurilov/Library/Mobile\ Documents/com~apple~CloudDocs/TestProjectForSibersCompanyByKurilovP/TestProjectForSibersCompanyByKurilovP/Protocols/CharacterDetailViewModelProtocol.swift /Users/pavelkurilov/Library/Mobile\ Documents/com~apple~CloudDocs/TestProjectForSibersCompanyByKurilovP/TestProjectForSibersCompanyByKurilovP/Protocols/CharacterDetailTableCellViewModelProtocol.swift /Users/pavelkurilov/Library/Mobile\ Documents/com~apple~CloudDocs/TestProjectForSibersCompanyByKurilovP/TestProjectForSibersCompanyByKurilovP/Protocols/CharactersListTableCellViewModelProtocol.swift /Users/pavelkurilov/Library/Mobile\ Documents/com~apple~CloudDocs/TestProjectForSibersCompanyByKurilovP/TestProjectForSibersCompanyByKurilovP/Protocols/CharactersListViewModelProtocol.swift /Users/pavelkurilov/Library/Mobile\ Documents/com~apple~CloudDocs/TestProjectForSibersCompanyByKurilovP/TestProjectForSibersCompanyByKurilovP/Helper/DiscardableImageCacheItem.swift /Users/pavelkurilov/Library/Mobile\ Documents/com~apple~CloudDocs/TestProjectForSibersCompanyByKurilovP/TestProjectForSibersCompanyByKurilovP/Models/Origin.swift /Users/pavelkurilov/Library/Mobile\ Documents/com~apple~CloudDocs/TestProjectForSibersCompanyByKurilovP/TestProjectForSibersCompanyByKurilovP/Models/Location.swift /Users/pavelkurilov/Library/Mobile\ Documents/com~apple~CloudDocs/TestProjectForSibersCompanyByKurilovP/TestProjectForSibersCompanyByKurilovP/Extensions/UITextField+ClearButton.swift /Users/pavelkurilov/Library/Mobile\ Documents/com~apple~CloudDocs/TestProjectForSibersCompanyByKurilovP/TestProjectForSibersCompanyByKurilovP/Models/Info.swift /Users/pavelkurilov/Library/Mobile\ Documents/com~apple~CloudDocs/TestProjectForSibersCompanyByKurilovP/TestProjectForSibersCompanyByKurilovP/Service/NetworkManager.swift /Users/pavelkurilov/Library/Mobile\ Documents/com~apple~CloudDocs/TestProjectForSibersCompanyByKurilovP/TestProjectForSibersCompanyByKurilovP/Screens/CharacterImageScreen/CharactersImageController.swift /Users/pavelkurilov/Library/Mobile\ Documents/com~apple~CloudDocs/TestProjectForSibersCompanyByKurilovP/TestProjectForSibersCompanyByKurilovP/Screens/CharacterDetailScreen/СharacterDetailController.swift /Users/pavelkurilov/Library/Mobile\ Documents/com~apple~CloudDocs/TestProjectForSibersCompanyByKurilovP/TestProjectForSibersCompanyByKurilovP/Screens/CharactersListScreen/CharactersListController.swift /Users/pavelkurilov/Library/Mobile\ Documents/com~apple~CloudDocs/TestProjectForSibersCompanyByKurilovP/TestProjectForSibersCompanyByKurilovP/Helper/HudHelper.swift /Users/pavelkurilov/Library/Mobile\ Documents/com~apple~CloudDocs/TestProjectForSibersCompanyByKurilovP/TestProjectForSibersCompanyByKurilovP/Models/Character.swift /Users/pavelkurilov/Library/Mobile\ Documents/com~apple~CloudDocs/TestProjectForSibersCompanyByKurilovP/TestProjectForSibersCompanyByKurilovP/Service/NetworkManagerError.swift /Users/pavelkurilov/Library/Mobile\ Documents/com~apple~CloudDocs/TestProjectForSibersCompanyByKurilovP/TestProjectForSibersCompanyByKurilovP/Screens/CharactersListScreen/CharactersListCoordinator.swift /Users/pavelkurilov/Library/Mobile\ Documents/com~apple~CloudDocs/TestProjectForSibersCompanyByKurilovP/TestProjectForSibersCompanyByKurilovP/Service/Requests/RequestFeeds.swift /Users/pavelkurilov/Library/Mobile\ Documents/com~apple~CloudDocs/TestProjectForSibersCompanyByKurilovP/TestProjectForSibersCompanyByKurilovP/Extensions/UIColor+AppColors.swift /Users/pavelkurilov/Library/Mobile\ Documents/com~apple~CloudDocs/TestProjectForSibersCompanyByKurilovP/TestProjectForSibersCompanyByKurilovP/Service/Requests/NetworkRequests.swift /Users/pavelkurilov/Library/Mobile\ Documents/com~apple~CloudDocs/TestProjectForSibersCompanyByKurilovP/TestProjectForSibersCompanyByKurilovP/Helper/ReachabilityConnect.swift /Users/pavelkurilov/Library/Mobile\ Documents/com~apple~CloudDocs/TestProjectForSibersCompanyByKurilovP/TestProjectForSibersCompanyByKurilovP/Service/Result.swift /Users/pavelkurilov/Library/Mobile\ Documents/com~apple~CloudDocs/TestProjectForSibersCompanyByKurilovP/TestProjectForSibersCompanyByKurilovP/Helper/Constant.swift /Users/pavelkurilov/Library/Mobile\ Documents/com~apple~CloudDocs/TestProjectForSibersCompanyByKurilovP/TestProjectForSibersCompanyByKurilovP/Service/NetworkEndpoint.swift /Users/pavelkurilov/Library/Mobile\ Documents/com~apple~CloudDocs/TestProjectForSibersCompanyByKurilovP/TestProjectForSibersCompanyByKurilovP/Base/Alert.swift /Users/pavelkurilov/Library/Mobile\ Documents/com~apple~CloudDocs/TestProjectForSibersCompanyByKurilovP/TestProjectForSibersCompanyByKurilovP/Screens/CharacterImageScreen/CharacterImageView.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/Dispatch.apinotesc /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/ObjectiveC.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/CoreImage.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/QuartzCore.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/Dispatch.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/Metal.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/CoreFoundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/CoreGraphics.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/UIKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/SwiftOnoneSupport.swiftmodule /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk/System/Library/Frameworks/OpenGLES.framework/Headers/OpenGLES.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImage.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/QuartzCore.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk/System/Library/Frameworks/Security.framework/Headers/Security.apinotes
/Users/pavelkurilov/Library/Mobile\ Documents/com~apple~CloudDocs/TestProjectForSibersCompanyByKurilovP/build/TestProjectForSibersCompanyByKurilovP.build/Debug-iphoneos/TestProjectForSibersCompanyByKurilovP.build/Objects-normal/arm64/DefaultCell~partial.swiftdoc : /Users/pavelkurilov/Library/Mobile\ Documents/com~apple~CloudDocs/TestProjectForSibersCompanyByKurilovP/TestProjectForSibersCompanyByKurilovP/Extensions/UIImageView+Cache.swift /Users/pavelkurilov/Library/Mobile\ Documents/com~apple~CloudDocs/TestProjectForSibersCompanyByKurilovP/TestProjectForSibersCompanyByKurilovP/Models/ErrorResponse.swift /Users/pavelkurilov/Library/Mobile\ Documents/com~apple~CloudDocs/TestProjectForSibersCompanyByKurilovP/TestProjectForSibersCompanyByKurilovP/AppDelegate.swift /Users/pavelkurilov/Library/Mobile\ Documents/com~apple~CloudDocs/TestProjectForSibersCompanyByKurilovP/TestProjectForSibersCompanyByKurilovP/Screens/CharacterImageScreen/CharactersImageViewModel.swift /Users/pavelkurilov/Library/Mobile\ Documents/com~apple~CloudDocs/TestProjectForSibersCompanyByKurilovP/TestProjectForSibersCompanyByKurilovP/Screens/CharacterDetailScreen/CharacterDetailViewModel.swift /Users/pavelkurilov/Library/Mobile\ Documents/com~apple~CloudDocs/TestProjectForSibersCompanyByKurilovP/TestProjectForSibersCompanyByKurilovP/Screens/CharacterDetailScreen/ChararcterDetailCellViewModels/CharacterImageCellViewModel.swift /Users/pavelkurilov/Library/Mobile\ Documents/com~apple~CloudDocs/TestProjectForSibersCompanyByKurilovP/TestProjectForSibersCompanyByKurilovP/Screens/CharactersListScreen/ChararcterCellViewModels/CharacterTableCellViewModel.swift /Users/pavelkurilov/Library/Mobile\ Documents/com~apple~CloudDocs/TestProjectForSibersCompanyByKurilovP/TestProjectForSibersCompanyByKurilovP/Screens/CharacterDetailScreen/ChararcterDetailCellViewModels/ChararcterDetailCellViewModel.swift /Users/pavelkurilov/Library/Mobile\ Documents/com~apple~CloudDocs/TestProjectForSibersCompanyByKurilovP/TestProjectForSibersCompanyByKurilovP/Screens/CharactersListScreen/CharactersListViewModel.swift /Users/pavelkurilov/Library/Mobile\ Documents/com~apple~CloudDocs/TestProjectForSibersCompanyByKurilovP/TestProjectForSibersCompanyByKurilovP/Screens/CharacterDetailScreen/Cells/CharacterImageTableCell.swift /Users/pavelkurilov/Library/Mobile\ Documents/com~apple~CloudDocs/TestProjectForSibersCompanyByKurilovP/TestProjectForSibersCompanyByKurilovP/Screens/CharacterDetailScreen/Cells/CharacterDetailTableCell.swift /Users/pavelkurilov/Library/Mobile\ Documents/com~apple~CloudDocs/TestProjectForSibersCompanyByKurilovP/TestProjectForSibersCompanyByKurilovP/Screens/CharactersListScreen/Cells/CharacterTableCell.swift /Users/pavelkurilov/Library/Mobile\ Documents/com~apple~CloudDocs/TestProjectForSibersCompanyByKurilovP/TestProjectForSibersCompanyByKurilovP/Base/DefaultCell.swift /Users/pavelkurilov/Library/Mobile\ Documents/com~apple~CloudDocs/TestProjectForSibersCompanyByKurilovP/TestProjectForSibersCompanyByKurilovP/Protocols/CharacterImageViewModelProtocol.swift /Users/pavelkurilov/Library/Mobile\ Documents/com~apple~CloudDocs/TestProjectForSibersCompanyByKurilovP/TestProjectForSibersCompanyByKurilovP/Protocols/CharacterDetailViewModelProtocol.swift /Users/pavelkurilov/Library/Mobile\ Documents/com~apple~CloudDocs/TestProjectForSibersCompanyByKurilovP/TestProjectForSibersCompanyByKurilovP/Protocols/CharacterDetailTableCellViewModelProtocol.swift /Users/pavelkurilov/Library/Mobile\ Documents/com~apple~CloudDocs/TestProjectForSibersCompanyByKurilovP/TestProjectForSibersCompanyByKurilovP/Protocols/CharactersListTableCellViewModelProtocol.swift /Users/pavelkurilov/Library/Mobile\ Documents/com~apple~CloudDocs/TestProjectForSibersCompanyByKurilovP/TestProjectForSibersCompanyByKurilovP/Protocols/CharactersListViewModelProtocol.swift /Users/pavelkurilov/Library/Mobile\ Documents/com~apple~CloudDocs/TestProjectForSibersCompanyByKurilovP/TestProjectForSibersCompanyByKurilovP/Helper/DiscardableImageCacheItem.swift /Users/pavelkurilov/Library/Mobile\ Documents/com~apple~CloudDocs/TestProjectForSibersCompanyByKurilovP/TestProjectForSibersCompanyByKurilovP/Models/Origin.swift /Users/pavelkurilov/Library/Mobile\ Documents/com~apple~CloudDocs/TestProjectForSibersCompanyByKurilovP/TestProjectForSibersCompanyByKurilovP/Models/Location.swift /Users/pavelkurilov/Library/Mobile\ Documents/com~apple~CloudDocs/TestProjectForSibersCompanyByKurilovP/TestProjectForSibersCompanyByKurilovP/Extensions/UITextField+ClearButton.swift /Users/pavelkurilov/Library/Mobile\ Documents/com~apple~CloudDocs/TestProjectForSibersCompanyByKurilovP/TestProjectForSibersCompanyByKurilovP/Models/Info.swift /Users/pavelkurilov/Library/Mobile\ Documents/com~apple~CloudDocs/TestProjectForSibersCompanyByKurilovP/TestProjectForSibersCompanyByKurilovP/Service/NetworkManager.swift /Users/pavelkurilov/Library/Mobile\ Documents/com~apple~CloudDocs/TestProjectForSibersCompanyByKurilovP/TestProjectForSibersCompanyByKurilovP/Screens/CharacterImageScreen/CharactersImageController.swift /Users/pavelkurilov/Library/Mobile\ Documents/com~apple~CloudDocs/TestProjectForSibersCompanyByKurilovP/TestProjectForSibersCompanyByKurilovP/Screens/CharacterDetailScreen/СharacterDetailController.swift /Users/pavelkurilov/Library/Mobile\ Documents/com~apple~CloudDocs/TestProjectForSibersCompanyByKurilovP/TestProjectForSibersCompanyByKurilovP/Screens/CharactersListScreen/CharactersListController.swift /Users/pavelkurilov/Library/Mobile\ Documents/com~apple~CloudDocs/TestProjectForSibersCompanyByKurilovP/TestProjectForSibersCompanyByKurilovP/Helper/HudHelper.swift /Users/pavelkurilov/Library/Mobile\ Documents/com~apple~CloudDocs/TestProjectForSibersCompanyByKurilovP/TestProjectForSibersCompanyByKurilovP/Models/Character.swift /Users/pavelkurilov/Library/Mobile\ Documents/com~apple~CloudDocs/TestProjectForSibersCompanyByKurilovP/TestProjectForSibersCompanyByKurilovP/Service/NetworkManagerError.swift /Users/pavelkurilov/Library/Mobile\ Documents/com~apple~CloudDocs/TestProjectForSibersCompanyByKurilovP/TestProjectForSibersCompanyByKurilovP/Screens/CharactersListScreen/CharactersListCoordinator.swift /Users/pavelkurilov/Library/Mobile\ Documents/com~apple~CloudDocs/TestProjectForSibersCompanyByKurilovP/TestProjectForSibersCompanyByKurilovP/Service/Requests/RequestFeeds.swift /Users/pavelkurilov/Library/Mobile\ Documents/com~apple~CloudDocs/TestProjectForSibersCompanyByKurilovP/TestProjectForSibersCompanyByKurilovP/Extensions/UIColor+AppColors.swift /Users/pavelkurilov/Library/Mobile\ Documents/com~apple~CloudDocs/TestProjectForSibersCompanyByKurilovP/TestProjectForSibersCompanyByKurilovP/Service/Requests/NetworkRequests.swift /Users/pavelkurilov/Library/Mobile\ Documents/com~apple~CloudDocs/TestProjectForSibersCompanyByKurilovP/TestProjectForSibersCompanyByKurilovP/Helper/ReachabilityConnect.swift /Users/pavelkurilov/Library/Mobile\ Documents/com~apple~CloudDocs/TestProjectForSibersCompanyByKurilovP/TestProjectForSibersCompanyByKurilovP/Service/Result.swift /Users/pavelkurilov/Library/Mobile\ Documents/com~apple~CloudDocs/TestProjectForSibersCompanyByKurilovP/TestProjectForSibersCompanyByKurilovP/Helper/Constant.swift /Users/pavelkurilov/Library/Mobile\ Documents/com~apple~CloudDocs/TestProjectForSibersCompanyByKurilovP/TestProjectForSibersCompanyByKurilovP/Service/NetworkEndpoint.swift /Users/pavelkurilov/Library/Mobile\ Documents/com~apple~CloudDocs/TestProjectForSibersCompanyByKurilovP/TestProjectForSibersCompanyByKurilovP/Base/Alert.swift /Users/pavelkurilov/Library/Mobile\ Documents/com~apple~CloudDocs/TestProjectForSibersCompanyByKurilovP/TestProjectForSibersCompanyByKurilovP/Screens/CharacterImageScreen/CharacterImageView.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/Dispatch.apinotesc /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/ObjectiveC.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/CoreImage.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/QuartzCore.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/Dispatch.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/Metal.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/CoreFoundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/CoreGraphics.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/UIKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/SwiftOnoneSupport.swiftmodule /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk/System/Library/Frameworks/OpenGLES.framework/Headers/OpenGLES.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImage.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/QuartzCore.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk/System/Library/Frameworks/Security.framework/Headers/Security.apinotes
|
D
|
Binary files node_modules/.DS_Store and node_modules_pp/.DS_Store differ
diff -rupN node_modules/apk-updater/lib/apkReader.js node_modules_pp/apk-updater/lib/apkReader.js
--- node_modules/apk-updater/lib/apkReader.js 2014-02-04 14:31:00.000000000 +0100
+++ node_modules_pp/apk-updater/lib/apkReader.js 2014-11-07 13:37:32.000000000 +0100
@@ -7,8 +7,7 @@ var fs = require('fs')
var apk = {}
, initialized = false
, repoDir = '.apk_repo'
- /** APK filenames pattern. */
- , apkPattern = /([\w\.]+)-(\d+)\.apk/;
+ , apkPattern = /([\w]+)-(\d+)\.apk/;
function init(){
@@ -34,6 +33,9 @@ function init(){
// console.log("New APK : " + RegExp.$1 + "\n" + JSON.stringify(apk[RegExp.$1]));
apk[RegExp.$1] = _.sortBy(apk[RegExp.$1], function(def){ return def.version; });
}
+ else {
+ console.log('else #1 - ' + file);
+ }
}
function removeApk(file){
diff -rupN node_modules/apk-updater/lib/updater.js node_modules_pp/apk-updater/lib/updater.js
--- node_modules/apk-updater/lib/updater.js 2014-03-05 16:16:14.000000000 +0100
+++ node_modules_pp/apk-updater/lib/updater.js 2014-11-07 15:04:18.000000000 +0100
@@ -12,10 +12,18 @@ var androidUpdate = {}
, links = [];
androidUpdate.updater = function (req, res){
+
+ console.log('+++++++++++++++++++++++++++++++');
+ console.log('update request from: ' + req.ip);
+
var name = req.body.pkgname,
version = req.body.version,
last = reader.last(name),
key;
+
+ console.log('name: ' + name);
+ console.log('version: ' + version);
+
if(last && last.version > version){
key = name + "-" + version;
if(!links[key]){
@@ -38,12 +46,17 @@ androidUpdate.updater = function (req, r
// hack to put this route at first
expressApp.routes.get.unshift(expressApp.routes.get.pop());
}
- winston.info("have update for version " + version + "\n" + links[key].url + "\n" + last.version);
+ winston.info("update for version " + version + "\nfile: " + links[key].url + " - version: " + last.version + "\n");
+ console.log('sending update...');
res.send("have update\n" + links[key].url + "\n" + last.version);
} else {
- winston.debug("No update for " + name + " - " + version + " / Last : " + last );
- res.send(200);
+ if(last)
+ winston.info("no update for " + name + " - " + version + " / version up-to-date: " + last.version );
+ else
+ winston.info("no update for " + name + " - " + version);
+ res.sendStatus(200);
}
+ console.log('+++++++++++++++++++++++++++++++');
};
@@ -62,8 +75,10 @@ function enable(app, route, repoDir){
app.post(route, androidUpdate.updater);
app.get(route, function (req, res){
+ console.log('--- request ---')
res.send(reader.available());
});
+
};
|
D
|
plus(var X, z(), X) :- ;
plus(var X, s(var Y), s(var Z)) :- plus(X, Y, Z) ;
|
D
|
/**
* Copyright: (c) 2015-2017, Milofon Project.
* License: Subject to the terms of the BSD license, as written in the included LICENSE.txt file.
* Author: <m.galanin@milofon.org> Maksim Galanin
* Date: 2018-01-28
*/
module dango.service.protocol;
public
{
import dango.service.protocol.core : RpcServerProtocol, RpcClientProtocol,
RpcException, createEmptyErrorByCode, createErrorByCode, ErrorCode, RpcError;
}
private
{
import poodinis : DependencyContainer, ApplicationContext,
newInstance;
import dango.system.container : registerByName;
import dango.service.protocol.jsonrpc : JsonRpcServerProtocol, JsonRpcClientProtocol;
import dango.service.protocol.simple : SimpleRpcServerProtocol, SimpleRpcClientProtocol;
}
class ProtocolContext : ApplicationContext
{
override void registerDependencies(shared(DependencyContainer) container)
{
container.registerByName!(RpcServerProtocol, JsonRpcServerProtocol)("jsonrpc").newInstance;
container.registerByName!(RpcServerProtocol, SimpleRpcServerProtocol)("simple").newInstance;
container.registerByName!(RpcClientProtocol, JsonRpcClientProtocol)("jsonrpc").newInstance;
container.registerByName!(RpcClientProtocol, SimpleRpcClientProtocol)("simple").newInstance;
}
}
|
D
|
a juvenile between the onset of puberty and maturity
relating to or peculiar to or suggestive of an adolescent
being of the age 13 through 19
displaying or suggesting a lack of maturity
in the state of development between puberty and maturity
|
D
|
PLONG PLAT ED95 KD LOMAGAGE HIMAGAGE SLAT SLONG RESULTNO DP DM ROCKTYPE
185.300003 80 4.30000019 65.0999985 35 39 29.1000004 -103.199997 7660 5.4000001 5.4000001 intrusives, gabbro
93.4000015 81.1999969 12.3000002 61 26 36 29.2999992 -103.300003 3078 7.0999999 12.1000004 extrusives, basalts, andesites
211 81 13 27 29 39 37.4000015 -105 3151 16 20 intrusives
117.699997 85.5 2.4000001 0 34 42 55.9000015 -63.4000015 3235 3.4000001 4 metamorphics, impact melt rocks
144.199997 83.9000015 7.69999981 40.4000015 38 50 43 -109.5 1138 8.80000019 11.6999998 sediments
|
D
|
any place of complete bliss and delight and peace
(Christianity) the abode of righteous souls after death
|
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_11_BeT-9584972186.notation#_copSALmGEeKQQp7P9cQvNQ"/>
</availablePage>
</pageList>
<sashModel currentSelection="//@sashModel/@windows.0/@children.0">
<windows>
<children xsi:type="di:TabFolder">
<children>
<emfPageIdentifier href="VAR_11_BeT-9584972186.notation#_copSALmGEeKQQp7P9cQvNQ"/>
</children>
</children>
</windows>
</sashModel>
</di:SashWindowsMngr>
|
D
|
instance DIA_DiegoOw_EXIT(C_Info)
{
npc = PC_ThiefOW;
nr = 999;
condition = DIA_DiegoOw_EXIT_Condition;
information = DIA_DiegoOw_EXIT_Info;
permanent = TRUE;
description = Dialog_Ende;
};
func int DIA_DiegoOw_EXIT_Condition()
{
return TRUE;
};
func void DIA_DiegoOw_EXIT_Info()
{
AI_StopProcessInfos(self);
};
instance DIA_DiegoOw_Hallo(C_Info)
{
npc = PC_ThiefOW;
nr = 1;
condition = DIA_DiegoOw_Hallo_Condition;
information = DIA_DiegoOw_Hallo_Info;
important = TRUE;
};
func int DIA_DiegoOw_Hallo_Condition()
{
return TRUE;
};
func void DIA_DiegoOw_Hallo_Info()
{
AI_Output(self,other,"DIA_DiegoOw_Hallo_11_00"); //Эй, я думал, ты мертв.
AI_Output(other,self,"DIA_DiegoOw_Hallo_15_01"); //Да... так было.
AI_Output(other,self,"DIA_DiegoOw_Hallo_15_02"); //Ну, теперь я вернулся и ищу доказательства появления драконов.
AI_Output(self,other,"DIA_DiegoOw_Hallo_11_03"); //Для кого ты это делаешь?
AI_Output(other,self,"DIA_DiegoOw_Hallo_15_04"); //Я работаю на лорда Хагена. С помощью паладинов драконов можно остановить.
AI_Output(self,other,"DIA_DiegoOw_Hallo_11_05"); //Паладины? Позволь мне сказать тебе кое-что. После того, как мне удалось вырваться отсюда, я отправился в Хоринис.
AI_Output(self,other,"DIA_DiegoOw_Hallo_11_06"); //Я хотел предупредить паладинов о драконах. Сам не знаю, зачем мне это было нужно.
AI_Output(self,other,"DIA_DiegoOw_Hallo_11_07"); //Этот напыщенный Лотар даже не стал слушать меня - и, конечно же, не позволил мне поговорить с лордом Хагеном.
AI_Output(self,other,"DIA_DiegoOw_Hallo_11_08"); //Вместо этого они отправили меня назад, с экспедицией. Так что лучше не напоминай мне о паладинах...
AI_Output(other,self,"DIA_DiegoOw_Hallo_15_09"); //Очень важно остановить драконов, пока у нас еще есть время - и не важно, кто поможет нам сделать это.
AI_Output(self,other,"DIA_DiegoOw_Hallo_11_10"); //Остановить их? Да нам нужно уносить ноги из этой долины, пока у нас еще есть время для этого!
AI_Output(self,other,"DIA_DiegoOw_Silvestro_11_03"); //Скажи - как тебе удалось пробраться через Проход? Я думал, там все кишит орками.
if(PlayerPassedAbandonedMine == TRUE)
{
AI_Output(other,self,"DIA_DiegoOw_Silvestro_15_04"); //Есть путь через заброшенные шахты, где нет орков.
AI_Output(self,other,"DIA_DiegoOw_Silvestro_11_05"); //Это хорошая новость. Тогда я должен как можно быстрее отправляться в Хоринис - мне там нужно кое с кем свести счеты.
}
else
{
B_PC_Thief_JustLucky();
};
};
instance DIA_DiegoOw_Beweise(C_Info)
{
npc = PC_ThiefOW;
nr = 2;
condition = DIA_DiegoOw_Beweise_Condition;
information = DIA_DiegoOw_Beweise_Info;
description = "Послушай, мне нужны доказательства.";
};
func int DIA_DiegoOw_Beweise_Condition()
{
if(Kapitel == 2)
{
return TRUE;
};
};
func void DIA_DiegoOw_Beweise_Info()
{
AI_Output(other,self,"DIA_DiegoOw_Hallo_15_11"); //Послушай, мне нужны доказательства.
if(MIS_ScoutMine == LOG_Running)
{
AI_Output(self,other,"DIA_DiegoOw_Hallo_11_14"); //Хорошо, я помогу тебе, чем смогу. Но я не буду рисковать своей шкурой неизвестно из-за чего.
AI_Output(other,self,"DIA_DiegoOw_Garond_15_00"); //Я здесь по поручению Гаронда. Он хочет знать, сколько руды было добыто к этому времени.
AI_Output(self,other,"DIA_DiegoOw_Garond_11_01"); //И тогда он даст тебе доказательства?
AI_Output(other,self,"DIA_DiegoOw_Garond_15_02"); //Именно. Поэтому - ты можешь сказать что-нибудь на этот счет?
if(Npc_KnowsInfo(other,DIA_Parcival_Diego))
{
AI_Output(self,other,"DIA_DiegoOw_Garond_11_03"); //Конечно, что ты хочешь знать?
AI_Output(other,self,"DIA_DiegoOw_Silvestro_15_00"); //Что ты знаешь о руде Сильвестро?
};
B_LogEntry(TOPIC_ScoutMine,"Диего переправил в безопасное место ЧЕТЫРЕ ящика руды, добытых старателями Сильвестро.");
}
else
{
AI_Output(self,other,"DIA_DiegoOw_Hallo_11_12"); //Хорошо, если такова твоя задача - иди, поговори с командующим Гарондом.
AI_Output(self,other,"DIA_DiegoOw_Hallo_11_13"); //Если уж кто и знает что-нибудь о нападении драконов, то это парни из замка.
AI_Output(self,other,"DIA_Addon_DiegoOw_Garond_11_01"); //Когда ты будешь в замке, можешь сказать Гаронду кое-что, что его очень заинтересует:
};
if(Npc_GetDistToWP(self,"LOCATION_02_05") <= 1000)
{
AI_Output(self,other,"DIA_DiegoOw_Silvestro_11_01"); //Здесь, в задней части пещеры хранятся ЧЕТЫРЕ ящика руды. Их добыли люди Сильвестро.
AI_Output(self,other,"DIA_DiegoOw_Silvestro_11_02"); //Гаронд может прийти и забрать их, но меня здесь к тому времени уже не будет.
}
else
{
AI_Output(self,other,"DIA_Addon_DiegoOw_Silvestro_11_01"); //В пещере неподалеку от того места, где я спрятался, хранятся ЧЕТЫРЕ ящика руды. Их добыли люди Сильвестро.
AI_Output(self,other,"DIA_Addon_DiegoOw_Silvestro_11_02"); //Гаронд может прийти и забрать их.
};
Silvestro_Ore = TRUE;
};
instance DIA_DiegoOw_Mine(C_Info)
{
npc = PC_ThiefOW;
nr = 3;
condition = DIA_DiegoOw_Mine_Condition;
information = DIA_DiegoOw_Mine_Info;
permanent = FALSE;
description = "А какое ты имеешь отношение к руде?";
};
func int DIA_DiegoOw_Mine_Condition()
{
if(Npc_KnowsInfo(other,DIA_DiegoOw_Beweise))
{
return TRUE;
};
};
func void DIA_DiegoOw_Mine_Info()
{
AI_Output(other,self,"DIA_DiegoOw_Mine_15_00"); //А какое ты имеешь отношение к руде?
AI_Output(self,other,"DIA_DiegoOw_Mine_11_01"); //Я был с группой Сильвестро. Мы добывали руду уже несколько дней, когда Сильвестро вдруг занервничал.
AI_Output(self,other,"DIA_DiegoOw_Mine_11_02"); //Он сказал, что мы должны переправить руду в безопасное место.
AI_Output(self,other,"DIA_DiegoOw_Mine_11_03"); //Ну, так как я все равно собирался линять, я вызвался добровольцем.
AI_Output(self,other,"DIA_DiegoOw_Mine_11_04"); //И в этом мне очень повезло. Потому что вскоре на старателей напали краулеры. И никто из них не выжил.
};
instance DIA_DiegoOw_Ritter(C_Info)
{
npc = PC_ThiefOW;
nr = 4;
condition = DIA_DiegoOw_Ritter_Condition;
information = DIA_DiegoOw_Ritter_Info;
permanent = FALSE;
description = "А что насчет этих двух мертвых рыцарей перед твоим укрытием?";
};
func int DIA_DiegoOw_Ritter_Condition()
{
if(Npc_KnowsInfo(other,DIA_DiegoOw_Hallo))
{
return TRUE;
};
};
func void DIA_DiegoOw_Ritter_Info()
{
AI_Output(other,self,"DIA_DiegoOw_Ritter_15_00"); //А что насчет этих двух мертвых рыцарей перед твоим укрытием?
AI_Output(self,other,"DIA_DiegoOw_Ritter_11_01"); //Они нашли свою судьбу во время битвы со стаей снепперов.
AI_Output(self,other,"DIA_DiegoOw_Ritter_11_02"); //Да уж, у Долины Рудников свои собственные правила. Я говорил им это. Но они меня не слушали.
};
instance DIA_DiegoOw_Perm(C_Info)
{
npc = PC_ThiefOW;
nr = 5;
condition = DIA_DiegoOw_Perm_Condition;
information = DIA_DiegoOw_Perm_Info;
permanent = FALSE;
description = "Что мне нужно знать о Долине?";
};
func int DIA_DiegoOw_Perm_Condition()
{
return TRUE;
};
func void DIA_DiegoOw_Perm_Info()
{
AI_Output(other,self,"DIA_DiegoOw_Perm_15_00"); //Что мне нужно знать о Долине?
AI_Output(self,other,"DIA_DiegoOw_Perm_11_01"); //С тех пор, как Барьер пал, здесь многое переменилось. Теперь здесь заправляют орки.
AI_Output(self,other,"DIA_DiegoOw_Perm_11_02"); //А мы, люди, теперь не более чем корм для истинных правителей этой Долины: драконов.
AI_Output(self,other,"DIA_DiegoOw_Perm_11_03"); //Держись подальше от всех, кто сильнее тебя - и избегай всего, что напоминает дракона.
};
instance DIA_DiegoOw_Gorn(C_Info)
{
npc = PC_ThiefOW;
nr = 6;
condition = DIA_DiegoOw_Gorn_Condition;
information = DIA_DiegoOw_Gorn_Info;
permanent = FALSE;
description = "Я хочу купить свободу Горну, но Гаронд просит за это 1000 золотых.";
};
func int DIA_DiegoOw_Gorn_Condition()
{
if(MIS_RescueGorn == LOG_Running)
{
return TRUE;
};
};
func void DIA_DiegoOw_Gorn_Info()
{
AI_Output(other,self,"DIA_DiegoOw_Gorn_15_00"); //Я хочу купить свободу Горну, но Гаронд просит за это 1000 золотых.
AI_Output(self,other,"DIA_DiegoOw_Gorn_11_01"); //Немаленькая сумма. У меня есть 300 монет, ты можешь взять их. Остальное найди сам.
B_GiveInvItems(self,other,ItMi_Gold,300);
B_LogEntry(TOPIC_RescueGorn,"Диего заплатил 300 золотых за освобождение Горна.");
};
var int Diego_MerkeDEX;
var int Diego_MerkeSTR;
func void B_BuildLearnDialog_Diego_OW()
{
Info_ClearChoices(DIA_DiegoOw_Teach);
Info_AddChoice(DIA_DiegoOw_Teach,Dialog_Back,DIA_DiegoOw_TEACH_BACK);
Info_AddChoice(DIA_DiegoOw_Teach,B_BuildLearnString(PRINT_LearnDEX1,B_GetLearnCostAttribute(ATR_DEXTERITY,1)),DIA_DiegoOw_TEACHDEX_1);
Info_AddChoice(DIA_DiegoOw_Teach,B_BuildLearnString(PRINT_LearnDEX5,B_GetLearnCostAttribute(ATR_DEXTERITY,5)),DIA_DiegoOw_TEACHDEX_5);
Info_AddChoice(DIA_DiegoOw_Teach,B_BuildLearnString(PRINT_LearnSTR1,B_GetLearnCostAttribute(ATR_STRENGTH,1)),DIA_DiegoOw_TEACHSTR_1);
Info_AddChoice(DIA_DiegoOw_Teach,B_BuildLearnString(PRINT_LearnSTR5,B_GetLearnCostAttribute(ATR_STRENGTH,5)),DIA_DiegoOw_TEACHSTR_5);
};
instance DIA_DiegoOw_Teach(C_Info)
{
npc = PC_ThiefOW;
nr = 100;
condition = DIA_DiegoOw_Teach_Condition;
information = DIA_DiegoOw_Teach_Info;
permanent = TRUE;
description = "Ты можешь научить меня чему-нибудь?";
};
func int DIA_DiegoOw_Teach_Condition()
{
return TRUE;
};
func void DIA_DiegoOw_Teach_Info()
{
AI_Output(other,self,"DIA_DiegoOw_Teach_15_00"); //Ты можешь научить меня чему-нибудь?
AI_Output(self,other,"DIA_Addon_DiegoOw_Teach_11_01"); //Конечно. Что ты хочешь знать?
if(DiegoOW_Teach == FALSE)
{
Log_CreateTopic(TOPIC_OutTeacher,LOG_NOTE);
B_LogEntry(TOPIC_OutTeacher,"Диего может помочь мне повысить мою ловкость и силу.");
DiegoOW_Teach = TRUE;
};
Diego_MerkeDEX = ATR_Training[ATR_DEXTERITY];
Diego_MerkeSTR = ATR_Training[ATR_STRENGTH];
B_BuildLearnDialog_Diego_OW();
};
func void DIA_DiegoOw_TEACH_BACK()
{
if(ATR_Training[ATR_DEXTERITY] > Diego_MerkeDEX)
{
AI_Output(self,other,"DIA_Addon_DiegoOw_Teach_11_02"); //Ты уже стал более ловким.
};
if(ATR_Training[ATR_STRENGTH] > Diego_MerkeSTR)
{
AI_Output(self,other,"DIA_Addon_DiegoOw_Teach_11_03"); //(оценивающе) Очень хорошо. Твоя сила увеличилась.
};
Info_ClearChoices(DIA_DiegoOw_Teach);
};
func void DIA_DiegoOw_TEACHDEX_1()
{
if(B_TeachAttributePoints(self,other,ATR_DEXTERITY,1,T_MAX))
{
B_BuildLearnDialog_Diego_OW();
};
};
func void DIA_DiegoOw_TEACHDEX_5()
{
if(B_TeachAttributePoints(self,other,ATR_DEXTERITY,5,T_MAX))
{
B_BuildLearnDialog_Diego_OW();
};
};
func void DIA_DiegoOw_TEACHSTR_1()
{
if(B_TeachAttributePoints(self,other,ATR_STRENGTH,1,T_MED))
{
B_BuildLearnDialog_Diego_OW();
};
};
func void DIA_DiegoOw_TEACHSTR_5()
{
if(B_TeachAttributePoints(self,other,ATR_STRENGTH,5,T_MED))
{
B_BuildLearnDialog_Diego_OW();
};
};
instance DIA_Addon_ThiefOW_Together(C_Info)
{
npc = PC_ThiefOW;
nr = 11;
condition = DIA_Addon_ThiefOW_Together_Condition;
information = DIA_Addon_ThiefOW_Together_Info;
description = "Давай пойдем вместе.";
};
func int DIA_Addon_ThiefOW_Together_Condition()
{
return TRUE;
};
func void DIA_Addon_ThiefOW_Together_Info()
{
DIA_Common_LetsGoTogether();
AI_Output(self,other,"DIA_Addon_Diego_Together_11_01"); //К Проходу? Почему бы и нет...
AI_Output(self,other,"DIA_Addon_Diego_Together_11_02"); //Иди первым. Ты ведь недавно оттуда.
AI_Output(self,other,"DIA_Addon_Diego_Together_11_03"); //Но даже не думай о том, чтобы подойти слишком близко к замку или Стене орков.
AI_Output(self,other,"DIA_Addon_Diego_Together_11_04"); //Кроме того, нам следует избегать лагерей паладинов.
AI_Output(self,other,"DIA_Addon_Diego_Together_11_05"); //Мне удалось сбежать из такого лагеря, и я не собираюсь возвращаться в шахты.
AI_Output(self,other,"DIA_Addon_Diego_Together_11_06"); //И конечно же, мы не должны приближаться к драконам.
AI_Output(self,other,"DIA_Addon_Diego_Together_11_07"); //Скажи, когда будешь готов.
};
instance DIA_Addon_ThiefOW_ComeOn(C_Info)
{
npc = PC_ThiefOW;
nr = 12;
condition = DIA_Addon_ThiefOW_ComeOn_Condition;
information = DIA_Addon_ThiefOW_ComeOn_Info;
permanent = TRUE;
description = "Пойдем со мной.";
};
func int DIA_Addon_ThiefOW_ComeOn_Condition()
{
if((self.aivar[AIV_PARTYMEMBER] == FALSE) && Npc_KnowsInfo(other,DIA_Addon_ThiefOW_Together) && (Diego_angekommen == FALSE))
{
return TRUE;
};
};
func void DIA_Addon_ThiefOW_ComeOn_Info()
{
AI_Output(other,self,"DIA_Addon_Diego_ComeOn_15_00"); //Пойдем со мной.
if(C_DiegoTooFar(0))
{
AI_Output(self,other,"DIA_Addon_Diego_ComeOn_11_01"); //Мы идем не туда!
AI_StopProcessInfos(self);
}
else
{
AI_Output(self,other,"DIA_Addon_Diego_ComeOn_11_02"); //Хорошо.
AI_StopProcessInfos(self);
Npc_ExchangeRoutine(self,"FOLLOW");
self.aivar[AIV_PARTYMEMBER] = TRUE;
};
};
instance DIA_Addon_ThiefOW_GoHome(C_Info)
{
npc = PC_ThiefOW;
nr = 13;
condition = DIA_Addon_ThiefOW_GoHome_Condition;
information = DIA_Addon_ThiefOW_GoHome_Info;
permanent = TRUE;
description = "Подожди здесь!";
};
func int DIA_Addon_ThiefOW_GoHome_Condition()
{
if(self.aivar[AIV_PARTYMEMBER] == TRUE)
{
return TRUE;
};
};
func void DIA_Addon_ThiefOW_GoHome_Info()
{
var int location;
location = C_DiegoTooFar(1000);
AI_Output(other,self,"DIA_Addon_Diego_WarteHier_15_00"); //Подожди здесь!
if(location == LOC_XARDAS)
{
AI_Output(self,other,"DIA_Addon_Diego_GoHome_11_02"); //Я подожду снаружи у башни.
AI_StopProcessInfos(self);
self.aivar[AIV_PARTYMEMBER] = FALSE;
Npc_ExchangeRoutine(self,"XARDAS");
}
else if(location == LOC_FAJETHMINE)
{
AI_Output(self,other,"DIA_Addon_Diego_GoHome_11_03"); //Я подожду у шахты.
AI_StopProcessInfos(self);
self.aivar[AIV_PARTYMEMBER] = FALSE;
Npc_ExchangeRoutine(self,"FAJETH");
}
else if(location == LOC_SILVESTROMINE)
{
AI_Output(self,other,"DIA_Addon_Diego_GoHome_11_04"); //Я подожду перед шахтой.
AI_StopProcessInfos(self);
self.aivar[AIV_PARTYMEMBER] = FALSE;
Npc_ExchangeRoutine(self,"SILVESTRO");
}
else if(location == LOC_GRIMESMINE)
{
AI_Output(self,other,"DIA_Addon_Diego_GoHome_11_05"); //Я подожду поблизости.
AI_StopProcessInfos(self);
self.aivar[AIV_PARTYMEMBER] = FALSE;
Npc_ExchangeRoutine(self,"GRIMES");
}
else if(Npc_GetDistToWP(self,"LOCATION_02_05") < 15000)
{
if(Npc_GetDistToWP(self,"LOCATION_02_05") < 2000)
{
AI_Output(self,other,"DIA_Addon_Diego_GoHome_11_01"); //Ладно.
}
else
{
AI_Output(self,other,"DIA_Addon_Diego_GoHome_11_06"); //Нет. Я возвращаюсь в пещеру.
AI_Output(self,other,"DIA_Addon_Diego_GoHome_11_07"); //Когда закончишь, приходи ко мне.
AI_Output(self,other,"DIA_Addon_Diego_GoHome_11_08"); //Но не слишком задерживайся, иначе я вернусь один.
};
AI_StopProcessInfos(self);
self.aivar[AIV_PARTYMEMBER] = FALSE;
Npc_ExchangeRoutine(self,"START");
}
else
{
AI_Output(self,other,"DIA_Addon_Diego_GoHome_11_09"); //Ты, наверное, шутишь? Мы должны разделиться? Здесь?
AI_Output(self,other,"DIA_Addon_Diego_GoHome_11_10"); //Только через мой труп!
AI_Output(self,other,"DIA_Addon_Diego_GoHome_11_11"); //Мы идем к Проходу немедленно. И вместе.
};
};
func void B_Addon_Diego_WillWaitOutside()
{
AI_Output(self,other,"DIA_Addon_Diego_TooFar_11_00"); //Иди первым и осмотрись. Я подожду снаружи.
};
var int Diego_TooFarComment;
var int Diego_BurgVariation;
var int Diego_FajethVariation;
var int Diego_SilvestroVariation;
var int Diego_GrimesVariation;
var int Diego_XardasVariation;
var int Diego_IceVariation;
instance DIA_Addon_ThiefOW_TooFar(C_Info)
{
npc = PC_ThiefOW;
nr = 14;
condition = DIA_Addon_ThiefOW_TooFar_Condition;
information = DIA_Addon_ThiefOW_TooFar_Info;
permanent = TRUE;
important = TRUE;
};
func int DIA_Addon_ThiefOW_TooFar_Condition()
{
if(self.aivar[AIV_PARTYMEMBER] == TRUE)
{
if(C_DiegoTooFar(0))
{
if(Diego_TooFarComment == FALSE)
{
return TRUE;
};
}
else
{
Diego_TooFarComment = FALSE;
};
};
return FALSE;
};
func void DIA_Addon_ThiefOW_TooFar_Info()
{
var int location;
location = C_DiegoTooFar(1000);
if(location == LOC_ANGAR)
{
AI_Output(self,other,"DIA_Addon_Diego_TooFar_11_02"); //От этой старой гробницы веет ужасом.
AI_Output(self,other,"DIA_Addon_Diego_TooFar_11_03"); //Лучше нам ее обойти.
}
else if(location == LOC_ICE)
{
if(Diego_IceVariation == 0)
{
AI_Output(self,other,"DIA_Addon_Diego_TooFar_11_04"); //Это вход в бывший Новый Лагерь.
AI_Output(self,other,"DIA_Addon_Diego_TooFar_11_05"); //Я уверен, что там поселился дракон.
Diego_IceVariation = 1;
};
AI_Output(self,other,"DIA_Addon_Diego_TooFar_11_01"); //Чтобы попасть к Проходу, мы должны идти в другом направлении.
}
else if(location == LOC_SWAMP)
{
AI_Output(self,other,"DIA_Addon_Diego_TooFar_11_06"); //Это болото кончается тупиком.
AI_Output(self,other,"DIA_Addon_Diego_TooFar_11_07"); //Не удивлюсь, если там нас может поджидать дракон.
AI_Output(self,other,"DIA_Addon_Diego_TooFar_11_08"); //Не стоит туда идти.
}
else if(location == LOC_FIRE)
{
AI_Output(self,other,"DIA_Addon_Diego_TooFar_11_09"); //Если мы продолжим лезть на эту гору, мы наверняка встретим дракона.
AI_Output(self,other,"DIA_Addon_Diego_TooFar_11_10"); //А я хотел бы все же живым добраться до Хориниса.
AI_Output(self,other,"DIA_Addon_Diego_TooFar_11_11"); //Давай пойдем по другому пути.
}
else if(location == LOC_LAKE)
{
AI_Output(self,other,"DIA_Addon_Diego_TooFar_11_12"); //Эта дорога нас никуда не приведет.
AI_Output(self,other,"DIA_Addon_Diego_TooFar_11_13"); //Чтобы попасть к Проходу, мы должны идти в другом направлении!
}
else if(location == LOC_XARDAS)
{
if(Diego_XardasVariation == 0)
{
AI_Output(self,other,"DIA_Addon_Diego_TooFar_11_14"); //Это старая башня Ксардаса. Сам он, конечно, в ней давно не появляется.
AI_Output(self,other,"DIA_Addon_Diego_TooFar_11_15"); //Уверен, что внутри нас ждут неприятные сюрпризы.
Diego_XardasVariation = 1;
};
B_Addon_Diego_WillWaitOutside();
AI_StopProcessInfos(self);
self.aivar[AIV_PARTYMEMBER] = FALSE;
Npc_ExchangeRoutine(self,"XARDAS");
}
else if(location == LOC_FAJETHMINE)
{
if(Diego_FajethVariation == 0)
{
AI_Output(self,other,"DIA_Addon_Diego_TooFar_11_16"); //Это шахта Фаджета.
AI_Output(self,other,"DIA_Addon_Diego_TooFar_11_17"); //Если ты хочешь туда пойти, на меня не рассчитывай!
Diego_FajethVariation = 1;
}
else
{
AI_Output(self,other,"DIA_Addon_Diego_TooFar_11_18"); //Я намерен держаться от этой шахты подальше!
};
}
else if(location == LOC_SILVESTROMINE)
{
if(Diego_SilvestroVariation == 0)
{
AI_Output(self,other,"DIA_Addon_Diego_TooFar_11_19"); //Эта шахта, в которую меня поместили, когда я вернулся сюда вместе с другими заключенными.
AI_Output(self,other,"DIA_Addon_Diego_TooFar_11_20"); //Уверен, что живых там не осталось.
B_Addon_Diego_WillWaitOutside();
AI_Output(self,other,"DIA_Addon_Diego_TooFar_Add_11_20"); //Но если ты будешь задерживаться, я вернусь в свое укрытие.
AI_Output(self,other,"DIA_Addon_Diego_TooFar_Add_11_21"); //Если, конечно, ты не хочешь, чтобы я подождал тебя здесь.
Diego_SilvestroVariation = 1;
}
else
{
B_Addon_Diego_WillWaitOutside();
};
AI_StopProcessInfos(self);
self.aivar[AIV_PARTYMEMBER] = FALSE;
Npc_ExchangeRoutine(self,"SILVESTRO");
}
else if(location == LOC_GRIMESMINE)
{
if(Diego_GrimesVariation == 0)
{
AI_Output(self,other,"DIA_Addon_Diego_TooFar_11_21"); //Это одна из новых шахт паладинов.
AI_Output(self,other,"DIA_Addon_Diego_TooFar_11_22"); //Я никогда там не был и идти туда не собираюсь.
Diego_GrimesVariation = 1;
}
else
{
AI_Output(self,other,"DIA_Addon_Diego_TooFar_11_23"); //Давай обойдем ее подальше.
};
}
else if(location == LOC_BURG)
{
if(Diego_BurgVariation == 0)
{
AI_Output(self,other,"DIA_Addon_Diego_TooFar_11_24"); //Тебе жить надоело? Держись от замка подальше.
Diego_BurgVariation = 1;
}
else if(Diego_BurgVariation == 1)
{
AI_Output(self,other,"DIA_Addon_Diego_TooFar_11_25"); //Эй, ты меня вообще слушаешь?! Не подходи к замку!
Diego_BurgVariation = 2;
}
else
{
AI_Output(self,other,"DIA_Addon_Diego_TooFar_11_26"); //Что во фразе 'не подходи к замку' тебе непонятно?
Diego_BurgVariation = 1;
};
}
else if(location == LOC_ORCBARRIER)
{
AI_Output(self,other,"DIA_Addon_Diego_TooFar_11_27"); //Нам нельзя туда идти. У Стены орков слишком опасно.
AI_Output(self,other,"DIA_Addon_Diego_TooFar_11_28"); //Я думаю, нам будет лучше пойти на запад и двигаться по другой стороне.
}
else if(location == LOC_ORCBARRIER_FAR)
{
AI_Output(self,other,"DIA_Addon_Diego_TooFar_11_29"); //Если мы продолжим двигаться в этом направлении, мы снова упремся в Стену орков.
AI_Output(self,other,"DIA_Addon_Diego_TooFar_11_30"); //Пойдем к Проходу!
}
else if(location == LOC_ROCK)
{
AI_Output(self,other,"DIA_Addon_Diego_TooFar_11_09"); //Если мы продолжим лезть на эту гору, мы наверняка встретим дракона.
AI_Output(self,other,"DIA_Addon_Diego_TooFar_11_08"); //Не стоит туда идти.
};
Diego_TooFarComment = TRUE;
Info_ClearChoices(DIA_Addon_ThiefOW_TooFar);
Info_AddChoice(DIA_Addon_ThiefOW_TooFar,"Подожди здесь!",DIA_Addon_ThiefOW_GoHome_Info);
Info_AddChoice(DIA_Addon_ThiefOW_TooFar,"Пойдем со мной.",DIA_Addon_ThiefOW_ComeOn_Info);
};
func void B_Diego_WirSindDa()
{
AI_Output(self,other,"DIA_Addon_Diego_Angekommen_11_02"); //Оставшуюся часть пути я проделаю сам.
AI_Output(self,other,"DIA_Addon_Diego_Angekommen_11_03"); //Мне нужно кое-что сделать, прежде чем возвращаться в Хоринис.
AI_Output(self,other,"DIA_Addon_Diego_Angekommen_11_04"); //Благодарю тебя, мой друг. Увидимся в городе.
AI_StopProcessInfos(self);
self.aivar[AIV_PARTYMEMBER] = FALSE;
Npc_ExchangeRoutine(self,"PASS");
Diego_angekommen = TRUE;
};
instance DIA_Addon_ThiefOW_Angekommen(C_Info)
{
npc = PC_ThiefOW;
nr = 1;
condition = DIA_Addon_ThiefOW_Angekommen_Condition;
information = DIA_Addon_ThiefOW_Angekommen_Info;
important = TRUE;
};
func int DIA_Addon_ThiefOW_Angekommen_Condition()
{
if((Npc_GetDistToWP(self,"OW_VM_ENTRANCE") < 800) && !Npc_KnowsInfo(other,DIA_Addon_ThiefOW_Nostalgie))
{
return TRUE;
};
};
func void DIA_Addon_ThiefOW_Angekommen_Info()
{
AI_Output(self,other,"DIA_Addon_Diego_Angekommen_11_01"); //Это место...
B_GivePlayerXP(500);
B_Diego_WirSindDa();
};
instance DIA_Addon_ThiefOW_Nostalgie(C_Info)
{
npc = PC_ThiefOW;
nr = 1;
condition = DIA_Addon_ThiefOW_Nostalgie_Condition;
information = DIA_Addon_ThiefOW_Nostalgie_Info;
important = TRUE;
};
func int DIA_Addon_ThiefOW_Nostalgie_Condition()
{
if(Npc_GetDistToWP(self,"WP_INTRO14") < 2000)
{
return TRUE;
};
};
func void DIA_Addon_ThiefOW_Nostalgie_Info()
{
AI_Output(self,other,"DIA_Addon_Diego_Nostalgie_11_01"); //Помнишь, тогда?
AI_Output(self,other,"DIA_Addon_Diego_Nostalgie_11_02"); //Когда мы первый раз встретились?
AI_Output(self,other,"DIA_Addon_Diego_Nostalgie_11_03"); //Кажется, это было сотни лет назад...
AI_Output(self,other,"DIA_Addon_Diego_Nostalgie_11_04"); //В этом месте было что-то ЕЩЕ. Черт! Я не могу вспомнить.
AI_Output(self,other,"DIA_Addon_Diego_Nostalgie_11_05"); //Ну ладно...
Diego_Nostalgie = TRUE;
B_GivePlayerXP(1000);
PrintScreen(NAME_Addon_NostalgieBonus,-1,57,FONT_Screen,2);
B_Diego_WirSindDa();
};
instance DIA_Addon_ThiefOW_PERM(C_Info)
{
npc = PC_ThiefOW;
nr = 10;
condition = DIA_Addon_ThiefOW_PERM_Condition;
information = DIA_Addon_ThiefOW_PERM_Info;
permanent = TRUE;
description = "Как дела?";
};
func int DIA_Addon_ThiefOW_PERM_Condition()
{
if(Npc_KnowsInfo(other,DIA_DiegoOw_Perm) && Npc_KnowsInfo(other,DIA_Addon_ThiefOW_Together))
{
return TRUE;
};
};
func void DIA_Addon_ThiefOW_PERM_Info()
{
AI_Output(other,self,"DIA_Addon_Diego_PERM_15_00"); //Как дела?
if(self.attribute[ATR_HITPOINTS] <= (self.attribute[ATR_HITPOINTS_MAX] / 2))
{
AI_Output(self,other,"DIA_Addon_Diego_PERM_11_01"); //Мне бы не помешало зелье лечения. У тебя не найдется для меня пузырька?
}
else if((self.aivar[AIV_PARTYMEMBER] == FALSE) && (Diego_angekommen == FALSE))
{
AI_Output(self,other,"DIA_Addon_Diego_PERM_11_02"); //Скажи мне, когда будешь готов.
}
else if(Diego_angekommen == TRUE)
{
AI_Output(self,other,"DIA_Addon_Diego_PERM_11_03"); //Хорошо... Мне просто нужно... немного отдохнуть.
}
else
{
AI_Output(self,other,"DIA_Addon_Diego_PERM_11_04"); //Хорошо.
};
};
|
D
|
/Users/rodydavis/Development/github/flutter_everywhere/build/macos/Build/Intermediates.noindex/Runner.build/Debug/Runner.build/Objects-normal/x86_64/ExampleWindow.o : /Users/rodydavis/Development/github/flutter_everywhere/macos/AppDelegate.swift /Users/rodydavis/Development/github/flutter_everywhere/macos/ExampleWindow.swift /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 /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 /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/SwiftOnoneSupport.swiftmodule /Users/rodydavis/Development/github/flutter_everywhere/build/macos/Build/Products/flutter_framework/FlutterMacOS.framework/Headers/FlutterMacOS.h /Users/rodydavis/Development/github/flutter_everywhere/build/macos/Build/Products/flutter_framework/FlutterMacOS.framework/Headers/FLEOpenGLContextHandling.h /Users/rodydavis/Development/github/flutter_everywhere/build/macos/Build/Products/flutter_framework/FlutterMacOS.framework/Headers/FLEPlugin.h /Users/rodydavis/Development/github/flutter_everywhere/build/macos/Build/Products/flutter_framework/FlutterMacOS.framework/Headers/FLEPluginRegistrar.h /Users/rodydavis/Development/github/flutter_everywhere/macos/Runner-Bridging-Header.h /Users/rodydavis/Development/github/flutter_everywhere/build/macos/Build/Products/flutter_framework/FlutterMacOS.framework/Headers/FlutterBinaryMessenger.h /Users/rodydavis/Development/github/flutter_everywhere/build/macos/Build/Products/flutter_framework/FlutterMacOS.framework/Headers/FLEViewController.h /Users/rodydavis/Development/github/flutter_everywhere/build/macos/Build/Products/flutter_framework/FlutterMacOS.framework/Headers/FLEReshapeListener.h /Users/rodydavis/Development/github/flutter_everywhere/build/macos/Build/Products/flutter_framework/FlutterMacOS.framework/Headers/FlutterCodecs.h /Users/rodydavis/Development/github/flutter_everywhere/build/macos/Build/Products/flutter_framework/FlutterMacOS.framework/Headers/FlutterChannels.h /Users/rodydavis/Development/github/flutter_everywhere/build/macos/Build/Products/flutter_framework/FlutterMacOS.framework/Headers/FlutterMacros.h /Users/rodydavis/Development/github/flutter_everywhere/macos/PluginRegistrant.h /Users/rodydavis/Development/github/flutter_everywhere/build/macos/Build/Products/flutter_framework/FlutterMacOS.framework/Headers/FLEView.h /Users/rodydavis/Development/github/flutter_everywhere/build/macos/Build/Products/flutter_framework/FlutterMacOS.framework/Modules/module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/xpc/XPC.apinotes /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/System/Library/Frameworks/CoreData.framework/Headers/CoreData.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImage.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/QuartzCore.apinotes /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Dispatch.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.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/AppKit.framework/Headers/AppKit.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/rodydavis/Development/github/flutter_everywhere/build/macos/Build/Intermediates.noindex/Runner.build/Debug/Runner.build/Objects-normal/x86_64/ExampleWindow~partial.swiftmodule : /Users/rodydavis/Development/github/flutter_everywhere/macos/AppDelegate.swift /Users/rodydavis/Development/github/flutter_everywhere/macos/ExampleWindow.swift /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 /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 /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/SwiftOnoneSupport.swiftmodule /Users/rodydavis/Development/github/flutter_everywhere/build/macos/Build/Products/flutter_framework/FlutterMacOS.framework/Headers/FlutterMacOS.h /Users/rodydavis/Development/github/flutter_everywhere/build/macos/Build/Products/flutter_framework/FlutterMacOS.framework/Headers/FLEOpenGLContextHandling.h /Users/rodydavis/Development/github/flutter_everywhere/build/macos/Build/Products/flutter_framework/FlutterMacOS.framework/Headers/FLEPlugin.h /Users/rodydavis/Development/github/flutter_everywhere/build/macos/Build/Products/flutter_framework/FlutterMacOS.framework/Headers/FLEPluginRegistrar.h /Users/rodydavis/Development/github/flutter_everywhere/macos/Runner-Bridging-Header.h /Users/rodydavis/Development/github/flutter_everywhere/build/macos/Build/Products/flutter_framework/FlutterMacOS.framework/Headers/FlutterBinaryMessenger.h /Users/rodydavis/Development/github/flutter_everywhere/build/macos/Build/Products/flutter_framework/FlutterMacOS.framework/Headers/FLEViewController.h /Users/rodydavis/Development/github/flutter_everywhere/build/macos/Build/Products/flutter_framework/FlutterMacOS.framework/Headers/FLEReshapeListener.h /Users/rodydavis/Development/github/flutter_everywhere/build/macos/Build/Products/flutter_framework/FlutterMacOS.framework/Headers/FlutterCodecs.h /Users/rodydavis/Development/github/flutter_everywhere/build/macos/Build/Products/flutter_framework/FlutterMacOS.framework/Headers/FlutterChannels.h /Users/rodydavis/Development/github/flutter_everywhere/build/macos/Build/Products/flutter_framework/FlutterMacOS.framework/Headers/FlutterMacros.h /Users/rodydavis/Development/github/flutter_everywhere/macos/PluginRegistrant.h /Users/rodydavis/Development/github/flutter_everywhere/build/macos/Build/Products/flutter_framework/FlutterMacOS.framework/Headers/FLEView.h /Users/rodydavis/Development/github/flutter_everywhere/build/macos/Build/Products/flutter_framework/FlutterMacOS.framework/Modules/module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/xpc/XPC.apinotes /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/System/Library/Frameworks/CoreData.framework/Headers/CoreData.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImage.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/QuartzCore.apinotes /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Dispatch.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.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/AppKit.framework/Headers/AppKit.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/rodydavis/Development/github/flutter_everywhere/build/macos/Build/Intermediates.noindex/Runner.build/Debug/Runner.build/Objects-normal/x86_64/ExampleWindow~partial.swiftdoc : /Users/rodydavis/Development/github/flutter_everywhere/macos/AppDelegate.swift /Users/rodydavis/Development/github/flutter_everywhere/macos/ExampleWindow.swift /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 /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 /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/SwiftOnoneSupport.swiftmodule /Users/rodydavis/Development/github/flutter_everywhere/build/macos/Build/Products/flutter_framework/FlutterMacOS.framework/Headers/FlutterMacOS.h /Users/rodydavis/Development/github/flutter_everywhere/build/macos/Build/Products/flutter_framework/FlutterMacOS.framework/Headers/FLEOpenGLContextHandling.h /Users/rodydavis/Development/github/flutter_everywhere/build/macos/Build/Products/flutter_framework/FlutterMacOS.framework/Headers/FLEPlugin.h /Users/rodydavis/Development/github/flutter_everywhere/build/macos/Build/Products/flutter_framework/FlutterMacOS.framework/Headers/FLEPluginRegistrar.h /Users/rodydavis/Development/github/flutter_everywhere/macos/Runner-Bridging-Header.h /Users/rodydavis/Development/github/flutter_everywhere/build/macos/Build/Products/flutter_framework/FlutterMacOS.framework/Headers/FlutterBinaryMessenger.h /Users/rodydavis/Development/github/flutter_everywhere/build/macos/Build/Products/flutter_framework/FlutterMacOS.framework/Headers/FLEViewController.h /Users/rodydavis/Development/github/flutter_everywhere/build/macos/Build/Products/flutter_framework/FlutterMacOS.framework/Headers/FLEReshapeListener.h /Users/rodydavis/Development/github/flutter_everywhere/build/macos/Build/Products/flutter_framework/FlutterMacOS.framework/Headers/FlutterCodecs.h /Users/rodydavis/Development/github/flutter_everywhere/build/macos/Build/Products/flutter_framework/FlutterMacOS.framework/Headers/FlutterChannels.h /Users/rodydavis/Development/github/flutter_everywhere/build/macos/Build/Products/flutter_framework/FlutterMacOS.framework/Headers/FlutterMacros.h /Users/rodydavis/Development/github/flutter_everywhere/macos/PluginRegistrant.h /Users/rodydavis/Development/github/flutter_everywhere/build/macos/Build/Products/flutter_framework/FlutterMacOS.framework/Headers/FLEView.h /Users/rodydavis/Development/github/flutter_everywhere/build/macos/Build/Products/flutter_framework/FlutterMacOS.framework/Modules/module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/xpc/XPC.apinotes /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/System/Library/Frameworks/CoreData.framework/Headers/CoreData.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImage.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/QuartzCore.apinotes /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Dispatch.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.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/AppKit.framework/Headers/AppKit.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
|
platform/android/Rhodes/jni/src/callbacks.cpp /Users/karamon/.rvm/gems/ruby-1.9.3-p0@rhodes/gems/rhodes-3.3.3.beta.3/platform/android/Rhodes/jni/src/../include/rhodes/JNIRhodes.h /Users/karamon/SDK/android-ndk/sources/cxx-stl/stlport/stlport/assert.h /Users/karamon/SDK/android-ndk/sources/cxx-stl/stlport/stlport/stl/_cprolog.h /Users/karamon/SDK/android-ndk/sources/cxx-stl/stlport/stlport/stl/config/features.h /Users/karamon/SDK/android-ndk/sources/cxx-stl/stlport/stlport/stl/_stlport_version.h /Users/karamon/SDK/android-ndk/sources/cxx-stl/stlport/stlport/stl/config/user_config.h /Users/karamon/SDK/android-ndk/sources/cxx-stl/stlport/stlport/stl/config/compat.h /Users/karamon/SDK/android-ndk/sources/cxx-stl/stlport/stlport/stl/config/host.h /Users/karamon/SDK/android-ndk/sources/cxx-stl/stlport/stlport/stl/config/_system.h /Users/karamon/SDK/android-ndk/sources/cxx-stl/stlport/stlport/stl/config/_android.h /Users/karamon/SDK/android-ndk/sources/cxx-stl/stlport/stlport/stl/config/_gcc.h /Users/karamon/SDK/android-ndk/sources/cxx-stl/stlport/stlport/stl/config/stl_confix.h /Users/karamon/SDK/android-ndk/sources/cxx-stl/stlport/stlport/stl/config/_native_headers.h /Users/karamon/SDK/android-ndk/sources/cxx-stl/stlport/stlport/stl/_epilog.h /Users/karamon/SDK/android-ndk/sources/cxx-stl/stlport/stlport/stl/_config_compat_post.h /Users/karamon/SDK/android-ndk/sources/cxx-stl/stlport/stlport/stdlib.h /Users/karamon/.rvm/gems/ruby-1.9.3-p0@rhodes/gems/rhodes-3.3.3.beta.3/platform/android/Rhodes/jni/src/../include/rhodes.h /Users/karamon/SDK/android-ndk/sources/cxx-stl/stlport/stlport/string /Users/karamon/SDK/android-ndk/sources/cxx-stl/stlport/stlport/stl/_prolog.h /Users/karamon/SDK/android-ndk/sources/cxx-stl/stlport/stlport/stl/debug/_debug.h /Users/karamon/SDK/android-ndk/sources/cxx-stl/stlport/stlport/stl/_string.h /Users/karamon/SDK/android-ndk/sources/cxx-stl/stlport/stlport/stl/_alloc.h /Users/karamon/SDK/android-ndk/sources/cxx-stl/stlport/stlport/stl/_cstddef.h /Users/karamon/SDK/android-ndk/sources/cxx-stl/stlport/stlport/stl/_cstdlib.h /Users/karamon/SDK/android-ndk/sources/cxx-stl/stlport/stlport/stl/_cmath.h /Users/karamon/SDK/android-ndk/sources/cxx-stl/stlport/stlport/math.h /Users/karamon/SDK/android-ndk/sources/cxx-stl/stlport/stlport/stl/_cstring.h /Users/karamon/SDK/android-ndk/sources/cxx-stl/stlport/stlport/using/cstring /Users/karamon/SDK/android-ndk/sources/cxx-stl/stlport/stlport/stl/_algobase.h /Users/karamon/SDK/android-ndk/sources/cxx-stl/stlport/stlport/climits /Users/karamon/SDK/android-ndk/sources/cxx-stl/stlport/stlport/stl/_pair.h /Users/karamon/SDK/android-ndk/sources/cxx-stl/stlport/stlport/stl/type_traits.h /Users/karamon/SDK/android-ndk/sources/cxx-stl/stlport/stlport/stl/type_manips.h /Users/karamon/SDK/android-ndk/sources/cxx-stl/stlport/stlport/stl/_move_construct_fwk.h /Users/karamon/SDK/android-ndk/sources/cxx-stl/stlport/stlport/stl/_iterator_base.h /Users/karamon/SDK/android-ndk/sources/cxx-stl/stlport/stlport/stl/_ptrs_specialize.h /Users/karamon/SDK/android-ndk/sources/cxx-stl/stlport/stlport/stl/_algobase.c /Users/karamon/SDK/android-ndk/sources/cxx-stl/stlport/stlport/stl/_function_base.h /Users/karamon/SDK/android-ndk/sources/cxx-stl/stlport/stlport/stl/_iterator.h /Users/karamon/SDK/android-ndk/sources/cxx-stl/stlport/stlport/stl/_new.h /Users/karamon/SDK/android-ndk/sources/cxx-stl/stlport/stlport/../../gabi++/include/new /Users/karamon/SDK/android-ndk/sources/cxx-stl/stlport/stlport/cstddef /Users/karamon/SDK/android-ndk/sources/cxx-stl/stlport/stlport/../../gabi++/include/cstddef /Users/karamon/SDK/android-ndk/sources/cxx-stl/stlport/stlport/stl/_cstdio.h /Users/karamon/SDK/android-ndk/sources/cxx-stl/stlport/stlport/stdio.h /Users/karamon/SDK/android-ndk/sources/cxx-stl/stlport/stlport/stl/_construct.h /Users/karamon/SDK/android-ndk/sources/cxx-stl/stlport/stlport/stl/_alloc.c /Users/karamon/SDK/android-ndk/sources/cxx-stl/stlport/stlport/stl/_string_fwd.h /Users/karamon/SDK/android-ndk/sources/cxx-stl/stlport/stlport/stl/_iosfwd.h /Users/karamon/SDK/android-ndk/sources/cxx-stl/stlport/stlport/stl/char_traits.h /Users/karamon/SDK/android-ndk/sources/cxx-stl/stlport/stlport/stl/_cwchar.h /Users/karamon/SDK/android-ndk/sources/cxx-stl/stlport/stlport/stl/_mbstate_t.h /Users/karamon/SDK/android-ndk/sources/cxx-stl/stlport/stlport/stl/_uninitialized.h /Users/karamon/SDK/android-ndk/sources/cxx-stl/stlport/stlport/stl/_string_base.h /Users/karamon/SDK/android-ndk/sources/cxx-stl/stlport/stlport/stl/_string_npos.h /Users/karamon/SDK/android-ndk/sources/cxx-stl/stlport/stlport/stl/_string_operators.h /Users/karamon/SDK/android-ndk/sources/cxx-stl/stlport/stlport/stl/_string.c /Users/karamon/SDK/android-ndk/sources/cxx-stl/stlport/stlport/stl/_ctraits_fns.h /Users/karamon/SDK/android-ndk/sources/cxx-stl/stlport/stlport/stl/_function.h /Users/karamon/SDK/android-ndk/sources/cxx-stl/stlport/stlport/stl/_function_adaptors.h /Users/karamon/SDK/android-ndk/sources/cxx-stl/stlport/stlport/stl/_range_errors.h /Users/karamon/SDK/android-ndk/sources/cxx-stl/stlport/stlport/stl/_string_hash.h /Users/karamon/SDK/android-ndk/sources/cxx-stl/stlport/stlport/stl/_hash_fun.h /Users/karamon/SDK/android-ndk/sources/cxx-stl/stlport/stlport/stl/_string_io.h /Users/karamon/SDK/android-ndk/sources/cxx-stl/stlport/stlport/stl/_ostream.h /Users/karamon/SDK/android-ndk/sources/cxx-stl/stlport/stlport/stl/_ios.h /Users/karamon/SDK/android-ndk/sources/cxx-stl/stlport/stlport/stl/_ios_base.h /Users/karamon/SDK/android-ndk/sources/cxx-stl/stlport/stlport/stl/_stdexcept_base.h /Users/karamon/SDK/android-ndk/sources/cxx-stl/stlport/stlport/stl/_exception.h /Users/karamon/SDK/android-ndk/sources/cxx-stl/stlport/stlport/stl/_locale.h /Users/karamon/SDK/android-ndk/sources/cxx-stl/stlport/stlport/stl/_threads.h /Users/karamon/SDK/android-ndk/sources/cxx-stl/stlport/stlport/pthread.h /Users/karamon/SDK/android-ndk/sources/cxx-stl/stlport/stlport/stl/_threads.c /Users/karamon/SDK/android-ndk/sources/cxx-stl/stlport/stlport/stl/_ctime.h /Users/karamon/SDK/android-ndk/sources/cxx-stl/stlport/stlport/stl/_facets_fwd.h /Users/karamon/SDK/android-ndk/sources/cxx-stl/stlport/stlport/stl/_ctype.h /Users/karamon/SDK/android-ndk/sources/cxx-stl/stlport/stlport/stl/c_locale.h /Users/karamon/SDK/android-ndk/sources/cxx-stl/stlport/stlport/stl/_numpunct.h /Users/karamon/SDK/android-ndk/sources/cxx-stl/stlport/stlport/stl/_ios.c /Users/karamon/SDK/android-ndk/sources/cxx-stl/stlport/stlport/stl/_streambuf.h /Users/karamon/SDK/android-ndk/sources/cxx-stl/stlport/stlport/stl/_streambuf.c /Users/karamon/SDK/android-ndk/sources/cxx-stl/stlport/stlport/stl/_ostreambuf_iterator.h /Users/karamon/SDK/android-ndk/sources/cxx-stl/stlport/stlport/stl/_ostream.c /Users/karamon/SDK/android-ndk/sources/cxx-stl/stlport/stlport/stl/_num_put.h /Users/karamon/SDK/android-ndk/sources/cxx-stl/stlport/stlport/stl/_iostream_string.h /Users/karamon/SDK/android-ndk/sources/cxx-stl/stlport/stlport/stl/_num_put.c /Users/karamon/SDK/android-ndk/sources/cxx-stl/stlport/stlport/stl/_limits.h /Users/karamon/SDK/android-ndk/sources/cxx-stl/stlport/stlport/cfloat /Users/karamon/SDK/android-ndk/sources/cxx-stl/stlport/stlport/float.h /Users/karamon/SDK/android-ndk/sources/cxx-stl/stlport/stlport/stl/_limits.c /Users/karamon/SDK/android-ndk/sources/cxx-stl/stlport/stlport/stl/_istream.h /Users/karamon/SDK/android-ndk/sources/cxx-stl/stlport/stlport/stl/_istreambuf_iterator.h /Users/karamon/SDK/android-ndk/sources/cxx-stl/stlport/stlport/stl/_istream.c /Users/karamon/SDK/android-ndk/sources/cxx-stl/stlport/stlport/stl/_num_get.h /Users/karamon/SDK/android-ndk/sources/cxx-stl/stlport/stlport/stl/_num_get.c /Users/karamon/SDK/android-ndk/sources/cxx-stl/stlport/stlport/stl/_string_io.c /Users/karamon/SDK/android-ndk/sources/cxx-stl/stlport/stlport/memory /Users/karamon/SDK/android-ndk/sources/cxx-stl/stlport/stlport/stl/_tempbuf.h /Users/karamon/SDK/android-ndk/sources/cxx-stl/stlport/stlport/stl/_tempbuf.c /Users/karamon/SDK/android-ndk/sources/cxx-stl/stlport/stlport/stl/_raw_storage_iter.h /Users/karamon/SDK/android-ndk/sources/cxx-stl/stlport/stlport/stl/_auto_ptr.h /Users/karamon/.rvm/gems/ruby-1.9.3-p0@rhodes/gems/rhodes-3.3.3.beta.3/platform/android/../shared/common/RhoDefs.h /Users/karamon/.rvm/gems/ruby-1.9.3-p0@rhodes/gems/rhodes-3.3.3.beta.3/platform/android/../shared/common/RhoStd.h /Users/karamon/.rvm/gems/ruby-1.9.3-p0@rhodes/gems/rhodes-3.3.3.beta.3/platform/android/../shared/common/RhoPort.h /Users/karamon/.rvm/gems/ruby-1.9.3-p0@rhodes/gems/rhodes-3.3.3.beta.3/platform/android/../shared/common/RhoDefs.h /Users/karamon/SDK/android-ndk/sources/cxx-stl/stlport/stlport/ctype.h /Users/karamon/SDK/android-ndk/sources/cxx-stl/stlport/stlport/errno.h /Users/karamon/.rvm/gems/ruby-1.9.3-p0@rhodes/gems/rhodes-3.3.3.beta.3/platform/android/../shared/common/stat.h /Users/karamon/SDK/android-ndk/sources/cxx-stl/stlport/stlport/vector /Users/karamon/SDK/android-ndk/sources/cxx-stl/stlport/stlport/stl/_vector.h /Users/karamon/SDK/android-ndk/sources/cxx-stl/stlport/stlport/stl/_vector.c /Users/karamon/SDK/android-ndk/sources/cxx-stl/stlport/stlport/stl/_bvector.h /Users/karamon/SDK/android-ndk/sources/cxx-stl/stlport/stlport/stl/_relops_cont.h /Users/karamon/SDK/android-ndk/sources/cxx-stl/stlport/stlport/map /Users/karamon/SDK/android-ndk/sources/cxx-stl/stlport/stlport/stl/_map.h /Users/karamon/SDK/android-ndk/sources/cxx-stl/stlport/stlport/stl/_tree.h /Users/karamon/SDK/android-ndk/sources/cxx-stl/stlport/stlport/stl/_tree.c /Users/karamon/.rvm/gems/ruby-1.9.3-p0@rhodes/gems/rhodes-3.3.3.beta.3/platform/android/../shared/logging/RhoLogConf.h /Users/karamon/.rvm/gems/ruby-1.9.3-p0@rhodes/gems/rhodes-3.3.3.beta.3/platform/android/../shared/common/RhoMutexLock.h /Users/karamon/.rvm/gems/ruby-1.9.3-p0@rhodes/gems/rhodes-3.3.3.beta.3/platform/android/../shared/logging/RhoLog.h /Users/karamon/.rvm/gems/ruby-1.9.3-p0@rhodes/gems/rhodes-3.3.3.beta.3/platform/android/../shared/logging/RhoLogConf.h /Users/karamon/.rvm/gems/ruby-1.9.3-p0@rhodes/gems/rhodes-3.3.3.beta.3/platform/android/../shared/common/StringConverter.h /Users/karamon/.rvm/gems/ruby-1.9.3-p0@rhodes/gems/rhodes-3.3.3.beta.3/platform/android/../shared/logging/RhoLogCat.h /Users/karamon/.rvm/gems/ruby-1.9.3-p0@rhodes/gems/rhodes-3.3.3.beta.3/platform/android/../shared/common/RhoPort.h /Users/karamon/.rvm/gems/ruby-1.9.3-p0@rhodes/gems/rhodes-3.3.3.beta.3/platform/android/../shared/common/RhoFatalError.h /Users/karamon/Projects/rhodes/vd-mobile/bin/tmp/include/genconfig.h /Users/karamon/.rvm/gems/ruby-1.9.3-p0@rhodes/gems/rhodes-3.3.3.beta.3/platform/android/Rhodes/jni/src/../include/rhodes/details/rhojava.inc /Users/karamon/.rvm/gems/ruby-1.9.3-p0@rhodes/gems/rhodes-3.3.3.beta.3/platform/android/Rhodes/jni/src/../include/rhodes/JNIRhoRuby.h /Users/karamon/.rvm/gems/ruby-1.9.3-p0@rhodes/gems/rhodes-3.3.3.beta.3/platform/android/../shared/ruby/include/ruby.h /Users/karamon/.rvm/gems/ruby-1.9.3-p0@rhodes/gems/rhodes-3.3.3.beta.3/platform/android/../shared/ruby/include/ruby/ruby.h /Users/karamon/.rvm/gems/ruby-1.9.3-p0@rhodes/gems/rhodes-3.3.3.beta.3/platform/android/../shared/ruby/android/ruby/config.h /Users/karamon/.rvm/gems/ruby-1.9.3-p0@rhodes/gems/rhodes-3.3.3.beta.3/platform/android/../shared/ruby/include/ruby/defines.h /Users/karamon/.rvm/gems/ruby-1.9.3-p0@rhodes/gems/rhodes-3.3.3.beta.3/platform/android/../shared/ruby/include/ruby/missing.h /Users/karamon/.rvm/gems/ruby-1.9.3-p0@rhodes/gems/rhodes-3.3.3.beta.3/platform/android/../shared/ruby/include/ruby/intern.h /Users/karamon/.rvm/gems/ruby-1.9.3-p0@rhodes/gems/rhodes-3.3.3.beta.3/platform/android/../shared/ruby/include/ruby/st.h /Users/karamon/.rvm/gems/ruby-1.9.3-p0@rhodes/gems/rhodes-3.3.3.beta.3/platform/android/../shared/ruby/ext/rho/rhoruby.h /Users/karamon/.rvm/gems/ruby-1.9.3-p0@rhodes/gems/rhodes-3.3.3.beta.3/platform/android/Rhodes/jni/src/../include/rhodes/RhoClassFactory.h /Users/karamon/.rvm/gems/ruby-1.9.3-p0@rhodes/gems/rhodes-3.3.3.beta.3/platform/android/../shared/common/IRhoClassFactory.h /Users/karamon/.rvm/gems/ruby-1.9.3-p0@rhodes/gems/rhodes-3.3.3.beta.3/platform/android/../shared/net/INetRequest.h /Users/karamon/.rvm/gems/ruby-1.9.3-p0@rhodes/gems/rhodes-3.3.3.beta.3/platform/android/../shared/common/InputStream.h /Users/karamon/.rvm/gems/ruby-1.9.3-p0@rhodes/gems/rhodes-3.3.3.beta.3/platform/android/../shared/common/AutoPointer.h /Users/karamon/.rvm/gems/ruby-1.9.3-p0@rhodes/gems/rhodes-3.3.3.beta.3/platform/android/../shared/common/IRhoThreadImpl.h /Users/karamon/.rvm/gems/ruby-1.9.3-p0@rhodes/gems/rhodes-3.3.3.beta.3/platform/android/../shared/net/ssl.h /Users/karamon/.rvm/gems/ruby-1.9.3-p0@rhodes/gems/rhodes-3.3.3.beta.3/platform/android/../shared/curl/include/curl/curl.h /Users/karamon/.rvm/gems/ruby-1.9.3-p0@rhodes/gems/rhodes-3.3.3.beta.3/platform/android/../shared/curl/include/curl/curlver.h /Users/karamon/.rvm/gems/ruby-1.9.3-p0@rhodes/gems/rhodes-3.3.3.beta.3/platform/android/../shared/curl/include/curl/curlbuild.h /Users/karamon/.rvm/gems/ruby-1.9.3-p0@rhodes/gems/rhodes-3.3.3.beta.3/platform/android/../shared/curl/include/curl/curlrules.h /Users/karamon/.rvm/gems/ruby-1.9.3-p0@rhodes/gems/rhodes-3.3.3.beta.3/platform/android/../shared/curl/include/curl/easy.h /Users/karamon/.rvm/gems/ruby-1.9.3-p0@rhodes/gems/rhodes-3.3.3.beta.3/platform/android/../shared/curl/include/curl/multi.h /Users/karamon/.rvm/gems/ruby-1.9.3-p0@rhodes/gems/rhodes-3.3.3.beta.3/platform/android/../shared/curl/include/curl/curl.h /Users/karamon/.rvm/gems/ruby-1.9.3-p0@rhodes/gems/rhodes-3.3.3.beta.3/platform/android/../shared/common/IRhoCrypt.h /Users/karamon/.rvm/gems/ruby-1.9.3-p0@rhodes/gems/rhodes-3.3.3.beta.3/platform/android/Rhodes/jni/src/../include/rhodes/sslimpl.h
|
D
|
/*
TEST_OUTPUT:
---
fail_compilation/test17908a.d(10): Error: function `test17908a.foo` is not callable because it is annotated with `@disable`
---
*/
@disable void foo();
@disable void foo(int) {}
alias g = foo;
void main()
{
g(10);
}
|
D
|
/Users/timobrien/projects/WebViewLayout/DerivedData/UIWebViewLayout/Build/Intermediates/Pods.build/Debug-iphonesimulator/FileKit.build/Objects-normal/x86_64/Image+FileKit.o : /Users/timobrien/projects/WebViewLayout/Pods/FileKit/Sources/Array+File.swift /Users/timobrien/projects/WebViewLayout/Pods/FileKit/Sources/ArrayFile.swift /Users/timobrien/projects/WebViewLayout/Pods/FileKit/Sources/Bundle+FileKit.swift /Users/timobrien/projects/WebViewLayout/Pods/FileKit/Sources/Data+FileKit.swift /Users/timobrien/projects/WebViewLayout/Pods/FileKit/Sources/DataFile.swift /Users/timobrien/projects/WebViewLayout/Pods/FileKit/Sources/DataType.swift /Users/timobrien/projects/WebViewLayout/Pods/FileKit/Sources/Dictionary+File.swift /Users/timobrien/projects/WebViewLayout/Pods/FileKit/Sources/DictionaryFile.swift /Users/timobrien/projects/WebViewLayout/Pods/FileKit/Sources/DirectoryEnumerator.swift /Users/timobrien/projects/WebViewLayout/Pods/FileKit/Sources/DispatchEvent.swift /Users/timobrien/projects/WebViewLayout/Pods/FileKit/Sources/DispatchWatcher.swift /Users/timobrien/projects/WebViewLayout/Pods/FileKit/Sources/File.swift /Users/timobrien/projects/WebViewLayout/Pods/FileKit/Sources/FileKit.swift /Users/timobrien/projects/WebViewLayout/Pods/FileKit/Sources/FileKitError.swift /Users/timobrien/projects/WebViewLayout/Pods/FileKit/Sources/FilePermissions.swift /Users/timobrien/projects/WebViewLayout/Pods/FileKit/Sources/FileProtection.swift /Users/timobrien/projects/WebViewLayout/Pods/FileKit/Sources/FileSystemEvent.swift /Users/timobrien/projects/WebViewLayout/Pods/FileKit/Sources/FileSystemEventStream.swift /Users/timobrien/projects/WebViewLayout/Pods/FileKit/Sources/FileSystemWatcher.swift /Users/timobrien/projects/WebViewLayout/Pods/FileKit/Sources/FileType.swift /Users/timobrien/projects/WebViewLayout/Pods/FileKit/Sources/Image+FileKit.swift /Users/timobrien/projects/WebViewLayout/Pods/FileKit/Sources/ImageFile.swift /Users/timobrien/projects/WebViewLayout/Pods/FileKit/Sources/NSArray+FileKit.swift /Users/timobrien/projects/WebViewLayout/Pods/FileKit/Sources/NSData+FileKit.swift /Users/timobrien/projects/WebViewLayout/Pods/FileKit/Sources/NSDataFile.swift /Users/timobrien/projects/WebViewLayout/Pods/FileKit/Sources/NSDictionary+FileKit.swift /Users/timobrien/projects/WebViewLayout/Pods/FileKit/Sources/NSString+FileKit.swift /Users/timobrien/projects/WebViewLayout/Pods/FileKit/Sources/Operators.swift /Users/timobrien/projects/WebViewLayout/Pods/FileKit/Sources/Path.swift /Users/timobrien/projects/WebViewLayout/Pods/FileKit/Sources/Process+FileKit.swift /Users/timobrien/projects/WebViewLayout/Pods/FileKit/Sources/RelativePathType.swift /Users/timobrien/projects/WebViewLayout/Pods/FileKit/Sources/String+FileKit.swift /Users/timobrien/projects/WebViewLayout/Pods/FileKit/Sources/TextFile.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Swift.swiftmodule /Users/timobrien/projects/WebViewLayout/Pods/Target\ Support\ Files/FileKit/FileKit-umbrella.h /Users/timobrien/projects/WebViewLayout/DerivedData/UIWebViewLayout/Build/Intermediates/Pods.build/Debug-iphonesimulator/FileKit.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/timobrien/projects/WebViewLayout/DerivedData/UIWebViewLayout/Build/Intermediates/Pods.build/Debug-iphonesimulator/FileKit.build/Objects-normal/x86_64/Image+FileKit~partial.swiftmodule : /Users/timobrien/projects/WebViewLayout/Pods/FileKit/Sources/Array+File.swift /Users/timobrien/projects/WebViewLayout/Pods/FileKit/Sources/ArrayFile.swift /Users/timobrien/projects/WebViewLayout/Pods/FileKit/Sources/Bundle+FileKit.swift /Users/timobrien/projects/WebViewLayout/Pods/FileKit/Sources/Data+FileKit.swift /Users/timobrien/projects/WebViewLayout/Pods/FileKit/Sources/DataFile.swift /Users/timobrien/projects/WebViewLayout/Pods/FileKit/Sources/DataType.swift /Users/timobrien/projects/WebViewLayout/Pods/FileKit/Sources/Dictionary+File.swift /Users/timobrien/projects/WebViewLayout/Pods/FileKit/Sources/DictionaryFile.swift /Users/timobrien/projects/WebViewLayout/Pods/FileKit/Sources/DirectoryEnumerator.swift /Users/timobrien/projects/WebViewLayout/Pods/FileKit/Sources/DispatchEvent.swift /Users/timobrien/projects/WebViewLayout/Pods/FileKit/Sources/DispatchWatcher.swift /Users/timobrien/projects/WebViewLayout/Pods/FileKit/Sources/File.swift /Users/timobrien/projects/WebViewLayout/Pods/FileKit/Sources/FileKit.swift /Users/timobrien/projects/WebViewLayout/Pods/FileKit/Sources/FileKitError.swift /Users/timobrien/projects/WebViewLayout/Pods/FileKit/Sources/FilePermissions.swift /Users/timobrien/projects/WebViewLayout/Pods/FileKit/Sources/FileProtection.swift /Users/timobrien/projects/WebViewLayout/Pods/FileKit/Sources/FileSystemEvent.swift /Users/timobrien/projects/WebViewLayout/Pods/FileKit/Sources/FileSystemEventStream.swift /Users/timobrien/projects/WebViewLayout/Pods/FileKit/Sources/FileSystemWatcher.swift /Users/timobrien/projects/WebViewLayout/Pods/FileKit/Sources/FileType.swift /Users/timobrien/projects/WebViewLayout/Pods/FileKit/Sources/Image+FileKit.swift /Users/timobrien/projects/WebViewLayout/Pods/FileKit/Sources/ImageFile.swift /Users/timobrien/projects/WebViewLayout/Pods/FileKit/Sources/NSArray+FileKit.swift /Users/timobrien/projects/WebViewLayout/Pods/FileKit/Sources/NSData+FileKit.swift /Users/timobrien/projects/WebViewLayout/Pods/FileKit/Sources/NSDataFile.swift /Users/timobrien/projects/WebViewLayout/Pods/FileKit/Sources/NSDictionary+FileKit.swift /Users/timobrien/projects/WebViewLayout/Pods/FileKit/Sources/NSString+FileKit.swift /Users/timobrien/projects/WebViewLayout/Pods/FileKit/Sources/Operators.swift /Users/timobrien/projects/WebViewLayout/Pods/FileKit/Sources/Path.swift /Users/timobrien/projects/WebViewLayout/Pods/FileKit/Sources/Process+FileKit.swift /Users/timobrien/projects/WebViewLayout/Pods/FileKit/Sources/RelativePathType.swift /Users/timobrien/projects/WebViewLayout/Pods/FileKit/Sources/String+FileKit.swift /Users/timobrien/projects/WebViewLayout/Pods/FileKit/Sources/TextFile.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Swift.swiftmodule /Users/timobrien/projects/WebViewLayout/Pods/Target\ Support\ Files/FileKit/FileKit-umbrella.h /Users/timobrien/projects/WebViewLayout/DerivedData/UIWebViewLayout/Build/Intermediates/Pods.build/Debug-iphonesimulator/FileKit.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/timobrien/projects/WebViewLayout/DerivedData/UIWebViewLayout/Build/Intermediates/Pods.build/Debug-iphonesimulator/FileKit.build/Objects-normal/x86_64/Image+FileKit~partial.swiftdoc : /Users/timobrien/projects/WebViewLayout/Pods/FileKit/Sources/Array+File.swift /Users/timobrien/projects/WebViewLayout/Pods/FileKit/Sources/ArrayFile.swift /Users/timobrien/projects/WebViewLayout/Pods/FileKit/Sources/Bundle+FileKit.swift /Users/timobrien/projects/WebViewLayout/Pods/FileKit/Sources/Data+FileKit.swift /Users/timobrien/projects/WebViewLayout/Pods/FileKit/Sources/DataFile.swift /Users/timobrien/projects/WebViewLayout/Pods/FileKit/Sources/DataType.swift /Users/timobrien/projects/WebViewLayout/Pods/FileKit/Sources/Dictionary+File.swift /Users/timobrien/projects/WebViewLayout/Pods/FileKit/Sources/DictionaryFile.swift /Users/timobrien/projects/WebViewLayout/Pods/FileKit/Sources/DirectoryEnumerator.swift /Users/timobrien/projects/WebViewLayout/Pods/FileKit/Sources/DispatchEvent.swift /Users/timobrien/projects/WebViewLayout/Pods/FileKit/Sources/DispatchWatcher.swift /Users/timobrien/projects/WebViewLayout/Pods/FileKit/Sources/File.swift /Users/timobrien/projects/WebViewLayout/Pods/FileKit/Sources/FileKit.swift /Users/timobrien/projects/WebViewLayout/Pods/FileKit/Sources/FileKitError.swift /Users/timobrien/projects/WebViewLayout/Pods/FileKit/Sources/FilePermissions.swift /Users/timobrien/projects/WebViewLayout/Pods/FileKit/Sources/FileProtection.swift /Users/timobrien/projects/WebViewLayout/Pods/FileKit/Sources/FileSystemEvent.swift /Users/timobrien/projects/WebViewLayout/Pods/FileKit/Sources/FileSystemEventStream.swift /Users/timobrien/projects/WebViewLayout/Pods/FileKit/Sources/FileSystemWatcher.swift /Users/timobrien/projects/WebViewLayout/Pods/FileKit/Sources/FileType.swift /Users/timobrien/projects/WebViewLayout/Pods/FileKit/Sources/Image+FileKit.swift /Users/timobrien/projects/WebViewLayout/Pods/FileKit/Sources/ImageFile.swift /Users/timobrien/projects/WebViewLayout/Pods/FileKit/Sources/NSArray+FileKit.swift /Users/timobrien/projects/WebViewLayout/Pods/FileKit/Sources/NSData+FileKit.swift /Users/timobrien/projects/WebViewLayout/Pods/FileKit/Sources/NSDataFile.swift /Users/timobrien/projects/WebViewLayout/Pods/FileKit/Sources/NSDictionary+FileKit.swift /Users/timobrien/projects/WebViewLayout/Pods/FileKit/Sources/NSString+FileKit.swift /Users/timobrien/projects/WebViewLayout/Pods/FileKit/Sources/Operators.swift /Users/timobrien/projects/WebViewLayout/Pods/FileKit/Sources/Path.swift /Users/timobrien/projects/WebViewLayout/Pods/FileKit/Sources/Process+FileKit.swift /Users/timobrien/projects/WebViewLayout/Pods/FileKit/Sources/RelativePathType.swift /Users/timobrien/projects/WebViewLayout/Pods/FileKit/Sources/String+FileKit.swift /Users/timobrien/projects/WebViewLayout/Pods/FileKit/Sources/TextFile.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Swift.swiftmodule /Users/timobrien/projects/WebViewLayout/Pods/Target\ Support\ Files/FileKit/FileKit-umbrella.h /Users/timobrien/projects/WebViewLayout/DerivedData/UIWebViewLayout/Build/Intermediates/Pods.build/Debug-iphonesimulator/FileKit.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
|
a fee paid for instruction (especially for higher education
teaching pupils individually (usually by a tutor hired privately)
|
D
|
//-----------------------------------------------------------------------------
// wxD - SpinCtrl.d
// (C) 2005 bero <berobero@users.sourceforge.net>
// based on
// wx.NET - SpinCtrl.cs
//
/// The wxSpinCtrl wrapper class.
//
// Written by Bryan Bulten (bryan@bulten.ca)
// (C) 2003 Bryan Bulten
// Licensed under the wxWidgets license, see LICENSE.txt for details.
//
// $Id: SpinCtrl.d,v 1.11 2007/11/27 08:19:20 afb Exp $
//-----------------------------------------------------------------------------
module wx.SpinCtrl;
public import wx.common;
public import wx.Control;
//! \cond EXTERN
static extern (C) IntPtr wxSpinCtrl_ctor();
static extern (C) bool wxSpinCtrl_Create(IntPtr self, IntPtr parent, int id, string value, inout Point pos, inout Size size, uint style, int min, int max, int initial, string name);
static extern (C) int wxSpinCtrl_GetValue(IntPtr self);
static extern (C) int wxSpinCtrl_GetMin(IntPtr self);
static extern (C) int wxSpinCtrl_GetMax(IntPtr self);
static extern (C) void wxSpinCtrl_SetValueStr(IntPtr self, string value);
static extern (C) void wxSpinCtrl_SetValue(IntPtr self, int val);
static extern (C) void wxSpinCtrl_SetRange(IntPtr self, int min, int max);
//! \endcond
//---------------------------------------------------------------------
alias SpinCtrl wxSpinCtrl;
public class SpinCtrl : Control
{
// These are duplicated in SpinButton.cs (for easier access)
public const int wxSP_HORIZONTAL = Orientation.wxHORIZONTAL;
public const int wxSP_VERTICAL = Orientation.wxVERTICAL;
public const int wxSP_ARROW_KEYS = 0x1000;
public const int wxSP_WRAP = 0x2000;
//---------------------------------------------------------------------
public this(IntPtr wxobj)
{
super(wxobj);
}
public this()
{
super(wxSpinCtrl_ctor());
}
public this(Window parent,
int id /*= wxID_ANY*/,
string value = "",
Point pos = wxDefaultPosition,
Size size = wxDefaultSize,
int style = wxSP_ARROW_KEYS,
int min = 0, int max = 100, int initial = 0,
string name = "SpinCtrl")
{
super(wxSpinCtrl_ctor());
if(!Create(parent, id, value, pos, size, style, min, max, initial, name))
{
throw new InvalidOperationException("Не удалось создать SpinCtrl");
}
}
public static wxObject New(IntPtr wxobj)
{
return new SpinCtrl(wxobj);
}
//---------------------------------------------------------------------
// ctors with self created id
public this(Window parent,
string value = "",
Point pos = wxDefaultPosition,
Size size = wxDefaultSize,
int style = wxSP_ARROW_KEYS,
int min = 0, int max = 100, int initial = 0,
string name = "SpinCtrl")
{
this(parent, Window.UniqueID, value, pos, size, style, min, max, initial, name);
}
//---------------------------------------------------------------------
public bool Create(Window parent, int id, string value, Point pos, Size size, int style, int min, int max, int initial, string name)
{
return wxSpinCtrl_Create(wxobj, wxObject.SafePtr(parent), id,
value, pos, size, cast(uint)style, min,
max, initial, name);
}
//---------------------------------------------------------------------
public int Value()
{
return wxSpinCtrl_GetValue(wxobj);
}
public void Value(int value)
{
wxSpinCtrl_SetValue(wxobj, value);
}
public void SetValue(string val)
{
wxSpinCtrl_SetValueStr(wxobj, val);
}
//---------------------------------------------------------------------
public int Max()
{
return wxSpinCtrl_GetMax(wxobj);
}
public int Min()
{
return wxSpinCtrl_GetMin(wxobj);
}
public void SetRange(int min, int max)
{
wxSpinCtrl_SetRange(wxobj, min, max);
}
//---------------------------------------------------------------------
public override void UpdateUI_Add(EventListener value)
{
AddCommandListener(Event.wxEVT_COMMAND_SPINCTRL_UPDATED, ID, value, this);
}
public override void UpdateUI_Remove(EventListener value)
{
RemoveHandler(value, this);
}
}
|
D
|
the cardinal number that is the sum of one and one or a numeral representing this number
one of the four playing cards in a deck that have two spots
|
D
|
/* THIS FILE GENERATED BY bcd.gen */
module xf.platform.x11.Xrender;
import xf.platform.x11.Xlib;
extern(C):
align(4):
const int PictStandardARGB32 = 0;
const int PictStandardRGB24 = 1;
const int PictStandardA8 = 2;
const int PictStandardA4 = 3;
const int PictStandardA1 = 4;
const int PictStandardNUM = 5;
alias _XConicalGradient XConicalGradient;
alias _XPointFixed XPointFixed;
alias int XFixed;
alias _XRadialGradient XRadialGradient;
alias _XCircle XCircle;
alias _XLinearGradient XLinearGradient;
alias _XTrap XTrap;
alias _XSpanFix XSpanFix;
alias _XAnimCursor XAnimCursor;
alias _XIndexValue XIndexValue;
alias _XFilters XFilters;
alias _XTransform XTransform;
alias _XTrapezoid XTrapezoid;
alias _XLineFixed XLineFixed;
alias _XTriangle XTriangle;
alias _XPointDouble XPointDouble;
alias double XDouble;
alias _XGlyphElt32 XGlyphElt32;
alias _XGlyphElt16 XGlyphElt16;
alias _XGlyphElt8 XGlyphElt8;
alias _XGlyphInfo XGlyphInfo;
alias _XRenderPictureAttributes XRenderPictureAttributes;
extern (C) size_t XRenderCreateConicalGradient(void *, _XConicalGradient *, int *, XRenderColor *, int);
extern (C) size_t XRenderCreateRadialGradient(void *, _XRadialGradient *, int *, XRenderColor *, int);
extern (C) size_t XRenderCreateLinearGradient(void *, _XLinearGradient *, int *, XRenderColor *, int);
extern (C) size_t XRenderCreateSolidFill(void *, XRenderColor *);
extern (C) void XRenderAddTraps(void *, size_t, int, int, _XTrap *, int);
extern (C) size_t XRenderCreateAnimCursor(void *, int, _XAnimCursor *);
extern (C) void XRenderSetPictureFilter(void *, size_t, char *, int *, int);
extern (C) _XFilters * XRenderQueryFilters(void *, size_t);
extern (C) size_t XRenderCreateCursor(void *, size_t, size_t, size_t);
extern (C) int XRenderParseColor(void *, char *, XRenderColor *);
extern (C) void XRenderCompositeDoublePoly(void *, int, size_t, size_t, XRenderPictFormat *, int, int, int, int, _XPointDouble *, int, int);
extern (C) void XRenderCompositeTriFan(void *, int, size_t, size_t, XRenderPictFormat *, int, int, _XPointFixed *, int);
extern (C) void XRenderCompositeTriStrip(void *, int, size_t, size_t, XRenderPictFormat *, int, int, _XPointFixed *, int);
extern (C) void XRenderCompositeTriangles(void *, int, size_t, size_t, XRenderPictFormat *, int, int, _XTriangle *, int);
extern (C) void XRenderCompositeTrapezoids(void *, int, size_t, size_t, XRenderPictFormat *, int, int, _XTrapezoid *, int);
extern (C) void XRenderFillRectangles(void *, int, size_t, XRenderColor *, XRectangle *, int);
extern (C) void XRenderFillRectangle(void *, int, size_t, XRenderColor *, int, int, size_t, size_t);
extern (C) void XRenderCompositeText32(void *, int, size_t, size_t, XRenderPictFormat *, int, int, int, int, _XGlyphElt32 *, int);
extern (C) void XRenderCompositeText16(void *, int, size_t, size_t, XRenderPictFormat *, int, int, int, int, _XGlyphElt16 *, int);
extern (C) void XRenderCompositeText8(void *, int, size_t, size_t, XRenderPictFormat *, int, int, int, int, _XGlyphElt8 *, int);
extern (C) void XRenderCompositeString32(void *, int, size_t, size_t, XRenderPictFormat *, size_t, int, int, int, int, size_t *, int);
extern (C) void XRenderCompositeString16(void *, int, size_t, size_t, XRenderPictFormat *, size_t, int, int, int, int, ushort *, int);
extern (C) void XRenderCompositeString8(void *, int, size_t, size_t, XRenderPictFormat *, size_t, int, int, int, int, char *, int);
extern (C) void XRenderFreeGlyphs(void *, size_t, size_t *, int);
extern (C) void XRenderAddGlyphs(void *, size_t, size_t *, _XGlyphInfo *, int, char *, int);
extern (C) void XRenderFreeGlyphSet(void *, size_t);
extern (C) size_t XRenderReferenceGlyphSet(void *, size_t);
extern (C) size_t XRenderCreateGlyphSet(void *, XRenderPictFormat *);
extern (C) void XRenderComposite(void *, int, size_t, size_t, size_t, int, int, int, int, int, int, size_t, size_t);
extern (C) void XRenderFreePicture(void *, size_t);
extern (C) void XRenderSetPictureTransform(void *, size_t, _XTransform *);
extern (C) void XRenderSetPictureClipRegion(void *, size_t, void *);
extern (C) void XRenderSetPictureClipRectangles(void *, size_t, int, int, XRectangle *, int);
extern (C) void XRenderChangePicture(void *, size_t, size_t, _XRenderPictureAttributes *);
extern (C) size_t XRenderCreatePicture(void *, size_t, XRenderPictFormat *, size_t, _XRenderPictureAttributes *);
extern (C) _XIndexValue * XRenderQueryPictIndexValues(void *, XRenderPictFormat *, int *);
extern (C) XRenderPictFormat * XRenderFindStandardFormat(void *, int);
extern (C) XRenderPictFormat * XRenderFindFormat(void *, size_t, XRenderPictFormat *, int);
extern (C) XRenderPictFormat * XRenderFindVisualFormat(void *, Visual *);
extern (C) int XRenderSetSubpixelOrder(void *, int, int);
extern (C) int XRenderQuerySubpixelOrder(void *, int);
extern (C) int XRenderQueryFormats(void *);
extern (C) int XRenderQueryVersion(void *, int *, int *);
extern (C) int XRenderQueryExtension(void *, int *, int *);
alias void function(void *, char *, int, int, char * *) _BCD_func__1290;
alias int function(void *) _BCD_func__1332;
alias int function(void *, XErrorEvent *) _BCD_func__1333;
alias void function(void *, char *, char *) _BCD_func__1406;
alias int function(void *, char *, char *) _BCD_func__1407;
alias void function(void *, char *, char *) _BCD_func__1408;
struct _XConicalGradient {
_XPointFixed center;
int angle;
}
struct _XRadialGradient {
_XCircle inner;
_XCircle outer;
}
struct _XLinearGradient {
_XPointFixed p1;
_XPointFixed p2;
}
struct _XTrap {
_XSpanFix top;
_XSpanFix bottom;
}
struct _XSpanFix {
int left;
int right;
int y;
}
struct _XAnimCursor {
size_t cursor;
size_t delay;
}
struct _XIndexValue {
size_t pixel;
ushort red;
ushort green;
ushort blue;
ushort alpha;
}
struct _XFilters {
int nfilter;
char * * filter;
int nalias;
short * alias_;
}
struct _XTransform {
int [3] [3] matrix;
}
struct _XTrapezoid {
int top;
int bottom;
_XLineFixed left;
_XLineFixed right;
}
struct _XCircle {
int x;
int y;
int radius;
}
struct _XTriangle {
_XPointFixed p1;
_XPointFixed p2;
_XPointFixed p3;
}
struct _XLineFixed {
_XPointFixed p1;
_XPointFixed p2;
}
struct _XPointFixed {
int x;
int y;
}
struct _XPointDouble {
double x;
double y;
}
struct _XGlyphElt32 {
size_t glyphset;
size_t * chars;
int nchars;
int xOff;
int yOff;
}
struct _XGlyphElt16 {
size_t glyphset;
ushort * chars;
int nchars;
int xOff;
int yOff;
}
struct _XGlyphElt8 {
size_t glyphset;
char * chars;
int nchars;
int xOff;
int yOff;
}
struct _XGlyphInfo {
ushort width;
ushort height;
short x;
short y;
short xOff;
short yOff;
}
struct XRenderColor {
ushort red;
ushort green;
ushort blue;
ushort alpha;
}
struct _XRenderPictureAttributes {
int repeat;
size_t alpha_map;
int alpha_x_origin;
int alpha_y_origin;
int clip_x_origin;
int clip_y_origin;
size_t clip_mask;
int graphics_exposures;
int subwindow_mode;
int poly_edge;
int poly_mode;
size_t dither;
int component_alpha;
}
struct XRenderPictFormat {
size_t id;
int type;
int depth;
XRenderDirectFormat direct;
size_t colormap;
}
struct XRenderDirectFormat {
short red;
short redMask;
short green;
short greenMask;
short blue;
short blueMask;
short alpha;
short alphaMask;
}
|
D
|
/**
* Implementation of associative arrays.
*
* Copyright: Copyright Digital Mars 2000 - 2015.
* License: $(WEB www.boost.org/LICENSE_1_0.txt, Boost License 1.0).
* Authors: Martin Nowak
*/
module rt.aaA;
/// AA version for debuggers, bump whenever changing the layout
extern (C) immutable int _aaVersion = 1;
import core.memory : GC;
// grow threshold
private enum GROW_NUM = 4;
private enum GROW_DEN = 5;
// shrink threshold
private enum SHRINK_NUM = 1;
private enum SHRINK_DEN = 8;
// grow factor
private enum GROW_FAC = 4;
// growing the AA doubles it's size, so the shrink threshold must be
// smaller than half the grow threshold to have a hysteresis
static assert(GROW_FAC * SHRINK_NUM * GROW_DEN < GROW_NUM * SHRINK_DEN);
// initial load factor (for literals), mean of both thresholds
private enum INIT_NUM = (GROW_DEN * SHRINK_NUM + GROW_NUM * SHRINK_DEN) / 2;
private enum INIT_DEN = SHRINK_DEN * GROW_DEN;
private enum INIT_NUM_BUCKETS = 8;
// magic hash constants to distinguish empty, deleted, and filled buckets
private enum HASH_EMPTY = 0;
private enum HASH_DELETED = 0x1;
private enum HASH_FILLED_MARK = size_t(1) << 8 * size_t.sizeof - 1;
/// Opaque AA wrapper
struct AA
{
Impl* impl;
alias impl this;
private @property bool empty() const pure nothrow @nogc
{
return impl is null || !impl.length;
}
}
private struct Impl
{
private:
this(in TypeInfo_AssociativeArray ti, size_t sz = INIT_NUM_BUCKETS)
{
keysz = cast(uint) ti.key.tsize;
valsz = cast(uint) ti.value.tsize;
buckets = allocBuckets(sz);
firstUsed = cast(uint) buckets.length;
entryTI = fakeEntryTI(ti.key, ti.value);
valoff = cast(uint) talign(keysz, ti.value.talign);
import rt.lifetime : hasPostblit, unqualify;
if (hasPostblit(unqualify(ti.key)))
flags |= Flags.keyHasPostblit;
if ((ti.key.flags | ti.value.flags) & 1)
flags |= Flags.hasPointers;
}
Bucket[] buckets;
uint used;
uint deleted;
TypeInfo_Struct entryTI;
uint firstUsed;
immutable uint keysz;
immutable uint valsz;
immutable uint valoff;
Flags flags;
enum Flags : ubyte
{
none = 0x0,
keyHasPostblit = 0x1,
hasPointers = 0x2,
}
@property size_t length() const pure nothrow @nogc
{
assert(used >= deleted);
return used - deleted;
}
@property size_t dim() const pure nothrow @nogc @safe
{
return buckets.length;
}
@property size_t mask() const pure nothrow @nogc
{
return dim - 1;
}
// find the first slot to insert a value with hash
inout(Bucket)* findSlotInsert(size_t hash) inout pure nothrow @nogc
{
for (size_t i = hash & mask, j = 1;; ++j)
{
if (!buckets[i].filled)
return &buckets[i];
i = (i + j) & mask;
}
}
// lookup a key
inout(Bucket)* findSlotLookup(size_t hash, in void* pkey, in TypeInfo keyti) inout
{
for (size_t i = hash & mask, j = 1;; ++j)
{
if (buckets[i].hash == hash && keyti.equals(pkey, buckets[i].entry))
return &buckets[i];
else if (buckets[i].empty)
return null;
i = (i + j) & mask;
}
}
void grow(in TypeInfo keyti)
{
// If there are so many deleted entries, that growing would push us
// below the shrink threshold, we just purge deleted entries instead.
if (length * SHRINK_DEN < GROW_FAC * dim * SHRINK_NUM)
resize(dim);
else
resize(GROW_FAC * dim);
}
void shrink(in TypeInfo keyti)
{
if (dim > INIT_NUM_BUCKETS)
resize(dim / GROW_FAC);
}
void resize(size_t ndim) pure nothrow
{
auto obuckets = buckets;
buckets = allocBuckets(ndim);
foreach (ref b; obuckets[firstUsed .. $])
if (b.filled)
*findSlotInsert(b.hash) = b;
firstUsed = 0;
used -= deleted;
deleted = 0;
GC.free(obuckets.ptr); // safe to free b/c impossible to reference
}
void clear() pure nothrow
{
import core.stdc.string : memset;
// clear all data, but don't change bucket array length
memset(&buckets[firstUsed], 0, (buckets.length - firstUsed) * Bucket.sizeof);
deleted = used = 0;
firstUsed = cast(uint) dim;
}
}
//==============================================================================
// Bucket
//------------------------------------------------------------------------------
private struct Bucket
{
private pure nothrow @nogc:
size_t hash;
void* entry;
@property bool empty() const
{
return hash == HASH_EMPTY;
}
@property bool deleted() const
{
return hash == HASH_DELETED;
}
@property bool filled() const @safe
{
return cast(ptrdiff_t) hash < 0;
}
}
Bucket[] allocBuckets(size_t dim) @trusted pure nothrow
{
enum attr = GC.BlkAttr.NO_INTERIOR;
immutable sz = dim * Bucket.sizeof;
return (cast(Bucket*) GC.calloc(sz, attr))[0 .. dim];
}
//==============================================================================
// Entry
//------------------------------------------------------------------------------
private void* allocEntry(in Impl* aa, in void* pkey)
{
import rt.lifetime : _d_newitemU;
import core.stdc.string : memcpy, memset;
immutable akeysz = aa.valoff;
void* res = void;
if (aa.entryTI)
res = _d_newitemU(aa.entryTI);
else
{
auto flags = (aa.flags & Impl.Flags.hasPointers) ? 0 : GC.BlkAttr.NO_SCAN;
res = GC.malloc(akeysz + aa.valsz, flags);
}
memcpy(res, pkey, aa.keysz); // copy key
memset(res + akeysz, 0, aa.valsz); // zero value
return res;
}
package void entryDtor(void* p, const TypeInfo_Struct sti)
{
// key and value type info stored after the TypeInfo_Struct by tiEntry()
auto sizeti = __traits(classInstanceSize, TypeInfo_Struct);
auto extra = cast(const(TypeInfo)*)(cast(void*) sti + sizeti);
extra[0].destroy(p);
extra[1].destroy(p + talign(extra[0].tsize, extra[1].talign));
}
private bool hasDtor(const TypeInfo ti)
{
import rt.lifetime : unqualify;
if (typeid(ti) is typeid(TypeInfo_Struct))
if ((cast(TypeInfo_Struct) cast(void*) ti).xdtor)
return true;
if (typeid(ti) is typeid(TypeInfo_StaticArray))
return hasDtor(unqualify(ti.next));
return false;
}
// build type info for Entry with additional key and value fields
TypeInfo_Struct fakeEntryTI(const TypeInfo keyti, const TypeInfo valti)
{
import rt.lifetime : unqualify;
auto kti = unqualify(keyti);
auto vti = unqualify(valti);
if (!hasDtor(kti) && !hasDtor(vti))
return null;
// save kti and vti after type info for struct
enum sizeti = __traits(classInstanceSize, TypeInfo_Struct);
void* p = GC.malloc(sizeti + 2 * (void*).sizeof);
import core.stdc.string : memcpy;
memcpy(p, typeid(TypeInfo_Struct).initializer().ptr, sizeti);
auto ti = cast(TypeInfo_Struct) p;
auto extra = cast(TypeInfo*)(p + sizeti);
extra[0] = cast() kti;
extra[1] = cast() vti;
static immutable tiName = __MODULE__ ~ ".Entry!(...)";
ti.name = tiName;
// we don't expect the Entry objects to be used outside of this module, so we have control
// over the non-usage of the callback methods and other entries and can keep these null
// xtoHash, xopEquals, xopCmp, xtoString and xpostblit
ti.m_RTInfo = null;
immutable entrySize = talign(kti.tsize, vti.talign) + vti.tsize;
ti.m_init = (cast(ubyte*) null)[0 .. entrySize]; // init length, but not ptr
// xdtor needs to be built from the dtors of key and value for the GC
ti.xdtorti = &entryDtor;
ti.m_flags = TypeInfo_Struct.StructFlags.isDynamicType;
ti.m_flags |= (keyti.flags | valti.flags) & TypeInfo_Struct.StructFlags.hasPointers;
ti.m_align = cast(uint) max(kti.talign, vti.talign);
return ti;
}
//==============================================================================
// Helper functions
//------------------------------------------------------------------------------
private size_t talign(size_t tsize, size_t algn) @safe pure nothrow @nogc
{
immutable mask = algn - 1;
assert(!(mask & algn));
return (tsize + mask) & ~mask;
}
// mix hash to "fix" bad hash functions
private size_t mix(size_t h) @safe pure nothrow @nogc
{
// final mix function of MurmurHash2
enum m = 0x5bd1e995;
h ^= h >> 13;
h *= m;
h ^= h >> 15;
return h;
}
private size_t calcHash(in void* pkey, in TypeInfo keyti)
{
immutable hash = keyti.getHash(pkey);
// highest bit is set to distinguish empty/deleted from filled buckets
return mix(hash) | HASH_FILLED_MARK;
}
private size_t nextpow2(in size_t n) pure nothrow @nogc
{
import core.bitop : bsr;
if (!n)
return 1;
const isPowerOf2 = !((n - 1) & n);
return 1 << (bsr(n) + !isPowerOf2);
}
pure nothrow @nogc unittest
{
// 0, 1, 2, 3, 4, 5, 6, 7, 8, 9
foreach (const n, const pow2; [1, 1, 2, 4, 4, 8, 8, 8, 8, 16])
assert(nextpow2(n) == pow2);
}
private T min(T)(T a, T b) pure nothrow @nogc
{
return a < b ? a : b;
}
private T max(T)(T a, T b) pure nothrow @nogc
{
return b < a ? a : b;
}
//==============================================================================
// API Implementation
//------------------------------------------------------------------------------
/// Determine number of entries in associative array.
extern (C) size_t _aaLen(in AA aa) pure nothrow @nogc
{
return aa ? aa.length : 0;
}
/******************************
* Lookup *pkey in aa.
* Called only from implementation of (aa[key]) expressions when value is mutable.
* Params:
* aa = associative array opaque pointer
* ti = TypeInfo for the associative array
* valsz = ignored
* pkey = pointer to the key value
* Returns:
* if key was in the aa, a mutable pointer to the existing value.
* If key was not in the aa, a mutable pointer to newly inserted value which
* is set to all zeros
*/
extern (C) void* _aaGetY(AA* aa, const TypeInfo_AssociativeArray ti, in size_t valsz,
in void* pkey)
{
// lazily alloc implementation
if (aa.impl is null)
aa.impl = new Impl(ti);
// get hash and bucket for key
immutable hash = calcHash(pkey, ti.key);
// found a value => return it
if (auto p = aa.findSlotLookup(hash, pkey, ti.key))
return p.entry + aa.valoff;
auto p = aa.findSlotInsert(hash);
if (p.deleted)
--aa.deleted;
// check load factor and possibly grow
else if (++aa.used * GROW_DEN > aa.dim * GROW_NUM)
{
aa.grow(ti.key);
p = aa.findSlotInsert(hash);
assert(p.empty);
}
// update search cache and allocate entry
aa.firstUsed = min(aa.firstUsed, cast(uint)(p - aa.buckets.ptr));
p.hash = hash;
p.entry = allocEntry(aa.impl, pkey);
// postblit for key
if (aa.flags & Impl.Flags.keyHasPostblit)
{
import rt.lifetime : __doPostblit, unqualify;
__doPostblit(p.entry, aa.keysz, unqualify(ti.key));
}
// return pointer to value
return p.entry + aa.valoff;
}
/******************************
* Lookup *pkey in aa.
* Called only from implementation of (aa[key]) expressions when value is not mutable.
* Params:
* aa = associative array opaque pointer
* keyti = TypeInfo for the key
* valsz = ignored
* pkey = pointer to the key value
* Returns:
* pointer to value if present, null otherwise
*/
extern (C) inout(void)* _aaGetRvalueX(inout AA aa, in TypeInfo keyti, in size_t valsz,
in void* pkey)
{
return _aaInX(aa, keyti, pkey);
}
/******************************
* Lookup *pkey in aa.
* Called only from implementation of (key in aa) expressions.
* Params:
* aa = associative array opaque pointer
* keyti = TypeInfo for the key
* pkey = pointer to the key value
* Returns:
* pointer to value if present, null otherwise
*/
extern (C) inout(void)* _aaInX(inout AA aa, in TypeInfo keyti, in void* pkey)
{
if (aa.empty)
return null;
immutable hash = calcHash(pkey, keyti);
if (auto p = aa.findSlotLookup(hash, pkey, keyti))
return p.entry + aa.valoff;
return null;
}
/// Delete entry in AA, return true if it was present
extern (C) bool _aaDelX(AA aa, in TypeInfo keyti, in void* pkey)
{
if (aa.empty)
return false;
immutable hash = calcHash(pkey, keyti);
if (auto p = aa.findSlotLookup(hash, pkey, keyti))
{
// clear entry
p.hash = HASH_DELETED;
p.entry = null;
++aa.deleted;
if (aa.length * SHRINK_DEN < aa.dim * SHRINK_NUM)
aa.shrink(keyti);
return true;
}
return false;
}
/// Remove all elements from AA.
extern (C) void _aaClear(AA aa) pure nothrow
{
if (!aa.empty)
{
aa.impl.clear();
}
}
/// Rehash AA
extern (C) void* _aaRehash(AA* paa, in TypeInfo keyti) pure nothrow
{
if (!paa.empty)
paa.resize(nextpow2(INIT_DEN * paa.length / INIT_NUM));
return *paa;
}
/// Return a GC allocated array of all values
extern (C) inout(void[]) _aaValues(inout AA aa, in size_t keysz, in size_t valsz,
const TypeInfo tiValueArray) pure nothrow
{
if (aa.empty)
return null;
import rt.lifetime : _d_newarrayU;
auto res = _d_newarrayU(tiValueArray, aa.length).ptr;
auto pval = res;
immutable off = aa.valoff;
foreach (b; aa.buckets[aa.firstUsed .. $])
{
if (!b.filled)
continue;
pval[0 .. valsz] = b.entry[off .. valsz + off];
pval += valsz;
}
// postblit is done in object.values
return (cast(inout(void)*) res)[0 .. aa.length]; // fake length, return number of elements
}
/// Return a GC allocated array of all keys
extern (C) inout(void[]) _aaKeys(inout AA aa, in size_t keysz, const TypeInfo tiKeyArray) pure nothrow
{
if (aa.empty)
return null;
import rt.lifetime : _d_newarrayU;
auto res = _d_newarrayU(tiKeyArray, aa.length).ptr;
auto pkey = res;
foreach (b; aa.buckets[aa.firstUsed .. $])
{
if (!b.filled)
continue;
pkey[0 .. keysz] = b.entry[0 .. keysz];
pkey += keysz;
}
// postblit is done in object.keys
return (cast(inout(void)*) res)[0 .. aa.length]; // fake length, return number of elements
}
// opApply callbacks are extern(D)
extern (D) alias dg_t = int delegate(void*);
extern (D) alias dg2_t = int delegate(void*, void*);
/// foreach opApply over all values
extern (C) int _aaApply(AA aa, in size_t keysz, dg_t dg)
{
if (aa.empty)
return 0;
immutable off = aa.valoff;
foreach (b; aa.buckets)
{
if (!b.filled)
continue;
if (auto res = dg(b.entry + off))
return res;
}
return 0;
}
/// foreach opApply over all key/value pairs
extern (C) int _aaApply2(AA aa, in size_t keysz, dg2_t dg)
{
if (aa.empty)
return 0;
immutable off = aa.valoff;
foreach (b; aa.buckets)
{
if (!b.filled)
continue;
if (auto res = dg(b.entry, b.entry + off))
return res;
}
return 0;
}
/// Construct an associative array of type ti from keys and value
extern (C) Impl* _d_assocarrayliteralTX(const TypeInfo_AssociativeArray ti, void[] keys,
void[] vals)
{
assert(keys.length == vals.length);
immutable keysz = ti.key.tsize;
immutable valsz = ti.value.tsize;
immutable length = keys.length;
if (!length)
return null;
auto aa = new Impl(ti, nextpow2(INIT_DEN * length / INIT_NUM));
void* pkey = keys.ptr;
void* pval = vals.ptr;
immutable off = aa.valoff;
foreach (_; 0 .. length)
{
immutable hash = calcHash(pkey, ti.key);
auto p = aa.findSlotLookup(hash, pkey, ti.key);
if (p is null)
{
p = aa.findSlotInsert(hash);
p.hash = hash;
p.entry = allocEntry(aa, pkey); // move key, no postblit
aa.firstUsed = min(aa.firstUsed, cast(uint)(p - aa.buckets.ptr));
}
else if (aa.entryTI && hasDtor(ti.value))
{
// destroy existing value before overwriting it
ti.value.destroy(p.entry + off);
}
// set hash and blit value
auto pdst = p.entry + off;
pdst[0 .. valsz] = pval[0 .. valsz]; // move value, no postblit
pkey += keysz;
pval += valsz;
}
aa.used = cast(uint) length;
return aa;
}
/// compares 2 AAs for equality
extern (C) int _aaEqual(in TypeInfo tiRaw, in AA aa1, in AA aa2)
{
if (aa1.impl is aa2.impl)
return true;
immutable len = _aaLen(aa1);
if (len != _aaLen(aa2))
return false;
if (!len) // both empty
return true;
import rt.lifetime : unqualify;
auto uti = unqualify(tiRaw);
auto ti = *cast(TypeInfo_AssociativeArray*)&uti;
// compare the entries
immutable off = aa1.valoff;
foreach (b1; aa1.buckets)
{
if (!b1.filled)
continue;
auto pb2 = aa2.findSlotLookup(b1.hash, b1.entry, ti.key);
if (pb2 is null || !ti.value.equals(b1.entry + off, pb2.entry + off))
return false;
}
return true;
}
/// compute a hash
extern (C) hash_t _aaGetHash(in AA* aa, in TypeInfo tiRaw) nothrow
{
if (aa.empty)
return 0;
import rt.lifetime : unqualify;
auto uti = unqualify(tiRaw);
auto ti = *cast(TypeInfo_AssociativeArray*)&uti;
immutable off = aa.valoff;
auto valHash = &ti.value.getHash;
size_t h;
foreach (b; aa.buckets)
{
if (!b.filled)
continue;
size_t[2] h2 = [b.hash, valHash(b.entry + off)];
// use XOR here, so that hash is independent of element order
h ^= hashOf(h2);
}
return h;
}
/**
* _aaRange implements a ForwardRange
*/
struct Range
{
Impl* impl;
size_t idx;
alias impl this;
}
extern (C) pure nothrow @nogc @safe
{
Range _aaRange(AA aa)
{
if (!aa)
return Range();
foreach (i; aa.firstUsed .. aa.dim)
{
if (aa.buckets[i].filled)
return Range(aa.impl, i);
}
return Range(aa, aa.dim);
}
bool _aaRangeEmpty(Range r)
{
return r.impl is null || r.idx == r.dim;
}
void* _aaRangeFrontKey(Range r)
{
if (r.idx >= r.dim)
return null;
return r.buckets[r.idx].entry;
}
void* _aaRangeFrontValue(Range r)
{
if (r.idx >= r.dim)
return null;
auto entry = r.buckets[r.idx].entry;
return entry is null ?
null :
(() @trusted { return entry + r.valoff; } ());
}
void _aaRangePopFront(ref Range r)
{
if (r.idx >= r.dim) return;
for (++r.idx; r.idx < r.dim; ++r.idx)
{
if (r.buckets[r.idx].filled)
break;
}
}
}
//==============================================================================
// Unittests
//------------------------------------------------------------------------------
pure nothrow unittest
{
int[string] aa;
assert(aa.keys.length == 0);
assert(aa.values.length == 0);
aa["hello"] = 3;
assert(aa["hello"] == 3);
aa["hello"]++;
assert(aa["hello"] == 4);
assert(aa.length == 1);
string[] keys = aa.keys;
assert(keys.length == 1);
assert(keys[0] == "hello");
int[] values = aa.values;
assert(values.length == 1);
assert(values[0] == 4);
aa.rehash;
assert(aa.length == 1);
assert(aa["hello"] == 4);
aa["foo"] = 1;
aa["bar"] = 2;
aa["batz"] = 3;
assert(aa.keys.length == 4);
assert(aa.values.length == 4);
foreach (a; aa.keys)
{
assert(a.length != 0);
assert(a.ptr != null);
}
foreach (v; aa.values)
{
assert(v != 0);
}
}
unittest // Test for Issue 10381
{
alias II = int[int];
II aa1 = [0 : 1];
II aa2 = [0 : 1];
II aa3 = [0 : 2];
assert(aa1 == aa2); // Passes
assert(typeid(II).equals(&aa1, &aa2));
assert(!typeid(II).equals(&aa1, &aa3));
}
pure nothrow unittest
{
string[int] key1 = [1 : "true", 2 : "false"];
string[int] key2 = [1 : "false", 2 : "true"];
string[int] key3;
// AA lits create a larger hashtable
int[string[int]] aa1 = [key1 : 100, key2 : 200, key3 : 300];
// Ensure consistent hash values are computed for key1
assert((key1 in aa1) !is null);
// Manually assigning to an empty AA creates a smaller hashtable
int[string[int]] aa2;
aa2[key1] = 100;
aa2[key2] = 200;
aa2[key3] = 300;
assert(aa1 == aa2);
// Ensure binary-independence of equal hash keys
string[int] key2a;
key2a[1] = "false";
key2a[2] = "true";
assert(aa1[key2a] == 200);
}
// Issue 9852
pure nothrow unittest
{
// Original test case (revised, original assert was wrong)
int[string] a;
a["foo"] = 0;
a.remove("foo");
assert(a == null); // should not crash
int[string] b;
assert(b is null);
assert(a == b); // should not deref null
assert(b == a); // ditto
int[string] c;
c["a"] = 1;
assert(a != c); // comparison with empty non-null AA
assert(c != a);
assert(b != c); // comparison with null AA
assert(c != b);
}
// Bugzilla 14104
unittest
{
import core.stdc.stdio;
alias K = const(ubyte)*;
size_t[K] aa;
immutable key = cast(K)(cast(size_t) uint.max + 1);
aa[key] = 12;
assert(key in aa);
}
unittest
{
int[int] aa;
foreach (k, v; aa)
assert(false);
foreach (v; aa)
assert(false);
assert(aa.byKey.empty);
assert(aa.byValue.empty);
assert(aa.byKeyValue.empty);
size_t n;
aa = [0 : 3, 1 : 4, 2 : 5];
foreach (k, v; aa)
{
n += k;
assert(k >= 0 && k < 3);
assert(v >= 3 && v < 6);
}
assert(n == 3);
n = 0;
foreach (v; aa)
{
n += v;
assert(v >= 3 && v < 6);
}
assert(n == 12);
n = 0;
foreach (k, v; aa)
{
++n;
break;
}
assert(n == 1);
n = 0;
foreach (v; aa)
{
++n;
break;
}
assert(n == 1);
}
unittest
{
int[int] aa;
assert(!aa.remove(0));
aa = [0 : 1];
assert(aa.remove(0));
assert(!aa.remove(0));
aa[1] = 2;
assert(!aa.remove(0));
assert(aa.remove(1));
assert(aa.length == 0);
assert(aa.byKey.empty);
}
// test zero sized value (hashset)
unittest
{
alias V = void[0];
auto aa = [0 : V.init];
assert(aa.length == 1);
assert(aa.byKey.front == 0);
assert(aa.byValue.front == V.init);
aa[1] = V.init;
assert(aa.length == 2);
aa[0] = V.init;
assert(aa.length == 2);
assert(aa.remove(0));
aa[0] = V.init;
assert(aa.length == 2);
assert(aa == [0 : V.init, 1 : V.init]);
}
// test tombstone purging
unittest
{
int[int] aa;
foreach (i; 0 .. 6)
aa[i] = i;
foreach (i; 0 .. 6)
assert(aa.remove(i));
foreach (i; 6 .. 10)
aa[i] = i;
assert(aa.length == 4);
foreach (i; 6 .. 10)
assert(i in aa);
}
// test postblit for AA literals
unittest
{
static struct T
{
ubyte field;
static size_t postblit, dtor;
this(this)
{
++postblit;
}
~this()
{
++dtor;
}
}
T t;
auto aa1 = [0 : t, 1 : t];
assert(T.dtor == 0 && T.postblit == 2);
aa1[0] = t;
assert(T.dtor == 1 && T.postblit == 3);
T.dtor = 0;
T.postblit = 0;
auto aa2 = [0 : t, 1 : t, 0 : t]; // literal with duplicate key => value overwritten
assert(T.dtor == 1 && T.postblit == 3);
T.dtor = 0;
T.postblit = 0;
auto aa3 = [t : 0];
assert(T.dtor == 0 && T.postblit == 1);
aa3[t] = 1;
assert(T.dtor == 0 && T.postblit == 1);
aa3.remove(t);
assert(T.dtor == 0 && T.postblit == 1);
aa3[t] = 2;
assert(T.dtor == 0 && T.postblit == 2);
// dtor will be called by GC finalizers
aa1 = null;
aa2 = null;
aa3 = null;
GC.runFinalizers((cast(char*)(&entryDtor))[0 .. 1]);
assert(T.dtor == 6 && T.postblit == 2);
}
// for aa.clear
pure nothrow unittest
{
int[int] aa;
assert(aa.length == 0);
foreach (i; 0 .. 100)
aa[i] = i * 2;
assert(aa.length == 100);
auto aa2 = aa;
assert(aa2.length == 100);
aa.clear();
assert(aa.length == 0);
assert(aa2.length == 0);
aa2[5] = 6;
assert(aa.length == 1);
assert(aa[5] == 6);
}
// test AA as key (Issue 16974)
unittest
{
int[int] a = [1 : 2], a2 = [1 : 2];
assert([a : 3] == [a : 3]);
assert([a : 3] == [a2 : 3]);
assert(typeid(a).getHash(&a) == typeid(a).getHash(&a));
assert(typeid(a).getHash(&a) == typeid(a).getHash(&a2));
}
|
D
|
broad in scope or content
|
D
|
/*
* This file is part of gtkD.
*
* gtkD is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; either version 2.1 of the License, or
* (at your option) any later version.
*
* gtkD is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with gtkD; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
// generated automatically - do not change
// find conversion definition on APILookup.txt
// implement new conversion functionalities on the wrap.utils pakage
/*
* Conversion parameters:
* inFile = gdk-Bitmaps-and-Pixmaps.html
* outPack = gdk
* outFile = Pixmap
* strct = GdkPixmap
* realStrct=
* ctorStrct=
* clss = Pixmap
* interf =
* class Code: No
* interface Code: No
* template for:
* extend =
* implements:
* prefixes:
* - gdk_pixmap_
* omit structs:
* omit prefixes:
* - gdk_bitmap_
* omit code:
* omit signals:
* imports:
* - gtkD.glib.Str
* - gtkD.gdk.Drawable
* - gtkD.gdk.Color
* - gtkD.gdk.Bitmap
* - gtkD.gdk.Colormap
* structWrap:
* - GdkBitmap* -> Bitmap
* - GdkColor* -> Color
* - GdkColormap* -> Colormap
* - GdkDrawable* -> Drawable
* - GdkPixmap* -> Pixmap
* module aliases:
* local aliases:
* overrides:
*/
module gtkD.gdk.Pixmap;
public import gtkD.gtkc.gdktypes;
private import gtkD.gtkc.gdk;
private import gtkD.glib.ConstructionException;
private import gtkD.glib.Str;
private import gtkD.gdk.Drawable;
private import gtkD.gdk.Color;
private import gtkD.gdk.Bitmap;
private import gtkD.gdk.Colormap;
private import gtkD.gdk.Drawable;
/**
* Description
* Pixmaps are offscreen drawables. They can be drawn upon with the
* standard drawing primitives, then copied to another drawable (such as
* a GdkWindow) with gdk_pixmap_draw(). The depth of a pixmap
* is the number of bits per pixels. Bitmaps are simply pixmaps
* with a depth of 1. (That is, they are monochrome bitmaps - each
* pixel can be either on or off).
*/
public class Pixmap : Drawable
{
/** the main Gtk struct */
protected GdkPixmap* gdkPixmap;
public GdkPixmap* getPixmapStruct()
{
return gdkPixmap;
}
/** the main Gtk struct as a void* */
protected override void* getStruct()
{
return cast(void*)gdkPixmap;
}
/**
* Sets our main struct and passes it to the parent class
*/
public this (GdkPixmap* gdkPixmap)
{
if(gdkPixmap is null)
{
this = null;
return;
}
//Check if there already is a D object for this gtk struct
void* ptr = getDObject(cast(GObject*)gdkPixmap);
if( ptr !is null )
{
this = cast(Pixmap)ptr;
return;
}
super(cast(GdkDrawable*)gdkPixmap);
this.gdkPixmap = gdkPixmap;
}
/**
*/
/**
* Create a new pixmap with a given size and depth.
* Params:
* drawable = A GdkDrawable, used to determine default values
* for the new pixmap. Can be NULL if depth is specified,
* width = The width of the new pixmap in pixels.
* height = The height of the new pixmap in pixels.
* depth = The depth (number of bits per pixel) of the new pixmap.
* If -1, and drawable is not NULL, the depth of the new
* pixmap will be equal to that of drawable.
* Throws: ConstructionException GTK+ fails to create the object.
*/
public this (Drawable drawable, int width, int height, int depth)
{
// GdkPixmap* gdk_pixmap_new (GdkDrawable *drawable, gint width, gint height, gint depth);
auto p = gdk_pixmap_new((drawable is null) ? null : drawable.getDrawableStruct(), width, height, depth);
if(p is null)
{
throw new ConstructionException("null returned by gdk_pixmap_new((drawable is null) ? null : drawable.getDrawableStruct(), width, height, depth)");
}
this(cast(GdkPixmap*) p);
}
/**
* Create a two-color pixmap from data in XBM data.
* Params:
* drawable = a GdkDrawable, used to determine default values
* for the new pixmap. Can be NULL, if the depth is given.
* data = a pointer to the data.
* width = the width of the new pixmap in pixels.
* height = the height of the new pixmap in pixels.
* depth = the depth (number of bits per pixel) of the new pixmap.
* fg = the foreground color.
* bg = the background color.
* Returns:the GdkPixmap
*/
public static Pixmap createFromData(Drawable drawable, string data, int width, int height, int depth, Color fg, Color bg)
{
// GdkPixmap* gdk_pixmap_create_from_data (GdkDrawable *drawable, const gchar *data, gint width, gint height, gint depth, const GdkColor *fg, const GdkColor *bg);
auto p = gdk_pixmap_create_from_data((drawable is null) ? null : drawable.getDrawableStruct(), Str.toStringz(data), width, height, depth, (fg is null) ? null : fg.getColorStruct(), (bg is null) ? null : bg.getColorStruct());
if(p is null)
{
return null;
}
return new Pixmap(cast(GdkPixmap*) p);
}
/**
* Create a pixmap from a XPM file.
* Params:
* drawable = a GdkDrawable, used to determine default values
* for the new pixmap.
* mask = a pointer to a place to store a bitmap representing
* the transparency mask of the XPM file. Can be NULL,
* in which case transparency will be ignored.
* transparentColor = the color to be used for the pixels
* that are transparent in the input file. Can be NULL,
* in which case a default color will be used.
* filename = the filename of a file containing XPM data.
* Returns:the GdkPixmap
*/
public static Pixmap createFromXpm(Drawable drawable, out Bitmap mask, Color transparentColor, string filename)
{
// GdkPixmap* gdk_pixmap_create_from_xpm (GdkDrawable *drawable, GdkBitmap **mask, const GdkColor *transparent_color, const gchar *filename);
GdkBitmap* outmask = null;
auto p = gdk_pixmap_create_from_xpm((drawable is null) ? null : drawable.getDrawableStruct(), &outmask, (transparentColor is null) ? null : transparentColor.getColorStruct(), Str.toStringz(filename));
mask = new Bitmap(outmask);
if(p is null)
{
return null;
}
return new Pixmap(cast(GdkPixmap*) p);
}
/**
* Create a pixmap from a XPM file using a particular colormap.
* Params:
* drawable = a GdkDrawable, used to determine default values
* for the new pixmap. Can be NULL if colormap is given.
* colormap = the GdkColormap that the new pixmap will be use.
* If omitted, the colormap for window will be used.
* mask = a pointer to a place to store a bitmap representing
* the transparency mask of the XPM file. Can be NULL,
* in which case transparency will be ignored.
* transparentColor = the color to be used for the pixels
* that are transparent in the input file. Can be NULL,
* in which case a default color will be used.
* filename = the filename of a file containing XPM data.
* Returns:the GdkPixmap.
*/
public static Pixmap colormapCreateFromXpm(Drawable drawable, Colormap colormap, out Bitmap mask, Color transparentColor, string filename)
{
// GdkPixmap* gdk_pixmap_colormap_create_from_xpm (GdkDrawable *drawable, GdkColormap *colormap, GdkBitmap **mask, const GdkColor *transparent_color, const gchar *filename);
GdkBitmap* outmask = null;
auto p = gdk_pixmap_colormap_create_from_xpm((drawable is null) ? null : drawable.getDrawableStruct(), (colormap is null) ? null : colormap.getColormapStruct(), &outmask, (transparentColor is null) ? null : transparentColor.getColorStruct(), Str.toStringz(filename));
mask = new Bitmap(outmask);
if(p is null)
{
return null;
}
return new Pixmap(cast(GdkPixmap*) p);
}
/**
* Create a pixmap from data in XPM format.
* Params:
* drawable = a GdkDrawable, used to determine default values
* for the new pixmap.
* mask = Pointer to a place to store a bitmap representing
* the transparency mask of the XPM file. Can be NULL,
* in which case transparency will be ignored.
* transparentColor = This color will be used for the pixels
* that are transparent in the input file. Can be NULL
* in which case a default color will be used.
* data = Pointer to a string containing the XPM data.
* Returns:the GdkPixmap
*/
public static Pixmap createFromXpmD(Drawable drawable, out Bitmap mask, Color transparentColor, string[] data)
{
// GdkPixmap* gdk_pixmap_create_from_xpm_d (GdkDrawable *drawable, GdkBitmap **mask, const GdkColor *transparent_color, gchar **data);
GdkBitmap* outmask = null;
auto p = gdk_pixmap_create_from_xpm_d((drawable is null) ? null : drawable.getDrawableStruct(), &outmask, (transparentColor is null) ? null : transparentColor.getColorStruct(), Str.toStringzArray(data));
mask = new Bitmap(outmask);
if(p is null)
{
return null;
}
return new Pixmap(cast(GdkPixmap*) p);
}
/**
* Create a pixmap from data in XPM format using a particular
* colormap.
* Params:
* drawable = a GdkDrawable, used to determine default values
* for the new pixmap. Can be NULL if colormap is given.
* colormap = the GdkColormap that the new pixmap will be use.
* If omitted, the colormap for window will be used.
* mask = a pointer to a place to store a bitmap representing
* the transparency mask of the XPM file. Can be NULL,
* in which case transparency will be ignored.
* transparentColor = the color to be used for the pixels
* that are transparent in the input file. Can be NULL,
* in which case a default color will be used.
* data = Pointer to a string containing the XPM data.
* Returns:the GdkPixmap.
*/
public static Pixmap colormapCreateFromXpmD(Drawable drawable, Colormap colormap, out Bitmap mask, Color transparentColor, string[] data)
{
// GdkPixmap* gdk_pixmap_colormap_create_from_xpm_d (GdkDrawable *drawable, GdkColormap *colormap, GdkBitmap **mask, const GdkColor *transparent_color, gchar **data);
GdkBitmap* outmask = null;
auto p = gdk_pixmap_colormap_create_from_xpm_d((drawable is null) ? null : drawable.getDrawableStruct(), (colormap is null) ? null : colormap.getColormapStruct(), &outmask, (transparentColor is null) ? null : transparentColor.getColorStruct(), Str.toStringzArray(data));
mask = new Bitmap(outmask);
if(p is null)
{
return null;
}
return new Pixmap(cast(GdkPixmap*) p);
}
}
|
D
|
/// Generate by tools
module org.jaudiotagger.tag.vorbiscomment.util.Base64Coder;
import java.lang.exceptions;
public class Base64Coder
{
public this()
{
implMissing();
}
}
|
D
|
/Users/benormos/Desktop/MyFutureBox/build/Pods.build/Debug-iphonesimulator/NVActivityIndicatorView.build/Objects-normal/x86_64/NVActivityIndicatorAnimationLineSpinFadeLoader.o : /Users/benormos/Desktop/MyFutureBox/Pods/NVActivityIndicatorView/NVActivityIndicatorView/NVActivityIndicatorView/Animations/NVActivityIndicatorAnimationBallPulseSync.swift /Users/benormos/Desktop/MyFutureBox/Pods/NVActivityIndicatorView/NVActivityIndicatorView/NVActivityIndicatorView/Animations/NVActivityIndicatorAnimationLineScalePulseOutRapid.swift /Users/benormos/Desktop/MyFutureBox/Pods/NVActivityIndicatorView/NVActivityIndicatorView/NVActivityIndicatorView/Animations/NVActivityIndicatorAnimationLineScale.swift /Users/benormos/Desktop/MyFutureBox/Pods/NVActivityIndicatorView/NVActivityIndicatorView/NVActivityIndicatorView/Animations/NVActivityIndicatorAnimationBallScale.swift /Users/benormos/Desktop/MyFutureBox/Pods/NVActivityIndicatorView/NVActivityIndicatorView/NVActivityIndicatorView/Presenter/NVActivityIndicatorViewable.swift /Users/benormos/Desktop/MyFutureBox/Pods/NVActivityIndicatorView/NVActivityIndicatorView/NVActivityIndicatorView/Animations/NVActivityIndicatorAnimationBallScaleMultiple.swift /Users/benormos/Desktop/MyFutureBox/Pods/NVActivityIndicatorView/NVActivityIndicatorView/NVActivityIndicatorView/Animations/NVActivityIndicatorAnimationBallScaleRippleMultiple.swift /Users/benormos/Desktop/MyFutureBox/Pods/NVActivityIndicatorView/NVActivityIndicatorView/NVActivityIndicatorView/Animations/NVActivityIndicatorAnimationBallClipRotateMultiple.swift /Users/benormos/Desktop/MyFutureBox/Pods/NVActivityIndicatorView/NVActivityIndicatorView/NVActivityIndicatorView/Animations/NVActivityIndicatorAnimationBallScaleRipple.swift /Users/benormos/Desktop/MyFutureBox/Pods/NVActivityIndicatorView/NVActivityIndicatorView/NVActivityIndicatorView/NVActivityIndicatorShape.swift /Users/benormos/Desktop/MyFutureBox/Pods/NVActivityIndicatorView/NVActivityIndicatorView/NVActivityIndicatorView/Animations/NVActivityIndicatorAnimationBallRotateChase.swift /Users/benormos/Desktop/MyFutureBox/Pods/NVActivityIndicatorView/NVActivityIndicatorView/NVActivityIndicatorView/Animations/NVActivityIndicatorAnimationBallPulseRise.swift /Users/benormos/Desktop/MyFutureBox/Pods/NVActivityIndicatorView/NVActivityIndicatorView/NVActivityIndicatorView/Animations/NVActivityIndicatorAnimationBallGridPulse.swift /Users/benormos/Desktop/MyFutureBox/Pods/NVActivityIndicatorView/NVActivityIndicatorView/NVActivityIndicatorView/Animations/NVActivityIndicatorAnimationBallClipRotatePulse.swift /Users/benormos/Desktop/MyFutureBox/Pods/NVActivityIndicatorView/NVActivityIndicatorView/NVActivityIndicatorView/Animations/NVActivityIndicatorAnimationBallPulse.swift /Users/benormos/Desktop/MyFutureBox/Pods/NVActivityIndicatorView/NVActivityIndicatorView/NVActivityIndicatorView/NVActivityIndicatorAnimationDelegate.swift /Users/benormos/Desktop/MyFutureBox/Pods/NVActivityIndicatorView/NVActivityIndicatorView/NVActivityIndicatorView/Animations/NVActivityIndicatorAnimationBallRotate.swift /Users/benormos/Desktop/MyFutureBox/Pods/NVActivityIndicatorView/NVActivityIndicatorView/NVActivityIndicatorView/Animations/NVActivityIndicatorAnimationBallClipRotate.swift /Users/benormos/Desktop/MyFutureBox/Pods/NVActivityIndicatorView/NVActivityIndicatorView/NVActivityIndicatorView/Animations/NVActivityIndicatorAnimationBallZigZag.swift /Users/benormos/Desktop/MyFutureBox/Pods/NVActivityIndicatorView/NVActivityIndicatorView/NVActivityIndicatorView/Animations/NVActivityIndicatorAnimationBallTrianglePath.swift /Users/benormos/Desktop/MyFutureBox/Pods/NVActivityIndicatorView/NVActivityIndicatorView/NVActivityIndicatorView/Animations/NVActivityIndicatorAnimationBlank.swift /Users/benormos/Desktop/MyFutureBox/Pods/NVActivityIndicatorView/NVActivityIndicatorView/NVActivityIndicatorView/Animations/NVActivityIndicatorAnimationPacman.swift /Users/benormos/Desktop/MyFutureBox/Pods/NVActivityIndicatorView/NVActivityIndicatorView/NVActivityIndicatorView/Animations/NVActivityIndicatorAnimationCircleStrokeSpin.swift /Users/benormos/Desktop/MyFutureBox/Pods/NVActivityIndicatorView/NVActivityIndicatorView/NVActivityIndicatorView/Animations/NVActivityIndicatorAnimationSemiCircleSpin.swift /Users/benormos/Desktop/MyFutureBox/Pods/NVActivityIndicatorView/NVActivityIndicatorView/NVActivityIndicatorView/Animations/NVActivityIndicatorAnimationSquareSpin.swift /Users/benormos/Desktop/MyFutureBox/Pods/NVActivityIndicatorView/NVActivityIndicatorView/NVActivityIndicatorView/Animations/NVActivityIndicatorAnimationTriangleSkewSpin.swift /Users/benormos/Desktop/MyFutureBox/Pods/NVActivityIndicatorView/NVActivityIndicatorView/NVActivityIndicatorView/Animations/NVActivityIndicatorAnimationCubeTransition.swift /Users/benormos/Desktop/MyFutureBox/Pods/NVActivityIndicatorView/NVActivityIndicatorView/NVActivityIndicatorView/Animations/NVActivityIndicatorAnimationLineSpinFadeLoader.swift /Users/benormos/Desktop/MyFutureBox/Pods/NVActivityIndicatorView/NVActivityIndicatorView/NVActivityIndicatorView/Animations/NVActivityIndicatorAnimationBallSpinFadeLoader.swift /Users/benormos/Desktop/MyFutureBox/Pods/NVActivityIndicatorView/NVActivityIndicatorView/NVActivityIndicatorView/Presenter/NVActivityIndicatorPresenter.swift /Users/benormos/Desktop/MyFutureBox/Pods/NVActivityIndicatorView/NVActivityIndicatorView/NVActivityIndicatorView/Animations/NVActivityIndicatorAnimationAudioEqualizer.swift /Users/benormos/Desktop/MyFutureBox/Pods/NVActivityIndicatorView/NVActivityIndicatorView/NVActivityIndicatorView/Animations/NVActivityIndicatorAnimationBallGridBeat.swift /Users/benormos/Desktop/MyFutureBox/Pods/NVActivityIndicatorView/NVActivityIndicatorView/NVActivityIndicatorView/Animations/NVActivityIndicatorAnimationBallBeat.swift /Users/benormos/Desktop/MyFutureBox/Pods/NVActivityIndicatorView/NVActivityIndicatorView/NVActivityIndicatorView/Animations/NVActivityIndicatorAnimationBallZigZagDeflect.swift /Users/benormos/Desktop/MyFutureBox/Pods/NVActivityIndicatorView/NVActivityIndicatorView/NVActivityIndicatorView/Animations/NVActivityIndicatorAnimationOrbit.swift /Users/benormos/Desktop/MyFutureBox/Pods/NVActivityIndicatorView/NVActivityIndicatorView/NVActivityIndicatorView/Animations/NVActivityIndicatorAnimationLineScalePulseOut.swift /Users/benormos/Desktop/MyFutureBox/Pods/NVActivityIndicatorView/NVActivityIndicatorView/NVActivityIndicatorView/NVActivityIndicatorView.swift /Users/benormos/Desktop/MyFutureBox/Pods/NVActivityIndicatorView/NVActivityIndicatorView/NVActivityIndicatorView/Animations/NVActivityIndicatorAnimationLineScaleParty.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/benormos/Desktop/MyFutureBox/Pods/Target\ Support\ Files/NVActivityIndicatorView/NVActivityIndicatorView-umbrella.h /Users/benormos/Desktop/MyFutureBox/build/Pods.build/Debug-iphonesimulator/NVActivityIndicatorView.build/unextended-module.modulemap
/Users/benormos/Desktop/MyFutureBox/build/Pods.build/Debug-iphonesimulator/NVActivityIndicatorView.build/Objects-normal/x86_64/NVActivityIndicatorAnimationLineSpinFadeLoader~partial.swiftmodule : /Users/benormos/Desktop/MyFutureBox/Pods/NVActivityIndicatorView/NVActivityIndicatorView/NVActivityIndicatorView/Animations/NVActivityIndicatorAnimationBallPulseSync.swift /Users/benormos/Desktop/MyFutureBox/Pods/NVActivityIndicatorView/NVActivityIndicatorView/NVActivityIndicatorView/Animations/NVActivityIndicatorAnimationLineScalePulseOutRapid.swift /Users/benormos/Desktop/MyFutureBox/Pods/NVActivityIndicatorView/NVActivityIndicatorView/NVActivityIndicatorView/Animations/NVActivityIndicatorAnimationLineScale.swift /Users/benormos/Desktop/MyFutureBox/Pods/NVActivityIndicatorView/NVActivityIndicatorView/NVActivityIndicatorView/Animations/NVActivityIndicatorAnimationBallScale.swift /Users/benormos/Desktop/MyFutureBox/Pods/NVActivityIndicatorView/NVActivityIndicatorView/NVActivityIndicatorView/Presenter/NVActivityIndicatorViewable.swift /Users/benormos/Desktop/MyFutureBox/Pods/NVActivityIndicatorView/NVActivityIndicatorView/NVActivityIndicatorView/Animations/NVActivityIndicatorAnimationBallScaleMultiple.swift /Users/benormos/Desktop/MyFutureBox/Pods/NVActivityIndicatorView/NVActivityIndicatorView/NVActivityIndicatorView/Animations/NVActivityIndicatorAnimationBallScaleRippleMultiple.swift /Users/benormos/Desktop/MyFutureBox/Pods/NVActivityIndicatorView/NVActivityIndicatorView/NVActivityIndicatorView/Animations/NVActivityIndicatorAnimationBallClipRotateMultiple.swift /Users/benormos/Desktop/MyFutureBox/Pods/NVActivityIndicatorView/NVActivityIndicatorView/NVActivityIndicatorView/Animations/NVActivityIndicatorAnimationBallScaleRipple.swift /Users/benormos/Desktop/MyFutureBox/Pods/NVActivityIndicatorView/NVActivityIndicatorView/NVActivityIndicatorView/NVActivityIndicatorShape.swift /Users/benormos/Desktop/MyFutureBox/Pods/NVActivityIndicatorView/NVActivityIndicatorView/NVActivityIndicatorView/Animations/NVActivityIndicatorAnimationBallRotateChase.swift /Users/benormos/Desktop/MyFutureBox/Pods/NVActivityIndicatorView/NVActivityIndicatorView/NVActivityIndicatorView/Animations/NVActivityIndicatorAnimationBallPulseRise.swift /Users/benormos/Desktop/MyFutureBox/Pods/NVActivityIndicatorView/NVActivityIndicatorView/NVActivityIndicatorView/Animations/NVActivityIndicatorAnimationBallGridPulse.swift /Users/benormos/Desktop/MyFutureBox/Pods/NVActivityIndicatorView/NVActivityIndicatorView/NVActivityIndicatorView/Animations/NVActivityIndicatorAnimationBallClipRotatePulse.swift /Users/benormos/Desktop/MyFutureBox/Pods/NVActivityIndicatorView/NVActivityIndicatorView/NVActivityIndicatorView/Animations/NVActivityIndicatorAnimationBallPulse.swift /Users/benormos/Desktop/MyFutureBox/Pods/NVActivityIndicatorView/NVActivityIndicatorView/NVActivityIndicatorView/NVActivityIndicatorAnimationDelegate.swift /Users/benormos/Desktop/MyFutureBox/Pods/NVActivityIndicatorView/NVActivityIndicatorView/NVActivityIndicatorView/Animations/NVActivityIndicatorAnimationBallRotate.swift /Users/benormos/Desktop/MyFutureBox/Pods/NVActivityIndicatorView/NVActivityIndicatorView/NVActivityIndicatorView/Animations/NVActivityIndicatorAnimationBallClipRotate.swift /Users/benormos/Desktop/MyFutureBox/Pods/NVActivityIndicatorView/NVActivityIndicatorView/NVActivityIndicatorView/Animations/NVActivityIndicatorAnimationBallZigZag.swift /Users/benormos/Desktop/MyFutureBox/Pods/NVActivityIndicatorView/NVActivityIndicatorView/NVActivityIndicatorView/Animations/NVActivityIndicatorAnimationBallTrianglePath.swift /Users/benormos/Desktop/MyFutureBox/Pods/NVActivityIndicatorView/NVActivityIndicatorView/NVActivityIndicatorView/Animations/NVActivityIndicatorAnimationBlank.swift /Users/benormos/Desktop/MyFutureBox/Pods/NVActivityIndicatorView/NVActivityIndicatorView/NVActivityIndicatorView/Animations/NVActivityIndicatorAnimationPacman.swift /Users/benormos/Desktop/MyFutureBox/Pods/NVActivityIndicatorView/NVActivityIndicatorView/NVActivityIndicatorView/Animations/NVActivityIndicatorAnimationCircleStrokeSpin.swift /Users/benormos/Desktop/MyFutureBox/Pods/NVActivityIndicatorView/NVActivityIndicatorView/NVActivityIndicatorView/Animations/NVActivityIndicatorAnimationSemiCircleSpin.swift /Users/benormos/Desktop/MyFutureBox/Pods/NVActivityIndicatorView/NVActivityIndicatorView/NVActivityIndicatorView/Animations/NVActivityIndicatorAnimationSquareSpin.swift /Users/benormos/Desktop/MyFutureBox/Pods/NVActivityIndicatorView/NVActivityIndicatorView/NVActivityIndicatorView/Animations/NVActivityIndicatorAnimationTriangleSkewSpin.swift /Users/benormos/Desktop/MyFutureBox/Pods/NVActivityIndicatorView/NVActivityIndicatorView/NVActivityIndicatorView/Animations/NVActivityIndicatorAnimationCubeTransition.swift /Users/benormos/Desktop/MyFutureBox/Pods/NVActivityIndicatorView/NVActivityIndicatorView/NVActivityIndicatorView/Animations/NVActivityIndicatorAnimationLineSpinFadeLoader.swift /Users/benormos/Desktop/MyFutureBox/Pods/NVActivityIndicatorView/NVActivityIndicatorView/NVActivityIndicatorView/Animations/NVActivityIndicatorAnimationBallSpinFadeLoader.swift /Users/benormos/Desktop/MyFutureBox/Pods/NVActivityIndicatorView/NVActivityIndicatorView/NVActivityIndicatorView/Presenter/NVActivityIndicatorPresenter.swift /Users/benormos/Desktop/MyFutureBox/Pods/NVActivityIndicatorView/NVActivityIndicatorView/NVActivityIndicatorView/Animations/NVActivityIndicatorAnimationAudioEqualizer.swift /Users/benormos/Desktop/MyFutureBox/Pods/NVActivityIndicatorView/NVActivityIndicatorView/NVActivityIndicatorView/Animations/NVActivityIndicatorAnimationBallGridBeat.swift /Users/benormos/Desktop/MyFutureBox/Pods/NVActivityIndicatorView/NVActivityIndicatorView/NVActivityIndicatorView/Animations/NVActivityIndicatorAnimationBallBeat.swift /Users/benormos/Desktop/MyFutureBox/Pods/NVActivityIndicatorView/NVActivityIndicatorView/NVActivityIndicatorView/Animations/NVActivityIndicatorAnimationBallZigZagDeflect.swift /Users/benormos/Desktop/MyFutureBox/Pods/NVActivityIndicatorView/NVActivityIndicatorView/NVActivityIndicatorView/Animations/NVActivityIndicatorAnimationOrbit.swift /Users/benormos/Desktop/MyFutureBox/Pods/NVActivityIndicatorView/NVActivityIndicatorView/NVActivityIndicatorView/Animations/NVActivityIndicatorAnimationLineScalePulseOut.swift /Users/benormos/Desktop/MyFutureBox/Pods/NVActivityIndicatorView/NVActivityIndicatorView/NVActivityIndicatorView/NVActivityIndicatorView.swift /Users/benormos/Desktop/MyFutureBox/Pods/NVActivityIndicatorView/NVActivityIndicatorView/NVActivityIndicatorView/Animations/NVActivityIndicatorAnimationLineScaleParty.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/benormos/Desktop/MyFutureBox/Pods/Target\ Support\ Files/NVActivityIndicatorView/NVActivityIndicatorView-umbrella.h /Users/benormos/Desktop/MyFutureBox/build/Pods.build/Debug-iphonesimulator/NVActivityIndicatorView.build/unextended-module.modulemap
/Users/benormos/Desktop/MyFutureBox/build/Pods.build/Debug-iphonesimulator/NVActivityIndicatorView.build/Objects-normal/x86_64/NVActivityIndicatorAnimationLineSpinFadeLoader~partial.swiftdoc : /Users/benormos/Desktop/MyFutureBox/Pods/NVActivityIndicatorView/NVActivityIndicatorView/NVActivityIndicatorView/Animations/NVActivityIndicatorAnimationBallPulseSync.swift /Users/benormos/Desktop/MyFutureBox/Pods/NVActivityIndicatorView/NVActivityIndicatorView/NVActivityIndicatorView/Animations/NVActivityIndicatorAnimationLineScalePulseOutRapid.swift /Users/benormos/Desktop/MyFutureBox/Pods/NVActivityIndicatorView/NVActivityIndicatorView/NVActivityIndicatorView/Animations/NVActivityIndicatorAnimationLineScale.swift /Users/benormos/Desktop/MyFutureBox/Pods/NVActivityIndicatorView/NVActivityIndicatorView/NVActivityIndicatorView/Animations/NVActivityIndicatorAnimationBallScale.swift /Users/benormos/Desktop/MyFutureBox/Pods/NVActivityIndicatorView/NVActivityIndicatorView/NVActivityIndicatorView/Presenter/NVActivityIndicatorViewable.swift /Users/benormos/Desktop/MyFutureBox/Pods/NVActivityIndicatorView/NVActivityIndicatorView/NVActivityIndicatorView/Animations/NVActivityIndicatorAnimationBallScaleMultiple.swift /Users/benormos/Desktop/MyFutureBox/Pods/NVActivityIndicatorView/NVActivityIndicatorView/NVActivityIndicatorView/Animations/NVActivityIndicatorAnimationBallScaleRippleMultiple.swift /Users/benormos/Desktop/MyFutureBox/Pods/NVActivityIndicatorView/NVActivityIndicatorView/NVActivityIndicatorView/Animations/NVActivityIndicatorAnimationBallClipRotateMultiple.swift /Users/benormos/Desktop/MyFutureBox/Pods/NVActivityIndicatorView/NVActivityIndicatorView/NVActivityIndicatorView/Animations/NVActivityIndicatorAnimationBallScaleRipple.swift /Users/benormos/Desktop/MyFutureBox/Pods/NVActivityIndicatorView/NVActivityIndicatorView/NVActivityIndicatorView/NVActivityIndicatorShape.swift /Users/benormos/Desktop/MyFutureBox/Pods/NVActivityIndicatorView/NVActivityIndicatorView/NVActivityIndicatorView/Animations/NVActivityIndicatorAnimationBallRotateChase.swift /Users/benormos/Desktop/MyFutureBox/Pods/NVActivityIndicatorView/NVActivityIndicatorView/NVActivityIndicatorView/Animations/NVActivityIndicatorAnimationBallPulseRise.swift /Users/benormos/Desktop/MyFutureBox/Pods/NVActivityIndicatorView/NVActivityIndicatorView/NVActivityIndicatorView/Animations/NVActivityIndicatorAnimationBallGridPulse.swift /Users/benormos/Desktop/MyFutureBox/Pods/NVActivityIndicatorView/NVActivityIndicatorView/NVActivityIndicatorView/Animations/NVActivityIndicatorAnimationBallClipRotatePulse.swift /Users/benormos/Desktop/MyFutureBox/Pods/NVActivityIndicatorView/NVActivityIndicatorView/NVActivityIndicatorView/Animations/NVActivityIndicatorAnimationBallPulse.swift /Users/benormos/Desktop/MyFutureBox/Pods/NVActivityIndicatorView/NVActivityIndicatorView/NVActivityIndicatorView/NVActivityIndicatorAnimationDelegate.swift /Users/benormos/Desktop/MyFutureBox/Pods/NVActivityIndicatorView/NVActivityIndicatorView/NVActivityIndicatorView/Animations/NVActivityIndicatorAnimationBallRotate.swift /Users/benormos/Desktop/MyFutureBox/Pods/NVActivityIndicatorView/NVActivityIndicatorView/NVActivityIndicatorView/Animations/NVActivityIndicatorAnimationBallClipRotate.swift /Users/benormos/Desktop/MyFutureBox/Pods/NVActivityIndicatorView/NVActivityIndicatorView/NVActivityIndicatorView/Animations/NVActivityIndicatorAnimationBallZigZag.swift /Users/benormos/Desktop/MyFutureBox/Pods/NVActivityIndicatorView/NVActivityIndicatorView/NVActivityIndicatorView/Animations/NVActivityIndicatorAnimationBallTrianglePath.swift /Users/benormos/Desktop/MyFutureBox/Pods/NVActivityIndicatorView/NVActivityIndicatorView/NVActivityIndicatorView/Animations/NVActivityIndicatorAnimationBlank.swift /Users/benormos/Desktop/MyFutureBox/Pods/NVActivityIndicatorView/NVActivityIndicatorView/NVActivityIndicatorView/Animations/NVActivityIndicatorAnimationPacman.swift /Users/benormos/Desktop/MyFutureBox/Pods/NVActivityIndicatorView/NVActivityIndicatorView/NVActivityIndicatorView/Animations/NVActivityIndicatorAnimationCircleStrokeSpin.swift /Users/benormos/Desktop/MyFutureBox/Pods/NVActivityIndicatorView/NVActivityIndicatorView/NVActivityIndicatorView/Animations/NVActivityIndicatorAnimationSemiCircleSpin.swift /Users/benormos/Desktop/MyFutureBox/Pods/NVActivityIndicatorView/NVActivityIndicatorView/NVActivityIndicatorView/Animations/NVActivityIndicatorAnimationSquareSpin.swift /Users/benormos/Desktop/MyFutureBox/Pods/NVActivityIndicatorView/NVActivityIndicatorView/NVActivityIndicatorView/Animations/NVActivityIndicatorAnimationTriangleSkewSpin.swift /Users/benormos/Desktop/MyFutureBox/Pods/NVActivityIndicatorView/NVActivityIndicatorView/NVActivityIndicatorView/Animations/NVActivityIndicatorAnimationCubeTransition.swift /Users/benormos/Desktop/MyFutureBox/Pods/NVActivityIndicatorView/NVActivityIndicatorView/NVActivityIndicatorView/Animations/NVActivityIndicatorAnimationLineSpinFadeLoader.swift /Users/benormos/Desktop/MyFutureBox/Pods/NVActivityIndicatorView/NVActivityIndicatorView/NVActivityIndicatorView/Animations/NVActivityIndicatorAnimationBallSpinFadeLoader.swift /Users/benormos/Desktop/MyFutureBox/Pods/NVActivityIndicatorView/NVActivityIndicatorView/NVActivityIndicatorView/Presenter/NVActivityIndicatorPresenter.swift /Users/benormos/Desktop/MyFutureBox/Pods/NVActivityIndicatorView/NVActivityIndicatorView/NVActivityIndicatorView/Animations/NVActivityIndicatorAnimationAudioEqualizer.swift /Users/benormos/Desktop/MyFutureBox/Pods/NVActivityIndicatorView/NVActivityIndicatorView/NVActivityIndicatorView/Animations/NVActivityIndicatorAnimationBallGridBeat.swift /Users/benormos/Desktop/MyFutureBox/Pods/NVActivityIndicatorView/NVActivityIndicatorView/NVActivityIndicatorView/Animations/NVActivityIndicatorAnimationBallBeat.swift /Users/benormos/Desktop/MyFutureBox/Pods/NVActivityIndicatorView/NVActivityIndicatorView/NVActivityIndicatorView/Animations/NVActivityIndicatorAnimationBallZigZagDeflect.swift /Users/benormos/Desktop/MyFutureBox/Pods/NVActivityIndicatorView/NVActivityIndicatorView/NVActivityIndicatorView/Animations/NVActivityIndicatorAnimationOrbit.swift /Users/benormos/Desktop/MyFutureBox/Pods/NVActivityIndicatorView/NVActivityIndicatorView/NVActivityIndicatorView/Animations/NVActivityIndicatorAnimationLineScalePulseOut.swift /Users/benormos/Desktop/MyFutureBox/Pods/NVActivityIndicatorView/NVActivityIndicatorView/NVActivityIndicatorView/NVActivityIndicatorView.swift /Users/benormos/Desktop/MyFutureBox/Pods/NVActivityIndicatorView/NVActivityIndicatorView/NVActivityIndicatorView/Animations/NVActivityIndicatorAnimationLineScaleParty.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/benormos/Desktop/MyFutureBox/Pods/Target\ Support\ Files/NVActivityIndicatorView/NVActivityIndicatorView-umbrella.h /Users/benormos/Desktop/MyFutureBox/build/Pods.build/Debug-iphonesimulator/NVActivityIndicatorView.build/unextended-module.modulemap
|
D
|
any of various soft thick unsweetened baked dishes
(British) the dessert course of a meal (`pud' is used informally)
any of various soft sweet desserts thickened usually with flour and baked or boiled or steamed
|
D
|
/Users/aaronb/Development/Air-End/DerivedData/Mango/Build/Intermediates/Mango.build/Debug-iphonesimulator/Mango.build/Objects-normal/x86_64/ListVC-LocationExtension.o : /Users/aaronb/Development/Air-End/Air-End/MapVC-AddressTableViewDelegate-Extension.swift /Users/aaronb/Development/Air-End/Air-End/UIColor+Extension.swift /Users/aaronb/Development/Air-End/Air-End/TextToEnum-\ Extentsion.swift /Users/aaronb/Development/Air-End/Air-End/ListVC.swift /Users/aaronb/Development/Air-End/Air-End/Guidance.swift /Users/aaronb/Development/Air-End/Air-End/MapVC.swift /Users/aaronb/Development/Air-End/Air-End/CorrectAddressTableView.swift /Users/aaronb/Development/Air-End/Air-End/ViewController-Conversions-Extension.swift /Users/aaronb/Development/Air-End/Air-End/ViewController-Extension.swift /Users/aaronb/Development/Air-End/Air-End/MapVC-Guidance-ExtensionViewController.swift /Users/aaronb/Development/Air-End/Air-End/NewTaskVC.swift /Users/aaronb/Development/Air-End/Air-End/Theme.swift /Users/aaronb/Development/Air-End/Air-End/MapVC-SegmentedControl-Extension.swift /Users/aaronb/Development/Air-End/Air-End/TaskMapView.swift /Users/aaronb/Development/Air-End/Air-End/Noun.swift /Users/aaronb/Development/Air-End/Air-End/Task.swift /Users/aaronb/Development/Air-End/Air-End/TaskMapVC.swift /Users/aaronb/Development/Air-End/Air-End/ListVC-LocationExtension.swift /Users/aaronb/Development/Air-End/Air-End/TaskMapViewDelegate.swift /Users/aaronb/Development/Air-End/Air-End/AppDelegate.swift /Users/aaronb/Development/Air-End/Air-End/ColoredDatePicker.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/UIKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/ObjectiveC.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreGraphics.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreImage.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreLocation.swiftmodule /Users/aaronb/Development/Air-End/RealmSwift.framework/Modules/RealmSwift.swiftmodule/x86_64.swiftmodule ./Realm.framework/Headers/RLMObjectBase_Dynamic.h ./Realm.framework/Headers/RLMRealm_Dynamic.h ./Realm.framework/PrivateHeaders/RLMSchema_Private.h ./Realm.framework/PrivateHeaders/RLMResults_Private.h ./Realm.framework/PrivateHeaders/RLMRealm_Private.h ./Realm.framework/PrivateHeaders/RLMRealmConfiguration_Private.h ./Realm.framework/PrivateHeaders/RLMProperty_Private.h ./Realm.framework/PrivateHeaders/RLMOptionalBase.h ./Realm.framework/PrivateHeaders/RLMObject_Private.h ./Realm.framework/PrivateHeaders/RLMObjectStore.h ./Realm.framework/PrivateHeaders/RLMObjectSchema_Private.h ./Realm.framework/PrivateHeaders/RLMMigration_Private.h ./Realm.framework/PrivateHeaders/RLMListBase.h ./Realm.framework/PrivateHeaders/RLMArray_Private.h ./Realm.framework/PrivateHeaders/RLMAccessor.h ./Realm.framework/Headers/RLMSchema.h ./Realm.framework/Headers/RLMResults.h ./Realm.framework/Headers/RLMRealmConfiguration.h ./Realm.framework/Headers/RLMRealm.h ./Realm.framework/Headers/RLMConstants.h ./Realm.framework/Headers/RLMProperty.h ./Realm.framework/Headers/RLMPlatform.h ./Realm.framework/Headers/RLMObjectSchema.h ./Realm.framework/Headers/RLMObjectBase.h ./Realm.framework/Headers/RLMObject.h ./Realm.framework/Headers/RLMMigration.h ./Realm.framework/Headers/RLMDefines.h ./Realm.framework/Headers/RLMCollection.h ./Realm.framework/Headers/RLMArray.h ./Realm.framework/Headers/Realm.h ./Realm.framework/Modules/module.modulemap /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreData.swiftmodule
/Users/aaronb/Development/Air-End/DerivedData/Mango/Build/Intermediates/Mango.build/Debug-iphonesimulator/Mango.build/Objects-normal/x86_64/ListVC-LocationExtension~partial.swiftmodule : /Users/aaronb/Development/Air-End/Air-End/MapVC-AddressTableViewDelegate-Extension.swift /Users/aaronb/Development/Air-End/Air-End/UIColor+Extension.swift /Users/aaronb/Development/Air-End/Air-End/TextToEnum-\ Extentsion.swift /Users/aaronb/Development/Air-End/Air-End/ListVC.swift /Users/aaronb/Development/Air-End/Air-End/Guidance.swift /Users/aaronb/Development/Air-End/Air-End/MapVC.swift /Users/aaronb/Development/Air-End/Air-End/CorrectAddressTableView.swift /Users/aaronb/Development/Air-End/Air-End/ViewController-Conversions-Extension.swift /Users/aaronb/Development/Air-End/Air-End/ViewController-Extension.swift /Users/aaronb/Development/Air-End/Air-End/MapVC-Guidance-ExtensionViewController.swift /Users/aaronb/Development/Air-End/Air-End/NewTaskVC.swift /Users/aaronb/Development/Air-End/Air-End/Theme.swift /Users/aaronb/Development/Air-End/Air-End/MapVC-SegmentedControl-Extension.swift /Users/aaronb/Development/Air-End/Air-End/TaskMapView.swift /Users/aaronb/Development/Air-End/Air-End/Noun.swift /Users/aaronb/Development/Air-End/Air-End/Task.swift /Users/aaronb/Development/Air-End/Air-End/TaskMapVC.swift /Users/aaronb/Development/Air-End/Air-End/ListVC-LocationExtension.swift /Users/aaronb/Development/Air-End/Air-End/TaskMapViewDelegate.swift /Users/aaronb/Development/Air-End/Air-End/AppDelegate.swift /Users/aaronb/Development/Air-End/Air-End/ColoredDatePicker.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/UIKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/ObjectiveC.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreGraphics.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreImage.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreLocation.swiftmodule /Users/aaronb/Development/Air-End/RealmSwift.framework/Modules/RealmSwift.swiftmodule/x86_64.swiftmodule ./Realm.framework/Headers/RLMObjectBase_Dynamic.h ./Realm.framework/Headers/RLMRealm_Dynamic.h ./Realm.framework/PrivateHeaders/RLMSchema_Private.h ./Realm.framework/PrivateHeaders/RLMResults_Private.h ./Realm.framework/PrivateHeaders/RLMRealm_Private.h ./Realm.framework/PrivateHeaders/RLMRealmConfiguration_Private.h ./Realm.framework/PrivateHeaders/RLMProperty_Private.h ./Realm.framework/PrivateHeaders/RLMOptionalBase.h ./Realm.framework/PrivateHeaders/RLMObject_Private.h ./Realm.framework/PrivateHeaders/RLMObjectStore.h ./Realm.framework/PrivateHeaders/RLMObjectSchema_Private.h ./Realm.framework/PrivateHeaders/RLMMigration_Private.h ./Realm.framework/PrivateHeaders/RLMListBase.h ./Realm.framework/PrivateHeaders/RLMArray_Private.h ./Realm.framework/PrivateHeaders/RLMAccessor.h ./Realm.framework/Headers/RLMSchema.h ./Realm.framework/Headers/RLMResults.h ./Realm.framework/Headers/RLMRealmConfiguration.h ./Realm.framework/Headers/RLMRealm.h ./Realm.framework/Headers/RLMConstants.h ./Realm.framework/Headers/RLMProperty.h ./Realm.framework/Headers/RLMPlatform.h ./Realm.framework/Headers/RLMObjectSchema.h ./Realm.framework/Headers/RLMObjectBase.h ./Realm.framework/Headers/RLMObject.h ./Realm.framework/Headers/RLMMigration.h ./Realm.framework/Headers/RLMDefines.h ./Realm.framework/Headers/RLMCollection.h ./Realm.framework/Headers/RLMArray.h ./Realm.framework/Headers/Realm.h ./Realm.framework/Modules/module.modulemap /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreData.swiftmodule
/Users/aaronb/Development/Air-End/DerivedData/Mango/Build/Intermediates/Mango.build/Debug-iphonesimulator/Mango.build/Objects-normal/x86_64/ListVC-LocationExtension~partial.swiftdoc : /Users/aaronb/Development/Air-End/Air-End/MapVC-AddressTableViewDelegate-Extension.swift /Users/aaronb/Development/Air-End/Air-End/UIColor+Extension.swift /Users/aaronb/Development/Air-End/Air-End/TextToEnum-\ Extentsion.swift /Users/aaronb/Development/Air-End/Air-End/ListVC.swift /Users/aaronb/Development/Air-End/Air-End/Guidance.swift /Users/aaronb/Development/Air-End/Air-End/MapVC.swift /Users/aaronb/Development/Air-End/Air-End/CorrectAddressTableView.swift /Users/aaronb/Development/Air-End/Air-End/ViewController-Conversions-Extension.swift /Users/aaronb/Development/Air-End/Air-End/ViewController-Extension.swift /Users/aaronb/Development/Air-End/Air-End/MapVC-Guidance-ExtensionViewController.swift /Users/aaronb/Development/Air-End/Air-End/NewTaskVC.swift /Users/aaronb/Development/Air-End/Air-End/Theme.swift /Users/aaronb/Development/Air-End/Air-End/MapVC-SegmentedControl-Extension.swift /Users/aaronb/Development/Air-End/Air-End/TaskMapView.swift /Users/aaronb/Development/Air-End/Air-End/Noun.swift /Users/aaronb/Development/Air-End/Air-End/Task.swift /Users/aaronb/Development/Air-End/Air-End/TaskMapVC.swift /Users/aaronb/Development/Air-End/Air-End/ListVC-LocationExtension.swift /Users/aaronb/Development/Air-End/Air-End/TaskMapViewDelegate.swift /Users/aaronb/Development/Air-End/Air-End/AppDelegate.swift /Users/aaronb/Development/Air-End/Air-End/ColoredDatePicker.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/UIKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/ObjectiveC.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreGraphics.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreImage.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreLocation.swiftmodule /Users/aaronb/Development/Air-End/RealmSwift.framework/Modules/RealmSwift.swiftmodule/x86_64.swiftmodule ./Realm.framework/Headers/RLMObjectBase_Dynamic.h ./Realm.framework/Headers/RLMRealm_Dynamic.h ./Realm.framework/PrivateHeaders/RLMSchema_Private.h ./Realm.framework/PrivateHeaders/RLMResults_Private.h ./Realm.framework/PrivateHeaders/RLMRealm_Private.h ./Realm.framework/PrivateHeaders/RLMRealmConfiguration_Private.h ./Realm.framework/PrivateHeaders/RLMProperty_Private.h ./Realm.framework/PrivateHeaders/RLMOptionalBase.h ./Realm.framework/PrivateHeaders/RLMObject_Private.h ./Realm.framework/PrivateHeaders/RLMObjectStore.h ./Realm.framework/PrivateHeaders/RLMObjectSchema_Private.h ./Realm.framework/PrivateHeaders/RLMMigration_Private.h ./Realm.framework/PrivateHeaders/RLMListBase.h ./Realm.framework/PrivateHeaders/RLMArray_Private.h ./Realm.framework/PrivateHeaders/RLMAccessor.h ./Realm.framework/Headers/RLMSchema.h ./Realm.framework/Headers/RLMResults.h ./Realm.framework/Headers/RLMRealmConfiguration.h ./Realm.framework/Headers/RLMRealm.h ./Realm.framework/Headers/RLMConstants.h ./Realm.framework/Headers/RLMProperty.h ./Realm.framework/Headers/RLMPlatform.h ./Realm.framework/Headers/RLMObjectSchema.h ./Realm.framework/Headers/RLMObjectBase.h ./Realm.framework/Headers/RLMObject.h ./Realm.framework/Headers/RLMMigration.h ./Realm.framework/Headers/RLMDefines.h ./Realm.framework/Headers/RLMCollection.h ./Realm.framework/Headers/RLMArray.h ./Realm.framework/Headers/Realm.h ./Realm.framework/Modules/module.modulemap /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreData.swiftmodule
|
D
|
/**
Provides type compatibility with, and comparable features to Extended Pascal.
This is the library that translated Pascal sources rely on. It also provides
features that can be of value in hand-written D code. The epcompat library is
supplied as a dub sub package so it supports that use case.
$(TABLE
$(TR $(TH Module) $(TH Purpose))
$(TR $(TD $(LINK2 epcompat/array, array)) $(TD
Fixed length array types that can start at any index.
))
$(TR $(TD $(LINK2 epcompat/enumeration, enumeration)) $(TD
Brings the members of an enumeration into scope, as if the following
code would be in a `with` block.
))
$(TR $(TD $(LINK2 epcompat/file, file)) $(TD
Implementation of EP file i/o and local Prospero extensions.
))
$(TR $(TD $(LINK2 epcompat/initial, initial)) $(TD
Changes `.init` to a custom default value.
))
$(TR $(TD $(LINK2 epcompat/ordinal, ordinal)) $(TD
An integral type with specific inclusive bounds.
))
$(TR $(TD $(LINK2 epcompat/set, set)) $(TD
Sets of integral values, ordinal values or members of enumerations.
))
$(TR $(TD $(LINK2 epcompat/string, string)) $(TD
String types that are compatible with native D `string`, and binary
compatible with Prospero Extended Pascal strings in file i/o.
))
)
*/
module epcompat;
public import epcompat.array;
public import epcompat.string;
public import epcompat.file;
public import epcompat.initial;
public import epcompat.interval;
public import epcompat.set;
public import epcompat.ordinal;
version(ddox) {} else // https://issues.dlang.org/show_bug.cgi?id=18211
public import epcompat.enumeration;
|
D
|
module dbi.connect;
//Предполагается последующее создание общего модуля Dinrus.DBI.dll
import dbi.sqlite.all;
enum ПТипБД
{
Sqlite,
ODBC,
MySQL,
Pg,
MSQL,
MSSQL
}
class ПодключениеКБазеДанных
{
private:
БДЭскюлайт лайт;
ПгБД пг;
ОдбцБД одбц;
МайЭсКюЭлБД май;
ЭмЭсЭсКюЭлБД мс;
ЭмЭсКюЭлБД м;
ПТипБД типБд;
public:
this (ПТипБД тип)
{
switch(тип)
{
case ПТипБД.Sqlite:
this.лайт = new БДЭскюлайт();
this.типБд = ПТипБД.Sqlite;
//Здесь реально должно появляться окно запроса параметров подключения
//и вторым шагом - проводиться подключение!))
break;
case ПТипБД.ODBC:
this.одбц = new ОдбцБД();
this.типБд = ПТипБД.ODBC;
//То же (Нереализовано)
break;
case ПТипБД.MySQL:
this.май = new МайЭсКюЭлБД();
this.типБд = ПТипБД.MySQL;
//То же (Нереализовано)
break;
case ПТипБД.Pg:
this.пг = new ПгБД();
this.типБд = ПТипБД.Pg;
//То же (Нереализовано)
break;
case ПТипБД.MSQL:
this.м = new ЭмЭсКюЭлБД();
this.типБд = ПТипБД.MSQL;
//То же (Нереализовано)
break;
case ПТипБД.MSSQL:
this.мс =new ЭмЭсЭсКюЭлБД();
this.типБд = ПТипБД.MSSQL;
//То же (Нереализовано)
break;
default:
}
}
проц установи(ткст имяБазы, ткст имя_пользователя = пусто, ткст пароль = пусто)
{
switch(this.типБД)
{
case ПТипБД.Sqlite:
this.лайт.подключись(имяБазы, имя_пользователя, пароль);
break;
case ПТипБД.ODBC:
this.одбц.подключись(имяБазы, имя_пользователя, пароль);
break;
case ПТипБД.MySQL:
this.май.подключись (имяБазы, имя_пользователя, пароль, пусто, пусто);
break;
case ПТипБД.Pg:
this.пг.подключись(имяБазы, имя_пользователя, пароль);
break;
case ПТипБД.MSQL:
this.м.подключись(парамы, имя_пользователя, пароль);
break;
case ПТипБД.MSSQL:
this.мс.подключись(парамы, имя_пользователя, пароль);
break;
default:
}
}
}
|
D
|
/**
* Copyright 2017 Cut Through Recordings
* License: MIT License
* Author(s): Ethan Reker
*/
module ddsp.util.scale;
import std.math;
struct RealRange
{
float x1;
float x2;
}
class Scale
{
public:
/++Calculates the coefficient a and b based on the ranges given. +/
abstract void initialize(RealRange inputRange, RealRange outputRange) nothrow @nogc;
/++input value is converted and returned. +/
abstract float convert(float x) nothrow @nogc;
float getA(){ return _a;}
float getB(){ return _b;}
protected:
//Coefficients which will shape the output funtion.
float _a;
float _b;
float _minVal;
float _maxVal;
}
/**
Takes an input range which is logarithmic and converts it to a linear scale.
*/
class LogToLinearScale : Scale
{
public:
this() nothrow @nogc
{
}
override void initialize(RealRange inputRange, RealRange outputRange) nothrow @nogc
{
_minVal = inputRange.x1;
_maxVal = inputRange.x2;
_b = log(outputRange.x1/outputRange.x2)/(inputRange.x1 - inputRange.x2);
_a = outputRange.x1 / exp(_b * inputRange.x1);
}
override float convert(float x) nothrow @nogc
{
x < _minVal ? x = _minVal : x = x;
x > _maxVal ? x = _maxVal : x = x;
return log(x / _a) / _b;
}
private:
}
/**
Takes an input range which is linear and converts it to a logarithmic scale.
*/
class LinearToLogScale : Scale
{
public:
this() nothrow @nogc
{
}
override void initialize(RealRange inputRange, RealRange outputRange) nothrow @nogc
{
_minVal = inputRange.x1;
_maxVal = inputRange.x2;
_b = log(outputRange.x1/outputRange.x2)/(inputRange.x1 - inputRange.x2);
_a = outputRange.x1 / exp(_b * inputRange.x1);
}
override float convert(float x) nothrow @nogc
{
x < _minVal ? x = _minVal : x = x;
x > _maxVal ? x = _maxVal : x = x;
return _a * exp(_b * x);
}
private:
}
unittest
{
LinearToLogScale scale1 = new LinearToLogScale();
scale1.initialize(RealRange(0.1f, 1.0f), RealRange(0.1f, 1.0f));
LogToLinearScale scale2 = new LogToLinearScale();
scale2.initialize(RealRange(0.1f, 1.0f), RealRange(0.1f, 1.0f));
}
|
D
|
module ivy.interpreter.exception;
import ivy.exception: IvyException;
class IvyInterpretException: IvyException
{
import ivy.interpreter.exec_frame_info: ExecFrameInfo;
protected:
ExecFrameInfo[] _frameStackInfo;
public:
this(string msg, string file = __FILE__, size_t line = __LINE__, Throwable next = null) pure nothrow @nogc @safe
{
super(msg, file, line, next);
}
ExecFrameInfo[] frameStackInfo() @property {
return this._frameStackInfo;
}
void frameStackInfo(ExecFrameInfo[] items) @property
{
import std.range: empty, back;
this._frameStackInfo = items;
// Set location of last item in frame stack
if( !items.empty )
this.location = items.back.location;
}
}
|
D
|
/* Copyright (c) <2003-2011> <Julio Jerez, Newton Game Dynamics>
*
* 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 derelict.newton.types;
enum : int
{
NEWTON_MAJOR_VERSION = 3,
NEWTON_MINOR_VERSION = 03,
NEWTON_PROFILER_WORLD_UPDATE = 0,
NEWTON_PROFILER_COLLISION_UPDATE = 1,
NEWTON_PROFILER_COLLISION_UPDATE_BROAD_PHASE = 2,
NEWTON_PROFILER_COLLISION_UPDATE_NARROW_PHASE = 3,
NEWTON_PROFILER_DYNAMICS_UPDATE = 4,
NEWTON_PROFILER_DYNAMICS_CONSTRAINT_GRAPH = 5,
NEWTON_PROFILER_DYNAMICS_SOLVE_CONSTRAINT_GRAPH = 6,
NEWTON_PROFILER_FORCE_CALLBACK_UPDATE = 7,
NEWTON_PRE_LISTERNER_CALLBACK_UPDATE = 8,
NEWTON_POST_LISTERNER_CALLBACK_UPDATE = 9,
NEWTON_DYNAMIC_BODY = 0,
NEWTON_KINEMATIC_BODY = 1,
NEWTON_DEFORMABLE_BODY = 2,
SERIALIZE_ID_SPHERE = 0,
SERIALIZE_ID_CAPSULE = 1,
SERIALIZE_ID_CHAMFERCYLINDER = 2,
SERIALIZE_ID_TAPEREDCAPSULE = 3,
SERIALIZE_ID_CYLINDER = 4,
SERIALIZE_ID_TAPEREDCYLINDER = 5,
SERIALIZE_ID_BOX = 6,
SERIALIZE_ID_CONE = 7,
SERIALIZE_ID_CONVEXHULL = 8,
SERIALIZE_ID_NULL = 9,
SERIALIZE_ID_COMPOUND = 10,
SERIALIZE_ID_TREE = 11,
SERIALIZE_ID_HEIGHTFIELD = 12,
SERIALIZE_ID_DEFORMABLEMESH = 13,
SERIALIZE_ID_USERMESH = 14,
SERIALIZE_ID_SCENE = 15,
SERIALIZE_ID_COMPOUND_BREAKABLE = 16
}
struct NewtonMesh {}
struct NewtonBody {}
struct NewtonWorld {}
struct NewtonJoint {}
struct NewtonMaterial {}
struct NewtonCollision {}
struct NewtonDeformableMeshSegment {}
struct NewtonBreakableComponentMesh {}
struct NewtonBoxParam
{
float m_x;
float m_y;
float m_z;
}
struct NewtonSphereParam
{
float m_radio;
}
struct NewtonCylinderParam
{
float m_radio;
float m_height;
}
struct NewtonCapsuleParam
{
float m_radio;
float m_height;
}
struct NewtonConeParam
{
float m_radio;
float m_height;
}
struct NewtonTaperedCapsuleParam
{
float m_radio0;
float m_radio1;
float m_height;
}
struct NewtonTaperedCylinderParam
{
float m_radio0;
float m_radio1;
float m_height;
}
struct NewtonChamferCylinderParam
{
float m_radio;
float m_height;
}
struct NewtonConvexHullParam
{
int m_vertexCount;
int m_vertexStrideInBytes;
int m_faceCount;
float* m_vertex;
}
struct NewtonCompoundCollisionParam
{
int m_chidrenCount;
}
struct NewtonCollisionTreeParam
{
int m_vertexCount;
int m_indexCount;
}
struct NewtonDeformableMeshParam
{
int m_vertexCount;
int m_triangleCount;
int m_vrtexStrideInBytes;
ushort* m_indexList;
float* m_vertexList;
}
struct NewtonHeightFieldCollisionParam
{
int m_width;
int m_height;
int m_gridsDiagonals;
float m_horizonalScale;
float m_verticalScale;
float* m_elevation;
char* m_atributes;
}
struct NewtonSceneCollisionParam
{
int m_childrenProxyCount;
}
struct NewtonCollisionInfoRecord
{
float[4][4] m_offsetMatrix;
int m_collisionType;
int m_collisionUserID;
union
{
NewtonBoxParam m_box;
NewtonConeParam m_cone;
NewtonSphereParam m_sphere;
NewtonCapsuleParam m_capsule;
NewtonCylinderParam m_cylinder;
NewtonTaperedCapsuleParam m_taperedCapsule;
NewtonTaperedCylinderParam m_taperedCylinder;
NewtonChamferCylinderParam m_chamferCylinder;
NewtonConvexHullParam m_convexHull;
NewtonDeformableMeshParam m_deformableMesh;
NewtonCompoundCollisionParam m_compoundCollision;
NewtonCollisionTreeParam m_collisionTree;
NewtonHeightFieldCollisionParam m_heightField;
NewtonSceneCollisionParam m_sceneCollision;
float[64] m_paramArray;
}
}
struct NewtonJointRecord
{
float[4][4] m_attachmenMatrix_0;
float[4][4] m_attachmenMatrix_1;
float[3] m_minLinearDof;
float[3] m_maxLinearDof;
float[3] m_minAngularDof;
float[3] m_maxAngularDof;
const NewtonBody* m_attachBody_0;
const NewtonBody* m_attachBody_1;
float[16] m_extraParameters;
int m_bodiesCollisionOn;
char[32] m_descriptionType;
}
struct NewtonUserMeshCollisionCollideDesc
{
float[4] m_boxP0;
float[4] m_boxP1;
float[4] m_boxDistanceTravel;
int m_threadNumber;
int m_faceCount;
int m_vertexStrideInBytes;
float m_skinThickness;
void* m_userData;
NewtonBody* m_objBody;
NewtonBody* m_polySoupBody;
NewtonCollision* m_objCollision;
NewtonCollision* m_polySoupCollision;
float* m_vertex;
int* m_faceIndexCount;
int* m_faceVertexIndex;
}
struct NewtonWorldConvexCastReturnInfo
{
float[4] m_point;
float[4] m_normal;
float[4] m_normalOnHitPoint;
float m_penetration;
int m_contactID;
const NewtonBody* m_hitBody;
}
struct NewtonUserMeshCollisionRayHitDesc
{
float[4] m_p0;
float[4] m_p1;
float[4] m_normalOut;
int m_userIdOut;
void* m_userData;
}
struct NewtonHingeSliderUpdateDesc
{
float m_accel;
float m_minFriction;
float m_maxFriction;
float m_timestep;
}
alias NewtonAllocMemory = extern(C) void* function (int sizeInBytes);
alias NewtonFreeMemory = extern(C) void function (const void* ptr, int sizeInBytes);
alias NewtonWorldDestructorCallback = extern(C) void function (const NewtonWorld* world);
alias NewtonWorldUpdateListenerCallback = extern(C) void function (const NewtonWorld* world, const void* listenerUserData, float timestep);
alias NewtonWorldDestroyListenerCallback = extern(C) void function (const NewtonWorld* world, const void* listenerUserData);
alias NewtonGetTicksCountCallback = extern(C) uint function ();
alias NewtonSerializeCallback = extern(C) void function (const void* serializeHandle, const void* buffer, int size);
alias NewtonDeserializeCallback = extern(C) void function (const void* serializeHandle, const void* buffer, int size);
alias NewtonOnBodySerializationCallback = extern(C) void function (const NewtonBody* body_, NewtonSerializeCallback function_, const void* serializeHandle);
alias NewtonOnBodyDeserializationCallback = extern(C) void function (const NewtonBody* body_, NewtonDeserializeCallback function_, const void* serializeHandle);
alias NewtonOnUserCollisionSerializationCallback = extern(C) void function (const void* userData, NewtonSerializeCallback function_, const void* serializeHandle);
alias NewtonUserMeshCollisionDestroyCallback = extern(C) void function (const void* userData);
alias NewtonUserMeshCollisionCollideCallback = extern(C) void function (const NewtonUserMeshCollisionCollideDesc* collideDescData);
alias NewtonUserMeshCollisionRayHitCallback = extern(C) float function (const NewtonUserMeshCollisionRayHitDesc* lineDescData);
alias NewtonUserMeshCollisionGetCollisionInfo = extern(C) void function (const void* userData, const NewtonCollisionInfoRecord* infoRecord);
alias NewtonUserMeshCollisionAABBTest = extern(C) int function (const void* userData, const float* boxP0, const float* boxP1);
alias NewtonUserMeshCollisionGetFacesInAABB = extern(C) int function (const void* userData, const float* p0, const float* p1, const float** vertexArray, const int* vertexCount, const int* vertexStrideInBytes, const int* indexList, int maxIndexCount, const int* userDataList);
alias NewtonCollisionTreeRayCastCallback = extern(C) float function (const NewtonBody* body_, const NewtonCollision* treeCollision, float interception, const float* normal, int faceId, const void* usedData);
alias NewtonHeightFieldRayCastCallback = extern(C) float function (const NewtonBody* body_, const NewtonCollision* heightFieldCollision, float interception, int row, int col, const float* normal, int faceId, const void* usedData);
alias NewtonTreeCollisionCallback = extern(C) void function (const NewtonBody* bodyWithTreeCollision, const NewtonBody* body_, int faceID, int vertexCount, const float* vertex, int vertexStrideInBytes);
alias NewtonBodyDestructor = extern(C) void function (const NewtonBody* body_);
alias NewtonApplyForceAndTorque = extern(C) void function (const NewtonBody* body_, float timestep, int threadIndex);
alias NewtonSetTransform = extern(C) void function (const NewtonBody* body_, const float* matrix, int threadIndex);
alias NewtonIslandUpdate = extern(C) int function (const NewtonWorld* newtonWorld, const void* islandHandle, int bodyCount);
alias NewtonBodyLeaveWorld = extern(C) void function (const NewtonBody* body_, int threadIndex);
alias NewtonDestroyBodyByExeciveForce = extern(C) void function (const NewtonBody* body_, const NewtonJoint* contact);
alias NewtonCollisionCompoundBreakableCallback = extern(C) int function (const NewtonMesh* mesh, const void* userData, const float* planeMatrixOut);
alias NewtonGetBuoyancyPlane = extern(C) int function (int collisionID, const void* context, const float* globalSpaceMatrix, const float* globalSpacePlane);
alias NewtonWorldRayPrefilterCallback = extern(C) uint function (const NewtonBody* body_, const NewtonCollision* collision, const void* userData);
alias NewtonWorldRayFilterCallback = extern(C) float function (const NewtonBody* body_, const float* hitNormal, int collisionID, const void* userData, float intersectParam);
alias NewtonOnAABBOverlap = extern(C) int function (const NewtonMaterial* material, const NewtonBody* body0, const NewtonBody* body1, int threadIndex);
alias NewtonContactsProcess = extern(C) void function (const NewtonJoint* contact, float timestep, int threadIndex);
alias NewtonBodyIterator = extern(C) void function (const NewtonBody* body_, const void* userData);
alias NewtonJointIterator = extern(C) void function (const NewtonJoint* joint, const void* userData);
alias NewtonCollisionIterator = extern(C) void function (const void* userData, int vertexCount, const float* faceArray, int faceId);
alias NewtonBallCallback = extern(C) void function (const NewtonJoint* ball, float timestep);
alias NewtonHingeCallback = extern(C) uint function (const NewtonJoint* hinge, const NewtonHingeSliderUpdateDesc* desc);
alias NewtonSliderCallback = extern(C) uint function (const NewtonJoint* slider, const NewtonHingeSliderUpdateDesc* desc);
alias NewtonUniversalCallback = extern(C) uint function (const NewtonJoint* universal, const NewtonHingeSliderUpdateDesc* desc);
alias NewtonCorkscrewCallback = extern(C) uint function (const NewtonJoint* corkscrew, const NewtonHingeSliderUpdateDesc* desc);
alias NewtonUserBilateralCallback = extern(C) void function (const NewtonJoint* userJoint, float timestep, int threadIndex);
alias NewtonUserBilateralGetInfoCallback = extern(C) void function (const NewtonJoint* userJoint, const NewtonJointRecord* info);
alias NewtonConstraintDestructor = extern(C) void function (const NewtonJoint* me);
alias NewtonJobTask = extern(C) void function (const void* userData, int threadIndex);
alias NewtonReportProgress = extern(C) void function (float progressNormalzedPercent);
|
D
|
/Users/Lorenzo/Desktop/EO18_2/Build/Intermediates/Pods.build/Debug-iphonesimulator/MapboxCoreNavigation.build/Objects-normal/x86_64/NavigationRouteOptions.o : /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxCoreNavigation/MapboxCoreNavigation/UIDevice.swift /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxCoreNavigation/MapboxCoreNavigation/Sequence.swift /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxCoreNavigation/MapboxCoreNavigation/Locale.swift /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxCoreNavigation/MapboxCoreNavigation/ScreenCapture.swift /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxCoreNavigation/MapboxCoreNavigation/Date.swift /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxCoreNavigation/MapboxCoreNavigation/String.swift /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxCoreNavigation/MapboxCoreNavigation/Feedback.swift /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxCoreNavigation/MapboxCoreNavigation/CLLocation.swift /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxCoreNavigation/MapboxCoreNavigation/CLLocationDirection.swift /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxCoreNavigation/MapboxCoreNavigation/ProcessInfo.swift /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxCoreNavigation/MapboxCoreNavigation/RouteStep.swift /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxCoreNavigation/MapboxCoreNavigation/SimulatedLocationManager.swift /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxCoreNavigation/MapboxCoreNavigation/NavigationLocationManager.swift /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxCoreNavigation/MapboxCoreNavigation/ReplayLocationManager.swift /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxCoreNavigation/MapboxCoreNavigation/TunnelIntersectionManager.swift /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxCoreNavigation/MapboxCoreNavigation/MMEEventsManager.swift /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxCoreNavigation/MapboxCoreNavigation/RouteController.swift /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxCoreNavigation/MapboxCoreNavigation/DistanceFormatter.swift /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxCoreNavigation/MapboxCoreNavigation/NavigationSettings.swift /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxCoreNavigation/MapboxCoreNavigation/BundleAdditions.swift /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxCoreNavigation/MapboxCoreNavigation/RouteOptions.swift /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxCoreNavigation/MapboxCoreNavigation/NavigationRouteOptions.swift /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxCoreNavigation/MapboxCoreNavigation/RouteProgress.swift /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxCoreNavigation/MapboxCoreNavigation/Constants.swift /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxCoreNavigation/MapboxCoreNavigation/Array.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.apinotesc /Users/Lorenzo/Desktop/EO18_2/Build/Products/Debug-iphonesimulator/Polyline/Polyline.framework/Modules/Polyline.swiftmodule/x86_64.swiftmodule /Users/Lorenzo/Desktop/EO18_2/Build/Products/Debug-iphonesimulator/Turf/Turf.framework/Modules/Turf.swiftmodule/x86_64.swiftmodule /Users/Lorenzo/Desktop/EO18_2/Build/Products/Debug-iphonesimulator/MapboxDirections.swift/MapboxDirections.framework/Modules/MapboxDirections.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/ObjectiveC.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreMedia.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/simd.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreImage.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/QuartzCore.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Metal.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreLocation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/AVFoundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreFoundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreAudio.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreGraphics.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/UIKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/MapKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/SwiftOnoneSupport.swiftmodule /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxMobileEvents/MapboxMobileEvents/NSData+MMEGZIP.h /Users/Lorenzo/Desktop/EO18_2/Pods/Target\ Support\ Files/Polyline/Polyline-umbrella.h /Users/Lorenzo/Desktop/EO18_2/Pods/Target\ Support\ Files/Turf/Turf-umbrella.h /Users/Lorenzo/Desktop/EO18_2/Pods/Target\ Support\ Files/MapboxCoreNavigation/MapboxCoreNavigation-umbrella.h /Users/Lorenzo/Desktop/EO18_2/Pods/Target\ Support\ Files/MapboxMobileEvents/MapboxMobileEvents-umbrella.h /Users/Lorenzo/Desktop/EO18_2/Pods/Target\ Support\ Files/MapboxDirections.swift/MapboxDirections.swift-umbrella.h /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxMobileEvents/MapboxMobileEvents/MMECommonEventData.h /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxMobileEvents/MapboxMobileEvents/MMEEventsService.h /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxMobileEvents/vendor/TrustKit/Pinning/TSKSPKIHashCache.h /Users/Lorenzo/Desktop/EO18_2/Pods/Polyline/Polyline/Polyline.h /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxMobileEvents/vendor/TrustKit/TSKPinningValidator_Private.h /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxDirections.swift/MapboxDirections/MBAttribute.h /Users/Lorenzo/Desktop/EO18_2/Pods/Turf/Sources/Turf/Turf.h /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxMobileEvents/vendor/TrustKit/TSKTrustKitConfig.h /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxMobileEvents/vendor/TrustKit/TSKLog.h /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxMobileEvents/vendor/TrustKit/TSKPinningValidatorCallback.h /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxMobileEvents/vendor/TrustKit/Pinning/TSKPublicKeyAlgorithm.h /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxMobileEvents/vendor/TrustKit/TSKTrustDecision.h /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxDirections.swift/MapboxDirections/MBLaneIndication.h /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxMobileEvents/MapboxMobileEvents/MMEUINavigation.h /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxCoreNavigation/MapboxCoreNavigation/MapboxCoreNavigation.h /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxMobileEvents/MapboxMobileEvents/MMEEventsConfiguration.h /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxMobileEvents/vendor/TrustKit/parse_configuration.h /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxMobileEvents/MapboxMobileEvents/MMECategoryLoader.h /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxMobileEvents/MapboxMobileEvents/MMELocationManager.h /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxMobileEvents/MapboxMobileEvents/MMETimerManager.h /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxMobileEvents/MapboxMobileEvents/MMEEventsManager.h /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxMobileEvents/MapboxMobileEvents/MMEDependencyManager.h /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxMobileEvents/MapboxMobileEvents/MMEEventLogger.h /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxMobileEvents/vendor/TrustKit/Pinning/ssl_pin_verifier.h /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxMobileEvents/MapboxMobileEvents/MMEUniqueIdentifier.h /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxMobileEvents/vendor/TrustKit/Reporting/vendor_identifier.h /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxCoreNavigation/MapboxCoreNavigation/MBRouteController.h /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxMobileEvents/MapboxMobileEvents/MMEEventLogReportViewController.h /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxMobileEvents/MapboxMobileEvents/MMENSDateWrapper.h /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxMobileEvents/MapboxMobileEvents/MMENSURLSessionWrapper.h /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxMobileEvents/MapboxMobileEvents/MMEUIApplicationWrapper.h /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxMobileEvents/MapboxMobileEvents/MMETrustKitWrapper.h /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxMobileEvents/vendor/TrustKit/Reporting/TSKReportsRateLimiter.h /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxMobileEvents/vendor/TrustKit/Reporting/TSKBackgroundReporter.h /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxMobileEvents/vendor/TrustKit/TSKPinningValidator.h /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxMobileEvents/MapboxMobileEvents/MMETypes.h /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxDirections.swift/MapboxDirections/MBRoadClasses.h /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxCoreNavigation/MapboxCoreNavigation/MBNavigationSettings.h /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxMobileEvents/vendor/TrustKit/Reporting/reporting_utils.h /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxMobileEvents/vendor/TrustKit/configuration_utils.h /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxDirections.swift/MapboxDirections/MapboxDirections.h /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxDirections.swift/MapboxDirections/MBRouteOptions.h /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxMobileEvents/MapboxMobileEvents/MMEConstants.h /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxMobileEvents/MapboxMobileEvents/CLLocation+MMEMobileEvents.h /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxMobileEvents/MapboxMobileEvents/MapboxMobileEvents.h /Users/Lorenzo/Desktop/EO18_2/Build/Products/Debug-iphonesimulator/Polyline/Polyline.framework/Headers/Polyline-Swift.h /Users/Lorenzo/Desktop/EO18_2/Build/Products/Debug-iphonesimulator/Turf/Turf.framework/Headers/Turf-Swift.h /Users/Lorenzo/Desktop/EO18_2/Build/Products/Debug-iphonesimulator/MapboxDirections.swift/MapboxDirections.framework/Headers/MapboxDirections-Swift.h /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxMobileEvents/vendor/TrustKit/TrustKit.h /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxMobileEvents/vendor/TrustKit/TSKPinningValidatorResult.h /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxMobileEvents/MapboxMobileEvents/MMEAPIClient.h /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxMobileEvents/MapboxMobileEvents/MMEEvent.h /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxMobileEvents/vendor/TrustKit/Reporting/TSKPinFailureReport.h /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxMobileEvents/MapboxMobileEvents/Reachability/MMEReachability.h /Users/Lorenzo/Desktop/EO18_2/Build/Intermediates/Pods.build/Debug-iphonesimulator/MapboxCoreNavigation.build/unextended-module.modulemap /Users/Lorenzo/Desktop/EO18_2/Build/Intermediates/Pods.build/Debug-iphonesimulator/Polyline.build/module.modulemap /Users/Lorenzo/Desktop/EO18_2/Build/Intermediates/Pods.build/Debug-iphonesimulator/Turf.build/module.modulemap /Users/Lorenzo/Desktop/EO18_2/Build/Intermediates/Pods.build/Debug-iphonesimulator/MapboxMobileEvents.build/module.modulemap /Users/Lorenzo/Desktop/EO18_2/Build/Intermediates/Pods.build/Debug-iphonesimulator/MapboxDirections.swift.build/module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/OpenGLES.framework/Headers/OpenGLES.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImage.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/QuartzCore.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/CoreLocation.framework/Headers/CoreLocation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/AVFoundation.framework/Headers/AVFoundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/WebKit.framework/Headers/WebKit.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/MapKit.framework/Headers/MapKit.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/AudioToolbox.framework/Headers/AudioToolbox.apinotes
/Users/Lorenzo/Desktop/EO18_2/Build/Intermediates/Pods.build/Debug-iphonesimulator/MapboxCoreNavigation.build/Objects-normal/x86_64/NavigationRouteOptions~partial.swiftmodule : /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxCoreNavigation/MapboxCoreNavigation/UIDevice.swift /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxCoreNavigation/MapboxCoreNavigation/Sequence.swift /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxCoreNavigation/MapboxCoreNavigation/Locale.swift /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxCoreNavigation/MapboxCoreNavigation/ScreenCapture.swift /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxCoreNavigation/MapboxCoreNavigation/Date.swift /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxCoreNavigation/MapboxCoreNavigation/String.swift /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxCoreNavigation/MapboxCoreNavigation/Feedback.swift /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxCoreNavigation/MapboxCoreNavigation/CLLocation.swift /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxCoreNavigation/MapboxCoreNavigation/CLLocationDirection.swift /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxCoreNavigation/MapboxCoreNavigation/ProcessInfo.swift /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxCoreNavigation/MapboxCoreNavigation/RouteStep.swift /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxCoreNavigation/MapboxCoreNavigation/SimulatedLocationManager.swift /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxCoreNavigation/MapboxCoreNavigation/NavigationLocationManager.swift /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxCoreNavigation/MapboxCoreNavigation/ReplayLocationManager.swift /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxCoreNavigation/MapboxCoreNavigation/TunnelIntersectionManager.swift /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxCoreNavigation/MapboxCoreNavigation/MMEEventsManager.swift /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxCoreNavigation/MapboxCoreNavigation/RouteController.swift /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxCoreNavigation/MapboxCoreNavigation/DistanceFormatter.swift /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxCoreNavigation/MapboxCoreNavigation/NavigationSettings.swift /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxCoreNavigation/MapboxCoreNavigation/BundleAdditions.swift /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxCoreNavigation/MapboxCoreNavigation/RouteOptions.swift /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxCoreNavigation/MapboxCoreNavigation/NavigationRouteOptions.swift /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxCoreNavigation/MapboxCoreNavigation/RouteProgress.swift /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxCoreNavigation/MapboxCoreNavigation/Constants.swift /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxCoreNavigation/MapboxCoreNavigation/Array.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.apinotesc /Users/Lorenzo/Desktop/EO18_2/Build/Products/Debug-iphonesimulator/Polyline/Polyline.framework/Modules/Polyline.swiftmodule/x86_64.swiftmodule /Users/Lorenzo/Desktop/EO18_2/Build/Products/Debug-iphonesimulator/Turf/Turf.framework/Modules/Turf.swiftmodule/x86_64.swiftmodule /Users/Lorenzo/Desktop/EO18_2/Build/Products/Debug-iphonesimulator/MapboxDirections.swift/MapboxDirections.framework/Modules/MapboxDirections.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/ObjectiveC.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreMedia.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/simd.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreImage.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/QuartzCore.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Metal.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreLocation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/AVFoundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreFoundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreAudio.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreGraphics.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/UIKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/MapKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/SwiftOnoneSupport.swiftmodule /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxMobileEvents/MapboxMobileEvents/NSData+MMEGZIP.h /Users/Lorenzo/Desktop/EO18_2/Pods/Target\ Support\ Files/Polyline/Polyline-umbrella.h /Users/Lorenzo/Desktop/EO18_2/Pods/Target\ Support\ Files/Turf/Turf-umbrella.h /Users/Lorenzo/Desktop/EO18_2/Pods/Target\ Support\ Files/MapboxCoreNavigation/MapboxCoreNavigation-umbrella.h /Users/Lorenzo/Desktop/EO18_2/Pods/Target\ Support\ Files/MapboxMobileEvents/MapboxMobileEvents-umbrella.h /Users/Lorenzo/Desktop/EO18_2/Pods/Target\ Support\ Files/MapboxDirections.swift/MapboxDirections.swift-umbrella.h /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxMobileEvents/MapboxMobileEvents/MMECommonEventData.h /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxMobileEvents/MapboxMobileEvents/MMEEventsService.h /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxMobileEvents/vendor/TrustKit/Pinning/TSKSPKIHashCache.h /Users/Lorenzo/Desktop/EO18_2/Pods/Polyline/Polyline/Polyline.h /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxMobileEvents/vendor/TrustKit/TSKPinningValidator_Private.h /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxDirections.swift/MapboxDirections/MBAttribute.h /Users/Lorenzo/Desktop/EO18_2/Pods/Turf/Sources/Turf/Turf.h /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxMobileEvents/vendor/TrustKit/TSKTrustKitConfig.h /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxMobileEvents/vendor/TrustKit/TSKLog.h /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxMobileEvents/vendor/TrustKit/TSKPinningValidatorCallback.h /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxMobileEvents/vendor/TrustKit/Pinning/TSKPublicKeyAlgorithm.h /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxMobileEvents/vendor/TrustKit/TSKTrustDecision.h /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxDirections.swift/MapboxDirections/MBLaneIndication.h /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxMobileEvents/MapboxMobileEvents/MMEUINavigation.h /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxCoreNavigation/MapboxCoreNavigation/MapboxCoreNavigation.h /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxMobileEvents/MapboxMobileEvents/MMEEventsConfiguration.h /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxMobileEvents/vendor/TrustKit/parse_configuration.h /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxMobileEvents/MapboxMobileEvents/MMECategoryLoader.h /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxMobileEvents/MapboxMobileEvents/MMELocationManager.h /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxMobileEvents/MapboxMobileEvents/MMETimerManager.h /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxMobileEvents/MapboxMobileEvents/MMEEventsManager.h /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxMobileEvents/MapboxMobileEvents/MMEDependencyManager.h /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxMobileEvents/MapboxMobileEvents/MMEEventLogger.h /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxMobileEvents/vendor/TrustKit/Pinning/ssl_pin_verifier.h /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxMobileEvents/MapboxMobileEvents/MMEUniqueIdentifier.h /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxMobileEvents/vendor/TrustKit/Reporting/vendor_identifier.h /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxCoreNavigation/MapboxCoreNavigation/MBRouteController.h /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxMobileEvents/MapboxMobileEvents/MMEEventLogReportViewController.h /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxMobileEvents/MapboxMobileEvents/MMENSDateWrapper.h /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxMobileEvents/MapboxMobileEvents/MMENSURLSessionWrapper.h /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxMobileEvents/MapboxMobileEvents/MMEUIApplicationWrapper.h /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxMobileEvents/MapboxMobileEvents/MMETrustKitWrapper.h /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxMobileEvents/vendor/TrustKit/Reporting/TSKReportsRateLimiter.h /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxMobileEvents/vendor/TrustKit/Reporting/TSKBackgroundReporter.h /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxMobileEvents/vendor/TrustKit/TSKPinningValidator.h /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxMobileEvents/MapboxMobileEvents/MMETypes.h /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxDirections.swift/MapboxDirections/MBRoadClasses.h /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxCoreNavigation/MapboxCoreNavigation/MBNavigationSettings.h /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxMobileEvents/vendor/TrustKit/Reporting/reporting_utils.h /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxMobileEvents/vendor/TrustKit/configuration_utils.h /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxDirections.swift/MapboxDirections/MapboxDirections.h /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxDirections.swift/MapboxDirections/MBRouteOptions.h /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxMobileEvents/MapboxMobileEvents/MMEConstants.h /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxMobileEvents/MapboxMobileEvents/CLLocation+MMEMobileEvents.h /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxMobileEvents/MapboxMobileEvents/MapboxMobileEvents.h /Users/Lorenzo/Desktop/EO18_2/Build/Products/Debug-iphonesimulator/Polyline/Polyline.framework/Headers/Polyline-Swift.h /Users/Lorenzo/Desktop/EO18_2/Build/Products/Debug-iphonesimulator/Turf/Turf.framework/Headers/Turf-Swift.h /Users/Lorenzo/Desktop/EO18_2/Build/Products/Debug-iphonesimulator/MapboxDirections.swift/MapboxDirections.framework/Headers/MapboxDirections-Swift.h /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxMobileEvents/vendor/TrustKit/TrustKit.h /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxMobileEvents/vendor/TrustKit/TSKPinningValidatorResult.h /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxMobileEvents/MapboxMobileEvents/MMEAPIClient.h /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxMobileEvents/MapboxMobileEvents/MMEEvent.h /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxMobileEvents/vendor/TrustKit/Reporting/TSKPinFailureReport.h /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxMobileEvents/MapboxMobileEvents/Reachability/MMEReachability.h /Users/Lorenzo/Desktop/EO18_2/Build/Intermediates/Pods.build/Debug-iphonesimulator/MapboxCoreNavigation.build/unextended-module.modulemap /Users/Lorenzo/Desktop/EO18_2/Build/Intermediates/Pods.build/Debug-iphonesimulator/Polyline.build/module.modulemap /Users/Lorenzo/Desktop/EO18_2/Build/Intermediates/Pods.build/Debug-iphonesimulator/Turf.build/module.modulemap /Users/Lorenzo/Desktop/EO18_2/Build/Intermediates/Pods.build/Debug-iphonesimulator/MapboxMobileEvents.build/module.modulemap /Users/Lorenzo/Desktop/EO18_2/Build/Intermediates/Pods.build/Debug-iphonesimulator/MapboxDirections.swift.build/module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/OpenGLES.framework/Headers/OpenGLES.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImage.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/QuartzCore.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/CoreLocation.framework/Headers/CoreLocation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/AVFoundation.framework/Headers/AVFoundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/WebKit.framework/Headers/WebKit.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/MapKit.framework/Headers/MapKit.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/AudioToolbox.framework/Headers/AudioToolbox.apinotes
/Users/Lorenzo/Desktop/EO18_2/Build/Intermediates/Pods.build/Debug-iphonesimulator/MapboxCoreNavigation.build/Objects-normal/x86_64/NavigationRouteOptions~partial.swiftdoc : /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxCoreNavigation/MapboxCoreNavigation/UIDevice.swift /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxCoreNavigation/MapboxCoreNavigation/Sequence.swift /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxCoreNavigation/MapboxCoreNavigation/Locale.swift /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxCoreNavigation/MapboxCoreNavigation/ScreenCapture.swift /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxCoreNavigation/MapboxCoreNavigation/Date.swift /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxCoreNavigation/MapboxCoreNavigation/String.swift /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxCoreNavigation/MapboxCoreNavigation/Feedback.swift /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxCoreNavigation/MapboxCoreNavigation/CLLocation.swift /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxCoreNavigation/MapboxCoreNavigation/CLLocationDirection.swift /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxCoreNavigation/MapboxCoreNavigation/ProcessInfo.swift /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxCoreNavigation/MapboxCoreNavigation/RouteStep.swift /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxCoreNavigation/MapboxCoreNavigation/SimulatedLocationManager.swift /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxCoreNavigation/MapboxCoreNavigation/NavigationLocationManager.swift /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxCoreNavigation/MapboxCoreNavigation/ReplayLocationManager.swift /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxCoreNavigation/MapboxCoreNavigation/TunnelIntersectionManager.swift /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxCoreNavigation/MapboxCoreNavigation/MMEEventsManager.swift /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxCoreNavigation/MapboxCoreNavigation/RouteController.swift /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxCoreNavigation/MapboxCoreNavigation/DistanceFormatter.swift /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxCoreNavigation/MapboxCoreNavigation/NavigationSettings.swift /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxCoreNavigation/MapboxCoreNavigation/BundleAdditions.swift /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxCoreNavigation/MapboxCoreNavigation/RouteOptions.swift /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxCoreNavigation/MapboxCoreNavigation/NavigationRouteOptions.swift /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxCoreNavigation/MapboxCoreNavigation/RouteProgress.swift /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxCoreNavigation/MapboxCoreNavigation/Constants.swift /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxCoreNavigation/MapboxCoreNavigation/Array.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.apinotesc /Users/Lorenzo/Desktop/EO18_2/Build/Products/Debug-iphonesimulator/Polyline/Polyline.framework/Modules/Polyline.swiftmodule/x86_64.swiftmodule /Users/Lorenzo/Desktop/EO18_2/Build/Products/Debug-iphonesimulator/Turf/Turf.framework/Modules/Turf.swiftmodule/x86_64.swiftmodule /Users/Lorenzo/Desktop/EO18_2/Build/Products/Debug-iphonesimulator/MapboxDirections.swift/MapboxDirections.framework/Modules/MapboxDirections.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/ObjectiveC.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreMedia.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/simd.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreImage.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/QuartzCore.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Metal.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreLocation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/AVFoundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreFoundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreAudio.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreGraphics.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/UIKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/MapKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/SwiftOnoneSupport.swiftmodule /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxMobileEvents/MapboxMobileEvents/NSData+MMEGZIP.h /Users/Lorenzo/Desktop/EO18_2/Pods/Target\ Support\ Files/Polyline/Polyline-umbrella.h /Users/Lorenzo/Desktop/EO18_2/Pods/Target\ Support\ Files/Turf/Turf-umbrella.h /Users/Lorenzo/Desktop/EO18_2/Pods/Target\ Support\ Files/MapboxCoreNavigation/MapboxCoreNavigation-umbrella.h /Users/Lorenzo/Desktop/EO18_2/Pods/Target\ Support\ Files/MapboxMobileEvents/MapboxMobileEvents-umbrella.h /Users/Lorenzo/Desktop/EO18_2/Pods/Target\ Support\ Files/MapboxDirections.swift/MapboxDirections.swift-umbrella.h /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxMobileEvents/MapboxMobileEvents/MMECommonEventData.h /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxMobileEvents/MapboxMobileEvents/MMEEventsService.h /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxMobileEvents/vendor/TrustKit/Pinning/TSKSPKIHashCache.h /Users/Lorenzo/Desktop/EO18_2/Pods/Polyline/Polyline/Polyline.h /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxMobileEvents/vendor/TrustKit/TSKPinningValidator_Private.h /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxDirections.swift/MapboxDirections/MBAttribute.h /Users/Lorenzo/Desktop/EO18_2/Pods/Turf/Sources/Turf/Turf.h /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxMobileEvents/vendor/TrustKit/TSKTrustKitConfig.h /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxMobileEvents/vendor/TrustKit/TSKLog.h /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxMobileEvents/vendor/TrustKit/TSKPinningValidatorCallback.h /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxMobileEvents/vendor/TrustKit/Pinning/TSKPublicKeyAlgorithm.h /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxMobileEvents/vendor/TrustKit/TSKTrustDecision.h /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxDirections.swift/MapboxDirections/MBLaneIndication.h /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxMobileEvents/MapboxMobileEvents/MMEUINavigation.h /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxCoreNavigation/MapboxCoreNavigation/MapboxCoreNavigation.h /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxMobileEvents/MapboxMobileEvents/MMEEventsConfiguration.h /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxMobileEvents/vendor/TrustKit/parse_configuration.h /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxMobileEvents/MapboxMobileEvents/MMECategoryLoader.h /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxMobileEvents/MapboxMobileEvents/MMELocationManager.h /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxMobileEvents/MapboxMobileEvents/MMETimerManager.h /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxMobileEvents/MapboxMobileEvents/MMEEventsManager.h /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxMobileEvents/MapboxMobileEvents/MMEDependencyManager.h /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxMobileEvents/MapboxMobileEvents/MMEEventLogger.h /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxMobileEvents/vendor/TrustKit/Pinning/ssl_pin_verifier.h /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxMobileEvents/MapboxMobileEvents/MMEUniqueIdentifier.h /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxMobileEvents/vendor/TrustKit/Reporting/vendor_identifier.h /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxCoreNavigation/MapboxCoreNavigation/MBRouteController.h /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxMobileEvents/MapboxMobileEvents/MMEEventLogReportViewController.h /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxMobileEvents/MapboxMobileEvents/MMENSDateWrapper.h /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxMobileEvents/MapboxMobileEvents/MMENSURLSessionWrapper.h /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxMobileEvents/MapboxMobileEvents/MMEUIApplicationWrapper.h /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxMobileEvents/MapboxMobileEvents/MMETrustKitWrapper.h /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxMobileEvents/vendor/TrustKit/Reporting/TSKReportsRateLimiter.h /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxMobileEvents/vendor/TrustKit/Reporting/TSKBackgroundReporter.h /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxMobileEvents/vendor/TrustKit/TSKPinningValidator.h /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxMobileEvents/MapboxMobileEvents/MMETypes.h /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxDirections.swift/MapboxDirections/MBRoadClasses.h /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxCoreNavigation/MapboxCoreNavigation/MBNavigationSettings.h /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxMobileEvents/vendor/TrustKit/Reporting/reporting_utils.h /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxMobileEvents/vendor/TrustKit/configuration_utils.h /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxDirections.swift/MapboxDirections/MapboxDirections.h /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxDirections.swift/MapboxDirections/MBRouteOptions.h /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxMobileEvents/MapboxMobileEvents/MMEConstants.h /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxMobileEvents/MapboxMobileEvents/CLLocation+MMEMobileEvents.h /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxMobileEvents/MapboxMobileEvents/MapboxMobileEvents.h /Users/Lorenzo/Desktop/EO18_2/Build/Products/Debug-iphonesimulator/Polyline/Polyline.framework/Headers/Polyline-Swift.h /Users/Lorenzo/Desktop/EO18_2/Build/Products/Debug-iphonesimulator/Turf/Turf.framework/Headers/Turf-Swift.h /Users/Lorenzo/Desktop/EO18_2/Build/Products/Debug-iphonesimulator/MapboxDirections.swift/MapboxDirections.framework/Headers/MapboxDirections-Swift.h /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxMobileEvents/vendor/TrustKit/TrustKit.h /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxMobileEvents/vendor/TrustKit/TSKPinningValidatorResult.h /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxMobileEvents/MapboxMobileEvents/MMEAPIClient.h /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxMobileEvents/MapboxMobileEvents/MMEEvent.h /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxMobileEvents/vendor/TrustKit/Reporting/TSKPinFailureReport.h /Users/Lorenzo/Desktop/EO18_2/Pods/MapboxMobileEvents/MapboxMobileEvents/Reachability/MMEReachability.h /Users/Lorenzo/Desktop/EO18_2/Build/Intermediates/Pods.build/Debug-iphonesimulator/MapboxCoreNavigation.build/unextended-module.modulemap /Users/Lorenzo/Desktop/EO18_2/Build/Intermediates/Pods.build/Debug-iphonesimulator/Polyline.build/module.modulemap /Users/Lorenzo/Desktop/EO18_2/Build/Intermediates/Pods.build/Debug-iphonesimulator/Turf.build/module.modulemap /Users/Lorenzo/Desktop/EO18_2/Build/Intermediates/Pods.build/Debug-iphonesimulator/MapboxMobileEvents.build/module.modulemap /Users/Lorenzo/Desktop/EO18_2/Build/Intermediates/Pods.build/Debug-iphonesimulator/MapboxDirections.swift.build/module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/OpenGLES.framework/Headers/OpenGLES.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImage.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/QuartzCore.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/CoreLocation.framework/Headers/CoreLocation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/AVFoundation.framework/Headers/AVFoundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/WebKit.framework/Headers/WebKit.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/MapKit.framework/Headers/MapKit.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/AudioToolbox.framework/Headers/AudioToolbox.apinotes
|
D
|
abused or oppressed by people in power
|
D
|
module hunt.xml.DocumentType;
enum DocumentType
{
UNKNOW = 0
}
|
D
|
/***********************************************************************\
* lmrepl.d *
* *
* Windows API header module *
* *
* Translated from MinGW Windows headers *
* *
* Placed into public domain *
\***********************************************************************/
module windows.lmrepl;
pragma(lib, "netapi32");
private import windows.lmcons, windows.windef;
const REPL_ROLE_EXPORT=1;
const REPL_ROLE_IMPORT=2;
const REPL_ROLE_BOTH=3;
const REPL_INTERVAL_INFOLEVEL = PARMNUM_BASE_INFOLEVEL+0;
const REPL_PULSE_INFOLEVEL = PARMNUM_BASE_INFOLEVEL+1;
const REPL_GUARDTIME_INFOLEVEL = PARMNUM_BASE_INFOLEVEL+2;
const REPL_RANDOM_INFOLEVEL = PARMNUM_BASE_INFOLEVEL+3;
const REPL_UNLOCK_NOFORCE=0;
const REPL_UNLOCK_FORCE=1;
const REPL_STATE_OK=0;
const REPL_STATE_NO_MASTER=1;
const REPL_STATE_NO_SYNC=2;
const REPL_STATE_NEVER_REPLICATED=3;
const REPL_INTEGRITY_FILE=1;
const REPL_INTEGRITY_TREE=2;
const REPL_EXTENT_FILE=1;
const REPL_EXTENT_TREE=2;
const REPL_EXPORT_INTEGRITY_INFOLEVEL = PARMNUM_BASE_INFOLEVEL+0;
const REPL_EXPORT_EXTENT_INFOLEVEL = PARMNUM_BASE_INFOLEVEL+1;
struct REPL_INFO_0 {
DWORD rp0_role;
LPWSTR rp0_exportpath;
LPWSTR rp0_exportlist;
LPWSTR rp0_importpath;
LPWSTR rp0_importlist;
LPWSTR rp0_logonusername;
DWORD rp0_interval;
DWORD rp0_pulse;
DWORD rp0_guardtime;
DWORD rp0_random;
}
alias REPL_INFO_0* PREPL_INFO_0, LPREPL_INFO_0;
struct REPL_INFO_1000 {
DWORD rp1000_interval;
}
alias REPL_INFO_1000* PREPL_INFO_1000, LPREPL_INFO_1000;
struct REPL_INFO_1001 {
DWORD rp1001_pulse;
}
alias REPL_INFO_1001* PREPL_INFO_1001, LPREPL_INFO_1001;
struct REPL_INFO_1002 {
DWORD rp1002_guardtime;
}
alias REPL_INFO_1002* PREPL_INFO_1002, LPREPL_INFO_1002;
struct REPL_INFO_1003 {
DWORD rp1003_random;
}
alias REPL_INFO_1003* PREPL_INFO_1003, LPREPL_INFO_1003;
struct REPL_EDIR_INFO_0 {
LPWSTR rped0_dirname;
}
alias REPL_EDIR_INFO_0* PREPL_EDIR_INFO_0, LPREPL_EDIR_INFO_0;
struct REPL_EDIR_INFO_1 {
LPWSTR rped1_dirname;
DWORD rped1_integrity;
DWORD rped1_extent;
}
alias REPL_EDIR_INFO_1* PREPL_EDIR_INFO_1, LPREPL_EDIR_INFO_1;
struct REPL_EDIR_INFO_2 {
LPWSTR rped2_dirname;
DWORD rped2_integrity;
DWORD rped2_extent;
DWORD rped2_lockcount;
DWORD rped2_locktime;
}
alias REPL_EDIR_INFO_2* PREPL_EDIR_INFO_2, LPREPL_EDIR_INFO_2;
struct REPL_EDIR_INFO_1000 {
DWORD rped1000_integrity;
}
alias REPL_EDIR_INFO_1000* PREPL_EDIR_INFO_1000, LPREPL_EDIR_INFO_1000;
struct REPL_EDIR_INFO_1001 {
DWORD rped1001_extent;
}
alias REPL_EDIR_INFO_1001* PREPL_EDIR_INFO_1001, LPREPL_EDIR_INFO_1001;
struct REPL_IDIR_INFO_0 {
LPWSTR rpid0_dirname;
}
alias REPL_IDIR_INFO_0* PREPL_IDIR_INFO_0, LPREPL_IDIR_INFO_0;
struct REPL_IDIR_INFO_1 {
LPWSTR rpid1_dirname;
DWORD rpid1_state;
LPWSTR rpid1_mastername;
DWORD rpid1_last_update_time;
DWORD rpid1_lockcount;
DWORD rpid1_locktime;
}
alias REPL_IDIR_INFO_1* PREPL_IDIR_INFO_1, LPREPL_IDIR_INFO_1;
extern (Windows) {
NET_API_STATUS NetReplGetInfo(LPCWSTR,DWORD,PBYTE*);
NET_API_STATUS NetReplSetInfo(LPCWSTR,DWORD,PBYTE,PDWORD);
NET_API_STATUS NetReplExportDirAdd(LPCWSTR,DWORD,PBYTE,PDWORD);
NET_API_STATUS NetReplExportDirDel(LPCWSTR,LPCWSTR);
NET_API_STATUS NetReplExportDirEnum(LPCWSTR,DWORD,PBYTE*,DWORD,PDWORD,PDWORD,PDWORD);
NET_API_STATUS NetReplExportDirGetInfo(LPCWSTR,LPCWSTR,DWORD,PBYTE*);
NET_API_STATUS NetReplExportDirSetInfo(LPCWSTR,LPCWSTR,DWORD,PBYTE,PDWORD);
NET_API_STATUS NetReplExportDirLock(LPCWSTR,LPCWSTR);
NET_API_STATUS NetReplExportDirUnlock(LPCWSTR,LPCWSTR,DWORD);
NET_API_STATUS NetReplImportDirAdd(LPCWSTR,DWORD,PBYTE,PDWORD);
NET_API_STATUS NetReplImportDirDel(LPCWSTR,LPCWSTR);
NET_API_STATUS NetReplImportDirEnum(LPCWSTR,DWORD,PBYTE*,DWORD,PDWORD,PDWORD,PDWORD);
NET_API_STATUS NetReplImportDirGetInfo(LPCWSTR,LPCWSTR,DWORD,PBYTE*);
NET_API_STATUS NetReplImportDirLock(LPCWSTR,LPCWSTR);
NET_API_STATUS NetReplImportDirUnlock(LPCWSTR,LPCWSTR,DWORD);
}
|
D
|
module diskuto.internal.webutils;
import diskuto.backend : CommentStatus, DiskutoBackend, StoredComment;
import diskuto.userstore : StoredUser;
import diskuto.web : DiskutoWeb;
import vibe.http.server : HTTPServerRequest;
import std.algorithm.comparison : max;
import std.datetime : SysTime;
import core.time : Duration, msecs;
enum SessionVars {
userID = "diskuto.userID",
name = "diskuto.name",
email = "diskuto.email",
website = "diskuto.website",
lastPost = "diskuto.lastPost"
}
struct Comment {
StoredComment comment;
alias comment this;
Duration age;
string avatarID;
int avatarWidth;
int avatarHeight;
Comment*[] replies;
this(StoredComment comment, SysTime now)
{
this.comment = comment;
this.age = max(now - comment.time, 1.msecs);
this.avatarWidth = 48;
this.avatarHeight = 48;
this.avatarID = comment.email.length ? comment.email : comment.author ~ "@diskuto";
}
bool isVisibleTo(StoredComment.UserID user)
{
//if (isModerator(user)) return true;
if (comment.status == CommentStatus.deleted) return false;
if (comment.author == user) return true;
return comment.status == CommentStatus.active;
}
}
struct User {
StoredUser user;
alias user this;
bool registered;
}
auto getCommentsContext(HTTPServerRequest req, DiskutoWeb web, string topic)
{
import diskuto.backend : StoredComment;
import std.datetime : Clock, UTC;
import std.algorithm.searching : count;
import std.algorithm.sorting : sort;
auto backend = web.backend;
static struct Info {
size_t commentCount;
Comment*[] comments;
User user;
}
SysTime now = Clock.currTime(UTC());
Info ret;
if (topic.length) {
auto dbcomments = backend.getCommentsForTopic(topic);
auto comments = new Comment[](dbcomments.length);
size_t curidx;
ret.commentCount = dbcomments.count!(c => c.status == CommentStatus.active);
size_t[StoredComment.ID] map;
foreach (c; dbcomments) {
auto idx = curidx++;
map[c.id] = idx;
comments[idx] = Comment(c, now);
}
foreach (ref c; comments) {
if (!c.replyTo.length) ret.comments ~= &c;
else {
if (auto rti = c.replyTo in map)
comments[*rti].replies ~= &c;
}
}
static double getScore(Comment* c) {
// basic sortig based on the ratio of up and downvotes
double score = (c.upvotes.length + 1.0) / (c.downvotes.length + 1.0);
// new comments get a boost for about two hours (and comments
// with the same basic score will stay sorted by time)
// negative comments will only get a boost for around an hour
if (score < 1.0) score += 0.5 / (c.age.total!"seconds" / (60.0 * 60));
else score += 0.5 / (c.age.total!"seconds" / (2.0 * 60 * 60));
return score;
}
void sortRec(Comment*[] comments)
{
comments.sort!((a, b) => getScore(a) > getScore(b));
foreach (c; comments)
sortRec(c.replies);
}
sortRec(ret.comments);
}
if (req.session) {
ret.user.id = web.uid;
ret.user.name = req.session.get!string(SessionVars.name, null);
ret.user.email = req.session.get!string(SessionVars.email, null);
ret.user.website = req.session.get!string(SessionVars.website, null);
}
if (web.settings.userStore) {
auto u = web.settings.userStore.getLoggedInUser(req);
if (!u.isNull) {
ret.user = u;
ret.user.registered = true;
}
}
return ret;
}
|
D
|
module commandr.completion.bash;
import commandr.program;
import commandr.option;
import std.algorithm : map, filter;
import std.array : Appender, join;
import std.string : format;
import std.range : empty, chain;
/**
* Creates bash completion script.
*
* Creates completion script for specified program, returning the script contents.
* You need to create it once, and save the script in directory like
* `/etc/bash_completion.d/` during installation.
*
* Params:
* program - Program to create completion script.
*
* Returns:
* Generated completion script contents.
*
* Examples:
* ---
* import std.file : write;
* import std.string : format;
* import commandr;
*
* auto prog = new Program("test");
* std.file.write("%s.bash".format(prog.binaryName), createBashCompletionScript(prog));
* ---
*/
string createBashCompletionScript(Program program) {
Appender!string builder;
builder ~= "#!/usr/bin/env bash\n";
builder ~= "# This file is autogenerated. DO NOT EDIT.\n";
builder ~= `
__get_args() {
local max opts args name arg i count
max=$1; shift
opts=$1; shift
args=($@)
let i=0
let count=0
while [ $i -le ${#args[@]} ]; do
arg=${args[i]}
name="${arg%=*}"
if [[ $name = -* ]]; then
if [[ " $opts " = *"$name"* ]]; then
if ! [[ $name = *"="* ]]; then
let i+=1
fi
fi
else
let count+=1
echo $arg
fi
let i+=1
[ $count -ge $max ] && break
done
return $i
}
__function_exists() {
declare -f -F $1 > /dev/null
return $?
}
`;
// works by creating completion functions for commands recursively
completionFunc(program, builder);
builder ~= "complete -F _%s_completion_main %s\n".format(program.binaryName, program.binaryName);
return builder.data;
}
private void completionFunc(Command command, Appender!string builder) {
foreach(command; command.commands) {
completionFunc(command, builder);
}
auto argumentCount = command.arguments.length;
auto commands = command.commands.keys.join(" ");
auto shorts = command.abbrevations.map!(s => "-" ~ s);
auto longs = command.fullNames.map!(l => "--" ~ l);
auto options = command.options
.map!(o => [o.abbrev ? "-" ~ o.abbrev : null, o.full ? "--" ~ o.full : null])
.join().filter!`a && a.length`.join(" ");
builder ~= "_%s_completion() {\n".format(command.chain.join("_"));
builder ~= " local args target\n\n";
builder ~= " __args=( $(__get_args %s \"%s\" \"${COMP_WORDS[@]:__args_start}\") )\n"
.format(argumentCount + command.commands.length ? 1 : 0, options);
builder ~= " args=$?\n\n";
builder ~= " if [ $COMP_CWORD -lt $(( $__args_start + $args )) ]; then\n";
builder ~= " if [[ \"$curr\" = -* ]]; then\n";
builder ~= " COMPREPLY=( $(compgen -W \"%s\" -- \"$curr\") )\n".format(chain(shorts, longs).join(" "));
if (command.commands.length > 0) {
builder ~= " elif [ ${#__args[@]} -ge %s ]; then\n".format(command.arguments.length);
builder ~= " COMPREPLY=( $(compgen -W \"%s\" -- \"$curr\") )\n".format(commands);
builder ~= " fi\n";
builder ~= " elif [ ${#__args[@]} -gt 0 ] && [[ \" %s \" = *\" ${__args[@]: -1:1} \"* ]]; then\n".format(commands);
builder ~= " target=\"_%s_${__args[@]: -1:1}_completion\"\n".format(command.chain.join("_"));
builder ~= " let __args_start+=$args\n";
builder ~= " __function_exists $target && $target\n";
}
else {
builder ~= " fi\n";
}
builder ~= " fi\n";
builder ~= "}\n\n";
}
private void completionFunc(Program program, Appender!string builder) {
foreach(command; program.commands) {
completionFunc(command, builder);
}
completionFunc(cast(Command)program, builder);
builder ~= "_%s_completion_main() {\n".format(program.binaryName);
builder ~= " COMPREPLY=()\n";
builder ~= " __args_start=1\n";
builder ~= " curr=${COMP_WORDS[COMP_CWORD]}\n";
builder ~= " prev=${COMP_WORDS[COMP_CWORD-1]}\n\n";
builder ~= " _%s_completion\n".format(program.binaryName);
builder ~= " unset __args __args_start curr prev\n";
builder ~= "}\n\n";
}
|
D
|
module farfadet.gui.previewer;
import std.conv: to;
import atelier;
import farfadet.common;
class PreviewerGui: GuiElement {
private {
TabData _currentTabData;
Sprite _sprite;
Animation _animation;
NinePatch _ninePatch;
Texture _texture;
Animation.Mode _animMode = Animation.Mode.loop;
Vec4i _clip;
//Tileset specific data
int _columns = 1, _lines = 1, _maxtiles;
int _marginX, _marginY;
float _duration = 1f;
}
//General data
ElementType type;
Flip flip;
Vec4i clip(Vec4i v) {
_clip = v;
makeAnimation();
return _clip;
}
int columns(int v) {
_columns = v;
makeAnimation();
return _columns;
}
int lines(int v) {
_lines = v;
makeAnimation();
return _lines;
}
int maxtiles(int v) {
_maxtiles = v;
makeAnimation();
return _maxtiles;
}
int marginX(int v) {
_marginX = v;
makeAnimation();
return _marginX;
}
int marginY(int v) {
_marginY = v;
makeAnimation();
return _marginY;
}
private void makeAnimation() {
_animation.frames.length = 0uL;
int count;
for(int y; y < _lines; y ++) {
for(int x; x < _columns; x ++) {
Vec4i currentClip = Vec4i(
_clip.x + x * (_clip.z + _marginX),
_clip.y + y * (_clip.w + _marginY),
_clip.z,
_clip.w);
_animation.frames ~= currentClip;
if(_maxtiles > 0) {
count ++;
if(count >= _maxtiles)
return;
}
}
}
}
float duration(float v) {
_duration = v;
if(_duration <= 0)
_duration = 1f;
return _duration;
}
//NinePatch specific data
int top, bottom, left, right;
Slider playbackSpeedSlider;
bool isActive;
@property {
Animation.Mode animMode(Animation.Mode mode) {
if(_animMode == mode)
return _animMode;
_animMode = mode;
final switch(_animMode) with(Animation.Mode) {
case once:
case loop:
_animation.mode = Animation.Mode.loop;
break;
case reverse:
case loopReverse:
_animation.mode = Animation.Mode.loopReverse;
break;
case bounce:
_animation.mode = Animation.Mode.bounce;
break;
case bounceReverse:
_animation.mode = Animation.Mode.bounceReverse;
break;
}
return _animMode;
}
}
this() {
size(Vec2f.one * 300f);
_sprite = new Sprite;
_animation = new Animation;
_animation.mode = _animMode;
_animation.start();
_ninePatch = new NinePatch;
_ninePatch.size = size;
}
override void onCallback(string id) {
if(id == "speed") {
_animation.duration = 1f / playbackSpeedSlider.fvalue;
}
}
override void update(float deltaTime) {
if(type == ElementType.animation) {
_animation.duration = _duration;
}
if(_sprite !is null) {
_sprite.flip = flip;
_sprite.clip = _clip;
_sprite.size = size;
}
if(_animation !is null) {
_animation.flip = flip;
_animation.size = size;
_animation.update(deltaTime);
}
if(_ninePatch !is null) {
_ninePatch.clip = _clip;
_ninePatch.top = top;
_ninePatch.bottom = bottom;
_ninePatch.left = left;
_ninePatch.right = right;
}
}
override void draw() {
if(!isActive)
return;
if(_texture is null)
return;
final switch(type) with(ElementType) {
case sprite:
_sprite.fit(size);
_sprite.draw(center);
break;
case borderedBrush:
_sprite.fit(size);
_sprite.draw(center);
break;
case borderlessBrush:
_sprite.fit(size);
_sprite.draw(center);
break;
case animation:
case tileset:
if(_animation.frames.length)
_animation.size = to!Vec2f(_animation.frames[0].zw).fit(size);
_animation.draw(center);
break;
case ninepatch:
_ninePatch.draw(center);
break;
}
}
override void drawOverlay() {
drawRect(origin, size, Color.white);
}
void reload() {
if(hasTab()) {
auto tabData = getCurrentTab();
if(_currentTabData && _currentTabData != tabData) {
_currentTabData.hasPreviewerData = true;
_currentTabData.previewerSpeed = playbackSpeedSlider.fvalue;
}
_currentTabData = tabData;
playbackSpeedSlider.fvalue = tabData.hasPreviewerData ? _currentTabData.previewerSpeed : 0f;
_texture = _currentTabData.texture;
_sprite.texture = _texture;
_animation.texture = _texture;
_ninePatch.texture = _texture;
}
else {
isActive = false;
}
}
int getCurrentAnimFrame() {
return _animation.currentFrameID;
}
}
|
D
|
/**
* Unit test helper
*
* Copyright:
* (C) 2014-2015 Jack Lloyd
* (C) 2014-2015 Etienne Cimon
*
* License:
* Botan is released under the Simplified BSD License (see LICENSE.md)
*/
module botan.test;
import botan.constants;
//static if (BOTAN_TEST):
public import std.stdio : File, writeln;
public import std.algorithm : sort, canFind;
public import std.range : walkLength;
public import std.string : indexOf, lastIndexOf;
public import botan.utils.types;
private import botan.libstate.libstate;
import memutils.hashmap;
import std.file;
import std.array;
import std.exception;
import std.datetime.stopwatch : StopWatch;
import std.datetime.date;
import std.datetime.interval;
@property bool ok(File f) { return f.isOpen && !f.eof() && !f.error(); }
string CHECK_MESSAGE (string expr, string print) {
return "
{
import core.atomic : atomicOp;
static if (is(typeof(total_tests) == shared)) atomicOp!`+=`(total_tests, cast(size_t) 1);
else total_tests++;
try {
if (!(" ~ expr ~ ")) {
++fails;
logError( `" ~ print ~ "` );
}
}
catch(Exception e)
{
logError(__FUNCTION__, ` : ` ~ e.msg);
}
}";
}
string CHECK (string expr) {
return `
{
import core.atomic : atomicOp;
static if (is(typeof(total_tests) == shared)) atomicOp!"+="(total_tests, cast(size_t) 1);
else total_tests++;
mixin( q{
bool success = ` ~ expr ~ `;
} );
try {
if (!success)
{ ++fails; logError( q{ ` ~ expr ~ ` } ); }
}
catch(Exception e)
{
logError(__FUNCTION__ ~ " : " ~ e.msg);
}
}`;
}
string[] listDir(string dir_path)
{
auto dirfiles = dirEntries(dir_path, "*.vec", SpanMode.depth);
string[] files;
foreach(file; dirfiles) {
files ~= file.name;
}
files.sort();
return files;
}
StopWatch g_sw;
size_t runTestsInDir(string dir, size_t delegate(string) fn)
{
assert(exists(cast(char[])dir), "Directory `" ~ dir ~ "` does not exist");
logTrace("Running tests for directory: " ~ dir);
import std.parallelism;
import core.atomic;
shared(size_t) shared_fails;
auto dirs = listDir(dir);
foreach (vec; dirs) {
size_t local_fails = fn(vec);
if (local_fails > 0) {
assert(false);
}
atomicOp!"+="(shared_fails, local_fails);
}
return cast(size_t)atomicLoad(shared_fails);
}
void testReport(string name, size_t ran, size_t failed)
{
static long last_msecs;
if (failed)
logError(name, " ... ", failed, " / ", ran, " ************** FAILED ****************");
else
logDebug(name, " ... PASSED (all of ", ran, " tests in ", g_sw.peek().total!"msecs" - last_msecs, " msecs)");
last_msecs = g_sw.peek().total!"msecs";
}
size_t runTestsBb(ref File src,
string name_key,
string output_key,
bool clear_between_cb,
size_t delegate(ref HashMap!(string, string)) cb)
{
if (src.eof || src.error)
{
logError("Could not open input file for " ~ name_key);
return 1;
}
if (!g_sw.running)
g_sw.start();
HashMap!(string, string) vars;
vars[name_key] = name_key;
size_t test_fails = 0, algo_fail = 0;
size_t test_count = 0, algo_count = 0;
string fixed_name = name_key;
string line;
while(!src.eof && !src.error)
{
line = src.readln();
if (line.length > 0)
line = line[0 .. $-1];
if (line.length == 0)
continue;
if (line[0] == '#')
continue;
if (line[0] == '[' && line[$-1] == ']')
{
if (fixed_name != "" && algo_count > 0)
testReport(fixed_name, algo_count, algo_fail);
test_count += algo_count;
test_fails += algo_fail;
algo_count = 0;
algo_fail = 0;
fixed_name = line[1 .. $ - 1];
vars[name_key] = fixed_name;
continue;
}
import std.string : strip;
if (line.indexOf('=') == -1) continue;
assert(line[line.indexOf('=') - 1] == ' ' && line[line.indexOf('=') + 1] == ' ', "= must be wrapped with spaces");
const string key = line[0 .. line.indexOf('=') - 1].strip;
const string val = line[line.indexOf('=') + 2 .. $].strip;
vars[key] = val;
if (key == name_key)
fixed_name.length = 0;
if (key == output_key)
{
++algo_count;
try
{
const size_t fails = cb(vars);
if (fails)
{
logError(vars[name_key] ~ " test ", algo_count, " : ", fails, " failure");
algo_fail += fails;
}
}
catch(Exception e)
{
logError(vars[name_key] ~ " test ", algo_count, " failed: " ~ e.msg);
++algo_fail;
assert(false);
}
if (clear_between_cb)
{
vars.clear();
vars[name_key] = fixed_name;
}
}
}
test_count += algo_count;
test_fails += algo_fail;
if (fixed_name != "" && (algo_count > 0 || algo_fail > 0))
testReport(fixed_name, algo_count, algo_fail);
else
testReport(name_key, test_count, test_fails);
return test_fails;
}
size_t runTests(string filename,
string name_key,
string output_key,
bool clear_between_cb,
string delegate(ref HashMap!(string, string)) cb)
{
File vec = File(filename, "r");
if (vec.error || vec.eof)
{
logError("Failure opening " ~ filename);
return 1;
}
return runTests(vec, name_key, output_key, clear_between_cb, cb);
}
size_t runTests(ref File src,
string name_key,
string output_key,
bool clear_between_cb,
string delegate(ref HashMap!(string, string)) cb)
{
return runTestsBb(src, name_key, output_key, clear_between_cb,
(ref HashMap!(string, string) vars)
{
const string got = cb(vars);
if (got != vars[output_key])
{
logTrace(name_key ~ ' ' ~ vars[name_key] ~ " got " ~ got ~ " expected " ~ vars[output_key]);
return 1;
}
return 0;
});
}
|
D
|
instance GRD_5029_GARDIST(Npc_Default)
{
name[0] = NAME_Gardist;
npcType = npctype_guard;
guild = GIL_GRD;
level = 15;
voice = 6;
id = 5028;
attribute[ATR_STRENGTH] = 80;
attribute[ATR_DEXTERITY] = 60;
attribute[ATR_MANA_MAX] = 0;
attribute[ATR_MANA] = 0;
attribute[ATR_HITPOINTS_MAX] = 190;
attribute[ATR_HITPOINTS] = 190;
Mdl_SetVisual(self,"HUMANS.MDS");
Mdl_ApplyOverlayMds(self,"Humans_Militia.mds");
Mdl_SetVisualBody(self,"hum_body_Naked0",0,3,"Hum_Head_Bald",4,2,grd_armor_l);
B_Scale(self);
Mdl_SetModelFatness(self,0);
fight_tactic = FAI_HUMAN_Strong;
Npc_SetTalentSkill(self,NPC_TALENT_1H,2);
Npc_SetTalentSkill(self,NPC_TALENT_2H,1);
Npc_SetTalentSkill(self,NPC_TALENT_CROSSBOW,1);
CreateInvItem(self,ItMw_1H_Sword_02);
CreateInvItem(self,ItRw_Crossbow_01);
CreateInvItems(self,ItAmBolt,30);
CreateInvItem(self,ItFoCheese);
CreateInvItem(self,ItFoApple);
CreateInvItems(self,ItMiNugget,10);
CreateInvItem(self,ItLsTorch);
daily_routine = rtn_start_5029;
};
func void rtn_start_5029()
{
TA_StandAround(22,0,6,0,"WP_INTRO_NEW_03");
TA_Smalltalk(6,0,22,0,"OW_START_GRD_SMALLTALK");
};
|
D
|
INSTANCE Mod_7119_ASS_Masut_NW (Npc_Default)
{
// ------ NSC ------
name = "Masut";
guild = GIL_OUT;
id = 7119;
voice = 0;
flags = 0;
npctype = NPCTYPE_MAIN;
// ------ Attribute ------
B_SetAttributesToChapter (self, 4);
// ------ Kampf-Taktik ------
fight_tactic = FAI_HUMAN_NORMAL;
// ------ Equippte Waffen ------
EquipItem (self, ItMw_Assassinenkralle);
EquipItem (self, ItRw_Todesbogen);
// ------ Inventory ------
B_CreateAmbientInv (self);
// ------ visuals ------
B_SetNpcVisual (self, MALE, "Hum_Head_Bald", Face_B_Normal_Sharky, BodyTex_B,ITAR_Assassine_01);
Mdl_SetModelFatness (self,0);
//Mdl_ApplyOverlayMds (self, "Humans_Relaxed.mds");
// ------ NSC-relevante Talente vergeben ------
B_GiveNpcTalents (self);
// ------ Kampf-Talente ------
B_SetFightSkills (self, 50);
// ------ TA anmelden ------
daily_routine = Rtn_Start_7119;
};
FUNC VOID Rtn_Start_7119()
{
TA_Smalltalk (07,20,01,20,"WP_ASSASSINE_25");
TA_Smalltalk (01,20,07,20,"WP_ASSASSINE_25");
};
FUNC VOID Rtn_Schlacht_7119()
{
TA_Stand_Guarding (07,20,01,20,"WP_ASSASSINE_51");
TA_Stand_Guarding (01,20,07,20,"WP_ASSASSINE_51");
};
FUNC VOID Rtn_Tot_7119()
{
TA_Stand_Guarding (07,20,01,20,"TOT");
TA_Stand_Guarding (01,20,07,20,"TOT");
};
|
D
|
/**
This module contains the engine behind Pegged, the expression templates building blocks to create a top-down
recursive-descent parser.
The terminals and non-terminals described here are meant to be used inside a Pegged grammar.
As such, they are a bit less user-friendly than what's output by pegged.grammar.
For example they take a ParseTree as input, not a string.
See the /docs directory for the full documentation as markdown files.
*/
module pegged.peg;
/*
NOTE:
Do not use the GrammarTester for unittesting in this module. This module needs
to be able to pass its unittests before the GrammarTester is even trustable.
Writing tests the long way is preferred here, as it will avoid the circular
dependency.
*/
import std.algorithm: equal, map, startsWith;
import std.uni : isAlpha, icmp;
import std.array;
import std.conv;
import std.string: strip;
import std.typetuple;
package string stringified(string inp)
{
import std.format : format;
return format(`%(%s%)`, (&inp)[0..1]);
}
version (tracer)
{
import std.experimental.logger;
import std.algorithm.comparison : min;
// Function pointers.
private static bool function(string ruleName, const ref ParseTree p) traceConditionFunction;
private static bool delegate(string ruleName, const ref ParseTree p) traceConditionDelegate;
private static int traceLevel;
private static bool traceBlocked;
private static bool logTraceLevel = false;
private void incTraceLevel()
{
if (!__ctfe)
traceLevel++;
}
private void decTraceLevel()
{
if (!__ctfe)
traceLevel--;
}
private bool shouldTrace(string ruleName, const ref ParseTree p)
{
if (__ctfe || traceBlocked)
return false;
if (traceConditionDelegate != null)
return traceConditionDelegate(ruleName, p);
if (traceConditionFunction != null)
return traceConditionFunction(ruleName, p);
return false;
}
static this()
{
traceLevel = 0;
traceNothing();
traceBlocked = false;
}
/++ Supply a function to dynamically switch tracing on and off based on the rule name.
+
+ Example:
+ ---
+ /* Exclude build-in parsers, only trace parsers generated from MyGrammar. */
+ setTraceConditionFunction(ruleName => ruleName.startsWith("MyGrammar"));
+ ---
+/
void setTraceConditionFunction(bool delegate(string ruleName, const ref ParseTree p) condition)
{
traceConditionDelegate = condition;
traceConditionFunction = null;
}
/// ditto
void setTraceConditionFunction(bool function(string ruleName, const ref ParseTree p) condition)
{
traceConditionFunction = condition;
traceConditionDelegate = null;
}
/** Trace all rules.
*
* This can produce a lot of output.
*/
void traceAll()
{
setTraceConditionFunction(function(string ruleName, const ref ParseTree p) {return true;});
}
/** Do not trace any rules. */
void traceNothing()
{
traceConditionFunction = null;
traceConditionDelegate = null;
}
private string traceMsg(ParseTree p, string expression, string name)
{
import std.format;
Position pos = position(p);
enum inputLength = 15;
string result;
for (auto i = 1; i <= traceLevel; i++)
result ~= format("%d|", i);
result ~= format(" (l:%d, c:%d, i:%d)\t", pos.line + 1, pos.col + 1, pos.index) ~
expression.stringified ~ " considering rule " ~ name.stringified ~ " on " ~
p.input[p.end .. min(p.input.length, p.end + inputLength)].stringified ~
(p.end + inputLength > p.input.length ? "" : "...");
return result;
}
private string traceResultMsg(ParseTree p, string name)
{
import std.format;
import std.range: chain;
import std.algorithm.iteration: joiner;
Position pos = position(p);
enum inputLength = 15;
string result;
for (auto i = 1; i <= traceLevel; i++)
result ~= format("%d|", i);
if (p.successful)
{
string consumed;
foreach (match; p.matches)
consumed ~= match;
result ~= format(" (l:%d, c:%d, i:%d)\t", pos.line + 1, pos.col + 1, pos.index) ~ name.stringified ~ " SUCCEEDED on " ~
consumed.stringified;
}
else
result ~= format(" (l:%d, c:%d, i:%d)\t", pos.line + 1, pos.col + 1, pos.index) ~ name.stringified ~ " FAILED on " ~
p.input[p.end .. min(p.input.length, p.end + inputLength)].stringified ~
(p.end + inputLength > p.input.length ? "" : "...");
return result;
}
/**
Overrides FileLogger to remove the time stamp.
Example:
---
sharedLog = new TraceLogger("TraceLog.txt");
---
*/
class TraceLogger : FileLogger
{
this(in string fn) @safe
{
super(fn);
}
import std.concurrency : Tid;
import std.datetime : SysTime;
override protected void beginLogMsg(string file, int line, string funcName,
string prettyFuncName, string moduleName, LogLevel logLevel,
Tid threadId, SysTime timestamp, Logger logger)
@safe
{
}
}
}
/**
CT Switch for testing 'keywords' implementations
*/
enum
{
IFCHAIN,
TRIE
}
enum KEYWORDS = IFCHAIN;
/**
The basic parse tree, as used throughout the project.
You can define your own parse tree node, but respect the basic layout.
*/
struct ParseTree
{
string name; /// The node name
bool successful; /// Indicates whether a parsing was successful or not
string[] matches; /// The matched input's parts. Some expressions match at more than one place, hence matches is an array.
string input; /// The input string that generated the parse tree. Stored here for the parse tree to be passed to other expressions, as input.
size_t begin, end; /// Indices for the matched part (from the very beginning of the first match to the last char of the last match.
ParseTree[] children; /// The sub-trees created by sub-rules parsing.
/**
Basic toString for easy pretty-printing.
*/
string toString(string tabs = "") const
{
string result = name;
string childrenString;
bool allChildrenSuccessful = true;
foreach(i,child; children)
{
childrenString ~= tabs ~ " +-" ~ child.toString(tabs ~ ((i < children.length -1 ) ? " | " : " "));
if (!child.successful)
allChildrenSuccessful = false;
}
if (successful)
{
result ~= " " ~ to!string([begin, end]) ~ to!string(matches) ~ "\n";
}
else // some failure info is needed
{
if (allChildrenSuccessful) // no one calculated the position yet
{
Position pos = position(this);
string left, right;
if (pos.index < 10)
left = input[0 .. pos.index];
else
left = input[pos.index-10 .. pos.index];
//left = strip(left);
if (pos.index + 10 < input.length)
right = input[pos.index .. pos.index + 10];
else
right = input[pos.index .. $];
//right = strip(right);
result ~= " failure at line " ~ to!string(pos.line) ~ ", col " ~ to!string(pos.col) ~ ", "
~ (left.length > 0 ? "after " ~ left.stringified ~ " " : "")
~ "expected "~ (matches.length > 0 ? matches[$-1].stringified : "NO MATCH")
~ ", but got " ~ right.stringified ~ "\n";
}
else
{
result ~= " (failure)\n";
}
}
return result ~ childrenString;
}
@property string failMsg()
{
foreach(i, child; children)
{
if (!child.successful)
return child.failMsg;
}
if (!successful)
{
Position pos = position(this);
string left, right;
if (pos.index < 10)
left = input[0 .. pos.index];
else
left = input[pos.index - 10 .. pos.index];
if (pos.index + 10 < input.length)
right = input[pos.index .. pos.index + 10];
else
right = input[pos.index .. $];
return "Failure at line " ~ to!string(pos.line) ~ ", col " ~ to!string(pos.col) ~ ", "
~ (left.length > 0 ? "after " ~ left.stringified ~ " " : "")
~ "expected " ~ (matches.length > 0 ? matches[$ - 1].stringified : "NO MATCH")
~ `, but got ` ~ right.stringified;
}
return "Success";
}
ParseTree dup() @property
{
ParseTree result = this;
result.matches = result.matches.dup;
result.children = map!(p => p.dup)(result.children).array();
return result;
}
}
unittest // ParseTree testing
{
ParseTree p;
assert(p == p, "Self-identity on null tree.");
p = ParseTree("Name", true, ["abc", "", "def"], "input", 0, 1, null);
assert(p == p, "Self identity on non-null tree.");
ParseTree child = ParseTree("Child", true, ["abc", "", "def"], "input", 0, 1, null);
p.children = [child, child];
ParseTree q = p;
assert(p == q, "Copying creates equal trees.");
assert(p.children == q.children);
p.children = [child, child, child];
assert(q.children != p.children, "Disconnecting children.");
p = ParseTree("Name", true, ["abc", "", "def"], "input", 0, 1, null);
p.children = [child, child];
q = p.dup;
assert(p == q, "Dupping creates equal trees.");
assert(p.children == q.children, "Equal children for dupped trees.");
p.children = null;
assert(q.children != p.children);
q.children = [p,p];
assert(p != q, "Tree with different children are not equal.");
p.children = [p,p];
assert(p == q, "Adding equivalent children is OK.");
p.matches = null;
assert(p != q, "Nulling matches makes trees unequal.");
p.matches = q.matches;
assert(p == q, "Copying matches makes equal trees.");
}
/// To compare two trees for content (not bothering with node names)
/// That's useful to compare the results from two different grammars.
bool softCompare(ParseTree p1, ParseTree p2)
{
return p1.successful == p2.successful
&& p1.matches == p2.matches
&& p1.begin == p2.begin
&& p1.end == p2.end
&& equal!(softCompare)(p1.children, p2.children); // the same for children
}
unittest // softCompare
{
ParseTree p = ParseTree("Name", true, ["abc", "", "def"], "input", 0, 1, null);
ParseTree child = ParseTree("Child", true, ["abc", "", "def"], "input", 0, 1, null);
p.children = [child, child];
ParseTree q = p;
assert(p == q, "Copy => Equal trees.");
assert(softCompare(p,q), "Copy => Trees equal for softCompare.");
q.name = "Another One";
assert(p != q, "Name change => non-equal trees.");
assert(softCompare(p,q), "Name change => Trees equal for softCompare.");
}
/// To record a position in a text
struct Position
{
size_t line;/// line number (starts at 0)
size_t col;/// column number (starts at 0)
size_t index;/// index (starts at 0)
}
/**
Given an input string, returns the position corresponding to the end of the string.
For example:
---
assert(position("abc") == Position(0,3,3));
assert(position("abc
") == Position(1,0,4));
assert(position("abc
") == Position(2,4,8));
---
*/
Position position(string s)
{
size_t col, line, index, prev_i;
char prev_c;
foreach(i,c; s)
{
if ((c == '\n' && !(i == prev_i + 1 && prev_c == '\r')) || // new line except when directly following a carriage return.
c == '\r')
{
col = 0;
++line;
++index;
prev_i = i;
prev_c = c;
}
else
{
if (c != '\n')
++col;
++index;
}
}
return Position(line,col,index);
}
/**
Same as previous overload, but from the begin of P.input to p.end
*/
Position position(const ParseTree p)
{
return position(p.input[0..p.end]);
}
unittest
{
assert(position("") == Position(0,0,0), "Null string, position 0.");
assert(position("abc") == Position(0,3,3), "length 3 string, no line feed.");
assert(position("abc
") == Position(1,0,4), "One end of line.");
assert(position("abc
----") == Position(2,4,9), "Three lines (second one empty).");
assert(position("abc
----
----") == Position(2,4,13), "Three lines.");
assert(position("
") == Position(3,0,3), "Four lines, all empty.");
assert(position("one\r\ntwo\r\nthree") == Position(2, 5, 15), "Three lines, DOS line endings");
}
string getName(alias expr)() @property
{
static if (is(typeof( { expr(GetName()); })))
return expr(GetName());
else
return __traits(identifier, expr);
}
struct GetName {}
/**
Basic rule, that always fail without consuming.
*/
ParseTree fail(ParseTree p)
{
return ParseTree("fail", false, [], p.input, p.end, p.end, null);
}
/// ditto
ParseTree fail(string input)
{
return fail(ParseTree("", false, [], input));
}
string fail(GetName g)
{
return "fail";
}
unittest // 'fail' unit test
{
ParseTree input = ParseTree("input", true, [], "This is the input string.", 0,0, null);
ParseTree result = fail(input);
assert(result.name == "fail");
assert(!result.successful, "'fail' fails.");
assert(result.matches is null, "'fail' makes no match.");
assert(result.input == input.input, "'fail' does not change the input.");
assert(result.end == input.end, "'fail' puts the index after the previous parse.");
assert(result.children is null, "'fail' has no children.");
result = fail("This is the input string.");
assert(!result.successful, "'fail' fails.");
}
/**
Matches the end of input. Fails if there is any character left.
*/
ParseTree eoi(ParseTree p)
{
if (p.end == p.input.length)
return ParseTree("eoi", true, [], p.input, p.end, p.end);
else
return ParseTree("eoi", false, ["end of input"], p.input, p.end, p.end);
}
/// ditto
ParseTree eoi(string input)
{
return eoi(ParseTree("", false, [], input));
}
string eoi(GetName g)
{
return "eoi";
}
alias eoi endOfInput; /// helper alias.
unittest // 'eoi' unit test
{
ParseTree input = ParseTree("input", true, [], "This is the input string.", 0,0, null);
ParseTree result = eoi(input);
assert(result.name == "eoi");
assert(!result.successful, "'eoi' fails on non-null string.");
assert(result.matches == ["end of input"], "'eoi' error message.");
assert(result.input == input.input, "'eoi' does not change the input.");
assert(result.end == input.end, "'eoi' puts the index after the previous parse.");
assert(result.children is null, "'eoi' has no children.");
input = ParseTree("input", true, [], "", 0,0, null);
result = eoi(input);
assert(result.successful, "'eoi' succeeds on strings of length 0.");
result = eoi("");
assert(result.successful, "'eoi' succeeds on strings of length 0.");
result = eoi(null);
assert(result.successful, "'eoi' succeeds on null strings");
}
/**
Match any character. As long as there is at least a character left in the input, it succeeds.
Conversely, it fails only if called at the end of the input.
*/
ParseTree any(ParseTree p)
{
if (p.end < p.input.length)
return ParseTree("any", true, [p.input[p.end..p.end+1]], p.input, p.end, p.end+1);
else
return ParseTree("any", false, ["any char"], p.input, p.end, p.end);
}
/// ditto
ParseTree any(string input)
{
return any(ParseTree("", false, [], input));
}
string any(GetName g)
{
return "any";
}
unittest // 'any' unit test
{
ParseTree input = ParseTree("input", true, [], "This is the input string.", 0,0, null);
ParseTree result = any(input);
assert(result.name == "any");
assert(result.successful, "'any' succeeds on non-null strings.");
assert(result.matches == ["T"], "'any' matches the first char in an input.");
assert(result.input == input.input, "'any' does not change the input.");
assert(result.end == input.end+1, "'any' advances the index by one position.");
assert(result.children is null, "'any' has no children.");
result = any("a");
assert(result.successful, "'any' matches on strings of length one.");
assert(result.matches == ["a"], "'any' matches the first char in an input.");
assert(result.input == "a", "'any' does not change the input.");
assert(result.end == 1, "'any' advances the index by one position.");
assert(result.children is null, "'any' has no children.");
input = ParseTree("input", true, [], "", 0,0, null);
result = any(input);
assert(!result.successful, "'any' fails on strings of length 0.");
assert(result.matches == ["any char"], "'any' error message on strings of length 0.");
assert(result.end == 0, "'any' does not advance the index.");
result = any("");
assert(!result.successful, "'any' fails on strings of length 0.");
assert(result.matches == ["any char"], "'any' error message on strings of length 0.");
assert(result.end == 0, "'any' does not advance the index.");
result = any(null);
assert(!result.successful, "'any' fails on null strings.");
assert(result.matches == ["any char"], "'any' error message on strings of length 0.");
assert(result.end == 0, "'any' does not advance the index.");
}
/**
Predefined parser: matches word boundaries, as \b for regexes.
*/
ParseTree wordBoundary(ParseTree p)
{
// TODO: I added more indexing guards and now this could probably use
// some simplification. Too tired to write it better. --Chad
bool matched = (p.end == 0 && isAlpha(p.input.front()))
|| (p.end == p.input.length && isAlpha(p.input.back()))
|| (p.end > 0 && isAlpha(p.input[p.end-1]) && p.end < p.input.length && !isAlpha(p.input[p.end]))
|| (p.end > 0 && !isAlpha(p.input[p.end-1]) && p.end < p.input.length && isAlpha(p.input[p.end]));
if (matched)
return ParseTree("wordBoundary", matched, [], p.input, p.end, p.end, null);
else
return ParseTree("wordBoundary", matched, ["word boundary"], p.input, p.end, p.end, null);
}
/// ditto
ParseTree wordBoundary(string input)
{
return ParseTree("wordBoundary", isAlpha(input.front()), [], input, 0,0, null);
}
string wordBoundary(GetName g)
{
return "wordBoundary";
}
unittest // word boundary
{
ParseTree input = ParseTree("", false, [], "This is a word.");
auto wb = [// "This"
cast(size_t)(0):true, 1:false, 2:false, 3:false, 4: true,
// "is"
5: true, 6:false, 7: true,
// "a"
8: true, 9:true,
// "word"
10:true, 11:false, 12:false, 13:false, 14:true,
// "."
15:false
];
foreach(size_t index; 0 .. input.input.length)
{
input.end = index;
ParseTree result = wordBoundary(input);
assert(result.name == "wordBoundary");
assert(result.successful == wb[index]); // true, false, ...
// for errors, there is an error message
assert(result.successful && result.matches is null || !result.successful);
assert(result.begin == input.end);
assert(result.end == input.end);
assert(result.children is null);
}
}
/**
Represents a literal in a PEG, like "abc" or 'abc' (or even '').
It succeeds if a prefix of the input is equal to its template parameter and fails otherwise.
*/
template literal(string s)
{
enum name = "literal!(\""~s~"\")";
ParseTree literal(ParseTree p)
{
enum lit = "\"" ~ s ~ "\"";
if (p.end+s.length <= p.input.length && p.input[p.end..p.end+s.length] == s)
return ParseTree(name, true, [s], p.input, p.end, p.end+s.length);
else
return ParseTree(name, false, [lit], p.input, p.end, p.end);
}
ParseTree literal(string input)
{
return .literal!(s)(ParseTree("", false, [], input));
}
string literal(GetName g)
{
return name;
}
}
unittest // 'literal' unit test
{
ParseTree input = ParseTree("input", true, [], "abcdef", 0,0, null);
alias literal!"a" a;
alias literal!"abc" abc;
alias literal!"" empty;
ParseTree result = a(input);
assert(result.name == `literal!("a")`, "Literal name test.");
assert(result.successful, "'a' succeeds on inputs beginning with 'a'.");
assert(result.matches == ["a"], "'a' matches the 'a' at the beginning.");
assert(result.input == input.input, "'a' does not change the input.");
assert(result.end == input.end+1, "'a' advances the index by one position.");
assert(result.children is null, "'a' has no children.");
result = a("abcdef");
assert(result.successful, "'a' succeeds on inputs beginning with 'a'.");
assert(result.matches == ["a"], "'a' matches the 'a' at the beginning.");
assert(result.input == input.input, "'a' does not change the input.");
assert(result.end == input.end+1, "'a' advances the index by one position.");
assert(result.children is null, "'a' has no children.");
result = abc(input);
assert(result.name == `literal!("abc")`, "Literal name test.");
assert(result.successful, "'abc' succeeds on inputs beginning with 'abc'.");
assert(result.matches == ["abc"], "'abc' matches 'abc' at the beginning.");
assert(result.input == input.input, "'abc' does not change the input.");
assert(result.end == input.end+3, "'abc' advances the index by 3 positions.");
assert(result.children is null, "'abc' has no children.");
result = abc("abcdef");
assert(result.successful, "'abc' succeeds on inputs beginning with 'abc'.");
assert(result.matches == ["abc"], "'abc' matches 'abc' at the beginning.");
assert(result.input == input.input, "'abc' does not change the input.");
assert(result.end == input.end+3, "'abc' advances the index by 3 positions.");
assert(result.children is null, "'abc' has no children.");
result = empty(input);
assert(result.name == `literal!("")`, "Literal name test.");
assert(result.successful, "'' succeeds on non-null inputs.");
assert(result.matches == [""], "'' matches '' at the beginning.");
assert(result.input == input.input, "'' does not change the input.");
assert(result.end == input.end+0, "'' does not advance the index.");
assert(result.children is null, "'' has no children.");
result = empty("abcdef");
assert(result.successful, "'' succeeds on non-null inputs.");
assert(result.matches == [""], "'' matches '' at the beginning.");
assert(result.input == input.input, "'' does not change the input.");
assert(result.end == input.end+0, "'' does not advance the index.");
assert(result.children is null, "'' has no children.");
input.input = "bcdef";
result = a(input);
assert(!result.successful, "'a' fails on inputs not beginning with 'a'.");
assert(result.matches == ["\"a\""], "'a' makes no match on 'bcdef'.");
assert(result.input == input.input, "'a' does not change the input.");
assert(result.end == input.end, "'a' does not advances the index on 'bcdef'.");
assert(result.children is null, "'a' has no children.");
result = abc(input);
assert(!result.successful, "'abc' fails on inputs not beginning with 'abc'.");
assert(result.matches == ["\"abc\""], "'abc' does no match on 'bcdef'.");
assert(result.input == input.input, "'abc' does not change the input.");
assert(result.end == input.end, "'abc' does not advance the index on 'bcdef'.");
assert(result.children is null, "'abc' has no children.");
result = empty(input);
assert(result.successful, "'' succeeds on non-null inputs.");
assert(result.matches == [""], "'' matches '' at the beginning.");
assert(result.input == input.input, "'' does not change the input.");
assert(result.end == input.end+0, "'' does not advance the index.");
assert(result.children is null, "'' has no children.");
input.input = "";
result = a(input);
assert(!result.successful, "'a' fails on empty strings.");
assert(result.matches == ["\"a\""], "'a' does not match ''.");
assert(result.input == input.input, "'a' does not change the input.");
assert(result.end == input.end, "'a' does not advance the index on 'bcdef'.");
assert(result.children is null, "'a' has no children.");
result = abc(input);
assert(!result.successful, "'abc' fails on empty strings.");
assert(result.matches == ["\"abc\""], "'abc' does not match ''.");
assert(result.input == input.input, "'abc' does not change the input.");
assert(result.end == input.end, "'abc' does not advance the index on 'bcdef'.");
assert(result.children is null, "'abc' has no children.");
result = empty(input);
assert(result.successful, "'' succeeds on empty strings.");
assert(result.matches == [""], "'' matches '' at the beginning, even on empty strings.");
assert(result.input == input.input, "'' does not change the input.");
assert(result.end == input.end+0, "'' does not advance the index.");
assert(result.children is null, "'' has no children.");
}
/**
Represents a case insensitive literal in a PEG, like "abc"i or 'abc'i (or even ''i).
It succeeds if a case insensitive comparison of a prefix of the input and its template
parameter yields no difference and fails otherwise.
*/
template caseInsensitiveLiteral(string s)
{
enum name = "caseInsensitiveLiteral!(\""~s~"\")";
ParseTree caseInsensitiveLiteral(ParseTree p)
{
enum lit = "\"" ~ s ~ "\"";
if (p.end+s.length <= p.input.length && icmp(p.input[p.end..p.end+s.length], s) == 0)
return ParseTree(name, true, [s], p.input, p.end, p.end+s.length);
else
return ParseTree(name, false, [lit], p.input, p.end, p.end);
}
ParseTree caseInsensitiveLiteral(string input)
{
return .caseInsensitiveLiteral!(s)(ParseTree("", false, [], input));
}
string caseInsensitiveLiteral(GetName g)
{
return name;
}
}
unittest // 'caseInsensitiveLiteral' unit test
{
ParseTree input = ParseTree("input", true, [], "AbCdEf", 0,0, null);
alias caseInsensitiveLiteral!"a" a;
alias caseInsensitiveLiteral!"aBC" abc;
alias caseInsensitiveLiteral!"" empty;
ParseTree result = a(input);
assert(result.name == `caseInsensitiveLiteral!("a")`, "caseInsensitiveLiteral name test.");
assert(result.successful, "'a' succeeds on inputs beginning with 'A'.");
assert(result.matches == ["a"], "'a' matches the 'A' at the beginning.");
assert(result.input == input.input, "'a' does not change the input.");
assert(result.end == input.end+1, "'a' advances the index by one position.");
assert(result.children is null, "'a' has no children.");
result = a("AbCdEf");
assert(result.successful, "'a' succeeds on inputs beginning with 'A'.");
assert(result.matches == ["a"], "'a' matches the 'A' at the beginning.");
assert(result.input == input.input, "'a' does not change the input.");
assert(result.end == input.end+1, "'a' advances the index by one position.");
assert(result.children is null, "'a' has no children.");
result = abc(input);
assert(result.name == `caseInsensitiveLiteral!("aBC")`, "caseInsensitiveLiteral name test.");
assert(result.successful, "'aBC' succeeds on inputs beginning with 'AbC'.");
assert(result.matches == ["aBC"], "'AbC' matches 'aBC' at the beginning.");
assert(result.input == input.input, "'aBC' does not change the input.");
assert(result.end == input.end+3, "'aBC' advances the index by 3 positions.");
assert(result.children is null, "'aBC' has no children.");
result = abc("AbCdEf");
assert(result.successful, "'aBC' succeeds on inputs beginning with 'AbC'.");
assert(result.matches == ["aBC"], "'AbC' matches 'aBC' at the beginning.");
assert(result.input == input.input, "'aBC' does not change the input.");
assert(result.end == input.end+3, "'aBC' advances the index by 3 positions.");
assert(result.children is null, "'aBC' has no children.");
result = empty(input);
assert(result.name == `caseInsensitiveLiteral!("")`, "caseInsensitiveLiteral name test.");
assert(result.successful, "'' succeeds on non-null inputs.");
assert(result.matches == [""], "'' matches '' at the beginning.");
assert(result.input == input.input, "'' does not change the input.");
assert(result.end == input.end+0, "'' does not advance the index.");
assert(result.children is null, "'' has no children.");
result = empty("AbCdEf");
assert(result.successful, "'' succeeds on non-null inputs.");
assert(result.matches == [""], "'' matches '' at the beginning.");
assert(result.input == input.input, "'' does not change the input.");
assert(result.end == input.end+0, "'' does not advance the index.");
assert(result.children is null, "'' has no children.");
input.input = "bCdEf";
result = a(input);
assert(!result.successful, "'a' fails on inputs not beginning with 'a' or 'A'.");
assert(result.matches == ["\"a\""], "'a' makes no match on 'bCdEf'.");
assert(result.input == input.input, "'a' does not change the input.");
assert(result.end == input.end, "'a' does not advances the index on 'bCdEf'.");
assert(result.children is null, "'a' has no children.");
result = abc(input);
assert(!result.successful, "'aBC' fails on inputs beginning with 'bCdEf'.");
assert(result.matches == ["\"aBC\""], "'aBC' does no match on 'bCdEf'.");
assert(result.input == input.input, "'aBC' does not change the input.");
assert(result.end == input.end, "'aBC' does not advance the index on 'bCdEf'.");
assert(result.children is null, "'aBC' has no children.");
result = empty(input);
assert(result.successful, "'' succeeds on non-null inputs.");
assert(result.matches == [""], "'' matches '' at the beginning.");
assert(result.input == input.input, "'' does not change the input.");
assert(result.end == input.end+0, "'' does not advance the index.");
assert(result.children is null, "'' has no children.");
input.input = "";
result = a(input);
assert(!result.successful, "'a' fails on empty strings.");
assert(result.matches == ["\"a\""], "'a' does not match ''.");
assert(result.input == input.input, "'a' does not change the input.");
assert(result.end == input.end, "'a' does not advance the index on 'bCdEf'.");
assert(result.children is null, "'a' has no children.");
result = abc(input);
assert(!result.successful, "'aBC' fails on empty strings.");
assert(result.matches == ["\"aBC\""], "'aBC' does not match ''.");
assert(result.input == input.input, "'aBC' does not change the input.");
assert(result.end == input.end, "'aBC' does not advance the index on 'bCdEf'.");
assert(result.children is null, "'aBC' has no children.");
result = empty(input);
assert(result.successful, "'' succeeds on empty strings.");
assert(result.matches == [""], "'' matches '' at the beginning, even on empty strings.");
assert(result.input == input.input, "'' does not change the input.");
assert(result.end == input.end+0, "'' does not advance the index.");
assert(result.children is null, "'' has no children.");
input.input = "ÄöÜæØå";
result = caseInsensitiveLiteral!"äÖüÆøÅ"(input);
assert(result.successful, "Unicode characters are matched case insensitively.");
}
/**
Represents a range of chars, from begin to end, included. So charRange!('a','z') matches
all English lowercase letters. If fails if the input is empty or does not begin with a character
between begin and end.
If begin == end, it will match one char (begin... or end).
begin > end is non-legal.
*/
template charRange(dchar begin, dchar end) if (begin <= end)
{
enum name = "charRange!('"~to!string(begin)~"','" ~ to!string(end) ~ "')";
ParseTree charRange(ParseTree p)
{
enum longname = "a char between '"~to!string(begin)~"' and '"~to!string(end)~"'";
if (p.end < p.input.length && p.input[p.end] >= begin && p.input[p.end] <= end)
return ParseTree(name, true, [p.input[p.end..p.end+1]], p.input, p.end, p.end+1);
else
return ParseTree(name, false, [longname], p.input, p.end, p.end);
}
ParseTree charRange(string input)
{
return .charRange!(begin,end)(ParseTree("",false,[],input));
}
string charRange(GetName g)
{
return name;
}
}
unittest // 'charRange' unit test
{
ParseTree input = ParseTree("input", true, [], "abcdef", 0,0, null);
alias charRange!('a','a') aa;
alias charRange!('a','b') ab;
alias charRange!('a','z') az;
alias charRange!(dchar.min,dchar.max) allChars;
alias charRange!('\U00000000','\U000000FF') ASCII;
static assert(!__traits(compiles, {alias charRange!('z','a') za;}));
ParseTree result = aa(input);
assert(result.name == "charRange!('a','a')", "charRange name test.");
assert(result.successful, "'a-a' succeeds on inputs beginning with 'a'.");
assert(result.matches == ["a"], "'a-a' matches the 'a' at the beginning.");
assert(result.input == input.input, "'a-a' does not change the input.");
assert(result.end == input.end+1, "'a-a' advances the index by one position.");
assert(result.children is null, "'a-a' has no children.");
result = ab("abcdef");
assert(result.name == "charRange!('a','b')", "charRange name test.");
assert(result.successful, "'a-b' succeeds on inputs beginning with 'a'.");
assert(result.matches == ["a"], "'a-b' matches the 'a' at the beginning.");
assert(result.input == input.input, "'a-b' does not change the input.");
assert(result.end == input.end+1, "'a-b' advances the index by one position.");
assert(result.children is null, "'a-b' has no children.");
result = az(input);
assert(result.name == "charRange!('a','z')", "charRange name test.");
assert(result.successful, "'a-z' succeeds on inputs beginning with 'abc'.");
assert(result.matches == ["a"], "'a-z' matches 'a' at the beginning.");
assert(result.input == input.input, "'a-z' does not change the input.");
assert(result.end == input.end+1, "'a-z' advances the index by one position.");
assert(result.children is null, "'a-z' has no children.");
input.input = "bcdef";
result = aa(input);
assert(!result.successful, "'a-a' fails on inputs not beginning with 'a'.");
assert(result.matches == ["a char between 'a' and 'a'"], "'a-a' makes no match on 'bcdef'.");
assert(result.input == input.input, "'a-a' does not change the input.");
assert(result.end == input.end, "'a-a' does not advances the index on 'bcdef'.");
assert(result.children is null, "'a-a' has no children.");
result = ab(input);
assert(result.successful, "'a-b' succeeds on inputs beginning with 'b'.");
assert(result.matches == ["b"], "'a-b' matches on 'bcdef'.");
assert(result.input == input.input, "'a-b' does not change the input.");
assert(result.end == input.end+1, "'a-b' advances the index by one position'.");
assert(result.children is null, "'a-b' has no children.");
result = az(input);
assert(result.successful, "'a-z' succeeds on 'bcdef'.");
assert(result.matches == ["b"], "'a-z' matches 'b' at the beginning of 'bcdef'.");
assert(result.input == input.input, "'a-z' does not change the input.");
assert(result.end == input.end+1, "'a-z' advances the index by one position.");
assert(result.children is null, "'a-z' has no children.");
input.input = "";
result = aa(input);
assert(!result.successful, "'a-a' fails on empty strings.");
assert(result.matches == ["a char between 'a' and 'a'"], "'a-a' does not match ''.");
assert(result.input == input.input, "'a-a' does not change the input.");
assert(result.end == input.end, "'a-a' does not advance the index on ''.");
assert(result.children is null, "'a-a' has no children.");
result = ab(input);
assert(!result.successful, "'a-b' fails on empty strings.");
assert(result.matches == ["a char between 'a' and 'b'"], "'a-b' does not match ''.");
assert(result.input == input.input, "'a-b' does not change the input.");
assert(result.end == input.end, "'a-b' does not advance the index on ''.");
assert(result.children is null, "'a-b' has no children.");
result = az(input);
assert(!result.successful, "'a-z' fails on empty strings.");
assert(result.matches == ["a char between 'a' and 'z'"], "'a-z' does not match ''.");
assert(result.input == input.input, "'a-z' does not change the input.");
assert(result.end == input.end, "'a-z' does not advance the index on ''.");
assert(result.children is null, "'a-z' has no children.");
input.input = "123";
result = aa(input);
assert(!result.successful, "'a-a' fails on '123'.");
assert(result.matches == ["a char between 'a' and 'a'"], "'a-a' does not match '123'.");
assert(result.input == input.input, "'a-a' does not change the input.");
assert(result.end == input.end, "'a-a' does not advance the index on '123'.");
assert(result.children is null, "'a-a' has no children.");
result = ab(input);
assert(!result.successful, "'a-b' fails on '123'.");
assert(result.matches == ["a char between 'a' and 'b'"], "'a-b' does not match '123'.");
assert(result.input == input.input, "'a-b' does not change the input.");
assert(result.end == input.end, "'a-b' does not advance the index on '123'.");
assert(result.children is null, "'a-b' has no children.");
result = az(input);
assert(!result.successful, "'a-z' fails on '123'.");
assert(result.matches == ["a char between 'a' and 'z'"], "'a-z' does not match '123'.");
assert(result.input == input.input, "'a-z' does not change the input.");
assert(result.end == input.end, "'a-z' does not advance the index on '123'.");
assert(result.children is null, "'a-z' has no children.");
foreach(dchar ch; 0..256*(128+64+16+8))
assert(allChars(to!string(ch)).successful);
assert(!allChars("").successful);
}
/**
eps matches the empty string (usually denoted by the Greek letter 'epsilon') and always succeeds.
It's equivalent to literal!"" (for example, it creates a match of [""]: one match, the empty string).
*/
ParseTree eps(ParseTree p)
{
return ParseTree("eps", true, [""], p.input, p.end, p.end);
}
ParseTree eps(string input)
{
return eps(ParseTree("",false,[], input));
}
string eps(GetName g)
{
return "eps";
}
unittest // 'eps' unit test
{
ParseTree input = ParseTree("input", true, [], "abcdef", 0,0, null);
ParseTree result = eps(input);
assert(result.name == "eps");
assert(result.successful, "'eps' succeeds on non-null inputs.");
assert(result.matches == [""], "'eps' matches '' at the beginning.");
assert(result.input == input.input, "'eps' does not change the input.");
assert(result.end == input.end+0, "'eps' does not advance the index.");
assert(result.children is null, "'eps' has no children.");
input.input = "";
result = eps(input);
assert(result.name == "eps");
assert(result.successful, "'eps' succeeds on empty strings.");
assert(result.matches == [""], "'eps' matches '' at the beginning, even on empty strings.");
assert(result.input == input.input, "'eps' does not change the input.");
assert(result.end == input.end+0, "'eps' does not advance the index.");
assert(result.children is null, "'eps' has no children.");
}
/**
Basic operator: it matches if all its subrules (stored in the rules template parameter tuple) match
the input successively. Its subrules parse trees are stored as its children and its matches field
will contain all its subrules matches, in order.
----
alias and!(literal!"abc", charRange!('a','z')) rule; // abc followed by any letter between a and z.
ParseTree input = ParseTree("",false,[],"abcd"); // low-level plumbing,
// the rules described here act on ParseTree's not strings.
// It's equivalent to "abcd" as input
auto result = rule(input);
assert(result.successful); // OK, 'abc' followed by 'd'
assert(result.matches == ["abc", "d"]); // stores the matches
assert(result.children.length == 2); // two children, the result of "abc" on "abcd" and the result of [a-z] on "d"
input.input = "abc"; // changing the input string;
assert(!rule(input)).successful); // NOK, abc alone
input.input = "ab";
assert(!rule(input)).successful); // NOK, does not begin by abc
----
If it fails, the last children will contain the failed node. That way, when printing, as sort of diagnostic is given:
----
alias and!(literal!"abc", charRange!('a','z')) rule; // 'abc[a-z]', aka 'abc' followed by any letter between 'a' and 'z'.
ParseTree input = ParseTree("",false,[],"abc1"); // equivalent to "abc1"
auto failure = rule(input);
writeln(failure);
/+
writes:
and (failure)
+-literal(abc) [0, 3]["abc"]
+-charRange(a,z) failure at line 0, col 3, after "abc" a char between 'a' and 'z', but got "1"
+/
----
So we know the global 'and' failed, that the first sub-rule ('abc') succeeded on input[0..3] with "abc"
and that the second subrule ('[a-z]') failed at position 3 (so, on '1').
*/
template and(rules...) if (rules.length > 0)
{
string ctfeGetNameAnd()
{
string name = "and!(";
foreach(i,rule; rules)
name ~= __traits(identifier, rule) // because using getName!(rule) causes an infinite loop during compilation
// for recursive rules
~ (i < rules.length -1 ? ", " : "");
name ~= ")";
return name;
}
enum name = ctfeGetNameAnd();
ParseTree and(ParseTree p)
{
bool keepNode(ParseTree node)
{
return node.name.startsWith("keep!(")
|| ( !node.name.startsWith("discard!(")
//&& !node.name.startsWith("drop!(")
&& node.matches !is null
//&& node.begin != node.end
);
}
version (tracer)
{
incTraceLevel();
}
ParseTree result = ParseTree(name, false, [], p.input, p.end, p.end, []);
foreach(i,r; rules)
{
version (tracer)
{
if (shouldTrace(getName!(r)(), p))
trace(traceMsg(result, name, getName!(r)()));
}
ParseTree temp = r(result);
result.end = temp.end;
if (temp.successful)
{
if (keepNode(temp))
{
result.matches ~= temp.matches;
if (temp.name.startsWith("drop!("))
{}
else if (temp.name.startsWith("propagate!("))
result.children ~= temp.children;
else
result.children ~= temp;
}
}
else
{
result.children ~= temp;// add the failed node, to indicate which failed
if (temp.matches.length > 0)
result.matches ~= temp.matches[$-1];
version (tracer)
{
if (shouldTrace(getName!(r)(), p))
trace(traceResultMsg(result, getName!(r)()));
decTraceLevel();
}
return result; // and end the parsing attempt right there
}
}
result.successful = true;
version (tracer)
{
foreach(i, r; rules)
if (shouldTrace(getName!(r)(), p))
{
trace(traceResultMsg(result, name));
break;
}
decTraceLevel();
}
return result;
}
ParseTree and(string input)
{
return .and!(rules)(ParseTree("",false,[],input));
}
string and(GetName g)
{
return name;
}
}
unittest // 'and' unit test
{
alias literal!"abc" abc;
alias literal!"de" de;
alias literal!"f" f;
alias and!(abc) abcAnd;
alias and!(abc,de) abcde;
alias and!(abc,de,f) abcdef;
alias and!(eps, abc, eps, de, eps, f, eps) withEps;
//assert(getName!(abcAnd)() == `and!(literal!("abc"))`);
//assert(getName!(abcde)() == `and!(literal!("abc"), literal!("de"))`);
//assert(getName!(abcdef)() == `and!(literal!("abc"), literal!("de"), literal!("f"))`);
ParseTree input = ParseTree("",false,[], "abcdefghi");
ParseTree result = abcAnd(input);
assert(result.successful, "and!('abc') parses 'abcdefghi'");
assert(result.matches == ["abc"], "and!('abc') matches 'abc' at the beginning of 'abcdefghi'");
assert(result.end == input.end+3, "and!('abc') advances the index by 'abc' size (3).");
assert(result.children == [abc(input)], "and!('abc') has one child: the one created by 'abc'.");
result = abcde(input);
assert(result.successful, "and!('abc','de') parses 'abcdefghi'");
assert(result.matches == ["abc","de"],
"and!('abc','de') matches 'abc' and 'de' at the beginning of 'abcdefghi'");
assert(result.end == input.end+5, "and!('abc','de') advances the index by 3+2 positions.");
assert(result.children == [abc(input), de(abc(input))],
"and!('abc','de') has two children, created by 'abc' and 'de'.");
result = abcdef(input);
assert(result.successful, "and!('abc','de','f') parses 'abcdefghi'");
assert(result.matches == ["abc","de","f"],
"and!('abc','de','f') matches 'abcdef' at the beginning of 'abcdefghi'");
assert(result.end == input.end+6, "and!('abc','de','f') advances the index by 3+2+1 positions.");
assert(result.children == [abc(input), de(abc(input)), f(de(abc(input)))]
, "and!('abc','de') has two children, created by 'abc' and 'de'.");
result = withEps(input);
assert(result.successful, "and!('','abc','','de','','f','') parses 'abcdefghi'");
assert(result.matches == ["","abc","","de","","f",""],
"and!('','abc','','de','','f','') matches 'abcdef' at the beginning of 'abcdefghi'");
assert(result.end == input.end+6,
"and!('','abc','','de','','f','') advances the index by 0+3+0+2+0+1+0 positions.");
input.input = "bcdefghi";
result = abcdef(input);
assert(!result.successful, "'abc' 'de' 'f' fails on 'bcdefghi'");
//assert(result.matches is null, "'abc' 'de' 'f' has no match on 'bcdefghi'");
assert(result.end == input.end);
assert(result.children == [abc(input)], "'abc' 'de' 'f' has one child (a failure) on 'bcdefghi'");
input.input = "abc_efghi";
result = abcdef(input);
assert(!result.successful, "'abc' 'de' 'f' fails on 'abc_efghi'");
//assert(result.matches == ["abc"], "Only the first match, from 'abc'.");
assert(result.end == input.end+3, "Advances by 3 positions, due to 'abc'");
assert(result.children == [abc(input), de(abc(input))]
, "'abc' 'de' 'f' has two child on 'abc_efghi', the one from 'abc' (success) and the one from 'de' (failure).");
}
template wrapAround(alias before, alias target, alias after)
{
ParseTree wrapAround(ParseTree p)
{
ParseTree temp = before(p);
if (!temp.successful)
return temp;
ParseTree result = target(temp);
if (!result.successful)
return result;
result.begin = temp.begin;
temp = after(result);
if (!temp.successful)
return temp;
result.end = temp.end;
return result;
}
ParseTree wrapAround(string input)
{
return .wrapAround!(before, target, after)(ParseTree("",false,[],input));
}
string wrapAround(GetName g)
{
return "wrapAround!(" ~ getName!(before)() ~
", " ~ getName!(target)() ~
", " ~ getName!(after)() ~ ")";
}
}
/**
Basic operator: it matches if one of its subrules (stored in the rules template parameter tuple) match
the input. The subrules are tested in order, from rules[0] to rules[$-1].
The matching subrule parse trees is stored as its only child and its matches field
will contain all the subrule matches, in order.
----
alias or!(literal!"abc", charRange!('a','z')) rule; // abc or, failing that, any letter between a and z.
ParseTree input = ParseTree("",false,[],"defg"); // low-level plumbing, the rules described here act on ParseTree's not strings.
// It's equivalent to "defg" as input
auto result = rule(input);
assert(result.successful); // OK
assert(result.matches == ["d"]); // stores the (in this case) only match
assert(result.children.length == 1); // one child, the result of "abc" or [a-z], depending on which rule succeeded.
input.input = "abc"; // changing the input string;
assert(rule(input)).successful); // Still OK
input.input = "1abc";
assert(!rule(input)).successful); // NOK, does not begin by abc nor by [a-z]
----
If it fails, the last children will contain the failed node that matched furthest (longes match).
That way, when printing, as sort of diagnostic is given:
----
alias or!(literal!"abc", and!(literal!"ab", charRange!('0','9'))) rule; // 'abc' or 'ab[0-9]'
ParseTree input = ParseTree("",false,[],"abd"); // equivalent to "abd"
auto failure = rule(input);
writeln(failure);
/+
or (failure)
+-and (failure)
+-literal(ab) [0, 2]["ab"]
+-charRange(0,9) failure at line 0, col 2, after "ab" expected a char between '0' and '9', but got "d"
+/
----
So we know 'or' failed, that the 'and' sub-rule had the longest match, matching 'ab' and failing for [0-9] on index 2.
*/
template or(rules...) if (rules.length > 0)
{
string ctfeGetNameOr()
{
string name = "or!(";
foreach(i,rule; rules)
name ~= getName!(rule)
~ (i < rules.length -1 ? ", " : "");
name ~= ")";
return name;
}
enum name = ctfeGetNameOr();
ParseTree or(ParseTree p)
{
// error-management
ParseTree longestFail = ParseTree(name, false, [], p.input, p.end, 0);
string[] errorStrings;
size_t errorStringChars;
string orErrorString;
ParseTree[rules.length] results;
string[rules.length] names;
size_t[rules.length] failedLength;
size_t maxFailedLength;
version (tracer)
{
incTraceLevel();
}
// Real 'or' loop
foreach(i,r; rules)
{
version (tracer)
{
if (shouldTrace(getName!(r)(), p))
trace(traceMsg(p, name, getName!(r)()));
}
ParseTree temp = r(p);
if (temp.successful)
{
temp.children = [temp];
temp.name = name;
version (tracer)
{
if (shouldTrace(getName!(r)(), p))
trace(traceResultMsg(temp, getName!(r)()));
decTraceLevel();
}
return temp;
}
else
{
version (tracer)
{
if (shouldTrace(getName!(r)(), p))
trace(traceResultMsg(temp, getName!(r)()));
}
enum errName = " (" ~ getName!(r)() ~")";
failedLength[i] = temp.end;
if (temp.end >= longestFail.end)
{
maxFailedLength = temp.end;
longestFail = temp;
names[i] = errName;
results[i] = temp;
if (temp.end == longestFail.end)
errorStringChars += (temp.matches.length > 0 ? temp.matches[$-1].length : 0) + errName.length + 4;
else
errorStringChars = (temp.matches.length > 0 ? temp.matches[$-1].length : 0) + errName.length + 4;
}
// Else, this error parsed less input than another one: we discard it.
}
}
version (tracer)
{
decTraceLevel();
}
// All subrules failed, we will take the longest match as the result
// If more than one node failed at the same (farthest) position, we concatenate their error messages
char[] errString;// = new char[](errorStringChars);
errString.length = errorStringChars;
uint start = 0;
foreach(i; 0..rules.length)
{
if (failedLength[i] == maxFailedLength && results[i].matches.length > 0)
{
auto temp = results[i];
auto len = temp.matches[$-1].length;
auto nlen = names[i].length;
errString[start .. start+len] = temp.matches[$-1][];
errString[start+len .. start+len+names[i].length] = names[i][];
errString[start+len+nlen .. start+len+nlen+4] = " or ";
start += len + names[i].length + 4;
}
}
orErrorString = cast(string)(errString[0..$-4]);
longestFail.matches = longestFail.matches.length == 0 ? [orErrorString] :
longestFail.matches[0..$-1] // discarding longestFail error message
~ [orErrorString]; // and replacing it by the new, concatenated one.
longestFail.name = name;
longestFail.begin = p.end;
return longestFail;
}
ParseTree or(string input)
{
return .or!(rules)(ParseTree("",false,[],input));
}
string or(GetName g)
{
return name;
}
}
unittest // 'or' unit test
{
alias charRange!('a','b') ab;
alias charRange!('c','d') cd;
alias or!(ab) abOr;
alias or!(ab,cd) abOrcd;
assert(getName!(ab)() == "charRange!('a','b')");
assert(getName!(cd)() == "charRange!('c','d')");
ParseTree input = ParseTree("",false,[], "abcdefghi");
ParseTree result = abOr(input);
assert(result.name == "or!(charRange!('a','b'))", "or name test.");
assert(result.successful, "or!([a-b]) parses 'abcdefghi'");
assert(result.matches == ["a"], "or!([a-b]) matches 'a' at the beginning of 'abcdefghi'");
assert(result.end == input.end+1, "or!([a-b]) advances the index by 'a' size (1).");
assert(result.children == [ab(input)], "or!([a-b]) has one child: the one created by '[a-b]'.");
result = abOrcd(input);
assert(result.name == "or!(charRange!('a','b'), charRange!('c','d'))", "or name test.");
assert(result.successful, "or!([a-b],[c-d]) parses 'abcdefghi'");
assert(result.matches == ["a"], "or!([a-b],[c-d]) matches 'a' at the beginning of 'abcdefghi'");
assert(result.end == input.end+1, "or!([a-b],[c-d]) advances the index by 1 position.");
assert(result.children == [ab(input)], "or!([a-b],[c-d]) has one child, created by [a-b].");
input.input = "cdefghi";
result = abOrcd(input);
assert(result.name == "or!(charRange!('a','b'), charRange!('c','d'))", "or name test.");
assert(result.successful, "or!([a-b],[c-d]) parses 'cdefghi'");
assert(result.matches == ["c"], "or!([a-b],[c-d]) matches 'c' at the beginning of 'cdefghi'");
assert(result.end == input.end+1, "or!([a-b],[c-d]) advances the index by 1 position.");
assert(result.children == [cd(input)], "or!([a-b],[c-d]) has one child, created by [c-d].");
input.input = "_abcdefghi";
result = abOrcd(input);
assert(!result.successful, "or!([a-b],[c-d]) fails on '_abcdefghi'");
assert(result.end == input.end+0, "or!([a-b],[c-d]) does not advance the index.");
assert(result.matches ==
[ "a char between 'a' and 'b' (charRange!('a','b')) or a char between 'c' and 'd' (charRange!('c','d'))"]
, "or!([a-b],[c-d]) error message. |" ~ result.matches[0]~ "|");
input.input = "";
result = abOrcd(input);
assert(!result.successful, "or!([a-b],[c-d]) fails on and empty input");
assert(result.end == input.end+0, "or!([a-b],[c-d]) does not advance the index.");
assert(result.matches ==
[ "a char between 'a' and 'b' (charRange!('a','b')) or a char between 'c' and 'd' (charRange!('c','d'))"]
, "or!([a-b],[c-d]) error message.");
}
/**
Basic operator: it matches if one of its subrules (stored in the rules template parameter tuple) match
the input. All subrules are tested and the one producing the longest match is taken.
The longest matching subrule's parse tree is stored as its only child and its matches field
will contain all the subrule matches, in order.
*/
template longest_match(rules...) if (rules.length > 0)
{
string ctfeGetNameOr()
{
string name = "longest_match!(";
foreach(i,rule; rules)
name ~= getName!(rule)
~ (i < rules.length -1 ? ", " : "");
name ~= ")";
return name;
}
enum name = ctfeGetNameOr();
ParseTree longest_match(ParseTree p)
{
// error-management
ParseTree longest, longestFail = ParseTree(name, false, [], p.input, p.end, 0);
string[] errorStrings;
size_t errorStringChars;
string orErrorString;
ParseTree[rules.length] results;
string[rules.length] names;
size_t[rules.length] failedLength;
size_t maxFailedLength;
version (tracer)
{
incTraceLevel();
}
// Real 'longest_match' loop
foreach(i,r; rules)
{
version (tracer)
{
if (shouldTrace(getName!(r)(), p))
trace(traceMsg(p, name, getName!(r)()));
}
ParseTree temp = r(p);
version (tracer)
{
if (shouldTrace(getName!(r)(), p))
trace(traceResultMsg(temp, getName!(r)()));
}
if (temp.successful)
{
if (temp.end > longest.end)
longest = temp;
// Else, this rule parsed less input than another one: we discard it.
}
else
{
enum errName = " (" ~ getName!(r)() ~")";
failedLength[i] = temp.end;
if (temp.end >= longestFail.end)
{
maxFailedLength = temp.end;
longestFail = temp;
names[i] = errName;
results[i] = temp;
if (temp.end == longestFail.end)
errorStringChars += (temp.matches.length > 0 ? temp.matches[$-1].length : 0) + errName.length + 4;
else
errorStringChars = (temp.matches.length > 0 ? temp.matches[$-1].length : 0) + errName.length + 4;
}
// Else, this error parsed less input than another one: we discard it.
}
}
version (tracer)
{
decTraceLevel();
}
if (longest.successful)
{
longest.children = [longest];
longest.name = name;
return longest;
}
// All subrules failed, we will take the longest match as the result
// If more than one node failed at the same (farthest) position, we concatenate their error messages
char[] errString;// = new char[](errorStringChars);
errString.length = errorStringChars;
uint start = 0;
foreach(i; 0..rules.length)
{
if (failedLength[i] == maxFailedLength && results[i].matches.length > 0)
{
auto temp = results[i];
auto len = temp.matches[$-1].length;
auto nlen = names[i].length;
errString[start .. start+len] = temp.matches[$-1][];
errString[start+len .. start+len+names[i].length] = names[i][];
errString[start+len+nlen .. start+len+nlen+4] = " or ";
start += len + names[i].length + 4;
}
}
orErrorString = cast(string)(errString[0..$-4]);
longestFail.matches = longestFail.matches.length == 0 ? [orErrorString] :
longestFail.matches[0..$-1] // discarding longestFail error message
~ [orErrorString]; // and replacing it by the new, concatenated one.
longestFail.name = name;
longestFail.begin = p.end;
return longestFail;
}
ParseTree longest_match(string input)
{
return .or!(rules)(ParseTree("",false,[],input));
}
string longest_match(GetName g)
{
return name;
}
}
unittest // 'longest_match' unit test
{
alias charRange!('a','b') ab;
alias charRange!('c','d') cd;
alias longest_match!(ab) abOr;
alias longest_match!(ab,cd) abOrcd;
assert(getName!(ab)() == "charRange!('a','b')");
assert(getName!(cd)() == "charRange!('c','d')");
// These are the same tests as for 'or':
ParseTree input = ParseTree("",false,[], "abcdefghi");
ParseTree result = abOr(input);
assert(result.name == "longest_match!(charRange!('a','b'))", "or name test.");
assert(result.successful, "longest_match!([a-b]) parses 'abcdefghi'");
assert(result.matches == ["a"], "longest_match!([a-b]) matches 'a' at the beginning of 'abcdefghi'");
assert(result.end == input.end+1, "longest_match!([a-b]) advances the index by 'a' size (1).");
assert(result.children == [ab(input)], "longest_match!([a-b]) has one child: the one created by '[a-b]'.");
result = abOrcd(input);
assert(result.name == "longest_match!(charRange!('a','b'), charRange!('c','d'))", "or name test.");
assert(result.successful, "longest_match!([a-b],[c-d]) parses 'abcdefghi'");
assert(result.matches == ["a"], "longest_match!([a-b],[c-d]) matches 'a' at the beginning of 'abcdefghi'");
assert(result.end == input.end+1, "longest_match!([a-b],[c-d]) advances the index by 1 position.");
assert(result.children == [ab(input)], "longest_match!([a-b],[c-d]) has one child, created by [a-b].");
input.input = "cdefghi";
result = abOrcd(input);
assert(result.name == "longest_match!(charRange!('a','b'), charRange!('c','d'))", "or name test.");
assert(result.successful, "longest_match!([a-b],[c-d]) parses 'cdefghi'");
assert(result.matches == ["c"], "longest_match!([a-b],[c-d]) matches 'c' at the beginning of 'cdefghi'");
assert(result.end == input.end+1, "longest_match!([a-b],[c-d]) advances the index by 1 position.");
assert(result.children == [cd(input)], "longest_match!([a-b],[c-d]) has one child, created by [c-d].");
input.input = "_abcdefghi";
result = abOrcd(input);
assert(!result.successful, "longest_match!([a-b],[c-d]) fails on '_abcdefghi'");
assert(result.end == input.end+0, "longest_match!([a-b],[c-d]) does not advance the index.");
assert(result.matches ==
[ "a char between 'a' and 'b' (charRange!('a','b')) or a char between 'c' and 'd' (charRange!('c','d'))"]
, "longest_match!([a-b],[c-d]) error message. |" ~ result.matches[0]~ "|");
input.input = "";
result = abOrcd(input);
assert(!result.successful, "longest_match!([a-b],[c-d]) fails on and empty input");
assert(result.end == input.end+0, "longest_match!([a-b],[c-d]) does not advance the index.");
assert(result.matches ==
[ "a char between 'a' and 'b' (charRange!('a','b')) or a char between 'c' and 'd' (charRange!('c','d'))"]
, "longest_match!([a-b],[c-d]) error message.");
// Now test longest match behaviour:
input.input = "aaaccccb";
result = or!(oneOrMore!(literal!("a")), and!(oneOrMore!(literal!("a")), literal!("cc")))(input);
assert(result.matches == ["a", "a", "a"], "or! takes the first matching rule.");
result = longest_match!(oneOrMore!(literal!("a")), and!(oneOrMore!(literal!("a")), literal!("cc")))(input);
assert(result.matches == ["a", "a", "a", "cc"], "longest_match! takes the longest matching rule.");
}
/**
Compile-time switch trie from Brian Schott
*/
class Trie(V) : TrieNode!(V)
{
/**
* Adds the given value to the trie with the given key
*/
void add(string key, V value) pure
{
TrieNode!(V) current = this;
foreach(dchar keyPart; key)
{
if ((keyPart in current.children) is null)
{
auto node = new TrieNode!(V);
current.children[keyPart] = node;
current = node;
}
else
current = current.children[keyPart];
}
current.value = value;
}
}
class TrieNode(V)
{
V value;
TrieNode!(V)[dchar] children;
}
string printCaseStatements(V)(TrieNode!(V) node, string indentString)
{
string s = "";
string idnt = indentString;
void incIndent() { idnt ~= " "; }
void decIndent() { idnt = idnt[2..$]; }
void put(string k) { s ~= idnt ~ k; }
void append(string k) { s ~= k;}
foreach(dchar k, TrieNode!(V) v; node.children)
{
put("case '");
switch(k)
{
case '\n': append("\\n"); break;
case '\t': append("\\t"); break;
case '\r': append("\\r"); break;
case 92: append("\\"); break;
default: append(to!string(k));
}
append("':\n");
incIndent();
put("temp.end++;\n");
if (v.children.length > 0)
{
put("if (temp.end >= temp.input.length)\n");
put("{\n");
incIndent();
if (node.children[k].value.length != 0)
put("return ParseTree(name, true, [`" ~ node.children[k].value ~ "`], temp.input, p.end, temp.end)");
else
put("return ParseTree(name, false, [failString], p.input, p.end, p.end)");
append(";\n");
decIndent();
put("}\n");
put("switch (temp.input[temp.end])\n");
put("{\n");
incIndent();
append(printCaseStatements(v, idnt));
put("default:\n");
incIndent();
if (v.value.length != 0)
put("return ParseTree(name, true, [`" ~ v.value ~ "`], temp.input, p.end, temp.end)");
else
put("return ParseTree(name, false, [failString], p.input, p.end, p.end)");
append(";\n");
decIndent();
decIndent();
put("}\n");
}
else
{
if (v.value.length != 0)
put("return ParseTree(name, true, [`" ~ v.value ~ "`], temp.input, p.end, temp.end)");
else
put("return ParseTree(name, false, [failString], p.input, p.end, p.end)");
append(";\n");
}
}
return s;
}
string generateCaseTrie(string[] args ...)
{
auto t = new Trie!(string);
foreach(arg; args)
{
t.add(arg, arg);
}
return printCaseStatements(t, "");
}
/**
or special case for literal list ("abstract"/"alias"/...)
*/
template keywords(kws...) if (kws.length > 0)
{
string ctfeGetNameKeywords()
{
string name= "keywords!(";
foreach(i,kw;kws)
name ~= "\"" ~ kw ~ "\""~ (i < kws.length -1 ? ", " : "");
name ~= ")";
return name;
}
string ctfeConcatKeywords()
{
string s = "[";
foreach(i, k; kws)
{
s ~= "\"" ~ k ~ "\"";
if (i < kws.length - 1)
s ~= ", ";
}
return s ~= "]";
}
enum name = ctfeGetNameKeywords();
enum failString = "one among " ~ ctfeConcatKeywords();
ParseTree keywords(ParseTree p)
{
string keywordCode(string[] keywords)
{
string result;
foreach(kw; keywords)
result ~= "if (p.end+"~to!string(kw.length) ~ " <= p.input.length "
~" && p.input[p.end..p.end+"~to!string(kw.length)~"]==`"
~kw~"`) return ParseTree(`"
~name~"`,true,[`"~kw~"`],p.input,p.end,p.end+"
~to!string(kw.length)~");\n";
result ~= "return ParseTree(`"~name~"`,false,[`" ~ failString ~ "`],p.input,p.end,p.end);";
return result;
}
static if (KEYWORDS == IFCHAIN)
{
mixin(keywordCode([kws]));
}
else static if (KEYWORDS == TRIE)
{
auto temp = p;
if (p.end < p.input.length) // is this conditional required?
{
switch(p.input[p.end])
{
mixin(generateCaseTrie([kws]));
mixin("default: return ParseTree(`"~name~"`,false,[`" ~ failString ~ "`],p.input,p.end,p.end);");
}
}
else
{
mixin("return ParseTree(`"~name~"`,false,[`" ~ failString ~ "`],p.input,p.end,p.end);");
}
}
}
ParseTree keywords(string input)
{
return .keywords!(kws)(ParseTree("",false,[],input));
}
string keywords(GetName g)
{
return name;
}
}
unittest
{
alias keywords!("abc","de","f") kw;
assert(getName!(kw)() == `keywords!("abc", "de", "f")`);
ParseTree input = ParseTree("",false,[],"abcd");
ParseTree result = kw(input);
assert(result.name == `keywords!("abc", "de", "f")`, "keywords name test.");
assert(result.successful, "keywords success on `abcd`");
assert(result.matches == ["abc"], "keywords matches `abc` on `abcd`");
assert(result.end == input.end+3, "keywords advances the index by 3 positions.");
assert(result.children is null, "No children for `keywords`.");
input.input = "def";
result = kw(input);
assert(result.successful, "keywords success on `def`");
assert(result.matches == ["de"], "keywords matches `de` on `def`");
assert(result.end == input.end+2, "keywords advances the index by 2 positions.");
assert(result.children is null, "No children for `keywords`.");
input.input = "ab_def";
result = kw(input);
assert(!result.successful, "keywords fails on `ab_def`.");
assert(result.matches == [`one among ["abc", "de", "f"]`], "keywords error message." ~ result.matches[0]);
assert(result.end == input.end, "keywords does not advance the index.");
assert(result.children is null, "No children for `keywords`.");
input.input = "";
result = kw(input);
assert(!result.successful, "keywords fails on an empty input.");
assert(result.matches == [`one among ["abc", "de", "f"]`], "keywords error message.");
assert(result.end == input.end, "keywords does not advance the index.");
assert(result.children is null, "No children for `keywords`.");
}
/**
Tries to match subrule 'r' zero or more times. It always succeeds, since if 'r' fails
from the very beginning, it matched 'r' zero times...
Its matches are those of its subrules (they might be different for each match) and its
children are all the parse trees returned by the successive application of 'r'.
----
alias zeroOrMore!(or!(literal!"abc", literal!"d")) rule; // in PEG-speak: '("abc" / "d")*'
ParseTree input = ParseTree("",false,[], "abcdabce");
ParseTree result = rule(input);
assert(result.successful);
assert(result.matches == ["abc", "d", "abc"]);
assert(result.end == 7); // matched "abcdabce"[0..7] => "abcdabc". "e" at the end is not part of the parse tree.
assert(result.children.length == 3);
writeln(result);
/+
writes:
zeroOrMore [0, 7]["abc", "d", "abc"]
+-or [0, 3]["abc"]
| +-literal(abc) [0, 3]["abc"]
+-or [3, 4]["d"]
| +-literal(d) [3, 4]["d"]
+-or [4, 7]["abc"]
+-literal(abc) [4, 7]["abc"]
+/
----
So we know the first child used the 'literal!"abc"' sub-rule and matched input[0..3].
The second matched input[3..4] and the third input[4..7].
----
input = ParseTree("",false,[], "efgh");
result = rule(input);
assert(result.successful); // succeed, even though all patterns failed.
assert(result.children.length == 0);
----
*/
template zeroOrMore(alias r)
{
enum name = "zeroOrMore!(" ~ getName!(r) ~ ")";
ParseTree zeroOrMore(ParseTree p)
{
auto result = ParseTree(name, true, [], p.input, p.end, p.end);
version (tracer)
{
incTraceLevel();
if (shouldTrace(getName!(r)(), p))
trace(traceMsg(result, name, getName!(r)()));
}
auto temp = r(result);
while(temp.successful
&& (temp.begin < temp.end // To avoid infinite loops on epsilon-matching rules
|| temp.name.startsWith("discard!(")))
{
result.matches ~= temp.matches;
result.children ~= temp;
result.end = temp.end;
version (tracer)
{
if (shouldTrace(getName!(r)(), p))
trace(traceMsg(result, name, getName!(r)()));
}
temp = r(result);
}
result.successful = true;
version (tracer)
{
if (shouldTrace(getName!(r)(), p))
trace(traceResultMsg(result, getName!(r)()));
decTraceLevel();
}
return result;
}
ParseTree zeroOrMore(string input)
{
return .zeroOrMore!(r)(ParseTree("",false,[],input));
}
string zeroOrMore(GetName g)
{
return name;
}
}
unittest // 'zeroOrMore' unit test
{
alias literal!"a" a;
alias literal!"abc" abc;
alias charRange!('a','z') az;
alias zeroOrMore!(a) as;
alias zeroOrMore!(abc) abcs;
alias zeroOrMore!(az) azs;
assert(getName!(as)() == `zeroOrMore!(literal!("a"))`);
assert(getName!(abcs)() == `zeroOrMore!(literal!("abc"))`);
assert(getName!(azs)() == `zeroOrMore!(charRange!('a','z'))`);
assert(as("").successful);
assert(as("a").successful);
assert(as("aa").successful);
assert(as("aaa").successful);
assert(as("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").successful);
assert(as("b").successful);
ParseTree result = as("aaa");
assert(result.name == `zeroOrMore!(literal!("a"))`);
assert(result.successful);
assert(result.matches == ["a","a","a"]);
assert(result.begin == 0);
assert(result.end == 3);
assert(result.children.length == 3);
assert(result.children == [ a("aaa"), a(a("aaa")), a(a(a("aaa")))]);
assert(abcs("").successful);
assert(abcs("abc").successful);
assert(abcs("abcabc").successful);
assert(abcs("abcabcabc").successful);
assert(abcs("abcabcabcabcabcabcabcabcabcabcabcabcabcabcabc").successful);
assert(abcs("ab").successful);
result = abcs("abcabcabc");
assert(result.name == `zeroOrMore!(literal!("abc"))`);
assert(result.successful);
assert(result.matches == ["abc","abc","abc"]);
assert(result.begin == 0);
assert(result.end == 3*3);
assert(result.children.length == 3);
assert(result.children == [ abc("abcabcabc"), abc(abc("abcabcabc")), abc(abc(abc("abcabcabc")))]);
assert(azs("").successful);
assert(azs("a").successful);
assert(azs("abc").successful);
assert(azs("abcdefghijklmnoqrstuvwxyz").successful);
assert(azs("abcdefghijklmnoqrstuvwxyz 1234567890").successful);
result = azs("abc");
assert(result.name == `zeroOrMore!(charRange!('a','z'))`);
assert(result.successful);
assert(result.matches == ["a","b","c"]);
assert(result.begin == 0);
assert(result.end == 3);
assert(result.children.length == 3);
assert(result.children == [ az("abc"), az(az("abc")), az(az(az("abc")))]);
}
/**
Tries to match subrule 'r' one or more times. If 'r' fails
from the very beginning, it fails and else succeeds.
Its matches are those of its subrules (they might be different for each match) and its
children are all the parse trees returned by the successive application of 'r'.
----
alias oneOrMore!(or!(literal!"abc", literal!"d")) rule; // in PEG-speak: '("abc" / "d")*'
ParseTree input = ParseTree("",false,[], "abcdabce");
ParseTree result = rule(input);
assert(result.successful);
assert(result.matches == ["abc", "d", "abc"]);
assert(result.end == 7); // matched "abcdabce"[0..7] => "abcdabc". "e" at the end is not part of the parse tree.
assert(result.children.length == 3);
writeln(result);
/+
writes:
oneOrMore [0, 7]["abc", "d", "abc"]
+-or [0, 3]["abc"]
| +-literal(abc) [0, 3]["abc"]
+-or [3, 4]["d"]
| +-literal(d) [3, 4]["d"]
+-or [4, 7]["abc"]
+-literal(abc) [4, 7]["abc"]
+/
----
So we know the first child used the 'literal!"abc"' sub-rule and matched input[0..3].
The second matched input[3..4] and the third input[4..7].
----
input = ParseTree("",false,[], "efgh");
result = rule(input);
assert(!result.successful); // fails, since it failed on the first try.
----
*/
template oneOrMore(alias r)
{
enum name = "oneOrMore!(" ~ getName!(r) ~ ")";
ParseTree oneOrMore(ParseTree p)
{
auto result = ParseTree(name, false, [], p.input, p.end, p.end);
version (tracer)
{
incTraceLevel();
if (shouldTrace(getName!(r)(), p))
trace(traceMsg(result, name, getName!(r)()));
}
auto temp = r(result);
if (!temp.successful)
{
result.matches = temp.matches;
result.children = [temp];
result.end = temp.end;
}
else
{
while( temp.successful
&& (temp.begin < temp.end // To avoid infinite loops on epsilon-matching rules
|| temp.name.startsWith("discard!(")))
{
result.matches ~= temp.matches;
result.children ~= temp;
result.end = temp.end;
version (tracer)
{
if (shouldTrace(getName!(r)(), p))
trace(traceMsg(result, name, getName!(r)()));
}
temp = r(result);
}
result.successful = true;
}
version (tracer)
{
if (shouldTrace(getName!(r)(), p))
trace(traceResultMsg(result, getName!(r)()));
decTraceLevel();
}
return result;
}
ParseTree oneOrMore(string input)
{
return .oneOrMore!(r)(ParseTree("",false,[],input));
}
string oneOrMore(GetName g)
{
return name;
}
}
unittest // 'oneOrMore' unit test
{
alias literal!"a" a;
alias literal!"abc" abc;
alias charRange!('a','z') az;
alias oneOrMore!(a) as;
alias oneOrMore!(abc) abcs;
alias oneOrMore!(az) azs;
assert(getName!(as)() == `oneOrMore!(literal!("a"))`);
assert(getName!(abcs)() == `oneOrMore!(literal!("abc"))`);
assert(getName!(azs)() == `oneOrMore!(charRange!('a','z'))`);
assert(!as("").successful);
assert(as("a").successful);
assert(as("aa").successful);
assert(as("aaa").successful);
assert(as("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").successful);
assert(!as("b").successful);
ParseTree result = as("aaa");
assert(result.name == `oneOrMore!(literal!("a"))`);
assert(result.successful);
assert(result.matches == ["a","a","a"]);
assert(result.begin == 0);
assert(result.end == 3);
assert(result.children.length == 3);
assert(result.children == [ a("aaa"), a(a("aaa")), a(a(a("aaa")))]);
assert(!abcs("").successful);
assert(abcs("abc").successful);
assert(abcs("abcabc").successful);
assert(abcs("abcabcabc").successful);
assert(abcs("abcabcabcabcabcabcabcabcabcabcabcabcabcabcabc").successful);
assert(!abcs("ab").successful);
result = abcs("abcabcabc");
assert(result.name == `oneOrMore!(literal!("abc"))`);
assert(result.successful);
assert(result.matches == ["abc","abc","abc"]);
assert(result.begin == 0);
assert(result.end == 3*3);
assert(result.children.length == 3);
assert(result.children == [ abc("abcabcabc"), abc(abc("abcabcabc")), abc(abc(abc("abcabcabc")))]);
assert(!azs("").successful);
assert(azs("a").successful);
assert(azs("abc").successful);
assert(azs("abcdefghijklmnoqrstuvwxyz").successful);
assert(azs("abcdefghijklmnoqrstuvwxyz 1234567890").successful);
assert(!azs(".").successful);
result = azs("abc");
assert(result.name == `oneOrMore!(charRange!('a','z'))`);
assert(result.successful);
assert(result.matches == ["a","b","c"]);
assert(result.begin == 0);
assert(result.end == 3);
assert(result.children.length == 3);
assert(result.children == [ az("abc"), az(az("abc")), az(az(az("abc")))]);
}
/**
Given a subrule 'r', represents the expression 'r?'. It tries to match 'r' and if this matches
successfully, it returns this match. If 'r' failed, 'r?' is still a success, but without any child nor match.
----
alias option!(literal!"abc") rule; // Aka '"abc"?'
ParseTree input = ParseTree("",false,[],"abcd");
ParseTree result = rule(input);
assert(result.successful);
assert(result.matches == ["abc"]);
assert(result.children.length == 1);
assert(result.children[0] == literal!"abc"(input));
----
*/
template option(alias r)
{
enum name = "option!(" ~ getName!(r) ~ ")";
ParseTree option(ParseTree p)
{
version (tracer)
{
if (shouldTrace(getName!(r)(), p))
trace(traceMsg(p, name, getName!(r)()));
}
ParseTree result = r(p);
if (result.successful)
return ParseTree(name, true, result.matches, result.input, result.begin, result.end, [result]);
else
return ParseTree(name, true, [], p.input, p.end, p.end, null);
}
ParseTree option(string input)
{
return .option!(r)(ParseTree("",false,[],input));
}
string option(GetName g)
{
return name;
}
}
unittest // 'option' unit test
{
alias literal!"a" a;
alias literal!"abc" abc;
alias option!(a) a_;
alias option!(abc) abc_;
assert(getName!(a_)() == `option!(literal!("a"))`);
assert(getName!(abc_)() == `option!(literal!("abc"))`);
assert(a_("").successful);
assert(a_("a").successful);
assert(a_("aa").successful);
assert(a_("b").successful);
ParseTree result = a_("a");
assert(result.name == `option!(literal!("a"))`);
assert(result.successful);
assert(result.matches == ["a"]);
assert(result.begin == 0);
assert(result.end == 1);
assert(result.children.length == 1);
assert(result.children == [ a("a")]);
result = a_("");
assert(result.name == `option!(literal!("a"))`);
assert(result.successful);
assert(result.matches is null);
assert(result.begin == 0);
assert(result.end == 0);
assert(result.children.length == 0);
assert(abc_("").successful);
assert(abc_("abc").successful);
assert(abc_("abcabc").successful);
assert(abc_("ab").successful);
result = abc_("abcdef");
assert(result.name == `option!(literal!("abc"))`);
assert(result.successful);
assert(result.matches == ["abc"]);
assert(result.begin == 0);
assert(result.end == 3);
assert(result.children.length == 1);
assert(result.children == [ abc("abcdef")]);
result = abc_("def");
assert(result.name == `option!(literal!("abc"))`);
assert(result.successful);
assert(result.matches is null);
assert(result.begin == 0);
assert(result.end == 0);
assert(result.children.length == 0);
}
/**
Tries 'r' on the input. If it succeeds, the rule also succeeds, without consuming any input.
If 'r' fails, then posLookahead!r also fails. Low-level implementation of '&r'.
*/
template posLookahead(alias r)
{
enum name = "posLookahead!(" ~ getName!(r) ~ ")";
ParseTree posLookahead(ParseTree p)
{
version (tracer)
{
if (shouldTrace(getName!(r)(), p))
trace(traceMsg(p, name, getName!(r)()));
}
ParseTree temp = r(p);
if (temp.successful)
return ParseTree(name, temp.successful, [], p.input, p.end, p.end);
else
return ParseTree(name, temp.successful, [temp.matches[$-1]], p.input, p.end, p.end);
}
ParseTree posLookahead(string input)
{
return .posLookahead!(r)(ParseTree("",false,[],input));
}
string posLookahead(GetName g)
{
return name;
}
}
unittest // 'posLookahead' unit test
{
alias literal!"a" a;
alias literal!"abc" abc;
alias posLookahead!(a) a_;
alias posLookahead!(abc) abc_;
assert(getName!(a_)() == `posLookahead!(literal!("a"))`);
assert(getName!(abc_)() == `posLookahead!(literal!("abc"))`);
assert(!a_("").successful);
assert(a_("a").successful);
assert(a_("aa").successful);
assert(!a_("b").successful);
ParseTree result = a_("a");
assert(result.name == `posLookahead!(literal!("a"))`);
assert(result.successful);
assert(result.matches is null);
assert(result.begin == 0);
assert(result.end == 0);
assert(result.children.length == 0);
result = a_("");
assert(result.name == `posLookahead!(literal!("a"))`);
assert(!result.successful);
assert(result.matches == [`"a"`], "posLookahead error message.");
assert(result.begin == 0);
assert(result.end == 0);
assert(result.children.length == 0);
assert(!abc_("").successful);
assert(abc_("abc").successful);
assert(abc_("abcabc").successful);
assert(!abc_("ab").successful);
result = abc_("abcdef");
assert(result.name == `posLookahead!(literal!("abc"))`);
assert(result.successful);
assert(result.matches is null);
assert(result.begin == 0);
assert(result.end == 0);
assert(result.children.length == 0);
result = abc_("def");
assert(result.name == `posLookahead!(literal!("abc"))`);
assert(!result.successful);
assert(result.matches == [`"abc"`], "posLookahead error message.");
assert(result.begin == 0);
assert(result.end == 0);
assert(result.children.length == 0);
}
/**
Tries 'r' on the input. If it fails, the rule succeeds, without consuming any input.
If 'r' succeeds, then negLookahead!r fails. Low-level implementation of '!r'.
*/
template negLookahead(alias r)
{
enum name = "negLookahead!(" ~ getName!(r) ~ ")";
ParseTree negLookahead(ParseTree p)
{
version (tracer)
{
if (shouldTrace(getName!(r)(), p))
trace(traceMsg(p, name, getName!(r)()));
}
ParseTree temp = r(p);
if (temp.successful)
return ParseTree(name, false, ["anything but \"" ~ p.input[temp.begin..temp.end] ~ "\""], p.input, p.end, p.end);
else
return ParseTree(name, true, [], p.input, p.end, p.end);
}
ParseTree negLookahead(string input)
{
return .negLookahead!(r)(ParseTree("",false,[],input));
}
string negLookahead(GetName g)
{
return name;
}
}
unittest // 'negLookahead' unit test
{
alias literal!"a" a;
alias literal!"abc" abc;
alias negLookahead!(a) a_;
alias negLookahead!(abc) abc_;
assert(getName!(a_)() == `negLookahead!(literal!("a"))`);
assert(getName!(abc_)() == `negLookahead!(literal!("abc"))`);
assert(a_("").successful);
assert(!a_("a").successful);
assert(!a_("aa").successful);
assert(a_("b").successful);
ParseTree result = a_("a");
assert(result.name == `negLookahead!(literal!("a"))`);
assert(!result.successful);
assert(result.matches == [`anything but "a"`]);
assert(result.begin == 0);
assert(result.end == 0);
assert(result.children.length == 0);
result = a_("");
assert(result.name == `negLookahead!(literal!("a"))`);
assert(result.successful);
assert(result.matches is null);
assert(result.begin == 0);
assert(result.end == 0);
assert(result.children.length == 0);
assert(abc_("").successful);
assert(!abc_("abc").successful);
assert(!abc_("abcabc").successful);
assert(abc_("ab").successful);
result = abc_("abcdef");
assert(result.name == `negLookahead!(literal!("abc"))`);
assert(!result.successful);
assert(result.matches == [`anything but "abc"`]);
assert(result.begin == 0);
assert(result.end == 0);
assert(result.children.length == 0);
result = abc_("def");
assert(result.name == `negLookahead!(literal!("abc"))`);
assert(result.successful);
assert(result.matches is null);
assert(result.begin == 0);
assert(result.end == 0);
assert(result.children.length == 0);
}
/**
Internal helper template, to get a parse tree node with a name. For example, given:
----
alias or!(literal!("abc"), charRange!('0','9')) myRule;
----
myRule gives nodes named "or", since its the parent rule. If you want nodes to be named "myRule",
use named. named just overwrites the original root node name, the children are left untouched.
See_Also: defined.
----
alias or!(literal!("abc"), charRange!('0','9')) rule;
alias named!(rule, "myRule") myRule;
auto input = "abc3";
auto p1 = rule(input);
auto p2 = myRule(input);
// They are both successful
assert(p1.successful && p2.successful);
assert(p1.matches == p2.matches);
// But the names are different
assert(p1.name == `or!(literal!("abc"), charRange!('0','9'))`);
assert(p2.name == `myRule`);
// Same children:
assert(p2.children == p1.children);
----
*/
template named(alias r, string name)
{
ParseTree named(ParseTree p)
{
ParseTree result = r(p);
result.name = name;
return result;
}
ParseTree named(string input)
{
return .named!(r,name)(ParseTree("",false,[],input));
}
string named(GetName g)
{
return name;
}
}
unittest // 'named' unit test
{
alias or!(literal!("abc"), charRange!('0','9')) rule;
alias named!(rule, "myRule") myRule;
assert(getName!(rule)() == `or!(literal!("abc"), charRange!('0','9'))`);
assert(getName!(myRule)() == "myRule");
// Equality on success (except for the name)
ParseTree result = rule("abc0");
ParseTree myResult = myRule("abc0");
assert(myResult.successful == result.successful);
assert(myResult.name == "myRule");
assert(myResult.matches == result.matches);
assert(myResult.begin == result.begin);
assert(myResult.end == result.end);
assert(myResult.children == result.children);
// Equality on failure (except for the name)
result = rule("_abc");
myResult = myRule("_abc");
assert(myResult.successful == result.successful);
assert(myResult.name == "myRule");
assert(myResult.matches == result.matches);
assert(myResult.begin == result.begin);
assert(myResult.end == result.end);
assert(myResult.children == result.children);
}
/**
Internal helper template, to get a parse tree node with a name, while keeping the original node (see also named).
For example, given:
----
alias or!(literal!("abc"), charRange!('0','9')) myRule;
----
myRule gives nodes named "or", since its the parent rule. If you want nodes to be named "myRule",
use defined. Contrary to named (see before), the original node is pushed as the child.
See_Also: named.
----
alias or!(literal!("abc"), charRange!('0','9')) rule;
alias defined!(rule, "myRule") myRule;
auto input = "abc3";
auto p1 = rule(input);
auto p2 = myRule(input);
// They are both successful
assert(p1.successful && p2.successful);
assert(p1.matches == p2.matches);
// But the names are different
assert(p1.name == `or!(literal!("abc"), charRange!('0','9'))`);
assert(p2.name == `myRule`);
// Here the original tree is not discarded:
assert(p2.children[0] == p1);
----
*/
template defined(alias r, string name)
{
ParseTree defined(ParseTree p)
{
ParseTree result = r(p);
result.children = [result];
result.name = name;
return result;
}
ParseTree defined(string input)
{
return .defined!(r,name)(ParseTree("",false,[],input));
}
string defined(GetName g)
{
return name;
}
}
unittest // 'defined' unit test
{
alias or!(literal!("abc"), charRange!('0','9')) rule;
alias defined!(rule, "myRule") myRule;
assert(getName!(rule)() == `or!(literal!("abc"), charRange!('0','9'))`);
assert(getName!(myRule)() == "myRule");
// Equality on success (except for the name)
ParseTree result = rule("abc0");
ParseTree myResult = myRule("abc0");
assert(myResult.successful && result.successful);
assert(myResult.name == "myRule");
assert(myResult.matches == result.matches);
assert(myResult.begin == result.begin);
assert(myResult.end == result.end);
assert(myResult.children[0] == result);
// Equality on failure (except for the name)
result = rule("_abc");
myResult = myRule("_abc");
assert(!myResult.successful && !result.successful);
assert(myResult.name == "myRule");
assert(myResult.matches == result.matches);
assert(myResult.begin == result.begin);
assert(myResult.end == result.end);
assert(myResult.children[0] == result);
}
/**
Low-level representation for the expression 'r {act}'. That is, it applies rule 'r'
on the input and then calls 'act' on the resulting ParseTree.
*/
template action(alias r, alias act)
{
ParseTree action(ParseTree p)
{
return act(r(p));
}
ParseTree action(string input)
{
return .action!(r,act)(ParseTree("",false,[],input));
}
string action(GetName g)
{
enum name = "action!("~ getName!(r)() ~ ", " ~ __traits(identifier, act) ~ ")";
return name;
}
}
unittest // 'action' unit test
{
ParseTree foo(ParseTree p)
{
p.matches ~= p.matches; // doubling matches
return p;
}
alias literal!("abc") abc;
alias action!(abc, foo) abcfoo;
assert(getName!(abcfoo) == `action!(literal!("abc"), foo)`);
ParseTree result = abcfoo("abc");
ParseTree reference = abc("abc");
assert(result.successful == reference.successful);
assert(result.successful);
assert(result.matches == reference.matches ~ reference.matches);
assert(result.begin == reference.begin);
assert(result.end == reference.end);
assert(result.children == reference.children);
// On failure
result = abcfoo("_abc");
reference = abc("_abc");
assert(result.successful == reference.successful);
assert(!result.successful);
assert(result.matches == reference.matches ~ reference.matches);
assert(result.begin == reference.begin);
assert(result.end == reference.end);
assert(result.children == reference.children);
}
/**
Concatenates a ParseTree's matches as one match and discards its children. Equivalent to the expression '~r'.
*/
template fuse(alias r)
{
ParseTree fuse(ParseTree p)
{
p = r(p);
if(p.successful)
{
if (p.matches.length != 0)
p.matches = [std.array.join(p.matches)];
p.children = null; // also discard children
}
return p;
}
ParseTree fuse(string input)
{
return .fuse!(r)(ParseTree("",false,[],input));
}
string fuse(GetName g)
{
enum name = "fuse!(" ~ getName!(r)() ~ ")";
return name;
}
}
unittest // 'fuse' unit test
{
alias oneOrMore!(literal!("abc")) abcs;
alias fuse!(abcs) f;
assert(getName!(f) == `fuse!(oneOrMore!(literal!("abc")))`);
ParseTree result = f("abcabcabc");
ParseTree reference = abcs("abcabcabc");
assert(result.successful == reference.successful);
assert(result.successful);
assert(reference.matches == ["abc", "abc", "abc"]);
assert(result.matches == ["abcabcabc"]);
assert(result.begin == reference.begin);
assert(result.end == reference.end);
assert(result.children is null);
// On failure
result = f("_abc");
reference = abcs("_abc");
assert(result.successful == reference.successful);
assert(!result.successful);
assert(result.matches == reference.matches);
assert(result.begin == reference.begin);
assert(result.end == reference.end);
assert(result.children == reference.children);
alias discard!(literal!("abc")) dabc;
alias fuse!(dabc) f2;
result = f2("abcabc");
reference = dabc("abcabc");
assert(result.successful);
assert(result.matches is null);
assert(result.begin == reference.begin);
assert(result.end == reference.end);
assert(result.children == reference.children);
}
/**
Calls 'r' on the input and then discards its children nodes.
*/
template discardChildren(alias r)
{
ParseTree discardChildren(ParseTree p)
{
p = r(p);
p.children = null;
return p;
}
ParseTree discardChildren(string input)
{
return .discardChildren!(r)(ParseTree("",false,[],input));
}
string discardChildren(GetName g)
{
enum name = "discardChildren!(" ~ getName!(r)() ~ ")";
return name;
}
}
/**
Calls 'r' on the input and then discards its matches.
*/
template discardMatches(alias r)
{
ParseTree discardMatches(ParseTree p)
{
p = r(p);
if (p.successful)
p.matches = null;
return p;
}
ParseTree discardMatches(string input)
{
return .discardMatches!(r)(ParseTree("",false,[],input));
}
string discardMatches(GetName g)
{
enum name = "discardMatches!(" ~ getName!(r)() ~ ")";
return name;
}
}
/**
Calls 'r' on the input and then discard everything 'r' returned: no children, no match and index
put at the end of the match. It's the low-level engine behind ':r'.
*/
template discard(alias r)
{
ParseTree discard(ParseTree p)
{
ParseTree result = r(p);
result.name = "discard!(" ~ getName!(r)() ~ ")";
//result.begin = result.end;
result.children = null;
if (result.successful)
result.matches = null;//to keep error messages, if any
return result;
}
ParseTree discard(string input)
{
return .discard!(r)(ParseTree("",false,[],input));
}
string discard(GetName g)
{
return "discard!(" ~ getName!(r)() ~ ")";
}
}
unittest // 'discard' unit test
{
alias literal!"abc" abc;
alias oneOrMore!abc abcs;
alias discard!(literal!("abc")) dabc;
alias discard!(oneOrMore!(literal!("abc")))dabcs;
ParseTree reference = abc("abc");
ParseTree result =dabc("abc");
assert(result.successful == reference.successful);
assert(result.successful);
assert(result.name == `discard!(literal!("abc"))`);
assert(result.matches is null);
assert(result.begin == reference.begin);
assert(result.end == reference.end);
assert(result.children is null);
reference = abcs("abcabcabc");
result = dabcs("abcabcabc");
assert(result.successful == reference.successful);
assert(result.successful);
assert(result.name == `discard!(oneOrMore!(literal!("abc")))`);
assert(result.matches is null);
assert(result.begin == reference.begin);
assert(result.end == reference.end);
assert(result.children is null);
// On failure
reference = abcs("");
result = dabcs("");
assert(result.successful == reference.successful);
assert(!result.successful);
assert(result.name == `discard!(oneOrMore!(literal!("abc")))`);
assert(result.matches == [`"abc"`], "discard error message.");
assert(result.begin == reference.begin);
assert(result.end == reference.end);
assert(result.children is null);
// Action on 'and'
alias and!(abc,dabc,abc) discardMiddle;
result = discardMiddle("abcabcabc");
assert(result.successful);
assert(result.matches == ["abc", "abc"]);
assert(result.begin == 0);
assert(result.end == 3*3);
assert(result.children.length == 2);
assert(result.children == [abc("abcabcabc"), abc(abc(abc("abcabcabc")))]);
}
/**
Calls 'r' on the input and then discards everything 'r' did, except its matches (so that
they propagate upwards). Equivalent to ';r'.
*/
template drop(alias r)
{
ParseTree drop(ParseTree p)
{
ParseTree result = r(p);
//result.begin = result.end;
result.children = null;
if (result.successful)
result.name = "drop!(" ~ getName!(r)() ~ ")";
return result;
}
ParseTree drop(string input)
{
return .drop!(r)(ParseTree("",false,[],input));
}
string drop(GetName g)
{
return "drop!(" ~ getName!(r)() ~ ")";
}
}
unittest // 'drop' unit test
{
alias literal!"abc" abc;
alias oneOrMore!abc abcs;
alias drop!(literal!("abc")) dabc;
alias drop!(oneOrMore!(literal!("abc"))) dabcs;
ParseTree reference = abc("abc");
ParseTree result =dabc("abc");
assert(result.successful == reference.successful);
assert(result.successful);
assert(result.name == `drop!(literal!("abc"))`);
assert(result.matches == reference.matches);
assert(result.begin == reference.begin);
assert(result.end == reference.end);
assert(result.children is null);
reference = abcs("abcabcabc");
result = dabcs("abcabcabc");
assert(result.successful == reference.successful);
assert(result.successful);
assert(result.name == `drop!(oneOrMore!(literal!("abc")))`);
assert(result.matches == reference.matches);
assert(result.begin == reference.begin);
assert(result.end == reference.end);
assert(result.children is null);
// On failure
reference = abcs("");
result = dabcs("");
assert(result.successful == reference.successful);
assert(!result.successful);
assert(result.name == reference.name);
assert(result.matches == [`"abc"`], "'drop' error message.");
assert(result.begin == reference.begin);
assert(result.end == reference.end);
assert(result.children is null);
// Action on 'and'
alias and!(abc,dabc,abc) discardMiddle;
result = discardMiddle("abcabcabc");
assert(result.successful);
assert(result.matches == ["abc", "abc", "abc"], "3 matches.");
assert(result.begin == 0);
assert(result.end == 3*3);
assert(result.children.length == 2, "but only 2 children.");
assert(result.children == [abc("abcabcabc"), abc(abc(abc("abcabcabc")))]);
}
/**
Makes r disappear in a sequence, letting its children take its place. It's equivalent
to the '%' operator. Given A <- B %C D and C <- E F, a successful parse for A will
generate a three with four children: B, E, F and D parse trees.
*/
template propagate(alias r)
{
ParseTree propagate(ParseTree p)
{
ParseTree result = r(p);
if (result.successful)
result.name = "propagate!(" ~ getName!(r)() ~ ")";
return result;
}
ParseTree propagate(string input)
{
return .propagate!(r)(ParseTree("",false,[],input));
}
string propagate(GetName g)
{
return "propagate!(" ~ getName!(r)() ~ ")";
}
}
/**
Makes 'r's result be kept when it would be discarded by the tree-decimation done by a grammar.
Equivalent to '^r'.
*/
template keep(alias r)
{
ParseTree keep(ParseTree p)
{
ParseTree result = r(p);
if (result.successful)
{
result.children = [result];
result.name = "keep!(" ~ getName!(r)() ~ ")";
}
return result;
}
ParseTree keep(string input)
{
return .keep!(r)(ParseTree("",false,[],input));
}
string keep(GetName g)
{
return "keep!(" ~ getName!(r)() ~ ")";
}
}
unittest // 'keep' unit test
{
// Grammar mimicry
struct KeepTest
{
static bool isRule(string s)
{
if (s == "A" || s == "KA")
return true;
else
return false;
}
mixin decimateTree;
// Equivalent to A <- 'a' 'b'
static ParseTree A(string s)
{
return decimateTree(named!(and!(literal!"a", literal!"b"), "A")(s));
}
// Here we use keep to protect 'b'
// Equivalent to KA <- 'a' ^'b'
static ParseTree KA(string s)
{
return decimateTree(named!(and!(literal!"a", keep!(literal!"b")), "KA")(s));
}
}
ParseTree reference = KeepTest.A("abc");
ParseTree result = KeepTest.KA("abc");
assert(result.successful == reference.successful);
assert(result.matches == reference.matches);
assert(result.matches == ["a","b"]);
assert(result.begin == reference.begin);
assert(result.end == reference.end);
assert(reference.children.length == 0);
assert(result.children.length == 1);
assert(result.children == [literal!("b")(literal!("a")("abc"))], "'b' node was kept.");
}
/* ****************** predefined rules ******************** */
alias named!(or!(literal!("\r\n"), literal!("\n"), literal!("\r")), "endOfLine") endOfLine; /// predefined end-of-line parser
alias endOfLine eol; /// helper alias.
alias or!(literal!(" "), literal!("\t"), literal!("\v")) space; /// predefined space-recognizing parser (space or tabulation).
alias named!(literal!"\t", "tab") tab; /// A parser recognizing \t (tabulation)
alias named!(fuse!(discardChildren!(oneOrMore!space)),
"spaces") spaces; /// aka '~space+'
alias or!(space, endOfLine) blank; /// Any blank char (spaces or end of line).
alias named!(discard!(zeroOrMore!blank),
"spacing") spacing; /// The basic space-management parser: discard zero or more blank spaces.
alias charRange!('0', '9') digit; /// Decimal digit: [0-9]
alias named!(fuse!(discardChildren!(oneOrMore!digit)), "digits") digits; /// [0-9]+
alias or!(charRange!('0','9'), charRange!('a','f'), charRange!('A', 'F')) hexDigit; /// Hexadecimal digit: [0-9a-fA-F]
alias charRange!('a', 'z') alpha; /// [a-z]
alias charRange!('A', 'Z') Alpha; /// [A-Z]
alias and!(oneOrMore!(or!(alpha, Alpha, literal!("_"))), zeroOrMore!(or!(digit, alpha, Alpha, literal!("_")))) ident;
alias named!(fuse!(discardChildren!ident),
"identifier") identifier; /// [a-zA-Z_][a-zA-Z_0-9]*, the basic C-family identifier
alias named!(fuse!(discardChildren!(and!(identifier, zeroOrMore!(and!(literal!".", identifier))))),
"qualifiedIdentifier") qualifiedIdentifier; /// qualified identifiers (ids separated by dots: abd.def.g).
alias named!(literal!"/", "slash") slash; /// A parser recognizing '/'
alias named!(literal!"\\", "backslash") backslash; /// A parser recognizing '\'
alias named!(literal!"'", "quote") quote; /// A parser recognizing ' (single quote)
alias named!(literal!"\"", "doublequote") doublequote; /// A parser recognizing " (double quote)
alias named!(literal!"`", "backquote") backquote; /// A parser recognizing $(BACKTICK) (backquote)
/// A list of elem's separated by sep's. One element minimum.
template list(alias elem, alias sep)
{
alias named!(spaceAnd!(oneOrMore!blank, and!(elem, zeroOrMore!(spaceAnd!(discardMatches!(sep), elem)))), "list") list;
}
/// A list of elem's separated by sep's. The empty list (no elem, no sep) is OK.
template list0(alias elem, alias sep)
{
alias named!(spaceAnd!(oneOrMore!blank, option!(and!(elem, zeroOrMore!(spaceAnd!(discardMatches!(sep), elem))))), "list0") list0;
}
template AddSpace(alias sp)
{
template AddSpace(alias r)
{
alias TypeTuple!(r, discard!sp) AddSpace;
}
}
/**
The engine formerly behind the '< ' Pegged rule: all sequence subelements of a rule are interspersed
with a space-consuming rule, given as the first template parameter. It's not used by Pegged anymore
but can be useful for low-level code. It might become deprecated, but it's not there yet.
----
alias and!(literal!"abc", literal!"def") rule1; // "abc" "def", equivalent to "abcdef"
alias spaceAnd!(oneOrMore!blank, literal!"abc", literal!"def") rule2; // "abc" "def", but with spaces in-between.
string input1 = "abcdef";
string input2 = " abc
def "; // with spaces and end of line markers.
assert(rule1(input1).successful); // OK
assert(!rule1(input2).successful); // NOK, couldn't find "def" after "abc"
assert(rule2(input1).successful); // OK
assert(rule2(input2).successful); // Still OK
assert(rule2(input2).matches == ["abc","def"]);// rule2 finds the literals among the spaces
----
As you can see on the previous line, spaceAnd discards the matched spaces
and returns matches only for the 'real' subrules.
Note: by using a non-space rule as the first template argument,
you can use spaceAnd as a generic 'find these patterns, possibly separated by this pattern' rule.
For example, using digits as separators:
----
alias spaceAnd!(digit, literal!"abc", litera!"def") rule3;
ParseTree result = rule3("123abc45def67890");
assert(rule3.successful);
assert(rule3.matches == ["abc", "def"]);
assert(rule3.children.length == 2);
assert(rule3.begin == 0;)
assert(rule3.end == "123abc45def67890".length);
----
*/
template spaceAnd(alias sp, rules...)
{
alias and!(discard!(zeroOrMore!sp), staticMap!(AddSpace!(zeroOrMore!sp), rules)) spaceAnd;
}
unittest // 'spaceAnd' unit test
{
alias literal!"a" a;
alias literal!"b" b;
//Basic use
alias and!(a,b) ab;
alias spaceAnd!(oneOrMore!blank, a, b) a_b;
ParseTree reference = ab("ab");
ParseTree result = a_b("ab");
assert(reference.successful);
assert(result.successful);
assert(result.matches == reference.matches);
assert(result.begin == reference.begin);
assert(result.end == reference.end);
assert(result.children == reference.children);
reference = ab(" a b ");
result = a_b( " a b ");
assert(!reference.successful);
assert(result.successful);
assert(result.matches == ["a","b"]);
assert(result.begin == 0);
assert(result.end == " a b ".length);
assert(result.children.length == 2);
reference = ab("ac");
result = a_b("ac");
assert(!reference.successful);
assert(!result.successful);
reference = ab(" a c ");
result = a_b(" a c ");
assert(!reference.successful);
assert(!result.successful);
// With another separator than spaces
alias spaceAnd!(digit, a, b) a0b;
assert(a0b("ab").successful);
assert(!a0b(" a b ").successful);
result = a0b("012a34b567");
assert(result.successful);
assert(result.matches == ["a", "b"]);
assert(result.begin == 0);
assert(result.end == "012a34b567".length);
assert(result.children.length == 2);
}
/// Mixin to simplify a parse tree inside a grammar
mixin template decimateTree()
{
static ParseTree decimateTree(ParseTree p)
{
if(p.children.length == 0) return p;
ParseTree[] filterChildren(ParseTree pt)
{
ParseTree[] result;
foreach(child; pt.children)
{
import std.algorithm : startsWith;
if ( (isRule(child.name) && child.matches.length != 0)
|| !child.successful && child.children.length == 0)
{
child.children = filterChildren(child);
result ~= child;
}
else if (child.name.startsWith("keep!(")) // 'keep' node are never discarded.
// They have only one child, the node to keep
{
result ~= child.children[0];
}
else // discard this node, but see if its children contain nodes to keep
{
result ~= filterChildren(child);
}
}
return result;
}
p.children = filterChildren(p);
return p;
}
}
/**
Discard one-child nodes and replace them with their children.
Most grammar tend to produce long one-child/one-child branches,
simplifyTree compacts these.
*/
ParseTree simplifyTree(ParseTree p)
{
foreach(ref child; p.children)
child = simplifyTree(child);
if (p.children.length != 1)
return p;
else // linear tree
return p.children[0];
}
/**
Returns: the number of nodes in a parse tree.
*/
size_t size(ParseTree p)
{
size_t result = 1;
foreach(child; p.children)
result += size(child);
return result;
}
/**
Generic ParseTree modifier:
predicate must be callable with a ParseTree and return a boolean.
modifier must be callable with a ParseTree and return a ParseTree.
If predicate is true on input, modify calls modifier on input and return the result.
If not, it continues with the children.
*/
ParseTree modify(alias predicate, alias modifier)(ParseTree input)
{
foreach(ref child; input.children)
child = modify!(predicate, modifier)(child);
if (predicate(input))
input = modifier(input);
return input;
}
|
D
|
/Users/laurennicoleroth/Development/SideMenus/Build/Intermediates/SideMenus.build/Debug-iphoneos/SideMenus.build/Objects-normal/arm64/AppDelegate.o : /Users/laurennicoleroth/Development/SideMenus/SideMenus/AppDelegate.swift /Users/laurennicoleroth/Development/SideMenus/SideMenus/View/FilterOptionCell.swift /Users/laurennicoleroth/Development/SideMenus/SideMenus/View/MenuOptionCell.swift /Users/laurennicoleroth/Development/SideMenus/SideMenus/Models/FilterOption.swift /Users/laurennicoleroth/Development/SideMenus/SideMenus/Models/MenuOption.swift /Users/laurennicoleroth/Development/SideMenus/SideMenus/Controllers/BrowseViewController.swift /Users/laurennicoleroth/Development/SideMenus/SideMenus/Controllers/ContainerViewController.swift /Users/laurennicoleroth/Development/SideMenus/SideMenus/Controllers/FiltersViewController.swift /Users/laurennicoleroth/Development/SideMenus/SideMenus/Controllers/MenuViewController.swift /Users/laurennicoleroth/Development/SideMenus/SideMenus/Utils/Protocols.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/Dispatch.apinotesc /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/ObjectiveC.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/CoreData.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/CoreImage.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/QuartzCore.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/Dispatch.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/Metal.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/CoreFoundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/CoreGraphics.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/UIKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/SwiftOnoneSupport.swiftmodule /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk/System/Library/Frameworks/OpenGLES.framework/Headers/OpenGLES.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk/System/Library/Frameworks/CoreData.framework/Headers/CoreData.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImage.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/QuartzCore.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk/System/Library/Frameworks/Security.framework/Headers/Security.apinotes
/Users/laurennicoleroth/Development/SideMenus/Build/Intermediates/SideMenus.build/Debug-iphoneos/SideMenus.build/Objects-normal/arm64/AppDelegate~partial.swiftmodule : /Users/laurennicoleroth/Development/SideMenus/SideMenus/AppDelegate.swift /Users/laurennicoleroth/Development/SideMenus/SideMenus/View/FilterOptionCell.swift /Users/laurennicoleroth/Development/SideMenus/SideMenus/View/MenuOptionCell.swift /Users/laurennicoleroth/Development/SideMenus/SideMenus/Models/FilterOption.swift /Users/laurennicoleroth/Development/SideMenus/SideMenus/Models/MenuOption.swift /Users/laurennicoleroth/Development/SideMenus/SideMenus/Controllers/BrowseViewController.swift /Users/laurennicoleroth/Development/SideMenus/SideMenus/Controllers/ContainerViewController.swift /Users/laurennicoleroth/Development/SideMenus/SideMenus/Controllers/FiltersViewController.swift /Users/laurennicoleroth/Development/SideMenus/SideMenus/Controllers/MenuViewController.swift /Users/laurennicoleroth/Development/SideMenus/SideMenus/Utils/Protocols.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/Dispatch.apinotesc /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/ObjectiveC.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/CoreData.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/CoreImage.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/QuartzCore.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/Dispatch.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/Metal.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/CoreFoundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/CoreGraphics.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/UIKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/SwiftOnoneSupport.swiftmodule /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk/System/Library/Frameworks/OpenGLES.framework/Headers/OpenGLES.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk/System/Library/Frameworks/CoreData.framework/Headers/CoreData.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImage.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/QuartzCore.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk/System/Library/Frameworks/Security.framework/Headers/Security.apinotes
/Users/laurennicoleroth/Development/SideMenus/Build/Intermediates/SideMenus.build/Debug-iphoneos/SideMenus.build/Objects-normal/arm64/AppDelegate~partial.swiftdoc : /Users/laurennicoleroth/Development/SideMenus/SideMenus/AppDelegate.swift /Users/laurennicoleroth/Development/SideMenus/SideMenus/View/FilterOptionCell.swift /Users/laurennicoleroth/Development/SideMenus/SideMenus/View/MenuOptionCell.swift /Users/laurennicoleroth/Development/SideMenus/SideMenus/Models/FilterOption.swift /Users/laurennicoleroth/Development/SideMenus/SideMenus/Models/MenuOption.swift /Users/laurennicoleroth/Development/SideMenus/SideMenus/Controllers/BrowseViewController.swift /Users/laurennicoleroth/Development/SideMenus/SideMenus/Controllers/ContainerViewController.swift /Users/laurennicoleroth/Development/SideMenus/SideMenus/Controllers/FiltersViewController.swift /Users/laurennicoleroth/Development/SideMenus/SideMenus/Controllers/MenuViewController.swift /Users/laurennicoleroth/Development/SideMenus/SideMenus/Utils/Protocols.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/Dispatch.apinotesc /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/ObjectiveC.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/CoreData.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/CoreImage.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/QuartzCore.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/Dispatch.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/Metal.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/CoreFoundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/CoreGraphics.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/UIKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64/SwiftOnoneSupport.swiftmodule /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk/System/Library/Frameworks/OpenGLES.framework/Headers/OpenGLES.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk/System/Library/Frameworks/CoreData.framework/Headers/CoreData.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImage.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/QuartzCore.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk/System/Library/Frameworks/Security.framework/Headers/Security.apinotes
|
D
|
/**
* Copyright: Copyright (c) 2011 Jacob Carlborg. All rights reserved.
* Authors: Jacob Carlborg
* Version: Initial created: Oct 6, 2011
* License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost Software License 1.0)
*/
module dstep.translator.Translator;
import std.file;
import std.array;
import clang.c.Index;
import clang.Cursor;
import clang.File;
import clang.Index;
import clang.TranslationUnit;
import clang.Type;
import clang.Util;
import dstep.core.Exceptions;
import dstep.Configuration;
import dstep.translator.Context;
import dstep.translator.Declaration;
import dstep.translator.Enum;
import dstep.translator.IncludeHandler;
import dstep.translator.objc.Category;
import dstep.translator.objc.ObjcInterface;
import dstep.translator.Options;
import dstep.translator.Output;
import dstep.translator.MacroDefinition;
import dstep.translator.Record;
import dstep.translator.Type;
import dstep.translator.TypeInference;
public import dstep.translator.Options;
class TranslationException : DStepException
{
this (string message, string file = __FILE__, size_t line = __LINE__)
{
super(message, file, line);
}
}
class Translator
{
private
{
TranslationUnit translationUnit;
string outputFile;
string inputFilename;
File inputFile;
Language language;
string[string] deferredDeclarations;
}
TypedMacroDefinition[string] typedMacroDefinitions;
Context context;
this (TranslationUnit translationUnit, Options options = Options.init)
{
this.inputFilename = translationUnit.spelling;
this.translationUnit = translationUnit;
outputFile = options.outputFile;
language = options.language;
inputFile = translationUnit.file(inputFilename);
context = new Context(translationUnit, options, this);
}
void translate ()
{
write(outputFile, translateToString());
}
Output translateCursors()
{
Output result = new Output(context.commentIndex);
typedMacroDefinitions = inferMacroSignatures(context);
bool first = true;
foreach (cursor, parent; translationUnit.cursor.allInOrder)
{
if (!skipDeclaration(cursor))
{
if (first)
{
if (result.flushHeaderComment())
result.separator();
externDeclaration(result);
first = false;
}
translateInGlobalScope(result, cursor, parent);
}
}
if (context.commentIndex)
result.flushLocation(context.commentIndex.queryLastLocation());
foreach (value; deferredDeclarations.values)
result.singleLine(value);
result.finalize();
return result;
}
string translateToString()
{
import std.algorithm.mutation : strip;
Output main = translateCursors();
Output head = new Output();
moduleDeclaration(head);
context.includeHandler.toImports(head);
return main.header ~ head.data ~ main.content;
}
void translateInGlobalScope(
Output output,
Cursor cursor,
Cursor parent = Cursor.empty)
{
translate(output, cursor, parent);
if (!context.globalScope.empty)
{
output.separator();
output.output(context.globalScope);
output.separator();
context.globalScope.reset();
}
}
void translate (
Output output,
Cursor cursor,
Cursor parent = Cursor.empty)
{
with (CXCursorKind)
{
switch (cursor.kind)
{
case objCInterfaceDecl:
output.flushLocation(cursor.extent, false);
translateObjCInterfaceDecl(output, cursor, parent);
break;
case objCProtocolDecl:
output.flushLocation(cursor.extent, false);
translateObjCProtocolDecl(output, cursor, parent);
break;
case objCCategoryDecl:
output.flushLocation(cursor.extent, false);
translateObjCCategoryDecl(output, cursor, parent);
break;
case varDecl:
output.flushLocation(cursor.extent);
translateVarDecl(output, cursor, parent);
break;
case functionDecl:
translateFunctionDecl(output, cursor, parent);
break;
case typedefDecl:
translateTypedefDecl(output, cursor);
break;
case structDecl:
translateRecord(output, context, cursor);
break;
case enumDecl:
translateEnum(output, context, cursor);
break;
case unionDecl:
translateRecord(output, context, cursor);
break;
case macroDefinition:
output.flushLocation(cursor.extent);
translateMacroDefinition(output, cursor, parent);
break;
case macroExpansion:
output.flushLocation(cursor.extent);
break;
default:
break;
}
}
}
void translateObjCInterfaceDecl(Output output, Cursor cursor, Cursor parent)
{
(new ObjcInterface!(ClassData)(cursor, parent, this)).translate(output);
}
void translateObjCProtocolDecl(Output output, Cursor cursor, Cursor parent)
{
(new ObjcInterface!(InterfaceData)(cursor, parent, this)).translate(output);
}
void translateObjCCategoryDecl(Output output, Cursor cursor, Cursor parent)
{
(new Category(cursor, parent, this)).translate(output);
}
void translateVarDecl(Output output, Cursor cursor, Cursor parent)
{
version (D1)
string storageClass = "extern ";
else
string storageClass = "extern __gshared ";
variable(output, cursor, storageClass);
}
void translateFunctionDecl(Output output, Cursor cursor, Cursor parent)
{
output.flushLocation(cursor.extent);
immutable auto name = translateIdentifier(cursor.spelling);
output.adaptiveSourceNode(translateFunction(context, cursor.func, name));
output.append(";");
}
void declareRecordForTypedef(Output output, Cursor typedef_)
{
assert(typedef_.kind == CXCursorKind.typedefDecl);
auto underlying = typedef_.underlyingCursor();
if (underlying.isEmpty)
return;
if (underlying.isEmpty ||
underlying.kind != CXCursorKind.structDecl &&
underlying.kind != CXCursorKind.unionDecl)
return;
if (context.alreadyDefined(underlying.canonical))
return;
bool skipdef = shouldSkipRecordDefinition(context, underlying);
if (underlying.definition.isEmpty || skipdef)
translateRecordDecl(output, context, underlying);
}
bool shouldSkipAlias(Cursor typedef_)
{
assert(typedef_.kind == CXCursorKind.typedefDecl);
return context.options.reduceAliases && typedef_.type.isAliasReducible;
}
void translateTypedefDecl(Output output, Cursor typedef_)
{
assert(typedef_.kind == CXCursorKind.typedefDecl);
output.flushLocation(typedef_.extent);
auto underlying = typedef_.underlyingCursor;
if (!context.shouldSkipRecord(underlying) && !shouldSkipAlias(typedef_))
{
declareRecordForTypedef(output, typedef_);
auto typedefp = context.typedefParent(underlying);
if (typedef_ != typedefp ||
underlying.isEmpty ||
(underlying.spelling != typedef_.spelling &&
underlying.spelling != ""))
{
auto canonical = typedef_.type.canonical;
auto spelling = typedef_.spelling;
auto type = translateType(context, typedef_, canonical);
version (D1)
{
output.adaptiveSourceNode(
type.wrapWith("alias ", " " ~ spelling ~ ";"));
}
else
{
output.adaptiveSourceNode(
type.wrapWith("alias " ~ spelling ~ " = ", ";"));
}
context.markAsDefined(typedef_);
}
}
}
void translateMacroDefinition(Output output, Cursor cursor, Cursor parent)
{
if (context.options.translateMacros)
{
if (auto definition = cursor.spelling in typedMacroDefinitions)
{
dstep.translator.MacroDefinition
.translateMacroDefinition(output, context, *definition);
}
}
}
void variable (Output output, Cursor cursor, string prefix = "")
{
translateVariable(output, context, cursor, prefix);
}
private:
bool skipDeclaration (Cursor cursor)
{
return (inputFilename != "" &&
inputFile != cursor.location.spelling.file)
|| context.options.skipSymbols.contains(cursor.spelling)
|| cursor.isPredefined;
}
void moduleDeclaration (Output output)
{
if (context.options.packageName != "")
{
output.singleLine("module %s;", fullModuleName(
context.options.packageName,
context.options.outputFile,
context.options.normalizeModules));
output.separator();
}
}
void externDeclaration (Output output)
{
final switch (language)
{
case Language.c:
output.singleLine("extern (C):");
break;
case Language.objC:
output.singleLine("extern (Objective-C):");
break;
}
foreach (attribute; context.options.globalAttributes)
output.singleLine("%s:", attribute);
output.separator();
}
}
SourceNode translateFunction (
Context context,
FunctionCursor func,
string name,
bool isStatic = false)
{
bool isVariadic(Context context, size_t numParams, FunctionCursor func)
{
if (func.isVariadic)
{
if (context.options.zeroParamIsVararg)
return true;
else if (numParams == 0)
return false;
else
return true;
}
return false;
}
Parameter[] params;
if (func.type.isValid) // This will be invalid for Objective-C methods
params.reserve(func.type.func.arguments.length);
foreach (param ; func.parameters)
{
auto type = translateType(context, param);
params ~= Parameter(type, param.spelling);
}
auto resultType = translateType(context, func, func.resultType);
auto multiline = func.extent.isMultiline &&
!context.options.singleLineFunctionSignatures;
auto spacer = context.options.spaceAfterFunctionName ? " " : "";
return translateFunction(
resultType,
name,
params,
isVariadic(context, params.length, func),
isStatic ? "static " : "",
spacer,
multiline);
}
package struct Parameter
{
SourceNode type;
string name;
bool isConst;
}
package SourceNode translateFunction (
SourceNode resultType,
string name,
Parameter[] parameters,
bool variadic,
string prefix = "",
string spacer = " ",
bool multiline = false)
{
import std.format : format;
string[] params;
params.reserve(parameters.length);
foreach (param ; parameters)
{
string p;
version(D1)
{
p ~= param.type;
}
else
{
if (param.isConst)
p ~= "const(";
p ~= param.type.makeString();
if (param.isConst)
p ~= ')';
}
if (param.name.length)
p ~= " " ~ translateIdentifier(param.name);
params ~= p;
}
if (variadic)
params ~= "...";
auto result = makeSourceNode(
format("%s%s %s%s(", prefix, resultType.makeString(), name, spacer),
params,
",",
")");
return multiline ? result : result.flatten();
}
void translateVariable (Output output, Context context, Cursor cursor, string prefix = "")
{
if (!context.alreadyDefined(cursor.canonical))
{
auto type = translateType(context, cursor, cursor.type);
auto identifier = translateIdentifier(cursor.spelling);
output.adaptiveSourceNode(type.wrapWith(prefix, " " ~ identifier ~ ";"));
context.markAsDefined(cursor.canonical);
}
}
string translateIdentifier (string str)
{
return isDKeyword(str) ? str ~ '_' : str;
}
void handleInclude (Context context, Type type)
{
import std.algorithm.searching;
import std.path;
if (type.kind == CXTypeKind.typedef_
&& type.spelling == "time_t"
&& type.declaration.path.asNormalizedPath.array.endsWith("sys\\types.h"))
context.includeHandler.addInclude("time.h");
else
context.includeHandler.addInclude(type.declaration.path);
}
bool isDKeyword (string str)
{
switch (str)
{
case "abstract":
case "alias":
case "align":
case "asm":
case "assert":
case "auto":
case "body":
case "bool":
case "break":
case "byte":
case "case":
case "cast":
case "catch":
case "cdouble":
case "cent":
case "cfloat":
case "char":
case "class":
case "const":
case "continue":
case "creal":
case "dchar":
case "debug":
case "default":
case "delegate":
case "delete":
case "deprecated":
case "do":
case "double":
case "else":
case "enum":
case "export":
case "extern":
case "false":
case "final":
case "finally":
case "float":
case "for":
case "foreach":
case "foreach_reverse":
case "function":
case "goto":
case "idouble":
case "if":
case "ifloat":
case "import":
case "in":
case "inout":
case "int":
case "interface":
case "invariant":
case "ireal":
case "is":
case "lazy":
case "long":
case "macro":
case "mixin":
case "module":
case "new":
case "nothrow":
case "null":
case "out":
case "override":
case "package":
case "pragma":
case "private":
case "protected":
case "public":
case "pure":
case "real":
case "ref":
case "return":
case "scope":
case "shared":
case "short":
case "static":
case "struct":
case "super":
case "switch":
case "synchronized":
case "template":
case "this":
case "throw":
case "true":
case "try":
case "typedef":
case "typeid":
case "typeof":
case "ubyte":
case "ucent":
case "uint":
case "ulong":
case "union":
case "unittest":
case "ushort":
case "version":
case "void":
case "volatile":
case "wchar":
case "while":
case "with":
case "__FILE__":
case "__LINE__":
case "__DATE__":
case "__TIME__":
case "__TIMESTAMP__":
case "__VENDOR__":
case "__VERSION__":
return true;
default: break;
}
if (true /*D2*/)
{
switch (str)
{
case "immutable":
case "nothrow":
case "pure":
case "shared":
case "__gshared":
case "__thread":
case "__traits":
case "__EOF__":
return true;
default: return str.length && str[0] == '@';
}
}
return false;
}
|
D
|
/**
* Copyright: Copyright (c) 2012 Jacob Carlborg. All rights reserved.
* Authors: Jacob Carlborg
* Version: Initial created: Jan 30, 2012
* License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost Software License 1.0)
*/
module dstep.translator.Type;
import std.conv;
import std.string;
import std.range;
import std.typecons: Nullable;
import clang.c.Index;
import clang.Cursor;
import clang.Type;
import clang.Token: Token;
import dstep.translator.Context;
import dstep.translator.IncludeHandler;
import dstep.translator.Translator;
import dstep.translator.Output;
SourceNode translateType (Context context, Cursor cursor, bool rewriteIdToObjcObject = true, bool applyConst = true)
{
return translateType(context, cursor, cursor.type, rewriteIdToObjcObject, applyConst);
}
SourceNode translateType (Context context, Cursor cursor, Type type, bool rewriteIdToObjcObject = true, bool applyConst = true)
in
{
assert(type.isValid);
}
do
{
SourceNode result;
with (CXTypeKind)
{
if (type.kind == blockPointer || type.isFunctionPointerType)
result = translateFunctionPointerType(context, cursor, type.pointee.func);
else if (type.isFunctionType)
result = translateFunctionPointerType(context, cursor, type.canonical.func);
else if (type.kind == objCObjectPointer && !type.isObjCBuiltinType)
result = translateObjCObjectPointerType(context, cursor, type);
else if (type.isWideCharType)
result = makeSourceNode("wchar");
else if (type.isObjCIdType)
result = makeSourceNode(rewriteIdToObjcObject ? "ObjcObject" : "id");
else
switch (type.kind)
{
case pointer:
return translatePointer(context, cursor, type, rewriteIdToObjcObject, applyConst);
case typedef_:
result = translateTypedef(context, type).makeSourceNode();
break;
case record:
case enum_:
result = makeSourceNode(context.translateTagSpelling(type.declaration));
handleInclude(context, type);
break;
case objCInterface:
if (type.spelling.empty)
result = makeSourceNode(context.getAnonymousName(type.declaration));
else
result = makeSourceNode(type.spelling);
handleInclude(context, type);
break;
case constantArray:
case incompleteArray:
result = translateArray(
context,
cursor,
type,
rewriteIdToObjcObject,
type.array.numDimensions - 1);
break;
case unexposed:
result = translateUnexposed(
context,
type,
rewriteIdToObjcObject);
break;
case elaborated:
result = translateElaborated(
context,
cursor,
type,
rewriteIdToObjcObject);
break;
case complex:
result = translateComplex(type).makeSourceNode();
break;
default:
result = translateType(
context,
type.kind,
rewriteIdToObjcObject)
.makeSourceNode();
}
}
version (D1)
{
// ignore const
}
else
{
if (applyConst && type.isConst)
result = result.prefixWith("const ");
}
return result;
}
SourceNode translateElaborated (Context context, Cursor cursor, Type type, bool rewriteIdToObjcObject = true, bool applyConst = true)
{
auto named = type.named();
if (named.kind == CXTypeKind.record || named.kind == CXTypeKind.enum_)
{
auto result = context.translateTagSpelling(named.declaration);
handleInclude(context, type);
return result.makeSourceNode();
}
else
{
return translateType(
context,
cursor,
type.named,
rewriteIdToObjcObject);
}
}
string translateSelector (string str, bool fullName = false, bool translateIdentifier = true)
{
import std.array : replace;
import std.string : indexOf;
if (fullName)
str = str.replace(":", "_");
else
{
auto i = str.indexOf(":");
if (i > -1)
str = str[0 .. i];
}
return translateIdentifier ? .translateIdentifier(str) : str;
}
package string reduceAlias(Type type)
{
import std.typecons;
enum aliasMapping = [
tuple("byte", CXTypeKind.uChar): "ubyte",
tuple("BOOL", CXTypeKind.bool_): "bool",
tuple("BOOL", CXTypeKind.sChar): "bool",
tuple("int8_t", CXTypeKind.sChar): "byte",
tuple("int16_t", CXTypeKind.short_): "short",
tuple("int32_t", CXTypeKind.int_): "int",
tuple("int64_t", CXTypeKind.longLong): "long",
tuple("uint8_t", CXTypeKind.uChar): "ubyte",
tuple("uint16_t", CXTypeKind.uShort): "ushort",
tuple("uint32_t", CXTypeKind.uInt): "uint",
tuple("uint64_t", CXTypeKind.uLongLong): "ulong",
tuple("__s8", CXTypeKind.sChar): "byte",
tuple("__s16", CXTypeKind.short_): "short",
tuple("__s32", CXTypeKind.int_): "int",
tuple("__s64", CXTypeKind.longLong): "long",
tuple("__u8", CXTypeKind.uChar): "ubyte",
tuple("__u16", CXTypeKind.uShort): "ushort",
tuple("__u32", CXTypeKind.uInt): "uint",
tuple("__u64", CXTypeKind.uLongLong): "ulong",
tuple("s8", CXTypeKind.sChar): "byte",
tuple("s16", CXTypeKind.short_): "short",
tuple("s32", CXTypeKind.int_): "int",
tuple("s64", CXTypeKind.longLong): "long",
tuple("u8", CXTypeKind.uChar): "ubyte",
tuple("u16", CXTypeKind.uShort): "ushort",
tuple("u32", CXTypeKind.uInt): "uint",
tuple("u64", CXTypeKind.uLongLong): "ulong"
];
auto canonical = type.canonical;
auto kind = canonical.kind;
if (kind == CXTypeKind.long_ && canonical.sizeOf == 8)
kind = CXTypeKind.longLong;
else if (kind == CXTypeKind.uLong && canonical.sizeOf == 8)
kind = CXTypeKind.uLongLong;
if (auto alias_ = tuple(type.spelling, kind) in aliasMapping)
return *alias_;
else
return null;
}
package bool isAliasReducible(Type type)
{
return reduceAlias(type) != null;
}
private:
string translateWCharT(Context context, Type type)
{
if (context.options.portableWCharT)
{
context.includeHandler.addImport("core.stdc.stddef");
return "wchar_t";
}
else if (type.canonical.kind.isIntegral)
{
auto sizeOf = type.canonical.sizeOf;
if (sizeOf == 4)
return "dchar";
else if (sizeOf == 2)
return "wchar";
}
return "<unimplemented>";
}
string translateTypedef(Context context, Type type)
{
if (context.options.reduceAliases)
{
if (auto transl = reduceAlias(type))
return transl;
}
auto spelling = type.spelling;
with (CXTypeKind)
switch (spelling)
{
case "size_t":
case "ptrdiff_t":
case "sizediff_t":
return spelling;
case "wchar_t":
return translateWCharT(context, type);
default: break;
}
handleInclude(context, type);
if (isDKeyword(type.spelling))
{
return type.spelling != translateType(context, type.canonical.kind)
? renameDKeyword(type.spelling)
: type.spelling;
}
else
{
return type.spelling;
}
}
SourceNode translateUnexposed (Context context, Type type, bool rewriteIdToObjcObject)
in
{
assert(type.kind == CXTypeKind.unexposed);
}
do
{
auto declaration = type.declaration;
if (declaration.isValid)
return translateType(context, declaration, rewriteIdToObjcObject);
else
return translateType(context, type.kind, rewriteIdToObjcObject)
.makeSourceNode();
}
string translateComplex (Type type)
{
switch (type.element.kind)
{
case CXTypeKind.float_: return "cfloat";
case CXTypeKind.double_: return "cdouble";
case CXTypeKind.longDouble: return "creal";
default: return "<unimplemented>";
}
}
SourceNode translateArrayElement(
Context context,
Cursor cursor,
ArrayType array,
bool rewriteIdToObjcObject)
{
import std.format : format;
bool isConst = array.elementType.isConst;
auto type = translateType(
context,
cursor,
array.elementType,
rewriteIdToObjcObject,
!isConst);
if (isConst)
return type.wrapWith("const(", ")");
else
return type;
}
SourceNode translateArray (
Context context,
Cursor cursor,
Type type,
bool rewriteIdToObjcObject,
size_t dimension = 0)
in
{
assert(type.kind == CXTypeKind.constantArray
|| type.kind == CXTypeKind.incompleteArray);
}
do
{
import std.format : format;
auto array = type.array;
SourceNode elementType;
if (array.elementType.kind == CXTypeKind.constantArray)
{
elementType = translateArray(
context,
cursor,
array.elementType,
rewriteIdToObjcObject,
dimension == 0 ? 0 : dimension - 1);
}
else
{
elementType = translateArrayElement(
context,
cursor,
array,
rewriteIdToObjcObject);
}
if (array.size >= 0)
{
auto children = cursor.filterChildren(
CXCursorKind.integerLiteral,
CXCursorKind.declRefExpr);
auto maybeRef(T)(auto ref T value) {
return cursor.semanticParent.kind == CXCursorKind.functionDecl && dimension == 0
? elementType.wrapWith("ref ", format("[%s]", value))
: elementType.suffixWith(format("[%s]", value));
}
if (dimension < children.length)
{
if (children[dimension].kind == CXCursorKind.integerLiteral)
{
auto token = tokenInsideSquareBrackets(cursor, dimension);
if (!token.isNull)
{
return maybeRef(token.spelling);
}
auto expansions = context.macroIndex.queryExpansion(children[dimension]);
if (expansions.length == 1)
return elementType.suffixWith(format("[%s]", expansions[0].spelling));
}
else if (children[dimension].kind == CXCursorKind.declRefExpr)
{
return elementType.suffixWith(format("[%s]", children[dimension].spelling));
}
}
return maybeRef(array.size);
}
else if (cursor.semanticParent.kind == CXCursorKind.functionDecl)
{
return elementType.suffixWith("*");
}
else
{
// FIXME: Find a way to translate references to static external arrays with unknown size.
// extern static arrays (which are normally present in bindings)
// have same ABI as extern dynamic arrays, size is only checked
// against declaration in header. As it is not possible in D
// to define static array with ABI of dynamic one, only way is to
// abandon the size information
return elementType.suffixWith("[]");
}
}
// find the token for a (possibly multidimensioned) array for a certain dimension,
// e.g. int foo[1][2][3] will find the "3" for dimension 0 due to the differences
// in array declarations between D and C
private Nullable!Token tokenInsideSquareBrackets(Cursor cursor, in size_t dimension)
{
import std.algorithm: find;
import std.range: retro;
import clang.Token: TokenKind;
auto fromNextBracket(R)(R tokens)
{
return tokens.find!(a => a.kind == TokenKind.punctuation && a.spelling == "]");
}
auto tokens = cursor.tokens.retro.find!(_ => true);
// dimension + 1 since dimension is 0-indexed and we need to find at least one
foreach(_; 0 .. dimension + 1)
{
tokens = fromNextBracket(tokens);
if (tokens.empty) return typeof(return).init;
tokens.popFront;
}
return tokens.empty
? typeof(return).init
: typeof(return)(tokens.front);
}
SourceNode translatePointer (
Context context,
Cursor cursor,
Type type,
bool rewriteIdToObjcObject,
bool applyConst)
in
{
assert(type.kind == CXTypeKind.pointer);
}
do
{
static bool valueTypeIsConst (Type type)
{
auto pointee = type.pointee;
while (pointee.kind == CXTypeKind.pointer)
pointee = pointee.pointee;
return pointee.isConst;
}
auto result = translateType(context, cursor, type.pointee, rewriteIdToObjcObject, false);
version (D1)
{
result = result ~ '*';
}
else
{
if (applyConst && valueTypeIsConst(type))
{
if (type.isConst)
result = result.wrapWith("const ", "*");
else
result = result.wrapWith("const(", ")*");
}
else
result = result.suffixWith("*");
}
return result;
}
Parameter translateParameter (Context context, Cursor parameter)
{
Parameter result;
result.type = translateType(context, parameter);
result.name = parameter.spelling;
result.isConst = false;
return result;
}
Parameter[] translateParameters (Context context, Cursor cursor, FuncType func)
{
import std.array : Appender;
auto result = Appender!(Parameter[])();
auto arguments = func.arguments;
foreach (child; cursor.all)
{
if (child.kind == CXCursorKind.parmDecl)
result.put(translateParameter(context, child));
}
return result.data;
}
SourceNode translateFunctionPointerType (Context context, Cursor cursor, FuncType func)
{
auto params = translateParameters(context, cursor, func);
auto result = translateType(context, cursor, func.resultType);
auto spacer = context.options.spaceAfterFunctionName ? " " : "";
auto multiline = cursor.extent.isMultiline &&
!context.options.singleLineFunctionSignatures;
return translateFunction(
result,
"function",
params,
func.isVariadic,
"",
spacer,
multiline);
}
SourceNode translateObjCObjectPointerType (Context context, Cursor cursor, Type type)
in
{
assert(type.kind == CXTypeKind.objCObjectPointer && !type.isObjCBuiltinType);
}
do
{
auto pointee = type.pointee;
if (pointee.spelling == "Protocol")
return "Protocol*".makeSourceNode();
else
return translateType(context, cursor, pointee);
}
string translateType (Context context, CXTypeKind kind, bool rewriteIdToObjcObject = true)
{
import std.conv;
with (CXTypeKind)
switch (kind)
{
case invalid: return "<unimplemented>";
case unexposed: return "<unimplemented>";
case void_: return "void";
case bool_: return "bool";
case charU: return "<unimplemented>";
case uChar: return "ubyte";
case char16: return "wchar";
case char32: return "dchar";
case uShort: return "ushort";
case uInt: return "uint";
case uLong:
context.includeHandler.addCompatible();
return "c_ulong";
case uLongLong: return "ulong";
case uInt128: return "<unimplemented>";
case charS: return "char";
case sChar: return "byte";
case wChar: return "wchar";
case short_: return "short";
case int_: return "int";
case long_:
context.includeHandler.addCompatible();
return "c_long";
case longLong: return "long";
case int128: return "<unimplemented>";
case float_: return "float";
case double_: return "double";
case longDouble: return "real";
case nullPtr: return "null";
case overload: return "<unimplemented>";
case dependent: return "<unimplemented>";
case objCId: return rewriteIdToObjcObject ? "ObjcObject" : "id";
case objCClass: return "Class";
case objCSel: return "SEL";
case pointer:
case blockPointer:
case lValueReference:
case rValueReference:
case record:
case enum_:
case typedef_:
case functionNoProto:
case functionProto:
case vector:
case incompleteArray:
case variableArray:
case dependentSizedArray:
case memberPointer:
case elaborated:
return "<unimplemented>";
default: assert(0, "Unhandled type kind " ~ to!string(kind));
}
}
|
D
|
/Users/work/Projects/Hello/.build/x86_64-apple-macosx10.10/debug/DatabaseKit.build/Connection/DatabaseStringFindable.swift.o : /Users/work/Projects/Hello/.build/checkouts/database-kit.git--3872818599693266265/Sources/DatabaseKit/Utilities/Deprecated.swift /Users/work/Projects/Hello/.build/checkouts/database-kit.git--3872818599693266265/Sources/DatabaseKit/KeyedCache/KeyedCache.swift /Users/work/Projects/Hello/.build/checkouts/database-kit.git--3872818599693266265/Sources/DatabaseKit/KeyedCache/DatabaseKeyedCache.swift /Users/work/Projects/Hello/.build/checkouts/database-kit.git--3872818599693266265/Sources/DatabaseKit/KeyedCache/DictionaryKeyedCache.swift /Users/work/Projects/Hello/.build/checkouts/database-kit.git--3872818599693266265/Sources/DatabaseKit/KeyedCache/MemoryKeyedCache.swift /Users/work/Projects/Hello/.build/checkouts/database-kit.git--3872818599693266265/Sources/DatabaseKit/ConnectionPool/DatabaseConnectionPoolCache.swift /Users/work/Projects/Hello/.build/checkouts/database-kit.git--3872818599693266265/Sources/DatabaseKit/Connection/DatabaseStringFindable.swift /Users/work/Projects/Hello/.build/checkouts/database-kit.git--3872818599693266265/Sources/DatabaseKit/Connection/DatabaseConnectable.swift /Users/work/Projects/Hello/.build/checkouts/database-kit.git--3872818599693266265/Sources/DatabaseKit/Database/DatabaseQueryable.swift /Users/work/Projects/Hello/.build/checkouts/database-kit.git--3872818599693266265/Sources/DatabaseKit/Utilities/URL+DatabaseName.swift /Users/work/Projects/Hello/.build/checkouts/database-kit.git--3872818599693266265/Sources/DatabaseKit/Database/Database.swift /Users/work/Projects/Hello/.build/checkouts/database-kit.git--3872818599693266265/Sources/DatabaseKit/Database/ConfiguredDatabase.swift /Users/work/Projects/Hello/.build/checkouts/database-kit.git--3872818599693266265/Sources/DatabaseKit/Database/DatabaseConfig.swift /Users/work/Projects/Hello/.build/checkouts/database-kit.git--3872818599693266265/Sources/DatabaseKit/ConnectionPool/DatabaseConnectionPoolConfig.swift /Users/work/Projects/Hello/.build/checkouts/database-kit.git--3872818599693266265/Sources/DatabaseKit/KeyedCache/KeyedCacheSupporting.swift /Users/work/Projects/Hello/.build/checkouts/database-kit.git--3872818599693266265/Sources/DatabaseKit/Log/LogSupporting.swift /Users/work/Projects/Hello/.build/checkouts/database-kit.git--3872818599693266265/Sources/DatabaseKit/Log/DatabaseLog.swift /Users/work/Projects/Hello/.build/checkouts/database-kit.git--3872818599693266265/Sources/DatabaseKit/ConnectionPool/Container+ConnectionPool.swift /Users/work/Projects/Hello/.build/checkouts/database-kit.git--3872818599693266265/Sources/DatabaseKit/ConnectionPool/DatabaseConnectionPool.swift /Users/work/Projects/Hello/.build/checkouts/database-kit.git--3872818599693266265/Sources/DatabaseKit/Connection/Container+CachedConnection.swift /Users/work/Projects/Hello/.build/checkouts/database-kit.git--3872818599693266265/Sources/DatabaseKit/Connection/DatabaseConnection.swift /Users/work/Projects/Hello/.build/checkouts/database-kit.git--3872818599693266265/Sources/DatabaseKit/Connection/Container+NewConnection.swift /Users/work/Projects/Hello/.build/checkouts/database-kit.git--3872818599693266265/Sources/DatabaseKit/Service/DatabaseKitProvider.swift /Users/work/Projects/Hello/.build/checkouts/database-kit.git--3872818599693266265/Sources/DatabaseKit/Log/DatabaseLogger.swift /Users/work/Projects/Hello/.build/checkouts/database-kit.git--3872818599693266265/Sources/DatabaseKit/Database/DatabaseIdentifier.swift /Users/work/Projects/Hello/.build/checkouts/database-kit.git--3872818599693266265/Sources/DatabaseKit/Log/DatabaseLogHandler.swift /Users/work/Projects/Hello/.build/checkouts/database-kit.git--3872818599693266265/Sources/DatabaseKit/Log/PrintLogHandler.swift /Users/work/Projects/Hello/.build/checkouts/database-kit.git--3872818599693266265/Sources/DatabaseKit/Utilities/DatabaseKitError.swift /Users/work/Projects/Hello/.build/checkouts/database-kit.git--3872818599693266265/Sources/DatabaseKit/Database/Databases.swift /Users/work/Projects/Hello/.build/checkouts/database-kit.git--3872818599693266265/Sources/DatabaseKit/Utilities/Exports.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Dispatch.apinotesc /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/ObjectiveC.swiftmodule /Users/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/Service.swiftmodule /Users/work/Projects/Hello/.build/x86_64-apple-macosx10.10/debug/Core.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/DatabaseKit.build/DatabaseStringFindable~partial.swiftmodule : /Users/work/Projects/Hello/.build/checkouts/database-kit.git--3872818599693266265/Sources/DatabaseKit/Utilities/Deprecated.swift /Users/work/Projects/Hello/.build/checkouts/database-kit.git--3872818599693266265/Sources/DatabaseKit/KeyedCache/KeyedCache.swift /Users/work/Projects/Hello/.build/checkouts/database-kit.git--3872818599693266265/Sources/DatabaseKit/KeyedCache/DatabaseKeyedCache.swift /Users/work/Projects/Hello/.build/checkouts/database-kit.git--3872818599693266265/Sources/DatabaseKit/KeyedCache/DictionaryKeyedCache.swift /Users/work/Projects/Hello/.build/checkouts/database-kit.git--3872818599693266265/Sources/DatabaseKit/KeyedCache/MemoryKeyedCache.swift /Users/work/Projects/Hello/.build/checkouts/database-kit.git--3872818599693266265/Sources/DatabaseKit/ConnectionPool/DatabaseConnectionPoolCache.swift /Users/work/Projects/Hello/.build/checkouts/database-kit.git--3872818599693266265/Sources/DatabaseKit/Connection/DatabaseStringFindable.swift /Users/work/Projects/Hello/.build/checkouts/database-kit.git--3872818599693266265/Sources/DatabaseKit/Connection/DatabaseConnectable.swift /Users/work/Projects/Hello/.build/checkouts/database-kit.git--3872818599693266265/Sources/DatabaseKit/Database/DatabaseQueryable.swift /Users/work/Projects/Hello/.build/checkouts/database-kit.git--3872818599693266265/Sources/DatabaseKit/Utilities/URL+DatabaseName.swift /Users/work/Projects/Hello/.build/checkouts/database-kit.git--3872818599693266265/Sources/DatabaseKit/Database/Database.swift /Users/work/Projects/Hello/.build/checkouts/database-kit.git--3872818599693266265/Sources/DatabaseKit/Database/ConfiguredDatabase.swift /Users/work/Projects/Hello/.build/checkouts/database-kit.git--3872818599693266265/Sources/DatabaseKit/Database/DatabaseConfig.swift /Users/work/Projects/Hello/.build/checkouts/database-kit.git--3872818599693266265/Sources/DatabaseKit/ConnectionPool/DatabaseConnectionPoolConfig.swift /Users/work/Projects/Hello/.build/checkouts/database-kit.git--3872818599693266265/Sources/DatabaseKit/KeyedCache/KeyedCacheSupporting.swift /Users/work/Projects/Hello/.build/checkouts/database-kit.git--3872818599693266265/Sources/DatabaseKit/Log/LogSupporting.swift /Users/work/Projects/Hello/.build/checkouts/database-kit.git--3872818599693266265/Sources/DatabaseKit/Log/DatabaseLog.swift /Users/work/Projects/Hello/.build/checkouts/database-kit.git--3872818599693266265/Sources/DatabaseKit/ConnectionPool/Container+ConnectionPool.swift /Users/work/Projects/Hello/.build/checkouts/database-kit.git--3872818599693266265/Sources/DatabaseKit/ConnectionPool/DatabaseConnectionPool.swift /Users/work/Projects/Hello/.build/checkouts/database-kit.git--3872818599693266265/Sources/DatabaseKit/Connection/Container+CachedConnection.swift /Users/work/Projects/Hello/.build/checkouts/database-kit.git--3872818599693266265/Sources/DatabaseKit/Connection/DatabaseConnection.swift /Users/work/Projects/Hello/.build/checkouts/database-kit.git--3872818599693266265/Sources/DatabaseKit/Connection/Container+NewConnection.swift /Users/work/Projects/Hello/.build/checkouts/database-kit.git--3872818599693266265/Sources/DatabaseKit/Service/DatabaseKitProvider.swift /Users/work/Projects/Hello/.build/checkouts/database-kit.git--3872818599693266265/Sources/DatabaseKit/Log/DatabaseLogger.swift /Users/work/Projects/Hello/.build/checkouts/database-kit.git--3872818599693266265/Sources/DatabaseKit/Database/DatabaseIdentifier.swift /Users/work/Projects/Hello/.build/checkouts/database-kit.git--3872818599693266265/Sources/DatabaseKit/Log/DatabaseLogHandler.swift /Users/work/Projects/Hello/.build/checkouts/database-kit.git--3872818599693266265/Sources/DatabaseKit/Log/PrintLogHandler.swift /Users/work/Projects/Hello/.build/checkouts/database-kit.git--3872818599693266265/Sources/DatabaseKit/Utilities/DatabaseKitError.swift /Users/work/Projects/Hello/.build/checkouts/database-kit.git--3872818599693266265/Sources/DatabaseKit/Database/Databases.swift /Users/work/Projects/Hello/.build/checkouts/database-kit.git--3872818599693266265/Sources/DatabaseKit/Utilities/Exports.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Dispatch.apinotesc /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/ObjectiveC.swiftmodule /Users/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/Service.swiftmodule /Users/work/Projects/Hello/.build/x86_64-apple-macosx10.10/debug/Core.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/DatabaseKit.build/DatabaseStringFindable~partial.swiftdoc : /Users/work/Projects/Hello/.build/checkouts/database-kit.git--3872818599693266265/Sources/DatabaseKit/Utilities/Deprecated.swift /Users/work/Projects/Hello/.build/checkouts/database-kit.git--3872818599693266265/Sources/DatabaseKit/KeyedCache/KeyedCache.swift /Users/work/Projects/Hello/.build/checkouts/database-kit.git--3872818599693266265/Sources/DatabaseKit/KeyedCache/DatabaseKeyedCache.swift /Users/work/Projects/Hello/.build/checkouts/database-kit.git--3872818599693266265/Sources/DatabaseKit/KeyedCache/DictionaryKeyedCache.swift /Users/work/Projects/Hello/.build/checkouts/database-kit.git--3872818599693266265/Sources/DatabaseKit/KeyedCache/MemoryKeyedCache.swift /Users/work/Projects/Hello/.build/checkouts/database-kit.git--3872818599693266265/Sources/DatabaseKit/ConnectionPool/DatabaseConnectionPoolCache.swift /Users/work/Projects/Hello/.build/checkouts/database-kit.git--3872818599693266265/Sources/DatabaseKit/Connection/DatabaseStringFindable.swift /Users/work/Projects/Hello/.build/checkouts/database-kit.git--3872818599693266265/Sources/DatabaseKit/Connection/DatabaseConnectable.swift /Users/work/Projects/Hello/.build/checkouts/database-kit.git--3872818599693266265/Sources/DatabaseKit/Database/DatabaseQueryable.swift /Users/work/Projects/Hello/.build/checkouts/database-kit.git--3872818599693266265/Sources/DatabaseKit/Utilities/URL+DatabaseName.swift /Users/work/Projects/Hello/.build/checkouts/database-kit.git--3872818599693266265/Sources/DatabaseKit/Database/Database.swift /Users/work/Projects/Hello/.build/checkouts/database-kit.git--3872818599693266265/Sources/DatabaseKit/Database/ConfiguredDatabase.swift /Users/work/Projects/Hello/.build/checkouts/database-kit.git--3872818599693266265/Sources/DatabaseKit/Database/DatabaseConfig.swift /Users/work/Projects/Hello/.build/checkouts/database-kit.git--3872818599693266265/Sources/DatabaseKit/ConnectionPool/DatabaseConnectionPoolConfig.swift /Users/work/Projects/Hello/.build/checkouts/database-kit.git--3872818599693266265/Sources/DatabaseKit/KeyedCache/KeyedCacheSupporting.swift /Users/work/Projects/Hello/.build/checkouts/database-kit.git--3872818599693266265/Sources/DatabaseKit/Log/LogSupporting.swift /Users/work/Projects/Hello/.build/checkouts/database-kit.git--3872818599693266265/Sources/DatabaseKit/Log/DatabaseLog.swift /Users/work/Projects/Hello/.build/checkouts/database-kit.git--3872818599693266265/Sources/DatabaseKit/ConnectionPool/Container+ConnectionPool.swift /Users/work/Projects/Hello/.build/checkouts/database-kit.git--3872818599693266265/Sources/DatabaseKit/ConnectionPool/DatabaseConnectionPool.swift /Users/work/Projects/Hello/.build/checkouts/database-kit.git--3872818599693266265/Sources/DatabaseKit/Connection/Container+CachedConnection.swift /Users/work/Projects/Hello/.build/checkouts/database-kit.git--3872818599693266265/Sources/DatabaseKit/Connection/DatabaseConnection.swift /Users/work/Projects/Hello/.build/checkouts/database-kit.git--3872818599693266265/Sources/DatabaseKit/Connection/Container+NewConnection.swift /Users/work/Projects/Hello/.build/checkouts/database-kit.git--3872818599693266265/Sources/DatabaseKit/Service/DatabaseKitProvider.swift /Users/work/Projects/Hello/.build/checkouts/database-kit.git--3872818599693266265/Sources/DatabaseKit/Log/DatabaseLogger.swift /Users/work/Projects/Hello/.build/checkouts/database-kit.git--3872818599693266265/Sources/DatabaseKit/Database/DatabaseIdentifier.swift /Users/work/Projects/Hello/.build/checkouts/database-kit.git--3872818599693266265/Sources/DatabaseKit/Log/DatabaseLogHandler.swift /Users/work/Projects/Hello/.build/checkouts/database-kit.git--3872818599693266265/Sources/DatabaseKit/Log/PrintLogHandler.swift /Users/work/Projects/Hello/.build/checkouts/database-kit.git--3872818599693266265/Sources/DatabaseKit/Utilities/DatabaseKitError.swift /Users/work/Projects/Hello/.build/checkouts/database-kit.git--3872818599693266265/Sources/DatabaseKit/Database/Databases.swift /Users/work/Projects/Hello/.build/checkouts/database-kit.git--3872818599693266265/Sources/DatabaseKit/Utilities/Exports.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Dispatch.apinotesc /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/ObjectiveC.swiftmodule /Users/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/Service.swiftmodule /Users/work/Projects/Hello/.build/x86_64-apple-macosx10.10/debug/Core.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
|
/Users/y.imuta/pj/rust_study/big_query_rust/target/debug/build/ryu-2f42ed81466b0fa0/build_script_build-2f42ed81466b0fa0: /Users/y.imuta/.cargo/registry/src/github.com-1ecc6299db9ec823/ryu-1.0.5/build.rs
/Users/y.imuta/pj/rust_study/big_query_rust/target/debug/build/ryu-2f42ed81466b0fa0/build_script_build-2f42ed81466b0fa0.d: /Users/y.imuta/.cargo/registry/src/github.com-1ecc6299db9ec823/ryu-1.0.5/build.rs
/Users/y.imuta/.cargo/registry/src/github.com-1ecc6299db9ec823/ryu-1.0.5/build.rs:
|
D
|
/Users/ramonhonorio/workspace/ios/fiap/BuyList/DerivedData/BuyList/Build/Intermediates.noindex/BuyList.build/Debug-iphonesimulator/BuyList.build/Objects-normal/x86_64/ProductTableViewCell.o : /Users/ramonhonorio/workspace/ios/fiap/BuyList/BuyList/StateMO.swift /Users/ramonhonorio/workspace/ios/fiap/BuyList/BuyList/ProductMO.swift /Users/ramonhonorio/workspace/ios/fiap/BuyList/BuyList/AppDelegate.swift /Users/ramonhonorio/workspace/ios/fiap/BuyList/BuyList/ProductTableViewCell.swift /Users/ramonhonorio/workspace/ios/fiap/BuyList/BuyList/BaseViewController.swift /Users/ramonhonorio/workspace/ios/fiap/BuyList/BuyList/TotalViewController.swift /Users/ramonhonorio/workspace/ios/fiap/BuyList/BuyList/BuyTabBarViewController.swift /Users/ramonhonorio/workspace/ios/fiap/BuyList/BuyList/SettingsViewController.swift /Users/ramonhonorio/workspace/ios/fiap/BuyList/BuyList/CreateProductViewController.swift /Users/ramonhonorio/workspace/ios/fiap/BuyList/BuyList/BuyListViewController.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.apinotesc /Users/ramonhonorio/workspace/ios/fiap/BuyList/DerivedData/BuyList/Build/Products/Debug-iphonesimulator/EmptyDataSet-Swift/EmptyDataSet_Swift.framework/Modules/EmptyDataSet_Swift.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/ObjectiveC.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreData.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreImage.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/QuartzCore.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Metal.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreFoundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreGraphics.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/UIKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/SwiftOnoneSupport.swiftmodule /Users/ramonhonorio/workspace/ios/fiap/BuyList/DerivedData/BuyList/Build/Products/Debug-iphonesimulator/EmptyDataSet-Swift/EmptyDataSet_Swift.framework/Headers/EmptyDataSet-Swift-umbrella.h /Users/ramonhonorio/workspace/ios/fiap/BuyList/DerivedData/BuyList/Build/Products/Debug-iphonesimulator/EmptyDataSet-Swift/EmptyDataSet_Swift.framework/Headers/EmptyDataSet_Swift-Swift.h /Users/ramonhonorio/workspace/ios/fiap/BuyList/DerivedData/BuyList/Build/Products/Debug-iphonesimulator/EmptyDataSet-Swift/EmptyDataSet_Swift.framework/Modules/module.modulemap
/Users/ramonhonorio/workspace/ios/fiap/BuyList/DerivedData/BuyList/Build/Intermediates.noindex/BuyList.build/Debug-iphonesimulator/BuyList.build/Objects-normal/x86_64/ProductTableViewCell~partial.swiftmodule : /Users/ramonhonorio/workspace/ios/fiap/BuyList/BuyList/StateMO.swift /Users/ramonhonorio/workspace/ios/fiap/BuyList/BuyList/ProductMO.swift /Users/ramonhonorio/workspace/ios/fiap/BuyList/BuyList/AppDelegate.swift /Users/ramonhonorio/workspace/ios/fiap/BuyList/BuyList/ProductTableViewCell.swift /Users/ramonhonorio/workspace/ios/fiap/BuyList/BuyList/BaseViewController.swift /Users/ramonhonorio/workspace/ios/fiap/BuyList/BuyList/TotalViewController.swift /Users/ramonhonorio/workspace/ios/fiap/BuyList/BuyList/BuyTabBarViewController.swift /Users/ramonhonorio/workspace/ios/fiap/BuyList/BuyList/SettingsViewController.swift /Users/ramonhonorio/workspace/ios/fiap/BuyList/BuyList/CreateProductViewController.swift /Users/ramonhonorio/workspace/ios/fiap/BuyList/BuyList/BuyListViewController.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.apinotesc /Users/ramonhonorio/workspace/ios/fiap/BuyList/DerivedData/BuyList/Build/Products/Debug-iphonesimulator/EmptyDataSet-Swift/EmptyDataSet_Swift.framework/Modules/EmptyDataSet_Swift.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/ObjectiveC.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreData.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreImage.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/QuartzCore.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Metal.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreFoundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreGraphics.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/UIKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/SwiftOnoneSupport.swiftmodule /Users/ramonhonorio/workspace/ios/fiap/BuyList/DerivedData/BuyList/Build/Products/Debug-iphonesimulator/EmptyDataSet-Swift/EmptyDataSet_Swift.framework/Headers/EmptyDataSet-Swift-umbrella.h /Users/ramonhonorio/workspace/ios/fiap/BuyList/DerivedData/BuyList/Build/Products/Debug-iphonesimulator/EmptyDataSet-Swift/EmptyDataSet_Swift.framework/Headers/EmptyDataSet_Swift-Swift.h /Users/ramonhonorio/workspace/ios/fiap/BuyList/DerivedData/BuyList/Build/Products/Debug-iphonesimulator/EmptyDataSet-Swift/EmptyDataSet_Swift.framework/Modules/module.modulemap
/Users/ramonhonorio/workspace/ios/fiap/BuyList/DerivedData/BuyList/Build/Intermediates.noindex/BuyList.build/Debug-iphonesimulator/BuyList.build/Objects-normal/x86_64/ProductTableViewCell~partial.swiftdoc : /Users/ramonhonorio/workspace/ios/fiap/BuyList/BuyList/StateMO.swift /Users/ramonhonorio/workspace/ios/fiap/BuyList/BuyList/ProductMO.swift /Users/ramonhonorio/workspace/ios/fiap/BuyList/BuyList/AppDelegate.swift /Users/ramonhonorio/workspace/ios/fiap/BuyList/BuyList/ProductTableViewCell.swift /Users/ramonhonorio/workspace/ios/fiap/BuyList/BuyList/BaseViewController.swift /Users/ramonhonorio/workspace/ios/fiap/BuyList/BuyList/TotalViewController.swift /Users/ramonhonorio/workspace/ios/fiap/BuyList/BuyList/BuyTabBarViewController.swift /Users/ramonhonorio/workspace/ios/fiap/BuyList/BuyList/SettingsViewController.swift /Users/ramonhonorio/workspace/ios/fiap/BuyList/BuyList/CreateProductViewController.swift /Users/ramonhonorio/workspace/ios/fiap/BuyList/BuyList/BuyListViewController.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.apinotesc /Users/ramonhonorio/workspace/ios/fiap/BuyList/DerivedData/BuyList/Build/Products/Debug-iphonesimulator/EmptyDataSet-Swift/EmptyDataSet_Swift.framework/Modules/EmptyDataSet_Swift.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/ObjectiveC.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreData.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreImage.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/QuartzCore.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Metal.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreFoundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreGraphics.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/UIKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/SwiftOnoneSupport.swiftmodule /Users/ramonhonorio/workspace/ios/fiap/BuyList/DerivedData/BuyList/Build/Products/Debug-iphonesimulator/EmptyDataSet-Swift/EmptyDataSet_Swift.framework/Headers/EmptyDataSet-Swift-umbrella.h /Users/ramonhonorio/workspace/ios/fiap/BuyList/DerivedData/BuyList/Build/Products/Debug-iphonesimulator/EmptyDataSet-Swift/EmptyDataSet_Swift.framework/Headers/EmptyDataSet_Swift-Swift.h /Users/ramonhonorio/workspace/ios/fiap/BuyList/DerivedData/BuyList/Build/Products/Debug-iphonesimulator/EmptyDataSet-Swift/EmptyDataSet_Swift.framework/Modules/module.modulemap
|
D
|
/*
* Copyright (c) 2004-2008 Derelict Developers
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* * Neither the names 'Derelict', 'DerelictGL', nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
module derelict.opengl.extension.ext.vertex_weighting;
private
{
import derelict.opengl.gltypes;
import derelict.opengl.gl;
import derelict.opengl.extension.loader;
import derelict.util.wrapper;
}
private bool enabled = false;
struct EXTVertexWeighting
{
static bool load(char[] extString)
{
if(extString.findStr("GL_EXT_vertex_weighting") == -1)
return false;
if(!glBindExtFunc(cast(void**)&glVertexWeightfEXT, "glVertexWeightfEXT"))
return false;
if(!glBindExtFunc(cast(void**)&glVertexWeightfvEXT, "glVertexWeightfvEXT"))
return false;
if(!glBindExtFunc(cast(void**)&glVertexWeightPointerEXT, "glVertexWeightPointerEXT"))
return false;
enabled = true;
return true;
}
static bool isEnabled()
{
return enabled;
}
}
version(DerelictGL_NoExtensionLoaders)
{
}
else
{
static this()
{
DerelictGL.registerExtensionLoader(&EXTVertexWeighting.load);
}
}
enum : GLenum
{
GL_MODELVIEW0_STACK_DEPTH_EXT = GL_MODELVIEW_STACK_DEPTH,
GL_MODELVIEW1_STACK_DEPTH_EXT = 0x8502,
GL_MODELVIEW0_MATRIX_EXT = GL_MODELVIEW_MATRIX,
GL_MODELVIEW1_MATRIX_EXT = 0x8506,
GL_VERTEX_WEIGHTING_EXT = 0x8509,
GL_MODELVIEW0_EXT = GL_MODELVIEW,
GL_MODELVIEW1_EXT = 0x850A,
GL_CURRENT_VERTEX_WEIGHT_EXT = 0x850B,
GL_VERTEX_WEIGHT_ARRAY_EXT = 0x850C,
GL_VERTEX_WEIGHT_ARRAY_SIZE_EXT = 0x850D,
GL_VERTEX_WEIGHT_ARRAY_TYPE_EXT = 0x850E,
GL_VERTEX_WEIGHT_ARRAY_STRIDE_EXT = 0x850F,
GL_VERTEX_WEIGHT_ARRAY_POINTER_EXT = 0x8510,
}
extern(System):
typedef void function(GLfloat) pfglVertexWeightfEXT;
typedef void function(GLfloat*) pfglVertexWeightfvEXT;
typedef void function(GLsizei,GLenum,GLsizei,GLvoid*) pfglVertexWeightPointerEXT;
pfglVertexWeightfEXT glVertexWeightfEXT;
pfglVertexWeightfvEXT glVertexWeightfvEXT;
pfglVertexWeightPointerEXT glVertexWeightPointerEXT;
|
D
|
/*
TEST_OUTPUT:
---
fail_compilation/fail9413.d(45): Error: variable `fail9413.foo.x` cannot modify parameter `x` in contract
fail_compilation/fail9413.d(32): Error: variable `fail9413.foo.x` cannot modify parameter `x` in contract
fail_compilation/fail9413.d(33): Error: variable `fail9413.foo.bar.y` cannot modify parameter `y` in contract
fail_compilation/fail9413.d(38): Error: variable `fail9413.foo.x` cannot modify parameter `x` in contract
fail_compilation/fail9413.d(39): Error: variable `fail9413.foo.bar.y` cannot modify parameter `y` in contract
fail_compilation/fail9413.d(40): Error: variable `fail9413.foo.bar.s` cannot modify result `s` in contract
fail_compilation/fail9413.d(50): Error: variable `fail9413.foo.x` cannot modify parameter `x` in contract
fail_compilation/fail9413.d(73): Error: variable `fail9413.foo.x` cannot modify parameter `x` in contract
fail_compilation/fail9413.d(74): Error: variable `fail9413.foo.r` cannot modify result `r` in contract
fail_compilation/fail9413.d(58): Error: variable `fail9413.foo.x` cannot modify parameter `x` in contract
fail_compilation/fail9413.d(59): Error: variable `fail9413.foo.r` cannot modify result `r` in contract
fail_compilation/fail9413.d(60): Error: variable `fail9413.foo.baz.y` cannot modify parameter `y` in contract
fail_compilation/fail9413.d(65): Error: variable `fail9413.foo.x` cannot modify parameter `x` in contract
fail_compilation/fail9413.d(66): Error: variable `fail9413.foo.r` cannot modify result `r` in contract
fail_compilation/fail9413.d(67): Error: variable `fail9413.foo.baz.y` cannot modify parameter `y` in contract
fail_compilation/fail9413.d(68): Error: variable `fail9413.foo.baz.s` cannot modify result `s` in contract
fail_compilation/fail9413.d(79): Error: variable `fail9413.foo.x` cannot modify parameter `x` in contract
fail_compilation/fail9413.d(80): Error: variable `fail9413.foo.r` cannot modify result `r` in contract
---
*/
int foo(int x)
in
{
int a;
int bar(int y)
in
{
x = 10; // err
y = 10; // err
a = 1; // OK
}
out(s)
{
x = 10; // err
y = 10; // err
s = 10; // err
a = 1; // OK
}
do
{
x = 10; // err
y = 1; // OK
a = 1; // OK
return 2;
}
x = 10; // err
}
out(r)
{
int a;
int baz(int y)
in
{
x = 10; // err
r = 10; // err
y = 10; // err
a = 1; // OK
}
out(s)
{
x = 10; // err
r = 10; // err
y = 10; // err
s = 10; // err
a = 1; // OK
}
do
{
x = 10; // err
r = 10; // err
y = 1; // OK
a = 1; // OK
return 2;
}
x = 10; // err
r = 10; // err
}
do
{
return 1;
}
|
D
|
/Users/gem/Desktop/MovieMoya/the-movie-db/DerivedData/TheNewMovie/Build/Intermediates.noindex/IBDesignables/Intermediates.noindex/Pods.build/Debug-iphonesimulator/Alamofire.build/Objects-normal/x86_64/Response.o : /Users/gem/Desktop/MovieMoya/the-movie-db/Pods/Alamofire/Source/MultipartFormData.swift /Users/gem/Desktop/MovieMoya/the-movie-db/Pods/Alamofire/Source/Timeline.swift /Users/gem/Desktop/MovieMoya/the-movie-db/Pods/Alamofire/Source/DispatchQueue+Alamofire.swift /Users/gem/Desktop/MovieMoya/the-movie-db/Pods/Alamofire/Source/Alamofire.swift /Users/gem/Desktop/MovieMoya/the-movie-db/Pods/Alamofire/Source/Response.swift /Users/gem/Desktop/MovieMoya/the-movie-db/Pods/Alamofire/Source/TaskDelegate.swift /Users/gem/Desktop/MovieMoya/the-movie-db/Pods/Alamofire/Source/SessionDelegate.swift /Users/gem/Desktop/MovieMoya/the-movie-db/Pods/Alamofire/Source/ParameterEncoding.swift /Users/gem/Desktop/MovieMoya/the-movie-db/Pods/Alamofire/Source/Validation.swift /Users/gem/Desktop/MovieMoya/the-movie-db/Pods/Alamofire/Source/ResponseSerialization.swift /Users/gem/Desktop/MovieMoya/the-movie-db/Pods/Alamofire/Source/SessionManager.swift /Users/gem/Desktop/MovieMoya/the-movie-db/Pods/Alamofire/Source/NetworkReachabilityManager.swift /Users/gem/Desktop/MovieMoya/the-movie-db/Pods/Alamofire/Source/AFError.swift /Users/gem/Desktop/MovieMoya/the-movie-db/Pods/Alamofire/Source/Notifications.swift /Users/gem/Desktop/MovieMoya/the-movie-db/Pods/Alamofire/Source/Result.swift /Users/gem/Desktop/MovieMoya/the-movie-db/Pods/Alamofire/Source/Request.swift /Users/gem/Desktop/MovieMoya/the-movie-db/Pods/Alamofire/Source/ServerTrustPolicy.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.apinotesc /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/ObjectiveC.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreImage.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/QuartzCore.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Metal.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreFoundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreGraphics.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/UIKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/SwiftOnoneSupport.swiftmodule /Users/gem/Desktop/MovieMoya/the-movie-db/Pods/Target\ Support\ Files/Alamofire/Alamofire-umbrella.h /Users/gem/Desktop/MovieMoya/the-movie-db/DerivedData/TheNewMovie/Build/Intermediates.noindex/IBDesignables/Intermediates.noindex/Pods.build/Debug-iphonesimulator/Alamofire.build/unextended-module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/OpenGLES.framework/Headers/OpenGLES.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImage.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/QuartzCore.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/Security.framework/Headers/Security.apinotes
/Users/gem/Desktop/MovieMoya/the-movie-db/DerivedData/TheNewMovie/Build/Intermediates.noindex/IBDesignables/Intermediates.noindex/Pods.build/Debug-iphonesimulator/Alamofire.build/Objects-normal/x86_64/Response~partial.swiftmodule : /Users/gem/Desktop/MovieMoya/the-movie-db/Pods/Alamofire/Source/MultipartFormData.swift /Users/gem/Desktop/MovieMoya/the-movie-db/Pods/Alamofire/Source/Timeline.swift /Users/gem/Desktop/MovieMoya/the-movie-db/Pods/Alamofire/Source/DispatchQueue+Alamofire.swift /Users/gem/Desktop/MovieMoya/the-movie-db/Pods/Alamofire/Source/Alamofire.swift /Users/gem/Desktop/MovieMoya/the-movie-db/Pods/Alamofire/Source/Response.swift /Users/gem/Desktop/MovieMoya/the-movie-db/Pods/Alamofire/Source/TaskDelegate.swift /Users/gem/Desktop/MovieMoya/the-movie-db/Pods/Alamofire/Source/SessionDelegate.swift /Users/gem/Desktop/MovieMoya/the-movie-db/Pods/Alamofire/Source/ParameterEncoding.swift /Users/gem/Desktop/MovieMoya/the-movie-db/Pods/Alamofire/Source/Validation.swift /Users/gem/Desktop/MovieMoya/the-movie-db/Pods/Alamofire/Source/ResponseSerialization.swift /Users/gem/Desktop/MovieMoya/the-movie-db/Pods/Alamofire/Source/SessionManager.swift /Users/gem/Desktop/MovieMoya/the-movie-db/Pods/Alamofire/Source/NetworkReachabilityManager.swift /Users/gem/Desktop/MovieMoya/the-movie-db/Pods/Alamofire/Source/AFError.swift /Users/gem/Desktop/MovieMoya/the-movie-db/Pods/Alamofire/Source/Notifications.swift /Users/gem/Desktop/MovieMoya/the-movie-db/Pods/Alamofire/Source/Result.swift /Users/gem/Desktop/MovieMoya/the-movie-db/Pods/Alamofire/Source/Request.swift /Users/gem/Desktop/MovieMoya/the-movie-db/Pods/Alamofire/Source/ServerTrustPolicy.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.apinotesc /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/ObjectiveC.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreImage.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/QuartzCore.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Metal.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreFoundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreGraphics.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/UIKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/SwiftOnoneSupport.swiftmodule /Users/gem/Desktop/MovieMoya/the-movie-db/Pods/Target\ Support\ Files/Alamofire/Alamofire-umbrella.h /Users/gem/Desktop/MovieMoya/the-movie-db/DerivedData/TheNewMovie/Build/Intermediates.noindex/IBDesignables/Intermediates.noindex/Pods.build/Debug-iphonesimulator/Alamofire.build/unextended-module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/OpenGLES.framework/Headers/OpenGLES.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImage.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/QuartzCore.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/Security.framework/Headers/Security.apinotes
/Users/gem/Desktop/MovieMoya/the-movie-db/DerivedData/TheNewMovie/Build/Intermediates.noindex/IBDesignables/Intermediates.noindex/Pods.build/Debug-iphonesimulator/Alamofire.build/Objects-normal/x86_64/Response~partial.swiftdoc : /Users/gem/Desktop/MovieMoya/the-movie-db/Pods/Alamofire/Source/MultipartFormData.swift /Users/gem/Desktop/MovieMoya/the-movie-db/Pods/Alamofire/Source/Timeline.swift /Users/gem/Desktop/MovieMoya/the-movie-db/Pods/Alamofire/Source/DispatchQueue+Alamofire.swift /Users/gem/Desktop/MovieMoya/the-movie-db/Pods/Alamofire/Source/Alamofire.swift /Users/gem/Desktop/MovieMoya/the-movie-db/Pods/Alamofire/Source/Response.swift /Users/gem/Desktop/MovieMoya/the-movie-db/Pods/Alamofire/Source/TaskDelegate.swift /Users/gem/Desktop/MovieMoya/the-movie-db/Pods/Alamofire/Source/SessionDelegate.swift /Users/gem/Desktop/MovieMoya/the-movie-db/Pods/Alamofire/Source/ParameterEncoding.swift /Users/gem/Desktop/MovieMoya/the-movie-db/Pods/Alamofire/Source/Validation.swift /Users/gem/Desktop/MovieMoya/the-movie-db/Pods/Alamofire/Source/ResponseSerialization.swift /Users/gem/Desktop/MovieMoya/the-movie-db/Pods/Alamofire/Source/SessionManager.swift /Users/gem/Desktop/MovieMoya/the-movie-db/Pods/Alamofire/Source/NetworkReachabilityManager.swift /Users/gem/Desktop/MovieMoya/the-movie-db/Pods/Alamofire/Source/AFError.swift /Users/gem/Desktop/MovieMoya/the-movie-db/Pods/Alamofire/Source/Notifications.swift /Users/gem/Desktop/MovieMoya/the-movie-db/Pods/Alamofire/Source/Result.swift /Users/gem/Desktop/MovieMoya/the-movie-db/Pods/Alamofire/Source/Request.swift /Users/gem/Desktop/MovieMoya/the-movie-db/Pods/Alamofire/Source/ServerTrustPolicy.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.apinotesc /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/ObjectiveC.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreImage.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/QuartzCore.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Metal.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreFoundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreGraphics.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/UIKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/SwiftOnoneSupport.swiftmodule /Users/gem/Desktop/MovieMoya/the-movie-db/Pods/Target\ Support\ Files/Alamofire/Alamofire-umbrella.h /Users/gem/Desktop/MovieMoya/the-movie-db/DerivedData/TheNewMovie/Build/Intermediates.noindex/IBDesignables/Intermediates.noindex/Pods.build/Debug-iphonesimulator/Alamofire.build/unextended-module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/OpenGLES.framework/Headers/OpenGLES.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImage.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/QuartzCore.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/Security.framework/Headers/Security.apinotes
|
D
|
/Users/aligame/work/rust_repository/rutils/target/debug/build/libc-9231175b8a45bbe4/build_script_build-9231175b8a45bbe4: /Users/aligame/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/libc-0.2.66/build.rs
/Users/aligame/work/rust_repository/rutils/target/debug/build/libc-9231175b8a45bbe4/build_script_build-9231175b8a45bbe4.d: /Users/aligame/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/libc-0.2.66/build.rs
/Users/aligame/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/libc-0.2.66/build.rs:
|
D
|
module windows.uianimation;
public import windows.com;
public import windows.directcomposition;
public import windows.systemservices;
extern(Windows):
enum UI_ANIMATION_UPDATE_RESULT
{
UI_ANIMATION_UPDATE_NO_CHANGE = 0,
UI_ANIMATION_UPDATE_VARIABLES_CHANGED = 1,
}
enum UI_ANIMATION_MANAGER_STATUS
{
UI_ANIMATION_MANAGER_IDLE = 0,
UI_ANIMATION_MANAGER_BUSY = 1,
}
enum UI_ANIMATION_MODE
{
UI_ANIMATION_MODE_DISABLED = 0,
UI_ANIMATION_MODE_SYSTEM_DEFAULT = 1,
UI_ANIMATION_MODE_ENABLED = 2,
}
enum UI_ANIMATION_REPEAT_MODE
{
UI_ANIMATION_REPEAT_MODE_NORMAL = 0,
UI_ANIMATION_REPEAT_MODE_ALTERNATE = 1,
}
const GUID IID_IUIAnimationManager = {0x9169896C, 0xAC8D, 0x4E7D, [0x94, 0xE5, 0x67, 0xFA, 0x4D, 0xC2, 0xF2, 0xE8]};
@GUID(0x9169896C, 0xAC8D, 0x4E7D, [0x94, 0xE5, 0x67, 0xFA, 0x4D, 0xC2, 0xF2, 0xE8]);
interface IUIAnimationManager : IUnknown
{
HRESULT CreateAnimationVariable(double initialValue, IUIAnimationVariable* variable);
HRESULT ScheduleTransition(IUIAnimationVariable variable, IUIAnimationTransition transition, double timeNow);
HRESULT CreateStoryboard(IUIAnimationStoryboard* storyboard);
HRESULT FinishAllStoryboards(double completionDeadline);
HRESULT AbandonAllStoryboards();
HRESULT Update(double timeNow, UI_ANIMATION_UPDATE_RESULT* updateResult);
HRESULT GetVariableFromTag(IUnknown object, uint id, IUIAnimationVariable* variable);
HRESULT GetStoryboardFromTag(IUnknown object, uint id, IUIAnimationStoryboard* storyboard);
HRESULT GetStatus(UI_ANIMATION_MANAGER_STATUS* status);
HRESULT SetAnimationMode(UI_ANIMATION_MODE mode);
HRESULT Pause();
HRESULT Resume();
HRESULT SetManagerEventHandler(IUIAnimationManagerEventHandler handler);
HRESULT SetCancelPriorityComparison(IUIAnimationPriorityComparison comparison);
HRESULT SetTrimPriorityComparison(IUIAnimationPriorityComparison comparison);
HRESULT SetCompressPriorityComparison(IUIAnimationPriorityComparison comparison);
HRESULT SetConcludePriorityComparison(IUIAnimationPriorityComparison comparison);
HRESULT SetDefaultLongestAcceptableDelay(double delay);
HRESULT Shutdown();
}
enum UI_ANIMATION_ROUNDING_MODE
{
UI_ANIMATION_ROUNDING_NEAREST = 0,
UI_ANIMATION_ROUNDING_FLOOR = 1,
UI_ANIMATION_ROUNDING_CEILING = 2,
}
const GUID IID_IUIAnimationVariable = {0x8CEEB155, 0x2849, 0x4CE5, [0x94, 0x48, 0x91, 0xFF, 0x70, 0xE1, 0xE4, 0xD9]};
@GUID(0x8CEEB155, 0x2849, 0x4CE5, [0x94, 0x48, 0x91, 0xFF, 0x70, 0xE1, 0xE4, 0xD9]);
interface IUIAnimationVariable : IUnknown
{
HRESULT GetValue(double* value);
HRESULT GetFinalValue(double* finalValue);
HRESULT GetPreviousValue(double* previousValue);
HRESULT GetIntegerValue(int* value);
HRESULT GetFinalIntegerValue(int* finalValue);
HRESULT GetPreviousIntegerValue(int* previousValue);
HRESULT GetCurrentStoryboard(IUIAnimationStoryboard* storyboard);
HRESULT SetLowerBound(double bound);
HRESULT SetUpperBound(double bound);
HRESULT SetRoundingMode(UI_ANIMATION_ROUNDING_MODE mode);
HRESULT SetTag(IUnknown object, uint id);
HRESULT GetTag(IUnknown* object, uint* id);
HRESULT SetVariableChangeHandler(IUIAnimationVariableChangeHandler handler);
HRESULT SetVariableIntegerChangeHandler(IUIAnimationVariableIntegerChangeHandler handler);
}
enum UI_ANIMATION_STORYBOARD_STATUS
{
UI_ANIMATION_STORYBOARD_BUILDING = 0,
UI_ANIMATION_STORYBOARD_SCHEDULED = 1,
UI_ANIMATION_STORYBOARD_CANCELLED = 2,
UI_ANIMATION_STORYBOARD_PLAYING = 3,
UI_ANIMATION_STORYBOARD_TRUNCATED = 4,
UI_ANIMATION_STORYBOARD_FINISHED = 5,
UI_ANIMATION_STORYBOARD_READY = 6,
UI_ANIMATION_STORYBOARD_INSUFFICIENT_PRIORITY = 7,
}
enum UI_ANIMATION_SCHEDULING_RESULT
{
UI_ANIMATION_SCHEDULING_UNEXPECTED_FAILURE = 0,
UI_ANIMATION_SCHEDULING_INSUFFICIENT_PRIORITY = 1,
UI_ANIMATION_SCHEDULING_ALREADY_SCHEDULED = 2,
UI_ANIMATION_SCHEDULING_SUCCEEDED = 3,
UI_ANIMATION_SCHEDULING_DEFERRED = 4,
}
struct __MIDL___MIDL_itf_UIAnimation_0000_0002_0003
{
int _;
}
const GUID IID_IUIAnimationStoryboard = {0xA8FF128F, 0x9BF9, 0x4AF1, [0x9E, 0x67, 0xE5, 0xE4, 0x10, 0xDE, 0xFB, 0x84]};
@GUID(0xA8FF128F, 0x9BF9, 0x4AF1, [0x9E, 0x67, 0xE5, 0xE4, 0x10, 0xDE, 0xFB, 0x84]);
interface IUIAnimationStoryboard : IUnknown
{
HRESULT AddTransition(IUIAnimationVariable variable, IUIAnimationTransition transition);
HRESULT AddKeyframeAtOffset(__MIDL___MIDL_itf_UIAnimation_0000_0002_0003* existingKeyframe, double offset, __MIDL___MIDL_itf_UIAnimation_0000_0002_0003** keyframe);
HRESULT AddKeyframeAfterTransition(IUIAnimationTransition transition, __MIDL___MIDL_itf_UIAnimation_0000_0002_0003** keyframe);
HRESULT AddTransitionAtKeyframe(IUIAnimationVariable variable, IUIAnimationTransition transition, __MIDL___MIDL_itf_UIAnimation_0000_0002_0003* startKeyframe);
HRESULT AddTransitionBetweenKeyframes(IUIAnimationVariable variable, IUIAnimationTransition transition, __MIDL___MIDL_itf_UIAnimation_0000_0002_0003* startKeyframe, __MIDL___MIDL_itf_UIAnimation_0000_0002_0003* endKeyframe);
HRESULT RepeatBetweenKeyframes(__MIDL___MIDL_itf_UIAnimation_0000_0002_0003* startKeyframe, __MIDL___MIDL_itf_UIAnimation_0000_0002_0003* endKeyframe, int repetitionCount);
HRESULT HoldVariable(IUIAnimationVariable variable);
HRESULT SetLongestAcceptableDelay(double delay);
HRESULT Schedule(double timeNow, UI_ANIMATION_SCHEDULING_RESULT* schedulingResult);
HRESULT Conclude();
HRESULT Finish(double completionDeadline);
HRESULT Abandon();
HRESULT SetTag(IUnknown object, uint id);
HRESULT GetTag(IUnknown* object, uint* id);
HRESULT GetStatus(UI_ANIMATION_STORYBOARD_STATUS* status);
HRESULT GetElapsedTime(double* elapsedTime);
HRESULT SetStoryboardEventHandler(IUIAnimationStoryboardEventHandler handler);
}
const GUID IID_IUIAnimationTransition = {0xDC6CE252, 0xF731, 0x41CF, [0xB6, 0x10, 0x61, 0x4B, 0x6C, 0xA0, 0x49, 0xAD]};
@GUID(0xDC6CE252, 0xF731, 0x41CF, [0xB6, 0x10, 0x61, 0x4B, 0x6C, 0xA0, 0x49, 0xAD]);
interface IUIAnimationTransition : IUnknown
{
HRESULT SetInitialValue(double value);
HRESULT SetInitialVelocity(double velocity);
HRESULT IsDurationKnown();
HRESULT GetDuration(double* duration);
}
const GUID IID_IUIAnimationManagerEventHandler = {0x783321ED, 0x78A3, 0x4366, [0xB5, 0x74, 0x6A, 0xF6, 0x07, 0xA6, 0x47, 0x88]};
@GUID(0x783321ED, 0x78A3, 0x4366, [0xB5, 0x74, 0x6A, 0xF6, 0x07, 0xA6, 0x47, 0x88]);
interface IUIAnimationManagerEventHandler : IUnknown
{
HRESULT OnManagerStatusChanged(UI_ANIMATION_MANAGER_STATUS newStatus, UI_ANIMATION_MANAGER_STATUS previousStatus);
}
const GUID IID_IUIAnimationVariableChangeHandler = {0x6358B7BA, 0x87D2, 0x42D5, [0xBF, 0x71, 0x82, 0xE9, 0x19, 0xDD, 0x58, 0x62]};
@GUID(0x6358B7BA, 0x87D2, 0x42D5, [0xBF, 0x71, 0x82, 0xE9, 0x19, 0xDD, 0x58, 0x62]);
interface IUIAnimationVariableChangeHandler : IUnknown
{
HRESULT OnValueChanged(IUIAnimationStoryboard storyboard, IUIAnimationVariable variable, double newValue, double previousValue);
}
const GUID IID_IUIAnimationVariableIntegerChangeHandler = {0xBB3E1550, 0x356E, 0x44B0, [0x99, 0xDA, 0x85, 0xAC, 0x60, 0x17, 0x86, 0x5E]};
@GUID(0xBB3E1550, 0x356E, 0x44B0, [0x99, 0xDA, 0x85, 0xAC, 0x60, 0x17, 0x86, 0x5E]);
interface IUIAnimationVariableIntegerChangeHandler : IUnknown
{
HRESULT OnIntegerValueChanged(IUIAnimationStoryboard storyboard, IUIAnimationVariable variable, int newValue, int previousValue);
}
const GUID IID_IUIAnimationStoryboardEventHandler = {0x3D5C9008, 0xEC7C, 0x4364, [0x9F, 0x8A, 0x9A, 0xF3, 0xC5, 0x8C, 0xBA, 0xE6]};
@GUID(0x3D5C9008, 0xEC7C, 0x4364, [0x9F, 0x8A, 0x9A, 0xF3, 0xC5, 0x8C, 0xBA, 0xE6]);
interface IUIAnimationStoryboardEventHandler : IUnknown
{
HRESULT OnStoryboardStatusChanged(IUIAnimationStoryboard storyboard, UI_ANIMATION_STORYBOARD_STATUS newStatus, UI_ANIMATION_STORYBOARD_STATUS previousStatus);
HRESULT OnStoryboardUpdated(IUIAnimationStoryboard storyboard);
}
enum UI_ANIMATION_PRIORITY_EFFECT
{
UI_ANIMATION_PRIORITY_EFFECT_FAILURE = 0,
UI_ANIMATION_PRIORITY_EFFECT_DELAY = 1,
}
const GUID IID_IUIAnimationPriorityComparison = {0x83FA9B74, 0x5F86, 0x4618, [0xBC, 0x6A, 0xA2, 0xFA, 0xC1, 0x9B, 0x3F, 0x44]};
@GUID(0x83FA9B74, 0x5F86, 0x4618, [0xBC, 0x6A, 0xA2, 0xFA, 0xC1, 0x9B, 0x3F, 0x44]);
interface IUIAnimationPriorityComparison : IUnknown
{
HRESULT HasPriority(IUIAnimationStoryboard scheduledStoryboard, IUIAnimationStoryboard newStoryboard, UI_ANIMATION_PRIORITY_EFFECT priorityEffect);
}
enum UI_ANIMATION_SLOPE
{
UI_ANIMATION_SLOPE_INCREASING = 0,
UI_ANIMATION_SLOPE_DECREASING = 1,
}
const GUID IID_IUIAnimationTransitionLibrary = {0xCA5A14B1, 0xD24F, 0x48B8, [0x8F, 0xE4, 0xC7, 0x81, 0x69, 0xBA, 0x95, 0x4E]};
@GUID(0xCA5A14B1, 0xD24F, 0x48B8, [0x8F, 0xE4, 0xC7, 0x81, 0x69, 0xBA, 0x95, 0x4E]);
interface IUIAnimationTransitionLibrary : IUnknown
{
HRESULT CreateInstantaneousTransition(double finalValue, IUIAnimationTransition* transition);
HRESULT CreateConstantTransition(double duration, IUIAnimationTransition* transition);
HRESULT CreateDiscreteTransition(double delay, double finalValue, double hold, IUIAnimationTransition* transition);
HRESULT CreateLinearTransition(double duration, double finalValue, IUIAnimationTransition* transition);
HRESULT CreateLinearTransitionFromSpeed(double speed, double finalValue, IUIAnimationTransition* transition);
HRESULT CreateSinusoidalTransitionFromVelocity(double duration, double period, IUIAnimationTransition* transition);
HRESULT CreateSinusoidalTransitionFromRange(double duration, double minimumValue, double maximumValue, double period, UI_ANIMATION_SLOPE slope, IUIAnimationTransition* transition);
HRESULT CreateAccelerateDecelerateTransition(double duration, double finalValue, double accelerationRatio, double decelerationRatio, IUIAnimationTransition* transition);
HRESULT CreateReversalTransition(double duration, IUIAnimationTransition* transition);
HRESULT CreateCubicTransition(double duration, double finalValue, double finalVelocity, IUIAnimationTransition* transition);
HRESULT CreateSmoothStopTransition(double maximumDuration, double finalValue, IUIAnimationTransition* transition);
HRESULT CreateParabolicTransitionFromAcceleration(double finalValue, double finalVelocity, double acceleration, IUIAnimationTransition* transition);
}
enum UI_ANIMATION_DEPENDENCIES
{
UI_ANIMATION_DEPENDENCY_NONE = 0,
UI_ANIMATION_DEPENDENCY_INTERMEDIATE_VALUES = 1,
UI_ANIMATION_DEPENDENCY_FINAL_VALUE = 2,
UI_ANIMATION_DEPENDENCY_FINAL_VELOCITY = 4,
UI_ANIMATION_DEPENDENCY_DURATION = 8,
}
const GUID IID_IUIAnimationInterpolator = {0x7815CBBA, 0xDDF7, 0x478C, [0xA4, 0x6C, 0x7B, 0x6C, 0x73, 0x8B, 0x79, 0x78]};
@GUID(0x7815CBBA, 0xDDF7, 0x478C, [0xA4, 0x6C, 0x7B, 0x6C, 0x73, 0x8B, 0x79, 0x78]);
interface IUIAnimationInterpolator : IUnknown
{
HRESULT SetInitialValueAndVelocity(double initialValue, double initialVelocity);
HRESULT SetDuration(double duration);
HRESULT GetDuration(double* duration);
HRESULT GetFinalValue(double* value);
HRESULT InterpolateValue(double offset, double* value);
HRESULT InterpolateVelocity(double offset, double* velocity);
HRESULT GetDependencies(UI_ANIMATION_DEPENDENCIES* initialValueDependencies, UI_ANIMATION_DEPENDENCIES* initialVelocityDependencies, UI_ANIMATION_DEPENDENCIES* durationDependencies);
}
const GUID IID_IUIAnimationTransitionFactory = {0xFCD91E03, 0x3E3B, 0x45AD, [0xBB, 0xB1, 0x6D, 0xFC, 0x81, 0x53, 0x74, 0x3D]};
@GUID(0xFCD91E03, 0x3E3B, 0x45AD, [0xBB, 0xB1, 0x6D, 0xFC, 0x81, 0x53, 0x74, 0x3D]);
interface IUIAnimationTransitionFactory : IUnknown
{
HRESULT CreateTransition(IUIAnimationInterpolator interpolator, IUIAnimationTransition* transition);
}
enum UI_ANIMATION_IDLE_BEHAVIOR
{
UI_ANIMATION_IDLE_BEHAVIOR_CONTINUE = 0,
UI_ANIMATION_IDLE_BEHAVIOR_DISABLE = 1,
}
const GUID IID_IUIAnimationTimer = {0x6B0EFAD1, 0xA053, 0x41D6, [0x90, 0x85, 0x33, 0xA6, 0x89, 0x14, 0x46, 0x65]};
@GUID(0x6B0EFAD1, 0xA053, 0x41D6, [0x90, 0x85, 0x33, 0xA6, 0x89, 0x14, 0x46, 0x65]);
interface IUIAnimationTimer : IUnknown
{
HRESULT SetTimerUpdateHandler(IUIAnimationTimerUpdateHandler updateHandler, UI_ANIMATION_IDLE_BEHAVIOR idleBehavior);
HRESULT SetTimerEventHandler(IUIAnimationTimerEventHandler handler);
HRESULT Enable();
HRESULT Disable();
HRESULT IsEnabled();
HRESULT GetTime(double* seconds);
HRESULT SetFrameRateThreshold(uint framesPerSecond);
}
const GUID IID_IUIAnimationTimerUpdateHandler = {0x195509B7, 0x5D5E, 0x4E3E, [0xB2, 0x78, 0xEE, 0x37, 0x59, 0xB3, 0x67, 0xAD]};
@GUID(0x195509B7, 0x5D5E, 0x4E3E, [0xB2, 0x78, 0xEE, 0x37, 0x59, 0xB3, 0x67, 0xAD]);
interface IUIAnimationTimerUpdateHandler : IUnknown
{
HRESULT OnUpdate(double timeNow, UI_ANIMATION_UPDATE_RESULT* result);
HRESULT SetTimerClientEventHandler(IUIAnimationTimerClientEventHandler handler);
HRESULT ClearTimerClientEventHandler();
}
enum UI_ANIMATION_TIMER_CLIENT_STATUS
{
UI_ANIMATION_TIMER_CLIENT_IDLE = 0,
UI_ANIMATION_TIMER_CLIENT_BUSY = 1,
}
const GUID IID_IUIAnimationTimerClientEventHandler = {0xBEDB4DB6, 0x94FA, 0x4BFB, [0xA4, 0x7F, 0xEF, 0x2D, 0x9E, 0x40, 0x8C, 0x25]};
@GUID(0xBEDB4DB6, 0x94FA, 0x4BFB, [0xA4, 0x7F, 0xEF, 0x2D, 0x9E, 0x40, 0x8C, 0x25]);
interface IUIAnimationTimerClientEventHandler : IUnknown
{
HRESULT OnTimerClientStatusChanged(UI_ANIMATION_TIMER_CLIENT_STATUS newStatus, UI_ANIMATION_TIMER_CLIENT_STATUS previousStatus);
}
const GUID IID_IUIAnimationTimerEventHandler = {0x274A7DEA, 0xD771, 0x4095, [0xAB, 0xBD, 0x8D, 0xF7, 0xAB, 0xD2, 0x3C, 0xE3]};
@GUID(0x274A7DEA, 0xD771, 0x4095, [0xAB, 0xBD, 0x8D, 0xF7, 0xAB, 0xD2, 0x3C, 0xE3]);
interface IUIAnimationTimerEventHandler : IUnknown
{
HRESULT OnPreUpdate();
HRESULT OnPostUpdate();
HRESULT OnRenderingTooSlow(uint framesPerSecond);
}
const GUID IID_IUIAnimationManager2 = {0xD8B6F7D4, 0x4109, 0x4D3F, [0xAC, 0xEE, 0x87, 0x99, 0x26, 0x96, 0x8C, 0xB1]};
@GUID(0xD8B6F7D4, 0x4109, 0x4D3F, [0xAC, 0xEE, 0x87, 0x99, 0x26, 0x96, 0x8C, 0xB1]);
interface IUIAnimationManager2 : IUnknown
{
HRESULT CreateAnimationVectorVariable(char* initialValue, uint cDimension, IUIAnimationVariable2* variable);
HRESULT CreateAnimationVariable(double initialValue, IUIAnimationVariable2* variable);
HRESULT ScheduleTransition(IUIAnimationVariable2 variable, IUIAnimationTransition2 transition, double timeNow);
HRESULT CreateStoryboard(IUIAnimationStoryboard2* storyboard);
HRESULT FinishAllStoryboards(double completionDeadline);
HRESULT AbandonAllStoryboards();
HRESULT Update(double timeNow, UI_ANIMATION_UPDATE_RESULT* updateResult);
HRESULT GetVariableFromTag(IUnknown object, uint id, IUIAnimationVariable2* variable);
HRESULT GetStoryboardFromTag(IUnknown object, uint id, IUIAnimationStoryboard2* storyboard);
HRESULT EstimateNextEventTime(double* seconds);
HRESULT GetStatus(UI_ANIMATION_MANAGER_STATUS* status);
HRESULT SetAnimationMode(UI_ANIMATION_MODE mode);
HRESULT Pause();
HRESULT Resume();
HRESULT SetManagerEventHandler(IUIAnimationManagerEventHandler2 handler, BOOL fRegisterForNextAnimationEvent);
HRESULT SetCancelPriorityComparison(IUIAnimationPriorityComparison2 comparison);
HRESULT SetTrimPriorityComparison(IUIAnimationPriorityComparison2 comparison);
HRESULT SetCompressPriorityComparison(IUIAnimationPriorityComparison2 comparison);
HRESULT SetConcludePriorityComparison(IUIAnimationPriorityComparison2 comparison);
HRESULT SetDefaultLongestAcceptableDelay(double delay);
HRESULT Shutdown();
}
const GUID IID_IUIAnimationVariable2 = {0x4914B304, 0x96AB, 0x44D9, [0x9E, 0x77, 0xD5, 0x10, 0x9B, 0x7E, 0x74, 0x66]};
@GUID(0x4914B304, 0x96AB, 0x44D9, [0x9E, 0x77, 0xD5, 0x10, 0x9B, 0x7E, 0x74, 0x66]);
interface IUIAnimationVariable2 : IUnknown
{
HRESULT GetDimension(uint* dimension);
HRESULT GetValue(double* value);
HRESULT GetVectorValue(char* value, uint cDimension);
HRESULT GetCurve(IDCompositionAnimation animation);
HRESULT GetVectorCurve(char* animation, uint cDimension);
HRESULT GetFinalValue(double* finalValue);
HRESULT GetFinalVectorValue(char* finalValue, uint cDimension);
HRESULT GetPreviousValue(double* previousValue);
HRESULT GetPreviousVectorValue(char* previousValue, uint cDimension);
HRESULT GetIntegerValue(int* value);
HRESULT GetIntegerVectorValue(char* value, uint cDimension);
HRESULT GetFinalIntegerValue(int* finalValue);
HRESULT GetFinalIntegerVectorValue(char* finalValue, uint cDimension);
HRESULT GetPreviousIntegerValue(int* previousValue);
HRESULT GetPreviousIntegerVectorValue(char* previousValue, uint cDimension);
HRESULT GetCurrentStoryboard(IUIAnimationStoryboard2* storyboard);
HRESULT SetLowerBound(double bound);
HRESULT SetLowerBoundVector(char* bound, uint cDimension);
HRESULT SetUpperBound(double bound);
HRESULT SetUpperBoundVector(char* bound, uint cDimension);
HRESULT SetRoundingMode(UI_ANIMATION_ROUNDING_MODE mode);
HRESULT SetTag(IUnknown object, uint id);
HRESULT GetTag(IUnknown* object, uint* id);
HRESULT SetVariableChangeHandler(IUIAnimationVariableChangeHandler2 handler, BOOL fRegisterForNextAnimationEvent);
HRESULT SetVariableIntegerChangeHandler(IUIAnimationVariableIntegerChangeHandler2 handler, BOOL fRegisterForNextAnimationEvent);
HRESULT SetVariableCurveChangeHandler(IUIAnimationVariableCurveChangeHandler2 handler);
}
const GUID IID_IUIAnimationTransition2 = {0x62FF9123, 0xA85A, 0x4E9B, [0xA2, 0x18, 0x43, 0x5A, 0x93, 0xE2, 0x68, 0xFD]};
@GUID(0x62FF9123, 0xA85A, 0x4E9B, [0xA2, 0x18, 0x43, 0x5A, 0x93, 0xE2, 0x68, 0xFD]);
interface IUIAnimationTransition2 : IUnknown
{
HRESULT GetDimension(uint* dimension);
HRESULT SetInitialValue(double value);
HRESULT SetInitialVectorValue(char* value, uint cDimension);
HRESULT SetInitialVelocity(double velocity);
HRESULT SetInitialVectorVelocity(char* velocity, uint cDimension);
HRESULT IsDurationKnown();
HRESULT GetDuration(double* duration);
}
const GUID IID_IUIAnimationManagerEventHandler2 = {0xF6E022BA, 0xBFF3, 0x42EC, [0x90, 0x33, 0xE0, 0x73, 0xF3, 0x3E, 0x83, 0xC3]};
@GUID(0xF6E022BA, 0xBFF3, 0x42EC, [0x90, 0x33, 0xE0, 0x73, 0xF3, 0x3E, 0x83, 0xC3]);
interface IUIAnimationManagerEventHandler2 : IUnknown
{
HRESULT OnManagerStatusChanged(UI_ANIMATION_MANAGER_STATUS newStatus, UI_ANIMATION_MANAGER_STATUS previousStatus);
}
const GUID IID_IUIAnimationVariableChangeHandler2 = {0x63ACC8D2, 0x6EAE, 0x4BB0, [0xB8, 0x79, 0x58, 0x6D, 0xD8, 0xCF, 0xBE, 0x42]};
@GUID(0x63ACC8D2, 0x6EAE, 0x4BB0, [0xB8, 0x79, 0x58, 0x6D, 0xD8, 0xCF, 0xBE, 0x42]);
interface IUIAnimationVariableChangeHandler2 : IUnknown
{
HRESULT OnValueChanged(IUIAnimationStoryboard2 storyboard, IUIAnimationVariable2 variable, char* newValue, char* previousValue, uint cDimension);
}
const GUID IID_IUIAnimationVariableIntegerChangeHandler2 = {0x829B6CF1, 0x4F3A, 0x4412, [0xAE, 0x09, 0xB2, 0x43, 0xEB, 0x4C, 0x6B, 0x58]};
@GUID(0x829B6CF1, 0x4F3A, 0x4412, [0xAE, 0x09, 0xB2, 0x43, 0xEB, 0x4C, 0x6B, 0x58]);
interface IUIAnimationVariableIntegerChangeHandler2 : IUnknown
{
HRESULT OnIntegerValueChanged(IUIAnimationStoryboard2 storyboard, IUIAnimationVariable2 variable, char* newValue, char* previousValue, uint cDimension);
}
const GUID IID_IUIAnimationVariableCurveChangeHandler2 = {0x72895E91, 0x0145, 0x4C21, [0x91, 0x92, 0x5A, 0xAB, 0x40, 0xED, 0xDF, 0x80]};
@GUID(0x72895E91, 0x0145, 0x4C21, [0x91, 0x92, 0x5A, 0xAB, 0x40, 0xED, 0xDF, 0x80]);
interface IUIAnimationVariableCurveChangeHandler2 : IUnknown
{
HRESULT OnCurveChanged(IUIAnimationVariable2 variable);
}
const GUID IID_IUIAnimationStoryboardEventHandler2 = {0xBAC5F55A, 0xBA7C, 0x414C, [0xB5, 0x99, 0xFB, 0xF8, 0x50, 0xF5, 0x53, 0xC6]};
@GUID(0xBAC5F55A, 0xBA7C, 0x414C, [0xB5, 0x99, 0xFB, 0xF8, 0x50, 0xF5, 0x53, 0xC6]);
interface IUIAnimationStoryboardEventHandler2 : IUnknown
{
HRESULT OnStoryboardStatusChanged(IUIAnimationStoryboard2 storyboard, UI_ANIMATION_STORYBOARD_STATUS newStatus, UI_ANIMATION_STORYBOARD_STATUS previousStatus);
HRESULT OnStoryboardUpdated(IUIAnimationStoryboard2 storyboard);
}
const GUID IID_IUIAnimationLoopIterationChangeHandler2 = {0x2D3B15A4, 0x4762, 0x47AB, [0xA0, 0x30, 0xB2, 0x32, 0x21, 0xDF, 0x3A, 0xE0]};
@GUID(0x2D3B15A4, 0x4762, 0x47AB, [0xA0, 0x30, 0xB2, 0x32, 0x21, 0xDF, 0x3A, 0xE0]);
interface IUIAnimationLoopIterationChangeHandler2 : IUnknown
{
HRESULT OnLoopIterationChanged(IUIAnimationStoryboard2 storyboard, uint id, uint newIterationCount, uint oldIterationCount);
}
const GUID IID_IUIAnimationPriorityComparison2 = {0x5B6D7A37, 0x4621, 0x467C, [0x8B, 0x05, 0x70, 0x13, 0x1D, 0xE6, 0x2D, 0xDB]};
@GUID(0x5B6D7A37, 0x4621, 0x467C, [0x8B, 0x05, 0x70, 0x13, 0x1D, 0xE6, 0x2D, 0xDB]);
interface IUIAnimationPriorityComparison2 : IUnknown
{
HRESULT HasPriority(IUIAnimationStoryboard2 scheduledStoryboard, IUIAnimationStoryboard2 newStoryboard, UI_ANIMATION_PRIORITY_EFFECT priorityEffect);
}
const GUID IID_IUIAnimationTransitionLibrary2 = {0x03CFAE53, 0x9580, 0x4EE3, [0xB3, 0x63, 0x2E, 0xCE, 0x51, 0xB4, 0xAF, 0x6A]};
@GUID(0x03CFAE53, 0x9580, 0x4EE3, [0xB3, 0x63, 0x2E, 0xCE, 0x51, 0xB4, 0xAF, 0x6A]);
interface IUIAnimationTransitionLibrary2 : IUnknown
{
HRESULT CreateInstantaneousTransition(double finalValue, IUIAnimationTransition2* transition);
HRESULT CreateInstantaneousVectorTransition(char* finalValue, uint cDimension, IUIAnimationTransition2* transition);
HRESULT CreateConstantTransition(double duration, IUIAnimationTransition2* transition);
HRESULT CreateDiscreteTransition(double delay, double finalValue, double hold, IUIAnimationTransition2* transition);
HRESULT CreateDiscreteVectorTransition(double delay, char* finalValue, uint cDimension, double hold, IUIAnimationTransition2* transition);
HRESULT CreateLinearTransition(double duration, double finalValue, IUIAnimationTransition2* transition);
HRESULT CreateLinearVectorTransition(double duration, char* finalValue, uint cDimension, IUIAnimationTransition2* transition);
HRESULT CreateLinearTransitionFromSpeed(double speed, double finalValue, IUIAnimationTransition2* transition);
HRESULT CreateLinearVectorTransitionFromSpeed(double speed, char* finalValue, uint cDimension, IUIAnimationTransition2* transition);
HRESULT CreateSinusoidalTransitionFromVelocity(double duration, double period, IUIAnimationTransition2* transition);
HRESULT CreateSinusoidalTransitionFromRange(double duration, double minimumValue, double maximumValue, double period, UI_ANIMATION_SLOPE slope, IUIAnimationTransition2* transition);
HRESULT CreateAccelerateDecelerateTransition(double duration, double finalValue, double accelerationRatio, double decelerationRatio, IUIAnimationTransition2* transition);
HRESULT CreateReversalTransition(double duration, IUIAnimationTransition2* transition);
HRESULT CreateCubicTransition(double duration, double finalValue, double finalVelocity, IUIAnimationTransition2* transition);
HRESULT CreateCubicVectorTransition(double duration, char* finalValue, char* finalVelocity, uint cDimension, IUIAnimationTransition2* transition);
HRESULT CreateSmoothStopTransition(double maximumDuration, double finalValue, IUIAnimationTransition2* transition);
HRESULT CreateParabolicTransitionFromAcceleration(double finalValue, double finalVelocity, double acceleration, IUIAnimationTransition2* transition);
HRESULT CreateCubicBezierLinearTransition(double duration, double finalValue, double x1, double y1, double x2, double y2, IUIAnimationTransition2* ppTransition);
HRESULT CreateCubicBezierLinearVectorTransition(double duration, char* finalValue, uint cDimension, double x1, double y1, double x2, double y2, IUIAnimationTransition2* ppTransition);
}
const GUID IID_IUIAnimationPrimitiveInterpolation = {0xBAB20D63, 0x4361, 0x45DA, [0xA2, 0x4F, 0xAB, 0x85, 0x08, 0x84, 0x6B, 0x5B]};
@GUID(0xBAB20D63, 0x4361, 0x45DA, [0xA2, 0x4F, 0xAB, 0x85, 0x08, 0x84, 0x6B, 0x5B]);
interface IUIAnimationPrimitiveInterpolation : IUnknown
{
HRESULT AddCubic(uint dimension, double beginOffset, float constantCoefficient, float linearCoefficient, float quadraticCoefficient, float cubicCoefficient);
HRESULT AddSinusoidal(uint dimension, double beginOffset, float bias, float amplitude, float frequency, float phase);
}
const GUID IID_IUIAnimationInterpolator2 = {0xEA76AFF8, 0xEA22, 0x4A23, [0xA0, 0xEF, 0xA6, 0xA9, 0x66, 0x70, 0x35, 0x18]};
@GUID(0xEA76AFF8, 0xEA22, 0x4A23, [0xA0, 0xEF, 0xA6, 0xA9, 0x66, 0x70, 0x35, 0x18]);
interface IUIAnimationInterpolator2 : IUnknown
{
HRESULT GetDimension(uint* dimension);
HRESULT SetInitialValueAndVelocity(char* initialValue, char* initialVelocity, uint cDimension);
HRESULT SetDuration(double duration);
HRESULT GetDuration(double* duration);
HRESULT GetFinalValue(char* value, uint cDimension);
HRESULT InterpolateValue(double offset, char* value, uint cDimension);
HRESULT InterpolateVelocity(double offset, char* velocity, uint cDimension);
HRESULT GetPrimitiveInterpolation(IUIAnimationPrimitiveInterpolation interpolation, uint cDimension);
HRESULT GetDependencies(UI_ANIMATION_DEPENDENCIES* initialValueDependencies, UI_ANIMATION_DEPENDENCIES* initialVelocityDependencies, UI_ANIMATION_DEPENDENCIES* durationDependencies);
}
const GUID IID_IUIAnimationTransitionFactory2 = {0x937D4916, 0xC1A6, 0x42D5, [0x88, 0xD8, 0x30, 0x34, 0x4D, 0x6E, 0xFE, 0x31]};
@GUID(0x937D4916, 0xC1A6, 0x42D5, [0x88, 0xD8, 0x30, 0x34, 0x4D, 0x6E, 0xFE, 0x31]);
interface IUIAnimationTransitionFactory2 : IUnknown
{
HRESULT CreateTransition(IUIAnimationInterpolator2 interpolator, IUIAnimationTransition2* transition);
}
const GUID IID_IUIAnimationStoryboard2 = {0xAE289CD2, 0x12D4, 0x4945, [0x94, 0x19, 0x9E, 0x41, 0xBE, 0x03, 0x4D, 0xF2]};
@GUID(0xAE289CD2, 0x12D4, 0x4945, [0x94, 0x19, 0x9E, 0x41, 0xBE, 0x03, 0x4D, 0xF2]);
interface IUIAnimationStoryboard2 : IUnknown
{
HRESULT AddTransition(IUIAnimationVariable2 variable, IUIAnimationTransition2 transition);
HRESULT AddKeyframeAtOffset(__MIDL___MIDL_itf_UIAnimation_0000_0002_0003* existingKeyframe, double offset, __MIDL___MIDL_itf_UIAnimation_0000_0002_0003** keyframe);
HRESULT AddKeyframeAfterTransition(IUIAnimationTransition2 transition, __MIDL___MIDL_itf_UIAnimation_0000_0002_0003** keyframe);
HRESULT AddTransitionAtKeyframe(IUIAnimationVariable2 variable, IUIAnimationTransition2 transition, __MIDL___MIDL_itf_UIAnimation_0000_0002_0003* startKeyframe);
HRESULT AddTransitionBetweenKeyframes(IUIAnimationVariable2 variable, IUIAnimationTransition2 transition, __MIDL___MIDL_itf_UIAnimation_0000_0002_0003* startKeyframe, __MIDL___MIDL_itf_UIAnimation_0000_0002_0003* endKeyframe);
HRESULT RepeatBetweenKeyframes(__MIDL___MIDL_itf_UIAnimation_0000_0002_0003* startKeyframe, __MIDL___MIDL_itf_UIAnimation_0000_0002_0003* endKeyframe, double cRepetition, UI_ANIMATION_REPEAT_MODE repeatMode, IUIAnimationLoopIterationChangeHandler2 pIterationChangeHandler, uint id, BOOL fRegisterForNextAnimationEvent);
HRESULT HoldVariable(IUIAnimationVariable2 variable);
HRESULT SetLongestAcceptableDelay(double delay);
HRESULT SetSkipDuration(double secondsDuration);
HRESULT Schedule(double timeNow, UI_ANIMATION_SCHEDULING_RESULT* schedulingResult);
HRESULT Conclude();
HRESULT Finish(double completionDeadline);
HRESULT Abandon();
HRESULT SetTag(IUnknown object, uint id);
HRESULT GetTag(IUnknown* object, uint* id);
HRESULT GetStatus(UI_ANIMATION_STORYBOARD_STATUS* status);
HRESULT GetElapsedTime(double* elapsedTime);
HRESULT SetStoryboardEventHandler(IUIAnimationStoryboardEventHandler2 handler, BOOL fRegisterStatusChangeForNextAnimationEvent, BOOL fRegisterUpdateForNextAnimationEvent);
}
|
D
|
/Users/Sean/src/ToDoList/DerivedData/ToDoList/Build/Intermediates/ToDoList.build/Debug-iphoneos/ToDoList.build/Objects-normal/arm64/SecondViewController.o : /Users/Sean/src/ToDoList/ToDoList/SecondViewController.swift /Users/Sean/src/ToDoList/ToDoList/TaskManager.swift /Users/Sean/src/ToDoList/ToDoList/ViewController.swift /Users/Sean/src/ToDoList/ToDoList/AppDelegate.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/UIKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/Dispatch.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/ObjectiveC.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/CoreGraphics.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/Security.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/CoreImage.swiftmodule
/Users/Sean/src/ToDoList/DerivedData/ToDoList/Build/Intermediates/ToDoList.build/Debug-iphoneos/ToDoList.build/Objects-normal/arm64/SecondViewController~partial.swiftmodule : /Users/Sean/src/ToDoList/ToDoList/SecondViewController.swift /Users/Sean/src/ToDoList/ToDoList/TaskManager.swift /Users/Sean/src/ToDoList/ToDoList/ViewController.swift /Users/Sean/src/ToDoList/ToDoList/AppDelegate.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/UIKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/Dispatch.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/ObjectiveC.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/CoreGraphics.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/Security.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/CoreImage.swiftmodule
/Users/Sean/src/ToDoList/DerivedData/ToDoList/Build/Intermediates/ToDoList.build/Debug-iphoneos/ToDoList.build/Objects-normal/arm64/SecondViewController~partial.swiftdoc : /Users/Sean/src/ToDoList/ToDoList/SecondViewController.swift /Users/Sean/src/ToDoList/ToDoList/TaskManager.swift /Users/Sean/src/ToDoList/ToDoList/ViewController.swift /Users/Sean/src/ToDoList/ToDoList/AppDelegate.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/UIKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/Dispatch.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/ObjectiveC.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/CoreGraphics.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/Security.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/CoreImage.swiftmodule
|
D
|
module UnrealScript.TribesGame.TrPerk_QuickDraw;
import ScriptClasses;
import UnrealScript.Helpers;
import UnrealScript.TribesGame.TrPerk;
extern(C++) interface TrPerk_QuickDraw : TrPerk
{
public extern(D):
private static __gshared ScriptClass mStaticClass;
@property final static ScriptClass StaticClass() { mixin(MGSCC("Class TribesGame.TrPerk_QuickDraw")); }
private static __gshared TrPerk_QuickDraw mDefaultProperties;
@property final static TrPerk_QuickDraw DefaultProperties() { mixin(MGDPC("TrPerk_QuickDraw", "TrPerk_QuickDraw TribesGame.Default__TrPerk_QuickDraw")); }
}
|
D
|
/*******************************************************************************
* Copyright (c) 2000, 2005 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* IBM Corporation - initial API and implementation
* Port to the D programming language:
* Frank Benoit <benoit@tionex.de>
*******************************************************************************/
module dwt.custom.SashFormLayout;
import dwt.DWT;
import dwt.graphics.Point;
import dwt.graphics.Rectangle;
import dwt.widgets.Composite;
import dwt.widgets.Control;
import dwt.widgets.Layout;
import dwt.widgets.Sash;
import dwt.custom.SashForm;
import dwt.custom.SashFormData;
import dwt.dwthelper.utils;
/**
* This class provides the layout for SashForm
*
* @see SashForm
*/
class SashFormLayout : Layout
{
protected override Point computeSize(Composite composite, int wHint, int hHint, bool flushCache)
{
SashForm sashForm = cast(SashForm)composite;
Control[] cArray = sashForm.getControls(true);
int width = 0;
int height = 0;
if (cArray.length is 0)
{
if (wHint !is DWT.DEFAULT) width = wHint;
if (hHint !is DWT.DEFAULT) height = hHint;
return new Point(width, height);
}
// determine control sizes
bool vertical = sashForm.getOrientation() is DWT.VERTICAL;
int maxIndex = 0;
int maxValue = 0;
for (int i = 0; i < cArray.length; i++)
{
if (vertical)
{
Point size = cArray[i].computeSize(wHint, DWT.DEFAULT, flushCache);
if (size.y > maxValue)
{
maxIndex = i;
maxValue = size.y;
}
width = Math.max(width, size.x);
}
else
{
Point size = cArray[i].computeSize(DWT.DEFAULT, hHint, flushCache);
if (size.x > maxValue)
{
maxIndex = i;
maxValue = size.x;
}
height = Math.max(height, size.y);
}
}
// get the ratios
long[] ratios = new long[cArray.length];
long total = 0;
for (int i = 0; i < cArray.length; i++)
{
Object data = cArray[i].getLayoutData();
if ( auto sfd = cast(SashFormData)data)
{
ratios[i] = sfd.weight;
}
else
{
data = new SashFormData();
cArray[i].setLayoutData(data);
(cast(SashFormData)data).weight = ratios[i] = ((200 << 16) + 999) / 1000;
}
total += ratios[i];
}
if (ratios[maxIndex] > 0)
{
int sashwidth = sashForm.sashes.length > 0 ? sashForm.SASH_WIDTH + sashForm.sashes [0].getBorderWidth() * 2 : sashForm.SASH_WIDTH;
if (vertical)
{
height += cast(int)(total * maxValue / ratios[maxIndex]) + (cArray.length - 1) * sashwidth;
}
else
{
width += cast(int)(total * maxValue / ratios[maxIndex]) + (cArray.length - 1) * sashwidth;
}
}
width += sashForm.getBorderWidth()*2;
height += sashForm.getBorderWidth()*2;
if (wHint !is DWT.DEFAULT) width = wHint;
if (hHint !is DWT.DEFAULT) height = hHint;
return new Point(width, height);
}
protected override bool flushCache(Control control)
{
return true;
}
protected override void layout(Composite composite, bool flushCache)
{
SashForm sashForm = cast(SashForm)composite;
Rectangle area = sashForm.getClientArea();
if (area.width <= 1 || area.height <= 1) return;
Control[] newControls = sashForm.getControls(true);
if (sashForm.controls.length is 0 && newControls.length is 0) return;
sashForm.controls = newControls;
Control[] controls = sashForm.controls;
if (sashForm.maxControl !is null && !sashForm.maxControl.isDisposed())
{
for (int i= 0; i < controls.length; i++)
{
if (controls[i] !is sashForm.maxControl)
{
controls[i].setBounds(-200, -200, 0, 0);
}
else
{
controls[i].setBounds(area);
}
}
return;
}
// keep just the right number of sashes
if (sashForm.sashes.length < controls.length - 1)
{
Sash[] newSashes = new Sash[controls.length - 1];
System.arraycopy(sashForm.sashes, 0, newSashes, 0, sashForm.sashes.length);
for (int i = sashForm.sashes.length; i < newSashes.length; i++)
{
newSashes[i] = new Sash(sashForm, sashForm.sashStyle);
newSashes[i].setBackground(sashForm.background);
newSashes[i].setForeground(sashForm.foreground);
newSashes[i].addListener(DWT.Selection, sashForm.sashListener);
}
sashForm.sashes = newSashes;
}
if (sashForm.sashes.length > controls.length - 1)
{
if (controls.length is 0)
{
for (int i = 0; i < sashForm.sashes.length; i++)
{
sashForm.sashes[i].dispose();
}
sashForm.sashes = new Sash[0];
}
else
{
Sash[] newSashes = new Sash[controls.length - 1];
System.arraycopy(sashForm.sashes, 0, newSashes, 0, newSashes.length);
for (int i = controls.length - 1; i < sashForm.sashes.length; i++)
{
sashForm.sashes[i].dispose();
}
sashForm.sashes = newSashes;
}
}
if (controls.length is 0) return;
Sash[] sashes = sashForm.sashes;
// get the ratios
long[] ratios = new long[controls.length];
long total = 0;
for (int i = 0; i < controls.length; i++)
{
Object data = controls[i].getLayoutData();
if ( auto sfd = cast(SashFormData)data )
{
ratios[i] = sfd.weight;
}
else
{
data = new SashFormData();
controls[i].setLayoutData(data);
(cast(SashFormData)data).weight = ratios[i] = ((200 << 16) + 999) / 1000;
}
total += ratios[i];
}
int sashwidth = sashes.length > 0 ? sashForm.SASH_WIDTH + sashes [0].getBorderWidth() * 2 : sashForm.SASH_WIDTH;
if (sashForm.getOrientation() is DWT.HORIZONTAL)
{
int width = cast(int)(ratios[0] * (area.width - sashes.length * sashwidth) / total);
int x = area.x;
controls[0].setBounds(x, area.y, width, area.height);
x += width;
for (int i = 1; i < controls.length - 1; i++)
{
sashes[i - 1].setBounds(x, area.y, sashwidth, area.height);
x += sashwidth;
width = cast(int)(ratios[i] * (area.width - sashes.length * sashwidth) / total);
controls[i].setBounds(x, area.y, width, area.height);
x += width;
}
if (controls.length > 1)
{
sashes[sashes.length - 1].setBounds(x, area.y, sashwidth, area.height);
x += sashwidth;
width = area.width - x;
controls[controls.length - 1].setBounds(x, area.y, width, area.height);
}
}
else
{
int height = cast(int)(ratios[0] * (area.height - sashes.length * sashwidth) / total);
int y = area.y;
controls[0].setBounds(area.x, y, area.width, height);
y += height;
for (int i = 1; i < controls.length - 1; i++)
{
sashes[i - 1].setBounds(area.x, y, area.width, sashwidth);
y += sashwidth;
height = cast(int)(ratios[i] * (area.height - sashes.length * sashwidth) / total);
controls[i].setBounds(area.x, y, area.width, height);
y += height;
}
if (controls.length > 1)
{
sashes[sashes.length - 1].setBounds(area.x, y, area.width, sashwidth);
y += sashwidth;
height = area.height - y;
controls[controls.length - 1].setBounds(area.x, y, area.width, height);
}
}
}
}
|
D
|
module android.java.java.util.function_.ObjIntConsumer;
public import android.java.java.util.function_.ObjIntConsumer_d_interface;
import arsd.jni : ImportExportImpl;
mixin ImportExportImpl!ObjIntConsumer;
import import0 = android.java.java.lang.Class;
|
D
|
instance Mod_7056_DMR_Daemonenritter_MT (Npc_Default)
{
// ------ NSC ------
name = "Dämonenritter";
guild = GIL_KDF;
id = 7056;
voice = 13;
flags = 0;
npctype = NPCTYPE_MAIN;
// ------ Attribute ------
B_SetAttributesToChapter (self, 5);
// ------ Kampf-Taktik ------
fight_tactic = FAI_HUMAN_MASTER;
// ------ Equippte Waffen ------
EquipItem (self, ItMw_1h_Mil_Sword);
// ------ Inventory ------
B_CreateAmbientInv (self);
// ------ visuals ------
B_SetNpcVisual (self, MALE, "Hum_Head_FatBald", Face_N_Normal06, BodyTex_N,ITAR_Raven_Addon);
Mdl_SetModelFatness (self,2);
Mdl_ApplyOverlayMds (self, "Humans_Relaxed.mds");
// ------ NSC-relevante Talente vergeben ------
B_GiveNpcTalents (self);
// ------ Kampf-Talente ------
B_SetFightSkills (self, 80);
// ------ TA anmelden ------
daily_routine = Rtn_Start_7056;
};
FUNC VOID Rtn_Start_7056()
{
TA_Stand_WP (08,00,23,00,"OW_PATH_1_16");
TA_Stand_WP (23,00,08,00,"OW_PATH_1_16");
};
|
D
|
/Users/renxl/Desktop/renxl/xcode/NNMintFurniture/build/Pods.build/Debug-iphonesimulator/Alamofire.build/Objects-normal/x86_64/Response.o : /Users/renxl/Desktop/renxl/xcode/NNMintFurniture/Pods/Alamofire/Source/MultipartFormData.swift /Users/renxl/Desktop/renxl/xcode/NNMintFurniture/Pods/Alamofire/Source/Timeline.swift /Users/renxl/Desktop/renxl/xcode/NNMintFurniture/Pods/Alamofire/Source/DispatchQueue+Alamofire.swift /Users/renxl/Desktop/renxl/xcode/NNMintFurniture/Pods/Alamofire/Source/Alamofire.swift /Users/renxl/Desktop/renxl/xcode/NNMintFurniture/Pods/Alamofire/Source/Response.swift /Users/renxl/Desktop/renxl/xcode/NNMintFurniture/Pods/Alamofire/Source/TaskDelegate.swift /Users/renxl/Desktop/renxl/xcode/NNMintFurniture/Pods/Alamofire/Source/SessionDelegate.swift /Users/renxl/Desktop/renxl/xcode/NNMintFurniture/Pods/Alamofire/Source/ParameterEncoding.swift /Users/renxl/Desktop/renxl/xcode/NNMintFurniture/Pods/Alamofire/Source/Validation.swift /Users/renxl/Desktop/renxl/xcode/NNMintFurniture/Pods/Alamofire/Source/ResponseSerialization.swift /Users/renxl/Desktop/renxl/xcode/NNMintFurniture/Pods/Alamofire/Source/SessionManager.swift /Users/renxl/Desktop/renxl/xcode/NNMintFurniture/Pods/Alamofire/Source/NetworkReachabilityManager.swift /Users/renxl/Desktop/renxl/xcode/NNMintFurniture/Pods/Alamofire/Source/AFError.swift /Users/renxl/Desktop/renxl/xcode/NNMintFurniture/Pods/Alamofire/Source/Notifications.swift /Users/renxl/Desktop/renxl/xcode/NNMintFurniture/Pods/Alamofire/Source/Result.swift /Users/renxl/Desktop/renxl/xcode/NNMintFurniture/Pods/Alamofire/Source/Request.swift /Users/renxl/Desktop/renxl/xcode/NNMintFurniture/Pods/Alamofire/Source/ServerTrustPolicy.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.apinotesc /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/ObjectiveC.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreImage.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/QuartzCore.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Metal.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreFoundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreGraphics.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/UIKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/SwiftOnoneSupport.swiftmodule /Users/renxl/Desktop/renxl/xcode/NNMintFurniture/Pods/Target\ Support\ Files/Alamofire/Alamofire-umbrella.h /Users/renxl/Desktop/renxl/xcode/NNMintFurniture/build/Pods.build/Debug-iphonesimulator/Alamofire.build/unextended-module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/OpenGLES.framework/Headers/OpenGLES.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImage.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/QuartzCore.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/Security.framework/Headers/Security.apinotes
/Users/renxl/Desktop/renxl/xcode/NNMintFurniture/build/Pods.build/Debug-iphonesimulator/Alamofire.build/Objects-normal/x86_64/Response~partial.swiftmodule : /Users/renxl/Desktop/renxl/xcode/NNMintFurniture/Pods/Alamofire/Source/MultipartFormData.swift /Users/renxl/Desktop/renxl/xcode/NNMintFurniture/Pods/Alamofire/Source/Timeline.swift /Users/renxl/Desktop/renxl/xcode/NNMintFurniture/Pods/Alamofire/Source/DispatchQueue+Alamofire.swift /Users/renxl/Desktop/renxl/xcode/NNMintFurniture/Pods/Alamofire/Source/Alamofire.swift /Users/renxl/Desktop/renxl/xcode/NNMintFurniture/Pods/Alamofire/Source/Response.swift /Users/renxl/Desktop/renxl/xcode/NNMintFurniture/Pods/Alamofire/Source/TaskDelegate.swift /Users/renxl/Desktop/renxl/xcode/NNMintFurniture/Pods/Alamofire/Source/SessionDelegate.swift /Users/renxl/Desktop/renxl/xcode/NNMintFurniture/Pods/Alamofire/Source/ParameterEncoding.swift /Users/renxl/Desktop/renxl/xcode/NNMintFurniture/Pods/Alamofire/Source/Validation.swift /Users/renxl/Desktop/renxl/xcode/NNMintFurniture/Pods/Alamofire/Source/ResponseSerialization.swift /Users/renxl/Desktop/renxl/xcode/NNMintFurniture/Pods/Alamofire/Source/SessionManager.swift /Users/renxl/Desktop/renxl/xcode/NNMintFurniture/Pods/Alamofire/Source/NetworkReachabilityManager.swift /Users/renxl/Desktop/renxl/xcode/NNMintFurniture/Pods/Alamofire/Source/AFError.swift /Users/renxl/Desktop/renxl/xcode/NNMintFurniture/Pods/Alamofire/Source/Notifications.swift /Users/renxl/Desktop/renxl/xcode/NNMintFurniture/Pods/Alamofire/Source/Result.swift /Users/renxl/Desktop/renxl/xcode/NNMintFurniture/Pods/Alamofire/Source/Request.swift /Users/renxl/Desktop/renxl/xcode/NNMintFurniture/Pods/Alamofire/Source/ServerTrustPolicy.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.apinotesc /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/ObjectiveC.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreImage.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/QuartzCore.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Metal.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreFoundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreGraphics.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/UIKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/SwiftOnoneSupport.swiftmodule /Users/renxl/Desktop/renxl/xcode/NNMintFurniture/Pods/Target\ Support\ Files/Alamofire/Alamofire-umbrella.h /Users/renxl/Desktop/renxl/xcode/NNMintFurniture/build/Pods.build/Debug-iphonesimulator/Alamofire.build/unextended-module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/OpenGLES.framework/Headers/OpenGLES.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImage.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/QuartzCore.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/Security.framework/Headers/Security.apinotes
/Users/renxl/Desktop/renxl/xcode/NNMintFurniture/build/Pods.build/Debug-iphonesimulator/Alamofire.build/Objects-normal/x86_64/Response~partial.swiftdoc : /Users/renxl/Desktop/renxl/xcode/NNMintFurniture/Pods/Alamofire/Source/MultipartFormData.swift /Users/renxl/Desktop/renxl/xcode/NNMintFurniture/Pods/Alamofire/Source/Timeline.swift /Users/renxl/Desktop/renxl/xcode/NNMintFurniture/Pods/Alamofire/Source/DispatchQueue+Alamofire.swift /Users/renxl/Desktop/renxl/xcode/NNMintFurniture/Pods/Alamofire/Source/Alamofire.swift /Users/renxl/Desktop/renxl/xcode/NNMintFurniture/Pods/Alamofire/Source/Response.swift /Users/renxl/Desktop/renxl/xcode/NNMintFurniture/Pods/Alamofire/Source/TaskDelegate.swift /Users/renxl/Desktop/renxl/xcode/NNMintFurniture/Pods/Alamofire/Source/SessionDelegate.swift /Users/renxl/Desktop/renxl/xcode/NNMintFurniture/Pods/Alamofire/Source/ParameterEncoding.swift /Users/renxl/Desktop/renxl/xcode/NNMintFurniture/Pods/Alamofire/Source/Validation.swift /Users/renxl/Desktop/renxl/xcode/NNMintFurniture/Pods/Alamofire/Source/ResponseSerialization.swift /Users/renxl/Desktop/renxl/xcode/NNMintFurniture/Pods/Alamofire/Source/SessionManager.swift /Users/renxl/Desktop/renxl/xcode/NNMintFurniture/Pods/Alamofire/Source/NetworkReachabilityManager.swift /Users/renxl/Desktop/renxl/xcode/NNMintFurniture/Pods/Alamofire/Source/AFError.swift /Users/renxl/Desktop/renxl/xcode/NNMintFurniture/Pods/Alamofire/Source/Notifications.swift /Users/renxl/Desktop/renxl/xcode/NNMintFurniture/Pods/Alamofire/Source/Result.swift /Users/renxl/Desktop/renxl/xcode/NNMintFurniture/Pods/Alamofire/Source/Request.swift /Users/renxl/Desktop/renxl/xcode/NNMintFurniture/Pods/Alamofire/Source/ServerTrustPolicy.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.apinotesc /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/ObjectiveC.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreImage.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/QuartzCore.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Metal.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreFoundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreGraphics.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/UIKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/SwiftOnoneSupport.swiftmodule /Users/renxl/Desktop/renxl/xcode/NNMintFurniture/Pods/Target\ Support\ Files/Alamofire/Alamofire-umbrella.h /Users/renxl/Desktop/renxl/xcode/NNMintFurniture/build/Pods.build/Debug-iphonesimulator/Alamofire.build/unextended-module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/OpenGLES.framework/Headers/OpenGLES.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImage.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/QuartzCore.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/Security.framework/Headers/Security.apinotes
|
D
|
; 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_sub_long_3.java
.class public dot.junit.opcodes.sub_long.d.T_sub_long_3
.super java/lang/Object
.method public <init>()V
.limit regs 1
invoke-direct {v0}, java/lang/Object/<init>()V
return-void
.end method
.method public run(JJ)J
.limit regs 7
const v3, 12346
sub-long v0, v3, v5
return-wide v5
.end method
|
D
|
module dcrypt.crypto.random.fortuna.sources.systemtick;
import core.time;
import dcrypt.crypto.random.fortuna.entropysource;
import dcrypt.crypto.random.fortuna.fortuna: addEntropy;
/// Generate entropy data with the system clock.
///
unittest {
auto st = new SystemTickEntropySource;
st.start();
}
@safe
public class SystemTickEntropySource: EntropySource
{
override void collectEntropy() nothrow {
ubyte[64] buf;
getTimingEntropy(buf);
sendEntropyEvent(buf);
}
@nogc @property nothrow
override public string name() {
return "SystemTickSource";
}
@safe @nogc nothrow
override uint scheduleNext() {
return 250;
}
}
/// Fill the buffer with timing measurements.
/// Params:
/// buf = The buffer to fill.
@safe @nogc nothrow
static void getTimingEntropy(ubyte[] buf) {
foreach(ref b; buf) {
ulong ticks = MonoTime.currTime.ticks;
b = cast(ubyte) (ticks^(ticks>>8)^(ticks>>16)); // Combine three bytes for the case if the system clock has low resolution.
}
}
unittest {
ubyte[32] buf1, buf2;
getTimingEntropy(buf1);
getTimingEntropy(buf2);
assert(buf1 != buf2, "Measurements are not at all random!");
}
|
D
|
/**
* Treap container for internal usage.
*
* Copyright: Copyright Digital Mars 2014 - 2014.
* License: <a href="http://www.boost.org/LICENSE_1_0.txt">Boost License 1.0</a>.
*/
module rt.util.container.treap;
static import common = rt.util.container.common;
import rt.util.random;
struct Treap(E)
{
nothrow:
static struct Node
{
Node* left, right;
E element;
uint priority;
}
@disable this(this);
~this()
{
removeAll();
}
void initialize()
{
rand48.defaultSeed();
}
void insert(E element)
{
root = insert(root, element);
}
void remove(E element)
{
remove(&root, element);
}
int opApply(scope int delegate(ref E) nothrow dg)
{
return (cast(const)&this).opApply((ref const E e) => dg(*cast(E*)&e));
}
int opApply(scope int delegate(ref const E) nothrow dg) const
{
return opApplyHelper(root, dg);
}
version(unittest)
bool opEquals(E[] elements)
{
size_t i;
foreach (e; this)
{
if (i >= elements.length)
return false;
if (e != elements[i++])
return false;
}
return i == elements.length;
}
void removeAll()
{
removeAll(root);
root = null;
}
version(unittest)
bool valid()
{
return valid(root);
}
version(none)
uint height()
{
static uint height(Node* node)
{
if (!node)
return 0;
auto left = height(node.left);
auto right = height(node.right);
return 1 + (left > right ? left : right);
}
return height(root);
}
version(none)
size_t count()
{
static size_t count(Node* node)
{
if (!node)
return 0;
return count(node.left) + count(node.right) + 1;
}
return count(root);
}
private:
Node* root;
Rand48 rand48;
Node* allocNode(E element)
{
Node* node = cast(Node*)common.xmalloc(Node.sizeof);
node.left = node.right = null;
node.priority = rand48();
node.element = element;
return node;
}
Node* insert(Node* node, E element)
{
if (!node)
return allocNode(element);
else if (element < node.element)
{
node.left = insert(node.left, element);
if (node.left.priority < node.priority)
node = rotateR(node);
}
else if (element > node.element)
{
node.right = insert(node.right, element);
if (node.right.priority < node.priority)
node = rotateL(node);
}
else
{} // ignore duplicate
return node;
}
static:
void freeNode(Node* node)
{
common.free(node);
}
Node* rotateL(Node* root)
{
auto pivot = root.right;
root.right = pivot.left;
pivot.left = root;
return pivot;
}
Node* rotateR(Node* root)
{
auto pivot = root.left;
root.left = pivot.right;
pivot.right = root;
return pivot;
}
void remove(Node** ppnode, E element)
{
Node* node = *ppnode;
if (!node)
return; // element not in treap
if (element < node.element)
{
remove(&node.left, element);
}
else if (element > node.element)
{
remove(&node.right, element);
}
else
{
while (node.left && node.right)
{
if (node.left.priority < node.right.priority)
{
*ppnode = rotateR(node);
ppnode = &(*ppnode).right;
}
else
{
*ppnode = rotateL(node);
ppnode = &(*ppnode).left;
}
}
if (!node.left)
*ppnode = node.right;
else
*ppnode = node.left;
freeNode(node);
}
}
void removeAll(Node* node)
{
if (!node)
return;
removeAll(node.left);
removeAll(node.right);
freeNode(node);
}
int opApplyHelper(const Node* node, scope int delegate(ref const E) nothrow dg)
{
if (!node)
return 0;
int result = opApplyHelper(node.left, dg);
if (result)
return result;
result = dg(node.element);
if (result)
return result;
return opApplyHelper(node.right, dg);
}
version(unittest)
bool valid(Node* node)
{
if (!node)
return true;
if (node.left)
{
if (node.left.priority < node.priority)
return false;
if (node.left.element > node.element)
return false;
}
if (node.right)
{
if (node.right.priority < node.priority)
return false;
if (node.right.element < node.element)
return false;
}
return valid(node.left) && valid(node.right);
}
}
unittest
{
// randomized unittest for randomized data structure
import /*cstdlib = */core.stdc.stdlib : rand, srand;
import /*ctime = */core.stdc.time : time;
enum OP { add, remove }
enum initialSize = 1000;
enum randOps = 1000;
Treap!uint treap;
OP[] ops;
uint[] opdata;
treap.initialize();
srand(cast(uint)time(null));
uint[] data;
initialLoop:
foreach (i; 0 .. initialSize)
{
data ~= rand();
treap.insert(data[$-1]);
foreach (e; data[0..$-1])
if (e == data[$-1])
{
data = data[0..$-1];
continue initialLoop;
}
}
data.sort;
assert(treap == data);
assert(treap.valid());
for (int i = randOps; i > 0; --i)
{
ops ~= cast(OP)(rand() < uint.max / 2 ? OP.add: OP.remove);
opdata ~= rand();
}
foreach (op; ops)
{
if (op == OP.add)
{
treap.insert(opdata[0]);
size_t i;
for (i = 0; i < data.length; ++i)
if (data[i] >= opdata[0])
break;
if (i == data.length || data[i] != opdata[0])
{ // not a duplicate
data.length++;
uint tmp = opdata[0];
for (; i < data.length; ++i)
{
uint tmp2 = data[i];
data[i] = tmp;
tmp = tmp2;
}
}
}
else if (!data.length) // nothing to remove
{
opdata = opdata[1..$];
continue;
}
else
{
uint tmp = data[opdata[0]%data.length];
treap.remove(tmp);
size_t i;
for (i = 0; data[i] < tmp; ++i)
{}
for (; i < data.length-1; ++i)
data[i] = data[i+1];
data.length--;
}
assert(treap.valid());
assert(treap == data);
opdata = opdata[1..$];
}
treap.removeAll();
data.length = 0;
assert(treap == data);
}
|
D
|
module eventcore.drivers.libasync;
version (Have_libasync):
import eventcore.driver;
import std.socket : Address;
import core.time : Duration;
final class LibasyncEventDriver : EventDriver {
@safe: /*@nogc:*/ nothrow:
private {
LibasyncEventDriverCore m_core;
LibasyncEventDriverFiles m_files;
LibasyncEventDriverSockets m_sockets;
LibasyncEventDriverDNS m_dns;
LibasyncEventDriverTimers m_timers;
LibasyncEventDriverEvents m_events;
LibasyncEventDriverSignals m_signals;
LibasyncEventDriverWatchers m_watchers;
}
this()
{
m_core = new LibasyncEventDriverCore();
m_files = new LibasyncEventDriverFiles();
m_sockets = new LibasyncEventDriverSockets();
m_dns = new LibasyncEventDriverDNS();
m_timers = new LibasyncEventDriverTimers();
m_events = new LibasyncEventDriverEvents();
m_signals = new LibasyncEventDriverSignals();
m_watchers = new LibasyncEventDriverWatchers();
}
override @property LibasyncEventDriverCore core() { return m_core; }
override @property LibasyncEventDriverFiles files() { return m_files; }
override @property LibasyncEventDriverSockets sockets() { return m_sockets; }
override @property LibasyncEventDriverDNS dns() { return m_dns; }
override @property LibasyncEventDriverTimers timers() { return m_timers; }
override @property LibasyncEventDriverEvents events() { return m_events; }
override @property shared(LibasyncEventDriverEvents) events() shared { return m_events; }
override @property LibasyncEventDriverSignals signals() { return m_signals; }
override @property LibasyncEventDriverWatchers watchers() { return m_watchers; }
override void dispose()
{
assert(false, "TODO!");
}
}
final class LibasyncEventDriverCore : EventDriverCore {
@safe: /*@nogc:*/ nothrow:
override size_t waiterCount()
{
assert(false, "TODO!");
}
override ExitReason processEvents(Duration timeout = Duration.max)
{
assert(false, "TODO!");
}
override void exit()
{
assert(false, "TODO!");
}
override void clearExitFlag()
{
assert(false, "TODO!");
}
protected override void* rawUserData(StreamSocketFD descriptor, size_t size, DataInitializer initialize, DataInitializer destroy) @system
{
assert(false, "TODO!");
}
protected override void* rawUserData(DatagramSocketFD descriptor, size_t size, DataInitializer initialize, DataInitializer destroy) @system
{
assert(false, "TODO!");
}
}
final class LibasyncEventDriverSockets : EventDriverSockets {
@safe: /*@nogc:*/ nothrow:
override StreamSocketFD connectStream(scope Address peer_address, scope Address bind_address, ConnectCallback on_connect)
{
assert(false, "TODO!");
}
override StreamSocketFD adoptStream(int socket)
{
assert(false, "TODO!");
}
alias listenStream = EventDriverSockets.listenStream;
override StreamListenSocketFD listenStream(scope Address bind_address, StreamListenOptions options, AcceptCallback on_accept)
{
assert(false, "TODO!");
}
override void waitForConnections(StreamListenSocketFD sock, AcceptCallback on_accept)
{
assert(false, "TODO!");
}
override ConnectionState getConnectionState(StreamSocketFD sock)
{
assert(false, "TODO!");
}
override bool getLocalAddress(SocketFD sock, scope RefAddress dst)
{
assert(false, "TODO!");
}
override bool getRemoteAddress(SocketFD sock, scope RefAddress dst)
{
assert(false, "TODO!");
}
override void setTCPNoDelay(StreamSocketFD socket, bool enable)
{
assert(false, "TODO!");
}
override void setKeepAlive(StreamSocketFD socket, bool enable)
{
assert(false, "TODO!");
}
override void read(StreamSocketFD socket, ubyte[] buffer, IOMode mode, IOCallback on_read_finish)
{
assert(false, "TODO!");
}
override void write(StreamSocketFD socket, const(ubyte)[] buffer, IOMode mode, IOCallback on_write_finish)
{
assert(false, "TODO!");
}
override void waitForData(StreamSocketFD socket, IOCallback on_data_available)
{
assert(false, "TODO!");
}
override void shutdown(StreamSocketFD socket, bool shut_read = true, bool shut_write = true)
{
assert(false, "TODO!");
}
override void cancelRead(StreamSocketFD socket)
{
assert(false, "TODO!");
}
override void cancelWrite(StreamSocketFD socket)
{
assert(false, "TODO!");
}
override DatagramSocketFD createDatagramSocket(scope Address bind_address, scope Address target_address)
{
assert(false, "TODO!");
}
override DatagramSocketFD adoptDatagramSocket(int socket)
{
assert(false);
}
override void setTargetAddress(DatagramSocketFD socket, scope Address target_address)
{
assert(false);
}
override bool setBroadcast(DatagramSocketFD socket, bool enable)
{
assert(false, "TODO!");
}
override void receive(DatagramSocketFD socket, ubyte[] buffer, IOMode mode, DatagramIOCallback on_receive_finish)
{
assert(false, "TODO!");
}
override void cancelReceive(DatagramSocketFD socket)
{
assert(false, "TODO!");
}
override void send(DatagramSocketFD socket, const(ubyte)[] buffer, IOMode mode, Address target_address, DatagramIOCallback on_send_finish)
{
assert(false, "TODO!");
}
override void cancelSend(DatagramSocketFD socket)
{
assert(false, "TODO!");
}
override void addRef(SocketFD descriptor)
{
assert(false, "TODO!");
}
override bool releaseRef(SocketFD descriptor)
{
assert(false, "TODO!");
}
}
final class LibasyncEventDriverDNS : EventDriverDNS {
@safe: /*@nogc:*/ nothrow:
DNSLookupID lookupHost(string name, DNSLookupCallback on_lookup_finished)
{
assert(false, "TODO!");
}
void cancelLookup(DNSLookupID handle)
{
assert(false, "TODO!");
}
}
final class LibasyncEventDriverFiles : EventDriverFiles {
@safe: /*@nogc:*/ nothrow:
override FileFD open(string path, FileOpenMode mode)
{
assert(false, "TODO!");
}
override FileFD adopt(int system_file_handle)
{
assert(false, "TODO!");
}
override void close(FileFD file)
{
assert(false, "TODO!");
}
override ulong getSize(FileFD file)
{
assert(false, "TODO!");
}
override void write(FileFD file, ulong offset, const(ubyte)[] buffer, IOMode mode, FileIOCallback on_write_finish)
{
assert(false, "TODO!");
}
override void read(FileFD file, ulong offset, ubyte[] buffer, IOMode mode, FileIOCallback on_read_finish)
{
assert(false, "TODO!");
}
override void cancelWrite(FileFD file)
{
assert(false, "TODO!");
}
override void cancelRead(FileFD file)
{
assert(false, "TODO!");
}
override void addRef(FileFD descriptor)
{
assert(false, "TODO!");
}
override bool releaseRef(FileFD descriptor)
{
assert(false, "TODO!");
}
}
final class LibasyncEventDriverEvents : EventDriverEvents {
@safe: /*@nogc:*/ nothrow:
override EventID create()
{
assert(false, "TODO!");
}
override void trigger(EventID event, bool notify_all = true)
{
assert(false, "TODO!");
}
override void trigger(EventID event, bool notify_all = true) shared
{
assert(false, "TODO!");
}
override void wait(EventID event, EventCallback on_event)
{
assert(false, "TODO!");
}
override void cancelWait(EventID event, EventCallback on_event)
{
assert(false, "TODO!");
}
override void addRef(EventID descriptor)
{
assert(false, "TODO!");
}
override bool releaseRef(EventID descriptor)
{
assert(false, "TODO!");
}
}
final class LibasyncEventDriverSignals : EventDriverSignals {
@safe: /*@nogc:*/ nothrow:
override SignalListenID listen(int sig, SignalCallback on_signal)
{
assert(false, "TODO!");
}
override void addRef(SignalListenID descriptor)
{
assert(false, "TODO!");
}
override bool releaseRef(SignalListenID descriptor)
{
assert(false, "TODO!");
}
}
final class LibasyncEventDriverTimers : EventDriverTimers {
@safe: /*@nogc:*/ nothrow:
override TimerID create()
{
assert(false, "TODO!");
}
override void set(TimerID timer, Duration timeout, Duration repeat = Duration.zero)
{
assert(false, "TODO!");
}
override void stop(TimerID timer)
{
assert(false, "TODO!");
}
override bool isPending(TimerID timer)
{
assert(false, "TODO!");
}
override bool isPeriodic(TimerID timer)
{
assert(false, "TODO!");
}
override void wait(TimerID timer, TimerCallback callback)
{
assert(false, "TODO!");
}
override void cancelWait(TimerID timer)
{
assert(false, "TODO!");
}
override void addRef(TimerID descriptor)
{
assert(false, "TODO!");
}
override bool releaseRef(TimerID descriptor)
{
assert(false, "TODO!");
}
override bool isUnique(TimerID descriptor) const
{
assert(false, "TODO!");
}
}
final class LibasyncEventDriverWatchers : EventDriverWatchers {
@safe: /*@nogc:*/ nothrow:
override WatcherID watchDirectory(string path, bool recursive, FileChangesCallback callback)
{
assert(false, "TODO!");
}
override void addRef(WatcherID descriptor)
{
assert(false, "TODO!");
}
override bool releaseRef(WatcherID descriptor)
{
assert(false, "TODO!");
}
}
|
D
|
/*
* This file has been automatically generated by Soupply and released under the MIT license.
* Generated from data/bedrock201.xml
*/
module soupply.bedrock201.types;
static import std.conv;
import xpacket;
import xserial.serial : EndianType, serializeLength, deserializeLength;
import xbuffer.memory : xalloc, xfree;
import soupply.util;
import soupply.bedrock201.metadata;
struct LoginBody
{
private struct Container
{
enum string[] __fields = ["chain", "clientData"];
@Length!uint ubyte[] chain;
@Length!uint ubyte[] clientData;
mixin Make!(Endian.littleEndian, varuint);
}
enum string[] __fields = Container.__fields;
Container _container;
alias _container this;
void serialize(Buffer buffer)
{
Buffer _buffer = xalloc!Buffer(Container.sizeof + 4);
_container.encodeBody(_buffer);
serializeLength!(EndianType.var, uint)(buffer, _buffer.data!ubyte.length);
buffer.writeData(_buffer.data!ubyte);
xfree(_buffer);
}
void deserialize(Buffer buffer)
{
Buffer _buffer = xalloc!Buffer(cast(ubyte[])buffer.readData(deserializeLength!(EndianType.var, uint)(buffer)));
_container.decodeBody(_buffer);
xfree(_buffer);
}
string toString()
{
return "LoginBody(chain: " ~ std.conv.to!string(this.chain) ~ ", clientData: " ~ std.conv.to!string(this.clientData) ~ ")";
}
}
struct PackWithSize
{
enum string[] __fields = ["id", "version_", "size", "unknown3", "unknown4"];
string id;
string version_;
ulong size;
string unknown3;
string unknown4;
mixin Make!(Endian.littleEndian, varuint);
string toString()
{
return "PackWithSize(id: " ~ std.conv.to!string(this.id) ~ ", version_: " ~ std.conv.to!string(this.version_) ~ ", size: " ~ std.conv.to!string(this.size) ~ ", unknown3: " ~ std.conv.to!string(this.unknown3) ~ ", unknown4: " ~ std.conv.to!string(this.unknown4) ~ ")";
}
}
struct Pack
{
enum string[] __fields = ["id", "version_", "unknown2"];
string id;
string version_;
string unknown2;
mixin Make!(Endian.littleEndian, varuint);
string toString()
{
return "Pack(id: " ~ std.conv.to!string(this.id) ~ ", version_: " ~ std.conv.to!string(this.version_) ~ ", unknown2: " ~ std.conv.to!string(this.unknown2) ~ ")";
}
}
struct Slot
{
enum string[] __fields = ["id", "metaAndCount", "nbt", "canPlaceOn", "canDestroy"];
@Var int id;
@Condition("id>0") @Var int metaAndCount;
@Condition("id>0") @Length!ushort ubyte[] nbt;
string[] canPlaceOn;
string[] canDestroy;
mixin Make!(Endian.littleEndian, varuint);
string toString()
{
return "Slot(id: " ~ std.conv.to!string(this.id) ~ ", metaAndCount: " ~ std.conv.to!string(this.metaAndCount) ~ ", nbt: " ~ std.conv.to!string(this.nbt) ~ ", canPlaceOn: " ~ std.conv.to!string(this.canPlaceOn) ~ ", canDestroy: " ~ std.conv.to!string(this.canDestroy) ~ ")";
}
}
struct Attribute
{
enum string[] __fields = ["min", "max", "value", "default_", "name"];
float min;
float max;
float value;
float default_;
string name;
mixin Make!(Endian.littleEndian, varuint);
string toString()
{
return "Attribute(min: " ~ std.conv.to!string(this.min) ~ ", max: " ~ std.conv.to!string(this.max) ~ ", value: " ~ std.conv.to!string(this.value) ~ ", default_: " ~ std.conv.to!string(this.default_) ~ ", name: " ~ std.conv.to!string(this.name) ~ ")";
}
}
struct BlockPosition
{
enum string[] __fields = ["x", "y", "z"];
@Var int x;
@Var uint y;
@Var int z;
mixin Make!(Endian.littleEndian, varuint);
string toString()
{
return "BlockPosition(x: " ~ std.conv.to!string(this.x) ~ ", y: " ~ std.conv.to!string(this.y) ~ ", z: " ~ std.conv.to!string(this.z) ~ ")";
}
}
struct McpeUuid
{
enum string[] __fields = ["mostSignificantBits", "leastSignificantBits"];
long mostSignificantBits;
long leastSignificantBits;
mixin Make!(Endian.littleEndian, varuint);
string toString()
{
return "McpeUuid(mostSignificantBits: " ~ std.conv.to!string(this.mostSignificantBits) ~ ", leastSignificantBits: " ~ std.conv.to!string(this.leastSignificantBits) ~ ")";
}
}
struct PlayerList
{
enum string[] __fields = ["uuid", "entityId", "displayName", "skin", "unknown4"];
soupply.bedrock201.types.McpeUuid uuid;
@Var long entityId;
string displayName;
soupply.bedrock201.types.Skin skin;
string unknown4;
mixin Make!(Endian.littleEndian, varuint);
string toString()
{
return "PlayerList(uuid: " ~ std.conv.to!string(this.uuid) ~ ", entityId: " ~ std.conv.to!string(this.entityId) ~ ", displayName: " ~ std.conv.to!string(this.displayName) ~ ", skin: " ~ std.conv.to!string(this.skin) ~ ", unknown4: " ~ std.conv.to!string(this.unknown4) ~ ")";
}
}
struct Skin
{
enum string[] __fields = ["name", "data", "capeData", "geometryName", "geometryData"];
string name;
ubyte[] data;
ubyte[] capeData;
string geometryName;
ubyte[] geometryData;
mixin Make!(Endian.littleEndian, varuint);
string toString()
{
return "Skin(name: " ~ std.conv.to!string(this.name) ~ ", data: " ~ std.conv.to!string(this.data) ~ ", capeData: " ~ std.conv.to!string(this.capeData) ~ ", geometryName: " ~ std.conv.to!string(this.geometryName) ~ ", geometryData: " ~ std.conv.to!string(this.geometryData) ~ ")";
}
}
struct Link
{
// action
enum ubyte ADD = 0;
enum ubyte RIDE = 1;
enum ubyte REMOVE = 2;
enum string[] __fields = ["from", "to", "action", "unknown3"];
@Var long from;
@Var long to;
ubyte action;
ubyte unknown3;
mixin Make!(Endian.littleEndian, varuint);
string toString()
{
return "Link(from: " ~ std.conv.to!string(this.from) ~ ", to: " ~ std.conv.to!string(this.to) ~ ", action: " ~ std.conv.to!string(this.action) ~ ", unknown3: " ~ std.conv.to!string(this.unknown3) ~ ")";
}
}
struct Recipe
{
// type
enum int SHAPELESS = 0;
enum int SHAPED = 1;
enum int FURNACE = 2;
enum int FURNACE_DATA = 3;
enum int MULTI = 4;
enum string[] __fields = ["type", "data"];
@Var int type;
@NoLength ubyte[] data;
mixin Make!(Endian.littleEndian, varuint);
string toString()
{
return "Recipe(type: " ~ std.conv.to!string(this.type) ~ ", data: " ~ std.conv.to!string(this.data) ~ ")";
}
}
struct InventoryAction
{
// source
enum uint CONTAINER = 0;
enum uint WORLD = 2;
enum uint CREATIVE = 3;
enum string[] __fields = ["source", "container", "unknown2", "slot", "oldItem", "newItem"];
@Var uint source;
@Condition("source==0") @Var int container = -1;
@Condition("source==2") @Var uint unknown2;
@Var uint slot;
soupply.bedrock201.types.Slot oldItem;
soupply.bedrock201.types.Slot newItem;
mixin Make!(Endian.littleEndian, varuint);
string toString()
{
return "InventoryAction(source: " ~ std.conv.to!string(this.source) ~ ", container: " ~ std.conv.to!string(this.container) ~ ", unknown2: " ~ std.conv.to!string(this.unknown2) ~ ", slot: " ~ std.conv.to!string(this.slot) ~ ", oldItem: " ~ std.conv.to!string(this.oldItem) ~ ", newItem: " ~ std.conv.to!string(this.newItem) ~ ")";
}
}
struct ChunkData
{
private struct Container
{
enum string[] __fields = ["sections", "heights", "biomes", "borders", "extraData", "blockEntities"];
soupply.bedrock201.types.Section[] sections;
ushort[256] heights;
ubyte[256] biomes;
ubyte[] borders;
soupply.bedrock201.types.ExtraData[] extraData;
@NoLength ubyte[] blockEntities;
mixin Make!(Endian.littleEndian, varuint);
}
enum string[] __fields = Container.__fields;
Container _container;
alias _container this;
void serialize(Buffer buffer)
{
Buffer _buffer = xalloc!Buffer(Container.sizeof + 4);
_container.encodeBody(_buffer);
serializeLength!(EndianType.var, uint)(buffer, _buffer.data!ubyte.length);
buffer.writeData(_buffer.data!ubyte);
xfree(_buffer);
}
void deserialize(Buffer buffer)
{
Buffer _buffer = xalloc!Buffer(cast(ubyte[])buffer.readData(deserializeLength!(EndianType.var, uint)(buffer)));
_container.decodeBody(_buffer);
xfree(_buffer);
}
string toString()
{
return "ChunkData(sections: " ~ std.conv.to!string(this.sections) ~ ", heights: " ~ std.conv.to!string(this.heights) ~ ", biomes: " ~ std.conv.to!string(this.biomes) ~ ", borders: " ~ std.conv.to!string(this.borders) ~ ", extraData: " ~ std.conv.to!string(this.extraData) ~ ", blockEntities: " ~ std.conv.to!string(this.blockEntities) ~ ")";
}
}
struct Section
{
enum string[] __fields = ["storageVersion", "blockIds", "blockMetas"];
ubyte storageVersion = 0;
ubyte[4096] blockIds;
ubyte[2048] blockMetas;
mixin Make!(Endian.littleEndian, varuint);
string toString()
{
return "Section(storageVersion: " ~ std.conv.to!string(this.storageVersion) ~ ", blockIds: " ~ std.conv.to!string(this.blockIds) ~ ", blockMetas: " ~ std.conv.to!string(this.blockMetas) ~ ")";
}
}
struct ExtraData
{
enum string[] __fields = ["key", "value"];
@Var uint key;
ushort value;
mixin Make!(Endian.littleEndian, varuint);
string toString()
{
return "ExtraData(key: " ~ std.conv.to!string(this.key) ~ ", value: " ~ std.conv.to!string(this.value) ~ ")";
}
}
struct Decoration
{
enum string[] __fields = ["rotationAndIcon", "position", "label", "color"];
@Var int rotationAndIcon;
Vector!(ubyte, "xz") position;
string label;
uint color;
mixin Make!(Endian.littleEndian, varuint);
string toString()
{
return "Decoration(rotationAndIcon: " ~ std.conv.to!string(this.rotationAndIcon) ~ ", position: " ~ std.conv.to!string(this.position) ~ ", label: " ~ std.conv.to!string(this.label) ~ ", color: " ~ std.conv.to!string(this.color) ~ ")";
}
}
struct Rule
{
// name
enum string COMMAND_BLOCK_OUTPUT = "commandblockoutput";
enum string DO_DAYLIGHT_CYCLE = "dodaylightcycle";
enum string DO_ENTITY_DROPS = "doentitydrops";
enum string DO_FIRE_TICK = "dofiretick";
enum string DO_MOB_LOOT = "domobloot";
enum string DO_MOB_SPAWNING = "domobspawning";
enum string DO_TILE_DROPS = "dotiledrops";
enum string DO_WEATHER_CYCLE = "doweathercycle";
enum string DROWNING_DAMAGE = "drowningdamage";
enum string FALL_DAMAGE = "falldamage";
enum string FIRE_DAMAGE = "firedamage";
enum string KEEP_INVENTORY = "keepinventory";
enum string MOB_GRIEFING = "mobgriefing";
enum string PVP = "pvp";
enum string SEND_COMMAND_FEEDBACK = "sendcommandfeedback";
// type
enum ubyte BOOLEAN = 1;
enum ubyte INTEGER = 2;
enum ubyte FLOATING = 3;
enum string[] __fields = ["name", "type", "booleanValue", "integerValue", "floatingValue"];
string name;
ubyte type;
@Condition("type==1") bool booleanValue;
@Condition("type==2") @Var uint integerValue;
@Condition("type==3") float floatingValue;
mixin Make!(Endian.littleEndian, varuint);
string toString()
{
return "Rule(name: " ~ std.conv.to!string(this.name) ~ ", type: " ~ std.conv.to!string(this.type) ~ ", booleanValue: " ~ std.conv.to!string(this.booleanValue) ~ ", integerValue: " ~ std.conv.to!string(this.integerValue) ~ ", floatingValue: " ~ std.conv.to!string(this.floatingValue) ~ ")";
}
}
struct Enum
{
enum string[] __fields = ["name", "valuesIndexes"];
string name;
ushort[] valuesIndexes;
mixin Make!(Endian.littleEndian, varuint);
string toString()
{
return "Enum(name: " ~ std.conv.to!string(this.name) ~ ", valuesIndexes: " ~ std.conv.to!string(this.valuesIndexes) ~ ")";
}
}
struct Command
{
enum string[] __fields = ["name", "description", "unknown2", "permissionLevel", "aliasesEnum", "overloads"];
string name;
string description;
ubyte unknown2;
ubyte permissionLevel;
int aliasesEnum = -1;
soupply.bedrock201.types.Overload[] overloads;
mixin Make!(Endian.littleEndian, varuint);
string toString()
{
return "Command(name: " ~ std.conv.to!string(this.name) ~ ", description: " ~ std.conv.to!string(this.description) ~ ", unknown2: " ~ std.conv.to!string(this.unknown2) ~ ", permissionLevel: " ~ std.conv.to!string(this.permissionLevel) ~ ", aliasesEnum: " ~ std.conv.to!string(this.aliasesEnum) ~ ", overloads: " ~ std.conv.to!string(this.overloads) ~ ")";
}
}
struct Overload
{
enum string[] __fields = ["parameters"];
soupply.bedrock201.types.Parameter[] parameters;
mixin Make!(Endian.littleEndian, varuint);
string toString()
{
return "Overload(parameters: " ~ std.conv.to!string(this.parameters) ~ ")";
}
}
struct Parameter
{
// type
enum uint VALID = 1048576;
enum uint INT = 1;
enum uint FLOAT = 2;
enum uint MIXED = 3;
enum uint TARGET = 4;
enum uint STRING = 13;
enum uint POSITION = 14;
enum uint RAWTEXT = 17;
enum uint TEXT = 19;
enum uint JSON = 22;
enum uint COMMAND = 29;
enum uint ENUM = 2097152;
enum uint TEMPLATE = 16777216;
enum string[] __fields = ["name", "type", "optional"];
string name;
uint type;
bool optional;
mixin Make!(Endian.littleEndian, varuint);
string toString()
{
return "Parameter(name: " ~ std.conv.to!string(this.name) ~ ", type: " ~ std.conv.to!string(this.type) ~ ", optional: " ~ std.conv.to!string(this.optional) ~ ")";
}
}
|
D
|
# FIXED
sin.obj: C:/Users/a0272561/Repositories/cs30_controlsuite/libs/math/CLAmath/CLAMATH_VERSION/examples/2837x_sin/cpu01/sin.cla
sin.obj: C:/Users/a0272561/Repositories/cs30_controlsuite/libs/math/CLAmath/CLAMATH_VERSION/include/CLAMath.h
sin.obj: C:/Users/a0272561/Repositories/cs30_controlsuite/libs/math/CLAmath/CLAMATH_VERSION/examples/2837x_sin/cpu01/CLAShared.h
C:/Users/a0272561/Repositories/cs30_controlsuite/libs/math/CLAmath/CLAMATH_VERSION/examples/2837x_sin/cpu01/sin.cla:
C:/Users/a0272561/Repositories/cs30_controlsuite/libs/math/CLAmath/CLAMATH_VERSION/include/CLAMath.h:
C:/Users/a0272561/Repositories/cs30_controlsuite/libs/math/CLAmath/CLAMATH_VERSION/examples/2837x_sin/cpu01/CLAShared.h:
|
D
|
/**
* Copyright: Copyright 2016 Mojo
* Authors: Mojo
* License: $(LINK2 https://github.com/coop-mojo/moecoop-server/blob/master/LICENSE, MIT License)
*/
module coop.core.item;
import std.variant: Algebraic;
import coop.common;
import vibe.data.json;
/// アイテムの追加情報
alias ExtraInfo = Algebraic!(FoodInfo, WeaponInfo, ArmorInfo, BulletInfo, ShieldInfo, ExpendableInfo);
/// アイテム一般の情報
struct Item
{
this(this) @safe pure nothrow
{
import std.exception: assumeWontThrow;
petFoodInfo = assumeWontThrow(petFoodInfo.dup);
}
import vibe.data.json: name_ = name, optional, byName, ignore;
@name_("名前") string name;
@name_("英名") string ename;
@name_("重さ") double weight = 0;
@name_("NPC売却価格") uint price;
@name_("info") string info;
@name_("特殊条件") @optional @byName SpecialProperty[] properties;
@name_("転送できる") bool transferable;
@name_("スタックできる") bool stackable;
@name_("ペットアイテム") @optional double[PetFoodType] petFoodInfo;
@name_("備考") @optional string remarks;
@name_("種類") ItemType type;
/// デバッグ用。このアイテム情報が収録されているファイル名
@ignore string file;
auto opCast(T: bool)()
{
import std.range;
return !name.empty;
}
}
unittest
{
import std.conv: to;
Item item;
assert(cast(bool)item == false);
with(item)
{
name = "マイナーズ ワイフ";
price = 0;
weight = 0.03;
petFoodInfo = [ PetFoodType.UNKNOWN.to!PetFoodType: 0.0 ];
stackable = true;
properties = [SpecialProperty.OP];
type = ItemType.Others;
remarks = "クエストで使う";
}
assert(cast(bool)item == true);
}
auto readItems(string fname)
{
import vibe.data.json;
import std.algorithm: map;
import std.file: readText;
import std.range;
import std.typecons: tuple;
auto json = fname.readText
.parseJsonString;
if (json.type == Json.Type.array)
{
// v1.1.9
return json.deserialize!(JsonSerializer, Item[])
.map!((a) {
import std.conv;
import std.range;
if (a.petFoodInfo.keys.empty)
{
a.petFoodInfo[PetFoodType.NoEatable] = 0;
}
a.file = fname;
return a;
})
.map!"tuple(a.name, a)"
.array;
}
else
{
// v1.1.8 未満
assert(json.type == Json.Type.object);
return json.get!(Json[string])
.byKeyValue
.map!(kv => tuple(kv.key,
kv.key.toItem_fallback(kv.value, fname)))
.array;
}
}
/**
* アイテム s の情報を、ファイル fname に書かれている json から読み込む
* v1.1.9 未満の設定ファイル用フォールバック
*/
auto toItem_fallback(string s, Json json, string fname)
in {
assert(json.type == Json.Type.object);
} body {
Item item;
with(item)
{
import std.conv: to;
name = s.to!string;
ename = json["英名"].get!string;
price = json["NPC売却価格"].get!uint;
weight = json["重さ"].get!double;
info = json["info"].get!string;
transferable = json["転送できる"].get!bool;
stackable = json["スタックできる"].get!bool;
if (auto petFood = "ペットアイテム" in json)
{
petFoodInfo = (*petFood).deserialize!(JsonSerializer, double[PetFoodType]);
}
else
{
petFoodInfo = [PetFoodType.NoEatable: 0];
}
if (auto props = "特殊条件" in json)
{
import std.algorithm;
import std.range;
properties = (*props).deserialize!(JsonSerializer, SpecialProperty[]);
}
type = json["種類"].deserialize!(JsonSerializer, ItemType);
file = fname;
}
return item;
}
enum SpecialProperty: string
{
NT = "他のプレイヤーにトレードで渡せない",
OP = "一人一個のみ",
CS = "売ることができない",
CR = "修理できない",
PM = "消耗度による威力計算を行わない",
NC = "修理による最大耐久度低下を行わない",
NB = "耐久度による武器の破壊が行われない",
ND = "死亡時ドロップしない",
CA = "カオスエイジで死亡しても消えない",
DL = "死亡すると消える",
TC = "タイムカプセルボックスに入れることが出来ない",
LO = "ログアウトすると消える",
AL = "現在のエリア限定",
WA = "WarAgeでは性能が低下する",
}
/// 料理固有の情報
struct FoodInfo
{
import vibe.data.json: name_ = name, optional;
@name_("名前") string name;
@name_("効果") double effect;
@name_("付加効果") @optional string additionalEffect;
}
auto readFoods(string fname)
{
import vibe.data.json;
import std.algorithm;
import std.file;
import std.typecons;
return fname.readText
.parseJsonString
.deserialize!(JsonSerializer, FoodInfo[])
.map!"tuple(a.name, a)";
}
/// 飲食バフのグループ
enum AdditionalEffectGroup
{
A, B1, B2, C1, C2, D1, D2, D3, D4, E, F, その他,
}
/// 飲食バフの効果情報
struct AdditionalEffect
{
import vibe.data.json: name_ = name, optional, byName;
@name_("名前") string name;
@name_("グループ") @byName AdditionalEffectGroup group;
@name_("効果") int[string] effects;
@name_("その他効果") @optional string otherEffects;
@name_("効果時間") uint duration;
@name_("備考") @optional string remarks;
auto opCast(T: bool)()
{
import std.range;
return !name.empty;
}
}
auto readFoodEffects(string fname)
{
import vibe.data.json;
import std.algorithm;
import std.file;
import std.typecons;
return fname.readText
.parseJsonString
.deserialize!(JsonSerializer, AdditionalEffect[])
.map!"tuple(a.name, a)";
}
struct WeaponInfo
{
import vibe.data.json: name_ = name, optional, ignore;
@name_("名前") string name;
@name_("攻撃力") double[Grade] damage;
@name_("攻撃間隔") int duration;
@name_("射程") double range = 0;
@name_("必要スキル") double[string] skills;
@name_("両手装備") bool isDoubleHands;
@name_("装備箇所") WeaponSlot slot;
@name_("装備可能シップ") @optional ShipRestriction[] restriction = [ShipRestriction.Any];
@name_("素材") Material material;
@name_("消耗タイプ") @optional ExhaustionType type;
@name_("耐久") int exhaustion;
@name_("追加効果") @optional double[string] effects;
@name_("付加効果") @optional int[string] additionalEffect;
@name_("効果アップ") @optional string[] specials;
@name_("魔法チャージ") bool canMagicCharged;
@name_("属性チャージ") bool canElementCharged;
@name_("備考") @optional string[] remarks;
/// デバッグ用。このアイテム情報が収録されているファイル名
@ignore string file;
}
auto readWeapons(string fname)
{
import vibe.data.json;
import std.algorithm: map;
import std.file: readText;
import std.typecons: tuple;
return fname.readText
.parseJsonString
.deserialize!(JsonSerializer, WeaponInfo[])
.map!((a) { a.file = fname; return a; }) // tee だと動かない
.map!"tuple(a.name, a)";
}
struct ArmorInfo
{
import vibe.data.json: name_ = name, optional, ignore;
@name_("名前") string name;
@name_("アーマークラス") double[Grade] AC;
@name_("必要スキル") double[string] skills;
@name_("装備箇所") ArmorSlot slot;
@name_("使用可能シップ") @optional ShipRestriction[] restriction = [ShipRestriction.Any];
@name_("素材") Material material;
@name_("消耗タイプ") @optional ExhaustionType type;
@name_("耐久") int exhaustion;
@name_("追加効果") @optional double[string] effects;
@name_("付加効果") @optional string additionalEffect;
@name_("効果アップ") @optional string[] specials;
@name_("魔法チャージ") bool canMagicCharged;
@name_("属性チャージ") bool canElementCharged;
/// デバッグ用。このアイテム情報が収録されているファイル名
@ignore string file;
}
auto readArmors(string fname)
{
import vibe.data.json;
import std.algorithm: map;
import std.file: readText;
import std.range;
import std.typecons: tuple;
return fname.readText
.parseJsonString
.deserialize!(JsonSerializer, ArmorInfo[])
.map!((a) { a.file = fname; return a; }) // tee だと動かない
.map!"tuple(a.name, a)";
}
struct BulletInfo
{
import vibe.data.json: name_ = name, optional;
@name_("名前") string name;
@name_("ダメージ") double damage = 0;
@name_("有効レンジ") double range = 0;
@name_("角度補正角") int angle;
@name_("使用可能シップ") @optional ShipRestriction[] restriction = [ShipRestriction.Any];
@name_("必要スキル") double[string] skills;
@name_("追加効果") @optional double[string] effects;
@name_("付与効果") @optional string additionalEffect;
}
auto readBullets(string fname)
{
import vibe.data.json;
import std.algorithm: map;
import std.file: readText;
import std.typecons: tuple;
return fname.readText
.parseJsonString
.deserialize!(JsonSerializer, BulletInfo[])
.map!"tuple(a.name, a)";
}
struct ShieldInfo
{
import vibe.data.json: name_ = name, optional, ignore;
@name_("名前") string name;
@name_("アーマークラス") double[Grade] AC;
@name_("必要スキル") double[string] skills;
@name_("回避") int avoidRatio;
@name_("使用可能シップ") @optional ShipRestriction[] restriction = [ShipRestriction.Any];
@name_("素材") Material material;
@name_("消耗タイプ") @optional ExhaustionType type;
@name_("装備箇所") WeaponSlot slot;
@name_("耐久") int exhaustion;
@name_("追加効果") @optional double[string] effects;
@name_("付加効果") @optional string additionalEffect;
@name_("効果アップ") @optional string[] specials;
@name_("魔法チャージ") bool canMagicCharged;
@name_("属性チャージ") bool canElementCharged;
/// デバッグ用。このアイテム情報が収録されているファイル名
@ignore string file;
}
auto readShields(string fname)
{
import vibe.data.json;
import std.algorithm: map;
import std.file: readText;
import std.range;
import std.typecons: tuple;
return fname.readText
.parseJsonString
.deserialize!(JsonSerializer, ShieldInfo[])
.map!((a) { a.file = fname; return a; }) // tee だと動かない
.map!"tuple(a.name, a)";
}
struct AssetInfo
{
uint width, depth, height;
Material material;
int exhaustion;
}
enum ShipRestriction: string
{
UNKNOWN = "不明", Any = "なし",
// 基本シップ
// 熟練
Puncher = "パンチャー", Swordsman = "剣士",
Macer = "メイサー",
Lancer = "ランサー", Gunner = "ガンナー", Archer = "アーチャー",
Guardsman = "ガーズマン",
//"投げ士",
Ranger = "レンジャー", BloodSucker = "ブラッド サッカー",
Kicker = "キッカー", Wildman = "ワイルドマン", Drinker = "ドリンカー", Copycat = "物まね師",
Tamer = "テイマー", Wizard = "ウィザード", Priest = "プリースト", Shaman = "シャーマン",
Enchanter = "エンチャンター", Summoner = "サモナー", Shadow = "シャドウ", Magician = "魔術師",
WildBoy = "野生児", Gremlin = "小悪魔", Vendor = "ベンダー", RockSinger = "ロックシンガー",
Songsinger = "ソングシンガー", //"スリ",
Showboat = "目立ちたがり", StreetDancer = "ストリートダンサー",
// 基本
Fallman = "フォールマン",
Swimmer = "スイマー", // DeadMan => "デッドマン",
Helper = "ヘルパー",
Recoverer = "休憩人",
Miner = "マイナー",
Woodsman = "木こり", Plower = "耕作師",
Angler = "釣り人", // "解読者",
// 生産
Cook = "料理師",
//"鍛冶師",
Bartender = "バーテンダー", WoodWorker = "木工師", Tailor = "仕立て屋",
Drugmaker = "調合師", Decorator = "細工師", Scribe = "筆記師",
Barber = "調髪師", Cultivator = "栽培師",
// 複合
Warrior = "ウォーリアー", Alchemist = "アルケミスト", Forester = "フォレスター",
Necromancer = "ネクロマンサー", Creator = "クリエイター", Bomberman = "爆弾男",
Breeder = "ブリーダー", TempleKnight = "テンプルナイト", Druid = "ドルイド",
SageOfCerulean = "紺碧の賢者", GreatCreator = "グレート クリエイター",
Mercenary = "傭兵", Samurai = "サムライ", MineBishop = "マイン ビショップ",
KitchenMaster = "厨房師", Assassin = "アサシン", SeaFighter = "海戦士",
BraveKnight = "ブレイブナイト", EvilKnight = "イビルナイト",
CosPlayer = "コスプレイヤー", Dabster = "物好き", Athlete = "アスリート",
DrunkenFighter = "酔拳士", Rowdy = "荒くれ者", NewIdol = "新人アイドル",
HouseKeeper = "ハウスキーパー", Adventurer = "アドベンチャラー",
Spy = "スパイ", Punk = "チンピラ", Academian = "アカデミアン",
BloodBard = "ブラッドバード", Duelist = "デュエリスト", Collector = "コレクター",
// 二次シップ
Sniper = "スナイパー", Hawkeye = "ホークアイ",
}
enum WeaponSlot: string
{
UNKNOWN = "不明", Right = "右手", Left = "左手", Both = "左右",
}
enum ArmorSlot: string
{
UNKNOWN = "不明",
HeadProtector = "頭(防)", BodyProtector = "胴(防)", HandProtector = "手(防)",
PantsProtector = "パンツ(防)", ShoesProtector = "靴(防)", ShoulderProtector = "肩(防)",
WaistProtector = "腰(防)",
HeadOrnament = "頭(装)", FaceOrnament = "顔(装)", EarOrnament = "耳(装)",
FingerOrnament = "指(装)", BreastOrnament = "胸(装)", BackOrnament = "背中(装)",
WaistOrnament = "腰(装)",
}
enum Material: string
{
UNKNOWN = "不明", Copper = "銅", Bronze = "青銅", Iron = "鉄", Steel = "鋼鉄",
Silver = "銀", Gold = "金", Mithril = "ミスリル", Orichalcum = "オリハルコン",
Cotton = "綿", Silk = "絹", AnimalSkin = "動物の皮", DragonSkin = "竜の皮",
Plant = "プラント", Wood = "木", Treant = "トレント", Paper = "紙",
Bamboo = "竹筒", BlackBamboo = "黒い竹", Bone = "骨", Stone = "リペア ストーン",
Glass = "ガラス", Crystal = "クリスタル", Cobalt = "コバルト", Chaos = "カオス",
}
enum Grade: string
{
UNKNOWN = "不明", Degraded = "劣化", Cursed = "呪い", NG = "NG", HG = "HG", MG = "MG", NG_War = "NG(War)",
}
enum ExhaustionType: string
{
Points = "消耗度", Times = "使用可能回数",
}
/// 消耗品固有の情報
struct ExpendableInfo
{
import vibe.data.json: name_ = name, optional, ignore;
@name_("名前") string name;
@name_("必要スキル") @optional double[string] skill;
@name_("効果") string effect;
@ignore string file;
}
auto readExpendables(string fname)
{
import vibe.data.json;
import std.algorithm;
import std.file;
import std.typecons;
return fname.readText
.parseJsonString
.deserialize!(JsonSerializer, ExpendableInfo[])
.map!((a) { a.file = fname; return a; }) // tee だと動かない
.map!"tuple(a.name, a)";
}
auto readItemList(string sysBase)
{
import std.algorithm;
import std.array;
import std.exception;
import std.file;
import std.path;
import coop.core.item;
import coop.util: checkedAssocArray;
enforce(sysBase.exists);
enforce(sysBase.isDir);
auto dir = buildPath(sysBase, "アイテム");
if (!dir.exists)
{
return (Item[string]).init;
}
return dirEntries(dir, "*.json", SpanMode.breadth)
.map!readItems
.array
.joiner
.checkedAssocArray;
}
auto readFoodList(string sysBase)
{
import std.algorithm;
import std.exception;
import std.file;
import std.path;
import coop.core.item;
import coop.util: checkedAssocArray;
enforce(sysBase.exists);
enforce(sysBase.isDir);
auto dir = buildPath(sysBase, "食べ物");
if (!dir.exists)
{
return (FoodInfo[string]).init;
}
return dirEntries(dir, "*.json", SpanMode.breadth)
.map!readFoods
.joiner
.checkedAssocArray;
}
auto readDrinkList(string sysBase)
{
import std.exception;
import std.file;
import std.path;
import coop.util: checkedAssocArray;
import coop.core.item;
enforce(sysBase.exists);
enforce(sysBase.isDir);
auto file = buildPath(sysBase, "飲み物", "飲み物.json");
if (!file.exists)
{
return (FoodInfo[string]).init;
}
return file.readFoods.checkedAssocArray;
}
auto readLiquorList(string sysBase)
{
import std.exception;
import std.file;
import std.path;
import coop.core.item;
import coop.util: checkedAssocArray;
enforce(sysBase.exists);
enforce(sysBase.isDir);
auto file = buildPath(sysBase, "飲み物", "酒.json");
if (!file.exists)
{
return (FoodInfo[string]).init;
}
return buildPath(sysBase, "飲み物", "酒.json").readFoods.checkedAssocArray;
}
auto readWeaponList(string sysBase)
{
import std.algorithm;
import std.exception;
import std.file;
import std.path;
import coop.core.item;
import coop.util: checkedAssocArray;
enforce(sysBase.exists);
enforce(sysBase.isDir);
auto dir = buildPath(sysBase, "武器");
if (!dir.exists)
{
return (WeaponInfo[string]).init;
}
return dirEntries(dir, "*.json", SpanMode.breadth)
.map!readWeapons
.joiner
.checkedAssocArray;
}
auto readArmorList(string sysBase)
{
import std.algorithm;
import std.exception;
import std.file;
import std.path;
import coop.core.item;
import coop.util: checkedAssocArray;
enforce(sysBase.exists);
enforce(sysBase.isDir);
auto dir = buildPath(sysBase, "防具");
if (!dir.exists)
{
return (ArmorInfo[string]).init;
}
return dirEntries(dir, "*.json", SpanMode.breadth)
.map!readArmors
.joiner
.checkedAssocArray;
}
auto readBulletList(string sysBase)
{
import std.algorithm;
import std.exception;
import std.file;
import std.path;
import coop.core.item;
import coop.util: checkedAssocArray;
enforce(sysBase.exists);
enforce(sysBase.isDir);
auto dir = buildPath(sysBase, "弾");
if (!dir.exists)
{
return (BulletInfo[string]).init;
}
return dirEntries(dir, "*.json", SpanMode.breadth)
.map!readBullets
.joiner
.checkedAssocArray;
}
auto readShieldList(string sysBase)
{
import std.algorithm;
import std.exception;
import std.file;
import std.path;
import coop.core.item;
import coop.util: checkedAssocArray;
enforce(sysBase.exists);
enforce(sysBase.isDir);
auto dir = buildPath(sysBase, "盾");
if (!dir.exists)
{
return (ShieldInfo[string]).init;
}
return dirEntries(dir, "*.json", SpanMode.breadth)
.map!readShields
.joiner
.checkedAssocArray;
}
auto overlaid(T, U)(T t, U* u)
{
return Overlaid!(T, U)(t, u);
}
struct Overlaid(T, U = T)
{
import std.traits: hasMember;
this(T orig, U* ol)
{
original = orig;
overlaid = ol;
}
@property auto ref opDispatch(string field)()
if (hasMember!(T, field))
{
static if (hasMember!(U, field))
{
if (isWritable!field)
{
return mixin("overlaid."~field);
}
else
{
return mixin("original."~field);
}
}
else
{
return mixin("original."~field);
}
}
@property auto isOverlaid(string field)() const
if (hasMember!(T, field) && hasMember!(U, field))
{
return overlaid !is null &&
!isDefaultValue(mixin("overlaid."~field)) &&
mixin("original."~field~" != "~"overlaid."~field);
}
@property auto isWritable(string field)() const
if (hasMember!(T, field) && hasMember!(U, field))
{
return overlaid !is null && (isOverlaid!field || isDefaultValue(mixin("original."~field)));
}
private:
static auto isDefaultValue(T)(const T val)
{
import std.conv;
import std.range;
import coop.common: PetFoodInfo;
static if (is(T == PetFoodInfo))
return val.種別.empty || val.種別 == cast(string)PetFoodType.UNKNOWN;
else
return val == T.init;
}
T original;
U* overlaid;
}
nothrow unittest
{
import std.traits: FieldNameTuple;
Item orig;
with(orig)
{
import std.conv: to;
name = "テスト";
ename = "test";
weight = 0.3;
price = 100;
info = "Info";
petFoodInfo[PetFoodType.UNKNOWN] = 0;
}
auto overlaid = Overlaid!Item(orig, null);
foreach(field; FieldNameTuple!Item)
{
assert(!overlaid.isOverlaid!field);
}
assert(overlaid.name == "テスト");
}
nothrow unittest
{
import std.conv;
Item orig;
orig.name = "テスト";
orig.petFoodInfo[PetFoodType.UNKNOWN] = 0;
Item item;
item.name = "テスト";
item.ename = "test";
item.weight = 1.4;
item.petFoodInfo[PetFoodType.UNKNOWN] = 0;
auto overlaid = Overlaid!Item(orig, &item);
assert(!overlaid.isOverlaid!"name");
assert(!overlaid.isWritable!"name");
assert(overlaid.name == "テスト");
assert(overlaid.isOverlaid!"ename");
assert(overlaid.isWritable!"ename");
assert(overlaid.ename == "test");
assert(overlaid.isOverlaid!"weight");
assert(overlaid.isWritable!"weight");
assert(overlaid.weight == 1.4);
assert(!overlaid.isOverlaid!"price");
assert(overlaid.isWritable!"price");
assert(overlaid.price == 0);
// assert(!overlaid.isOverlaid!"petFoodInfo");
// assert(overlaid.isWritable!"petFoodInfo");
// assert(overlaid.petFoodInfo == [PetFoodType.UNKNOWN: 0.0]);
}
|
D
|
// https://issues.dlang.org/show_bug.cgi?id=19759
/* TEST_OUTPUT:
---
fail_compilation/fail19759.d(8): Error: function `fail19759.fail19759` cannot have parameter of type `float[4]` because its linkage is `extern(C++)`
fail_compilation/fail19759.d(8): perhaps use a `float*` type instead
---
*/
extern(C++) bool fail19759(float[4] col);
|
D
|
extern(C) int printf(const char*, ...);
extern(C) int sprintf(char*, const char*, ...);
/**************************************/
void test1()
{
bool x;
int i;
i = !("bar" == "bar");
assert(i == 0);
i = "bar" != "bar";
assert(i == 0);
i = "bar" == "bar";
assert(i == 1);
x = "bar" != "bar";
assert(x == false);
assert("bar" == "bar");
x = "bar" == "bar";
assert(x == true);
/+ ---- +/
i = !("foo" == "bar");
assert(i == 1);
i = "foo" != "bar";
assert(i == 1);
i = "foo" == "bar";
assert(i == 0);
x = "foo" != "bar";
assert(x == true);
assert("foo" != "bar");
x = "foo" == "bar";
assert(x == false);
}
/**************************************/
void test2()
{
bool x;
int i;
i = !("bar" <= "bar");
assert(i <= 0);
i = "bar" > "bar";
assert(i == 0);
i = "bar" >= "bar";
assert(i == 1);
x = "bar" < "bar";
assert(x == false);
assert("bar" <= "bar");
x = "bar" <= "bar";
assert(x == true);
/+ ---- +/
i = !("foo" < "bar");
assert(i == 1);
i = "foo" > "bar";
assert(i == 1);
i = "foo" < "bar";
assert(i == 0);
x = "foo" >= "bar";
assert(x == true);
assert("foo" >= "bar");
x = "foo" <= "bar";
assert(x == false);
}
/**************************************/
bool all(string array, bool function(char) predicate) {
for (int i = 0; i < array.length; i++) {
if (!predicate(array[i])) {
return false;
}
}
return true;
}
bool all(string array, bool delegate(char) predicate) {
for (int i = 0; i < array.length; i++) {
if (!predicate(array[i])) {
return false;
}
}
return true;
}
bool isVowel(char c) {
return (c == 'a') || (c == 'e') || (c == 'i') || (c == 'o') || (c == 'u');
}
class Character {
private char letter;
this(char c) {
this.letter = c;
}
public bool isLetter(char c) {
return this.letter == c;
}
}
void test3()
{
Character a = new Character('a');
bool delegate(char) isLetter;
isLetter = &a.isLetter;
bool i;
i = all("aeiouoeieuiei", &isVowel);
assert(i == true);
i = all("aeiouoeieuiei", isLetter);
assert(i == false);
}
/**************************************/
int[] fun(int i)
in
{
assert(i > 0);
}
out (result)
{
assert(result[0] == 2);
}
body
{
char result;
int[] res = new int[10];
res[] = i;
int isZero = (result == 0xFF);
assert(isZero);
return res;
}
void test4()
{
int[] values = fun(2);
}
/**************************************/
const uint D3DSP_DSTMOD_SHIFT = 20;
const uint D3DSP_DSTMOD_MASK = 0x00F00000;
enum D3DSHADER_PARAM_DSTMOD_TYPE
{
NONE = 0<<D3DSP_DSTMOD_SHIFT,
SATURATE= 1<<D3DSP_DSTMOD_SHIFT,
FORCE_DWORD = 0x7fffffff,
}
void test5()
{
}
/**************************************/
class foo6
{
union
{
int i;
char j;
}
}
void test6()
{
}
/**************************************/
void test7()
{
}
/**************************************/
real x8 = 4;
long y8;
void test8()
{
y8 = cast(long)x8;
assert(y8 == 4);
y8 = cast(long)cast(double)x8;
assert(y8 == 4);
printf ("%lld\n", y8);
}
/**************************************/
void test9()
{
struct B { }
B bar (ref int p)
{
B b;
return b;
}
}
/**************************************/
struct B10
{
uint member;
}
B10 func10()
{
B10 b;
b.member=7;
return b;
}
void test10()
{
uint i=func10().member; // Internal error: ..\ztc\cgcs.c 350
assert(i == 7);
B10 b=func10(); //works
i=b.member;
assert(i == 7);
}
/**************************************/
void test11()
{
const int notInitialized;
const int i=notInitialized; // DMD crashes
assert(notInitialized == 0);
assert(i == 0);
}
/**************************************/
struct Array12
{
char len;
void* p;
}
//Array12 f12(string a)
//{
// return *cast(Array12*) &a[0..23]; //Internal error: ..\ztc\cgcs.c 350
//}
Array12 g12(string a)
{
return *cast(Array12*) &a; //works
}
void test12()
{
string a = "12345678901234567890123";
Array12 b;
//b = f12(a);
//printf("b.len = %x\n", b.len);
b = g12(a);
printf("b.len = %x\n", b.len);
}
/**************************************/
class A13
{
int opShl(char* v) { return 1; }
int opShl(string v) { return 2; }
}
void test13()
{
A13 a = new A13();
int i;
i = a.opShl(cast(string)"");
assert(i == 2);
i = a << cast(string)"";
assert(i == 2);
}
/**************************************/
union U1
{
struct { int a; }
struct { int b; }
}
union U2
{
struct { int a; }
struct { long b; }
}
union U3
{
struct { long a; }
struct { int b; }
}
union U4
{
int a;
int b;
}
union U5
{
int a;
long b;
}
union U6
{
long a;
int b;
}
void test14()
{
printf("%d %d %d\n", U1.a.offsetof, U1.b.offsetof, U1.sizeof);
assert(U1.a.offsetof == 0);
assert(U1.b.offsetof == 0);
assert(U1.sizeof == 4);
printf("%d %d %d\n", U2.a.offsetof, U2.b.offsetof, U2.sizeof);
assert(U2.a.offsetof == 0);
assert(U2.b.offsetof == 0);
assert(U2.sizeof == 8);
printf("%d %d %d\n", U3.a.offsetof, U3.b.offsetof, U3.sizeof);
assert(U3.a.offsetof == 0);
assert(U3.b.offsetof == 0);
assert(U3.sizeof == 8);
printf("%d %d %d\n", U4.a.offsetof, U4.b.offsetof, U4.sizeof);
assert(U4.a.offsetof == 0);
assert(U4.b.offsetof == 0);
assert(U4.sizeof == 4);
printf("%d %d %d\n", U5.a.offsetof, U5.b.offsetof, U5.sizeof);
assert(U5.a.offsetof == 0);
assert(U5.b.offsetof == 0);
assert(U5.sizeof == 8);
printf("%d %d %d\n", U6.a.offsetof, U6.b.offsetof, U6.sizeof);
assert(U6.a.offsetof == 0);
assert(U6.b.offsetof == 0);
assert(U6.sizeof == 8);
}
/**************************************/
void test15()
{
const int[] array = [1,2,3];
assert(array.length == 3);
assert(array[1] == 2);
}
/**************************************/
class Conversion(T)
{
class Big {char[2] dummy;}
static Big Test(...);
enum { exists = Test().sizeof }
}
void test16()
{
assert(Conversion!(double).exists == (void*).sizeof);
}
/**************************************/
class Cout17
{
Cout17 set(int x)
{
printf("%d",x);
return this;
}
alias set opShl;
}
void test17()
{
Cout17 cout = new Cout17;
cout << 5 << 4;
}
/**************************************/
void test18()
{
bool[] x = new bool[100];
x[] = 1;
bool[] y = x.dup;
assert(y[99]);
}
/**************************************/
bool[32] x19 = 1;
void test19()
{
assert(x19[31]);
}
/**************************************/
bool[2] y20 = [ cast(bool) 3, cast(bool) 2 ];
void test20()
{
assert(y20[0]); // ok
assert(y20[1]); // fails
}
/**************************************/
bool isnan(float x) { return !( (x >= 0) || (x < 0)); }
struct X21 { float f, g, h; }
X21 x21_1;
X21 x21_2 = { f: 1.0, h: 2.0 };
char[3] y21_1;
char[3] y21_2 = [ 0: 'a', 2: 'b' ];
void test21()
{
assert(isnan(x21_1.g));
assert(isnan(x21_2.g));
assert(y21_1[1] == '\xff');
assert(y21_2[1] == '\xff');
}
/**************************************/
void test22()
{
wstring a = cast(wstring)"一〇";
}
/**************************************/
interface A23 { void x(); }
class B23 : A23 { void x() { } }
class C23 : B23 { uint y = 12345678; }
void stest23(A23 a)
{
synchronized (a)
{
}
}
void test23()
{
C23 c = new C23;
assert(c.y == 12345678 /*c.y.init*/);
stest23(c);
assert(c.y == 12345678 /*c.y.init*/);
}
/**************************************/
class A24
{
unittest
{
}
}
void test24()
{
}
/**************************************/
char rot13(char ret)
{
if (ret > 'A'-1 && ret < 'N')
{ ret += 13;}
else if(ret > 'M' && ret < 'Z'+1)
{ ret -= 13;}
else if(ret > 'a'-1 && ret < 'n')
{ ret += 13;}
else if(ret > 'm' && ret < 'z'+1)
{ ret -= 13;}
return ret;
}
void test25()
{
foreach (char c; "hello World\n")
printf("%c %c\n", c, rot13(c));
assert(rot13('h') == 'u');
assert(rot13('o') == 'b');
assert(rot13('W') == 'J');
assert(rot13('H') == 'U');
}
/**************************************/
bool b26a = cast(bool)( cast(bool) 2 & cast(bool) 1 );
bool b26b = cast(bool) 2;
void test26()
{
assert( (* cast(byte *) & b26a) == 1 );
assert( (* cast(byte *) & b26b) == 1 );
}
/**************************************/
int c27;
struct X27
{
int x;
struct
{
int a;
int b;
static this() { c27 = 3; }
}
}
void test27()
{
assert(c27 == 3);
}
/**************************************/
void test28()
{
void bar()
{
throw new Foo28();
}
}
class Foo28 : Throwable
{
private:
this() { super(""); }
}
/**************************************/
struct S29 {
ubyte a, b, c, d;
}
int hoge(S29 s) {
char[10] b;
printf("%x\n", s);
sprintf(b.ptr, "%x", s);
assert(b[0 .. 7] == "4030201");
return 0;
}
void test29()
{
for (int i = 0; i < 1; i++) {
S29 s;
s.a = 1;
s.b = 2;
s.c = 3;
s.d = 4;
hoge(s);
}
}
/**************************************/
class Qwert {
static {
deprecated int yuiop() {
return 42;
}
}
static deprecated int asdfg() {
return yuiop() + 105;
}
}
void test30()
{
}
/**************************************/
void test31()
{
string foo = "hello";
printf("%s\n", foo.ptr);
auto s = typeid(typeof(foo.ptr)).toString();
printf("%.*s\n", s.length, s.ptr);
s = typeid(char*).toString();
printf("%.*s\n", s.length, s.ptr);
assert(typeid(typeof(foo.ptr)) == typeid(immutable(char)*));
}
/**************************************/
class Qwert32
{
struct
{
int yuiop = 13;
}
int asdfg = 42;
void foo()
{
printf("yuiop = %d, asdfg = %d\n", Qwert32.yuiop.offsetof, Qwert32.asdfg.offsetof);
version(D_LP64)
{
assert(Qwert32.yuiop.offsetof == 16);
assert(Qwert32.asdfg.offsetof == 20);
}
else
{
assert(Qwert32.yuiop.offsetof == 8);
assert(Qwert32.asdfg.offsetof == 12);
}
}
}
void test32()
{
Qwert32 q = new Qwert32;
q.foo();
}
/**************************************/
int x33;
int y33;
size_t os_query()
{
return cast(uint)(cast(char *)&x33 - cast(char *)&y33);
}
void test33()
{
os_query();
}
/**************************************/
uint x34 = ~(16u-1u);
uint y34 = ~(16u-1);
void test34()
{
assert(x34 == 0xFFFFFFF0);
assert(y34 == 0xFFFFFFF0);
}
/**************************************/
private static extern (C)
{
shared char* function () uloc_getDefault;
}
static shared void**[] targets =
[
cast(shared(void*)*) &uloc_getDefault,
];
void test35()
{
}
/**************************************/
class S36
{
int s = 1;
this()
{
}
}
class A36 : S36
{
int a = 2;
int b = 3;
int c = 4;
int d = 5;
}
void test36()
{
A36 a = new A36;
printf("A36.sizeof = %d\n", a.classinfo.init.length);
printf("%d\n", a.s);
printf("%d\n", a.a);
printf("%d\n", a.b);
printf("%d\n", a.c);
printf("%d\n", a.d);
version(D_LP64)
assert(a.classinfo.init.length == 36);
else
assert(a.classinfo.init.length == 28);
assert(a.s == 1);
assert(a.a == 2);
assert(a.b == 3);
assert(a.c == 4);
assert(a.d == 5);
}
/**************************************/
struct MyStruct
{
StructAlias* MyStruct()
{
return null;
}
}
alias MyStruct StructAlias;
void test37()
{
}
/**************************************/
class Foo38
{
static void display_name()
{
printf("%.*s\n", Object.classinfo.name.length, Object.classinfo.name.ptr);
assert(Object.classinfo.name == "object.Object");
assert(super.classinfo.name == "object.Object");
assert(this.classinfo.name == "test12.Foo38");
}
}
void test38()
{
Foo38.display_name();
}
/**************************************/
// http://www.digitalmars.com/d/archives/digitalmars/D/bugs/2409.html
class C39
{
C39 c;
this() { c = this; }
C39 lock() { return c; }
}
void test39()
{
C39 c = new C39();
synchronized( c.lock() ) {}
synchronized( c.lock ) {}
}
/**************************************/
class C40
{
static int x = 4;
static int foo()
{
return this.x;
}
}
void test40()
{
C40 c = new C40();
assert(C40.foo() == 4);
}
/**************************************/
struct Foo42
{
Bar42 b;
}
struct Bar42
{
long a;
}
void test42()
{
assert(Bar42.sizeof == long.sizeof);
assert(Foo42.sizeof == long.sizeof);
}
/**************************************/
class Foo43
{
Bar43 b;
}
struct Bar43
{
long a;
}
void test43()
{
assert(Bar43.sizeof == long.sizeof);
assert(Foo43.sizeof == (void*).sizeof);
}
/**************************************/
struct Property
{
uint attributes;
Value value;
}
struct Value
{
int a,b,c,d;
}
struct PropTable
{
Property[Value] table;
PropTable* previous;
Value* get(Value* key)
{
Property *p;
p = *key in table;
p = &table[*key];
table.remove(*key);
return null;
}
}
void test44()
{
}
/**************************************/
import std.algorithm;
struct Shell
{
string str;
const int opCmp(ref const Shell s)
{
return std.algorithm.cmp(this.str, s.str);
}
}
void test45()
{
Shell[3] a;
a[0].str = "hello";
a[1].str = "betty";
a[2].str = "fred";
a.sort;
foreach (Shell s; a)
{
printf("%.*s\n", s.str.length, s.str.ptr);
}
assert(a[0].str == "betty");
assert(a[1].str == "fred");
assert(a[2].str == "hello");
}
/**************************************/
class A46
{
char foo() { return 'a'; }
}
class B46 : A46
{
}
class C46 : B46
{
override char foo() { return 'c'; }
char bar()
{
return B46.foo();
}
}
void test46()
{
C46 c = new C46();
assert(c.bar() == 'a');
printf("%c\n", c.bar());
}
/**************************************/
class Foo47
{
static bool prop() { return false; }
static string charprop() { return null; }
}
void test47()
{
if (0 || Foo47.prop) { }
if (1 && Foo47.prop) { }
switch (Foo47.prop) { default: break; }
foreach (char ch; Foo47.charprop) { }
}
/**************************************/
struct foo48
{
int x, y, z;
}
void bar48() {}
void test48()
{
foo48[] arr;
foreach(foo48 a; arr)
{
bar48();
}
}
/**************************************/
enum E49;
void test49()
{
}
/**************************************/
void test50()
{
S50!() s;
assert(s.i == int.sizeof);
}
struct S50()
{
int i=f50(0).sizeof;
}
int f50(...);
/**************************************/
enum Enum51
{
A,
B,
C
}
struct Struct51
{
Enum51 e;
}
void test51()
{
Struct51 s;
assert(s.e == Enum51.A);
assert(s.e == 0);
}
/**************************************/
bool foo52()
{
int x;
for (;;) {
if (x == 0)
return true;
x = 1;
}
return false;
}
void test52()
{
foo52();
}
/**************************************/
void foo53()
{
ret:{}
goto ret;
}
void test53()
{
}
/**************************************/
struct V54
{
int x = 3;
}
class Foo54
{
static int y;
static V54 prop() { V54 val; return val; }
static void prop(V54 val) { y = val.x * 2; }
}
void test54()
{
(new Foo54).prop = true ? Foo54.prop : Foo54.prop;
assert(Foo54.y == 6);
}
/**************************************/
void test55()
{
dchar c;
c = 'x';
//writefln("c = '%s', c.init = '%s'", c, c.init);
assert(c == 'x');
assert(c.init == dchar.init);
}
/**************************************/
void writefln(string s)
{
printf("%.*s\n", s.length, s.ptr);
}
void test56()
{
string a = "abcd";
string r;
r = a.dup.reverse.idup;
writefln(r);
assert(r == "dcba");
a = "a\u1235\u1234c";
writefln(a);
r = a.dup.reverse.idup;
writefln(r);
assert(r == "c\u1234\u1235a");
a = "ab\u1234c";
writefln(a);
r = a.dup.reverse.idup;
writefln(r);
assert(r == "c\u1234ba");
}
/**************************************/
// DMD 0.114: Fixed .reverse bug of char[] and wchar[] with multibyte encodings.
void test57()
{
wstring a = "abcd";
wchar[] r;
r = a.dup.reverse;
assert(r == "dcba");
a = "a\U00012356\U00012346c";
r = a.dup.reverse;
assert(r == "c\U00012346\U00012356a");
a = "ab\U00012345c";
r = a.dup.reverse;
assert(r == "c\U00012345ba");
}
/**************************************/
void test58()
{
int label=1;
if (0)
{
label:
int label2=2;
assert(label2==2);
}
else
{
assert(label==1);
goto label;
}
assert(label==1);
}
/**************************************/
void test59()
{
if(0){
label:
return;
}else{
goto label;
}
assert(0);
}
/**************************************/
int main(string[] argv)
{
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();
test42();
test43();
test44();
test45();
test46();
test47();
test48();
test49();
test50();
test51();
test52();
test53();
test54();
test55();
test56();
test57();
test58();
test59();
printf("Success\n");
return 0;
}
|
D
|
/**
*
* Authors: A Lynch, alynch4047@gmail.com
* Copyright: A Lynch, 2013
* License: GPL v2
*/
module smidgen.ast.modules_holder;
import std.stdio: writeln;
import pegged.grammar;
import smidgen.converter: Converter;
import smidgen.converter_manager: ConverterManager;
import smidgen.ast.package_: ModulePackage;
import smidgen.ast.klass: Klass;
import smidgen.ast.other: GetClassNameCCode, GetConvertersDHeaderCode;
/**
* The ModulesHolder class is the top level AST class that contains all the wrapped
* modules.
*/
class ModulesHolder {
ModulePackage[] packages;
string getClassNameCCode;
string convertersCHeaderCode;
string convertersDHeaderCode;
string[] converterNames;
ConverterManager converterManager;
bool dontWrapDoubleUnderscoreMethods = false;
this(ParseTree tree) {
converterManager = new ConverterManager();
auto onlyModules = tree.children[0];
auto modules = onlyModules.children[0];
foreach(child; modules.children) {
switch(child.name) {
case("Smidgen.ModulePackage"):
auto package_ = new ModulePackage(child, this);
packages ~= package_;
break;
case("Smidgen.Converter"):
auto converterNameNode = child.children[0];
auto converterName =
strip(converterNameNode.input[converterNameNode.begin .. converterNameNode.end]);
converterNames ~= converterName;
break;
case("Smidgen.DontWrapDoubleUnderscoreMethods"):
dontWrapDoubleUnderscoreMethods = true;
break;
case("Smidgen.GetClassNameCCode"):
auto declaration = new GetClassNameCCode(child);
getClassNameCCode = declaration.toStringC();
break;
case("Smidgen.ConvertersDHeaderCode"):
auto declaration = new GetConvertersDHeaderCode(child);
convertersDHeaderCode = declaration.toStringC();
break;
case("Smidgen.EmptyLine"):
break;
default:
writeln("ModulesHolder found " ~ child.name);
break;
}
}
}
Klass[] getAllKlasses() {
Klass[] allKlasses;
foreach(package_; packages) {
allKlasses = allKlasses ~ package_.getAllDescendentKlasses();
}
return allKlasses;
}
}
|
D
|
CGELQF (F08AVE) Example Program Data
3 4 2 :Values of M, N and NRHS
( 0.28,-0.36) ( 0.50,-0.86) (-0.77,-0.48) ( 1.58, 0.66)
(-0.50,-1.10) (-1.21, 0.76) (-0.32,-0.24) (-0.27,-1.15)
( 0.36,-0.51) (-0.07, 1.33) (-0.75, 0.47) (-0.08, 1.01) :End of matrix A
(-1.35, 0.19) ( 4.83,-2.67)
( 9.41,-3.56) (-7.28, 3.34)
(-7.57, 6.93) ( 0.62, 4.53) :End of matrix B
|
D
|
/Users/shawngong/Centa/.build/debug/PathIndexable.build/PathIndexable+Subscripting.swift.o : /Users/shawngong/Centa/Packages/PathIndexable-1.0.0/Sources/PathIndexable/PathIndexable+Subscripting.swift /Users/shawngong/Centa/Packages/PathIndexable-1.0.0/Sources/PathIndexable/PathIndexable.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/shawngong/Centa/.build/debug/PathIndexable.build/PathIndexable+Subscripting~partial.swiftmodule : /Users/shawngong/Centa/Packages/PathIndexable-1.0.0/Sources/PathIndexable/PathIndexable+Subscripting.swift /Users/shawngong/Centa/Packages/PathIndexable-1.0.0/Sources/PathIndexable/PathIndexable.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/shawngong/Centa/.build/debug/PathIndexable.build/PathIndexable+Subscripting~partial.swiftdoc : /Users/shawngong/Centa/Packages/PathIndexable-1.0.0/Sources/PathIndexable/PathIndexable+Subscripting.swift /Users/shawngong/Centa/Packages/PathIndexable-1.0.0/Sources/PathIndexable/PathIndexable.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
|
D
|
/*
* PS3 Media Server, for streaming any medias to your PS3.
* Copyright (C) 2008 A.Brochard
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; version 2
* of the License only.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
module net.pms.Messages;
import java.util.MissingResourceException;
import java.util.ResourceBundle;
/**
* Class Messages provides a mechanism to localize the text messages found in
* PMS. It is based on {@link ResourceBundle}.
*/
public class Messages {
private static const String BUNDLE_NAME = "resources.i18n.messages";
private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle.getBundle(BUNDLE_NAME);
private this() {
}
/**
* Returns the locale-specific string associated with the key.
*
* @param key
* Keys in PMS follow the format "group.x". group states where
* this key is likely to be used. For example, NetworkTab refers
* to the network configuration tab in the PMS GUI. x is just a
* number.
* @return Descriptive string if key is found or a copy of the key string if
* it is not.
*/
public static String getString(String key) {
try {
return RESOURCE_BUNDLE.getString(key);
} catch (MissingResourceException e) {
return '!' ~ key ~ '!';
}
}
}
|
D
|
import std.stdio;
import gtk.MainWindow;
import gtk.Main;
import gtk.Widget;
import gtk.Button;
import dials;
class MainWin : MainWindow {
CallButton button;
this() {
super("MagOne");
addOnDestroy(delegate void(Widget w) {
Main.quit();
writeln("Adios");
});
setDefaultSize(600, 400);
auto button = new CallButton(this);
add(button);
showAll();
}
}
class CallButton : Button {
this(MainWindow w) {
super("To Dialog");
addOnClicked(delegate void(Button b) { showDialog(w); });
}
void showDialog(MainWindow w) {
writeln("Ahora aparece el Dialog");
//anto entryDial = new EntryDialog("My Dialog", w);
//auto twoLabelsDial = new TwoLabelsDial("Mi titulo", "Texto Uno", "Texto Dos", w);
//auto resp = twoLabelsDial.run();
//auto testDial = new TestDialog(w);
//auto resp = testDial.run();
auto resp = DialogEntry("Titulo", "Cabeza", "Etiqueta", "Previo", true, w);
if (resp.num == -5) {
writeln("Ok pressed: ", resp);
}
}
}
|
D
|
/*
* Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package org.openjdk.testlib.java.util.stream;
import org.testng.annotations.DataProvider;
import java.util.*;
import java.util.Spliterators;
import java.util.function.Supplier;
import java.util.stream.*;
/** TestNG DataProvider for long-valued streams */
public class LongStreamTestDataProvider {
private static final long[] to0 = new long[0];
private static final long[] to1 = new long[1];
private static final long[] to10 = new long[10];
private static final long[] to100 = new long[100];
// Android-changed: remove 0..1000 test data from data providers.
// private static final long[] to1000 = new long[1000];
private static final long[] reversed = new long[100];
private static final long[] ones = new long[100];
private static final long[] twice = new long[200];
private static final long[] pseudoRandom;
private static final Object[][] testData;
private static final Object[][] spliteratorTestData;
static {
// Android-changed: remove 0..1000 test data from data providers.
long[][] arrays = {to0, to1, to10, to100};
for (long[] arr : arrays) {
for (int i = 0; i < arr.length; i++) {
arr[i] = i;
}
}
for (int i = 0; i < reversed.length; i++) {
reversed[i] = reversed.length - i;
}
for (int i = 0; i < ones.length; i++) {
ones[i] = 1;
}
System.arraycopy(to100, 0, twice, 0, to100.length);
System.arraycopy(to100, 0, twice, to100.length, to100.length);
pseudoRandom = new long[LambdaTestHelpers.LONG_STRING.length()];
for (int i = 0; i < LambdaTestHelpers.LONG_STRING.length(); i++) {
pseudoRandom[i] = (long) LambdaTestHelpers.LONG_STRING.charAt(i);
}
}
static final Object[][] arrays = {
{"empty", to0},
{"0..1", to1},
{"0..10", to10},
{"0..100", to100},
// Android-changed: remove 0..1000 test data from data providers.
// {"0..1000", to1000},
{"100x[1]", ones},
{"2x[0..100]", twice},
{"reverse 0..100", reversed},
{"pseudorandom", pseudoRandom}
};
static {
{
List<Object[]> list = new ArrayList<>();
for (Object[] data : arrays) {
final Object name = data[0];
final long[] longs = (long[]) data[1];
list.add(new Object[]{"array:" + name,
TestData.Factory.ofArray("array:" + name, longs)});
SpinedBuffer.OfLong isl = new SpinedBuffer.OfLong();
for (long i : longs) {
isl.accept(i);
}
list.add(new Object[]{"SpinedList:" + name,
TestData.Factory.ofSpinedBuffer("SpinedList:" + name, isl)});
list.add(streamDataDescr("LongStream.longRange(0,l): " + longs.length,
() -> LongStream.range(0, longs.length)));
list.add(streamDataDescr("LongStream.longRangeClosed(0,l): " + longs.length,
() -> LongStream.rangeClosed(0, longs.length)));
}
testData = list.toArray(new Object[0][]);
}
{
List<Object[]> spliterators = new ArrayList<>();
for (Object[] data : arrays) {
final Object name = data[0];
final long[] longs = (long[]) data[1];
SpinedBuffer.OfLong isl = new SpinedBuffer.OfLong();
for (long i : longs) {
isl.accept(i);
}
spliterators.add(splitDescr("Arrays.s(array):" + name,
() -> Arrays.spliterator(longs)));
spliterators.add(splitDescr("Arrays.s(array,o,l):" + name,
() -> Arrays.spliterator(longs, 0, longs.length / 2)));
spliterators.add(splitDescr("SpinedBuffer.s():" + name,
() -> isl.spliterator()));
spliterators.add(splitDescr("Primitives.s(SpinedBuffer.iterator(), size):" + name,
() -> Spliterators.spliterator(isl.iterator(), longs.length, 0)));
spliterators.add(splitDescr("Primitives.s(SpinedBuffer.iterator()):" + name,
() -> Spliterators.spliteratorUnknownSize(isl.iterator(), 0)));
spliterators.add(splitDescr("LongStream.longRange(0,l):" + name,
() -> LongStream.range(0, longs.length).spliterator()));
spliterators.add(splitDescr("LongStream.longRangeClosed(0,l):" + name,
() -> LongStream.rangeClosed(0, longs.length).spliterator()));
// Need more!
}
spliteratorTestData = spliterators.toArray(new Object[0][]);
}
}
static <T> Object[] streamDataDescr(String description, Supplier<LongStream> s) {
return new Object[] { description, TestData.Factory.ofLongSupplier(description, s) };
}
static <T> Object[] splitDescr(String description, Supplier<Spliterator.OfLong> s) {
return new Object[] { description, s };
}
// Return an array of ( String name, LongStreamTestData )
@DataProvider(name = "LongStreamTestData")
public static Object[][] makeLongStreamTestData() {
return testData;
}
// returns an array of (String name, Supplier<PrimitiveSpliterator<Long>>)
@DataProvider(name = "LongSpliterator")
public static Object[][] spliteratorProvider() {
return spliteratorTestData;
}
}
|
D
|
import std.file;
import std.path;
import std.stdio : writeln;
import std.exception;
import std.datetime.date;
import std.algorithm.sorting;
import item;
import mustache;
alias MustacheEngine!(string) Mustache;
void _main()
{
immutable publicPath = absolutePath("public");
if (publicPath.exists)
publicPath.rmdirRecurse;
publicPath.mkdir;
immutable staticPath = absolutePath("static");
copyDir(staticPath, buildPath(publicPath, "static"));
immutable templatesPath = absolutePath("templates");
immutable itemTemplate = buildPath(templatesPath, "item");
immutable frontTemplate = buildPath(templatesPath, "front");
Mustache mustache;
mustache.ext = "html";
auto itemContext = new Mustache.Context;
auto frontContext = new Mustache.Context;
Item[] items;
immutable contentPath = absolutePath("content");
foreach(string e; dirEntries(contentPath, SpanMode.shallow)) {
Item i = parseItem(e);
items.length++;
items[items.length - 1] = i;
immutable itemFolder = buildPath(publicPath, i.slug);
immutable itemPath = buildPath(itemFolder, "index.html");
mkdir(itemFolder);
itemContext["title"] = i.title;
itemContext["content"] = i.content;
write(itemPath, mustache.render(itemTemplate, itemContext));
}
items.sort!("a.date > b.date");
foreach(ref i; items) {
auto sub = frontContext.addSubContext("items");
sub["slug"] = i.slug;
sub["title"] = i.title;
sub["date"] = i.date.toISOExtString;
}
immutable frontPath = buildPath(publicPath, "index.html");
write(frontPath, mustache.render(frontTemplate, frontContext));
}
void copyDir(const string from, const string to)
{
if (to.exists && to.isDir)
to.rmdirRecurse;
to.mkdir();
foreach(DirEntry e; dirEntries(from, SpanMode.breadth)) {
immutable newPath = absolutePath(e.name[from.length + 1 .. $],
to);
if (e.isDir())
mkdir(newPath);
else
copy(e.name, newPath);
}
}
import std.datetime.stopwatch : benchmark, StopWatch;
void main()
{
auto b = benchmark!(_main)(100);
writeln(b[0] / 100);
}
|
D
|
/*
This file is part of BioD.
Copyright (C) 2013 Artem Tarasov <lomereiter@gmail.com>
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
*/
module bio.core.bgzf.inputstream;
import bio.core.bgzf.block;
import bio.core.bgzf.virtualoffset;
import bio.core.bgzf.constants;
import bio.core.bgzf.chunk;
import bio.bam.constants;
import bio.core.utils.roundbuf;
import std.stream;
import std.exception;
import std.conv;
import std.parallelism;
import std.array;
import std.algorithm : min, max;
/// Exception type, thrown in case of encountering corrupt BGZF blocks
class BgzfException : Exception {
this(string msg) { super(msg); }
}
bool fillBgzfBufferFromStream(Stream stream, bool is_seekable,
BgzfBlock* block, ubyte* buffer)
{
if (stream.eof())
return false;
ulong start_offset;
void throwBgzfException(string msg) {
throw new BgzfException("Error reading BGZF block starting from offset " ~
to!string(start_offset) ~ ": " ~ msg);
}
if (is_seekable)
start_offset = stream.position;
try {
uint bgzf_magic = void;
// TODO: fix byte order if needed
size_t bytes_read;
while (bytes_read < uint.sizeof) {
auto buf = (cast(ubyte*)&bgzf_magic)[bytes_read .. uint.sizeof];
auto read_ = stream.read(buf);
if (read_ == 0)
return false;
bytes_read += read_;
}
if (bgzf_magic != BGZF_MAGIC) {
throwBgzfException("wrong BGZF magic");
}
ushort gzip_extra_length = void;
if (is_seekable) {
stream.seekCur(uint.sizeof + 2 * ubyte.sizeof);
} else {
uint gzip_mod_time = void;
ubyte gzip_extra_flags = void;
ubyte gzip_os = void;
stream.read(gzip_mod_time);
stream.read(gzip_extra_flags);
stream.read(gzip_os);
}
stream.read(gzip_extra_length);
ushort bsize = void; // total Block SIZE minus 1
bool found_block_size = false;
// read extra subfields
size_t len = 0;
while (len < gzip_extra_length) {
ubyte si1 = void; // Subfield Identifier1
ubyte si2 = void; // Subfield Identifier2
ushort slen = void; // Subfield LENgth
stream.read(si1);
stream.read(si2);
stream.read(slen);
if (si1 == BAM_SI1 && si2 == BAM_SI2) {
// found 'BC' as subfield identifier
if (slen != 2) {
throwBgzfException("wrong BC subfield length: " ~
to!string(slen) ~ "; expected 2");
}
if (found_block_size) {
throwBgzfException("duplicate field with block size");
}
// read block size
stream.read(bsize);
found_block_size = true;
// skip the rest
if (is_seekable) {
stream.seekCur(slen - bsize.sizeof);
} else {
stream.readString(slen - bsize.sizeof);
}
} else {
// this subfield has nothing to do with block size, just skip
if (is_seekable) {
stream.seekCur(slen);
} else {
stream.readString(slen);
}
}
len += si1.sizeof + si2.sizeof + slen.sizeof + slen;
}
if (len != gzip_extra_length) {
throwBgzfException("total length of subfields in bytes (" ~
to!string(len) ~
") is not equal to gzip_extra_length (" ~
to!string(gzip_extra_length) ~ ")");
}
if (!found_block_size) {
throwBgzfException("block size was not found in any subfield");
}
// read compressed data
auto cdata_size = bsize - gzip_extra_length - 19;
if (cdata_size > BGZF_MAX_BLOCK_SIZE) {
throwBgzfException("compressed data size is more than " ~
to!string(BGZF_MAX_BLOCK_SIZE) ~
" bytes, which is not allowed by " ~
"current BAM specification");
}
block.bsize = bsize;
block.cdata_size = cast(ushort)cdata_size;
version(extraVerbose) {
import std.stdio;
// stderr.writeln("[compressed] reading ", cdata_size, " bytes starting from ", start_offset);
}
stream.readExact(buffer, cdata_size);
version(extraVerbose) {
stderr.writeln("[ compressed] [write] range: ", buffer, " - ", buffer + cdata_size);
}
// version(extraVerbose) {stderr.writeln("[compressed] reading block crc32 and input size...");}
stream.read(block.crc32);
stream.read(block.input_size);
// version(extraVerbose) {stderr.writeln("[compressed] read block input size: ", block.input_size);}
block._buffer = buffer[0 .. max(block.input_size, cdata_size)];
block.start_offset = start_offset;
block.dirty = false;
} catch (ReadException e) {
throwBgzfException("stream error: " ~ e.msg);
}
return true;
}
///
interface BgzfBlockSupplier {
/// Fills $(D buffer) with compressed data and points $(D block) to it.
/// Return value is false if there is no next block.
///
/// The implementation may assume that there's enough space in the buffer.
bool getNextBgzfBlock(BgzfBlock* block, ubyte* buffer,
ushort* skip_start, ushort* skip_end);
/// Total compressed size of the supplied blocks in bytes.
/// If unknown, should return 0.
size_t totalCompressedSize() const;
}
///
class StreamSupplier : BgzfBlockSupplier {
private {
Stream _stream;
bool _seekable;
size_t _size;
ushort _skip_start;
}
///
this(Stream stream, ushort skip_start=0) {
_stream = stream;
_seekable = _stream.seekable;
_skip_start = skip_start;
if (_seekable)
_size = _stream.size;
}
///
bool getNextBgzfBlock(BgzfBlock* block, ubyte* buffer,
ushort* skip_start, ushort* skip_end) {
auto result = fillBgzfBufferFromStream(_stream, _seekable, block, buffer);
*skip_start = _skip_start;
_skip_start = 0;
*skip_end = 0;
return result;
}
/// Stream size if available
size_t totalCompressedSize() const {
return _size;
}
}
class StreamChunksSupplier : BgzfBlockSupplier {
private {
Stream _stream;
Chunk[] _chunks;
void moveToNextChunk() {
if (_chunks.length == 0)
return;
size_t i = 1;
auto beg = _chunks[0].beg;
for ( ; i < _chunks.length; ++i)
if (_chunks[i].beg.coffset > _chunks[0].beg.coffset)
break;
_chunks = _chunks[i - 1 .. $];
_chunks[0].beg = beg;
_stream.seekSet(cast(size_t)_chunks[0].beg.coffset);
version(extraVerbose) {
import std.stdio; stderr.writeln("started processing chunk ", beg, " - ", _chunks[0].end);
}
}
}
this(Stream stream, bio.core.bgzf.chunk.Chunk[] chunks) {
_stream = stream;
assert(_stream.seekable);
_chunks = chunks;
moveToNextChunk();
}
///
bool getNextBgzfBlock(BgzfBlock* block, ubyte* buffer,
ushort* skip_start, ushort* skip_end)
{
if (_chunks.length == 0)
return false;
// Usually there can't be two or more chunks overlapping a
// single block -- in such cases they are merged during
// indexing in most implementations.
// If this is not the case, the algorithm should still work,
// but it might decompress the same block several times.
//
// On each call of this method, one of these things happen:
// 1) We remain in the current chunk, but read next block
// 2) We finish dealing with the current chunk, so we move to
// the next one. If this was the last one, false is returned.
//
// moveToNextChunk moves stream pointer to chunk.beg.coffset,
// in which case skip_start should be set to chunk.beg.uoffset
auto result = fillBgzfBufferFromStream(_stream, true, block, buffer);
auto offset = block.start_offset;
if (!result)
return false;
if (offset == _chunks[0].beg.coffset)
*skip_start = _chunks[0].beg.uoffset; // first block in a chunk
else
*skip_start = 0;
long _skip_end; // may be equal to 65536!
if (offset == _chunks[0].end.coffset) // last block in a chunk
_skip_end = block.input_size - _chunks[0].end.uoffset;
else
_skip_end = 0;
*skip_end = cast(ushort)_skip_end;
if (offset >= _chunks[0].end.coffset) {
_chunks = _chunks[1 .. $];
moveToNextChunk();
}
// special case: it's not actually the last block in a chunk,
// but rather that chunk ended on the edge of two blocks
if (block.input_size > 0 && _skip_end == block.input_size) {
version(extraVerbose) { import std.stdio; stderr.writeln("skip_end == input size"); }
return getNextBgzfBlock(block, buffer, skip_start, skip_end);
}
return true;
}
/// Always zero (unknown)
size_t totalCompressedSize() const {
return 0;
}
}
///
class BgzfInputStream : Stream {
private {
BgzfBlockSupplier _supplier;
ubyte[] _data;
BgzfBlockCache _cache;
ubyte[] _read_buffer;
VirtualOffset _current_vo;
VirtualOffset _end_vo;
size_t _compressed_size;
// for estimating compression ratio
size_t _compressed_read, _uncompressed_read;
TaskPool _pool;
enum _max_block_size = BGZF_MAX_BLOCK_SIZE * 2;
alias Task!(decompressBgzfBlock, BgzfBlock, BgzfBlockCache)
DecompressionTask;
static struct BlockAux {
BgzfBlock block;
ushort skip_start;
ushort skip_end;
DecompressionTask* task;
alias task this;
}
RoundBuf!BlockAux _tasks = void;
size_t _offset;
bool fillNextBlock() {
ubyte* p = _data.ptr + _offset;
BlockAux b = void;
if (_supplier.getNextBgzfBlock(&b.block, p,
&b.skip_start, &b.skip_end))
{
if (b.block.input_size == 0) // BGZF EOF block
return false;
_compressed_read += b.block.end_offset - b.block.start_offset;
_uncompressed_read += b.block.input_size;
version(extraVerbose) {
import std.stdio;
stderr.writeln("[creating task] ", b.block.start_offset, " / ", b.skip_start, " / ", b.skip_end);
}
b.task = task!decompressBgzfBlock(b.block, _cache);
_pool.put(b.task);
_tasks.put(b);
_offset += _max_block_size;
if (_offset == _data.length)
_offset = 0;
return true;
}
return false;
}
void setupReadBuffer() {
auto b = _tasks.front;
auto decompressed_block = b.task.workForce();
auto from = b.skip_start;
auto to = b.block.input_size - b.skip_end;
_read_buffer = b.block._buffer.ptr[from .. to];
if (from == to) {
assert(from == 0);
setEOF();
}
_current_vo = VirtualOffset(b.block.start_offset, from);
version(extraVerbose) {
import std.stdio; stderr.writeln("[setup read buffer] ", _current_vo);
}
if (b.skip_end > 0)
_end_vo = VirtualOffset(b.block.start_offset, cast(ushort)to);
else
_end_vo = VirtualOffset(b.block.end_offset, 0);
_tasks.popFront();
}
void setEOF() {
_current_vo = _end_vo;
readEOF = true;
}
}
this(BgzfBlockSupplier supplier,
TaskPool pool=taskPool,
BgzfBlockCache cache=null,
size_t buffer_size=0)
{
_supplier = supplier;
_compressed_size = _supplier.totalCompressedSize();
_pool = pool;
_cache = cache;
size_t n_tasks = max(pool.size, 1) * 2;
if (buffer_size > 0)
n_tasks = max(n_tasks, buffer_size / BGZF_MAX_BLOCK_SIZE);
_tasks = RoundBuf!BlockAux(n_tasks);
_data = uninitializedArray!(ubyte[])(n_tasks * _max_block_size);
for (size_t i = 0; i < n_tasks; ++i)
if (!fillNextBlock())
break;
if (!_tasks.empty) {
setupReadBuffer();
}
}
VirtualOffset virtualTell() const {
return _current_vo;
}
override ulong seek(long offset, SeekPos whence) {
throw new SeekException("Stream is not seekable");
}
override size_t writeBlock(const void* buf, size_t size) {
throw new WriteException("Stream is not writeable");
}
override size_t readBlock(void* buf, size_t size) {
version(extraVerbose) {
import std.stdio;
// stderr.writeln("[uncompressed] reading ", size, " bytes to address ", buf);
}
if (_read_buffer.length == 0) {
assert(_tasks.empty);
setEOF();
return 0;
}
auto buffer = cast(ubyte*)buf;
auto len = min(size, _read_buffer.length);
buffer[0 .. len] = _read_buffer[0 .. len];
version(extraVerbose) {
// stderr.writeln("[uncompressed] [read] range: ", _read_buffer.ptr, " - ", _read_buffer.ptr + len);
}
_read_buffer = _read_buffer[len .. $];
_current_vo = VirtualOffset(cast(ulong)_current_vo + len);
if (_read_buffer.length == 0) {
_current_vo = _end_vo;
if (!_tasks.empty) {
setupReadBuffer();
if (!readEOF)
fillNextBlock();
}
else
setEOF();
}
return len;
}
size_t total_compressed_size() @property const {
return _compressed_size;
}
float average_compression_ratio() @property const {
if (_compressed_read == 0)
return 0.0;
return cast(float)_uncompressed_read / _compressed_read;
}
}
|
D
|
instance GRD_267_GARDIST(NPC_DEFAULT)
{
name[0] = NAME_GARDIST;
npctype = NPCTYPE_MINE_GUARD;
guild = GIL_GRD;
level = 15;
voice = 13;
id = 267;
attribute[ATR_STRENGTH] = 70;
attribute[ATR_DEXTERITY] = 50;
attribute[ATR_MANA_MAX] = 0;
attribute[ATR_MANA] = 0;
attribute[ATR_HITPOINTS_MAX] = 220;
attribute[ATR_HITPOINTS] = 220;
Mdl_SetVisual(self,"HUMANS.MDS");
Mdl_ApplyOverlayMds(self,"Humans_Militia.mds");
Mdl_SetVisualBody(self,"hum_body_Naked0",0,1,"Hum_Head_FatBald",17,4,grd_armor_m);
b_scale(self);
Mdl_SetModelFatness(self,0);
fight_tactic = FAI_HUMAN_STRONG;
Npc_SetTalentSkill(self,NPC_TALENT_1H,2);
Npc_SetTalentSkill(self,NPC_TALENT_2H,1);
Npc_SetTalentSkill(self,NPC_TALENT_CROSSBOW,1);
EquipItem(self,itmw_1h_sword_02);
EquipItem(self,itrw_crossbow_01);
CreateInvItems(self,itambolt,30);
CreateInvItem(self,itfocheese);
CreateInvItem(self,itfoapple);
CreateInvItems(self,itminugget,10);
CreateInvItem(self,itlstorch);
daily_routine = rtn_start_267;
};
func void rtn_start_267()
{
ta_guard(6,0,23,0,"OM_CAVE1_70");
ta_guard(23,0,6,0,"OM_CAVE1_70");
};
|
D
|
// REQUIRED_ARGS: -profile
/*
TEST_OUTPUT:
---
compilable/test11471.d(10): Deprecation: `asm` statement is assumed to throw - mark it with `nothrow` if it does not
---
*/
void main() nothrow
{ asm { nop; } } // Error: asm statements are assumed to throw
|
D
|
/Users/shahid/Desktop/Projects/Swift2/Raywenderlich/RayCore/FlickrSwift/DerivedData/FlickrSwift/Build/Intermediates/Pods.build/Debug-iphonesimulator/Alamofire.build/Objects-normal/x86_64/ResponseSerialization.o : /Users/shahid/Desktop/Projects/Swift2/Raywenderlich/RayCore/FlickrSwift/Pods/Alamofire/Source/Alamofire.swift /Users/shahid/Desktop/Projects/Swift2/Raywenderlich/RayCore/FlickrSwift/Pods/Alamofire/Source/Download.swift /Users/shahid/Desktop/Projects/Swift2/Raywenderlich/RayCore/FlickrSwift/Pods/Alamofire/Source/Error.swift /Users/shahid/Desktop/Projects/Swift2/Raywenderlich/RayCore/FlickrSwift/Pods/Alamofire/Source/Manager.swift /Users/shahid/Desktop/Projects/Swift2/Raywenderlich/RayCore/FlickrSwift/Pods/Alamofire/Source/MultipartFormData.swift /Users/shahid/Desktop/Projects/Swift2/Raywenderlich/RayCore/FlickrSwift/Pods/Alamofire/Source/NetworkReachabilityManager.swift /Users/shahid/Desktop/Projects/Swift2/Raywenderlich/RayCore/FlickrSwift/Pods/Alamofire/Source/Notifications.swift /Users/shahid/Desktop/Projects/Swift2/Raywenderlich/RayCore/FlickrSwift/Pods/Alamofire/Source/ParameterEncoding.swift /Users/shahid/Desktop/Projects/Swift2/Raywenderlich/RayCore/FlickrSwift/Pods/Alamofire/Source/Request.swift /Users/shahid/Desktop/Projects/Swift2/Raywenderlich/RayCore/FlickrSwift/Pods/Alamofire/Source/Response.swift /Users/shahid/Desktop/Projects/Swift2/Raywenderlich/RayCore/FlickrSwift/Pods/Alamofire/Source/ResponseSerialization.swift /Users/shahid/Desktop/Projects/Swift2/Raywenderlich/RayCore/FlickrSwift/Pods/Alamofire/Source/Result.swift /Users/shahid/Desktop/Projects/Swift2/Raywenderlich/RayCore/FlickrSwift/Pods/Alamofire/Source/ServerTrustPolicy.swift /Users/shahid/Desktop/Projects/Swift2/Raywenderlich/RayCore/FlickrSwift/Pods/Alamofire/Source/Stream.swift /Users/shahid/Desktop/Projects/Swift2/Raywenderlich/RayCore/FlickrSwift/Pods/Alamofire/Source/Timeline.swift /Users/shahid/Desktop/Projects/Swift2/Raywenderlich/RayCore/FlickrSwift/Pods/Alamofire/Source/Upload.swift /Users/shahid/Desktop/Projects/Swift2/Raywenderlich/RayCore/FlickrSwift/Pods/Alamofire/Source/Validation.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Swift.swiftmodule /Users/shahid/Desktop/Projects/Swift2/Raywenderlich/RayCore/FlickrSwift/Pods/Target\ Support\ Files/Alamofire/Alamofire-umbrella.h /Users/shahid/Desktop/Projects/Swift2/Raywenderlich/RayCore/FlickrSwift/DerivedData/FlickrSwift/Build/Intermediates/Pods.build/Debug-iphonesimulator/Alamofire.build/unextended-module.modulemap /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/UIKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/ObjectiveC.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreGraphics.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreImage.swiftmodule
/Users/shahid/Desktop/Projects/Swift2/Raywenderlich/RayCore/FlickrSwift/DerivedData/FlickrSwift/Build/Intermediates/Pods.build/Debug-iphonesimulator/Alamofire.build/Objects-normal/x86_64/ResponseSerialization~partial.swiftmodule : /Users/shahid/Desktop/Projects/Swift2/Raywenderlich/RayCore/FlickrSwift/Pods/Alamofire/Source/Alamofire.swift /Users/shahid/Desktop/Projects/Swift2/Raywenderlich/RayCore/FlickrSwift/Pods/Alamofire/Source/Download.swift /Users/shahid/Desktop/Projects/Swift2/Raywenderlich/RayCore/FlickrSwift/Pods/Alamofire/Source/Error.swift /Users/shahid/Desktop/Projects/Swift2/Raywenderlich/RayCore/FlickrSwift/Pods/Alamofire/Source/Manager.swift /Users/shahid/Desktop/Projects/Swift2/Raywenderlich/RayCore/FlickrSwift/Pods/Alamofire/Source/MultipartFormData.swift /Users/shahid/Desktop/Projects/Swift2/Raywenderlich/RayCore/FlickrSwift/Pods/Alamofire/Source/NetworkReachabilityManager.swift /Users/shahid/Desktop/Projects/Swift2/Raywenderlich/RayCore/FlickrSwift/Pods/Alamofire/Source/Notifications.swift /Users/shahid/Desktop/Projects/Swift2/Raywenderlich/RayCore/FlickrSwift/Pods/Alamofire/Source/ParameterEncoding.swift /Users/shahid/Desktop/Projects/Swift2/Raywenderlich/RayCore/FlickrSwift/Pods/Alamofire/Source/Request.swift /Users/shahid/Desktop/Projects/Swift2/Raywenderlich/RayCore/FlickrSwift/Pods/Alamofire/Source/Response.swift /Users/shahid/Desktop/Projects/Swift2/Raywenderlich/RayCore/FlickrSwift/Pods/Alamofire/Source/ResponseSerialization.swift /Users/shahid/Desktop/Projects/Swift2/Raywenderlich/RayCore/FlickrSwift/Pods/Alamofire/Source/Result.swift /Users/shahid/Desktop/Projects/Swift2/Raywenderlich/RayCore/FlickrSwift/Pods/Alamofire/Source/ServerTrustPolicy.swift /Users/shahid/Desktop/Projects/Swift2/Raywenderlich/RayCore/FlickrSwift/Pods/Alamofire/Source/Stream.swift /Users/shahid/Desktop/Projects/Swift2/Raywenderlich/RayCore/FlickrSwift/Pods/Alamofire/Source/Timeline.swift /Users/shahid/Desktop/Projects/Swift2/Raywenderlich/RayCore/FlickrSwift/Pods/Alamofire/Source/Upload.swift /Users/shahid/Desktop/Projects/Swift2/Raywenderlich/RayCore/FlickrSwift/Pods/Alamofire/Source/Validation.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Swift.swiftmodule /Users/shahid/Desktop/Projects/Swift2/Raywenderlich/RayCore/FlickrSwift/Pods/Target\ Support\ Files/Alamofire/Alamofire-umbrella.h /Users/shahid/Desktop/Projects/Swift2/Raywenderlich/RayCore/FlickrSwift/DerivedData/FlickrSwift/Build/Intermediates/Pods.build/Debug-iphonesimulator/Alamofire.build/unextended-module.modulemap /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/UIKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/ObjectiveC.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreGraphics.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreImage.swiftmodule
/Users/shahid/Desktop/Projects/Swift2/Raywenderlich/RayCore/FlickrSwift/DerivedData/FlickrSwift/Build/Intermediates/Pods.build/Debug-iphonesimulator/Alamofire.build/Objects-normal/x86_64/ResponseSerialization~partial.swiftdoc : /Users/shahid/Desktop/Projects/Swift2/Raywenderlich/RayCore/FlickrSwift/Pods/Alamofire/Source/Alamofire.swift /Users/shahid/Desktop/Projects/Swift2/Raywenderlich/RayCore/FlickrSwift/Pods/Alamofire/Source/Download.swift /Users/shahid/Desktop/Projects/Swift2/Raywenderlich/RayCore/FlickrSwift/Pods/Alamofire/Source/Error.swift /Users/shahid/Desktop/Projects/Swift2/Raywenderlich/RayCore/FlickrSwift/Pods/Alamofire/Source/Manager.swift /Users/shahid/Desktop/Projects/Swift2/Raywenderlich/RayCore/FlickrSwift/Pods/Alamofire/Source/MultipartFormData.swift /Users/shahid/Desktop/Projects/Swift2/Raywenderlich/RayCore/FlickrSwift/Pods/Alamofire/Source/NetworkReachabilityManager.swift /Users/shahid/Desktop/Projects/Swift2/Raywenderlich/RayCore/FlickrSwift/Pods/Alamofire/Source/Notifications.swift /Users/shahid/Desktop/Projects/Swift2/Raywenderlich/RayCore/FlickrSwift/Pods/Alamofire/Source/ParameterEncoding.swift /Users/shahid/Desktop/Projects/Swift2/Raywenderlich/RayCore/FlickrSwift/Pods/Alamofire/Source/Request.swift /Users/shahid/Desktop/Projects/Swift2/Raywenderlich/RayCore/FlickrSwift/Pods/Alamofire/Source/Response.swift /Users/shahid/Desktop/Projects/Swift2/Raywenderlich/RayCore/FlickrSwift/Pods/Alamofire/Source/ResponseSerialization.swift /Users/shahid/Desktop/Projects/Swift2/Raywenderlich/RayCore/FlickrSwift/Pods/Alamofire/Source/Result.swift /Users/shahid/Desktop/Projects/Swift2/Raywenderlich/RayCore/FlickrSwift/Pods/Alamofire/Source/ServerTrustPolicy.swift /Users/shahid/Desktop/Projects/Swift2/Raywenderlich/RayCore/FlickrSwift/Pods/Alamofire/Source/Stream.swift /Users/shahid/Desktop/Projects/Swift2/Raywenderlich/RayCore/FlickrSwift/Pods/Alamofire/Source/Timeline.swift /Users/shahid/Desktop/Projects/Swift2/Raywenderlich/RayCore/FlickrSwift/Pods/Alamofire/Source/Upload.swift /Users/shahid/Desktop/Projects/Swift2/Raywenderlich/RayCore/FlickrSwift/Pods/Alamofire/Source/Validation.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Swift.swiftmodule /Users/shahid/Desktop/Projects/Swift2/Raywenderlich/RayCore/FlickrSwift/Pods/Target\ Support\ Files/Alamofire/Alamofire-umbrella.h /Users/shahid/Desktop/Projects/Swift2/Raywenderlich/RayCore/FlickrSwift/DerivedData/FlickrSwift/Build/Intermediates/Pods.build/Debug-iphonesimulator/Alamofire.build/unextended-module.modulemap /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/UIKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/ObjectiveC.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreGraphics.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreImage.swiftmodule
|
D
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.