Skip to content

Commit

Permalink
editor map context implements display_context interface
Browse files Browse the repository at this point in the history
  • Loading branch information
cbeck88 committed Jun 10, 2014
1 parent d9b3289 commit 90e5d92
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions src/editor/map/map_context.hpp
Expand Up @@ -22,6 +22,7 @@
#include "tod_manager.hpp"
#include "unit_map.hpp"
#include "overlay.hpp"
#include "../../display_context.hpp"

#include <boost/utility.hpp>
#include <boost/scoped_ptr.hpp>
Expand All @@ -35,7 +36,7 @@ namespace editor {
* as e.g. the undo stack is part of the map, not the editor as a whole. This might allow many
* maps to be open at the same time.
*/
class map_context : private boost::noncopyable
class map_context : public display_context, private boost::noncopyable
{
public:
/**
Expand All @@ -58,7 +59,7 @@ class map_context : private boost::noncopyable
/**
* Map context destructor
*/
~map_context();
virtual ~map_context();

/**
* Select the nth tod area.
Expand Down Expand Up @@ -122,6 +123,19 @@ class map_context : private boost::noncopyable

void replace_schedule(const std::vector<time_of_day>& schedule);

/**
* Const accessor names needed to implement "display_context" interface
*/
virtual const unit_map & units() const {
return units_;
}
virtual const std::vector<team>& teams() const {
return teams_;
}
virtual const gamemap & map() const {
return map_;
}

/**
* Replace the [time]s of the currently active area.
*/
Expand Down

0 comments on commit 90e5d92

Please sign in to comment.