OSVR Framework (Internal Development Docs)  0.6-1962-g59773924
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
osvr::common::CorrelatedStringMap Class Reference

#include <osvr/Common/RegisteredStringMap.h>

Public Member Functions

util::StringID getStringID (std::string const &str)
 
std::string getStringFromId (util::StringID id) const
 
util::StringID convertPeerToLocalID (util::PeerStringID peerID) const
 
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

Definition at line 73 of file RegisteredStringMap.h.

Member Function Documentation

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

retrieve the ID for the current name or register new ID and return that

Definition at line 82 of file RegisteredStringMap.cpp.

std::string osvr::common::CorrelatedStringMap::getStringFromId ( util::StringID  id) const

retrieve the name of the string given the ID returns empty string if nothing found

Definition at line 86 of file RegisteredStringMap.cpp.

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

Definition at line 91 of file RegisteredStringMap.cpp.


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