OSVR-Core
Public Types | Public Member Functions | Protected Member Functions | List of all members
OSVR_ClientContextObject Struct Referenceabstract
Inheritance diagram for OSVR_ClientContextObject:
osvr::client::AnalysisClientContext osvr::client::JointClientContext osvr::client::PureClientContext

Public Types

typedef std::vector< osvr::common::ClientInterfacePtrInterfaceList
 

Public Member Functions

virtual OSVR_COMMON_EXPORT ~OSVR_ClientContextObject ()
 Destructor.
 
OSVR_COMMON_EXPORT void update ()
 System-wide update method.
 
std::string const & getAppId () const
 Accessor for app ID.
 
OSVR_COMMON_EXPORT osvr::common::ClientInterfacePtr getInterface (const char path[])
 Creates an interface object for the given path. More...
 
OSVR_COMMON_EXPORT osvr::common::ClientInterfacePtr releaseInterface (osvr::common::ClientInterface *iface)
 Searches through this context to determine if the passed interface object has been retained, and if so, ownership is transferred to the caller. More...
 
InterfaceList const & getInterfaces () const
 
OSVR_COMMON_EXPORT void sendRoute (std::string const &route)
 Sends a JSON route/transform object to the server.
 
OSVR_COMMON_EXPORT std::string getStringParameter (std::string const &path) const
 Gets a string parameter value.
 
OSVR_COMMON_EXPORT osvr::common::PathTree const & getPathTree () const
 Accessor for the path tree.
 
template<typename T >
void * acquireObject (T obj)
 Pass (smart-pointer) ownership of some object to the client context. More...
 
OSVR_COMMON_EXPORT bool releaseObject (void *obj)
 Frees some object whose lifetime is controlled by the client context. More...
 
OSVR_COMMON_EXPORT osvr::common::Transform const & getRoomToWorldTransform () const
 Gets the transform from room space to world space.
 
OSVR_COMMON_EXPORT void setRoomToWorldTransform (osvr::common::Transform const &xform)
 Sets the transform from room space to world space.
 
OSVR_COMMON_EXPORT osvr::common::ClientContextDeleter getDeleter () const
 Returns the specialized deleter for this object.
 
OSVR_COMMON_EXPORT bool getStatus () const
 Returns true if we are started up and fully connected (path tree received, etc.)
 
OSVR_COMMON_EXPORT void log (osvr::util::log::LogLevel severity, const char *message)
 Logs a message from the client.
 
OSVR_COMMON_EXPORT osvr::util::log::LoggerPtr const & logger () const
 Provides logger access for related internal classes.
 

Protected Member Functions

OSVR_COMMON_EXPORT OSVR_ClientContextObject (const char appId[], osvr::common::ClientContextDeleter del)
 Constructor for derived class use only.
 
OSVR_COMMON_EXPORT OSVR_ClientContextObject (const char appId[], osvr::common::ClientInterfaceFactory const &interfaceFactory, osvr::common::ClientContextDeleter del)
 Constructor for derived class use only.
 

Member Function Documentation

§ acquireObject()

template<typename T >
void* OSVR_ClientContextObject::acquireObject ( T  obj)
inline

Pass (smart-pointer) ownership of some object to the client context.

§ getInterface()

ClientInterfacePtr OSVR_ClientContextObject::getInterface ( const char  path[])

Creates an interface object for the given path.

The context retains shared ownership.

Parameters
pathPath to a resource. Should be absolute.

§ releaseInterface()

ClientInterfacePtr OSVR_ClientContextObject::releaseInterface ( osvr::common::ClientInterface iface)

Searches through this context to determine if the passed interface object has been retained, and if so, ownership is transferred to the caller.

Parameters
ifaceraw interface pointer (from C, usually)
Returns
Pointer owning the submitted interface object, or an empty pointer if NULL passed or not found.

§ releaseObject()

bool OSVR_ClientContextObject::releaseObject ( void *  obj)

Frees some object whose lifetime is controlled by the client context.

Returns
true if the object was found and released.

The documentation for this struct was generated from the following files: