Class Hierarchy
employee.h
Go to the documentation of this file.
1 #ifndef EMPLOYEE_H
2 #define EMPLOYEE_H
3 
4 #include <iostream>
5 #include <string>
6 
9 class Employee
10 {
11  public:
15  explicit Employee(const std::string& name); // explicit suggested by Intel compiler for a on-element parameter list in constructor
16 
17  Employee(Employee const&) = default; // copy constructor
18  Employee(Employee&&) = default; // move constructor
19  Employee& operator=(Employee const&) = default; // copy assignment operator
20  Employee& operator=(Employee &&) = default; // move assignment operator
21 
23  virtual ~Employee();
24 
28  virtual void print(std::ostream& s) const;
29 
33  virtual float payment() const = 0; // rein virtuell
34 // {return 0.0f; } // da war die Methode nur virtuell
35 
39  int get_Counter() const {return _counter;}
40 
44  std::string get_Name() const {return _name;}
45 
46  protected:
47  private:
48  std::string _name;
49  static int _counter;
50 };
51 
52 #endif // EMPLOYEE_H
virtual ~Employee()
Definition: employee.cpp:15
Employee(const std::string &name)
Definition: employee.cpp:8
std::string get_Name() const
Definition: employee.h:44
virtual float payment() const =0
int get_Counter() const
Definition: employee.h:39
Employee & operator=(Employee const &)=default
virtual void print(std::ostream &s) const
Definition: employee.cpp:22