uni

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

manufacturer.hpp (953B)


      1 #ifndef MANUFACTURER_HPP
      2 #define MANUFACTURER_HPP
      3 
      4 #include <cstring>
      5 #include <stdexcept>
      6 #include <string>
      7 
      8 #include "errlog.hpp"
      9 
     10 class Manufacturer
     11 {
     12     private:
     13         const char *serialnum;
     14         const char *name;
     15         std::string email;
     16         ErrLog errlog;
     17 
     18     public:
     19         Manufacturer();
     20         Manufacturer(const char *serialnum, const char *name,
     21                      const std::string& email);
     22         Manufacturer(const Manufacturer& m);
     23         ~Manufacturer();
     24 
     25         const std::string& get_email()        const {return email;}
     26         constexpr const char *get_serialnum() const {return serialnum;}
     27         constexpr const char *get_name()      const {return name;}
     28 
     29         void set_serialnum(const char *serialnum);
     30         void set_name(const char *name); 
     31         void set_email(const std::string& email) {this->email = email;}
     32 
     33     private:
     34         char *convstr(const char *str);
     35 };
     36 
     37 #endif /* MANUFACTURER_HPP */