close-policy.dhover×16 error×6all
#!/usr/bin/env dub
/+ dub.sdl:
    name "close-policy"
    targetPath "build"
    dependency "sparkles:ui-app" path="../../.."
    buildType "checked" {
        buildOptions "optimize" "inline" "debugInfo"
    }
+/

/// A close decision can outlive the native request that opened it.
module 
(module) close_policy

A close decision can outlive the native request that opened it.

close_policy
;
import sparkles.ui_app.record : RecordingHost;
unable to read module `record` Expected 'sparkles/ui_app/record.d' or 'sparkles/ui_app/record/package.d' in one of the following import paths:
unable to read module `record` Expected 'sparkles/ui_app/record.d' or 'sparkles/ui_app/record/package.d' in one of the following import paths:
unable to read module `record` Expected 'sparkles/ui_app/record.d' or 'sparkles/ui_app/record/package.d' in one of the following import paths:
import sparkles.ui_app.run_app : requestAppClose;
unable to read module `run_app` Expected 'sparkles/ui_app/run_app.d' or 'sparkles/ui_app/run_app/package.d' in one of the following import paths:
unable to read module `run_app` Expected 'sparkles/ui_app/run_app.d' or 'sparkles/ui_app/run_app/package.d' in one of the following import paths:
unable to read module `run_app` Expected 'sparkles/ui_app/run_app.d' or 'sparkles/ui_app/run_app/package.d' in one of the following import paths:
import
(package) std
std
.
(module) std.stdio
Category Symbols
File handles _popen File isFileHandle openNetwork stderr stdin stdout
Reading chunks lines readf readfln readln
Writing toFile write writef writefln writeln
Misc KeepTerminator LockType StdioException

Standard I/O functions that extend core.stdc.stdio. core.stdc.stdio is publically imported when importing std.stdio.

There are three layers of I/O:

  1. The lowest layer is the operating system layer. The two main schemes are Windows and Posix.

  2. C's stdio.h which unifies the two operating system schemes.

  3. std.stdio, this module, unifies the various stdio.h implementations into a high level package for D programs.

Source

std/stdio.d

@copyrightCopyright The D Language Foundation 2007-.@licenseBoost License 1.0.@authorsWalter Bright, Andrei Alexandrescu, Alex Rønne Petersen
stdio
:
(alias template) close_policy.writeln = std.stdio.writeln(T...)(T args)

Equivalent to write(args, '\n'). Calling writeln without arguments is valid and just prints a newline to the standard output.

Example

Reads stdin and writes it to stdout with an argument counter.

import std.stdio;

void main()
{
    string line;

    for (size_t count = 0; (line = readln) !is null; count++)
    {
         writeln("Input ", count, ": ", line);
    }
}
@paramargs the items to write to stdout@throwsIn case of an I/O error, throws an StdioException.
writeln
;
struct
(struct) close_policy.App
App
{ bool
(field) bool close_policy.App.approved
approved
;
void
void closeRequested(H)(ref H host)
closeRequested
(H)(ref H
(parameter) H host
host
)
{ if (approved) host.quit(); } } void
void D main() @safe
main
() @safe
{
(struct) close_policy.App
App
(local variable) close_policy.App app
app
;
RecordingHost
(local variable) _error_ host
host
;
requestAppClose(app, host); assert(!host.quitRequested);
void std.stdio.writeln!string(string __param_0) @safe

Equivalent to write(args, '\n'). Calling writeln without arguments is valid and just prints a newline to the standard output.

Example

Reads stdin and writes it to stdout with an argument counter.

import std.stdio;

void main()
{
    string line;

    for (size_t count = 0; (line = readln) !is null; count++)
    {
         writeln("Input ", count, ": ", line);
    }
}
@paramargs the items to write to stdout@throwsIn case of an I/O error, throws an StdioException.
writeln
("close deferred");
(local variable) close_policy.App app
app
.
(field) bool close_policy.App.approved
approved
= true;
requestAppClose(app, host); assert(host.quitRequested);
void std.stdio.writeln!string(string __param_0) @safe

Equivalent to write(args, '\n'). Calling writeln without arguments is valid and just prints a newline to the standard output.

Example

Reads stdin and writes it to stdout with an argument counter.

import std.stdio;

void main()
{
    string line;

    for (size_t count = 0; (line = readln) !is null; count++)
    {
         writeln("Input ", count, ": ", line);
    }
}
@paramargs the items to write to stdout@throwsIn case of an I/O error, throws an StdioException.
writeln
("close approved");
}