diff --git a/Helper_8h_source.html b/Helper_8h_source.html index e8b9c910a..f4f6f4ba3 100644 --- a/Helper_8h_source.html +++ b/Helper_8h_source.html @@ -110,188 +110,217 @@
6#include <set>
7#include <span>
8#include <string>
-
9
-
10#include "Datatype.h"
-
11#include "Number.h"
-
12
-
13namespace faker
-
14{
-
-
15class Helper
+
9#include <vector>
+
10#include <initializer_list>
+
11
+
12#include "Datatype.h"
+
13#include "Number.h"
+
14
+
15namespace faker
16{
-
17public:
-
32 template <class T>
-
-
33 static T arrayElement(std::span<const T> data)
-
34 {
-
35 if (data.empty())
-
36 {
-
37 throw std::invalid_argument{"Data is empty."};
-
38 }
-
39
-
40 const auto index = Number::integer<size_t>(data.size() - 1);
+
+
17class Helper
+
18{
+
19public:
+
34 template <class T>
+
+
35 static T arrayElement(std::span<const T> data)
+
36 {
+
37 if (data.empty())
+
38 {
+
39 throw std::invalid_argument{"Data is empty."};
+
40 }
41
-
42 return data[index];
-
43 }
+
42 const auto index = Number::integer<size_t>(data.size() - 1);
+
43
+
44 return data[index];
+
45 }
-
44
-
45 template <typename T, std::size_t N>
-
46 static T arrayElement(const std::array<T, N>& data)
-
47 {
-
48 if (data.empty())
-
49 {
-
50 throw std::invalid_argument{"Data is empty."};
-
51 }
-
52
-
53 const auto index = Number::integer<size_t>(data.size() - 1);
+
46
+
47 template <typename T, std::size_t N>
+
48 static T arrayElement(const std::array<T, N>& data)
+
49 {
+
50 if (data.empty())
+
51 {
+
52 throw std::invalid_argument{"Data is empty."};
+
53 }
54
-
55 return data[index];
-
56 }
-
57
-
71 template <class T>
-
-
72 static T arrayElement(const std::vector<T>& data)
-
73 {
-
74 if (data.empty())
-
75 {
-
76 throw std::invalid_argument{"Data is empty."};
-
77 }
-
78
-
79 const auto index = Number::integer<size_t>(data.size() - 1);
+
55 const auto index = Number::integer<size_t>(data.size() - 1);
+
56
+
57 return data[index];
+
58 }
+
59
+
73 template <class T>
+
+
74 static T arrayElement(const std::vector<T>& data)
+
75 {
+
76 if (data.empty())
+
77 {
+
78 throw std::invalid_argument{"Data is empty."};
+
79 }
80
-
81 return data[index];
-
82 }
+
81 const auto index = Number::integer<size_t>(data.size() - 1);
+
82
+
83 return data[index];
+
84 }
-
83
-
98 template <class T>
-
-
99 static T setElement(const std::set<T>& data)
-
100 {
-
101 if (data.empty())
-
102 {
-
103 throw std::invalid_argument{"Data is empty."};
-
104 }
-
105
-
106 T item;
-
107 std::sample(data.begin(), data.end(), &item, 1, pseudoRandomGenerator);
-
108 return item;
-
109 }
+
85
+
99 template <class T>
+
+
100 static T arrayElement(const std::initializer_list<T>& data)
+
101 {
+
102 if (data.size() == 0)
+
103 {
+
104 throw std::invalid_argument{"Data is empty."};
+
105 }
+
106
+
107 const auto index = Number::integer<size_t>(data.size() - 1);
+
108
+
109 return *(data.begin() + index);
+
110 }
-
110
-
111 template <class T>
-
- -
113 {
-
114 unsigned weight;
-
115 T value;
-
116 };
+
111
+
126 template <class T>
+
+
127 static T setElement(const std::set<T>& data)
+
128 {
+
129 if (data.empty())
+
130 {
+
131 throw std::invalid_argument{"Data is empty."};
+
132 }
+
133
+
134 T item;
+
135 std::sample(data.begin(), data.end(), &item, 1, pseudoRandomGenerator);
+
136 return item;
+
137 }
-
117
-
132 template <class T>
-
-
133 static T weightedArrayElement(const std::vector<WeightedElement<T>>& data)
-
134 {
-
135 if (data.empty())
-
136 {
-
137 throw std::invalid_argument{"Data is empty."};
-
138 }
-
139
-
140 const auto sumOfWeights =
-
141 std::accumulate(data.begin(), data.end(), 0u,
-
142 [](unsigned sum, const WeightedElement<T>& element) { return sum + element.weight; });
-
143
-
144 if (sumOfWeights == 0u)
-
145 {
-
146 throw std::invalid_argument{"Sum of weights is zero."};
-
147 }
-
148
-
149 const std::integral auto targetWeightValue = Number::integer<unsigned>(1, sumOfWeights);
-
150 unsigned currentSum = 0;
-
151 size_t currentIdx = 0;
-
152
-
153 while (currentIdx < data.size())
-
154 {
-
155 currentSum += data[currentIdx].weight;
-
156 if (currentSum >= targetWeightValue)
-
157 break;
-
158 currentIdx++;
-
159 }
-
160
-
161 return data.at(currentIdx).value;
-
162 }
+
138
+
139 template <class T>
+
+ +
141 {
+
142 unsigned weight;
+
143 T value;
+
144 };
-
163
-
177 template <class T>
-
-
178 static std::vector<T> shuffle(std::vector<T> data)
-
179 {
-
180 std::shuffle(std::begin(data), std::end(data), pseudoRandomGenerator);
-
181
-
182 return data;
-
183 }
+
145
+
160 template <class T>
+
+
161 static T weightedArrayElement(const std::vector<WeightedElement<T>>& data)
+
162 {
+
163 if (data.empty())
+
164 {
+
165 throw std::invalid_argument{"Data is empty."};
+
166 }
+
167
+
168 const auto sumOfWeights =
+
169 std::accumulate(data.begin(), data.end(), 0u,
+
170 [](unsigned sum, const WeightedElement<T>& element) { return sum + element.weight; });
+
171
+
172 if (sumOfWeights == 0u)
+
173 {
+
174 throw std::invalid_argument{"Sum of weights is zero."};
+
175 }
+
176
+
177 const std::integral auto targetWeightValue = Number::integer<unsigned>(1, sumOfWeights);
+
178 unsigned currentSum = 0;
+
179 size_t currentIdx = 0;
+
180
+
181 while (currentIdx < data.size())
+
182 {
+
183 currentSum += data[currentIdx].weight;
+
184 if (currentSum >= targetWeightValue)
+
185 break;
+
186 currentIdx++;
+
187 }
+
188
+
189 return data.at(currentIdx).value;
+
190 }
-
184
-
196 static std::string shuffleString(std::string data);
-
197
-
218 template <typename T>
-
-
219 static typename T::key_type objectKey(const T& object)
-
220 {
-
221 if (object.empty())
-
222 {
-
223 throw std::runtime_error("Object is empty.");
-
224 }
+
191
+
205 template <class T>
+
+
206 static std::vector<T> shuffle(std::vector<T> data)
+
207 {
+
208 std::shuffle(std::begin(data), std::end(data), pseudoRandomGenerator);
+
209
+
210 return data;
+
211 }
+
+
212
+
224 static std::string shuffleString(std::string data);
225
-
226 std::vector<typename T::key_type> keys;
-
227 for (const auto& entry : object)
-
228 {
-
229 keys.push_back(entry.first);
-
230 }
-
231
- -
233 }
+
246 template <typename T>
+
+
247 static typename T::key_type objectKey(const T& object)
+
248 {
+
249 if (object.empty())
+
250 {
+
251 throw std::runtime_error("Object is empty.");
+
252 }
+
253
+
254 std::vector<typename T::key_type> keys;
+
255 for (const auto& entry : object)
+
256 {
+
257 keys.push_back(entry.first);
+
258 }
+
259
+ +
261 }
+
+
262
+
279 template <typename TResult>
+
+
280 static TResult maybe(std::function<TResult()> callback, double probability = 0.5)
+
281 {
+
282 if (Datatype::boolean(probability))
+
283 {
+
284 return callback();
+
285 }
+
286 return TResult();
+
287 }
-
234
-
251 template <typename TResult>
-
-
252 static TResult maybe(std::function<TResult()> callback, double probability = 0.5)
-
253 {
-
254 if (Datatype::boolean(probability))
-
255 {
-
256 return callback();
-
257 }
-
258 return TResult();
-
259 }
+
288
+
303 template<typename T, std::size_t N>
+
+
304 static std::vector<T> toVector(const std::array<T, N>& arr) {
+
305 std::vector<T> vec;
+
306 vec.reserve(N);
+
307 vec.insert(vec.end(), arr.begin(), arr.end());
+
308 return vec;
+
309 }
-
260
-
277 static std::string replaceSymbolWithNumber(const std::string& str, const char& symbol = '#');
-
278
-
294 static std::string replaceCreditCardSymbols(const std::string& inputString = "6453-####-####-####-###L",
-
295 char symbol = '#');
-
296
-
317 static std::string regexpStyleStringParse(const std::string& input);
-
318
-
319private:
-
320 static std::random_device randomDevice;
-
321 static std::mt19937 pseudoRandomGenerator;
-
322};
+
310
+
327 static std::string replaceSymbolWithNumber(const std::string& str, const char& symbol = '#');
+
328
+
344 static std::string replaceCreditCardSymbols(const std::string& inputString = "6453-####-####-####-###L",
+
345 char symbol = '#');
+
346
+
367 static std::string regexpStyleStringParse(const std::string& input);
+
368
+
369private:
+
370 static std::random_device randomDevice;
+
371 static std::mt19937 pseudoRandomGenerator;
+
372};
-
323}
+
373}
static bool boolean()
Returns a random boolean.
-
Definition Helper.h:16
-
static T::key_type objectKey(const T &object)
Returns a random key from given object.
Definition Helper.h:219
-
static 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:252
-
static T arrayElement(std::span< const T > data)
Get a random element from an STL container.
Definition Helper.h:33
-
static std::vector< T > shuffle(std::vector< T > data)
Returns shuffled vector.
Definition Helper.h:178
-
static T weightedArrayElement(const std::vector< WeightedElement< T > > &data)
Get a random element by weight from a vector.
Definition Helper.h:133
+
Definition Helper.h:18
+
static T::key_type objectKey(const T &object)
Returns a random key from given object.
Definition Helper.h:247
+
static 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:280
+
static T arrayElement(std::span< const T > data)
Get a random element from an STL container.
Definition Helper.h:35
+
static std::vector< T > toVector(const std::array< T, N > &arr)
Returns a vector equivalent to the given array.
Definition Helper.h:304
+
static std::vector< T > shuffle(std::vector< T > data)
Returns shuffled vector.
Definition Helper.h:206
+
static T weightedArrayElement(const std::vector< WeightedElement< T > > &data)
Get a random element by weight from a vector.
Definition Helper.h:161
+
static T arrayElement(const std::initializer_list< T > &data)
Get a random element from an initializer list.
Definition Helper.h:100
static 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...
static std::string shuffleString(std::string data)
Returns shuffled std::string.
static 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"...
-
static T arrayElement(const std::vector< T > &data)
Get a random element from a vector.
Definition Helper.h:72
+
static T arrayElement(const std::vector< T > &data)
Get a random element from a vector.
Definition Helper.h:74
static std::string regexpStyleStringParse(const std::string &input)
Returns the replaced regex-like expression in the string with matching values.
-
static T setElement(const std::set< T > &data)
Get a random element from a std::set.
Definition Helper.h:99
+
static T setElement(const std::set< T > &data)
Get a random element from a std::set.
Definition Helper.h:127
static I integer(I min, I max)
Generates a random integer number in the given range, bounds included.
Definition Number.h:25
-
Definition Helper.h:113
+
Definition Helper.h:141
diff --git a/Internet_8h_source.html b/Internet_8h_source.html index 592275d71..3beaf455c 100644 --- a/Internet_8h_source.html +++ b/Internet_8h_source.html @@ -107,138 +107,139 @@
3#include <array>
4#include <optional>
5#include <string>
-
6
-
7#include "types/Country.h"
-
8
-
9namespace faker
-
10{
-
11enum class HttpResponseType
-
12{
-
13 Informational,
-
14 Success,
-
15 Redirection,
-
16 ClientError,
-
17 ServerError
-
18};
-
19
-
20enum class WebProtocol
-
21{
-
22 Http,
-
23 Https
-
24};
-
25
-
26enum class IPv4Class
-
27{
-
28 A,
-
29 B,
-
30 C
-
31};
-
32
-
- -
34{
-
35 bool upperLetters = true;
-
36 bool lowerLetters = true;
-
37 bool numbers = true;
-
38 bool symbols = true;
-
39};
+
6#include <string_view>
+
7
+
8#include "types/Country.h"
+
9
+
10namespace faker
+
11{
+
12enum class HttpResponseType
+
13{
+
14 Informational,
+
15 Success,
+
16 Redirection,
+
17 ClientError,
+
18 ServerError
+
19};
+
20
+
21enum class WebProtocol
+
22{
+
23 Http,
+
24 Https
+
25};
+
26
+
27enum class IPv4Class
+
28{
+
29 A,
+
30 B,
+
31 C
+
32};
+
33
+
+ +
35{
+
36 bool upperLetters = true;
+
37 bool lowerLetters = true;
+
38 bool numbers = true;
+
39 bool symbols = true;
+
40};
-
40
-
- -
42{
-
43public:
-
59 static std::string username(std::optional<std::string> firstName = std::nullopt,
-
60 std::optional<std::string> lastName = std::nullopt, Country country = Country::Usa);
-
61
-
79 static std::string email(std::optional<std::string> firstName = std::nullopt,
-
80 std::optional<std::string> lastName = std::nullopt,
-
81 std::optional<std::string> emailHost = std::nullopt);
-
82
-
95 static std::string exampleEmail(std::optional<std::string> firstName = std::nullopt,
-
96 std::optional<std::string> lastName = std::nullopt);
-
97
-
111 static std::string password(int length = 15, PasswordOptions options = {});
-
112
-
113 enum class EmojiType
-
114 {
-
115 Smiley,
-
116 Body,
-
117 Person,
-
118 Nature,
-
119 Food,
-
120 Travel,
-
121 Activity,
-
122 Object,
-
123 Symbol,
-
124 Flag
-
125 };
-
126
-
139 static std::string emoji(std::optional<EmojiType> type = std::nullopt);
-
140
-
152 static bool checkIfEmojiIsValid(const std::string& emojiToCheck);
-
153
-
163 static std::string protocol();
-
164
-
174 static std::string httpMethod();
-
175
-
188 static unsigned httpStatusCode(std::optional<HttpResponseType> responseType = std::nullopt);
-
189
-
199 static std::string httpRequestHeader();
-
200
-
210 static std::string httpResponseHeader();
-
211
-
221 static std::string httpMediaType();
-
222
-
235 static std::string ipv4(IPv4Class ipv4class = IPv4Class::C);
-
236
-
254 static std::string ipv4(const std::array<unsigned int, 4>& baseIpv4Address,
-
255 const std::array<unsigned int, 4>& generationMask);
-
256
-
266 static std::string ipv6();
-
267
-
279 static std::string mac(const std::string& sep = ":");
-
280
-
290 static unsigned port();
-
291
-
303 static std::string url(WebProtocol webProtocol = WebProtocol::Https);
-
304
-
314 static std::string domainName();
-
315
-
325 static std::string domainWord();
-
326
-
336 static std::string domainSuffix();
-
337
-
349 static std::string anonymousUsername(unsigned maxLength);
-
350};
+
41
+
+ +
43{
+
44public:
+
60 static std::string username(std::optional<std::string> firstName = std::nullopt,
+
61 std::optional<std::string> lastName = std::nullopt, Country country = Country::Usa);
+
62
+
80 static std::string email(std::optional<std::string> firstName = std::nullopt,
+
81 std::optional<std::string> lastName = std::nullopt,
+
82 std::optional<std::string> emailHost = std::nullopt);
+
83
+
96 static std::string exampleEmail(std::optional<std::string> firstName = std::nullopt,
+
97 std::optional<std::string> lastName = std::nullopt);
+
98
+
112 static std::string password(int length = 15, const PasswordOptions& options = {});
+
113
+
114 enum class EmojiType
+
115 {
+
116 Smiley,
+
117 Body,
+
118 Person,
+
119 Nature,
+
120 Food,
+
121 Travel,
+
122 Activity,
+
123 Object,
+
124 Symbol,
+
125 Flag
+
126 };
+
127
+
140 static std::string_view emoji(std::optional<EmojiType> type = std::nullopt);
+
141
+
153 static bool checkIfEmojiIsValid(const std::string& emojiToCheck);
+
154
+
164 static std::string_view protocol();
+
165
+
175 static std::string_view httpMethod();
+
176
+
189 static unsigned httpStatusCode(std::optional<HttpResponseType> responseType = std::nullopt);
+
190
+
200 static std::string_view httpRequestHeader();
+
201
+
211 static std::string_view httpResponseHeader();
+
212
+
222 static std::string_view httpMediaType();
+
223
+
236 static std::string ipv4(const IPv4Class& ipv4class = IPv4Class::C);
+
237
+
255 static std::string ipv4(const std::array<unsigned int, 4>& baseIpv4Address,
+
256 const std::array<unsigned int, 4>& generationMask);
+
257
+
267 static std::string ipv6();
+
268
+
280 static std::string mac(const std::string& sep = ":");
+
281
+
291 static unsigned port();
+
292
+
304 static std::string url(const WebProtocol& webProtocol = WebProtocol::Https);
+
305
+
315 static std::string domainName();
+
316
+
326 static std::string domainWord();
+
327
+
337 static std::string_view domainSuffix();
+
338
+
350 static std::string anonymousUsername(unsigned maxLength);
+
351};
-
351}
+
352}
Definition Food.h:8
-
Definition Internet.h:42
+
Definition Internet.h:43
static std::string domainName()
Generates a random domain name.
-
static std::string httpMethod()
Generates a random http method name.
+
static std::string_view domainSuffix()
Generates a random domain suffix.
static std::string domainWord()
Generates a random domain word.
-
static std::string httpResponseHeader()
Generates a random http response header.
-
static std::string domainSuffix()
Generates a random domain suffix.
static std::string anonymousUsername(unsigned maxLength)
Generates a random username.
static std::string 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.
-
static std::string url(WebProtocol webProtocol=WebProtocol::Https)
Generates a random url.
-
static std::string ipv4(IPv4Class ipv4class=IPv4Class::C)
Returns a string containing randomized ipv4 address of the given class.
+
static std::string_view protocol()
Returns a random web protocol. Either `http` or `https`.
+
static std::string_view httpResponseHeader()
Generates a random http response header.
+
static std::string_view emoji(std::optional< EmojiType > type=std::nullopt)
Returns a random emoji.
static bool checkIfEmojiIsValid(const std::string &emojiToCheck)
Verify that a given emoji is valid.
+
static std::string url(const WebProtocol &webProtocol=WebProtocol::Https)
Generates a random url.
static 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.
-
static std::string password(int length=15, PasswordOptions options={})
Generates a random password-like string. Do not use this method for generating actual passwords for u...
+
static std::string_view httpRequestHeader()
Generates a random http request header.
static unsigned port()
Generates a random port.
-
static std::string emoji(std::optional< EmojiType > type=std::nullopt)
Returns a random emoji.
-
static std::string httpMediaType()
Generates a random http media type.
-
static std::string httpRequestHeader()
Generates a random http request header.
+
static std::string_view httpMediaType()
Generates a random http media type.
+
static std::string_view httpMethod()
Generates a random http method name.
static std::string ipv6()
Returns a string containing randomized ipv6 address.
static unsigned httpStatusCode(std::optional< HttpResponseType > responseType=std::nullopt)
Returns a random http status code.
static 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.
static 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.
+
static 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...
static std::string mac(const std::string &sep=":")
Returns a generated random mac address.
-
static std::string protocol()
Returns a random web protocol. Either `http` or `https`.
+
static std::string ipv4(const IPv4Class &ipv4class=IPv4Class::C)
Returns a string containing randomized ipv4 address of the given class.
Definition Person.h:16
-
Definition Internet.h:34
+
Definition Internet.h:35
diff --git a/classfaker_1_1Helper-members.html b/classfaker_1_1Helper-members.html index 99338eaaf..d496b645d 100644 --- a/classfaker_1_1Helper-members.html +++ b/classfaker_1_1Helper-members.html @@ -108,14 +108,16 @@ arrayElement(std::span< const T > data)faker::Helperinlinestatic arrayElement(const std::array< T, N > &data) (defined in faker::Helper)faker::Helperinlinestatic arrayElement(const std::vector< T > &data)faker::Helperinlinestatic - maybe(std::function< TResult()> callback, double probability=0.5)faker::Helperinlinestatic - objectKey(const T &object)faker::Helperinlinestatic - regexpStyleStringParse(const std::string &input)faker::Helperstatic - replaceCreditCardSymbols(const std::string &inputString="6453-####-####-####-###L", char symbol='#')faker::Helperstatic - replaceSymbolWithNumber(const std::string &str, const char &symbol='#')faker::Helperstatic - setElement(const std::set< T > &data)faker::Helperinlinestatic - shuffle(std::vector< T > data)faker::Helperinlinestatic - shuffleString(std::string data)faker::Helperstatic + arrayElement(const std::initializer_list< T > &data)faker::Helperinlinestatic + maybe(std::function< TResult()> callback, double probability=0.5)faker::Helperinlinestatic + objectKey(const T &object)faker::Helperinlinestatic + regexpStyleStringParse(const std::string &input)faker::Helperstatic + replaceCreditCardSymbols(const std::string &inputString="6453-####-####-####-###L", char symbol='#')faker::Helperstatic + replaceSymbolWithNumber(const std::string &str, const char &symbol='#')faker::Helperstatic + setElement(const std::set< T > &data)faker::Helperinlinestatic + shuffle(std::vector< T > data)faker::Helperinlinestatic + shuffleString(std::string data)faker::Helperstatic + toVector(const std::array< T, N > &arr)faker::Helperinlinestatic weightedArrayElement(const std::vector< WeightedElement< T > > &data)faker::Helperinlinestatic
diff --git a/classfaker_1_1Helper.html b/classfaker_1_1Helper.html index 750c0ab0b..d00bc1022 100644 --- a/classfaker_1_1Helper.html +++ b/classfaker_1_1Helper.html @@ -126,6 +126,10 @@ static T arrayElement (const std::vector< T > &data)  Get a random element from a vector.
  +template<class T > +static T arrayElement (const std::initializer_list< T > &data) + Get a random element from an initializer list.
