XJ music engine  1.9.6
In-game runtime engine for XJ music.
Public Member Functions | List of all members
XJ::ConfigObjectValue Class Referencefinal

#include <ConfigParser.h>

Inheritance diagram for XJ::ConfigObjectValue:
XJ::ConfigValue

Public Member Functions

unsigned long size () const
 
ConfigSingleValue atSingle (const std::string &index)
 
std::vector< ConfigSingleValueatList (const std::string &index)
 
void set (const std::string &key, const std::variant< ConfigSingleValue, std::vector< ConfigSingleValue >> &value)
 
std::map< std::string, std::variant< ConfigSingleValue, std::vector< ConfigSingleValue > > > asMapOfSingleOrList ()
 
std::map< std::string, std::variant< std::string, std::vector< std::string > > > asMapOfStringsOrListsOfStrings () const
 
bool operator== (const ConfigObjectValue &other) const
 
bool operator!= (const ConfigObjectValue &other) const
 
- Public Member Functions inherited from XJ::ConfigValue
virtual ~ConfigValue ()=default
 

Detailed Description

An object value in a HOCON configuration

Member Function Documentation

◆ asMapOfSingleOrList()

std::map< std::string, std::variant< ConfigSingleValue, std::vector< ConfigSingleValue > > > ConfigObjectValue::asMapOfSingleOrList ( )

Get the object as a map of strings to strings

Returns
The object as a map of strings to strings

◆ asMapOfStringsOrListsOfStrings()

std::map< std::string, std::variant< std::string, std::vector< std::string > > > ConfigObjectValue::asMapOfStringsOrListsOfStrings ( ) const

Get the object as a map of strings to strings

Returns
The object as a map of strings to strings

◆ atList()

std::vector< ConfigSingleValue > ConfigObjectValue::atList ( const std::string &  index)

Get a list of single values from the object

Parameters
indexat which to get the value
Returns
list of single values

◆ atSingle()

ConfigSingleValue ConfigObjectValue::atSingle ( const std::string &  index)

Get a single value from the object

Parameters
indexat which to get the value
Returns
single value

◆ operator!=()

bool ConfigObjectValue::operator!= ( const ConfigObjectValue other) const

Compare two ConfigObjectValue for inquality

Parameters
otherThe ConfigObjectValue to compare
Returns
true if inequal

◆ operator==()

bool ConfigObjectValue::operator== ( const ConfigObjectValue other) const

Compare two ConfigObjectValue for equality

Parameters
otherThe ConfigObjectValue to compare
Returns
true if equal

◆ set()

void ConfigObjectValue::set ( const std::string &  key,
const std::variant< ConfigSingleValue, std::vector< ConfigSingleValue >> &  value 
)

Set a value at a key in the object

Parameters
keyat which to set the value
valueThe value to set

◆ size()

unsigned long ConfigObjectValue::size ( ) const

Get the size of the object

Returns
The size of the object

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