Skip to content

Commit

Permalink
update documentation (#749)
Browse files Browse the repository at this point in the history
function description documentation updated for all the modules

Signed-off-by: Guru Mehar Rachaputi <[email protected]>
  • Loading branch information
00thirdeye00 authored Jun 27, 2024
1 parent cba5b90 commit be6b01c
Show file tree
Hide file tree
Showing 35 changed files with 466 additions and 448 deletions.
26 changes: 13 additions & 13 deletions include/faker-cxx/Airline.h
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -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();
Expand All @@ -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();
Expand All @@ -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();
Expand All @@ -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);
Expand All @@ -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);
Expand All @@ -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);
Expand All @@ -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});
Expand Down
30 changes: 15 additions & 15 deletions include/faker-cxx/Animal.h
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -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();
Expand All @@ -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();
Expand All @@ -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();
Expand All @@ -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();
Expand All @@ -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();
Expand All @@ -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();
Expand All @@ -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();
Expand All @@ -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();
Expand All @@ -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();
Expand All @@ -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();
Expand All @@ -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();
Expand All @@ -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();
Expand All @@ -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();
Expand All @@ -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();
Expand Down
12 changes: 6 additions & 6 deletions include/faker-cxx/Book.h
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -21,7 +21,7 @@ std::string_view title();
* @returns Book genre.
*
* @code
* book::genre() // "Fantasy"
* faker::book::genre() // "Fantasy"
* @endcode
*/
std::string_view genre();
Expand All @@ -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();
Expand All @@ -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();
Expand All @@ -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();
Expand All @@ -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();
Expand Down
28 changes: 14 additions & 14 deletions include/faker-cxx/Color.h
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -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);
Expand All @@ -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);
Expand All @@ -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);
Expand All @@ -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);
Expand All @@ -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();
Expand All @@ -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();
Expand All @@ -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();
Expand All @@ -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();
Expand All @@ -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();
Expand Down
Loading

0 comments on commit be6b01c

Please sign in to comment.