+  template<class T > static T setElement (const std::set< T > &data)  Get a random element from a std::set.
@@ -149,6 +153,10 @@ static 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.
  +template<typename T , std::size_t N> +static std::vector< T > toVector (const std::array< T, N > &arr) + Returns a vector equivalent to the given array.
+  static 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"). "!" will be replaced by digits >=2 ("2" - "9").
  @@ -160,8 +168,52 @@  

Member Function Documentation

+ +

◆ arrayElement() [1/3]

+ +
+
+
+template<class T >
+ + + + + +
+ + + + + + + +
static T faker::Helper::arrayElement (const std::initializer_list< T > & data)
+
+inlinestatic
+
+ +

Get a random element from an initializer list.

+
Template Parameters
+ + +
Tan element type of the initializer list.
+
+
+
Parameters
+ + +
datainitializer list of elements.
+
+
+
Returns
T a random element from the initializer list.
+
Helper::arrayElement<std::string>(std::initializer_list<std::string>{{"hello"}, {"world"}}) // "hello"
+
static T arrayElement(std::span< const T > data)
Get a random element from an STL container.
Definition Helper.h:35
+
+
+
-

◆ arrayElement() [1/2]

+

◆ arrayElement() [2/3]

@@ -200,12 +252,11 @@

Returns
T a random element from the vector.
Helper::arrayElement<std::string>(std::vector<std::string>{{"hello"}, {"world"}}) // "hello"
-
static T arrayElement(std::span< const T > data)
Get a random element from an STL container.
Definition Helper.h:33

