?? cmdl_01.cc
字號:
// file: $isip/class/shell/CommandLine/cmdl_01.cc// version: $Id: cmdl_01.cc,v 1.7 2001/01/23 23:43:04 peng Exp $//// isip include files// #include "CommandLine.h"#include <Console.h>// method: debug//// arguments:// const unichar* msg: (input) message to print//// return: a boolean value indicating status//// this is the debug method and dumps the contents of an object to console//boolean CommandLine::debug(const unichar* msg_a) const { // declare local variables // String value; String param; String output; // display the program name // output.debugStr(name(), msg_a, L"prog_name_d", prog_name_d); Console::put(output); // display the various objects holding argument information // output.debugStr(name(), msg_a, L"options_d:"); Console::put(output); Console::increaseIndention(); options_d.debug(msg_a); Console::decreaseIndention(); output.debugStr(name(), msg_a, L"types_d:"); Console::put(output); Console::increaseIndention(); types_d.debug(msg_a); Console::decreaseIndention(); output.debugStr(name(), msg_a, L"used_d:"); Console::put(output); Console::increaseIndention(); used_d.debug(msg_a); Console::decreaseIndention(); output.debugStr(name(), msg_a, L"args_d:"); Console::put(output); Console::increaseIndention(); args_d.debug(msg_a); Console::decreaseIndention(); // display message-related variables // value.assign(help_flag_d); output.debugStr(name(), msg_a, L"help_flag_d", value); Console::put(output); value.assign(usage_flag_d); output.debugStr(name(), msg_a, L"usage_flag_d", value); Console::put(output); value.assign(version_flag_d); output.debugStr(name(), msg_a, L"version_flag_d", value); Console::put(output); value.assign(echo_cmdl_d); output.debugStr(name(), msg_a, L"echo_cmdl_d", value); Console::put(output); output.debugStr(name(), msg_a, L"help_msg_d", help_msg_d); Console::put(output); output.debugStr(name(), msg_a, L"usage_msg_d", usage_msg_d); Console::put(output); output.debugStr(name(), msg_a, L"version_msg_d", version_msg_d); Console::put(output); output.debugStr(name(), msg_a, L"actual_cmdl_d", actual_cmdl_d); Console::put(output); // display an Sdb object // if (debug_level_d >= Integral::DETAILED) { output.debugStr(name(), msg_a, L"sdb_d:"); Console::put(output); Console::increaseIndention(); if (sdb_d != (Sdb*)NULL) { sdb_d->debug(msg_a); } Console::decreaseIndention(); } // debug the objects // output.debugStr(name(), msg_a, L"objects:"); Console::put(output); Console::increaseIndention(); for (long i = 0; i < options_d.length(); i++) { param.assign(L"objects_d["); value.assign(i); param.concat(value); param.concat(L"]"); value.assign(objects_d[i]); output.debugStr(name(), msg_a, (unichar*)param, value); Console::put(output); } Console::decreaseIndention(); // display the internal flags // value.assign(usage_printed_d); output.debugStr(name(), msg_a, L"usage_printed_d", value); Console::put(output); value.assign(test_mode_d); output.debugStr(name(), msg_a, L"test_mode_d", value); Console::put(output); // exit gracefully // return true;}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -