-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathname.cc
More file actions
70 lines (54 loc) · 3.12 KB
/
name.cc
File metadata and controls
70 lines (54 loc) · 3.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
// Time-stamp: <2016-03-02 14:06:44 dmendyke>
// Required header files
//-----------------------------------------------------------------------------
#include <stdexcept> // std::runtime_error
#include <algorithm> // std::randome_shuffle
#include <random> // std::default_random_engine
#include "name.hh" // parsec::name
#include "chance.hh" // chance::number::shuffle
// Namespace short hand
//-----------------------------------------------------------------------------
using namespace std; // standard library
using namespace parsec; // project NS
// Return a random name
//-----------------------------------------------------------------------------
const string name::random() {
static auto iter = name::vector.begin();
if ( iter == name::vector.end() )
throw runtime_error( "No more names" );
return string( *iter++ );
}; // end random
// Randomly shuffle the names in the list
//-----------------------------------------------------------------------------
void name::shuffle( ) {
chance::number::shuffle( name::vector.begin(), name::vector.end() );
}; // end shuffle
// Static vector
//-----------------------------------------------------------------------------
vector< const char* > name::vector( {
"Aaron", "Admix", "Aegle", "Aking", "Alibi", "Alula", "Ameer", "Amram",
"Anand", "Anima", "Anise", "Anton", "Apery", "Arcus", "Aston", "Atoll",
"Attic", "Azana", "Azlon", "Babur", "Banat", "Beach", "Beard", "Belle",
"Bercy", "Beryl", "Betty", "Bingo", "Biped", "Blanc", "Blaze", "Blimp",
"Blood", "Blues", "Boggy", "Bouak", "Brawn", "Brute", "Bryan", "Bryce",
"Bunin", "Butte", "Camag", "Chass", "Chide", "Chivy", "Chorz", "Chuck",
"Civil", "Cloot", "Coder", "Colet", "Comal", "Combo", "Court", "Creon",
"Dealt", "Depew", "Diner", "Diwan", "Dodds", "Dolor", "Doted", "Dumps",
"Edley", "Eridu", "Ervin", "Faker", "Fayum", "Fiver", "Folie", "Folum",
"Found", "Freya", "Fundi", "Funky", "Glory", "Grace", "Grama", "Guild",
"Gumma", "Hadst", "Haoma", "Henze", "Hided", "Hilly", "Hurst", "Iapyx",
"Idona", "Inter", "Izard", "Janus", "Japan", "Jembe", "Jiber", "Josip",
"Joule", "Jubal", "Juicy", "Kafre", "Kanga", "Kelso", "Khaki", "Kraut",
"Kthen", "Laden", "Laird", "Lares", "Lasse", "Legal", "Loral", "Lysol",
"Malay", "Mango", "March", "Matsu", "Mauro", "Medal", "Meryl", "Meter",
"Minch", "Minim", "Mould", "Mouth", "Mower", "Mrike", "Mudir", "Mamer",
"Nawab", "Nerva", "Notts", "Odeum", "Oleta", "Orpin", "Osaka", "Ovary",
"Papaw", "Pardy", "Perdu", "Phyle", "Piled", "Plash", "Plate", "Ploce",
"Polio", "Pondo", "Poort", "Poser", "Possy", "Potos", "Provo", "Pudgy",
"Pygmy", "Quote", "Rafer", "Raser", "Recto", "Repad", "Rindy", "River",
"Roget", "Rumor", "Saugh", "Scale", "Screw", "Sekos", "Senna", "Senza",
"Serif", "Shady", "Shown", "Sigyn", "Snipe", "Snips", "Soken", "Space",
"Spale", "Spore", "Stage", "Steed", "Strap", "Strut", "Styks", "Sunni",
"Tease", "Thess", "Tilth", "Tinea", "Tokyo", "Tyrus", "Upper", "Verdi",
"Vowel", "Whelk", "Wirra", "Yabby", "Ysaye", "Zilch", "Zoril"
} );