Phone Generator 2.1.1
Phone numbers valid in each country's numbering plan for C++23
Loading...
Searching...
No Matches
phonegen.hpp File Reference

Phone Generator library — phone numbers valid in each country's numbering plan for C++23. More...

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

Go to the source code of this file.

Classes

struct  dasmig::phone_request
 What a phone call asks for. More...
 
class  dasmig::phone
 Return type for phone number generation. More...
 
class  dasmig::phg
 Phone Generator: phone numbers valid in each country's numbering plan. More...
 

Enumerations

enum class  dasmig::phone_type : std::uint8_t { mobile , fixed }
 The kinds of phone number generated. More...
 
enum class  dasmig::phone_table : std::uint8_t { countries , ranges , formats , reserved }
 The tables of the phone data, for extending it. More...
 

Detailed Description

Phone Generator library — phone numbers valid in each country's numbering plan 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 phonegen.hpp.

Enumeration Type Documentation

◆ phone_table

enum class dasmig::phone_table : std::uint8_t
strong

The tables of the phone data, for extending it.

Enumerator
countries 

countries.tsv: calling codes, national prefixes and populations.

ranges 

ranges.tsv: the allocated number ranges, by country and type.

formats 

formats.tsv: the digit grouping and templates the ranges refer to.

reserved 

reserved.tsv: the ranges set aside for fiction (the safe option).

Definition at line 218 of file phonegen.hpp.

◆ phone_type

enum class dasmig::phone_type : std::uint8_t
strong

The kinds of phone number generated.

Enumerator
mobile 

A mobile number.

fixed 

A fixed-line number.

Definition at line 41 of file phonegen.hpp.