diff --git a/Helper_8h_source.html b/Helper_8h_source.html index 67a07e8e9..74cc2d982 100644 --- a/Helper_8h_source.html +++ b/Helper_8h_source.html @@ -108,232 +108,195 @@
4#include <functional>
5#include <initializer_list>
6#include <numeric>
-
7#include <set>
-
8#include <span>
-
9#include <string>
-
10#include <vector>
-
11
-
12#include "Datatype.h"
-
13#include "Number.h"
-
14
-
15namespace faker
-
16{
-
-
17class Helper
-
18{
-
19public:
-
34 template <class T>
-
-
35 static T arrayElement(std::span<const T> data)
+
7#include <random>
+
8#include <set>
+
9#include <span>
+
10#include <string>
+
11#include <vector>
+
12
+
13#include "Datatype.h"
+
14#include "Number.h"
+
15
+
16namespace faker::helper
+
17{
+
32template <class T>
+
33T arrayElement(std::span<const T> data)
+
34{
+
35 if (data.empty())
36 {
-
37 if (data.empty())
-
38 {
-
39 throw std::invalid_argument{"Data is empty."};
-
40 }
+
37 throw std::invalid_argument{"Data is empty."};
+
38 }
+
39
+
40 const auto index = number::integer<size_t>(data.size() - 1);
41
-
42 const auto index = number::integer<size_t>(data.size() - 1);
-
43
-
44 return data[index];
-
45 }
-
-
46
-
47 template <typename T, std::size_t N>
-
48 static T arrayElement(const std::array<T, N>& data)
+
42 return data[index];
+
43}
+
44
+
45template <typename T, std::size_t N>
+
46T arrayElement(const std::array<T, N>& data)
+
47{
+
48 if (data.empty())
49 {
-
50 if (data.empty())
-
51 {
-
52 throw std::invalid_argument{"Data is empty."};
-
53 }
+
50 throw std::invalid_argument{"Data is empty."};
+
51 }
+
52
+
53 const auto index = number::integer<size_t>(data.size() - 1);
54
-
55 const auto index = number::integer<size_t>(data.size() - 1);
-
56
-
57 return data[index];
-
58 }
-
59
-
60 template <typename It>
-
61 static auto arrayElement(It start, It end) -> decltype(*::std::declval<It>())
-
62 {
-
63 auto size = static_cast<size_t>(end - start);
-
64
-
65 if (size == 0)
-
66 {
-
67 throw std::invalid_argument{"Range [start,end) is empty."};
-
68 }
+
55 return data[index];
+
56}
+
57
+
58template <typename It>
+
59auto arrayElement(It start, It end) -> decltype(*::std::declval<It>())
+
60{
+
61 auto size = static_cast<size_t>(end - start);
+
62
+
63 if (size == 0)
+
64 {
+
65 throw std::invalid_argument{"Range [start,end) is empty."};
+
66 }
+
67
+
68 const std::integral auto index = number::integer<size_t>(size - 1);
69
-
70 const std::integral auto index = number::integer<size_t>(size - 1);
-
71
-
72 return start[index];
-
73 }
-
74
-
88 template <class T>
-
-
89 static T arrayElement(const std::vector<T>& data)
+
70 return start[index];
+
71}
+
72
+
86template <class T>
+
87T arrayElement(const std::vector<T>& data)
+
88{
+
89 if (data.empty())
90 {
-
91 if (data.empty())
-
92 {
-
93 throw std::invalid_argument{"Data is empty."};
-
94 }
+
91 throw std::invalid_argument{"Data is empty."};
+
92 }
+
93
+
94 const auto index = number::integer<size_t>(data.size() - 1);
95
-
96 const auto index = number::integer<size_t>(data.size() - 1);
-
97
-
98 return data[index];
-
99 }
-
-
100
-
114 template <class T>
-
-
115 static T arrayElement(const std::initializer_list<T>& data)
+
96 return data[index];
+
97}
+
98
+
112template <class T>
+
113T arrayElement(const std::initializer_list<T>& data)
+
114{
+
115 if (data.size() == 0)
116 {
-
117 if (data.size() == 0)
-
118 {
-
119 throw std::invalid_argument{"Data is empty."};
-
120 }
+
117 throw std::invalid_argument{"Data is empty."};
+
118 }
+
119
+
120 const auto index = number::integer<size_t>(data.size() - 1);
121
-
122 const auto index = number::integer<size_t>(data.size() - 1);
-
123
-
124 return *(data.begin() + index);
-
125 }
-
-
126
-
141 template <class T>
-
-
142 static T setElement(const std::set<T>& data)
+
122 return *(data.begin() + index);
+
123}
+
124
+
139template <class T>
+
140T setElement(const std::set<T>& data)
+
141{
+
142 if (data.empty())
143 {
-
144 if (data.empty())
-
145 {
-
146 throw std::invalid_argument{"Data is empty."};
-
147 }
+
144 throw std::invalid_argument{"Data is empty."};
+
145 }
+
146
+
147 T item;
148
-
149 T item;
+
149 static std::mt19937 pseudoRandomGenerator(std::random_device{}());
150
-
151 std::sample(data.begin(), data.end(), &item, 1, pseudoRandomGenerator);
+
151 std::sample(data.begin(), data.end(), &item, 1, pseudoRandomGenerator);
152
-
153 return item;
-
154 }
-
+
153 return item;
+
154}
155
-
156 template <class T>
+
156template <class T>
- -
158 {
-
159 unsigned weight;
-
160 T value;
-
161 };
+ +
158{
+
159 unsigned weight;
+
160 T value;
+
161};
162
-
177 template <class T>
-
-
178 static T weightedArrayElement(const std::vector<WeightedElement<T>>& data)
-
179 {
-
180 if (data.empty())
-
181 {
-
182 throw std::invalid_argument{"Data is empty."};
-
183 }
+
177template <class T>
+
178T weightedArrayElement(const std::vector<WeightedElement<T>>& data)
+
179{
+
180 if (data.empty())
+
181 {
+
182 throw std::invalid_argument{"Data is empty."};
+
183 }
184
-
185 const auto sumOfWeights =
-
186 std::accumulate(data.begin(), data.end(), 0u,
-
187 [](unsigned sum, const WeightedElement<T>& element) { return sum + element.weight; });
+
185 const auto sumOfWeights =
+
186 std::accumulate(data.begin(), data.end(), 0u,
+
187 [](unsigned sum, const WeightedElement<T>& element) { return sum + element.weight; });
188
-
189 if (sumOfWeights == 0u)
-
190 {
-
191 throw std::invalid_argument{"Sum of weights is zero."};
-
192 }
+
189 if (sumOfWeights == 0u)
+
190 {
+
191 throw std::invalid_argument{"Sum of weights is zero."};
+
192 }
193
-
194 const std::integral auto targetWeightValue = number::integer<unsigned>(1, sumOfWeights);
+
194 const std::integral auto targetWeightValue = number::integer<unsigned>(1, sumOfWeights);
195
-
196 unsigned currentSum = 0;
+
196 unsigned currentSum = 0;
197
-
198 size_t currentIdx = 0;
+
198 size_t currentIdx = 0;
199
-
200 while (currentIdx < data.size())
-
201 {
-
202 currentSum += data[currentIdx].weight;
+
200 while (currentIdx < data.size())
+
201 {
+
202 currentSum += data[currentIdx].weight;
203
-
204 if (currentSum >= targetWeightValue)
-
205 {
-
206 break;
-
207 }
+
204 if (currentSum >= targetWeightValue)
+
205 {
+
206 break;
+
207 }
208
-
209 currentIdx++;
-
210 }
+
209 currentIdx++;
+
210 }
211
-
212 return data.at(currentIdx).value;
-
213 }
-
+
212 return data.at(currentIdx).value;
+
213}
214
-
226 static std::string shuffleString(std::string data);
+
226std::string shuffleString(std::string data);
227
-
248 template <typename T>
-
-
249 static typename T::key_type objectKey(const T& object)
-
250 {
-
251 if (object.empty())
-
252 {
-
253 throw std::runtime_error("Object is empty.");
-
254 }
+
248template <typename T>
+
249typename T::key_type objectKey(const T& object)
+
250{
+
251 if (object.empty())
+
252 {
+
253 throw std::runtime_error("Object is empty.");
+
254 }
255
-
256 std::vector<typename T::key_type> keys;
+
256 std::vector<typename T::key_type> keys;
257
-
258 for (const auto& entry : object)
-
259 {
-
260 keys.push_back(entry.first);
-
261 }
+
258 for (const auto& entry : object)
+
259 {
+
260 keys.push_back(entry.first);
+
261 }
262
- -
264 }
-
+
263 return arrayElement<typename T::key_type>(keys);
+
264}
265
-
282 template <typename TResult>
-
-
283 static TResult maybe(std::function<TResult()> callback, double probability = 0.5)
-
284 {
-
285 if (datatype::boolean(probability))
-
286 {
-
287 return callback();
-
288 }
+
282template <typename TResult>
+
283TResult maybe(std::function<TResult()> callback, double probability = 0.5)
+
284{
+
285 if (datatype::boolean(probability))
+
286 {
+
287 return callback();
+
288 }
289
-
290 return TResult();
-
291 }
-
+
290 return TResult();
+
291}
292
-
307 template <typename T, std::size_t N>
-
-
308 static std::vector<T> toVector(const std::array<T, N>& arr)
-
309 {
-
310 std::vector<T> vec;
-
311 vec.reserve(N);
-
312 vec.insert(vec.end(), arr.begin(), arr.end());
-
313 return vec;
-
314 }
-
+
307template <typename T, std::size_t N>
+
308std::vector<T> toVector(const std::array<T, N>& arr)
+
309{
+
310 std::vector<T> vec;
+
311 vec.reserve(N);
+
312 vec.insert(vec.end(), arr.begin(), arr.end());
+
313 return vec;
+
314}
315
-
332 static std::string replaceSymbolWithNumber(const std::string& str, const char& symbol = '#');
+
332std::string replaceSymbolWithNumber(const std::string& str, const char& symbol = '#');
333
-
349 static std::string replaceCreditCardSymbols(const std::string& inputString = "6453-####-####-####-###L",
-
350 char symbol = '#');
-
351
-
372 static std::string regexpStyleStringParse(const std::string& input);
-
373
-
374private:
-
375 static std::random_device randomDevice;
-
376 static std::mt19937 pseudoRandomGenerator;
-
377};
-
-
378}
-
faker::Helper
Definition Helper.h:18
-
faker::Helper::objectKey
static T::key_type objectKey(const T &object)
Returns a random key from given object.
Definition Helper.h:249
-
faker::Helper::maybe
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:283
-
faker::Helper::arrayElement
static T arrayElement(std::span< const T > data)
Get a random element from an STL container.
Definition Helper.h:35
-
faker::Helper::toVector
static std::vector< T > toVector(const std::array< T, N > &arr)
Returns a vector equivalent to the given array.
Definition Helper.h:308
-
faker::Helper::weightedArrayElement
static T weightedArrayElement(const std::vector< WeightedElement< T > > &data)
Get a random element by weight from a vector.
Definition Helper.h:178
-
faker::Helper::arrayElement
static T arrayElement(const std::initializer_list< T > &data)
Get a random element from an initializer list.
Definition Helper.h:115
-
faker::Helper::replaceCreditCardSymbols
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...
-
faker::Helper::shuffleString
static std::string shuffleString(std::string data)
Returns shuffled std::string.
-
faker::Helper::replaceSymbolWithNumber
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"...
-
faker::Helper::arrayElement
static T arrayElement(const std::vector< T > &data)
Get a random element from a vector.
Definition Helper.h:89
-
faker::Helper::regexpStyleStringParse
static std::string regexpStyleStringParse(const std::string &input)
Returns the replaced regex-like expression in the string with matching values.
-
faker::Helper::setElement
static T setElement(const std::set< T > &data)
Get a random element from a std::set.
Definition Helper.h:142
-
faker::Helper::WeightedElement
Definition Helper.h:158
+
349std::string replaceCreditCardSymbols(const std::string& inputString = "6453-####-####-####-###L", char symbol = '#');
+
350
+
371std::string regexpStyleStringParse(const std::string& input);
+
372}
+
faker::helper::WeightedElement
Definition Helper.h:158
diff --git a/Number_8h_source.html b/Number_8h_source.html index 4f43fa32a..5ff15c927 100644 --- a/Number_8h_source.html +++ b/Number_8h_source.html @@ -110,47 +110,48 @@
6
7namespace faker::number
8{
-
9 namespace{
-
10 std::mt19937 pseudoRandomGenerator;
-
11 }
-
24 template <std::integral I>
-
25 I integer(I min, I max)
-
26 {
-
27 if (min > max)
-
28 {
-
29 throw std::invalid_argument("Minimum value must be smaller than maximum value.");
-
30 }
-
31
-
32 std::uniform_int_distribution<I> distribution(min, max);
-
33
-
34 return distribution(pseudoRandomGenerator);
-
35 }
-
36
-
49 template <std::integral I>
-
50 I integer(I max)
-
51 {
-
52 return integer<I>(static_cast<I>(0), max);
-
53 }
-
54
-
67 template <std::floating_point F>
-
68 F decimal(F min, F max)
-
69 {
-
70 if (min > max)
-
71 {
-
72 throw std::invalid_argument("Minimum value must be smaller than maximum value.");
-
73 }
-
74
-
75 std::uniform_real_distribution<F> distribution(min, max);
-
76
-
77 return distribution(pseudoRandomGenerator);
-
78 }
-
79
-
92 template <std::floating_point F>
-
93 F decimal(F max)
-
94 {
-
95 return decimal<F>(static_cast<F>(0.), max);
-
96 }
+
21template <std::integral I>
+
22I integer(I min, I max)
+
23{
+
24 if (min > max)
+
25 {
+
26 throw std::invalid_argument("Minimum value must be smaller than maximum value.");
+
27 }
+
28
+
29 static std::mt19937 pseudoRandomGenerator{std::random_device{}()};
+
30
+
31 std::uniform_int_distribution<I> distribution(min, max);
+
32
+
33 return distribution(pseudoRandomGenerator);
+
34}
+
35
+
48template <std::integral I>
+
49I integer(I max)
+
50{
+
51 return integer<I>(static_cast<I>(0), max);
+
52}
+
53
+
66template <std::floating_point F>
+
67F decimal(F min, F max)
+
68{
+
69 if (min > max)
+
70 {
+
71 throw std::invalid_argument("Minimum value must be smaller than maximum value.");
+
72 }
+
73
+
74 static std::mt19937 pseudoRandomGenerator{std::random_device{}()};
+
75
+
76 std::uniform_real_distribution<F> distribution(min, max);
+
77
+
78 return distribution(pseudoRandomGenerator);
+
79}
+
80
+
93template <std::floating_point F>
+
94F decimal(F max)
+
95{
+
96 return decimal<F>(static_cast<F>(0.), max);
97}
+
98}
diff --git a/annotated.html b/annotated.html index 5b1679a6c..be0f421d5 100644 --- a/annotated.html +++ b/annotated.html @@ -114,16 +114,16 @@  CCurrency  Ngit  CAuthor - Ninternet - CPasswordOptions - Nstring - CCharCount - Nsystem - CCronOptions - CFileOptions - CNetworkInterfaceOptions - CHelper - CWeightedElement + Nhelper + CWeightedElement + Ninternet + CPasswordOptions + Nstring + CCharCount + Nsystem + CCronOptions + CFileOptions + CNetworkInterfaceOptions  CRandomGenerator  CScience  CChemicalElement diff --git a/annotated_dup.js b/annotated_dup.js index db3c294ca..87f36130e 100644 --- a/annotated_dup.js +++ b/annotated_dup.js @@ -13,6 +13,9 @@ var annotated_dup = [ "git", null, [ [ "Author", "structfaker_1_1git_1_1Author.html", null ] ] ], + [ "helper", null, [ + [ "WeightedElement", "structfaker_1_1helper_1_1WeightedElement.html", null ] + ] ], [ "internet", null, [ [ "PasswordOptions", "structfaker_1_1internet_1_1PasswordOptions.html", null ] ] ], @@ -24,7 +27,6 @@ var annotated_dup = [ "FileOptions", "structfaker_1_1system_1_1FileOptions.html", null ], [ "NetworkInterfaceOptions", "structfaker_1_1system_1_1NetworkInterfaceOptions.html", null ] ] ], - [ "Helper", "classfaker_1_1Helper.html", "classfaker_1_1Helper" ], [ "RandomGenerator", "classfaker_1_1RandomGenerator.html", null ], [ "Science", "classfaker_1_1Science.html", "classfaker_1_1Science" ] ] ] diff --git a/classes.html b/classes.html index 3649627ba..061f36d1b 100644 --- a/classes.html +++ b/classes.html @@ -102,7 +102,7 @@
Class Index
-
A | C | F | H | N | P | R | S | U | W
+
A | C | F | N | P | R | S | U | W
A
@@ -114,26 +114,23 @@
F
FileOptions (faker::system)
-
H
-
Helper (faker)
-
N
NetworkInterfaceOptions (faker::system)
-
+
P
PasswordOptions (faker::internet)
-
+
R
RandomGenerator (faker)
Range (faker::airline)
-
+
S
Science (faker)
-
+
U
Science::Unit (faker)
-
+
W
-
Helper::WeightedElement (faker)
+
WeightedElement (faker::helper)
diff --git a/classfaker_1_1Helper-members.html b/classfaker_1_1Helper-members.html deleted file mode 100644 index 139bd17e0..000000000 --- a/classfaker_1_1Helper-members.html +++ /dev/null @@ -1,131 +0,0 @@ - - - - - - - -Faker C++: Member List - - - - - - - - - - - - - - - - - -
-
- - - - - - - -
-
Faker C++ -
-
-
- - - - - - - - -
-
- -
-
-
- -
- -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- -
-
faker::Helper Member List
-
-
- -

