Biodata Generator 1.0.0
Procedural human physical characteristics generation for C++23
Loading...
Searching...
No Matches
dasmig::biodata Class Reference

Return type for biodata generation, holding all physical characteristics. More...

#include <biodatagen.hpp>

Public Member Functions

std::uint64_t seed () const
 Retrieve the random seed used to generate this biodata.
 
std::string to_string () const
 Human-readable summary string.
 
 operator std::string () const
 Implicit conversion to std::string.
 

Static Public Member Functions

static std::string_view eye_color_str (eye_color c)
 Eye colour label.
 
static std::string_view hair_color_str (hair_color c)
 Hair colour label.
 
static std::string_view skin_type_str (skin_type t)
 Skin type label.
 
static std::string_view blood_type_str (blood_type t)
 Blood type label.
 
static std::string_view handedness_str (handedness h)
 Handedness label.
 
static std::string_view sex_str (sex s)
 Biological sex label.
 

Public Attributes

std::string country_code
 ISO 3166-1 alpha-2 code.
 
sex bio_sex {sex::male}
 Biological sex.
 
double height_cm {0.0}
 Height in centimetres.
 
double weight_kg {0.0}
 Weight in kilograms.
 
double bmi {0.0}
 Body mass index (kg/m²).
 
eye_color eyes {eye_color::brown}
 Eye colour.
 
hair_color hair {hair_color::black}
 Hair colour.
 
skin_type skin {skin_type::III}
 Fitzpatrick skin type.
 
blood_type blood {blood_type::O_pos}
 Blood type (ABO/Rh).
 
handedness hand {handedness::right}
 Handedness.
 

Friends

class bdg
 
std::ostream & operator<< (std::ostream &os, const biodata &b)
 Stream the summary to an output stream.
 

Detailed Description

Return type for biodata generation, holding all physical characteristics.

Supports implicit conversion to std::string (summary line) and streaming via operator<<.

Definition at line 107 of file biodatagen.hpp.

Member Function Documentation

◆ blood_type_str()

static std::string_view dasmig::biodata::blood_type_str ( blood_type  t)
inlinestatic

Blood type label.

Definition at line 195 of file biodatagen.hpp.

◆ eye_color_str()

static std::string_view dasmig::biodata::eye_color_str ( eye_color  c)
inlinestatic

Eye colour label.

Definition at line 155 of file biodatagen.hpp.

◆ hair_color_str()

static std::string_view dasmig::biodata::hair_color_str ( hair_color  c)
inlinestatic

Hair colour label.

Definition at line 167 of file biodatagen.hpp.

◆ handedness_str()

static std::string_view dasmig::biodata::handedness_str ( handedness  h)
inlinestatic

Handedness label.

Definition at line 212 of file biodatagen.hpp.

◆ operator std::string()

dasmig::biodata::operator std::string ( ) const
inline

Implicit conversion to std::string.

Returns
Summary string.

Definition at line 140 of file biodatagen.hpp.

◆ seed()

std::uint64_t dasmig::biodata::seed ( ) const
inline

Retrieve the random seed used to generate this biodata.

Definition at line 122 of file biodatagen.hpp.

◆ sex_str()

static std::string_view dasmig::biodata::sex_str ( sex  s)
inlinestatic

Biological sex label.

Definition at line 223 of file biodatagen.hpp.

◆ skin_type_str()

static std::string_view dasmig::biodata::skin_type_str ( skin_type  t)
inlinestatic

Skin type label.

Definition at line 180 of file biodatagen.hpp.

◆ to_string()

std::string dasmig::biodata::to_string ( ) const
inline

Human-readable summary string.

Definition at line 125 of file biodatagen.hpp.

Friends And Related Symbol Documentation

◆ bdg

friend class bdg
friend

Definition at line 235 of file biodatagen.hpp.

◆ operator<<

std::ostream & operator<< ( std::ostream &  os,
const biodata b 
)
friend

Stream the summary to an output stream.

Definition at line 146 of file biodatagen.hpp.

Member Data Documentation

◆ bio_sex

sex dasmig::biodata::bio_sex {sex::male}

Biological sex.

Definition at line 111 of file biodatagen.hpp.

◆ blood

blood_type dasmig::biodata::blood {blood_type::O_pos}

Blood type (ABO/Rh).

Definition at line 118 of file biodatagen.hpp.

◆ bmi

double dasmig::biodata::bmi {0.0}

Body mass index (kg/m²).

Definition at line 114 of file biodatagen.hpp.

◆ country_code

std::string dasmig::biodata::country_code

ISO 3166-1 alpha-2 code.

Definition at line 110 of file biodatagen.hpp.

◆ eyes

eye_color dasmig::biodata::eyes {eye_color::brown}

Eye colour.

Definition at line 115 of file biodatagen.hpp.

◆ hair

hair_color dasmig::biodata::hair {hair_color::black}

Hair colour.

Definition at line 116 of file biodatagen.hpp.

◆ hand

handedness dasmig::biodata::hand {handedness::right}

Handedness.

Definition at line 119 of file biodatagen.hpp.

◆ height_cm

double dasmig::biodata::height_cm {0.0}

Height in centimetres.

Definition at line 112 of file biodatagen.hpp.

◆ skin

skin_type dasmig::biodata::skin {skin_type::III}

Fitzpatrick skin type.

Definition at line 117 of file biodatagen.hpp.

◆ weight_kg

double dasmig::biodata::weight_kg {0.0}

Weight in kilograms.

Definition at line 113 of file biodatagen.hpp.


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