2009-12-07 16:03:53 +01:00
|
|
|
#ifndef _OWLPS_POSITIONING_REFERENCEPOINT_HH_
|
|
|
|
#define _OWLPS_POSITIONING_REFERENCEPOINT_HH_
|
|
|
|
|
|
|
|
class Area ;
|
|
|
|
class Waypoint ;
|
|
|
|
|
2010-01-06 01:18:14 +01:00
|
|
|
#include <string>
|
2009-12-07 16:03:53 +01:00
|
|
|
#include <vector>
|
2010-01-06 01:18:14 +01:00
|
|
|
#include <ostream>
|
2009-12-07 16:03:53 +01:00
|
|
|
|
|
|
|
class Building
|
|
|
|
{
|
|
|
|
protected:
|
2010-01-04 17:10:42 +01:00
|
|
|
std::string name ;
|
|
|
|
std::vector<Area*> areas ;
|
|
|
|
std::vector<Waypoint*> waypoints ;
|
2009-12-07 16:03:53 +01:00
|
|
|
|
|
|
|
public :
|
2010-01-04 17:10:42 +01:00
|
|
|
Building(const std::string &_name = "Unnamed building") ;
|
2009-12-07 16:03:53 +01:00
|
|
|
Building(const Building &b) ;
|
|
|
|
|
|
|
|
~Building(void) ;
|
|
|
|
|
2010-01-04 17:10:42 +01:00
|
|
|
std::string get_name(void) const ;
|
|
|
|
std::vector<Area*> get_areas(void) const ;
|
|
|
|
std::vector<Waypoint*> get_waypoints(void) const ;
|
2009-12-07 16:03:53 +01:00
|
|
|
|
2010-01-04 17:10:42 +01:00
|
|
|
void set_name(const std::string &_name) ;
|
2009-12-07 16:03:53 +01:00
|
|
|
void add_area(const Area *a) ;
|
|
|
|
void add_waypoint(const Waypoint *wp) ;
|
|
|
|
|
|
|
|
Building operator=(const Building &p) ;
|
|
|
|
bool operator==(const Building &p) const ;
|
2010-01-05 11:50:24 +01:00
|
|
|
bool operator!=(const Building &p) const ;
|
2009-12-07 16:03:53 +01:00
|
|
|
|
2010-01-04 17:10:42 +01:00
|
|
|
friend std::ostream& operator<<(std::ostream &os, const Building &b) ;
|
2009-12-07 16:03:53 +01:00
|
|
|
} ;
|
|
|
|
|
2010-01-05 11:50:24 +01:00
|
|
|
|
|
|
|
|
|
|
|
/*** Accesseurs lecture ***/
|
|
|
|
|
|
|
|
|
|
|
|
inline std::string Building::get_name() const
|
|
|
|
{
|
|
|
|
return name ;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
inline std::vector<Area*> Building::get_areas() const
|
|
|
|
{
|
|
|
|
return areas ;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
inline std::vector<Waypoint*> Building::get_waypoints() const
|
|
|
|
{
|
|
|
|
return waypoints ;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*** Accesseurs écriture ***/
|
|
|
|
|
|
|
|
|
|
|
|
inline void Building::set_name(const std::string &_name)
|
|
|
|
{
|
|
|
|
name = _name ;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
inline void Building::add_area(const Area *a)
|
|
|
|
{
|
|
|
|
areas.push_back((Area *) a) ;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
inline void Building::add_waypoint(const Waypoint *wp)
|
|
|
|
{
|
|
|
|
waypoints.push_back((Waypoint *) wp) ;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*** Opérateurs ***/
|
|
|
|
|
|
|
|
|
|
|
|
inline bool Building::operator!=(const Building &b) const
|
|
|
|
{
|
|
|
|
return !(*this == b) ;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-12-07 16:03:53 +01:00
|
|
|
#endif // _OWLPS_POSITIONING_REFERENCEPOINT_HH_
|