sources:
BasicClass.h (1.4k)
C1_1.cpp (604 bytes)
CashOffice.cpp (3.8k)
CashOffice.h (1.8k)
Date.cpp (6.0k)
Date.h (2.9k)
Exception.cpp (2.5k)
Exception.h (1.4k)
House.cpp (7.5k)
House.h (2.7k)
Room.cpp (3.0k)
Room.h (1.6k)


binaries:
Release/C1_1.exe (140.0k)


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

  1 ///////////////////////////////////////////////////////////
  2 // Softwarebauelemente II, Aufgabe C1.1
  3 //
  4 // author: Stephan Brumme
  5 // last changes: July 3, 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 #include <string>
 17 #include <sstream>
 18 using namespace std;
 19
 20
 21
 22 class CBasicClass 
 23 {
 24 public:
 25     CBasicClass() {};
 26     virtual ~CBasicClass() {};
 27
 28     // show attributes
 29     virtual string Show() const = 0;
 30     // shows all internal attributes
 31     virtual string ShowDebug() const = 0;
 32
 33     // return class name
 34     virtual string ClassnameOf() const = 0;
 35
 36
 37     // copy constructors
 38     // non-virtual
 39 // CBasicClass& operator = (const CBasicClass &myclass);
 40     // virtual
 41     virtual bool Copy (const CBasicClass *pClass) = 0;
 42
 43     // compare two dates
 44     // non-virtual
 45 // bool operator ==(const CBasicClass &myclass) const;
 46     // virtual
 47     virtual bool EqualValue(const CBasicClass *pClass) const = 0;
 48
 49     // compare the address of two objects
 50     bool Equal(const CBasicClass *pClass) const
 51         { return (this == pClass); };
 52
 53     // determine whether object contains valid data
 54     virtual bool ClassInvariant() const = 0;
 55 };
 56
 57 #endif // !defined(AFX_BASICCLASS_H__C0EA0EA0_0BD2_11D5_9BB7_B22A84F06321__INCLUDED_)
 58
 59