1 ///////////////////////////////////////////////////////////
2 // Softwarebauelemente II, Aufgabe O3.1
3 //
4 // author: Stephan Brumme
5 // last changes: May 15, 2001
6
7 #if !defined(AFX_ROOM_H__34138CE0_E97C_11D4_9BB7_8BA1BD2C3421__INCLUDED_)
8 #define AFX_ROOM_H__34138CE0_E97C_11D4_9BB7_8BA1BD2C3421__INCLUDED_
9
10 #if _MSC_VER > 1000
11 #pragma once
12 #endif // _MSC_VER > 1000
13
14
15 #include "BasicClass.h"
16
17
18 // declare class CRoom
19 class CRoom : public CBasicClass
20 {
21 public:
22 // constructors
23 CRoom();
24 CRoom(const CRoom& room);
25 CRoom(int nNumberOfRoom, int nArea);
26
27 // return class name
28 virtual string ClassnameOf() const { return "CRoom"; }
29
30 // display the attributes
31 virtual string Show() const;
32 // only for internal purposes !
33 virtual string ShowDebug() const;
34
35 // validate a room
36 virtual bool ClassInvariant() const;
37
38 // copy constructors
39 // non virtual
40 CRoom& operator = (const CRoom &room);
41 // virtual
42 virtual bool Copy(const CBasicClass* pClass);
43
44 // compare two dates
45 // non virtual
46 bool operator == (const CRoom &room) const;
47 // virtual
48 virtual bool EqualValue(const CBasicClass* pClass) const;
49
50 // access m_nNumberOfRoom
51 int GetNumberOfRoom() const;
52 void SetNumberOfRoom(const int nNumberOfRoom);
53
54 // retrieve covered area
55 int GetArea() const;
56
57 enum { MAXNUMBER = 100, MAXAREA = 100 };
58
59 private:
60 // hide the member variables
61 int m_nNumberOfRoom;
62 int m_nArea;
63 };
64
65 #endif // !defined(AFX_ROOM_H__34138CE0_E97C_11D4_9BB7_8BA1BD2C3421__INCLUDED_)
66
67