Skip to content

Commit

Permalink
Merge branch 'main' into update_func_doc
Browse files Browse the repository at this point in the history
  • Loading branch information
00thirdeye00 authored Jun 27, 2024
2 parents d69560b + e12afe8 commit dc94585
Show file tree
Hide file tree
Showing 50 changed files with 971 additions and 956 deletions.
1 change: 0 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ set(FAKER_SOURCES
src/modules/medicine/Medicine.cpp
src/modules/movie/Movie.cpp
src/modules/music/Music.cpp
src/modules/number/Number.cpp
src/modules/person/Person.cpp
src/modules/phone/Phone.cpp
src/modules/plant/Plant.cpp
Expand Down
2 changes: 1 addition & 1 deletion Doxyfile
Original file line number Diff line number Diff line change
Expand Up @@ -498,7 +498,7 @@ NUM_PROC_THREADS = 1
# normally produced when WARNINGS is set to YES.
# The default value is: NO.

EXTRACT_ALL = NO
EXTRACT_ALL = YES

# If the EXTRACT_PRIVATE tag is set to YES, all private members of a class will
# be included in the documentation.
Expand Down
15 changes: 9 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ purposes within C++ applications.
## Usage and Documentation

To properly use Faker C++ you must first consume the Faker library (see Consuming Library with CMake).
Once that is done, you need to include the proper header files depending on the module you wish to generate data from.
Once that is done, you need to include the proper header files depending on the module you wish to generate data from or
use general include file `faker-cxx/Faker.h`.
The module header file names can be found in [docs](https://cieslarmichal.github.io/faker-cxx).

Below is an example of how to use Faker C++ in your code.
Expand All @@ -49,13 +50,15 @@ Below is an example of how to use Faker C++ in your code.
#include "faker-cxx/Location.h"
#include "faker-cxx/String.h"

// or #include "faker-cxx/Faker.h" for all modules

int main()
{
const auto id = faker::String::uuid();
const auto email = faker::Internet::email();
const auto password = faker::Internet::password();
const auto city = faker::Location::city();
const auto streetAddress = faker::Location::streetAddress();
const auto id = faker::string::uuid();
const auto email = faker::internet::email();
const auto password = faker::internet::password();
const auto city = faker::location::city();
const auto streetAddress = faker::location::streetAddress();

std::cout << id << std::endl; // 58018063-ce5a-4fa7-adfd-327eb2e2d9a5
std::cout << email << std::endl; // [email protected]
Expand Down
3 changes: 1 addition & 2 deletions examples/basic/main.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#include <cstdlib>
#include <iostream>

#include "faker-cxx/Date.h"
#include "faker-cxx/Internet.h"
#include "faker-cxx/Location.h"
#include "faker-cxx/String.h"
Expand All @@ -21,4 +20,4 @@ int main()
std::cout << streetAddress << std::endl;

return EXIT_SUCCESS;
}
}
Loading

0 comments on commit dc94585

Please sign in to comment.