summaryrefslogtreecommitdiffstats
path: root/Bachelor/Prog2/Prakt2/SmartHouse/GeneralDevice.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Bachelor/Prog2/Prakt2/SmartHouse/GeneralDevice.cpp')
-rw-r--r--Bachelor/Prog2/Prakt2/SmartHouse/GeneralDevice.cpp42
1 files changed, 42 insertions, 0 deletions
diff --git a/Bachelor/Prog2/Prakt2/SmartHouse/GeneralDevice.cpp b/Bachelor/Prog2/Prakt2/SmartHouse/GeneralDevice.cpp
new file mode 100644
index 0000000..738051e
--- /dev/null
+++ b/Bachelor/Prog2/Prakt2/SmartHouse/GeneralDevice.cpp
@@ -0,0 +1,42 @@
+#include "GeneralDevice.h"
+#include <string>
+#include <iostream>
+
+using std::cout;
+using std::endl;
+using std::istream;
+using std::ostream;
+using std::string;
+
+ostream &operator<<( ostream& outstream, GeneralDevice &GenDev)
+{
+ GenDev.print();
+ return outstream;
+}
+
+GeneralDevice::GeneralDevice()
+{
+ cout << "Konstruktor GeneralDevice called" << endl;
+}
+
+GeneralDevice::GeneralDevice(char* devName)
+ :deviceName(devName)
+{
+ cout << "Überladener Konstruktor GeneralDevice called" << endl;
+}
+
+GeneralDevice::~GeneralDevice()
+{
+ cout << "Destruktor GeneralDevice called" << endl;
+}
+
+string GeneralDevice::getDeviceName()
+{
+ //cout << deviceName;
+ return deviceName;
+}
+
+void GeneralDevice::setDeviceName(string devName)
+{
+ deviceName=devName;
+}