Polaris: Zombie Class Reference

Zombie Class Reference

DESCRIPTION

The Zombie class is used to mark Listable objects which have been deleted but which still have outstanding references. In essence, if you attempt to delete a Listable object which still maintains ties with the the world of the living (in the form of references), the body of the object will be destroyed, but from its ashes will rise the undead corpse of the object: the Zombie! The soul-less Zombie will be sentenced to roam the netherworld between the live and the deleted, patiently waiting for the shackles of its references to be removed, so that it can finally be put to rest. Its body joining the heap of other rotting objects waiting rebirth, it's soul rising free from the Polaris IR, transcending forth from your very terminal, making the final pilgrimage to that sacred ground where all object-spirits can finally rest at ease, somewhere in Indiana. More...

#include <Zombie.h>

Inheritance diagram for Zombie:

Inheritance graph
[legend]
List of all members.

Public Member Functions

void * operator new (unsigned int size, Listable *a)
 inline void * operator new (size_t size);
void * operator new (unsigned int size)
 inline void operator delete (void * ptr, size_t size);
void operator delete (void *ptr, unsigned int size)
 void * operator new (size_t size);
virtual Listablelistable_clone () const
 Copy and return a pointer to any Listable item (MUST be implemented correctly by subclasses for List copy functions to work).
virtual void print (ostream &) const
void set_flags (struct packed_object p)
 Zombie ()
virtual ~Zombie ()

Detailed Description

DESCRIPTION

The Zombie class is used to mark Listable objects which have been deleted but which still have outstanding references. In essence, if you attempt to delete a Listable object which still maintains ties with the the world of the living (in the form of references), the body of the object will be destroyed, but from its ashes will rise the undead corpse of the object: the Zombie! The soul-less Zombie will be sentenced to roam the netherworld between the live and the deleted, patiently waiting for the shackles of its references to be removed, so that it can finally be put to rest. Its body joining the heap of other rotting objects waiting rebirth, it's soul rising free from the Polaris IR, transcending forth from your very terminal, making the final pilgrimage to that sacred ground where all object-spirits can finally rest at ease, somewhere in Indiana.

     ----------------------Zombie buffer------------------------

This buffer is used to maintain Listable objects which have been deleted using the global delete but which need to be turned into Zombies. Place them in this buffer, if one of these is encountered during a delete, it will be Zombied instead. This cludge is used in place of overloading the Listable delete operator.

Coffins hold Listable objects which need to be Zombied rather than being deleted.

Definition at line 97 of file Zombie.h.


Constructor & Destructor Documentation

Zombie::Zombie  )  [inline]
 

Definition at line 157 of file Zombie.h.

References register_instance().

Zombie::~Zombie  )  [virtual]
 

... Nothin' to do

Definition at line 28 of file Zombie.cc.

References cur_zombies, and unregister_instance().


Member Function Documentation

void* Zombie::operator new unsigned int  size,
Listable a
[inline]
 

inline void * operator new (size_t size);

void * Zombie::operator new unsigned int  size  )  [inline]
 

inline void operator delete (void * ptr, size_t size);

Reimplemented from Listable.

Definition at line 140 of file Zombie.h.

References pmalloc().

void Zombie::operator delete void *  ptr,
unsigned int  size
[inline]
 

void * operator new (size_t size);

2.Replaced operator delete with Zombie conversion. WHY: 1,2.This change, in combination with changes in dec_refs_delete_or_zombie, solve the cyclic reference count problem. (Please see Modification history for dec_refs_delete_or_zombie)

... since Zombie::CTOR zeroes this

... to restore them to previous values.

Reimplemented from Listable.

Listable * Zombie::listable_clone  )  const [virtual]
 

Copy and return a pointer to any Listable item (MUST be implemented correctly by subclasses for List copy functions to work).

Implements Listable.

Definition at line 17 of file Zombie.cc.

void Zombie::print ostream &   )  const [virtual]
 

Implements Listable.

Definition at line 23 of file Zombie.cc.

void Zombie::set_flags struct packed_object  p  )  [inline]
 

Definition at line 120 of file Zombie.h.


The documentation for this class was generated from the following files:
 © 1995-2005 University of Illinois, Urbana-Champaign. All rights reserved.  Fri Mar 25 23:08:43 2005