Class Hierarchy
Main Page
Classes
Files
File List
File Members
employee.cpp
Go to the documentation of this file.
1
#include "
employee.h
"
2
#include <iostream>
3
#include <string>
4
using namespace
std
;
5
6
int
Employee::_counter = 0;
7
8
Employee::Employee
(
const
std::string& name)
9
: _name(name)
10
{
11
//ctor
12
++_counter;
13
}
14
15
Employee::~Employee
()
16
{
17
//dtor
18
--_counter;
19
}
20
21
22
void
Employee::print
(std::ostream& s)
const
23
{
24
s <<
"Name: "
<< _name << endl;
25
s <<
"Bezahlung: "
<<
payment
() << endl;
26
// Bei virtuellen Methoden wird hier zur Laufzeit
27
// via der VMT die konkrete Methode Klasse::payment()
28
// aufgerufen.
29
}
30
Employee::~Employee
virtual ~Employee()
Definition:
employee.cpp:15
Employee::Employee
Employee(const std::string &name)
Definition:
employee.cpp:8
std
employee.h
Employee::payment
virtual float payment() const =0
Employee::print
virtual void print(std::ostream &s) const
Definition:
employee.cpp:22
Generated on Wed May 27 2020 17:17:53 for Class Hierarchy by
1.8.11