-
-
-
116 if (data.size() == 0)
-
-
118 throw std::invalid_argument{
"Data is empty."};
-
-
-
121 const auto index = number::integer<size_t>(data.size() - 1);
-
-
123 return *(data.begin() + index);
-
+
+
+
+
+
+
117 if (data.size() == 0)
+
+
119 throw std::invalid_argument{
"Data is empty."};
+
+
+
122 const auto index = number::integer<size_t>(data.size() - 1);
+
+
124 return *(data.begin() + index);
+
-
-
-
-
-
-
-
-
145 throw std::invalid_argument{
"Data is empty."};
-
-
-
-
-
150 static std::mt19937 pseudoRandomGenerator(std::random_device{}());
-
-
152 std::sample(data.begin(), data.end(), &item, 1, pseudoRandomGenerator);
-
-
-
+
+
+
+
+
+
+
+
146 throw std::invalid_argument{
"Data is empty."};
+
+
+
+
+
151 static std::mt19937 pseudoRandomGenerator(std::random_device{}());
+
+
153 std::sample(data.begin(), data.end(), &item, 1, pseudoRandomGenerator);
+
+
+
-
-
-
-
-
-
-
-
+
+
+
-
-
-
-
-
-
-
-
183 throw std::invalid_argument{
"Data is empty."};
-
-
-
186 const auto sumOfWeights =
-
187 std::accumulate(data.begin(), data.end(), 0u,
-
188 [](
unsigned sum,
const WeightedElement<T>& element) { return sum + element.weight; });
-
-
190 if (sumOfWeights == 0u)
-
-
192 throw std::invalid_argument{
"Sum of weights is zero."};
-
-
-
195 const std::integral
auto targetWeightValue = number::integer<unsigned>(1, sumOfWeights);
-
-
197 unsigned currentSum = 0;
-
-
199 size_t currentIdx = 0;
-
-
201 while (currentIdx < data.size())
-
-
203 currentSum += data[currentIdx].weight;
-
-
205 if (currentSum >= targetWeightValue)
-
-
-
-
-
-
-
-
213 return data.at(currentIdx).value;
-
+
+
+
+
+
+
+
+
184 throw std::invalid_argument{
"Data is empty."};
+
+
+
187 const auto sumOfWeights =
+
188 std::accumulate(data.begin(), data.end(), 0u,
+
189 [](
unsigned sum,
const WeightedElement<T>& element) { return sum + element.weight; });
+
+
191 if (sumOfWeights == 0u)
+
+
193 throw std::invalid_argument{
"Sum of weights is zero."};
+
+
+
196 const std::integral
auto targetWeightValue = number::integer<unsigned>(1, sumOfWeights);
+
+
198 unsigned currentSum = 0;
+
+
200 size_t currentIdx = 0;
+
+
202 while (currentIdx < data.size())
+
+
204 currentSum += data[currentIdx].weight;
+
+
206 if (currentSum >= targetWeightValue)
+
+
+
+
+
+
+
+
214 return data.at(currentIdx).value;
+
-
-
-
-
-
-
-
-
-
-
254 throw std::runtime_error(
"Object is empty.");
-
-
-
257 std::vector<typename T::key_type> keys;
-
-
259 for (
const auto& entry : object)
-
-
261 keys.push_back(entry.first);
-
-
-
-
+
+
+
+
+
+
+
+
+
+
255 throw std::runtime_error(
"Object is empty.");
+
+
+
258 std::vector<typename T::key_type> keys;
+
+
260 for (
const auto& entry : object)
+
+
262 keys.push_back(entry.first);
+
+
+
+
-
-
283template <
typename TResult>
-
-
284TResult
maybe(std::function<TResult()> callback,
double probability = 0.5)
-
-
-
-
-
-
-
-
+
+
284template <
typename TResult>
+
+
285TResult
maybe(std::function<TResult()> callback,
double probability = 0.5)
+
+
+
+
+
+
+
+
-
-
308template <
typename T, std::
size_t N>
-
-
309std::vector<T>
toVector(
const std::array<T, N>& arr)
-
-
-
-
313 vec.insert(vec.end(), arr.begin(), arr.end());
-
-
+
+
309template <
typename T, std::
size_t N>
+
+
310std::vector<T>
toVector(
const std::array<T, N>& arr)
+
+
+
+
314 vec.insert(vec.end(), arr.begin(), arr.end());
+
+
-
-
-
-
-
-
-
+
+
+
+
351FAKER_CXX_EXPORT std::string
replaceCreditCardSymbols(
const std::string& inputString =
"6453-####-####-####-###L",
char symbol =
'#');
+
+
+
-
bool boolean()
Returns a random boolean.
-
-
std::string replaceCreditCardSymbols(const std::string &inputString="6453-####-####-####-###L", char symbol='#')
Returns credit card schema with replaced symbols and patterns in a credit card including Luhn checksu...
-
T setElement(const std::set< T > &data)
Get a random element from a std::set.
Definition Helper.h:141
-
std::string shuffleString(std::string data)
Returns shuffled std::string.
-
std::string regexpStyleStringParse(const std::string &input)
Returns the replaced regex-like expression in the string with matching values.
-
T::key_type objectKey(const T &object)
Returns a random key from given object.
Definition Helper.h:250
-
TResult maybe(std::function< TResult()> callback, double probability=0.5)
Returns the result of the callback if the probability check was successful, otherwise empty string.
Definition Helper.h:284
-
T arrayElement(std::span< const T > data)
Get a random element from an STL container.
Definition Helper.h:33
-
std::string replaceSymbolWithNumber(const std::string &str, const char &symbol='#')
Returns the given string parsed symbol by symbol and replaced the placeholders with digits ("0" - "9"...
-
std::vector< T > toVector(const std::array< T, N > &arr)
Returns a vector equivalent to the given array.
Definition Helper.h:309
-
T weightedArrayElement(const std::vector< WeightedElement< T > > &data)
Get a random element by weight from a vector.
Definition Helper.h:179
-
-
unsigned weight
Definition Helper.h:160
-
T value
Definition Helper.h:161
+
FAKER_CXX_EXPORT bool boolean()
Returns a random boolean.
+
+
FAKER_CXX_EXPORT std::string replaceCreditCardSymbols(const std::string &inputString="6453-####-####-####-###L", char symbol='#')
Returns credit card schema with replaced symbols and patterns in a credit card including Luhn checksu...
+
T setElement(const std::set< T > &data)
Get a random element from a std::set.
Definition Helper.h:142
+
FAKER_CXX_EXPORT std::string regexpStyleStringParse(const std::string &input)
Returns the replaced regex-like expression in the string with matching values.
+
FAKER_CXX_EXPORT std::string shuffleString(std::string data)
Returns shuffled std::string.
+
T::key_type objectKey(const T &object)
Returns a random key from given object.
Definition Helper.h:251
+
TResult maybe(std::function< TResult()> callback, double probability=0.5)
Returns the result of the callback if the probability check was successful, otherwise empty string.
Definition Helper.h:285
+
T arrayElement(std::span< const T > data)
Get a random element from an STL container.
Definition Helper.h:34
+
std::vector< T > toVector(const std::array< T, N > &arr)
Returns a vector equivalent to the given array.
Definition Helper.h:310
+
T weightedArrayElement(const std::vector< WeightedElement< T > > &data)
Get a random element by weight from a vector.
Definition Helper.h:180
+
FAKER_CXX_EXPORT std::string replaceSymbolWithNumber(const std::string &str, const char &symbol='#')
Returns the given string parsed symbol by symbol and replaced the placeholders with digits ("0" - "9"...
+
+
unsigned weight
Definition Helper.h:161
+
T value
Definition Helper.h:162
diff --git a/Image_8h.html b/Image_8h.html
index f0f6b842e..7e14ce393 100644
--- a/Image_8h.html
+++ b/Image_8h.html
@@ -104,16 +104,19 @@
#include <optional>
#include <string_view>
+#include "faker-cxx/Export.h"
diff --git a/Internet_8h.html b/Internet_8h.html
index a081f0950..cd68c7134 100644
--- a/Internet_8h.html
+++ b/Internet_8h.html
@@ -111,23 +111,26 @@
#include <optional>
#include <string>
#include <string_view>
+
#include "faker-cxx/Export.h"
#include "types/Country.h"
@@ -185,72 +188,72 @@
|
-std::string | faker::internet::username (std::optional< std::string > firstName=std::nullopt, std::optional< std::string > lastName=std::nullopt, Country country=Country::Usa) |
- | Generates a username using the given person's name as base.
|
- |
-std::string | faker::internet::email (std::optional< std::string > firstName=std::nullopt, std::optional< std::string > lastName=std::nullopt, std::optional< std::string > emailHost=std::nullopt) |
- | Generates an email address using the given person's name as base.
|
- |
-std::string | faker::internet::exampleEmail (std::optional< std::string > firstName=std::nullopt, std::optional< std::string > lastName=std::nullopt) |
- | Generates an email address using the given person's name as base with example domain.
|
- |
-std::string | faker::internet::password (int length=15, const PasswordOptions &options={}) |
- | Generates a random password-like string. Do not use this method for generating actual passwords for users. Since the source of the randomness is not cryptographically secure, neither is this generator.
|
- |
-std::string_view | faker::internet::emoji (std::optional< EmojiType > type=std::nullopt) |
- | Returns a random emoji.
|
- |
-bool | faker::internet::checkIfEmojiIsValid (const std::string &emojiToCheck) |
- | Verify that a given emoji is valid.
|
- |
-std::string_view | faker::internet::protocol () |
- | Returns a random web protocol. Either `http` or `https`.
|
- |
-std::string_view | faker::internet::httpMethod () |
- | Generates a random http method name.
|
- |
-unsigned | faker::internet::httpStatusCode (std::optional< HttpResponseType > responseType=std::nullopt) |
- | Returns a random http status code.
|
- |
-std::string_view | faker::internet::httpRequestHeader () |
- | Generates a random http request header.
|
- |
-std::string_view | faker::internet::httpResponseHeader () |
- | Generates a random http response header.
|
- |
-std::string_view | faker::internet::httpMediaType () |
- | Generates a random http media type.
|
- |
-std::string | faker::internet::ipv4 (const IPv4Class &ipv4class=IPv4Class::C) |
- | Returns a string containing randomized ipv4 address of the given class.
|
- |
-std::string | faker::internet::ipv4 (const std::array< unsigned int, 4 > &baseIpv4Address, const std::array< unsigned int, 4 > &generationMask) |
- | Returns a string containing randomized ipv4 address based on given base address and mask.
|
- |
-std::string | faker::internet::ipv6 () |
- | Returns a string containing randomized ipv6 address.
|
- |
-std::string | faker::internet::mac (const std::string &sep=":") |
- | Returns a generated random mac address.
|
- |
-unsigned | faker::internet::port () |
- | Generates a random port.
|
- |
-std::string | faker::internet::url (const WebProtocol &webProtocol=WebProtocol::Https) |
- | Generates a random url.
|
- |
-std::string | faker::internet::domainName () |
- | Generates a random domain name.
|
- |
-std::string | faker::internet::domainWord () |
- | Generates a random domain word.
|
- |
-std::string_view | faker::internet::domainSuffix () |
- | Generates a random domain suffix.
|
- |
-std::string | faker::internet::anonymousUsername (unsigned maxLength) |
- | Generates a random username.
|
- |
+FAKER_CXX_EXPORT std::string | faker::internet::username (std::optional< std::string > firstName=std::nullopt, std::optional< std::string > lastName=std::nullopt, Country country=Country::Usa) |
+ | Generates a username using the given person's name as base.
|
+ |
+FAKER_CXX_EXPORT std::string | faker::internet::email (std::optional< std::string > firstName=std::nullopt, std::optional< std::string > lastName=std::nullopt, std::optional< std::string > emailHost=std::nullopt) |
+ | Generates an email address using the given person's name as base.
|
+ |
+FAKER_CXX_EXPORT std::string | faker::internet::exampleEmail (std::optional< std::string > firstName=std::nullopt, std::optional< std::string > lastName=std::nullopt) |
+ | Generates an email address using the given person's name as base with example domain.
|
+ |
+FAKER_CXX_EXPORT std::string | faker::internet::password (int length=15, const PasswordOptions &options={}) |
+ | Generates a random password-like string. Do not use this method for generating actual passwords for users. Since the source of the randomness is not cryptographically secure, neither is this generator.
|
+ |
+FAKER_CXX_EXPORT std::string_view | faker::internet::emoji (std::optional< EmojiType > type=std::nullopt) |
+ | Returns a random emoji.
|
+ |
+FAKER_CXX_EXPORT bool | faker::internet::checkIfEmojiIsValid (const std::string &emojiToCheck) |
+ | Verify that a given emoji is valid.
|
+ |
+FAKER_CXX_EXPORT std::string_view | faker::internet::protocol () |
+ | Returns a random web protocol. Either `http` or `https`.
|
+ |
+FAKER_CXX_EXPORT std::string_view | faker::internet::httpMethod () |
+ | Generates a random http method name.
|
+ |
+FAKER_CXX_EXPORT unsigned | faker::internet::httpStatusCode (std::optional< HttpResponseType > responseType=std::nullopt) |
+ | Returns a random http status code.
|
+ |
+FAKER_CXX_EXPORT std::string_view | faker::internet::httpRequestHeader () |
+ | Generates a random http request header.
|
+ |
+FAKER_CXX_EXPORT std::string_view | faker::internet::httpResponseHeader () |
+ | Generates a random http response header.
|
+ |
+FAKER_CXX_EXPORT std::string_view | faker::internet::httpMediaType () |
+ | Generates a random http media type.
|
+ |
+FAKER_CXX_EXPORT std::string | faker::internet::ipv4 (const IPv4Class &ipv4class=IPv4Class::C) |
+ | Returns a string containing randomized ipv4 address of the given class.
|
+ |
+FAKER_CXX_EXPORT std::string | faker::internet::ipv4 (const std::array< unsigned int, 4 > &baseIpv4Address, const std::array< unsigned int, 4 > &generationMask) |
+ | Returns a string containing randomized ipv4 address based on given base address and mask.
|
+ |
+FAKER_CXX_EXPORT std::string | faker::internet::ipv6 () |
+ | Returns a string containing randomized ipv6 address.
|
+ |
+FAKER_CXX_EXPORT std::string | faker::internet::mac (const std::string &sep=":") |
+ | Returns a generated random mac address.
|
+ |
+FAKER_CXX_EXPORT unsigned | faker::internet::port () |
+ | Generates a random port.
|
+ |
+FAKER_CXX_EXPORT std::string | faker::internet::url (const WebProtocol &webProtocol=WebProtocol::Https) |
+ | Generates a random url.
|
+ |
+FAKER_CXX_EXPORT std::string | faker::internet::domainName () |
+ | Generates a random domain name.
|
+ |
+FAKER_CXX_EXPORT std::string | faker::internet::domainWord () |
+ | Generates a random domain word.
|
+ |
+FAKER_CXX_EXPORT std::string_view | faker::internet::domainSuffix () |
+ | Generates a random domain suffix.
|
+ |
+FAKER_CXX_EXPORT std::string | faker::internet::anonymousUsername (unsigned maxLength) |
+ | Generates a random username.
|
+ |
diff --git a/Internet_8h.js b/Internet_8h.js
index 47877fde4..3eecf010f 100644
--- a/Internet_8h.js
+++ b/Internet_8h.js
@@ -29,26 +29,26 @@ var Internet_8h =
[ "Http", "Internet_8h.html#ac9fba82884b9a80bff2604b01135c7eca9d4d43de68f0b3555d5a5ef5dc05bb95", null ],
[ "Https", "Internet_8h.html#ac9fba82884b9a80bff2604b01135c7eca2badb7fa3e862298a650909d45c5066b", null ]
] ],
- [ "anonymousUsername", "Internet_8h.html#a7984e90922498f1299cecd31c5f575a7", null ],
- [ "checkIfEmojiIsValid", "Internet_8h.html#a0746027aba19bc27dbe5bca73707f0bc", null ],
- [ "domainName", "Internet_8h.html#acb5cc643b943d68ccf0b122ef3d15ced", null ],
- [ "domainSuffix", "Internet_8h.html#ad0f6d0599df66e819d84903c5d1c04cd", null ],
- [ "domainWord", "Internet_8h.html#a2d0343d5392ac333fecf27fab9567cbc", null ],
- [ "email", "Internet_8h.html#a5082d31654a79c42189bd74ebcd9f177", null ],
- [ "emoji", "Internet_8h.html#acc05c79fd96761953b3f01f819536180", null ],
- [ "exampleEmail", "Internet_8h.html#aed462baedf55f4a57818f2d47aa69961", null ],
- [ "httpMediaType", "Internet_8h.html#ae9d32d02503d82a6bda4fdaeac223fec", null ],
- [ "httpMethod", "Internet_8h.html#a9b548a60dd56b4caf3adda3dd36fe531", null ],
- [ "httpRequestHeader", "Internet_8h.html#ad7ebdb868d20077439327c5630d77521", null ],
- [ "httpResponseHeader", "Internet_8h.html#a8c549b1e91e70508dd706eecbb5d04c3", null ],
- [ "httpStatusCode", "Internet_8h.html#addf925e625f04b4d77cd1a051bc03491", null ],
- [ "ipv4", "Internet_8h.html#a1867349f60b73f441e7b42b3d1550503", null ],
- [ "ipv4", "Internet_8h.html#a8cd0c9ec4dcca31fce9b9b516e6fe40a", null ],
- [ "ipv6", "Internet_8h.html#a6f44672173ac347db321ea45c5fbc108", null ],
- [ "mac", "Internet_8h.html#aa81ae4efbe46bdf5c5bfba6bfcd62d8c", null ],
- [ "password", "Internet_8h.html#af1e915a97047baa2c43be9d16c96324f", null ],
- [ "port", "Internet_8h.html#a0e2cd71dd1429486c255254161fe3e8d", null ],
- [ "protocol", "Internet_8h.html#a39aa3144b0c1cad63c72cf0270bf3a2a", null ],
- [ "url", "Internet_8h.html#a92cc6255f875a1386b4ac47edba22b05", null ],
- [ "username", "Internet_8h.html#a6873a40b7b83d3227d0401a7c0c6fa03", null ]
+ [ "anonymousUsername", "Internet_8h.html#a0e22ade4bf001c126dd22e5c72506031", null ],
+ [ "checkIfEmojiIsValid", "Internet_8h.html#ae1a9eb9071b9843c891c065fd87345e7", null ],
+ [ "domainName", "Internet_8h.html#a7233a627869287ae8dc81a1dd8324fd2", null ],
+ [ "domainSuffix", "Internet_8h.html#a9332c1bd3d5fb1111e2fcc5fa04131a7", null ],
+ [ "domainWord", "Internet_8h.html#a49fa76d8f033206ed91f965fd625b2cf", null ],
+ [ "email", "Internet_8h.html#a640c9552088825e8f39eb42b61399c6e", null ],
+ [ "emoji", "Internet_8h.html#a40ee9376026f9017e3dcc90a8f53b7bc", null ],
+ [ "exampleEmail", "Internet_8h.html#a73507aa24e5f1d8b74e0db4cdee32ee9", null ],
+ [ "httpMediaType", "Internet_8h.html#aae3de074437688cc7aa5d4926a184182", null ],
+ [ "httpMethod", "Internet_8h.html#a351eb5eed7fd927d6a2869263b56e852", null ],
+ [ "httpRequestHeader", "Internet_8h.html#a298bf281d43e08c58448962c094605ab", null ],
+ [ "httpResponseHeader", "Internet_8h.html#abac7e3c94d09f0f7a381f64a8032684e", null ],
+ [ "httpStatusCode", "Internet_8h.html#a18bb9341e2a6b1745f93bb56acf973ea", null ],
+ [ "ipv4", "Internet_8h.html#a9ec5e80a347ec1ad2a53f85588b510dc", null ],
+ [ "ipv4", "Internet_8h.html#af6b363e2801aca6b2a686e80ee24c7c3", null ],
+ [ "ipv6", "Internet_8h.html#aa1ebac0fa8bab72b27017f6736b7c51f", null ],
+ [ "mac", "Internet_8h.html#aeb2e69d9d72e640a64d4bda2d55b45fe", null ],
+ [ "password", "Internet_8h.html#a88b044d010594ec94fa7127efb7c8bb1", null ],
+ [ "port", "Internet_8h.html#af7fe45110325fe2a80fe3cc776ac2ed2", null ],
+ [ "protocol", "Internet_8h.html#acefc699b5b4a93a1f1538cbb49331114", null ],
+ [ "url", "Internet_8h.html#a005caa05149d90b3854aef6a4ccdf27e", null ],
+ [ "username", "Internet_8h.html#aae749a34446ecccdddcbba60868c4746", null ]
];
\ No newline at end of file
diff --git a/Internet_8h__incl.map b/Internet_8h__incl.map
index 0d30470d1..8068795a9 100644
--- a/Internet_8h__incl.map
+++ b/Internet_8h__incl.map
@@ -1,13 +1,15 @@
diff --git a/Internet_8h__incl.md5 b/Internet_8h__incl.md5
index 432be79fa..edeb8bf7a 100644
--- a/Internet_8h__incl.md5
+++ b/Internet_8h__incl.md5
@@ -1 +1 @@
-ef8d2b1901ef5ccdf3e2b1d034ca1576
\ No newline at end of file
+ad51b5dc7fea594b4fdf2c9bf3ab880f
\ No newline at end of file
diff --git a/Internet_8h__incl.png b/Internet_8h__incl.png
index 2b28e8ead..957b57965 100644
Binary files a/Internet_8h__incl.png and b/Internet_8h__incl.png differ
diff --git a/Internet_8h_source.html b/Internet_8h_source.html
index e0cd17f2f..62304a7aa 100644
--- a/Internet_8h_source.html
+++ b/Internet_8h_source.html
@@ -109,140 +109,144 @@
-
8#include "types/Country.h"
-
-
-
-
-
-
-
-
-
-
-
-
-
+
8#include "faker-cxx/Export.h"
+
9#include "types/Country.h"
+
+
+
+
+
-
-
-
-
-
-
-
+
+
-
-
-
-
-
-
-
-
+
+
-
-
-
-
-
-
-
-
-
+
+
+
+
+
37 bool upperLetters =
true;
+
38 bool lowerLetters =
true;
+
+
+
-
-
57 std::string
username(std::optional<std::string> firstName = std::nullopt,
-
58 std::optional<std::string> lastName = std::nullopt, Country country = Country::Usa);
-
-
77 std::string
email(std::optional<std::string> firstName = std::nullopt,
-
78 std::optional<std::string> lastName = std::nullopt,
-
79 std::optional<std::string> emailHost = std::nullopt);
-
-
93 std::string
exampleEmail(std::optional<std::string> firstName = std::nullopt,
-
94 std::optional<std::string> lastName = std::nullopt);
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
58 FAKER_CXX_EXPORT std::string
username(std::optional<std::string> firstName = std::nullopt,
+
59 std::optional<std::string> lastName = std::nullopt, Country country = Country::Usa);
+
+
78 FAKER_CXX_EXPORT std::string
email(std::optional<std::string> firstName = std::nullopt,
+
79 std::optional<std::string> lastName = std::nullopt,
+
80 std::optional<std::string> emailHost = std::nullopt);
+
+
94 FAKER_CXX_EXPORT std::string
exampleEmail(std::optional<std::string> firstName = std::nullopt,
+
95 std::optional<std::string> lastName = std::nullopt);
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
137 std::string_view
emoji(std::optional<EmojiType> type = std::nullopt);
-
-
-
-
-
-
-
-
186 unsigned httpStatusCode(std::optional<HttpResponseType> responseType = std::nullopt);
-
-
-
-
-
-
-
-
-
-
252 std::string
ipv4(
const std::array<unsigned int, 4>& baseIpv4Address,
-
253 const std::array<unsigned int, 4>& generationMask);
-
-
-
-
277 std::string
mac(
const std::string& sep =
":");
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
138 FAKER_CXX_EXPORT std::string_view
emoji(std::optional<EmojiType> type = std::nullopt);
+
+
+
+
+
+
+
+
187 FAKER_CXX_EXPORT
unsigned httpStatusCode(std::optional<HttpResponseType> responseType = std::nullopt);
+
+
+
+
+
+
+
+
+
+
253 FAKER_CXX_EXPORT std::string
ipv4(
const std::array<unsigned int, 4>& baseIpv4Address,
+
254 const std::array<unsigned int, 4>& generationMask);
+
+
265 FAKER_CXX_EXPORT std::string
ipv6();
+
+
278 FAKER_CXX_EXPORT std::string
mac(
const std::string& sep =
":");
+
+
289 FAKER_CXX_EXPORT
unsigned port();
+
+
+
+
+
+
+
+
+
+
+
-
-
IPv4Class
Definition Internet.h:28
+
+
FAKER_CXX_EXPORT std::string url(const WebProtocol &webProtocol=WebProtocol::Https)
Generates a random url.
+
IPv4Class
Definition Internet.h:29
-
bool checkIfEmojiIsValid(const std::string &emojiToCheck)
Verify that a given emoji is valid.
-
unsigned port()
Generates a random port.
-
std::string ipv4(const IPv4Class &ipv4class=IPv4Class::C)
Returns a string containing randomized ipv4 address of the given class.
-
HttpResponseType
Definition Internet.h:13
+
FAKER_CXX_EXPORT std::string anonymousUsername(unsigned maxLength)
Generates a random username.
+
FAKER_CXX_EXPORT unsigned httpStatusCode(std::optional< HttpResponseType > responseType=std::nullopt)
Returns a random http status code.
+
HttpResponseType
Definition Internet.h:14
-
std::string domainWord()
Generates a random domain word.
-
std::string_view protocol()
Returns a random web protocol. Either `http` or `https`.
-
std::string email(std::optional< std::string > firstName=std::nullopt, std::optional< std::string > lastName=std::nullopt, std::optional< std::string > emailHost=std::nullopt)
Generates an email address using the given person's name as base.
-
std::string username(std::optional< std::string > firstName=std::nullopt, std::optional< std::string > lastName=std::nullopt, Country country=Country::Usa)
Generates a username using the given person's name as base.
-
std::string ipv6()
Returns a string containing randomized ipv6 address.
-
std::string anonymousUsername(unsigned maxLength)
Generates a random username.
-
std::string_view httpResponseHeader()
Generates a random http response header.
-
std::string url(const WebProtocol &webProtocol=WebProtocol::Https)
Generates a random url.
-
std::string_view httpMethod()
Generates a random http method name.
-
std::string mac(const std::string &sep=":")
Returns a generated random mac address.
-
EmojiType
Definition Internet.h:112
+
FAKER_CXX_EXPORT std::string_view httpRequestHeader()
Generates a random http request header.
+
FAKER_CXX_EXPORT std::string_view httpMethod()
Generates a random http method name.
+
FAKER_CXX_EXPORT std::string_view emoji(std::optional< EmojiType > type=std::nullopt)
Returns a random emoji.
+
FAKER_CXX_EXPORT std::string domainWord()
Generates a random domain word.
+
FAKER_CXX_EXPORT std::string email(std::optional< std::string > firstName=std::nullopt, std::optional< std::string > lastName=std::nullopt, std::optional< std::string > emailHost=std::nullopt)
Generates an email address using the given person's name as base.
+
FAKER_CXX_EXPORT std::string domainName()
Generates a random domain name.
+
FAKER_CXX_EXPORT std::string exampleEmail(std::optional< std::string > firstName=std::nullopt, std::optional< std::string > lastName=std::nullopt)
Generates an email address using the given person's name as base with example domain.
+
FAKER_CXX_EXPORT std::string password(int length=15, const PasswordOptions &options={})
Generates a random password-like string. Do not use this method for generating actual passwords for u...
+
FAKER_CXX_EXPORT std::string_view domainSuffix()
Generates a random domain suffix.
+
FAKER_CXX_EXPORT std::string ipv4(const IPv4Class &ipv4class=IPv4Class::C)
Returns a string containing randomized ipv4 address of the given class.
+
FAKER_CXX_EXPORT std::string ipv6()
Returns a string containing randomized ipv6 address.
+
FAKER_CXX_EXPORT std::string_view httpMediaType()
Generates a random http media type.
+
FAKER_CXX_EXPORT std::string username(std::optional< std::string > firstName=std::nullopt, std::optional< std::string > lastName=std::nullopt, Country country=Country::Usa)
Generates a username using the given person's name as base.
+
EmojiType
Definition Internet.h:113
@@ -253,22 +257,15 @@
-
WebProtocol
Definition Internet.h:22
+
FAKER_CXX_EXPORT std::string_view httpResponseHeader()
Generates a random http response header.
+
WebProtocol
Definition Internet.h:23
-
std::string domainName()
Generates a random domain name.
-
std::string_view emoji(std::optional< EmojiType > type=std::nullopt)
Returns a random emoji.
-
std::string_view domainSuffix()
Generates a random domain suffix.
-
std::string_view httpRequestHeader()
Generates a random http request header.
-
unsigned httpStatusCode(std::optional< HttpResponseType > responseType=std::nullopt)
Returns a random http status code.
-
std::string_view httpMediaType()
Generates a random http media type.
-
std::string exampleEmail(std::optional< std::string > firstName=std::nullopt, std::optional< std::string > lastName=std::nullopt)
Generates an email address using the given person's name as base with example domain.
-
std::string password(int length=15, const PasswordOptions &options={})
Generates a random password-like string. Do not use this method for generating actual passwords for u...
-
-
bool symbols
Definition Internet.h:39
-
bool numbers
Definition Internet.h:38
-
bool upperLetters
Definition Internet.h:36
-
bool lowerLetters
Definition Internet.h:37
+
FAKER_CXX_EXPORT std::string_view protocol()
Returns a random web protocol. Either `http` or `https`.
+
FAKER_CXX_EXPORT bool checkIfEmojiIsValid(const std::string &emojiToCheck)
Verify that a given emoji is valid.
+
FAKER_CXX_EXPORT std::string mac(const std::string &sep=":")
Returns a generated random mac address.
+
FAKER_CXX_EXPORT unsigned port()
Generates a random port.
+
diff --git a/Location_8h.html b/Location_8h.html
index d3a560488..148920906 100644
--- a/Location_8h.html
+++ b/Location_8h.html
@@ -107,17 +107,20 @@
#include <string_view>
+#include "faker-cxx/Export.h"
#include "types/Precision.h"
@@ -157,45 +160,45 @@
diff --git a/Location_8h.js b/Location_8h.js
index 5c39202ac..a55bb75b7 100644
--- a/Location_8h.js
+++ b/Location_8h.js
@@ -17,17 +17,17 @@ var Location_8h =
[ "Ukraine", "Location_8h.html#aff490c4284a54833b21a8d4de3d0b030af01fc92b23faa973f3492a23d5a705c5", null ],
[ "Usa", "Location_8h.html#aff490c4284a54833b21a8d4de3d0b030a867f8282a36dd6525c3d40744a92fcf8", null ]
] ],
- [ "buildingNumber", "Location_8h.html#a09b8498a7d2d89f02e0002e494b4c41c", null ],
- [ "city", "Location_8h.html#a067df038502723c706785d79bc18f4cf", null ],
- [ "country", "Location_8h.html#a31317ea37043cb3b0f2cdc85c121424b", null ],
- [ "countryCode", "Location_8h.html#a0b8614d8dd7e662d30d204a17eb5b7fe", null ],
- [ "direction", "Location_8h.html#a3143e2d38681d13edc6750d6d8b5184a", null ],
- [ "latitude", "Location_8h.html#a52b5a116bca1c7a1a98b45bdad013ba8", null ],
- [ "longitude", "Location_8h.html#aa0bacdc2268c1cbffb1d5eb74373d041", null ],
- [ "secondaryAddress", "Location_8h.html#a4b96853a96e548cff475f1170b286b10", null ],
- [ "state", "Location_8h.html#af3882d9587e1ce076387b07a692fb5f6", null ],
- [ "street", "Location_8h.html#a06463ed236a1f2dbe60f2a84f9ce0743", null ],
- [ "streetAddress", "Location_8h.html#a633a99e95359a5ad5d8e9bbae1faeb77", null ],
- [ "timeZone", "Location_8h.html#a014218ed9be5b10bda09800d51831e23", null ],
- [ "zipCode", "Location_8h.html#a49e27bccb036eb542fea02a4e6eaaaa6", null ]
+ [ "buildingNumber", "Location_8h.html#acfcae308deae2a89a99a9c2d7721d4d7", null ],
+ [ "city", "Location_8h.html#a5e0b6b68297b82fe7cbabd6b2b644905", null ],
+ [ "country", "Location_8h.html#abf141f8017e0b97eafedb1c0e2c1037a", null ],
+ [ "countryCode", "Location_8h.html#a828be7aebeeed04b9afc5019c0b54344", null ],
+ [ "direction", "Location_8h.html#ad7add8bde67bede1c36d3834cb7fc463", null ],
+ [ "latitude", "Location_8h.html#a6f11c5eeb8a4a61c0bb36cc98fe93e06", null ],
+ [ "longitude", "Location_8h.html#a516e1c44a2c518d20eac0f95b664b04c", null ],
+ [ "secondaryAddress", "Location_8h.html#acdabffd579118713312582c082c33489", null ],
+ [ "state", "Location_8h.html#a4d00638b4a23f205beca9030a93aa1d6", null ],
+ [ "street", "Location_8h.html#a310ef73ae962c41f0fb793e932683881", null ],
+ [ "streetAddress", "Location_8h.html#ae61de04e37a0c3ef796c2e2606accfeb", null ],
+ [ "timeZone", "Location_8h.html#a6ed54826ac93e3184024ab276321ca3b", null ],
+ [ "zipCode", "Location_8h.html#a670448b0a8109a4b14b899231fa5da2d", null ]
];
\ No newline at end of file
diff --git a/Location_8h__incl.map b/Location_8h__incl.map
index 3571c0c30..d049b11a5 100644
--- a/Location_8h__incl.map
+++ b/Location_8h__incl.map
@@ -1,7 +1,9 @@
diff --git a/Location_8h__incl.md5 b/Location_8h__incl.md5
index 2cc2f220a..4d7f7b1fd 100644
--- a/Location_8h__incl.md5
+++ b/Location_8h__incl.md5
@@ -1 +1 @@
-4a289def78345e9b7173725dd6712d71
\ No newline at end of file
+c7ca41d87f406f9477fa81a7dbb80361
\ No newline at end of file
diff --git a/Location_8h__incl.png b/Location_8h__incl.png
index f10e4db64..3c80b8786 100644
Binary files a/Location_8h__incl.png and b/Location_8h__incl.png differ
diff --git a/Location_8h_source.html b/Location_8h_source.html
index dffdbf195..322a0ec03 100644
--- a/Location_8h_source.html
+++ b/Location_8h_source.html
@@ -106,74 +106,75 @@
-
5#include "types/Precision.h"
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
5#include "faker-cxx/Export.h"
+
6#include "types/Precision.h"
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
154std::string
latitude(Precision precision = Precision::FourDp);
-
-
167std::string
longitude(Precision precision = Precision::FourDp);
-
-
-
-
-
+
+
38FAKER_CXX_EXPORT std::string_view
country();
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
155FAKER_CXX_EXPORT std::string
latitude(Precision precision = Precision::FourDp);
+
+
168FAKER_CXX_EXPORT std::string
longitude(Precision precision = Precision::FourDp);
+
+
+
+
+
-
-
std::string_view timeZone()
Generates a random time zone.
-
std::string street(AddressCountry country=AddressCountry::Usa)
Returns a random street for given country.
-
std::string city(AddressCountry country=AddressCountry::Usa)
Returns a random city for given country.
-
std::string buildingNumber(AddressCountry country=AddressCountry::Usa)
Returns a random building number for given country.
-
std::string_view countryCode()
Returns a random country code.
-
std::string_view country()
Returns a random country name.
-
std::string_view direction()
Generates a random direction from cardinal and ordinal directions.
-
std::string zipCode(AddressCountry country=AddressCountry::Usa)
Returns a random zip code for given country.
-
std::string secondaryAddress(AddressCountry country=AddressCountry::Usa)
Returns a random secondary address number for given country. This refers to a specific location at a ...
-
std::string latitude(Precision precision=Precision::FourDp)
Generates a random latitude.
-
std::string streetAddress(AddressCountry country=AddressCountry::Usa)
Returns a random street address for given country.
-
std::string longitude(Precision precision=Precision::FourDp)
Generates a random longitude.
-
std::string_view state(AddressCountry country=AddressCountry::Usa)
Returns a random state for a given country.
-
AddressCountry
Definition Location.h:10
+
+
FAKER_CXX_EXPORT std::string street(AddressCountry country=AddressCountry::Usa)
Returns a random street for given country.
+
FAKER_CXX_EXPORT std::string_view state(AddressCountry country=AddressCountry::Usa)
Returns a random state for a given country.
+
FAKER_CXX_EXPORT std::string longitude(Precision precision=Precision::FourDp)
Generates a random longitude.
+
FAKER_CXX_EXPORT std::string city(AddressCountry country=AddressCountry::Usa)
Returns a random city for given country.
+
FAKER_CXX_EXPORT std::string zipCode(AddressCountry country=AddressCountry::Usa)
Returns a random zip code for given country.
+
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_view country()
Returns a random country name.
+
FAKER_CXX_EXPORT std::string secondaryAddress(AddressCountry country=AddressCountry::Usa)
Returns a random secondary address number for given country. This refers to a specific location at a ...
+
FAKER_CXX_EXPORT std::string buildingNumber(AddressCountry country=AddressCountry::Usa)
Returns a random building number for given country.
+
FAKER_CXX_EXPORT std::string_view direction()
Generates a random direction from cardinal and ordinal directions.
+
FAKER_CXX_EXPORT std::string streetAddress(AddressCountry country=AddressCountry::Usa)
Returns a random street address for given country.
+
AddressCountry
Definition Location.h:11
diff --git a/Lorem_8h.html b/Lorem_8h.html
index 394bfd880..45c0a310e 100644
--- a/Lorem_8h.html
+++ b/Lorem_8h.html
@@ -106,14 +106,17 @@
#include <string>
+#include "faker-cxx/Export.h"
@@ -128,27 +131,27 @@
|
-std::string_view | faker::lorem::word () |
- | Returns a random lorem word.
|
- |
-std::string | faker::lorem::words (unsigned numberOfWords=3) |
- | Returns a random lorem words.
|
- |
-std::string | faker::lorem::sentence (unsigned minNumberOfWords=3, unsigned maxNumberOfWords=10) |
- | Returns a random lorem sentence.
|
- |
-std::string | faker::lorem::sentences (unsigned minNumberOfSentences=2, unsigned maxNumberOfSentences=6) |
- | Returns a random lorem sentences.
|
- |
-std::string | faker::lorem::slug (unsigned numberOfWords=3) |
- | Generates a slugified text consisting of the given number of hyphen separated words.
|
- |
-std::string | faker::lorem::paragraph (unsigned minNumberOfSentences=2, unsigned maxNumberOfSentences=6) |
- | Returns a random lorem paragraph.
|
- |
-std::string | faker::lorem::paragraphs (unsigned minNumberOfParagraphs=2, unsigned maxNumberOfParagraphs=4) |
- | Returns a random lorem paragraphs.
|
- |
+FAKER_CXX_EXPORT std::string_view | faker::lorem::word () |
+ | Returns a random lorem word.
|
+ |
+FAKER_CXX_EXPORT std::string | faker::lorem::words (unsigned numberOfWords=3) |
+ | Returns a random lorem words.
|
+ |
+FAKER_CXX_EXPORT std::string | faker::lorem::sentence (unsigned minNumberOfWords=3, unsigned maxNumberOfWords=10) |
+ | Returns a random lorem sentence.
|
+ |
+FAKER_CXX_EXPORT std::string | faker::lorem::sentences (unsigned minNumberOfSentences=2, unsigned maxNumberOfSentences=6) |
+ | Returns a random lorem sentences.
|
+ |
+FAKER_CXX_EXPORT std::string | faker::lorem::slug (unsigned numberOfWords=3) |
+ | Generates a slugified text consisting of the given number of hyphen separated words.
|
+ |
+FAKER_CXX_EXPORT std::string | faker::lorem::paragraph (unsigned minNumberOfSentences=2, unsigned maxNumberOfSentences=6) |
+ | Returns a random lorem paragraph.
|
+ |
+FAKER_CXX_EXPORT std::string | faker::lorem::paragraphs (unsigned minNumberOfParagraphs=2, unsigned maxNumberOfParagraphs=4) |
+ | Returns a random lorem paragraphs.
|
+ |
diff --git a/Lorem_8h.js b/Lorem_8h.js
index e20227947..fcb67ed38 100644
--- a/Lorem_8h.js
+++ b/Lorem_8h.js
@@ -1,10 +1,10 @@
var Lorem_8h =
[
- [ "paragraph", "Lorem_8h.html#a8111a758a08e8c5e1b3bb39388e5abca", null ],
- [ "paragraphs", "Lorem_8h.html#aea97ee6a86fb23528a0c8a6672b94bb7", null ],
- [ "sentence", "Lorem_8h.html#a92ea31975ddf38f5d5559812f3bd1e10", null ],
- [ "sentences", "Lorem_8h.html#aa7cdcb18cb5ab2787431d89336338b2c", null ],
- [ "slug", "Lorem_8h.html#a1a74d4c996ca52d1ae14417285610baf", null ],
- [ "word", "Lorem_8h.html#ae1d59e6c9dd75a6dd9eddfcf5ccdf418", null ],
- [ "words", "Lorem_8h.html#ab8f07baea1dc086f1dd7813468cd93f3", null ]
+ [ "paragraph", "Lorem_8h.html#ac247a6d5e1427f53953ac3fd699e831f", null ],
+ [ "paragraphs", "Lorem_8h.html#a2f5442a6de26bf6bd51ffbf1586cdbe3", null ],
+ [ "sentence", "Lorem_8h.html#a474701bf19dcc2b62a199d540deb96fc", null ],
+ [ "sentences", "Lorem_8h.html#a375063dbea7caebda30aec4a3fd83775", null ],
+ [ "slug", "Lorem_8h.html#a083881e3fc0adfc974bfdb6d09bf8970", null ],
+ [ "word", "Lorem_8h.html#acfe2ea3b024c37b6ab92571404cd6ce4", null ],
+ [ "words", "Lorem_8h.html#ac8ac32eec75e6335ffdd9e7ba42c88e8", null ]
];
\ No newline at end of file
diff --git a/Lorem_8h__incl.map b/Lorem_8h__incl.map
index ebee76239..743db8c1c 100644
--- a/Lorem_8h__incl.map
+++ b/Lorem_8h__incl.map
@@ -1,5 +1,7 @@
diff --git a/Lorem_8h__incl.md5 b/Lorem_8h__incl.md5
index e37d65d4b..486e8e4d7 100644
--- a/Lorem_8h__incl.md5
+++ b/Lorem_8h__incl.md5
@@ -1 +1 @@
-e7e6f0557c9c4466a1dc9fd54618729c
\ No newline at end of file
+655d25055362b604b49325ee2d327085
\ No newline at end of file
diff --git a/Lorem_8h__incl.png b/Lorem_8h__incl.png
index 844590aa6..49e5f4347 100644
Binary files a/Lorem_8h__incl.png and b/Lorem_8h__incl.png differ
diff --git a/Lorem_8h_source.html b/Lorem_8h_source.html
index 1cb859ba7..da43ee6c1 100644
--- a/Lorem_8h_source.html
+++ b/Lorem_8h_source.html
@@ -105,33 +105,34 @@
Go to the documentation of this file.
-
-
-
-
-
-
-
29 std::string
words(
unsigned numberOfWords = 3);
-
-
43 std::string
sentence(
unsigned minNumberOfWords = 3,
unsigned maxNumberOfWords = 10);
-
-
57 std::string
sentences(
unsigned minNumberOfSentences = 2,
unsigned maxNumberOfSentences = 6);
-
-
70 std::string
slug(
unsigned numberOfWords = 3);
-
-
84 std::string
paragraph(
unsigned minNumberOfSentences = 2,
unsigned maxNumberOfSentences = 6);
-
-
101 std::string
paragraphs(
unsigned minNumberOfParagraphs = 2,
unsigned maxNumberOfParagraphs = 4);
-
+
4#include "faker-cxx/Export.h"
+
+
+
+
+
17 FAKER_CXX_EXPORT std::string_view
word();
+
+
30 FAKER_CXX_EXPORT std::string
words(
unsigned numberOfWords = 3);
+
+
44 FAKER_CXX_EXPORT std::string
sentence(
unsigned minNumberOfWords = 3,
unsigned maxNumberOfWords = 10);
+
+
58 FAKER_CXX_EXPORT std::string
sentences(
unsigned minNumberOfSentences = 2,
unsigned maxNumberOfSentences = 6);
+
+
71 FAKER_CXX_EXPORT std::string
slug(
unsigned numberOfWords = 3);
+
+
85 FAKER_CXX_EXPORT std::string
paragraph(
unsigned minNumberOfSentences = 2,
unsigned maxNumberOfSentences = 6);
+
+
102 FAKER_CXX_EXPORT std::string
paragraphs(
unsigned minNumberOfParagraphs = 2,
unsigned maxNumberOfParagraphs = 4);
+
-
-
std::string slug(unsigned numberOfWords=3)
Generates a slugified text consisting of the given number of hyphen separated words.
-
std::string paragraph(unsigned minNumberOfSentences=2, unsigned maxNumberOfSentences=6)
Returns a random lorem paragraph.
-
std::string sentence(unsigned minNumberOfWords=3, unsigned maxNumberOfWords=10)
Returns a random lorem sentence.
-
std::string sentences(unsigned minNumberOfSentences=2, unsigned maxNumberOfSentences=6)
Returns a random lorem sentences.
-
std::string words(unsigned numberOfWords=3)
Returns a random lorem words.
-
std::string_view word()
Returns a random lorem word.
-
std::string paragraphs(unsigned minNumberOfParagraphs=2, unsigned maxNumberOfParagraphs=4)
Returns a random lorem paragraphs.
+
+
FAKER_CXX_EXPORT std::string slug(unsigned numberOfWords=3)
Generates a slugified text consisting of the given number of hyphen separated words.
+
FAKER_CXX_EXPORT std::string paragraphs(unsigned minNumberOfParagraphs=2, unsigned maxNumberOfParagraphs=4)
Returns a random lorem paragraphs.
+
FAKER_CXX_EXPORT std::string sentences(unsigned minNumberOfSentences=2, unsigned maxNumberOfSentences=6)
Returns a random lorem sentences.
+
FAKER_CXX_EXPORT std::string sentence(unsigned minNumberOfWords=3, unsigned maxNumberOfWords=10)
Returns a random lorem sentence.
+
FAKER_CXX_EXPORT std::string paragraph(unsigned minNumberOfSentences=2, unsigned maxNumberOfSentences=6)
Returns a random lorem paragraph.
+
FAKER_CXX_EXPORT std::string words(unsigned numberOfWords=3)
Returns a random lorem words.
+
FAKER_CXX_EXPORT std::string_view word()
Returns a random lorem word.
diff --git a/Medicine_8h.html b/Medicine_8h.html
index 2b7da725c..021b24d5f 100644
--- a/Medicine_8h.html
+++ b/Medicine_8h.html
@@ -106,14 +106,17 @@