Faker C++
Loading...
Searching...
No Matches
Location.h File Reference
#include <string_view>
#include "faker-cxx/Export.h"
#include "types/Precision.h"
Include dependency graph for Location.h:

Go to the source code of this file.

Namespaces

namespace  faker
 
namespace  faker::location
 

Enumerations

enum class  faker::location::AddressCountry {
  faker::location::Australia , faker::location::Brazil , faker::location::Czech , faker::location::Denmark ,
  faker::location::Estonia , faker::location::Finland , faker::location::France , faker::location::Germany ,
  faker::location::India , faker::location::Italy , faker::location::Poland , faker::location::Russia ,
  faker::location::Spain , faker::location::Ukraine , faker::location::Usa
}
 

Functions

FAKER_CXX_EXPORT std::string_view faker::location::country ()
 Returns a random country name.
 
FAKER_CXX_EXPORT std::string_view faker::location::countryCode ()
 Returns a random country code.
 
FAKER_CXX_EXPORT std::string_view faker::location::state (AddressCountry country=AddressCountry::Usa)
 Returns a random state for a given country.
 
FAKER_CXX_EXPORT std::string faker::location::city (AddressCountry country=AddressCountry::Usa)
 Returns a random city for given country.
 
FAKER_CXX_EXPORT std::string faker::location::zipCode (AddressCountry country=AddressCountry::Usa)
 Returns a random zip code for given country.
 
FAKER_CXX_EXPORT std::string faker::location::streetAddress (AddressCountry country=AddressCountry::Usa)
 Returns a random street address for given country.
 
FAKER_CXX_EXPORT std::string faker::location::street (AddressCountry country=AddressCountry::Usa)
 Returns a random street for given country.
 
FAKER_CXX_EXPORT std::string faker::location::buildingNumber (AddressCountry country=AddressCountry::Usa)
 Returns a random building number for given country.
 
FAKER_CXX_EXPORT std::string faker::location::secondaryAddress (AddressCountry country=AddressCountry::Usa)
 Returns a random secondary address number for given country. This refers to a specific location at a given address such as an apartment or room number.
 
FAKER_CXX_EXPORT std::string faker::location::latitude (Precision precision=Precision::FourDp)
 Generates a random latitude.
 
FAKER_CXX_EXPORT std::string faker::location::longitude (Precision precision=Precision::FourDp)
 Generates a random longitude.
 
FAKER_CXX_EXPORT std::string_view faker::location::direction ()
 Generates a random direction from cardinal and ordinal directions.
 
FAKER_CXX_EXPORT std::string_view faker::location::timeZone ()
 Generates a random time zone.