This is the complete list of members for faker::Helper, including all inherited members.

- - - - - - - - - - - - - - - -
arrayElement(std::span< const T > data)faker::Helperinlinestatic
arrayElement(const std::array< T, N > &data) (defined in faker::Helper)faker::Helperinlinestatic
arrayElement(It start, It end) -> decltype(*::std::declval< It >()) (defined in faker::Helper)faker::Helperinlinestatic
arrayElement(const std::vector< T > &data)faker::Helperinlinestatic
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
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 deleted file mode 100644 index cd1573538..000000000 --- a/classfaker_1_1Helper.html +++ /dev/null @@ -1,724 +0,0 @@ - - - - - - - -Faker C++: faker::Helper Class Reference - - - - - - - - - - - - - - - - - -
-
- - - - - - - -
-
Faker C++ -
-
-
- - - - - - - - -
-
- -
-
-
- -
- -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- -
- -
faker::Helper Class Reference
-
-
- - - - -

-Classes

struct  WeightedElement
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Static Public Member Functions

template<class T >
static T arrayElement (std::span< const T > data)
 Get a random element from an STL container.
 
-template<typename T , std::size_t N>
static T arrayElement (const std::array< T, N > &data)
 
-template<typename It >
static auto arrayElement (It start, It end) -> decltype(*::std::declval< It >())
 
