Loading...
Searching...
No Matches
BALL::VIEW::RepresentationManager Class Reference
Visualisation » Kernel » Geometric primitives and their management

`#include <BALL/VIEW/KERNEL/representationManager.h>`

Inheritance diagram for BALL::VIEW::RepresentationManager:

## Public Types

Type definitions
typedef HashSet< Representation * > | RepresentationSet
typedef RepresentationList::iterator | RepresentationsIterator
| Iteration to the Representations.
typedef RepresentationList::const_iterator | RepresentationsConstIterator
| ConstIterator to the Representations.

## Public Member Functions

Constructors and Destructor
| RepresentationManager (MainControl *mc=0)
| RepresentationManager (const RepresentationManager &pm)
virtual | ~RepresentationManager ()
Public Member Functions inherited from BALL::Object
| Object ()
| Default constructor.
| Object (const Object &object)
| Copy constructor.
virtual | ~Object ()
| Destructor.
const Object & | operator= (const Object &)
bool | operator== (const Object &object) const
bool | operator!= (const Object &object) const
bool | operator< (const Object &object) const
bool | operator<= (const Object &object) const
bool | operator>= (const Object &object) const
bool | operator> (const Object &object) const
int | compare (const Object &object) const
virtual bool | isValid () const
virtual void | dump (::std::ostream &s=std::cout, Size depth=0) const
Handle | getHandle () const
Public Member Functions inherited from BALL::AutoDeletable
virtual | ~AutoDeletable ()
void * | operator new (size_t size)
void | operator delete (void *ptr)
void * | operator new (size_t size, void *ptr)
void | operator delete (void *ptr, void *)
bool | isAutoDeletable () const
void | setAutoDeletable (bool enable)

## Friends

class | Representation
class | UpdateRepresentationThread
class | BALLThread
class | MainControl

## Accessors

RepresentationList | representations_
HashSet< Representation * > | beeing_rendered_
HashSet< Representation * > | beeing_updated_
HashSet< Representation * > | to_update_
vector< ClippingPlane * > | clipping_planes_
Mutex | update_mutex_
UpdateRepresentationThread * | thread_
bool | no_update_
bool | still_to_notify_
MainControl * | main_control_
const RepresentationManager & | operator= (const RepresentationManager &pm)
bool | operator== (const RepresentationManager &pm) const
void | clear ()
| Clears also the representations.
bool | remove (Representation &representation, bool send_message=true)
bool | insert (Representation &representation, bool send_message=true)
const RepresentationList & | getRepresentations () const
| Get the list with the Representations.
Size | getNumberOfRepresentations () const
| Get the number of the Representations.
Representation * | createRepresentation ()
| Create a Representation and insert it.
bool | has (const Representation &representation) const
| Test if a Representation is inserted.
void | dump (std::ostream &s, Size depth=0) const
| Dump the internal state to an output stream.
RepresentationsIterator | begin ()
| Iterator to the first Representation.
RepresentationsConstIterator | begin () const
| ConstIterator to the first Representation.
RepresentationsIterator | end ()
| Iterator pointing behind the last Representation.
RepresentationsConstIterator | end () const
| Const Iterator pointing behind the last Representation.
RepresentationList | removedComposite (const Composite &composite, bool update=true)
RepresentationList | getRepresentationsOf (const Composite &composite)
void | rebuildAllRepresentations ()
const vector< ClippingPlane * > & | getClippingPlanes () const
bool | removeClippingPlane (ClippingPlane *plane)
void | insertClippingPlane (ClippingPlane *plane)
void | storeRepresentations (INIFile &out)
void | restoreRepresentations (const INIFile &in, const vector< const Composite * > &new_systems)
void | focusRepresentation (const Representation &rep)
bool | willBeUpdated (const Representation &rep) const
| Return true if a Representation will be updated.
bool | updateRunning () const
| Return true, if a Representation is currently beeing updated.
bool | startRendering (Representation *rep)
void | finishedRendering (Representation *rep)
bool | isBeeingRendered (const Representation *rep) const
| Used by UpdateRepresentationThread.
Representation * | popRepresentationToUpdate ()
void | finishedUpdate_ (Representation *rep)
void | update_ (Representation &rep)

## Additional Inherited Members

static Handle | getNextHandle ()
static Handle | getNewHandle ()
static void | clearLastPtr ()
| AutoDeletable ()
| AutoDeletable (const AutoDeletable &auto_deletable, bool deep=false)

## Detailed Description

