-
-
Notifications
You must be signed in to change notification settings - Fork 163
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
70c3e43
commit f7d4707
Showing
2 changed files
with
136 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
#pragma once | ||
|
||
#include <string> | ||
|
||
namespace faker | ||
{ | ||
class Animal | ||
{ | ||
public: | ||
static std::string bear(); | ||
|
||
static std::string bird(); | ||
|
||
static std::string cat(); | ||
|
||
static std::string cetacean(); | ||
|
||
static std::string cow(); | ||
|
||
static std::string crocodilia(); | ||
|
||
static std::string dog(); | ||
|
||
static std::string fish(); | ||
|
||
static std::string horse(); | ||
|
||
static std::string insect(); | ||
|
||
static std::string lion(); | ||
|
||
static std::string rabbit(); | ||
|
||
static std::string rodent(); | ||
|
||
static std::string snake(); | ||
|
||
static std::string type(); | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
#include "faker-cxx/Animal.h" | ||
|
||
#include "data/Bears.h" | ||
#include "data/Birds.h" | ||
#include "data/Cats.h" | ||
#include "data/Cetaceans.h" | ||
#include "data/Cows.h" | ||
#include "data/Crocodilia.h" | ||
#include "data/Dogs.h" | ||
#include "data/Fishes.h" | ||
#include "data/Horses.h" | ||
#include "data/Insects.h" | ||
#include "data/Lions.h" | ||
#include "data/Rabbits.h" | ||
#include "data/Rodents.h" | ||
#include "data/Snakes.h" | ||
#include "data/Types.h" | ||
#include "faker-cxx/Helper.h" | ||
|
||
namespace faker | ||
{ | ||
std::string Animal::bear() | ||
{ | ||
return Helper::arrayElement<std::string>(bears); | ||
} | ||
|
||
std::string Animal::bird() | ||
{ | ||
return Helper::arrayElement<std::string>(birds); | ||
} | ||
|
||
std::string Animal::cat() | ||
{ | ||
return Helper::arrayElement<std::string>(cats); | ||
} | ||
|
||
std::string Animal::cetacean() | ||
{ | ||
return Helper::arrayElement<std::string>(cetaceans); | ||
} | ||
|
||
std::string Animal::cow() | ||
{ | ||
return Helper::arrayElement<std::string>(cows); | ||
} | ||
|
||
std::string Animal::crocodilia() | ||
{ | ||
return Helper::arrayElement<std::string>(faker::crocodilia); | ||
} | ||
|
||
std::string Animal::dog() | ||
{ | ||
return Helper::arrayElement<std::string>(dogs); | ||
} | ||
|
||
std::string Animal::fish() | ||
{ | ||
return Helper::arrayElement<std::string>(fishes); | ||
} | ||
|
||
std::string Animal::horse() | ||
{ | ||
return Helper::arrayElement<std::string>(horses); | ||
} | ||
|
||
std::string Animal::insect() | ||
{ | ||
return Helper::arrayElement<std::string>(insects); | ||
} | ||
|
||
std::string Animal::lion() | ||
{ | ||
return Helper::arrayElement<std::string>(lions); | ||
} | ||
|
||
std::string Animal::rabbit() | ||
{ | ||
return Helper::arrayElement<std::string>(rabbits); | ||
} | ||
|
||
std::string Animal::rodent() | ||
{ | ||
return Helper::arrayElement<std::string>(rodents); | ||
} | ||
|
||
std::string Animal::snake() | ||
{ | ||
return Helper::arrayElement<std::string>(snakes); | ||
} | ||
|
||
std::string Animal::type() | ||
{ | ||
return Helper::arrayElement<std::string>(types); | ||
} | ||
} |