Loading...
Searching...
No Matches
compositeManager.h
Go to the documentation of this file.
// -*- Mode: C++; tab-width: 2; -*-
// vi: set ts=2:
//
#ifndef BALL_VIEW_KERNEL_COMPOSITEMANAGER_H
#define BALL_VIEW_KERNEL_COMPOSITEMANAGER_H
#ifndef BALL_DATATYPE_HASHSET_H
# include <BALL/DATATYPE/hashSet.h>
#endif
namespace BALL
{
class Composite;
class System;
namespace VIEW
{
class BALL_VIEW_EXPORT CompositeManager
{
public:
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;
CompositeManager();
CompositeManager(const CompositeManager& cm);
virtual ~CompositeManager();
virtual void clear();
bool has(const Composite* composite) const;
bool hasRoot(const Composite* composite) const;
bool insert(Composite& composite);
void remove(Composite& composite, bool to_delete = true);
Size getNumberOfComposites() const
{ return composite_set_.size();}
CompositeIterator begin()
{ return composite_set_.begin();}
CompositeIterator end()
{ return composite_set_.end();}
CompositeConstIterator begin() const
{ return composite_set_.begin();}
CompositeConstIterator end() const
{ return composite_set_.end();}
HashSet<Composite*>& getComposites()
{ return composite_set_;}
const HashSet<Composite*>& getComposites() const
{ return composite_set_;}
virtual void dump(std::ostream& s = std::cout, Size depth = 0) const;
private:
HashSet<Composite*> composite_set_;
HashSet<String> name_set_;
};
} // namespace VIEW
} // namespace BALL
#endif // BALL_VIEW_KERNEL_COMPOSITEMANAGER_H
BALL_VIEW_EXPORT
#define BALL_VIEW_EXPORT
Definition COMMON/global.h:52
BALL::Composite
Definition composite.h:74
BALL::ConstForwardIterator::begin
static ConstForwardIterator begin(const Container &container)
Definition forwardIterator.h:145
BALL::ConstForwardIterator::end
static ConstForwardIterator end(const Container &container)
Definition forwardIterator.h:175
BALL::ForwardIterator::begin
static ForwardIterator begin(const Container &container)
Definition forwardIterator.h:307
BALL::ForwardIterator::end
static ForwardIterator end(const Container &container)
Definition forwardIterator.h:317
BALL::HashSet
Definition hashSet.h:46
BALL::HashSet::Iterator
ForwardIterator< HashSet< Key >, ValueType, PointerType, IteratorTraits > Iterator
Definition hashSet.h:280
BALL::HashSet::ConstIterator
ConstForwardIterator< HashSet< Key >, ValueType, PointerType, IteratorTraits > ConstIterator
Definition hashSet.h:283
BALL::System
Definition KERNEL/system.h:40
BALL::VIEW::CompositeManager::CompositeManager
CompositeManager()
BALL::VIEW::CompositeManager::reference
Composite *& reference
Definition compositeManager.h:33
BALL::VIEW::CompositeManager::CompositeManager
CompositeManager(const CompositeManager &cm)
BALL::VIEW::CompositeManager::hasRoot
bool hasRoot(const Composite *composite) const
BALL::VIEW::CompositeManager::has
bool has(const Composite *composite) const
BALL::VIEW::CompositeManager::~CompositeManager
virtual ~CompositeManager()
BALL::VIEW::CompositeManager::size_type
Size size_type
Definition compositeManager.h:38
BALL::VIEW::CompositeManager::CompositeIterator
HashSet< Composite * >::Iterator CompositeIterator
Definition compositeManager.h:42
BALL::VIEW::CompositeManager::begin
CompositeConstIterator begin() const
Definition compositeManager.h:118
BALL::VIEW::CompositeManager::insert
bool insert(Composite &composite)
BALL::VIEW::CompositeManager::iterator
HashSet< Composite * >::Iterator iterator
Definition compositeManager.h:39
BALL::VIEW::CompositeManager::clear
virtual void clear()
BALL::VIEW::CompositeManager::getComposites
const HashSet< Composite * > & getComposites() const
Definition compositeManager.h:130
BALL::VIEW::CompositeManager::pointer
Composite ** pointer
Definition compositeManager.h:34
BALL::VIEW::CompositeManager::CompositeConstIterator
HashSet< Composite * >::ConstIterator CompositeConstIterator
Definition compositeManager.h:45
BALL::VIEW::CompositeManager::remove
void remove(Composite &composite, bool to_delete=true)
BALL::VIEW::CompositeManager::getComposites
HashSet< Composite * > & getComposites()
Definition compositeManager.h:126
BALL::VIEW::CompositeManager::dump
virtual void dump(std::ostream &s=std::cout, Size depth=0) const
BALL::VIEW::CompositeManager::value_type
Composite * value_type
Definition compositeManager.h:32
BALL::VIEW::CompositeManager::getNumberOfComposites
Size getNumberOfComposites() const
Definition compositeManager.h:101
BALL::VIEW::CompositeManager::const_pointer
const Composite ** const_pointer
Definition compositeManager.h:36
BALL::VIEW::CompositeManager::difference_type
Index difference_type
Definition compositeManager.h:37
BALL::VIEW::CompositeManager::end
CompositeIterator end()
Definition compositeManager.h:114
BALL::VIEW::CompositeManager::const_reference
const Composite *& const_reference
Definition compositeManager.h:35
BALL::VIEW::CompositeManager::end
CompositeConstIterator end() const
Definition compositeManager.h:122
BALL::VIEW::CompositeManager::begin
CompositeIterator begin()
Definition compositeManager.h:110
hashSet.h
BALL::VIEW
Definition constraints.h:35
BALL
Definition constants.h:13
BALL::Size
BALL_SIZE_TYPE Size
Definition COMMON/global.h:114
BALL::Index
BALL_INDEX_TYPE Index
Definition COMMON/global.h:105