Faker C++
Loading...
Searching...
No Matches
location.h
Go to the documentation of this file.
1#pragma once
2
3#include <limits>
4#include <string>
5#include <string_view>
6
7#include "faker-cxx/export.h"
8#include "faker-cxx/types/locale.h"
9#include "faker-cxx/types/precision.h"
10
12{
22FAKER_CXX_EXPORT std::string_view country();
23
33FAKER_CXX_EXPORT std::string_view countryCode();
34
46FAKER_CXX_EXPORT std::string_view state(Locale locale = Locale::en_US);
47
59FAKER_CXX_EXPORT std::string city(Locale locale = Locale::en_US);
60
73FAKER_CXX_EXPORT std::string zipCode(Locale locale = Locale::en_US);
74
86FAKER_CXX_EXPORT std::string streetAddress(Locale locale = Locale::en_US);
87
99FAKER_CXX_EXPORT std::string street(Locale locale = Locale::en_US);
100
112FAKER_CXX_EXPORT std::string buildingNumber(Locale locale = Locale::en_US);
113
126FAKER_CXX_EXPORT std::string secondaryAddress(Locale locale = Locale::en_US);
127
139FAKER_CXX_EXPORT std::string latitude(Precision precision = Precision::FourDp);
140
152FAKER_CXX_EXPORT std::string longitude(Precision precision = Precision::FourDp);
153
171FAKER_CXX_EXPORT std::tuple<std::string, std::string> nearbyGPSCoordinate(
172 Precision precision = Precision::FourDp,
173 const std::tuple<double, double>& origin = {std::numeric_limits<double>::max(), std::numeric_limits<double>::max()},
174 double radius = 10, bool isMetric = false);
175
185FAKER_CXX_EXPORT std::string_view direction();
186
196FAKER_CXX_EXPORT std::string_view timeZone();
197}
Definition location.h:12
FAKER_CXX_EXPORT std::string_view state(Locale locale=Locale::en_US)
Returns a random state for a given locale.
FAKER_CXX_EXPORT std::string secondaryAddress(Locale locale=Locale::en_US)
Returns a random secondary address number for given locale. This refers to a specific location at a g...
FAKER_CXX_EXPORT std::string buildingNumber(Locale locale=Locale::en_US)
Returns a random building number for given locale.
FAKER_CXX_EXPORT std::string longitude(Precision precision=Precision::FourDp)
Generates a random longitude.
FAKER_CXX_EXPORT std::string street(Locale locale=Locale::en_US)
Returns a random street for given locale.
FAKER_CXX_EXPORT std::string_view timeZone()
Generates a random time zone.
FAKER_CXX_EXPORT std::string latitude(Precision precision=Precision::FourDp)
Generates a random latitude.
FAKER_CXX_EXPORT std::string_view countryCode()
Returns a random country code.
FAKER_CXX_EXPORT std::string streetAddress(Locale locale=Locale::en_US)
Returns a random street address for given locale.
FAKER_CXX_EXPORT std::string zipCode(Locale locale=Locale::en_US)
Returns a random zip code for given locale.
FAKER_CXX_EXPORT std::string_view country()
Returns a random country name.
FAKER_CXX_EXPORT std::string_view direction()
Generates a random direction from cardinal and ordinal directions.
FAKER_CXX_EXPORT std::tuple< std::string, std::string > nearbyGPSCoordinate(Precision precision=Precision::FourDp, const std::tuple< double, double > &origin={std::numeric_limits< double >::max(), std::numeric_limits< double >::max()}, double radius=10, bool isMetric=false)
Generates a random GPS coordinate within the specified radius from the given coordinate.
FAKER_CXX_EXPORT std::string city(Locale locale=Locale::en_US)
Returns a random city for given locale.