Bridges-C++ 3.5.0
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>
5using namespace std;
6
7namespace bridges {
8 namespace dataset {
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
99 string getTitle() const {
100 return title;
101 }
106 void setTitle(const string& title) {
107 this->title = title;
108 }
109
114 string getLoc() const {
115 return loc_class;
116 }
121 void setLoc(const string& loc) {
122 this->loc_class = loc;
123 }
124
129 string getLang() const {
130 return lang;
131 }
136 void setLang(const string& lang) {
137 this->lang = lang;
138 }
139
144 vector<string> getGenres() const {
145 return genres;
146 }
151 void setGenres(const vector<string>& genre) {
152 this->genres = genre;
153 }
154
159 string getDateAdded() const {
160 return date_added;
161 }
166 void setDateAdded(const string& da) {
167 this->date_added = da;
168 }
169 };
170
171 }
172}// namespace bridges
173
174#endif
A Gutenberg Book object (meta data and book's full text)
Definition: GutenbergBook.h:32
string getLang() const
Definition: GutenbergBook.h:129
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:151
string getLoc() const
Definition: GutenbergBook.h:114
void setLang(const string &lang)
Definition: GutenbergBook.h:136
string getTitle() const
Definition: GutenbergBook.h:99
int getId() const
Definition: GutenbergBook.h:83
void setDateAdded(const string &da)
Definition: GutenbergBook.h:166
void setAuthors(const vector< string > &auth)
Definition: GutenbergBook.h:75
void setLoc(const string &loc)
Definition: GutenbergBook.h:121
void setTitle(const string &title)
Definition: GutenbergBook.h:106
void setId(const int &id)
Definition: GutenbergBook.h:90
vector< string > getGenres() const
Definition: GutenbergBook.h:144
vector< string > getAuthors() const
Definition: GutenbergBook.h:68
GutenbergBook()
Definition: GutenbergBook.h:44
string getDateAdded() const
Definition: GutenbergBook.h:159
these methods convert byte arrays in to base64 codes and are used in BRIDGES to represent the color a...
Definition: alltypes.h:4