/////////////////////////////////////////////////////////// // Softwarebauelemente I, Aufgabe M6.1 // // author: Stephan Brumme // last changes: November 23, 2000 #ifndef __ROOM_H__ #define __ROOM_H__ #include "PrimitiveTypes.h" // define the namespace Room namespace MRoom { // Data structure representing a room unit struct TRoom { Ordinal NumberOfRooms; Ordinal Area; }; // Initializes the TRoom structure void Init(TRoom &roo, Ordinal nor, Ordinal ar); // Compares two exemplars // returns "true" if attributes of both are equal; "false" otherwise Boolean EqualValue(TRoom roo1, TRoom roo2); // Copies the attributes of roo2 // returns "true" if successful, "false" if no memory allocated Boolean Copy(TRoom& roo1, TRoom roo2); // Returns the NumberOfRooms attribute Ordinal GetNumberOfRooms(TRoom roo); // Sets the NumberOfRooms attribute void SetNumberOfRooms(TRoom &roo, Ordinal nor); // Returns the Area attribute Ordinal GetArea(TRoom roo); // Displays the attributes void Show(TRoom roo); } #endif