quick start:g++ [flags ...] file ... -l /isip/tools/lib/$ISIP_BINARY/lib_system.a #include <Console.h> static boolean open(const SysString& filename, MODE mode = File::APPEND_ONLY); static boolean broadcast(const unichar* str); static boolean close();
description:Console::put(L"this is output to stdout"); Console::open(L"out.txt"); Console::put(L"this is appended to the file out.txt"); Console::broadcast(L"this is output to both stdout and the out.txt"); Console::close();
static const SysString CLASS_NAME = L"Console";
static const long MAX_STACK_SIZE = 32;
static const long NO_WRAP = -1;
static const long DEF_LINE_WRAP = NO_WRAP;
static const STREAM DEF_STREAM = File::OUT;
static const long ERR = 1400;
static const long ERR_OPENMAX = 1401;
static File cons_d;
static File stack_d[];
static long size_d;
static long stack_size_d;
static boolean initialized_wrap_d;
static Integral::DEBUG debug_level_d;
static const SysString& name();
static boolean diagnose(Integral::DEBUG debug_level);
static boolean setDebug(Integral::DEBUG level);
static boolean debug(const unichar* message);
the constructors and destructor are private so that Console objects cannot be instantiated
these methods are omitted because Console objects can not be instantiated
these methods are omitted because Console objects can not be instantiated
these methods are omitted because Console objects can not be instantiated
these methods are omitted because Console objects can not be instantiated
these methods are omitted because Console objects can not be instantiated
static boolean open(const unichar* filename, MODE mode = File::APPEND_ONLY);
static boolean open(const SysString& filename, MODE mode = File::APPEND_ONLY);
static boolean open(STREAM stream = DEF_STREAM);
static boolean close();
static boolean closeStack();
static boolean put(const unichar* str);
static boolean put(const SysString& str);
static boolean putNoWrap(const unichar* str);
static boolean putNoWrap(const SysString& str);
static boolean broadcast(const unichar* str);
static boolean broadcast(const SysString& str);
static boolean increaseIndention();
static boolean decreaseIndention();
static boolean setLineWrap(long num_cols);
static long getLineLength();
static long getLineWrap();
~Console();
Console();
Console(const Console& arg);
static boolean push(File& arg);
static boolean pop(File& arg);
#include <Console.h> int main() { // set the line wrap and output a message // Console::setLineWrap(50); Console::put(L"Start"); // increase the indentation and output a message // Console::increaseIndention(); Console::put(L"after indentation"); // set it back to no indention and output a message // Console::decreaseIndention(); Console::put(L"End"); // exit gracefully // Integral::exit(); }