summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorKelly Rauchenberger <fefferburbia@gmail.com>2016-05-16 22:51:22 -0400
committerKelly Rauchenberger <fefferburbia@gmail.com>2016-05-16 22:51:22 -0400
commitb849e98358555e8fc18ce226d8b310bf45d72dce (patch)
tree6be6c568791c985f2f9f3344a6a0f1f50a86af28
parente7299f7bf66df7e62bf36ef42ab7810086d088c5 (diff)
downloadverbly-b849e98358555e8fc18ce226d8b310bf45d72dce.tar.gz
verbly-b849e98358555e8fc18ce226d8b310bf45d72dce.tar.bz2
verbly-b849e98358555e8fc18ce226d8b310bf45d72dce.zip
Added rhymes_with predicate based on rhymes rather than words
-rw-r--r--lib/adjective_query.cpp7
-rw-r--r--lib/adjective_query.h1
-rw-r--r--lib/adverb_query.cpp7
-rw-r--r--lib/adverb_query.h1
-rw-r--r--lib/noun_query.cpp7
-rw-r--r--lib/noun_query.h1
-rw-r--r--lib/verb_query.cpp7
-rw-r--r--lib/verb_query.h1
8 files changed, 32 insertions, 0 deletions
diff --git a/lib/adjective_query.cpp b/lib/adjective_query.cpp index e47b40c..5f1cbe7 100644 --- a/lib/adjective_query.cpp +++ b/lib/adjective_query.cpp
@@ -46,6 +46,13 @@ namespace verbly {
46 return *this; 46 return *this;
47 } 47 }
48 48
49 adjective_query& adjective_query::rhymes_with(rhyme _r)
50 {
51 _rhymes.push_back(_r);
52
53 return *this;
54 }
55
49 adjective_query& adjective_query::has_pronunciation() 56 adjective_query& adjective_query::has_pronunciation()
50 { 57 {
51 this->_has_prn = true; 58 this->_has_prn = true;
diff --git a/lib/adjective_query.h b/lib/adjective_query.h index 030a494..945e6bd 100644 --- a/lib/adjective_query.h +++ b/lib/adjective_query.h
@@ -11,6 +11,7 @@ namespace verbly {
11 adjective_query& random(); 11 adjective_query& random();
12 adjective_query& except(const adjective& _word); 12 adjective_query& except(const adjective& _word);
13 adjective_query& rhymes_with(const word& _word); 13 adjective_query& rhymes_with(const word& _word);
14 adjective_query& rhymes_with(rhyme _r);
14 adjective_query& has_pronunciation(); 15 adjective_query& has_pronunciation();
15 adjective_query& has_rhyming_noun(); 16 adjective_query& has_rhyming_noun();
16 adjective_query& has_rhyming_adjective(); 17 adjective_query& has_rhyming_adjective();
diff --git a/lib/adverb_query.cpp b/lib/adverb_query.cpp index 797e6a6..1c22712 100644 --- a/lib/adverb_query.cpp +++ b/lib/adverb_query.cpp
@@ -46,6 +46,13 @@ namespace verbly {
46 return *this; 46 return *this;
47 } 47 }
48 48
49 adverb_query& adverb_query::rhymes_with(rhyme _r)
50 {
51 _rhymes.push_back(_r);
52
53 return *this;
54 }
55
49 adverb_query& adverb_query::has_pronunciation() 56 adverb_query& adverb_query::has_pronunciation()
50 { 57 {
51 this->_has_prn = true; 58 this->_has_prn = true;
diff --git a/lib/adverb_query.h b/lib/adverb_query.h index 403a616..cf6c046 100644 --- a/lib/adverb_query.h +++ b/lib/adverb_query.h
@@ -11,6 +11,7 @@ namespace verbly {
11 adverb_query& random(); 11 adverb_query& random();
12 adverb_query& except(const adverb& _word); 12 adverb_query& except(const adverb& _word);
13 adverb_query& rhymes_with(const word& _word); 13 adverb_query& rhymes_with(const word& _word);
14 adverb_query& rhymes_with(rhyme _r);
14 adverb_query& has_pronunciation(); 15 adverb_query& has_pronunciation();
15 adverb_query& has_rhyming_noun(); 16 adverb_query& has_rhyming_noun();
16 adverb_query& has_rhyming_adjective(); 17 adverb_query& has_rhyming_adjective();
diff --git a/lib/noun_query.cpp b/lib/noun_query.cpp index 8f37bf6..f4c832b 100644 --- a/lib/noun_query.cpp +++ b/lib/noun_query.cpp
@@ -46,6 +46,13 @@ namespace verbly {
46 return *this; 46 return *this;
47 } 47 }
48 48
49 noun_query& noun_query::rhymes_with(rhyme _r)
50 {
51 _rhymes.push_back(_r);
52
53 return *this;
54 }
55
49 noun_query& noun_query::has_pronunciation() 56 noun_query& noun_query::has_pronunciation()
50 { 57 {
51 this->_has_prn = true; 58 this->_has_prn = true;
diff --git a/lib/noun_query.h b/lib/noun_query.h index 19fbc60..eb4a57c 100644 --- a/lib/noun_query.h +++ b/lib/noun_query.h
@@ -11,6 +11,7 @@ namespace verbly {
11 noun_query& random(); 11 noun_query& random();
12 noun_query& except(const noun& _word); 12 noun_query& except(const noun& _word);
13 noun_query& rhymes_with(const word& _word); 13 noun_query& rhymes_with(const word& _word);
14 noun_query& rhymes_with(rhyme _r);
14 noun_query& has_pronunciation(); 15 noun_query& has_pronunciation();
15 noun_query& has_rhyming_noun(); 16 noun_query& has_rhyming_noun();
16 noun_query& has_rhyming_adjective(); 17 noun_query& has_rhyming_adjective();
diff --git a/lib/verb_query.cpp b/lib/verb_query.cpp index 654bc33..d871f83 100644 --- a/lib/verb_query.cpp +++ b/lib/verb_query.cpp
@@ -46,6 +46,13 @@ namespace verbly {
46 return *this; 46 return *this;
47 } 47 }
48 48
49 verb_query& verb_query::rhymes_with(rhyme _r)
50 {
51 _rhymes.push_back(_r);
52
53 return *this;
54 }
55
49 verb_query& verb_query::has_pronunciation() 56 verb_query& verb_query::has_pronunciation()
50 { 57 {
51 this->_has_prn = true; 58 this->_has_prn = true;
diff --git a/lib/verb_query.h b/lib/verb_query.h index a07dc18..0ee5666 100644 --- a/lib/verb_query.h +++ b/lib/verb_query.h
@@ -11,6 +11,7 @@ namespace verbly {
11 verb_query& random(); 11 verb_query& random();
12 verb_query& except(const verb& _word); 12 verb_query& except(const verb& _word);
13 verb_query& rhymes_with(const word& _word); 13 verb_query& rhymes_with(const word& _word);
14 verb_query& rhymes_with(rhyme _r);
14 verb_query& has_pronunciation(); 15 verb_query& has_pronunciation();
15 verb_query& has_rhyming_noun(); 16 verb_query& has_rhyming_noun();
16 verb_query& has_rhyming_adjective(); 17 verb_query& has_rhyming_adjective();