emilib
Public Member Functions | List of all members
emilib::StringInterner Class Reference

#include <string_interning.hpp>

Public Member Functions

const char * intern (const std::string &str)
 Not thread-safe. The allocated string will be freed when this StringInterner dies.
 

Detailed Description

The StringInterner will allocate exactly one string for any unique input. This means that calling intern() twice with the same characters will result in the same pointer.

This is great for two things:


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