Private Member Functions | Private Attributes | Friends

object::ZombieObjects Class Reference

Periodically destroys zombie Objects. More...

#include <_src_object_zombies.hh>

List of all members.

Private Member Functions

 ZombieObjects (void)
 ~ZombieObjects ()
 DEFINE_GetInstance (ZombieObjects) void Zombify(shptr< Object > zombie)
void Tick (void)
void DestroyZombies (void)

Private Attributes

DECLARE_SINGLETON_CLASS_VARS(ZombieObjects)
std shptr< TickFunctor > 
mTickFunctor
 Timer-tick.

Friends

class Object
class program::Program

Detailed Description

Periodically destroys zombie Objects.

Rationale: Object::Zombify() is the catalyst for broadcasting the DestroyObject event. Yet, it cannot be broadcast while executing Object::Zombify() because of premature deletation (what if its refCount reaches zero!). So, Object::Zombify() delays its destruction by enqueueing itself into this container which is pulsed by a timer-tick for a safe-time to delete zombies.


Constructor & Destructor Documentation

object::ZombieObjects::ZombieObjects ( void   )  [private]
object::ZombieObjects::~ZombieObjects (  )  [private]

Member Function Documentation

object::ZombieObjects::DEFINE_GetInstance ( ZombieObjects   )  [private]
void object::ZombieObjects::DestroyZombies ( void   )  [inline, private]
void object::ZombieObjects::Tick ( void   )  [private]

Pulse.


Friends And Related Function Documentation

friend class Object [friend]
friend class program::Program [friend]

Member Data Documentation

DECLARE_SINGLETON_CLASS_VARS ( ZombieObjects ) std shptr<TickFunctor> object::ZombieObjects::mTickFunctor [private]

Timer-tick.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Palomino Flight Simulator documents generated by doxygen 1.7.1 on Tue May 15 2012 22:40:12