Changes between Version 1 and Version 2 of HaikuBook/LegacyNetworkKit/BNetDebug


Ignore:
Timestamp:
Nov 25, 2012, 2:46:11 PM (12 years ago)
Author:
nielx
Comment:

Write documentation for BNetDebug

Legend:

Unmodified
Added
Removed
Modified
  • TabularUnified HaikuBook/LegacyNetworkKit/BNetDebug

    v1 v2  
    11[[ApiClass(name=BNetDebug,base=,derived=)]]
    2 No brief description
     2Collection of convenience methods for debugging network operations.
     3
     4The static members of this class can be used to print various messages to the standard output.
     5
     6Debugging can be turned on and off by using the [[ApiLinker(Enable())]] method. This way you don't have to remove the debugging statements in production code.
     7
     8By default, debugging is turned off.
     9
    310
    411== Static Functions ==
    512
    6 [[ApiDeclareMethod(id=class_b_net_debug_1acf56301eead85a073062d2847c98b753, type=void, name=Enable, argsstring=(bool), const=no, virtual=non-virtual, params=[{"defval": ""\, "type": "bool"\, "name": ""}])]]
    7 Undocumented
     13[[ApiDeclareMethod(id=class_b_net_debug_1acf56301eead85a073062d2847c98b753, type=void, name=Enable, argsstring=(bool), const=no, virtual=non-virtual, params=[{"defval": ""\, "type": "bool"\, "name": "enable"}])]]
     14Enable or disable debugging.
     15
     16Use this method to actually print the debug messages to the command line.
    817
    918 Parameters::
    10 ||''''||Undocumented parameter. ||
     19||''enable''||Pass `true` to enable debugging, or `false` to disable it. ||
    1120
    1221[[ApiDeclareMethod(id=class_b_net_debug_1af30236ab764d9f0dffeeb7e42ed10da0, type=bool, name=IsEnabled, argsstring=(), const=no, virtual=non-virtual, params=[])]]
    13 Undocumented
     22Check if debugging is enabled.
    1423
    1524 Returns::
    16     Undocumented return value
     25    `true` if debugging is disabled, or `false` if it is not.
    1726
    1827[[ApiDeclareMethod(id=class_b_net_debug_1acb183ec5263c5fec50878514108e4430, type=void, name=Print, argsstring=(const char *msg), const=no, virtual=non-virtual, params=[{"defval": ""\, "type": "const char *"\, "name": "msg"}])]]
    19 Undocumented
     28Print a pre-formatted message to the standard error output.
     29
     30Output will be of the format:
     31{{{
     32debug: <msg>\n
     33}}}
     34
     35Note:
     36 * there will always be a trailing newline, whether there is one in the original message or not.
     37 * if debugging is not enabled, the message will not be printed.
    2038
    2139 Parameters::
    22 ||''msg''||Undocumented parameter. ||
     40||''msg''||The message that is printed to `stderr`. ||
    2341
    2442[[ApiDeclareMethod(id=class_b_net_debug_1a4b01704ebf8aba2d1d5b60981dfa9c0b, type=void, name=Dump, argsstring=(const char *data&#44; size_t size&#44; const char *title), const=no, virtual=non-virtual, params=[{"defval": ""\, "type": "const char *"\, "name": "data"}\, {"defval": ""\, "type": "size_t"\, "name": "size"}\, {"defval": ""\, "type": "const char *"\, "name": "title"}])]]
    25 Undocumented
     43Dump a set of raw data into hex and ASCII to the standard error output.
     44
     45Note:
     46 * There will always be a trailing newline, whether there is one in the original message or not.
     47 * If debugging is not enabled, the message will not be printed.
     48
    2649
    2750 Parameters::
    28 ||''data''||Undocumented parameter. ||
    29 ||''size''||Undocumented parameter. ||
    30 ||''title''||Undocumented parameter. ||
     51||''data''||A pointer to the data buffer. If `NULL` is passed then the output is undefined! ||
     52||''size''||The number of bytes to print from the buffer. ||
     53||''title''||The title that should be printed in the output. If `NULL` is passed then the output is undefined! ||