Advertisement
Guest User

Untitled

a guest
Nov 20th, 2018
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.43 KB | None | 0 0
  1. #ifndef POBIPROJECT_CLIENT_HPP
  2. #define POBIPROJECT_CLIENT_HPP
  3.  
  4. #include "address.hpp"
  5.  
  6. #include <string>
  7. #include <vector>
  8. #include <memory>
  9.  
  10. class Rent;
  11.  
  12. class Client
  13. {
  14. private:
  15.     std::string m_firstName;
  16.     std::string m_lastName;
  17.     std::string m_personalID;
  18.     std::vector<std::shared_ptr<Rent>> m_rents;
  19.  
  20.     std::shared_ptr<Address> m_address = nullptr;
  21.     std::shared_ptr<Address> m_registeredAddress = nullptr;
  22.  
  23. public:
  24.     Client(const std::string &firstName, const std::string &lastName, const std::string &personalID);
  25.  
  26.     virtual ~Client();
  27.  
  28.     const std::string &getFirstName() const;
  29.  
  30.     void setFirstName(const std::string &firstName);
  31.  
  32.     const std::string &getLastName() const;
  33.  
  34.     void setLastName(const std::string &lastName);
  35.  
  36.     const std::string &getPersonalID() const;
  37.  
  38.     const std::vector<std::shared_ptr<Rent>> & getRents() const;
  39.  
  40.     void addRent(std::shared_ptr<Rent> rent);
  41.  
  42.     void removeRent(std::shared_ptr<Rent> rent);
  43.  
  44.     /***
  45.      * Get informations about client.
  46.      * @return combined string of first name, last name and personal ID.
  47.      */
  48.     std::string clientInfo();
  49.  
  50.     std::shared_ptr<Address> getAddress() const;
  51.  
  52.     void setAddress(std::shared_ptr<Address> address);
  53.  
  54.     std::shared_ptr<Address> getRegisteredAddress() const;
  55.  
  56.     void setRegisteredAddress(std::shared_ptr<Address> registeredAddress);
  57. };
  58.  
  59.  
  60. #endif //POBIPROJECT_CLIENT_HPP
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement