sources:
M07_2.cpp (4.8k)
MDate.cpp (1.8k)
MDate.h (956 bytes)
MHouse.cpp (4.9k)
MHouse.h (1.9k)
MRoom.cpp (1.5k)
MRoom.h (1.1k)
PrimitiveTypes.h (421 bytes)


website:
more info here
studies/bauelemente/Softwarebauelemente-CodeM7-2/MRoom.h
download file

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