LOOS 4.1.0
The Lightweight Object Oriented Structural analysis library/toolkit
Loading...
Searching...
No Matches
Public Member Functions | List of all members
loos::UniqueStrings Class Reference

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...
 

Detailed Description

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...

Member Function Documentation

◆ find()

int loos::UniqueStrings::find ( const std::string & s)
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.


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