Changes between Version 1 and Version 2 of HaikuBook/LegacyNetworkKit/BNetDebug
- Timestamp:
- Nov 25, 2012, 2:46:11 PM (12 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
TabularUnified HaikuBook/LegacyNetworkKit/BNetDebug
v1 v2 1 1 [[ApiClass(name=BNetDebug,base=,derived=)]] 2 No brief description 2 Collection of convenience methods for debugging network operations. 3 4 The static members of this class can be used to print various messages to the standard output. 5 6 Debugging 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 8 By default, debugging is turned off. 9 3 10 4 11 == Static Functions == 5 12 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"}])]] 14 Enable or disable debugging. 15 16 Use this method to actually print the debug messages to the command line. 8 17 9 18 Parameters:: 10 ||'' ''||Undocumented parameter. ||19 ||''enable''||Pass `true` to enable debugging, or `false` to disable it. || 11 20 12 21 [[ApiDeclareMethod(id=class_b_net_debug_1af30236ab764d9f0dffeeb7e42ed10da0, type=bool, name=IsEnabled, argsstring=(), const=no, virtual=non-virtual, params=[])]] 13 Undocumented 22 Check if debugging is enabled. 14 23 15 24 Returns:: 16 Undocumented return value25 `true` if debugging is disabled, or `false` if it is not. 17 26 18 27 [[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 28 Print a pre-formatted message to the standard error output. 29 30 Output will be of the format: 31 {{{ 32 debug: <msg>\n 33 }}} 34 35 Note: 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. 20 38 21 39 Parameters:: 22 ||''msg''|| Undocumented parameter. ||40 ||''msg''||The message that is printed to `stderr`. || 23 41 24 42 [[ApiDeclareMethod(id=class_b_net_debug_1a4b01704ebf8aba2d1d5b60981dfa9c0b, type=void, name=Dump, argsstring=(const char *data, size_t size, 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 43 Dump a set of raw data into hex and ASCII to the standard error output. 44 45 Note: 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 26 49 27 50 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! ||