-

◆ arrayElement() [2/2]

+

◆ arrayElement() [3/3]

@@ -294,7 +345,7 @@

Returns
The result of the callback if the probability check was successful, otherwise empty string.
Helper::maybe<std::string>([]() { return "Hello World!"; }) // ""
Helper::maybe<int>([]() { return 42; }, 0.9) // "42"
-
static 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:252
+
static 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:280

@@ -349,7 +400,7 @@

{3, "three"}

};
Helper::objectKey(testMap) // "2"
-
static T::key_type objectKey(const T &object)
Returns a random key from given object.
Definition Helper.h:219
+
static T::key_type objectKey(const T &object)
Returns a random key from given object.
Definition Helper.h:247
@@ -394,7 +445,7 @@

Helper::regexpStyleStringParse("#{2,9}") // "#######"
Helper::regexpStyleStringParse("[500-15000]") // "8375"
Helper::regexpStyleStringParse("#{3}test[1-5]") // "###test3"
-
Definition Helper.h:16
+
Definition Helper.h:18
static std::string regexpStyleStringParse(const std::string &input)
Returns the replaced regex-like expression in the string with matching values.
@@ -526,7 +577,7 @@

Returns
T a random element from the std::set.
std::set<char> chars{'a', 'b', 'c', 'd', 'e'};
Helper::setElement(chars) // 'd'
-
static T setElement(const std::set< T > &data)
Get a random element from a std::set.
Definition Helper.h:99
+
static T setElement(const std::set< T > &data)
Get a random element from a std::set.
Definition Helper.h:127
@@ -570,7 +621,7 @@

Returns
Vector with shuffled elements.
Helper::shuffle<std::string>(std::vector<std::string>{{"hello"}, {"world"}}) // {{"world"}, {"hello"}}
-
static std::vector< T > shuffle(std::vector< T > data)
Returns shuffled vector.
Definition Helper.h:178
+
static std::vector< T > shuffle(std::vector< T > data)
Returns shuffled vector.
Definition Helper.h:206
@@ -610,6 +661,51 @@

+

◆ toVector()

+ +
+
+
+template<typename T , std::size_t N>
+ + + + + +
+ + + + + + + +
static std::vector< T > faker::Helper::toVector (const std::array< T, N > & arr)
+
+inlinestatic
+
+ +

Returns a vector equivalent to the given array.

+
Template Parameters
+ + + +
TThe type of the array.
NThe size of the array.
+
+
+
Parameters
+ + +
arrThe array to convert.
+
+
+
Returns
The same array as a vector.
+
Helper::toVector(std::array<int, 3>{1, 2, 3}) // {1, 2, 3}
+
static std::vector< T > toVector(const std::array< T, N > &arr)
Returns a vector equivalent to the given array.
Definition Helper.h:304
+
+
+

