![]() |
RflySimSDK v3.05
RflySimSDK说明文档
|
Singleton class that keeps track of all known VRPN connections and makes sure they're deleted on shutdown. 更多...
#include <vrpn_Connection.h>
Public 成员函数 | |
vrpn_Connection * | getByName (const char *name) |
void | addConnection (vrpn_Connection *, const char *name) |
void | deleteConnection (vrpn_Connection *) |
静态 Public 成员函数 | |
static vrpn_ConnectionManager & | instance (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.
void addConnection | ( | vrpn_Connection * | , |
const char * | name ) |
NB implementation is not particularly efficient; we expect to have O(10) connections, not O(1000).
vrpn_Connection * getByName | ( | const char * | name | ) |
Searches through d_kcList but NOT d_anonList (Connections constructed with no name)
|
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.