proj home

Files   Classes   Functions   Hierarchy  

gobjContainerPrePost Class Reference

Execute draw functions on the containers in the order of pre is first, this class is second and post is last. More...

#include <gobjbase.h>

Inheritance diagram for gobjContainerPrePost:
Collaboration diagram for gobjContainerPrePost:

List of all members.

Public Member Functions

void draw ()
 Draws pre, this and post containers.
 gobjContainerPrePost (boolc cleanup_=false)
 The three containers use the same memory stategy.

Public Attributes

gobjContainer pre
 The first geometry to be drawn.
gobjContainer post
 The last geometry to be drawn.


Detailed Description

Execute draw functions on the containers in the order of pre is first, this class is second and post is last.

The aquisition and release of resources usually follows a particular pattern. First be aquire the resouce. Then use it. Then clean up.

From a graphics perspective we can also use this class to change or update what is in the middle. For example initialize color in pre, restore color in post. And whenever the geometry gets rewritten clear and write the new geometry to the middle container.

So the client pushed and pops geometry into either of the three containers, the middle container being this classes derived container.

Definition at line 330 of file gobjbase.h.


Constructor & Destructor Documentation

gobjContainerPrePost::gobjContainerPrePost ( boolc  cleanup_ = false  )  [inline]

The three containers use the same memory stategy.

Definition at line 343 of file gobjbase.h.

00344     : gobjContainer(cleanup_), pre(cleanup_), post(cleanup_) {}


Member Function Documentation

void gobjContainerPrePost::draw (  )  [virtual]

Draws pre, this and post containers.

Reimplemented from gobjContainer.

Definition at line 192 of file gobjbase.cpp.

References gobjContainer::draw(), GOBJDEBUGCODE, post, and pre.

00193 {
00194   GOBJDEBUGCODE
00195   pre.draw();
00196   gobjContainer::draw();
00197   post.draw();
00198 }


Member Data Documentation

The last geometry to be drawn.

Definition at line 337 of file gobjbase.h.

Referenced by draw(), and pointsurface< T, G >::pointsurface().


The documentation for this class was generated from the following files:

Generated on Fri Mar 4 00:49:57 2011 for Chelton Evans Source by  doxygen 1.5.8