![]() |
SourcePP
Several modern C++20 libraries for sanely parsing Valve's formats.
|
#include <EntityLump.h>

Classes | |
| class | Element |
Public Member Functions | |
| BSPEntityKeyValues ()=default | |
| bool | hasChild (std::string_view childKey) const |
| Check if this entity has one or more keyvalues with the given name. | |
| uint64_t | getKeyValuesCount () const |
| Get the number of keyvalues. | |
| uint64_t | getKeyValuesCount (std::string_view childKey) const |
| Get the number of keyvalues with the given key. | |
| const std::vector< Element > & | getKeyValues () const |
| Get the keyvalues of the entity. | |
| const Element & | operator[] (unsigned int n) const |
| Get the keyvalue of the entity at the given index. | |
| Element & | operator[] (unsigned int n) |
| Get the keyvalue of the entity at the given index. | |
| const Element & | operator[] (std::string_view childKey) const |
| Get the first keyvalue of the entity with the given key. | |
| Element & | operator[] (std::string_view childKey) |
| Get the first keyvalue of the entity with the given key, or create a new keyvalue if it doesn't exist. | |
| const Element & | operator() (std::string_view childKey) const |
| Get the first keyvalue of the entity with the given key. | |
| Element & | operator() (std::string_view childKey) |
| Get the first keyvalue of the entity with the given key, or create a new keyvalue if it doesn't exist. | |
| const Element & | operator() (std::string_view childKey, unsigned int n) const |
| Get the nth keyvalue of the entity with the given key. | |
| Element & | operator() (std::string_view childKey, unsigned int n) |
| Get the nth keyvalue of the entity with the given key, or create a new entity if it doesn't exist. | |
| template<BSPEntityKeyValueType V = std::string_view> | |
| Element & | addKeyValue (std::string_view key_, V value_={}) |
| Add a new keyvalue to the entity. | |
| void | removeKeyValue (std::string_view childKey, int n=-1) |
| Remove a keyvalue from the entity. -1 means all keyvalues with the given key. | |
| std::string | bake (bool useEscapes) const |
Protected Attributes | |
| std::vector< Element > | keyvalues |
Definition at line 21 of file EntityLump.h.
|
default |
|
inline |
Add a new keyvalue to the entity.
Definition at line 122 of file EntityLump.h.
|
nodiscard |
Definition at line 124 of file EntityLump.cpp.
|
nodiscard |
Get the keyvalues of the entity.
Definition at line 45 of file EntityLump.cpp.
|
nodiscard |
Get the number of keyvalues.
Definition at line 31 of file EntityLump.cpp.
|
nodiscard |
Get the number of keyvalues with the given key.
Definition at line 35 of file EntityLump.cpp.
|
nodiscard |
Check if this entity has one or more keyvalues with the given name.
Definition at line 27 of file EntityLump.cpp.
|
nodiscard |
Get the first keyvalue of the entity with the given key, or create a new keyvalue if it doesn't exist.
Definition at line 74 of file EntityLump.cpp.
|
nodiscard |
Get the first keyvalue of the entity with the given key.
Definition at line 65 of file EntityLump.cpp.
|
nodiscard |
Get the nth keyvalue of the entity with the given key, or create a new entity if it doesn't exist.
Definition at line 96 of file EntityLump.cpp.
|
nodiscard |
Get the nth keyvalue of the entity with the given key.
Definition at line 83 of file EntityLump.cpp.
|
nodiscard |
Get the first keyvalue of the entity with the given key, or create a new keyvalue if it doesn't exist.
Definition at line 61 of file EntityLump.cpp.
|
nodiscard |
Get the first keyvalue of the entity with the given key.
Definition at line 57 of file EntityLump.cpp.
|
nodiscard |
Get the keyvalue of the entity at the given index.
Definition at line 53 of file EntityLump.cpp.
|
nodiscard |
Get the keyvalue of the entity at the given index.
Definition at line 49 of file EntityLump.cpp.
| void BSPEntityKeyValues::removeKeyValue | ( | std::string_view | childKey, |
| int | n = -1 ) |
Remove a keyvalue from the entity. -1 means all keyvalues with the given key.
Definition at line 109 of file EntityLump.cpp.
|
protected |
Definition at line 136 of file EntityLump.h.