The Battle for Wesnoth  1.19.5+dev
Public Member Functions | Public Attributes | List of all members
actions::clearer_info Struct Reference

Class that stores the part of a unit's data that is needed for fog clearing. More...

#include <vision.hpp>

Public Member Functions

 clearer_info (const unit &viewer)
 Constructor from a unit. More...
 
 clearer_info (const config &cfg)
 Constructor from a config. More...
 
void write (config &cfg) const
 Writes to a config. More...
 

Public Attributes

std::size_t underlying_id
 
int sight_range
 
bool slowed
 
std::unique_ptr< movetype::terrain_costscosts
 costs is always non-null, all of the constructors initialize it More...
 

Detailed Description

Class that stores the part of a unit's data that is needed for fog clearing.

(Used by the undo stack as that cannot rely on a unit sticking around, and we do not really need to copy the entire unit.)

Definition at line 53 of file vision.hpp.

Constructor & Destructor Documentation

◆ clearer_info() [1/2]

actions::clearer_info::clearer_info ( const unit viewer)

Constructor from a unit.

Definition at line 98 of file vision.cpp.

◆ clearer_info() [2/2]

actions::clearer_info::clearer_info ( const config cfg)

Constructor from a config.

Definition at line 109 of file vision.cpp.

Member Function Documentation

◆ write()

void actions::clearer_info::write ( config cfg) const

Writes to a config.

Definition at line 120 of file vision.cpp.

References config::add_child(), costs, sight_range, slowed, and underlying_id.

Referenced by actions::shroud_clearing_action::write().

Member Data Documentation

◆ costs

std::unique_ptr<movetype::terrain_costs> actions::clearer_info::costs

costs is always non-null, all of the constructors initialize it

Definition at line 58 of file vision.hpp.

Referenced by actions::shroud_clearer::clear_unit(), and write().

◆ sight_range

int actions::clearer_info::sight_range

Definition at line 55 of file vision.hpp.

Referenced by actions::shroud_clearer::clear_unit(), and write().

◆ slowed

bool actions::clearer_info::slowed

Definition at line 56 of file vision.hpp.

Referenced by actions::shroud_clearer::clear_unit(), and write().

◆ underlying_id

std::size_t actions::clearer_info::underlying_id

Definition at line 54 of file vision.hpp.

Referenced by actions::shroud_clearer::clear_unit(), and write().


The documentation for this struct was generated from the following files: