SourcePP
Several modern C++20 libraries for sanely parsing Valve's formats.
Loading...
Searching...
No Matches
bsppp::BSPEntityKeyValues::Element Class Reference

#include <EntityLump.h>

Collaboration diagram for bsppp::BSPEntityKeyValues::Element:

Public Member Functions

std::string_view getKey () const
 Get the key associated with the element.
 
void setKey (std::string_view key_)
 Set the key associated with the element.
 
std::string_view getValue () const
 Get the value associated with the element.
 
template<BSPEntityKeyValueType V>
getValue () const
 Get the value associated with the element as the given type.
 
template<BSPEntityKeyValueType V>
void setValue (V value_)
 Set the value associated with the element.
 
template<BSPEntityKeyValueType V>
Elementoperator= (V value_)
 Set the value associated with the element.
 
bool isInvalid () const
 Check if the given element is invalid.
 

Protected Member Functions

 Element ()=default
 

Static Protected Member Functions

static const ElementgetInvalid ()
 

Protected Attributes

std::string key
 
std::string value
 

Friends

class BSPEntityKeyValues
 

Detailed Description

Definition at line 23 of file EntityLump.h.

Constructor & Destructor Documentation

◆ Element()

bsppp::BSPEntityKeyValues::Element::Element ( )
protecteddefault

Member Function Documentation

◆ getInvalid()

const BSPEntityKeyValues::Element & BSPEntityKeyValues::Element::getInvalid ( )
staticprotected

Definition at line 22 of file EntityLump.cpp.

◆ getKey()

std::string_view BSPEntityKeyValues::Element::getKey ( ) const

Get the key associated with the element.

Definition at line 6 of file EntityLump.cpp.

◆ getValue() [1/2]

std::string_view BSPEntityKeyValues::Element::getValue ( ) const

Get the value associated with the element.

Definition at line 14 of file EntityLump.cpp.

◆ getValue() [2/2]

template<BSPEntityKeyValueType V>
V bsppp::BSPEntityKeyValues::Element::getValue ( ) const
inline

Get the value associated with the element as the given type.

Definition at line 38 of file EntityLump.h.

◆ isInvalid()

bool BSPEntityKeyValues::Element::isInvalid ( ) const

Check if the given element is invalid.

Definition at line 18 of file EntityLump.cpp.

◆ operator=()

template<BSPEntityKeyValueType V>
Element & bsppp::BSPEntityKeyValues::Element::operator= ( value_)
inline

Set the value associated with the element.

Definition at line 65 of file EntityLump.h.

◆ setKey()

void BSPEntityKeyValues::Element::setKey ( std::string_view  key_)

Set the key associated with the element.

Definition at line 10 of file EntityLump.cpp.

◆ setValue()

template<BSPEntityKeyValueType V>
void bsppp::BSPEntityKeyValues::Element::setValue ( value_)
inline

Set the value associated with the element.

Definition at line 55 of file EntityLump.h.

Friends And Related Function Documentation

◆ BSPEntityKeyValues

friend class BSPEntityKeyValues
friend

Definition at line 24 of file EntityLump.h.

Member Data Documentation

◆ key

std::string bsppp::BSPEntityKeyValues::Element::key
protected

Definition at line 78 of file EntityLump.h.

◆ value

std::string bsppp::BSPEntityKeyValues::Element::value
protected

Definition at line 79 of file EntityLump.h.


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