template<class T >
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.
 
template<class T >
static T weightedArrayElement (const std::vector< WeightedElement< T > > &data)
 Get a random element by weight from a vector.
 
static std::string shuffleString (std::string data)
 Returns shuffled std::string.
 
template<typename T >
static T::key_type objectKey (const T &object)
 Returns a random key from given object.
 
template<typename TResult >
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").
 
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 checksum This method supports both range patterns `[4-9]` as well as the patterns used by `replaceSymbolWithNumber()`. `L` will be replaced with the appropriate Luhn checksum.
 
static std::string regexpStyleStringParse (const std::string &input)
 Returns the replaced regex-like expression in the string with matching values.
 
-

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() [2/3]

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

Get a random element from a vector.

-
Template Parameters
- - -
Tan element type of the vector.
-
-
-
Parameters
- - -
datavector of elements.
-
-
-
Returns
T a random element from the vector.
-
Helper::arrayElement<std::string>(std::vector<std::string>{{"hello"}, {"world"}}) // "hello"
-
-
-
- -

◆ arrayElement() [3/3]

- -
-
-
-template<class T >
- - - - - -
- - - - - - - -
static T faker::Helper::arrayElement (std::span< const T > data)
-
-inlinestatic
-
- -

Get a random element from an STL container.

-
Template Parameters
- - -
Tan element type of the container.
-
-
-
Parameters
- - -
dataThe container.
-
-
-
Returns
T a random element from the container.
-
Helper::arrayElement<char>(std::string{"abcd"}) // "b"
-
Helper::arrayElement<std::string>(std::vector<std::string>{{"hello"}, {"world"}}) // "hello"
-
-
-
- -

