33 lines
790 B
C++
33 lines
790 B
C++
#ifndef LOCATION_H
|
|
#define LOCATION_H
|
|
|
|
#include <list>
|
|
#include <string>
|
|
#include <memory>
|
|
|
|
class Controller;
|
|
|
|
class Location
|
|
{
|
|
public:
|
|
struct Initializer
|
|
{
|
|
const std::string& message;
|
|
const std::list<std::shared_ptr<Controller>>& interactive_controllers;
|
|
};
|
|
|
|
explicit Location(Initializer &&initializer);
|
|
|
|
virtual const std::string& interact();
|
|
const std::list<std::shared_ptr<Controller>>& controllers();
|
|
void removeControllers(const std::list<std::shared_ptr<Controller>>& controllers);
|
|
void setInteractionMessage(const std::string& message);
|
|
|
|
private:
|
|
std::string _interaction_message;
|
|
std::list<std::shared_ptr<Controller>> _interactive_controllers;
|
|
std::shared_ptr<Location> _current_user_location;
|
|
};
|
|
|
|
#endif // LOCATION_H
|