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::util Namespace Reference

Classes

struct  ExePath
 
class  IRandom
 
class  StdRandom
 

Functions

std::shared_ptr< spdlog::logger > make_logger (const std::string &name, bool error=false)
 Initializes a logger with the right outputs based on the various configurations More...
 
std::shared_ptr< spdlog::logger > make_registered_logger (const std::string &name, bool error)
 
std::string GetName (const Universe &universe, entt::entity entity)
 Gets the name of the entity. If that isn't there, then the identifier. If you somehow mess even that up, it returns the identifier in string form. More...
 
std::string GetEntityType (const cqsp::common::Universe &universe, entt::entity entity)
 
std::string GetCqspAppDataPath ()
 The path for where all the data of the game is stored, including logs, and other things More...
 
std::string GetCqspExePath ()
 
std::string GetCqspDataPath ()
 This returns binaries/data More...
 
std::string GetCqspSavePath ()
 This should return Documents/cqsp. More...
 
std::string random_id ()
 

Function Documentation

◆ GetCqspAppDataPath()

std::string cqsp::common::util::GetCqspAppDataPath ( )

The path for where all the data of the game is stored, including logs, and other things

Returns

◆ GetCqspDataPath()

std::string cqsp::common::util::GetCqspDataPath ( )

This returns binaries/data

Returns

◆ GetCqspExePath()

std::string cqsp::common::util::GetCqspExePath ( )

◆ GetCqspSavePath()

std::string cqsp::common::util::GetCqspSavePath ( )

This should return Documents/cqsp.

◆ GetEntityType()

std::string cqsp::common::util::GetEntityType ( const cqsp::common::Universe universe,
entt::entity  entity 
)

◆ GetName()

std::string cqsp::common::util::GetName ( const Universe universe,
entt::entity  entity 
)

Gets the name of the entity. If that isn't there, then the identifier. If you somehow mess even that up, it returns the identifier in string form.

Parameters
universe
entity
Returns

◆ make_logger()

std::shared_ptr< spdlog::logger > cqsp::common::util::make_logger ( const std::string &  name,
bool  error = false 
)

Initializes a logger with the right outputs based on the various configurations

Parameters
name
errorIf it wants an error output file, then it will output it as "{name}.error.txt
Returns

◆ make_registered_logger()

std::shared_ptr< spdlog::logger > cqsp::common::util::make_registered_logger ( const std::string &  name,
bool  error 
)

◆ random_id()

std::string cqsp::common::util::random_id ( )
inline