Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- template<typename T>
- class display_context_proxy
- {
- private:
- using proxy_ref_t = typename utils::const_clone<display_context, T>::type
- template<typename S>
- using getter_t = typename utils::const_clone<S, proxy_ref_t>::type;
- public:
- explicit display_context_proxy(proxy_ref_t& dc) : dc_(dc) {}
- virtual ~display_context_proxy();
- getter_t<std::vector<team>>& teams() const
- {
- return dc_.teams();
- }
- getter_t<gamemap>& map() const
- {
- return dc_.map();
- }
- getter_t<unit_map>& units() const
- {
- return dc_.units();
- }
- getter_t<team>& get_team(int side) const
- {
- return dc_.get_team(side);
- }
- private:
- proxy_ref_t& dc_;
- };
Advertisement
Add Comment
Please, Sign In to add comment