/** * * Output Class * * Authors: Tim Burrell * Copyright: Copyright (c) 2007 * License: Apache License, Version 2.0 * **/ //////////////////////////////////////////////////////////////////////////// // Module /////////////////////////////////////// module libraryA.io.Output; //////////////////////////////////////////////////////////////////////////// // Imports /////////////////////////////////////// version (Tango) { import tango.io.Stdout; } else { import std.stdio; } //////////////////////////////////////////////////////////////////////////// // Typedef's / Enums /////////////////////////////////////// //////////////////////////////////////////////////////////////////////////// // Output Definition /////////////////////////////////////// /** * Output Class **/ class Output { //////////////////////////////////////////////////////////////////// // Constants /////////////////////////////// //////////////////////////////////////////////////////////////////// // Public members /////////////////////////////// public alias output opCall; /// Alias opCall //////////////////////////////////////////////////////////////////// // Construction /////////////////////////////// /** * Default Constructor **/ this () { } /** * Destructor **/ ~this () { } //////////////////////////////////////////////////////////////////// // Public Functions /////////////////////////////// /** * Output some text * * Params: LogLevel = Level of output * Returns: Self **/ final Output output(lazy char [] Output) { version (Tango) { Stdout(Output).newline; } else { writefln(Output); } return this; } //////////////////////////////////////////////////////////////////// private: //////////////////////////////////////////////////////////////////// // Private Functions /////////////////////////////// //////////////////////////////////////////////////////////////////// // Private Members /////////////////////////////// } //////////////////////////////////////////////////////////////////////////// // Globals /////////////////////////////////////// static this() { Out = new Output(); } public static Output Out; /// Global Logout object