Bridges-C++  3.4.2
Bridges(C++ API)
GutenbergBook.h
Go to the documentation of this file.
1 #ifndef GUTENBERG_BOOK_H
2 
3 #define GUTENBERG_BOOK_H
4 #include <string>
5 using namespace std;
6 
7 namespace bridges {
8  namespace dataset {
32  class GutenbergBook {
33  string title;
34  int id;
35  string loc_class;
36  vector<string> authors;
37  string lang, date_added;
38  vector<string> genres;
39 
40  public:
45  : title(""), lang(""), date_added(""), id(0), loc_class ("") {
46  }
47 
59  GutenbergBook(const string& titl, const int& book_id, const vector<string>& auth,
60  const string& lng, const vector<string>& genr, const string& da)
61  : title(titl), id(book_id), authors(auth), lang(lng), genres(genr), date_added(da) {
62  }
63 
68  vector<string> getAuthors() const {
69  return authors;
70  }
75  void setAuthors(const vector<string>& auth) {
76  this->authors = auth;
77  }
78 
83  int getId() const {
84  return id;
85  }
90  void setId(const int& id) {
91  this->id = id;
92  }
93 
98  string getTitle() const {
99  return title;
100  }
105  void setTitle(const string& titl) {
106  this->title = titl;
107  }
108 
113  string getLoc() const {
114  return loc_class;
115  }
120  void setLoc(const string& loc) {
121  this->loc_class = loc;
122  }
123 
128  string getLang() const {
129  return lang;
130  }
135  void setLang(const string& lang) {
136  this->lang = lang;
137  }
138 
143  vector<string> getGenres() const {
144  return genres;
145  }
150  void setGenres(const vector<string>& genre) {
151  this->genres = genre;
152  }
153 
158  string getDateAdded() const {
159  return date_added;
160  }
165  void setDateAdded(const string& da) {
166  this->date_added = da;
167  }
168  };
169 
170  }
171 }// namespace bridges
172 
173 #endif
174 
A Gutenberg Book object (meta data and book's full text)
Definition: GutenbergBook.h:32
string getLang() const
Definition: GutenbergBook.h:128
GutenbergBook(const string &titl, const int &book_id, const vector< string > &auth, const string &lng, const vector< string > &genr, const string &da)
Definition: GutenbergBook.h:59
void setGenres(const vector< string > &genre)
Definition: GutenbergBook.h:150
string getLoc() const
Definition: GutenbergBook.h:113
void setLang(const string &lang)
Definition: GutenbergBook.h:135
void setTitle(const string &titl)
Definition: GutenbergBook.h:105
vector< string > getGenres() const
Definition: GutenbergBook.h:143
string getTitle() const
Definition: GutenbergBook.h:98
int getId() const
Definition: GutenbergBook.h:83
void setDateAdded(const string &da)
Definition: GutenbergBook.h:165
void setAuthors(const vector< string > &auth)
Definition: GutenbergBook.h:75
void setLoc(const string &loc)
Definition: GutenbergBook.h:120
void setId(const int &id)
Definition: GutenbergBook.h:90
GutenbergBook()
Definition: GutenbergBook.h:44
string getDateAdded() const
Definition: GutenbergBook.h:158
vector< string > getAuthors() const
Definition: GutenbergBook.h:68
these methods convert byte arrays in to base64 codes and are used in BRIDGES to represent the color a...
Definition: alltypes.h:4