Faker C++
Loading...
Searching...
No Matches
faker::airline Namespace Reference

Classes

struct  AirlineInfo
 
struct  Airplane
 
struct  Airport
 
struct  Range
 

Enumerations

enum class  AircraftType { Regional , Narrowbody , Widebody }
 

Functions

FAKER_CXX_EXPORT std::string_view aircraftType ()
 Get a random aircraft type.
 
FAKER_CXX_EXPORT Airplane airplane ()
 Get a random airplane.
 
FAKER_CXX_EXPORT AirlineInfo airline ()
 Get a random airline.
 
FAKER_CXX_EXPORT Airport airport ()
 Get a random airport.
 
FAKER_CXX_EXPORT std::string seat (AircraftType aircraftType)
 Get a random seat by aircraft type.
 
FAKER_CXX_EXPORT std::string recordLocator (bool allowNumerics=false)
 Get a random record location.
 
FAKER_CXX_EXPORT std::string flightNumber (bool addLeadingZeros=false, unsigned int length=4)
 Get a random flight number from given length.
 
FAKER_CXX_EXPORT std::string flightNumberByRange (bool addLeadingZeros=false, Range length={1, 4})
 Get a random flight number from given length.
 

Enumeration Type Documentation

◆ AircraftType

enum class faker::airline::AircraftType
strong
Enumerator
Regional 
Narrowbody 
Widebody 

Function Documentation

◆ aircraftType()

FAKER_CXX_EXPORT std::string_view faker::airline::aircraftType ( )

Get a random aircraft type.

Returns
a random aircraft type
FAKER_CXX_EXPORT std::string_view aircraftType()
Get a random aircraft type.

◆ airline()

FAKER_CXX_EXPORT AirlineInfo faker::airline::airline ( )

Get a random airline.

Returns
a random airline and its iataCode
faker::airline::airline() // {"Air Canada", "AC"}
FAKER_CXX_EXPORT AirlineInfo airline()
Get a random airline.

◆ airplane()

FAKER_CXX_EXPORT Airplane faker::airline::airplane ( )

Get a random airplane.

Returns
a random airplane and its iataTypeCode
faker::airline::airplane() // {"Boeing 737-800", "738"}
FAKER_CXX_EXPORT Airplane airplane()
Get a random airplane.

◆ airport()

FAKER_CXX_EXPORT Airport faker::airline::airport ( )

Get a random airport.

Returns
a random airport and its iataCode
faker::airline::airport() // {"Toronto Pearson International Airport", "YYZ"}
FAKER_CXX_EXPORT Airport airport()
Get a random airport.

◆ flightNumber()

FAKER_CXX_EXPORT std::string faker::airline::flightNumber ( bool addLeadingZeros = false,
unsigned int length = 4 )

Get a random flight number from given length.

Parameters
addLeadingZeroswhether to add leading zeros
lengththe length of the flight number
Returns
a random flight number
faker::airline::flightNumber(true) // "0123"
faker::airline::flightNumber(false, 3) // "234"
FAKER_CXX_EXPORT std::string flightNumber(bool addLeadingZeros=false, unsigned int length=4)
Get a random flight number from given length.
Definition airline.h:9

◆ flightNumberByRange()

FAKER_CXX_EXPORT std::string faker::airline::flightNumberByRange ( bool addLeadingZeros = false,
Range length = {1, 4} )

Get a random flight number from given length.

Parameters
addLeadingZeroswhether to add leading zeros
lengththe length of the flight number
Returns
a random flight number
faker::airline::flightNumber(true) // "0123"
faker::airline::flightNumber(false, {1, 4}) // "234" // "12" // "1234"

◆ recordLocator()

FAKER_CXX_EXPORT std::string faker::airline::recordLocator ( bool allowNumerics = false)

Get a random record location.

Returns
a random record location
faker::airline::recordLocator(true) // "ABC123"
FAKER_CXX_EXPORT std::string recordLocator(bool allowNumerics=false)
Get a random record location.

◆ seat()

FAKER_CXX_EXPORT std::string faker::airline::seat ( AircraftType aircraftType)

Get a random seat by aircraft type.

Parameters
aircraftTypethe aircraft type
Returns
a random seat
FAKER_CXX_EXPORT std::string seat(AircraftType aircraftType)
Get a random seat by aircraft type.