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

#include <DMX.h>

Collaboration diagram for kvpp::DMXAttribute:

Public Member Functions

bool isInvalid () const
 Check if the given attribute is invalid.
 operator bool () const
std::string_view getKey () const
void setKey (std::string key_)
DMXValue::ID getValueType () const
bool isValueArray () const
const DMXValue::GenericgetValue () const
template<typename T>
getValue () const
std::string getValueString () const
void setValue (DMXValue::Generic value_)
 Set the value associated with the attribute.
DMXAttributeoperator= (DMXValue::Generic value_)
 Set the value associated with the attribute.

Protected Member Functions

 DMXAttribute ()=default

Protected Attributes

std::string key
DMXValue::Generic value

Friends

class DMXElement
class DMX

Detailed Description

Definition at line 544 of file DMX.h.

Constructor & Destructor Documentation

◆ DMXAttribute()

kvpp::DMXAttribute::DMXAttribute ( )
protecteddefault

Member Function Documentation

◆ getKey()

std::string_view DMXAttribute::getKey ( ) const
nodiscard

Definition at line 69 of file DMX.cpp.

◆ getValue() [1/2]

const DMXValue::Generic & DMXAttribute::getValue ( ) const
nodiscard

Definition at line 85 of file DMX.cpp.

◆ getValue() [2/2]

template<typename T>
T kvpp::DMXAttribute::getValue ( ) const
inlinenodiscard

Definition at line 565 of file DMX.h.

◆ getValueString()

std::string DMXAttribute::getValueString ( ) const
nodiscard

Definition at line 89 of file DMX.cpp.

◆ getValueType()

DMXValue::ID DMXAttribute::getValueType ( ) const
nodiscard

Definition at line 77 of file DMX.cpp.

◆ isInvalid()

bool DMXAttribute::isInvalid ( ) const
nodiscard

Check if the given attribute is invalid.

Definition at line 61 of file DMX.cpp.

◆ isValueArray()

bool DMXAttribute::isValueArray ( ) const
nodiscard

Definition at line 81 of file DMX.cpp.

◆ operator bool()

DMXAttribute::operator bool ( ) const
explicitnodiscard

Definition at line 65 of file DMX.cpp.

◆ operator=()

DMXAttribute & DMXAttribute::operator= ( DMXValue::Generic value_)

Set the value associated with the attribute.

Definition at line 347 of file DMX.cpp.

◆ setKey()

void DMXAttribute::setKey ( std::string key_)

Definition at line 73 of file DMX.cpp.

◆ setValue()

void DMXAttribute::setValue ( DMXValue::Generic value_)

Set the value associated with the attribute.

Definition at line 343 of file DMX.cpp.

◆ DMX

friend class DMX
friend

Definition at line 546 of file DMX.h.

◆ DMXElement

friend class DMXElement
friend

Definition at line 545 of file DMX.h.

Member Data Documentation

◆ key

std::string kvpp::DMXAttribute::key
protected

Definition at line 580 of file DMX.h.

◆ value

DMXValue::Generic kvpp::DMXAttribute::value
protected

Definition at line 581 of file DMX.h.


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