◆ weightedArrayElement()

@@ -651,8 +747,8 @@

Returns
T a weighted element value from the vector.
"value2"}}) // "hello2"
-
static T weightedArrayElement(const std::vector< WeightedElement< T > > &data)
Get a random element by weight from a vector.
Definition Helper.h:133
-
Definition Helper.h:113
+
static T weightedArrayElement(const std::vector< WeightedElement< T > > &data)
Get a random element by weight from a vector.
Definition Helper.h:161
+
Definition Helper.h:141
diff --git a/classfaker_1_1Internet-members.html b/classfaker_1_1Internet-members.html index e7f0dfa27..e55ce3e41 100644 --- a/classfaker_1_1Internet-members.html +++ b/classfaker_1_1Internet-members.html @@ -108,25 +108,25 @@ anonymousUsername(unsigned maxLength)faker::Internetstatic checkIfEmojiIsValid(const std::string &emojiToCheck)faker::Internetstatic domainName()faker::Internetstatic - domainSuffix()faker::Internetstatic + domainSuffix()faker::Internetstatic domainWord()faker::Internetstatic email(std::optional< std::string > firstName=std::nullopt, std::optional< std::string > lastName=std::nullopt, std::optional< std::string > emailHost=std::nullopt)faker::Internetstatic - emoji(std::optional< EmojiType > type=std::nullopt)faker::Internetstatic + emoji(std::optional< EmojiType > type=std::nullopt)faker::Internetstatic EmojiType enum name (defined in faker::Internet)faker::Internet exampleEmail(std::optional< std::string > firstName=std::nullopt, std::optional< std::string > lastName=std::nullopt)faker::Internetstatic - httpMediaType()faker::Internetstatic - httpMethod()faker::Internetstatic - httpRequestHeader()faker::Internetstatic - httpResponseHeader()faker::Internetstatic + httpMediaType()faker::Internetstatic + httpMethod()faker::Internetstatic + httpRequestHeader()faker::Internetstatic + httpResponseHeader()faker::Internetstatic httpStatusCode(std::optional< HttpResponseType > responseType=std::nullopt)faker::Internetstatic - ipv4(IPv4Class ipv4class=IPv4Class::C)faker::Internetstatic + ipv4(const IPv4Class &ipv4class=IPv4Class::C)faker::Internetstatic ipv4(const std::array< unsigned int, 4 > &baseIpv4Address, const std::array< unsigned int, 4 > &generationMask)faker::Internetstatic ipv6()faker::Internetstatic mac(const std::string &sep=":")faker::Internetstatic - password(int length=15, PasswordOptions options={})faker::Internetstatic + password(int length=15, const PasswordOptions &options={})faker::Internetstatic port()faker::Internetstatic - protocol()faker::Internetstatic - url(WebProtocol webProtocol=WebProtocol::Https)faker::Internetstatic + protocol()faker::Internetstatic + url(const WebProtocol &webProtocol=WebProtocol::Https)faker::Internetstatic username(std::optional< std::string > firstName=std::nullopt, std::optional< std::string > lastName=std::nullopt, Country country=Country::Usa)faker::Internetstatic diff --git a/classfaker_1_1Internet.html b/classfaker_1_1Internet.html index a8f3bd887..0e8fb872b 100644 --- a/classfaker_1_1Internet.html +++ b/classfaker_1_1Internet.html @@ -137,36 +137,36 @@ static 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.
  -static std::string password (int length=15, 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.
-  -static std::string emoji (std::optional< EmojiType > type=std::nullopt) - Returns a random emoji.
-  +static 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 users. Since the source of the randomness is not cryptographically secure, neither is this generator.
+  +static std::string_view emoji (std::optional< EmojiType > type=std::nullopt) + Returns a random emoji.
+  static bool checkIfEmojiIsValid (const std::string &emojiToCheck)  Verify that a given emoji is valid.
  -static std::string protocol () - Returns a random web protocol. Either `http` or `https`.
-  -static std::string httpMethod () - Generates a random http method name.
-  +static std::string_view protocol () + Returns a random web protocol. Either `http` or `https`.
+  +static std::string_view httpMethod () + Generates a random http method name.
+  static unsigned httpStatusCode (std::optional< HttpResponseType > responseType=std::nullopt)  Returns a random http status code.
  -static std::string httpRequestHeader () - Generates a random http request header.
-  -static std::string httpResponseHeader () - Generates a random http response header.
-  -static std::string httpMediaType () - Generates a random http media type.
-  -static std::string ipv4 (IPv4Class ipv4class=IPv4Class::C) - Returns a string containing randomized ipv4 address of the given class.
-  +static std::string_view httpRequestHeader () + Generates a random http request header.
+  +static std::string_view httpResponseHeader () + Generates a random http response header.
+  +static std::string_view httpMediaType () + Generates a random http media type.
+  +static std::string ipv4 (const IPv4Class &ipv4class=IPv4Class::C) + Returns a string containing randomized ipv4 address of the given class.
+  static std::string 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.
  @@ -179,18 +179,18 @@ static unsigned port ()  Generates a random port.
  -static std::string url (WebProtocol webProtocol=WebProtocol::Https) - Generates a random url.
-  +static std::string url (const WebProtocol &webProtocol=WebProtocol::Https) + Generates a random url.
+  static std::string domainName ()  Generates a random domain name.
  static std::string domainWord ()  Generates a random domain word.
  -static std::string domainSuffix () - Generates a random domain suffix.
-  +static std::string_view domainSuffix () + Generates a random domain suffix.
+  static std::string anonymousUsername (unsigned maxLength)  Generates a random username.
  @@ -298,8 +298,8 @@

-

◆ domainSuffix()

+ +

◆ domainSuffix()

@@ -308,7 +308,7 @@

- + @@ -323,8 +323,8 @@

Returns
Domain suffix.
-
-
static std::string domainSuffix()
Generates a random domain suffix.
+
+
static std::string_view domainSuffix()
Generates a random domain suffix.
@@ -405,13 +405,13 @@

Internet::email(std::nullopt, "Howard") // "FreddieHoward@hotmail.com"
Internet::email("Cindy", "Young") // "Young_Cindy@gmail.com"
Internet::email(std::nullopt, std::nullopt, "example.com") // "Wright.Edna1973@code.com"
-
Definition Internet.h:42
+
Definition Internet.h:43
static 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.
- -

◆ emoji()

+ +

◆ emoji()

@@ -420,7 +420,7 @@

static std::string faker::Internet::domainSuffix static std::string_view faker::Internet::domainSuffix ( )
- + @@ -441,10 +441,10 @@

Returns
Emoji.
-
Internet::emoji() // "👑"
-
Internet::emoji(EmojiType::Food) // "🍕"
+
Internet::emoji() // "👑"
+
Internet::emoji(EmojiType::Food) // "🍕"
Definition Food.h:8
-
static std::string emoji(std::optional< EmojiType > type=std::nullopt)
Returns a random emoji.
+
static std::string_view emoji(std::optional< EmojiType > type=std::nullopt)
Returns a random emoji.
@@ -489,8 +489,8 @@

-

◆ httpMediaType()

+ +

◆ httpMediaType()

@@ -499,7 +499,7 @@

static std::string faker::Internet::emoji static std::string_view faker::Internet::emoji ( std::optional< EmojiType > type = std::nullopt)
- + @@ -514,13 +514,13 @@

Returns
Http media type.
-
Internet::httpMediaType() // "application/json"
-
static std::string httpMediaType()
Generates a random http media type.
+
Internet::httpMediaType() // "application/json"
+
static std::string_view httpMediaType()
Generates a random http media type.
- -

◆ httpMethod()

+ +

◆ httpMethod()

@@ -529,7 +529,7 @@

static std::string faker::Internet::httpMediaType static std::string_view faker::Internet::httpMediaType ( )
- + @@ -544,13 +544,13 @@

Returns
Http method name.
-
-
static std::string httpMethod()
Generates a random http method name.
+
+
static std::string_view httpMethod()
Generates a random http method name.
- -

◆ httpRequestHeader()

+ +

◆ httpRequestHeader()

@@ -559,7 +559,7 @@

static std::string faker::Internet::httpMethod static std::string_view faker::Internet::httpMethod ( )
- + @@ -574,13 +574,13 @@

Returns
Http request header.
-
Internet::httpRequestHeader() // "Authorization"
-
static std::string httpRequestHeader()
Generates a random http request header.
+
Internet::httpRequestHeader() // "Authorization"
+
static std::string_view httpRequestHeader()
Generates a random http request header.
- -

◆ httpResponseHeader()

+ +

◆ httpResponseHeader()

@@ -589,7 +589,7 @@

static std::string faker::Internet::httpRequestHeader static std::string_view faker::Internet::httpRequestHeader ( )
- + @@ -604,8 +604,8 @@

Returns
Http response header.
-
-
static std::string httpResponseHeader()
Generates a random http response header.
+
+
static std::string_view httpResponseHeader()
Generates a random http response header.
@@ -646,8 +646,8 @@

-

◆ ipv4() [1/2]

+ +

◆ ipv4() [1/2]

- - - - + -
static std::string faker::Internet::httpResponseHeader static std::string_view faker::Internet::httpResponseHeader ( ) (const std::array< unsigned int, 4 > & baseIpv4Address,
const IPv4Class & ipv4class = IPv4Class::C) const std::array< unsigned int, 4 > & generationMask )
@@ -673,24 +669,22 @@

