You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

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