siderust-cpp 0.8.0
Header-only C++ wrapper for siderust
Loading...
Searching...
No Matches
siderust::Star Class Reference

RAII handle to a Star (opaque Rust object). More...

#include <siderust/bodies.hpp>

Public Member Functions

 Star ()=default
 
 ~Star ()
 
 Star (Star &&o) noexcept
 
Staroperator= (Star &&o) noexcept
 
 Star (const Star &)=delete
 
Staroperator= (const Star &)=delete
 
 operator bool () const
 Whether the handle is valid.
 
const SiderustStar * c_handle () const
 Access the raw C handle (for passing to altitude functions).
 
std::string name () const
 
double distance_ly () const
 
double mass_solar () const
 
double radius_solar () const
 
double luminosity_solar () const
 

Static Public Member Functions

static Star catalog (const std::string &name)
 Look up a star from the built-in catalog.
 
static Star create (std::string name, StellarProperties properties, spherical::direction::ICRS position, Time< TT, JD > epoch, std::optional< ProperMotion > pm=std::nullopt)
 Create a custom star.
 

Detailed Description

RAII handle to a Star (opaque Rust object).

Non-copyable; move-only. Released on destruction.

Definition at line 176 of file bodies.hpp.

Constructor & Destructor Documentation

◆ Star() [1/3]

siderust::Star::Star ( )
default

Referenced by catalog(), and create().

◆ ~Star()

siderust::Star::~Star ( )
inline

Definition at line 183 of file bodies.hpp.

◆ Star() [2/3]

siderust::Star::Star ( Star &&  o)
inlinenoexcept

Definition at line 189 of file bodies.hpp.

◆ Star() [3/3]

siderust::Star::Star ( const Star )
delete

Member Function Documentation

◆ c_handle()

const SiderustStar * siderust::Star::c_handle ( ) const
inline

Access the raw C handle (for passing to altitude functions).

Definition at line 206 of file bodies.hpp.

Referenced by siderust::star_altitude::altitude_at(), and siderust::star_altitude::azimuth_at().

◆ catalog()

static Star siderust::Star::catalog ( const std::string &  name)
inlinestatic

Look up a star from the built-in catalog.

Supported: "VEGA", "SIRIUS", "POLARIS", "CANOPUS", "ARCTURUS", "RIGEL", "BETELGEUSE", "PROCYON", "ALDEBARAN", "ALTAIR".

Definition at line 216 of file bodies.hpp.

References siderust::check_status(), name(), and Star().

Referenced by siderust::ALDEBARAN(), siderust::ALTAIR(), siderust::ARCTURUS(), siderust::BETELGEUSE(), siderust::CANOPUS(), siderust::POLARIS(), siderust::PROCYON(), siderust::RIGEL(), siderust::SIRIUS(), and siderust::VEGA().

◆ create()

static Star siderust::Star::create ( std::string  name,
StellarProperties  properties,
spherical::direction::ICRS  position,
Time< TT, JD epoch,
std::optional< ProperMotion pm = std::nullopt 
)
inlinestatic

◆ distance_ly()

double siderust::Star::distance_ly ( ) const
inline

Definition at line 258 of file bodies.hpp.

◆ luminosity_solar()

double siderust::Star::luminosity_solar ( ) const
inline

Definition at line 261 of file bodies.hpp.

◆ mass_solar()

double siderust::Star::mass_solar ( ) const
inline

Definition at line 259 of file bodies.hpp.

◆ name()

std::string siderust::Star::name ( ) const
inline

Definition at line 251 of file bodies.hpp.

References siderust::check_status().

Referenced by catalog(), create(), and siderust::StarTarget::name().

◆ operator bool()

siderust::Star::operator bool ( ) const
inlineexplicit

Whether the handle is valid.

Definition at line 203 of file bodies.hpp.

◆ operator=() [1/2]

Star & siderust::Star::operator= ( const Star )
delete

◆ operator=() [2/2]

Star & siderust::Star::operator= ( Star &&  o)
inlinenoexcept

Definition at line 190 of file bodies.hpp.

◆ radius_solar()

double siderust::Star::radius_solar ( ) const
inline

Definition at line 260 of file bodies.hpp.


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