◆ maybe()

- -
-
-
-template<typename TResult >
- - - - - -
- - - - - - - - - - - -
static TResult faker::Helper::maybe (std::function< TResult()> callback,
double probability = 0.5 )
-
-inlinestatic
-
- -

Returns the result of the callback if the probability check was successful, otherwise empty string.

-
Template Parameters
- - -
TResultThe type of result of the given callback.
-
-
-
Parameters
- - - -
callbackThe callback to that will be invoked if the probability check was successful.
probabilityThe probability (`[0.00, 1.00]`) of the callback being invoked. Defaults to `0.5`.
-
-
-
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:283
-
-
-
- -

◆ objectKey()

- -
-
-
-template<typename T >
- - - - - -
- - - - - - - -
static T::key_type faker::Helper::objectKey (const T & object)
-
-inlinestatic
-
- -

Returns a random key from given object.

-
Template Parameters
- - -
TThe type of the object to select from.
-
-
-
Parameters
- - -
objectThe object to be used.
-
-
-
Exceptions
- - -
Ifthe given object is empty
-
-
-
Returns
A random key from given object.
-
std::unordered_map<int, std::string> testMap = {
-
{1, "one"},
-
{2, "two"},
-
{3, "three"}
-
};
-
Helper::objectKey(testMap) // "2"
-
static T::key_type objectKey(const T &object)
Returns a random key from given object.
Definition Helper.h:249
-
-
-
- -

◆ regexpStyleStringParse()

- -
-
- - - - - -
- - - - - - - -
static std::string faker::Helper::regexpStyleStringParse (const std::string & input)
-
-static
-
- -

Returns the replaced regex-like expression in the string with matching values.

-

Supported patterns:

    -
  • `.{times}` => Repeat the character exactly `times` times.
  • -
  • `.{min,max}` => Repeat the character `min` to `max` times.
  • -
  • `[min-max]` => Generate a number between min and max (inclusive).
  • -
-
Parameters
- - -
inputThe template string to to parse.
-
-
-
Returns
The replaced regex-like expression in the string with matching values.
-
-
Helper::regexpStyleStringParse("#{5}") // "#####"
-
Helper::regexpStyleStringParse("#{2,9}") // "#######"
-
Helper::regexpStyleStringParse("[500-15000]") // "8375"
-
Helper::regexpStyleStringParse("#{3}test[1-5]") // "###test3"
-
Definition Helper.h:18
-
static std::string regexpStyleStringParse(const std::string &input)
Returns the replaced regex-like expression in the string with matching values.
-
-
-
- -

◆ replaceCreditCardSymbols()

- -
-
- - - - - -
- - - - - - - - - - - -
static std::string faker::Helper::replaceCreditCardSymbols (const std::string & inputString = "6453-####-####-####-###L",
char symbol = '#' )
-
-static
-
- -

Returns credit card schema with replaced symbols and patterns in a credit card including Luhn checksum This method supports both range patterns `[4-9]` as well as the patterns used by `replaceSymbolWithNumber()`. `L` will be replaced with the appropriate Luhn checksum.

-
Parameters
- - - -
inputStringTThe credit card format pattern. Defaults to "6453-####-####-####-###L".
symbolThe symbol to replace with a digit. Defaults to '#'.
-
-
-
Returns
The string replaced symbols with digits.
-
Helper::replaceCreditCardSymbols() // "6453-4876-8626-8995-3771"
-
Helper::replaceCreditCardSymbols("1234-[4-9]-##!!-L") // "1234-9-5298-2"
-
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...
-
-
-
- -

◆ replaceSymbolWithNumber()

- -
-
- - - - - -
- - - - - - - - - - - -
static std::string faker::Helper::replaceSymbolWithNumber (const std::string & str,
const char & symbol = '#' )
-
-static
-
- -

Returns the given string parsed symbol by symbol and replaced the placeholders with digits ("0" - "9"). "!" will be replaced by digits >=2 ("2" - "9").

-
Parameters
- - - -
strThe template to parse string.
symbolThe symbol to replace with digits. Defaults to '#'.
-
-
-
Returns
The string replaced symbols with digits.
-
-
Helper::replaceSymbolWithNumber("#####") // "04812"
-
Helper::replaceSymbolWithNumber("!####") // "27378"
-
Helper::replaceSymbolWithNumber("Your pin is: !####") // "29841"
-
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"...
-
-
-
- -

