Faker C++
Loading...
Searching...
No Matches
phone.h
Go to the documentation of this file.
1#pragma once
2
3#include <optional>
4#include <string>
5#include <string_view>
6#include <unordered_map>
7
8#include "faker-cxx/export.h"
9
10namespace faker::phone
11{
26FAKER_CXX_EXPORT std::string phoneNumberByFormat(std::optional<std::string> = std::nullopt);
27
37FAKER_CXX_EXPORT std::string_view platform();
38
48FAKER_CXX_EXPORT std::string_view modelName();
49
59FAKER_CXX_EXPORT std::string_view manufacturer();
60
73FAKER_CXX_EXPORT std::string phoneNumberByCountry(std::optional<PhoneNumberCountryFormat> format = std::nullopt);
74
84FAKER_CXX_EXPORT std::string imei();
85
95FAKER_CXX_EXPORT std::string_view areaCode();
96
97FAKER_CXX_EXPORT std::unordered_map<PhoneNumberCountryFormat, std::string> createPhoneNumberFormatMap();
98
100{
101 Default,
104 Albania,
105 Algeria,
107 Andorra,
108 Angola,
109 Anguilla,
111 Argentina,
112 Armenia,
113 Aruba,
114 Australia,
115 Austria,
117 Bahamas,
118 Bahrain,
120 Barbados,
121 Belarus,
122 Belgium,
123 Belize,
124 Benin,
125 Bermuda,
126 Bhutan,
127 Bolivia,
129 Botswana,
130 Brazil,
132 Bulgaria,
134 Burundi,
135 Cambodia,
136 Cameroon,
137 Canada,
138 CapeVerde,
141 Chad,
142 Chile,
143 China,
144 Colombia,
145 Comoros,
146 Congo,
148 CostaRica,
149 Croatia,
150 Cuba,
151 Curacao,
152 Cyprus,
153 Czechia,
155 Denmark,
156 Djibouti,
157 Dominica,
159 Ecuador,
160 Egypt,
163 Eritrea,
164 Estonia,
165 Eswatini,
166 Ethiopia,
168 Fiji,
169 Finland,
170 France,
173 Gabon,
174 Gambia,
175 Georgia,
176 Germany,
177 Ghana,
178 Gibraltar,
179 Greece,
180 Greenland,
181 Grenada,
183 Guam,
184 Guatemala,
185 Guernsey,
186 Guinea,
188 Guyana,
189 Haiti,
191 Honduras,
192 HongKong,
193 Hungary,
194 Iceland,
195 India,
196 Indonesia,
197 Iran,
198 Iraq,
199 Ireland,
200 IsleOfMan,
201 Israel,
202 Italy,
203 Jamaica,
204 Japan,
205 Jersey,
206 Jordan,
208 Kuwait,
210 Latvia,
211 Lebanon,
212 Lesotho,
213 Liberia,
216 Lithuania,
218 Macao,
220 Malawi,
221 Malaysia,
222 Maldives,
223 Mali,
224 Malta,
228 Mauritius,
229 Mayotte,
230 Mexico,
232 Moldova,
233 Monaco,
234 Mongolia,
237 Morocco,
239 Myanmar,
240 Namibia,
241 Nauru,
242 Nepal,
246 Nicaragua,
247 Niger,
248 Nigeria,
249 Niue,
252 Norway,
253 Oman,
254 Pakistan,
255 Palau,
256 Palestine,
257 Panama,
259 Paraguay,
260 Peru,
262 Poland,
263 Portugal,
265 Qatar,
266 Reunion,
267 Romania,
269 Rwanda,
277 Samoa,
278 SanMarino,
281 Senegal,
282 Serbia,
285 Singapore,
287 Slovakia,
288 Slovenia,
290 Somalia,
293 Spain,
294 SriLanka,
295 Sudan,
296 Suriname,
298 Sweden,
301 Taiwan,
303 Tanzania,
304 Thailand,
306 Togo,
307 Tonga,
309 Tunisia,
310 Turkey,
313 Tuvalu,
314 Uganda,
315 Ukraine,
317 UK,
318 Usa,
319 Uruguay,
321 Vanuatu,
322 Venezuela,
323 Vietnam,
328 Yemen,
329 Zambia,
330 Zimbabwe,
331};
332}
Definition phone.h:11
FAKER_CXX_EXPORT std::string_view platform()
Returns a random phone platform.
FAKER_CXX_EXPORT std::string imei()
Returns IMEI number.
FAKER_CXX_EXPORT std::string_view manufacturer()
Returns a random phone manufacturer.
FAKER_CXX_EXPORT std::string phoneNumberByFormat(std::optional< std::string >=std::nullopt)
Returns a random phone number.
FAKER_CXX_EXPORT std::string_view modelName()
Returns a random phone model.
FAKER_CXX_EXPORT std::string phoneNumberByCountry(std::optional< PhoneNumberCountryFormat > format=std::nullopt)
Returns a random phone number based on country phone number template.
FAKER_CXX_EXPORT std::unordered_map< PhoneNumberCountryFormat, std::string > createPhoneNumberFormatMap()
FAKER_CXX_EXPORT std::string_view areaCode()
returns a random country area code
PhoneNumberCountryFormat
Definition phone.h:100