sources:
BasicClass.cpp (550 bytes)
BasicClass.h (1.4k)
Date.cpp (3.8k)
Date.h (2.2k)
House.cpp (4.9k)
House.h (2.4k)
O2_1.cpp (619 bytes)
Room.cpp (2.3k)
Room.h (1.4k)


website:
more info here
studies/bauelemente/Softwarebauelemente-CodeO2-1/BasicClass.h
download file

  1 ///////////////////////////////////////////////////////////
  2 // Softwarebauelemente II, Aufgabe O2.1
  3 //
  4 // author: Stephan Brumme
  5 // last changes: February 26, 2001
  6
  7
  8 #if !defined(AFX_BASICCLASS_H__C0EA0EA0_0BD2_11D5_9BB7_B22A84F06321__INCLUDED_)
  9 #define AFX_BASICCLASS_H__C0EA0EA0_0BD2_11D5_9BB7_B22A84F06321__INCLUDED_
 10
 11 #if _MSC_VER > 1000
 12 #pragma once
 13 #endif // _MSC_VER > 1000
 14
 15
 16
 17 #include <iostream>
 18 using std::ostream;
 19 using std::cout;
 20 using std::endl;
 21
 22
 23 class CBasicClass 
 24 {
 25 public:
 26     CBasicClass();
 27     virtual ~CBasicClass();
 28
 29     // show attributes
 30     virtual void Show() const;
 31     // shows all internal attributes
 32     virtual void ShowDebug() const;
 33     // display the attributes
 34 // friend ostream& operator<<(ostream& mystream, const CBasicClass& myclass);
 35
 36     // return class name
 37     static char* ClassnameOf() { return "ERROR: CBasicClass::ClassnameOf not overwritten !!!"; }
 38
 39
 40     // copy constructors
 41     // non-virtual
 42 // CBasicClass& operator = (const CBasicClass &myclass);
 43     // virtual
 44 // virtual bool Copy (const CBasicClass *myclass);
 45
 46     // compare two dates
 47     // non-virtual
 48 // bool operator ==(const CBasicClass &myclass) const;
 49     // virtual
 50 // virtual bool EqualValue(CBasicClass *myclass) const;
 51
 52 protected:
 53     // used to perform proper display in derived classes
 54     virtual ostream& OutStream(ostream& mystream, bool bDebug=false) const = 0;
 55 };
 56
 57 #endif // !defined(AFX_BASICCLASS_H__C0EA0EA0_0BD2_11D5_9BB7_B22A84F06321__INCLUDED_)
 58
 59