uni

University stuff
git clone git://git.margiolis.net/uni.git
Log | Files | Refs | README | LICENSE

review.hpp (890B)


      1 #ifndef REVIEW_HPP
      2 #define REVIEW_HPP
      3 
      4 #include <stdexcept>
      5 #include <string>
      6 
      7 #include "errlog.hpp"
      8 
      9 class Review
     10 {
     11     private:
     12         int stars;
     13         std::string username;
     14         std::string comment;
     15         ErrLog errlog;
     16 
     17     public:
     18         Review();
     19         Review(const int stars, const std::string& username,
     20                const std::string& comment);
     21         Review(const Review& rev) = default;
     22 
     23         const std::string& get_username() const {return username;}
     24         const std::string& get_comment()  const {return comment;}
     25         constexpr const int get_stars()   const {return stars;}
     26 
     27         void set_stars(const int stars) {this->stars = stars;}
     28         void set_username(const std::string& username)
     29             {this->username = username;}
     30         void set_comment(const std::string& comment)
     31             {this->comment = comment;}
     32 };
     33 
     34 #endif /* REVIEW_HPP */