Client context object: Create and keep one in your application.
More...
#include <Context_decl.h>
Client context object: Create and keep one in your application.
Handles lifetime management and provides access to ClientKit functionality.
§ ClientContext() [1/3]
osvr::clientkit::ClientContext::ClientContext |
( |
const char |
applicationIdentifier[], |
|
|
uint32_t |
flags = 0u |
|
) |
| |
|
inline |
Initialize the library.
- Parameters
-
applicationIdentifier | A string identifying your application. Reverse DNS format strongly suggested. |
flags | initialization options (reserved, optional) |
§ ClientContext() [2/3]
osvr::clientkit::ClientContext::ClientContext |
( |
const char |
applicationIdentifier[], |
|
|
const char |
host[], |
|
|
uint32_t |
flags = 0u |
|
) |
| |
|
inline |
Initialize the library.
- Parameters
-
applicationIdentifier | A string identifying your application. |
host | Remote server to connect to Reverse DNS format strongly suggested. |
flags | initialization options (reserved, optional) |
§ ClientContext() [3/3]
Initialize the context with an existing context.
- Note
- The ClientContext class will take ownership of the context.
§ checkStatus()
bool osvr::clientkit::ClientContext::checkStatus |
( |
| ) |
const |
|
inline |
Checks to see if the client context is properly and fully started up.
If this returns false, there may not be a server running, or it may be taking longer than usual to connect. The result will not change from false to true without calling update() - consider a loop.
§ free()
void osvr::clientkit::ClientContext::free |
( |
Interface & |
iface | ) |
|
|
inline |
Frees an interface before it would normally be freed (at context close).
§ getInterface()
Interface osvr::clientkit::ClientContext::getInterface |
( |
const std::string & |
path | ) |
|
|
inline |
Get the interface associated with the given path.
- Parameters
-
- Returns
- The interface object.
§ getStringParameter()
std::string osvr::clientkit::ClientContext::getStringParameter |
( |
const std::string & |
path | ) |
|
|
inline |
Get a string parameter value from the given path.
- Parameters
-
- Returns
- parameter value, or empty string if parameter does not exist or is not a string.
§ log()
void osvr::clientkit::ClientContext::log |
( |
OSVR_LogLevel |
severity, |
|
|
const char * |
message |
|
) |
| |
|
inline |
Log a message to the plugin-specific channel.
- Parameters
-
severity | The severity of the log message. |
message | The message to be logged. |
§ update()
void osvr::clientkit::ClientContext::update |
( |
| ) |
|
|
inline |
Updates the state of the context - call regularly in your mainloop.
The documentation for this class was generated from the following files: