Physics::VisitorSmart Class Reference

Version of Visitor that includes methods to ensures that traversed bodies & joints will be visited only once. More...

#include <VisitorSmart.h>

Inheritance diagram for Physics::VisitorSmart:

Inheritance graph
[legend]

List of all members.

Public Member Functions

virtual void apply (Body &body)
 Default behaviour is to call applyOnce() when needed, but this can be overloaded for your needs.
virtual void apply (Joint &joint)
 Default behaviour is to call applyOnce() when needed, but this can be overloaded for your needs.
virtual void reset ()
 Method to reuse visitor for another traversal.

Protected Member Functions

virtual void applyOnce (Body &body)
virtual void applyOnce (Joint &joint)
bool isVisited (Body &body)
void visited (Body &body)
bool isVisited (Joint &joint)
void visited (Joint &joint)

Protected Attributes

std::set< Body * > visitedBodies
std::set< Joint * > visitedJoints


Detailed Description

Version of Visitor that includes methods to ensures that traversed bodies & joints will be visited only once.

Definition at line 38 of file VisitorSmart.h.


Member Function Documentation

virtual void Physics::VisitorSmart::apply ( Joint joint  )  [inline, virtual]

Default behaviour is to call applyOnce() when needed, but this can be overloaded for your needs.

Reimplemented from Physics::Visitor.

Definition at line 48 of file VisitorSmart.h.

References applyOnce(), isVisited(), and visited().

virtual void Physics::VisitorSmart::apply ( Body body  )  [inline, virtual]

Default behaviour is to call applyOnce() when needed, but this can be overloaded for your needs.

Reimplemented from Physics::Visitor.

Definition at line 41 of file VisitorSmart.h.

References applyOnce(), isVisited(), and visited().

virtual void Physics::VisitorSmart::applyOnce ( Joint joint  )  [inline, protected, virtual]

Definition at line 63 of file VisitorSmart.h.

virtual void Physics::VisitorSmart::applyOnce ( Body body  )  [inline, protected, virtual]

Definition at line 62 of file VisitorSmart.h.

Referenced by apply().

bool Physics::VisitorSmart::isVisited ( Joint joint  )  [inline, protected]

Definition at line 67 of file VisitorSmart.h.

References visitedJoints.

bool Physics::VisitorSmart::isVisited ( Body body  )  [inline, protected]

Definition at line 65 of file VisitorSmart.h.

References visitedBodies.

Referenced by apply(), and visited().

virtual void Physics::VisitorSmart::reset (  )  [inline, virtual]

Method to reuse visitor for another traversal.

Definition at line 56 of file VisitorSmart.h.

References visitedBodies, and visitedJoints.

void Physics::VisitorSmart::visited ( Joint joint  )  [inline, protected]

Definition at line 68 of file VisitorSmart.h.

References ASSERT, isVisited(), and visitedJoints.

void Physics::VisitorSmart::visited ( Body body  )  [inline, protected]

Definition at line 66 of file VisitorSmart.h.

References ASSERT, isVisited(), and visitedBodies.

Referenced by apply().


Member Data Documentation

std::set<Body *> Physics::VisitorSmart::visitedBodies [protected]

Definition at line 69 of file VisitorSmart.h.

Referenced by isVisited(), reset(), and visited().

Definition at line 70 of file VisitorSmart.h.

Referenced by isVisited(), reset(), and visited().


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

Generated on Sun Jan 17 11:39:37 2010 for PVLE (Pro-Vocation Light Engine) by  doxygen 1.5.9