From d69560bfc9d5ff4ae190b5f5294f571b5c88f227 Mon Sep 17 00:00:00 2001 From: Guru Mehar Rachaputi Date: Thu, 27 Jun 2024 19:29:56 +0200 Subject: [PATCH] update documentation function description documentation updated for all the modules Signed-off-by: Guru Mehar Rachaputi --- include/faker-cxx/Airline.h | 26 +++++------ include/faker-cxx/Animal.h | 30 ++++++------- include/faker-cxx/Book.h | 12 ++--- include/faker-cxx/Color.h | 28 ++++++------ include/faker-cxx/Commerce.h | 38 ++++++++-------- include/faker-cxx/Company.h | 22 +++++----- include/faker-cxx/Computer.h | 18 ++++---- include/faker-cxx/Crypto.h | 8 ++-- include/faker-cxx/Database.h | 10 ++--- include/faker-cxx/Datatype.h | 8 ++-- include/faker-cxx/Date.h | 74 +++++++++++++++---------------- include/faker-cxx/Finance.h | 46 ++++++++++---------- include/faker-cxx/Food.h | 28 ++++++------ include/faker-cxx/Git.h | 10 ++--- include/faker-cxx/Hacker.h | 12 ++--- include/faker-cxx/Helper.h | 44 +++++++++---------- include/faker-cxx/Image.h | 12 ++--- include/faker-cxx/Internet.h | 68 ++++++++++++++--------------- include/faker-cxx/Location.h | 30 ++++++------- include/faker-cxx/Lorem.h | 14 +++--- include/faker-cxx/Medicine.h | 6 +-- include/faker-cxx/Movie.h | 12 ++--- include/faker-cxx/Music.h | 6 +-- include/faker-cxx/Number.h | 17 ++++++++ include/faker-cxx/Person.h | 52 +++++++++++----------- include/faker-cxx/Phone.h | 18 ++++---- include/faker-cxx/Plant.h | 16 +++---- include/faker-cxx/Science.h | 14 +++--- include/faker-cxx/Sport.h | 10 ++--- include/faker-cxx/String.h | 82 +++++++++++++++++------------------ include/faker-cxx/System.h | 40 ++++++++--------- include/faker-cxx/Vehicle.h | 18 ++++---- include/faker-cxx/VideoGame.h | 8 ++-- include/faker-cxx/Weather.h | 2 +- include/faker-cxx/Word.h | 36 +++++++-------- 35 files changed, 446 insertions(+), 429 deletions(-) diff --git a/include/faker-cxx/Airline.h b/include/faker-cxx/Airline.h index 12dba20f4..01dd084b1 100644 --- a/include/faker-cxx/Airline.h +++ b/include/faker-cxx/Airline.h @@ -10,7 +10,7 @@ namespace faker::airline * @return a random aircraft type * * @code - * Airline::aircraftType // "narrowbody" + * faker::airline::aircraftType // "narrowbody" * @endcode */ std::string_view aircraftType(); @@ -27,7 +27,7 @@ namespace faker::airline * @return a random airplane and its iataTypeCode * * @code - * Airline::airplane() // {"Boeing 737-800", "738"} + * faker::airline::airplane() // {"Boeing 737-800", "738"} * @endcode */ Airplane airplane(); @@ -44,7 +44,7 @@ namespace faker::airline * @return a random airline and its iataCode * * @code - * Airline::airline() // {"Air Canada", "AC"} + * faker::airline::airline() // {"Air Canada", "AC"} * @endcode */ AirlineInfo airline(); @@ -61,7 +61,7 @@ namespace faker::airline * @return a random airport and its iataCode * * @code - * Airline::airport() // {"Toronto Pearson International Airport", "YYZ"} + * faker::airline::airport() // {"Toronto Pearson International Airport", "YYZ"} * @endcode */ Airport airport(); @@ -81,7 +81,7 @@ namespace faker::airline * @return a random seat * * @code - * Airline::seat(AircraftType::Narrowbody) // "1A" + * faker::airline::seat(AircraftType::Narrowbody) // "1A" * @endcode */ std::string seat(AircraftType aircraftType); @@ -92,8 +92,8 @@ namespace faker::airline * @return a random record location * * @code - * Airline::recordLocator() // "ABCDEF" - * Airline::recordLocator(true) // "ABC123" + * faker::airline::recordLocator() // "ABCDEF" + * faker::airline::recordLocator(true) // "ABC123" * @endcode */ std::string recordLocator(bool allowNumerics = false); @@ -108,9 +108,9 @@ namespace faker::airline * @return a random flight number * * @code - * Airline::flightNumber() // "1234" - * Airline::flightNumber(true) // "0123" - * Airline::flightNumber(false, 3) // "234" + * faker::airline::flightNumber() // "1234" + * faker::airline::flightNumber(true) // "0123" + * faker::airline::flightNumber(false, 3) // "234" * @endcode */ std::string flightNumber(bool addLeadingZeros = false, unsigned int length = 4); @@ -131,9 +131,9 @@ namespace faker::airline * @return a random flight number * * @code - * Airline::flightNumber() // "1234" - * Airline::flightNumber(true) // "0123" - * Airline::flightNumber(false, {1, 4}) // "234" // "12" // "1234" + * faker::airline::flightNumber() // "1234" + * faker::airline::flightNumber(true) // "0123" + * faker::airline::flightNumber(false, {1, 4}) // "234" // "12" // "1234" * @endcode */ std::string flightNumberByRange(bool addLeadingZeros = false, Range length = {1, 4}); diff --git a/include/faker-cxx/Animal.h b/include/faker-cxx/Animal.h index 7569ec8d9..b88e583f7 100644 --- a/include/faker-cxx/Animal.h +++ b/include/faker-cxx/Animal.h @@ -10,7 +10,7 @@ namespace faker::animal * @returns Species of bear. * * @code - * animal::bear() // "Polar bear" + * faker::animal::bear() // "Polar bear" * @endcode */ std::string_view bear(); @@ -21,7 +21,7 @@ std::string_view bear(); * @returns Species of bird. * * @code - * animal::bird() // "Black-bellied Whistling-Duck" + * faker::animal::bird() // "Black-bellied Whistling-Duck" * @endcode */ std::string_view bird(); @@ -32,7 +32,7 @@ std::string_view bird(); * @returns Species of cat. * * @code - * animal::cat() // "Chartreux" + * faker::animal::cat() // "Chartreux" * @endcode */ std::string_view cat(); @@ -43,7 +43,7 @@ std::string_view cat(); * @returns Species of cetacean. * * @code - * animal::cetacean() // "Blue Whale" + * faker::animal::cetacean() // "Blue Whale" * @endcode */ std::string_view cetacean(); @@ -54,7 +54,7 @@ std::string_view cetacean(); * @returns Species of cow. * * @code - * animal::cow() // "American Angus" + * faker::animal::cow() // "American Angus" * @endcode */ std::string_view cow(); @@ -65,7 +65,7 @@ std::string_view cow(); * @returns Species of crocodilia. * * @code - * animal::crocodile() // "Dwarf Crocodile" + * faker::animal::crocodile() // "Dwarf Crocodile" * @endcode */ std::string_view crocodile(); @@ -76,7 +76,7 @@ std::string_view crocodile(); * @returns Species of dog. * * @code - * animal::dog() // "Shiba Inu" + * faker::animal::dog() // "Shiba Inu" * @endcode */ std::string_view dog(); @@ -87,7 +87,7 @@ std::string_view dog(); * @returns Species of fish. * * @code - * animal::fish() // "Silver carp" + * faker::animal::fish() // "Silver carp" * @endcode */ std::string_view fish(); @@ -98,7 +98,7 @@ std::string_view fish(); * @returns Species of horse. * * @code - * animal::horse() // "Fjord Horse" + * faker::animal::horse() // "Fjord Horse" * @endcode */ std::string_view horse(); @@ -109,7 +109,7 @@ std::string_view horse(); * @returns Species of insect. * * @code - * animal::insect() // "Bee" + * faker::animal::insect() // "Bee" * @endcode */ std::string_view insect(); @@ -120,7 +120,7 @@ std::string_view insect(); * @returns Species of lion. * * @code - * animal::lion() // "West African Lion" + * faker::animal::lion() // "West African Lion" * @endcode */ std::string_view lion(); @@ -131,7 +131,7 @@ std::string_view lion(); * @returns Species of rabbit. * * @code - * animal::rabbit() // "Californian" + * faker::animal::rabbit() // "Californian" * @endcode */ std::string_view rabbit(); @@ -142,7 +142,7 @@ std::string_view rabbit(); * @returns Species of rodent. * * @code - * animal::rodent() // "Chinchilla" + * faker::animal::rodent() // "Chinchilla" * @endcode */ std::string_view rodent(); @@ -153,7 +153,7 @@ std::string_view rodent(); * @returns Species of snake. * * @code - * animal::snake() // "Boa constrictor" + * faker::animal::snake() // "Boa constrictor" * @endcode */ std::string_view snake(); @@ -164,7 +164,7 @@ std::string_view snake(); * @returns Type of animal. * * @code - * animal::type() // "dog" + * faker::animal::type() // "dog" * @endcode */ std::string_view type(); diff --git a/include/faker-cxx/Book.h b/include/faker-cxx/Book.h index 8a047bc0d..427a5975f 100644 --- a/include/faker-cxx/Book.h +++ b/include/faker-cxx/Book.h @@ -10,7 +10,7 @@ namespace faker::book * @returns Book title. * * @code - * book::title() // "Romeo and Juliet" + * faker::book::title() // "Romeo and Juliet" * @endcode */ std::string_view title(); @@ -21,7 +21,7 @@ std::string_view title(); * @returns Book genre. * * @code - * book::genre() // "Fantasy" + * faker::book::genre() // "Fantasy" * @endcode */ std::string_view genre(); @@ -32,7 +32,7 @@ std::string_view genre(); * @returns Book author. * * @code - * book::author() // "William Shakespeare" + * faker::book::author() // "William Shakespeare" * @endcode */ std::string_view author(); @@ -43,7 +43,7 @@ std::string_view author(); * @returns Book publisher. * * @code - * book::publisher() // "Addison-Wesley" + * faker::book::publisher() // "Addison-Wesley" * @endcode */ std::string_view publisher(); @@ -54,7 +54,7 @@ std::string_view publisher(); * @returns BookFormat format of book * * @code - * book::format() // "Paperback" + * faker::book::format() // "Paperback" * @endcode */ std::string_view format(); @@ -65,7 +65,7 @@ std::string_view format(); * @returns std::string_view book series * * @code - * book::series() // "Harry Potter" + * faker::book::series() // "Harry Potter" * @endcode */ std::string_view series(); diff --git a/include/faker-cxx/Color.h b/include/faker-cxx/Color.h index bec751fc1..3e31fdac9 100644 --- a/include/faker-cxx/Color.h +++ b/include/faker-cxx/Color.h @@ -12,7 +12,7 @@ namespace faker::color * @returns Human readable color name. * * @code - * color::name() // "Blue" + * faker::color::name() // "Blue" * @endcode */ std::string_view name(); @@ -25,8 +25,8 @@ std::string_view name(); * @returns RGB color formatted with rgb(X,X,X) or rgba(X,X,X,X). * * @code - * color::rgb() // "rgb(67, 28, 240)" - * color::rgb(true) // "rgba(220, 28, 79, 0.50)" + * faker::color::rgb() // "rgb(67, 28, 240)" + * faker::color::rgb(true) // "rgba(220, 28, 79, 0.50)" * @endcode */ std::string rgb(bool includeAlpha = false); @@ -41,8 +41,8 @@ std::string rgb(bool includeAlpha = false); * @returns Hex color formatted that starts with `0x` or `#`. * * @code - * color::hex() // "#e3f380" - * color::hex(HexCasing::Upper, HexPrefix::ZeroX, true) // "0xE3F3801A" + * faker::color::hex() // "#e3f380" + * faker::color::hex(HexCasing::Upper, HexPrefix::ZeroX, true) // "0xE3F3801A" * @endcode */ std::string hex(HexCasing casing = HexCasing::Lower, HexPrefix prefix = HexPrefix::Hash, bool includeAlpha = false); @@ -53,8 +53,8 @@ std::string hex(HexCasing casing = HexCasing::Lower, HexPrefix prefix = HexPrefi * @param includeAlpha Adds an alpha value to the color (HSLA). Defaults to `false`. * @returns HSL color formatted with hsl(X,X,X) or hsla(X,X,X,X). * @code - * color::hsl() // "hsl(0, 20, 100)" - * color::hsl(true) // "hsla(0, 0, 100, 0.50)" + * faker::color::hsl() // "hsl(0, 20, 100)" + * faker::color::hsl(true) // "hsla(0, 0, 100, 0.50)" * @endcode */ std::string hsl(bool includeAlpha = false); @@ -65,8 +65,8 @@ std::string hsl(bool includeAlpha = false); * @param includeAlpha Adds an alpha value to the color (LCHA). Defaults to `false`. * @returns LCH color formatted with lch(X,X,X) or lcha(X,X,X,X). * @code - * color::lch() // "lch(0, 20, 100)" - * color::lch(true) // "lcha(0, 0, 100, 0.50)" + * faker::color::lch() // "lch(0, 20, 100)" + * faker::color::lch(true) // "lcha(0, 0, 100, 0.50)" * @endcode */ std::string lch(bool includeAlpha = false); @@ -76,7 +76,7 @@ std::string lch(bool includeAlpha = false); * * @returns CMYK color formatted with cmyk(X,X,X,X) * @code - * color::cmyk() // "cmyk(0.72, 0.88, 0.00, 0.06)" + * faker::color::cmyk() // "cmyk(0.72, 0.88, 0.00, 0.06)" * @endcode */ std::string cmyk(); @@ -86,7 +86,7 @@ std::string cmyk(); * * @returns LAB color formatted with lab(X,X,X) * @code - * color::lab() // "lab(98.74, 2.18, -2.35)" + * faker::color::lab() // "lab(98.74, 2.18, -2.35)" * @endcode */ std::string lab(); @@ -96,7 +96,7 @@ std::string lab(); * * @returns HSB color formatted with hsb(X,X,X) * @code - * color::hsb() // "hsb(37, 82, 50)" + * faker::color::hsb() // "hsb(37, 82, 50)" * @endcode */ std::string hsb(); @@ -106,7 +106,7 @@ std::string hsb(); * * @returns HSV color formatted with hsv(X,X,X) * @code - * color::hsv() // "hsv(21, 67, 39)" + * faker::color::hsv() // "hsv(21, 67, 39)" * @endcode */ std::string hsv(); @@ -116,7 +116,7 @@ std::string hsv(); * * @returns YUV color formatted with yuv(X,X,X) * @code - * color::yuv() // "yuv(42, 234, 109)" + * faker::color::yuv() // "yuv(42, 234, 109)" * @endcode */ std::string yuv(); diff --git a/include/faker-cxx/Commerce.h b/include/faker-cxx/Commerce.h index 3e5762ad7..9c1fd6256 100644 --- a/include/faker-cxx/Commerce.h +++ b/include/faker-cxx/Commerce.h @@ -10,7 +10,7 @@ namespace faker::commerce * @returns Commerce department name. * * @code - * commerce::department() // "Books" + * faker::commerce::department() // "Books" * @endcode */ std::string_view department(); @@ -21,8 +21,8 @@ std::string_view department(); * @param length The length of the sku. * * @code - * commerce::sku() // "3027" - * commerce::sku(8) // "10512056" + * faker::commerce::sku() // "3027" + * faker::commerce::sku(8) // "10512056" * @endcode */ std::string sku(unsigned length = 4); @@ -33,7 +33,7 @@ std::string sku(unsigned length = 4); * @returns Product adjective. * * @code - * commerce::productAdjective() // "Handcrafted" + * faker::commerce::productAdjective() // "Handcrafted" * @endcode */ std::string_view productAdjective(); @@ -44,7 +44,7 @@ std::string_view productAdjective(); * @returns Product material. * * @code - * commerce::productMaterial() // "Wooden" + * faker::commerce::productMaterial() // "Wooden" * @endcode */ std::string_view productMaterial(); @@ -55,7 +55,7 @@ std::string_view productMaterial(); * @returns Product short name. * * @code - * commerce::productName() // "Computer" + * faker::commerce::productName() // "Computer" * @endcode */ std::string_view productName(); @@ -66,7 +66,7 @@ std::string_view productName(); * @returns Product full name. * * @code - * commerce::productFullName() // "Incredible Soft Gloves" + * faker::commerce::productFullName() // "Incredible Soft Gloves" * @endcode */ std::string productFullName(); @@ -77,7 +77,7 @@ std::string productFullName(); * @returns Ean13 code. * * @code - * commerce::EAN13() // "1234567890128" + * faker::commerce::EAN13() // "1234567890128" * @endcode */ std::string EAN13(); @@ -88,7 +88,7 @@ std::string EAN13(); * @returns Ean8 code. * * @code - * commerce::EAN8() // "90311017" + * faker::commerce::EAN8() // "90311017" * @endcode */ std::string EAN8(); @@ -99,7 +99,7 @@ std::string EAN8(); * @returns Isbn13 code. * * @code - * commerce::ISBN13() // "9781234567897" + * faker::commerce::ISBN13() // "9781234567897" * @endcode */ std::string ISBN13(); @@ -110,7 +110,7 @@ std::string ISBN13(); * @returns Isbn10 code. * * @code - * commerce::ISBN10() // "0200716018" + * faker::commerce::ISBN10() // "0200716018" * @endcode */ std::string ISBN10(); @@ -121,7 +121,7 @@ std::string ISBN10(); * @returns paymentType. * * @code - * commerce::paymentType() // "Credit Card" + * faker::commerce::paymentType() // "Credit Card" * @endcode */ std::string_view paymentType(); @@ -132,7 +132,7 @@ std::string_view paymentType(); * @returns paymentProvider. * * @code - * commerce::paymentProvider() // "Paypal" + * faker::commerce::paymentProvider() // "Paypal" * @endcode */ std::string_view paymentProvider(); @@ -143,7 +143,7 @@ std::string_view paymentProvider(); * @returns productDescription. * * @code - * commerce::productDescription() // "Elevate your lifestyle with premium quality product." + * faker::commerce::productDescription() // "Elevate your lifestyle with premium quality product." * @endcode */ std::string_view productDescription(); @@ -154,7 +154,7 @@ std::string_view productDescription(); * @returns productCategory. * * @code - * commerce::productCategory() // "Electronics" + * faker::commerce::productCategory() // "Electronics" * @endcode */ std::string_view productCategory(); @@ -165,7 +165,7 @@ std::string_view productCategory(); * @returns productReview. * * @code - * commerce::productReview() // "Unfortunately, it broke shortly after I started using it." + * faker::commerce::productReview() // "Unfortunately, it broke shortly after I started using it." * @endcode */ std::string_view productReview(); @@ -176,7 +176,7 @@ std::string_view productReview(); * @returns discountType. * * @code - * commerce::discountType() // "percentage" + * faker::commerce::discountType() // "percentage" * @endcode */ std::string_view discountType(); @@ -187,7 +187,7 @@ std::string_view discountType(); * @returns orderStatus. * * @code - * commerce::orderStatus() // "shipped" + * faker::commerce::orderStatus() // "shipped" * @endcode */ std::string_view orderStatus(); @@ -198,7 +198,7 @@ std::string_view orderStatus(); * @returns shipping carrier * * @code - * commerce::shippingMethod() // "FedEx" + * faker::commerce::shippingMethod() // "FedEx" * @endcode */ std::string_view shippingCarrier(); diff --git a/include/faker-cxx/Company.h b/include/faker-cxx/Company.h index ed7be44c3..10078c436 100644 --- a/include/faker-cxx/Company.h +++ b/include/faker-cxx/Company.h @@ -10,7 +10,7 @@ namespace faker::company * @returns Company name. * * @code - * company::name() // "Adams Inc" + * faker::company::name() // "Adams Inc" * @endcode */ std::string name(); @@ -21,7 +21,7 @@ std::string name(); * @returns Company type. * * @code - * company::type() // "Nonprofit" + * faker::company::type() // "Nonprofit" * @endcode */ std::string_view type(); @@ -32,7 +32,7 @@ std::string_view type(); * @returns Company industry. * * @code - * company::industry() // "Biotechnology" + * faker::company::industry() // "Biotechnology" * @endcode */ std::string_view industry(); @@ -43,7 +43,7 @@ std::string_view industry(); * @returns Buzz phrase. * * @code - * company::buzzPhrase() // "cultivate synergistic e-market" + * faker::company::buzzPhrase() // "cultivate synergistic e-market" * @endcode */ std::string buzzPhrase(); @@ -54,7 +54,7 @@ std::string buzzPhrase(); * @returns Buzz adjective. * * @code - * company::buzzAdjective() // "one-to-one" + * faker::company::buzzAdjective() // "one-to-one" * @endcode */ std::string_view buzzAdjective(); @@ -65,7 +65,7 @@ std::string_view buzzAdjective(); * @returns Buzz noun. * * @code - * company::buzzNoun() // "paradigms" + * faker::company::buzzNoun() // "paradigms" * @endcode */ std::string_view buzzNoun(); @@ -76,7 +76,7 @@ std::string_view buzzNoun(); * @returns Buzz verb. * * @code - * company::buzzVerb() // "empower" + * faker::company::buzzVerb() // "empower" * @endcode */ std::string_view buzzVerb(); @@ -87,7 +87,7 @@ std::string_view buzzVerb(); * @returns Catch phrase. * * @code - * company::catchPhrase() // "Upgradable systematic flexibility" + * faker::company::catchPhrase() // "Upgradable systematic flexibility" * @endcode */ std::string catchPhrase(); @@ -98,7 +98,7 @@ std::string catchPhrase(); * @returns Catch phrase adjective. * * @code - * company::catchPhraseAdjective() // "Multi-tiered" + * faker::company::catchPhraseAdjective() // "Multi-tiered" * @endcode */ std::string_view catchPhraseAdjective(); @@ -109,7 +109,7 @@ std::string_view catchPhraseAdjective(); * @returns Catch phrase descriptor. * * @code - * company::catchPhraseDescriptor() // "composite" + * faker::company::catchPhraseDescriptor() // "composite" * @endcode */ std::string_view catchPhraseDescriptor(); @@ -120,7 +120,7 @@ std::string_view catchPhraseDescriptor(); * @returns Catch phrase noun. * * @code - * company::catchPhraseNoun() // "leverage" + * faker::company::catchPhraseNoun() // "leverage" * @endcode */ std::string_view catchPhraseNoun(); diff --git a/include/faker-cxx/Computer.h b/include/faker-cxx/Computer.h index 7a6202518..00ff32b56 100644 --- a/include/faker-cxx/Computer.h +++ b/include/faker-cxx/Computer.h @@ -10,7 +10,7 @@ namespace faker::computer * @returns computer type * * @code - * computer::type() // Laptop + * faker::computer::type() // Laptop * @endcode */ std::string_view type(); @@ -21,7 +21,7 @@ std::string_view type(); * @returns manufacture name * * @code - * computer::manufacture() // HP + * faker::computer::manufacture() // HP * @endcode */ std::string_view manufacture(); @@ -32,7 +32,7 @@ std::string_view manufacture(); * @returns computer model * * @code - * computer::model() // MacBook Air + * faker::computer::model() // MacBook Air * @endcode */ std::string_view model(); @@ -43,7 +43,7 @@ std::string_view model(); * @returns CPU manufacture name * * @code - * computer::cpuManufacture() // Intel + * faker::computer::cpuManufacture() // Intel * @endcode */ std::string_view cpuManufacture(); @@ -54,7 +54,7 @@ std::string_view cpuManufacture(); * @returns CPU type * * @code - * computer::cpuType() // x86 + * faker::computer::cpuType() // x86 * @endcode */ std::string_view cpuType(); @@ -65,7 +65,7 @@ std::string_view cpuType(); * @returns computer CPU model * * @code - * computer::cpuModel() // Core i9-11900k + * faker::computer::cpuModel() // Core i9-11900k * @endcode */ std::string_view cpuModel(); @@ -76,7 +76,7 @@ std::string_view cpuModel(); * @returns GPU manufacture name * * @code - * computer::gpuManufacture() // NVIDIA + * faker::computer::gpuManufacture() // NVIDIA * @endcode */ std::string_view gpuManufacture(); @@ -87,7 +87,7 @@ std::string_view gpuManufacture(); * @returns GPU type * * @code - * computer::gpuType() // Integrated + * faker::computer::gpuType() // Integrated * @endcode */ std::string_view gpuType(); @@ -98,7 +98,7 @@ std::string_view gpuType(); * @returns computer GPU model * * @code - * computer::gpuModel() // NVIDIA GeForce RTX 3080 + * faker::computer::gpuModel() // NVIDIA GeForce RTX 3080 * @endcode */ std::string_view gpuModel(); diff --git a/include/faker-cxx/Crypto.h b/include/faker-cxx/Crypto.h index 45f44f2d8..cf76a7d2f 100644 --- a/include/faker-cxx/Crypto.h +++ b/include/faker-cxx/Crypto.h @@ -11,8 +11,8 @@ namespace faker::crypto * @returns SHA256 hash string. * * @code - * crypto::sha256("hello world") // "b94d27b9934d3e08a52e52d7da7dabfac484efe37a5380ee9088f7ace2efcde9" - * crypto::sha256() // Random hash of random + * faker::crypto::sha256("hello world") // "b94d27b9934d3e08a52e52d7da7dabfac484efe37a5380ee9088f7ace2efcde9" + * faker::crypto::sha256() // Random hash of random * @endcode */ std::string sha256(std::optional = std::nullopt); @@ -23,8 +23,8 @@ std::string sha256(std::optional = std::nullopt); * @returns MD5 hash string. * * @code - * crypto::md5("hello world") // "5eb63bbbe01eeed093cb22bb8f5acdc3" - * crypto::md5() // Random hash of random word + * faker::crypto::md5("hello world") // "5eb63bbbe01eeed093cb22bb8f5acdc3" + * faker::crypto::md5() // Random hash of random word * @endcode */ std::string md5(std::optional = std::nullopt); diff --git a/include/faker-cxx/Database.h b/include/faker-cxx/Database.h index c985753ac..a10bf6ed1 100644 --- a/include/faker-cxx/Database.h +++ b/include/faker-cxx/Database.h @@ -10,7 +10,7 @@ namespace faker::database * @returns Database column name. * * @code - * Database::columnName() // "created_at" + * faker::database::columnName() // "created_at" * @endcode */ std::string_view columnName(); @@ -21,7 +21,7 @@ namespace faker::database * @returns Database column type. * * @code - * Database::columnType() // "timestamp" + * faker::database::columnType() // "timestamp" * @endcode */ std::string_view columnType(); @@ -32,7 +32,7 @@ namespace faker::database * @returns Database collation. * * @code - * Database::collation() // "utf8_unicode_ci" + * faker::database::collation() // "utf8_unicode_ci" * @endcode */ std::string_view collation(); @@ -43,7 +43,7 @@ namespace faker::database * @returns Database engine. * * @code - * Database::engine() // "ARCHIVE" + * faker::database::engine() // "ARCHIVE" * @endcode */ std::string_view engine(); @@ -54,7 +54,7 @@ namespace faker::database * @returns MongoDB Object Id. * * @code - * Database::mongoDbObjectId() // "e175cac316a79afdd0ad3afb" + * faker::database::mongoDbObjectId() // "e175cac316a79afdd0ad3afb" * @endcode */ std::string mongoDbObjectId(); diff --git a/include/faker-cxx/Datatype.h b/include/faker-cxx/Datatype.h index 383e8b08f..d57538c80 100644 --- a/include/faker-cxx/Datatype.h +++ b/include/faker-cxx/Datatype.h @@ -8,7 +8,7 @@ namespace faker::datatype * @returns Boolean. * * @code - * datatype::boolean() // "false" + * faker::datatype::boolean() // "false" * @endcode */ bool boolean(); @@ -26,9 +26,9 @@ bool boolean(); * @returns Boolean. * * @code - * datatype::boolean() // "false" - * datatype::boolean(0.9) // "true" - * datatype::boolean(0.1) // "false" + * faker::datatype::boolean() // "false" + * faker::datatype::boolean(0.9) // "true" + * faker::datatype::boolean(0.1) // "false" * @endcode */ bool boolean(double probability); diff --git a/include/faker-cxx/Date.h b/include/faker-cxx/Date.h index 1fc22cccc..7fd6a149a 100644 --- a/include/faker-cxx/Date.h +++ b/include/faker-cxx/Date.h @@ -18,10 +18,10 @@ namespace faker::date * @returns ISO formatted string. * * @code - * date::pastDate() // "2023-12-08T19:31:32Z" - * date::pastDate(5) // "2020-06-16T15:24:09Z" - * date::pastDate(5, DateFormat::ISO) // "2020-06-16T15:24:09Z" - * date::pastDate(5, DateFormat::Timestamp) // "1592321049" + * faker::date::pastDate() // "2023-12-08T19:31:32Z" + * faker::date::pastDate(5) // "2020-06-16T15:24:09Z" + * faker::date::pastDate(5, DateFormat::ISO) // "2020-06-16T15:24:09Z" + * faker::date::pastDate(5, DateFormat::Timestamp) // "1592321049" * @endcode */ std::string pastDate(int years = 1, DateFormat dateFormat = DateFormat::ISO); @@ -34,10 +34,10 @@ namespace faker::date * @returns ISO formatted string. * * @code - * date::futureDate() // "2023-09-27T09:47:46Z" - * date::futureDate(5) // "2024-06-11T19:46:29Z" - * date::futureDate(5, DateFormat::ISO) // "2024-06-11T19:46:29Z" - * date::futureDate(5, DateFormat::Timestamp) // "1718229989" + * faker::date::futureDate() // "2023-09-27T09:47:46Z" + * faker::date::futureDate(5) // "2024-06-11T19:46:29Z" + * faker::date::futureDate(5, DateFormat::ISO) // "2024-06-11T19:46:29Z" + * faker::date::futureDate(5, DateFormat::Timestamp) // "1718229989" * @endcode */ std::string futureDate(int years = 1, DateFormat dateFormat = DateFormat::ISO); @@ -50,10 +50,10 @@ namespace faker::date * @returns ISO formatted string. * * @code - * date::recentDate() // "2023-07-05T14:12:40Z" - * date::recentDate(10) // "2023-06-29T18:24:12Z" - * date::recentDate(10, DateFormat::ISO) // "2023-06-29T18:24:12Z" - * date::recentDate(10, DateFormat::Timestamp) // "1718229989" + * faker::date::recentDate() // "2023-07-05T14:12:40Z" + * faker::date::recentDate(10) // "2023-06-29T18:24:12Z" + * faker::date::recentDate(10, DateFormat::ISO) // "2023-06-29T18:24:12Z" + * faker::date::recentDate(10, DateFormat::Timestamp) // "1718229989" * @endcode */ std::string recentDate(int days = 3, DateFormat dateFormat = DateFormat::ISO); @@ -66,10 +66,10 @@ namespace faker::date * @returns ISO formatted string. * * @code - * date::soonDate() // "2023-07-07T18:19:12Z" - * date::soonDate(10) // "2023-07-15T09:59:11Z" - * date::soonDate(10, DateFormat::ISO) // "2023-07-15T09:59:11Z" - * date::soonDate(10, DateFormat::Timestamp) // "1718229989" + * faker::date::soonDate() // "2023-07-07T18:19:12Z" + * faker::date::soonDate(10) // "2023-07-15T09:59:11Z" + * faker::date::soonDate(10, DateFormat::ISO) // "2023-07-15T09:59:11Z" + * faker::date::soonDate(10, DateFormat::Timestamp) // "1718229989" * @endcode */ std::string soonDate(int days = 3, DateFormat dateFormat = DateFormat::ISO); @@ -83,10 +83,10 @@ namespace faker::date * @returns ISO formatted string. * * @code - * date::birthdateByAge() // "2002-12-07T23:20:12Z" - * date::birthdateByAge(20, 30) // "1996-11-14T11:27:09Z" - * date::birthdateByAge(20, 30, DateFormat::ISO) // "1996-11-14T11:27:09Z" - * date::birthdateByAge(20, 30, DateFormat::Timestamp) // "1718229989" + * faker::date::birthdateByAge() // "2002-12-07T23:20:12Z" + * faker::date::birthdateByAge(20, 30) // "1996-11-14T11:27:09Z" + * faker::date::birthdateByAge(20, 30, DateFormat::ISO) // "1996-11-14T11:27:09Z" + * faker::date::birthdateByAge(20, 30, DateFormat::Timestamp) // "1718229989" * @endcode */ std::string birthdateByAge(int minAge = 18, int maxAge = 80, DateFormat dateFormat = DateFormat::ISO); @@ -100,10 +100,10 @@ namespace faker::date * @returns ISO formatted string. * * @code - * date::birthdateByYear() // "1965-02-19T02:19:47Z" - * date::birthdateByYear(1996, 1996) // "1996-05-19T12:00:23Z" - * date::birthdateByYear(1996, 1996, DateFormat::ISO) // "1996-05-19T12:00:23Z" - * date::birthdateByYear(1996, 1996, DateFormat::Timestamp) // "1718229989" + * faker::date::birthdateByYear() // "1965-02-19T02:19:47Z" + * faker::date::birthdateByYear(1996, 1996) // "1996-05-19T12:00:23Z" + * faker::date::birthdateByYear(1996, 1996, DateFormat::ISO) // "1996-05-19T12:00:23Z" + * faker::date::birthdateByYear(1996, 1996, DateFormat::Timestamp) // "1718229989" * @endcode */ std::string birthdateByYear(int minYear = 1920, int maxYear = 2000, DateFormat dateFormat = DateFormat::ISO); @@ -114,7 +114,7 @@ namespace faker::date * @returns Name of the weekday. * * @code - * date::weekdayName() // "Monday" + * faker::date::weekdayName() // "Monday" * @endcode */ std::string_view weekdayName(); @@ -125,7 +125,7 @@ namespace faker::date * @returns Abbreviated name of the weekday. * * @code - * date::weekdayAbbreviatedName() // "Mon" + * faker::date::weekdayAbbreviatedName() // "Mon" * @endcode */ std::string_view weekdayAbbreviatedName(); @@ -136,7 +136,7 @@ namespace faker::date * @returns Name of the month. * * @code - * date::monthName() // "October" + * faker::date::monthName() // "October" * @endcode */ std::string_view monthName(); @@ -147,7 +147,7 @@ namespace faker::date * @returns Abbreviated name of the month. * * @code - * date::monthAbbreviatedName() // "Feb" + * faker::date::monthAbbreviatedName() // "Feb" * @endcode */ std::string_view monthAbbreviatedName(); @@ -158,7 +158,7 @@ namespace faker::date * @returns A random year * * @code - * date::year() // 2000 + * faker::date::year() // 2000 * @endcode */ unsigned year(); @@ -169,7 +169,7 @@ namespace faker::date * @returns A random month * * @code - * date::month() // 9 + * faker::date::month() // 9 * @endcode */ unsigned month(); @@ -180,7 +180,7 @@ namespace faker::date * @returns A random month * * @code - * date::hour() // 21 + * faker::date::hour() // 21 * @endcode */ unsigned hour(); @@ -191,7 +191,7 @@ namespace faker::date * @returns A random minute * * @code - * date::minute() // 40 + * faker::date::minute() // 40 * @endcode */ unsigned minute(); @@ -202,7 +202,7 @@ namespace faker::date * @returns A random second * * @code - * date::second() // 40 + * faker::date::second() // 40 * @endcode */ unsigned second(); @@ -213,7 +213,7 @@ namespace faker::date * @returns A random time string * * @code - * date::time() // 21:40 + * faker::date::time() // 21:40 * @endcode */ std::string time(); @@ -224,7 +224,7 @@ namespace faker::date * @returns A random day of month * * @code - * date::dayOfMonth() // 15 + * faker::date::dayOfMonth() // 15 * @endcode */ unsigned dayOfMonth(); @@ -235,7 +235,7 @@ namespace faker::date * @returns A random day of week * * @code - * date::dayOfWeek() // 5 + * faker::date::dayOfWeek() // 5 * @endcode */ unsigned dayOfWeek(); @@ -246,7 +246,7 @@ namespace faker::date * @returns A random timezone * * @code - * date::timezoneRandom() // PT + * faker::date::timezoneRandom() // PT * @endcode */ std::string_view timezoneRandom(); diff --git a/include/faker-cxx/Finance.h b/include/faker-cxx/Finance.h index a4f4e4cb6..85c0cf447 100644 --- a/include/faker-cxx/Finance.h +++ b/include/faker-cxx/Finance.h @@ -23,7 +23,7 @@ namespace faker::finance * @returns Currency. * * @code - * Finance::currency() // "{"US Dollar","USD","$"}" + * faker::finance::currency() // "{"US Dollar","USD","$"}" * @endcode */ Currency currency(); @@ -34,7 +34,7 @@ namespace faker::finance * @returns Name of the currency. * * @code - * Finance::currencyName() // "US Dollar" + * faker::finance::currencyName() // "US Dollar" * @endcode */ std::string_view currencyName(); @@ -45,7 +45,7 @@ namespace faker::finance * @returns Code of the currency. * * @code - * Finance::currencyCode() // "USD" + * faker::finance::currencyCode() // "USD" * @endcode */ std::string_view currencyCode(); @@ -56,7 +56,7 @@ namespace faker::finance * @returns Symbol of the currency. * * @code - * Finance::currencySymbol() // "$" + * faker::finance::currencySymbol() // "$" * @endcode */ std::string_view currencySymbol(); @@ -67,7 +67,7 @@ namespace faker::finance * @returns Account type. * * @code - * Finance::accountType() // "Savings" + * faker::finance::accountType() // "Savings" * @endcode */ std::string_view accountType(); @@ -83,10 +83,10 @@ namespace faker::finance * @returns Amount of money as string. * * @code - * Finance::amount() // "720.18" - * Finance::amount(5, 10) // "4.22" - * Finance::amount(5, 10, Precision::ZeroDp) // "4" - * Finance::amount(5, 10, Precision::TwoDp, "$") // "$5.85" + * faker::finance::amount() // "720.18" + * faker::finance::amount(5, 10) // "4.22" + * faker::finance::amount(5, 10, Precision::ZeroDp) // "4" + * faker::finance::amount(5, 10, Precision::TwoDp, "$") // "$5.85" * @endcode */ std::string amount(double min = 0, double max = 1000, Precision precision = Precision::TwoDp, @@ -132,7 +132,7 @@ namespace faker::finance * @returns IBAN. * * @code - * Finance::iban(IbanCountry::Poland) // "PL61109010140000071219812874" + * faker::finance::iban(IbanCountry::Poland) // "PL61109010140000071219812874" * @endcode */ std::string iban(std::optional country = std::nullopt); @@ -160,7 +160,7 @@ namespace faker::finance * @returns BIC. * * @code - * Finance::bic(BicCountry::Poland) // "BREXPLPWMUL" + * faker::finance::bic(BicCountry::Poland) // "BREXPLPWMUL" * @endcode */ std::string_view bic(std::optional country = std::nullopt); @@ -173,8 +173,8 @@ namespace faker::finance * @returns Account number. * * @code - * Finance::accountNumber() // "92842238" - * Finance::accountNumber(26) // "55875455514825927518796290" + * faker::finance::accountNumber() // "92842238" + * faker::finance::accountNumber(26) // "55875455514825927518796290" * @endcode */ std::string accountNumber(unsigned length = 8); @@ -187,8 +187,8 @@ namespace faker::finance * @returns PIN number. * * @code - * Finance::pin() // "5067" - * Finance::pin(8) // "21378928" + * faker::finance::pin() // "5067" + * faker::finance::pin(8) // "21378928" * @endcode */ std::string pin(unsigned length = 4); @@ -199,7 +199,7 @@ namespace faker::finance * @returns Routing number. * * @code - * Finance::routingNumber() // "522814402" + * faker::finance::routingNumber() // "522814402" * @endcode */ std::string routingNumber(); @@ -220,7 +220,7 @@ namespace faker::finance * @returns Credit card number. * * @code - * Finance::creditCardNumber() // "4882664999007" + * faker::finance::creditCardNumber() // "4882664999007" * @endcode */ std::string creditCardNumber(std::optional creditCardType = std::nullopt); @@ -231,7 +231,7 @@ namespace faker::finance * @returns Credit card CVV. * * @code - * Finance::creditCardCvv() // "506" + * faker::finance::creditCardCvv() // "506" * @endcode */ std::string creditCardCvv(); @@ -242,7 +242,7 @@ namespace faker::finance * @returns Bitcoin address. * * @code - * Finance::bitcoinAddress() // "3ySdvCkTLVy7gKD4j6JfSaf5d" + * faker::finance::bitcoinAddress() // "3ySdvCkTLVy7gKD4j6JfSaf5d" * @endcode */ std::string bitcoinAddress(); @@ -253,7 +253,7 @@ namespace faker::finance * @returns Litecoin address. * * @code - * Finance::litecoinAddress() // "LoQaSTGWBRXkWfyxKbNKuPrAWGELzcW" + * faker::finance::litecoinAddress() // "LoQaSTGWBRXkWfyxKbNKuPrAWGELzcW" * @endcode */ std::string litecoinAddress(); @@ -264,7 +264,7 @@ namespace faker::finance * @returns Ethereum address. * * @code - * Finance::ethereumAddress() // "0xf03dfeecbafc5147241cc4c4ca20b3c9dfd04c4a" + * faker::finance::ethereumAddress() // "0xf03dfeecbafc5147241cc4c4ca20b3c9dfd04c4a" * @endcode */ std::string ethereumAddress(); @@ -275,7 +275,7 @@ namespace faker::finance * @returns std::string date. * * @code - * Finance::creditCardExpirationDate() // "03/26" + * faker::finance::creditCardExpirationDate() // "03/26" * @endcode */ std::string creditCardExpirationDate(); @@ -286,7 +286,7 @@ namespace faker::finance * @returns std::string creditCardType. * * @code - * Finance::creditCardType() // "Visa" + * faker::finance::creditCardType() // "Visa" * @endcode */ std::string_view creditCardType(); diff --git a/include/faker-cxx/Food.h b/include/faker-cxx/Food.h index 90fcdde2c..13735648d 100644 --- a/include/faker-cxx/Food.h +++ b/include/faker-cxx/Food.h @@ -10,7 +10,7 @@ namespace faker::food * @returns Alcoholic beverage. * * @code - * food::alcoholicBeverage() // "champain" + * faker::food::alcoholicBeverage() // "champain" * @endcode */ std::string_view alcoholicBeverage(); @@ -21,7 +21,7 @@ namespace faker::food * @returns Grain. * * @code - * food::grain() // "1 Lt" + * faker::food::grain() // "1 Lt" * @endcode */ std::string_view grain(); @@ -32,7 +32,7 @@ namespace faker::food * @returns Milk product. * * @code - * food::milkProduct() // "mozzarella" + * faker::food::milkProduct() // "mozzarella" * @endcode */ std::string_view milkProduct(); @@ -43,7 +43,7 @@ namespace faker::food * @returns Fruit. * * @code - * food::fruit() // "apple" + * faker::food::fruit() // "apple" * @endcode */ std::string_view fruit(); @@ -54,7 +54,7 @@ namespace faker::food * @returns Meat. * * @code - * food::meat() // "antrikot" + * faker::food::meat() // "antrikot" * @endcode */ std::string_view meat(); @@ -65,7 +65,7 @@ namespace faker::food * @returns Seafood. * * @code - * food::seafood() // "lobster" + * faker::food::seafood() // "lobster" * @endcode */ std::string_view seafood(); @@ -76,7 +76,7 @@ namespace faker::food * @returns Vegetable. * * @code - * food::vegetable() // "watermelon" + * faker::food::vegetable() // "watermelon" * @endcode */ std::string_view vegetable(); @@ -87,7 +87,7 @@ namespace faker::food * @returns Oil. * * @code - * food::oil() // "olive oil" + * faker::food::oil() // "olive oil" * @endcode */ std::string_view oil(); @@ -98,7 +98,7 @@ namespace faker::food * @returns Nuts. * * @code - * food::nut() // "walnut" + * faker::food::nut() // "walnut" * @endcode */ std::string_view nut(); @@ -109,7 +109,7 @@ namespace faker::food * @returns Seed. * * @code - * food::seed() // "mozzarella" + * faker::food::seed() // "mozzarella" * @endcode */ std::string_view seed(); @@ -120,7 +120,7 @@ namespace faker::food * @returns Sugar product. * * @code - * food::sugarProduct() // "honey harmony" + * faker::food::sugarProduct() // "honey harmony" * @endcode */ std::string_view sugarProduct(); @@ -131,7 +131,7 @@ namespace faker::food * @returns Non-alcoholic Beverage. * * @code - * food::nonalcoholicBeverage() // "water" + * faker::food::nonalcoholicBeverage() // "water" * @endcode */ std::string_view nonalcoholicBeverage(); @@ -142,7 +142,7 @@ namespace faker::food * @returns Dish. * * @code - * food::dishName() // "beef wellington" + * faker::food::dishName() // "beef wellington" * @endcode */ std::string_view dishName(); @@ -153,7 +153,7 @@ namespace faker::food * @returns Food Category. * * @code - * food::foodCategory() // "Dairy" + * faker::food::foodCategory() // "Dairy" * @endcode */ std::string_view foodCategory(); diff --git a/include/faker-cxx/Git.h b/include/faker-cxx/Git.h index 7e4aca73c..e8a6932dd 100644 --- a/include/faker-cxx/Git.h +++ b/include/faker-cxx/Git.h @@ -20,7 +20,7 @@ struct Author * @returns Branch name. * * @code - * git::branch() // "capitalize-bus" + * faker::git::branch() // "capitalize-bus" * @endcode */ std::string branch(unsigned maxIssueNum = 100); @@ -32,7 +32,7 @@ std::string branch(unsigned maxIssueNum = 100); * @returns Commit date. * * @code - * git::commitDate() // "Mon Jan 17 15:05:53 2022 +1100" + * faker::git::commitDate() // "Mon Jan 17 15:05:53 2022 +1100" * @endcode */ std::string commitDate(unsigned years = 15); @@ -47,7 +47,7 @@ std::string commitDate(unsigned years = 15); * @returns Commit entry. * * @code - * git::commitEntry() // "commit 9cbc41bb8ce0438c8de9cb25a1c6ad33441d8aca + * faker::git::commitEntry() // "commit 9cbc41bb8ce0438c8de9cb25a1c6ad33441d8aca Author: Rachel McLaughlin Rachel_McLaughlin@gmail.com Date: Mon Jan 17 15:05:53 2022 +1100 @@ -63,7 +63,7 @@ std::string commitEntry(std::optional dateYears = std::nullopt, * @returns Commit message. * * @code - * git::commitMessage() // "spawn polyp" + * faker::git::commitMessage() // "spawn polyp" * @endcode */ std::string commitMessage(); @@ -76,7 +76,7 @@ std::string commitMessage(); * @returns SHA hash. * * @code - * git::commitSha() // "9cbc41bb8ce0438c8de9cb25a1c6ad33441d8aca" + * faker::git::commitSha() // "9cbc41bb8ce0438c8de9cb25a1c6ad33441d8aca" * @endcode */ std::string commitSha(unsigned length = 40); diff --git a/include/faker-cxx/Hacker.h b/include/faker-cxx/Hacker.h index 9642319f4..2a2886c4d 100644 --- a/include/faker-cxx/Hacker.h +++ b/include/faker-cxx/Hacker.h @@ -10,7 +10,7 @@ namespace faker::hacker * @returns abbreviation. * * @code - * hacker::abbreviation() // "TCP" + * faker::hacker::abbreviation() // "TCP" * @endcode */ std::string_view abbreviation(); @@ -21,7 +21,7 @@ namespace faker::hacker * @returns adjective. * * @code - * hacker::adjective() // "open-source" + * faker::hacker::adjective() // "open-source" * @endcode */ std::string_view adjective(); @@ -32,7 +32,7 @@ namespace faker::hacker * @returns noun. * * @code - * hacker::noun() // "coder" + * faker::hacker::noun() // "coder" * @endcode */ std::string_view noun(); @@ -43,7 +43,7 @@ namespace faker::hacker * @returns verb. * * @code - * hacker::verb() // "run" + * faker::hacker::verb() // "run" * @endcode */ std::string_view verb(); @@ -54,7 +54,7 @@ namespace faker::hacker * @returns ingverb. * * @code - * hacker::ingverb() // "backing up" + * faker::hacker::ingverb() // "backing up" * @endcode */ std::string_view ingverb(); @@ -65,7 +65,7 @@ namespace faker::hacker * @return phrase. * * @code - * hacker::phrase() // "If we bypass the monitor, we can get to the TCP monitor through the neural EXE monitor!" + * faker::hacker::phrase() // "If we bypass the monitor, we can get to the TCP monitor through the neural EXE monitor!" * @endcode */ std::string phrase(); diff --git a/include/faker-cxx/Helper.h b/include/faker-cxx/Helper.h index 54e7beb91..ff3d90ecf 100644 --- a/include/faker-cxx/Helper.h +++ b/include/faker-cxx/Helper.h @@ -27,8 +27,8 @@ class Helper * @return T a random element from the container. * * @code - * Helper::arrayElement(std::string{"abcd"}) // "b" - * Helper::arrayElement(std::vector{{"hello"}, {"world"}}) // "hello" + * faker::helper::arrayElement(std::string{"abcd"}) // "b" + * faker::helper::arrayElement(std::vector{{"hello"}, {"world"}}) // "hello" * @endcode */ template @@ -82,7 +82,7 @@ class Helper * @return T a random element from the vector. * * @code - * Helper::arrayElement(std::vector{{"hello"}, {"world"}}) // "hello" + * faker::helper::arrayElement(std::vector{{"hello"}, {"world"}}) // "hello" * @endcode */ template @@ -108,7 +108,7 @@ class Helper * @return T a random element from the initializer list. * * @code - * Helper::arrayElement(std::initializer_list{{"hello"}, {"world"}}) // "hello" + * faker::helper::arrayElement(std::initializer_list{{"hello"}, {"world"}}) // "hello" * @endcode */ template @@ -135,7 +135,7 @@ class Helper * * @code * std::set chars{'a', 'b', 'c', 'd', 'e'}; - * Helper::setElement(chars) // 'd' + * faker::helper::setElement(chars) // 'd' * @endcode */ template @@ -170,7 +170,7 @@ class Helper * @return T a weighted element value from the vector. * * @code - * Helper::weightedArrayElement(std::vector>{{1, "value1"}, {10, + * faker::helper::weightedArrayElement(std::vector>{{1, "value1"}, {10, * "value2"}}) // "hello2" * @endcode */ @@ -220,7 +220,7 @@ class Helper * @return std::string with shuffled chars * * @code - * Helper::shuffleString("hello") // "eollh" + * faker::helper::shuffleString("hello") // "eollh" * @endcode */ static std::string shuffleString(std::string data); @@ -242,7 +242,7 @@ class Helper * {2, "two"}, * {3, "three"} * }; - * Helper::objectKey(testMap) // "2" + * faker::helper::objectKey(testMap) // "2" * @endcode */ template @@ -275,8 +275,8 @@ class Helper * @return The result of the callback if the probability check was successful, otherwise empty string. * * @code - * Helper::maybe([]() { return "Hello World!"; }) // "" - * Helper::maybe([]() { return 42; }, 0.9) // "42" + * faker::helper::maybe([]() { return "Hello World!"; }) // "" + * faker::helper::maybe([]() { return 42; }, 0.9) // "42" * @endcode */ template @@ -301,7 +301,7 @@ class Helper * @return The same array as a vector. * * @code - * Helper::toVector(std::array{1, 2, 3}) // {1, 2, 3} + * faker::helper::toVector(std::array{1, 2, 3}) // {1, 2, 3} * @endcode */ template @@ -323,10 +323,10 @@ class Helper * @return The string replaced symbols with digits. * * @code - * Helper::replaceSymbolWithNumber() // "" - * Helper::replaceSymbolWithNumber("#####") // "04812" - * Helper::replaceSymbolWithNumber("!####") // "27378" - * Helper::replaceSymbolWithNumber("Your pin is: !####") // "29841" + * faker::helper::replaceSymbolWithNumber() // "" + * faker::helper::replaceSymbolWithNumber("#####") // "04812" + * faker::helper::replaceSymbolWithNumber("!####") // "27378" + * faker::helper::replaceSymbolWithNumber("Your pin is: !####") // "29841" * @endcode */ static std::string replaceSymbolWithNumber(const std::string& str, const char& symbol = '#'); @@ -342,8 +342,8 @@ class Helper * @return The string replaced symbols with digits. * * @code - * Helper::replaceCreditCardSymbols() // "6453-4876-8626-8995-3771" - * Helper::replaceCreditCardSymbols("1234-[4-9]-##!!-L") // "1234-9-5298-2" + * faker::helper::replaceCreditCardSymbols() // "6453-4876-8626-8995-3771" + * faker::helper::replaceCreditCardSymbols("1234-[4-9]-##!!-L") // "1234-9-5298-2" * @endcode */ static std::string replaceCreditCardSymbols(const std::string& inputString = "6453-####-####-####-###L", @@ -362,11 +362,11 @@ class Helper * @return The replaced regex-like expression in the string with matching values. * * @code - * Helper::regexpStyleStringParse() // "" - * Helper::regexpStyleStringParse("#{5}") // "#####" - * Helper::regexpStyleStringParse("#{2,9}") // "#######" - * Helper::regexpStyleStringParse("[500-15000]") // "8375" - * Helper::regexpStyleStringParse("#{3}test[1-5]") // "###test3" + * faker::helper::regexpStyleStringParse() // "" + * faker::helper::regexpStyleStringParse("#{5}") // "#####" + * faker::helper::regexpStyleStringParse("#{2,9}") // "#######" + * faker::helper::regexpStyleStringParse("[500-15000]") // "8375" + * faker::helper::regexpStyleStringParse("#{3}test[1-5]") // "###test3" * @endcode */ static std::string regexpStyleStringParse(const std::string& input); diff --git a/include/faker-cxx/Image.h b/include/faker-cxx/Image.h index f9bc79a94..046fd893b 100644 --- a/include/faker-cxx/Image.h +++ b/include/faker-cxx/Image.h @@ -31,9 +31,9 @@ namespace faker::image * @returns Random real image url from external service. * * @code - * image::imageUrl() // "https://loremflickr.com/640/480" - * image::imageUrl(800, 600) // "https://loremflickr.com/800/600" - * image::imageUrl(800, 600, ImageCategory::Animals) // "https://loremflickr.com/800/600/animals" + * faker::image::imageUrl() // "https://loremflickr.com/640/480" + * faker::image::imageUrl(800, 600) // "https://loremflickr.com/800/600" + * faker::image::imageUrl(800, 600, ImageCategory::Animals) // "https://loremflickr.com/800/600/animals" * @endcode */ std::string imageUrl(unsigned width = 640, unsigned height = 480, @@ -45,7 +45,7 @@ namespace faker::image * @returns Url to github avatar. * * @code - * image::githubAvatarUrl() // "https://avatars.githubusercontent.com/u/9716558" + * faker::image::githubAvatarUrl() // "https://avatars.githubusercontent.com/u/9716558" * @endcode */ std::string githubAvatarUrl(); @@ -56,7 +56,7 @@ namespace faker::image * @returns Random image dimensions. * * @code - * image::dimensions() // "1920x1080" + * faker::image::dimensions() // "1920x1080" * @endcode */ std::string dimensions(); @@ -67,7 +67,7 @@ namespace faker::image * @returns Type of image. * * @code - * image::type() // "png" + * faker::image::type() // "png" */ std::string_view type(); } diff --git a/include/faker-cxx/Internet.h b/include/faker-cxx/Internet.h index 3223e1e1b..abe719a2a 100644 --- a/include/faker-cxx/Internet.h +++ b/include/faker-cxx/Internet.h @@ -48,10 +48,10 @@ struct PasswordOptions * @returns Username including neither, one or both of the provided names. * * @code - * internet::username() // "Richardson.Jeffrey1997" - * internet::username("Michael") // "Michael_Allen29" - * internet::username(std::nullopt, "Cieslar") // "Phillip_Cieslar20" - * internet::username("Andrew", "Cieslar") // "Andrew.Cieslar" + * faker::internet::username() // "Richardson.Jeffrey1997" + * faker::internet::username("Michael") // "Michael_Allen29" + * faker::internet::username(std::nullopt, "Cieslar") // "Phillip_Cieslar20" + * faker::internet::username("Andrew", "Cieslar") // "Andrew.Cieslar" * @endcode */ std::string username(std::optional firstName = std::nullopt, @@ -67,11 +67,11 @@ struct PasswordOptions * @returns Email including neither, one or both of the provided names, with random/provided email host. * * @code - * internet::email() // "Jimenez.Clyde@gmail.com" - * internet::email("Tom") // "TomRichardson79@outlook.com" - * 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" + * faker::internet::email() // "Jimenez.Clyde@gmail.com" + * faker::internet::email("Tom") // "TomRichardson79@outlook.com" + * faker::internet::email(std::nullopt, "Howard") // "FreddieHoward@hotmail.com" + * faker::internet::email("Cindy", "Young") // "Young_Cindy@gmail.com" + * faker::internet::email(std::nullopt, std::nullopt, "example.com") // "Wright.Edna1973@code.com" * @endcode */ std::string email(std::optional firstName = std::nullopt, @@ -87,7 +87,7 @@ struct PasswordOptions * @returns Email including neither, one or both of the provided names, with example email host. * * @code - * internet::exampleEmail() // "Jimenez.Clyde@example.com" + * faker::internet::exampleEmail() // "Jimenez.Clyde@example.com" * @endcode */ std::string exampleEmail(std::optional firstName = std::nullopt, @@ -102,8 +102,8 @@ struct PasswordOptions * @returns Random password-like string. * * @code - * internet::password() // "gXGpe9pKfFcKy9R" - * internet::password(25) // "xv8vDu*wM!Rg0$zd0kH%8p!WY" + * faker::internet::password() // "gXGpe9pKfFcKy9R" + * faker::internet::password(25) // "xv8vDu*wM!Rg0$zd0kH%8p!WY" * @endcode */ std::string password(int length = 15, const PasswordOptions& options = {}); @@ -130,8 +130,8 @@ struct PasswordOptions * @returns Emoji. * * @code - * internet::emoji() // "👑" - * internet::emoji(EmojiType::Food) // "🍕" + * faker::internet::emoji() // "👑" + * faker::internet::emoji(EmojiType::Food) // "🍕" * @endcode */ std::string_view emoji(std::optional type = std::nullopt); @@ -144,7 +144,7 @@ struct PasswordOptions * @returns true if emojiToCheck is found in one of the vectors, false otherwise. * * @code - * internet::checkIfEmojiIsValid("👑") // true + * faker::internet::checkIfEmojiIsValid("👑") // true * @endcode */ bool checkIfEmojiIsValid(const std::string& emojiToCheck); @@ -155,7 +155,7 @@ struct PasswordOptions * @returns Web protocol. * * @code - * internet::protocol() // "https" + * faker::internet::protocol() // "https" * @endcode */ std::string_view protocol(); @@ -166,7 +166,7 @@ struct PasswordOptions * @returns Http method name. * * @code - * internet::httpMethod() // "POST" + * faker::internet::httpMethod() // "POST" * @endcode */ std::string_view httpMethod(); @@ -179,8 +179,8 @@ struct PasswordOptions * @returns Http status code. * * @code - * internet::httpStatusCode() // 500 - * internet::httpStatusCode(HttpStatusCodeType::success) // 201 + * faker::internet::httpStatusCode() // 500 + * faker::internet::httpStatusCode(HttpStatusCodeType::success) // 201 * @endcode */ unsigned httpStatusCode(std::optional responseType = std::nullopt); @@ -191,7 +191,7 @@ struct PasswordOptions * @returns Http request header. * * @code - * internet::httpRequestHeader() // "Authorization" + * faker::internet::httpRequestHeader() // "Authorization" * @endcode */ std::string_view httpRequestHeader(); @@ -202,7 +202,7 @@ struct PasswordOptions * @returns Http response header. * * @code - * internet::httpResponseHeader() // "Location" + * faker::internet::httpResponseHeader() // "Location" * @endcode */ std::string_view httpResponseHeader(); @@ -213,7 +213,7 @@ struct PasswordOptions * @returns Http media type. * * @code - * internet::httpMediaType() // "application/json" + * faker::internet::httpMediaType() // "application/json" * @endcode */ std::string_view httpMediaType(); @@ -226,8 +226,8 @@ struct PasswordOptions * @return String representation of the ipv4 address. * * @code - * internet::ipv4() // "192.168.0.1" - * internet::ipv4(IPv4Class::classA) // "10.0.0.1" + * faker::internet::ipv4() // "192.168.0.1" + * faker::internet::ipv4(IPv4Class::classA) // "10.0.0.1" * @endcode */ std::string ipv4(const IPv4Class& ipv4class = IPv4Class::C); @@ -245,8 +245,8 @@ struct PasswordOptions * @return std::string representation of the ipv4 address. * * @code - * 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" + * faker::internet::ipv4({255.0.0.0}, {10.100.100.100}) // "10.128.17.1" + * faker::internet::ipv4({255.255.128.0}, {129.168.255.0}) // "192.168.128.10" * @endcode */ std::string ipv4(const std::array& baseIpv4Address, @@ -258,7 +258,7 @@ struct PasswordOptions * @return String representation of the ipv6 address. * * @code - * internet::ipv6() // "269f:1230:73e3:318d:842b:daab:326d:897b" + * faker::internet::ipv6() // "269f:1230:73e3:318d:842b:daab:326d:897b" * @endcode */ std::string ipv6(); @@ -271,7 +271,7 @@ struct PasswordOptions * @return A generated random mac address. * * @code - * internet::mac() // "2d:10:34:2f:ac:ac" + * faker::internet::mac() // "2d:10:34:2f:ac:ac" * @endcode */ std::string mac(const std::string& sep = ":"); @@ -282,7 +282,7 @@ struct PasswordOptions * @return Port. * * @code - * internet::port() // 5432 + * faker::internet::port() // 5432 * @endcode */ unsigned port(); @@ -295,7 +295,7 @@ struct PasswordOptions * @return Http(s) url. * * @code - * internet::url() // "https://slow-timer.info" + * faker::internet::url() // "https://slow-timer.info" * @endcode */ std::string url(const WebProtocol& webProtocol = WebProtocol::Https); @@ -306,7 +306,7 @@ struct PasswordOptions * @return Domain name. * * @code - * internet::domainName() // "slow-timer.info" + * faker::internet::domainName() // "slow-timer.info" * @endcode */ std::string domainName(); @@ -317,7 +317,7 @@ struct PasswordOptions * @return Domain word. * * @code - * internet::domainWord() // "close-reality" + * faker::internet::domainWord() // "close-reality" * @endcode */ std::string domainWord(); @@ -328,7 +328,7 @@ struct PasswordOptions * @return Domain suffix. * * @code - * internet::domainSuffix() // "com" + * faker::internet::domainSuffix() // "com" * @endcode */ std::string_view domainSuffix(); @@ -341,7 +341,7 @@ struct PasswordOptions * @return Username. * * @code - * internet::anonymousUsername() // "profusebrother", "richad", "powerfuldifferential" + * faker::internet::anonymousUsername() // "profusebrother", "richad", "powerfuldifferential" * @endcode */ std::string anonymousUsername(unsigned maxLength); diff --git a/include/faker-cxx/Location.h b/include/faker-cxx/Location.h index d741c0271..62c2d2610 100644 --- a/include/faker-cxx/Location.h +++ b/include/faker-cxx/Location.h @@ -31,7 +31,7 @@ enum class AddressCountry * @returns Country name. * * @code - * location::country() // "Poland" + * faker::location::country() // "Poland" * @endcode */ std::string_view country(); @@ -42,7 +42,7 @@ enum class AddressCountry * @returns Country code consisting two letters. * * @code - * location::countryCode() // "PL" + * faker::location::countryCode() // "PL" * @endcode */ std::string_view countryCode(); @@ -55,7 +55,7 @@ enum class AddressCountry * @returns State. * * @code - * location::state() // "Arizona" + * faker::location::state() // "Arizona" * @endcode */ std::string_view state(AddressCountry country = AddressCountry::Usa); @@ -68,7 +68,7 @@ enum class AddressCountry * @returns County. * * @code - * location::county() // "Adams County" + * faker::location::county() // "Adams County" * @endcode */ std::string_view county(AddressCountry country = AddressCountry::Usa); @@ -81,7 +81,7 @@ enum class AddressCountry * @returns City. * * @code - * location::city() // "Boston" + * faker::location::city() // "Boston" * @endcode */ std::string city(AddressCountry country = AddressCountry::Usa); @@ -94,8 +94,8 @@ enum class AddressCountry * @returns Zip code. * * @code - * location::zipCode() // "47683-9880" - * location::zipCode(Country::Poland) // "31-881" + * faker::location::zipCode() // "47683-9880" + * faker::location::zipCode(Country::Poland) // "31-881" * @endcode */ std::string zipCode(AddressCountry country = AddressCountry::Usa); @@ -108,7 +108,7 @@ enum class AddressCountry * @returns Street address including building number and street name. * * @code - * location::streetAddress() // "34830 Erdman Hollow" + * faker::location::streetAddress() // "34830 Erdman Hollow" * @endcode */ std::string streetAddress(AddressCountry country = AddressCountry::Usa); @@ -121,7 +121,7 @@ enum class AddressCountry * @returns Street name. * * @code - * location::street() // "Schroeder Isle" + * faker::location::street() // "Schroeder Isle" * @endcode */ std::string street(AddressCountry country = AddressCountry::Usa); @@ -134,7 +134,7 @@ enum class AddressCountry * @returns Building number. * * @code - * location::buildingNumber() // "505" + * faker::location::buildingNumber() // "505" * @endcode */ std::string buildingNumber(AddressCountry country = AddressCountry::Usa); @@ -148,7 +148,7 @@ enum class AddressCountry * @returns Secondary address. * * @code - * location::secondaryAddress() // "Apt. 861" + * faker::location::secondaryAddress() // "Apt. 861" * @endcode */ std::string secondaryAddress(AddressCountry country = AddressCountry::Usa); @@ -161,7 +161,7 @@ enum class AddressCountry * @returns Latitude within -90 to 90 range. * * @code - * location::latitude() // "-30.9501" + * faker::location::latitude() // "-30.9501" * @endcode */ std::string latitude(Precision precision = Precision::FourDp); @@ -174,7 +174,7 @@ enum class AddressCountry * @returns Longitude within -180 to 180 range. * * @code - * location::longitude() // "-30.9501" + * faker::location::longitude() // "-30.9501" * @endcode */ std::string longitude(Precision precision = Precision::FourDp); @@ -185,7 +185,7 @@ enum class AddressCountry * @returns Direction. * * @code - * location::direction() // "North" + * faker::location::direction() // "North" * @endcode */ std::string_view direction(); @@ -196,7 +196,7 @@ enum class AddressCountry * @returns Time zone. * * @code - * location::timeZone() // "Europe/Warsaw" + * faker::location::timeZone() // "Europe/Warsaw" * @endcode */ std::string_view timeZone(); diff --git a/include/faker-cxx/Lorem.h b/include/faker-cxx/Lorem.h index 4986a532d..c4fc295a4 100644 --- a/include/faker-cxx/Lorem.h +++ b/include/faker-cxx/Lorem.h @@ -10,7 +10,7 @@ namespace faker::lorem * @returns Lorem word. * * @code - * Lorem::word() // "temporibus" + * faker::lorem::word() // "temporibus" * @endcode */ std::string_view word(); @@ -23,7 +23,7 @@ namespace faker::lorem * @returns Lorem words. * * @code - * Lorem::words() // "qui praesentium pariatur" + * faker::lorem::words() // "qui praesentium pariatur" * @endcode */ std::string words(unsigned numberOfWords = 3); @@ -37,7 +37,7 @@ namespace faker::lorem * @returns Lorem sentence. * * @code - * Lorem::sentence() // "Laborum voluptatem officiis est et." + * faker::lorem::sentence() // "Laborum voluptatem officiis est et." * @endcode */ std::string sentence(unsigned minNumberOfWords = 3, unsigned maxNumberOfWords = 10); @@ -51,7 +51,7 @@ namespace faker::lorem * @returns Lorem sentences separated with spaces. * * @code - * Lorem::sentences(2, 2) // "Maxime vel numquam quibusdam. Dignissimos ex molestias quam nihil occaecati maiores." + * faker::lorem::sentences(2, 2) // "Maxime vel numquam quibusdam. Dignissimos ex molestias quam nihil occaecati maiores." * @endcode */ std::string sentences(unsigned minNumberOfSentences = 2, unsigned maxNumberOfSentences = 6); @@ -64,7 +64,7 @@ namespace faker::lorem * @returns Hyphen separated words. * * @code - * Lorem::slug(5) // "delectus-totam-iusto-itaque-placeat" + * faker::lorem::slug(5) // "delectus-totam-iusto-itaque-placeat" * @endcode */ std::string slug(unsigned numberOfWords = 3); @@ -78,7 +78,7 @@ namespace faker::lorem * @returns Lorem paragraph. * * @code - * Lorem::paragraph() // "Animi possimus nemo consequuntur ut ea et tempore unde qui. Quis corporis esse." + * faker::lorem::paragraph() // "Animi possimus nemo consequuntur ut ea et tempore unde qui. Quis corporis esse." * @endcode */ std::string paragraph(unsigned minNumberOfSentences = 2, unsigned maxNumberOfSentences = 6); @@ -92,7 +92,7 @@ namespace faker::lorem * @returns Lorem paragraphs separated with newlines. * * @code - * Lorem::paragraphs() + * faker::lorem::paragraphs() * // "Beatae voluptatem dicta et assumenda fugit eaque quidem consequatur. Fuga unde provident. * // Voluptatibus quo pariatur est. Doloribus commodi et et exercitationem vel et. Omnis inventore cum aut amet. * // Sapiente deleniti et. Ducimus maiores eum. Rem dolorem itaque aliquam." diff --git a/include/faker-cxx/Medicine.h b/include/faker-cxx/Medicine.h index 9921d6fe3..5cce3fbfd 100644 --- a/include/faker-cxx/Medicine.h +++ b/include/faker-cxx/Medicine.h @@ -10,7 +10,7 @@ namespace faker::medicine * @returns Medical condition. * * @code - * medicine::condition() // "AIDS" + * faker::medicine::condition() // "AIDS" * @endcode */ std::string_view condition(); @@ -21,7 +21,7 @@ std::string_view condition(); * @returns Medical test. * * @code - * medicine::medicalTest() // "pulmonary auscultation" + * faker::medicine::medicalTest() // "pulmonary auscultation" * @endcode */ std::string_view medicalTest(); @@ -32,7 +32,7 @@ std::string_view medicalTest(); * @returns Medical specialty. * * @code - * medicine::specialty() // "Cardiology" + * faker::medicine::specialty() // "Cardiology" * @endcode */ diff --git a/include/faker-cxx/Movie.h b/include/faker-cxx/Movie.h index 2aa8ef8d7..cd5583312 100644 --- a/include/faker-cxx/Movie.h +++ b/include/faker-cxx/Movie.h @@ -10,7 +10,7 @@ namespace faker::movie * @returns Movie genre. * * @code - * movie::genre() // "Drama" + * faker::movie::genre() // "Drama" * @endcode */ std::string_view genre(); @@ -21,7 +21,7 @@ std::string_view genre(); * @returns Movie title. * * @code - * movie::movieTitle() // "Pulp Fiction" + * faker::movie::movieTitle() // "Pulp Fiction" * @endcode */ std::string_view movieTitle(); @@ -32,7 +32,7 @@ std::string_view movieTitle(); * @returns Tv show. * * @code - * movie::tvShow() // "The Sopranos" + * faker::movie::tvShow() // "The Sopranos" * @endcode */ std::string_view tvShow(); @@ -43,7 +43,7 @@ std::string_view tvShow(); * @returns Movie director name. * * @code - * movie::director() // "Quentin Tarantino" + * faker::movie::director() // "Quentin Tarantino" * @endcode */ std::string_view director(); @@ -54,7 +54,7 @@ std::string_view director(); * @returns Actor name. * * @code - * movie::actor() // "John Travolta" + * faker::movie::actor() // "John Travolta" * @endcode */ std::string_view actor(); @@ -65,7 +65,7 @@ std::string_view actor(); * @returns Actress name. * * @code - * movie::actress() // "Scarlett Johansson" + * faker::movie::actress() // "Scarlett Johansson" * @endcode */ std::string_view actress(); diff --git a/include/faker-cxx/Music.h b/include/faker-cxx/Music.h index 313b79c04..7910aa750 100644 --- a/include/faker-cxx/Music.h +++ b/include/faker-cxx/Music.h @@ -10,7 +10,7 @@ namespace faker::music * @returns Artist. * * @code - * music::artist() // "Nirvana" + * faker::music::artist() // "Nirvana" * @endcode */ std::string_view artist(); @@ -21,7 +21,7 @@ namespace faker::music * @returns Music genre. * * @code - * music::genre() // "Rock" + * faker::music::genre() // "Rock" * @endcode */ std::string_view genre(); @@ -32,7 +32,7 @@ namespace faker::music * @returns Song name. * * @code - * music::songName() // "Light My Fire" + * faker::music::songName() // "Light My Fire" * @endcode */ std::string_view songName(); diff --git a/include/faker-cxx/Number.h b/include/faker-cxx/Number.h index edfa8de0e..3328fa973 100644 --- a/include/faker-cxx/Number.h +++ b/include/faker-cxx/Number.h @@ -20,6 +20,11 @@ namespace faker::number * @throws std::invalid_argument if min is greater than max. * * @return T a random integer number + * + * + * @code + * faker::number::integer(5, 10) // 7 + * @endcode */ template I integer(I min, I max) @@ -45,6 +50,10 @@ namespace faker::number * @see integer(I, I) * * @return T a random integer number + * + * @code + * faker::number::integer(10) // 5 + * @endcode */ template I integer(I max) @@ -63,6 +72,10 @@ namespace faker::number * @throws std::invalid_argument if min is greater than max. * * @return F a random decimal number. + * + * @code + * faker::number::decimal(10.2, 17.7) // 15.6 + * @encode */ template F decimal(F min, F max) @@ -88,6 +101,10 @@ namespace faker::number * @see decimal(F, F) * * @return F, a random decimal number. + * + * @code + * faker::number::decimal(20.5) // 17.2 + * @encode */ template F decimal(F max) diff --git a/include/faker-cxx/Person.h b/include/faker-cxx/Person.h index c4dc0b2b9..c231282ab 100644 --- a/include/faker-cxx/Person.h +++ b/include/faker-cxx/Person.h @@ -21,9 +21,9 @@ enum class Language; * @returns First name starting with a capital letter. * * @code - * person::firstName() // "Michael" - * person::firstName(Country::England, Sex::Female) // "Emma" - * person::firstName(Country::England, Sex::Male) // "Arthur" + * faker::person::firstName() // "Michael" + * faker::person::firstName(Country::England, Sex::Female) // "Emma" + * faker::person::firstName(Country::England, Sex::Male) // "Arthur" * @endcode */ std::string_view firstName(std::optional country = std::nullopt, @@ -38,7 +38,7 @@ enum class Language; * @returns Last name starting with a capital letter. * * @code - * person::lastName() // "Peterson" + * faker::person::lastName() // "Peterson" * @endcode */ std::string_view lastName(std::optional country = std::nullopt, @@ -53,9 +53,9 @@ enum class Language; * @returns Full name starting with first name. * * @code - * person::fullName() // "Marcia Robinson" - * person::fullName(Country::England, Sex::Female) // "Jennifer Martin" - * person::fullName(Country::England, Sex::Male) // "Samuel Walker" + * faker::person::fullName() // "Marcia Robinson" + * faker::person::fullName(Country::England, Sex::Female) // "Jennifer Martin" + * faker::person::fullName(Country::England, Sex::Male) // "Samuel Walker" * @endcode */ std::string fullName(std::optional country = std::nullopt, std::optional sex = std::nullopt); @@ -68,9 +68,9 @@ enum class Language; * @returns Name prefix. * * @code - * person::prefix() // "Miss" - * person::prefix(Sex::Female) // "Ms." - * person::prefix(Sex::Male) // "Mr." + * faker::person::prefix() // "Miss" + * faker::person::prefix(Sex::Female) // "Ms." + * faker::person::prefix(Sex::Male) // "Mr." * @endcode */ std::string_view prefix(std::optional countryOpt = std::nullopt, @@ -82,7 +82,7 @@ enum class Language; * @returns Name suffix. * * @code - * person::suffix() // "Jr." + * faker::person::suffix() // "Jr." * @endcode */ std::string_view suffix(std::optional countryOpt = std::nullopt, @@ -94,7 +94,7 @@ enum class Language; * @returns Bio. * * @code - * person::bio() //"Developer" + * faker::person::bio() //"Developer" * @endcode */ std::string bio(); @@ -105,7 +105,7 @@ enum class Language; * @returns Sex. * * @code - * person::sex() // "Male" + * faker::person::sex() // "Male" * @endcode */ std::string_view sex(std::optional language = std::nullopt); @@ -116,7 +116,7 @@ enum class Language; * @returns Gender. * * @code - * person::gender() // "Transexual woman" + * faker::person::gender() // "Transexual woman" * @endcode */ std::string_view gender(); @@ -127,7 +127,7 @@ enum class Language; * @returns Job title. * * @code - * person::jobTitle() // "Global Accounts Engineer" + * faker::person::jobTitle() // "Global Accounts Engineer" * @endcode */ std::string jobTitle(); @@ -138,7 +138,7 @@ enum class Language; * @returns Job descriptor. * * @code - * person::jobDescriptor() // "Senior" + * faker::person::jobDescriptor() // "Senior" * @endcode */ std::string_view jobDescriptor(); @@ -149,7 +149,7 @@ enum class Language; * @returns Job area. * * @code - * person::jobArea() // "Software" + * faker::person::jobArea() // "Software" * @endcode */ std::string_view jobArea(); @@ -160,7 +160,7 @@ enum class Language; * @returns Job type. * * @code - * person::jobType() // "Engineer" + * faker::person::jobType() // "Engineer" * @endcode */ std::string_view jobType(); @@ -171,7 +171,7 @@ enum class Language; * @returns Hobby. * * @code - * person::hobby() // "Gaming" + * faker::person::hobby() // "Gaming" * @endcode */ std::string_view hobby(); @@ -182,7 +182,7 @@ enum class Language; * @returns Language. * * @code - * person::language() // "Polish" + * faker::person::language() // "Polish" * @endcode */ std::string_view language(); @@ -193,7 +193,7 @@ enum class Language; * @returns Nationality. * * @code - * person::nationality() // "Romanian" + * faker::person::nationality() // "Romanian" * @endcode */ std::string_view nationality(); @@ -206,8 +206,8 @@ enum class Language; * @returns Social Security Number. * * @code - * person::ssn() // "437-12-6854" - * person::ssn(SsnCountry::Polish) // "95111901567" + * faker::person::ssn() // "437-12-6854" + * faker::person::ssn(SsnCountry::Polish) // "95111901567" * @endcode */ std::string ssn(std::optional country = std::nullopt); @@ -218,7 +218,7 @@ enum class Language; * @returns Western Zodiac * * @code - * person::westernZodiac() // "Virgo" + * faker::person::westernZodiac() // "Virgo" * @endcode */ std::string_view westernZodiac(); @@ -229,7 +229,7 @@ enum class Language; * @returns Chinese Zodiac * * @code - * person::chineseZodiac() // "Dragon" + * faker::person::chineseZodiac() // "Dragon" * @endcode */ std::string_view chineseZodiac(); @@ -240,7 +240,7 @@ enum class Language; * @returns Passport * * @code - * person::passport(PassportCountry::Romania) // "12345678" + * faker::person::passport(PassportCountry::Romania) // "12345678" * @endcode */ std::string passport(std::optional country = std::nullopt); diff --git a/include/faker-cxx/Phone.h b/include/faker-cxx/Phone.h index 5e37b21f1..b885001a3 100644 --- a/include/faker-cxx/Phone.h +++ b/include/faker-cxx/Phone.h @@ -16,9 +16,9 @@ enum class PhoneNumberCountryFormat; * @returns Random phone number. * * @code - * phone::number() // "961-770-7727" - * phone::number("501-###-###") // "501-039-841" - * phone::number("+48 91 ### ## ##") // "+48 91 463 61 70" + * faker::phone::number() // "961-770-7727" + * faker::phone::number("501-###-###") // "501-039-841" + * faker::phone::number("+48 91 ### ## ##") // "+48 91 463 61 70" * @endcode */ std::string number(std::optional = std::nullopt); @@ -29,7 +29,7 @@ enum class PhoneNumberCountryFormat; * @returns Random phone platform. * * @code - * phone::platform() // "iOS" + * faker::phone::platform() // "iOS" * @endcode */ std::string_view platform(); @@ -40,7 +40,7 @@ enum class PhoneNumberCountryFormat; * @returns Random phone model. * * @code - * phone::modelName() // "Samsung Galaxy S22" + * faker::phone::modelName() // "Samsung Galaxy S22" * @endcode */ std::string_view modelName(); @@ -51,7 +51,7 @@ enum class PhoneNumberCountryFormat; * @returns Random phone manufacturer. * * @code - * phone::manufacturer() // "Sony" + * faker::phone::manufacturer() // "Sony" * @endcode */ std::string_view manufacturer(); @@ -64,7 +64,7 @@ enum class PhoneNumberCountryFormat; * @returns Random phone number based on country phone number template. * * @code - * phone::number(PhoneNumberCountryFormat::Usa) // "+1 (395) 714-1494" + * faker::phone::number(PhoneNumberCountryFormat::Usa) // "+1 (395) 714-1494" * @endcode */ std::string number(PhoneNumberCountryFormat format); @@ -75,7 +75,7 @@ enum class PhoneNumberCountryFormat; * @returns IMEI number. * * @code - * phone::imei() // "13-850175-913761-7" + * faker::phone::imei() // "13-850175-913761-7" * @endcode */ std::string imei(); @@ -86,7 +86,7 @@ enum class PhoneNumberCountryFormat; * @returns Random country area code * * @code - * phone::areaCode() // "+1" + * faker::phone::areaCode() // "+1" * @endcode */ std::string_view areaCode(); diff --git a/include/faker-cxx/Plant.h b/include/faker-cxx/Plant.h index d0517b62e..aa3c70ce4 100644 --- a/include/faker-cxx/Plant.h +++ b/include/faker-cxx/Plant.h @@ -10,7 +10,7 @@ namespace faker::plant * @returns Species of tree. * * @code - * Plant::tree() // "Oak" + * faker::plant::tree() // "Oak" * @endcode */ std::string_view tree(); @@ -21,7 +21,7 @@ std::string_view tree(); * @returns Species of flower. * * @code - * Plant::flower() // "Rose" + * faker::plant::flower() // "Rose" * @endcode */ std::string_view flower(); @@ -32,7 +32,7 @@ std::string_view flower(); * @returns Species of shrub. * * @code - * Plant::shrub() // "Azalea" + * faker::plant::shrub() // "Azalea" * @endcode */ std::string_view shrub(); @@ -43,7 +43,7 @@ std::string_view shrub(); * @returns Species of grass. * * @code - * Plant::grass() // "Kentucky Bluegrass" + * faker::plant::grass() // "Kentucky Bluegrass" * @endcode */ std::string_view grass(); @@ -54,7 +54,7 @@ std::string_view grass(); * @returns Species of fern. * * @code - * Plant::fern() // "Maidenhair" + * faker::plant::fern() // "Maidenhair" * @endcode */ std::string_view fern(); @@ -65,7 +65,7 @@ std::string_view fern(); * @returns Species of succulent. * * @code - * Plant::succulent() // "Aloe Vera" + * faker::plant::succulent() // "Aloe Vera" * @endcode */ std::string_view succulent(); @@ -76,7 +76,7 @@ std::string_view succulent(); * @returns Species of vine. * * @code - * Plant::vine() // "Ivy" + * faker::plant::vine() // "Ivy" * @endcode */ std::string_view vine(); @@ -87,7 +87,7 @@ std::string_view vine(); * @returns Type of plant. * * @code - * Plant::type() // "tree" + * faker::plant::type() // "tree" * @endcode */ std::string_view plantType(); diff --git a/include/faker-cxx/Science.h b/include/faker-cxx/Science.h index 9507839d3..c5ef9d12b 100644 --- a/include/faker-cxx/Science.h +++ b/include/faker-cxx/Science.h @@ -20,7 +20,7 @@ class Science * @returns ChemicalElement * * @code - * Science::chemicalElement() // Object of ChemicalElement containing info about a random element in the periodic + * faker::science::chemicalElement() // Object of ChemicalElement containing info about a random element in the periodic * table. * @endcode */ @@ -39,7 +39,7 @@ class Science * @returns Unit * * @code - * Science::unit() // Object of Unit containing info about a random unit of measurement. + * faker::science::unit() // Object of Unit containing info about a random unit of measurement. * @endcode */ static Unit unit(); @@ -50,7 +50,7 @@ class Science * @returns Unit * * @code - * Science::distanceUnit() // Object of Unit containing info about a random unit of measurement used to measure + * faker::science::distanceUnit() // Object of Unit containing info about a random unit of measurement used to measure * distance. * @endcode */ @@ -62,7 +62,7 @@ class Science * @returns Unit * * @code - * Science::timeUnit() // Object of Unit containing info about a random unit of measurement used to measure time. + * faker::science::timeUnit() // Object of Unit containing info about a random unit of measurement used to measure time. * @endcode */ static Unit timeUnit(); @@ -73,7 +73,7 @@ class Science * @returns Unit * * @code - * Science::massUnit() // Object of Unit containing info about a random unit of measurement used to measure mass. + * faker::science::massUnit() // Object of Unit containing info about a random unit of measurement used to measure mass. * @endcode */ static Unit massUnit(); @@ -84,7 +84,7 @@ class Science * @returns Unit * * @code - * Science::tempUnit() // Object of Unit containing info about a random unit of measurement used to measure temp. + * faker::science::tempUnit() // Object of Unit containing info about a random unit of measurement used to measure temp. * @endcode */ static Unit tempUnit(); @@ -95,7 +95,7 @@ class Science * @returns Unit * * @code - * Science::currentUnit() // Object of Unit containing info about a random unit of measurement used to measure + * faker::science::currentUnit() // Object of Unit containing info about a random unit of measurement used to measure * current. * @endcode */ diff --git a/include/faker-cxx/Sport.h b/include/faker-cxx/Sport.h index 72bb12911..5fd14a3ec 100644 --- a/include/faker-cxx/Sport.h +++ b/include/faker-cxx/Sport.h @@ -10,7 +10,7 @@ namespace faker::sport * @returns sport. * * @code - * Sport::sport() // "football" + * faker::sport::sport() // "football" * @endcode */ @@ -22,7 +22,7 @@ namespace faker::sport * @returns soccer team. * * @code - * Sport::soccerTeam() // "Manchester United" + * faker::sport::soccerTeam() // "Manchester United" * @endcode */ std::string_view soccerTeam(); @@ -33,7 +33,7 @@ namespace faker::sport * @returns male athlete. * * @code - * Sport::maleAthlete() // "Cristiano Ronaldo" + * faker::sport::maleAthlete() // "Cristiano Ronaldo" * @endcode */ std::string_view maleAthlete(); @@ -44,7 +44,7 @@ namespace faker::sport * @returns female athlete. * * @code - * Sport::femaleAthlete() // "Serena Williams" + * faker::sport::femaleAthlete() // "Serena Williams" * @endcode */ std::string_view femaleAthlete(); @@ -55,7 +55,7 @@ namespace faker::sport * @returns Sport Event. * * @code - * Sport::sportEvent() // "Super Bowl" + * faker::sport::sportEvent() // "Super Bowl" * @endcode */ std::string_view sportEvent(); diff --git a/include/faker-cxx/String.h b/include/faker-cxx/String.h index 058d2c0d4..4b696ef9c 100644 --- a/include/faker-cxx/String.h +++ b/include/faker-cxx/String.h @@ -74,7 +74,7 @@ std::string generateAtLeastString(const GuaranteeMap& guarantee); * @param gen A random number generator (type RandomGenerator) * * @code - * string::uuid() // "27666229-cedb-4a45-8018-98b1e1d921e2" + * faker::string::uuid() // "27666229-cedb-4a45-8018-98b1e1d921e2" * @endcode */ template @@ -130,8 +130,8 @@ std::string generateAtLeastString(const GuaranteeMap& guarantee); * @returns Sample string. * * @code - * string::sample() // "Zo!.:*e>wR" - * string::sample(5) // "6Bye8" + * faker::string::sample() // "Zo!.:*e>wR" + * faker::string::sample(5) // "6Bye8" * @endcode */ std::string sample(unsigned length = 10); @@ -145,8 +145,8 @@ std::string generateAtLeastString(const GuaranteeMap& guarantee); * @returns Sample string. * * @code - * string::sample({}) // "Zo!.:*e>wR" - * string::sample({{'|' ,{2,2}},{'^',{0,0}},{':',{1,8}}}, 8) // "|6Bye8:|" + * faker::string::sample({}) // "Zo!.:*e>wR" + * faker::string::sample({{'|' ,{2,2}},{'^',{0,0}},{':',{1,8}}}, 8) // "|6Bye8:|" * @endcode */ std::string sample(GuaranteeMap&& guarantee, unsigned length = 10); @@ -160,8 +160,8 @@ std::string generateAtLeastString(const GuaranteeMap& guarantee); * @returns String from characters. * * @code - * string::fromCharacters("abc") // "b" - * string::fromCharacters("qwerty", 5) // "qrwqt" + * faker::string::fromCharacters("abc") // "b" + * faker::string::fromCharacters("qwerty", 5) // "qrwqt" * @endcode */ std::string fromCharacters(const std::string& characters, unsigned length = 1); @@ -176,8 +176,8 @@ std::string generateAtLeastString(const GuaranteeMap& guarantee); * @returns String from characters. * * @code - * string::fromCharacters({}, "abc") // "b" - * string::fromCharacters({{'q',{2,2}},{'e',{1,5}}}, "qwerty", 8) // "yqreqety" + * faker::string::fromCharacters({}, "abc") // "b" + * faker::string::fromCharacters({{'q',{2,2}},{'e',{1,5}}}, "qwerty", 8) // "yqreqety" * @endcode */ std::string fromCharacters(GuaranteeMap&& guarantee, const std::string& characters, unsigned length = 1); @@ -193,9 +193,9 @@ std::string generateAtLeastString(const GuaranteeMap& guarantee); * @returns Alpha string. * * @code - * string::alpha() // "b" - * string::alpha(5, StringCasing::Upper) // "DTCIC" - * string::alpha(4, StringCasing::Lower) // "brpt" + * faker::string::alpha() // "b" + * faker::string::alpha(5, StringCasing::Upper) // "DTCIC" + * faker::string::alpha(4, StringCasing::Lower) // "brpt" * @endcode */ std::string alpha(unsigned length = 1, StringCasing casing = StringCasing::Mixed, @@ -211,9 +211,9 @@ std::string generateAtLeastString(const GuaranteeMap& guarantee); * @returns Alpha string. * * @code - * string::alpha({}) // "b" - * string::alpha({{'A',{2,2}}, 5, StringCasing::Upper) // "DACAC" - * string::alpha({{'a',{0,0}},{'b',{3,3}},{'c', {0,2}}}, 10, StringCasing::Lower) // "bicnmmkbbp" + * faker::string::alpha({}) // "b" + * faker::string::alpha({{'A',{2,2}}, 5, StringCasing::Upper) // "DACAC" + * faker::string::alpha({{'a',{0,0}},{'b',{3,3}},{'c', {0,2}}}, 10, StringCasing::Lower) // "bicnmmkbbp" * @endcode */ std::string alpha(GuaranteeMap&& guarantee, unsigned length = 1, StringCasing casing = StringCasing::Mixed); @@ -229,9 +229,9 @@ std::string generateAtLeastString(const GuaranteeMap& guarantee); * @returns Alphanumeric string. * * @code - * string::alphanumeric() // "4" - * string::alphanumeric(5, StringCasing::Upper) // "3e5V7" - * string::alphanumeric(4, StringCasing::Lower) // "1nrq" + * faker::string::alphanumeric() // "4" + * faker::string::alphanumeric(5, StringCasing::Upper) // "3e5V7" + * faker::string::alphanumeric(4, StringCasing::Lower) // "1nrq" * @endcode */ std::string alphanumeric(unsigned length = 1, StringCasing casing = StringCasing::Mixed, @@ -247,9 +247,9 @@ std::string generateAtLeastString(const GuaranteeMap& guarantee); * @returns Alphanumeric string. * * @code - * string::alphanumeric({}) // "4" - * string::alphanumeric({{'A', {3,6}},{'1', {1,1}}, 5, StringCasing::Upper) // "1EAAA" - * string::alphanumeric({{'a',{0,2}},{'2',{0,3}},{'z',{3,5}}}, 10, StringCasing::Lower) // "z1naazrqz0" + * faker::string::alphanumeric({}) // "4" + * faker::string::alphanumeric({{'A', {3,6}},{'1', {1,1}}, 5, StringCasing::Upper) // "1EAAA" + * faker::string::alphanumeric({{'a',{0,2}},{'2',{0,3}},{'z',{3,5}}}, 10, StringCasing::Lower) // "z1naazrqz0" * @endcode */ std::string alphanumeric(GuaranteeMap&& guarantee, unsigned length = 1, @@ -264,9 +264,9 @@ std::string generateAtLeastString(const GuaranteeMap& guarantee); * @returns Numeric string. * * @code - * string::numeric() // "1" - * string::numeric(6) // "035742" - * string::numeric(6, false) // "254429" + * faker::string::numeric() // "1" + * faker::string::numeric(6) // "035742" + * faker::string::numeric(6, false) // "254429" * @endcode */ std::string numeric(unsigned length = 1, bool allowLeadingZeros = true); @@ -281,9 +281,9 @@ std::string generateAtLeastString(const GuaranteeMap& guarantee); * @returns Numeric string. * * @code - * string::numeric({}) // "1" - * string::numeric({'5',{3,6}}, 6) // "055542" - * string::numeric({'0',{0,0}}, {'4',{1,1}}, 6, false) // "854829" + * faker::string::numeric({}) // "1" + * faker::string::numeric({'5',{3,6}}, 6) // "055542" + * faker::string::numeric({'0',{0,0}}, {'4',{1,1}}, 6, false) // "854829" * @endcode */ std::string numeric(GuaranteeMap&& guarantee, unsigned length = 1, bool allowLeadingZeros = true); @@ -298,10 +298,10 @@ std::string generateAtLeastString(const GuaranteeMap& guarantee); * @returns Hexadecimal string. * * @code - * string::hexadecimal() // "0xb" - * string::hexadecimal(10) // "0xae13d044cb" - * string::hexadecimal(6, HexCasing::Upper, HexPrefix::Hash) // "#E3F380" - * string::hexadecimal(6, HexCasing::Lower, HexPrefix::None) // "e3f380" + * faker::string::hexadecimal() // "0xb" + * faker::string::hexadecimal(10) // "0xae13d044cb" + * faker::string::hexadecimal(6, HexCasing::Upper, HexPrefix::Hash) // "#E3F380" + * faker::string::hexadecimal(6, HexCasing::Lower, HexPrefix::None) // "e3f380" * @endcode */ std::string hexadecimal(unsigned length = 1, HexCasing casing = HexCasing::Lower, @@ -316,8 +316,8 @@ std::string generateAtLeastString(const GuaranteeMap& guarantee); * @return A lowercase hexadecimal number. * * @code - * string::hexadecimal() // "b" - * string::hexadecimal(0, 255) // "9d" + * faker::string::hexadecimal() // "b" + * faker::string::hexadecimal(0, 255) // "9d" * @endcode */ std::string hexadecimal(std::optional min = std::nullopt, std::optional max = std::nullopt); @@ -333,10 +333,10 @@ std::string generateAtLeastString(const GuaranteeMap& guarantee); * @returns Hexadecimal string. * * @code - * string::hexadecimal({}) // "0xb" - * string::hexadecimal({'a',{2,2}}, 10) // "0xae13d04acb" - * string::hexadecimal({'F', {2,4}}, 6, HexCasing::Upper, HexPrefix::Hash) // "#E3FFF0" - * string::hexadecimal({'1', {1,4}, {'2', {1, 4}, {'c', {1,1}}, 6, HexCasing::Lower, HexPrefix::None) // "121a1c" + * faker::string::hexadecimal({}) // "0xb" + * faker::string::hexadecimal({'a',{2,2}}, 10) // "0xae13d04acb" + * faker::string::hexadecimal({'F', {2,4}}, 6, HexCasing::Upper, HexPrefix::Hash) // "#E3FFF0" + * faker::string::hexadecimal({'1', {1,4}, {'2', {1, 4}, {'c', {1,1}}, 6, HexCasing::Lower, HexPrefix::None) // "121a1c" * @endcode */ std::string hexadecimal(GuaranteeMap&& guarantee, unsigned length = 1, HexCasing casing = HexCasing::Lower, @@ -350,7 +350,7 @@ std::string generateAtLeastString(const GuaranteeMap& guarantee); * @returns Binary string. * * @code - * string::binary(8) // "0b01110101" + * faker::string::binary(8) // "0b01110101" * @endcode */ std::string binary(unsigned length = 1); @@ -364,7 +364,7 @@ std::string generateAtLeastString(const GuaranteeMap& guarantee); * @returns Binary string. * * @code - * string::binary({'1',{7,8}}, 8) // "0b11110111" + * faker::string::binary({'1',{7,8}}, 8) // "0b11110111" * @endcode */ std::string binary(GuaranteeMap&& guarantee, unsigned length = 1); @@ -377,7 +377,7 @@ std::string generateAtLeastString(const GuaranteeMap& guarantee); * @returns Octal string. * * @code - * string::octal(8) // "0o52561721" + * faker::string::octal(8) // "0o52561721" * @endcode */ std::string octal(unsigned length = 1); @@ -391,7 +391,7 @@ std::string generateAtLeastString(const GuaranteeMap& guarantee); * @returns Octal string. * * @code - * string::octal({'4',{4,5}}, 8) // "0o42444041" + * faker::string::octal({'4',{4,5}}, 8) // "0o42444041" * @endcode */ std::string octal(GuaranteeMap&& guarantee, unsigned length = 1); diff --git a/include/faker-cxx/System.h b/include/faker-cxx/System.h index 9efb266df..ea974c55c 100644 --- a/include/faker-cxx/System.h +++ b/include/faker-cxx/System.h @@ -46,15 +46,15 @@ struct NetworkInterfaceOptions * @returns Random file name with extension. * * @code - * system::fileName() // "injustice.mpeg" + * faker::system::fileName() // "injustice.mpeg" * * FileOptions options * options.extensionCount = 3 - * system::fileName(options) // "transformation.wav.mpeg.mp4" + * faker::system::fileName(options) // "transformation.wav.mpeg.mp4" * * options.extensionRange.min = 1; * options.extensionRange.max = 3; - * system::fileName(options) // "sparkle.png.pdf" + * faker::system::fileName(options) // "sparkle.png.pdf" * @endcode */ std::string fileName(const FileOptions& options = {}); @@ -67,7 +67,7 @@ std::string fileName(const FileOptions& options = {}); * @returns A file extension. * * @code - * system::fileExtension(MimeType::Image) // "png" + * faker::system::fileExtension(MimeType::Image) // "png" * @endcode */ std::string fileExtension(const std::optional& mimeType = std::nullopt); @@ -80,8 +80,8 @@ std::string fileExtension(const std::optional& mimeType = std::nullopt * @returns A random file name with a given extension or a commonly used extension. * * @code - * system::commonFileName() // "dollar.jpg" - * system::commonFileName("txt") // "global_borders_wyoming.txt" + * faker::system::commonFileName() // "dollar.jpg" + * faker::system::commonFileName("txt") // "global_borders_wyoming.txt" * @endcode */ std::string commonFileName(const std::optional& ext = std::nullopt); @@ -92,7 +92,7 @@ std::string commonFileName(const std::optional& ext = std::nullopt) * @returns A commonly used file extension. * * @code - * system::commonFileExtension() // "gif" + * faker::system::commonFileExtension() // "gif" * @endcode */ std::string_view commonFileExtension(); @@ -103,7 +103,7 @@ std::string_view commonFileExtension(); * @returns A mime-type. * * @code - * system::mimeType() // "video/vnd.vivo" + * faker::system::mimeType() // "video/vnd.vivo" * @endcode */ std::string_view mimeType(); @@ -114,7 +114,7 @@ std::string_view mimeType(); * @returns A commonly used file type. * * @code - * system::fileType() // "audio" + * faker::system::fileType() // "audio" * @endcode */ std::string_view fileType(); @@ -125,7 +125,7 @@ std::string_view fileType(); * @returns A directory path. * * @code - * system::directoryPath() // "/etc/mail" + * faker::system::directoryPath() // "/etc/mail" * @endcode */ std::string_view directoryPath(); @@ -136,7 +136,7 @@ std::string_view directoryPath(); * @returns A file path. * * @code - * system::filePath() // "/usr/local/src/money.dotx" + * faker::system::filePath() // "/usr/local/src/money.dotx" * @endcode */ std::string filePath(); @@ -147,7 +147,7 @@ std::string filePath(); * @returns A semantic version. * * @code - * system::semver() // "1.1.2" + * faker::system::semver() // "1.1.2" * @endcode */ std::string semver(); @@ -162,20 +162,20 @@ std::string semver(); * @returns A random network interface. * * @code - * system::networkInterface() // "enp2s7f8" + * faker::system::networkInterface() // "enp2s7f8" * * NetworkInterfaceOptions options; * options.interfaceType = "wl"; - * system::networkInterface(options) // "wlsf4d2" + * faker::system::networkInterface(options) // "wlsf4d2" * * NetworkInterfaceOptions options; * options.interfaceSchema = "mac"; - * system::networkInterface(options) // "enxd17705ed394f" + * faker::system::networkInterface(options) // "enxd17705ed394f" * * NetworkInterfaceOptions options; * options.interfaceType = "en"; * options.interfaceSchema = "pci"; - * system::networkInterface(options) // "enp1s9f1d2" + * faker::system::networkInterface(options) // "enp1s9f1d2" * @endcode */ std::string networkInterface(const std::optional& options = {}); @@ -195,19 +195,19 @@ std::string networkInterface(const std::optional& optio * * CronOptions options * options.includeYear = true - * std::string cronExpr = system::cron(options) // "16 14 * 11 2 2038" + * std::string cronExpr = faker::system::cron(options) // "16 14 * 11 2 2038" * * CronOptions options * options.includeYear = false - * std::string cronExpr = system::cron(options) // "16 14 * 11 2" + * std::string cronExpr = faker::system::cron(options) // "16 14 * 11 2" * * CronOptions options * options.includeNonStandard = false - * std::string cronExpr = system::cron(options) // 34 2 ? 8 * + * std::string cronExpr = faker::system::cron(options) // 34 2 ? 8 * * * CronOptions options * options.includeNonStandard = true - * std::string cronExpr = system::cron(options) // "@reboot" + * std::string cronExpr = faker::system::cron(options) // "@reboot" * @endcode */ std::string cron(const CronOptions& options = {}); diff --git a/include/faker-cxx/Vehicle.h b/include/faker-cxx/Vehicle.h index c92e77383..1552996ef 100644 --- a/include/faker-cxx/Vehicle.h +++ b/include/faker-cxx/Vehicle.h @@ -10,7 +10,7 @@ namespace faker::vehicle * @returns bicycle type. * * @code - * vehicle::bicycle() // "Electric bike" + * faker::vehicle::bicycle() // "Electric bike" * @endcode */ std::string_view bicycle(); @@ -21,7 +21,7 @@ namespace faker::vehicle * @returns vehicle color. * * @code - * vehicle::color() // "Silver" + * faker::vehicle::color() // "Silver" * @endcode */ std::string_view color(); @@ -32,7 +32,7 @@ namespace faker::vehicle * @returns vehicle fuel. * * @code - * vehicle::fuel() // "Diesel" + * faker::vehicle::fuel() // "Diesel" * @endcode */ std::string_view fuel(); @@ -43,7 +43,7 @@ namespace faker::vehicle * @returns vehicle(car) manufacturer. * * @code - * vehicle::manufacturer() // "Ferrari" + * faker::vehicle::manufacturer() // "Ferrari" * @endcode */ std::string_view manufacturer(); @@ -54,7 +54,7 @@ namespace faker::vehicle * @returns vehicle(car) model. * * @code - * vehicle::model() // "Fiesta" + * faker::vehicle::model() // "Fiesta" * @endcode */ std::string_view model(); @@ -65,7 +65,7 @@ namespace faker::vehicle * @returns vehicle type. * * @code - * vehicle::type() // "Van" + * faker::vehicle::type() // "Van" * @endcode */ std::string_view type(); @@ -76,7 +76,7 @@ namespace faker::vehicle * @returns vehicle composed by a manufacturer and model. * * @code - * vehicle::vehicleName() // "BMW Explorer" + * faker::vehicle::vehicleName() // "BMW Explorer" * @endcode */ std::string vehicleName(); @@ -87,7 +87,7 @@ namespace faker::vehicle * @returns vehicle identification number. * * @code - * vehicle::vin() // "YV1MH682762184654" + * faker::vehicle::vin() // "YV1MH682762184654" * @endcode */ std::string vin(); @@ -98,7 +98,7 @@ namespace faker::vehicle * @returns vehicle registration number. * * @code - * vehicle::vrm() // "MF56UPA" + * faker::vehicle::vrm() // "MF56UPA" * @endcode */ std::string vrm(); diff --git a/include/faker-cxx/VideoGame.h b/include/faker-cxx/VideoGame.h index 542c19127..ab376c285 100644 --- a/include/faker-cxx/VideoGame.h +++ b/include/faker-cxx/VideoGame.h @@ -10,7 +10,7 @@ namespace faker::videogame * @returns Video game name. * * @code - * VideoGame::gameTitle() // "Rayman Arena" + * faker::videogame::gameTitle() // "Rayman Arena" * @endcode */ std::string_view gameTitle(); @@ -21,7 +21,7 @@ namespace faker::videogame * @returns Video game genre. * * @code - * VideoGame::genre() // "Platformer" + * faker::videogame::genre() // "Platformer" * @endcode */ std::string_view genre(); @@ -32,7 +32,7 @@ namespace faker::videogame * @returns Platform. * * @code - * VideoGame::platform() // "Playstation 5" + * faker::videogame::platform() // "Playstation 5" * @endcode */ std::string_view platform(); @@ -43,7 +43,7 @@ namespace faker::videogame * @returns Studio name. * * @code - * VideoGame::studioName() // "Activision Blizzard" + * faker::videogame::studioName() // "Activision Blizzard" * @endcode */ std::string_view studioName(); diff --git a/include/faker-cxx/Weather.h b/include/faker-cxx/Weather.h index 2cfcca31b..b27a35c4c 100644 --- a/include/faker-cxx/Weather.h +++ b/include/faker-cxx/Weather.h @@ -10,7 +10,7 @@ namespace faker::weather * @return A random weather description * * @code - * weather::weatherDescription(); // "Sunny" + * faker::weather::weatherDescription(); // "Sunny" * @endcode */ std::string_view weatherDescription(); diff --git a/include/faker-cxx/Word.h b/include/faker-cxx/Word.h index 0e12d522b..bc7911ce6 100644 --- a/include/faker-cxx/Word.h +++ b/include/faker-cxx/Word.h @@ -15,8 +15,8 @@ namespace faker::word * @returns Random sample word. * * @code - * word::sample() // "protection" - * word::sample(5) // "spell" + * faker::word::sample() // "protection" + * faker::word::sample(5) // "spell" * @endcode */ std::string_view sample(std::optional length = std::nullopt); @@ -29,8 +29,8 @@ std::string_view sample(std::optional length = std::nullopt); * @returns Random words separated with spaces. * * @code - * word::words() // "protection" - * word::words(5) // "before hourly patiently dribble equal" + * faker::word::words() // "protection" + * faker::word::words(5) // "before hourly patiently dribble equal" * @endcode */ std::string words(unsigned numberOfWords = 1); @@ -44,8 +44,8 @@ std::string words(unsigned numberOfWords = 1); * @returns Adjective. * * @code - * word::adjective() // "complete" - * word::adjective(3) // "bad" + * faker::word::adjective() // "complete" + * faker::word::adjective(3) // "bad" * @endcode */ std::string_view adjective(std::optional length = std::nullopt); @@ -59,8 +59,8 @@ std::string_view adjective(std::optional length = std::nullopt); * @returns Adverb. * * @code - * word::adverb() // "deliberately" - * word::adverb(5) // "almost" + * faker::word::adverb() // "deliberately" + * faker::word::adverb(5) // "almost" * @endcode */ std::string_view adverb(std::optional length = std::nullopt); @@ -74,8 +74,8 @@ std::string_view adverb(std::optional length = std::nullopt); * @returns Conjunction. * * @code - * word::conjunction() // "because" - * word::conjunction(6) // "indeed" + * faker::word::conjunction() // "because" + * faker::word::conjunction(6) // "indeed" * @endcode */ std::string_view conjunction(std::optional length = std::nullopt); @@ -89,8 +89,8 @@ std::string_view conjunction(std::optional length = std::nullopt); * @returns Interjection. * * @code - * word::interjection() // "psst" - * word::interjection(4) // "yuck" + * faker::word::interjection() // "psst" + * faker::word::interjection(4) // "yuck" * @endcode */ std::string_view interjection(std::optional length = std::nullopt); @@ -104,8 +104,8 @@ std::string_view interjection(std::optional length = std::nullopt); * @returns Noun. * * @code - * word::noun() // "pudding" - * word::noun(8) // "distance" + * faker::word::noun() // "pudding" + * faker::word::noun(8) // "distance" * @endcode */ std::string_view noun(std::optional length = std::nullopt); @@ -119,8 +119,8 @@ std::string_view noun(std::optional length = std::nullopt); * @returns Preposition. * * @code - * word::preposition() // "besides" - * word::preposition(4) // "from" + * faker::word::preposition() // "besides" + * faker::word::preposition(4) // "from" * @endcode */ std::string_view preposition(std::optional length = std::nullopt); @@ -134,8 +134,8 @@ std::string_view preposition(std::optional length = std::nullopt); * @returns Verb. * * @code - * word::verb() // "override" - * word::verb(9) // "stabilise" + * faker::word::verb() // "override" + * faker::word::verb(9) // "stabilise" * @endcode */ std::string_view verb(std::optional length = std::nullopt);