1 ///////////////////////////////////////////////////////////
2 // Softwarebauelemente I, Aufgabe M6.1
3 //
4 // author: Stephan Brumme
5 // last changes: November 23, 2000
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 // Data structure representing a room unit
17 struct TRoom
{
18 Ordinal NumberOfRooms;
19 Ordinal Area;
20 };
21
22
23 // Initializes the TRoom structure
24 void Init(TRoom &roo, Ordinal nor, Ordinal ar);
25
26 // Compares two exemplars
27 // returns "true" if attributes of both are equal; "false" otherwise
28 Boolean EqualValue(TRoom roo1, TRoom roo2);
29
30 // Copies the attributes of roo2
31 // returns "true" if successful, "false" if no memory allocated
32 Boolean Copy(TRoom& roo1, TRoom roo2);
33
34 // Returns the NumberOfRooms attribute
35 Ordinal GetNumberOfRooms(TRoom roo);
36
37 // Sets the NumberOfRooms attribute
38 void SetNumberOfRooms(TRoom &roo, Ordinal nor);
39
40 // Returns the Area attribute
41 Ordinal GetArea(TRoom roo);
42
43 // Displays the attributes
44 void Show(TRoom roo);
45 }
46
47 #endif
48