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.
Classes | Functions
cqsp::common::systems::loading Namespace Reference

Classes

class  CityLoader
 This loader has to be loaded after PlanetLoader because it adds the cities to the respectve planets More...
 
class  CountryLoader
 
class  GoodLoader
 
class  HjsonLoader
 
class  PlanetLoader
 
class  RecipeLoader
 
class  TimezoneLoader
 

Functions

void LoadTerrainData (cqsp::common::Universe &universe, Hjson::Value &value)
 
void LoadGoods (cqsp::common::Universe &, Hjson::Value &)
 
void LoadRecipes (cqsp::common::Universe &, Hjson::Value &)
 
void LoadNameLists (cqsp::common::Universe &, Hjson::Value &)
 
void LoadProvinces (common::Universe &universe, const std::string &text)
 
components::types::Orbit GetOrbit (const std::string &line_one, const std::string &line_two, const double &GM)
 
int GetEpochYear (int year)
 
double GetEpoch (double year, double time)
 
void LoadSatellites (Universe &universe, std::string &string)
 
bool LoadName (Universe &universe, const entt::entity &entity, const Hjson::Value &value)
 Returns true if name exists More...
 
bool LoadIdentifier (Universe &universe, const entt::entity &entity, const Hjson::Value &value)
 
bool LoadDescription (Universe &universe, const entt::entity &entity, const Hjson::Value &value)
 
bool LoadInitialValues (Universe &universe, const entt::entity &entity, const Hjson::Value &value)
 Loads all the values that should be on every single data type Returns true if an identifier exists More...
 
cqsp::common::components::ResourceLedger HjsonToLedger (cqsp::common::Universe &universe, Hjson::Value &hjson)
 
bool VerifyHjsonValueExists (const Hjson::Value &value, const std::string &name, Hjson::Type type)
 
bool VerifyInitialValues (const Hjson::Value &value, const std::map< std::string, Hjson::Type > &map)
 For the values that need to exist More...
 
double ReadUnit (std::string_view value, components::types::UnitType unit_type, bool *correct=nullptr)
 Gets the unit from the value from expected unit type. More...
 

Function Documentation

◆ GetEpoch()

double cqsp::common::systems::loading::GetEpoch ( double  year,
double  time 
)

◆ GetEpochYear()

int cqsp::common::systems::loading::GetEpochYear ( int  year)

◆ GetOrbit()

components::types::Orbit cqsp::common::systems::loading::GetOrbit ( const std::string &  line_one,
const std::string &  line_two,
const double &  GM 
)

◆ HjsonToLedger()

components::ResourceLedger cqsp::common::systems::loading::HjsonToLedger ( cqsp::common::Universe universe,
Hjson::Value &  hjson 
)

◆ LoadDescription()

bool cqsp::common::systems::loading::LoadDescription ( Universe universe,
const entt::entity &  entity,
const Hjson::Value &  value 
)

◆ LoadGoods()

void cqsp::common::systems::loading::LoadGoods ( cqsp::common::Universe ,
Hjson::Value &   
)

◆ LoadIdentifier()

bool cqsp::common::systems::loading::LoadIdentifier ( Universe universe,
const entt::entity &  entity,
const Hjson::Value &  value 
)

◆ LoadInitialValues()

bool cqsp::common::systems::loading::LoadInitialValues ( Universe universe,
const entt::entity &  entity,
const Hjson::Value &  value 
)

Loads all the values that should be on every single data type Returns true if an identifier exists

◆ LoadName()

bool cqsp::common::systems::loading::LoadName ( Universe universe,
const entt::entity &  entity,
const Hjson::Value &  value 
)

Returns true if name exists

Returns

◆ LoadNameLists()

void cqsp::common::systems::loading::LoadNameLists ( cqsp::common::Universe universe,
Hjson::Value &  value 
)

◆ LoadProvinces()

void cqsp::common::systems::loading::LoadProvinces ( common::Universe universe,
const std::string &  text 
)

◆ LoadRecipes()

void cqsp::common::systems::loading::LoadRecipes ( cqsp::common::Universe ,
Hjson::Value &   
)

◆ LoadSatellites()

void cqsp::common::systems::loading::LoadSatellites ( Universe universe,
std::string &  string 
)

◆ LoadTerrainData()

void cqsp::common::systems::loading::LoadTerrainData ( cqsp::common::Universe universe,
Hjson::Value &  value 
)

◆ ReadUnit()

double cqsp::common::systems::loading::ReadUnit ( std::string_view  value,
components::types::UnitType  unit_type,
bool *  correct = nullptr 
)

Gets the unit from the value from expected unit type.

Parameters
value
unit
correct[out] if the unit is of the correct type
Returns

◆ VerifyHjsonValueExists()

bool cqsp::common::systems::loading::VerifyHjsonValueExists ( const Hjson::Value &  value,
const std::string &  name,
Hjson::Type  type 
)

◆ VerifyInitialValues()

bool cqsp::common::systems::loading::VerifyInitialValues ( const Hjson::Value &  value,
const std::map< std::string, Hjson::Type > &  map 
)

For the values that need to exist

Returns