XJ music engine  1.9.6
In-game runtime engine for XJ music.
Functions
ConfigParser.cpp File Reference
#include <cmath>
#include <map>
#include <sstream>
#include <string>
#include <variant>
#include <vector>
#include "xjmusic/util/ConfigParser.h"
#include "xjmusic/util/StringUtils.h"
#include "xjmusic/util/CsvUtils.h"

Functions

std::string parseString (const std::string &s)
 
ConfigSingleValue parseSingleValue (const std::string &value)
 
std::vector< ConfigSingleValueparseSimpleListValue (const std::string &s)
 
ConfigObjectValue parseObjectValue (const std::string &input)
 
ConfigListValue parseListValue (const std::string &s)
 
std::variant< ConfigSingleValue, ConfigObjectValue, ConfigListValueparseValue (const std::basic_string< char > &value)
 

Function Documentation

◆ parseListValue()

ConfigListValue parseListValue ( const std::string &  s)

Parse an array value

Parameters
sThe string to parse
Returns
The parsed array

◆ parseObjectValue()

ConfigObjectValue parseObjectValue ( const std::string &  input)

Parse a map value

Parameters
inputThe string to parse
Returns
The parsed map

◆ parseSimpleListValue()

std::vector<ConfigSingleValue> parseSimpleListValue ( const std::string &  s)

Parse an array value

Parameters
sThe string to parse
Returns
The parsed array

◆ parseSingleValue()

ConfigSingleValue parseSingleValue ( const std::string &  value)

Parse a single value, either an int, float, bool, or string

Parameters
valueThe value string to parse
Returns
The parsed value

◆ parseString()

std::string parseString ( const std::string &  s)

Parse a string value (removing quotes)

Parameters
sThe string to parse
Returns
The parsed string

◆ parseValue()

std::variant<ConfigSingleValue, ConfigObjectValue, ConfigListValue> parseValue ( const std::basic_string< char > &  value)

Parse a member of the config map from the value string

Parameters
valueThe value string to parse
Returns
The parsed member