RepresentationManager manages the graphical Representation objects and all GeometricObject. All Representation objects which shall be inserted should be created using createRepresentation(). When the RepresentationManager is destroyed, all inserted Representation are deleted. The RepresentationManager has also the capability for multithreaded updateing of the Representation's:\ Representation::update() calls RepresentationManager::update_(Representation)\ if the code is build with support for multithreading. The update itself is done in an instance of UpdateRepresentationThread.

Definition at line 45 of file representationManager.h.

## Member Typedef Documentation

## RepresentationsConstIterator

typedef RepresentationList::const_iterator BALL::VIEW::RepresentationManager::RepresentationsConstIterator

ConstIterator to the Representations.

Definition at line 68 of file representationManager.h.

## RepresentationSet

typedef HashSet<Representation*> BALL::VIEW::RepresentationManager::RepresentationSet

Definition at line 62 of file representationManager.h.

## RepresentationsIterator

typedef RepresentationList::iterator BALL::VIEW::RepresentationManager::RepresentationsIterator

Iteration to the Representations.

Definition at line 65 of file representationManager.h.

## Constructor & Destructor Documentation

## RepresentationManager() [1/2]

BALL::VIEW::RepresentationManager::RepresentationManager | ( | MainControl * | mc = 0 | ) |

Default Constructor The MainControl is needed for sending Messages.

## RepresentationManager() [2/2]

BALL::VIEW::RepresentationManager::RepresentationManager | ( | const RepresentationManager & | pm | ) |

Copy constructor

## ~RepresentationManager()

virtual BALL::VIEW::RepresentationManager::~RepresentationManager | ( |  | ) |

virtual

Destructor

## Member Function Documentation

## begin() [1/2]

RepresentationsIterator BALL::VIEW::RepresentationManager::begin | ( |  | ) |

inline

Iterator to the first Representation.

Definition at line 134 of file representationManager.h.

## begin() [2/2]

RepresentationsConstIterator BALL::VIEW::RepresentationManager::begin | ( |  | ) | const

inline

ConstIterator to the first Representation.

Definition at line 138 of file representationManager.h.

## clear()

void BALL::VIEW::RepresentationManager::clear | ( |  | ) |

virtual

Clears also the representations.

Reimplemented from BALL::Object.

## createRepresentation()

Representation * BALL::VIEW::RepresentationManager::createRepresentation | ( |  | ) |

Create a Representation and insert it.

## dump()

void BALL::VIEW::RepresentationManager::dump | ( | std::ostream & | s,
|  | Size | depth = 0 ) const

Dump the internal state to an output stream.

## end() [1/2]

RepresentationsIterator BALL::VIEW::RepresentationManager::end | ( |  | ) |

inline

Iterator pointing behind the last Representation.

Definition at line 142 of file representationManager.h.

## end() [2/2]

RepresentationsConstIterator BALL::VIEW::RepresentationManager::end | ( |  | ) | const

inline

Const Iterator pointing behind the last Representation.

Definition at line 146 of file representationManager.h.

## finishedRendering()

void BALL::VIEW::RepresentationManager::finishedRendering | ( | Representation * | rep | ) |

## finishedUpdate_()

void BALL::VIEW::RepresentationManager::finishedUpdate_ | ( | Representation * | rep | ) |

protected

## focusRepresentation()

void BALL::VIEW::RepresentationManager::focusRepresentation | ( | const Representation & | rep | ) |

## getClippingPlanes()

const vector< ClippingPlane * > & BALL::VIEW::RepresentationManager::getClippingPlanes | ( |  | ) | const

inline

Definition at line 168 of file representationManager.h.

## getNumberOfRepresentations()

Size BALL::VIEW::RepresentationManager::getNumberOfRepresentations | ( |  | ) | const

inline

Get the number of the Representations.

Definition at line 121 of file representationManager.h.

## getRepresentations()

const RepresentationList & BALL::VIEW::RepresentationManager::getRepresentations | ( |  | ) | const

inline

Get the list with the Representations.

Definition at line 117 of file representationManager.h.

## getRepresentationsOf()

RepresentationList BALL::VIEW::RepresentationManager::getRepresentationsOf | ( | const Composite & | composite | ) |

Get a list of Representation, which were build for a Composite. Method is called in MainControl, after receiving CompositeChangedMessage.

Returns
  a list with the pointers of representations, which are to be updated.

## has()

bool BALL::VIEW::RepresentationManager::has | ( | const Representation & | representation | ) | const

Test if a Representation is inserted.

## insert()

bool BALL::VIEW::RepresentationManager::insert | ( | Representation & | representation,
|  | bool | send_message = true )

Insert a Representation If send_message is set to true, a RepresentationMessage with type ADD is send to notify all ModularWidget's.

