RflySimSDK v3.05
RflySimSDK说明文档
载入中...
搜索中...
未找到
vrpn_TextPrinter类 参考

#include <vrpn_BaseClass.h>

+ vrpn_TextPrinter 的协作图:

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_Entryd_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.

成员函数说明

◆ add_object()

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.

◆ remove_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).

◆ set_min_level_to_print()

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.

◆ set_ostream_to_use()

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.

◆ text_message_handler()

static int VRPN_CALLBACK text_message_handler ( void * userdata,
vrpn_HANDLERPARAM p )
staticprotected

Handles the text messages that come from the connections for objects we are watching.

类成员变量说明

◆ d_first_watched_object

vrpn_TextPrinter_Watch_Entry* d_first_watched_object
protected

Head of list of objects being watched

◆ d_level_to_print

vrpn_uint32 d_level_to_print
protected

Minimum level to print

◆ d_ostream

FILE* d_ostream
protected

Output stream to use

◆ d_semaphore

vrpn_Semaphore d_semaphore
protected

Mutex to ensure thread safety;

◆ d_severity_to_print

vrpn_TEXT_SEVERITY d_severity_to_print
protected

Minimum severity to print


该类的文档由以下文件生成: