Bridges-C++ 3.5.0-dev2-1-ge3e57bf
Bridges(C++ API)
Book.h
Go to the documentation of this file.
1#ifndef BOOK_H
2
3#define BOOK_H
4#include <string>
5using namespace std;
6
7namespace bridges {
8 namespace dataset {
24 class Book {
25 string authorName;
26 int authorBirth,
27 authorDeath;
28 string title;
29 vector<string> lang, genre, subject;
30 int numChars, numWords, numSentences, numDifficultWords;
31 string url;
32 int downloads;
33
34 public:
36 : authorName(""), authorBirth(0), authorDeath(0),
37 title(""), lang(), genre(), subject(),
38 numChars(0), numWords(0), numSentences(0), numDifficultWords(0),
39 url(""), downloads(0) {
40 }
41
42 Book(const string& authorName, int authorBirth, int authorDeath,
43 const string& title, const vector<string>& lang, const vector<string>& genre,
44 const vector<string>& subject, int numChars, int numWords,
45 int numSentences, int numDifficultWords, const string& url,
46 int downloads)
47 : authorName(authorName), authorBirth(authorBirth), authorDeath(authorDeath),
48 title(title), lang(lang), genre(genre), subject(subject),
49 numChars(numChars), numWords(numWords), numSentences(numSentences), numDifficultWords(numDifficultWords),
50 url(url), downloads(downloads) {
51 }
52
53 string getAuthorName() const {
54 return authorName;
55 }
56 void setAuthorName(const string& authorName) {
57 this->authorName = authorName;
58 }
59
60 int getAuthorBirth() const {
61 return authorBirth;
62 }
63 void setAuthorBirth(int authorBirth) {
64 this->authorBirth = authorBirth;
65 }
66
67 int getAuthorDeath() const {
68 return authorDeath;
69 }
70 void setAuthorDeath(int authorDeath) {
71 this->authorDeath = authorDeath;
72 }
73
74 string getTitle() const {
75 return title;
76 }
77 void setTitle(const string& title) {
78 this->title = title;
79 }
80
81 vector<string> getLang() const {
82 return lang;
83 }
84 void setLang(const vector<string>& lang) {
85 this->lang = lang;
86 }
87
88 vector<string> getGenre() const {
89 return genre;
90 }
91 void setGenre(const vector<string>& genre) {
92 this->genre = genre;
93 }
94
95 vector<string> getSubject() const {
96 return subject;
97 }
98 void setSubject(const vector<string>& subject) {
99 this->subject = subject;
100 }
101
102 string getURL() const {
103 return url;
104 }
105 void setURL(const string& url) {
106 this->url = url;
107 }
108
109 int getNumChars() const {
110 return numChars;
111 }
112 void setNumChars(int numChars) {
113 this->numChars = numChars;;
114 }
115
116 int getNumWords() const {
117 return numWords;
118 }
119 void setNumWords(int numWords) {
120 this->numWords = numWords;
121 }
122
123 int getNumSentences() const {
124 return numSentences;
125 }
126 void setNumSentences(int numSentences) {
127 this->numSentences = numSentences;
128 }
129
131 return numDifficultWords;
132 }
133 void setNumDifficultWords(int numDifficultWords) {
134 this->numDifficultWords = numDifficultWords;
135 }
136
137 int getDownloads() const {
138 return downloads;
139 }
140
141 void setDownloads(int downloads) {
142 this->downloads = downloads;
143 }
144 };
145
146 }
147}// namespace bridges
148
149#endif
150
A Book object, used along with the books data source.
Definition: Book.h:24
void setAuthorBirth(int authorBirth)
Definition: Book.h:63
int getNumWords() const
Definition: Book.h:116
void setSubject(const vector< string > &subject)
Definition: Book.h:98
void setTitle(const string &title)
Definition: Book.h:77
void setAuthorDeath(int authorDeath)
Definition: Book.h:70
void setGenre(const vector< string > &genre)
Definition: Book.h:91
string getTitle() const
Definition: Book.h:74
Book(const string &authorName, int authorBirth, int authorDeath, const string &title, const vector< string > &lang, const vector< string > &genre, const vector< string > &subject, int numChars, int numWords, int numSentences, int numDifficultWords, const string &url, int downloads)
Definition: Book.h:42
void setURL(const string &url)
Definition: Book.h:105
void setNumSentences(int numSentences)
Definition: Book.h:126
string getURL() const
Definition: Book.h:102
vector< string > getLang() const
Definition: Book.h:81
void setAuthorName(const string &authorName)
Definition: Book.h:56
void setNumDifficultWords(int numDifficultWords)
Definition: Book.h:133
int getNumSentences() const
Definition: Book.h:123
Book()
Definition: Book.h:35
void setDownloads(int downloads)
Definition: Book.h:141
vector< string > getSubject() const
Definition: Book.h:95
void setLang(const vector< string > &lang)
Definition: Book.h:84
int getAuthorBirth() const
Definition: Book.h:60
int getAuthorDeath() const
Definition: Book.h:67
vector< string > getGenre() const
Definition: Book.h:88
string getAuthorName() const
Definition: Book.h:53
int getNumDifficultWords() const
Definition: Book.h:130
int getNumChars() const
Definition: Book.h:109
void setNumChars(int numChars)
Definition: Book.h:112
int getDownloads() const
Definition: Book.h:137
void setNumWords(int numWords)
Definition: Book.h:119
these methods convert byte arrays in to base64 codes and are used in BRIDGES to represent the color a...
Definition: alltypes.h:4