1 ///////////////////////////////////////////////////////////
2 // Softwarebauelemente I, Aufgabe M7.1
3 //
4 // author: Stephan Brumme
5 // last changes: January 08, 2001
6
7 #ifndef __ROOM_H__
8 #define __ROOM_H__
9
10
11 #include "PrimitiveTypes.h"
12
13
14 // define the namespace Room
15 namespace MRoom
16 {
17 // Data structure representing a room unit
18 typedef int TRoom;
19
20 // struct TRoom
21 // {
22 // Ordinal NumberOfRooms;
23 // Ordinal Area;
24 // };
25
26
27 // Initializes the TRoom structure
28 void Init(TRoom &roo, Ordinal nor, Ordinal ar);
29
30 // Compares two exemplars
31 // returns "true" if attributes of both are equal; "false" otherwise
32 Boolean EqualValue(TRoom roo1, TRoom roo2);
33
34 // Copies the attributes of roo2
35 // returns "true" if successful, "false" if no memory allocated
36 Boolean Copy(TRoom& roo1, TRoom roo2);
37
38 // Returns the NumberOfRooms attribute
39 Ordinal GetNumberOfRooms(TRoom roo);
40
41 // Sets the NumberOfRooms attribute
42 void SetNumberOfRooms(TRoom &roo, Ordinal nor);
43
44 // Returns the Area attribute
45 Ordinal GetArea(TRoom roo);
46
47 // Displays the attributes
48 void Show(TRoom roo);
49 }
50
51 #endif
52