![]() |
RflySimSDK v3.05
RflySimSDK说明文档
|
#include <vrpn_BaseClass.h>
类 | |
class | vrpn_TextPrinter_Watch_Entry |
Structure to hold the objects that are being watched. 更多... | |
Public 成员函数 | |
int | add_object (vrpn_BaseClass *o) |
void | remove_object (vrpn_BaseClass *o) |
void | set_min_level_to_print (vrpn_TEXT_SEVERITY severity, vrpn_uint32 level=0) |
void | set_ostream_to_use (FILE *o) |
静态 Protected 成员函数 | |
static int VRPN_CALLBACK | text_message_handler (void *userdata, vrpn_HANDLERPARAM p) |
Protected 属性 | |
vrpn_Semaphore | d_semaphore |
Mutex to ensure thread safety; | |
vrpn_TextPrinter_Watch_Entry * | d_first_watched_object |
Head of list of objects being watched | |
FILE * | d_ostream |
Output stream to use | |
vrpn_TEXT_SEVERITY | d_severity_to_print |
Minimum severity to print | |
vrpn_uint32 | d_level_to_print |
Minimum level to print | |
Class that handles text/warning/error printing for all objects in the system.
int add_object | ( | vrpn_BaseClass * | o | ) |
Adds an object to the list of watched objects (multiple registration of the same object will result in only one printing for each message from the object). Returns 0 on success and -1 on failure. YOU MUST REMOVE any objects from a vrpn_TextPrinter that you create before destroying the printer if any connection objects survive, otherwise they may call a callback function on the destroyed object.
void remove_object | ( | vrpn_BaseClass * | o | ) |
Remove an object from the list of watched objects (multiple deletions of the object will not cause any error condition; deletions of unregistered objects will not cause errors).
void set_min_level_to_print | ( | vrpn_TEXT_SEVERITY | severity, |
vrpn_uint32 | level = 0 ) |
Change the level of printing for the object (sets the minimum level to print). Default is Warnings and Errors of all levels.
void set_ostream_to_use | ( | FILE * | o | ) |
Change the ostream that will be used to print messages. Setting a NULL ostream results in no printing.
|
staticprotected |
Handles the text messages that come from the connections for objects we are watching.
|
protected |
Head of list of objects being watched
|
protected |
Minimum level to print
|
protected |
Output stream to use
|
protected |
Mutex to ensure thread safety;
|
protected |
Minimum severity to print