◆ setElement()

- -
-
-
-template<class T >
- - - - - -
- - - - - - - -
static T faker::Helper::setElement (const std::set< T > & data)
-
-inlinestatic
-
- -

Get a random element from a std::set.

-
Template Parameters
- - -
Tan element type of the std::set.
-
-
-
Parameters
- - -
std::setof elements.
-
-
-
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:142
-
-
-
- -

◆ shuffleString()

- -
-
- - - - - -
- - - - - - - -
static std::string faker::Helper::shuffleString (std::string data)
-
-static
-
- -

Returns shuffled std::string.

-
Parameters
- - -
dataString to be shuffled
-
-
-
Returns
std::string with shuffled chars
-
Helper::shuffleString("hello") // "eollh"
-
static std::string shuffleString(std::string data)
Returns shuffled std::string.
-
-
-
- -

◆ 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:308
-
-
-
- -

◆ weightedArrayElement()

- -
-
-
-template<class T >
- - - - - -
- - - - - - - -
static T faker::Helper::weightedArrayElement (const std::vector< WeightedElement< T > > & data)
-
-inlinestatic
-
- -

Get a random element by weight from a vector.

-
Template Parameters
- - -
Tan element type of the weighted element.
-
-
-
Parameters
- - -
datavector of weighted elements.
-
-
-
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:178
-
Definition Helper.h:158
-
-
-
-
The documentation for this class was generated from the following file: -
-
- - - - diff --git a/classfaker_1_1Helper.js b/classfaker_1_1Helper.js deleted file mode 100644 index 165b7634a..000000000 --- a/classfaker_1_1Helper.js +++ /dev/null @@ -1,4 +0,0 @@ -var classfaker_1_1Helper = -[ - [ "WeightedElement", "structfaker_1_1Helper_1_1WeightedElement.html", null ] -]; \ No newline at end of file diff --git a/doxygen_crawl.html b/doxygen_crawl.html index f3bbe45e0..afbef08c8 100644 --- a/doxygen_crawl.html +++ b/doxygen_crawl.html @@ -45,10 +45,6 @@ - - - - @@ -69,6 +65,8 @@ + + @@ -91,16 +89,6 @@ - - - - - - - - - - @@ -146,19 +134,6 @@ - - - - - - - - - - - - - @@ -173,7 +148,6 @@ - @@ -182,6 +156,7 @@ + diff --git a/functions.html b/functions.html index d9db5f414..5f31e4606 100644 --- a/functions.html +++ b/functions.html @@ -100,23 +100,13 @@
Here is a list of all documented class members with links to the class documentation for each member:
diff --git a/functions_func.html b/functions_func.html index dcafc75ae..97772eb5d 100644 --- a/functions_func.html +++ b/functions_func.html @@ -100,23 +100,13 @@
Here is a list of all documented functions with links to the class documentation for each member:
diff --git a/navtreeindex0.js b/navtreeindex0.js index 1bf53b935..92c0a0feb 100644 --- a/navtreeindex0.js +++ b/navtreeindex0.js @@ -39,7 +39,6 @@ var NAVTREEINDEX0 = "Word_8h_source.html":[1,0,0,0,36], "annotated.html":[0,0], "classes.html":[0,1], -"classfaker_1_1Helper.html":[0,0,0,6], "classfaker_1_1RandomGenerator.html":[0,0,0,7], "classfaker_1_1Science.html":[0,0,0,8], "dir_21275a4f97039163a157995766de70c2.html":[1,0,0,0], @@ -49,7 +48,6 @@ var NAVTREEINDEX0 = "functions_func.html":[0,2,1], "index.html":[], "pages.html":[], -"structfaker_1_1Helper_1_1WeightedElement.html":[0,0,0,6,0], "structfaker_1_1Science_1_1ChemicalElement.html":[0,0,0,8,0], "structfaker_1_1Science_1_1Unit.html":[0,0,0,8,1], "structfaker_1_1airline_1_1AirlineInfo.html":[0,0,0,0,0], @@ -58,9 +56,10 @@ var NAVTREEINDEX0 = "structfaker_1_1airline_1_1Range.html":[0,0,0,0,3], "structfaker_1_1finance_1_1Currency.html":[0,0,0,1,0], "structfaker_1_1git_1_1Author.html":[0,0,0,2,0], -"structfaker_1_1internet_1_1PasswordOptions.html":[0,0,0,3,0], -"structfaker_1_1string_1_1CharCount.html":[0,0,0,4,0], -"structfaker_1_1system_1_1CronOptions.html":[0,0,0,5,0], -"structfaker_1_1system_1_1FileOptions.html":[0,0,0,5,1], -"structfaker_1_1system_1_1NetworkInterfaceOptions.html":[0,0,0,5,2] +"structfaker_1_1helper_1_1WeightedElement.html":[0,0,0,3,0], +"structfaker_1_1internet_1_1PasswordOptions.html":[0,0,0,4,0], +"structfaker_1_1string_1_1CharCount.html":[0,0,0,5,0], +"structfaker_1_1system_1_1CronOptions.html":[0,0,0,6,0], +"structfaker_1_1system_1_1FileOptions.html":[0,0,0,6,1], +"structfaker_1_1system_1_1NetworkInterfaceOptions.html":[0,0,0,6,2] }; diff --git a/search/all_0.js b/search/all_0.js index 7eff05316..0d6ce0d7d 100644 --- a/search/all_0.js +++ b/search/all_0.js @@ -3,6 +3,5 @@ var searchData= ['airlineinfo_0',['AirlineInfo',['../structfaker_1_1airline_1_1AirlineInfo.html',1,'faker::airline']]], ['airplane_1',['Airplane',['../structfaker_1_1airline_1_1Airplane.html',1,'faker::airline']]], ['airport_2',['Airport',['../structfaker_1_1airline_1_1Airport.html',1,'faker::airline']]], - ['arrayelement_3',['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)']]], - ['author_4',['Author',['../structfaker_1_1git_1_1Author.html',1,'faker::git']]] + ['author_3',['Author',['../structfaker_1_1git_1_1Author.html',1,'faker::git']]] ]; diff --git a/search/all_4.js b/search/all_4.js index 75d8e827a..14ea0a1c3 100644 --- a/search/all_4.js +++ b/search/all_4.js @@ -1,4 +1,4 @@ var searchData= [ - ['helper_0',['Helper',['../classfaker_1_1Helper.html',1,'faker']]] + ['massunit_0',['massUnit',['../classfaker_1_1Science.html#a11c2fe7aa766dcb44275eeb8fdc01896',1,'faker::Science']]] ]; diff --git a/search/all_5.js b/search/all_5.js index 2c383f47e..063e5e3e2 100644 --- a/search/all_5.js +++ b/search/all_5.js @@ -1,5 +1,4 @@ var searchData= [ - ['massunit_0',['massUnit',['../classfaker_1_1Science.html#a11c2fe7aa766dcb44275eeb8fdc01896',1,'faker::Science']]], - ['maybe_1',['maybe',['../classfaker_1_1Helper.html#a378bc48e5d3c6438a70b75ede9e2d9a3',1,'faker::Helper']]] + ['networkinterfaceoptions_0',['NetworkInterfaceOptions',['../structfaker_1_1system_1_1NetworkInterfaceOptions.html',1,'faker::system']]] ]; diff --git a/search/all_6.js b/search/all_6.js index 063e5e3e2..3505c3c04 100644 --- a/search/all_6.js +++ b/search/all_6.js @@ -1,4 +1,4 @@ var searchData= [ - ['networkinterfaceoptions_0',['NetworkInterfaceOptions',['../structfaker_1_1system_1_1NetworkInterfaceOptions.html',1,'faker::system']]] + ['passwordoptions_0',['PasswordOptions',['../structfaker_1_1internet_1_1PasswordOptions.html',1,'faker::internet']]] ]; diff --git a/search/all_7.js b/search/all_7.js index cb3cc1146..c82855b5b 100644 --- a/search/all_7.js +++ b/search/all_7.js @@ -1,4 +1,5 @@ var searchData= [ - ['objectkey_0',['objectKey',['../classfaker_1_1Helper.html#a2767629938711ae619fadcf489698d11',1,'faker::Helper']]] + ['randomgenerator_0',['RandomGenerator',['../classfaker_1_1RandomGenerator.html',1,'faker']]], + ['range_1',['Range',['../structfaker_1_1airline_1_1Range.html',1,'faker::airline']]] ]; diff --git a/search/all_8.js b/search/all_8.js index 3505c3c04..2f06bbce9 100644 --- a/search/all_8.js +++ b/search/all_8.js @@ -1,4 +1,4 @@ var searchData= [ - ['passwordoptions_0',['PasswordOptions',['../structfaker_1_1internet_1_1PasswordOptions.html',1,'faker::internet']]] + ['science_0',['Science',['../classfaker_1_1Science.html',1,'faker']]] ]; diff --git a/search/all_9.js b/search/all_9.js index b8916e450..c4155c313 100644 --- a/search/all_9.js +++ b/search/all_9.js @@ -1,8 +1,5 @@ var searchData= [ - ['randomgenerator_0',['RandomGenerator',['../classfaker_1_1RandomGenerator.html',1,'faker']]], - ['range_1',['Range',['../structfaker_1_1airline_1_1Range.html',1,'faker::airline']]], - ['regexpstylestringparse_2',['regexpStyleStringParse',['../classfaker_1_1Helper.html#ad97b7e42b9f650bdea9ecba04b135768',1,'faker::Helper']]], - ['replacecreditcardsymbols_3',['replaceCreditCardSymbols',['../classfaker_1_1Helper.html#aa5b961cfbb6d333449127750f9e95199',1,'faker::Helper']]], - ['replacesymbolwithnumber_4',['replaceSymbolWithNumber',['../classfaker_1_1Helper.html#ab639ccfc5cae32dc2bf09e07b4b5c8d6',1,'faker::Helper']]] + ['tempunit_0',['tempUnit',['../classfaker_1_1Science.html#ab3667bf9c6d644ac1e07d42239b42179',1,'faker::Science']]], + ['timeunit_1',['timeUnit',['../classfaker_1_1Science.html#a326517a93a08ce089df339e11a96e40d',1,'faker::Science']]] ]; diff --git a/search/all_a.js b/search/all_a.js index 049ed6a4f..e7acdf05c 100644 --- a/search/all_a.js +++ b/search/all_a.js @@ -1,6 +1,5 @@ var searchData= [ - ['science_0',['Science',['../classfaker_1_1Science.html',1,'faker']]], - ['setelement_1',['setElement',['../classfaker_1_1Helper.html#afa9ce3f39af7cdaf537be7de5496e848',1,'faker::Helper']]], - ['shufflestring_2',['shuffleString',['../classfaker_1_1Helper.html#aac9274ace8624b68896fd049064bcfa3',1,'faker::Helper']]] + ['unit_0',['Unit',['../structfaker_1_1Science_1_1Unit.html',1,'faker::Science']]], + ['unit_1',['unit',['../classfaker_1_1Science.html#a1603947449ecc5b7bc31f5a4bbc4cc97',1,'faker::Science']]] ]; diff --git a/search/all_b.js b/search/all_b.js index a93dc05ff..ee25ad9bb 100644 --- a/search/all_b.js +++ b/search/all_b.js @@ -1,6 +1,4 @@ var searchData= [ - ['tempunit_0',['tempUnit',['../classfaker_1_1Science.html#ab3667bf9c6d644ac1e07d42239b42179',1,'faker::Science']]], - ['timeunit_1',['timeUnit',['../classfaker_1_1Science.html#a326517a93a08ce089df339e11a96e40d',1,'faker::Science']]], - ['tovector_2',['toVector',['../classfaker_1_1Helper.html#a505d077c850b9914762fb68af0d926cf',1,'faker::Helper']]] + ['weightedelement_0',['WeightedElement',['../structfaker_1_1helper_1_1WeightedElement.html',1,'faker::helper']]] ]; diff --git a/search/all_c.js b/search/all_c.js deleted file mode 100644 index e7acdf05c..000000000 --- a/search/all_c.js +++ /dev/null @@ -1,5 +0,0 @@ -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']]] -]; diff --git a/search/all_d.js b/search/all_d.js deleted file mode 100644 index fe7b25248..000000000 --- a/search/all_d.js +++ /dev/null @@ -1,5 +0,0 @@ -var searchData= -[ - ['weightedarrayelement_0',['weightedArrayElement',['../classfaker_1_1Helper.html#a5e0553c162b6398aa7c0ba0927af17bf',1,'faker::Helper']]], - ['weightedelement_1',['WeightedElement',['../structfaker_1_1Helper_1_1WeightedElement.html',1,'faker::Helper']]] -]; diff --git a/search/classes_3.js b/search/classes_3.js index 75d8e827a..063e5e3e2 100644 --- a/search/classes_3.js +++ b/search/classes_3.js @@ -1,4 +1,4 @@ var searchData= [ - ['helper_0',['Helper',['../classfaker_1_1Helper.html',1,'faker']]] + ['networkinterfaceoptions_0',['NetworkInterfaceOptions',['../structfaker_1_1system_1_1NetworkInterfaceOptions.html',1,'faker::system']]] ]; diff --git a/search/classes_4.js b/search/classes_4.js index 063e5e3e2..3505c3c04 100644 --- a/search/classes_4.js +++ b/search/classes_4.js @@ -1,4 +1,4 @@ var searchData= [ - ['networkinterfaceoptions_0',['NetworkInterfaceOptions',['../structfaker_1_1system_1_1NetworkInterfaceOptions.html',1,'faker::system']]] + ['passwordoptions_0',['PasswordOptions',['../structfaker_1_1internet_1_1PasswordOptions.html',1,'faker::internet']]] ]; diff --git a/search/classes_5.js b/search/classes_5.js index 3505c3c04..c82855b5b 100644 --- a/search/classes_5.js +++ b/search/classes_5.js @@ -1,4 +1,5 @@ var searchData= [ - ['passwordoptions_0',['PasswordOptions',['../structfaker_1_1internet_1_1PasswordOptions.html',1,'faker::internet']]] + ['randomgenerator_0',['RandomGenerator',['../classfaker_1_1RandomGenerator.html',1,'faker']]], + ['range_1',['Range',['../structfaker_1_1airline_1_1Range.html',1,'faker::airline']]] ]; diff --git a/search/classes_6.js b/search/classes_6.js index c82855b5b..2f06bbce9 100644 --- a/search/classes_6.js +++ b/search/classes_6.js @@ -1,5 +1,4 @@ var searchData= [ - ['randomgenerator_0',['RandomGenerator',['../classfaker_1_1RandomGenerator.html',1,'faker']]], - ['range_1',['Range',['../structfaker_1_1airline_1_1Range.html',1,'faker::airline']]] + ['science_0',['Science',['../classfaker_1_1Science.html',1,'faker']]] ]; diff --git a/search/classes_7.js b/search/classes_7.js index 2f06bbce9..80d3ca9f5 100644 --- a/search/classes_7.js +++ b/search/classes_7.js @@ -1,4 +1,4 @@ var searchData= [ - ['science_0',['Science',['../classfaker_1_1Science.html',1,'faker']]] + ['unit_0',['Unit',['../structfaker_1_1Science_1_1Unit.html',1,'faker::Science']]] ]; diff --git a/search/classes_8.js b/search/classes_8.js index 80d3ca9f5..ee25ad9bb 100644 --- a/search/classes_8.js +++ b/search/classes_8.js @@ -1,4 +1,4 @@ var searchData= [ - ['unit_0',['Unit',['../structfaker_1_1Science_1_1Unit.html',1,'faker::Science']]] + ['weightedelement_0',['WeightedElement',['../structfaker_1_1helper_1_1WeightedElement.html',1,'faker::helper']]] ]; diff --git a/search/classes_9.js b/search/classes_9.js deleted file mode 100644 index 2ee33a356..000000000 --- a/search/classes_9.js +++ /dev/null @@ -1,4 +0,0 @@ -var searchData= -[ - ['weightedelement_0',['WeightedElement',['../structfaker_1_1Helper_1_1WeightedElement.html',1,'faker::Helper']]] -]; diff --git a/search/functions_0.js b/search/functions_0.js index a6124be56..120346021 100644 --- a/search/functions_0.js +++ b/search/functions_0.js @@ -1,4 +1,5 @@ var searchData= [ - ['arrayelement_0',['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)']]] + ['chemicalelement_0',['chemicalElement',['../classfaker_1_1Science.html#a5116cd34282af4c47442a32567da8c81',1,'faker::Science']]], + ['currentunit_1',['currentUnit',['../classfaker_1_1Science.html#ac2014d2e2ef7e8f1ac52a47a72444c50',1,'faker::Science']]] ]; diff --git a/search/functions_1.js b/search/functions_1.js index 120346021..fc568876c 100644 --- a/search/functions_1.js +++ b/search/functions_1.js @@ -1,5 +1,4 @@ var searchData= [ - ['chemicalelement_0',['chemicalElement',['../classfaker_1_1Science.html#a5116cd34282af4c47442a32567da8c81',1,'faker::Science']]], - ['currentunit_1',['currentUnit',['../classfaker_1_1Science.html#ac2014d2e2ef7e8f1ac52a47a72444c50',1,'faker::Science']]] + ['distanceunit_0',['distanceUnit',['../classfaker_1_1Science.html#ab42a1c8263c0a0f2f74c6db5fcccd134',1,'faker::Science']]] ]; diff --git a/search/functions_2.js b/search/functions_2.js index fc568876c..14ea0a1c3 100644 --- a/search/functions_2.js +++ b/search/functions_2.js @@ -1,4 +1,4 @@ var searchData= [ - ['distanceunit_0',['distanceUnit',['../classfaker_1_1Science.html#ab42a1c8263c0a0f2f74c6db5fcccd134',1,'faker::Science']]] + ['massunit_0',['massUnit',['../classfaker_1_1Science.html#a11c2fe7aa766dcb44275eeb8fdc01896',1,'faker::Science']]] ]; diff --git a/search/functions_3.js b/search/functions_3.js index 2c383f47e..c4155c313 100644 --- a/search/functions_3.js +++ b/search/functions_3.js @@ -1,5 +1,5 @@ var searchData= [ - ['massunit_0',['massUnit',['../classfaker_1_1Science.html#a11c2fe7aa766dcb44275eeb8fdc01896',1,'faker::Science']]], - ['maybe_1',['maybe',['../classfaker_1_1Helper.html#a378bc48e5d3c6438a70b75ede9e2d9a3',1,'faker::Helper']]] + ['tempunit_0',['tempUnit',['../classfaker_1_1Science.html#ab3667bf9c6d644ac1e07d42239b42179',1,'faker::Science']]], + ['timeunit_1',['timeUnit',['../classfaker_1_1Science.html#a326517a93a08ce089df339e11a96e40d',1,'faker::Science']]] ]; diff --git a/search/functions_4.js b/search/functions_4.js index cb3cc1146..164d77a85 100644 --- a/search/functions_4.js +++ b/search/functions_4.js @@ -1,4 +1,4 @@ var searchData= [ - ['objectkey_0',['objectKey',['../classfaker_1_1Helper.html#a2767629938711ae619fadcf489698d11',1,'faker::Helper']]] + ['unit_0',['unit',['../classfaker_1_1Science.html#a1603947449ecc5b7bc31f5a4bbc4cc97',1,'faker::Science']]] ]; diff --git a/search/functions_5.js b/search/functions_5.js deleted file mode 100644 index ae92c1279..000000000 --- a/search/functions_5.js +++ /dev/null @@ -1,6 +0,0 @@ -var searchData= -[ - ['regexpstylestringparse_0',['regexpStyleStringParse',['../classfaker_1_1Helper.html#ad97b7e42b9f650bdea9ecba04b135768',1,'faker::Helper']]], - ['replacecreditcardsymbols_1',['replaceCreditCardSymbols',['../classfaker_1_1Helper.html#aa5b961cfbb6d333449127750f9e95199',1,'faker::Helper']]], - ['replacesymbolwithnumber_2',['replaceSymbolWithNumber',['../classfaker_1_1Helper.html#ab639ccfc5cae32dc2bf09e07b4b5c8d6',1,'faker::Helper']]] -]; diff --git a/search/functions_6.js b/search/functions_6.js deleted file mode 100644 index 22b4dc5bc..000000000 --- a/search/functions_6.js +++ /dev/null @@ -1,5 +0,0 @@ -var searchData= -[ - ['setelement_0',['setElement',['../classfaker_1_1Helper.html#afa9ce3f39af7cdaf537be7de5496e848',1,'faker::Helper']]], - ['shufflestring_1',['shuffleString',['../classfaker_1_1Helper.html#aac9274ace8624b68896fd049064bcfa3',1,'faker::Helper']]] -]; diff --git a/search/functions_7.js b/search/functions_7.js deleted file mode 100644 index a93dc05ff..000000000 --- a/search/functions_7.js +++ /dev/null @@ -1,6 +0,0 @@ -var searchData= -[ - ['tempunit_0',['tempUnit',['../classfaker_1_1Science.html#ab3667bf9c6d644ac1e07d42239b42179',1,'faker::Science']]], - ['timeunit_1',['timeUnit',['../classfaker_1_1Science.html#a326517a93a08ce089df339e11a96e40d',1,'faker::Science']]], - ['tovector_2',['toVector',['../classfaker_1_1Helper.html#a505d077c850b9914762fb68af0d926cf',1,'faker::Helper']]] -]; diff --git a/search/functions_8.js b/search/functions_8.js deleted file mode 100644 index 164d77a85..000000000 --- a/search/functions_8.js +++ /dev/null @@ -1,4 +0,0 @@ -var searchData= -[ - ['unit_0',['unit',['../classfaker_1_1Science.html#a1603947449ecc5b7bc31f5a4bbc4cc97',1,'faker::Science']]] -]; diff --git a/search/functions_9.js b/search/functions_9.js deleted file mode 100644 index a2b14be25..000000000 --- a/search/functions_9.js +++ /dev/null @@ -1,4 +0,0 @@ -var searchData= -[ - ['weightedarrayelement_0',['weightedArrayElement',['../classfaker_1_1Helper.html#a5e0553c162b6398aa7c0ba0927af17bf',1,'faker::Helper']]] -]; diff --git a/search/searchdata.js b/search/searchdata.js index df2d7db0e..2b315d373 100644 --- a/search/searchdata.js +++ b/search/searchdata.js @@ -1,8 +1,8 @@ var indexSectionsWithContent = { - 0: "acdfhmnoprstuw", - 1: "acfhnprsuw", - 2: "acdmorstuw" + 0: "acdfmnprstuw", + 1: "acfnprsuw", + 2: "cdmtu" }; var indexSectionNames = diff --git a/structfaker_1_1Helper_1_1WeightedElement-members.html b/structfaker_1_1helper_1_1WeightedElement-members.html similarity index 86% rename from structfaker_1_1Helper_1_1WeightedElement-members.html rename to structfaker_1_1helper_1_1WeightedElement-members.html index e11c3717a..479b90ae4 100644 --- a/structfaker_1_1Helper_1_1WeightedElement-members.html +++ b/structfaker_1_1helper_1_1WeightedElement-members.html @@ -73,7 +73,7 @@
@@ -99,14 +99,14 @@
-
faker::Helper::WeightedElement< T > Member List
+
faker::helper::WeightedElement< T > Member List
-

