#include <BALL/VIEW/KERNEL/compositeManager.h>
Public Types | |
Typedefs for STL compliance | |
typedef Composite * | value_type |
typedef Composite *& | reference |
typedef Composite ** | pointer |
typedef const Composite *& | const_reference |
typedef const Composite ** | const_pointer |
typedef Index | difference_type |
typedef Size | size_type |
typedef HashSet< Composite * > ::Iterator | iterator |
typedef HashSet< Composite * > ::Iterator | CompositeIterator |
typedef HashSet< Composite * > ::ConstIterator | CompositeConstIterator |
Public Member Functions | |
Constructors and Destructors | |
CompositeManager () | |
CompositeManager (const CompositeManager &cm) | |
virtual | ~CompositeManager () |
virtual void | clear () |
Predicates | |
bool | has (const Composite *composite) const |
bool | hasRoot (const Composite *composite) const |
Accessors: inspectors and mutators | |
bool | insert (Composite &composite) |
void | remove (Composite &composite, bool to_delete=true) |
Size | getNumberOfComposites () const |
STL Iterator compliance | |
CompositeIterator | begin () |
CompositeIterator | end () |
CompositeConstIterator | begin () const |
CompositeConstIterator | end () const |
HashSet< Composite * > & | getComposites () |
const HashSet< Composite * > & | getComposites () const |
virtual void | dump (std::ostream &s=std::cout, Size depth=0) const |
Private Attributes | |
HashSet< Composite * > | composite_set_ |
HashSet< String > | name_set_ |
CompositeManager class. Management of Composites. This class is a container for all Composite objects, which are used in an application. When the CompositeManager is destroyed, all inserted Composites are deleted.
typedef HashSet<Composite*>::ConstIterator BALL::VIEW::CompositeManager::CompositeConstIterator |
typedef HashSet<Composite*>::Iterator BALL::VIEW::CompositeManager::CompositeIterator |
typedef const Composite** BALL::VIEW::CompositeManager::const_pointer |
typedef const Composite*& BALL::VIEW::CompositeManager::const_reference |
typedef HashSet<Composite*>::Iterator BALL::VIEW::CompositeManager::iterator |
BALL::VIEW::CompositeManager::CompositeManager | ( | ) |
Default Constructor.
BALL::VIEW::CompositeManager::CompositeManager | ( | const CompositeManager & | cm | ) |
Copy Constructor
virtual BALL::VIEW::CompositeManager::~CompositeManager | ( | ) | [virtual] |
Destructor.
CompositeConstIterator BALL::VIEW::CompositeManager::begin | ( | ) | const [inline] |
CompositeIterator BALL::VIEW::CompositeManager::begin | ( | ) | [inline] |
Referenced by BALL::Mainframe::eventFilter().
virtual void BALL::VIEW::CompositeManager::clear | ( | ) | [virtual] |
Explicit default initialization.
virtual void BALL::VIEW::CompositeManager::dump | ( | std::ostream & | s = std::cout , |
|
Size | depth = 0 | |||
) | const [virtual] |
Internal value dump. Dumps the current state to a output ostream s with dumping depth depth.
s | output stream where to output the state | |
depth | the dumping depth |
CompositeConstIterator BALL::VIEW::CompositeManager::end | ( | ) | const [inline] |
CompositeIterator BALL::VIEW::CompositeManager::end | ( | ) | [inline] |
Size BALL::VIEW::CompositeManager::getNumberOfComposites | ( | ) | const [inline] |
Return the number of inserted Composites
Referenced by BALL::Mainframe::eventFilter().
Test if the CompositeManager has the Composite itself or one of its ancestors. This method also works if the Composite might have been deleted, but it is quite slow O(n) with n = number of all Composites !
Test if the CompositeManager has the Composite itself as root entry (no search for childs or descendents). Quite Fast with O(log n) with n = number of roots (Systems).
HashSet<String> BALL::VIEW::CompositeManager::name_set_ [private] |