Files Classes Functions Hierarchy
#include <gobjbase.h>
Public Member Functions | |
| gobjSwitch (gobj *x_, BOOL isdrawn_, boolc cleanup_=true) | |
| Pass the object, set the initial drawing state and memory policy. | |
| ~gobjSwitch () | |
| Possible cleanup. | |
| void | draw () |
| Draws the object x if flag is true. | |
| void | toggle () |
| Toggle the isdrawn variable. | |
Public Attributes | |
| gobj * | x |
| The object that the switch is acting on. | |
| BOOL | isdrawn |
| Is the object drawn when draw() is called? | |
| bool | cleanup |
| Release x when this object dies. | |
This class wraps a gobj in a switch so that the gobj can be displayed or not displayed depending on isdrawn's state.
The BOOL is designed to have either bool or bool & .
Definition at line 358 of file gobjbase.h.
| gobjSwitch< BOOL >::gobjSwitch | ( | gobj * | x_, | |
| BOOL | isdrawn_, | |||
| boolc | cleanup_ = true | |||
| ) | [inline] |
Pass the object, set the initial drawing state and memory policy.
If x_ is 0 this switch is in a unconstructed state.
Definition at line 374 of file gobjbase.h.
| gobjSwitch< BOOL >::~gobjSwitch | ( | ) | [inline] |
| void gobjSwitch< BOOL >::draw | ( | ) | [inline, virtual] |
Draws the object x if flag is true.
Implements gobj.
Definition at line 387 of file gobjbase.h.
00388 { GOBJDEBUGCODE assert(x!=0); if (isdrawn) x->draw(); }
| void gobjSwitch< BOOL >::toggle | ( | ) | [inline] |
| bool gobjSwitch< BOOL >::cleanup |
Release x when this object dies.
Definition at line 368 of file gobjbase.h.
Referenced by gobjSwitch< bool & >::~gobjSwitch().
| BOOL gobjSwitch< BOOL >::isdrawn |
Is the object drawn when draw() is called?
Definition at line 366 of file gobjbase.h.
Referenced by tessD2disp02< TESS, PT, INDX >::displaycircles(), tessD2disp02< TESS, PT, INDX >::displaymulticolor(), tessD2disp02< TESS, PT, INDX >::displaypoints(), tessD2disp02< TESS, PT, INDX >::displaysimplexindex(), gobjSwitch< bool & >::draw(), simplexD1tessapp01::mainmenu(), maze005::menubuild(), menusystemtest01::menusystemtest01(), circleD2test::test01(), boxOBBhalfspaceD2test::test01(), simplexD2tessapp01::test02(), diskinttest::test02(), delaunaysimpleD2test::test02(), diskinttest::test03(), treeindexedD2test::test03(), treeindexedD2test::test05(), and gobjSwitch< bool & >::toggle().
| gobj* gobjSwitch< BOOL >::x |
The object that the switch is acting on.
Definition at line 363 of file gobjbase.h.
Referenced by tessD2disp02< TESS, PT, INDX >::displaycircles(), tessD2disp02< TESS, PT, INDX >::displaymulticolor(), tessD2disp02< TESS, PT, INDX >::displaypoints(), tessD2disp02< TESS, PT, INDX >::displaysimplexindex(), gobjSwitch< bool & >::draw(), gobjSwitch< bool & >::toggle(), and gobjSwitch< bool & >::~gobjSwitch().
1.5.8