Occupation Generator 3.0.1
Employment status and occupation by country, age, sex and education for C++23
Loading...
Searching...
No Matches
occupationgen.hpp File Reference

Occupation Generator library — employment status, education and occupation by country, age and sex for C++23. More...

#include "core.hpp"
#include <algorithm>
#include <array>
#include <cstddef>
#include <cstdint>
#include <filesystem>
#include <format>
#include <map>
#include <optional>
#include <ostream>
#include <span>
#include <stdexcept>
#include <string>
#include <string_view>
#include <system_error>
#include <tuple>
#include <unordered_map>
#include <utility>
#include <vector>

Go to the source code of this file.

Classes

struct  dasmig::job_info
 A job, as drawn. More...
 
struct  dasmig::occupation_request
 Per-call generation choices. Every field may be omitted. More...
 
class  dasmig::occupation
 Return type for occupation generation. More...
 
class  dasmig::ocg
 Occupation Generator: draws a person's employment status, education and job. More...
 

Enumerations

enum class  dasmig::employment_status : std::uint8_t {
  employed , unemployed , student , retired ,
  inactive
}
 What a person does with their working-age days. More...
 
enum class  dasmig::education_level : std::uint8_t { less_than_basic , basic , intermediate , advanced }
 Highest education completed, in the ILO's four aggregate levels. More...
 

Functions

constexpr std::string_view dasmig::to_string (employment_status s) noexcept
 The name of an employment status, as used in the data and in JSON.
 
constexpr std::string_view dasmig::to_string (education_level e) noexcept
 The name of an education level, as used in the data and in JSON.
 

Detailed Description

Occupation Generator library — employment status, education and occupation by country, age and sex for C++23.

Author
Diego Dasso Migotto (diegomigotto at hotmail dot com)
See also
See doc/usage.md for the narrative tutorial.

Definition in file occupationgen.hpp.

Enumeration Type Documentation

◆ education_level

enum class dasmig::education_level : std::uint8_t
strong

Highest education completed, in the ILO's four aggregate levels.

Enumerator
less_than_basic 

Less than basic: not completed primary education, or none.

basic 

Basic: primary or lower secondary (ISCED 1-2).

intermediate 

Intermediate: upper secondary and post-secondary non-tertiary (ISCED 3-4).

advanced 

Advanced: tertiary (ISCED 5-8).

Definition at line 52 of file occupationgen.hpp.

◆ employment_status

enum class dasmig::employment_status : std::uint8_t
strong

What a person does with their working-age days.

Enumerator
employed 

In employment.

unemployed 

Without work and looking for it.

student 

Studying (always, from 6 to 14; among the inactive, by age).

retired 

Retired (among the inactive, by age).

inactive 

Outside the labour force for another reason: care, illness, discouragement; under 6, always.

Definition at line 42 of file occupationgen.hpp.

Function Documentation

◆ to_string() [1/2]

constexpr std::string_view dasmig::to_string ( education_level  e)
constexprnoexcept

The name of an education level, as used in the data and in JSON.

Parameters
eThe level.
Returns
"less_than_basic", "basic", "intermediate" or "advanced".

Definition at line 79 of file occupationgen.hpp.

◆ to_string() [2/2]

constexpr std::string_view dasmig::to_string ( employment_status  s)
constexprnoexcept

The name of an employment status, as used in the data and in JSON.

Parameters
sThe status.
Returns
"employed", "unemployed", "student", "retired" or "inactive".

Definition at line 63 of file occupationgen.hpp.