This is the complete list of members for faker::Helper::WeightedElement< T >, including all inherited members.

+

This is the complete list of members for faker::helper::WeightedElement< T >, including all inherited members.

- - + +
value (defined in faker::Helper::WeightedElement< T >)faker::Helper::WeightedElement< T >
weight (defined in faker::Helper::WeightedElement< T >)faker::Helper::WeightedElement< T >
value (defined in faker::helper::WeightedElement< T >)faker::helper::WeightedElement< T >
weight (defined in faker::helper::WeightedElement< T >)faker::helper::WeightedElement< T >
diff --git a/structfaker_1_1Helper_1_1WeightedElement.html b/structfaker_1_1helper_1_1WeightedElement.html similarity index 82% rename from structfaker_1_1Helper_1_1WeightedElement.html rename to structfaker_1_1helper_1_1WeightedElement.html index 5a2a75076..500a26d4b 100644 --- a/structfaker_1_1Helper_1_1WeightedElement.html +++ b/structfaker_1_1helper_1_1WeightedElement.html @@ -5,7 +5,7 @@ -Faker C++: faker::Helper::WeightedElement< T > Struct Template Reference +Faker C++: faker::helper::WeightedElement< T > Struct Template Reference @@ -73,7 +73,7 @@
@@ -101,19 +101,19 @@
-
faker::Helper::WeightedElement< T > Struct Template Reference
+List of all members
+
faker::helper::WeightedElement< T > Struct Template Reference
- - - + - +

Public Attributes

+
unsigned weight
 
+
 
value
 
 

The documentation for this struct was generated from the following file: