Cytosim PI Cytoskeleton Simulator

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

List of all members | Public Member Functions
Buddy Class Reference

## Detailed Description

Buddy implements mutual relationship between objects.

Relationship is established with hello(). Then goodbye() will be called for all buddies, when the object is destroyed.

This is the only thing that the class does. This class can be used if an object needs to know when another object is destroyed, and vice-versa.

F. Nedelec 11 Aug. 2012

Inheritance diagram for Buddy:

## Public Member Functions
virtual | ~Buddy ()
| upon destruction, goodbye is called for all buddies
void | hello (Buddy *b)
| will make this and b mutual buddies
virtual void | goodbye (Buddy *)
| this is called everytime a known buddy is destroyed
Buddy * | buddy (unsigned int ix) const
| return buddy at index ix
void | buddy (Buddy *b, unsigned int ix)
| replace the buddy that may have been at index ix