-

Returns a string containing randomized ipv4 address based on given base address and mask.

-

Generated result is compliant with the ipv4 classes. Bits of the baseIpv4Address not covered by the generationMask will be ignored and replaced during generation. Bits covered by the mask will be kept in the result. Mask should be provided in the same format as regular ipv4 mask.

+

Returns a string containing randomized ipv4 address of the given class.

Parameters
- - +
generationMaskMask deciding which bits of the base address should be kept during randomization.
baseIpv4AddressAddress to randomize from.
ipv4classAddress class to be generated.
-
Returns
std::string representation of the ipv4 address.
-
Internet::ipv4({255.0.0.0}, {10.100.100.100}) // "10.128.17.1"
-
Internet::ipv4({255.255.128.0}, {129.168.255.0}) // "192.168.128.10"
-
static std::string ipv4(IPv4Class ipv4class=IPv4Class::C)
Returns a string containing randomized ipv4 address of the given class.
+
Returns
String representation of the ipv4 address.
+
Internet::ipv4() // "192.168.0.1"
+
Internet::ipv4(IPv4Class::classA) // "10.0.0.1"
+
static std::string ipv4(const IPv4Class &ipv4class=IPv4Class::C)
Returns a string containing randomized ipv4 address of the given class.

- -

◆ ipv4() [2/2]

+ +

◆ ipv4() [2/2]

@@ -791,8 +791,8 @@

-

◆ password()

+ +

◆ password()

@@ -808,7 +808,7 @@

- PasswordOptions options = {} ) + const PasswordOptions & options = {} ) @@ -826,9 +826,9 @@

Returns
Random password-like string.
-
Internet::password() // "gXGpe9pKfFcKy9R"
-
Internet::password(25) // "xv8vDu*wM!Rg0$zd0kH%8p!WY"
-
static std::string password(int length=15, PasswordOptions options={})
Generates a random password-like string. Do not use this method for generating actual passwords for u...
+
Internet::password() // "gXGpe9pKfFcKy9R"
+
Internet::password(25) // "xv8vDu*wM!Rg0$zd0kH%8p!WY"
+
static 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...

@@ -862,8 +862,8 @@

-

◆ protocol()

+ +

◆ protocol()

diff --git a/doxygen_crawl.html b/doxygen_crawl.html index 6a5e313f8..eae73a2c8 100644 --- a/doxygen_crawl.html +++ b/doxygen_crawl.html @@ -415,8 +415,10 @@ + + @@ -425,27 +427,27 @@ - + - - - - + + + + - + - - - + + + - + diff --git a/functions_d.html b/functions_d.html index 9814b4f9d..2b4100a95 100644 --- a/functions_d.html +++ b/functions_d.html @@ -117,7 +117,7 @@

- d -

diff --git a/functions_e.html b/functions_e.html index ef6fcfbe3..9384dae95 100644 --- a/functions_e.html +++ b/functions_e.html @@ -105,7 +105,7 @@

- e -

diff --git a/functions_func_e.html b/functions_func_e.html index 1076ce757..c1d6cd00c 100644 --- a/functions_func_e.html +++ b/functions_func_e.html @@ -105,7 +105,7 @@

- e -

diff --git a/functions_func_t.html b/functions_func_t.html index 17024270e..818f72392 100644 --- a/functions_func_t.html +++ b/functions_func_t.html @@ -109,6 +109,7 @@

- t -

diff --git a/functions_t.html b/functions_t.html index a1bab3129..c3ab0140f 100644 --- a/functions_t.html +++ b/functions_t.html @@ -109,6 +109,7 @@

