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

Singleton class that keeps track of all known VRPN connections and makes sure they're deleted on shutdown. 更多...

#include <vrpn_Connection.h>

Public 成员函数

vrpn_ConnectiongetByName (const char *name)
 
void addConnection (vrpn_Connection *, const char *name)
 
void deleteConnection (vrpn_Connection *)
 

静态 Public 成员函数

static vrpn_ConnectionManagerinstance (void)
 The only way to get access to an instance of this class. Guarantees that there is only one, global object. Also guarantees that it will be constructed the first time this function is called, and (hopefully?) destructed when the program terminates.
 

详细描述

Singleton class that keeps track of all known VRPN connections and makes sure they're deleted on shutdown.

We make it static to guarantee that the destructor is called on program close so that the destructors of all the vrpn_Connections that have been allocated are called so that all open logs are flushed to disk. Each connection should add itself to this list in its constructor and should remove itself from this list in its destructor.

成员函数说明

◆ addConnection()

void addConnection ( vrpn_Connection * ,
const char * name )

NB implementation is not particularly efficient; we expect to have O(10) connections, not O(1000).

◆ getByName()

vrpn_Connection * getByName ( const char * name)

Searches through d_kcList but NOT d_anonList (Connections constructed with no name)

◆ instance()

static vrpn_ConnectionManager & instance ( void )
static

The only way to get access to an instance of this class. Guarantees that there is only one, global object. Also guarantees that it will be constructed the first time this function is called, and (hopefully?) destructed when the program terminates.


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