15 #ifndef INCL_FAKE_UNIT_HPP_
16 #define INCL_FAKE_UNIT_HPP_
47 void reset(
const internal_ptr & ptr);
72 explicit operator bool()
const
73 {
return unit_.get() !=
nullptr; }
void reset()
Reset the internal unit pointer, and deregister from the manager. This fake_unit_ptr is now dissassoc...
internal_ptr get_unit_ptr()
Get a copy of the internal unit pointer.
void place_on_fake_unit_manager(fake_unit_manager *d)
Place this on manager's fake_units_ dequeue.
internal_const_ptr get_unit_ptr() const
Get a copy of the internal unit pointer.
internal_ptr operator->()
Dereference the internal unit pointer.
Manages a list of fake units for the display object.
int remove_from_fake_unit_manager()
Removes this from whatever fake_units_ list it is on (if any).
fake_unit_manager * my_manager_
Raw pointer to the manager.
~fake_unit_ptr()
Removes this from the fake_units_ list if necessary.
unit & operator*()
Derference the internal unit pointer.
internal_ptr unit_
Internal unit pointer.
unit_const_ptr internal_const_ptr
internal_const_ptr operator->() const
Dereference the internal unit pointer.
void swap(fake_unit_ptr &o)
Pointer swap.
fake_unit_ptr & operator=(fake_unit_ptr other)
Copy assignment operator using copy-and-swap idiom.
Holds a temporary unit that can be drawn on the map without being placed in the unit_map.