Public Member Functions | |
| dummy_action (std::size_t team_index, bool hidden, int id) | |
| std::ostream & | print (std::ostream &s) const |
| void | accept (visitor &) |
| std::shared_ptr< dummy_action > | shared_from_this () |
| void | execute (bool &success, bool &complete) |
| Output parameters: success: Whether or not to continue an execute-all after this execution complete: Whether or not to delete this action after execution. More... | |
| void | apply_temp_modifier (unit_map &) |
| Applies temporarily the result of this action to the specified unit map. More... | |
| void | remove_temp_modifier (unit_map &) |
| Removes the result of this action from the specified unit map. More... | |
| void | draw_hex (const map_location &) |
| Gets called by display when drawing a hex, to allow actions to draw to the screen. More... | |
| map_location | get_numbering_hex () const |
| unit_ptr | get_unit () const |
| Return the unit targeted by this action. More... | |
| fake_unit_ptr | get_fake_unit () |
| error | check_validity () const |
| Check the validity of the action. More... | |
Public Member Functions inherited from wb::action | |
| action (std::size_t team_index, bool hidden) | |
| action (const config &, bool hidden) | |
| virtual | ~action () |
| virtual void | redraw () |
| Redrawing function, called each time the action situation might have changed. More... | |
| void | hide () |
| Sets whether or not the action should be drawn on the screen. More... | |
| void | show () |
| bool | hidden () const |
| bool | is_numbering_hex (const map_location &hex) const |
| Indicates whether this hex is the preferred hex to draw the numbering for this action. More... | |
| virtual bool | places_new_unit () const |
| Returns true for recall and recruit actions. More... | |
| virtual std::size_t | get_unit_id () const |
| Returns the id of the unit targeted by this action. More... | |
| std::size_t | team_index () const |
| Returns the index of the team that owns this action. More... | |
| int | side_number () const |
| Returns the number of the side that owns this action, i.e. More... | |
| virtual config | to_config () const |
| Constructs and returns a config object representing this object. More... | |
| bool | valid () |
| Returns whether this action is valid or not. More... | |
Public Attributes | |
| int | id_ |
Additional Inherited Members | |
Public Types inherited from wb::action | |
| enum | error { OK , INVALID_LOCATION , NO_UNIT , UNIT_CHANGED , LOCATION_OCCUPIED , TOO_FAR , NO_TARGET , NO_ATTACK_LEFT , NOT_AN_ENEMY , UNIT_UNAVAILABLE , NOT_ENOUGH_GOLD , NO_LEADER } |
| Possible errors. More... | |
Static Public Member Functions inherited from wb::action | |
| static action_ptr | from_config (const config &, bool hidden) |
| Constructs an object of a subclass of wb::action using a config. More... | |
Definition at line 27 of file test_whiteboard_side_actions.cpp.
|
inline |
Definition at line 28 of file test_whiteboard_side_actions.cpp.
|
inlinevirtual |
Implements wb::action.
Definition at line 33 of file test_whiteboard_side_actions.cpp.
|
inlinevirtual |
Applies temporarily the result of this action to the specified unit map.
Implements wb::action.
Definition at line 36 of file test_whiteboard_side_actions.cpp.
|
inlinevirtual |
Check the validity of the action.
| OK | if there isn't any error (the action can be executed.) |
Implements wb::action.
Definition at line 42 of file test_whiteboard_side_actions.cpp.
References gui2::OK.
|
inlinevirtual |
Gets called by display when drawing a hex, to allow actions to draw to the screen.
Implements wb::action.
Definition at line 38 of file test_whiteboard_side_actions.cpp.
|
inlinevirtual |
Output parameters: success: Whether or not to continue an execute-all after this execution complete: Whether or not to delete this action after execution.
Implements wb::action.
Definition at line 35 of file test_whiteboard_side_actions.cpp.
|
inlinevirtual |
Implements wb::action.
Definition at line 41 of file test_whiteboard_side_actions.cpp.
|
inlinevirtual |
Implements wb::action.
Definition at line 39 of file test_whiteboard_side_actions.cpp.
|
inlinevirtual |
Return the unit targeted by this action.
Null if unit doesn't exist.
Implements wb::action.
Definition at line 40 of file test_whiteboard_side_actions.cpp.
|
inlinevirtual |
Implements wb::action.
Definition at line 32 of file test_whiteboard_side_actions.cpp.
References s.
|
inlinevirtual |
Removes the result of this action from the specified unit map.
Implements wb::action.
Definition at line 37 of file test_whiteboard_side_actions.cpp.
|
inline |
Definition at line 34 of file test_whiteboard_side_actions.cpp.
| int dummy_action::id_ |
Definition at line 29 of file test_whiteboard_side_actions.cpp.