Back to index

fet  5.18.0
Public Member Functions | Public Attributes
Room Class Reference

This class represents a room. More...

#include <room.h>

List of all members.

Public Member Functions

 Room ()
 ~Room ()
void computeInternalStructure (Rules &r)
QString getXmlDescription ()
QString getDescription ()
QString getDetailedDescription ()
QString getDetailedDescriptionWithConstraints (Rules &r)

Public Attributes

QString name
int capacity
QString building
 If empty string, it is ignored.
int buildingIndex
 Internal.

Detailed Description

This class represents a room.

Author:
Liviu Lalescu

Definition at line 39 of file room.h.


Constructor & Destructor Documentation

Definition at line 21 of file room.cpp.

{
       this->capacity=MAX_ROOM_CAPACITY;
       this->building="";
}

Definition at line 27 of file room.cpp.

{
}

Member Function Documentation

Definition at line 31 of file room.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

QString Room::getDescription ( )

Definition at line 41 of file room.cpp.

{
       QString s=tr("N:%1", "Name of room").arg(this->name);
       s+=", ";
       
       if(this->building!=""){
              s+=tr("B:%1", "Building").arg(this->building);
              s+=", ";
       }
       /*s+=tr("T:");
       s+=this->type;
       s+=",";*/
       s+=tr("C:%1", "Capacity").arg(CustomFETString::number(this->capacity));
       //s+=",";

       /*for(QStringList::Iterator it=this->equipments.begin(); it!=this->equipments.end(); it++)
              s+="E:"+(*it)+", ";*/

       return s;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 62 of file room.cpp.

{
       QString s=tr("Room");
       s+="\n";
       s+=tr("Name=%1", "The name of the room").arg(this->name);
       s+="\n";

       if(this->building!=""){
              s+=tr("Building=%1").arg(this->building);
              s+="\n";
       }
       /*s+=tr("Type=");
       s+=this->type;
       s+="\n";*/
       s+=tr("Capacity=%1").arg(CustomFETString::number(this->capacity));
       s+="\n";

       /*for(QStringList::Iterator it=this->equipments.begin(); it!=this->equipments.end(); it++)
              s+="Equipment="+(*it)+"\n";*/

       return s;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 101 of file room.cpp.

{
       QString s=this->getDetailedDescription();

       s+="--------------------------------------------------\n";
       s+=tr("Space constraints directly related to this room:");
       s+="\n";
       for(int i=0; i<r.spaceConstraintsList.size(); i++){
              SpaceConstraint* c=r.spaceConstraintsList[i];
              if(c->isRelatedToRoom(this)){
                     s+="\n";
                     s+=c->getDetailedDescription(r);
              }
       }
       s+="--------------------------------------------------\n";

       return s;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 85 of file room.cpp.

{
       QString s="<Room>\n";
       s+="   <Name>"+protect(this->name)+"</Name>\n";
       s+="   <Building>"+protect(this->building)+"</Building>\n";
       //s+=" <Type>"+protect(this->type)+"</Type>\n";
       s+="   <Capacity>"+CustomFETString::number(this->capacity)+"</Capacity>\n";
       
       /*for(QStringList::Iterator it=this->equipments.begin(); it!=this->equipments.end(); it++)
              s+="   <Equipment>"+protect(*it)+"</Equipment>\n";*/
       
       s+="</Room>\n";

       return s;
}

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

QString Room::building

If empty string, it is ignored.

Definition at line 49 of file room.h.

Internal.

If -1, it is ignored

Definition at line 54 of file room.h.

Definition at line 44 of file room.h.

QString Room::name

Definition at line 43 of file room.h.


The documentation for this class was generated from the following files: