Pioneer
Loading...
Searching...
No Matches
Classes | Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | Protected Member Functions | Friends | List of all members
StarSystem Class Reference

#include <StarSystem.h>

Inheritance diagram for StarSystem:
Inheritance graph
[legend]
Collaboration diagram for StarSystem:
Collaboration graph
[legend]

Classes

class  GeneratorAPI
 

Public Types

enum  ExplorationState { eUNEXPLORED = 0 , eEXPLORED_BY_PLAYER = 1 , eEXPLORED_AT_START = 2 }
 

Public Member Functions

void ExportToLua (const char *filename)
 
const std::string & GetName () const
 
std::vector< std::string > GetOtherNames () const
 
SystemPath GetPathOf (const SystemBody *sbody) const
 
SystemBodyGetBodyByPath (const SystemPath &path) const
 
const SystemPathGetPath () const
 
const std::string & GetShortDescription () const
 
const std::string & GetLongDescription () const
 
unsigned GetNumStars () const
 
const SysPolitGetSysPolit () const
 
RefCountedPtr< const SystemBodyGetRootBody () const
 
RefCountedPtr< SystemBodyGetRootBody ()
 
bool HasSpaceStations () const
 
Uint32 GetNumSpaceStations () const
 
IterationProxy< std::vector< SystemBody * > > GetSpaceStations ()
 
const IterationProxy< const std::vector< SystemBody * > > GetSpaceStations () const
 
IterationProxy< std::vector< SystemBody * > > GetStars ()
 
const IterationProxy< const std::vector< SystemBody * > > GetStars () const
 
Uint32 GetNumBodies () const
 
IterationProxy< std::vector< RefCountedPtr< SystemBody > > > GetBodies ()
 
const IterationProxy< const std::vector< RefCountedPtr< SystemBody > > > GetBodies () const
 
bool IsCommodityLegal (const GalacticEconomy::CommodityId t)
 
int GetCommodityBasePriceModPercent (GalacticEconomy::CommodityId t)
 
const FactionGetFaction () const
 
bool GetUnexplored () const
 
ExplorationState GetExplored () const
 
double GetExploredTime () const
 
void ExploreSystem (double time)
 
fixed GetMetallicity () const
 
fixed GetIndustrial () const
 
fixed GetAgricultural () const
 
GalacticEconomy::EconomyId GetEconType () const
 
int GetSeed () const
 
fixed GetHumanProx () const
 
fixed GetTotalPop () const
 
void Dump (FILE *file, const char *indent="", bool suppressSectorData=false) const
 
- Public Member Functions inherited from RefCounted
 RefCounted ()
 
virtual ~RefCounted ()
 
void IncRefCount () const
 
void DecRefCount () const
 
int GetRefCount () const
 
- Public Member Functions inherited from LuaWrappable
virtual ~LuaWrappable ()
 

Static Public Member Functions

static void ToJson (Json &jsonObj, StarSystem *)
 
static RefCountedPtr< StarSystemFromJson (RefCountedPtr< Galaxy > galaxy, const Json &jsonObj)
 

Public Attributes

const RefCountedPtr< Galaxym_galaxy
 

Static Public Attributes

static const Color starColors []
 
static const Color starRealColors []
 
static const double starLuminosities []
 
static const float starScale []
 

Protected Member Functions

 StarSystem (const SystemPath &path, RefCountedPtr< Galaxy > galaxy, StarSystemCache *cache, Random &rand)
 
virtual ~StarSystem ()
 
SystemBodyNewBody ()
 
void MakeShortDescription ()
 
void SetShortDesc (const std::string &desc)
 

Friends

class SystemBody
 
class GalaxyObjectCache< StarSystem, SystemPath::LessSystemOnly >
 

Member Enumeration Documentation

◆ ExplorationState

Enumerator
eUNEXPLORED 
eEXPLORED_BY_PLAYER 
eEXPLORED_AT_START 

Constructor & Destructor Documentation

◆ StarSystem()

StarSystem::StarSystem ( const SystemPath path,
RefCountedPtr< Galaxy galaxy,
StarSystemCache cache,
Random rand 
)
protected

◆ ~StarSystem()

StarSystem::~StarSystem ( )
protectedvirtual

Member Function Documentation

◆ Dump()

void StarSystem::Dump ( FILE *  file,
const char *  indent = "",
bool  suppressSectorData = false 
) const
Here is the call graph for this function:

◆ ExploreSystem()

void StarSystem::ExploreSystem ( double  time)
Here is the call graph for this function:

◆ ExportToLua()

void StarSystem::ExportToLua ( const char *  filename)
Here is the call graph for this function:

◆ FromJson()

RefCountedPtr< StarSystem > StarSystem::FromJson ( RefCountedPtr< Galaxy galaxy,
const Json jsonObj 
)
static

◆ GetAgricultural()

