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

#include <osvr/Common/RegisteredStringMap.h>

Public Member Functions

util::StringID getStringID (std::string const &str)
 
std::string getStringFromId (util::StringID id) const
 
bool isModified () const
 Has a new entry been added since the flag was last cleared?
 
void clearModifiedFlag ()
 Clear the modified flag.
 
void printCurrentMap ()
 helper function to print size and contents of the map
 
std::vector< std::string > getEntries () const
 

Protected Attributes

std::vector< std::string > m_regEntries
 
bool m_modified = false
 special flag that gets switched whenever new element is inserted;
 

Detailed Description

Centralize a string registry. Basically, the server side, and part of the client side internals.

Definition at line 43 of file RegisteredStringMap.h.

Member Function Documentation

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

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

Definition at line 49 of file RegisteredStringMap.cpp.

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

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

Todo:
should we throw here?

Definition at line 64 of file RegisteredStringMap.cpp.


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