LOOS 4.1.0
The Lightweight Object Oriented Structural analysis library/toolkit
|
Class for uniquifying strings... More...
#include <UniqueStrings.hpp>
Public Member Functions | |
void | add (const std::string &s) |
Adds a string to the unique string list. | |
int | size (void) const |
Number of unique strings found... | |
__gnu_cxx::slist< std::string > | strings (void) const |
Returns the raw slist of strings... | |
int | find (const std::string &s) |
Checks to see if we've encountered this string before... | |
Class for uniquifying strings...
This class uses an slist and just does a linear search to see if we've already encountered the passed string before. This probably should be updated to use a faster method in the future...
|
inline |
Checks to see if we've encountered this string before...
Returns an index (a unique int) representing this string. If the string is not found, returns -1.