Main Page | Class Hierarchy | Alphabetical List | Data Structures | Directories | File List | Data Fields | Globals

MultiDrawer Class Reference

Inheritance diagram for MultiDrawer:

Inheritance graph
[legend]
Collaboration diagram for MultiDrawer:

Collaboration graph
[legend]

Detailed Description

Container for pasive drawers.

Definition at line 11 of file MultiDrawer.h.

Public Member Functions

void acceptDrawer (Drawable *drawer)
 Store drawer at the end of list.
void removeDrawer (const Drawable *drawer)
 Remove equal drawer from list.
void removeAll ()
 Remove all drawers from list.
virtual void drawOn (SDL_Surface *screen)
 Let every registred drawer to draw.


Member Function Documentation

void MultiDrawer::acceptDrawer Drawable drawer  ) 
 

Store drawer at the end of list.

Definition at line 16 of file MultiDrawer.cpp.

00017 {
00018     m_drawers.push_back(drawer);
00019 }

void MultiDrawer::drawOn SDL_Surface *  screen  )  [virtual]
 

Let every registred drawer to draw.

Implements Drawable.

Definition at line 50 of file MultiDrawer.cpp.

00051 {
00052     t_drawers::iterator end = m_drawers.end();
00053     for (t_drawers::iterator i = m_drawers.begin(); i != end; ++i) {
00054         (*i)->drawOn(screen);
00055     }
00056 }

void MultiDrawer::removeAll  ) 
 

Remove all drawers from list.

Definition at line 41 of file MultiDrawer.cpp.

00042 {
00043     m_drawers.clear();
00044 }

void MultiDrawer::removeDrawer const Drawable drawer  ) 
 

Remove equal drawer from list.

Drawer will not be deleted.

Definition at line 26 of file MultiDrawer.cpp.

00027 {
00028     t_drawers::iterator end = m_drawers.end();
00029     for (t_drawers::iterator i = m_drawers.begin(); i != end; ++i) {
00030         if (*i == drawer) {
00031             m_drawers.erase(i);
00032             return;
00033         }
00034     }
00035 }


The documentation for this class was generated from the following files:
Generated on Wed Jun 1 09:55:59 2005 for Fish Fillets - Next Generation by  doxygen 1.4.2