Gromacs
2024.3
|
#include <gromacs/topology/symtab.h>
Builds a memory efficient storage for strings of characters.
Allows storing strings of characters with unique entries.
Public Member Functions | |
StringTableEntry | addString (const std::string &theString) |
Place new unique string in storage object. More... | |
int | findEntryByName (const std::string &name) const |
Find matching entry in storage by name as string. | |
StringTable | build () |
Build the StringTable from the internal map of strings. More... | |
StringTableEntry StringTableBuilder::addString | ( | const std::string & | theString | ) |
Place new unique string in storage object.
Enters new string into the underlying storage or recovers existing entry.
[in] | theString | New string to enter. |
StringTable StringTableBuilder::build | ( | ) |
Build the StringTable from the internal map of strings.
The unique indices returned from addString() can be used to index into the returned StringTable. Clears the temporary storage so that the StringTableBuilder can be re-used to build a distinct StringTable.