game_launcher 1.1.0
Modern Linux game launcher with Steam / Proton / Wine integration
Loading...
Searching...
No Matches
game.cpp File Reference
#include "game.h"
#include "logger.h"
#include <algorithm>
#include <cstdint>
#include <ctime>
#include <fstream>
#include <iomanip>
#include <nlohmann/json.hpp>
#include <set>
#include <sstream>
Include dependency graph for game.cpp:

Go to the source code of this file.

Namespaces

namespace  anonymous_namespace{game.cpp}

Typedefs

using gjson = nlohmann::json

Functions

std::string anonymous_namespace{game.cpp}::captureUnknownKeys (const gjson &src, const std::set< std::string > &known)
 Extract any keys not in known into a JSON object string.
bool anonymous_namespace{game.cpp}::jbool (const gjson &j, const char *key, bool def=false)
double anonymous_namespace{game.cpp}::jdouble (const gjson &j, const char *key, double def=0.0)
int anonymous_namespace{game.cpp}::jint (const gjson &j, const char *key, int def=0)
int64_t anonymous_namespace{game.cpp}::jint64 (const gjson &j, const char *key, int64_t def=0)
std::string anonymous_namespace{game.cpp}::jstr (const gjson &j, const char *key, const char *def="")
 Type-tolerant getter helpers — return defaultVal when the key is missing or the value is the wrong type.
const std::set< std::string > & anonymous_namespace{game.cpp}::kKnownMetadataKeys ()
const std::set< std::string > & anonymous_namespace{game.cpp}::kKnownRunnerConfigKeys ()
 Set of keys that the typed struct knows about.
void anonymous_namespace{game.cpp}::mergeUnknownKeys (gjson &dst, const std::string &extrasStr)
 Inverse of captureUnknownKeys: merge stashed unknowns into the JSON object we're about to serialise.
static std::string toLower (const std::string &str)

Typedef Documentation

◆ gjson

Definition at line 19 of file game.cpp.

Function Documentation

◆ toLower()

std::string toLower ( const std::string & str)
static

Definition at line 166 of file game.cpp.

Referenced by Game::getNameLower().