The Battle for Wesnoth  1.15.3+dev
Typedefs | Functions
ptr.hpp File Reference
#include <boost/intrusive_ptr.hpp>
#include <memory>
Include dependency graph for ptr.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.


typedef boost::intrusive_ptr< unitunit_ptr
typedef boost::intrusive_ptr< const unitunit_const_ptr
using attack_ptr = std::shared_ptr< attack_type >
using const_attack_ptr = std::shared_ptr< const attack_type >


void intrusive_ptr_add_ref (const unit *)
 Intrusive Pointer interface. More...
void intrusive_ptr_release (const unit *)

Typedef Documentation

◆ attack_ptr

using attack_ptr = std::shared_ptr<attack_type>

Definition at line 36 of file ptr.hpp.

◆ const_attack_ptr

using const_attack_ptr = std::shared_ptr<const attack_type>

Definition at line 37 of file ptr.hpp.

◆ unit_const_ptr

typedef boost::intrusive_ptr<const unit> unit_const_ptr

Definition at line 30 of file ptr.hpp.

◆ unit_ptr

typedef boost::intrusive_ptr<unit> unit_ptr

Definition at line 29 of file ptr.hpp.

Function Documentation

◆ intrusive_ptr_add_ref()

void intrusive_ptr_add_ref ( const unit u)

Intrusive Pointer interface.

Definition at line 216 of file unit.cpp.

References LOG_UT, and unit::ref_count_.

Referenced by unit::ref_count().

◆ intrusive_ptr_release()

void intrusive_ptr_release ( const unit )

Definition at line 231 of file unit.cpp.

References DBG_UT, unit::id(), unit::ref_count_, and unit::underlying_id().

Referenced by unit::ref_count().