summary refs log tree commit diff stats
path: root/lib/verb_query.h
blob: a07dc18913eebb2b50ae4496bb40b19ef38b1bb8 (plain) (blame)
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
#ifndef VERB_QUERY_H_34E5A679
#define VERB_QUERY_H_34E5A679

namespace verbly {

  class verb_query {
    public:
      verb_query(const data& _data);
      
      verb_query& limit(int _limit);
      verb_query& random();
      verb_query& except(const verb& _word);
      verb_query& rhymes_with(const word& _word);
      verb_query& has_pronunciation();
      verb_query& has_rhyming_noun();
      verb_query& has_rhyming_adjective();
      verb_query& has_rhyming_adverb();
      verb_query& has_rhyming_verb();
      
      verb_query& has_frames();
      
      std::list<verb> run() const;
      
      const static int unlimited = -1;
      
    private:
      const data& _data;
      int _limit = unlimited;
      bool _random = false;
      std::list<rhyme> _rhymes;
      std::list<verb> _except;
      bool _has_prn = false;
      bool _has_frames = false;
      bool _has_rhyming_noun = false;
      bool _has_rhyming_adjective = false;
      bool _has_rhyming_adverb = false;
      bool _has_rhyming_verb = false;
  };

};

#endif /* end of include guard: VERB_QUERY_H_34E5A679 */