Gromacs
2024.3
|
#include <gromacs/topology/symtab.h>
Helper class to access members in StringTable.
This class is a wrapper around a string reference to access the actual entry in the table, as well as an index used for serializing the datastructure.
This also provides efficient comparison calls between different entries.
Public Member Functions | |
StringTableEntry (const StringTableEntry &)=default | |
Copy construct. | |
StringTableEntry (StringTableEntry &&) noexcept=default | |
Move construct. | |
StringTableEntry & | operator= (const StringTableEntry &)=default |
Copy assign. | |
StringTableEntry & | operator= (StringTableEntry &&)=default |
Move assign. | |
bool | operator== (const StringTableEntry &o) const |
Compare entries by indices. Same string should always have same index. | |
bool | operator!= (const StringTableEntry &o) const |
Unequal comparison. | |
const std::string & | operator* () const |
Access to underlying view. | |
const std::string * | operator-> () const |
Access to underlying view. | |
void | serialize (gmx::ISerializer *serializer) const |
Serialize index. | |
Friends | |
class | StringTableBuilder |
class | StringTable |
StringTableEntry | readStringTableEntry (gmx::ISerializer *serializer, const StringTable &table) |
De-serialize StringTableEntry using the index into the table . More... | |
|
friend |
De-serialize StringTableEntry using the index into the table
.
[in] | serializer | The object containing the serialized index. |
[in] | table | The storage object holding all strings. |