Conquer Space 0.0.0
A space themed grand strategy game set in the near future, with realistic orbital mechanics, and an emphasis on economics and politics.
Public Member Functions | Private Member Functions | Private Attributes | List of all members
cqsp::core::loading::ProvinceLoader Class Reference

This loader has to be loaded after PlanetLoader because it adds the cities to the respectve planets More...

#include <provinceloader.h>

Inheritance diagram for cqsp::core::loading::ProvinceLoader:
cqsp::core::loading::HjsonLoader

Public Member Functions

 ProvinceLoader (Universe &universe)
 
const Hjson::Value & GetDefaultValues () override
 
bool LoadValue (const Hjson::Value &values, Node &node) override
 
void PostLoad (const Node &node) override
 
void ParseIndustry (const Hjson::Value &industry_hjson, Node &node, std::string_view identifier)
 
- Public Member Functions inherited from cqsp::core::loading::HjsonLoader
 HjsonLoader (Universe &universe)
 
virtual ~HjsonLoader ()=default
 
int LoadHjson (const Hjson::Value &values)
 
virtual bool NeedIdentifier ()
 

Private Member Functions

Node GetCountry (const std::string &country_identifier, const std::string &identifier)
 
Node GetPlanet (const std::string &planet_identifier, const std::string &identifier)
 
Node ParsePopulation (const Hjson::Value &population_hjson)
 
void LoadInfrastructure (const Hjson::Value &value, const Node &node)
 

Private Attributes

Hjson::Value default_val
 
std::random_device rd
 
std::mt19937 gen
 
std::uniform_int_distribution distrib
 
TagLoader loader
 

Additional Inherited Members

- Protected Member Functions inherited from cqsp::core::loading::HjsonLoader
glm::vec3 LoadColor (const Hjson::Value &value, std::string_view identifier)
 
glm::vec3 LoadColor (const Hjson::Value &value)
 
uint32_t StringHash (std::string_view)
 
- Protected Attributes inherited from cqsp::core::loading::HjsonLoader
Universe & universe
 

Detailed Description

This loader has to be loaded after PlanetLoader because it adds the cities to the respectve planets

Constructor & Destructor Documentation

◆ ProvinceLoader()

cqsp::core::loading::ProvinceLoader::ProvinceLoader ( Universe &  universe)
explicit

Member Function Documentation

◆ GetCountry()

Node cqsp::core::loading::ProvinceLoader::GetCountry ( const std::string &  country_identifier,
const std::string &  identifier 
)
private

◆ GetDefaultValues()

const Hjson::Value & cqsp::core::loading::ProvinceLoader::GetDefaultValues ( )
inlineoverridevirtual

◆ GetPlanet()

Node cqsp::core::loading::ProvinceLoader::GetPlanet ( const std::string &  planet_identifier,
const std::string &  identifier 
)
private

◆ LoadInfrastructure()

void cqsp::core::loading::ProvinceLoader::LoadInfrastructure ( const Hjson::Value &  value,
const Node &  node 
)
private

◆ LoadValue()

bool cqsp::core::loading::ProvinceLoader::LoadValue ( const Hjson::Value &  values,
Node &  node 
)
overridevirtual

◆ ParseIndustry()

void cqsp::core::loading::ProvinceLoader::ParseIndustry ( const Hjson::Value &  industry_hjson,
Node &  node,
std::string_view  identifier 
)

◆ ParsePopulation()

Node cqsp::core::loading::ProvinceLoader::ParsePopulation ( const Hjson::Value &  population_hjson)
private

◆ PostLoad()

void cqsp::core::loading::ProvinceLoader::PostLoad ( const Node &  node)
overridevirtual

Reimplemented from cqsp::core::loading::HjsonLoader.

Member Data Documentation

◆ default_val

Hjson::Value cqsp::core::loading::ProvinceLoader::default_val
private

◆ distrib

std::uniform_int_distribution cqsp::core::loading::ProvinceLoader::distrib
private

◆ gen

std::mt19937 cqsp::core::loading::ProvinceLoader::gen
private

◆ loader

TagLoader cqsp::core::loading::ProvinceLoader::loader
private

◆ rd

std::random_device cqsp::core::loading::ProvinceLoader::rd
private

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