OSVR-Core
Public Member Functions | List of all members
osvr::common::CorrelatedStringMap Class Reference

This is like a RegisteredStringMap, except it also knows that some peer also has a string map, likely with some of the same strings, but with different ids. More...

#include <RegisteredStringMap.h>

Public Member Functions

OSVR_COMMON_EXPORT util::StringID registerStringID (std::string const &str)
 register new ID with given string and returns StringID. More...
 
OSVR_COMMON_EXPORT util::StringID getStringID (std::string const &str) const
 retrieve the StringID associated with the given string returns an empty util::StringID if it's not found
 
OSVR_COMMON_EXPORT std::string getStringFromId (util::StringID id) const
 retrieve the name of the string given the ID returns empty string if nothing found
 
OSVR_COMMON_EXPORT util::StringID convertPeerToLocalID (util::PeerStringID peerID) const
 This is the extra method used by clients, to convert from server's ids. More...
 
OSVR_COMMON_EXPORT void setupPeerMappings (std::vector< std::string > const &peerEntries)
 This populates the data structure used by the above method.
 

Detailed Description

This is like a RegisteredStringMap, except it also knows that some peer also has a string map, likely with some of the same strings, but with different ids.

Used in reconciliation between server and client since they are separate entities

Member Function Documentation

§ convertPeerToLocalID()

util::StringID osvr::common::CorrelatedStringMap::convertPeerToLocalID ( util::PeerStringID  peerID) const

This is the extra method used by clients, to convert from server's ids.

Will return NULL if peerID to Local ID mapping doesn't exist

§ registerStringID()

util::StringID osvr::common::CorrelatedStringMap::registerStringID ( std::string const &  str)

register new ID with given string and returns StringID.

If string already exists, then it returns existing StringID


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