44 virtual std::ostream&
print(std::ostream&
s)
const;
48 virtual void execute(
bool& success,
bool& complete);
75 return std::static_pointer_cast<suppose_dead>(action::shared_from_this());
A config object defines a single node in a WML file, with access to child nodes.
Holds a temporary unit that can be drawn on the map without being placed in the unit_map.
Container associating units to locations.
This class represents a single unit of a specific type.
Abstract base class for all the whiteboard planned actions.
std::size_t team_index() const
Returns the index of the team that owns this action.
A planned action that temporarily removes a unit from the map for planning purposes.
virtual void accept(visitor &v)
std::size_t unit_underlying_id_
virtual fake_unit_ptr get_fake_unit()
virtual map_location get_numbering_hex() const
virtual unit_ptr get_unit() const
Return the unit targeted by this action.
virtual void execute(bool &success, bool &complete)
Output parameters: success: Whether or not to continue an execute-all after this execution complete: ...
virtual error check_validity() const
Check the validity of the action.
virtual std::ostream & print(std::ostream &s) const
virtual void apply_temp_modifier(unit_map &unit_map)
Applies temporarily the result of this action to the specified unit map.
suppose_dead(std::size_t team_index, bool hidden, unit &curr_unit, const map_location &loc)
virtual void remove_temp_modifier(unit_map &unit_map)
Removes the result of this action from the specified unit map.
std::shared_ptr< suppose_dead > shared_from_this()
virtual void redraw()
Redrawing function, called each time the action situation might have changed.
virtual void draw_hex(const map_location &hex)
Gets called by display when drawing a hex, to allow actions to draw to the screen.
virtual map_location get_source_hex() const
Return the location at which this action was planned.
virtual config to_config() const
Constructs and returns a config object representing this object.
Abstract base class for all the visitors (cf GoF Visitor Design Pattern) the whiteboard uses.
std::shared_ptr< suppose_dead > suppose_dead_ptr
std::ostream & operator<<(std::ostream &s, action_ptr action)
std::shared_ptr< suppose_dead const > suppose_dead_const_ptr
std::shared_ptr< unit > unit_ptr
Encapsulates the map of the game.
static map_location::direction s