- t -

  • timeZone() : faker::Location
  • timezone() : faker::Date
  • title() : faker::Book
  • +
  • toVector() : faker::Helper
  • translator() : faker::Book
  • tvShow() : faker::Movie
  • type() : faker::Animal, faker::Company, faker::Computer, faker::Vehicle
  • diff --git a/functions_u.html b/functions_u.html index 4d4ac8f6f..df318fa73 100644 --- a/functions_u.html +++ b/functions_u.html @@ -103,7 +103,7 @@

    - u -

    • unit() : faker::Science
    • -
    • url() : faker::Internet
    • +
    • url() : faker::Internet
    • username() : faker::Internet
    • uuid() : faker::String
    • uvIndex() : faker::Weather
    • diff --git a/search/all_0.js b/search/all_0.js index be9c0b132..680732c68 100644 --- a/search/all_0.js +++ b/search/all_0.js @@ -22,7 +22,7 @@ var searchData= ['animal_19',['Animal',['../classfaker_1_1Animal.html',1,'faker']]], ['anonymoususername_20',['anonymousUsername',['../classfaker_1_1Internet.html#a495813778b7e50dc6d957986b68255e2',1,'faker::Internet']]], ['areacode_21',['areaCode',['../classfaker_1_1Phone.html#a388f10abe9436b9376c746eb522a8d08',1,'faker::Phone']]], - ['arrayelement_22',['arrayElement',['../classfaker_1_1Helper.html#a46622f2ea33bab9a6ee3d35149f8b01b',1,'faker::Helper::arrayElement(std::span< const T > data)'],['../classfaker_1_1Helper.html#ac7c79f7dbcb604b8c1c64e67d01ca1ad',1,'faker::Helper::arrayElement(const std::vector< T > &data)']]], + ['arrayelement_22',['arrayElement',['../classfaker_1_1Helper.html#a46622f2ea33bab9a6ee3d35149f8b01b',1,'faker::Helper::arrayElement(std::span< const T > data)'],['../classfaker_1_1Helper.html#ac7c79f7dbcb604b8c1c64e67d01ca1ad',1,'faker::Helper::arrayElement(const std::vector< T > &data)'],['../classfaker_1_1Helper.html#a8d98ea8586ddd562c3fd55be509ae24f',1,'faker::Helper::arrayElement(const std::initializer_list< T > &data)']]], ['artist_23',['artist',['../classfaker_1_1Music.html#accfebfbbc5f2ac3d5119aa8ac90cd408',1,'faker::Music']]], ['author_24',['Author',['../structfaker_1_1Git_1_1Author.html',1,'faker::Git']]], ['author_25',['author',['../classfaker_1_1Book.html#ae5cb6cc2e517816da37999b6cd8586c2',1,'faker::Book::author()'],['../classfaker_1_1Git.html#a8955eed4cbf57eb8e372aea0c6d342d1',1,'faker::Git::author()']]] diff --git a/search/all_11.js b/search/all_11.js index 44fddf34e..0d8c3aa9f 100644 --- a/search/all_11.js +++ b/search/all_11.js @@ -8,7 +8,8 @@ var searchData= ['timezone_5',['timeZone',['../classfaker_1_1Location.html#a90d40c1120e2719bb3a04e66a7c59e0c',1,'faker::Location']]], ['timezone_6',['timezone',['../classfaker_1_1Date.html#ab42aa188d27cf6b19223d7a400eccb87',1,'faker::Date']]], ['title_7',['title',['../classfaker_1_1Book.html#aa3356a7e1834385f95e31bca8af754ac',1,'faker::Book']]], - ['translator_8',['translator',['../classfaker_1_1Book.html#a4608c5670078804769828029119573ae',1,'faker::Book']]], - ['tvshow_9',['tvShow',['../classfaker_1_1Movie.html#acde4548b33deccaefede4ef937e7877b',1,'faker::Movie']]], - ['type_10',['type',['../classfaker_1_1Animal.html#a0be4c8a6942f740034daf2d1dc0a75a8',1,'faker::Animal::type()'],['../classfaker_1_1Company.html#ae3bf0c91b23d25bb26d9fc180c859804',1,'faker::Company::type()'],['../classfaker_1_1Computer.html#a347ed9fff16e7f457d7b6862d0641907',1,'faker::Computer::type()'],['../classfaker_1_1Vehicle.html#ab698a19ed20d00f5408848356d84bc06',1,'faker::Vehicle::type()']]] + ['tovector_8',['toVector',['../classfaker_1_1Helper.html#a505d077c850b9914762fb68af0d926cf',1,'faker::Helper']]], + ['translator_9',['translator',['../classfaker_1_1Book.html#a4608c5670078804769828029119573ae',1,'faker::Book']]], + ['tvshow_10',['tvShow',['../classfaker_1_1Movie.html#acde4548b33deccaefede4ef937e7877b',1,'faker::Movie']]], + ['type_11',['type',['../classfaker_1_1Animal.html#a0be4c8a6942f740034daf2d1dc0a75a8',1,'faker::Animal::type()'],['../classfaker_1_1Company.html#ae3bf0c91b23d25bb26d9fc180c859804',1,'faker::Company::type()'],['../classfaker_1_1Computer.html#a347ed9fff16e7f457d7b6862d0641907',1,'faker::Computer::type()'],['../classfaker_1_1Vehicle.html#ab698a19ed20d00f5408848356d84bc06',1,'faker::Vehicle::type()']]] ]; diff --git a/search/all_12.js b/search/all_12.js index 37dba2477..e1be1c5f9 100644 --- a/search/all_12.js +++ b/search/all_12.js @@ -2,7 +2,7 @@ var searchData= [ ['unit_0',['Unit',['../structfaker_1_1Science_1_1Unit.html',1,'faker::Science']]], ['unit_1',['unit',['../classfaker_1_1Science.html#a1603947449ecc5b7bc31f5a4bbc4cc97',1,'faker::Science']]], - ['url_2',['url',['../classfaker_1_1Internet.html#a5e1681677a509194597848cd44f9a2e7',1,'faker::Internet']]], + ['url_2',['url',['../classfaker_1_1Internet.html#a8eaf2325ebce06abf9d0bce30122ab03',1,'faker::Internet']]], ['username_3',['username',['../classfaker_1_1Internet.html#ae4ab9735869c62cf258089f0cd741f83',1,'faker::Internet']]], ['uuid_4',['uuid',['../classfaker_1_1String.html#a24034056c03b01f957e2408cdc6d63d2',1,'faker::String']]], ['uvindex_5',['uvIndex',['../classfaker_1_1Weather.html#af08c719eb777ac717955d58a817f6cc4',1,'faker::Weather']]] diff --git a/search/all_3.js b/search/all_3.js index 5f1ce06c1..b36aed26e 100644 --- a/search/all_3.js +++ b/search/all_3.js @@ -18,6 +18,6 @@ var searchData= ['distanceunit_15',['distanceUnit',['../classfaker_1_1Science.html#ab42a1c8263c0a0f2f74c6db5fcccd134',1,'faker::Science']]], ['dog_16',['dog',['../classfaker_1_1Animal.html#ae826deac98dad495066e5997a2bf60ce',1,'faker::Animal']]], ['domainname_17',['domainName',['../classfaker_1_1Internet.html#a0ea6cb024c64493e473d7b2ffe624623',1,'faker::Internet']]], - ['domainsuffix_18',['domainSuffix',['../classfaker_1_1Internet.html#a37f2c674c23e72832384258558c5e47f',1,'faker::Internet']]], + ['domainsuffix_18',['domainSuffix',['../classfaker_1_1Internet.html#a179ea6f381546efc3544de650707b395',1,'faker::Internet']]], ['domainword_19',['domainWord',['../classfaker_1_1Internet.html#a199a6c56acd69f45f07315669ebe0111',1,'faker::Internet']]] ]; diff --git a/search/all_4.js b/search/all_4.js index f0d774950..2193fa517 100644 --- a/search/all_4.js +++ b/search/all_4.js @@ -3,7 +3,7 @@ var searchData= ['ean13_0',['EAN13',['../classfaker_1_1Commerce.html#a3adb56b7da2553fe1e6631456b17a658',1,'faker::Commerce']]], ['ean8_1',['EAN8',['../classfaker_1_1Commerce.html#afbd4616d95a522ea9b4dc18858c6fbd0',1,'faker::Commerce']]], ['email_2',['email',['../classfaker_1_1Internet.html#af39e73f7b102e8ae73a9ebee7693ad2c',1,'faker::Internet']]], - ['emoji_3',['emoji',['../classfaker_1_1Internet.html#ab05b16c1008c0c95509b6d88d6d90b60',1,'faker::Internet']]], + ['emoji_3',['emoji',['../classfaker_1_1Internet.html#a88b70c44e8773e10fe7ea4ba31038480',1,'faker::Internet']]], ['engine_4',['engine',['../classfaker_1_1Database.html#a95f84be2e728c83e008a8d6212564861',1,'faker::Database']]], ['ethereumaddress_5',['ethereumAddress',['../classfaker_1_1Finance.html#aa594f9b0b12b277c63b6db8342db8bf7',1,'faker::Finance']]], ['exampleemail_6',['exampleEmail',['../classfaker_1_1Internet.html#a97776d509e7284b2663aa5631dc21bbc',1,'faker::Internet']]] diff --git a/search/all_7.js b/search/all_7.js index 5c8333b4f..667885fb1 100644 --- a/search/all_7.js +++ b/search/all_7.js @@ -10,10 +10,10 @@ var searchData= ['hsb_7',['hsb',['../classfaker_1_1Color.html#ae3253948412674d74a3ad9c010df5b77',1,'faker::Color']]], ['hsl_8',['hsl',['../classfaker_1_1Color.html#ac76590c23d158333133277b6f6f2163a',1,'faker::Color']]], ['hsv_9',['hsv',['../classfaker_1_1Color.html#a678712ced9e1af658474934bb418faab',1,'faker::Color']]], - ['httpmediatype_10',['httpMediaType',['../classfaker_1_1Internet.html#ab5bd8ab51d4594f34d1edc35e357a1b2',1,'faker::Internet']]], - ['httpmethod_11',['httpMethod',['../classfaker_1_1Internet.html#a1787871f9974218270bdd597320eae16',1,'faker::Internet']]], - ['httprequestheader_12',['httpRequestHeader',['../classfaker_1_1Internet.html#ab5c23e5e20d5d76c3e87e7fdbe4533b5',1,'faker::Internet']]], - ['httpresponseheader_13',['httpResponseHeader',['../classfaker_1_1Internet.html#a2035e26d9d435c144c96f3a78c02c390',1,'faker::Internet']]], + ['httpmediatype_10',['httpMediaType',['../classfaker_1_1Internet.html#aae170262056747b12da5190204a2a6f7',1,'faker::Internet']]], + ['httpmethod_11',['httpMethod',['../classfaker_1_1Internet.html#ab8f31cf5b891958ef42ad5fed573efbe',1,'faker::Internet']]], + ['httprequestheader_12',['httpRequestHeader',['../classfaker_1_1Internet.html#a97fb8df2a16c6d117d32db1d2b9e5bf9',1,'faker::Internet']]], + ['httpresponseheader_13',['httpResponseHeader',['../classfaker_1_1Internet.html#a7fa7b4093b7d3895cfe4210507caf3a2',1,'faker::Internet']]], ['httpstatuscode_14',['httpStatusCode',['../classfaker_1_1Internet.html#ac9c4ff01e85aa66576683bdce5969b37',1,'faker::Internet']]], ['humidity_15',['humidity',['../classfaker_1_1Weather.html#af7a0525193a2748adf628334d5eb542a',1,'faker::Weather']]] ]; diff --git a/search/all_8.js b/search/all_8.js index 65252f2ee..8f39bc323 100644 --- a/search/all_8.js +++ b/search/all_8.js @@ -8,7 +8,7 @@ var searchData= ['integer_5',['integer',['../classfaker_1_1Number.html#a1af485acb65ed7312f13f4cb56f1a7c4',1,'faker::Number::integer(I min, I max)'],['../classfaker_1_1Number.html#a54b28a308f74a60108602918f39785fc',1,'faker::Number::integer(I max)']]], ['interjection_6',['interjection',['../classfaker_1_1Word.html#afc9739dc4b26cb9b8bec5160336cbabb',1,'faker::Word']]], ['internet_7',['Internet',['../classfaker_1_1Internet.html',1,'faker']]], - ['ipv4_8',['ipv4',['../classfaker_1_1Internet.html#a7aa45388e3c92c943e25f704e9889c3a',1,'faker::Internet::ipv4(IPv4Class ipv4class=IPv4Class::C)'],['../classfaker_1_1Internet.html#a50ba49be4f910fa160bcc48eb313f64f',1,'faker::Internet::ipv4(const std::array< unsigned int, 4 > &baseIpv4Address, const std::array< unsigned int, 4 > &generationMask)']]], + ['ipv4_8',['ipv4',['../classfaker_1_1Internet.html#afba2d4de956d4553c378ee8aafb26097',1,'faker::Internet::ipv4(const IPv4Class &ipv4class=IPv4Class::C)'],['../classfaker_1_1Internet.html#a50ba49be4f910fa160bcc48eb313f64f',1,'faker::Internet::ipv4(const std::array< unsigned int, 4 > &baseIpv4Address, const std::array< unsigned int, 4 > &generationMask)']]], ['ipv6_9',['ipv6',['../classfaker_1_1Internet.html#abe53af22a375870b7feb9020d2a13b53',1,'faker::Internet']]], ['isbn_10',['isbn',['../classfaker_1_1Book.html#a36a029ac46aec31dcacb77de11d8ccfc',1,'faker::Book']]], ['isbn10_11',['ISBN10',['../classfaker_1_1Commerce.html#ad1d6d27dbb45f6c63644a16cee16bc84',1,'faker::Commerce']]], diff --git a/search/all_e.js b/search/all_e.js index 2ac21259e..bf1a0245a 100644 --- a/search/all_e.js +++ b/search/all_e.js @@ -3,7 +3,7 @@ var searchData= ['paragraph_0',['paragraph',['../classfaker_1_1Lorem.html#a33a5333530f8b321e5808fcadc39dd12',1,'faker::Lorem']]], ['paragraphs_1',['paragraphs',['../classfaker_1_1Lorem.html#a57d8b13b30b251ada56adcd861859b77',1,'faker::Lorem']]], ['passport_2',['passport',['../classfaker_1_1Person.html#a31d271dc8524dbf7ccb1b119c605bd48',1,'faker::Person']]], - ['password_3',['password',['../classfaker_1_1Internet.html#aa485a1fe01f437fb5787b28d94d9c077',1,'faker::Internet']]], + ['password_3',['password',['../classfaker_1_1Internet.html#af61a12e80cb2425625409a6d779cdedc',1,'faker::Internet']]], ['passwordoptions_4',['PasswordOptions',['../structfaker_1_1PasswordOptions.html',1,'faker']]], ['pastdate_5',['pastDate',['../classfaker_1_1Date.html#a4dd0c5ac91cfd75e02001acbf736b831',1,'faker::Date']]], ['paymentprovider_6',['paymentProvider',['../classfaker_1_1Commerce.html#a2d7da9ad75665143d304caace228d213',1,'faker::Commerce']]], @@ -28,6 +28,6 @@ var searchData= ['productname_25',['productName',['../classfaker_1_1Commerce.html#a95bff9ff680bd6713de5ea78eec4e8d3',1,'faker::Commerce']]], ['productrating_26',['productRating',['../classfaker_1_1Commerce.html#a4a86e309f5a7ebe2d093e4e8f3bd1907',1,'faker::Commerce']]], ['productreview_27',['productReview',['../classfaker_1_1Commerce.html#a3d052f9a394da7294a2e352f1808b6b4',1,'faker::Commerce']]], - ['protocol_28',['protocol',['../classfaker_1_1Internet.html#afcec10d2c5cccf38bfc9c5ddda6d7a04',1,'faker::Internet']]], + ['protocol_28',['protocol',['../classfaker_1_1Internet.html#a6694708680bfa716d51039bd89c315c0',1,'faker::Internet']]], ['publisher_29',['publisher',['../classfaker_1_1Book.html#a7dec83353a67c2c7e1851fdb88eb993c',1,'faker::Book']]] ]; diff --git a/search/functions_0.js b/search/functions_0.js index 676f28770..592140b47 100644 --- a/search/functions_0.js +++ b/search/functions_0.js @@ -17,7 +17,7 @@ var searchData= ['amount_14',['amount',['../classfaker_1_1Finance.html#af5ef8556903d06d1fdbedf48275dc688',1,'faker::Finance']]], ['anonymoususername_15',['anonymousUsername',['../classfaker_1_1Internet.html#a495813778b7e50dc6d957986b68255e2',1,'faker::Internet']]], ['areacode_16',['areaCode',['../classfaker_1_1Phone.html#a388f10abe9436b9376c746eb522a8d08',1,'faker::Phone']]], - ['arrayelement_17',['arrayElement',['../classfaker_1_1Helper.html#a46622f2ea33bab9a6ee3d35149f8b01b',1,'faker::Helper::arrayElement(std::span< const T > data)'],['../classfaker_1_1Helper.html#ac7c79f7dbcb604b8c1c64e67d01ca1ad',1,'faker::Helper::arrayElement(const std::vector< T > &data)']]], + ['arrayelement_17',['arrayElement',['../classfaker_1_1Helper.html#a46622f2ea33bab9a6ee3d35149f8b01b',1,'faker::Helper::arrayElement(std::span< const T > data)'],['../classfaker_1_1Helper.html#ac7c79f7dbcb604b8c1c64e67d01ca1ad',1,'faker::Helper::arrayElement(const std::vector< T > &data)'],['../classfaker_1_1Helper.html#a8d98ea8586ddd562c3fd55be509ae24f',1,'faker::Helper::arrayElement(const std::initializer_list< T > &data)']]], ['artist_18',['artist',['../classfaker_1_1Music.html#accfebfbbc5f2ac3d5119aa8ac90cd408',1,'faker::Music']]], ['author_19',['author',['../classfaker_1_1Book.html#ae5cb6cc2e517816da37999b6cd8586c2',1,'faker::Book::author()'],['../classfaker_1_1Git.html#a8955eed4cbf57eb8e372aea0c6d342d1',1,'faker::Git::author()']]] ]; diff --git a/search/functions_11.js b/search/functions_11.js index 7a6f86f62..2ab0b1e0b 100644 --- a/search/functions_11.js +++ b/search/functions_11.js @@ -7,7 +7,8 @@ var searchData= ['timezone_4',['timeZone',['../classfaker_1_1Location.html#a90d40c1120e2719bb3a04e66a7c59e0c',1,'faker::Location']]], ['timezone_5',['timezone',['../classfaker_1_1Date.html#ab42aa188d27cf6b19223d7a400eccb87',1,'faker::Date']]], ['title_6',['title',['../classfaker_1_1Book.html#aa3356a7e1834385f95e31bca8af754ac',1,'faker::Book']]], - ['translator_7',['translator',['../classfaker_1_1Book.html#a4608c5670078804769828029119573ae',1,'faker::Book']]], - ['tvshow_8',['tvShow',['../classfaker_1_1Movie.html#acde4548b33deccaefede4ef937e7877b',1,'faker::Movie']]], - ['type_9',['type',['../classfaker_1_1Animal.html#a0be4c8a6942f740034daf2d1dc0a75a8',1,'faker::Animal::type()'],['../classfaker_1_1Company.html#ae3bf0c91b23d25bb26d9fc180c859804',1,'faker::Company::type()'],['../classfaker_1_1Computer.html#a347ed9fff16e7f457d7b6862d0641907',1,'faker::Computer::type()'],['../classfaker_1_1Vehicle.html#ab698a19ed20d00f5408848356d84bc06',1,'faker::Vehicle::type()']]] + ['tovector_7',['toVector',['../classfaker_1_1Helper.html#a505d077c850b9914762fb68af0d926cf',1,'faker::Helper']]], + ['translator_8',['translator',['../classfaker_1_1Book.html#a4608c5670078804769828029119573ae',1,'faker::Book']]], + ['tvshow_9',['tvShow',['../classfaker_1_1Movie.html#acde4548b33deccaefede4ef937e7877b',1,'faker::Movie']]], + ['type_10',['type',['../classfaker_1_1Animal.html#a0be4c8a6942f740034daf2d1dc0a75a8',1,'faker::Animal::type()'],['../classfaker_1_1Company.html#ae3bf0c91b23d25bb26d9fc180c859804',1,'faker::Company::type()'],['../classfaker_1_1Computer.html#a347ed9fff16e7f457d7b6862d0641907',1,'faker::Computer::type()'],['../classfaker_1_1Vehicle.html#ab698a19ed20d00f5408848356d84bc06',1,'faker::Vehicle::type()']]] ]; diff --git a/search/functions_12.js b/search/functions_12.js index c080047d3..4d0dc3532 100644 --- a/search/functions_12.js +++ b/search/functions_12.js @@ -1,7 +1,7 @@ var searchData= [ ['unit_0',['unit',['../classfaker_1_1Science.html#a1603947449ecc5b7bc31f5a4bbc4cc97',1,'faker::Science']]], - ['url_1',['url',['../classfaker_1_1Internet.html#a5e1681677a509194597848cd44f9a2e7',1,'faker::Internet']]], + ['url_1',['url',['../classfaker_1_1Internet.html#a8eaf2325ebce06abf9d0bce30122ab03',1,'faker::Internet']]], ['username_2',['username',['../classfaker_1_1Internet.html#ae4ab9735869c62cf258089f0cd741f83',1,'faker::Internet']]], ['uuid_3',['uuid',['../classfaker_1_1String.html#a24034056c03b01f957e2408cdc6d63d2',1,'faker::String']]], ['uvindex_4',['uvIndex',['../classfaker_1_1Weather.html#af08c719eb777ac717955d58a817f6cc4',1,'faker::Weather']]] diff --git a/search/functions_3.js b/search/functions_3.js index fd94d165e..f134acfe6 100644 --- a/search/functions_3.js +++ b/search/functions_3.js @@ -15,6 +15,6 @@ var searchData= ['distanceunit_12',['distanceUnit',['../classfaker_1_1Science.html#ab42a1c8263c0a0f2f74c6db5fcccd134',1,'faker::Science']]], ['dog_13',['dog',['../classfaker_1_1Animal.html#ae826deac98dad495066e5997a2bf60ce',1,'faker::Animal']]], ['domainname_14',['domainName',['../classfaker_1_1Internet.html#a0ea6cb024c64493e473d7b2ffe624623',1,'faker::Internet']]], - ['domainsuffix_15',['domainSuffix',['../classfaker_1_1Internet.html#a37f2c674c23e72832384258558c5e47f',1,'faker::Internet']]], + ['domainsuffix_15',['domainSuffix',['../classfaker_1_1Internet.html#a179ea6f381546efc3544de650707b395',1,'faker::Internet']]], ['domainword_16',['domainWord',['../classfaker_1_1Internet.html#a199a6c56acd69f45f07315669ebe0111',1,'faker::Internet']]] ]; diff --git a/search/functions_4.js b/search/functions_4.js index f0d774950..2193fa517 100644 --- a/search/functions_4.js +++ b/search/functions_4.js @@ -3,7 +3,7 @@ var searchData= ['ean13_0',['EAN13',['../classfaker_1_1Commerce.html#a3adb56b7da2553fe1e6631456b17a658',1,'faker::Commerce']]], ['ean8_1',['EAN8',['../classfaker_1_1Commerce.html#afbd4616d95a522ea9b4dc18858c6fbd0',1,'faker::Commerce']]], ['email_2',['email',['../classfaker_1_1Internet.html#af39e73f7b102e8ae73a9ebee7693ad2c',1,'faker::Internet']]], - ['emoji_3',['emoji',['../classfaker_1_1Internet.html#ab05b16c1008c0c95509b6d88d6d90b60',1,'faker::Internet']]], + ['emoji_3',['emoji',['../classfaker_1_1Internet.html#a88b70c44e8773e10fe7ea4ba31038480',1,'faker::Internet']]], ['engine_4',['engine',['../classfaker_1_1Database.html#a95f84be2e728c83e008a8d6212564861',1,'faker::Database']]], ['ethereumaddress_5',['ethereumAddress',['../classfaker_1_1Finance.html#aa594f9b0b12b277c63b6db8342db8bf7',1,'faker::Finance']]], ['exampleemail_6',['exampleEmail',['../classfaker_1_1Internet.html#a97776d509e7284b2663aa5631dc21bbc',1,'faker::Internet']]] diff --git a/search/functions_7.js b/search/functions_7.js index a356ee4a2..56dfba96f 100644 --- a/search/functions_7.js +++ b/search/functions_7.js @@ -8,10 +8,10 @@ var searchData= ['hsb_5',['hsb',['../classfaker_1_1Color.html#ae3253948412674d74a3ad9c010df5b77',1,'faker::Color']]], ['hsl_6',['hsl',['../classfaker_1_1Color.html#ac76590c23d158333133277b6f6f2163a',1,'faker::Color']]], ['hsv_7',['hsv',['../classfaker_1_1Color.html#a678712ced9e1af658474934bb418faab',1,'faker::Color']]], - ['httpmediatype_8',['httpMediaType',['../classfaker_1_1Internet.html#ab5bd8ab51d4594f34d1edc35e357a1b2',1,'faker::Internet']]], - ['httpmethod_9',['httpMethod',['../classfaker_1_1Internet.html#a1787871f9974218270bdd597320eae16',1,'faker::Internet']]], - ['httprequestheader_10',['httpRequestHeader',['../classfaker_1_1Internet.html#ab5c23e5e20d5d76c3e87e7fdbe4533b5',1,'faker::Internet']]], - ['httpresponseheader_11',['httpResponseHeader',['../classfaker_1_1Internet.html#a2035e26d9d435c144c96f3a78c02c390',1,'faker::Internet']]], + ['httpmediatype_8',['httpMediaType',['../classfaker_1_1Internet.html#aae170262056747b12da5190204a2a6f7',1,'faker::Internet']]], + ['httpmethod_9',['httpMethod',['../classfaker_1_1Internet.html#ab8f31cf5b891958ef42ad5fed573efbe',1,'faker::Internet']]], + ['httprequestheader_10',['httpRequestHeader',['../classfaker_1_1Internet.html#a97fb8df2a16c6d117d32db1d2b9e5bf9',1,'faker::Internet']]], + ['httpresponseheader_11',['httpResponseHeader',['../classfaker_1_1Internet.html#a7fa7b4093b7d3895cfe4210507caf3a2',1,'faker::Internet']]], ['httpstatuscode_12',['httpStatusCode',['../classfaker_1_1Internet.html#ac9c4ff01e85aa66576683bdce5969b37',1,'faker::Internet']]], ['humidity_13',['humidity',['../classfaker_1_1Weather.html#af7a0525193a2748adf628334d5eb542a',1,'faker::Weather']]] ]; diff --git a/search/functions_8.js b/search/functions_8.js index 5138d0d95..68325c659 100644 --- a/search/functions_8.js +++ b/search/functions_8.js @@ -7,7 +7,7 @@ var searchData= ['insect_4',['insect',['../classfaker_1_1Animal.html#a39b979fed3ee8345c9f50475b76dc849',1,'faker::Animal']]], ['integer_5',['integer',['../classfaker_1_1Number.html#a1af485acb65ed7312f13f4cb56f1a7c4',1,'faker::Number::integer(I min, I max)'],['../classfaker_1_1Number.html#a54b28a308f74a60108602918f39785fc',1,'faker::Number::integer(I max)']]], ['interjection_6',['interjection',['../classfaker_1_1Word.html#afc9739dc4b26cb9b8bec5160336cbabb',1,'faker::Word']]], - ['ipv4_7',['ipv4',['../classfaker_1_1Internet.html#a7aa45388e3c92c943e25f704e9889c3a',1,'faker::Internet::ipv4(IPv4Class ipv4class=IPv4Class::C)'],['../classfaker_1_1Internet.html#a50ba49be4f910fa160bcc48eb313f64f',1,'faker::Internet::ipv4(const std::array< unsigned int, 4 > &baseIpv4Address, const std::array< unsigned int, 4 > &generationMask)']]], + ['ipv4_7',['ipv4',['../classfaker_1_1Internet.html#afba2d4de956d4553c378ee8aafb26097',1,'faker::Internet::ipv4(const IPv4Class &ipv4class=IPv4Class::C)'],['../classfaker_1_1Internet.html#a50ba49be4f910fa160bcc48eb313f64f',1,'faker::Internet::ipv4(const std::array< unsigned int, 4 > &baseIpv4Address, const std::array< unsigned int, 4 > &generationMask)']]], ['ipv6_8',['ipv6',['../classfaker_1_1Internet.html#abe53af22a375870b7feb9020d2a13b53',1,'faker::Internet']]], ['isbn_9',['isbn',['../classfaker_1_1Book.html#a36a029ac46aec31dcacb77de11d8ccfc',1,'faker::Book']]], ['isbn10_10',['ISBN10',['../classfaker_1_1Commerce.html#ad1d6d27dbb45f6c63644a16cee16bc84',1,'faker::Commerce']]], diff --git a/search/functions_e.js b/search/functions_e.js index f4e7904c5..394eb3a60 100644 --- a/search/functions_e.js +++ b/search/functions_e.js @@ -3,7 +3,7 @@ var searchData= ['paragraph_0',['paragraph',['../classfaker_1_1Lorem.html#a33a5333530f8b321e5808fcadc39dd12',1,'faker::Lorem']]], ['paragraphs_1',['paragraphs',['../classfaker_1_1Lorem.html#a57d8b13b30b251ada56adcd861859b77',1,'faker::Lorem']]], ['passport_2',['passport',['../classfaker_1_1Person.html#a31d271dc8524dbf7ccb1b119c605bd48',1,'faker::Person']]], - ['password_3',['password',['../classfaker_1_1Internet.html#aa485a1fe01f437fb5787b28d94d9c077',1,'faker::Internet']]], + ['password_3',['password',['../classfaker_1_1Internet.html#af61a12e80cb2425625409a6d779cdedc',1,'faker::Internet']]], ['pastdate_4',['pastDate',['../classfaker_1_1Date.html#a4dd0c5ac91cfd75e02001acbf736b831',1,'faker::Date']]], ['paymentprovider_5',['paymentProvider',['../classfaker_1_1Commerce.html#a2d7da9ad75665143d304caace228d213',1,'faker::Commerce']]], ['paymenttype_6',['paymentType',['../classfaker_1_1Commerce.html#a13a34df1732d40a9103c9dcb64a668a8',1,'faker::Commerce']]], @@ -24,6 +24,6 @@ var searchData= ['productname_21',['productName',['../classfaker_1_1Commerce.html#a95bff9ff680bd6713de5ea78eec4e8d3',1,'faker::Commerce']]], ['productrating_22',['productRating',['../classfaker_1_1Commerce.html#a4a86e309f5a7ebe2d093e4e8f3bd1907',1,'faker::Commerce']]], ['productreview_23',['productReview',['../classfaker_1_1Commerce.html#a3d052f9a394da7294a2e352f1808b6b4',1,'faker::Commerce']]], - ['protocol_24',['protocol',['../classfaker_1_1Internet.html#afcec10d2c5cccf38bfc9c5ddda6d7a04',1,'faker::Internet']]], + ['protocol_24',['protocol',['../classfaker_1_1Internet.html#a6694708680bfa716d51039bd89c315c0',1,'faker::Internet']]], ['publisher_25',['publisher',['../classfaker_1_1Book.html#a7dec83353a67c2c7e1851fdb88eb993c',1,'faker::Book']]] ];