Files Classes Functions Hierarchy
#include <gobjbase.h>
Public Member Functions | |
| void | push_front (gobj *g) |
| void | push_back (gobj *g) |
| void | draw () |
| Draws vg[i]. | |
| gobjContainerdeque () | |
| Memory management enabled by default. | |
| gobjContainerdeque (boolc cleanup_) | |
| If cleanup is true the graphics objects need to have been constructed from new as they are deleted when this container dies. | |
| ~gobjContainerdeque () | |
| Destructor. | |
| void | nuke () |
| Empties the container of all graphics, calling delete if cleanup is true. | |
Public Attributes | |
| deque< gobj * > | vg |
| Public for the client to access all the graphics. | |
| bool | cleanup |
| Generally set at construction and leave. | |
Definition at line 234 of file gobjbase.h.
| gobjContainerdeque::gobjContainerdeque | ( | ) | [inline] |
Memory management enabled by default.
Definition at line 254 of file gobjbase.h.
00255 : cleanup(true) {};
| gobjContainerdeque::gobjContainerdeque | ( | boolc | cleanup_ | ) | [inline] |
If cleanup is true the graphics objects need to have been constructed from new as they are deleted when this container dies.
Definition at line 260 of file gobjbase.h.
00261 : cleanup(cleanup_) {};
| gobjContainerdeque::~gobjContainerdeque | ( | ) |
Destructor.
Definition at line 149 of file gobjbase.cpp.
References nuke().
00150 { 00151 nuke(); 00152 }
| void gobjContainerdeque::draw | ( | ) | [virtual] |
Draws vg[i].
Implements gobj.
Definition at line 123 of file gobjbase.cpp.
References GOBJDEBUGCODE, and vg.
Referenced by menusystem::draw(), and menusystem::drawparentsnested().
00124 { 00125 GOBJDEBUGCODE 00126 if (vg.empty()) 00127 return; 00128 00129 for (uint i=0; i<vg.size(); ++i) 00130 vg[i]->draw(); 00131 }
| void gobjContainerdeque::nuke | ( | ) |
Empties the container of all graphics, calling delete if cleanup is true.
Definition at line 133 of file gobjbase.cpp.
Referenced by textoverlay::init(), and ~gobjContainerdeque().
00134 { 00135 if (!cleanup) 00136 { 00137 vg.clear(); 00138 return; 00139 } 00140 00141 for (uint i=0; i<vg.size(); ++i) 00142 { 00143 delete vg[i]; 00144 vg[i] = 0; 00145 } 00146 vg.clear(); 00147 }
| void gobjContainerdeque::push_back | ( | gobj * | g | ) | [inline] |
Definition at line 240 of file gobjbase.h.
References vg.
Referenced by menusystem::fontcolorenable(), textoverlay::init(), textoverlay::lightingdisable(), and menusystemtest04::menusystemtest04().
00241 { assert(g!=0); vg.push_back(g); }
| void gobjContainerdeque::push_front | ( | gobj * | g | ) | [inline] |
Definition at line 238 of file gobjbase.h.
References vg.
Referenced by menusystem::fontcolorenable(), and textoverlay::lightingdisable().
00239 { assert(g!=0); vg.push_front(g); }
Generally set at construction and leave.
If set to true, calls delete on vg[i] when object dies.
Definition at line 251 of file gobjbase.h.
Referenced by nuke().
| deque<gobj*> gobjContainerdeque::vg |
Public for the client to access all the graphics.
Definition at line 247 of file gobjbase.h.
Referenced by draw(), nuke(), push_back(), and push_front().
1.5.8