fixed StarSystem::GetAgricultural ( ) const
inline

◆ GetBodies() [1/2]

IterationProxy< std::vector< RefCountedPtr< SystemBody > > > StarSystem::GetBodies ( )
inline
Here is the call graph for this function:

◆ GetBodies() [2/2]

const IterationProxy< const std::vector< RefCountedPtr< SystemBody > > > StarSystem::GetBodies ( ) const
inline
Here is the call graph for this function:

◆ GetBodyByPath()

SystemBody * StarSystem::GetBodyByPath ( const SystemPath path) const
Here is the call graph for this function:

◆ GetCommodityBasePriceModPercent()

int StarSystem::GetCommodityBasePriceModPercent ( GalacticEconomy::CommodityId  t)
inline

◆ GetEconType()

GalacticEconomy::EconomyId StarSystem::GetEconType ( ) const
inline

◆ GetExplored()

ExplorationState StarSystem::GetExplored ( ) const
inline

◆ GetExploredTime()

double StarSystem::GetExploredTime ( ) const
inline

◆ GetFaction()

const Faction * StarSystem::GetFaction ( ) const
inline

◆ GetHumanProx()

fixed StarSystem::GetHumanProx ( ) const
inline

◆ GetIndustrial()

fixed StarSystem::GetIndustrial ( ) const
inline

◆ GetLongDescription()

const std::string & StarSystem::GetLongDescription ( ) const
inline

◆ GetMetallicity()

fixed StarSystem::GetMetallicity ( ) const
inline

◆ GetName()

const std::string & StarSystem::GetName ( ) const
inline

◆ GetNumBodies()

Uint32 StarSystem::GetNumBodies ( ) const
inline

◆ GetNumSpaceStations()

Uint32 StarSystem::GetNumSpaceStations ( ) const
inline

◆ GetNumStars()

unsigned StarSystem::GetNumStars ( ) const
inline

◆ GetOtherNames()

std::vector< std::string > StarSystem::GetOtherNames ( ) const
inline

◆ GetPath()

const SystemPath & StarSystem::GetPath ( ) const
inline

◆ GetPathOf()

SystemPath StarSystem::GetPathOf ( const SystemBody sbody) const
Here is the call graph for this function:

◆ GetRootBody() [1/2]

RefCountedPtr< SystemBody > StarSystem::GetRootBody ( )
inline

◆ GetRootBody() [2/2]

RefCountedPtr< const SystemBody > StarSystem::GetRootBody ( ) const
inline

◆ GetSeed()

int StarSystem::GetSeed ( ) const
inline

◆ GetShortDescription()

const std::string & StarSystem::GetShortDescription ( ) const
inline

◆ GetSpaceStations() [1/2]

IterationProxy< std::vector< SystemBody * > > StarSystem::GetSpaceStations ( )
inline
Here is the call graph for this function:

◆ GetSpaceStations() [2/2]

const IterationProxy< const std::vector< SystemBody * > > StarSystem::GetSpaceStations ( ) const
inline
Here is the call graph for this function:

◆ GetStars() [1/2]

IterationProxy< std::vector< SystemBody * > > StarSystem::GetStars ( )
inline
Here is the call graph for this function:

◆ GetStars() [2/2]

const IterationProxy< const std::vector< SystemBody * > > StarSystem::GetStars ( ) const
inline
Here is the call graph for this function:

◆ GetSysPolit()

const SysPolit & StarSystem::GetSysPolit ( ) const
inline

◆ GetTotalPop()

fixed StarSystem::GetTotalPop ( ) const
inline

◆ GetUnexplored()

bool StarSystem::GetUnexplored ( ) const
inline

◆ HasSpaceStations()

bool StarSystem::HasSpaceStations ( ) const
inline

◆ IsCommodityLegal()

bool StarSystem::IsCommodityLegal ( const GalacticEconomy::CommodityId  t)
inline

◆ MakeShortDescription()

void StarSystem::MakeShortDescription ( )
protected
Here is the call graph for this function:

◆ NewBody()

SystemBody * StarSystem::NewBody ( )
inlineprotected

◆ SetShortDesc()

void StarSystem::SetShortDesc ( const std::string &  desc)
inlineprotected

◆ ToJson()

void StarSystem::ToJson ( Json jsonObj,
StarSystem s 
)
static

Friends And Related Symbol Documentation

◆ GalaxyObjectCache< StarSystem, SystemPath::LessSystemOnly >

◆ SystemBody

friend class SystemBody
friend

Member Data Documentation

◆ m_galaxy

const RefCountedPtr<Galaxy> StarSystem::m_galaxy

◆ starColors

const Color StarSystem::starColors
static

◆ starLuminosities

const double StarSystem::starLuminosities
static

◆ starRealColors

const Color StarSystem::starRealColors
static

◆ starScale

const float StarSystem::starScale
static

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