ulvis.paste.net

Paste Search Dynamic
Recent pastes
IDs
  1. #ifndef COMPANY_H
  2. #define COMPANY_H
  3.  
  4. #include <iostream>
  5. #include <string>
  6. #include <sstream>
  7. #include <vector>
  8.  
  9. class Company : public HasId, public HasInfo {
  10. private:
  11.     int id;
  12.     std::string name;
  13.     std::vector < std::pair<char, char> > employees;
  14. public:
  15.     Company::Company();
  16.     Company::Company(int id, std::string name, std::vector<std::pair<char, char> > employees);
  17.     int Company::getId() const override;
  18.     std::string Company::getName() const;
  19.     std::vector<std::pair<char, char> > Company::getEmployees() const;
  20.     std::string Company::getInfo() const override;
  21.     friend std::ostream& operator<<(std::ostream& stream, const Company& c);
  22.     friend std::istream& operator>>(std::istream& stream, Company& c);
  23. };
  24.  
  25. struct HasId {
  26.     virtual int getId() const = 0;
  27.     virtual~HasId() {}
  28. };
  29.  
  30. struct HasInfo {
  31.     virtual std::string getInfo() const = 0;
  32.     virtual~HasInfo() {}
  33. };
  34.  
  35. #endif // COMPANY_H
Parsed in 0.009 seconds