## insertClippingPlane()

void BALL::VIEW::RepresentationManager::insertClippingPlane | ( | ClippingPlane * | plane | ) |

## isBeeingRendered()

bool BALL::VIEW::RepresentationManager::isBeeingRendered | ( | const Representation * | rep | ) | const

Used by UpdateRepresentationThread.

## operator=()

const RepresentationManager & BALL::VIEW::RepresentationManager::operator= | ( | const RepresentationManager & | pm | ) |

## operator==()

bool BALL::VIEW::RepresentationManager::operator== | ( | const RepresentationManager & | pm | ) | const

## popRepresentationToUpdate()

Representation * BALL::VIEW::RepresentationManager::popRepresentationToUpdate | ( |  | ) |

protected

## rebuildAllRepresentations()

void BALL::VIEW::RepresentationManager::rebuildAllRepresentations | ( |  | ) |

## remove()

bool BALL::VIEW::RepresentationManager::remove | ( | Representation & | representation,
|  | bool | send_message = true )

Delete a representation. It will be removed from the list of representations, its GeometricObject will be deleted. If send_message is set to true, a RepresentationMessage with type REMOVE is send to notify all ModularWidget's.

## removeClippingPlane()

bool BALL::VIEW::RepresentationManager::removeClippingPlane | ( | ClippingPlane * | plane | ) |

## removedComposite()

RepresentationList BALL::VIEW::RepresentationManager::removedComposite | ( | const Composite & | composite,
|  | bool | update = true )

Clean up after a Composite was removed. Method is called in MainControl, after removal of a composite (e.g. a System) and it removes all representations, which contain the Composite. It can also update all Representations, which have still have other Composites than the one to be deleted.

Returns
  a list with the pointers of all removed representations.

## restoreRepresentations()

void BALL::VIEW::RepresentationManager::restoreRepresentations | ( | const INIFile & | in,
|  | const vector< const Composite * > & | new_systems )

## startRendering()

bool BALL::VIEW::RepresentationManager::startRendering | ( | Representation * | rep | ) |

## storeRepresentations()

void BALL::VIEW::RepresentationManager::storeRepresentations | ( | INIFile & | out | ) |

## update_()

void BALL::VIEW::RepresentationManager::update_ | ( | Representation & | rep | ) |

protected

## updateRunning()

bool BALL::VIEW::RepresentationManager::updateRunning | ( |  | ) | const

Return true, if a Representation is currently beeing updated.

## willBeUpdated()

bool BALL::VIEW::RepresentationManager::willBeUpdated | ( | const Representation & | rep | ) | const

Return true if a Representation will be updated.

## Friends And Related Symbol Documentation

## BALLThread

friend class BALLThread

friend

Definition at line 50 of file representationManager.h.

## MainControl

friend class MainControl

friend

Definition at line 51 of file representationManager.h.

## Representation

friend class Representation

friend

Definition at line 48 of file representationManager.h.

## UpdateRepresentationThread

friend class UpdateRepresentationThread

friend

Definition at line 49 of file representationManager.h.

## Member Data Documentation

## beeing_rendered_

HashSet<Representation*> BALL::VIEW::RepresentationManager::beeing_rendered_

protected

Definition at line 216 of file representationManager.h.

## beeing_updated_

HashSet<Representation*> BALL::VIEW::RepresentationManager::beeing_updated_

protected

Definition at line 217 of file representationManager.h.

## clipping_planes_

vector<ClippingPlane*> BALL::VIEW::RepresentationManager::clipping_planes_

protected

Definition at line 220 of file representationManager.h.

## main_control_

MainControl* BALL::VIEW::RepresentationManager::main_control_

protected

Definition at line 230 of file representationManager.h.

## no_update_

bool BALL::VIEW::RepresentationManager::no_update_

protected

Definition at line 227 of file representationManager.h.

## representations_

RepresentationList BALL::VIEW::RepresentationManager::representations_

protected

Definition at line 214 of file representationManager.h.

## still_to_notify_

bool BALL::VIEW::RepresentationManager::still_to_notify_

protected

Definition at line 228 of file representationManager.h.

## thread_

UpdateRepresentationThread* BALL::VIEW::RepresentationManager::thread_

protected

Definition at line 226 of file representationManager.h.

## to_update_

HashSet<Representation*> BALL::VIEW::RepresentationManager::to_update_

protected

Definition at line 218 of file representationManager.h.

## update_mutex_

Mutex BALL::VIEW::RepresentationManager::update_mutex_

mutable protected

Definition at line 224 of file representationManager.h.